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 36674f458..a17f5fad9 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -510,7 +510,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 961637639..d3a1b069e 100644 --- a/src/commands/actor/generate-schema-types.ts +++ b/src/commands/actor/generate-schema-types.ts @@ -79,9 +79,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'); });