@uniformdev/cli 19.51.0 → 19.53.0
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.d.mts +1 -1
- package/dist/index.mjs +116 -53
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
type SyncMode = 'mirror' | 'createOrUpdate' | 'create';
|
|
3
|
-
type EntityTypes = 'category' | 'dataType' | 'quirk' | 'test' | 'signal' | 'enrichment' | 'aggregate' | 'component' | 'composition' | 'pattern' | 'projectMapDefinition' | 'projectMapNode' | 'redirect';
|
|
3
|
+
type EntityTypes = 'category' | 'dataType' | 'quirk' | 'test' | 'signal' | 'enrichment' | 'aggregate' | 'component' | 'composition' | 'pattern' | 'projectMapDefinition' | 'projectMapNode' | 'redirect' | 'entry' | 'contentType';
|
|
4
4
|
type SyncFileFormat = 'yaml' | 'json';
|
|
5
5
|
type EntityConfiguration = {
|
|
6
6
|
mode?: SyncMode;
|
package/dist/index.mjs
CHANGED
|
@@ -605,6 +605,13 @@ function createSyncEngineConsoleLogger(options) {
|
|
|
605
605
|
);
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
|
+
function createPublishStatusSyncEngineConsoleLogger(options) {
|
|
609
|
+
const { indent, prefix, status } = options ?? {};
|
|
610
|
+
return function syncEngineConsoleLogger({ displayName, whatIf }) {
|
|
611
|
+
const actionTag = status === "publish" ? green("[P]") : yellow("[U]");
|
|
612
|
+
console.log(`${indent ?? ""}${whatIf ? gray("[WHATIF]") : ""}${actionTag}${prefix ?? ""} ${displayName}`);
|
|
613
|
+
};
|
|
614
|
+
}
|
|
608
615
|
|
|
609
616
|
// src/commands/canvas/commands/category/get.ts
|
|
610
617
|
var CategoryGetModule = {
|
|
@@ -765,6 +772,7 @@ var CategoryPullModule = {
|
|
|
765
772
|
target,
|
|
766
773
|
mode,
|
|
767
774
|
whatIf,
|
|
775
|
+
allowEmptySource: true,
|
|
768
776
|
log: createSyncEngineConsoleLogger({ diffMode })
|
|
769
777
|
});
|
|
770
778
|
}
|
|
@@ -1071,6 +1079,7 @@ var ComponentPullModule = {
|
|
|
1071
1079
|
target,
|
|
1072
1080
|
mode,
|
|
1073
1081
|
whatIf,
|
|
1082
|
+
allowEmptySource: true,
|
|
1074
1083
|
log: createSyncEngineConsoleLogger({ diffMode })
|
|
1075
1084
|
});
|
|
1076
1085
|
}
|
|
@@ -1482,7 +1491,6 @@ var CompositionPublishModule = {
|
|
|
1482
1491
|
all,
|
|
1483
1492
|
whatIf,
|
|
1484
1493
|
project: projectId,
|
|
1485
|
-
diff: diffMode,
|
|
1486
1494
|
onlyCompositions,
|
|
1487
1495
|
onlyPatterns
|
|
1488
1496
|
}) => {
|
|
@@ -1513,7 +1521,7 @@ var CompositionPublishModule = {
|
|
|
1513
1521
|
// Publishing is one-direction operation, so no need to support automatic un-publishing
|
|
1514
1522
|
mode: "createOrUpdate",
|
|
1515
1523
|
whatIf,
|
|
1516
|
-
log:
|
|
1524
|
+
log: createPublishStatusSyncEngineConsoleLogger({ status: "publish" })
|
|
1517
1525
|
});
|
|
1518
1526
|
}
|
|
1519
1527
|
};
|
|
@@ -1781,6 +1789,7 @@ var CompositionPullModule = {
|
|
|
1781
1789
|
target,
|
|
1782
1790
|
mode,
|
|
1783
1791
|
whatIf,
|
|
1792
|
+
allowEmptySource: true,
|
|
1784
1793
|
log: createSyncEngineConsoleLogger({ diffMode }),
|
|
1785
1794
|
onBeforeWriteObject: async (sourceObject) => {
|
|
1786
1795
|
return extractAndDownloadUniformFilesForObject(sourceObject, {
|
|
@@ -1951,7 +1960,6 @@ var CompositionUnpublishModule = {
|
|
|
1951
1960
|
onlyCompositions,
|
|
1952
1961
|
onlyPatterns,
|
|
1953
1962
|
project: projectId,
|
|
1954
|
-
diff,
|
|
1955
1963
|
whatIf
|
|
1956
1964
|
}) => {
|
|
1957
1965
|
if (!all && !ids || all && ids) {
|
|
@@ -1977,7 +1985,7 @@ var CompositionUnpublishModule = {
|
|
|
1977
1985
|
onlyPatterns
|
|
1978
1986
|
});
|
|
1979
1987
|
const actions = [];
|
|
1980
|
-
const log =
|
|
1988
|
+
const log = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
|
|
1981
1989
|
for await (const obj of target.objects) {
|
|
1982
1990
|
if (Array.isArray(obj.id)) {
|
|
1983
1991
|
obj.id.forEach((o) => targetItems.set(o, obj));
|
|
@@ -2196,6 +2204,7 @@ var ContentTypePullModule = {
|
|
|
2196
2204
|
target,
|
|
2197
2205
|
mode,
|
|
2198
2206
|
whatIf,
|
|
2207
|
+
allowEmptySource: true,
|
|
2199
2208
|
log: createSyncEngineConsoleLogger({ diffMode })
|
|
2200
2209
|
});
|
|
2201
2210
|
}
|
|
@@ -2384,8 +2393,12 @@ function createDataTypeEngineDataSource({
|
|
|
2384
2393
|
client
|
|
2385
2394
|
}) {
|
|
2386
2395
|
async function* getObjects() {
|
|
2396
|
+
var _a;
|
|
2387
2397
|
const dataTypes = (await client.get()).results;
|
|
2388
2398
|
for await (const dataType of dataTypes) {
|
|
2399
|
+
if (((_a = dataType.custom) == null ? void 0 : _a.uniformAutogenerated) === true) {
|
|
2400
|
+
continue;
|
|
2401
|
+
}
|
|
2389
2402
|
const result = {
|
|
2390
2403
|
id: selectIdentifier4(dataType),
|
|
2391
2404
|
displayName: selectDisplayName4(dataType),
|
|
@@ -2487,6 +2500,7 @@ var DataTypePullModule = {
|
|
|
2487
2500
|
target,
|
|
2488
2501
|
mode,
|
|
2489
2502
|
whatIf,
|
|
2503
|
+
allowEmptySource: true,
|
|
2490
2504
|
log: createSyncEngineConsoleLogger({ diffMode })
|
|
2491
2505
|
});
|
|
2492
2506
|
}
|
|
@@ -2677,7 +2691,12 @@ function createEntryEngineDataSource({
|
|
|
2677
2691
|
}) {
|
|
2678
2692
|
const stateId = convertCompositionState(state);
|
|
2679
2693
|
async function* getObjects() {
|
|
2680
|
-
const { entries } = await client.getEntries({
|
|
2694
|
+
const { entries } = await client.getEntries({
|
|
2695
|
+
offset: 0,
|
|
2696
|
+
limit: 1e3,
|
|
2697
|
+
skipDataResolution: true,
|
|
2698
|
+
state: stateId
|
|
2699
|
+
});
|
|
2681
2700
|
for await (const e of entries) {
|
|
2682
2701
|
const result = {
|
|
2683
2702
|
id: selectEntryIdentifier(e),
|
|
@@ -2781,6 +2800,7 @@ var EntryPullModule = {
|
|
|
2781
2800
|
target,
|
|
2782
2801
|
mode,
|
|
2783
2802
|
whatIf,
|
|
2803
|
+
allowEmptySource: true,
|
|
2784
2804
|
log: createSyncEngineConsoleLogger({ diffMode })
|
|
2785
2805
|
});
|
|
2786
2806
|
}
|
|
@@ -4740,7 +4760,7 @@ import ora from "ora";
|
|
|
4740
4760
|
var makeSpinner = () => {
|
|
4741
4761
|
const spinners = [];
|
|
4742
4762
|
const stopAllSpinners = () => spinners.forEach((spinner) => spinner.stop());
|
|
4743
|
-
const
|
|
4763
|
+
const spin2 = async (text) => {
|
|
4744
4764
|
const spinner = ora(text).start();
|
|
4745
4765
|
spinners.push(spinner);
|
|
4746
4766
|
const minWait = new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
@@ -4749,7 +4769,7 @@ var makeSpinner = () => {
|
|
|
4749
4769
|
spinner.stop();
|
|
4750
4770
|
};
|
|
4751
4771
|
};
|
|
4752
|
-
return { stopAllSpinners, spin };
|
|
4772
|
+
return { stopAllSpinners, spin: spin2 };
|
|
4753
4773
|
};
|
|
4754
4774
|
|
|
4755
4775
|
// src/telemetry/telemetry.ts
|
|
@@ -4759,7 +4779,7 @@ import { PostHog } from "posthog-node";
|
|
|
4759
4779
|
// package.json
|
|
4760
4780
|
var package_default = {
|
|
4761
4781
|
name: "@uniformdev/cli",
|
|
4762
|
-
version: "19.
|
|
4782
|
+
version: "19.53.0",
|
|
4763
4783
|
description: "Uniform command line interface tool",
|
|
4764
4784
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
4765
4785
|
main: "./cli.js",
|
|
@@ -5146,12 +5166,12 @@ import * as http from "isomorphic-git/http/node/index.js";
|
|
|
5146
5166
|
import os from "os";
|
|
5147
5167
|
import path2 from "path";
|
|
5148
5168
|
async function cloneStarter({
|
|
5149
|
-
spin,
|
|
5169
|
+
spin: spin2,
|
|
5150
5170
|
githubPath,
|
|
5151
5171
|
targetDir,
|
|
5152
5172
|
dotEnvFile
|
|
5153
5173
|
}) {
|
|
5154
|
-
const done = await
|
|
5174
|
+
const done = await spin2("Fetching starter code...");
|
|
5155
5175
|
const cloneDir = path2.join(os.tmpdir(), `uniform-new-${crypto2.randomBytes(20).toString("hex")}`);
|
|
5156
5176
|
const [user, repo, ...pathSegments] = githubPath.split("/");
|
|
5157
5177
|
try {
|
|
@@ -5201,7 +5221,7 @@ async function getOrCreateProject({
|
|
|
5201
5221
|
user,
|
|
5202
5222
|
explicitName,
|
|
5203
5223
|
client,
|
|
5204
|
-
spin,
|
|
5224
|
+
spin: spin2,
|
|
5205
5225
|
checkTargetDir,
|
|
5206
5226
|
explicitTargetDir,
|
|
5207
5227
|
previewUrl,
|
|
@@ -5231,7 +5251,7 @@ async function getOrCreateProject({
|
|
|
5231
5251
|
checkTargetDir,
|
|
5232
5252
|
explicitTargetDir
|
|
5233
5253
|
});
|
|
5234
|
-
const projectId = await createProject({ client, projectName, spin, teamId, previewUrl });
|
|
5254
|
+
const projectId = await createProject({ client, projectName, spin: spin2, teamId, previewUrl });
|
|
5235
5255
|
telemetry.send("project created", { projectId, targetDir });
|
|
5236
5256
|
return {
|
|
5237
5257
|
projectId,
|
|
@@ -5272,11 +5292,11 @@ async function getNewProjectName({
|
|
|
5272
5292
|
async function createProject({
|
|
5273
5293
|
projectName,
|
|
5274
5294
|
teamId,
|
|
5275
|
-
spin,
|
|
5295
|
+
spin: spin2,
|
|
5276
5296
|
client,
|
|
5277
5297
|
previewUrl
|
|
5278
5298
|
}) {
|
|
5279
|
-
const done = await
|
|
5299
|
+
const done = await spin2("Creating your new project...");
|
|
5280
5300
|
const projectId = await client.createProject(teamId, projectName, previewUrl);
|
|
5281
5301
|
await done();
|
|
5282
5302
|
return projectId;
|
|
@@ -5405,11 +5425,11 @@ var getUserInfo = async (baseUrl, authToken, subject) => {
|
|
|
5405
5425
|
async function fetchUserAndEnsureFirstTeamExists({
|
|
5406
5426
|
baseUrl,
|
|
5407
5427
|
auth: { authToken, decoded },
|
|
5408
|
-
spin,
|
|
5428
|
+
spin: spin2,
|
|
5409
5429
|
telemetry
|
|
5410
5430
|
}) {
|
|
5411
5431
|
const uniformClient = createClient(baseUrl, authToken);
|
|
5412
|
-
const done = await
|
|
5432
|
+
const done = await spin2("Fetching user information...");
|
|
5413
5433
|
let user = await getUserInfo(baseUrl, authToken, decoded.sub);
|
|
5414
5434
|
if (user.teams.length < 1) {
|
|
5415
5435
|
await uniformClient.createTeam(`${user.name}'s team`);
|
|
@@ -5422,7 +5442,7 @@ async function fetchUserAndEnsureFirstTeamExists({
|
|
|
5422
5442
|
|
|
5423
5443
|
// src/commands/new/commands/new.ts
|
|
5424
5444
|
async function newHandler({
|
|
5425
|
-
spin,
|
|
5445
|
+
spin: spin2,
|
|
5426
5446
|
projectName,
|
|
5427
5447
|
apiHost,
|
|
5428
5448
|
outputPath,
|
|
@@ -5434,7 +5454,7 @@ async function newHandler({
|
|
|
5434
5454
|
const auth = await getBearerToken(apiHost);
|
|
5435
5455
|
const { authToken } = auth;
|
|
5436
5456
|
const uniformClient = createClient(apiHost, authToken);
|
|
5437
|
-
const user = await fetchUserAndEnsureFirstTeamExists({ auth, baseUrl: apiHost, spin, telemetry });
|
|
5457
|
+
const user = await fetchUserAndEnsureFirstTeamExists({ auth, baseUrl: apiHost, spin: spin2, telemetry });
|
|
5438
5458
|
const { teamId } = await chooseTeam(
|
|
5439
5459
|
user,
|
|
5440
5460
|
`Hey ${user.name}! Choose a Uniform team for your new project`,
|
|
@@ -5533,7 +5553,7 @@ async function newHandler({
|
|
|
5533
5553
|
client: uniformClient,
|
|
5534
5554
|
createNew: true,
|
|
5535
5555
|
chooseExisting: false,
|
|
5536
|
-
spin,
|
|
5556
|
+
spin: spin2,
|
|
5537
5557
|
teamId,
|
|
5538
5558
|
user,
|
|
5539
5559
|
explicitName: projectName,
|
|
@@ -5542,7 +5562,7 @@ async function newHandler({
|
|
|
5542
5562
|
previewUrl: serverUrl + previewPath,
|
|
5543
5563
|
telemetry
|
|
5544
5564
|
});
|
|
5545
|
-
let done = await
|
|
5565
|
+
let done = await spin2("Generating API keys...");
|
|
5546
5566
|
const { readApiKey, writeApiKey } = await uniformClient.createApiKeys(teamId, projectId);
|
|
5547
5567
|
await done();
|
|
5548
5568
|
const dotEnvFile = [
|
|
@@ -5560,7 +5580,7 @@ async function newHandler({
|
|
|
5560
5580
|
if (githubUri.endsWith("commerce-starter")) {
|
|
5561
5581
|
const stableFakecommerceId = "fakecommerce-d04dcf12-f811-401d-add8-1fb81cfdb8a5";
|
|
5562
5582
|
const canaryFakecommerceId = "fakecommerce-f94cf199-7ea4-46ce-ae8b-825668bb79bc";
|
|
5563
|
-
done = await
|
|
5583
|
+
done = await spin2("Installing Fake Commerce...");
|
|
5564
5584
|
await uniformClient.installIntegration({
|
|
5565
5585
|
projectId,
|
|
5566
5586
|
type: apiHost.includes("canary") ? canaryFakecommerceId : stableFakecommerceId
|
|
@@ -5570,7 +5590,7 @@ async function newHandler({
|
|
|
5570
5590
|
const cloneStartTimestamp = Date.now();
|
|
5571
5591
|
const { runNpmInstall } = await cloneStarter({
|
|
5572
5592
|
githubPath: githubUri,
|
|
5573
|
-
spin,
|
|
5593
|
+
spin: spin2,
|
|
5574
5594
|
targetDir,
|
|
5575
5595
|
dotEnvFile
|
|
5576
5596
|
});
|
|
@@ -5578,7 +5598,7 @@ async function newHandler({
|
|
|
5578
5598
|
const installStartTimestamp = Date.now();
|
|
5579
5599
|
await runNpmInstall();
|
|
5580
5600
|
telemetry.send("deps installed", { duration: Date.now() - installStartTimestamp });
|
|
5581
|
-
done = await
|
|
5601
|
+
done = await spin2("Creating components and compositions");
|
|
5582
5602
|
await runNpm(targetDir, ["run", "uniform:push"]);
|
|
5583
5603
|
await runNpm(targetDir, ["run", "uniform:publish"]);
|
|
5584
5604
|
await done();
|
|
@@ -5613,7 +5633,7 @@ import inquirer5 from "inquirer";
|
|
|
5613
5633
|
import path4 from "path";
|
|
5614
5634
|
import slugify2 from "slugify";
|
|
5615
5635
|
async function newMeshIntegrationHandler({
|
|
5616
|
-
spin,
|
|
5636
|
+
spin: spin2,
|
|
5617
5637
|
apiHost,
|
|
5618
5638
|
outputPath,
|
|
5619
5639
|
telemetry
|
|
@@ -5622,7 +5642,7 @@ async function newMeshIntegrationHandler({
|
|
|
5622
5642
|
const auth = await getBearerToken(apiHost);
|
|
5623
5643
|
const { authToken } = auth;
|
|
5624
5644
|
const uniformClient = createClient(apiHost, authToken);
|
|
5625
|
-
const user = await fetchUserAndEnsureFirstTeamExists({ auth, baseUrl: apiHost, spin, telemetry });
|
|
5645
|
+
const user = await fetchUserAndEnsureFirstTeamExists({ auth, baseUrl: apiHost, spin: spin2, telemetry });
|
|
5626
5646
|
const { teamId } = await chooseTeam(
|
|
5627
5647
|
user,
|
|
5628
5648
|
`Hey ${user.name}! Choose a Uniform team to register your integration`,
|
|
@@ -5647,10 +5667,10 @@ async function newMeshIntegrationHandler({
|
|
|
5647
5667
|
const { targetDir, typeSlug } = validateIntegrationName(answer.name, outputPath);
|
|
5648
5668
|
const { runNpmInstall } = await cloneStarter({
|
|
5649
5669
|
githubPath: `uniformdev/examples/examples/mesh-integration`,
|
|
5650
|
-
spin,
|
|
5670
|
+
spin: spin2,
|
|
5651
5671
|
targetDir
|
|
5652
5672
|
});
|
|
5653
|
-
let done = await
|
|
5673
|
+
let done = await spin2("Registering integration to team...");
|
|
5654
5674
|
const pathToManifest = path4.resolve(targetDir, "mesh-manifest.json");
|
|
5655
5675
|
if (!existsSync3(pathToManifest)) {
|
|
5656
5676
|
throw new Error("Invalid integration starter cloned: missing `mesh-manifest.json`");
|
|
@@ -5672,13 +5692,13 @@ async function newMeshIntegrationHandler({
|
|
|
5672
5692
|
client: uniformClient,
|
|
5673
5693
|
createNew: true,
|
|
5674
5694
|
chooseExisting: true,
|
|
5675
|
-
spin,
|
|
5695
|
+
spin: spin2,
|
|
5676
5696
|
teamId,
|
|
5677
5697
|
user,
|
|
5678
5698
|
checkTargetDir: false,
|
|
5679
5699
|
telemetry
|
|
5680
5700
|
});
|
|
5681
|
-
done = await
|
|
5701
|
+
done = await spin2("Installing integration to project...");
|
|
5682
5702
|
await uniformClient.installIntegration({ projectId, type: typeSlug });
|
|
5683
5703
|
await done();
|
|
5684
5704
|
console.log(`
|
|
@@ -5748,10 +5768,10 @@ var NewCmd = {
|
|
|
5748
5768
|
),
|
|
5749
5769
|
describe: "Start a new Uniform project",
|
|
5750
5770
|
handler: async function({ name, apiHost, outputPath, disableTelemetry }) {
|
|
5751
|
-
const { stopAllSpinners, spin } = makeSpinner();
|
|
5771
|
+
const { stopAllSpinners, spin: spin2 } = makeSpinner();
|
|
5752
5772
|
const telemetry = new Telemetry("cli new", disableTelemetry || apiHost !== stableApiHost);
|
|
5753
5773
|
try {
|
|
5754
|
-
await newHandler({ spin, projectName: name, apiHost, outputPath, telemetry });
|
|
5774
|
+
await newHandler({ spin: spin2, projectName: name, apiHost, outputPath, telemetry });
|
|
5755
5775
|
stopAllSpinners();
|
|
5756
5776
|
process.exit(0);
|
|
5757
5777
|
} catch (err) {
|
|
@@ -5785,10 +5805,10 @@ var NewMeshCmd = {
|
|
|
5785
5805
|
),
|
|
5786
5806
|
describe: "Start a new Uniform project",
|
|
5787
5807
|
handler: async function({ apiHost, outputPath, disableTelemetry }) {
|
|
5788
|
-
const { stopAllSpinners, spin } = makeSpinner();
|
|
5808
|
+
const { stopAllSpinners, spin: spin2 } = makeSpinner();
|
|
5789
5809
|
const telemetry = new Telemetry("cli new mesh", disableTelemetry || apiHost !== stableApiHost);
|
|
5790
5810
|
try {
|
|
5791
|
-
await newMeshIntegrationHandler({ spin, apiHost, outputPath, telemetry });
|
|
5811
|
+
await newMeshIntegrationHandler({ spin: spin2, apiHost, outputPath, telemetry });
|
|
5792
5812
|
stopAllSpinners();
|
|
5793
5813
|
process.exit(0);
|
|
5794
5814
|
} catch (err) {
|
|
@@ -6868,6 +6888,31 @@ var RedirectCommand = {
|
|
|
6868
6888
|
// src/commands/sync/index.ts
|
|
6869
6889
|
import yargs23 from "yargs";
|
|
6870
6890
|
|
|
6891
|
+
// src/commands/sync/commands/util.ts
|
|
6892
|
+
import ora2 from "ora";
|
|
6893
|
+
function spin(entityType) {
|
|
6894
|
+
const spinner = ora2(entityType).start();
|
|
6895
|
+
const consoleLog = console.log;
|
|
6896
|
+
console.log = (...text) => {
|
|
6897
|
+
if (text.length === 1 && typeof text[0] === "string") {
|
|
6898
|
+
spinner.text += "\n" + text;
|
|
6899
|
+
} else {
|
|
6900
|
+
consoleLog(...text);
|
|
6901
|
+
}
|
|
6902
|
+
};
|
|
6903
|
+
return {
|
|
6904
|
+
...spinner,
|
|
6905
|
+
stop: () => {
|
|
6906
|
+
spinner.stop();
|
|
6907
|
+
console.log = consoleLog;
|
|
6908
|
+
},
|
|
6909
|
+
succeed() {
|
|
6910
|
+
spinner.succeed();
|
|
6911
|
+
console.log = consoleLog;
|
|
6912
|
+
}
|
|
6913
|
+
};
|
|
6914
|
+
}
|
|
6915
|
+
|
|
6871
6916
|
// src/commands/sync/commands/pull.ts
|
|
6872
6917
|
var SyncPullModule = {
|
|
6873
6918
|
command: "pull",
|
|
@@ -6901,7 +6946,9 @@ var SyncPullModule = {
|
|
|
6901
6946
|
composition: CompositionPullModule,
|
|
6902
6947
|
projectMapDefinition: ProjectMapDefinitionPullModule,
|
|
6903
6948
|
projectMapNode: ProjectMapNodePullModule,
|
|
6904
|
-
redirect: RedirectDefinitionPullModule
|
|
6949
|
+
redirect: RedirectDefinitionPullModule,
|
|
6950
|
+
entry: EntryPullModule,
|
|
6951
|
+
contentType: ContentTypePullModule
|
|
6905
6952
|
}).filter(([entityType]) => {
|
|
6906
6953
|
var _a, _b, _c, _d, _e, _f;
|
|
6907
6954
|
return Boolean((_a = config2.entitiesConfig) == null ? void 0 : _a[entityType]) && ((_c = (_b = config2.entitiesConfig) == null ? void 0 : _b[entityType]) == null ? void 0 : _c.disabled) !== true && ((_f = (_e = (_d = config2.entitiesConfig) == null ? void 0 : _d[entityType]) == null ? void 0 : _e.pull) == null ? void 0 : _f.disabled) !== true;
|
|
@@ -6912,15 +6959,22 @@ var SyncPullModule = {
|
|
|
6912
6959
|
);
|
|
6913
6960
|
}
|
|
6914
6961
|
for (const [entityType, module3] of enabledEntities) {
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6962
|
+
const spinner = spin(entityType);
|
|
6963
|
+
try {
|
|
6964
|
+
await module3.handler({
|
|
6965
|
+
...otherParams,
|
|
6966
|
+
state: 0,
|
|
6967
|
+
format: getFormat(entityType, config2),
|
|
6968
|
+
onlyCompositions: entityType === "composition" ? true : void 0,
|
|
6969
|
+
onlyPatterns: entityType === "pattern" ? true : void 0,
|
|
6970
|
+
mode: getPullMode(entityType, config2),
|
|
6971
|
+
directory: getPullFilename(entityType, config2)
|
|
6972
|
+
});
|
|
6973
|
+
spinner.succeed();
|
|
6974
|
+
} catch (e) {
|
|
6975
|
+
spinner.stop();
|
|
6976
|
+
throw e;
|
|
6977
|
+
}
|
|
6924
6978
|
}
|
|
6925
6979
|
}
|
|
6926
6980
|
};
|
|
@@ -6982,7 +7036,9 @@ var SyncPushModule = {
|
|
|
6982
7036
|
composition: CompositionPushModule,
|
|
6983
7037
|
projectMapDefinition: ProjectMapDefinitionPushModule,
|
|
6984
7038
|
projectMapNode: ProjectMapNodePushModule,
|
|
6985
|
-
redirect: RedirectDefinitionPushModule
|
|
7039
|
+
redirect: RedirectDefinitionPushModule,
|
|
7040
|
+
contentType: ContentTypePushModule,
|
|
7041
|
+
entry: EntryPushModule
|
|
6986
7042
|
}).filter(([entityType]) => {
|
|
6987
7043
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
6988
7044
|
return Boolean((_a2 = config2.entitiesConfig) == null ? void 0 : _a2[entityType]) && ((_c2 = (_b2 = config2.entitiesConfig) == null ? void 0 : _b2[entityType]) == null ? void 0 : _c2.disabled) !== true && ((_f2 = (_e2 = (_d2 = config2.entitiesConfig) == null ? void 0 : _d2[entityType]) == null ? void 0 : _e2.push) == null ? void 0 : _f2.disabled) !== true;
|
|
@@ -6993,15 +7049,22 @@ var SyncPushModule = {
|
|
|
6993
7049
|
);
|
|
6994
7050
|
}
|
|
6995
7051
|
for (const [entityType, module3] of enabledEntities) {
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7052
|
+
const spinner = spin(entityType);
|
|
7053
|
+
try {
|
|
7054
|
+
await module3.handler({
|
|
7055
|
+
...otherParams,
|
|
7056
|
+
state: 0,
|
|
7057
|
+
format: getFormat2(entityType, config2),
|
|
7058
|
+
onlyCompositions: entityType === "composition" ? true : void 0,
|
|
7059
|
+
onlyPatterns: entityType === "pattern" ? true : void 0,
|
|
7060
|
+
mode: getPushMode(entityType, config2),
|
|
7061
|
+
directory: getPushFilename(entityType, config2)
|
|
7062
|
+
});
|
|
7063
|
+
spinner.succeed();
|
|
7064
|
+
} catch (e) {
|
|
7065
|
+
spinner.stop();
|
|
7066
|
+
throw e;
|
|
7067
|
+
}
|
|
7005
7068
|
}
|
|
7006
7069
|
if (((_a = config2.entitiesConfig) == null ? void 0 : _a.pattern) && ((_d = (_c = (_b = config2.entitiesConfig) == null ? void 0 : _b.pattern) == null ? void 0 : _c.push) == null ? void 0 : _d.disabled) !== true && ((_f = (_e = config2.entitiesConfig) == null ? void 0 : _e.pattern) == null ? void 0 : _f.publish)) {
|
|
7007
7070
|
await PatternPublishModule.handler({ ...otherParams, all: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.53.0",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@thi.ng/mime": "^2.2.23",
|
|
20
|
-
"@uniformdev/canvas": "19.
|
|
21
|
-
"@uniformdev/context": "19.
|
|
22
|
-
"@uniformdev/files": "19.
|
|
23
|
-
"@uniformdev/project-map": "19.
|
|
24
|
-
"@uniformdev/redirect": "19.
|
|
20
|
+
"@uniformdev/canvas": "19.53.0",
|
|
21
|
+
"@uniformdev/context": "19.53.0",
|
|
22
|
+
"@uniformdev/files": "19.53.0",
|
|
23
|
+
"@uniformdev/project-map": "19.53.0",
|
|
24
|
+
"@uniformdev/redirect": "19.53.0",
|
|
25
25
|
"colorette": "2.0.20",
|
|
26
26
|
"cosmiconfig": "8.2.0",
|
|
27
27
|
"cosmiconfig-typescript-loader": "5.0.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "2f5a368ac31888a37da39c0e449b29b94c35c591"
|
|
70
70
|
}
|