@uniformdev/cli 20.74.6-alpha.6 → 20.74.7-alpha.14.sha-79426f9415
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.
|
@@ -5,7 +5,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
5
5
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
6
|
});
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.58.9_@types+node@26.0.0__jiti@2.7.0_postcss@8.5.
|
|
8
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.58.9_@types+node@26.0.0__jiti@2.7.0_postcss@8.5.2_1593607ac254a0f78ffdb743585a4e57/node_modules/tsup/assets/esm_shims.js
|
|
9
9
|
import path from "path";
|
|
10
10
|
import { fileURLToPath } from "url";
|
|
11
11
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -21,7 +21,7 @@ import { dirname, extname, isAbsolute, resolve, sep } from "path";
|
|
|
21
21
|
// package.json
|
|
22
22
|
var package_default = {
|
|
23
23
|
name: "@uniformdev/cli",
|
|
24
|
-
version: "20.
|
|
24
|
+
version: "20.77.0",
|
|
25
25
|
description: "Uniform command line interface tool",
|
|
26
26
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
27
27
|
main: "./cli.js",
|
|
@@ -68,7 +68,7 @@ var package_default = {
|
|
|
68
68
|
"fs-jetpack": "5.1.0",
|
|
69
69
|
"image-size": "2.0.2",
|
|
70
70
|
"isomorphic-git": "1.38.5",
|
|
71
|
-
"js-yaml": "^4.
|
|
71
|
+
"js-yaml": "^4.3.1",
|
|
72
72
|
jsonwebtoken: "9.0.3",
|
|
73
73
|
mitt: "^3.0.1",
|
|
74
74
|
"normalize-newline": "^4.1.0",
|
|
@@ -80,7 +80,7 @@ var package_default = {
|
|
|
80
80
|
"registry-url": "^6.0.0",
|
|
81
81
|
slugify: "1.6.9",
|
|
82
82
|
svix: "^1.96.0",
|
|
83
|
-
undici: "^7.
|
|
83
|
+
undici: "^7.29.0",
|
|
84
84
|
yargs: "^18.0.0",
|
|
85
85
|
zod: "4.4.3"
|
|
86
86
|
},
|
|
@@ -409,41 +409,23 @@ function readFileToObject(filename) {
|
|
|
409
409
|
const file = readFileSync(filename, "utf8");
|
|
410
410
|
return load(file, { filename, json: true });
|
|
411
411
|
}
|
|
412
|
-
var ENTITY_ID_CHUNK_SIZE = 100;
|
|
413
|
-
function* chunkEntityIds(ids, chunkSize = ENTITY_ID_CHUNK_SIZE) {
|
|
414
|
-
if (!ids) {
|
|
415
|
-
yield void 0;
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
for (let index = 0; index < ids.length; index += chunkSize) {
|
|
419
|
-
yield ids.slice(index, index + chunkSize);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
412
|
async function* paginateAsync(fetchPage, options) {
|
|
423
413
|
const pageSize = options.pageSize ?? 100;
|
|
424
414
|
if (pageSize < 1) {
|
|
425
415
|
throw new Error(`pageSize must be at least 1, got ${pageSize}`);
|
|
426
416
|
}
|
|
427
|
-
const { maxItems } = options;
|
|
428
417
|
let offset = 0;
|
|
429
|
-
let yielded = 0;
|
|
430
|
-
let limit = pageSize;
|
|
431
418
|
let pageData = [];
|
|
432
419
|
do {
|
|
433
|
-
limit = maxItems === void 0 ? pageSize : Math.min(pageSize, maxItems - yielded);
|
|
434
|
-
if (limit < 1) {
|
|
435
|
-
return;
|
|
436
|
-
}
|
|
437
420
|
if (options.verbose) {
|
|
438
|
-
console.log(`Fetching ${options.entityName ?? "items"} batch: offset=${offset}, pageSize=${
|
|
421
|
+
console.log(`Fetching ${options.entityName ?? "items"} batch: offset=${offset}, pageSize=${pageSize}`);
|
|
439
422
|
}
|
|
440
|
-
pageData = await fetchPage(offset,
|
|
423
|
+
pageData = await fetchPage(offset, pageSize);
|
|
441
424
|
for (const item of pageData) {
|
|
442
425
|
yield item;
|
|
443
426
|
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
} while (pageData.length === limit);
|
|
427
|
+
offset += pageSize;
|
|
428
|
+
} while (pageData.length === pageSize);
|
|
447
429
|
}
|
|
448
430
|
var entityBatchSizeDefaults = {
|
|
449
431
|
composition: 100,
|
|
@@ -479,21 +461,6 @@ function getEntityBatchSize(entityType, config) {
|
|
|
479
461
|
}
|
|
480
462
|
return entityBatchSizeDefaults[entityType];
|
|
481
463
|
}
|
|
482
|
-
function getPublishScope(entityType, config) {
|
|
483
|
-
const publish = config.entitiesConfig?.[entityType]?.publish;
|
|
484
|
-
if (!publish) {
|
|
485
|
-
return void 0;
|
|
486
|
-
}
|
|
487
|
-
if (publish === true || publish === "all") {
|
|
488
|
-
return "all";
|
|
489
|
-
}
|
|
490
|
-
if (publish === "pushed") {
|
|
491
|
-
return "pushed";
|
|
492
|
-
}
|
|
493
|
-
throw new Error(
|
|
494
|
-
`Invalid publish option '${publish}' for ${entityType}. Expected true, false, 'all', or 'pushed'.`
|
|
495
|
-
);
|
|
496
|
-
}
|
|
497
464
|
function resolveEntityBatchSize({
|
|
498
465
|
entityType,
|
|
499
466
|
cliBatchSize,
|
|
@@ -605,11 +572,9 @@ export {
|
|
|
605
572
|
isPathAPackageFile,
|
|
606
573
|
emitWithFormat,
|
|
607
574
|
readFileToObject,
|
|
608
|
-
chunkEntityIds,
|
|
609
575
|
paginateAsync,
|
|
610
576
|
isPaginatedSyncEntity,
|
|
611
577
|
getEntityBatchSize,
|
|
612
|
-
getPublishScope,
|
|
613
578
|
withBatchSizeOptions,
|
|
614
579
|
applyDefaultSyncConfiguration,
|
|
615
580
|
getEntityOption,
|
package/dist/defaultConfig.d.mts
CHANGED
package/dist/defaultConfig.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-4FPNEXON.mjs";
|
|
2
2
|
|
|
3
3
|
// src/sync/allSerializableEntitiesConfig.ts
|
|
4
4
|
var allSerializableEntitiesConfig = {
|
|
@@ -11,11 +11,11 @@ var allSerializableEntitiesConfig = {
|
|
|
11
11
|
projectMapDefinition: {},
|
|
12
12
|
projectMapNode: {},
|
|
13
13
|
contentType: {},
|
|
14
|
-
composition: { publish:
|
|
15
|
-
entry: { publish:
|
|
16
|
-
entryPattern: { publish:
|
|
17
|
-
componentPattern: { publish:
|
|
18
|
-
compositionPattern: { publish:
|
|
14
|
+
composition: { publish: true },
|
|
15
|
+
entry: { publish: true },
|
|
16
|
+
entryPattern: { publish: true },
|
|
17
|
+
componentPattern: { publish: true },
|
|
18
|
+
compositionPattern: { publish: true },
|
|
19
19
|
asset: {},
|
|
20
20
|
workflow: {},
|
|
21
21
|
webhook: {},
|
|
@@ -13,21 +13,8 @@ type EntityConfiguration = {
|
|
|
13
13
|
disabled?: true;
|
|
14
14
|
};
|
|
15
15
|
type EntityWithStateConfiguration = EntityConfiguration & Partial<StateArgs>;
|
|
16
|
-
/**
|
|
17
|
-
* What a push should publish once it has written its entities to preview.
|
|
18
|
-
*
|
|
19
|
-
* - `all`: publish every entity of this type in the project that has unpublished changes, whether or
|
|
20
|
-
* not it came from the push source. This is what `publish: true` has always done.
|
|
21
|
-
* - `pushed`: publish only the entities this run actually created or updated. This is narrower than
|
|
22
|
-
* "everything in the push source": an entity whose preview copy already matches the source is not
|
|
23
|
-
* written, so it is not published either. A run that changes nothing therefore publishes nothing,
|
|
24
|
-
* which also means a failed publish is not retried by re-running an unchanged push. Use `all` when
|
|
25
|
-
* the publish set needs to converge on its own.
|
|
26
|
-
*/
|
|
27
|
-
type PublishScope = 'all' | 'pushed';
|
|
28
16
|
type PublishableEntitiesConfiguration = EntityWithStateConfiguration & {
|
|
29
|
-
|
|
30
|
-
publish?: boolean | PublishScope;
|
|
17
|
+
publish?: boolean;
|
|
31
18
|
batchSize?: number;
|
|
32
19
|
};
|
|
33
20
|
type SerializationEntitiesConfiguration = Record<EntityTypes, {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { C as CLIConfiguration } from './index-
|
|
2
|
+
export { C as CLIConfiguration } from './index-DeoTNXj-.mjs';
|