@plasmicapp/cli 0.1.214 → 0.1.216
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/utils/code-utils.js
CHANGED
|
@@ -250,6 +250,9 @@ function replaceImports(context, code, fromPath, fixImportContext, removeImportD
|
|
|
250
250
|
}
|
|
251
251
|
else if (type === "codeComponent") {
|
|
252
252
|
const meta = fixImportContext.codeComponentMetas[uuid];
|
|
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/`);
|
|
255
|
+
}
|
|
253
256
|
if (meta.componentImportPath[0] === ".") {
|
|
254
257
|
// Relative path from the project root
|
|
255
258
|
const toPath = upath_1.default.join(context.rootDir, meta.componentImportPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.216",
|
|
4
4
|
"description": "plasmic cli for syncing local code with Plasmic designs",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=12"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@babel/preset-typescript": "^7.12.1",
|
|
23
|
-
"@plasmicapp/react-web": "0.2.
|
|
23
|
+
"@plasmicapp/react-web": "0.2.161",
|
|
24
24
|
"@types/findup-sync": "^2.0.2",
|
|
25
25
|
"@types/glob": "^7.1.3",
|
|
26
26
|
"@types/inquirer": "^6.5.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"wrap-ansi": "^7.0.0",
|
|
78
78
|
"yargs": "^15.4.1"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "345916a2f99a5b4015f1415f26335d003d404715"
|
|
81
81
|
}
|
package/src/utils/code-utils.ts
CHANGED
|
@@ -328,6 +328,11 @@ export function replaceImports(
|
|
|
328
328
|
stmt.source.value = realPath;
|
|
329
329
|
} else if (type === "codeComponent") {
|
|
330
330
|
const meta = fixImportContext.codeComponentMetas[uuid];
|
|
331
|
+
if (!meta.componentImportPath) {
|
|
332
|
+
throw new HandledError(
|
|
333
|
+
`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
|
+
);
|
|
335
|
+
}
|
|
331
336
|
if (meta.componentImportPath[0] === ".") {
|
|
332
337
|
// Relative path from the project root
|
|
333
338
|
const toPath = path.join(context.rootDir, meta.componentImportPath);
|