@plasmicapp/cli 0.1.285 → 0.1.286

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.
@@ -466,7 +466,7 @@ function syncProjectConfig(context, projectBundle, projectApiToken, branchName,
466
466
  }
467
467
  function syncCodeComponentsMeta(context, projectId, codeComponentBundles) {
468
468
  const projectConfig = config_utils_1.getOrAddProjectConfig(context, projectId);
469
- projectConfig.codeComponents = codeComponentBundles.map((meta) => (Object.assign({ id: meta.id, name: meta.name, componentImportPath: meta.importPath }, (meta.helper
469
+ projectConfig.codeComponents = codeComponentBundles.map((meta) => (Object.assign({ id: meta.id, name: meta.name, displayName: meta.displayName, componentImportPath: meta.importPath }, (meta.helper
470
470
  ? {
471
471
  helper: {
472
472
  name: meta.helper.name,
package/dist/api.d.ts CHANGED
@@ -129,6 +129,7 @@ export interface ChecksumBundle {
129
129
  export interface CodeComponentMeta {
130
130
  id: string;
131
131
  name: string;
132
+ displayName: string;
132
133
  importPath: string;
133
134
  helper?: {
134
135
  name: string;
@@ -6,6 +6,9 @@
6
6
  "componentImportPath": {
7
7
  "type": "string"
8
8
  },
9
+ "displayName": {
10
+ "type": "string"
11
+ },
9
12
  "helper": {
10
13
  "properties": {
11
14
  "importPath": {
@@ -30,6 +33,7 @@
30
33
  },
31
34
  "required": [
32
35
  "componentImportPath",
36
+ "displayName",
33
37
  "id",
34
38
  "name"
35
39
  ],
@@ -251,7 +251,7 @@ function replaceImports(context, code, fromPath, fixImportContext, removeImportD
251
251
  else if (type === "codeComponent") {
252
252
  const meta = fixImportContext.codeComponentMetas[uuid];
253
253
  if (!meta.componentImportPath) {
254
- throw new error_1.HandledError(`Encountered code component "${meta.name}" that was not registered with an importPath, so we don't know where to import this component from. Please see https://docs.plasmic.app/learn/code-components-ref/`);
254
+ throw new error_1.HandledError(`Encountered code component "${meta.displayName}" that was not registered with an importPath, so we don't know where to import this component from. Please see https://docs.plasmic.app/learn/code-components-ref/`);
255
255
  }
256
256
  if (meta.componentImportPath[0] === ".") {
257
257
  // Relative path from the project root
@@ -268,7 +268,7 @@ function replaceImports(context, code, fromPath, fixImportContext, removeImportD
268
268
  else if (type === "codeComponentHelper") {
269
269
  const meta = fixImportContext.codeComponentMetas[uuid];
270
270
  if (!((_b = meta.helper) === null || _b === void 0 ? void 0 : _b.importPath)) {
271
- throw new error_1.HandledError(`Encountered code component "${meta.name}" that was not registered with an importPath to the component helper, so we don't know where to import this code component helper from. Please see https://docs.plasmic.app/learn/code-components-ref/`);
271
+ throw new error_1.HandledError(`Encountered code component "${meta.displayName}" that was not registered with an importPath to the component helper, so we don't know where to import this code component helper from. Please see https://docs.plasmic.app/learn/code-components-ref/`);
272
272
  }
273
273
  if (meta.helper.importPath[0] === ".") {
274
274
  // Relative path from the project root
@@ -111,6 +111,7 @@ export interface JsBundleThemeConfig {
111
111
  export interface CodeComponentConfig {
112
112
  id: string;
113
113
  name: string;
114
+ displayName: string;
114
115
  componentImportPath: string;
115
116
  helper?: {
116
117
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/cli",
3
- "version": "0.1.285",
3
+ "version": "0.1.286",
4
4
  "description": "plasmic cli for syncing local code with Plasmic designs",
5
5
  "engines": {
6
6
  "node": ">=12"
@@ -81,5 +81,5 @@
81
81
  "wrap-ansi": "^7.0.0",
82
82
  "yargs": "^15.4.1"
83
83
  },
84
- "gitHead": "5f738407b3507b4cdcad7003b0d97593556a8702"
84
+ "gitHead": "33a12ff69ec49f4681b7842548ccc62b1f8cb7de"
85
85
  }
@@ -835,6 +835,7 @@ function syncCodeComponentsMeta(
835
835
  projectConfig.codeComponents = codeComponentBundles.map((meta) => ({
836
836
  id: meta.id,
837
837
  name: meta.name,
838
+ displayName: meta.displayName,
838
839
  componentImportPath: meta.importPath,
839
840
  ...(meta.helper
840
841
  ? {
package/src/api.ts CHANGED
@@ -165,11 +165,12 @@ export interface ChecksumBundle {
165
165
  export interface CodeComponentMeta {
166
166
  id: string; // component uuid
167
167
  name: string;
168
+ displayName: string;
168
169
  importPath: string;
169
170
  helper?: {
170
171
  name: string;
171
172
  importPath: string;
172
- }
173
+ };
173
174
  }
174
175
 
175
176
  export interface ProjectIconsResponse {
@@ -331,7 +331,7 @@ export function replaceImports(
331
331
  const meta = fixImportContext.codeComponentMetas[uuid];
332
332
  if (!meta.componentImportPath) {
333
333
  throw new HandledError(
334
- `Encountered code component "${meta.name}" that was not registered with an importPath, so we don't know where to import this component from. Please see https://docs.plasmic.app/learn/code-components-ref/`
334
+ `Encountered code component "${meta.displayName}" that was not registered with an importPath, so we don't know where to import this component from. Please see https://docs.plasmic.app/learn/code-components-ref/`
335
335
  );
336
336
  }
337
337
  if (meta.componentImportPath[0] === ".") {
@@ -348,7 +348,7 @@ export function replaceImports(
348
348
  const meta = fixImportContext.codeComponentMetas[uuid];
349
349
  if (!meta.helper?.importPath) {
350
350
  throw new HandledError(
351
- `Encountered code component "${meta.name}" that was not registered with an importPath to the component helper, so we don't know where to import this code component helper from. Please see https://docs.plasmic.app/learn/code-components-ref/`
351
+ `Encountered code component "${meta.displayName}" that was not registered with an importPath to the component helper, so we don't know where to import this code component helper from. Please see https://docs.plasmic.app/learn/code-components-ref/`
352
352
  );
353
353
  }
354
354
  if (meta.helper.importPath[0] === ".") {
@@ -155,11 +155,12 @@ export interface JsBundleThemeConfig {
155
155
  export interface CodeComponentConfig {
156
156
  id: string;
157
157
  name: string;
158
+ displayName: string;
158
159
  componentImportPath: string;
159
160
  helper?: {
160
161
  name: string;
161
162
  importPath: string;
162
- }
163
+ };
163
164
  }
164
165
 
165
166
  export interface ProjectConfig {