@plasmicapp/cli 0.1.325 → 0.1.327
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 +2 -1
- package/dist/index.js +4 -5
- package/dist/lib.js +4 -5
- package/dist/plasmic.schema.json +20 -0
- package/dist/utils/config-utils.d.ts +9 -0
- package/package.json +2 -2
- package/src/actions/sync.ts +1 -0
- package/src/api.ts +2 -0
- package/src/utils/config-utils.ts +11 -0
- package/src/utils/file-utils.ts +1 -3
package/dist/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Socket } from "socket.io-client";
|
|
2
|
-
import { AuthConfig, CodeConfig, CustomFunctionConfig, I18NConfig, ImagesConfig, StyleConfig } from "./utils/config-utils";
|
|
2
|
+
import { AuthConfig, CodeConfig, CustomFunctionConfig, FontConfig, I18NConfig, ImagesConfig, StyleConfig } from "./utils/config-utils";
|
|
3
3
|
import { Metadata } from "./utils/get-context";
|
|
4
4
|
export declare class AppServerError extends Error {
|
|
5
5
|
constructor(message: string);
|
|
@@ -199,6 +199,7 @@ export declare class PlasmicApi {
|
|
|
199
199
|
componentIdOrNames: readonly string[] | undefined;
|
|
200
200
|
version: string;
|
|
201
201
|
imageOpts: ImagesConfig;
|
|
202
|
+
fontOpts?: FontConfig;
|
|
202
203
|
stylesOpts: StyleConfig;
|
|
203
204
|
i18nOpts?: I18NConfig;
|
|
204
205
|
codeOpts: CodeConfig;
|
package/dist/index.js
CHANGED
|
@@ -1645,9 +1645,9 @@ var require_strip_ansi = __commonJS({
|
|
|
1645
1645
|
}
|
|
1646
1646
|
});
|
|
1647
1647
|
|
|
1648
|
-
// ../../node_modules/
|
|
1648
|
+
// ../../node_modules/is-fullwidth-code-point/index.js
|
|
1649
1649
|
var require_is_fullwidth_code_point = __commonJS({
|
|
1650
|
-
"../../node_modules/
|
|
1650
|
+
"../../node_modules/is-fullwidth-code-point/index.js"(exports, module2) {
|
|
1651
1651
|
"use strict";
|
|
1652
1652
|
var isFullwidthCodePoint = (codePoint) => {
|
|
1653
1653
|
if (Number.isNaN(codePoint)) {
|
|
@@ -501347,9 +501347,7 @@ async function writeFileContentRaw(filePath, content, opts) {
|
|
|
501347
501347
|
opts.yes
|
|
501348
501348
|
);
|
|
501349
501349
|
if (!overwrite) {
|
|
501350
|
-
|
|
501351
|
-
`Cannot write to ${filePath}; file already exists.`
|
|
501352
|
-
);
|
|
501350
|
+
return;
|
|
501353
501351
|
}
|
|
501354
501352
|
}
|
|
501355
501353
|
import_fs.default.mkdirSync(import_upath3.default.dirname(filePath), { recursive: true });
|
|
@@ -504840,6 +504838,7 @@ async function syncProject(context, opts, projectIdsAndTokens, projectId, branch
|
|
|
504840
504838
|
componentIdOrNames: componentIds,
|
|
504841
504839
|
version: projectVersion,
|
|
504842
504840
|
imageOpts: context.config.images,
|
|
504841
|
+
fontOpts: context.config.fontOpts,
|
|
504843
504842
|
stylesOpts: context.config.style,
|
|
504844
504843
|
i18nOpts: context.config.i18n,
|
|
504845
504844
|
checksums: existingChecksums,
|
package/dist/lib.js
CHANGED
|
@@ -31488,9 +31488,9 @@ var require_strip_ansi = __commonJS({
|
|
|
31488
31488
|
}
|
|
31489
31489
|
});
|
|
31490
31490
|
|
|
31491
|
-
// ../../node_modules/
|
|
31491
|
+
// ../../node_modules/is-fullwidth-code-point/index.js
|
|
31492
31492
|
var require_is_fullwidth_code_point = __commonJS({
|
|
31493
|
-
"../../node_modules/
|
|
31493
|
+
"../../node_modules/is-fullwidth-code-point/index.js"(exports, module2) {
|
|
31494
31494
|
"use strict";
|
|
31495
31495
|
var isFullwidthCodePoint = (codePoint) => {
|
|
31496
31496
|
if (Number.isNaN(codePoint)) {
|
|
@@ -496689,9 +496689,7 @@ async function writeFileContentRaw(filePath, content, opts) {
|
|
|
496689
496689
|
opts.yes
|
|
496690
496690
|
);
|
|
496691
496691
|
if (!overwrite) {
|
|
496692
|
-
|
|
496693
|
-
`Cannot write to ${filePath}; file already exists.`
|
|
496694
|
-
);
|
|
496692
|
+
return;
|
|
496695
496693
|
}
|
|
496696
496694
|
}
|
|
496697
496695
|
import_fs.default.mkdirSync(import_upath3.default.dirname(filePath), { recursive: true });
|
|
@@ -500138,6 +500136,7 @@ async function syncProject(context, opts, projectIdsAndTokens, projectId, branch
|
|
|
500138
500136
|
componentIdOrNames: componentIds,
|
|
500139
500137
|
version: projectVersion,
|
|
500140
500138
|
imageOpts: context.config.images,
|
|
500139
|
+
fontOpts: context.config.fontOpts,
|
|
500141
500140
|
stylesOpts: context.config.style,
|
|
500142
500141
|
i18nOpts: context.config.i18n,
|
|
500143
500142
|
checksums: existingChecksums,
|
package/dist/plasmic.schema.json
CHANGED
|
@@ -171,6 +171,22 @@
|
|
|
171
171
|
],
|
|
172
172
|
"type": "object"
|
|
173
173
|
},
|
|
174
|
+
"FontConfig": {
|
|
175
|
+
"properties": {
|
|
176
|
+
"scheme": {
|
|
177
|
+
"description": "\"import\" generates `@import url(...)`\n\n\"none\" doesn't generate anything; you need to load the font yourself.",
|
|
178
|
+
"enum": [
|
|
179
|
+
"import",
|
|
180
|
+
"none"
|
|
181
|
+
],
|
|
182
|
+
"type": "string"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"required": [
|
|
186
|
+
"scheme"
|
|
187
|
+
],
|
|
188
|
+
"type": "object"
|
|
189
|
+
},
|
|
174
190
|
"GlobalVariantGroupConfig": {
|
|
175
191
|
"properties": {
|
|
176
192
|
"contextFilePath": {
|
|
@@ -483,6 +499,10 @@
|
|
|
483
499
|
"description": "The default folder where Plasmic-managed files will be stored. These include\nblackbox component files, svg component files, style files, etc. The path\nis relative to the srcDir.",
|
|
484
500
|
"type": "string"
|
|
485
501
|
},
|
|
502
|
+
"fontOpts": {
|
|
503
|
+
"$ref": "#/definitions/FontConfig",
|
|
504
|
+
"description": "Config for fonts import"
|
|
505
|
+
},
|
|
486
506
|
"gatsbyConfig": {
|
|
487
507
|
"description": "Gatsby-specific config",
|
|
488
508
|
"properties": {
|
|
@@ -38,6 +38,8 @@ export interface PlasmicConfig {
|
|
|
38
38
|
code: CodeConfig;
|
|
39
39
|
/** Config for pictures */
|
|
40
40
|
images: ImagesConfig;
|
|
41
|
+
/** Config for fonts import */
|
|
42
|
+
fontOpts?: FontConfig;
|
|
41
43
|
/** Config for style generation */
|
|
42
44
|
style: StyleConfig;
|
|
43
45
|
/** Config for style tokens */
|
|
@@ -221,6 +223,13 @@ export interface ImageConfig {
|
|
|
221
223
|
/** File path for the image file, relative to srcDir */
|
|
222
224
|
filePath: string;
|
|
223
225
|
}
|
|
226
|
+
export interface FontConfig {
|
|
227
|
+
/** "import" generates `@import url(...)`
|
|
228
|
+
*
|
|
229
|
+
* "none" doesn't generate anything; you need to load the font yourself.
|
|
230
|
+
*/
|
|
231
|
+
scheme: "import" | "none";
|
|
232
|
+
}
|
|
224
233
|
export interface GlobalVariantsConfig {
|
|
225
234
|
variantGroups: GlobalVariantGroupConfig[];
|
|
226
235
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.327",
|
|
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": "
|
|
86
|
+
"gitHead": "e511cd49aa20fdbebd8e1c509bce0bd884378888"
|
|
87
87
|
}
|
package/src/actions/sync.ts
CHANGED
|
@@ -560,6 +560,7 @@ async function syncProject(
|
|
|
560
560
|
componentIdOrNames: componentIds,
|
|
561
561
|
version: projectVersion,
|
|
562
562
|
imageOpts: context.config.images,
|
|
563
|
+
fontOpts: context.config.fontOpts,
|
|
563
564
|
stylesOpts: context.config.style,
|
|
564
565
|
i18nOpts: context.config.i18n,
|
|
565
566
|
checksums: existingChecksums,
|
package/src/api.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
CodeConfig,
|
|
6
6
|
CustomFunctionConfig,
|
|
7
7
|
DEFAULT_HOST,
|
|
8
|
+
FontConfig,
|
|
8
9
|
I18NConfig,
|
|
9
10
|
ImagesConfig,
|
|
10
11
|
StyleConfig,
|
|
@@ -285,6 +286,7 @@ export class PlasmicApi {
|
|
|
285
286
|
componentIdOrNames: readonly string[] | undefined;
|
|
286
287
|
version: string;
|
|
287
288
|
imageOpts: ImagesConfig;
|
|
289
|
+
fontOpts?: FontConfig;
|
|
288
290
|
stylesOpts: StyleConfig;
|
|
289
291
|
i18nOpts?: I18NConfig;
|
|
290
292
|
codeOpts: CodeConfig;
|
|
@@ -62,6 +62,9 @@ export interface PlasmicConfig {
|
|
|
62
62
|
/** Config for pictures */
|
|
63
63
|
images: ImagesConfig;
|
|
64
64
|
|
|
65
|
+
/** Config for fonts import */
|
|
66
|
+
fontOpts?: FontConfig;
|
|
67
|
+
|
|
65
68
|
/** Config for style generation */
|
|
66
69
|
style: StyleConfig;
|
|
67
70
|
|
|
@@ -307,6 +310,14 @@ export interface ImageConfig {
|
|
|
307
310
|
filePath: string;
|
|
308
311
|
}
|
|
309
312
|
|
|
313
|
+
export interface FontConfig {
|
|
314
|
+
/** "import" generates `@import url(...)`
|
|
315
|
+
*
|
|
316
|
+
* "none" doesn't generate anything; you need to load the font yourself.
|
|
317
|
+
*/
|
|
318
|
+
scheme: "import" | "none";
|
|
319
|
+
}
|
|
320
|
+
|
|
310
321
|
export interface GlobalVariantsConfig {
|
|
311
322
|
variantGroups: GlobalVariantGroupConfig[];
|
|
312
323
|
}
|