@plasmicapp/cli 0.1.340 → 0.1.341

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/api.d.ts CHANGED
@@ -49,7 +49,6 @@ export interface ProjectMetaBundle {
49
49
  projectName: string;
50
50
  cssFileName: string;
51
51
  cssRules: string;
52
- jsBundleThemes?: JsBundleTheme[];
53
52
  globalContextBundle?: GlobalContextBundle;
54
53
  splitsProviderBundle?: SplitsProviderBundle;
55
54
  reactWebExportedFiles?: Array<{
package/dist/index.js CHANGED
@@ -34,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  ));
35
35
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
36
 
37
- // node_modules/yargs/build/lib/common-types.js
37
+ // ../../node_modules/yargs/build/lib/common-types.js
38
38
  var require_common_types = __commonJS({
39
- "node_modules/yargs/build/lib/common-types.js"(exports) {
39
+ "../../node_modules/yargs/build/lib/common-types.js"(exports) {
40
40
  "use strict";
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
42
  exports.objectKeys = exports.assertSingleKey = exports.assertNotStrictEqual = void 0;
@@ -56,9 +56,9 @@ var require_common_types = __commonJS({
56
56
  }
57
57
  });
58
58
 
59
- // node_modules/yargs/build/lib/is-promise.js
59
+ // ../../node_modules/yargs/build/lib/is-promise.js
60
60
  var require_is_promise = __commonJS({
61
- "node_modules/yargs/build/lib/is-promise.js"(exports) {
61
+ "../../node_modules/yargs/build/lib/is-promise.js"(exports) {
62
62
  "use strict";
63
63
  Object.defineProperty(exports, "__esModule", { value: true });
64
64
  exports.isPromise = void 0;
@@ -69,9 +69,9 @@ var require_is_promise = __commonJS({
69
69
  }
70
70
  });
71
71
 
72
- // node_modules/yargs/build/lib/yerror.js
72
+ // ../../node_modules/yargs/build/lib/yerror.js
73
73
  var require_yerror = __commonJS({
74
- "node_modules/yargs/build/lib/yerror.js"(exports) {
74
+ "../../node_modules/yargs/build/lib/yerror.js"(exports) {
75
75
  "use strict";
76
76
  Object.defineProperty(exports, "__esModule", { value: true });
77
77
  exports.YError = void 0;
@@ -86,9 +86,9 @@ var require_yerror = __commonJS({
86
86
  }
87
87
  });
88
88
 
89
- // node_modules/yargs/build/lib/parse-command.js
89
+ // ../../node_modules/yargs/build/lib/parse-command.js
90
90
  var require_parse_command = __commonJS({
91
- "node_modules/yargs/build/lib/parse-command.js"(exports) {
91
+ "../../node_modules/yargs/build/lib/parse-command.js"(exports) {
92
92
  "use strict";
93
93
  Object.defineProperty(exports, "__esModule", { value: true });
94
94
  exports.parseCommand = void 0;
@@ -127,9 +127,9 @@ var require_parse_command = __commonJS({
127
127
  }
128
128
  });
129
129
 
130
- // node_modules/yargs/build/lib/argsert.js
130
+ // ../../node_modules/yargs/build/lib/argsert.js
131
131
  var require_argsert = __commonJS({
132
- "node_modules/yargs/build/lib/argsert.js"(exports) {
132
+ "../../node_modules/yargs/build/lib/argsert.js"(exports) {
133
133
  "use strict";
134
134
  Object.defineProperty(exports, "__esModule", { value: true });
135
135
  exports.argsert = void 0;
@@ -191,9 +191,9 @@ var require_argsert = __commonJS({
191
191
  }
192
192
  });
193
193
 
194
- // node_modules/yargs/build/lib/middleware.js
194
+ // ../../node_modules/yargs/build/lib/middleware.js
195
195
  var require_middleware = __commonJS({
196
- "node_modules/yargs/build/lib/middleware.js"(exports) {
196
+ "../../node_modules/yargs/build/lib/middleware.js"(exports) {
197
197
  "use strict";
198
198
  Object.defineProperty(exports, "__esModule", { value: true });
199
199
  exports.applyMiddleware = exports.commandMiddlewareFactory = exports.globalMiddlewareFactory = void 0;
@@ -399,9 +399,9 @@ var require_decamelize = __commonJS({
399
399
  }
400
400
  });
401
401
 
402
- // node_modules/yargs-parser/lib/tokenize-arg-string.js
402
+ // ../../node_modules/yargs/node_modules/yargs-parser/lib/tokenize-arg-string.js
403
403
  var require_tokenize_arg_string = __commonJS({
404
- "node_modules/yargs-parser/lib/tokenize-arg-string.js"(exports, module2) {
404
+ "../../node_modules/yargs/node_modules/yargs-parser/lib/tokenize-arg-string.js"(exports, module2) {
405
405
  module2.exports = function(argString) {
406
406
  if (Array.isArray(argString)) {
407
407
  return argString.map((e) => typeof e !== "string" ? e + "" : e);
@@ -435,9 +435,9 @@ var require_tokenize_arg_string = __commonJS({
435
435
  }
436
436
  });
437
437
 
438
- // node_modules/yargs-parser/index.js
438
+ // ../../node_modules/yargs/node_modules/yargs-parser/index.js
439
439
  var require_yargs_parser = __commonJS({
440
- "node_modules/yargs-parser/index.js"(exports, module2) {
440
+ "../../node_modules/yargs/node_modules/yargs-parser/index.js"(exports, module2) {
441
441
  var camelCase = require_camelcase();
442
442
  var decamelize = require_decamelize();
443
443
  var path15 = require("path");
@@ -1226,9 +1226,9 @@ var require_yargs_parser = __commonJS({
1226
1226
  }
1227
1227
  });
1228
1228
 
1229
- // node_modules/yargs/build/lib/command.js
1229
+ // ../../node_modules/yargs/build/lib/command.js
1230
1230
  var require_command = __commonJS({
1231
- "node_modules/yargs/build/lib/command.js"(exports) {
1231
+ "../../node_modules/yargs/build/lib/command.js"(exports) {
1232
1232
  "use strict";
1233
1233
  Object.defineProperty(exports, "__esModule", { value: true });
1234
1234
  exports.isCommandBuilderCallback = exports.isCommandBuilderDefinition = exports.isCommandHandlerDefinition = exports.command = void 0;
@@ -1589,9 +1589,9 @@ var require_command = __commonJS({
1589
1589
  }
1590
1590
  });
1591
1591
 
1592
- // node_modules/yargs/build/lib/obj-filter.js
1592
+ // ../../node_modules/yargs/build/lib/obj-filter.js
1593
1593
  var require_obj_filter = __commonJS({
1594
- "node_modules/yargs/build/lib/obj-filter.js"(exports) {
1594
+ "../../node_modules/yargs/build/lib/obj-filter.js"(exports) {
1595
1595
  "use strict";
1596
1596
  Object.defineProperty(exports, "__esModule", { value: true });
1597
1597
  exports.objFilter = void 0;
@@ -2826,9 +2826,9 @@ var require_ansi_styles = __commonJS({
2826
2826
  }
2827
2827
  });
2828
2828
 
2829
- // node_modules/cliui/node_modules/wrap-ansi/index.js
2829
+ // ../../node_modules/yargs/node_modules/wrap-ansi/index.js
2830
2830
  var require_wrap_ansi = __commonJS({
2831
- "node_modules/cliui/node_modules/wrap-ansi/index.js"(exports, module2) {
2831
+ "../../node_modules/yargs/node_modules/wrap-ansi/index.js"(exports, module2) {
2832
2832
  "use strict";
2833
2833
  var stringWidth = require_string_width();
2834
2834
  var stripAnsi = require_strip_ansi();
@@ -2959,9 +2959,9 @@ var require_wrap_ansi = __commonJS({
2959
2959
  }
2960
2960
  });
2961
2961
 
2962
- // node_modules/cliui/index.js
2962
+ // ../../node_modules/yargs/node_modules/cliui/index.js
2963
2963
  var require_cliui = __commonJS({
2964
- "node_modules/cliui/index.js"(exports, module2) {
2964
+ "../../node_modules/yargs/node_modules/cliui/index.js"(exports, module2) {
2965
2965
  "use strict";
2966
2966
  var stringWidth = require_string_width();
2967
2967
  var stripAnsi = require_strip_ansi();
@@ -3221,9 +3221,9 @@ var require_cliui = __commonJS({
3221
3221
  }
3222
3222
  });
3223
3223
 
3224
- // node_modules/yargs/build/lib/usage.js
3224
+ // ../../node_modules/yargs/build/lib/usage.js
3225
3225
  var require_usage = __commonJS({
3226
- "node_modules/yargs/build/lib/usage.js"(exports) {
3226
+ "../../node_modules/yargs/build/lib/usage.js"(exports) {
3227
3227
  "use strict";
3228
3228
  Object.defineProperty(exports, "__esModule", { value: true });
3229
3229
  exports.usage = void 0;
@@ -3701,9 +3701,9 @@ var require_usage = __commonJS({
3701
3701
  }
3702
3702
  });
3703
3703
 
3704
- // node_modules/yargs/build/lib/completion-templates.js
3704
+ // ../../node_modules/yargs/build/lib/completion-templates.js
3705
3705
  var require_completion_templates = __commonJS({
3706
- "node_modules/yargs/build/lib/completion-templates.js"(exports) {
3706
+ "../../node_modules/yargs/build/lib/completion-templates.js"(exports) {
3707
3707
  "use strict";
3708
3708
  Object.defineProperty(exports, "__esModule", { value: true });
3709
3709
  exports.completionZshTemplate = exports.completionShTemplate = void 0;
@@ -3758,9 +3758,9 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
3758
3758
  }
3759
3759
  });
3760
3760
 
3761
- // node_modules/yargs/build/lib/completion.js
3761
+ // ../../node_modules/yargs/build/lib/completion.js
3762
3762
  var require_completion = __commonJS({
3763
- "node_modules/yargs/build/lib/completion.js"(exports) {
3763
+ "../../node_modules/yargs/build/lib/completion.js"(exports) {
3764
3764
  "use strict";
3765
3765
  Object.defineProperty(exports, "__esModule", { value: true });
3766
3766
  exports.completion = void 0;
@@ -3884,9 +3884,9 @@ var require_completion = __commonJS({
3884
3884
  }
3885
3885
  });
3886
3886
 
3887
- // node_modules/yargs/build/lib/levenshtein.js
3887
+ // ../../node_modules/yargs/build/lib/levenshtein.js
3888
3888
  var require_levenshtein = __commonJS({
3889
- "node_modules/yargs/build/lib/levenshtein.js"(exports) {
3889
+ "../../node_modules/yargs/build/lib/levenshtein.js"(exports) {
3890
3890
  "use strict";
3891
3891
  Object.defineProperty(exports, "__esModule", { value: true });
3892
3892
  exports.levenshtein = void 0;
@@ -3927,9 +3927,9 @@ var require_levenshtein = __commonJS({
3927
3927
  }
3928
3928
  });
3929
3929
 
3930
- // node_modules/yargs/build/lib/validation.js
3930
+ // ../../node_modules/yargs/build/lib/validation.js
3931
3931
  var require_validation = __commonJS({
3932
- "node_modules/yargs/build/lib/validation.js"(exports) {
3932
+ "../../node_modules/yargs/build/lib/validation.js"(exports) {
3933
3933
  "use strict";
3934
3934
  Object.defineProperty(exports, "__esModule", { value: true });
3935
3935
  exports.validation = void 0;
@@ -4226,9 +4226,9 @@ ${customMsgs.join("\n")}` : "";
4226
4226
  }
4227
4227
  });
4228
4228
 
4229
- // node_modules/yargs/build/lib/apply-extends.js
4229
+ // ../../node_modules/yargs/build/lib/apply-extends.js
4230
4230
  var require_apply_extends = __commonJS({
4231
- "node_modules/yargs/build/lib/apply-extends.js"(exports) {
4231
+ "../../node_modules/yargs/build/lib/apply-extends.js"(exports) {
4232
4232
  "use strict";
4233
4233
  Object.defineProperty(exports, "__esModule", { value: true });
4234
4234
  exports.applyExtends = void 0;
@@ -4291,9 +4291,9 @@ var require_apply_extends = __commonJS({
4291
4291
  }
4292
4292
  });
4293
4293
 
4294
- // node_modules/yargs/build/lib/process-argv.js
4294
+ // ../../node_modules/yargs/build/lib/process-argv.js
4295
4295
  var require_process_argv = __commonJS({
4296
- "node_modules/yargs/build/lib/process-argv.js"(exports) {
4296
+ "../../node_modules/yargs/build/lib/process-argv.js"(exports) {
4297
4297
  "use strict";
4298
4298
  Object.defineProperty(exports, "__esModule", { value: true });
4299
4299
  exports.getProcessArgvBin = exports.getProcessArgvWithoutBin = void 0;
@@ -4784,9 +4784,9 @@ var require_get_caller_file = __commonJS({
4784
4784
  }
4785
4785
  });
4786
4786
 
4787
- // node_modules/yargs/build/lib/yargs.js
4787
+ // ../../node_modules/yargs/build/lib/yargs.js
4788
4788
  var require_yargs = __commonJS({
4789
- "node_modules/yargs/build/lib/yargs.js"(exports) {
4789
+ "../../node_modules/yargs/build/lib/yargs.js"(exports) {
4790
4790
  "use strict";
4791
4791
  Object.defineProperty(exports, "__esModule", { value: true });
4792
4792
  exports.isYargsInstance = exports.rebase = exports.Yargs = void 0;
@@ -5862,9 +5862,9 @@ var require_yargs = __commonJS({
5862
5862
  }
5863
5863
  });
5864
5864
 
5865
- // node_modules/yargs/yargs.js
5865
+ // ../../node_modules/yargs/yargs.js
5866
5866
  var require_yargs2 = __commonJS({
5867
- "node_modules/yargs/yargs.js"(exports, module2) {
5867
+ "../../node_modules/yargs/yargs.js"(exports, module2) {
5868
5868
  "use strict";
5869
5869
  async function requiresNode8OrGreater() {
5870
5870
  }
@@ -5877,9 +5877,9 @@ var require_yargs2 = __commonJS({
5877
5877
  }
5878
5878
  });
5879
5879
 
5880
- // node_modules/yargs/index.js
5880
+ // ../../node_modules/yargs/index.js
5881
5881
  var require_yargs3 = __commonJS({
5882
- "node_modules/yargs/index.js"(exports, module2) {
5882
+ "../../node_modules/yargs/index.js"(exports, module2) {
5883
5883
  "use strict";
5884
5884
  var yargs2 = require_yargs2();
5885
5885
  var processArgv = require_process_argv();
@@ -500281,7 +500281,6 @@ function getOrAddProjectConfig(context, projectId, base) {
500281
500281
  components: [],
500282
500282
  icons: [],
500283
500283
  images: [],
500284
- jsBundleThemes: [],
500285
500284
  indirect: false,
500286
500285
  globalContextsFilePath: "",
500287
500286
  splitsProviderFilePath: ""
@@ -501418,16 +501417,6 @@ function ensureVersion(config) {
501418
501417
  return config;
501419
501418
  }
501420
501419
 
501421
- // src/migrations/0.1.57-ensureJsBundleThemes.ts
501422
- function ensureJsBundleThemes(config) {
501423
- for (const proj of config.projects) {
501424
- if (!proj.jsBundleThemes) {
501425
- proj.jsBundleThemes = [];
501426
- }
501427
- }
501428
- return config;
501429
- }
501430
-
501431
501420
  // src/migrations/0.1.64-imageFiles.ts
501432
501421
  function ensureImageFiles(config) {
501433
501422
  if (!config.images) {
@@ -501463,7 +501452,6 @@ var MIGRATIONS = {
501463
501452
  "0.1.28": tsToTsx,
501464
501453
  "0.1.31": ensureProjectIcons,
501465
501454
  "0.1.42": ensureVersion,
501466
- "0.1.57": ensureJsBundleThemes,
501467
501455
  "0.1.64": ensureImageFiles,
501468
501456
  "0.1.95": ensureComponentType,
501469
501457
  "0.1.146": ensureReactRuntime,
@@ -501715,10 +501703,6 @@ async function resolveMissingFilesInConfig(context, config) {
501715
501703
  ) || project.splitsProviderFilePath;
501716
501704
  project.images = await filterFiles(project.images, "filePath");
501717
501705
  project.icons = await filterFiles(project.icons, "moduleFilePath");
501718
- project.jsBundleThemes = await filterFiles(
501719
- project.jsBundleThemes || [],
501720
- "themeFilePath"
501721
- );
501722
501706
  const newComponents = [];
501723
501707
  for (const component of project.components) {
501724
501708
  if (component.type === "mapped") {
@@ -503278,13 +503262,6 @@ async function syncProject(context, opts, projectIdsAndTokens, projectId, branch
503278
503262
  opts.baseDir
503279
503263
  );
503280
503264
  });
503281
- (projectBundle.projectConfig.jsBundleThemes || []).forEach((theme) => {
503282
- [theme.themeFileName, theme.themeModule] = maybeConvertTsxToJsx(
503283
- theme.themeFileName,
503284
- theme.themeModule,
503285
- opts.baseDir
503286
- );
503287
- });
503288
503265
  }
503289
503266
  await syncGlobalVariants(
503290
503267
  context,
@@ -503354,6 +503331,7 @@ async function syncStyleConfig(context, response) {
503354
503331
  });
503355
503332
  }
503356
503333
  async function syncProjectConfig(context, projectBundle, projectApiToken, branchName, version, dependencies, componentBundles, forceOverwrite, summary, checksums, baseDir, indirect) {
503334
+ var _a;
503357
503335
  const defaultCssFilePath = defaultResourcePath(
503358
503336
  context,
503359
503337
  projectBundle.projectName,
@@ -503409,7 +503387,7 @@ async function syncProjectConfig(context, projectBundle, projectApiToken, branch
503409
503387
  type: "projectCss",
503410
503388
  checksum: checksums.projectCssChecksum
503411
503389
  });
503412
- if (projectConfig.jsBundleThemes && projectConfig.jsBundleThemes.length === 0) {
503390
+ if (((_a = projectConfig.jsBundleThemes) == null ? void 0 : _a.length) === 0) {
503413
503391
  delete projectConfig.jsBundleThemes;
503414
503392
  }
503415
503393
  await syncGlobalContexts(
package/dist/lib.js CHANGED
@@ -495623,7 +495623,6 @@ function getOrAddProjectConfig(context, projectId, base) {
495623
495623
  components: [],
495624
495624
  icons: [],
495625
495625
  images: [],
495626
- jsBundleThemes: [],
495627
495626
  indirect: false,
495628
495627
  globalContextsFilePath: "",
495629
495628
  splitsProviderFilePath: ""
@@ -496740,16 +496739,6 @@ function ensureVersion(config) {
496740
496739
  return config;
496741
496740
  }
496742
496741
 
496743
- // src/migrations/0.1.57-ensureJsBundleThemes.ts
496744
- function ensureJsBundleThemes(config) {
496745
- for (const proj of config.projects) {
496746
- if (!proj.jsBundleThemes) {
496747
- proj.jsBundleThemes = [];
496748
- }
496749
- }
496750
- return config;
496751
- }
496752
-
496753
496742
  // src/migrations/0.1.64-imageFiles.ts
496754
496743
  function ensureImageFiles(config) {
496755
496744
  if (!config.images) {
@@ -496785,7 +496774,6 @@ var MIGRATIONS = {
496785
496774
  "0.1.28": tsToTsx,
496786
496775
  "0.1.31": ensureProjectIcons,
496787
496776
  "0.1.42": ensureVersion,
496788
- "0.1.57": ensureJsBundleThemes,
496789
496777
  "0.1.64": ensureImageFiles,
496790
496778
  "0.1.95": ensureComponentType,
496791
496779
  "0.1.146": ensureReactRuntime,
@@ -497037,10 +497025,6 @@ async function resolveMissingFilesInConfig(context, config) {
497037
497025
  ) || project.splitsProviderFilePath;
497038
497026
  project.images = await filterFiles(project.images, "filePath");
497039
497027
  project.icons = await filterFiles(project.icons, "moduleFilePath");
497040
- project.jsBundleThemes = await filterFiles(
497041
- project.jsBundleThemes || [],
497042
- "themeFilePath"
497043
- );
497044
497028
  const newComponents = [];
497045
497029
  for (const component of project.components) {
497046
497030
  if (component.type === "mapped") {
@@ -498576,13 +498560,6 @@ async function syncProject(context, opts, projectIdsAndTokens, projectId, branch
498576
498560
  opts.baseDir
498577
498561
  );
498578
498562
  });
498579
- (projectBundle.projectConfig.jsBundleThemes || []).forEach((theme) => {
498580
- [theme.themeFileName, theme.themeModule] = maybeConvertTsxToJsx(
498581
- theme.themeFileName,
498582
- theme.themeModule,
498583
- opts.baseDir
498584
- );
498585
- });
498586
498563
  }
498587
498564
  await syncGlobalVariants(
498588
498565
  context,
@@ -498652,6 +498629,7 @@ async function syncStyleConfig(context, response) {
498652
498629
  });
498653
498630
  }
498654
498631
  async function syncProjectConfig(context, projectBundle, projectApiToken, branchName, version, dependencies, componentBundles, forceOverwrite, summary, checksums, baseDir, indirect) {
498632
+ var _a;
498655
498633
  const defaultCssFilePath = defaultResourcePath(
498656
498634
  context,
498657
498635
  projectBundle.projectName,
@@ -498707,7 +498685,7 @@ async function syncProjectConfig(context, projectBundle, projectApiToken, branch
498707
498685
  type: "projectCss",
498708
498686
  checksum: checksums.projectCssChecksum
498709
498687
  });
498710
- if (projectConfig.jsBundleThemes && projectConfig.jsBundleThemes.length === 0) {
498688
+ if (((_a = projectConfig.jsBundleThemes) == null ? void 0 : _a.length) === 0) {
498711
498689
  delete projectConfig.jsBundleThemes;
498712
498690
  }
498713
498691
  await syncGlobalContexts(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/cli",
3
- "version": "0.1.340",
3
+ "version": "0.1.341",
4
4
  "description": "plasmic cli for syncing local code with Plasmic designs",
5
5
  "engines": {
6
6
  "node": ">=12"
@@ -83,5 +83,5 @@
83
83
  "wrap-ansi": "^7.0.0",
84
84
  "yargs": "^15.4.1"
85
85
  },
86
- "gitHead": "bad3fc74b8f3d964ec7e08f06bd8b1e5bfe18494"
86
+ "gitHead": "fcc97c73f5bb7a9eddf27528e2769d33a8c4f069"
87
87
  }
@@ -193,7 +193,6 @@ function genProjectMetaBundle(projectId: string): ProjectMetaBundle {
193
193
  projectName: projectId,
194
194
  cssFileName: genFilename(projectId, "css"),
195
195
  cssRules: `theClass {color: green;}`,
196
- jsBundleThemes: [],
197
196
  };
198
197
  }
199
198
 
@@ -605,13 +605,6 @@ async function syncProject(
605
605
  opts.baseDir
606
606
  );
607
607
  });
608
- (projectBundle.projectConfig.jsBundleThemes || []).forEach((theme) => {
609
- [theme.themeFileName, theme.themeModule] = maybeConvertTsxToJsx(
610
- theme.themeFileName,
611
- theme.themeModule,
612
- opts.baseDir
613
- );
614
- });
615
608
  }
616
609
  await syncGlobalVariants(
617
610
  context,
@@ -766,37 +759,7 @@ async function syncProjectConfig(
766
759
  checksum: checksums.projectCssChecksum,
767
760
  });
768
761
 
769
- /*
770
- for (const theme of projectBundle.jsBundleThemes) {
771
- if (!projectConfig.jsBundleThemes) {
772
- projectConfig.jsBundleThemes = [];
773
- }
774
- let themeConfig = projectConfig.jsBundleThemes.find(
775
- (c) => c.bundleName === theme.bundleName
776
- );
777
- if (!themeConfig) {
778
- const themeFilePath = defaultResourcePath(
779
- context,
780
- projectConfig,
781
- theme.themeFileName
782
- );
783
- themeConfig = { themeFilePath, bundleName: theme.bundleName };
784
- projectConfig.jsBundleThemes.push(themeConfig);
785
- }
786
- const formatted = formatAsLocal(
787
- theme.themeModule,
788
- themeConfig.themeFilePath
789
- );
790
- await writeFileContent(context, themeConfig.themeFilePath, formatted, {
791
- force: true,
792
- });
793
- }
794
- */
795
-
796
- if (
797
- projectConfig.jsBundleThemes &&
798
- projectConfig.jsBundleThemes.length === 0
799
- ) {
762
+ if (projectConfig.jsBundleThemes?.length === 0) {
800
763
  delete projectConfig.jsBundleThemes;
801
764
  }
802
765
 
package/src/api.ts CHANGED
@@ -76,7 +76,6 @@ export interface ProjectMetaBundle {
76
76
  projectName: string;
77
77
  cssFileName: string;
78
78
  cssRules: string;
79
- jsBundleThemes?: JsBundleTheme[];
80
79
  globalContextBundle?: GlobalContextBundle;
81
80
  splitsProviderBundle?: SplitsProviderBundle;
82
81
  // A list of files that are exported from the project and *can* be used by the user
@@ -40,7 +40,6 @@ import { migrateInit } from "./0.1.27-migrateInit";
40
40
  import { tsToTsx } from "./0.1.28-tsToTsx";
41
41
  import { ensureProjectIcons } from "./0.1.31-ensureProjectIcons";
42
42
  import { ensureVersion } from "./0.1.42-ensureVersion";
43
- import { ensureJsBundleThemes } from "./0.1.57-ensureJsBundleThemes";
44
43
  import { ensureImageFiles } from "./0.1.64-imageFiles";
45
44
  import { ensureComponentType } from "./0.1.95-componentType";
46
45
  export interface MigrateContext {
@@ -61,7 +60,6 @@ export const MIGRATIONS: Record<string, MigrateConfigFunc> = {
61
60
  "0.1.28": tsToTsx,
62
61
  "0.1.31": ensureProjectIcons,
63
62
  "0.1.42": ensureVersion,
64
- "0.1.57": ensureJsBundleThemes,
65
63
  "0.1.64": ensureImageFiles,
66
64
  "0.1.95": ensureComponentType,
67
65
  "0.1.146": ensureReactRuntime,
@@ -1,9 +1,9 @@
1
1
  /// <reference types="@types/jest" />
2
2
  import L from "lodash";
3
+ import { MockProject } from "../__mocks__/api";
3
4
  import { SyncArgs } from "../actions/sync";
4
5
  import { PlasmicConfig, ProjectConfig } from "../utils/config-utils";
5
6
  import { TempRepo } from "../utils/test-utils";
6
- import { MockProject } from "../__mocks__/api";
7
7
 
8
8
  jest.mock("../api");
9
9
 
@@ -148,7 +148,6 @@ export const project1Config: ProjectConfig = {
148
148
  ],
149
149
  icons: [],
150
150
  images: [],
151
- jsBundleThemes: [],
152
151
  indirect: false,
153
152
  globalContextsFilePath: "",
154
153
  splitsProviderFilePath: "",
@@ -608,7 +608,6 @@ export function getOrAddProjectConfig(
608
608
  components: [],
609
609
  icons: [],
610
610
  images: [],
611
- jsBundleThemes: [],
612
611
  indirect: false,
613
612
  globalContextsFilePath: "",
614
613
  splitsProviderFilePath: "",
@@ -245,10 +245,6 @@ async function resolveMissingFilesInConfig(
245
245
 
246
246
  project.images = await filterFiles(project.images, "filePath");
247
247
  project.icons = await filterFiles(project.icons, "moduleFilePath");
248
- project.jsBundleThemes = await filterFiles(
249
- project.jsBundleThemes || [],
250
- "themeFilePath"
251
- );
252
248
 
253
249
  // For components, if they decide to recreate in any of the path (css, wrapper, or blackbox component)
254
250
  // we'll delete existing files.
@@ -1,2 +0,0 @@
1
- import { PlasmicConfig } from "../utils/config-utils";
2
- export declare function ensureJsBundleThemes(config: PlasmicConfig): PlasmicConfig;
@@ -1,10 +0,0 @@
1
- import { PlasmicConfig } from "../utils/config-utils";
2
-
3
- export function ensureJsBundleThemes(config: PlasmicConfig) {
4
- for (const proj of config.projects) {
5
- if (!proj.jsBundleThemes) {
6
- proj.jsBundleThemes = [];
7
- }
8
- }
9
- return config;
10
- }