From f2a3e751d2257c22a4d56cc7e1aab81a17125810 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Thu, 23 Apr 2026 13:54:28 +0300 Subject: [PATCH] feat(generate-schema-types): change default output path to src/__generat - Replace `.generated` with `__generated__` to follow common convention - Update .gitignore, docs, command default, and tests accordingly --- .gitignore | 2 +- docs/reference.md | 2 +- src/commands/actor/generate-schema-types.ts | 4 ++-- test/local/commands/actor/generate-schema-types.test.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 36ee55c90..af806902e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ _mytests .idea .zed docs/changelog.md -.generated +__generated__ # Yarn files .yarn/install-state.gz diff --git a/docs/reference.md b/docs/reference.md index ea2658199..f74cf0697 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -464,7 +464,7 @@ FLAGS --all-optional Mark all properties as optional in generated types. -o, --output= Directory where the generated files - should be outputted. Defaults to src/.generated/actor/ to + should be outputted. Defaults to src/__generated__/actor/ to stay within the typical tsconfig rootDir. --strict Whether generated interfaces should be strict (no index signature [key: string]: unknown). diff --git a/src/commands/actor/generate-schema-types.ts b/src/commands/actor/generate-schema-types.ts index 6450a0b66..483fbfb43 100644 --- a/src/commands/actor/generate-schema-types.ts +++ b/src/commands/actor/generate-schema-types.ts @@ -60,9 +60,9 @@ Optionally specify custom schema path to use.`; output: Flags.string({ char: 'o', description: - 'Directory where the generated files should be outputted. Defaults to src/.generated/actor/ to stay within the typical tsconfig rootDir.', + 'Directory where the generated files should be outputted. Defaults to src/__generated__/actor/ to stay within the typical tsconfig rootDir.', required: false, - default: path.join('src', '.generated', 'actor'), + default: path.join('src', '__generated__', 'actor'), }), strict: Flags.boolean({ description: 'Whether generated interfaces should be strict (no index signature [key: string]: unknown).', diff --git a/test/local/commands/actor/generate-schema-types.test.ts b/test/local/commands/actor/generate-schema-types.test.ts index 51f5fe1d6..baea8a328 100644 --- a/test/local/commands/actor/generate-schema-types.test.ts +++ b/test/local/commands/actor/generate-schema-types.test.ts @@ -139,9 +139,9 @@ describe('apify actor generate-schema-types', () => { }); expect(lastErrorMessage()).include('Generated types written to'); - expect(lastErrorMessage()).include(join('.generated', 'actor', 'input.ts')); + expect(lastErrorMessage()).include(join('__generated__', 'actor', 'input.ts')); - const generatedFile = await readFile(joinPath('src', '.generated', 'actor', 'input.ts'), 'utf-8'); + const generatedFile = await readFile(joinPath('src', '__generated__', 'actor', 'input.ts'), 'utf-8'); expect(generatedFile).toContain('export interface'); });