@plasmicapp/cli 0.1.352 → 0.1.354

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 (42) hide show
  1. package/dist/__tests__/envdetect.spec.d.ts +1 -0
  2. package/dist/actions/sync-components.d.ts +1 -1
  3. package/dist/actions/sync-data-tokens.d.ts +1 -1
  4. package/dist/actions/sync-global-contexts.d.ts +1 -1
  5. package/dist/actions/sync-global-variants.d.ts +1 -1
  6. package/dist/actions/sync-icons.d.ts +1 -1
  7. package/dist/actions/sync-project-module.d.ts +1 -1
  8. package/dist/actions/sync-splits-provider.d.ts +1 -1
  9. package/dist/actions/sync-style-tokens-provider.d.ts +1 -1
  10. package/dist/api.d.ts +0 -8
  11. package/dist/index.js +246 -4576
  12. package/dist/lib.d.ts +5 -6
  13. package/dist/lib.js +595 -4885
  14. package/dist/plasmic.schema.json +0 -21
  15. package/dist/utils/code-utils.d.ts +6 -6
  16. package/dist/utils/config-utils.d.ts +3 -8
  17. package/dist/utils/envdetect.d.ts +1 -1
  18. package/package.json +2 -2
  19. package/src/__tests__/code-utils-spec.ts +6 -9
  20. package/src/__tests__/envdetect.spec.ts +115 -0
  21. package/src/actions/export.ts +110 -120
  22. package/src/actions/fix-imports.ts +5 -3
  23. package/src/actions/init.ts +5 -4
  24. package/src/actions/sync-components.ts +2 -6
  25. package/src/actions/sync-data-tokens.ts +2 -4
  26. package/src/actions/sync-global-contexts.ts +5 -6
  27. package/src/actions/sync-global-variants.ts +3 -8
  28. package/src/actions/sync-icons.ts +3 -4
  29. package/src/actions/sync-project-module.ts +5 -6
  30. package/src/actions/sync-splits-provider.ts +5 -6
  31. package/src/actions/sync-style-tokens-provider.ts +5 -7
  32. package/src/actions/sync.ts +15 -34
  33. package/src/api.ts +0 -63
  34. package/src/index.ts +0 -62
  35. package/src/lib.ts +11 -12
  36. package/src/migrations/migrations.ts +3 -3
  37. package/src/utils/code-utils.ts +16 -46
  38. package/src/utils/config-utils.ts +7 -27
  39. package/src/utils/envdetect.ts +42 -5
  40. package/src/utils/rsc-config.ts +29 -12
  41. package/dist/actions/upload-bundle.d.ts +0 -15
  42. package/src/actions/upload-bundle.ts +0 -38
@@ -22,8 +22,7 @@ export async function syncDataTokens(
22
22
  projectMeta: ProjectMetaBundle,
23
23
  projectConfig: ProjectConfig,
24
24
  projectLock: ProjectLock,
25
- checksums: ChecksumBundle,
26
- baseDir: string
25
+ checksums: ChecksumBundle
27
26
  ) {
28
27
  const resourcePath = getDataTokensResourcePath(context, projectConfig);
29
28
  if (checksums.dataTokensChecksum && projectMeta.dataTokensBundle) {
@@ -34,8 +33,7 @@ export async function syncDataTokens(
34
33
  }
35
34
  if (context.config.code.lang === "js") {
36
35
  projectMeta.dataTokensBundle.module = await formatScript(
37
- tsxToJsx(projectMeta.dataTokensBundle.module),
38
- baseDir
36
+ tsxToJsx(projectMeta.dataTokensBundle.module)
39
37
  );
40
38
  }
41
39
  writeFileContent(
@@ -22,8 +22,7 @@ export async function syncGlobalContexts(
22
22
  projectMeta: ProjectMetaBundle,
23
23
  projectConfig: ProjectConfig,
24
24
  projectLock: ProjectLock,
25
- checksums: ChecksumBundle,
26
- baseDir: string
25
+ checksums: ChecksumBundle
27
26
  ) {
28
27
  const resourcePath = getGlobalContextsResourcePath(context, projectConfig);
29
28
  if (checksums.globalContextsChecksum && projectMeta.globalContextBundle) {
@@ -34,8 +33,7 @@ export async function syncGlobalContexts(
34
33
  }
35
34
  if (context.config.code.lang === "js") {
36
35
  projectMeta.globalContextBundle.contextModule = await formatScript(
37
- tsxToJsx(projectMeta.globalContextBundle.contextModule),
38
- baseDir
36
+ tsxToJsx(projectMeta.globalContextBundle.contextModule)
39
37
  );
40
38
  }
41
39
  await writeFileContent(
@@ -46,8 +44,9 @@ export async function syncGlobalContexts(
46
44
  );
47
45
  projectConfig.globalContextsFilePath = resourcePath;
48
46
  const fl = projectLock.fileLocks.find(
49
- (fl) =>
50
- fl.assetId === projectConfig.projectId && fl.type === "globalContexts"
47
+ (fileLock) =>
48
+ fileLock.assetId === projectConfig.projectId &&
49
+ fileLock.type === "globalContexts"
51
50
  );
52
51
  if (fl) {
53
52
  fl.checksum = checksums.globalContextsChecksum;
@@ -3,7 +3,7 @@ import path from "upath";
3
3
  import { ChecksumBundle, GlobalVariantBundle, ProjectMetaBundle } from "../api";
4
4
  import { logger } from "../deps";
5
5
  import { formatAsLocal } from "../utils/code-utils";
6
- import { getOrAddProjectLock, PlasmicContext } from "../utils/config-utils";
6
+ import { PlasmicContext, getOrAddProjectLock } from "../utils/config-utils";
7
7
  import {
8
8
  defaultResourcePath,
9
9
  deleteFile,
@@ -18,8 +18,7 @@ export async function syncGlobalVariants(
18
18
  projectMeta: ProjectMetaBundle,
19
19
  bundles: GlobalVariantBundle[],
20
20
  checksums: ChecksumBundle,
21
- branchName: string,
22
- baseDir: string
21
+ branchName: string
23
22
  ) {
24
23
  const projectId = projectMeta.projectId;
25
24
  const projectLock = getOrAddProjectLock(context, projectId, branchName);
@@ -101,11 +100,7 @@ export async function syncGlobalVariants(
101
100
  await writeFileContent(
102
101
  context,
103
102
  variantConfig.contextFilePath,
104
- await formatAsLocal(
105
- bundle.contextModule,
106
- variantConfig.contextFilePath,
107
- baseDir
108
- ),
103
+ await formatAsLocal(bundle.contextModule, variantConfig.contextFilePath),
109
104
  { force: !isNew }
110
105
  );
111
106
  }
@@ -5,9 +5,9 @@ import { ChecksumBundle, IconBundle } from "../api";
5
5
  import { logger } from "../deps";
6
6
  import { formatAsLocal } from "../utils/code-utils";
7
7
  import {
8
+ PlasmicContext,
8
9
  getOrAddProjectConfig,
9
10
  getOrAddProjectLock,
10
- PlasmicContext,
11
11
  } from "../utils/config-utils";
12
12
  import {
13
13
  defaultResourcePath,
@@ -28,8 +28,7 @@ export async function syncProjectIconAssets(
28
28
  branchName: string,
29
29
  version: string,
30
30
  iconBundles: IconBundle[],
31
- checksums: ChecksumBundle,
32
- baseDir: string
31
+ checksums: ChecksumBundle
33
32
  ) {
34
33
  const project = getOrAddProjectConfig(context, projectId);
35
34
  if (!project.icons) {
@@ -108,7 +107,7 @@ export async function syncProjectIconAssets(
108
107
  await writeFileContent(
109
108
  context,
110
109
  iconConfig.moduleFilePath,
111
- await formatAsLocal(bundle.module, iconConfig.moduleFilePath, baseDir),
110
+ await formatAsLocal(bundle.module, iconConfig.moduleFilePath),
112
111
  {
113
112
  force: !isNew,
114
113
  }
@@ -22,8 +22,7 @@ export async function syncProjectModule(
22
22
  projectMeta: ProjectMetaBundle,
23
23
  projectConfig: ProjectConfig,
24
24
  projectLock: ProjectLock,
25
- checksums: ChecksumBundle,
26
- baseDir: string
25
+ checksums: ChecksumBundle
27
26
  ) {
28
27
  const resourcePath = getProjectModuleResourcePath(context, projectConfig);
29
28
  if (checksums.projectModuleChecksum && projectMeta.projectModuleBundle) {
@@ -34,8 +33,7 @@ export async function syncProjectModule(
34
33
  }
35
34
  if (context.config.code.lang === "js") {
36
35
  projectMeta.projectModuleBundle.module = await formatScript(
37
- tsxToJsx(projectMeta.projectModuleBundle.module),
38
- baseDir
36
+ tsxToJsx(projectMeta.projectModuleBundle.module)
39
37
  );
40
38
  }
41
39
  await writeFileContent(
@@ -46,8 +44,9 @@ export async function syncProjectModule(
46
44
  );
47
45
  projectConfig.projectModuleFilePath = resourcePath;
48
46
  const fl = projectLock.fileLocks.find(
49
- (fl) =>
50
- fl.assetId === projectConfig.projectId && fl.type === "projectModule"
47
+ (fileLock) =>
48
+ fileLock.assetId === projectConfig.projectId &&
49
+ fileLock.type === "projectModule"
51
50
  );
52
51
  if (fl) {
53
52
  fl.checksum = checksums.projectModuleChecksum || "";
@@ -22,8 +22,7 @@ export async function syncSplitsProvider(
22
22
  projectMeta: ProjectMetaBundle,
23
23
  projectConfig: ProjectConfig,
24
24
  projectLock: ProjectLock,
25
- checksums: ChecksumBundle,
26
- baseDir: string
25
+ checksums: ChecksumBundle
27
26
  ) {
28
27
  const resourcePath = getSplitsProviderResourcePath(context, projectConfig);
29
28
  if (checksums.splitsProviderChecksum && projectMeta.splitsProviderBundle) {
@@ -34,8 +33,7 @@ export async function syncSplitsProvider(
34
33
  }
35
34
  if (context.config.code.lang === "js") {
36
35
  projectMeta.splitsProviderBundle.module = await formatScript(
37
- tsxToJsx(projectMeta.splitsProviderBundle.module),
38
- baseDir
36
+ tsxToJsx(projectMeta.splitsProviderBundle.module)
39
37
  );
40
38
  }
41
39
  await writeFileContent(
@@ -46,8 +44,9 @@ export async function syncSplitsProvider(
46
44
  );
47
45
  projectConfig.splitsProviderFilePath = resourcePath;
48
46
  const fl = projectLock.fileLocks.find(
49
- (fl) =>
50
- fl.assetId === projectConfig.projectId && fl.type === "splitsProvider"
47
+ (fileLock) =>
48
+ fileLock.assetId === projectConfig.projectId &&
49
+ fileLock.type === "splitsProvider"
51
50
  );
52
51
  if (fl) {
53
52
  fl.checksum = checksums.splitsProviderChecksum;
@@ -22,8 +22,7 @@ export async function syncStyleTokensProvider(
22
22
  projectMeta: ProjectMetaBundle,
23
23
  projectConfig: ProjectConfig,
24
24
  projectLock: ProjectLock,
25
- checksums: ChecksumBundle,
26
- baseDir: string
25
+ checksums: ChecksumBundle
27
26
  ) {
28
27
  const resourcePath = getStyleTokensProviderResourcePath(
29
28
  context,
@@ -40,8 +39,7 @@ export async function syncStyleTokensProvider(
40
39
  }
41
40
  if (context.config.code.lang === "js") {
42
41
  projectMeta.styleTokensProviderBundle.module = await formatScript(
43
- tsxToJsx(projectMeta.styleTokensProviderBundle.module),
44
- baseDir
42
+ tsxToJsx(projectMeta.styleTokensProviderBundle.module)
45
43
  );
46
44
  }
47
45
  writeFileContent(
@@ -52,9 +50,9 @@ export async function syncStyleTokensProvider(
52
50
  );
53
51
  projectConfig.styleTokensProviderFilePath = resourcePath;
54
52
  const fl = projectLock.fileLocks.find(
55
- (fl) =>
56
- fl.assetId === projectConfig.projectId &&
57
- fl.type === "styleTokensProvider"
53
+ (fileLock) =>
54
+ fileLock.assetId === projectConfig.projectId &&
55
+ fileLock.type === "styleTokensProvider"
58
56
  );
59
57
  if (fl) {
60
58
  fl.checksum = checksums.styleTokensProviderChecksum || "";
@@ -357,7 +357,7 @@ export async function sync(
357
357
  }
358
358
 
359
359
  // Now we know config.components are all correct, so we can go ahead and fix up all the import statements
360
- await fixAllImportStatements(context, opts.baseDir, summary);
360
+ await fixAllImportStatements(context, summary);
361
361
 
362
362
  const codegenVersion = await context.api.latestCodegenVersion();
363
363
  context.lock.projects.forEach((p) => {
@@ -370,7 +370,7 @@ export async function sync(
370
370
  }
371
371
  });
372
372
  // Write the new ComponentConfigs to disk
373
- await updateConfig(context, context.config, baseDir);
373
+ await updateConfig(context, context.config);
374
374
  };
375
375
 
376
376
  // Perform the actual sync
@@ -580,27 +580,23 @@ async function syncProject(
580
580
  for (const c of projectBundle.components) {
581
581
  [c.renderModuleFileName, c.renderModule] = await maybeConvertTsxToJsx(
582
582
  c.renderModuleFileName,
583
- c.renderModule,
584
- opts.baseDir
583
+ c.renderModule
585
584
  );
586
585
  [c.skeletonModuleFileName, c.skeletonModule] = await maybeConvertTsxToJsx(
587
586
  c.skeletonModuleFileName,
588
- c.skeletonModule,
589
- opts.baseDir
587
+ c.skeletonModule
590
588
  );
591
589
  }
592
590
  for (const icon of projectBundle.iconAssets) {
593
591
  [icon.fileName, icon.module] = await maybeConvertTsxToJsx(
594
592
  icon.fileName,
595
- icon.module,
596
- opts.baseDir
593
+ icon.module
597
594
  );
598
595
  }
599
596
  for (const gv of projectBundle.globalVariants) {
600
597
  [gv.contextFileName, gv.contextModule] = await maybeConvertTsxToJsx(
601
598
  gv.contextFileName,
602
- gv.contextModule,
603
- opts.baseDir
599
+ gv.contextModule
604
600
  );
605
601
  }
606
602
  }
@@ -609,8 +605,7 @@ async function syncProject(
609
605
  projectBundle.projectConfig,
610
606
  projectBundle.globalVariants,
611
607
  projectBundle.checksums,
612
- branchName,
613
- opts.baseDir
608
+ branchName
614
609
  );
615
610
 
616
611
  await syncProjectConfig(
@@ -624,7 +619,6 @@ async function syncProject(
624
619
  opts.forceOverwrite,
625
620
  summary,
626
621
  projectBundle.checksums,
627
- opts.baseDir,
628
622
  indirect
629
623
  );
630
624
  syncCodeComponentsMeta(context, projectId, projectBundle.codeComponentMetas);
@@ -644,8 +638,7 @@ async function syncProject(
644
638
  branchName,
645
639
  projectVersion,
646
640
  projectBundle.iconAssets,
647
- projectBundle.checksums,
648
- opts.baseDir
641
+ projectBundle.checksums
649
642
  );
650
643
  await syncProjectImageAssets(
651
644
  context,
@@ -690,7 +683,6 @@ async function syncProjectConfig(
690
683
  forceOverwrite: boolean,
691
684
  summary: Map<string, ComponentUpdateSummary>,
692
685
  checksums: ChecksumBundle,
693
- baseDir: string,
694
686
  indirect: boolean
695
687
  ) {
696
688
  const defaultCssFilePath = defaultResourcePath(
@@ -734,8 +726,7 @@ async function syncProjectConfig(
734
726
  if (projectBundle.cssRules) {
735
727
  const formattedCssRules = await formatAsLocal(
736
728
  projectBundle.cssRules,
737
- projectConfig.cssFilePath,
738
- baseDir
729
+ projectConfig.cssFilePath
739
730
  );
740
731
 
741
732
  // Write out project css
@@ -757,17 +748,12 @@ async function syncProjectConfig(
757
748
  checksum: checksums.projectCssChecksum,
758
749
  });
759
750
 
760
- if (projectConfig.jsBundleThemes?.length === 0) {
761
- delete projectConfig.jsBundleThemes;
762
- }
763
-
764
751
  await syncGlobalContexts(
765
752
  context,
766
753
  projectBundle,
767
754
  projectConfig,
768
755
  projectLock,
769
- checksums,
770
- baseDir
756
+ checksums
771
757
  );
772
758
 
773
759
  await syncSplitsProvider(
@@ -775,8 +761,7 @@ async function syncProjectConfig(
775
761
  projectBundle,
776
762
  projectConfig,
777
763
  projectLock,
778
- checksums,
779
- baseDir
764
+ checksums
780
765
  );
781
766
 
782
767
  await syncProjectModule(
@@ -784,8 +769,7 @@ async function syncProjectConfig(
784
769
  projectBundle,
785
770
  projectConfig,
786
771
  projectLock,
787
- checksums,
788
- baseDir
772
+ checksums
789
773
  );
790
774
 
791
775
  await syncStyleTokensProvider(
@@ -793,8 +777,7 @@ async function syncProjectConfig(
793
777
  projectBundle,
794
778
  projectConfig,
795
779
  projectLock,
796
- checksums,
797
- baseDir
780
+ checksums
798
781
  );
799
782
 
800
783
  await syncDataTokens(
@@ -802,8 +785,7 @@ async function syncProjectConfig(
802
785
  projectBundle,
803
786
  projectConfig,
804
787
  projectLock,
805
- checksums,
806
- baseDir
788
+ checksums
807
789
  );
808
790
 
809
791
  // Write out components
@@ -815,8 +797,7 @@ async function syncProjectConfig(
815
797
  forceOverwrite,
816
798
  summary,
817
799
  projectLock,
818
- checksums,
819
- baseDir
800
+ checksums
820
801
  );
821
802
  }
822
803
 
package/src/api.ts CHANGED
@@ -81,12 +81,6 @@ export interface ProjectModuleBundle {
81
81
  module: string;
82
82
  }
83
83
 
84
- export interface JsBundleTheme {
85
- themeFileName: string;
86
- themeModule: string;
87
- bundleName: string;
88
- }
89
-
90
84
  export interface ProjectMetaBundle {
91
85
  projectId: string;
92
86
  projectName: string;
@@ -420,63 +414,6 @@ export class PlasmicApi {
420
414
  return result.data as string;
421
415
  }
422
416
 
423
- async uploadBundle(
424
- projectId: string,
425
- bundleName: string,
426
- bundleJs: string,
427
- css: string[],
428
- metaJson: string,
429
- genModulePath: string | undefined,
430
- genCssPaths: string[],
431
- pkgVersion: string | undefined,
432
- extraPropMetaJson: string | undefined,
433
- themeProviderWrapper: string | undefined,
434
- themeModule: string | undefined
435
- ): Promise<StyleTokensMap> {
436
- const result = await this.post(
437
- `${this.apiHost}/api/v1/projects/${projectId}/jsbundle/upload`,
438
- {
439
- projectId,
440
- bundleName,
441
- bundleJs,
442
- css,
443
- metaJson,
444
- genModulePath,
445
- genCssPaths,
446
- pkgVersion,
447
- extraPropMetaJson,
448
- themeProviderWrapper,
449
- themeModule,
450
- }
451
- );
452
- return result.data as StyleTokensMap;
453
- }
454
-
455
- async projectStyleTokens(
456
- projectId: string,
457
- branchName: string,
458
- versionRange?: string
459
- ): Promise<StyleTokensMap> {
460
- const result = await this.post(
461
- `${this.apiHost}/api/v1/projects/${projectId}/code/tokens?branchName=${branchName}`,
462
- { versionRange }
463
- );
464
- return result.data as StyleTokensMap;
465
- }
466
-
467
- async projectIcons(
468
- projectId: string,
469
- branchName: string,
470
- versionRange?: string,
471
- iconIds?: string[]
472
- ): Promise<ProjectIconsResponse> {
473
- const result = await this.post(
474
- `${this.apiHost}/api/v1/projects/${projectId}/code/icons?branchName=${branchName}`,
475
- { versionRange, iconIds }
476
- );
477
- return result.data as ProjectIconsResponse;
478
- }
479
-
480
417
  connectSocket(): ReturnType<typeof socketio> {
481
418
  const socket = socketio(this.studioHost, {
482
419
  path: `/api/v1/socket`,
package/src/index.ts CHANGED
@@ -13,7 +13,6 @@ import {
13
13
  import * as projectToken from "./actions/project-token";
14
14
  import { StatusArgs, showProjectStatus } from "./actions/status";
15
15
  import { SyncArgs, sync } from "./actions/sync";
16
- import { UploadBundleArgs, uploadJsBundle } from "./actions/upload-bundle";
17
16
  import { WatchArgs, watchProjects } from "./actions/watch";
18
17
  import { handleError } from "./utils/error";
19
18
 
@@ -182,67 +181,6 @@ yargs
182
181
  handleError(printProjectInfo(argv));
183
182
  }
184
183
  )
185
- .command<UploadBundleArgs>(
186
- "upload-bundle",
187
- false,
188
- (yargs2) =>
189
- yargs2
190
- .option("project", {
191
- alias: "p",
192
- describe: "ID of Plasmic project to upload the bundle to.",
193
- type: "string",
194
- })
195
- .option("bundleName", {
196
- describe: "Name of the bundle",
197
- type: "string",
198
- })
199
- .option("bundleJsFile", {
200
- describe: "Path of the bundled Javascript file in AMD format",
201
- type: "string",
202
- })
203
- .option("cssFiles", {
204
- describe: "Path of the bundled css files to load",
205
- type: "array",
206
- default: [],
207
- })
208
- .option("metaJsonFile", {
209
- describe:
210
- "Path of the meta data file (in JSON format) describing the component",
211
- type: "string",
212
- })
213
- .option("extraPropMetaJsonFile", {
214
- describe:
215
- "Path of the extra meta data file (in JSON format) describing the component's additional controlled properties and initial properties",
216
- type: "string",
217
- })
218
- .option("pkgVersion", {
219
- describe:
220
- "version of the package to include in the generated package.json",
221
- type: "string",
222
- default: "latest",
223
- })
224
- .option("genModulePath", {
225
- describe:
226
- "the path of include when generating import statement and generate package.json for. Default to bundleName.",
227
- type: "string",
228
- })
229
- .option("themeProviderWrapper", {
230
- describe: "the wrapper that inject theme to the bundle.",
231
- type: "string",
232
- })
233
- .option("themeModuleFile", {
234
- describe:
235
- "the typescript file that contains and exports the implementation of themeProviderWrapper. Used for code generation. It must be specified together with themeProviderWrapper.",
236
- type: "string",
237
- })
238
- .option("genCssPaths", {
239
- describe:
240
- "the list of css paths to import in generate code whenever a component in this bundle is used",
241
- type: "array",
242
- default: [],
243
- }),
244
- (argv) => handleError(uploadJsBundle(argv))
245
- )
246
184
  .command<projectToken.ProjectTokenArgs>(
247
185
  "project-token <projectId>",
248
186
  "Get projectApiToken for a given project",
package/src/lib.ts CHANGED
@@ -1,18 +1,17 @@
1
- export { auth, AuthArgs } from "./actions/auth";
2
- export { fixImports, FixImportsArgs } from "./actions/fix-imports";
1
+ export { AuthArgs, auth } from "./actions/auth";
2
+ export {
3
+ ExportArgs,
4
+ exportProjectsCli as exportProjects,
5
+ } from "./actions/export";
6
+ export { FixImportsArgs, fixImports } from "./actions/fix-imports";
3
7
  export { InitArgs, initPlasmic } from "./actions/init";
8
+ export {
9
+ LocalizationStringsArgs,
10
+ localizationStrings,
11
+ } from "./actions/localization-strings";
4
12
  export { getProjectApiToken } from "./actions/project-token";
5
- export { sync, SyncArgs } from "./actions/sync";
6
- export { UploadBundleArgs, uploadJsBundle } from "./actions/upload-bundle";
13
+ export { SyncArgs, sync } from "./actions/sync";
7
14
  export { WatchArgs, watchProjects } from "./actions/watch";
8
15
  export { logger } from "./deps";
9
16
  export { HandledError, handleError } from "./utils/error";
10
17
  export { Metadata, setMetadataEnv } from "./utils/get-context";
11
- export {
12
- localizationStrings,
13
- LocalizationStringsArgs,
14
- } from "./actions/localization-strings";
15
- export {
16
- exportProjectsCli as exportProjects,
17
- ExportArgs,
18
- } from "./actions/export";
@@ -125,7 +125,7 @@ export async function runNecessaryMigrations(
125
125
  const prev = readConfig(configFile, false);
126
126
  const next = migrationFunc(prev, context);
127
127
  next.cliVersion = version;
128
- await writeConfig(configFile, next, baseDir);
128
+ await writeConfig(configFile, next);
129
129
  }
130
130
 
131
131
  const lockMigrationFunc = LOCK_MIGRATIONS[version];
@@ -133,7 +133,7 @@ export async function runNecessaryMigrations(
133
133
  const prev = maybeReadLock();
134
134
  if (prev) {
135
135
  const next = lockMigrationFunc(prev, context);
136
- await writeLock(lockFile, next, baseDir);
136
+ await writeLock(lockFile, next);
137
137
  }
138
138
  }
139
139
  }
@@ -142,6 +142,6 @@ export async function runNecessaryMigrations(
142
142
  const latestConfig = readConfig(configFile, false);
143
143
  if (latestConfig.cliVersion !== cliVersion) {
144
144
  latestConfig.cliVersion = cliVersion;
145
- await writeConfig(configFile, latestConfig, baseDir);
145
+ await writeConfig(configFile, latestConfig);
146
146
  }
147
147
  }