@teambit/generator 0.0.553 → 0.0.557

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/component-generator.d.ts +3 -0
  2. package/dist/component-template.d.ts +37 -0
  3. package/dist/generator.main.runtime.d.ts +29 -0
  4. package/dist/workspace-generator.d.ts +3 -0
  5. package/dist/workspace-template.d.ts +45 -0
  6. package/package.json +28 -20
  7. package/tsconfig.json +1 -2
  8. package/component-generator.ts +0 -119
  9. package/component-template.ts +0 -66
  10. package/create.cmd.ts +0 -44
  11. package/generator.aspect.ts +0 -5
  12. package/generator.docs.mdx +0 -8
  13. package/generator.graphql.ts +0 -66
  14. package/generator.main.runtime.ts +0 -279
  15. package/index.ts +0 -4
  16. package/new.cmd.ts +0 -79
  17. package/package-tar/teambit-generator-0.0.553.tgz +0 -0
  18. package/templates/component-generator/files/aspect-file.ts +0 -10
  19. package/templates/component-generator/files/docs-file.ts +0 -54
  20. package/templates/component-generator/files/index.ts +0 -10
  21. package/templates/component-generator/files/main-runtime.ts +0 -125
  22. package/templates/component-generator/index.ts +0 -32
  23. package/templates/workspace-generator/files/aspect-file.ts +0 -10
  24. package/templates/workspace-generator/files/docs-file.ts +0 -37
  25. package/templates/workspace-generator/files/git-ignore-tpl.ts +0 -113
  26. package/templates/workspace-generator/files/index-tpl.ts +0 -29
  27. package/templates/workspace-generator/files/index.ts +0 -10
  28. package/templates/workspace-generator/files/main-runtime.ts +0 -24
  29. package/templates/workspace-generator/files/readme-tpl.ts +0 -39
  30. package/templates/workspace-generator/files/workspace-config-tpl.ts +0 -18
  31. package/templates/workspace-generator/index.ts +0 -52
  32. package/templates.cmd.ts +0 -48
  33. package/types/asset.d.ts +0 -29
  34. package/types/style.d.ts +0 -42
  35. package/types.ts +0 -3
  36. package/workspace-generator.ts +0 -246
  37. package/workspace-template.ts +0 -82
@@ -19,6 +19,9 @@ export declare class ComponentGenerator {
19
19
  generate(): Promise<GenerateResult[]>;
20
20
  private deleteGeneratedComponents;
21
21
  private generateOneComponent;
22
+ /**
23
+ * writes the generated template files to the default directory set in the workspace config
24
+ */
22
25
  private writeComponentFiles;
23
26
  private getComponentPath;
24
27
  }
@@ -1,18 +1,55 @@
1
1
  import { ComponentID } from '@teambit/component-id';
2
2
  export interface ComponentFile {
3
+ /**
4
+ * relative path of the file within the component.
5
+ */
3
6
  relativePath: string;
7
+ /**
8
+ * file content
9
+ */
4
10
  content: string;
11
+ /**
12
+ * whether this file will be tracked as the main file
13
+ */
5
14
  isMain?: boolean;
6
15
  }
7
16
  export interface ComponentContext {
17
+ /**
18
+ * component-name as entered by the user, e.g. `use-date`.
19
+ * without the scope and the namespace.
20
+ */
8
21
  name: string;
22
+ /**
23
+ * component-name as upper camel case, e.g. `use-date` becomes `UseDate`.
24
+ * useful when generating the file content, for example for a class name.
25
+ */
9
26
  namePascalCase: string;
27
+ /**
28
+ * component-name as lower camel case, e.g. `use-date` becomes `useDate`.
29
+ * useful when generating the file content, for example for a function/variable name.
30
+ */
10
31
  nameCamelCase: string;
32
+ /**
33
+ * component id.
34
+ * the name is the name+namespace. the scope is the scope entered by --scope flag or the defaultScope
35
+ */
11
36
  componentId: ComponentID;
12
37
  }
13
38
  export interface ComponentTemplate {
39
+ /**
40
+ * name of the component template. for example: `hook`, `react-component` or `module`.
41
+ */
14
42
  name: string;
43
+ /**
44
+ * short description of the template. shown in the `bit templates` command.
45
+ */
15
46
  description?: string;
47
+ /**
48
+ * hide this template so that it is not listed with `bit templates`
49
+ */
16
50
  hidden?: boolean;
51
+ /**
52
+ * template function for generating the file of a certain component.,
53
+ */
17
54
  generateFiles(context: ComponentContext): ComponentFile[];
18
55
  }
@@ -19,6 +19,9 @@ export declare type TemplateDescriptor = {
19
19
  hidden?: boolean;
20
20
  };
21
21
  export declare type GeneratorConfig = {
22
+ /**
23
+ * array of aspects to include in the list of templates.
24
+ */
22
25
  aspects: string[];
23
26
  };
24
27
  export declare class GeneratorMain {
@@ -30,15 +33,41 @@ export declare class GeneratorMain {
30
33
  private aspectLoader;
31
34
  private aspectLoaded;
32
35
  constructor(componentTemplateSlot: ComponentTemplateSlot, workspaceTemplateSlot: WorkspaceTemplateSlot, config: GeneratorConfig, workspace: Workspace, envs: EnvsMain, aspectLoader: AspectLoaderMain);
36
+ /**
37
+ * register a new component template.
38
+ */
33
39
  registerComponentTemplate(templates: ComponentTemplate[]): this;
40
+ /**
41
+ * register a new component template.
42
+ */
34
43
  registerWorkspaceTemplate(templates: WorkspaceTemplate[]): this;
44
+ /**
45
+ * list all component templates registered in the workspace or workspace templates in case the
46
+ * workspace is not available
47
+ */
35
48
  listTemplates(): Promise<TemplateDescriptor[]>;
49
+ /**
50
+ * @deprecated use this.listTemplates()
51
+ */
36
52
  listComponentTemplates(): Promise<TemplateDescriptor[]>;
37
53
  isRunningInsideWorkspace(): boolean;
54
+ /**
55
+ * get all component templates registered by a specific aspect ID.
56
+ */
38
57
  getComponentTemplateByAspect(aspectId: string): ComponentTemplate[];
58
+ /**
59
+ * returns a specific component template.
60
+ */
39
61
  getComponentTemplate(name: string, aspectId?: string): ComponentTemplate | undefined;
62
+ /**
63
+ * in the case the aspect-id is given and this aspect doesn't exist locally, import it to the
64
+ * global scope and load it from the capsule
65
+ */
40
66
  findTemplateInGlobalScope(aspectId: string, name?: string): Promise<WorkspaceTemplate | undefined>;
41
67
  findTemplateInOtherWorkspace(workspacePath: string, name: string, aspectId?: string): Promise<WorkspaceTemplate | undefined>;
68
+ /**
69
+ * returns a specific workspace template.
70
+ */
42
71
  getWorkspaceTemplate(name: string, aspectId?: string): Promise<{
43
72
  workspaceTemplate: WorkspaceTemplate;
44
73
  aspect?: Component;
@@ -21,6 +21,9 @@ export declare class WorkspaceGenerator {
21
21
  generate(): Promise<string>;
22
22
  private initGit;
23
23
  private buildUI;
24
+ /**
25
+ * writes the generated template files to the default directory set in the workspace config
26
+ */
24
27
  private writeWorkspaceFiles;
25
28
  private reloadBitInWorkspaceDir;
26
29
  private addComponentsFromRemote;
@@ -1,23 +1,68 @@
1
1
  import type { Component } from '@teambit/component';
2
2
  export interface WorkspaceFile {
3
+ /**
4
+ * relative path of the file within the workspace.
5
+ */
3
6
  relativePath: string;
7
+ /**
8
+ * file content
9
+ */
4
10
  content: string;
5
11
  }
6
12
  export interface WorkspaceContext {
13
+ /**
14
+ * workspace-name as entered by the user, e.g. `react-app`.
15
+ * it is used as the directory name for the workspace.
16
+ */
7
17
  name: string;
18
+ /**
19
+ * default scope as entered by the user.
20
+ * it will be set in the workspace.jsonc and be used for components
21
+ */
8
22
  defaultScope?: string;
23
+ /**
24
+ * whether user entered `--empty` flag in `bit new` to avoid creating components.
25
+ */
9
26
  empty?: boolean;
27
+ /**
28
+ * in case the "--aspect" flag used to import a remote aspect, this is populated with that aspect.
29
+ * useful to get the aspect-id and other info.
30
+ */
10
31
  aspectComponent?: Component;
11
32
  }
12
33
  export interface ComponentToImport {
34
+ /**
35
+ * full component id
36
+ */
13
37
  id: string;
38
+ /**
39
+ * path where to write the component
40
+ */
14
41
  path: string;
42
+ /**
43
+ * a new component name. if not specified, use the original id (without the scope)
44
+ */
15
45
  targetName?: string;
16
46
  }
17
47
  export interface WorkspaceTemplate {
48
+ /**
49
+ * name of the workspace template. for example: `react-workspace`.
50
+ */
18
51
  name: string;
52
+ /**
53
+ * short description of the template. shown in the `bit templates` command when outside of bit-workspace.
54
+ */
19
55
  description?: string;
56
+ /**
57
+ * hide this template so that it is not listed with `bit templates`
58
+ */
20
59
  hidden?: boolean;
60
+ /**
61
+ * template function for generating the template files,
62
+ */
21
63
  generateFiles(context: WorkspaceContext): Promise<WorkspaceFile[]>;
64
+ /**
65
+ * populate existing components into the new workspace and add them as new components
66
+ */
22
67
  importComponents?: () => ComponentToImport[];
23
68
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/generator",
3
- "version": "0.0.553",
3
+ "version": "0.0.557",
4
4
  "homepage": "https://bit.dev/teambit/generator/generator",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.generator",
8
8
  "name": "generator",
9
- "version": "0.0.553"
9
+ "version": "0.0.557"
10
10
  },
11
11
  "dependencies": {
12
12
  "camelcase": "6.2.0",
@@ -21,21 +21,21 @@
21
21
  "isbinaryfile": "4.0.6",
22
22
  "@babel/runtime": "7.12.18",
23
23
  "core-js": "^3.0.0",
24
- "@teambit/bit-error": "0.0.370",
25
- "@teambit/component-id": "0.0.374",
26
- "@teambit/envs": "0.0.553",
27
- "@teambit/workspace": "0.0.553",
28
- "@teambit/cli": "0.0.384",
29
- "@teambit/graphql": "0.0.553",
30
- "@teambit/aspect-loader": "0.0.553",
31
- "@teambit/bit": "0.0.555",
32
- "@teambit/component": "0.0.553",
33
- "@teambit/legacy-bit-id": "0.0.373",
34
- "@teambit/compiler": "0.0.553",
35
- "@teambit/dependency-resolver": "0.0.553",
36
- "@teambit/logger": "0.0.469",
37
- "@teambit/pkg": "0.0.553",
38
- "@teambit/ui": "0.0.553"
24
+ "@teambit/bit-error": "0.0.374",
25
+ "@teambit/component-id": "0.0.378",
26
+ "@teambit/envs": "0.0.557",
27
+ "@teambit/workspace": "0.0.557",
28
+ "@teambit/cli": "0.0.388",
29
+ "@teambit/graphql": "0.0.557",
30
+ "@teambit/aspect-loader": "0.0.557",
31
+ "@teambit/bit": "0.0.559",
32
+ "@teambit/component": "0.0.557",
33
+ "@teambit/legacy-bit-id": "0.0.377",
34
+ "@teambit/compiler": "0.0.557",
35
+ "@teambit/dependency-resolver": "0.0.557",
36
+ "@teambit/logger": "0.0.473",
37
+ "@teambit/pkg": "0.0.557",
38
+ "@teambit/ui": "0.0.557"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/fs-extra": "9.0.7",
@@ -46,10 +46,10 @@
46
46
  "@types/react-dom": "^17.0.5",
47
47
  "@types/react": "^17.0.8",
48
48
  "@types/node": "12.20.4",
49
- "@teambit/generator.aspect-docs.generator": "0.0.106"
49
+ "@teambit/generator.aspect-docs.generator": "0.0.110"
50
50
  },
51
51
  "peerDependencies": {
52
- "@teambit/legacy": "1.0.170",
52
+ "@teambit/legacy": "1.0.174",
53
53
  "react-dom": "^16.8.0 || ^17.0.0",
54
54
  "react": "^16.8.0 || ^17.0.0"
55
55
  },
@@ -77,12 +77,20 @@
77
77
  "react": "-"
78
78
  },
79
79
  "peerDependencies": {
80
- "@teambit/legacy": "1.0.170",
80
+ "@teambit/legacy": "1.0.174",
81
81
  "react-dom": "^16.8.0 || ^17.0.0",
82
82
  "react": "^16.8.0 || ^17.0.0"
83
83
  }
84
84
  }
85
85
  },
86
+ "files": [
87
+ "dist",
88
+ "!dist/tsconfig.tsbuildinfo",
89
+ "README.md",
90
+ "README.mdx",
91
+ "*.js",
92
+ "*.json"
93
+ ],
86
94
  "private": false,
87
95
  "engines": {
88
96
  "node": ">=12.22.0"
package/tsconfig.json CHANGED
@@ -15,9 +15,9 @@
15
15
  "skipLibCheck": true,
16
16
  "moduleResolution": "node",
17
17
  "esModuleInterop": true,
18
- "outDir": "dist",
19
18
  "composite": true,
20
19
  "emitDeclarationOnly": true,
20
+ "outDir": "dist",
21
21
  "experimentalDecorators": true,
22
22
  "emitDecoratorMetadata": true,
23
23
  "allowSyntheticDefaultImports": true,
@@ -25,7 +25,6 @@
25
25
  "strict": true,
26
26
  "noImplicitAny": false,
27
27
  "rootDir": ".",
28
- "removeComments": true,
29
28
  "preserveConstEnums": true,
30
29
  "resolveJsonModule": true
31
30
  },
@@ -1,119 +0,0 @@
1
- import Vinyl from 'vinyl';
2
- import fs from 'fs-extra';
3
- import pMapSeries from 'p-map-series';
4
- import path from 'path';
5
- import { Workspace } from '@teambit/workspace';
6
- import { EnvsMain } from '@teambit/envs';
7
- import camelcase from 'camelcase';
8
- import { BitError } from '@teambit/bit-error';
9
- import { PathOsBasedRelative } from '@teambit/legacy/dist/utils/path';
10
- import { AbstractVinyl } from '@teambit/legacy/dist/consumer/component/sources';
11
- import DataToPersist from '@teambit/legacy/dist/consumer/component/sources/data-to-persist';
12
- import { composeComponentPath } from '@teambit/legacy/dist/utils/bit/compose-component-path';
13
- import { ComponentID } from '@teambit/component-id';
14
- import { ComponentTemplate, ComponentFile } from './component-template';
15
- import { CreateOptions } from './create.cmd';
16
-
17
- export type GenerateResult = { id: ComponentID; dir: string; files: string[]; envId: string };
18
-
19
- export class ComponentGenerator {
20
- constructor(
21
- private workspace: Workspace,
22
- private componentIds: ComponentID[],
23
- private options: CreateOptions,
24
- private template: ComponentTemplate,
25
- private envs: EnvsMain
26
- ) {}
27
-
28
- async generate(): Promise<GenerateResult[]> {
29
- const dirsToDeleteIfFailed: string[] = [];
30
- const generateResults = await pMapSeries(this.componentIds, async (componentId) => {
31
- try {
32
- const componentPath = this.getComponentPath(componentId);
33
- if (fs.existsSync(path.join(this.workspace.path, componentPath))) {
34
- throw new BitError(`unable to create a component at "${componentPath}", this path already exist`);
35
- }
36
- if (await this.workspace.hasName(componentId.fullName)) {
37
- throw new BitError(
38
- `unable to create a component "${componentId.fullName}", a component with the same name already exist`
39
- );
40
- }
41
- dirsToDeleteIfFailed.push(componentPath);
42
- return await this.generateOneComponent(componentId, componentPath);
43
- } catch (err: any) {
44
- await this.deleteGeneratedComponents(dirsToDeleteIfFailed);
45
- throw err;
46
- }
47
- });
48
-
49
- await this.workspace.writeBitMap();
50
-
51
- return generateResults;
52
- }
53
-
54
- private async deleteGeneratedComponents(dirs: string[]) {
55
- await Promise.all(
56
- dirs.map(async (dir) => {
57
- const absoluteDir = path.join(this.workspace.path, dir);
58
- try {
59
- await fs.remove(absoluteDir);
60
- } catch (err: any) {
61
- if (err.code !== 'ENOENT') {
62
- // if not exist, it's fine
63
- throw err;
64
- }
65
- }
66
- })
67
- );
68
- }
69
-
70
- private async generateOneComponent(componentId: ComponentID, componentPath: string): Promise<GenerateResult> {
71
- const name = componentId.name;
72
- const namePascalCase = camelcase(name, { pascalCase: true });
73
- const nameCamelCase = camelcase(name);
74
- const files = this.template.generateFiles({ name, namePascalCase, nameCamelCase, componentId });
75
- const mainFile = files.find((file) => file.isMain);
76
- await this.writeComponentFiles(componentPath, files);
77
- const addResults = await this.workspace.track({
78
- rootDir: componentPath,
79
- mainFile: mainFile?.relativePath,
80
- componentName: componentId.fullName,
81
- });
82
- const component = await this.workspace.get(componentId);
83
- const env = this.envs.getEnv(component);
84
- return {
85
- id: componentId,
86
- dir: componentPath,
87
- files: addResults.files,
88
- envId: env.id,
89
- };
90
- }
91
-
92
- /**
93
- * writes the generated template files to the default directory set in the workspace config
94
- */
95
- private async writeComponentFiles(
96
- componentPath: string,
97
- templateFiles: ComponentFile[]
98
- ): Promise<PathOsBasedRelative[]> {
99
- const dataToPersist = new DataToPersist();
100
- const vinylFiles = templateFiles.map((templateFile) => {
101
- const templateFileVinyl = new Vinyl({
102
- base: componentPath,
103
- path: path.join(componentPath, templateFile.relativePath),
104
- contents: Buffer.from(templateFile.content),
105
- });
106
- return AbstractVinyl.fromVinyl(templateFileVinyl);
107
- });
108
- const results = vinylFiles.map((v) => v.path);
109
- dataToPersist.addManyFiles(vinylFiles);
110
- dataToPersist.addBasePath(this.workspace.path);
111
- await dataToPersist.persistAllToFS();
112
- return results;
113
- }
114
-
115
- private getComponentPath(componentId: ComponentID) {
116
- if (this.options.path) return this.options.path;
117
- return composeComponentPath(componentId._legacy.changeScope(componentId.scope), this.workspace.defaultDirectory);
118
- }
119
- }
@@ -1,66 +0,0 @@
1
- import { ComponentID } from '@teambit/component-id';
2
-
3
- export interface ComponentFile {
4
- /**
5
- * relative path of the file within the component.
6
- */
7
- relativePath: string;
8
-
9
- /**
10
- * file content
11
- */
12
- content: string;
13
-
14
- /**
15
- * whether this file will be tracked as the main file
16
- */
17
- isMain?: boolean;
18
- }
19
-
20
- export interface ComponentContext {
21
- /**
22
- * component-name as entered by the user, e.g. `use-date`.
23
- * without the scope and the namespace.
24
- */
25
- name: string;
26
-
27
- /**
28
- * component-name as upper camel case, e.g. `use-date` becomes `UseDate`.
29
- * useful when generating the file content, for example for a class name.
30
- */
31
- namePascalCase: string;
32
-
33
- /**
34
- * component-name as lower camel case, e.g. `use-date` becomes `useDate`.
35
- * useful when generating the file content, for example for a function/variable name.
36
- */
37
- nameCamelCase: string;
38
-
39
- /**
40
- * component id.
41
- * the name is the name+namespace. the scope is the scope entered by --scope flag or the defaultScope
42
- */
43
- componentId: ComponentID;
44
- }
45
-
46
- export interface ComponentTemplate {
47
- /**
48
- * name of the component template. for example: `hook`, `react-component` or `module`.
49
- */
50
- name: string;
51
-
52
- /**
53
- * short description of the template. shown in the `bit templates` command.
54
- */
55
- description?: string;
56
-
57
- /**
58
- * hide this template so that it is not listed with `bit templates`
59
- */
60
- hidden?: boolean;
61
-
62
- /**
63
- * template function for generating the file of a certain component.,
64
- */
65
- generateFiles(context: ComponentContext): ComponentFile[];
66
- }
package/create.cmd.ts DELETED
@@ -1,44 +0,0 @@
1
- import { Command, CommandOptions } from '@teambit/cli';
2
- import chalk from 'chalk';
3
- import { GeneratorMain } from './generator.main.runtime';
4
-
5
- export type CreateOptions = {
6
- namespace?: string;
7
- aspect?: string;
8
- scope?: string;
9
- path?: string;
10
- };
11
-
12
- export class CreateCmd implements Command {
13
- name = 'create <templateName> <componentNames...>';
14
- description = 'create a new component from a template';
15
- shortDescription = '';
16
- alias = '';
17
- loader = true;
18
- group = 'development';
19
- options = [
20
- ['n', 'namespace <string>', `sets the component's namespace and nested dirs inside the scope`],
21
- ['s', 'scope <string>', `sets the component's scope-name. if not entered, the default-scope will be used`],
22
- ['a', 'aspect <string>', 'aspect-id of the template. helpful when multiple aspects use the same template name'],
23
- ['p', 'path <string>', 'relative path in the workspace. by default the path is `<scope>/<namespace>/<name>`'],
24
- ] as CommandOptions;
25
-
26
- constructor(private generator: GeneratorMain) {}
27
-
28
- async report([templateName, componentNames]: [string, string[]], options: CreateOptions) {
29
- const results = await this.generator.generateComponentTemplate(componentNames, templateName, options);
30
- const title = `${results.length} component(s) were created`;
31
-
32
- const componentsData = results
33
- .map((result) => {
34
- return `${chalk.bold(result.id.toString())}
35
- location: ${result.dir}
36
- env: ${result.envId}
37
- `;
38
- })
39
- .join('\n');
40
- const footer = `env configuration is according to workspace variants. learn more at https://harmony-docs.bit.dev/building-with-bit/environments/#configure-environment-for-components`;
41
-
42
- return `${chalk.green(title)}\n\n${componentsData}\n\n${footer}`;
43
- }
44
- }
@@ -1,5 +0,0 @@
1
- import { Aspect } from '@teambit/harmony';
2
-
3
- export const GeneratorAspect = Aspect.create({
4
- id: 'teambit.generator/generator',
5
- });
@@ -1,8 +0,0 @@
1
- ---
2
- description: Generator for generating component templates
3
- labels: ['generator', 'templates']
4
- ---
5
-
6
- import { Generator } from '@teambit/generator.aspect-docs.generator';
7
-
8
- <Generator />
@@ -1,66 +0,0 @@
1
- import { Schema } from '@teambit/graphql';
2
- import gql from 'graphql-tag';
3
- import { GeneratorMain } from './generator.main.runtime';
4
-
5
- export function generatorSchema(generator: GeneratorMain): Schema {
6
- return {
7
- typeDefs: gql`
8
- type GenerateResult {
9
- id: String
10
- dir: String
11
- files: [String]
12
- }
13
-
14
- type Mutation {
15
- # create Component by template
16
- createComponent(
17
- name: String!
18
- templateName: String!
19
- scope: String
20
- namespace: String
21
- aspect: String
22
- ): [GenerateResult]
23
- }
24
-
25
- type TemplateDescriptor {
26
- aspectId: String!
27
- name: String!
28
- }
29
-
30
- type Generator {
31
- templates: [TemplateDescriptor]
32
- }
33
-
34
- type Query {
35
- generator: Generator
36
- }
37
- `,
38
- resolvers: {
39
- Mutation: {
40
- createComponent: async (
41
- req: any,
42
- {
43
- name,
44
- templateName,
45
- ...options
46
- }: { name: string; templateName: string; scope?: string; namespace?: string; aspect?: string }
47
- ) => {
48
- const res = await generator.generateComponentTemplate([name], templateName, options);
49
- return res.map((component) => ({
50
- id: component.id.toString(),
51
- dir: component.dir,
52
- files: component.files,
53
- }));
54
- },
55
- },
56
- Generator: {
57
- templates: async () => {
58
- return generator.listTemplates();
59
- },
60
- },
61
- Query: {
62
- generator: () => generator,
63
- },
64
- },
65
- };
66
- }