@plasmicapp/cli 0.1.351 → 0.1.352
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 +1 -1
- package/dist/index.js +14 -14
- package/dist/lib.js +14 -14
- package/package.json +2 -2
- package/src/api.ts +14 -14
package/dist/api.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -491652,7 +491652,7 @@ var PlasmicApi = class {
|
|
|
491652
491652
|
}
|
|
491653
491653
|
async genStyleConfig(styleOpts) {
|
|
491654
491654
|
const result = await this.post(
|
|
491655
|
-
`${this.
|
|
491655
|
+
`${this.apiHost}/api/v1/code/style-config`,
|
|
491656
491656
|
styleOpts
|
|
491657
491657
|
);
|
|
491658
491658
|
return result.data;
|
|
@@ -491668,7 +491668,7 @@ var PlasmicApi = class {
|
|
|
491668
491668
|
*/
|
|
491669
491669
|
async resolveSync(projects, recursive) {
|
|
491670
491670
|
const resp = await this.post(
|
|
491671
|
-
`${this.
|
|
491671
|
+
`${this.apiHost}/api/v1/code/resolve-sync`,
|
|
491672
491672
|
{
|
|
491673
491673
|
projects,
|
|
491674
491674
|
recursive
|
|
@@ -491684,14 +491684,14 @@ var PlasmicApi = class {
|
|
|
491684
491684
|
}
|
|
491685
491685
|
async requiredPackages() {
|
|
491686
491686
|
const resp = await this.post(
|
|
491687
|
-
`${this.
|
|
491687
|
+
`${this.apiHost}/api/v1/code/required-packages`
|
|
491688
491688
|
);
|
|
491689
491689
|
return { ...resp.data };
|
|
491690
491690
|
}
|
|
491691
491691
|
async latestCodegenVersion() {
|
|
491692
491692
|
if (!this.codegenVersion) {
|
|
491693
491693
|
const resp = await this.post(
|
|
491694
|
-
`${this.
|
|
491694
|
+
`${this.apiHost}/api/v1/code/latest-codegen-version`
|
|
491695
491695
|
);
|
|
491696
491696
|
this.codegenVersion = resp.data;
|
|
491697
491697
|
}
|
|
@@ -491712,7 +491712,7 @@ var PlasmicApi = class {
|
|
|
491712
491712
|
*/
|
|
491713
491713
|
async projectComponents(projectId, branchName, opts) {
|
|
491714
491714
|
const result = await this.post(
|
|
491715
|
-
`${this.
|
|
491715
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/components?branchName=${branchName}`,
|
|
491716
491716
|
{
|
|
491717
491717
|
...opts
|
|
491718
491718
|
}
|
|
@@ -491726,7 +491726,7 @@ var PlasmicApi = class {
|
|
|
491726
491726
|
*/
|
|
491727
491727
|
async exportProject(projectId, branchName, opts) {
|
|
491728
491728
|
const result = await this.post(
|
|
491729
|
-
`${this.
|
|
491729
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/components?branchName=${branchName}&export=true`,
|
|
491730
491730
|
{
|
|
491731
491731
|
...opts
|
|
491732
491732
|
}
|
|
@@ -491735,7 +491735,7 @@ var PlasmicApi = class {
|
|
|
491735
491735
|
}
|
|
491736
491736
|
async projectMeta(projectId) {
|
|
491737
491737
|
const result = await this.post(
|
|
491738
|
-
`${this.
|
|
491738
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/meta`
|
|
491739
491739
|
);
|
|
491740
491740
|
return result.data;
|
|
491741
491741
|
}
|
|
@@ -491751,7 +491751,7 @@ var PlasmicApi = class {
|
|
|
491751
491751
|
].filter((x7) => !!x7)
|
|
491752
491752
|
);
|
|
491753
491753
|
const result = await this.get(
|
|
491754
|
-
`${this.
|
|
491754
|
+
`${this.apiHost}/api/v1/localization/gen-texts?${params.toString()}`,
|
|
491755
491755
|
void 0,
|
|
491756
491756
|
{
|
|
491757
491757
|
"x-plasmic-api-project-tokens": projectIdsAndTokens.map(
|
|
@@ -491763,7 +491763,7 @@ var PlasmicApi = class {
|
|
|
491763
491763
|
}
|
|
491764
491764
|
async uploadBundle(projectId, bundleName, bundleJs, css, metaJson, genModulePath, genCssPaths, pkgVersion, extraPropMetaJson, themeProviderWrapper, themeModule) {
|
|
491765
491765
|
const result = await this.post(
|
|
491766
|
-
`${this.
|
|
491766
|
+
`${this.apiHost}/api/v1/projects/${projectId}/jsbundle/upload`,
|
|
491767
491767
|
{
|
|
491768
491768
|
projectId,
|
|
491769
491769
|
bundleName,
|
|
@@ -491782,14 +491782,14 @@ var PlasmicApi = class {
|
|
|
491782
491782
|
}
|
|
491783
491783
|
async projectStyleTokens(projectId, branchName, versionRange) {
|
|
491784
491784
|
const result = await this.post(
|
|
491785
|
-
`${this.
|
|
491785
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/tokens?branchName=${branchName}`,
|
|
491786
491786
|
{ versionRange }
|
|
491787
491787
|
);
|
|
491788
491788
|
return result.data;
|
|
491789
491789
|
}
|
|
491790
491790
|
async projectIcons(projectId, branchName, versionRange, iconIds) {
|
|
491791
491791
|
const result = await this.post(
|
|
491792
|
-
`${this.
|
|
491792
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/icons?branchName=${branchName}`,
|
|
491793
491793
|
{ versionRange, iconIds }
|
|
491794
491794
|
);
|
|
491795
491795
|
return result.data;
|
|
@@ -491884,11 +491884,11 @@ var PlasmicApi = class {
|
|
|
491884
491884
|
get studioHost() {
|
|
491885
491885
|
return this.auth.host;
|
|
491886
491886
|
}
|
|
491887
|
-
get
|
|
491887
|
+
get apiHost() {
|
|
491888
491888
|
if (!this.auth.host || this.auth.host === DEFAULT_HOST) {
|
|
491889
|
-
return "https://codegen.plasmic.app";
|
|
491889
|
+
return "https://codegen-origin.plasmic.app";
|
|
491890
491890
|
} else if (this.auth.host === "https://studio.dev.plasmic.app") {
|
|
491891
|
-
return "https://codegen.dev.plasmic.app";
|
|
491891
|
+
return "https://codegen-origin.dev.plasmic.app";
|
|
491892
491892
|
} else {
|
|
491893
491893
|
return this.auth.host;
|
|
491894
491894
|
}
|
package/dist/lib.js
CHANGED
|
@@ -486958,7 +486958,7 @@ var PlasmicApi = class {
|
|
|
486958
486958
|
}
|
|
486959
486959
|
async genStyleConfig(styleOpts) {
|
|
486960
486960
|
const result = await this.post(
|
|
486961
|
-
`${this.
|
|
486961
|
+
`${this.apiHost}/api/v1/code/style-config`,
|
|
486962
486962
|
styleOpts
|
|
486963
486963
|
);
|
|
486964
486964
|
return result.data;
|
|
@@ -486974,7 +486974,7 @@ var PlasmicApi = class {
|
|
|
486974
486974
|
*/
|
|
486975
486975
|
async resolveSync(projects, recursive) {
|
|
486976
486976
|
const resp = await this.post(
|
|
486977
|
-
`${this.
|
|
486977
|
+
`${this.apiHost}/api/v1/code/resolve-sync`,
|
|
486978
486978
|
{
|
|
486979
486979
|
projects,
|
|
486980
486980
|
recursive
|
|
@@ -486990,14 +486990,14 @@ var PlasmicApi = class {
|
|
|
486990
486990
|
}
|
|
486991
486991
|
async requiredPackages() {
|
|
486992
486992
|
const resp = await this.post(
|
|
486993
|
-
`${this.
|
|
486993
|
+
`${this.apiHost}/api/v1/code/required-packages`
|
|
486994
486994
|
);
|
|
486995
486995
|
return { ...resp.data };
|
|
486996
486996
|
}
|
|
486997
486997
|
async latestCodegenVersion() {
|
|
486998
486998
|
if (!this.codegenVersion) {
|
|
486999
486999
|
const resp = await this.post(
|
|
487000
|
-
`${this.
|
|
487000
|
+
`${this.apiHost}/api/v1/code/latest-codegen-version`
|
|
487001
487001
|
);
|
|
487002
487002
|
this.codegenVersion = resp.data;
|
|
487003
487003
|
}
|
|
@@ -487018,7 +487018,7 @@ var PlasmicApi = class {
|
|
|
487018
487018
|
*/
|
|
487019
487019
|
async projectComponents(projectId, branchName, opts) {
|
|
487020
487020
|
const result = await this.post(
|
|
487021
|
-
`${this.
|
|
487021
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/components?branchName=${branchName}`,
|
|
487022
487022
|
{
|
|
487023
487023
|
...opts
|
|
487024
487024
|
}
|
|
@@ -487032,7 +487032,7 @@ var PlasmicApi = class {
|
|
|
487032
487032
|
*/
|
|
487033
487033
|
async exportProject(projectId, branchName, opts) {
|
|
487034
487034
|
const result = await this.post(
|
|
487035
|
-
`${this.
|
|
487035
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/components?branchName=${branchName}&export=true`,
|
|
487036
487036
|
{
|
|
487037
487037
|
...opts
|
|
487038
487038
|
}
|
|
@@ -487041,7 +487041,7 @@ var PlasmicApi = class {
|
|
|
487041
487041
|
}
|
|
487042
487042
|
async projectMeta(projectId) {
|
|
487043
487043
|
const result = await this.post(
|
|
487044
|
-
`${this.
|
|
487044
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/meta`
|
|
487045
487045
|
);
|
|
487046
487046
|
return result.data;
|
|
487047
487047
|
}
|
|
@@ -487057,7 +487057,7 @@ var PlasmicApi = class {
|
|
|
487057
487057
|
].filter((x7) => !!x7)
|
|
487058
487058
|
);
|
|
487059
487059
|
const result = await this.get(
|
|
487060
|
-
`${this.
|
|
487060
|
+
`${this.apiHost}/api/v1/localization/gen-texts?${params.toString()}`,
|
|
487061
487061
|
void 0,
|
|
487062
487062
|
{
|
|
487063
487063
|
"x-plasmic-api-project-tokens": projectIdsAndTokens.map(
|
|
@@ -487069,7 +487069,7 @@ var PlasmicApi = class {
|
|
|
487069
487069
|
}
|
|
487070
487070
|
async uploadBundle(projectId, bundleName, bundleJs, css, metaJson, genModulePath, genCssPaths, pkgVersion, extraPropMetaJson, themeProviderWrapper, themeModule) {
|
|
487071
487071
|
const result = await this.post(
|
|
487072
|
-
`${this.
|
|
487072
|
+
`${this.apiHost}/api/v1/projects/${projectId}/jsbundle/upload`,
|
|
487073
487073
|
{
|
|
487074
487074
|
projectId,
|
|
487075
487075
|
bundleName,
|
|
@@ -487088,14 +487088,14 @@ var PlasmicApi = class {
|
|
|
487088
487088
|
}
|
|
487089
487089
|
async projectStyleTokens(projectId, branchName, versionRange) {
|
|
487090
487090
|
const result = await this.post(
|
|
487091
|
-
`${this.
|
|
487091
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/tokens?branchName=${branchName}`,
|
|
487092
487092
|
{ versionRange }
|
|
487093
487093
|
);
|
|
487094
487094
|
return result.data;
|
|
487095
487095
|
}
|
|
487096
487096
|
async projectIcons(projectId, branchName, versionRange, iconIds) {
|
|
487097
487097
|
const result = await this.post(
|
|
487098
|
-
`${this.
|
|
487098
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/icons?branchName=${branchName}`,
|
|
487099
487099
|
{ versionRange, iconIds }
|
|
487100
487100
|
);
|
|
487101
487101
|
return result.data;
|
|
@@ -487190,11 +487190,11 @@ var PlasmicApi = class {
|
|
|
487190
487190
|
get studioHost() {
|
|
487191
487191
|
return this.auth.host;
|
|
487192
487192
|
}
|
|
487193
|
-
get
|
|
487193
|
+
get apiHost() {
|
|
487194
487194
|
if (!this.auth.host || this.auth.host === DEFAULT_HOST) {
|
|
487195
|
-
return "https://codegen.plasmic.app";
|
|
487195
|
+
return "https://codegen-origin.plasmic.app";
|
|
487196
487196
|
} else if (this.auth.host === "https://studio.dev.plasmic.app") {
|
|
487197
|
-
return "https://codegen.dev.plasmic.app";
|
|
487197
|
+
return "https://codegen-origin.dev.plasmic.app";
|
|
487198
487198
|
} else {
|
|
487199
487199
|
return this.auth.host;
|
|
487200
487200
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.352",
|
|
4
4
|
"description": "plasmic cli for syncing local code with Plasmic designs",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=12"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"wrap-ansi": "^7.0.0",
|
|
83
83
|
"yargs": "^15.4.1"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "e119d6893fc609dae5b89e4ba9f26403a83aad75"
|
|
86
86
|
}
|
package/src/api.ts
CHANGED
|
@@ -243,7 +243,7 @@ export class PlasmicApi {
|
|
|
243
243
|
|
|
244
244
|
async genStyleConfig(styleOpts?: StyleConfig): Promise<StyleConfigResponse> {
|
|
245
245
|
const result = await this.post(
|
|
246
|
-
`${this.
|
|
246
|
+
`${this.apiHost}/api/v1/code/style-config`,
|
|
247
247
|
styleOpts
|
|
248
248
|
);
|
|
249
249
|
return result.data as StyleConfigResponse;
|
|
@@ -269,7 +269,7 @@ export class PlasmicApi {
|
|
|
269
269
|
recursive?: boolean
|
|
270
270
|
): Promise<VersionResolution> {
|
|
271
271
|
const resp: any = await this.post(
|
|
272
|
-
`${this.
|
|
272
|
+
`${this.apiHost}/api/v1/code/resolve-sync`,
|
|
273
273
|
{
|
|
274
274
|
projects,
|
|
275
275
|
recursive,
|
|
@@ -287,7 +287,7 @@ export class PlasmicApi {
|
|
|
287
287
|
|
|
288
288
|
async requiredPackages(): Promise<RequiredPackages> {
|
|
289
289
|
const resp = await this.post(
|
|
290
|
-
`${this.
|
|
290
|
+
`${this.apiHost}/api/v1/code/required-packages`
|
|
291
291
|
);
|
|
292
292
|
return { ...resp.data } as RequiredPackages;
|
|
293
293
|
}
|
|
@@ -295,7 +295,7 @@ export class PlasmicApi {
|
|
|
295
295
|
async latestCodegenVersion(): Promise<string> {
|
|
296
296
|
if (!this.codegenVersion) {
|
|
297
297
|
const resp = await this.post(
|
|
298
|
-
`${this.
|
|
298
|
+
`${this.apiHost}/api/v1/code/latest-codegen-version`
|
|
299
299
|
);
|
|
300
300
|
this.codegenVersion = resp.data as string;
|
|
301
301
|
}
|
|
@@ -339,7 +339,7 @@ export class PlasmicApi {
|
|
|
339
339
|
}
|
|
340
340
|
): Promise<ProjectBundle> {
|
|
341
341
|
const result = await this.post(
|
|
342
|
-
`${this.
|
|
342
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/components?branchName=${branchName}`,
|
|
343
343
|
{
|
|
344
344
|
...opts,
|
|
345
345
|
}
|
|
@@ -372,7 +372,7 @@ export class PlasmicApi {
|
|
|
372
372
|
}
|
|
373
373
|
): Promise<ProjectBundle> {
|
|
374
374
|
const result = await this.post(
|
|
375
|
-
`${this.
|
|
375
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/components?branchName=${branchName}&export=true`,
|
|
376
376
|
{
|
|
377
377
|
...opts,
|
|
378
378
|
}
|
|
@@ -382,7 +382,7 @@ export class PlasmicApi {
|
|
|
382
382
|
|
|
383
383
|
async projectMeta(projectId: string) {
|
|
384
384
|
const result = await this.post(
|
|
385
|
-
`${this.
|
|
385
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/meta`
|
|
386
386
|
);
|
|
387
387
|
return result.data as ProjectMetaInfo;
|
|
388
388
|
}
|
|
@@ -406,7 +406,7 @@ export class PlasmicApi {
|
|
|
406
406
|
].filter((x): x is [string, string] => !!x)
|
|
407
407
|
);
|
|
408
408
|
const result = await this.get(
|
|
409
|
-
`${this.
|
|
409
|
+
`${this.apiHost}/api/v1/localization/gen-texts?${params.toString()}`,
|
|
410
410
|
undefined,
|
|
411
411
|
{
|
|
412
412
|
"x-plasmic-api-project-tokens": projectIdsAndTokens
|
|
@@ -434,7 +434,7 @@ export class PlasmicApi {
|
|
|
434
434
|
themeModule: string | undefined
|
|
435
435
|
): Promise<StyleTokensMap> {
|
|
436
436
|
const result = await this.post(
|
|
437
|
-
`${this.
|
|
437
|
+
`${this.apiHost}/api/v1/projects/${projectId}/jsbundle/upload`,
|
|
438
438
|
{
|
|
439
439
|
projectId,
|
|
440
440
|
bundleName,
|
|
@@ -458,7 +458,7 @@ export class PlasmicApi {
|
|
|
458
458
|
versionRange?: string
|
|
459
459
|
): Promise<StyleTokensMap> {
|
|
460
460
|
const result = await this.post(
|
|
461
|
-
`${this.
|
|
461
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/tokens?branchName=${branchName}`,
|
|
462
462
|
{ versionRange }
|
|
463
463
|
);
|
|
464
464
|
return result.data as StyleTokensMap;
|
|
@@ -471,7 +471,7 @@ export class PlasmicApi {
|
|
|
471
471
|
iconIds?: string[]
|
|
472
472
|
): Promise<ProjectIconsResponse> {
|
|
473
473
|
const result = await this.post(
|
|
474
|
-
`${this.
|
|
474
|
+
`${this.apiHost}/api/v1/projects/${projectId}/code/icons?branchName=${branchName}`,
|
|
475
475
|
{ versionRange, iconIds }
|
|
476
476
|
);
|
|
477
477
|
return result.data as ProjectIconsResponse;
|
|
@@ -582,11 +582,11 @@ export class PlasmicApi {
|
|
|
582
582
|
return this.auth.host;
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
private get
|
|
585
|
+
private get apiHost() {
|
|
586
586
|
if (!this.auth.host || this.auth.host === DEFAULT_HOST) {
|
|
587
|
-
return "https://codegen.plasmic.app";
|
|
587
|
+
return "https://codegen-origin.plasmic.app";
|
|
588
588
|
} else if (this.auth.host === "https://studio.dev.plasmic.app") {
|
|
589
|
-
return "https://codegen.dev.plasmic.app";
|
|
589
|
+
return "https://codegen-origin.dev.plasmic.app";
|
|
590
590
|
} else {
|
|
591
591
|
return this.auth.host;
|
|
592
592
|
}
|