@uniformdev/cli 20.66.2-alpha.13 → 20.66.2

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-XQNGKNLH.mjs";
25
22
 
26
23
  // src/index.ts
27
24
  import * as dotenv from "dotenv";
@@ -2709,16 +2706,20 @@ function convertStateOption(state) {
2709
2706
  // src/commands/canvas/assetEngineDataSource.ts
2710
2707
  function createAssetEngineDataSource({
2711
2708
  client,
2712
- verbose,
2713
- batchSize
2709
+ verbose
2714
2710
  }) {
2715
2711
  async function* getObjects() {
2716
2712
  const assets = paginateAsync(
2717
- async (offset, limit2) => (await client.get({
2718
- limit: limit2,
2719
- offset
2720
- })).assets,
2721
- { pageSize: batchSize ?? 50, verbose, entityName: "assets" }
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 }
2722
2723
  );
2723
2724
  for await (const e of assets) {
2724
2725
  const result = {
@@ -2768,25 +2769,22 @@ var AssetPullModule = {
2768
2769
  withDebugOptions(
2769
2770
  withProjectOptions(
2770
2771
  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
- )
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
+ })
2790
2788
  )
2791
2789
  )
2792
2790
  )
@@ -2803,8 +2801,7 @@ var AssetPullModule = {
2803
2801
  whatIf,
2804
2802
  project: projectId,
2805
2803
  diff: diffMode,
2806
- allowEmptySource,
2807
- resolvedBatchSize
2804
+ allowEmptySource
2808
2805
  }) => {
2809
2806
  const fetch2 = nodeFetchProxy(proxy, verbose);
2810
2807
  const client = getAssetClient({
@@ -2814,11 +2811,7 @@ var AssetPullModule = {
2814
2811
  projectId
2815
2812
  });
2816
2813
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2817
- const source = createAssetEngineDataSource({
2818
- client,
2819
- verbose,
2820
- batchSize: resolvedBatchSize
2821
- });
2814
+ const source = createAssetEngineDataSource({ client, verbose });
2822
2815
  let target;
2823
2816
  const isPackage = isPathAPackageFile(directory);
2824
2817
  const onBeforeDeleteObject = async (id, object4) => {
@@ -2893,19 +2886,16 @@ var AssetPushModule = {
2893
2886
  withDebugOptions(
2894
2887
  withProjectOptions(
2895
2888
  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
- )
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
+ })
2909
2899
  )
2910
2900
  )
2911
2901
  )
@@ -2921,8 +2911,7 @@ var AssetPushModule = {
2921
2911
  project: projectId,
2922
2912
  diff: diffMode,
2923
2913
  allowEmptySource,
2924
- verbose,
2925
- resolvedBatchSize
2914
+ verbose
2926
2915
  }) => {
2927
2916
  const fetch2 = nodeFetchProxy(proxy, verbose);
2928
2917
  const client = getAssetClient({
@@ -2949,11 +2938,7 @@ var AssetPushModule = {
2949
2938
  verbose
2950
2939
  });
2951
2940
  }
2952
- const target = createAssetEngineDataSource({
2953
- client,
2954
- verbose,
2955
- batchSize: resolvedBatchSize
2956
- });
2941
+ const target = createAssetEngineDataSource({ client, verbose });
2957
2942
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2958
2943
  await syncEngine({
2959
2944
  source,
@@ -3146,8 +3131,10 @@ function createCategoriesEngineDataSource({
3146
3131
  client
3147
3132
  }) {
3148
3133
  async function* getObjects() {
3149
- const categories = (await client.getCategories()).categories;
3150
- for (const def of categories) {
3134
+ const categories = paginateAsync(async () => (await client.getCategories()).categories, {
3135
+ pageSize: 100
3136
+ });
3137
+ for await (const def of categories) {
3151
3138
  const result = {
3152
3139
  id: selectIdentifier(def),
3153
3140
  displayName: selectDisplayName(def),
@@ -3468,14 +3455,12 @@ var ComponentListModule = {
3468
3455
 
3469
3456
  // src/commands/canvas/componentDefinitionEngineDataSource.ts
3470
3457
  function createComponentDefinitionEngineDataSource({
3471
- client,
3472
- batchSize,
3473
- verbose
3458
+ client
3474
3459
  }) {
3475
3460
  async function* getObjects() {
3476
3461
  const componentDefinitions = paginateAsync(
3477
3462
  async (offset, limit2) => (await client.getComponentDefinitions({ limit: limit2, offset })).componentDefinitions,
3478
- { pageSize: batchSize ?? 200, verbose, entityName: "components" }
3463
+ { pageSize: 200 }
3479
3464
  );
3480
3465
  for await (const def of componentDefinitions) {
3481
3466
  const result = {
@@ -3515,25 +3500,22 @@ var ComponentPullModule = {
3515
3500
  withDebugOptions(
3516
3501
  withProjectOptions(
3517
3502
  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
- )
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
+ })
3537
3519
  )
3538
3520
  )
3539
3521
  )
@@ -3550,16 +3532,11 @@ var ComponentPullModule = {
3550
3532
  project: projectId,
3551
3533
  diff: diffMode,
3552
3534
  allowEmptySource,
3553
- verbose,
3554
- resolvedBatchSize
3535
+ verbose
3555
3536
  }) => {
3556
3537
  const fetch2 = nodeFetchProxy(proxy, verbose);
3557
3538
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
3558
- const source = createComponentDefinitionEngineDataSource({
3559
- client,
3560
- batchSize: resolvedBatchSize,
3561
- verbose
3562
- });
3539
+ const source = createComponentDefinitionEngineDataSource({ client });
3563
3540
  let target;
3564
3541
  const isPackage = isPathAPackageFile(directory);
3565
3542
  if (isPackage) {
@@ -3604,19 +3581,16 @@ var ComponentPushModule = {
3604
3581
  withDebugOptions(
3605
3582
  withProjectOptions(
3606
3583
  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
- )
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
+ })
3620
3594
  )
3621
3595
  )
3622
3596
  )
@@ -3632,8 +3606,7 @@ var ComponentPushModule = {
3632
3606
  project: projectId,
3633
3607
  diff: diffMode,
3634
3608
  allowEmptySource,
3635
- verbose,
3636
- resolvedBatchSize
3609
+ verbose
3637
3610
  }) => {
3638
3611
  const fetch2 = nodeFetchProxy(proxy, verbose);
3639
3612
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -3656,11 +3629,7 @@ var ComponentPushModule = {
3656
3629
  verbose
3657
3630
  });
3658
3631
  }
3659
- const target = createComponentDefinitionEngineDataSource({
3660
- client,
3661
- batchSize: resolvedBatchSize,
3662
- verbose
3663
- });
3632
+ const target = createComponentDefinitionEngineDataSource({ client });
3664
3633
  await syncEngine({
3665
3634
  source,
3666
3635
  target,
@@ -4114,7 +4083,6 @@ function createComponentInstanceEngineDataSource({
4114
4083
  onlyPatterns,
4115
4084
  patternType,
4116
4085
  verbose,
4117
- batchSize,
4118
4086
  ...clientOptions
4119
4087
  }) {
4120
4088
  const stateId = convertStateOption(state);
@@ -4138,7 +4106,7 @@ function createComponentInstanceEngineDataSource({
4138
4106
  }
4139
4107
  return (await client.getCompositionList(parameters)).compositions;
4140
4108
  },
4141
- { pageSize: batchSize ?? 100, verbose, entityName: "compositions" }
4109
+ { pageSize: 100 }
4142
4110
  );
4143
4111
  for await (const compositionListItem of componentInstances) {
4144
4112
  const result = {
@@ -4177,27 +4145,24 @@ var CompositionPublishModule = {
4177
4145
  withProjectOptions(
4178
4146
  withDebugOptions(
4179
4147
  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
- )
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
+ })
4201
4166
  )
4202
4167
  )
4203
4168
  )
@@ -4215,8 +4180,7 @@ var CompositionPublishModule = {
4215
4180
  onlyPatterns,
4216
4181
  patternType,
4217
4182
  verbose,
4218
- directory,
4219
- resolvedBatchSize
4183
+ directory
4220
4184
  }) => {
4221
4185
  if (!all && !ids || all && ids) {
4222
4186
  console.error(`Specify --all or composition ID(s) to publish.`);
@@ -4232,8 +4196,7 @@ var CompositionPublishModule = {
4232
4196
  onlyCompositions,
4233
4197
  onlyPatterns,
4234
4198
  patternType,
4235
- verbose,
4236
- batchSize: resolvedBatchSize
4199
+ verbose
4237
4200
  });
4238
4201
  const target = createComponentInstanceEngineDataSource({
4239
4202
  client,
@@ -4242,8 +4205,7 @@ var CompositionPublishModule = {
4242
4205
  onlyCompositions,
4243
4206
  onlyPatterns,
4244
4207
  patternType,
4245
- verbose,
4246
- batchSize: resolvedBatchSize
4208
+ verbose
4247
4209
  });
4248
4210
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4249
4211
  await syncEngine({
@@ -4281,36 +4243,33 @@ var ComponentPatternPublishModule = {
4281
4243
  withDebugOptions(
4282
4244
  withProjectOptions(
4283
4245
  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
- )
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
+ })
4314
4273
  )
4315
4274
  )
4316
4275
  )
@@ -4319,8 +4278,8 @@ var ComponentPatternPublishModule = {
4319
4278
  };
4320
4279
 
4321
4280
  // src/commands/canvas/commands/composition/pull.ts
4322
- var CompositionPullModule = componentInstancePullModuleFactory("compositions", "composition");
4323
- function componentInstancePullModuleFactory(type, entityType) {
4281
+ var CompositionPullModule = componentInstancePullModuleFactory("compositions");
4282
+ function componentInstancePullModuleFactory(type) {
4324
4283
  return {
4325
4284
  command: "pull <directory>",
4326
4285
  describe: "Pulls all compositions to local files in a directory",
@@ -4330,34 +4289,31 @@ function componentInstancePullModuleFactory(type, entityType) {
4330
4289
  withStateOptions(
4331
4290
  withDebugOptions(
4332
4291
  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
- )
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
+ })
4361
4317
  )
4362
4318
  )
4363
4319
  )
@@ -4379,8 +4335,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4379
4335
  project: projectId,
4380
4336
  diff: diffMode,
4381
4337
  allowEmptySource,
4382
- verbose,
4383
- resolvedBatchSize
4338
+ verbose
4384
4339
  }) => {
4385
4340
  const fetch2 = nodeFetchProxy(proxy, verbose);
4386
4341
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4391,8 +4346,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4391
4346
  onlyCompositions,
4392
4347
  onlyPatterns,
4393
4348
  patternType,
4394
- verbose,
4395
- batchSize: resolvedBatchSize
4349
+ verbose
4396
4350
  });
4397
4351
  const isPackage = isPathAPackageFile(directory);
4398
4352
  let target;
@@ -4448,7 +4402,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4448
4402
 
4449
4403
  // src/commands/canvas/commands/componentPattern/pull.ts
4450
4404
  var ComponentPatternPullModule = {
4451
- ...componentInstancePullModuleFactory("componentPatterns", "componentPattern"),
4405
+ ...componentInstancePullModuleFactory("componentPatterns"),
4452
4406
  describe: "Pulls all component patterns to local files in a directory",
4453
4407
  builder: (yargs43) => withConfiguration(
4454
4408
  withApiOptions(
@@ -4525,8 +4479,8 @@ function createLocaleValidationHook(uniformLocales) {
4525
4479
  }
4526
4480
 
4527
4481
  // src/commands/canvas/commands/composition/push.ts
4528
- var CompositionPushModule = componentInstancePushModuleFactory("compositions", "composition");
4529
- function componentInstancePushModuleFactory(type, entityType) {
4482
+ var CompositionPushModule = componentInstancePushModuleFactory("compositions");
4483
+ function componentInstancePushModuleFactory(type) {
4530
4484
  return {
4531
4485
  command: "push <directory>",
4532
4486
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
@@ -4536,28 +4490,25 @@ function componentInstancePushModuleFactory(type, entityType) {
4536
4490
  withStateOptions(
4537
4491
  withDebugOptions(
4538
4492
  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
- )
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
+ })
4561
4512
  )
4562
4513
  )
4563
4514
  )
@@ -4578,8 +4529,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4578
4529
  patternType,
4579
4530
  diff: diffMode,
4580
4531
  allowEmptySource,
4581
- verbose,
4582
- resolvedBatchSize
4532
+ verbose
4583
4533
  }) => {
4584
4534
  const fetch2 = nodeFetchProxy(proxy, verbose);
4585
4535
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4607,8 +4557,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4607
4557
  onlyCompositions,
4608
4558
  onlyPatterns,
4609
4559
  patternType,
4610
- verbose,
4611
- batchSize: resolvedBatchSize
4560
+ verbose
4612
4561
  });
4613
4562
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4614
4563
  const uniformLocales = await fetchUniformLocales({
@@ -4653,7 +4602,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4653
4602
 
4654
4603
  // src/commands/canvas/commands/componentPattern/push.ts
4655
4604
  var ComponentPatternPushModule = {
4656
- ...componentInstancePushModuleFactory("componentPatterns", "componentPattern"),
4605
+ ...componentInstancePushModuleFactory("componentPatterns"),
4657
4606
  describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
4658
4607
  builder: (yargs43) => withConfiguration(
4659
4608
  withApiOptions(
@@ -4761,27 +4710,24 @@ var CompositionUnpublishModule = {
4761
4710
  withApiOptions(
4762
4711
  withDebugOptions(
4763
4712
  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
- )
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
+ })
4785
4731
  )
4786
4732
  )
4787
4733
  )
@@ -4797,8 +4743,7 @@ var CompositionUnpublishModule = {
4797
4743
  patternType,
4798
4744
  project: projectId,
4799
4745
  whatIf,
4800
- verbose,
4801
- resolvedBatchSize
4746
+ verbose
4802
4747
  }) => {
4803
4748
  if (!all && !ids || all && ids) {
4804
4749
  console.error(`Specify --all or composition ID(s) to unpublish.`);
@@ -4815,8 +4760,7 @@ var CompositionUnpublishModule = {
4815
4760
  onlyCompositions,
4816
4761
  onlyPatterns,
4817
4762
  patternType,
4818
- verbose,
4819
- batchSize: resolvedBatchSize
4763
+ verbose
4820
4764
  });
4821
4765
  const target = createComponentInstanceEngineDataSource({
4822
4766
  client,
@@ -4825,8 +4769,7 @@ var CompositionUnpublishModule = {
4825
4769
  onlyCompositions,
4826
4770
  onlyPatterns,
4827
4771
  patternType,
4828
- verbose,
4829
- batchSize: resolvedBatchSize
4772
+ verbose
4830
4773
  });
4831
4774
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
4832
4775
  for await (const obj of target.objects) {
@@ -5065,37 +5008,34 @@ var CompositionPatternPublishModule = {
5065
5008
  withDebugOptions(
5066
5009
  withProjectOptions(
5067
5010
  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
- )
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
+ })
5099
5039
  )
5100
5040
  )
5101
5041
  )
@@ -5105,7 +5045,7 @@ var CompositionPatternPublishModule = {
5105
5045
 
5106
5046
  // src/commands/canvas/commands/compositionPattern/pull.ts
5107
5047
  var CompositionPatternPullModule = {
5108
- ...componentInstancePullModuleFactory("compositionPatterns", "compositionPattern"),
5048
+ ...componentInstancePullModuleFactory("compositionPatterns"),
5109
5049
  describe: "Pulls all composition patterns to local files in a directory",
5110
5050
  builder: (yargs43) => withConfiguration(
5111
5051
  withApiOptions(
@@ -5149,7 +5089,7 @@ var CompositionPatternPullModule = {
5149
5089
 
5150
5090
  // src/commands/canvas/commands/compositionPattern/push.ts
5151
5091
  var CompositionPatternPushModule = {
5152
- ...componentInstancePushModuleFactory("compositionPatterns", "compositionPattern"),
5092
+ ...componentInstancePushModuleFactory("compositionPatterns"),
5153
5093
  describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
5154
5094
  builder: (yargs43) => withConfiguration(
5155
5095
  withApiOptions(
@@ -5300,15 +5240,10 @@ var ContentTypeListModule = {
5300
5240
 
5301
5241
  // src/commands/canvas/contentTypeEngineDataSource.ts
5302
5242
  function createContentTypeEngineDataSource({
5303
- client,
5304
- batchSize,
5305
- verbose
5243
+ client
5306
5244
  }) {
5307
5245
  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
- );
5246
+ const { contentTypes } = await client.getContentTypes({ offset: 0, limit: 1e3 });
5312
5247
  for await (const ct of contentTypes) {
5313
5248
  const result = {
5314
5249
  id: selectContentTypeIdentifier(ct),
@@ -5340,25 +5275,22 @@ var ContentTypePullModule = {
5340
5275
  withDebugOptions(
5341
5276
  withProjectOptions(
5342
5277
  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
- )
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
+ })
5362
5294
  )
5363
5295
  )
5364
5296
  )
@@ -5375,8 +5307,7 @@ var ContentTypePullModule = {
5375
5307
  project: projectId,
5376
5308
  diff: diffMode,
5377
5309
  allowEmptySource,
5378
- verbose,
5379
- resolvedBatchSize
5310
+ verbose
5380
5311
  }) => {
5381
5312
  const fetch2 = nodeFetchProxy(proxy, verbose);
5382
5313
  const client = getContentClient({
@@ -5385,11 +5316,7 @@ var ContentTypePullModule = {
5385
5316
  fetch: fetch2,
5386
5317
  projectId
5387
5318
  });
5388
- const source = createContentTypeEngineDataSource({
5389
- client,
5390
- verbose,
5391
- batchSize: resolvedBatchSize
5392
- });
5319
+ const source = createContentTypeEngineDataSource({ client });
5393
5320
  let target;
5394
5321
  const isPackage = isPathAPackageFile(directory);
5395
5322
  if (isPackage) {
@@ -5433,24 +5360,21 @@ var ContentTypePushModule = {
5433
5360
  withDebugOptions(
5434
5361
  withProjectOptions(
5435
5362
  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
- )
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
+ })
5454
5378
  )
5455
5379
  )
5456
5380
  )
@@ -5466,8 +5390,7 @@ var ContentTypePushModule = {
5466
5390
  project: projectId,
5467
5391
  diff: diffMode,
5468
5392
  allowEmptySource,
5469
- verbose,
5470
- resolvedBatchSize
5393
+ verbose
5471
5394
  }) => {
5472
5395
  const fetch2 = nodeFetchProxy(proxy, verbose);
5473
5396
  const client = getContentClient({
@@ -5494,11 +5417,7 @@ var ContentTypePushModule = {
5494
5417
  verbose
5495
5418
  });
5496
5419
  }
5497
- const target = createContentTypeEngineDataSource({
5498
- client,
5499
- verbose,
5500
- batchSize: resolvedBatchSize
5501
- });
5420
+ const target = createContentTypeEngineDataSource({ client });
5502
5421
  await syncEngine({
5503
5422
  source,
5504
5423
  target,
@@ -6166,9 +6085,7 @@ function createEntryEngineDataSource({
6166
6085
  state,
6167
6086
  onlyEntries,
6168
6087
  onlyPatterns,
6169
- entryIDs,
6170
- batchSize,
6171
- verbose
6088
+ entryIDs
6172
6089
  }) {
6173
6090
  const stateId = convertStateOption(state);
6174
6091
  async function* getObjects() {
@@ -6194,7 +6111,7 @@ function createEntryEngineDataSource({
6194
6111
  throw error;
6195
6112
  }
6196
6113
  },
6197
- { pageSize: batchSize ?? 100, verbose, entityName: "entries" }
6114
+ { pageSize: 100 }
6198
6115
  );
6199
6116
  for await (const e of entries) {
6200
6117
  const result = {
@@ -6227,18 +6144,15 @@ var EntryPublishModule = {
6227
6144
  withDiffOptions(
6228
6145
  withApiOptions(
6229
6146
  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
- )
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
+ })
6242
6156
  )
6243
6157
  )
6244
6158
  )
@@ -6254,8 +6168,7 @@ var EntryPublishModule = {
6254
6168
  project: projectId,
6255
6169
  whatIf,
6256
6170
  verbose,
6257
- directory,
6258
- resolvedBatchSize
6171
+ directory
6259
6172
  }) => {
6260
6173
  if (!all && !ids || all && ids) {
6261
6174
  console.error(`Specify --all or entry ID(s) to publish.`);
@@ -6268,15 +6181,13 @@ var EntryPublishModule = {
6268
6181
  client,
6269
6182
  state: "preview",
6270
6183
  entryIDs: entryIDsArray,
6271
- onlyEntries: true,
6272
- batchSize: resolvedBatchSize
6184
+ onlyEntries: true
6273
6185
  });
6274
6186
  const target = createEntryEngineDataSource({
6275
6187
  client,
6276
6188
  state: "published",
6277
6189
  entryIDs: entryIDsArray,
6278
- onlyEntries: true,
6279
- batchSize: resolvedBatchSize
6190
+ onlyEntries: true
6280
6191
  });
6281
6192
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6282
6193
  await syncEngine({
@@ -6314,25 +6225,22 @@ var EntryPullModule = {
6314
6225
  withProjectOptions(
6315
6226
  withStateOptions(
6316
6227
  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
- )
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
+ })
6336
6244
  )
6337
6245
  )
6338
6246
  )
@@ -6351,8 +6259,7 @@ var EntryPullModule = {
6351
6259
  project: projectId,
6352
6260
  diff: diffMode,
6353
6261
  allowEmptySource,
6354
- verbose,
6355
- resolvedBatchSize
6262
+ verbose
6356
6263
  }) => {
6357
6264
  const fetch2 = nodeFetchProxy(proxy, verbose);
6358
6265
  const client = getContentClient({
@@ -6362,13 +6269,7 @@ var EntryPullModule = {
6362
6269
  projectId
6363
6270
  });
6364
6271
  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
- });
6272
+ const source = createEntryEngineDataSource({ client, state, onlyEntries: true });
6372
6273
  let target;
6373
6274
  const isPackage = isPathAPackageFile(directory);
6374
6275
  if (isPackage) {
@@ -6430,19 +6331,16 @@ var EntryPushModule = {
6430
6331
  withProjectOptions(
6431
6332
  withStateOptions(
6432
6333
  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
- )
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
+ })
6446
6344
  )
6447
6345
  )
6448
6346
  )
@@ -6460,8 +6358,7 @@ var EntryPushModule = {
6460
6358
  project: projectId,
6461
6359
  diff: diffMode,
6462
6360
  allowEmptySource,
6463
- verbose,
6464
- resolvedBatchSize
6361
+ verbose
6465
6362
  }) => {
6466
6363
  const fetch2 = nodeFetchProxy(proxy, verbose);
6467
6364
  const client = getContentClient({
@@ -6488,13 +6385,7 @@ var EntryPushModule = {
6488
6385
  verbose
6489
6386
  });
6490
6387
  }
6491
- const target = createEntryEngineDataSource({
6492
- client,
6493
- state,
6494
- onlyEntries: true,
6495
- verbose,
6496
- batchSize: resolvedBatchSize
6497
- });
6388
+ const target = createEntryEngineDataSource({ client, state, onlyEntries: true });
6498
6389
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6499
6390
  const uniformLocales = await fetchUniformLocales({
6500
6391
  apiKey,
@@ -6588,37 +6479,24 @@ import { diffJson as diffJson3 } from "diff";
6588
6479
  var EntryUnpublishModule = {
6589
6480
  command: "unpublish [ids]",
6590
6481
  describe: "Unpublish an entry(ies)",
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
- )
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
+ })
6607
6495
  )
6608
6496
  )
6609
6497
  )
6610
6498
  ),
6611
- handler: async ({
6612
- apiHost,
6613
- apiKey,
6614
- proxy,
6615
- ids,
6616
- all,
6617
- project: projectId,
6618
- whatIf,
6619
- verbose,
6620
- resolvedBatchSize
6621
- }) => {
6499
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
6622
6500
  if (!all && !ids || all && ids) {
6623
6501
  console.error(`Specify --all or entry ID(s) to unpublish.`);
6624
6502
  process.exit(1);
@@ -6631,15 +6509,13 @@ var EntryUnpublishModule = {
6631
6509
  client,
6632
6510
  state: "published",
6633
6511
  entryIDs: entryIDsArray,
6634
- onlyEntries: true,
6635
- batchSize: resolvedBatchSize
6512
+ onlyEntries: true
6636
6513
  });
6637
6514
  const target = createEntryEngineDataSource({
6638
6515
  client,
6639
6516
  state: "preview",
6640
6517
  entryIDs: entryIDsArray,
6641
- onlyEntries: true,
6642
- batchSize: resolvedBatchSize
6518
+ onlyEntries: true
6643
6519
  });
6644
6520
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
6645
6521
  for await (const obj of target.objects) {
@@ -6857,18 +6733,15 @@ var EntryPatternPublishModule = {
6857
6733
  withApiOptions(
6858
6734
  withProjectOptions(
6859
6735
  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
- )
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
+ })
6872
6745
  )
6873
6746
  )
6874
6747
  )
@@ -6884,8 +6757,7 @@ var EntryPatternPublishModule = {
6884
6757
  whatIf,
6885
6758
  project: projectId,
6886
6759
  verbose,
6887
- directory,
6888
- resolvedBatchSize
6760
+ directory
6889
6761
  }) => {
6890
6762
  if (!all && !ids || all && ids) {
6891
6763
  console.error(`Specify --all or entry pattern ID(s) to publish.`);
@@ -6898,15 +6770,13 @@ var EntryPatternPublishModule = {
6898
6770
  client,
6899
6771
  state: "preview",
6900
6772
  entryIDs: entryIDsArray,
6901
- onlyPatterns: true,
6902
- batchSize: resolvedBatchSize
6773
+ onlyPatterns: true
6903
6774
  });
6904
6775
  const target = createEntryEngineDataSource({
6905
6776
  client,
6906
6777
  state: "published",
6907
6778
  entryIDs: entryIDsArray,
6908
- onlyPatterns: true,
6909
- batchSize: resolvedBatchSize
6779
+ onlyPatterns: true
6910
6780
  });
6911
6781
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6912
6782
  await syncEngine({
@@ -6944,25 +6814,22 @@ var EntryPatternPullModule = {
6944
6814
  withProjectOptions(
6945
6815
  withStateOptions(
6946
6816
  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
- )
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
+ })
6966
6833
  )
6967
6834
  )
6968
6835
  )
@@ -6981,8 +6848,7 @@ var EntryPatternPullModule = {
6981
6848
  project: projectId,
6982
6849
  diff: diffMode,
6983
6850
  allowEmptySource,
6984
- verbose,
6985
- resolvedBatchSize
6851
+ verbose
6986
6852
  }) => {
6987
6853
  const fetch2 = nodeFetchProxy(proxy, verbose);
6988
6854
  const client = getContentClient({
@@ -6992,13 +6858,7 @@ var EntryPatternPullModule = {
6992
6858
  projectId
6993
6859
  });
6994
6860
  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
- });
6861
+ const source = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7002
6862
  let target;
7003
6863
  const isPackage = isPathAPackageFile(directory);
7004
6864
  if (isPackage) {
@@ -7060,24 +6920,21 @@ var EntryPatternPushModule = {
7060
6920
  withProjectOptions(
7061
6921
  withStateOptions(
7062
6922
  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
- )
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
+ })
7081
6938
  )
7082
6939
  )
7083
6940
  )
@@ -7095,8 +6952,7 @@ var EntryPatternPushModule = {
7095
6952
  project: projectId,
7096
6953
  diff: diffMode,
7097
6954
  allowEmptySource,
7098
- verbose,
7099
- resolvedBatchSize
6955
+ verbose
7100
6956
  }) => {
7101
6957
  const fetch2 = nodeFetchProxy(proxy, verbose);
7102
6958
  const client = getContentClient({
@@ -7123,13 +6979,7 @@ var EntryPatternPushModule = {
7123
6979
  verbose
7124
6980
  });
7125
6981
  }
7126
- const target = createEntryEngineDataSource({
7127
- client,
7128
- state,
7129
- onlyPatterns: true,
7130
- verbose,
7131
- batchSize: resolvedBatchSize
7132
- });
6982
+ const target = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7133
6983
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
7134
6984
  const uniformLocales = await fetchUniformLocales({
7135
6985
  apiKey,
@@ -7196,33 +7046,20 @@ var EntryPatternUnpublishModule = {
7196
7046
  withDebugOptions(
7197
7047
  withApiOptions(
7198
7048
  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
- )
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
+ })
7211
7058
  )
7212
7059
  )
7213
7060
  )
7214
7061
  ),
7215
- handler: async ({
7216
- apiHost,
7217
- apiKey,
7218
- proxy,
7219
- ids,
7220
- all,
7221
- project: projectId,
7222
- whatIf,
7223
- verbose,
7224
- resolvedBatchSize
7225
- }) => {
7062
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
7226
7063
  if (!all && !ids || all && ids) {
7227
7064
  console.error(`Specify --all or entry pattern ID(s) to unpublish.`);
7228
7065
  process.exit(1);
@@ -7235,15 +7072,13 @@ var EntryPatternUnpublishModule = {
7235
7072
  client,
7236
7073
  state: "published",
7237
7074
  entryIDs: entryIDsArray,
7238
- onlyPatterns: true,
7239
- batchSize: resolvedBatchSize
7075
+ onlyPatterns: true
7240
7076
  });
7241
7077
  const target = createEntryEngineDataSource({
7242
7078
  client,
7243
7079
  state: "preview",
7244
7080
  entryIDs: entryIDsArray,
7245
- onlyPatterns: true,
7246
- batchSize: resolvedBatchSize
7081
+ onlyPatterns: true
7247
7082
  });
7248
7083
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
7249
7084
  for await (const obj of target.objects) {
@@ -7329,14 +7164,12 @@ function normalizeLabelForSync(label) {
7329
7164
  return labelWithoutProjectId;
7330
7165
  }
7331
7166
  function createLabelsEngineDataSource({
7332
- client,
7333
- batchSize,
7334
- verbose
7167
+ client
7335
7168
  }) {
7336
7169
  async function* getObjects() {
7337
7170
  const labels = paginateAsync(
7338
7171
  async (offset, limit2) => (await client.getLabels({ offset, limit: limit2 })).labels,
7339
- { pageSize: batchSize ?? 100, verbose, entityName: "labels" }
7172
+ { pageSize: 100 }
7340
7173
  );
7341
7174
  for await (const label of labels) {
7342
7175
  const result = {
@@ -7377,25 +7210,22 @@ var LabelPullModule = {
7377
7210
  withApiOptions(
7378
7211
  withProjectOptions(
7379
7212
  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
- )
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
+ })
7399
7229
  )
7400
7230
  )
7401
7231
  )
@@ -7412,16 +7242,11 @@ var LabelPullModule = {
7412
7242
  project: projectId,
7413
7243
  diff: diffMode,
7414
7244
  allowEmptySource,
7415
- verbose,
7416
- resolvedBatchSize
7245
+ verbose
7417
7246
  }) => {
7418
7247
  const fetch2 = nodeFetchProxy(proxy, verbose);
7419
7248
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
7420
- const source = createLabelsEngineDataSource({
7421
- client,
7422
- verbose,
7423
- batchSize: resolvedBatchSize
7424
- });
7249
+ const source = createLabelsEngineDataSource({ client });
7425
7250
  let target;
7426
7251
  const isPackage = isPathAPackageFile(directory);
7427
7252
  if (isPackage) {
@@ -7472,19 +7297,16 @@ var LabelPushModule = {
7472
7297
  withApiOptions(
7473
7298
  withProjectOptions(
7474
7299
  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
- )
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
+ })
7488
7310
  )
7489
7311
  )
7490
7312
  )
@@ -7500,8 +7322,7 @@ var LabelPushModule = {
7500
7322
  project: projectId,
7501
7323
  diff: diffMode,
7502
7324
  allowEmptySource,
7503
- verbose,
7504
- resolvedBatchSize
7325
+ verbose
7505
7326
  }) => {
7506
7327
  const fetch2 = nodeFetchProxy(proxy, verbose);
7507
7328
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -7524,11 +7345,7 @@ var LabelPushModule = {
7524
7345
  verbose
7525
7346
  });
7526
7347
  }
7527
- const target = createLabelsEngineDataSource({
7528
- client,
7529
- verbose,
7530
- batchSize: resolvedBatchSize
7531
- });
7348
+ const target = createLabelsEngineDataSource({ client });
7532
7349
  const labelsFailedDueToMissingParent = /* @__PURE__ */ new Set();
7533
7350
  const attemptSync = async () => {
7534
7351
  const lastFailedLabelsCount = labelsFailedDueToMissingParent.size;
@@ -8673,15 +8490,11 @@ var getWorkflowClient = (options) => new WorkflowClient({ ...options, bypassCach
8673
8490
 
8674
8491
  // src/commands/canvas/workflowEngineDataSource.ts
8675
8492
  function createWorkflowEngineDataSource({
8676
- client,
8677
- batchSize,
8678
- verbose
8493
+ client
8679
8494
  }) {
8680
8495
  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"
8496
+ const workflows = paginateAsync(async () => (await client.get()).results, {
8497
+ pageSize: 100
8685
8498
  });
8686
8499
  for await (const workflow of workflows) {
8687
8500
  const { modified, modifiedBy, created, createdBy, ...workflowWithoutStatistics } = workflow;
@@ -8715,25 +8528,22 @@ var WorkflowPullModule = {
8715
8528
  withDebugOptions(
8716
8529
  withProjectOptions(
8717
8530
  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
- )
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
+ })
8737
8547
  )
8738
8548
  )
8739
8549
  )
@@ -8750,16 +8560,11 @@ var WorkflowPullModule = {
8750
8560
  project: projectId,
8751
8561
  diff: diffMode,
8752
8562
  allowEmptySource,
8753
- verbose,
8754
- resolvedBatchSize
8563
+ verbose
8755
8564
  }) => {
8756
8565
  const fetch2 = nodeFetchProxy(proxy, verbose);
8757
8566
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
8758
- const source = createWorkflowEngineDataSource({
8759
- client,
8760
- verbose,
8761
- batchSize: resolvedBatchSize
8762
- });
8567
+ const source = createWorkflowEngineDataSource({ client });
8763
8568
  let target;
8764
8569
  const isPackage = isPathAPackageFile(directory);
8765
8570
  if (isPackage) {
@@ -8803,19 +8608,16 @@ var WorkflowPushModule = {
8803
8608
  withApiOptions(
8804
8609
  withProjectOptions(
8805
8610
  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
- )
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
+ })
8819
8621
  )
8820
8622
  )
8821
8623
  )
@@ -8831,8 +8633,7 @@ var WorkflowPushModule = {
8831
8633
  project: projectId,
8832
8634
  diff: diffMode,
8833
8635
  allowEmptySource,
8834
- verbose,
8835
- resolvedBatchSize
8636
+ verbose
8836
8637
  }) => {
8837
8638
  const fetch2 = nodeFetchProxy(proxy, verbose);
8838
8639
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -8854,11 +8655,7 @@ var WorkflowPushModule = {
8854
8655
  verbose
8855
8656
  });
8856
8657
  }
8857
- const target = createWorkflowEngineDataSource({
8858
- client,
8859
- verbose,
8860
- batchSize: resolvedBatchSize
8861
- });
8658
+ const target = createWorkflowEngineDataSource({ client });
8862
8659
  await syncEngine({
8863
8660
  source,
8864
8661
  target,
@@ -13214,8 +13011,7 @@ var SyncPullModule = {
13214
13011
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13215
13012
  mode: getPullMode(entityType, config2),
13216
13013
  directory: getPullFilename(entityType, config2),
13217
- allowEmptySource: config2.allowEmptySource,
13218
- ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13014
+ allowEmptySource: config2.allowEmptySource
13219
13015
  }),
13220
13016
  {
13221
13017
  text: `${entityType}\u2026`,
@@ -13380,8 +13176,7 @@ var SyncPushModule = {
13380
13176
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13381
13177
  mode: getPushMode(entityType, config2),
13382
13178
  directory: getPushFilename(entityType, config2),
13383
- allowEmptySource: config2.allowEmptySource,
13384
- ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13179
+ allowEmptySource: config2.allowEmptySource
13385
13180
  }),
13386
13181
  {
13387
13182
  text: `${entityType}...`,
@@ -13402,12 +13197,10 @@ var SyncPushModule = {
13402
13197
  await spinPromise(
13403
13198
  ComponentPatternPublishModule.handler({
13404
13199
  ...otherParams,
13405
- serialization: config2,
13406
13200
  patternType: "component",
13407
13201
  onlyPatterns: true,
13408
13202
  all: true,
13409
- directory: getPushFilename("componentPattern", config2),
13410
- resolvedBatchSize: getEntityBatchSize("componentPattern", config2)
13203
+ directory: getPushFilename("componentPattern", config2)
13411
13204
  }),
13412
13205
  {
13413
13206
  text: "publishing component patterns...",
@@ -13428,12 +13221,10 @@ var SyncPushModule = {
13428
13221
  await spinPromise(
13429
13222
  CompositionPatternPublishModule.handler({
13430
13223
  ...otherParams,
13431
- serialization: config2,
13432
13224
  all: true,
13433
13225
  onlyPatterns: true,
13434
13226
  patternType: "composition",
13435
- directory: getPushFilename("compositionPattern", config2),
13436
- resolvedBatchSize: getEntityBatchSize("compositionPattern", config2)
13227
+ directory: getPushFilename("compositionPattern", config2)
13437
13228
  }),
13438
13229
  {
13439
13230
  text: "publishing composition patterns...",
@@ -13454,11 +13245,9 @@ var SyncPushModule = {
13454
13245
  await spinPromise(
13455
13246
  CompositionPublishModule.handler({
13456
13247
  ...otherParams,
13457
- serialization: config2,
13458
13248
  all: true,
13459
13249
  onlyCompositions: true,
13460
- directory: getPushFilename("composition", config2),
13461
- resolvedBatchSize: getEntityBatchSize("composition", config2)
13250
+ directory: getPushFilename("composition", config2)
13462
13251
  }),
13463
13252
  {
13464
13253
  text: "publishing compositions...",
@@ -13479,10 +13268,8 @@ var SyncPushModule = {
13479
13268
  await spinPromise(
13480
13269
  EntryPublishModule.handler({
13481
13270
  ...otherParams,
13482
- serialization: config2,
13483
13271
  all: true,
13484
- directory: getPushFilename("entry", config2),
13485
- resolvedBatchSize: getEntityBatchSize("entry", config2)
13272
+ directory: getPushFilename("entry", config2)
13486
13273
  }),
13487
13274
  {
13488
13275
  text: "publishing entries...",
@@ -13503,10 +13290,8 @@ var SyncPushModule = {
13503
13290
  await spinPromise(
13504
13291
  EntryPatternPublishModule.handler({
13505
13292
  ...otherParams,
13506
- serialization: config2,
13507
13293
  all: true,
13508
- directory: getPushFilename("entryPattern", config2),
13509
- resolvedBatchSize: getEntityBatchSize("entryPattern", config2)
13294
+ directory: getPushFilename("entryPattern", config2)
13510
13295
  }),
13511
13296
  {
13512
13297
  text: "publishing entry patterns...",