@uniformdev/cli 20.66.1-alpha.4 → 20.66.1-alpha.63

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 CHANGED
@@ -5,23 +5,20 @@ import {
5
5
  applyDefaultSyncConfiguration,
6
6
  emitWithFormat,
7
7
  getDirectoryOrFilename,
8
- getEntityBatchSize,
9
8
  getEntityOption,
10
- isPaginatedSyncEntity,
11
9
  isPathAPackageFile,
12
10
  nodeFetchProxy,
13
11
  package_default,
14
12
  paginateAsync,
15
13
  readFileToObject,
16
14
  withApiOptions,
17
- withBatchSizeOptions,
18
15
  withConfiguration,
19
16
  withDebugOptions,
20
17
  withDiffOptions,
21
18
  withFormatOptions,
22
19
  withProjectOptions,
23
20
  withTeamOptions
24
- } from "./chunk-EM2DLYBP.mjs";
21
+ } from "./chunk-35FOLS5B.mjs";
25
22
 
26
23
  // src/index.ts
27
24
  import * as dotenv from "dotenv";
@@ -2246,9 +2243,10 @@ var downloadFile = async ({
2246
2243
  // src/files/uploadFile.ts
2247
2244
  import { preferredType } from "@thi.ng/mime";
2248
2245
  import { FILE_READY_STATE, getFileNameFromUrl } from "@uniformdev/files";
2249
- import { fileTypeFromBuffer } from "file-type";
2246
+ import { fileTypeFromFile } from "file-type";
2247
+ import { createReadStream } from "fs";
2250
2248
  import fsj3 from "fs-jetpack";
2251
- import sizeOf from "image-size";
2249
+ import { imageSizeFromFile } from "image-size/fromFile";
2252
2250
  import normalizeNewline from "normalize-newline";
2253
2251
  import PQueue from "p-queue";
2254
2252
  import { join as join9 } from "path";
@@ -2279,33 +2277,39 @@ var uploadFile = async ({
2279
2277
  }
2280
2278
  const localFileName = urlToFileName(fileUrl);
2281
2279
  const expectedFilePath = join9(writeDirectory, FILES_DIRECTORY_NAME, localFileName);
2282
- const fileExistsLocally = await fsj3.existsAsync(expectedFilePath);
2283
- if (!fileExistsLocally) {
2280
+ const fileInspect = await fsj3.inspectAsync(expectedFilePath);
2281
+ if (fileInspect?.type !== "file") {
2284
2282
  console.warn(
2285
2283
  `Skipping file ${fileUrl} as we couldn't find a local copy (looked at ${expectedFilePath})`
2286
2284
  );
2287
2285
  return null;
2288
2286
  }
2289
- let fileBuffer = await fsj3.readAsync(expectedFilePath, "buffer");
2290
- if (!fileBuffer) {
2291
- console.warn(`Skipping file ${fileUrl} (${expectedFilePath}) as we couldn't read it`);
2292
- return null;
2293
- }
2294
2287
  const fileName = getFileNameFromUrl(fileUrl);
2295
- let mimeType = expectedFilePath.endsWith(".svg") ? "image/svg+xml" : (await fileTypeFromBuffer(fileBuffer))?.mime;
2288
+ let mimeType = expectedFilePath.endsWith(".svg") ? "image/svg+xml" : (await fileTypeFromFile(expectedFilePath))?.mime;
2296
2289
  if (!mimeType) {
2297
2290
  mimeType = preferredType(fileUrl.split(".").at(-1) ?? "");
2298
2291
  }
2299
2292
  if (mimeType === "audio/x-flac") {
2300
2293
  mimeType = "audio/flac";
2301
2294
  }
2295
+ let uploadBody;
2296
+ let uploadSize = fileInspect.size;
2302
2297
  if (mimeType === "image/svg+xml") {
2298
+ const fileBuffer = await fsj3.readAsync(expectedFilePath, "buffer");
2299
+ if (!fileBuffer) {
2300
+ console.warn(`Skipping file ${fileUrl} (${expectedFilePath}) as we couldn't read it`);
2301
+ return null;
2302
+ }
2303
+ uploadBody = fileBuffer;
2303
2304
  try {
2304
- fileBuffer = normalizeNewline(fileBuffer);
2305
+ uploadBody = normalizeNewline(fileBuffer);
2305
2306
  } catch {
2306
2307
  }
2308
+ uploadSize = uploadBody.length;
2309
+ } else {
2310
+ uploadBody = createReadStream(expectedFilePath);
2307
2311
  }
2308
- const { width, height } = (() => {
2312
+ const { width, height } = await (async () => {
2309
2313
  if (!mimeType.startsWith("image/")) {
2310
2314
  return {
2311
2315
  width: void 0,
@@ -2313,7 +2317,7 @@ var uploadFile = async ({
2313
2317
  };
2314
2318
  }
2315
2319
  try {
2316
- return sizeOf(fileBuffer);
2320
+ return await imageSizeFromFile(expectedFilePath);
2317
2321
  } catch {
2318
2322
  return {
2319
2323
  width: void 0,
@@ -2325,19 +2329,21 @@ var uploadFile = async ({
2325
2329
  id: fileId,
2326
2330
  name: fileName,
2327
2331
  mediaType: mimeType,
2328
- size: fileBuffer.length,
2332
+ size: uploadSize,
2329
2333
  width,
2330
2334
  height,
2331
2335
  sourceId: hash
2332
2336
  });
2333
- const uploadResponse = await fetch(uploadUrl, {
2337
+ const uploadRequest = {
2334
2338
  method,
2335
- body: fileBuffer,
2339
+ body: uploadBody,
2340
+ duplex: "half",
2336
2341
  headers: {
2337
2342
  "Content-Type": mimeType,
2338
- "Content-Length": fileBuffer.length.toString()
2343
+ "Content-Length": uploadSize.toString()
2339
2344
  }
2340
- });
2345
+ };
2346
+ const uploadResponse = await fetch(uploadUrl, uploadRequest);
2341
2347
  if (!uploadResponse.ok) {
2342
2348
  console.warn(`Failed to upload file ${fileUrl} (${expectedFilePath})`);
2343
2349
  return null;
@@ -2425,6 +2431,9 @@ var walkFileUrlsForCompositionOrEntry = ({
2425
2431
  };
2426
2432
 
2427
2433
  // src/files/files.ts
2434
+ var fileDownloadQueue = new PQueue2({ concurrency: 10 });
2435
+ var fileUploadQueue2 = new PQueue2({ concurrency: 10 });
2436
+ var fileUrlReplacementQueue = new PQueue2({ concurrency: 10 });
2428
2437
  var downloadFileForAsset = async ({
2429
2438
  asset,
2430
2439
  directory,
@@ -2538,7 +2547,6 @@ var downloadFilesForCompositionOrEntry = async ({
2538
2547
  directory,
2539
2548
  fileClient
2540
2549
  }) => {
2541
- const fileDownloadQueue = new PQueue2({ concurrency: 10 });
2542
2550
  await walkFileUrlsForCompositionOrEntry({
2543
2551
  entity,
2544
2552
  callback: ({ fileUrl }) => {
@@ -2554,7 +2562,6 @@ var uploadFilesForCompositionOrEntry = async ({
2554
2562
  directory,
2555
2563
  fileClient
2556
2564
  }) => {
2557
- const fileUploadQueue2 = new PQueue2({ concurrency: 10 });
2558
2565
  const urlReplacementMap = /* @__PURE__ */ new Map();
2559
2566
  walkFileUrlsForCompositionOrEntry({
2560
2567
  entity: entity.object,
@@ -2587,7 +2594,6 @@ var replaceRemoteUrlsWithLocalReferences = async ({
2587
2594
  let sourceEntityAsString = JSON.stringify(sourceEntity);
2588
2595
  const targetEntityAsString = JSON.stringify(targetEntity);
2589
2596
  const writeDirectory = getFilesDirectory(directory);
2590
- const fileUrlReplacementQueue = new PQueue2({ concurrency: 10 });
2591
2597
  walkFileUrlsForCompositionOrEntry({
2592
2598
  entity: sourceEntity.object,
2593
2599
  callback: ({ fileUrl }) => {
@@ -2627,23 +2633,17 @@ var replaceLocalUrlsWithRemoteReferences = async ({
2627
2633
  fileClient
2628
2634
  }) => {
2629
2635
  let entityAsString = JSON.stringify(entity);
2630
- const fileUrlReplacementQueue = new PQueue2({ concurrency: 10 });
2631
2636
  walkFileUrlsForCompositionOrEntry({
2632
2637
  entity: entity.object,
2633
2638
  callback: ({ fileUrl }) => {
2634
2639
  fileUrlReplacementQueue.add(async () => {
2635
2640
  try {
2636
2641
  const hash = urlToHash(fileUrl);
2637
- fileUrlReplacementQueue.add(async () => {
2638
- try {
2639
- const file = await fileClient.get({ sourceId: hash }).catch(() => null);
2640
- if (!file) {
2641
- return;
2642
- }
2643
- entityAsString = entityAsString.replaceAll(`"${fileUrl}"`, `"${file.url}"`);
2644
- } catch {
2645
- }
2646
- });
2642
+ const file = await fileClient.get({ sourceId: hash }).catch(() => null);
2643
+ if (!file) {
2644
+ return;
2645
+ }
2646
+ entityAsString = entityAsString.replaceAll(`"${fileUrl}"`, `"${file.url}"`);
2647
2647
  } catch {
2648
2648
  }
2649
2649
  });
@@ -2709,16 +2709,20 @@ function convertStateOption(state) {
2709
2709
  // src/commands/canvas/assetEngineDataSource.ts
2710
2710
  function createAssetEngineDataSource({
2711
2711
  client,
2712
- verbose,
2713
- batchSize
2712
+ verbose
2714
2713
  }) {
2715
2714
  async function* getObjects() {
2716
2715
  const assets = paginateAsync(
2717
- async (offset, limit2) => (await client.get({
2718
- limit: limit2,
2719
- offset
2720
- })).assets,
2721
- { pageSize: batchSize ?? 50, verbose, entityName: "assets" }
2716
+ async (offset, limit2) => {
2717
+ if (verbose) {
2718
+ console.log(`Fetching all assets from offset ${offset} with limit ${limit2}`);
2719
+ }
2720
+ return (await client.get({
2721
+ limit: limit2,
2722
+ offset
2723
+ })).assets;
2724
+ },
2725
+ { pageSize: 50 }
2722
2726
  );
2723
2727
  for await (const e of assets) {
2724
2728
  const result = {
@@ -2768,25 +2772,22 @@ var AssetPullModule = {
2768
2772
  withDebugOptions(
2769
2773
  withProjectOptions(
2770
2774
  withDiffOptions(
2771
- withBatchSizeOptions(
2772
- yargs43.positional("directory", {
2773
- describe: "Directory to save the assets to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2774
- type: "string"
2775
- }).option("format", {
2776
- alias: ["f"],
2777
- describe: "Output format",
2778
- default: "yaml",
2779
- choices: ["yaml", "json"],
2780
- type: "string"
2781
- }).option("mode", {
2782
- alias: ["m"],
2783
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
2784
- choices: ["create", "createOrUpdate", "mirror"],
2785
- default: "mirror",
2786
- type: "string"
2787
- }),
2788
- "asset"
2789
- )
2775
+ yargs43.positional("directory", {
2776
+ describe: "Directory to save the assets to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2777
+ type: "string"
2778
+ }).option("format", {
2779
+ alias: ["f"],
2780
+ describe: "Output format",
2781
+ default: "yaml",
2782
+ choices: ["yaml", "json"],
2783
+ type: "string"
2784
+ }).option("mode", {
2785
+ alias: ["m"],
2786
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
2787
+ choices: ["create", "createOrUpdate", "mirror"],
2788
+ default: "mirror",
2789
+ type: "string"
2790
+ })
2790
2791
  )
2791
2792
  )
2792
2793
  )
@@ -2803,8 +2804,7 @@ var AssetPullModule = {
2803
2804
  whatIf,
2804
2805
  project: projectId,
2805
2806
  diff: diffMode,
2806
- allowEmptySource,
2807
- resolvedBatchSize
2807
+ allowEmptySource
2808
2808
  }) => {
2809
2809
  const fetch2 = nodeFetchProxy(proxy, verbose);
2810
2810
  const client = getAssetClient({
@@ -2814,11 +2814,7 @@ var AssetPullModule = {
2814
2814
  projectId
2815
2815
  });
2816
2816
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2817
- const source = createAssetEngineDataSource({
2818
- client,
2819
- verbose,
2820
- batchSize: resolvedBatchSize
2821
- });
2817
+ const source = createAssetEngineDataSource({ client, verbose });
2822
2818
  let target;
2823
2819
  const isPackage = isPathAPackageFile(directory);
2824
2820
  const onBeforeDeleteObject = async (id, object4) => {
@@ -2893,19 +2889,16 @@ var AssetPushModule = {
2893
2889
  withDebugOptions(
2894
2890
  withProjectOptions(
2895
2891
  withDiffOptions(
2896
- withBatchSizeOptions(
2897
- yargs43.positional("directory", {
2898
- describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
2899
- type: "string"
2900
- }).option("mode", {
2901
- alias: ["m"],
2902
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
2903
- choices: ["create", "createOrUpdate", "mirror"],
2904
- default: "mirror",
2905
- type: "string"
2906
- }),
2907
- "asset"
2908
- )
2892
+ yargs43.positional("directory", {
2893
+ describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
2894
+ type: "string"
2895
+ }).option("mode", {
2896
+ alias: ["m"],
2897
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
2898
+ choices: ["create", "createOrUpdate", "mirror"],
2899
+ default: "mirror",
2900
+ type: "string"
2901
+ })
2909
2902
  )
2910
2903
  )
2911
2904
  )
@@ -2921,8 +2914,7 @@ var AssetPushModule = {
2921
2914
  project: projectId,
2922
2915
  diff: diffMode,
2923
2916
  allowEmptySource,
2924
- verbose,
2925
- resolvedBatchSize
2917
+ verbose
2926
2918
  }) => {
2927
2919
  const fetch2 = nodeFetchProxy(proxy, verbose);
2928
2920
  const client = getAssetClient({
@@ -2949,11 +2941,7 @@ var AssetPushModule = {
2949
2941
  verbose
2950
2942
  });
2951
2943
  }
2952
- const target = createAssetEngineDataSource({
2953
- client,
2954
- verbose,
2955
- batchSize: resolvedBatchSize
2956
- });
2944
+ const target = createAssetEngineDataSource({ client, verbose });
2957
2945
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2958
2946
  await syncEngine({
2959
2947
  source,
@@ -3146,8 +3134,10 @@ function createCategoriesEngineDataSource({
3146
3134
  client
3147
3135
  }) {
3148
3136
  async function* getObjects() {
3149
- const categories = (await client.getCategories()).categories;
3150
- for (const def of categories) {
3137
+ const categories = paginateAsync(async () => (await client.getCategories()).categories, {
3138
+ pageSize: 100
3139
+ });
3140
+ for await (const def of categories) {
3151
3141
  const result = {
3152
3142
  id: selectIdentifier(def),
3153
3143
  displayName: selectDisplayName(def),
@@ -3468,14 +3458,12 @@ var ComponentListModule = {
3468
3458
 
3469
3459
  // src/commands/canvas/componentDefinitionEngineDataSource.ts
3470
3460
  function createComponentDefinitionEngineDataSource({
3471
- client,
3472
- batchSize,
3473
- verbose
3461
+ client
3474
3462
  }) {
3475
3463
  async function* getObjects() {
3476
3464
  const componentDefinitions = paginateAsync(
3477
3465
  async (offset, limit2) => (await client.getComponentDefinitions({ limit: limit2, offset })).componentDefinitions,
3478
- { pageSize: batchSize ?? 200, verbose, entityName: "components" }
3466
+ { pageSize: 200 }
3479
3467
  );
3480
3468
  for await (const def of componentDefinitions) {
3481
3469
  const result = {
@@ -3515,25 +3503,22 @@ var ComponentPullModule = {
3515
3503
  withDebugOptions(
3516
3504
  withProjectOptions(
3517
3505
  withDiffOptions(
3518
- withBatchSizeOptions(
3519
- yargs43.positional("directory", {
3520
- describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
3521
- type: "string"
3522
- }).option("format", {
3523
- alias: ["f"],
3524
- describe: "Output format",
3525
- default: "yaml",
3526
- choices: ["yaml", "json"],
3527
- type: "string"
3528
- }).option("mode", {
3529
- alias: ["m"],
3530
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
3531
- choices: ["create", "createOrUpdate", "mirror"],
3532
- default: "mirror",
3533
- type: "string"
3534
- }),
3535
- "component"
3536
- )
3506
+ yargs43.positional("directory", {
3507
+ describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
3508
+ type: "string"
3509
+ }).option("format", {
3510
+ alias: ["f"],
3511
+ describe: "Output format",
3512
+ default: "yaml",
3513
+ choices: ["yaml", "json"],
3514
+ type: "string"
3515
+ }).option("mode", {
3516
+ alias: ["m"],
3517
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
3518
+ choices: ["create", "createOrUpdate", "mirror"],
3519
+ default: "mirror",
3520
+ type: "string"
3521
+ })
3537
3522
  )
3538
3523
  )
3539
3524
  )
@@ -3550,16 +3535,11 @@ var ComponentPullModule = {
3550
3535
  project: projectId,
3551
3536
  diff: diffMode,
3552
3537
  allowEmptySource,
3553
- verbose,
3554
- resolvedBatchSize
3538
+ verbose
3555
3539
  }) => {
3556
3540
  const fetch2 = nodeFetchProxy(proxy, verbose);
3557
3541
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
3558
- const source = createComponentDefinitionEngineDataSource({
3559
- client,
3560
- batchSize: resolvedBatchSize,
3561
- verbose
3562
- });
3542
+ const source = createComponentDefinitionEngineDataSource({ client });
3563
3543
  let target;
3564
3544
  const isPackage = isPathAPackageFile(directory);
3565
3545
  if (isPackage) {
@@ -3604,19 +3584,16 @@ var ComponentPushModule = {
3604
3584
  withDebugOptions(
3605
3585
  withProjectOptions(
3606
3586
  withDiffOptions(
3607
- withBatchSizeOptions(
3608
- yargs43.positional("directory", {
3609
- describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
3610
- type: "string"
3611
- }).option("mode", {
3612
- alias: ["m"],
3613
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
3614
- choices: ["create", "createOrUpdate", "mirror"],
3615
- default: "mirror",
3616
- type: "string"
3617
- }),
3618
- "component"
3619
- )
3587
+ yargs43.positional("directory", {
3588
+ describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
3589
+ type: "string"
3590
+ }).option("mode", {
3591
+ alias: ["m"],
3592
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
3593
+ choices: ["create", "createOrUpdate", "mirror"],
3594
+ default: "mirror",
3595
+ type: "string"
3596
+ })
3620
3597
  )
3621
3598
  )
3622
3599
  )
@@ -3632,8 +3609,7 @@ var ComponentPushModule = {
3632
3609
  project: projectId,
3633
3610
  diff: diffMode,
3634
3611
  allowEmptySource,
3635
- verbose,
3636
- resolvedBatchSize
3612
+ verbose
3637
3613
  }) => {
3638
3614
  const fetch2 = nodeFetchProxy(proxy, verbose);
3639
3615
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -3656,11 +3632,7 @@ var ComponentPushModule = {
3656
3632
  verbose
3657
3633
  });
3658
3634
  }
3659
- const target = createComponentDefinitionEngineDataSource({
3660
- client,
3661
- batchSize: resolvedBatchSize,
3662
- verbose
3663
- });
3635
+ const target = createComponentDefinitionEngineDataSource({ client });
3664
3636
  await syncEngine({
3665
3637
  source,
3666
3638
  target,
@@ -4114,7 +4086,6 @@ function createComponentInstanceEngineDataSource({
4114
4086
  onlyPatterns,
4115
4087
  patternType,
4116
4088
  verbose,
4117
- batchSize,
4118
4089
  ...clientOptions
4119
4090
  }) {
4120
4091
  const stateId = convertStateOption(state);
@@ -4138,7 +4109,7 @@ function createComponentInstanceEngineDataSource({
4138
4109
  }
4139
4110
  return (await client.getCompositionList(parameters)).compositions;
4140
4111
  },
4141
- { pageSize: batchSize ?? 100, verbose, entityName: "compositions" }
4112
+ { pageSize: 100 }
4142
4113
  );
4143
4114
  for await (const compositionListItem of componentInstances) {
4144
4115
  const result = {
@@ -4177,27 +4148,24 @@ var CompositionPublishModule = {
4177
4148
  withProjectOptions(
4178
4149
  withDebugOptions(
4179
4150
  withDiffOptions(
4180
- withBatchSizeOptions(
4181
- yargs43.positional("ids", {
4182
- describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4183
- type: "string"
4184
- }).option("all", {
4185
- alias: ["a"],
4186
- describe: "Publishes all compositions. Use compositionId to publish one instead.",
4187
- default: false,
4188
- type: "boolean"
4189
- }).option("onlyCompositions", {
4190
- describe: "Only publishing compositions and not patterns",
4191
- default: false,
4192
- type: "boolean"
4193
- }).option("onlyPatterns", {
4194
- describe: "Only pulling patterns and not compositions",
4195
- default: false,
4196
- type: "boolean",
4197
- hidden: true
4198
- }),
4199
- "composition"
4200
- )
4151
+ yargs43.positional("ids", {
4152
+ describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4153
+ type: "string"
4154
+ }).option("all", {
4155
+ alias: ["a"],
4156
+ describe: "Publishes all compositions. Use compositionId to publish one instead.",
4157
+ default: false,
4158
+ type: "boolean"
4159
+ }).option("onlyCompositions", {
4160
+ describe: "Only publishing compositions and not patterns",
4161
+ default: false,
4162
+ type: "boolean"
4163
+ }).option("onlyPatterns", {
4164
+ describe: "Only pulling patterns and not compositions",
4165
+ default: false,
4166
+ type: "boolean",
4167
+ hidden: true
4168
+ })
4201
4169
  )
4202
4170
  )
4203
4171
  )
@@ -4215,8 +4183,7 @@ var CompositionPublishModule = {
4215
4183
  onlyPatterns,
4216
4184
  patternType,
4217
4185
  verbose,
4218
- directory,
4219
- resolvedBatchSize
4186
+ directory
4220
4187
  }) => {
4221
4188
  if (!all && !ids || all && ids) {
4222
4189
  console.error(`Specify --all or composition ID(s) to publish.`);
@@ -4232,8 +4199,7 @@ var CompositionPublishModule = {
4232
4199
  onlyCompositions,
4233
4200
  onlyPatterns,
4234
4201
  patternType,
4235
- verbose,
4236
- batchSize: resolvedBatchSize
4202
+ verbose
4237
4203
  });
4238
4204
  const target = createComponentInstanceEngineDataSource({
4239
4205
  client,
@@ -4242,8 +4208,7 @@ var CompositionPublishModule = {
4242
4208
  onlyCompositions,
4243
4209
  onlyPatterns,
4244
4210
  patternType,
4245
- verbose,
4246
- batchSize: resolvedBatchSize
4211
+ verbose
4247
4212
  });
4248
4213
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4249
4214
  await syncEngine({
@@ -4281,36 +4246,33 @@ var ComponentPatternPublishModule = {
4281
4246
  withDebugOptions(
4282
4247
  withProjectOptions(
4283
4248
  withDiffOptions(
4284
- withBatchSizeOptions(
4285
- yargs43.positional("ids", {
4286
- describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4287
- type: "string"
4288
- }).option("all", {
4289
- alias: ["a"],
4290
- describe: "Publishes all component patterns. Use compositionId to publish one instead.",
4291
- default: false,
4292
- type: "boolean"
4293
- }).option("publishingState", {
4294
- describe: 'Publishing state to update to. Can be "published" or "preview".',
4295
- default: "published",
4296
- type: "string",
4297
- hidden: true
4298
- }).option("onlyCompositions", {
4299
- describe: "Only publishing compositions and not component patterns",
4300
- default: false,
4301
- type: "boolean"
4302
- }).option("onlyPatterns", {
4303
- describe: "Only pulling component patterns and not compositions",
4304
- default: true,
4305
- type: "boolean",
4306
- hidden: true
4307
- }).option("patternType", {
4308
- default: "component",
4309
- choices: ["all", "component", "composition"],
4310
- hidden: true
4311
- }),
4312
- "componentPattern"
4313
- )
4249
+ yargs43.positional("ids", {
4250
+ describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4251
+ type: "string"
4252
+ }).option("all", {
4253
+ alias: ["a"],
4254
+ describe: "Publishes all component patterns. Use compositionId to publish one instead.",
4255
+ default: false,
4256
+ type: "boolean"
4257
+ }).option("publishingState", {
4258
+ describe: 'Publishing state to update to. Can be "published" or "preview".',
4259
+ default: "published",
4260
+ type: "string",
4261
+ hidden: true
4262
+ }).option("onlyCompositions", {
4263
+ describe: "Only publishing compositions and not component patterns",
4264
+ default: false,
4265
+ type: "boolean"
4266
+ }).option("onlyPatterns", {
4267
+ describe: "Only pulling component patterns and not compositions",
4268
+ default: true,
4269
+ type: "boolean",
4270
+ hidden: true
4271
+ }).option("patternType", {
4272
+ default: "component",
4273
+ choices: ["all", "component", "composition"],
4274
+ hidden: true
4275
+ })
4314
4276
  )
4315
4277
  )
4316
4278
  )
@@ -4319,8 +4281,8 @@ var ComponentPatternPublishModule = {
4319
4281
  };
4320
4282
 
4321
4283
  // src/commands/canvas/commands/composition/pull.ts
4322
- var CompositionPullModule = componentInstancePullModuleFactory("compositions", "composition");
4323
- function componentInstancePullModuleFactory(type, entityType) {
4284
+ var CompositionPullModule = componentInstancePullModuleFactory("compositions");
4285
+ function componentInstancePullModuleFactory(type) {
4324
4286
  return {
4325
4287
  command: "pull <directory>",
4326
4288
  describe: "Pulls all compositions to local files in a directory",
@@ -4330,34 +4292,31 @@ function componentInstancePullModuleFactory(type, entityType) {
4330
4292
  withStateOptions(
4331
4293
  withDebugOptions(
4332
4294
  withDiffOptions(
4333
- withBatchSizeOptions(
4334
- yargs43.positional("directory", {
4335
- describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4336
- type: "string"
4337
- }).option("format", {
4338
- alias: ["f"],
4339
- describe: "Output format",
4340
- default: "yaml",
4341
- choices: ["yaml", "json"],
4342
- type: "string"
4343
- }).option("onlyCompositions", {
4344
- describe: "Only pulling compositions and not patterns",
4345
- default: false,
4346
- type: "boolean"
4347
- }).option("onlyPatterns", {
4348
- describe: "Only pulling patterns and not compositions",
4349
- default: false,
4350
- type: "boolean",
4351
- hidden: true
4352
- }).option("mode", {
4353
- alias: ["m"],
4354
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
4355
- choices: ["create", "createOrUpdate", "mirror"],
4356
- default: "mirror",
4357
- type: "string"
4358
- }),
4359
- entityType
4360
- )
4295
+ yargs43.positional("directory", {
4296
+ describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4297
+ type: "string"
4298
+ }).option("format", {
4299
+ alias: ["f"],
4300
+ describe: "Output format",
4301
+ default: "yaml",
4302
+ choices: ["yaml", "json"],
4303
+ type: "string"
4304
+ }).option("onlyCompositions", {
4305
+ describe: "Only pulling compositions and not patterns",
4306
+ default: false,
4307
+ type: "boolean"
4308
+ }).option("onlyPatterns", {
4309
+ describe: "Only pulling patterns and not compositions",
4310
+ default: false,
4311
+ type: "boolean",
4312
+ hidden: true
4313
+ }).option("mode", {
4314
+ alias: ["m"],
4315
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
4316
+ choices: ["create", "createOrUpdate", "mirror"],
4317
+ default: "mirror",
4318
+ type: "string"
4319
+ })
4361
4320
  )
4362
4321
  )
4363
4322
  )
@@ -4379,8 +4338,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4379
4338
  project: projectId,
4380
4339
  diff: diffMode,
4381
4340
  allowEmptySource,
4382
- verbose,
4383
- resolvedBatchSize
4341
+ verbose
4384
4342
  }) => {
4385
4343
  const fetch2 = nodeFetchProxy(proxy, verbose);
4386
4344
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4391,8 +4349,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4391
4349
  onlyCompositions,
4392
4350
  onlyPatterns,
4393
4351
  patternType,
4394
- verbose,
4395
- batchSize: resolvedBatchSize
4352
+ verbose
4396
4353
  });
4397
4354
  const isPackage = isPathAPackageFile(directory);
4398
4355
  let target;
@@ -4448,7 +4405,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4448
4405
 
4449
4406
  // src/commands/canvas/commands/componentPattern/pull.ts
4450
4407
  var ComponentPatternPullModule = {
4451
- ...componentInstancePullModuleFactory("componentPatterns", "componentPattern"),
4408
+ ...componentInstancePullModuleFactory("componentPatterns"),
4452
4409
  describe: "Pulls all component patterns to local files in a directory",
4453
4410
  builder: (yargs43) => withConfiguration(
4454
4411
  withApiOptions(
@@ -4525,8 +4482,8 @@ function createLocaleValidationHook(uniformLocales) {
4525
4482
  }
4526
4483
 
4527
4484
  // src/commands/canvas/commands/composition/push.ts
4528
- var CompositionPushModule = componentInstancePushModuleFactory("compositions", "composition");
4529
- function componentInstancePushModuleFactory(type, entityType) {
4485
+ var CompositionPushModule = componentInstancePushModuleFactory("compositions");
4486
+ function componentInstancePushModuleFactory(type) {
4530
4487
  return {
4531
4488
  command: "push <directory>",
4532
4489
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
@@ -4536,28 +4493,25 @@ function componentInstancePushModuleFactory(type, entityType) {
4536
4493
  withStateOptions(
4537
4494
  withDebugOptions(
4538
4495
  withDiffOptions(
4539
- withBatchSizeOptions(
4540
- yargs43.positional("directory", {
4541
- describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4542
- type: "string"
4543
- }).option("mode", {
4544
- alias: ["m"],
4545
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
4546
- choices: ["create", "createOrUpdate", "mirror"],
4547
- default: "mirror",
4548
- type: "string"
4549
- }).option("onlyCompositions", {
4550
- describe: "Only pulling compositions and not patterns",
4551
- default: false,
4552
- type: "boolean"
4553
- }).option("onlyPatterns", {
4554
- // backwards compatibility
4555
- default: false,
4556
- type: "boolean",
4557
- hidden: true
4558
- }),
4559
- entityType
4560
- )
4496
+ yargs43.positional("directory", {
4497
+ describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4498
+ type: "string"
4499
+ }).option("mode", {
4500
+ alias: ["m"],
4501
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
4502
+ choices: ["create", "createOrUpdate", "mirror"],
4503
+ default: "mirror",
4504
+ type: "string"
4505
+ }).option("onlyCompositions", {
4506
+ describe: "Only pulling compositions and not patterns",
4507
+ default: false,
4508
+ type: "boolean"
4509
+ }).option("onlyPatterns", {
4510
+ // backwards compatibility
4511
+ default: false,
4512
+ type: "boolean",
4513
+ hidden: true
4514
+ })
4561
4515
  )
4562
4516
  )
4563
4517
  )
@@ -4578,8 +4532,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4578
4532
  patternType,
4579
4533
  diff: diffMode,
4580
4534
  allowEmptySource,
4581
- verbose,
4582
- resolvedBatchSize
4535
+ verbose
4583
4536
  }) => {
4584
4537
  const fetch2 = nodeFetchProxy(proxy, verbose);
4585
4538
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4607,8 +4560,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4607
4560
  onlyCompositions,
4608
4561
  onlyPatterns,
4609
4562
  patternType,
4610
- verbose,
4611
- batchSize: resolvedBatchSize
4563
+ verbose
4612
4564
  });
4613
4565
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4614
4566
  const uniformLocales = await fetchUniformLocales({
@@ -4653,7 +4605,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4653
4605
 
4654
4606
  // src/commands/canvas/commands/componentPattern/push.ts
4655
4607
  var ComponentPatternPushModule = {
4656
- ...componentInstancePushModuleFactory("componentPatterns", "componentPattern"),
4608
+ ...componentInstancePushModuleFactory("componentPatterns"),
4657
4609
  describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
4658
4610
  builder: (yargs43) => withConfiguration(
4659
4611
  withApiOptions(
@@ -4761,27 +4713,24 @@ var CompositionUnpublishModule = {
4761
4713
  withApiOptions(
4762
4714
  withDebugOptions(
4763
4715
  withProjectOptions(
4764
- withBatchSizeOptions(
4765
- yargs43.positional("ids", {
4766
- describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4767
- type: "string"
4768
- }).option("all", {
4769
- alias: ["a"],
4770
- describe: "Un-publishes all compositions. Use composition ID(s) to unpublish specific one(s) instead.",
4771
- default: false,
4772
- type: "boolean"
4773
- }).option("onlyCompositions", {
4774
- describe: "Only un-publishing compositions and not patterns",
4775
- default: false,
4776
- type: "boolean"
4777
- }).option("onlyPatterns", {
4778
- describe: "Only un-publishing patterns and not compositions",
4779
- default: false,
4780
- type: "boolean",
4781
- hidden: true
4782
- }),
4783
- "composition"
4784
- )
4716
+ yargs43.positional("ids", {
4717
+ describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4718
+ type: "string"
4719
+ }).option("all", {
4720
+ alias: ["a"],
4721
+ describe: "Un-publishes all compositions. Use composition ID(s) to unpublish specific one(s) instead.",
4722
+ default: false,
4723
+ type: "boolean"
4724
+ }).option("onlyCompositions", {
4725
+ describe: "Only un-publishing compositions and not patterns",
4726
+ default: false,
4727
+ type: "boolean"
4728
+ }).option("onlyPatterns", {
4729
+ describe: "Only un-publishing patterns and not compositions",
4730
+ default: false,
4731
+ type: "boolean",
4732
+ hidden: true
4733
+ })
4785
4734
  )
4786
4735
  )
4787
4736
  )
@@ -4797,8 +4746,7 @@ var CompositionUnpublishModule = {
4797
4746
  patternType,
4798
4747
  project: projectId,
4799
4748
  whatIf,
4800
- verbose,
4801
- resolvedBatchSize
4749
+ verbose
4802
4750
  }) => {
4803
4751
  if (!all && !ids || all && ids) {
4804
4752
  console.error(`Specify --all or composition ID(s) to unpublish.`);
@@ -4815,8 +4763,7 @@ var CompositionUnpublishModule = {
4815
4763
  onlyCompositions,
4816
4764
  onlyPatterns,
4817
4765
  patternType,
4818
- verbose,
4819
- batchSize: resolvedBatchSize
4766
+ verbose
4820
4767
  });
4821
4768
  const target = createComponentInstanceEngineDataSource({
4822
4769
  client,
@@ -4825,8 +4772,7 @@ var CompositionUnpublishModule = {
4825
4772
  onlyCompositions,
4826
4773
  onlyPatterns,
4827
4774
  patternType,
4828
- verbose,
4829
- batchSize: resolvedBatchSize
4775
+ verbose
4830
4776
  });
4831
4777
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
4832
4778
  for await (const obj of target.objects) {
@@ -5065,37 +5011,34 @@ var CompositionPatternPublishModule = {
5065
5011
  withDebugOptions(
5066
5012
  withProjectOptions(
5067
5013
  withDiffOptions(
5068
- withBatchSizeOptions(
5069
- yargs43.positional("ids", {
5070
- describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
5071
- type: "string"
5072
- }).option("all", {
5073
- alias: ["a"],
5074
- describe: "Publishes all composition patterns. Use compositionId to publish one instead.",
5075
- default: false,
5076
- type: "boolean"
5077
- }).option("publishingState", {
5078
- describe: 'Publishing state to update to. Can be "published" or "preview".',
5079
- default: "published",
5080
- type: "string",
5081
- hidden: true
5082
- }).option("onlyCompositions", {
5083
- describe: "Only publishing compositions and not composition patterns",
5084
- default: false,
5085
- type: "boolean",
5086
- hidden: true
5087
- }).option("patternType", {
5088
- default: "composition",
5089
- choices: ["all", "component", "composition"],
5090
- hidden: true
5091
- }).option("onlyPatterns", {
5092
- describe: "Only pulling composition patterns and not compositions",
5093
- default: true,
5094
- type: "boolean",
5095
- hidden: true
5096
- }),
5097
- "compositionPattern"
5098
- )
5014
+ yargs43.positional("ids", {
5015
+ describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
5016
+ type: "string"
5017
+ }).option("all", {
5018
+ alias: ["a"],
5019
+ describe: "Publishes all composition patterns. Use compositionId to publish one instead.",
5020
+ default: false,
5021
+ type: "boolean"
5022
+ }).option("publishingState", {
5023
+ describe: 'Publishing state to update to. Can be "published" or "preview".',
5024
+ default: "published",
5025
+ type: "string",
5026
+ hidden: true
5027
+ }).option("onlyCompositions", {
5028
+ describe: "Only publishing compositions and not composition patterns",
5029
+ default: false,
5030
+ type: "boolean",
5031
+ hidden: true
5032
+ }).option("patternType", {
5033
+ default: "composition",
5034
+ choices: ["all", "component", "composition"],
5035
+ hidden: true
5036
+ }).option("onlyPatterns", {
5037
+ describe: "Only pulling composition patterns and not compositions",
5038
+ default: true,
5039
+ type: "boolean",
5040
+ hidden: true
5041
+ })
5099
5042
  )
5100
5043
  )
5101
5044
  )
@@ -5105,7 +5048,7 @@ var CompositionPatternPublishModule = {
5105
5048
 
5106
5049
  // src/commands/canvas/commands/compositionPattern/pull.ts
5107
5050
  var CompositionPatternPullModule = {
5108
- ...componentInstancePullModuleFactory("compositionPatterns", "compositionPattern"),
5051
+ ...componentInstancePullModuleFactory("compositionPatterns"),
5109
5052
  describe: "Pulls all composition patterns to local files in a directory",
5110
5053
  builder: (yargs43) => withConfiguration(
5111
5054
  withApiOptions(
@@ -5149,7 +5092,7 @@ var CompositionPatternPullModule = {
5149
5092
 
5150
5093
  // src/commands/canvas/commands/compositionPattern/push.ts
5151
5094
  var CompositionPatternPushModule = {
5152
- ...componentInstancePushModuleFactory("compositionPatterns", "compositionPattern"),
5095
+ ...componentInstancePushModuleFactory("compositionPatterns"),
5153
5096
  describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
5154
5097
  builder: (yargs43) => withConfiguration(
5155
5098
  withApiOptions(
@@ -5300,15 +5243,10 @@ var ContentTypeListModule = {
5300
5243
 
5301
5244
  // src/commands/canvas/contentTypeEngineDataSource.ts
5302
5245
  function createContentTypeEngineDataSource({
5303
- client,
5304
- batchSize,
5305
- verbose
5246
+ client
5306
5247
  }) {
5307
5248
  async function* getObjects() {
5308
- const contentTypes = paginateAsync(
5309
- async (offset, limit2) => (await client.getContentTypes({ offset, limit: limit2 })).contentTypes,
5310
- { pageSize: batchSize ?? 100, verbose, entityName: "content types" }
5311
- );
5249
+ const { contentTypes } = await client.getContentTypes({ offset: 0, limit: 1e3 });
5312
5250
  for await (const ct of contentTypes) {
5313
5251
  const result = {
5314
5252
  id: selectContentTypeIdentifier(ct),
@@ -5340,25 +5278,22 @@ var ContentTypePullModule = {
5340
5278
  withDebugOptions(
5341
5279
  withProjectOptions(
5342
5280
  withDiffOptions(
5343
- withBatchSizeOptions(
5344
- yargs43.positional("directory", {
5345
- describe: "Directory to save the content types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5346
- type: "string"
5347
- }).option("format", {
5348
- alias: ["f"],
5349
- describe: "Output format",
5350
- default: "yaml",
5351
- choices: ["yaml", "json"],
5352
- type: "string"
5353
- }).option("mode", {
5354
- alias: ["m"],
5355
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
5356
- choices: ["create", "createOrUpdate", "mirror"],
5357
- default: "mirror",
5358
- type: "string"
5359
- }),
5360
- "contentType"
5361
- )
5281
+ yargs43.positional("directory", {
5282
+ describe: "Directory to save the content types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5283
+ type: "string"
5284
+ }).option("format", {
5285
+ alias: ["f"],
5286
+ describe: "Output format",
5287
+ default: "yaml",
5288
+ choices: ["yaml", "json"],
5289
+ type: "string"
5290
+ }).option("mode", {
5291
+ alias: ["m"],
5292
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
5293
+ choices: ["create", "createOrUpdate", "mirror"],
5294
+ default: "mirror",
5295
+ type: "string"
5296
+ })
5362
5297
  )
5363
5298
  )
5364
5299
  )
@@ -5375,8 +5310,7 @@ var ContentTypePullModule = {
5375
5310
  project: projectId,
5376
5311
  diff: diffMode,
5377
5312
  allowEmptySource,
5378
- verbose,
5379
- resolvedBatchSize
5313
+ verbose
5380
5314
  }) => {
5381
5315
  const fetch2 = nodeFetchProxy(proxy, verbose);
5382
5316
  const client = getContentClient({
@@ -5385,11 +5319,7 @@ var ContentTypePullModule = {
5385
5319
  fetch: fetch2,
5386
5320
  projectId
5387
5321
  });
5388
- const source = createContentTypeEngineDataSource({
5389
- client,
5390
- verbose,
5391
- batchSize: resolvedBatchSize
5392
- });
5322
+ const source = createContentTypeEngineDataSource({ client });
5393
5323
  let target;
5394
5324
  const isPackage = isPathAPackageFile(directory);
5395
5325
  if (isPackage) {
@@ -5433,24 +5363,21 @@ var ContentTypePushModule = {
5433
5363
  withDebugOptions(
5434
5364
  withProjectOptions(
5435
5365
  withDiffOptions(
5436
- withBatchSizeOptions(
5437
- yargs43.positional("directory", {
5438
- describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
5439
- type: "string"
5440
- }).option("what-if", {
5441
- alias: ["w"],
5442
- describe: "What-if mode reports what would be done but changes nothing",
5443
- default: false,
5444
- type: "boolean"
5445
- }).option("mode", {
5446
- alias: ["m"],
5447
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
5448
- choices: ["create", "createOrUpdate", "mirror"],
5449
- default: "mirror",
5450
- type: "string"
5451
- }),
5452
- "contentType"
5453
- )
5366
+ yargs43.positional("directory", {
5367
+ describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
5368
+ type: "string"
5369
+ }).option("what-if", {
5370
+ alias: ["w"],
5371
+ describe: "What-if mode reports what would be done but changes nothing",
5372
+ default: false,
5373
+ type: "boolean"
5374
+ }).option("mode", {
5375
+ alias: ["m"],
5376
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
5377
+ choices: ["create", "createOrUpdate", "mirror"],
5378
+ default: "mirror",
5379
+ type: "string"
5380
+ })
5454
5381
  )
5455
5382
  )
5456
5383
  )
@@ -5466,8 +5393,7 @@ var ContentTypePushModule = {
5466
5393
  project: projectId,
5467
5394
  diff: diffMode,
5468
5395
  allowEmptySource,
5469
- verbose,
5470
- resolvedBatchSize
5396
+ verbose
5471
5397
  }) => {
5472
5398
  const fetch2 = nodeFetchProxy(proxy, verbose);
5473
5399
  const client = getContentClient({
@@ -5494,11 +5420,7 @@ var ContentTypePushModule = {
5494
5420
  verbose
5495
5421
  });
5496
5422
  }
5497
- const target = createContentTypeEngineDataSource({
5498
- client,
5499
- verbose,
5500
- batchSize: resolvedBatchSize
5501
- });
5423
+ const target = createContentTypeEngineDataSource({ client });
5502
5424
  await syncEngine({
5503
5425
  source,
5504
5426
  target,
@@ -6166,9 +6088,7 @@ function createEntryEngineDataSource({
6166
6088
  state,
6167
6089
  onlyEntries,
6168
6090
  onlyPatterns,
6169
- entryIDs,
6170
- batchSize,
6171
- verbose
6091
+ entryIDs
6172
6092
  }) {
6173
6093
  const stateId = convertStateOption(state);
6174
6094
  async function* getObjects() {
@@ -6194,7 +6114,7 @@ function createEntryEngineDataSource({
6194
6114
  throw error;
6195
6115
  }
6196
6116
  },
6197
- { pageSize: batchSize ?? 100, verbose, entityName: "entries" }
6117
+ { pageSize: 100 }
6198
6118
  );
6199
6119
  for await (const e of entries) {
6200
6120
  const result = {
@@ -6227,18 +6147,15 @@ var EntryPublishModule = {
6227
6147
  withDiffOptions(
6228
6148
  withApiOptions(
6229
6149
  withProjectOptions(
6230
- withBatchSizeOptions(
6231
- yargs43.positional("ids", {
6232
- describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6233
- type: "string"
6234
- }).option("all", {
6235
- alias: ["a"],
6236
- describe: "Publishes all entries. Use --ids to publish selected entries instead.",
6237
- default: false,
6238
- type: "boolean"
6239
- }),
6240
- "entry"
6241
- )
6150
+ yargs43.positional("ids", {
6151
+ describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6152
+ type: "string"
6153
+ }).option("all", {
6154
+ alias: ["a"],
6155
+ describe: "Publishes all entries. Use --ids to publish selected entries instead.",
6156
+ default: false,
6157
+ type: "boolean"
6158
+ })
6242
6159
  )
6243
6160
  )
6244
6161
  )
@@ -6254,8 +6171,7 @@ var EntryPublishModule = {
6254
6171
  project: projectId,
6255
6172
  whatIf,
6256
6173
  verbose,
6257
- directory,
6258
- resolvedBatchSize
6174
+ directory
6259
6175
  }) => {
6260
6176
  if (!all && !ids || all && ids) {
6261
6177
  console.error(`Specify --all or entry ID(s) to publish.`);
@@ -6268,15 +6184,13 @@ var EntryPublishModule = {
6268
6184
  client,
6269
6185
  state: "preview",
6270
6186
  entryIDs: entryIDsArray,
6271
- onlyEntries: true,
6272
- batchSize: resolvedBatchSize
6187
+ onlyEntries: true
6273
6188
  });
6274
6189
  const target = createEntryEngineDataSource({
6275
6190
  client,
6276
6191
  state: "published",
6277
6192
  entryIDs: entryIDsArray,
6278
- onlyEntries: true,
6279
- batchSize: resolvedBatchSize
6193
+ onlyEntries: true
6280
6194
  });
6281
6195
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6282
6196
  await syncEngine({
@@ -6314,25 +6228,22 @@ var EntryPullModule = {
6314
6228
  withProjectOptions(
6315
6229
  withStateOptions(
6316
6230
  withDiffOptions(
6317
- withBatchSizeOptions(
6318
- yargs43.positional("directory", {
6319
- describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6320
- type: "string"
6321
- }).option("format", {
6322
- alias: ["f"],
6323
- describe: "Output format",
6324
- default: "yaml",
6325
- choices: ["yaml", "json"],
6326
- type: "string"
6327
- }).option("mode", {
6328
- alias: ["m"],
6329
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
6330
- choices: ["create", "createOrUpdate", "mirror"],
6331
- default: "mirror",
6332
- type: "string"
6333
- }),
6334
- "entry"
6335
- )
6231
+ yargs43.positional("directory", {
6232
+ describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6233
+ type: "string"
6234
+ }).option("format", {
6235
+ alias: ["f"],
6236
+ describe: "Output format",
6237
+ default: "yaml",
6238
+ choices: ["yaml", "json"],
6239
+ type: "string"
6240
+ }).option("mode", {
6241
+ alias: ["m"],
6242
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
6243
+ choices: ["create", "createOrUpdate", "mirror"],
6244
+ default: "mirror",
6245
+ type: "string"
6246
+ })
6336
6247
  )
6337
6248
  )
6338
6249
  )
@@ -6351,8 +6262,7 @@ var EntryPullModule = {
6351
6262
  project: projectId,
6352
6263
  diff: diffMode,
6353
6264
  allowEmptySource,
6354
- verbose,
6355
- resolvedBatchSize
6265
+ verbose
6356
6266
  }) => {
6357
6267
  const fetch2 = nodeFetchProxy(proxy, verbose);
6358
6268
  const client = getContentClient({
@@ -6362,13 +6272,7 @@ var EntryPullModule = {
6362
6272
  projectId
6363
6273
  });
6364
6274
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6365
- const source = createEntryEngineDataSource({
6366
- client,
6367
- state,
6368
- onlyEntries: true,
6369
- verbose,
6370
- batchSize: resolvedBatchSize
6371
- });
6275
+ const source = createEntryEngineDataSource({ client, state, onlyEntries: true });
6372
6276
  let target;
6373
6277
  const isPackage = isPathAPackageFile(directory);
6374
6278
  if (isPackage) {
@@ -6430,19 +6334,16 @@ var EntryPushModule = {
6430
6334
  withProjectOptions(
6431
6335
  withStateOptions(
6432
6336
  withDiffOptions(
6433
- withBatchSizeOptions(
6434
- yargs43.positional("directory", {
6435
- describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
6436
- type: "string"
6437
- }).option("mode", {
6438
- alias: ["m"],
6439
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
6440
- choices: ["create", "createOrUpdate", "mirror"],
6441
- default: "mirror",
6442
- type: "string"
6443
- }),
6444
- "entry"
6445
- )
6337
+ yargs43.positional("directory", {
6338
+ describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
6339
+ type: "string"
6340
+ }).option("mode", {
6341
+ alias: ["m"],
6342
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
6343
+ choices: ["create", "createOrUpdate", "mirror"],
6344
+ default: "mirror",
6345
+ type: "string"
6346
+ })
6446
6347
  )
6447
6348
  )
6448
6349
  )
@@ -6460,8 +6361,7 @@ var EntryPushModule = {
6460
6361
  project: projectId,
6461
6362
  diff: diffMode,
6462
6363
  allowEmptySource,
6463
- verbose,
6464
- resolvedBatchSize
6364
+ verbose
6465
6365
  }) => {
6466
6366
  const fetch2 = nodeFetchProxy(proxy, verbose);
6467
6367
  const client = getContentClient({
@@ -6488,13 +6388,7 @@ var EntryPushModule = {
6488
6388
  verbose
6489
6389
  });
6490
6390
  }
6491
- const target = createEntryEngineDataSource({
6492
- client,
6493
- state,
6494
- onlyEntries: true,
6495
- verbose,
6496
- batchSize: resolvedBatchSize
6497
- });
6391
+ const target = createEntryEngineDataSource({ client, state, onlyEntries: true });
6498
6392
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6499
6393
  const uniformLocales = await fetchUniformLocales({
6500
6394
  apiKey,
@@ -6592,33 +6486,20 @@ var EntryUnpublishModule = {
6592
6486
  withDebugOptions(
6593
6487
  withApiOptions(
6594
6488
  withProjectOptions(
6595
- withBatchSizeOptions(
6596
- yargs43.positional("ids", {
6597
- describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6598
- type: "string"
6599
- }).option("all", {
6600
- alias: ["a"],
6601
- describe: "Un-publishes all entries. Use --all to un-publish selected entries instead.",
6602
- default: false,
6603
- type: "boolean"
6604
- }),
6605
- "entry"
6606
- )
6489
+ yargs43.positional("ids", {
6490
+ describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6491
+ type: "string"
6492
+ }).option("all", {
6493
+ alias: ["a"],
6494
+ describe: "Un-publishes all entries. Use --all to un-publish selected entries instead.",
6495
+ default: false,
6496
+ type: "boolean"
6497
+ })
6607
6498
  )
6608
6499
  )
6609
6500
  )
6610
6501
  ),
6611
- handler: async ({
6612
- apiHost,
6613
- apiKey,
6614
- proxy,
6615
- ids,
6616
- all,
6617
- project: projectId,
6618
- whatIf,
6619
- verbose,
6620
- resolvedBatchSize
6621
- }) => {
6502
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
6622
6503
  if (!all && !ids || all && ids) {
6623
6504
  console.error(`Specify --all or entry ID(s) to unpublish.`);
6624
6505
  process.exit(1);
@@ -6631,15 +6512,13 @@ var EntryUnpublishModule = {
6631
6512
  client,
6632
6513
  state: "published",
6633
6514
  entryIDs: entryIDsArray,
6634
- onlyEntries: true,
6635
- batchSize: resolvedBatchSize
6515
+ onlyEntries: true
6636
6516
  });
6637
6517
  const target = createEntryEngineDataSource({
6638
6518
  client,
6639
6519
  state: "preview",
6640
6520
  entryIDs: entryIDsArray,
6641
- onlyEntries: true,
6642
- batchSize: resolvedBatchSize
6521
+ onlyEntries: true
6643
6522
  });
6644
6523
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
6645
6524
  for await (const obj of target.objects) {
@@ -6857,18 +6736,15 @@ var EntryPatternPublishModule = {
6857
6736
  withApiOptions(
6858
6737
  withProjectOptions(
6859
6738
  withDiffOptions(
6860
- withBatchSizeOptions(
6861
- yargs43.positional("ids", {
6862
- describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6863
- type: "string"
6864
- }).option("all", {
6865
- alias: ["a"],
6866
- describe: "Publishes all entry patterns. Use --ids to publish selected entry patterns instead.",
6867
- default: false,
6868
- type: "boolean"
6869
- }),
6870
- "entryPattern"
6871
- )
6739
+ yargs43.positional("ids", {
6740
+ describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6741
+ type: "string"
6742
+ }).option("all", {
6743
+ alias: ["a"],
6744
+ describe: "Publishes all entry patterns. Use --ids to publish selected entry patterns instead.",
6745
+ default: false,
6746
+ type: "boolean"
6747
+ })
6872
6748
  )
6873
6749
  )
6874
6750
  )
@@ -6884,8 +6760,7 @@ var EntryPatternPublishModule = {
6884
6760
  whatIf,
6885
6761
  project: projectId,
6886
6762
  verbose,
6887
- directory,
6888
- resolvedBatchSize
6763
+ directory
6889
6764
  }) => {
6890
6765
  if (!all && !ids || all && ids) {
6891
6766
  console.error(`Specify --all or entry pattern ID(s) to publish.`);
@@ -6898,15 +6773,13 @@ var EntryPatternPublishModule = {
6898
6773
  client,
6899
6774
  state: "preview",
6900
6775
  entryIDs: entryIDsArray,
6901
- onlyPatterns: true,
6902
- batchSize: resolvedBatchSize
6776
+ onlyPatterns: true
6903
6777
  });
6904
6778
  const target = createEntryEngineDataSource({
6905
6779
  client,
6906
6780
  state: "published",
6907
6781
  entryIDs: entryIDsArray,
6908
- onlyPatterns: true,
6909
- batchSize: resolvedBatchSize
6782
+ onlyPatterns: true
6910
6783
  });
6911
6784
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6912
6785
  await syncEngine({
@@ -6944,25 +6817,22 @@ var EntryPatternPullModule = {
6944
6817
  withProjectOptions(
6945
6818
  withStateOptions(
6946
6819
  withDiffOptions(
6947
- withBatchSizeOptions(
6948
- yargs43.positional("directory", {
6949
- describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6950
- type: "string"
6951
- }).option("format", {
6952
- alias: ["f"],
6953
- describe: "Output format",
6954
- default: "yaml",
6955
- choices: ["yaml", "json"],
6956
- type: "string"
6957
- }).option("mode", {
6958
- alias: ["m"],
6959
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
6960
- choices: ["create", "createOrUpdate", "mirror"],
6961
- default: "mirror",
6962
- type: "string"
6963
- }),
6964
- "entryPattern"
6965
- )
6820
+ yargs43.positional("directory", {
6821
+ describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6822
+ type: "string"
6823
+ }).option("format", {
6824
+ alias: ["f"],
6825
+ describe: "Output format",
6826
+ default: "yaml",
6827
+ choices: ["yaml", "json"],
6828
+ type: "string"
6829
+ }).option("mode", {
6830
+ alias: ["m"],
6831
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
6832
+ choices: ["create", "createOrUpdate", "mirror"],
6833
+ default: "mirror",
6834
+ type: "string"
6835
+ })
6966
6836
  )
6967
6837
  )
6968
6838
  )
@@ -6981,8 +6851,7 @@ var EntryPatternPullModule = {
6981
6851
  project: projectId,
6982
6852
  diff: diffMode,
6983
6853
  allowEmptySource,
6984
- verbose,
6985
- resolvedBatchSize
6854
+ verbose
6986
6855
  }) => {
6987
6856
  const fetch2 = nodeFetchProxy(proxy, verbose);
6988
6857
  const client = getContentClient({
@@ -6992,13 +6861,7 @@ var EntryPatternPullModule = {
6992
6861
  projectId
6993
6862
  });
6994
6863
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6995
- const source = createEntryEngineDataSource({
6996
- client,
6997
- state,
6998
- onlyPatterns: true,
6999
- verbose,
7000
- batchSize: resolvedBatchSize
7001
- });
6864
+ const source = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7002
6865
  let target;
7003
6866
  const isPackage = isPathAPackageFile(directory);
7004
6867
  if (isPackage) {
@@ -7060,24 +6923,21 @@ var EntryPatternPushModule = {
7060
6923
  withProjectOptions(
7061
6924
  withStateOptions(
7062
6925
  withDiffOptions(
7063
- withBatchSizeOptions(
7064
- yargs43.positional("directory", {
7065
- describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
7066
- type: "string"
7067
- }).option("what-if", {
7068
- alias: ["w"],
7069
- describe: "What-if mode reports what would be done but changes nothing",
7070
- default: false,
7071
- type: "boolean"
7072
- }).option("mode", {
7073
- alias: ["m"],
7074
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
7075
- choices: ["create", "createOrUpdate", "mirror"],
7076
- default: "mirror",
7077
- type: "string"
7078
- }),
7079
- "entryPattern"
7080
- )
6926
+ yargs43.positional("directory", {
6927
+ describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
6928
+ type: "string"
6929
+ }).option("what-if", {
6930
+ alias: ["w"],
6931
+ describe: "What-if mode reports what would be done but changes nothing",
6932
+ default: false,
6933
+ type: "boolean"
6934
+ }).option("mode", {
6935
+ alias: ["m"],
6936
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
6937
+ choices: ["create", "createOrUpdate", "mirror"],
6938
+ default: "mirror",
6939
+ type: "string"
6940
+ })
7081
6941
  )
7082
6942
  )
7083
6943
  )
@@ -7095,8 +6955,7 @@ var EntryPatternPushModule = {
7095
6955
  project: projectId,
7096
6956
  diff: diffMode,
7097
6957
  allowEmptySource,
7098
- verbose,
7099
- resolvedBatchSize
6958
+ verbose
7100
6959
  }) => {
7101
6960
  const fetch2 = nodeFetchProxy(proxy, verbose);
7102
6961
  const client = getContentClient({
@@ -7123,13 +6982,7 @@ var EntryPatternPushModule = {
7123
6982
  verbose
7124
6983
  });
7125
6984
  }
7126
- const target = createEntryEngineDataSource({
7127
- client,
7128
- state,
7129
- onlyPatterns: true,
7130
- verbose,
7131
- batchSize: resolvedBatchSize
7132
- });
6985
+ const target = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7133
6986
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
7134
6987
  const uniformLocales = await fetchUniformLocales({
7135
6988
  apiKey,
@@ -7196,33 +7049,20 @@ var EntryPatternUnpublishModule = {
7196
7049
  withDebugOptions(
7197
7050
  withApiOptions(
7198
7051
  withProjectOptions(
7199
- withBatchSizeOptions(
7200
- yargs43.positional("ids", {
7201
- describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
7202
- type: "string"
7203
- }).option("all", {
7204
- alias: ["a"],
7205
- describe: "Un-publishes all entry patterns. Use --all to un-publish selected entry patterns instead.",
7206
- default: false,
7207
- type: "boolean"
7208
- }),
7209
- "entryPattern"
7210
- )
7052
+ yargs43.positional("ids", {
7053
+ describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
7054
+ type: "string"
7055
+ }).option("all", {
7056
+ alias: ["a"],
7057
+ describe: "Un-publishes all entry patterns. Use --all to un-publish selected entry patterns instead.",
7058
+ default: false,
7059
+ type: "boolean"
7060
+ })
7211
7061
  )
7212
7062
  )
7213
7063
  )
7214
7064
  ),
7215
- handler: async ({
7216
- apiHost,
7217
- apiKey,
7218
- proxy,
7219
- ids,
7220
- all,
7221
- project: projectId,
7222
- whatIf,
7223
- verbose,
7224
- resolvedBatchSize
7225
- }) => {
7065
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
7226
7066
  if (!all && !ids || all && ids) {
7227
7067
  console.error(`Specify --all or entry pattern ID(s) to unpublish.`);
7228
7068
  process.exit(1);
@@ -7235,15 +7075,13 @@ var EntryPatternUnpublishModule = {
7235
7075
  client,
7236
7076
  state: "published",
7237
7077
  entryIDs: entryIDsArray,
7238
- onlyPatterns: true,
7239
- batchSize: resolvedBatchSize
7078
+ onlyPatterns: true
7240
7079
  });
7241
7080
  const target = createEntryEngineDataSource({
7242
7081
  client,
7243
7082
  state: "preview",
7244
7083
  entryIDs: entryIDsArray,
7245
- onlyPatterns: true,
7246
- batchSize: resolvedBatchSize
7084
+ onlyPatterns: true
7247
7085
  });
7248
7086
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
7249
7087
  for await (const obj of target.objects) {
@@ -7329,14 +7167,12 @@ function normalizeLabelForSync(label) {
7329
7167
  return labelWithoutProjectId;
7330
7168
  }
7331
7169
  function createLabelsEngineDataSource({
7332
- client,
7333
- batchSize,
7334
- verbose
7170
+ client
7335
7171
  }) {
7336
7172
  async function* getObjects() {
7337
7173
  const labels = paginateAsync(
7338
7174
  async (offset, limit2) => (await client.getLabels({ offset, limit: limit2 })).labels,
7339
- { pageSize: batchSize ?? 100, verbose, entityName: "labels" }
7175
+ { pageSize: 100 }
7340
7176
  );
7341
7177
  for await (const label of labels) {
7342
7178
  const result = {
@@ -7377,25 +7213,22 @@ var LabelPullModule = {
7377
7213
  withApiOptions(
7378
7214
  withProjectOptions(
7379
7215
  withDiffOptions(
7380
- withBatchSizeOptions(
7381
- yargs43.positional("directory", {
7382
- describe: "Directory to save the labels to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
7383
- type: "string"
7384
- }).option("format", {
7385
- alias: ["f"],
7386
- describe: "Output format",
7387
- default: "yaml",
7388
- choices: ["yaml", "json"],
7389
- type: "string"
7390
- }).option("mode", {
7391
- alias: ["m"],
7392
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
7393
- choices: ["create", "createOrUpdate", "mirror"],
7394
- default: "mirror",
7395
- type: "string"
7396
- }),
7397
- "label"
7398
- )
7216
+ yargs43.positional("directory", {
7217
+ describe: "Directory to save the labels to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
7218
+ type: "string"
7219
+ }).option("format", {
7220
+ alias: ["f"],
7221
+ describe: "Output format",
7222
+ default: "yaml",
7223
+ choices: ["yaml", "json"],
7224
+ type: "string"
7225
+ }).option("mode", {
7226
+ alias: ["m"],
7227
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
7228
+ choices: ["create", "createOrUpdate", "mirror"],
7229
+ default: "mirror",
7230
+ type: "string"
7231
+ })
7399
7232
  )
7400
7233
  )
7401
7234
  )
@@ -7412,16 +7245,11 @@ var LabelPullModule = {
7412
7245
  project: projectId,
7413
7246
  diff: diffMode,
7414
7247
  allowEmptySource,
7415
- verbose,
7416
- resolvedBatchSize
7248
+ verbose
7417
7249
  }) => {
7418
7250
  const fetch2 = nodeFetchProxy(proxy, verbose);
7419
7251
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
7420
- const source = createLabelsEngineDataSource({
7421
- client,
7422
- verbose,
7423
- batchSize: resolvedBatchSize
7424
- });
7252
+ const source = createLabelsEngineDataSource({ client });
7425
7253
  let target;
7426
7254
  const isPackage = isPathAPackageFile(directory);
7427
7255
  if (isPackage) {
@@ -7472,19 +7300,16 @@ var LabelPushModule = {
7472
7300
  withApiOptions(
7473
7301
  withProjectOptions(
7474
7302
  withDiffOptions(
7475
- withBatchSizeOptions(
7476
- yargs43.positional("directory", {
7477
- describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
7478
- type: "string"
7479
- }).option("mode", {
7480
- alias: ["m"],
7481
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
7482
- choices: ["create", "createOrUpdate", "mirror"],
7483
- default: "mirror",
7484
- type: "string"
7485
- }),
7486
- "label"
7487
- )
7303
+ yargs43.positional("directory", {
7304
+ describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
7305
+ type: "string"
7306
+ }).option("mode", {
7307
+ alias: ["m"],
7308
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
7309
+ choices: ["create", "createOrUpdate", "mirror"],
7310
+ default: "mirror",
7311
+ type: "string"
7312
+ })
7488
7313
  )
7489
7314
  )
7490
7315
  )
@@ -7500,8 +7325,7 @@ var LabelPushModule = {
7500
7325
  project: projectId,
7501
7326
  diff: diffMode,
7502
7327
  allowEmptySource,
7503
- verbose,
7504
- resolvedBatchSize
7328
+ verbose
7505
7329
  }) => {
7506
7330
  const fetch2 = nodeFetchProxy(proxy, verbose);
7507
7331
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -7524,11 +7348,7 @@ var LabelPushModule = {
7524
7348
  verbose
7525
7349
  });
7526
7350
  }
7527
- const target = createLabelsEngineDataSource({
7528
- client,
7529
- verbose,
7530
- batchSize: resolvedBatchSize
7531
- });
7351
+ const target = createLabelsEngineDataSource({ client });
7532
7352
  const labelsFailedDueToMissingParent = /* @__PURE__ */ new Set();
7533
7353
  const attemptSync = async () => {
7534
7354
  const lastFailedLabelsCount = labelsFailedDueToMissingParent.size;
@@ -8673,15 +8493,11 @@ var getWorkflowClient = (options) => new WorkflowClient({ ...options, bypassCach
8673
8493
 
8674
8494
  // src/commands/canvas/workflowEngineDataSource.ts
8675
8495
  function createWorkflowEngineDataSource({
8676
- client,
8677
- batchSize,
8678
- verbose
8496
+ client
8679
8497
  }) {
8680
8498
  async function* getObjects() {
8681
- const workflows = paginateAsync(async (offset, limit2) => (await client.get({ offset, limit: limit2 })).results, {
8682
- pageSize: batchSize ?? 100,
8683
- verbose,
8684
- entityName: "workflows"
8499
+ const workflows = paginateAsync(async () => (await client.get()).results, {
8500
+ pageSize: 100
8685
8501
  });
8686
8502
  for await (const workflow of workflows) {
8687
8503
  const { modified, modifiedBy, created, createdBy, ...workflowWithoutStatistics } = workflow;
@@ -8715,25 +8531,22 @@ var WorkflowPullModule = {
8715
8531
  withDebugOptions(
8716
8532
  withProjectOptions(
8717
8533
  withDiffOptions(
8718
- withBatchSizeOptions(
8719
- yargs43.positional("directory", {
8720
- describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
8721
- type: "string"
8722
- }).option("format", {
8723
- alias: ["f"],
8724
- describe: "Output format",
8725
- default: "yaml",
8726
- choices: ["yaml", "json"],
8727
- type: "string"
8728
- }).option("mode", {
8729
- alias: ["m"],
8730
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
8731
- choices: ["create", "createOrUpdate", "mirror"],
8732
- default: "mirror",
8733
- type: "string"
8734
- }),
8735
- "workflow"
8736
- )
8534
+ yargs43.positional("directory", {
8535
+ describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
8536
+ type: "string"
8537
+ }).option("format", {
8538
+ alias: ["f"],
8539
+ describe: "Output format",
8540
+ default: "yaml",
8541
+ choices: ["yaml", "json"],
8542
+ type: "string"
8543
+ }).option("mode", {
8544
+ alias: ["m"],
8545
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
8546
+ choices: ["create", "createOrUpdate", "mirror"],
8547
+ default: "mirror",
8548
+ type: "string"
8549
+ })
8737
8550
  )
8738
8551
  )
8739
8552
  )
@@ -8750,16 +8563,11 @@ var WorkflowPullModule = {
8750
8563
  project: projectId,
8751
8564
  diff: diffMode,
8752
8565
  allowEmptySource,
8753
- verbose,
8754
- resolvedBatchSize
8566
+ verbose
8755
8567
  }) => {
8756
8568
  const fetch2 = nodeFetchProxy(proxy, verbose);
8757
8569
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
8758
- const source = createWorkflowEngineDataSource({
8759
- client,
8760
- verbose,
8761
- batchSize: resolvedBatchSize
8762
- });
8570
+ const source = createWorkflowEngineDataSource({ client });
8763
8571
  let target;
8764
8572
  const isPackage = isPathAPackageFile(directory);
8765
8573
  if (isPackage) {
@@ -8803,19 +8611,16 @@ var WorkflowPushModule = {
8803
8611
  withApiOptions(
8804
8612
  withProjectOptions(
8805
8613
  withDiffOptions(
8806
- withBatchSizeOptions(
8807
- yargs43.positional("directory", {
8808
- describe: "Directory to read from. If a filename is used, a package will be read instead.",
8809
- type: "string"
8810
- }).option("mode", {
8811
- alias: ["m"],
8812
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
8813
- choices: ["create", "createOrUpdate", "mirror"],
8814
- default: "mirror",
8815
- type: "string"
8816
- }),
8817
- "workflow"
8818
- )
8614
+ yargs43.positional("directory", {
8615
+ describe: "Directory to read from. If a filename is used, a package will be read instead.",
8616
+ type: "string"
8617
+ }).option("mode", {
8618
+ alias: ["m"],
8619
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
8620
+ choices: ["create", "createOrUpdate", "mirror"],
8621
+ default: "mirror",
8622
+ type: "string"
8623
+ })
8819
8624
  )
8820
8625
  )
8821
8626
  )
@@ -8831,8 +8636,7 @@ var WorkflowPushModule = {
8831
8636
  project: projectId,
8832
8637
  diff: diffMode,
8833
8638
  allowEmptySource,
8834
- verbose,
8835
- resolvedBatchSize
8639
+ verbose
8836
8640
  }) => {
8837
8641
  const fetch2 = nodeFetchProxy(proxy, verbose);
8838
8642
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -8854,11 +8658,7 @@ var WorkflowPushModule = {
8854
8658
  verbose
8855
8659
  });
8856
8660
  }
8857
- const target = createWorkflowEngineDataSource({
8858
- client,
8859
- verbose,
8860
- batchSize: resolvedBatchSize
8861
- });
8661
+ const target = createWorkflowEngineDataSource({ client });
8862
8662
  await syncEngine({
8863
8663
  source,
8864
8664
  target,
@@ -13214,8 +13014,7 @@ var SyncPullModule = {
13214
13014
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13215
13015
  mode: getPullMode(entityType, config2),
13216
13016
  directory: getPullFilename(entityType, config2),
13217
- allowEmptySource: config2.allowEmptySource,
13218
- ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13017
+ allowEmptySource: config2.allowEmptySource
13219
13018
  }),
13220
13019
  {
13221
13020
  text: `${entityType}\u2026`,
@@ -13380,8 +13179,7 @@ var SyncPushModule = {
13380
13179
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13381
13180
  mode: getPushMode(entityType, config2),
13382
13181
  directory: getPushFilename(entityType, config2),
13383
- allowEmptySource: config2.allowEmptySource,
13384
- ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13182
+ allowEmptySource: config2.allowEmptySource
13385
13183
  }),
13386
13184
  {
13387
13185
  text: `${entityType}...`,
@@ -13402,7 +13200,6 @@ var SyncPushModule = {
13402
13200
  await spinPromise(
13403
13201
  ComponentPatternPublishModule.handler({
13404
13202
  ...otherParams,
13405
- serialization: config2,
13406
13203
  patternType: "component",
13407
13204
  onlyPatterns: true,
13408
13205
  all: true,
@@ -13427,7 +13224,6 @@ var SyncPushModule = {
13427
13224
  await spinPromise(
13428
13225
  CompositionPatternPublishModule.handler({
13429
13226
  ...otherParams,
13430
- serialization: config2,
13431
13227
  all: true,
13432
13228
  onlyPatterns: true,
13433
13229
  patternType: "composition",
@@ -13452,7 +13248,6 @@ var SyncPushModule = {
13452
13248
  await spinPromise(
13453
13249
  CompositionPublishModule.handler({
13454
13250
  ...otherParams,
13455
- serialization: config2,
13456
13251
  all: true,
13457
13252
  onlyCompositions: true,
13458
13253
  directory: getPushFilename("composition", config2)
@@ -13476,7 +13271,6 @@ var SyncPushModule = {
13476
13271
  await spinPromise(
13477
13272
  EntryPublishModule.handler({
13478
13273
  ...otherParams,
13479
- serialization: config2,
13480
13274
  all: true,
13481
13275
  directory: getPushFilename("entry", config2)
13482
13276
  }),
@@ -13499,7 +13293,6 @@ var SyncPushModule = {
13499
13293
  await spinPromise(
13500
13294
  EntryPatternPublishModule.handler({
13501
13295
  ...otherParams,
13502
- serialization: config2,
13503
13296
  all: true,
13504
13297
  directory: getPushFilename("entryPattern", config2)
13505
13298
  }),