@uniformdev/cli 20.66.2-alpha.13 → 20.66.3-alpha.6

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-ASGYUI3V.mjs";
21
+ } from "./chunk-XOZ6UMXP.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,7 +2633,6 @@ 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 }) => {
@@ -2709,16 +2714,20 @@ function convertStateOption(state) {
2709
2714
  // src/commands/canvas/assetEngineDataSource.ts
2710
2715
  function createAssetEngineDataSource({
2711
2716
  client,
2712
- verbose,
2713
- batchSize
2717
+ verbose
2714
2718
  }) {
2715
2719
  async function* getObjects() {
2716
2720
  const assets = paginateAsync(
2717
- async (offset, limit2) => (await client.get({
2718
- limit: limit2,
2719
- offset
2720
- })).assets,
2721
- { pageSize: batchSize ?? 50, verbose, entityName: "assets" }
2721
+ async (offset, limit2) => {
2722
+ if (verbose) {
2723
+ console.log(`Fetching all assets from offset ${offset} with limit ${limit2}`);
2724
+ }
2725
+ return (await client.get({
2726
+ limit: limit2,
2727
+ offset
2728
+ })).assets;
2729
+ },
2730
+ { pageSize: 50 }
2722
2731
  );
2723
2732
  for await (const e of assets) {
2724
2733
  const result = {
@@ -2768,25 +2777,22 @@ var AssetPullModule = {
2768
2777
  withDebugOptions(
2769
2778
  withProjectOptions(
2770
2779
  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
- )
2780
+ yargs43.positional("directory", {
2781
+ 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.",
2782
+ type: "string"
2783
+ }).option("format", {
2784
+ alias: ["f"],
2785
+ describe: "Output format",
2786
+ default: "yaml",
2787
+ choices: ["yaml", "json"],
2788
+ type: "string"
2789
+ }).option("mode", {
2790
+ alias: ["m"],
2791
+ 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',
2792
+ choices: ["create", "createOrUpdate", "mirror"],
2793
+ default: "mirror",
2794
+ type: "string"
2795
+ })
2790
2796
  )
2791
2797
  )
2792
2798
  )
@@ -2803,8 +2809,7 @@ var AssetPullModule = {
2803
2809
  whatIf,
2804
2810
  project: projectId,
2805
2811
  diff: diffMode,
2806
- allowEmptySource,
2807
- resolvedBatchSize
2812
+ allowEmptySource
2808
2813
  }) => {
2809
2814
  const fetch2 = nodeFetchProxy(proxy, verbose);
2810
2815
  const client = getAssetClient({
@@ -2814,11 +2819,7 @@ var AssetPullModule = {
2814
2819
  projectId
2815
2820
  });
2816
2821
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2817
- const source = createAssetEngineDataSource({
2818
- client,
2819
- verbose,
2820
- batchSize: resolvedBatchSize
2821
- });
2822
+ const source = createAssetEngineDataSource({ client, verbose });
2822
2823
  let target;
2823
2824
  const isPackage = isPathAPackageFile(directory);
2824
2825
  const onBeforeDeleteObject = async (id, object4) => {
@@ -2893,19 +2894,16 @@ var AssetPushModule = {
2893
2894
  withDebugOptions(
2894
2895
  withProjectOptions(
2895
2896
  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
- )
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
+ })
2909
2907
  )
2910
2908
  )
2911
2909
  )
@@ -2921,8 +2919,7 @@ var AssetPushModule = {
2921
2919
  project: projectId,
2922
2920
  diff: diffMode,
2923
2921
  allowEmptySource,
2924
- verbose,
2925
- resolvedBatchSize
2922
+ verbose
2926
2923
  }) => {
2927
2924
  const fetch2 = nodeFetchProxy(proxy, verbose);
2928
2925
  const client = getAssetClient({
@@ -2949,11 +2946,7 @@ var AssetPushModule = {
2949
2946
  verbose
2950
2947
  });
2951
2948
  }
2952
- const target = createAssetEngineDataSource({
2953
- client,
2954
- verbose,
2955
- batchSize: resolvedBatchSize
2956
- });
2949
+ const target = createAssetEngineDataSource({ client, verbose });
2957
2950
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2958
2951
  await syncEngine({
2959
2952
  source,
@@ -3146,8 +3139,10 @@ function createCategoriesEngineDataSource({
3146
3139
  client
3147
3140
  }) {
3148
3141
  async function* getObjects() {
3149
- const categories = (await client.getCategories()).categories;
3150
- for (const def of categories) {
3142
+ const categories = paginateAsync(async () => (await client.getCategories()).categories, {
3143
+ pageSize: 100
3144
+ });
3145
+ for await (const def of categories) {
3151
3146
  const result = {
3152
3147
  id: selectIdentifier(def),
3153
3148
  displayName: selectDisplayName(def),
@@ -3468,14 +3463,12 @@ var ComponentListModule = {
3468
3463
 
3469
3464
  // src/commands/canvas/componentDefinitionEngineDataSource.ts
3470
3465
  function createComponentDefinitionEngineDataSource({
3471
- client,
3472
- batchSize,
3473
- verbose
3466
+ client
3474
3467
  }) {
3475
3468
  async function* getObjects() {
3476
3469
  const componentDefinitions = paginateAsync(
3477
3470
  async (offset, limit2) => (await client.getComponentDefinitions({ limit: limit2, offset })).componentDefinitions,
3478
- { pageSize: batchSize ?? 200, verbose, entityName: "components" }
3471
+ { pageSize: 200 }
3479
3472
  );
3480
3473
  for await (const def of componentDefinitions) {
3481
3474
  const result = {
@@ -3515,25 +3508,22 @@ var ComponentPullModule = {
3515
3508
  withDebugOptions(
3516
3509
  withProjectOptions(
3517
3510
  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
- )
3511
+ yargs43.positional("directory", {
3512
+ 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.",
3513
+ type: "string"
3514
+ }).option("format", {
3515
+ alias: ["f"],
3516
+ describe: "Output format",
3517
+ default: "yaml",
3518
+ choices: ["yaml", "json"],
3519
+ type: "string"
3520
+ }).option("mode", {
3521
+ alias: ["m"],
3522
+ 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',
3523
+ choices: ["create", "createOrUpdate", "mirror"],
3524
+ default: "mirror",
3525
+ type: "string"
3526
+ })
3537
3527
  )
3538
3528
  )
3539
3529
  )
@@ -3550,16 +3540,11 @@ var ComponentPullModule = {
3550
3540
  project: projectId,
3551
3541
  diff: diffMode,
3552
3542
  allowEmptySource,
3553
- verbose,
3554
- resolvedBatchSize
3543
+ verbose
3555
3544
  }) => {
3556
3545
  const fetch2 = nodeFetchProxy(proxy, verbose);
3557
3546
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
3558
- const source = createComponentDefinitionEngineDataSource({
3559
- client,
3560
- batchSize: resolvedBatchSize,
3561
- verbose
3562
- });
3547
+ const source = createComponentDefinitionEngineDataSource({ client });
3563
3548
  let target;
3564
3549
  const isPackage = isPathAPackageFile(directory);
3565
3550
  if (isPackage) {
@@ -3604,19 +3589,16 @@ var ComponentPushModule = {
3604
3589
  withDebugOptions(
3605
3590
  withProjectOptions(
3606
3591
  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
- )
3592
+ yargs43.positional("directory", {
3593
+ describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
3594
+ type: "string"
3595
+ }).option("mode", {
3596
+ alias: ["m"],
3597
+ 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',
3598
+ choices: ["create", "createOrUpdate", "mirror"],
3599
+ default: "mirror",
3600
+ type: "string"
3601
+ })
3620
3602
  )
3621
3603
  )
3622
3604
  )
@@ -3632,8 +3614,7 @@ var ComponentPushModule = {
3632
3614
  project: projectId,
3633
3615
  diff: diffMode,
3634
3616
  allowEmptySource,
3635
- verbose,
3636
- resolvedBatchSize
3617
+ verbose
3637
3618
  }) => {
3638
3619
  const fetch2 = nodeFetchProxy(proxy, verbose);
3639
3620
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -3656,11 +3637,7 @@ var ComponentPushModule = {
3656
3637
  verbose
3657
3638
  });
3658
3639
  }
3659
- const target = createComponentDefinitionEngineDataSource({
3660
- client,
3661
- batchSize: resolvedBatchSize,
3662
- verbose
3663
- });
3640
+ const target = createComponentDefinitionEngineDataSource({ client });
3664
3641
  await syncEngine({
3665
3642
  source,
3666
3643
  target,
@@ -4114,7 +4091,6 @@ function createComponentInstanceEngineDataSource({
4114
4091
  onlyPatterns,
4115
4092
  patternType,
4116
4093
  verbose,
4117
- batchSize,
4118
4094
  ...clientOptions
4119
4095
  }) {
4120
4096
  const stateId = convertStateOption(state);
@@ -4138,7 +4114,7 @@ function createComponentInstanceEngineDataSource({
4138
4114
  }
4139
4115
  return (await client.getCompositionList(parameters)).compositions;
4140
4116
  },
4141
- { pageSize: batchSize ?? 100, verbose, entityName: "compositions" }
4117
+ { pageSize: 100 }
4142
4118
  );
4143
4119
  for await (const compositionListItem of componentInstances) {
4144
4120
  const result = {
@@ -4177,27 +4153,24 @@ var CompositionPublishModule = {
4177
4153
  withProjectOptions(
4178
4154
  withDebugOptions(
4179
4155
  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
- )
4156
+ yargs43.positional("ids", {
4157
+ describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4158
+ type: "string"
4159
+ }).option("all", {
4160
+ alias: ["a"],
4161
+ describe: "Publishes all compositions. Use compositionId to publish one instead.",
4162
+ default: false,
4163
+ type: "boolean"
4164
+ }).option("onlyCompositions", {
4165
+ describe: "Only publishing compositions and not patterns",
4166
+ default: false,
4167
+ type: "boolean"
4168
+ }).option("onlyPatterns", {
4169
+ describe: "Only pulling patterns and not compositions",
4170
+ default: false,
4171
+ type: "boolean",
4172
+ hidden: true
4173
+ })
4201
4174
  )
4202
4175
  )
4203
4176
  )
@@ -4215,8 +4188,7 @@ var CompositionPublishModule = {
4215
4188
  onlyPatterns,
4216
4189
  patternType,
4217
4190
  verbose,
4218
- directory,
4219
- resolvedBatchSize
4191
+ directory
4220
4192
  }) => {
4221
4193
  if (!all && !ids || all && ids) {
4222
4194
  console.error(`Specify --all or composition ID(s) to publish.`);
@@ -4232,8 +4204,7 @@ var CompositionPublishModule = {
4232
4204
  onlyCompositions,
4233
4205
  onlyPatterns,
4234
4206
  patternType,
4235
- verbose,
4236
- batchSize: resolvedBatchSize
4207
+ verbose
4237
4208
  });
4238
4209
  const target = createComponentInstanceEngineDataSource({
4239
4210
  client,
@@ -4242,8 +4213,7 @@ var CompositionPublishModule = {
4242
4213
  onlyCompositions,
4243
4214
  onlyPatterns,
4244
4215
  patternType,
4245
- verbose,
4246
- batchSize: resolvedBatchSize
4216
+ verbose
4247
4217
  });
4248
4218
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4249
4219
  await syncEngine({
@@ -4281,36 +4251,33 @@ var ComponentPatternPublishModule = {
4281
4251
  withDebugOptions(
4282
4252
  withProjectOptions(
4283
4253
  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
- )
4254
+ yargs43.positional("ids", {
4255
+ describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4256
+ type: "string"
4257
+ }).option("all", {
4258
+ alias: ["a"],
4259
+ describe: "Publishes all component patterns. Use compositionId to publish one instead.",
4260
+ default: false,
4261
+ type: "boolean"
4262
+ }).option("publishingState", {
4263
+ describe: 'Publishing state to update to. Can be "published" or "preview".',
4264
+ default: "published",
4265
+ type: "string",
4266
+ hidden: true
4267
+ }).option("onlyCompositions", {
4268
+ describe: "Only publishing compositions and not component patterns",
4269
+ default: false,
4270
+ type: "boolean"
4271
+ }).option("onlyPatterns", {
4272
+ describe: "Only pulling component patterns and not compositions",
4273
+ default: true,
4274
+ type: "boolean",
4275
+ hidden: true
4276
+ }).option("patternType", {
4277
+ default: "component",
4278
+ choices: ["all", "component", "composition"],
4279
+ hidden: true
4280
+ })
4314
4281
  )
4315
4282
  )
4316
4283
  )
@@ -4319,8 +4286,8 @@ var ComponentPatternPublishModule = {
4319
4286
  };
4320
4287
 
4321
4288
  // src/commands/canvas/commands/composition/pull.ts
4322
- var CompositionPullModule = componentInstancePullModuleFactory("compositions", "composition");
4323
- function componentInstancePullModuleFactory(type, entityType) {
4289
+ var CompositionPullModule = componentInstancePullModuleFactory("compositions");
4290
+ function componentInstancePullModuleFactory(type) {
4324
4291
  return {
4325
4292
  command: "pull <directory>",
4326
4293
  describe: "Pulls all compositions to local files in a directory",
@@ -4330,34 +4297,31 @@ function componentInstancePullModuleFactory(type, entityType) {
4330
4297
  withStateOptions(
4331
4298
  withDebugOptions(
4332
4299
  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
- )
4300
+ yargs43.positional("directory", {
4301
+ 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.",
4302
+ type: "string"
4303
+ }).option("format", {
4304
+ alias: ["f"],
4305
+ describe: "Output format",
4306
+ default: "yaml",
4307
+ choices: ["yaml", "json"],
4308
+ type: "string"
4309
+ }).option("onlyCompositions", {
4310
+ describe: "Only pulling compositions and not patterns",
4311
+ default: false,
4312
+ type: "boolean"
4313
+ }).option("onlyPatterns", {
4314
+ describe: "Only pulling patterns and not compositions",
4315
+ default: false,
4316
+ type: "boolean",
4317
+ hidden: true
4318
+ }).option("mode", {
4319
+ alias: ["m"],
4320
+ 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',
4321
+ choices: ["create", "createOrUpdate", "mirror"],
4322
+ default: "mirror",
4323
+ type: "string"
4324
+ })
4361
4325
  )
4362
4326
  )
4363
4327
  )
@@ -4379,8 +4343,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4379
4343
  project: projectId,
4380
4344
  diff: diffMode,
4381
4345
  allowEmptySource,
4382
- verbose,
4383
- resolvedBatchSize
4346
+ verbose
4384
4347
  }) => {
4385
4348
  const fetch2 = nodeFetchProxy(proxy, verbose);
4386
4349
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4391,8 +4354,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4391
4354
  onlyCompositions,
4392
4355
  onlyPatterns,
4393
4356
  patternType,
4394
- verbose,
4395
- batchSize: resolvedBatchSize
4357
+ verbose
4396
4358
  });
4397
4359
  const isPackage = isPathAPackageFile(directory);
4398
4360
  let target;
@@ -4448,7 +4410,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4448
4410
 
4449
4411
  // src/commands/canvas/commands/componentPattern/pull.ts
4450
4412
  var ComponentPatternPullModule = {
4451
- ...componentInstancePullModuleFactory("componentPatterns", "componentPattern"),
4413
+ ...componentInstancePullModuleFactory("componentPatterns"),
4452
4414
  describe: "Pulls all component patterns to local files in a directory",
4453
4415
  builder: (yargs43) => withConfiguration(
4454
4416
  withApiOptions(
@@ -4525,8 +4487,8 @@ function createLocaleValidationHook(uniformLocales) {
4525
4487
  }
4526
4488
 
4527
4489
  // src/commands/canvas/commands/composition/push.ts
4528
- var CompositionPushModule = componentInstancePushModuleFactory("compositions", "composition");
4529
- function componentInstancePushModuleFactory(type, entityType) {
4490
+ var CompositionPushModule = componentInstancePushModuleFactory("compositions");
4491
+ function componentInstancePushModuleFactory(type) {
4530
4492
  return {
4531
4493
  command: "push <directory>",
4532
4494
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
@@ -4536,28 +4498,25 @@ function componentInstancePushModuleFactory(type, entityType) {
4536
4498
  withStateOptions(
4537
4499
  withDebugOptions(
4538
4500
  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
- )
4501
+ yargs43.positional("directory", {
4502
+ describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4503
+ type: "string"
4504
+ }).option("mode", {
4505
+ alias: ["m"],
4506
+ 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',
4507
+ choices: ["create", "createOrUpdate", "mirror"],
4508
+ default: "mirror",
4509
+ type: "string"
4510
+ }).option("onlyCompositions", {
4511
+ describe: "Only pulling compositions and not patterns",
4512
+ default: false,
4513
+ type: "boolean"
4514
+ }).option("onlyPatterns", {
4515
+ // backwards compatibility
4516
+ default: false,
4517
+ type: "boolean",
4518
+ hidden: true
4519
+ })
4561
4520
  )
4562
4521
  )
4563
4522
  )
@@ -4578,8 +4537,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4578
4537
  patternType,
4579
4538
  diff: diffMode,
4580
4539
  allowEmptySource,
4581
- verbose,
4582
- resolvedBatchSize
4540
+ verbose
4583
4541
  }) => {
4584
4542
  const fetch2 = nodeFetchProxy(proxy, verbose);
4585
4543
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4607,8 +4565,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4607
4565
  onlyCompositions,
4608
4566
  onlyPatterns,
4609
4567
  patternType,
4610
- verbose,
4611
- batchSize: resolvedBatchSize
4568
+ verbose
4612
4569
  });
4613
4570
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4614
4571
  const uniformLocales = await fetchUniformLocales({
@@ -4653,7 +4610,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4653
4610
 
4654
4611
  // src/commands/canvas/commands/componentPattern/push.ts
4655
4612
  var ComponentPatternPushModule = {
4656
- ...componentInstancePushModuleFactory("componentPatterns", "componentPattern"),
4613
+ ...componentInstancePushModuleFactory("componentPatterns"),
4657
4614
  describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
4658
4615
  builder: (yargs43) => withConfiguration(
4659
4616
  withApiOptions(
@@ -4761,27 +4718,24 @@ var CompositionUnpublishModule = {
4761
4718
  withApiOptions(
4762
4719
  withDebugOptions(
4763
4720
  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
- )
4721
+ yargs43.positional("ids", {
4722
+ describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4723
+ type: "string"
4724
+ }).option("all", {
4725
+ alias: ["a"],
4726
+ describe: "Un-publishes all compositions. Use composition ID(s) to unpublish specific one(s) instead.",
4727
+ default: false,
4728
+ type: "boolean"
4729
+ }).option("onlyCompositions", {
4730
+ describe: "Only un-publishing compositions and not patterns",
4731
+ default: false,
4732
+ type: "boolean"
4733
+ }).option("onlyPatterns", {
4734
+ describe: "Only un-publishing patterns and not compositions",
4735
+ default: false,
4736
+ type: "boolean",
4737
+ hidden: true
4738
+ })
4785
4739
  )
4786
4740
  )
4787
4741
  )
@@ -4797,8 +4751,7 @@ var CompositionUnpublishModule = {
4797
4751
  patternType,
4798
4752
  project: projectId,
4799
4753
  whatIf,
4800
- verbose,
4801
- resolvedBatchSize
4754
+ verbose
4802
4755
  }) => {
4803
4756
  if (!all && !ids || all && ids) {
4804
4757
  console.error(`Specify --all or composition ID(s) to unpublish.`);
@@ -4815,8 +4768,7 @@ var CompositionUnpublishModule = {
4815
4768
  onlyCompositions,
4816
4769
  onlyPatterns,
4817
4770
  patternType,
4818
- verbose,
4819
- batchSize: resolvedBatchSize
4771
+ verbose
4820
4772
  });
4821
4773
  const target = createComponentInstanceEngineDataSource({
4822
4774
  client,
@@ -4825,8 +4777,7 @@ var CompositionUnpublishModule = {
4825
4777
  onlyCompositions,
4826
4778
  onlyPatterns,
4827
4779
  patternType,
4828
- verbose,
4829
- batchSize: resolvedBatchSize
4780
+ verbose
4830
4781
  });
4831
4782
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
4832
4783
  for await (const obj of target.objects) {
@@ -5065,37 +5016,34 @@ var CompositionPatternPublishModule = {
5065
5016
  withDebugOptions(
5066
5017
  withProjectOptions(
5067
5018
  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
- )
5019
+ yargs43.positional("ids", {
5020
+ describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
5021
+ type: "string"
5022
+ }).option("all", {
5023
+ alias: ["a"],
5024
+ describe: "Publishes all composition patterns. Use compositionId to publish one instead.",
5025
+ default: false,
5026
+ type: "boolean"
5027
+ }).option("publishingState", {
5028
+ describe: 'Publishing state to update to. Can be "published" or "preview".',
5029
+ default: "published",
5030
+ type: "string",
5031
+ hidden: true
5032
+ }).option("onlyCompositions", {
5033
+ describe: "Only publishing compositions and not composition patterns",
5034
+ default: false,
5035
+ type: "boolean",
5036
+ hidden: true
5037
+ }).option("patternType", {
5038
+ default: "composition",
5039
+ choices: ["all", "component", "composition"],
5040
+ hidden: true
5041
+ }).option("onlyPatterns", {
5042
+ describe: "Only pulling composition patterns and not compositions",
5043
+ default: true,
5044
+ type: "boolean",
5045
+ hidden: true
5046
+ })
5099
5047
  )
5100
5048
  )
5101
5049
  )
@@ -5105,7 +5053,7 @@ var CompositionPatternPublishModule = {
5105
5053
 
5106
5054
  // src/commands/canvas/commands/compositionPattern/pull.ts
5107
5055
  var CompositionPatternPullModule = {
5108
- ...componentInstancePullModuleFactory("compositionPatterns", "compositionPattern"),
5056
+ ...componentInstancePullModuleFactory("compositionPatterns"),
5109
5057
  describe: "Pulls all composition patterns to local files in a directory",
5110
5058
  builder: (yargs43) => withConfiguration(
5111
5059
  withApiOptions(
@@ -5149,7 +5097,7 @@ var CompositionPatternPullModule = {
5149
5097
 
5150
5098
  // src/commands/canvas/commands/compositionPattern/push.ts
5151
5099
  var CompositionPatternPushModule = {
5152
- ...componentInstancePushModuleFactory("compositionPatterns", "compositionPattern"),
5100
+ ...componentInstancePushModuleFactory("compositionPatterns"),
5153
5101
  describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
5154
5102
  builder: (yargs43) => withConfiguration(
5155
5103
  withApiOptions(
@@ -5300,15 +5248,10 @@ var ContentTypeListModule = {
5300
5248
 
5301
5249
  // src/commands/canvas/contentTypeEngineDataSource.ts
5302
5250
  function createContentTypeEngineDataSource({
5303
- client,
5304
- batchSize,
5305
- verbose
5251
+ client
5306
5252
  }) {
5307
5253
  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
- );
5254
+ const { contentTypes } = await client.getContentTypes({ offset: 0, limit: 1e3 });
5312
5255
  for await (const ct of contentTypes) {
5313
5256
  const result = {
5314
5257
  id: selectContentTypeIdentifier(ct),
@@ -5340,25 +5283,22 @@ var ContentTypePullModule = {
5340
5283
  withDebugOptions(
5341
5284
  withProjectOptions(
5342
5285
  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
- )
5286
+ yargs43.positional("directory", {
5287
+ 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.",
5288
+ type: "string"
5289
+ }).option("format", {
5290
+ alias: ["f"],
5291
+ describe: "Output format",
5292
+ default: "yaml",
5293
+ choices: ["yaml", "json"],
5294
+ type: "string"
5295
+ }).option("mode", {
5296
+ alias: ["m"],
5297
+ 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',
5298
+ choices: ["create", "createOrUpdate", "mirror"],
5299
+ default: "mirror",
5300
+ type: "string"
5301
+ })
5362
5302
  )
5363
5303
  )
5364
5304
  )
@@ -5375,8 +5315,7 @@ var ContentTypePullModule = {
5375
5315
  project: projectId,
5376
5316
  diff: diffMode,
5377
5317
  allowEmptySource,
5378
- verbose,
5379
- resolvedBatchSize
5318
+ verbose
5380
5319
  }) => {
5381
5320
  const fetch2 = nodeFetchProxy(proxy, verbose);
5382
5321
  const client = getContentClient({
@@ -5385,11 +5324,7 @@ var ContentTypePullModule = {
5385
5324
  fetch: fetch2,
5386
5325
  projectId
5387
5326
  });
5388
- const source = createContentTypeEngineDataSource({
5389
- client,
5390
- verbose,
5391
- batchSize: resolvedBatchSize
5392
- });
5327
+ const source = createContentTypeEngineDataSource({ client });
5393
5328
  let target;
5394
5329
  const isPackage = isPathAPackageFile(directory);
5395
5330
  if (isPackage) {
@@ -5433,24 +5368,21 @@ var ContentTypePushModule = {
5433
5368
  withDebugOptions(
5434
5369
  withProjectOptions(
5435
5370
  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
- )
5371
+ yargs43.positional("directory", {
5372
+ describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
5373
+ type: "string"
5374
+ }).option("what-if", {
5375
+ alias: ["w"],
5376
+ describe: "What-if mode reports what would be done but changes nothing",
5377
+ default: false,
5378
+ type: "boolean"
5379
+ }).option("mode", {
5380
+ alias: ["m"],
5381
+ 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',
5382
+ choices: ["create", "createOrUpdate", "mirror"],
5383
+ default: "mirror",
5384
+ type: "string"
5385
+ })
5454
5386
  )
5455
5387
  )
5456
5388
  )
@@ -5466,8 +5398,7 @@ var ContentTypePushModule = {
5466
5398
  project: projectId,
5467
5399
  diff: diffMode,
5468
5400
  allowEmptySource,
5469
- verbose,
5470
- resolvedBatchSize
5401
+ verbose
5471
5402
  }) => {
5472
5403
  const fetch2 = nodeFetchProxy(proxy, verbose);
5473
5404
  const client = getContentClient({
@@ -5494,11 +5425,7 @@ var ContentTypePushModule = {
5494
5425
  verbose
5495
5426
  });
5496
5427
  }
5497
- const target = createContentTypeEngineDataSource({
5498
- client,
5499
- verbose,
5500
- batchSize: resolvedBatchSize
5501
- });
5428
+ const target = createContentTypeEngineDataSource({ client });
5502
5429
  await syncEngine({
5503
5430
  source,
5504
5431
  target,
@@ -6166,9 +6093,7 @@ function createEntryEngineDataSource({
6166
6093
  state,
6167
6094
  onlyEntries,
6168
6095
  onlyPatterns,
6169
- entryIDs,
6170
- batchSize,
6171
- verbose
6096
+ entryIDs
6172
6097
  }) {
6173
6098
  const stateId = convertStateOption(state);
6174
6099
  async function* getObjects() {
@@ -6194,7 +6119,7 @@ function createEntryEngineDataSource({
6194
6119
  throw error;
6195
6120
  }
6196
6121
  },
6197
- { pageSize: batchSize ?? 100, verbose, entityName: "entries" }
6122
+ { pageSize: 100 }
6198
6123
  );
6199
6124
  for await (const e of entries) {
6200
6125
  const result = {
@@ -6227,18 +6152,15 @@ var EntryPublishModule = {
6227
6152
  withDiffOptions(
6228
6153
  withApiOptions(
6229
6154
  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
- )
6155
+ yargs43.positional("ids", {
6156
+ describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6157
+ type: "string"
6158
+ }).option("all", {
6159
+ alias: ["a"],
6160
+ describe: "Publishes all entries. Use --ids to publish selected entries instead.",
6161
+ default: false,
6162
+ type: "boolean"
6163
+ })
6242
6164
  )
6243
6165
  )
6244
6166
  )
@@ -6254,8 +6176,7 @@ var EntryPublishModule = {
6254
6176
  project: projectId,
6255
6177
  whatIf,
6256
6178
  verbose,
6257
- directory,
6258
- resolvedBatchSize
6179
+ directory
6259
6180
  }) => {
6260
6181
  if (!all && !ids || all && ids) {
6261
6182
  console.error(`Specify --all or entry ID(s) to publish.`);
@@ -6268,15 +6189,13 @@ var EntryPublishModule = {
6268
6189
  client,
6269
6190
  state: "preview",
6270
6191
  entryIDs: entryIDsArray,
6271
- onlyEntries: true,
6272
- batchSize: resolvedBatchSize
6192
+ onlyEntries: true
6273
6193
  });
6274
6194
  const target = createEntryEngineDataSource({
6275
6195
  client,
6276
6196
  state: "published",
6277
6197
  entryIDs: entryIDsArray,
6278
- onlyEntries: true,
6279
- batchSize: resolvedBatchSize
6198
+ onlyEntries: true
6280
6199
  });
6281
6200
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6282
6201
  await syncEngine({
@@ -6314,25 +6233,22 @@ var EntryPullModule = {
6314
6233
  withProjectOptions(
6315
6234
  withStateOptions(
6316
6235
  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
- )
6236
+ yargs43.positional("directory", {
6237
+ 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.",
6238
+ type: "string"
6239
+ }).option("format", {
6240
+ alias: ["f"],
6241
+ describe: "Output format",
6242
+ default: "yaml",
6243
+ choices: ["yaml", "json"],
6244
+ type: "string"
6245
+ }).option("mode", {
6246
+ alias: ["m"],
6247
+ 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',
6248
+ choices: ["create", "createOrUpdate", "mirror"],
6249
+ default: "mirror",
6250
+ type: "string"
6251
+ })
6336
6252
  )
6337
6253
  )
6338
6254
  )
@@ -6351,8 +6267,7 @@ var EntryPullModule = {
6351
6267
  project: projectId,
6352
6268
  diff: diffMode,
6353
6269
  allowEmptySource,
6354
- verbose,
6355
- resolvedBatchSize
6270
+ verbose
6356
6271
  }) => {
6357
6272
  const fetch2 = nodeFetchProxy(proxy, verbose);
6358
6273
  const client = getContentClient({
@@ -6362,13 +6277,7 @@ var EntryPullModule = {
6362
6277
  projectId
6363
6278
  });
6364
6279
  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
- });
6280
+ const source = createEntryEngineDataSource({ client, state, onlyEntries: true });
6372
6281
  let target;
6373
6282
  const isPackage = isPathAPackageFile(directory);
6374
6283
  if (isPackage) {
@@ -6430,19 +6339,16 @@ var EntryPushModule = {
6430
6339
  withProjectOptions(
6431
6340
  withStateOptions(
6432
6341
  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
- )
6342
+ yargs43.positional("directory", {
6343
+ describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
6344
+ type: "string"
6345
+ }).option("mode", {
6346
+ alias: ["m"],
6347
+ 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',
6348
+ choices: ["create", "createOrUpdate", "mirror"],
6349
+ default: "mirror",
6350
+ type: "string"
6351
+ })
6446
6352
  )
6447
6353
  )
6448
6354
  )
@@ -6460,8 +6366,7 @@ var EntryPushModule = {
6460
6366
  project: projectId,
6461
6367
  diff: diffMode,
6462
6368
  allowEmptySource,
6463
- verbose,
6464
- resolvedBatchSize
6369
+ verbose
6465
6370
  }) => {
6466
6371
  const fetch2 = nodeFetchProxy(proxy, verbose);
6467
6372
  const client = getContentClient({
@@ -6488,13 +6393,7 @@ var EntryPushModule = {
6488
6393
  verbose
6489
6394
  });
6490
6395
  }
6491
- const target = createEntryEngineDataSource({
6492
- client,
6493
- state,
6494
- onlyEntries: true,
6495
- verbose,
6496
- batchSize: resolvedBatchSize
6497
- });
6396
+ const target = createEntryEngineDataSource({ client, state, onlyEntries: true });
6498
6397
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6499
6398
  const uniformLocales = await fetchUniformLocales({
6500
6399
  apiKey,
@@ -6592,33 +6491,20 @@ var EntryUnpublishModule = {
6592
6491
  withDebugOptions(
6593
6492
  withApiOptions(
6594
6493
  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
- )
6494
+ yargs43.positional("ids", {
6495
+ describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6496
+ type: "string"
6497
+ }).option("all", {
6498
+ alias: ["a"],
6499
+ describe: "Un-publishes all entries. Use --all to un-publish selected entries instead.",
6500
+ default: false,
6501
+ type: "boolean"
6502
+ })
6607
6503
  )
6608
6504
  )
6609
6505
  )
6610
6506
  ),
6611
- handler: async ({
6612
- apiHost,
6613
- apiKey,
6614
- proxy,
6615
- ids,
6616
- all,
6617
- project: projectId,
6618
- whatIf,
6619
- verbose,
6620
- resolvedBatchSize
6621
- }) => {
6507
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
6622
6508
  if (!all && !ids || all && ids) {
6623
6509
  console.error(`Specify --all or entry ID(s) to unpublish.`);
6624
6510
  process.exit(1);
@@ -6631,15 +6517,13 @@ var EntryUnpublishModule = {
6631
6517
  client,
6632
6518
  state: "published",
6633
6519
  entryIDs: entryIDsArray,
6634
- onlyEntries: true,
6635
- batchSize: resolvedBatchSize
6520
+ onlyEntries: true
6636
6521
  });
6637
6522
  const target = createEntryEngineDataSource({
6638
6523
  client,
6639
6524
  state: "preview",
6640
6525
  entryIDs: entryIDsArray,
6641
- onlyEntries: true,
6642
- batchSize: resolvedBatchSize
6526
+ onlyEntries: true
6643
6527
  });
6644
6528
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
6645
6529
  for await (const obj of target.objects) {
@@ -6857,18 +6741,15 @@ var EntryPatternPublishModule = {
6857
6741
  withApiOptions(
6858
6742
  withProjectOptions(
6859
6743
  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
- )
6744
+ yargs43.positional("ids", {
6745
+ describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6746
+ type: "string"
6747
+ }).option("all", {
6748
+ alias: ["a"],
6749
+ describe: "Publishes all entry patterns. Use --ids to publish selected entry patterns instead.",
6750
+ default: false,
6751
+ type: "boolean"
6752
+ })
6872
6753
  )
6873
6754
  )
6874
6755
  )
@@ -6884,8 +6765,7 @@ var EntryPatternPublishModule = {
6884
6765
  whatIf,
6885
6766
  project: projectId,
6886
6767
  verbose,
6887
- directory,
6888
- resolvedBatchSize
6768
+ directory
6889
6769
  }) => {
6890
6770
  if (!all && !ids || all && ids) {
6891
6771
  console.error(`Specify --all or entry pattern ID(s) to publish.`);
@@ -6898,15 +6778,13 @@ var EntryPatternPublishModule = {
6898
6778
  client,
6899
6779
  state: "preview",
6900
6780
  entryIDs: entryIDsArray,
6901
- onlyPatterns: true,
6902
- batchSize: resolvedBatchSize
6781
+ onlyPatterns: true
6903
6782
  });
6904
6783
  const target = createEntryEngineDataSource({
6905
6784
  client,
6906
6785
  state: "published",
6907
6786
  entryIDs: entryIDsArray,
6908
- onlyPatterns: true,
6909
- batchSize: resolvedBatchSize
6787
+ onlyPatterns: true
6910
6788
  });
6911
6789
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6912
6790
  await syncEngine({
@@ -6944,25 +6822,22 @@ var EntryPatternPullModule = {
6944
6822
  withProjectOptions(
6945
6823
  withStateOptions(
6946
6824
  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
- )
6825
+ yargs43.positional("directory", {
6826
+ 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.",
6827
+ type: "string"
6828
+ }).option("format", {
6829
+ alias: ["f"],
6830
+ describe: "Output format",
6831
+ default: "yaml",
6832
+ choices: ["yaml", "json"],
6833
+ type: "string"
6834
+ }).option("mode", {
6835
+ alias: ["m"],
6836
+ 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',
6837
+ choices: ["create", "createOrUpdate", "mirror"],
6838
+ default: "mirror",
6839
+ type: "string"
6840
+ })
6966
6841
  )
6967
6842
  )
6968
6843
  )
@@ -6981,8 +6856,7 @@ var EntryPatternPullModule = {
6981
6856
  project: projectId,
6982
6857
  diff: diffMode,
6983
6858
  allowEmptySource,
6984
- verbose,
6985
- resolvedBatchSize
6859
+ verbose
6986
6860
  }) => {
6987
6861
  const fetch2 = nodeFetchProxy(proxy, verbose);
6988
6862
  const client = getContentClient({
@@ -6992,13 +6866,7 @@ var EntryPatternPullModule = {
6992
6866
  projectId
6993
6867
  });
6994
6868
  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
- });
6869
+ const source = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7002
6870
  let target;
7003
6871
  const isPackage = isPathAPackageFile(directory);
7004
6872
  if (isPackage) {
@@ -7060,24 +6928,21 @@ var EntryPatternPushModule = {
7060
6928
  withProjectOptions(
7061
6929
  withStateOptions(
7062
6930
  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
- )
6931
+ yargs43.positional("directory", {
6932
+ describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
6933
+ type: "string"
6934
+ }).option("what-if", {
6935
+ alias: ["w"],
6936
+ describe: "What-if mode reports what would be done but changes nothing",
6937
+ default: false,
6938
+ type: "boolean"
6939
+ }).option("mode", {
6940
+ alias: ["m"],
6941
+ 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',
6942
+ choices: ["create", "createOrUpdate", "mirror"],
6943
+ default: "mirror",
6944
+ type: "string"
6945
+ })
7081
6946
  )
7082
6947
  )
7083
6948
  )
@@ -7095,8 +6960,7 @@ var EntryPatternPushModule = {
7095
6960
  project: projectId,
7096
6961
  diff: diffMode,
7097
6962
  allowEmptySource,
7098
- verbose,
7099
- resolvedBatchSize
6963
+ verbose
7100
6964
  }) => {
7101
6965
  const fetch2 = nodeFetchProxy(proxy, verbose);
7102
6966
  const client = getContentClient({
@@ -7123,13 +6987,7 @@ var EntryPatternPushModule = {
7123
6987
  verbose
7124
6988
  });
7125
6989
  }
7126
- const target = createEntryEngineDataSource({
7127
- client,
7128
- state,
7129
- onlyPatterns: true,
7130
- verbose,
7131
- batchSize: resolvedBatchSize
7132
- });
6990
+ const target = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7133
6991
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
7134
6992
  const uniformLocales = await fetchUniformLocales({
7135
6993
  apiKey,
@@ -7196,33 +7054,20 @@ var EntryPatternUnpublishModule = {
7196
7054
  withDebugOptions(
7197
7055
  withApiOptions(
7198
7056
  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
- )
7057
+ yargs43.positional("ids", {
7058
+ describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
7059
+ type: "string"
7060
+ }).option("all", {
7061
+ alias: ["a"],
7062
+ describe: "Un-publishes all entry patterns. Use --all to un-publish selected entry patterns instead.",
7063
+ default: false,
7064
+ type: "boolean"
7065
+ })
7211
7066
  )
7212
7067
  )
7213
7068
  )
7214
7069
  ),
7215
- handler: async ({
7216
- apiHost,
7217
- apiKey,
7218
- proxy,
7219
- ids,
7220
- all,
7221
- project: projectId,
7222
- whatIf,
7223
- verbose,
7224
- resolvedBatchSize
7225
- }) => {
7070
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
7226
7071
  if (!all && !ids || all && ids) {
7227
7072
  console.error(`Specify --all or entry pattern ID(s) to unpublish.`);
7228
7073
  process.exit(1);
@@ -7235,15 +7080,13 @@ var EntryPatternUnpublishModule = {
7235
7080
  client,
7236
7081
  state: "published",
7237
7082
  entryIDs: entryIDsArray,
7238
- onlyPatterns: true,
7239
- batchSize: resolvedBatchSize
7083
+ onlyPatterns: true
7240
7084
  });
7241
7085
  const target = createEntryEngineDataSource({
7242
7086
  client,
7243
7087
  state: "preview",
7244
7088
  entryIDs: entryIDsArray,
7245
- onlyPatterns: true,
7246
- batchSize: resolvedBatchSize
7089
+ onlyPatterns: true
7247
7090
  });
7248
7091
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
7249
7092
  for await (const obj of target.objects) {
@@ -7329,14 +7172,12 @@ function normalizeLabelForSync(label) {
7329
7172
  return labelWithoutProjectId;
7330
7173
  }
7331
7174
  function createLabelsEngineDataSource({
7332
- client,
7333
- batchSize,
7334
- verbose
7175
+ client
7335
7176
  }) {
7336
7177
  async function* getObjects() {
7337
7178
  const labels = paginateAsync(
7338
7179
  async (offset, limit2) => (await client.getLabels({ offset, limit: limit2 })).labels,
7339
- { pageSize: batchSize ?? 100, verbose, entityName: "labels" }
7180
+ { pageSize: 100 }
7340
7181
  );
7341
7182
  for await (const label of labels) {
7342
7183
  const result = {
@@ -7377,25 +7218,22 @@ var LabelPullModule = {
7377
7218
  withApiOptions(
7378
7219
  withProjectOptions(
7379
7220
  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
- )
7221
+ yargs43.positional("directory", {
7222
+ 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.",
7223
+ type: "string"
7224
+ }).option("format", {
7225
+ alias: ["f"],
7226
+ describe: "Output format",
7227
+ default: "yaml",
7228
+ choices: ["yaml", "json"],
7229
+ type: "string"
7230
+ }).option("mode", {
7231
+ alias: ["m"],
7232
+ 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',
7233
+ choices: ["create", "createOrUpdate", "mirror"],
7234
+ default: "mirror",
7235
+ type: "string"
7236
+ })
7399
7237
  )
7400
7238
  )
7401
7239
  )
@@ -7412,16 +7250,11 @@ var LabelPullModule = {
7412
7250
  project: projectId,
7413
7251
  diff: diffMode,
7414
7252
  allowEmptySource,
7415
- verbose,
7416
- resolvedBatchSize
7253
+ verbose
7417
7254
  }) => {
7418
7255
  const fetch2 = nodeFetchProxy(proxy, verbose);
7419
7256
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
7420
- const source = createLabelsEngineDataSource({
7421
- client,
7422
- verbose,
7423
- batchSize: resolvedBatchSize
7424
- });
7257
+ const source = createLabelsEngineDataSource({ client });
7425
7258
  let target;
7426
7259
  const isPackage = isPathAPackageFile(directory);
7427
7260
  if (isPackage) {
@@ -7472,19 +7305,16 @@ var LabelPushModule = {
7472
7305
  withApiOptions(
7473
7306
  withProjectOptions(
7474
7307
  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
- )
7308
+ yargs43.positional("directory", {
7309
+ describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
7310
+ type: "string"
7311
+ }).option("mode", {
7312
+ alias: ["m"],
7313
+ 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',
7314
+ choices: ["create", "createOrUpdate", "mirror"],
7315
+ default: "mirror",
7316
+ type: "string"
7317
+ })
7488
7318
  )
7489
7319
  )
7490
7320
  )
@@ -7500,8 +7330,7 @@ var LabelPushModule = {
7500
7330
  project: projectId,
7501
7331
  diff: diffMode,
7502
7332
  allowEmptySource,
7503
- verbose,
7504
- resolvedBatchSize
7333
+ verbose
7505
7334
  }) => {
7506
7335
  const fetch2 = nodeFetchProxy(proxy, verbose);
7507
7336
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -7524,11 +7353,7 @@ var LabelPushModule = {
7524
7353
  verbose
7525
7354
  });
7526
7355
  }
7527
- const target = createLabelsEngineDataSource({
7528
- client,
7529
- verbose,
7530
- batchSize: resolvedBatchSize
7531
- });
7356
+ const target = createLabelsEngineDataSource({ client });
7532
7357
  const labelsFailedDueToMissingParent = /* @__PURE__ */ new Set();
7533
7358
  const attemptSync = async () => {
7534
7359
  const lastFailedLabelsCount = labelsFailedDueToMissingParent.size;
@@ -8673,15 +8498,11 @@ var getWorkflowClient = (options) => new WorkflowClient({ ...options, bypassCach
8673
8498
 
8674
8499
  // src/commands/canvas/workflowEngineDataSource.ts
8675
8500
  function createWorkflowEngineDataSource({
8676
- client,
8677
- batchSize,
8678
- verbose
8501
+ client
8679
8502
  }) {
8680
8503
  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"
8504
+ const workflows = paginateAsync(async () => (await client.get()).results, {
8505
+ pageSize: 100
8685
8506
  });
8686
8507
  for await (const workflow of workflows) {
8687
8508
  const { modified, modifiedBy, created, createdBy, ...workflowWithoutStatistics } = workflow;
@@ -8715,25 +8536,22 @@ var WorkflowPullModule = {
8715
8536
  withDebugOptions(
8716
8537
  withProjectOptions(
8717
8538
  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
- )
8539
+ yargs43.positional("directory", {
8540
+ 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.",
8541
+ type: "string"
8542
+ }).option("format", {
8543
+ alias: ["f"],
8544
+ describe: "Output format",
8545
+ default: "yaml",
8546
+ choices: ["yaml", "json"],
8547
+ type: "string"
8548
+ }).option("mode", {
8549
+ alias: ["m"],
8550
+ 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',
8551
+ choices: ["create", "createOrUpdate", "mirror"],
8552
+ default: "mirror",
8553
+ type: "string"
8554
+ })
8737
8555
  )
8738
8556
  )
8739
8557
  )
@@ -8750,16 +8568,11 @@ var WorkflowPullModule = {
8750
8568
  project: projectId,
8751
8569
  diff: diffMode,
8752
8570
  allowEmptySource,
8753
- verbose,
8754
- resolvedBatchSize
8571
+ verbose
8755
8572
  }) => {
8756
8573
  const fetch2 = nodeFetchProxy(proxy, verbose);
8757
8574
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
8758
- const source = createWorkflowEngineDataSource({
8759
- client,
8760
- verbose,
8761
- batchSize: resolvedBatchSize
8762
- });
8575
+ const source = createWorkflowEngineDataSource({ client });
8763
8576
  let target;
8764
8577
  const isPackage = isPathAPackageFile(directory);
8765
8578
  if (isPackage) {
@@ -8803,19 +8616,16 @@ var WorkflowPushModule = {
8803
8616
  withApiOptions(
8804
8617
  withProjectOptions(
8805
8618
  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
- )
8619
+ yargs43.positional("directory", {
8620
+ describe: "Directory to read from. If a filename is used, a package will be read instead.",
8621
+ type: "string"
8622
+ }).option("mode", {
8623
+ alias: ["m"],
8624
+ 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',
8625
+ choices: ["create", "createOrUpdate", "mirror"],
8626
+ default: "mirror",
8627
+ type: "string"
8628
+ })
8819
8629
  )
8820
8630
  )
8821
8631
  )
@@ -8831,8 +8641,7 @@ var WorkflowPushModule = {
8831
8641
  project: projectId,
8832
8642
  diff: diffMode,
8833
8643
  allowEmptySource,
8834
- verbose,
8835
- resolvedBatchSize
8644
+ verbose
8836
8645
  }) => {
8837
8646
  const fetch2 = nodeFetchProxy(proxy, verbose);
8838
8647
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -8854,11 +8663,7 @@ var WorkflowPushModule = {
8854
8663
  verbose
8855
8664
  });
8856
8665
  }
8857
- const target = createWorkflowEngineDataSource({
8858
- client,
8859
- verbose,
8860
- batchSize: resolvedBatchSize
8861
- });
8666
+ const target = createWorkflowEngineDataSource({ client });
8862
8667
  await syncEngine({
8863
8668
  source,
8864
8669
  target,
@@ -13214,8 +13019,7 @@ var SyncPullModule = {
13214
13019
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13215
13020
  mode: getPullMode(entityType, config2),
13216
13021
  directory: getPullFilename(entityType, config2),
13217
- allowEmptySource: config2.allowEmptySource,
13218
- ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13022
+ allowEmptySource: config2.allowEmptySource
13219
13023
  }),
13220
13024
  {
13221
13025
  text: `${entityType}\u2026`,
@@ -13380,8 +13184,7 @@ var SyncPushModule = {
13380
13184
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13381
13185
  mode: getPushMode(entityType, config2),
13382
13186
  directory: getPushFilename(entityType, config2),
13383
- allowEmptySource: config2.allowEmptySource,
13384
- ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13187
+ allowEmptySource: config2.allowEmptySource
13385
13188
  }),
13386
13189
  {
13387
13190
  text: `${entityType}...`,
@@ -13402,12 +13205,10 @@ var SyncPushModule = {
13402
13205
  await spinPromise(
13403
13206
  ComponentPatternPublishModule.handler({
13404
13207
  ...otherParams,
13405
- serialization: config2,
13406
13208
  patternType: "component",
13407
13209
  onlyPatterns: true,
13408
13210
  all: true,
13409
- directory: getPushFilename("componentPattern", config2),
13410
- resolvedBatchSize: getEntityBatchSize("componentPattern", config2)
13211
+ directory: getPushFilename("componentPattern", config2)
13411
13212
  }),
13412
13213
  {
13413
13214
  text: "publishing component patterns...",
@@ -13428,12 +13229,10 @@ var SyncPushModule = {
13428
13229
  await spinPromise(
13429
13230
  CompositionPatternPublishModule.handler({
13430
13231
  ...otherParams,
13431
- serialization: config2,
13432
13232
  all: true,
13433
13233
  onlyPatterns: true,
13434
13234
  patternType: "composition",
13435
- directory: getPushFilename("compositionPattern", config2),
13436
- resolvedBatchSize: getEntityBatchSize("compositionPattern", config2)
13235
+ directory: getPushFilename("compositionPattern", config2)
13437
13236
  }),
13438
13237
  {
13439
13238
  text: "publishing composition patterns...",
@@ -13454,11 +13253,9 @@ var SyncPushModule = {
13454
13253
  await spinPromise(
13455
13254
  CompositionPublishModule.handler({
13456
13255
  ...otherParams,
13457
- serialization: config2,
13458
13256
  all: true,
13459
13257
  onlyCompositions: true,
13460
- directory: getPushFilename("composition", config2),
13461
- resolvedBatchSize: getEntityBatchSize("composition", config2)
13258
+ directory: getPushFilename("composition", config2)
13462
13259
  }),
13463
13260
  {
13464
13261
  text: "publishing compositions...",
@@ -13479,10 +13276,8 @@ var SyncPushModule = {
13479
13276
  await spinPromise(
13480
13277
  EntryPublishModule.handler({
13481
13278
  ...otherParams,
13482
- serialization: config2,
13483
13279
  all: true,
13484
- directory: getPushFilename("entry", config2),
13485
- resolvedBatchSize: getEntityBatchSize("entry", config2)
13280
+ directory: getPushFilename("entry", config2)
13486
13281
  }),
13487
13282
  {
13488
13283
  text: "publishing entries...",
@@ -13503,10 +13298,8 @@ var SyncPushModule = {
13503
13298
  await spinPromise(
13504
13299
  EntryPatternPublishModule.handler({
13505
13300
  ...otherParams,
13506
- serialization: config2,
13507
13301
  all: true,
13508
- directory: getPushFilename("entryPattern", config2),
13509
- resolvedBatchSize: getEntityBatchSize("entryPattern", config2)
13302
+ directory: getPushFilename("entryPattern", config2)
13510
13303
  }),
13511
13304
  {
13512
13305
  text: "publishing entry patterns...",