@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.
- package/dist/actions/sync.js +1 -1
- package/dist/api.d.ts +1 -0
- package/dist/plasmic.schema.json +4 -0
- package/dist/utils/code-utils.js +2 -2
- package/dist/utils/config-utils.d.ts +1 -0
- package/package.json +2 -2
- package/src/actions/sync.ts +1 -0
- package/src/api.ts +2 -1
- package/src/utils/code-utils.ts +2 -2
- package/src/utils/config-utils.ts +2 -1
package/dist/actions/sync.js
CHANGED
|
@@ -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
package/dist/plasmic.schema.json
CHANGED
|
@@ -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
|
],
|
package/dist/utils/code-utils.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/cli",
|
|
3
|
-
"version": "0.1.
|
|
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": "
|
|
84
|
+
"gitHead": "33a12ff69ec49f4681b7842548ccc62b1f8cb7de"
|
|
85
85
|
}
|
package/src/actions/sync.ts
CHANGED
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 {
|
package/src/utils/code-utils.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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 {
|