@uniformdev/cli 19.196.1-alpha.8 → 19.197.1-alpha.1
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/index.mjs +177 -11
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -5139,8 +5139,50 @@ var PatternModule = {
|
|
|
5139
5139
|
// src/commands/canvas/commands/previewUrl.ts
|
|
5140
5140
|
import yargs14 from "yargs";
|
|
5141
5141
|
|
|
5142
|
-
// src/commands/canvas/commands/previewUrl/
|
|
5142
|
+
// src/commands/canvas/commands/previewUrl/get.ts
|
|
5143
5143
|
import { PreviewClient } from "@uniformdev/canvas";
|
|
5144
|
+
var PreviewUrlGetModule = {
|
|
5145
|
+
command: "get <id>",
|
|
5146
|
+
describe: "Fetch a preview URL",
|
|
5147
|
+
builder: (yargs38) => withConfiguration(
|
|
5148
|
+
withFormatOptions(
|
|
5149
|
+
withApiOptions(
|
|
5150
|
+
withProjectOptions(
|
|
5151
|
+
yargs38.positional("id", { demandOption: true, describe: "Preview URL UUID to fetch" })
|
|
5152
|
+
)
|
|
5153
|
+
)
|
|
5154
|
+
)
|
|
5155
|
+
),
|
|
5156
|
+
handler: async ({ apiHost, apiKey, proxy, id, format, project: projectId, filename }) => {
|
|
5157
|
+
const fetch3 = nodeFetchProxy(proxy);
|
|
5158
|
+
const client = new PreviewClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5159
|
+
const previewUrl = await client.getPreviewUrl({ id });
|
|
5160
|
+
if (!previewUrl) {
|
|
5161
|
+
console.error("Preview URL did not exist");
|
|
5162
|
+
process.exit(1);
|
|
5163
|
+
} else {
|
|
5164
|
+
emitWithFormat(previewUrl, format, filename);
|
|
5165
|
+
}
|
|
5166
|
+
}
|
|
5167
|
+
};
|
|
5168
|
+
|
|
5169
|
+
// src/commands/canvas/commands/previewUrl/list.ts
|
|
5170
|
+
import { PreviewClient as PreviewClient2 } from "@uniformdev/canvas";
|
|
5171
|
+
var PreviewUrlListModule = {
|
|
5172
|
+
command: "list",
|
|
5173
|
+
describe: "List preview URLs",
|
|
5174
|
+
aliases: ["ls"],
|
|
5175
|
+
builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38.options({}))))),
|
|
5176
|
+
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
5177
|
+
const fetch3 = nodeFetchProxy(proxy);
|
|
5178
|
+
const client = new PreviewClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5179
|
+
const res = await client.getPreviewUrls();
|
|
5180
|
+
emitWithFormat(res.previewUrls, format, filename);
|
|
5181
|
+
}
|
|
5182
|
+
};
|
|
5183
|
+
|
|
5184
|
+
// src/commands/canvas/commands/previewUrl/pull.ts
|
|
5185
|
+
import { PreviewClient as PreviewClient3 } from "@uniformdev/canvas";
|
|
5144
5186
|
|
|
5145
5187
|
// src/commands/canvas/commands/previewUrl/_util.ts
|
|
5146
5188
|
var selectIdentifier5 = (previewUrl) => previewUrl.id;
|
|
@@ -5220,7 +5262,7 @@ var PreviewUrlPullModule = {
|
|
|
5220
5262
|
allowEmptySource
|
|
5221
5263
|
}) => {
|
|
5222
5264
|
const fetch3 = nodeFetchProxy(proxy);
|
|
5223
|
-
const client = new
|
|
5265
|
+
const client = new PreviewClient3({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5224
5266
|
const source = createPreviewUrlEngineDataSource({ client });
|
|
5225
5267
|
let target;
|
|
5226
5268
|
const isPackage = isPathAPackageFile(directory);
|
|
@@ -5256,7 +5298,7 @@ var PreviewUrlPullModule = {
|
|
|
5256
5298
|
};
|
|
5257
5299
|
|
|
5258
5300
|
// src/commands/canvas/commands/previewUrl/push.ts
|
|
5259
|
-
import { PreviewClient as
|
|
5301
|
+
import { PreviewClient as PreviewClient4 } from "@uniformdev/canvas";
|
|
5260
5302
|
var PreviewUrlPushModule = {
|
|
5261
5303
|
command: "push <directory>",
|
|
5262
5304
|
describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
|
|
@@ -5295,7 +5337,7 @@ var PreviewUrlPushModule = {
|
|
|
5295
5337
|
allowEmptySource
|
|
5296
5338
|
}) => {
|
|
5297
5339
|
const fetch3 = nodeFetchProxy(proxy);
|
|
5298
|
-
const client = new
|
|
5340
|
+
const client = new PreviewClient4({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5299
5341
|
let source;
|
|
5300
5342
|
const isPackage = isPathAPackageFile(directory);
|
|
5301
5343
|
if (isPackage) {
|
|
@@ -5325,12 +5367,53 @@ var PreviewUrlPushModule = {
|
|
|
5325
5367
|
}
|
|
5326
5368
|
};
|
|
5327
5369
|
|
|
5370
|
+
// src/commands/canvas/commands/previewUrl/remove.ts
|
|
5371
|
+
import { PreviewClient as PreviewClient5 } from "@uniformdev/canvas";
|
|
5372
|
+
var PreviewUrlRemoveModule = {
|
|
5373
|
+
command: "remove <id>",
|
|
5374
|
+
aliases: ["delete", "rm"],
|
|
5375
|
+
describe: "Delete a preview URL",
|
|
5376
|
+
builder: (yargs38) => withConfiguration(
|
|
5377
|
+
withApiOptions(
|
|
5378
|
+
withProjectOptions(
|
|
5379
|
+
yargs38.positional("id", { demandOption: true, describe: "Preview URL UUID to delete" })
|
|
5380
|
+
)
|
|
5381
|
+
)
|
|
5382
|
+
),
|
|
5383
|
+
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
5384
|
+
const fetch3 = nodeFetchProxy(proxy);
|
|
5385
|
+
const client = new PreviewClient5({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5386
|
+
await client.deletePreviewUrl({ id });
|
|
5387
|
+
}
|
|
5388
|
+
};
|
|
5389
|
+
|
|
5390
|
+
// src/commands/canvas/commands/previewUrl/update.ts
|
|
5391
|
+
import { PreviewClient as PreviewClient6 } from "@uniformdev/canvas";
|
|
5392
|
+
var PreviewUrlUpdateModule = {
|
|
5393
|
+
command: "update <filename>",
|
|
5394
|
+
aliases: ["put"],
|
|
5395
|
+
describe: "Insert or update a preview URL",
|
|
5396
|
+
builder: (yargs38) => withConfiguration(
|
|
5397
|
+
withApiOptions(
|
|
5398
|
+
withProjectOptions(
|
|
5399
|
+
yargs38.positional("filename", { demandOption: true, describe: "Category file to put" })
|
|
5400
|
+
)
|
|
5401
|
+
)
|
|
5402
|
+
),
|
|
5403
|
+
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
5404
|
+
const fetch3 = nodeFetchProxy(proxy);
|
|
5405
|
+
const client = new PreviewClient6({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5406
|
+
const file = readFileToObject(filename);
|
|
5407
|
+
await client.upsertPreviewUrl(file);
|
|
5408
|
+
}
|
|
5409
|
+
};
|
|
5410
|
+
|
|
5328
5411
|
// src/commands/canvas/commands/previewUrl.ts
|
|
5329
5412
|
var PreviewUrlModule = {
|
|
5330
5413
|
command: "preview-url <command>",
|
|
5331
5414
|
aliases: ["pu"],
|
|
5332
5415
|
describe: "Commands for Canvas preview urls",
|
|
5333
|
-
builder: (yargs38) => yargs38.command(PreviewUrlPullModule).command(PreviewUrlPushModule).demandCommand(),
|
|
5416
|
+
builder: (yargs38) => yargs38.command(PreviewUrlPullModule).command(PreviewUrlPushModule).command(PreviewUrlGetModule).command(PreviewUrlRemoveModule).command(PreviewUrlListModule).command(PreviewUrlUpdateModule).demandCommand(),
|
|
5334
5417
|
handler: () => {
|
|
5335
5418
|
yargs14.help();
|
|
5336
5419
|
}
|
|
@@ -5339,8 +5422,50 @@ var PreviewUrlModule = {
|
|
|
5339
5422
|
// src/commands/canvas/commands/previewViewport.ts
|
|
5340
5423
|
import yargs15 from "yargs";
|
|
5341
5424
|
|
|
5425
|
+
// src/commands/canvas/commands/previewViewport/get.ts
|
|
5426
|
+
import { PreviewClient as PreviewClient7 } from "@uniformdev/canvas";
|
|
5427
|
+
var PreviewViewportGetModule = {
|
|
5428
|
+
command: "get <id>",
|
|
5429
|
+
describe: "Fetch a preview viewport",
|
|
5430
|
+
builder: (yargs38) => withConfiguration(
|
|
5431
|
+
withFormatOptions(
|
|
5432
|
+
withApiOptions(
|
|
5433
|
+
withProjectOptions(
|
|
5434
|
+
yargs38.positional("id", { demandOption: true, describe: "Preview viewport UUID to fetch" })
|
|
5435
|
+
)
|
|
5436
|
+
)
|
|
5437
|
+
)
|
|
5438
|
+
),
|
|
5439
|
+
handler: async ({ apiHost, apiKey, proxy, id, format, project: projectId, filename }) => {
|
|
5440
|
+
const fetch3 = nodeFetchProxy(proxy);
|
|
5441
|
+
const client = new PreviewClient7({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5442
|
+
const previewViewport = await client.getPreviewViewport({ id });
|
|
5443
|
+
if (!previewViewport) {
|
|
5444
|
+
console.error("Preview viewport did not exist");
|
|
5445
|
+
process.exit(1);
|
|
5446
|
+
} else {
|
|
5447
|
+
emitWithFormat(previewViewport, format, filename);
|
|
5448
|
+
}
|
|
5449
|
+
}
|
|
5450
|
+
};
|
|
5451
|
+
|
|
5452
|
+
// src/commands/canvas/commands/previewViewport/list.ts
|
|
5453
|
+
import { PreviewClient as PreviewClient8 } from "@uniformdev/canvas";
|
|
5454
|
+
var PreviewViewportListModule = {
|
|
5455
|
+
command: "list",
|
|
5456
|
+
describe: "List preview viewports",
|
|
5457
|
+
aliases: ["ls"],
|
|
5458
|
+
builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38.options({}))))),
|
|
5459
|
+
handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
|
|
5460
|
+
const fetch3 = nodeFetchProxy(proxy);
|
|
5461
|
+
const client = new PreviewClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5462
|
+
const res = await client.getPreviewViewports();
|
|
5463
|
+
emitWithFormat(res.previewViewports, format, filename);
|
|
5464
|
+
}
|
|
5465
|
+
};
|
|
5466
|
+
|
|
5342
5467
|
// src/commands/canvas/commands/previewViewport/pull.ts
|
|
5343
|
-
import { PreviewClient as
|
|
5468
|
+
import { PreviewClient as PreviewClient9 } from "@uniformdev/canvas";
|
|
5344
5469
|
|
|
5345
5470
|
// src/commands/canvas/commands/previewViewport/_util.ts
|
|
5346
5471
|
var selectIdentifier6 = (previewViewport) => previewViewport.id;
|
|
@@ -5420,7 +5545,7 @@ var PreviewViewportPullModule = {
|
|
|
5420
5545
|
allowEmptySource
|
|
5421
5546
|
}) => {
|
|
5422
5547
|
const fetch3 = nodeFetchProxy(proxy);
|
|
5423
|
-
const client = new
|
|
5548
|
+
const client = new PreviewClient9({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5424
5549
|
const source = createPreviewViewportEngineDataSource({ client });
|
|
5425
5550
|
let target;
|
|
5426
5551
|
const isPackage = isPathAPackageFile(directory);
|
|
@@ -5456,7 +5581,7 @@ var PreviewViewportPullModule = {
|
|
|
5456
5581
|
};
|
|
5457
5582
|
|
|
5458
5583
|
// src/commands/canvas/commands/previewViewport/push.ts
|
|
5459
|
-
import { PreviewClient as
|
|
5584
|
+
import { PreviewClient as PreviewClient10 } from "@uniformdev/canvas";
|
|
5460
5585
|
var PreviewViewportPushModule = {
|
|
5461
5586
|
command: "push <directory>",
|
|
5462
5587
|
describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
|
|
@@ -5495,7 +5620,7 @@ var PreviewViewportPushModule = {
|
|
|
5495
5620
|
allowEmptySource
|
|
5496
5621
|
}) => {
|
|
5497
5622
|
const fetch3 = nodeFetchProxy(proxy);
|
|
5498
|
-
const client = new
|
|
5623
|
+
const client = new PreviewClient10({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5499
5624
|
let source;
|
|
5500
5625
|
const isPackage = isPathAPackageFile(directory);
|
|
5501
5626
|
if (isPackage) {
|
|
@@ -5525,12 +5650,53 @@ var PreviewViewportPushModule = {
|
|
|
5525
5650
|
}
|
|
5526
5651
|
};
|
|
5527
5652
|
|
|
5653
|
+
// src/commands/canvas/commands/previewViewport/remove.ts
|
|
5654
|
+
import { PreviewClient as PreviewClient11 } from "@uniformdev/canvas";
|
|
5655
|
+
var PreviewViewportRemoveModule = {
|
|
5656
|
+
command: "remove <id>",
|
|
5657
|
+
aliases: ["delete", "rm"],
|
|
5658
|
+
describe: "Delete a preview viewport",
|
|
5659
|
+
builder: (yargs38) => withConfiguration(
|
|
5660
|
+
withApiOptions(
|
|
5661
|
+
withProjectOptions(
|
|
5662
|
+
yargs38.positional("id", { demandOption: true, describe: "Preview viewport UUID to delete" })
|
|
5663
|
+
)
|
|
5664
|
+
)
|
|
5665
|
+
),
|
|
5666
|
+
handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
|
|
5667
|
+
const fetch3 = nodeFetchProxy(proxy);
|
|
5668
|
+
const client = new PreviewClient11({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5669
|
+
await client.deletePreviewViewport({ id });
|
|
5670
|
+
}
|
|
5671
|
+
};
|
|
5672
|
+
|
|
5673
|
+
// src/commands/canvas/commands/previewViewport/update.ts
|
|
5674
|
+
import { PreviewClient as PreviewClient12 } from "@uniformdev/canvas";
|
|
5675
|
+
var PreviewViewportUpdateModule = {
|
|
5676
|
+
command: "update <filename>",
|
|
5677
|
+
aliases: ["put"],
|
|
5678
|
+
describe: "Insert or update a preview viewport",
|
|
5679
|
+
builder: (yargs38) => withConfiguration(
|
|
5680
|
+
withApiOptions(
|
|
5681
|
+
withProjectOptions(
|
|
5682
|
+
yargs38.positional("filename", { demandOption: true, describe: "Preview viewport file to put" })
|
|
5683
|
+
)
|
|
5684
|
+
)
|
|
5685
|
+
),
|
|
5686
|
+
handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
|
|
5687
|
+
const fetch3 = nodeFetchProxy(proxy);
|
|
5688
|
+
const client = new PreviewClient12({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
5689
|
+
const file = readFileToObject(filename);
|
|
5690
|
+
await client.upsertPreviewViewport(file);
|
|
5691
|
+
}
|
|
5692
|
+
};
|
|
5693
|
+
|
|
5528
5694
|
// src/commands/canvas/commands/previewViewport.ts
|
|
5529
5695
|
var PreviewViewportModule = {
|
|
5530
5696
|
command: "preview-viewport <command>",
|
|
5531
5697
|
aliases: ["pv"],
|
|
5532
5698
|
describe: "Commands for Canvas preview viewports",
|
|
5533
|
-
builder: (yargs38) => yargs38.command(PreviewViewportPullModule).command(PreviewViewportPushModule).demandCommand(),
|
|
5699
|
+
builder: (yargs38) => yargs38.command(PreviewViewportPullModule).command(PreviewViewportPushModule).command(PreviewViewportGetModule).command(PreviewViewportRemoveModule).command(PreviewViewportListModule).command(PreviewViewportUpdateModule).demandCommand(),
|
|
5534
5700
|
handler: () => {
|
|
5535
5701
|
yargs15.help();
|
|
5536
5702
|
}
|
|
@@ -7963,7 +8129,7 @@ import { PostHog } from "posthog-node";
|
|
|
7963
8129
|
// package.json
|
|
7964
8130
|
var package_default = {
|
|
7965
8131
|
name: "@uniformdev/cli",
|
|
7966
|
-
version: "19.
|
|
8132
|
+
version: "19.197.0",
|
|
7967
8133
|
description: "Uniform command line interface tool",
|
|
7968
8134
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
7969
8135
|
main: "./cli.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.197.1-alpha.1+121ba80f7d",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@thi.ng/mime": "^2.2.23",
|
|
30
|
-
"@uniformdev/assets": "19.
|
|
31
|
-
"@uniformdev/canvas": "19.
|
|
32
|
-
"@uniformdev/context": "19.
|
|
33
|
-
"@uniformdev/files": "19.
|
|
34
|
-
"@uniformdev/project-map": "19.
|
|
35
|
-
"@uniformdev/redirect": "19.
|
|
30
|
+
"@uniformdev/assets": "19.197.1-alpha.1+121ba80f7d",
|
|
31
|
+
"@uniformdev/canvas": "19.197.1-alpha.1+121ba80f7d",
|
|
32
|
+
"@uniformdev/context": "19.197.1-alpha.1+121ba80f7d",
|
|
33
|
+
"@uniformdev/files": "19.197.1-alpha.1+121ba80f7d",
|
|
34
|
+
"@uniformdev/project-map": "19.197.1-alpha.1+121ba80f7d",
|
|
35
|
+
"@uniformdev/redirect": "19.197.1-alpha.1+121ba80f7d",
|
|
36
36
|
"call-bind": "^1.0.2",
|
|
37
37
|
"colorette": "2.0.20",
|
|
38
38
|
"cosmiconfig": "9.0.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "121ba80f7deb449ef8cb6ef74c6088f9e2d89112"
|
|
82
82
|
}
|