@uniformdev/cli 20.66.0 → 20.66.1-alpha.4

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,20 +5,23 @@ import {
5
5
  applyDefaultSyncConfiguration,
6
6
  emitWithFormat,
7
7
  getDirectoryOrFilename,
8
+ getEntityBatchSize,
8
9
  getEntityOption,
10
+ isPaginatedSyncEntity,
9
11
  isPathAPackageFile,
10
12
  nodeFetchProxy,
11
13
  package_default,
12
14
  paginateAsync,
13
15
  readFileToObject,
14
16
  withApiOptions,
17
+ withBatchSizeOptions,
15
18
  withConfiguration,
16
19
  withDebugOptions,
17
20
  withDiffOptions,
18
21
  withFormatOptions,
19
22
  withProjectOptions,
20
23
  withTeamOptions
21
- } from "./chunk-KIFJLCAG.mjs";
24
+ } from "./chunk-EM2DLYBP.mjs";
22
25
 
23
26
  // src/index.ts
24
27
  import * as dotenv from "dotenv";
@@ -2706,20 +2709,16 @@ function convertStateOption(state) {
2706
2709
  // src/commands/canvas/assetEngineDataSource.ts
2707
2710
  function createAssetEngineDataSource({
2708
2711
  client,
2709
- verbose
2712
+ verbose,
2713
+ batchSize
2710
2714
  }) {
2711
2715
  async function* getObjects() {
2712
2716
  const assets = paginateAsync(
2713
- async (offset, limit2) => {
2714
- if (verbose) {
2715
- console.log(`Fetching all assets from offset ${offset} with limit ${limit2}`);
2716
- }
2717
- return (await client.get({
2718
- limit: limit2,
2719
- offset
2720
- })).assets;
2721
- },
2722
- { pageSize: 50 }
2717
+ async (offset, limit2) => (await client.get({
2718
+ limit: limit2,
2719
+ offset
2720
+ })).assets,
2721
+ { pageSize: batchSize ?? 50, verbose, entityName: "assets" }
2723
2722
  );
2724
2723
  for await (const e of assets) {
2725
2724
  const result = {
@@ -2769,22 +2768,25 @@ var AssetPullModule = {
2769
2768
  withDebugOptions(
2770
2769
  withProjectOptions(
2771
2770
  withDiffOptions(
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
- })
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
+ )
2788
2790
  )
2789
2791
  )
2790
2792
  )
@@ -2801,7 +2803,8 @@ var AssetPullModule = {
2801
2803
  whatIf,
2802
2804
  project: projectId,
2803
2805
  diff: diffMode,
2804
- allowEmptySource
2806
+ allowEmptySource,
2807
+ resolvedBatchSize
2805
2808
  }) => {
2806
2809
  const fetch2 = nodeFetchProxy(proxy, verbose);
2807
2810
  const client = getAssetClient({
@@ -2811,7 +2814,11 @@ var AssetPullModule = {
2811
2814
  projectId
2812
2815
  });
2813
2816
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2814
- const source = createAssetEngineDataSource({ client, verbose });
2817
+ const source = createAssetEngineDataSource({
2818
+ client,
2819
+ verbose,
2820
+ batchSize: resolvedBatchSize
2821
+ });
2815
2822
  let target;
2816
2823
  const isPackage = isPathAPackageFile(directory);
2817
2824
  const onBeforeDeleteObject = async (id, object4) => {
@@ -2886,16 +2893,19 @@ var AssetPushModule = {
2886
2893
  withDebugOptions(
2887
2894
  withProjectOptions(
2888
2895
  withDiffOptions(
2889
- yargs43.positional("directory", {
2890
- describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
2891
- type: "string"
2892
- }).option("mode", {
2893
- alias: ["m"],
2894
- 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',
2895
- choices: ["create", "createOrUpdate", "mirror"],
2896
- default: "mirror",
2897
- type: "string"
2898
- })
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
+ )
2899
2909
  )
2900
2910
  )
2901
2911
  )
@@ -2911,7 +2921,8 @@ var AssetPushModule = {
2911
2921
  project: projectId,
2912
2922
  diff: diffMode,
2913
2923
  allowEmptySource,
2914
- verbose
2924
+ verbose,
2925
+ resolvedBatchSize
2915
2926
  }) => {
2916
2927
  const fetch2 = nodeFetchProxy(proxy, verbose);
2917
2928
  const client = getAssetClient({
@@ -2938,7 +2949,11 @@ var AssetPushModule = {
2938
2949
  verbose
2939
2950
  });
2940
2951
  }
2941
- const target = createAssetEngineDataSource({ client, verbose });
2952
+ const target = createAssetEngineDataSource({
2953
+ client,
2954
+ verbose,
2955
+ batchSize: resolvedBatchSize
2956
+ });
2942
2957
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2943
2958
  await syncEngine({
2944
2959
  source,
@@ -3131,10 +3146,8 @@ function createCategoriesEngineDataSource({
3131
3146
  client
3132
3147
  }) {
3133
3148
  async function* getObjects() {
3134
- const categories = paginateAsync(async () => (await client.getCategories()).categories, {
3135
- pageSize: 100
3136
- });
3137
- for await (const def of categories) {
3149
+ const categories = (await client.getCategories()).categories;
3150
+ for (const def of categories) {
3138
3151
  const result = {
3139
3152
  id: selectIdentifier(def),
3140
3153
  displayName: selectDisplayName(def),
@@ -3455,12 +3468,14 @@ var ComponentListModule = {
3455
3468
 
3456
3469
  // src/commands/canvas/componentDefinitionEngineDataSource.ts
3457
3470
  function createComponentDefinitionEngineDataSource({
3458
- client
3471
+ client,
3472
+ batchSize,
3473
+ verbose
3459
3474
  }) {
3460
3475
  async function* getObjects() {
3461
3476
  const componentDefinitions = paginateAsync(
3462
3477
  async (offset, limit2) => (await client.getComponentDefinitions({ limit: limit2, offset })).componentDefinitions,
3463
- { pageSize: 200 }
3478
+ { pageSize: batchSize ?? 200, verbose, entityName: "components" }
3464
3479
  );
3465
3480
  for await (const def of componentDefinitions) {
3466
3481
  const result = {
@@ -3500,22 +3515,25 @@ var ComponentPullModule = {
3500
3515
  withDebugOptions(
3501
3516
  withProjectOptions(
3502
3517
  withDiffOptions(
3503
- yargs43.positional("directory", {
3504
- 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.",
3505
- type: "string"
3506
- }).option("format", {
3507
- alias: ["f"],
3508
- describe: "Output format",
3509
- default: "yaml",
3510
- choices: ["yaml", "json"],
3511
- type: "string"
3512
- }).option("mode", {
3513
- alias: ["m"],
3514
- 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',
3515
- choices: ["create", "createOrUpdate", "mirror"],
3516
- default: "mirror",
3517
- type: "string"
3518
- })
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
+ )
3519
3537
  )
3520
3538
  )
3521
3539
  )
@@ -3532,11 +3550,16 @@ var ComponentPullModule = {
3532
3550
  project: projectId,
3533
3551
  diff: diffMode,
3534
3552
  allowEmptySource,
3535
- verbose
3553
+ verbose,
3554
+ resolvedBatchSize
3536
3555
  }) => {
3537
3556
  const fetch2 = nodeFetchProxy(proxy, verbose);
3538
3557
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
3539
- const source = createComponentDefinitionEngineDataSource({ client });
3558
+ const source = createComponentDefinitionEngineDataSource({
3559
+ client,
3560
+ batchSize: resolvedBatchSize,
3561
+ verbose
3562
+ });
3540
3563
  let target;
3541
3564
  const isPackage = isPathAPackageFile(directory);
3542
3565
  if (isPackage) {
@@ -3581,16 +3604,19 @@ var ComponentPushModule = {
3581
3604
  withDebugOptions(
3582
3605
  withProjectOptions(
3583
3606
  withDiffOptions(
3584
- yargs43.positional("directory", {
3585
- describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
3586
- type: "string"
3587
- }).option("mode", {
3588
- alias: ["m"],
3589
- 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',
3590
- choices: ["create", "createOrUpdate", "mirror"],
3591
- default: "mirror",
3592
- type: "string"
3593
- })
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
+ )
3594
3620
  )
3595
3621
  )
3596
3622
  )
@@ -3606,7 +3632,8 @@ var ComponentPushModule = {
3606
3632
  project: projectId,
3607
3633
  diff: diffMode,
3608
3634
  allowEmptySource,
3609
- verbose
3635
+ verbose,
3636
+ resolvedBatchSize
3610
3637
  }) => {
3611
3638
  const fetch2 = nodeFetchProxy(proxy, verbose);
3612
3639
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -3629,7 +3656,11 @@ var ComponentPushModule = {
3629
3656
  verbose
3630
3657
  });
3631
3658
  }
3632
- const target = createComponentDefinitionEngineDataSource({ client });
3659
+ const target = createComponentDefinitionEngineDataSource({
3660
+ client,
3661
+ batchSize: resolvedBatchSize,
3662
+ verbose
3663
+ });
3633
3664
  await syncEngine({
3634
3665
  source,
3635
3666
  target,
@@ -4083,6 +4114,7 @@ function createComponentInstanceEngineDataSource({
4083
4114
  onlyPatterns,
4084
4115
  patternType,
4085
4116
  verbose,
4117
+ batchSize,
4086
4118
  ...clientOptions
4087
4119
  }) {
4088
4120
  const stateId = convertStateOption(state);
@@ -4106,7 +4138,7 @@ function createComponentInstanceEngineDataSource({
4106
4138
  }
4107
4139
  return (await client.getCompositionList(parameters)).compositions;
4108
4140
  },
4109
- { pageSize: 100 }
4141
+ { pageSize: batchSize ?? 100, verbose, entityName: "compositions" }
4110
4142
  );
4111
4143
  for await (const compositionListItem of componentInstances) {
4112
4144
  const result = {
@@ -4145,24 +4177,27 @@ var CompositionPublishModule = {
4145
4177
  withProjectOptions(
4146
4178
  withDebugOptions(
4147
4179
  withDiffOptions(
4148
- yargs43.positional("ids", {
4149
- describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4150
- type: "string"
4151
- }).option("all", {
4152
- alias: ["a"],
4153
- describe: "Publishes all compositions. Use compositionId to publish one instead.",
4154
- default: false,
4155
- type: "boolean"
4156
- }).option("onlyCompositions", {
4157
- describe: "Only publishing compositions and not patterns",
4158
- default: false,
4159
- type: "boolean"
4160
- }).option("onlyPatterns", {
4161
- describe: "Only pulling patterns and not compositions",
4162
- default: false,
4163
- type: "boolean",
4164
- hidden: true
4165
- })
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
+ )
4166
4201
  )
4167
4202
  )
4168
4203
  )
@@ -4180,7 +4215,8 @@ var CompositionPublishModule = {
4180
4215
  onlyPatterns,
4181
4216
  patternType,
4182
4217
  verbose,
4183
- directory
4218
+ directory,
4219
+ resolvedBatchSize
4184
4220
  }) => {
4185
4221
  if (!all && !ids || all && ids) {
4186
4222
  console.error(`Specify --all or composition ID(s) to publish.`);
@@ -4196,7 +4232,8 @@ var CompositionPublishModule = {
4196
4232
  onlyCompositions,
4197
4233
  onlyPatterns,
4198
4234
  patternType,
4199
- verbose
4235
+ verbose,
4236
+ batchSize: resolvedBatchSize
4200
4237
  });
4201
4238
  const target = createComponentInstanceEngineDataSource({
4202
4239
  client,
@@ -4205,7 +4242,8 @@ var CompositionPublishModule = {
4205
4242
  onlyCompositions,
4206
4243
  onlyPatterns,
4207
4244
  patternType,
4208
- verbose
4245
+ verbose,
4246
+ batchSize: resolvedBatchSize
4209
4247
  });
4210
4248
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4211
4249
  await syncEngine({
@@ -4243,33 +4281,36 @@ var ComponentPatternPublishModule = {
4243
4281
  withDebugOptions(
4244
4282
  withProjectOptions(
4245
4283
  withDiffOptions(
4246
- yargs43.positional("ids", {
4247
- describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4248
- type: "string"
4249
- }).option("all", {
4250
- alias: ["a"],
4251
- describe: "Publishes all component patterns. Use compositionId to publish one instead.",
4252
- default: false,
4253
- type: "boolean"
4254
- }).option("publishingState", {
4255
- describe: 'Publishing state to update to. Can be "published" or "preview".',
4256
- default: "published",
4257
- type: "string",
4258
- hidden: true
4259
- }).option("onlyCompositions", {
4260
- describe: "Only publishing compositions and not component patterns",
4261
- default: false,
4262
- type: "boolean"
4263
- }).option("onlyPatterns", {
4264
- describe: "Only pulling component patterns and not compositions",
4265
- default: true,
4266
- type: "boolean",
4267
- hidden: true
4268
- }).option("patternType", {
4269
- default: "component",
4270
- choices: ["all", "component", "composition"],
4271
- hidden: true
4272
- })
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
+ )
4273
4314
  )
4274
4315
  )
4275
4316
  )
@@ -4278,8 +4319,8 @@ var ComponentPatternPublishModule = {
4278
4319
  };
4279
4320
 
4280
4321
  // src/commands/canvas/commands/composition/pull.ts
4281
- var CompositionPullModule = componentInstancePullModuleFactory("compositions");
4282
- function componentInstancePullModuleFactory(type) {
4322
+ var CompositionPullModule = componentInstancePullModuleFactory("compositions", "composition");
4323
+ function componentInstancePullModuleFactory(type, entityType) {
4283
4324
  return {
4284
4325
  command: "pull <directory>",
4285
4326
  describe: "Pulls all compositions to local files in a directory",
@@ -4289,31 +4330,34 @@ function componentInstancePullModuleFactory(type) {
4289
4330
  withStateOptions(
4290
4331
  withDebugOptions(
4291
4332
  withDiffOptions(
4292
- yargs43.positional("directory", {
4293
- 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.",
4294
- type: "string"
4295
- }).option("format", {
4296
- alias: ["f"],
4297
- describe: "Output format",
4298
- default: "yaml",
4299
- choices: ["yaml", "json"],
4300
- type: "string"
4301
- }).option("onlyCompositions", {
4302
- describe: "Only pulling compositions and not patterns",
4303
- default: false,
4304
- type: "boolean"
4305
- }).option("onlyPatterns", {
4306
- describe: "Only pulling patterns and not compositions",
4307
- default: false,
4308
- type: "boolean",
4309
- hidden: true
4310
- }).option("mode", {
4311
- alias: ["m"],
4312
- 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',
4313
- choices: ["create", "createOrUpdate", "mirror"],
4314
- default: "mirror",
4315
- type: "string"
4316
- })
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
+ )
4317
4361
  )
4318
4362
  )
4319
4363
  )
@@ -4335,7 +4379,8 @@ function componentInstancePullModuleFactory(type) {
4335
4379
  project: projectId,
4336
4380
  diff: diffMode,
4337
4381
  allowEmptySource,
4338
- verbose
4382
+ verbose,
4383
+ resolvedBatchSize
4339
4384
  }) => {
4340
4385
  const fetch2 = nodeFetchProxy(proxy, verbose);
4341
4386
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4346,7 +4391,8 @@ function componentInstancePullModuleFactory(type) {
4346
4391
  onlyCompositions,
4347
4392
  onlyPatterns,
4348
4393
  patternType,
4349
- verbose
4394
+ verbose,
4395
+ batchSize: resolvedBatchSize
4350
4396
  });
4351
4397
  const isPackage = isPathAPackageFile(directory);
4352
4398
  let target;
@@ -4402,7 +4448,7 @@ function componentInstancePullModuleFactory(type) {
4402
4448
 
4403
4449
  // src/commands/canvas/commands/componentPattern/pull.ts
4404
4450
  var ComponentPatternPullModule = {
4405
- ...componentInstancePullModuleFactory("componentPatterns"),
4451
+ ...componentInstancePullModuleFactory("componentPatterns", "componentPattern"),
4406
4452
  describe: "Pulls all component patterns to local files in a directory",
4407
4453
  builder: (yargs43) => withConfiguration(
4408
4454
  withApiOptions(
@@ -4479,8 +4525,8 @@ function createLocaleValidationHook(uniformLocales) {
4479
4525
  }
4480
4526
 
4481
4527
  // src/commands/canvas/commands/composition/push.ts
4482
- var CompositionPushModule = componentInstancePushModuleFactory("compositions");
4483
- function componentInstancePushModuleFactory(type) {
4528
+ var CompositionPushModule = componentInstancePushModuleFactory("compositions", "composition");
4529
+ function componentInstancePushModuleFactory(type, entityType) {
4484
4530
  return {
4485
4531
  command: "push <directory>",
4486
4532
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
@@ -4490,25 +4536,28 @@ function componentInstancePushModuleFactory(type) {
4490
4536
  withStateOptions(
4491
4537
  withDebugOptions(
4492
4538
  withDiffOptions(
4493
- yargs43.positional("directory", {
4494
- describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4495
- type: "string"
4496
- }).option("mode", {
4497
- alias: ["m"],
4498
- 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',
4499
- choices: ["create", "createOrUpdate", "mirror"],
4500
- default: "mirror",
4501
- type: "string"
4502
- }).option("onlyCompositions", {
4503
- describe: "Only pulling compositions and not patterns",
4504
- default: false,
4505
- type: "boolean"
4506
- }).option("onlyPatterns", {
4507
- // backwards compatibility
4508
- default: false,
4509
- type: "boolean",
4510
- hidden: true
4511
- })
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
+ )
4512
4561
  )
4513
4562
  )
4514
4563
  )
@@ -4529,7 +4578,8 @@ function componentInstancePushModuleFactory(type) {
4529
4578
  patternType,
4530
4579
  diff: diffMode,
4531
4580
  allowEmptySource,
4532
- verbose
4581
+ verbose,
4582
+ resolvedBatchSize
4533
4583
  }) => {
4534
4584
  const fetch2 = nodeFetchProxy(proxy, verbose);
4535
4585
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4557,7 +4607,8 @@ function componentInstancePushModuleFactory(type) {
4557
4607
  onlyCompositions,
4558
4608
  onlyPatterns,
4559
4609
  patternType,
4560
- verbose
4610
+ verbose,
4611
+ batchSize: resolvedBatchSize
4561
4612
  });
4562
4613
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4563
4614
  const uniformLocales = await fetchUniformLocales({
@@ -4602,7 +4653,7 @@ function componentInstancePushModuleFactory(type) {
4602
4653
 
4603
4654
  // src/commands/canvas/commands/componentPattern/push.ts
4604
4655
  var ComponentPatternPushModule = {
4605
- ...componentInstancePushModuleFactory("componentPatterns"),
4656
+ ...componentInstancePushModuleFactory("componentPatterns", "componentPattern"),
4606
4657
  describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
4607
4658
  builder: (yargs43) => withConfiguration(
4608
4659
  withApiOptions(
@@ -4710,24 +4761,27 @@ var CompositionUnpublishModule = {
4710
4761
  withApiOptions(
4711
4762
  withDebugOptions(
4712
4763
  withProjectOptions(
4713
- yargs43.positional("ids", {
4714
- describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4715
- type: "string"
4716
- }).option("all", {
4717
- alias: ["a"],
4718
- describe: "Un-publishes all compositions. Use composition ID(s) to unpublish specific one(s) instead.",
4719
- default: false,
4720
- type: "boolean"
4721
- }).option("onlyCompositions", {
4722
- describe: "Only un-publishing compositions and not patterns",
4723
- default: false,
4724
- type: "boolean"
4725
- }).option("onlyPatterns", {
4726
- describe: "Only un-publishing patterns and not compositions",
4727
- default: false,
4728
- type: "boolean",
4729
- hidden: true
4730
- })
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
+ )
4731
4785
  )
4732
4786
  )
4733
4787
  )
@@ -4743,7 +4797,8 @@ var CompositionUnpublishModule = {
4743
4797
  patternType,
4744
4798
  project: projectId,
4745
4799
  whatIf,
4746
- verbose
4800
+ verbose,
4801
+ resolvedBatchSize
4747
4802
  }) => {
4748
4803
  if (!all && !ids || all && ids) {
4749
4804
  console.error(`Specify --all or composition ID(s) to unpublish.`);
@@ -4760,7 +4815,8 @@ var CompositionUnpublishModule = {
4760
4815
  onlyCompositions,
4761
4816
  onlyPatterns,
4762
4817
  patternType,
4763
- verbose
4818
+ verbose,
4819
+ batchSize: resolvedBatchSize
4764
4820
  });
4765
4821
  const target = createComponentInstanceEngineDataSource({
4766
4822
  client,
@@ -4769,7 +4825,8 @@ var CompositionUnpublishModule = {
4769
4825
  onlyCompositions,
4770
4826
  onlyPatterns,
4771
4827
  patternType,
4772
- verbose
4828
+ verbose,
4829
+ batchSize: resolvedBatchSize
4773
4830
  });
4774
4831
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
4775
4832
  for await (const obj of target.objects) {
@@ -5008,34 +5065,37 @@ var CompositionPatternPublishModule = {
5008
5065
  withDebugOptions(
5009
5066
  withProjectOptions(
5010
5067
  withDiffOptions(
5011
- yargs43.positional("ids", {
5012
- describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
5013
- type: "string"
5014
- }).option("all", {
5015
- alias: ["a"],
5016
- describe: "Publishes all composition patterns. Use compositionId to publish one instead.",
5017
- default: false,
5018
- type: "boolean"
5019
- }).option("publishingState", {
5020
- describe: 'Publishing state to update to. Can be "published" or "preview".',
5021
- default: "published",
5022
- type: "string",
5023
- hidden: true
5024
- }).option("onlyCompositions", {
5025
- describe: "Only publishing compositions and not composition patterns",
5026
- default: false,
5027
- type: "boolean",
5028
- hidden: true
5029
- }).option("patternType", {
5030
- default: "composition",
5031
- choices: ["all", "component", "composition"],
5032
- hidden: true
5033
- }).option("onlyPatterns", {
5034
- describe: "Only pulling composition patterns and not compositions",
5035
- default: true,
5036
- type: "boolean",
5037
- hidden: true
5038
- })
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
+ )
5039
5099
  )
5040
5100
  )
5041
5101
  )
@@ -5045,7 +5105,7 @@ var CompositionPatternPublishModule = {
5045
5105
 
5046
5106
  // src/commands/canvas/commands/compositionPattern/pull.ts
5047
5107
  var CompositionPatternPullModule = {
5048
- ...componentInstancePullModuleFactory("compositionPatterns"),
5108
+ ...componentInstancePullModuleFactory("compositionPatterns", "compositionPattern"),
5049
5109
  describe: "Pulls all composition patterns to local files in a directory",
5050
5110
  builder: (yargs43) => withConfiguration(
5051
5111
  withApiOptions(
@@ -5089,7 +5149,7 @@ var CompositionPatternPullModule = {
5089
5149
 
5090
5150
  // src/commands/canvas/commands/compositionPattern/push.ts
5091
5151
  var CompositionPatternPushModule = {
5092
- ...componentInstancePushModuleFactory("compositionPatterns"),
5152
+ ...componentInstancePushModuleFactory("compositionPatterns", "compositionPattern"),
5093
5153
  describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
5094
5154
  builder: (yargs43) => withConfiguration(
5095
5155
  withApiOptions(
@@ -5240,10 +5300,15 @@ var ContentTypeListModule = {
5240
5300
 
5241
5301
  // src/commands/canvas/contentTypeEngineDataSource.ts
5242
5302
  function createContentTypeEngineDataSource({
5243
- client
5303
+ client,
5304
+ batchSize,
5305
+ verbose
5244
5306
  }) {
5245
5307
  async function* getObjects() {
5246
- const { contentTypes } = await client.getContentTypes({ offset: 0, limit: 1e3 });
5308
+ const contentTypes = paginateAsync(
5309
+ async (offset, limit2) => (await client.getContentTypes({ offset, limit: limit2 })).contentTypes,
5310
+ { pageSize: batchSize ?? 100, verbose, entityName: "content types" }
5311
+ );
5247
5312
  for await (const ct of contentTypes) {
5248
5313
  const result = {
5249
5314
  id: selectContentTypeIdentifier(ct),
@@ -5275,22 +5340,25 @@ var ContentTypePullModule = {
5275
5340
  withDebugOptions(
5276
5341
  withProjectOptions(
5277
5342
  withDiffOptions(
5278
- yargs43.positional("directory", {
5279
- 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.",
5280
- type: "string"
5281
- }).option("format", {
5282
- alias: ["f"],
5283
- describe: "Output format",
5284
- default: "yaml",
5285
- choices: ["yaml", "json"],
5286
- type: "string"
5287
- }).option("mode", {
5288
- alias: ["m"],
5289
- 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',
5290
- choices: ["create", "createOrUpdate", "mirror"],
5291
- default: "mirror",
5292
- type: "string"
5293
- })
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
+ )
5294
5362
  )
5295
5363
  )
5296
5364
  )
@@ -5307,7 +5375,8 @@ var ContentTypePullModule = {
5307
5375
  project: projectId,
5308
5376
  diff: diffMode,
5309
5377
  allowEmptySource,
5310
- verbose
5378
+ verbose,
5379
+ resolvedBatchSize
5311
5380
  }) => {
5312
5381
  const fetch2 = nodeFetchProxy(proxy, verbose);
5313
5382
  const client = getContentClient({
@@ -5316,7 +5385,11 @@ var ContentTypePullModule = {
5316
5385
  fetch: fetch2,
5317
5386
  projectId
5318
5387
  });
5319
- const source = createContentTypeEngineDataSource({ client });
5388
+ const source = createContentTypeEngineDataSource({
5389
+ client,
5390
+ verbose,
5391
+ batchSize: resolvedBatchSize
5392
+ });
5320
5393
  let target;
5321
5394
  const isPackage = isPathAPackageFile(directory);
5322
5395
  if (isPackage) {
@@ -5360,21 +5433,24 @@ var ContentTypePushModule = {
5360
5433
  withDebugOptions(
5361
5434
  withProjectOptions(
5362
5435
  withDiffOptions(
5363
- yargs43.positional("directory", {
5364
- describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
5365
- type: "string"
5366
- }).option("what-if", {
5367
- alias: ["w"],
5368
- describe: "What-if mode reports what would be done but changes nothing",
5369
- default: false,
5370
- type: "boolean"
5371
- }).option("mode", {
5372
- alias: ["m"],
5373
- 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',
5374
- choices: ["create", "createOrUpdate", "mirror"],
5375
- default: "mirror",
5376
- type: "string"
5377
- })
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
+ )
5378
5454
  )
5379
5455
  )
5380
5456
  )
@@ -5390,7 +5466,8 @@ var ContentTypePushModule = {
5390
5466
  project: projectId,
5391
5467
  diff: diffMode,
5392
5468
  allowEmptySource,
5393
- verbose
5469
+ verbose,
5470
+ resolvedBatchSize
5394
5471
  }) => {
5395
5472
  const fetch2 = nodeFetchProxy(proxy, verbose);
5396
5473
  const client = getContentClient({
@@ -5417,7 +5494,11 @@ var ContentTypePushModule = {
5417
5494
  verbose
5418
5495
  });
5419
5496
  }
5420
- const target = createContentTypeEngineDataSource({ client });
5497
+ const target = createContentTypeEngineDataSource({
5498
+ client,
5499
+ verbose,
5500
+ batchSize: resolvedBatchSize
5501
+ });
5421
5502
  await syncEngine({
5422
5503
  source,
5423
5504
  target,
@@ -6085,7 +6166,9 @@ function createEntryEngineDataSource({
6085
6166
  state,
6086
6167
  onlyEntries,
6087
6168
  onlyPatterns,
6088
- entryIDs
6169
+ entryIDs,
6170
+ batchSize,
6171
+ verbose
6089
6172
  }) {
6090
6173
  const stateId = convertStateOption(state);
6091
6174
  async function* getObjects() {
@@ -6111,7 +6194,7 @@ function createEntryEngineDataSource({
6111
6194
  throw error;
6112
6195
  }
6113
6196
  },
6114
- { pageSize: 100 }
6197
+ { pageSize: batchSize ?? 100, verbose, entityName: "entries" }
6115
6198
  );
6116
6199
  for await (const e of entries) {
6117
6200
  const result = {
@@ -6144,15 +6227,18 @@ var EntryPublishModule = {
6144
6227
  withDiffOptions(
6145
6228
  withApiOptions(
6146
6229
  withProjectOptions(
6147
- yargs43.positional("ids", {
6148
- describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6149
- type: "string"
6150
- }).option("all", {
6151
- alias: ["a"],
6152
- describe: "Publishes all entries. Use --ids to publish selected entries instead.",
6153
- default: false,
6154
- type: "boolean"
6155
- })
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
+ )
6156
6242
  )
6157
6243
  )
6158
6244
  )
@@ -6168,7 +6254,8 @@ var EntryPublishModule = {
6168
6254
  project: projectId,
6169
6255
  whatIf,
6170
6256
  verbose,
6171
- directory
6257
+ directory,
6258
+ resolvedBatchSize
6172
6259
  }) => {
6173
6260
  if (!all && !ids || all && ids) {
6174
6261
  console.error(`Specify --all or entry ID(s) to publish.`);
@@ -6181,13 +6268,15 @@ var EntryPublishModule = {
6181
6268
  client,
6182
6269
  state: "preview",
6183
6270
  entryIDs: entryIDsArray,
6184
- onlyEntries: true
6271
+ onlyEntries: true,
6272
+ batchSize: resolvedBatchSize
6185
6273
  });
6186
6274
  const target = createEntryEngineDataSource({
6187
6275
  client,
6188
6276
  state: "published",
6189
6277
  entryIDs: entryIDsArray,
6190
- onlyEntries: true
6278
+ onlyEntries: true,
6279
+ batchSize: resolvedBatchSize
6191
6280
  });
6192
6281
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6193
6282
  await syncEngine({
@@ -6225,22 +6314,25 @@ var EntryPullModule = {
6225
6314
  withProjectOptions(
6226
6315
  withStateOptions(
6227
6316
  withDiffOptions(
6228
- yargs43.positional("directory", {
6229
- 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.",
6230
- type: "string"
6231
- }).option("format", {
6232
- alias: ["f"],
6233
- describe: "Output format",
6234
- default: "yaml",
6235
- choices: ["yaml", "json"],
6236
- type: "string"
6237
- }).option("mode", {
6238
- alias: ["m"],
6239
- 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',
6240
- choices: ["create", "createOrUpdate", "mirror"],
6241
- default: "mirror",
6242
- type: "string"
6243
- })
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
+ )
6244
6336
  )
6245
6337
  )
6246
6338
  )
@@ -6259,7 +6351,8 @@ var EntryPullModule = {
6259
6351
  project: projectId,
6260
6352
  diff: diffMode,
6261
6353
  allowEmptySource,
6262
- verbose
6354
+ verbose,
6355
+ resolvedBatchSize
6263
6356
  }) => {
6264
6357
  const fetch2 = nodeFetchProxy(proxy, verbose);
6265
6358
  const client = getContentClient({
@@ -6269,7 +6362,13 @@ var EntryPullModule = {
6269
6362
  projectId
6270
6363
  });
6271
6364
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6272
- const source = createEntryEngineDataSource({ client, state, onlyEntries: true });
6365
+ const source = createEntryEngineDataSource({
6366
+ client,
6367
+ state,
6368
+ onlyEntries: true,
6369
+ verbose,
6370
+ batchSize: resolvedBatchSize
6371
+ });
6273
6372
  let target;
6274
6373
  const isPackage = isPathAPackageFile(directory);
6275
6374
  if (isPackage) {
@@ -6331,16 +6430,19 @@ var EntryPushModule = {
6331
6430
  withProjectOptions(
6332
6431
  withStateOptions(
6333
6432
  withDiffOptions(
6334
- yargs43.positional("directory", {
6335
- describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
6336
- type: "string"
6337
- }).option("mode", {
6338
- alias: ["m"],
6339
- 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',
6340
- choices: ["create", "createOrUpdate", "mirror"],
6341
- default: "mirror",
6342
- type: "string"
6343
- })
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
+ )
6344
6446
  )
6345
6447
  )
6346
6448
  )
@@ -6358,7 +6460,8 @@ var EntryPushModule = {
6358
6460
  project: projectId,
6359
6461
  diff: diffMode,
6360
6462
  allowEmptySource,
6361
- verbose
6463
+ verbose,
6464
+ resolvedBatchSize
6362
6465
  }) => {
6363
6466
  const fetch2 = nodeFetchProxy(proxy, verbose);
6364
6467
  const client = getContentClient({
@@ -6385,7 +6488,13 @@ var EntryPushModule = {
6385
6488
  verbose
6386
6489
  });
6387
6490
  }
6388
- const target = createEntryEngineDataSource({ client, state, onlyEntries: true });
6491
+ const target = createEntryEngineDataSource({
6492
+ client,
6493
+ state,
6494
+ onlyEntries: true,
6495
+ verbose,
6496
+ batchSize: resolvedBatchSize
6497
+ });
6389
6498
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6390
6499
  const uniformLocales = await fetchUniformLocales({
6391
6500
  apiKey,
@@ -6479,24 +6588,37 @@ import { diffJson as diffJson3 } from "diff";
6479
6588
  var EntryUnpublishModule = {
6480
6589
  command: "unpublish [ids]",
6481
6590
  describe: "Unpublish an entry(ies)",
6482
- builder: (yargs43) => withConfiguration(
6483
- withDebugOptions(
6484
- withApiOptions(
6485
- withProjectOptions(
6486
- yargs43.positional("ids", {
6487
- describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6488
- type: "string"
6489
- }).option("all", {
6490
- alias: ["a"],
6491
- describe: "Un-publishes all entries. Use --all to un-publish selected entries instead.",
6492
- default: false,
6493
- type: "boolean"
6494
- })
6591
+ builder: (yargs43) => withConfiguration(
6592
+ withDebugOptions(
6593
+ withApiOptions(
6594
+ 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
+ )
6495
6607
  )
6496
6608
  )
6497
6609
  )
6498
6610
  ),
6499
- handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
6611
+ handler: async ({
6612
+ apiHost,
6613
+ apiKey,
6614
+ proxy,
6615
+ ids,
6616
+ all,
6617
+ project: projectId,
6618
+ whatIf,
6619
+ verbose,
6620
+ resolvedBatchSize
6621
+ }) => {
6500
6622
  if (!all && !ids || all && ids) {
6501
6623
  console.error(`Specify --all or entry ID(s) to unpublish.`);
6502
6624
  process.exit(1);
@@ -6509,13 +6631,15 @@ var EntryUnpublishModule = {
6509
6631
  client,
6510
6632
  state: "published",
6511
6633
  entryIDs: entryIDsArray,
6512
- onlyEntries: true
6634
+ onlyEntries: true,
6635
+ batchSize: resolvedBatchSize
6513
6636
  });
6514
6637
  const target = createEntryEngineDataSource({
6515
6638
  client,
6516
6639
  state: "preview",
6517
6640
  entryIDs: entryIDsArray,
6518
- onlyEntries: true
6641
+ onlyEntries: true,
6642
+ batchSize: resolvedBatchSize
6519
6643
  });
6520
6644
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
6521
6645
  for await (const obj of target.objects) {
@@ -6733,15 +6857,18 @@ var EntryPatternPublishModule = {
6733
6857
  withApiOptions(
6734
6858
  withProjectOptions(
6735
6859
  withDiffOptions(
6736
- yargs43.positional("ids", {
6737
- describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6738
- type: "string"
6739
- }).option("all", {
6740
- alias: ["a"],
6741
- describe: "Publishes all entry patterns. Use --ids to publish selected entry patterns instead.",
6742
- default: false,
6743
- type: "boolean"
6744
- })
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
+ )
6745
6872
  )
6746
6873
  )
6747
6874
  )
@@ -6757,7 +6884,8 @@ var EntryPatternPublishModule = {
6757
6884
  whatIf,
6758
6885
  project: projectId,
6759
6886
  verbose,
6760
- directory
6887
+ directory,
6888
+ resolvedBatchSize
6761
6889
  }) => {
6762
6890
  if (!all && !ids || all && ids) {
6763
6891
  console.error(`Specify --all or entry pattern ID(s) to publish.`);
@@ -6770,13 +6898,15 @@ var EntryPatternPublishModule = {
6770
6898
  client,
6771
6899
  state: "preview",
6772
6900
  entryIDs: entryIDsArray,
6773
- onlyPatterns: true
6901
+ onlyPatterns: true,
6902
+ batchSize: resolvedBatchSize
6774
6903
  });
6775
6904
  const target = createEntryEngineDataSource({
6776
6905
  client,
6777
6906
  state: "published",
6778
6907
  entryIDs: entryIDsArray,
6779
- onlyPatterns: true
6908
+ onlyPatterns: true,
6909
+ batchSize: resolvedBatchSize
6780
6910
  });
6781
6911
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6782
6912
  await syncEngine({
@@ -6814,22 +6944,25 @@ var EntryPatternPullModule = {
6814
6944
  withProjectOptions(
6815
6945
  withStateOptions(
6816
6946
  withDiffOptions(
6817
- yargs43.positional("directory", {
6818
- 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.",
6819
- type: "string"
6820
- }).option("format", {
6821
- alias: ["f"],
6822
- describe: "Output format",
6823
- default: "yaml",
6824
- choices: ["yaml", "json"],
6825
- type: "string"
6826
- }).option("mode", {
6827
- alias: ["m"],
6828
- 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',
6829
- choices: ["create", "createOrUpdate", "mirror"],
6830
- default: "mirror",
6831
- type: "string"
6832
- })
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
+ )
6833
6966
  )
6834
6967
  )
6835
6968
  )
@@ -6848,7 +6981,8 @@ var EntryPatternPullModule = {
6848
6981
  project: projectId,
6849
6982
  diff: diffMode,
6850
6983
  allowEmptySource,
6851
- verbose
6984
+ verbose,
6985
+ resolvedBatchSize
6852
6986
  }) => {
6853
6987
  const fetch2 = nodeFetchProxy(proxy, verbose);
6854
6988
  const client = getContentClient({
@@ -6858,7 +6992,13 @@ var EntryPatternPullModule = {
6858
6992
  projectId
6859
6993
  });
6860
6994
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6861
- const source = createEntryEngineDataSource({ client, state, onlyPatterns: true });
6995
+ const source = createEntryEngineDataSource({
6996
+ client,
6997
+ state,
6998
+ onlyPatterns: true,
6999
+ verbose,
7000
+ batchSize: resolvedBatchSize
7001
+ });
6862
7002
  let target;
6863
7003
  const isPackage = isPathAPackageFile(directory);
6864
7004
  if (isPackage) {
@@ -6920,21 +7060,24 @@ var EntryPatternPushModule = {
6920
7060
  withProjectOptions(
6921
7061
  withStateOptions(
6922
7062
  withDiffOptions(
6923
- yargs43.positional("directory", {
6924
- describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
6925
- type: "string"
6926
- }).option("what-if", {
6927
- alias: ["w"],
6928
- describe: "What-if mode reports what would be done but changes nothing",
6929
- default: false,
6930
- type: "boolean"
6931
- }).option("mode", {
6932
- alias: ["m"],
6933
- 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',
6934
- choices: ["create", "createOrUpdate", "mirror"],
6935
- default: "mirror",
6936
- type: "string"
6937
- })
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
+ )
6938
7081
  )
6939
7082
  )
6940
7083
  )
@@ -6952,7 +7095,8 @@ var EntryPatternPushModule = {
6952
7095
  project: projectId,
6953
7096
  diff: diffMode,
6954
7097
  allowEmptySource,
6955
- verbose
7098
+ verbose,
7099
+ resolvedBatchSize
6956
7100
  }) => {
6957
7101
  const fetch2 = nodeFetchProxy(proxy, verbose);
6958
7102
  const client = getContentClient({
@@ -6979,7 +7123,13 @@ var EntryPatternPushModule = {
6979
7123
  verbose
6980
7124
  });
6981
7125
  }
6982
- const target = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7126
+ const target = createEntryEngineDataSource({
7127
+ client,
7128
+ state,
7129
+ onlyPatterns: true,
7130
+ verbose,
7131
+ batchSize: resolvedBatchSize
7132
+ });
6983
7133
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6984
7134
  const uniformLocales = await fetchUniformLocales({
6985
7135
  apiKey,
@@ -7046,20 +7196,33 @@ var EntryPatternUnpublishModule = {
7046
7196
  withDebugOptions(
7047
7197
  withApiOptions(
7048
7198
  withProjectOptions(
7049
- yargs43.positional("ids", {
7050
- describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
7051
- type: "string"
7052
- }).option("all", {
7053
- alias: ["a"],
7054
- describe: "Un-publishes all entry patterns. Use --all to un-publish selected entry patterns instead.",
7055
- default: false,
7056
- type: "boolean"
7057
- })
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
+ )
7058
7211
  )
7059
7212
  )
7060
7213
  )
7061
7214
  ),
7062
- handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
7215
+ handler: async ({
7216
+ apiHost,
7217
+ apiKey,
7218
+ proxy,
7219
+ ids,
7220
+ all,
7221
+ project: projectId,
7222
+ whatIf,
7223
+ verbose,
7224
+ resolvedBatchSize
7225
+ }) => {
7063
7226
  if (!all && !ids || all && ids) {
7064
7227
  console.error(`Specify --all or entry pattern ID(s) to unpublish.`);
7065
7228
  process.exit(1);
@@ -7072,13 +7235,15 @@ var EntryPatternUnpublishModule = {
7072
7235
  client,
7073
7236
  state: "published",
7074
7237
  entryIDs: entryIDsArray,
7075
- onlyPatterns: true
7238
+ onlyPatterns: true,
7239
+ batchSize: resolvedBatchSize
7076
7240
  });
7077
7241
  const target = createEntryEngineDataSource({
7078
7242
  client,
7079
7243
  state: "preview",
7080
7244
  entryIDs: entryIDsArray,
7081
- onlyPatterns: true
7245
+ onlyPatterns: true,
7246
+ batchSize: resolvedBatchSize
7082
7247
  });
7083
7248
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
7084
7249
  for await (const obj of target.objects) {
@@ -7164,12 +7329,14 @@ function normalizeLabelForSync(label) {
7164
7329
  return labelWithoutProjectId;
7165
7330
  }
7166
7331
  function createLabelsEngineDataSource({
7167
- client
7332
+ client,
7333
+ batchSize,
7334
+ verbose
7168
7335
  }) {
7169
7336
  async function* getObjects() {
7170
7337
  const labels = paginateAsync(
7171
7338
  async (offset, limit2) => (await client.getLabels({ offset, limit: limit2 })).labels,
7172
- { pageSize: 100 }
7339
+ { pageSize: batchSize ?? 100, verbose, entityName: "labels" }
7173
7340
  );
7174
7341
  for await (const label of labels) {
7175
7342
  const result = {
@@ -7210,22 +7377,25 @@ var LabelPullModule = {
7210
7377
  withApiOptions(
7211
7378
  withProjectOptions(
7212
7379
  withDiffOptions(
7213
- yargs43.positional("directory", {
7214
- 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.",
7215
- type: "string"
7216
- }).option("format", {
7217
- alias: ["f"],
7218
- describe: "Output format",
7219
- default: "yaml",
7220
- choices: ["yaml", "json"],
7221
- type: "string"
7222
- }).option("mode", {
7223
- alias: ["m"],
7224
- 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',
7225
- choices: ["create", "createOrUpdate", "mirror"],
7226
- default: "mirror",
7227
- type: "string"
7228
- })
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
+ )
7229
7399
  )
7230
7400
  )
7231
7401
  )
@@ -7242,11 +7412,16 @@ var LabelPullModule = {
7242
7412
  project: projectId,
7243
7413
  diff: diffMode,
7244
7414
  allowEmptySource,
7245
- verbose
7415
+ verbose,
7416
+ resolvedBatchSize
7246
7417
  }) => {
7247
7418
  const fetch2 = nodeFetchProxy(proxy, verbose);
7248
7419
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
7249
- const source = createLabelsEngineDataSource({ client });
7420
+ const source = createLabelsEngineDataSource({
7421
+ client,
7422
+ verbose,
7423
+ batchSize: resolvedBatchSize
7424
+ });
7250
7425
  let target;
7251
7426
  const isPackage = isPathAPackageFile(directory);
7252
7427
  if (isPackage) {
@@ -7297,16 +7472,19 @@ var LabelPushModule = {
7297
7472
  withApiOptions(
7298
7473
  withProjectOptions(
7299
7474
  withDiffOptions(
7300
- yargs43.positional("directory", {
7301
- describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
7302
- type: "string"
7303
- }).option("mode", {
7304
- alias: ["m"],
7305
- 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',
7306
- choices: ["create", "createOrUpdate", "mirror"],
7307
- default: "mirror",
7308
- type: "string"
7309
- })
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
+ )
7310
7488
  )
7311
7489
  )
7312
7490
  )
@@ -7322,7 +7500,8 @@ var LabelPushModule = {
7322
7500
  project: projectId,
7323
7501
  diff: diffMode,
7324
7502
  allowEmptySource,
7325
- verbose
7503
+ verbose,
7504
+ resolvedBatchSize
7326
7505
  }) => {
7327
7506
  const fetch2 = nodeFetchProxy(proxy, verbose);
7328
7507
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -7345,7 +7524,11 @@ var LabelPushModule = {
7345
7524
  verbose
7346
7525
  });
7347
7526
  }
7348
- const target = createLabelsEngineDataSource({ client });
7527
+ const target = createLabelsEngineDataSource({
7528
+ client,
7529
+ verbose,
7530
+ batchSize: resolvedBatchSize
7531
+ });
7349
7532
  const labelsFailedDueToMissingParent = /* @__PURE__ */ new Set();
7350
7533
  const attemptSync = async () => {
7351
7534
  const lastFailedLabelsCount = labelsFailedDueToMissingParent.size;
@@ -8490,11 +8673,15 @@ var getWorkflowClient = (options) => new WorkflowClient({ ...options, bypassCach
8490
8673
 
8491
8674
  // src/commands/canvas/workflowEngineDataSource.ts
8492
8675
  function createWorkflowEngineDataSource({
8493
- client
8676
+ client,
8677
+ batchSize,
8678
+ verbose
8494
8679
  }) {
8495
8680
  async function* getObjects() {
8496
- const workflows = paginateAsync(async () => (await client.get()).results, {
8497
- pageSize: 100
8681
+ const workflows = paginateAsync(async (offset, limit2) => (await client.get({ offset, limit: limit2 })).results, {
8682
+ pageSize: batchSize ?? 100,
8683
+ verbose,
8684
+ entityName: "workflows"
8498
8685
  });
8499
8686
  for await (const workflow of workflows) {
8500
8687
  const { modified, modifiedBy, created, createdBy, ...workflowWithoutStatistics } = workflow;
@@ -8528,22 +8715,25 @@ var WorkflowPullModule = {
8528
8715
  withDebugOptions(
8529
8716
  withProjectOptions(
8530
8717
  withDiffOptions(
8531
- yargs43.positional("directory", {
8532
- 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.",
8533
- type: "string"
8534
- }).option("format", {
8535
- alias: ["f"],
8536
- describe: "Output format",
8537
- default: "yaml",
8538
- choices: ["yaml", "json"],
8539
- type: "string"
8540
- }).option("mode", {
8541
- alias: ["m"],
8542
- 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',
8543
- choices: ["create", "createOrUpdate", "mirror"],
8544
- default: "mirror",
8545
- type: "string"
8546
- })
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
+ )
8547
8737
  )
8548
8738
  )
8549
8739
  )
@@ -8560,11 +8750,16 @@ var WorkflowPullModule = {
8560
8750
  project: projectId,
8561
8751
  diff: diffMode,
8562
8752
  allowEmptySource,
8563
- verbose
8753
+ verbose,
8754
+ resolvedBatchSize
8564
8755
  }) => {
8565
8756
  const fetch2 = nodeFetchProxy(proxy, verbose);
8566
8757
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
8567
- const source = createWorkflowEngineDataSource({ client });
8758
+ const source = createWorkflowEngineDataSource({
8759
+ client,
8760
+ verbose,
8761
+ batchSize: resolvedBatchSize
8762
+ });
8568
8763
  let target;
8569
8764
  const isPackage = isPathAPackageFile(directory);
8570
8765
  if (isPackage) {
@@ -8608,16 +8803,19 @@ var WorkflowPushModule = {
8608
8803
  withApiOptions(
8609
8804
  withProjectOptions(
8610
8805
  withDiffOptions(
8611
- yargs43.positional("directory", {
8612
- describe: "Directory to read from. If a filename is used, a package will be read instead.",
8613
- type: "string"
8614
- }).option("mode", {
8615
- alias: ["m"],
8616
- 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',
8617
- choices: ["create", "createOrUpdate", "mirror"],
8618
- default: "mirror",
8619
- type: "string"
8620
- })
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
+ )
8621
8819
  )
8622
8820
  )
8623
8821
  )
@@ -8633,7 +8831,8 @@ var WorkflowPushModule = {
8633
8831
  project: projectId,
8634
8832
  diff: diffMode,
8635
8833
  allowEmptySource,
8636
- verbose
8834
+ verbose,
8835
+ resolvedBatchSize
8637
8836
  }) => {
8638
8837
  const fetch2 = nodeFetchProxy(proxy, verbose);
8639
8838
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -8655,7 +8854,11 @@ var WorkflowPushModule = {
8655
8854
  verbose
8656
8855
  });
8657
8856
  }
8658
- const target = createWorkflowEngineDataSource({ client });
8857
+ const target = createWorkflowEngineDataSource({
8858
+ client,
8859
+ verbose,
8860
+ batchSize: resolvedBatchSize
8861
+ });
8659
8862
  await syncEngine({
8660
8863
  source,
8661
8864
  target,
@@ -13011,7 +13214,8 @@ var SyncPullModule = {
13011
13214
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13012
13215
  mode: getPullMode(entityType, config2),
13013
13216
  directory: getPullFilename(entityType, config2),
13014
- allowEmptySource: config2.allowEmptySource
13217
+ allowEmptySource: config2.allowEmptySource,
13218
+ ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13015
13219
  }),
13016
13220
  {
13017
13221
  text: `${entityType}\u2026`,
@@ -13176,7 +13380,8 @@ var SyncPushModule = {
13176
13380
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13177
13381
  mode: getPushMode(entityType, config2),
13178
13382
  directory: getPushFilename(entityType, config2),
13179
- allowEmptySource: config2.allowEmptySource
13383
+ allowEmptySource: config2.allowEmptySource,
13384
+ ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13180
13385
  }),
13181
13386
  {
13182
13387
  text: `${entityType}...`,
@@ -13197,6 +13402,7 @@ var SyncPushModule = {
13197
13402
  await spinPromise(
13198
13403
  ComponentPatternPublishModule.handler({
13199
13404
  ...otherParams,
13405
+ serialization: config2,
13200
13406
  patternType: "component",
13201
13407
  onlyPatterns: true,
13202
13408
  all: true,
@@ -13221,6 +13427,7 @@ var SyncPushModule = {
13221
13427
  await spinPromise(
13222
13428
  CompositionPatternPublishModule.handler({
13223
13429
  ...otherParams,
13430
+ serialization: config2,
13224
13431
  all: true,
13225
13432
  onlyPatterns: true,
13226
13433
  patternType: "composition",
@@ -13245,6 +13452,7 @@ var SyncPushModule = {
13245
13452
  await spinPromise(
13246
13453
  CompositionPublishModule.handler({
13247
13454
  ...otherParams,
13455
+ serialization: config2,
13248
13456
  all: true,
13249
13457
  onlyCompositions: true,
13250
13458
  directory: getPushFilename("composition", config2)
@@ -13268,6 +13476,7 @@ var SyncPushModule = {
13268
13476
  await spinPromise(
13269
13477
  EntryPublishModule.handler({
13270
13478
  ...otherParams,
13479
+ serialization: config2,
13271
13480
  all: true,
13272
13481
  directory: getPushFilename("entry", config2)
13273
13482
  }),
@@ -13290,6 +13499,7 @@ var SyncPushModule = {
13290
13499
  await spinPromise(
13291
13500
  EntryPatternPublishModule.handler({
13292
13501
  ...otherParams,
13502
+ serialization: config2,
13293
13503
  all: true,
13294
13504
  directory: getPushFilename("entryPattern", config2)
13295
13505
  }),