@teambit/generator 0.0.1119 → 0.0.1120
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.
- package/dist/{preview-1690443565721.js → preview-1690514616184.js} +2 -2
- package/dist/workspace-generator.js +7 -5
- package/dist/workspace-generator.js.map +1 -1
- package/package-tar/teambit-generator-0.0.1120.tgz +0 -0
- package/package.json +22 -22
- package/package-tar/teambit-generator-0.0.1119.tgz +0 -0
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.1120/dist/generator.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.generator_generator@0.0.1120/dist/generator.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
@@ -171,6 +171,7 @@ class WorkspaceGenerator {
|
|
171
171
|
await this.setupGitBitmapMergeDriver();
|
172
172
|
await this.forkComponentsFromRemote();
|
173
173
|
await this.importComponentsFromRemote();
|
174
|
+
await this.workspace.clearCache();
|
174
175
|
await this.install.install(undefined, {
|
175
176
|
dedupe: true,
|
176
177
|
import: false,
|
@@ -178,6 +179,8 @@ class WorkspaceGenerator {
|
|
178
179
|
copyPeerToRuntimeOnComponents: false,
|
179
180
|
updateExisting: false
|
180
181
|
});
|
182
|
+
// compile the components again now that we have the dependencies installed
|
183
|
+
await this.compileComponents(true);
|
181
184
|
// await this.wsConfigFiles.writeConfigFiles({});
|
182
185
|
// await this.buildUI(); // disabled for now. it takes too long
|
183
186
|
} catch (err) {
|
@@ -265,8 +268,6 @@ class WorkspaceGenerator {
|
|
265
268
|
refactor: true,
|
266
269
|
install: false
|
267
270
|
});
|
268
|
-
await this.workspace.clearCache();
|
269
|
-
await this.compileComponents();
|
270
271
|
}
|
271
272
|
async importComponentsFromRemote() {
|
272
273
|
var _this$template3, _this$template3$impor;
|
@@ -282,10 +283,11 @@ class WorkspaceGenerator {
|
|
282
283
|
}, []);
|
283
284
|
});
|
284
285
|
await this.workspace.bitMap.write();
|
285
|
-
await this.workspace.clearCache();
|
286
|
-
await this.compileComponents();
|
287
286
|
}
|
288
|
-
async compileComponents() {
|
287
|
+
async compileComponents(clearCache = true) {
|
288
|
+
if (clearCache) {
|
289
|
+
await this.workspace.clearCache();
|
290
|
+
}
|
289
291
|
const compiler = this.harmony.get(_compiler().CompilerAspect.id);
|
290
292
|
await compiler.compileOnWorkspace();
|
291
293
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_bit","_execa","_pMapSeries","_ui","_logger","_workspace","_forking","_consumer","_importer","_compiler","_gitExecutable","_gitNotFound","_path","_git","_install","_workspaceConfigFiles","_generator","WorkspaceGenerator","constructor","workspaceName","options","template","aspectComponent","_defineProperty2","default","workspacePath","resolve","generate","fs","existsSync","Error","ensureDir","process","chdir","initGit","init","skipGit","writeWorkspaceFiles","reloadBitInWorkspaceDir","setupGitBitmapMergeDriver","forkComponentsFromRemote","importComponentsFromRemote","install","undefined","dedupe","import","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","updateExisting","err","logger","error","remove","gitExecutablePath","getGitExecutablePath","params","execa","exitCodeName","GitNotFound","git","setGitMergeDriver","global","buildUI","uiMain","harmony","get","UIAspect","id","createRuntime","getWorkspaceContext","name","defaultScope","empty","workspaceContext","templateFiles","generateFiles","Promise","all","map","templateFile","outputFile","join","relativePath","content","loadBit","workspace","WorkspaceAspect","InstallAspect","loggerMain","LoggerAspect","createLogger","GeneratorAspect","importer","ImporterAspect","forking","ForkingAspect","GitAspect","wsConfigFiles","WorkspaceConfigFilesAspect","_this$template","_this$template$import","_this$template2","_this$template2$fork","componentsToFork","importComponents","call","fork","length","componentsToForkRestructured","targetName","path","env","config","sourceId","targetId","forkMultipleFromRemote","scope","refactor","clearCache","compileComponents","_this$template3","_this$template3$impor","componentsToImport","pMapSeries","componentToImport","ids","installNpmPackages","writeToPath","bitMap","write","compiler","CompilerAspect","compileOnWorkspace","exports"],"sources":["workspace-generator.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { loadBit } from '@teambit/bit';\nimport { Harmony } from '@teambit/harmony';\nimport { Component } from '@teambit/component';\nimport execa from 'execa';\nimport pMapSeries from 'p-map-series';\nimport UIAspect, { UiMain } from '@teambit/ui';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport ForkingAspect, { ForkingMain } from '@teambit/forking';\nimport { init } from '@teambit/legacy/dist/api/consumer';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport getGitExecutablePath from '@teambit/legacy/dist/utils/git/git-executable';\nimport GitNotFound from '@teambit/legacy/dist/utils/git/exceptions/git-not-found';\nimport { resolve, join } from 'path';\nimport { ComponentID } from '@teambit/component-id';\nimport GitAspect, { GitMain } from '@teambit/git';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport WorkspaceConfigFilesAspect, { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\n\nimport { WorkspaceTemplate, WorkspaceContext } from './workspace-template';\nimport { NewOptions } from './new.cmd';\nimport { GeneratorAspect } from './generator.aspect';\n\nexport type GenerateResult = { id: ComponentID; dir: string; files: string[]; envId: string };\n\nexport class WorkspaceGenerator {\n private workspacePath: string;\n private harmony: Harmony;\n private workspace: Workspace;\n private install: InstallMain;\n private importer: ImporterMain;\n private logger: Logger;\n private forking: ForkingMain;\n private git: GitMain;\n private wsConfigFiles: WorkspaceConfigFilesMain;\n\n constructor(\n private workspaceName: string,\n private options: NewOptions,\n private template: WorkspaceTemplate,\n private aspectComponent?: Component\n ) {\n this.workspacePath = resolve(this.workspaceName);\n }\n\n async generate(): Promise<string> {\n if (fs.existsSync(this.workspacePath)) {\n throw new Error(`unable to create a workspace at \"${this.workspaceName}\", this path already exist`);\n }\n await fs.ensureDir(this.workspacePath);\n try {\n process.chdir(this.workspacePath);\n await this.initGit();\n await init(this.workspacePath, this.options.skipGit, false, false, false, false, false, false, {});\n await this.writeWorkspaceFiles();\n await this.reloadBitInWorkspaceDir();\n await this.setupGitBitmapMergeDriver();\n await this.forkComponentsFromRemote();\n await this.importComponentsFromRemote();\n await this.install.install(undefined, {\n dedupe: true,\n import: false,\n copyPeerToRuntimeOnRoot: true,\n copyPeerToRuntimeOnComponents: false,\n updateExisting: false,\n });\n // await this.wsConfigFiles.writeConfigFiles({});\n // await this.buildUI(); // disabled for now. it takes too long\n } catch (err: any) {\n this.logger.error(`failed generating a new workspace, will delete the dir ${this.workspacePath}`, err);\n await fs.remove(this.workspacePath);\n throw err;\n }\n\n return this.workspacePath;\n }\n\n private async initGit() {\n if (this.options.skipGit) return;\n const gitExecutablePath = getGitExecutablePath();\n const params = ['init'];\n try {\n await execa(gitExecutablePath, params);\n } catch (err: any) {\n if (err.exitCodeName === 'ENOENT') {\n throw new GitNotFound(gitExecutablePath, err);\n }\n throw err;\n }\n }\n\n private async setupGitBitmapMergeDriver() {\n if (this.options.skipGit) return;\n await this.git.setGitMergeDriver({ global: false });\n }\n\n private async buildUI() {\n const uiMain = this.harmony.get<UiMain>(UIAspect.id);\n await uiMain.createRuntime({});\n }\n\n private getWorkspaceContext(): WorkspaceContext {\n return {\n name: this.workspaceName,\n defaultScope: this.options.defaultScope,\n empty: this.options.empty,\n aspectComponent: this.aspectComponent,\n template: this.template,\n };\n }\n\n /**\n * writes the generated template files to the default directory set in the workspace config\n */\n private async writeWorkspaceFiles(): Promise<void> {\n const workspaceContext = this.getWorkspaceContext();\n const templateFiles = await this.template.generateFiles(workspaceContext);\n await Promise.all(\n templateFiles.map(async (templateFile) => {\n await fs.outputFile(join(this.workspacePath, templateFile.relativePath), templateFile.content);\n })\n );\n }\n\n private async reloadBitInWorkspaceDir() {\n this.harmony = await loadBit(this.workspacePath);\n this.workspace = this.harmony.get<Workspace>(WorkspaceAspect.id);\n this.install = this.harmony.get<InstallMain>(InstallAspect.id);\n const loggerMain = this.harmony.get<LoggerMain>(LoggerAspect.id);\n this.logger = loggerMain.createLogger(GeneratorAspect.id);\n this.importer = this.harmony.get<ImporterMain>(ImporterAspect.id);\n this.forking = this.harmony.get<ForkingMain>(ForkingAspect.id);\n this.git = this.harmony.get<GitMain>(GitAspect.id);\n this.wsConfigFiles = this.harmony.get<WorkspaceConfigFilesMain>(WorkspaceConfigFilesAspect.id);\n }\n\n private async forkComponentsFromRemote() {\n if (this.options.empty) return;\n const workspaceContext = this.getWorkspaceContext();\n const componentsToFork =\n this.template?.importComponents?.(workspaceContext) || this.template?.fork?.(workspaceContext) || [];\n if (!componentsToFork.length) return;\n const componentsToForkRestructured = componentsToFork.map(({ id, targetName, path, env, config }) => ({\n sourceId: id,\n targetId: targetName,\n path,\n env,\n config,\n }));\n await this.forking.forkMultipleFromRemote(componentsToForkRestructured, {\n scope: this.workspace.defaultScope,\n refactor: true,\n install: false,\n });\n await this.workspace.clearCache();\n await this.compileComponents();\n }\n\n private async importComponentsFromRemote() {\n if (this.options.empty) return;\n const workspaceContext = this.getWorkspaceContext();\n const componentsToImport = this.template?.import?.(workspaceContext) || [];\n\n if (!componentsToImport.length) return;\n\n await pMapSeries(componentsToImport, async (componentToImport) => {\n await this.importer.import(\n {\n ids: [componentToImport.id],\n installNpmPackages: false,\n writeToPath: componentToImport.path,\n },\n []\n );\n });\n\n await this.workspace.bitMap.write();\n await this.workspace.clearCache();\n await this.compileComponents();\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I,CAAChC,QAAQ,CAAC/C,MAAM,CACxB;QACEgF,GAAG,EAAE,CAACD,iBAAiB,CAACzD,EAAE,CAAC;QAC3B2D,kBAAkB,EAAE,KAAK;QACzBC,WAAW,EAAEH,iBAAiB,CAACd;MACjC,CAAC,EACD,EACF,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,IAAI,CAACzB,SAAS,CAAC2C,MAAM,CAACC,KAAK,CAAC,CAAC;IACnC,MAAM,IAAI,CAAC5C,SAAS,CAACiC,UAAU,CAAC,CAAC;IACjC,MAAM,IAAI,CAACC,iBAAiB,CAAC,CAAC;EAChC;EAEA,MAAcA,iBAAiBA,CAAA,EAAG;IAChC,MAAMW,QAAQ,GAAG,IAAI,CAAClE,OAAO,CAACC,GAAG,CAAekE,0BAAc,CAAChE,EAAE,CAAC;IAClE,MAAM+D,QAAQ,CAACE,kBAAkB,CAAC,CAAC;EACrC;AACF;AAACC,OAAA,CAAApH,kBAAA,GAAAA,kBAAA"}
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_bit","_execa","_pMapSeries","_ui","_logger","_workspace","_forking","_consumer","_importer","_compiler","_gitExecutable","_gitNotFound","_path","_git","_install","_workspaceConfigFiles","_generator","WorkspaceGenerator","constructor","workspaceName","options","template","aspectComponent","_defineProperty2","default","workspacePath","resolve","generate","fs","existsSync","Error","ensureDir","process","chdir","initGit","init","skipGit","writeWorkspaceFiles","reloadBitInWorkspaceDir","setupGitBitmapMergeDriver","forkComponentsFromRemote","importComponentsFromRemote","workspace","clearCache","install","undefined","dedupe","import","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","updateExisting","compileComponents","err","logger","error","remove","gitExecutablePath","getGitExecutablePath","params","execa","exitCodeName","GitNotFound","git","setGitMergeDriver","global","buildUI","uiMain","harmony","get","UIAspect","id","createRuntime","getWorkspaceContext","name","defaultScope","empty","workspaceContext","templateFiles","generateFiles","Promise","all","map","templateFile","outputFile","join","relativePath","content","loadBit","WorkspaceAspect","InstallAspect","loggerMain","LoggerAspect","createLogger","GeneratorAspect","importer","ImporterAspect","forking","ForkingAspect","GitAspect","wsConfigFiles","WorkspaceConfigFilesAspect","_this$template","_this$template$import","_this$template2","_this$template2$fork","componentsToFork","importComponents","call","fork","length","componentsToForkRestructured","targetName","path","env","config","sourceId","targetId","forkMultipleFromRemote","scope","refactor","_this$template3","_this$template3$impor","componentsToImport","pMapSeries","componentToImport","ids","installNpmPackages","writeToPath","bitMap","write","compiler","CompilerAspect","compileOnWorkspace","exports"],"sources":["workspace-generator.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { loadBit } from '@teambit/bit';\nimport { Harmony } from '@teambit/harmony';\nimport { Component } from '@teambit/component';\nimport execa from 'execa';\nimport pMapSeries from 'p-map-series';\nimport UIAspect, { UiMain } from '@teambit/ui';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport ForkingAspect, { ForkingMain } from '@teambit/forking';\nimport { init } from '@teambit/legacy/dist/api/consumer';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport getGitExecutablePath from '@teambit/legacy/dist/utils/git/git-executable';\nimport GitNotFound from '@teambit/legacy/dist/utils/git/exceptions/git-not-found';\nimport { resolve, join } from 'path';\nimport { ComponentID } from '@teambit/component-id';\nimport GitAspect, { GitMain } from '@teambit/git';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport WorkspaceConfigFilesAspect, { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\n\nimport { WorkspaceTemplate, WorkspaceContext } from './workspace-template';\nimport { NewOptions } from './new.cmd';\nimport { GeneratorAspect } from './generator.aspect';\n\nexport type GenerateResult = { id: ComponentID; dir: string; files: string[]; envId: string };\n\nexport class WorkspaceGenerator {\n private workspacePath: string;\n private harmony: Harmony;\n private workspace: Workspace;\n private install: InstallMain;\n private importer: ImporterMain;\n private logger: Logger;\n private forking: ForkingMain;\n private git: GitMain;\n private wsConfigFiles: WorkspaceConfigFilesMain;\n\n constructor(\n private workspaceName: string,\n private options: NewOptions,\n private template: WorkspaceTemplate,\n private aspectComponent?: Component\n ) {\n this.workspacePath = resolve(this.workspaceName);\n }\n\n async generate(): Promise<string> {\n if (fs.existsSync(this.workspacePath)) {\n throw new Error(`unable to create a workspace at \"${this.workspaceName}\", this path already exist`);\n }\n await fs.ensureDir(this.workspacePath);\n try {\n process.chdir(this.workspacePath);\n await this.initGit();\n await init(this.workspacePath, this.options.skipGit, false, false, false, false, false, false, {});\n await this.writeWorkspaceFiles();\n await this.reloadBitInWorkspaceDir();\n await this.setupGitBitmapMergeDriver();\n await this.forkComponentsFromRemote();\n await this.importComponentsFromRemote();\n await this.workspace.clearCache();\n await this.install.install(undefined, {\n dedupe: true,\n import: false,\n copyPeerToRuntimeOnRoot: true,\n copyPeerToRuntimeOnComponents: false,\n updateExisting: false,\n });\n // compile the components again now that we have the dependencies installed\n await this.compileComponents(true);\n // await this.wsConfigFiles.writeConfigFiles({});\n // await this.buildUI(); // disabled for now. it takes too long\n } catch (err: any) {\n this.logger.error(`failed generating a new workspace, will delete the dir ${this.workspacePath}`, err);\n await fs.remove(this.workspacePath);\n throw err;\n }\n\n return this.workspacePath;\n }\n\n private async initGit() {\n if (this.options.skipGit) return;\n const gitExecutablePath = getGitExecutablePath();\n const params = ['init'];\n try {\n await execa(gitExecutablePath, params);\n } catch (err: any) {\n if (err.exitCodeName === 'ENOENT') {\n throw new GitNotFound(gitExecutablePath, err);\n }\n throw err;\n }\n }\n\n private async setupGitBitmapMergeDriver() {\n if (this.options.skipGit) return;\n await this.git.setGitMergeDriver({ global: false });\n }\n\n private async buildUI() {\n const uiMain = this.harmony.get<UiMain>(UIAspect.id);\n await uiMain.createRuntime({});\n }\n\n private getWorkspaceContext(): WorkspaceContext {\n return {\n name: this.workspaceName,\n defaultScope: this.options.defaultScope,\n empty: this.options.empty,\n aspectComponent: this.aspectComponent,\n template: this.template,\n };\n }\n\n /**\n * writes the generated template files to the default directory set in the workspace config\n */\n private async writeWorkspaceFiles(): Promise<void> {\n const workspaceContext = this.getWorkspaceContext();\n const templateFiles = await this.template.generateFiles(workspaceContext);\n await Promise.all(\n templateFiles.map(async (templateFile) => {\n await fs.outputFile(join(this.workspacePath, templateFile.relativePath), templateFile.content);\n })\n );\n }\n\n private async reloadBitInWorkspaceDir() {\n this.harmony = await loadBit(this.workspacePath);\n this.workspace = this.harmony.get<Workspace>(WorkspaceAspect.id);\n this.install = this.harmony.get<InstallMain>(InstallAspect.id);\n const loggerMain = this.harmony.get<LoggerMain>(LoggerAspect.id);\n this.logger = loggerMain.createLogger(GeneratorAspect.id);\n this.importer = this.harmony.get<ImporterMain>(ImporterAspect.id);\n this.forking = this.harmony.get<ForkingMain>(ForkingAspect.id);\n this.git = this.harmony.get<GitMain>(GitAspect.id);\n this.wsConfigFiles = this.harmony.get<WorkspaceConfigFilesMain>(WorkspaceConfigFilesAspect.id);\n }\n\n private async forkComponentsFromRemote() {\n if (this.options.empty) return;\n const workspaceContext = this.getWorkspaceContext();\n const componentsToFork =\n this.template?.importComponents?.(workspaceContext) || this.template?.fork?.(workspaceContext) || [];\n if (!componentsToFork.length) return;\n const componentsToForkRestructured = componentsToFork.map(({ id, targetName, path, env, config }) => ({\n sourceId: id,\n targetId: targetName,\n path,\n env,\n config,\n }));\n await this.forking.forkMultipleFromRemote(componentsToForkRestructured, {\n scope: this.workspace.defaultScope,\n refactor: true,\n install: false,\n });\n }\n\n private async importComponentsFromRemote() {\n if (this.options.empty) return;\n const workspaceContext = this.getWorkspaceContext();\n const componentsToImport = this.template?.import?.(workspaceContext) || [];\n\n if (!componentsToImport.length) return;\n\n await pMapSeries(componentsToImport, async (componentToImport) => {\n await this.importer.import(\n {\n ids: [componentToImport.id],\n installNpmPackages: false,\n writeToPath: componentToImport.path,\n },\n []\n );\n });\n\n await this.workspace.bitMap.write();\n }\n\n private async compileComponents(clearCache = true) {\n if (clearCache) {\n await this.workspace.clearCache();\n }\n const compiler = this.harmony.get<CompilerMain>(CompilerAspect.id);\n await compiler.compileOnWorkspace();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,YAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,IAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,GAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,SAAA;EAAA,MAAAT,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAO,QAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;A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B,IAAK;MAChE,MAAM,IAAI,CAAC9B,QAAQ,CAAC/C,MAAM,CACxB;QACE8E,GAAG,EAAE,CAACD,iBAAiB,CAACtD,EAAE,CAAC;QAC3BwD,kBAAkB,EAAE,KAAK;QACzBC,WAAW,EAAEH,iBAAiB,CAACZ;MACjC,CAAC,EACD,EACF,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,IAAI,CAACtE,SAAS,CAACsF,MAAM,CAACC,KAAK,CAAC,CAAC;EACrC;EAEA,MAAc9E,iBAAiBA,CAACR,UAAU,GAAG,IAAI,EAAE;IACjD,IAAIA,UAAU,EAAE;MACd,MAAM,IAAI,CAACD,SAAS,CAACC,UAAU,CAAC,CAAC;IACnC;IACA,MAAMuF,QAAQ,GAAG,IAAI,CAAC/D,OAAO,CAACC,GAAG,CAAe+D,0BAAc,CAAC7D,EAAE,CAAC;IAClE,MAAM4D,QAAQ,CAACE,kBAAkB,CAAC,CAAC;EACrC;AACF;AAACC,OAAA,CAAApH,kBAAA,GAAAA,kBAAA"}
|
Binary file
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/generator",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1120",
|
4
4
|
"homepage": "https://bit.cloud/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.
|
9
|
+
"version": "0.0.1120"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"camelcase": "6.2.0",
|
@@ -22,25 +22,25 @@
|
|
22
22
|
"@teambit/component-id": "0.0.427",
|
23
23
|
"@teambit/harmony": "0.4.6",
|
24
24
|
"@teambit/bit-error": "0.0.402",
|
25
|
-
"@teambit/envs": "0.0.
|
26
|
-
"@teambit/logger": "0.0.
|
27
|
-
"@teambit/new-component-helper": "0.0.
|
28
|
-
"@teambit/tracker": "0.0.
|
29
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
30
|
-
"@teambit/workspace": "0.0.
|
31
|
-
"@teambit/cli": "0.0.
|
32
|
-
"@teambit/graphql": "0.0.
|
33
|
-
"@teambit/aspect-loader": "0.0.
|
34
|
-
"@teambit/bit": "0.2.
|
35
|
-
"@teambit/community": "0.0.
|
36
|
-
"@teambit/component": "0.0.
|
37
|
-
"@teambit/git": "0.0.
|
38
|
-
"@teambit/compiler": "0.0.
|
39
|
-
"@teambit/forking": "0.0.
|
40
|
-
"@teambit/importer": "0.0.
|
41
|
-
"@teambit/install": "0.0.
|
42
|
-
"@teambit/ui": "0.0.
|
43
|
-
"@teambit/workspace-config-files": "0.0.
|
25
|
+
"@teambit/envs": "0.0.1120",
|
26
|
+
"@teambit/logger": "0.0.844",
|
27
|
+
"@teambit/new-component-helper": "0.0.524",
|
28
|
+
"@teambit/tracker": "0.0.151",
|
29
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.93",
|
30
|
+
"@teambit/workspace": "0.0.1120",
|
31
|
+
"@teambit/cli": "0.0.751",
|
32
|
+
"@teambit/graphql": "0.0.1120",
|
33
|
+
"@teambit/aspect-loader": "0.0.1120",
|
34
|
+
"@teambit/bit": "0.2.13",
|
35
|
+
"@teambit/community": "0.0.299",
|
36
|
+
"@teambit/component": "0.0.1120",
|
37
|
+
"@teambit/git": "0.0.25",
|
38
|
+
"@teambit/compiler": "0.0.1120",
|
39
|
+
"@teambit/forking": "0.0.524",
|
40
|
+
"@teambit/importer": "0.0.549",
|
41
|
+
"@teambit/install": "0.0.209",
|
42
|
+
"@teambit/ui": "0.0.1120",
|
43
|
+
"@teambit/workspace-config-files": "0.0.100"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@types/fs-extra": "9.0.7",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"@teambit/generator.aspect-docs.generator": "0.0.158"
|
55
55
|
},
|
56
56
|
"peerDependencies": {
|
57
|
-
"@teambit/legacy": "1.0.
|
57
|
+
"@teambit/legacy": "1.0.531",
|
58
58
|
"react": "^16.8.0 || ^17.0.0",
|
59
59
|
"react-dom": "^16.8.0 || ^17.0.0"
|
60
60
|
},
|
Binary file
|