@uniformdev/cli 20.66.5-alpha.3 → 20.66.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5,23 +5,20 @@ import {
5
5
  applyDefaultSyncConfiguration,
6
6
  emitWithFormat,
7
7
  getDirectoryOrFilename,
8
- getEntityBatchSize,
9
8
  getEntityOption,
10
- isPaginatedSyncEntity,
11
9
  isPathAPackageFile,
12
10
  nodeFetchProxy,
13
11
  package_default,
14
12
  paginateAsync,
15
13
  readFileToObject,
16
14
  withApiOptions,
17
- withBatchSizeOptions,
18
15
  withConfiguration,
19
16
  withDebugOptions,
20
17
  withDiffOptions,
21
18
  withFormatOptions,
22
19
  withProjectOptions,
23
20
  withTeamOptions
24
- } from "./chunk-JWPMHLJX.mjs";
21
+ } from "./chunk-OWJCNXSV.mjs";
25
22
 
26
23
  // src/index.ts
27
24
  import * as dotenv from "dotenv";
@@ -2712,16 +2709,20 @@ function convertStateOption(state) {
2712
2709
  // src/commands/canvas/assetEngineDataSource.ts
2713
2710
  function createAssetEngineDataSource({
2714
2711
  client,
2715
- verbose,
2716
- batchSize
2712
+ verbose
2717
2713
  }) {
2718
2714
  async function* getObjects() {
2719
2715
  const assets = paginateAsync(
2720
- async (offset, limit2) => (await client.get({
2721
- limit: limit2,
2722
- offset
2723
- })).assets,
2724
- { pageSize: batchSize ?? 50, verbose, entityName: "assets" }
2716
+ async (offset, limit2) => {
2717
+ if (verbose) {
2718
+ console.log(`Fetching all assets from offset ${offset} with limit ${limit2}`);
2719
+ }
2720
+ return (await client.get({
2721
+ limit: limit2,
2722
+ offset
2723
+ })).assets;
2724
+ },
2725
+ { pageSize: 50 }
2725
2726
  );
2726
2727
  for await (const e of assets) {
2727
2728
  const result = {
@@ -2771,25 +2772,22 @@ var AssetPullModule = {
2771
2772
  withDebugOptions(
2772
2773
  withProjectOptions(
2773
2774
  withDiffOptions(
2774
- withBatchSizeOptions(
2775
- yargs43.positional("directory", {
2776
- describe: "Directory to save the assets to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2777
- type: "string"
2778
- }).option("format", {
2779
- alias: ["f"],
2780
- describe: "Output format",
2781
- default: "yaml",
2782
- choices: ["yaml", "json"],
2783
- type: "string"
2784
- }).option("mode", {
2785
- alias: ["m"],
2786
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
2787
- choices: ["create", "createOrUpdate", "mirror"],
2788
- default: "mirror",
2789
- type: "string"
2790
- }),
2791
- "asset"
2792
- )
2775
+ yargs43.positional("directory", {
2776
+ describe: "Directory to save the assets to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2777
+ type: "string"
2778
+ }).option("format", {
2779
+ alias: ["f"],
2780
+ describe: "Output format",
2781
+ default: "yaml",
2782
+ choices: ["yaml", "json"],
2783
+ type: "string"
2784
+ }).option("mode", {
2785
+ alias: ["m"],
2786
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
2787
+ choices: ["create", "createOrUpdate", "mirror"],
2788
+ default: "mirror",
2789
+ type: "string"
2790
+ })
2793
2791
  )
2794
2792
  )
2795
2793
  )
@@ -2806,8 +2804,7 @@ var AssetPullModule = {
2806
2804
  whatIf,
2807
2805
  project: projectId,
2808
2806
  diff: diffMode,
2809
- allowEmptySource,
2810
- resolvedBatchSize
2807
+ allowEmptySource
2811
2808
  }) => {
2812
2809
  const fetch2 = nodeFetchProxy(proxy, verbose);
2813
2810
  const client = getAssetClient({
@@ -2817,11 +2814,7 @@ var AssetPullModule = {
2817
2814
  projectId
2818
2815
  });
2819
2816
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2820
- const source = createAssetEngineDataSource({
2821
- client,
2822
- verbose,
2823
- batchSize: resolvedBatchSize
2824
- });
2817
+ const source = createAssetEngineDataSource({ client, verbose });
2825
2818
  let target;
2826
2819
  const isPackage = isPathAPackageFile(directory);
2827
2820
  const onBeforeDeleteObject = async (id, object4) => {
@@ -2896,19 +2889,16 @@ var AssetPushModule = {
2896
2889
  withDebugOptions(
2897
2890
  withProjectOptions(
2898
2891
  withDiffOptions(
2899
- withBatchSizeOptions(
2900
- yargs43.positional("directory", {
2901
- describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
2902
- type: "string"
2903
- }).option("mode", {
2904
- alias: ["m"],
2905
- 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',
2906
- choices: ["create", "createOrUpdate", "mirror"],
2907
- default: "mirror",
2908
- type: "string"
2909
- }),
2910
- "asset"
2911
- )
2892
+ yargs43.positional("directory", {
2893
+ describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
2894
+ type: "string"
2895
+ }).option("mode", {
2896
+ alias: ["m"],
2897
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
2898
+ choices: ["create", "createOrUpdate", "mirror"],
2899
+ default: "mirror",
2900
+ type: "string"
2901
+ })
2912
2902
  )
2913
2903
  )
2914
2904
  )
@@ -2924,8 +2914,7 @@ var AssetPushModule = {
2924
2914
  project: projectId,
2925
2915
  diff: diffMode,
2926
2916
  allowEmptySource,
2927
- verbose,
2928
- resolvedBatchSize
2917
+ verbose
2929
2918
  }) => {
2930
2919
  const fetch2 = nodeFetchProxy(proxy, verbose);
2931
2920
  const client = getAssetClient({
@@ -2952,11 +2941,7 @@ var AssetPushModule = {
2952
2941
  verbose
2953
2942
  });
2954
2943
  }
2955
- const target = createAssetEngineDataSource({
2956
- client,
2957
- verbose,
2958
- batchSize: resolvedBatchSize
2959
- });
2944
+ const target = createAssetEngineDataSource({ client, verbose });
2960
2945
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
2961
2946
  await syncEngine({
2962
2947
  source,
@@ -3149,8 +3134,10 @@ function createCategoriesEngineDataSource({
3149
3134
  client
3150
3135
  }) {
3151
3136
  async function* getObjects() {
3152
- const categories = (await client.getCategories()).categories;
3153
- for (const def of categories) {
3137
+ const categories = paginateAsync(async () => (await client.getCategories()).categories, {
3138
+ pageSize: 100
3139
+ });
3140
+ for await (const def of categories) {
3154
3141
  const result = {
3155
3142
  id: selectIdentifier(def),
3156
3143
  displayName: selectDisplayName(def),
@@ -3471,14 +3458,12 @@ var ComponentListModule = {
3471
3458
 
3472
3459
  // src/commands/canvas/componentDefinitionEngineDataSource.ts
3473
3460
  function createComponentDefinitionEngineDataSource({
3474
- client,
3475
- batchSize,
3476
- verbose
3461
+ client
3477
3462
  }) {
3478
3463
  async function* getObjects() {
3479
3464
  const componentDefinitions = paginateAsync(
3480
3465
  async (offset, limit2) => (await client.getComponentDefinitions({ limit: limit2, offset })).componentDefinitions,
3481
- { pageSize: batchSize ?? 200, verbose, entityName: "components" }
3466
+ { pageSize: 200 }
3482
3467
  );
3483
3468
  for await (const def of componentDefinitions) {
3484
3469
  const result = {
@@ -3518,25 +3503,22 @@ var ComponentPullModule = {
3518
3503
  withDebugOptions(
3519
3504
  withProjectOptions(
3520
3505
  withDiffOptions(
3521
- withBatchSizeOptions(
3522
- yargs43.positional("directory", {
3523
- 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.",
3524
- type: "string"
3525
- }).option("format", {
3526
- alias: ["f"],
3527
- describe: "Output format",
3528
- default: "yaml",
3529
- choices: ["yaml", "json"],
3530
- type: "string"
3531
- }).option("mode", {
3532
- alias: ["m"],
3533
- 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',
3534
- choices: ["create", "createOrUpdate", "mirror"],
3535
- default: "mirror",
3536
- type: "string"
3537
- }),
3538
- "component"
3539
- )
3506
+ yargs43.positional("directory", {
3507
+ describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
3508
+ type: "string"
3509
+ }).option("format", {
3510
+ alias: ["f"],
3511
+ describe: "Output format",
3512
+ default: "yaml",
3513
+ choices: ["yaml", "json"],
3514
+ type: "string"
3515
+ }).option("mode", {
3516
+ alias: ["m"],
3517
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
3518
+ choices: ["create", "createOrUpdate", "mirror"],
3519
+ default: "mirror",
3520
+ type: "string"
3521
+ })
3540
3522
  )
3541
3523
  )
3542
3524
  )
@@ -3553,16 +3535,11 @@ var ComponentPullModule = {
3553
3535
  project: projectId,
3554
3536
  diff: diffMode,
3555
3537
  allowEmptySource,
3556
- verbose,
3557
- resolvedBatchSize
3538
+ verbose
3558
3539
  }) => {
3559
3540
  const fetch2 = nodeFetchProxy(proxy, verbose);
3560
3541
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
3561
- const source = createComponentDefinitionEngineDataSource({
3562
- client,
3563
- batchSize: resolvedBatchSize,
3564
- verbose
3565
- });
3542
+ const source = createComponentDefinitionEngineDataSource({ client });
3566
3543
  let target;
3567
3544
  const isPackage = isPathAPackageFile(directory);
3568
3545
  if (isPackage) {
@@ -3607,19 +3584,16 @@ var ComponentPushModule = {
3607
3584
  withDebugOptions(
3608
3585
  withProjectOptions(
3609
3586
  withDiffOptions(
3610
- withBatchSizeOptions(
3611
- yargs43.positional("directory", {
3612
- describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
3613
- type: "string"
3614
- }).option("mode", {
3615
- alias: ["m"],
3616
- 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',
3617
- choices: ["create", "createOrUpdate", "mirror"],
3618
- default: "mirror",
3619
- type: "string"
3620
- }),
3621
- "component"
3622
- )
3587
+ yargs43.positional("directory", {
3588
+ describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
3589
+ type: "string"
3590
+ }).option("mode", {
3591
+ alias: ["m"],
3592
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
3593
+ choices: ["create", "createOrUpdate", "mirror"],
3594
+ default: "mirror",
3595
+ type: "string"
3596
+ })
3623
3597
  )
3624
3598
  )
3625
3599
  )
@@ -3635,8 +3609,7 @@ var ComponentPushModule = {
3635
3609
  project: projectId,
3636
3610
  diff: diffMode,
3637
3611
  allowEmptySource,
3638
- verbose,
3639
- resolvedBatchSize
3612
+ verbose
3640
3613
  }) => {
3641
3614
  const fetch2 = nodeFetchProxy(proxy, verbose);
3642
3615
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -3659,11 +3632,7 @@ var ComponentPushModule = {
3659
3632
  verbose
3660
3633
  });
3661
3634
  }
3662
- const target = createComponentDefinitionEngineDataSource({
3663
- client,
3664
- batchSize: resolvedBatchSize,
3665
- verbose
3666
- });
3635
+ const target = createComponentDefinitionEngineDataSource({ client });
3667
3636
  await syncEngine({
3668
3637
  source,
3669
3638
  target,
@@ -4117,7 +4086,6 @@ function createComponentInstanceEngineDataSource({
4117
4086
  onlyPatterns,
4118
4087
  patternType,
4119
4088
  verbose,
4120
- batchSize,
4121
4089
  ...clientOptions
4122
4090
  }) {
4123
4091
  const stateId = convertStateOption(state);
@@ -4141,7 +4109,7 @@ function createComponentInstanceEngineDataSource({
4141
4109
  }
4142
4110
  return (await client.getCompositionList(parameters)).compositions;
4143
4111
  },
4144
- { pageSize: batchSize ?? 100, verbose, entityName: "compositions" }
4112
+ { pageSize: 100 }
4145
4113
  );
4146
4114
  for await (const compositionListItem of componentInstances) {
4147
4115
  const result = {
@@ -4180,27 +4148,24 @@ var CompositionPublishModule = {
4180
4148
  withProjectOptions(
4181
4149
  withDebugOptions(
4182
4150
  withDiffOptions(
4183
- withBatchSizeOptions(
4184
- yargs43.positional("ids", {
4185
- describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4186
- type: "string"
4187
- }).option("all", {
4188
- alias: ["a"],
4189
- describe: "Publishes all compositions. Use compositionId to publish one instead.",
4190
- default: false,
4191
- type: "boolean"
4192
- }).option("onlyCompositions", {
4193
- describe: "Only publishing compositions and not patterns",
4194
- default: false,
4195
- type: "boolean"
4196
- }).option("onlyPatterns", {
4197
- describe: "Only pulling patterns and not compositions",
4198
- default: false,
4199
- type: "boolean",
4200
- hidden: true
4201
- }),
4202
- "composition"
4203
- )
4151
+ yargs43.positional("ids", {
4152
+ describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4153
+ type: "string"
4154
+ }).option("all", {
4155
+ alias: ["a"],
4156
+ describe: "Publishes all compositions. Use compositionId to publish one instead.",
4157
+ default: false,
4158
+ type: "boolean"
4159
+ }).option("onlyCompositions", {
4160
+ describe: "Only publishing compositions and not patterns",
4161
+ default: false,
4162
+ type: "boolean"
4163
+ }).option("onlyPatterns", {
4164
+ describe: "Only pulling patterns and not compositions",
4165
+ default: false,
4166
+ type: "boolean",
4167
+ hidden: true
4168
+ })
4204
4169
  )
4205
4170
  )
4206
4171
  )
@@ -4218,8 +4183,7 @@ var CompositionPublishModule = {
4218
4183
  onlyPatterns,
4219
4184
  patternType,
4220
4185
  verbose,
4221
- directory,
4222
- resolvedBatchSize
4186
+ directory
4223
4187
  }) => {
4224
4188
  if (!all && !ids || all && ids) {
4225
4189
  console.error(`Specify --all or composition ID(s) to publish.`);
@@ -4235,8 +4199,7 @@ var CompositionPublishModule = {
4235
4199
  onlyCompositions,
4236
4200
  onlyPatterns,
4237
4201
  patternType,
4238
- verbose,
4239
- batchSize: resolvedBatchSize
4202
+ verbose
4240
4203
  });
4241
4204
  const target = createComponentInstanceEngineDataSource({
4242
4205
  client,
@@ -4245,8 +4208,7 @@ var CompositionPublishModule = {
4245
4208
  onlyCompositions,
4246
4209
  onlyPatterns,
4247
4210
  patternType,
4248
- verbose,
4249
- batchSize: resolvedBatchSize
4211
+ verbose
4250
4212
  });
4251
4213
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4252
4214
  await syncEngine({
@@ -4284,36 +4246,33 @@ var ComponentPatternPublishModule = {
4284
4246
  withDebugOptions(
4285
4247
  withProjectOptions(
4286
4248
  withDiffOptions(
4287
- withBatchSizeOptions(
4288
- yargs43.positional("ids", {
4289
- describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4290
- type: "string"
4291
- }).option("all", {
4292
- alias: ["a"],
4293
- describe: "Publishes all component patterns. Use compositionId to publish one instead.",
4294
- default: false,
4295
- type: "boolean"
4296
- }).option("publishingState", {
4297
- describe: 'Publishing state to update to. Can be "published" or "preview".',
4298
- default: "published",
4299
- type: "string",
4300
- hidden: true
4301
- }).option("onlyCompositions", {
4302
- describe: "Only publishing compositions and not component patterns",
4303
- default: false,
4304
- type: "boolean"
4305
- }).option("onlyPatterns", {
4306
- describe: "Only pulling component patterns and not compositions",
4307
- default: true,
4308
- type: "boolean",
4309
- hidden: true
4310
- }).option("patternType", {
4311
- default: "component",
4312
- choices: ["all", "component", "composition"],
4313
- hidden: true
4314
- }),
4315
- "componentPattern"
4316
- )
4249
+ yargs43.positional("ids", {
4250
+ describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4251
+ type: "string"
4252
+ }).option("all", {
4253
+ alias: ["a"],
4254
+ describe: "Publishes all component patterns. Use compositionId to publish one instead.",
4255
+ default: false,
4256
+ type: "boolean"
4257
+ }).option("publishingState", {
4258
+ describe: 'Publishing state to update to. Can be "published" or "preview".',
4259
+ default: "published",
4260
+ type: "string",
4261
+ hidden: true
4262
+ }).option("onlyCompositions", {
4263
+ describe: "Only publishing compositions and not component patterns",
4264
+ default: false,
4265
+ type: "boolean"
4266
+ }).option("onlyPatterns", {
4267
+ describe: "Only pulling component patterns and not compositions",
4268
+ default: true,
4269
+ type: "boolean",
4270
+ hidden: true
4271
+ }).option("patternType", {
4272
+ default: "component",
4273
+ choices: ["all", "component", "composition"],
4274
+ hidden: true
4275
+ })
4317
4276
  )
4318
4277
  )
4319
4278
  )
@@ -4322,8 +4281,8 @@ var ComponentPatternPublishModule = {
4322
4281
  };
4323
4282
 
4324
4283
  // src/commands/canvas/commands/composition/pull.ts
4325
- var CompositionPullModule = componentInstancePullModuleFactory("compositions", "composition");
4326
- function componentInstancePullModuleFactory(type, entityType) {
4284
+ var CompositionPullModule = componentInstancePullModuleFactory("compositions");
4285
+ function componentInstancePullModuleFactory(type) {
4327
4286
  return {
4328
4287
  command: "pull <directory>",
4329
4288
  describe: "Pulls all compositions to local files in a directory",
@@ -4333,34 +4292,31 @@ function componentInstancePullModuleFactory(type, entityType) {
4333
4292
  withStateOptions(
4334
4293
  withDebugOptions(
4335
4294
  withDiffOptions(
4336
- withBatchSizeOptions(
4337
- yargs43.positional("directory", {
4338
- 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.",
4339
- type: "string"
4340
- }).option("format", {
4341
- alias: ["f"],
4342
- describe: "Output format",
4343
- default: "yaml",
4344
- choices: ["yaml", "json"],
4345
- type: "string"
4346
- }).option("onlyCompositions", {
4347
- describe: "Only pulling compositions and not patterns",
4348
- default: false,
4349
- type: "boolean"
4350
- }).option("onlyPatterns", {
4351
- describe: "Only pulling patterns and not compositions",
4352
- default: false,
4353
- type: "boolean",
4354
- hidden: true
4355
- }).option("mode", {
4356
- alias: ["m"],
4357
- 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',
4358
- choices: ["create", "createOrUpdate", "mirror"],
4359
- default: "mirror",
4360
- type: "string"
4361
- }),
4362
- entityType
4363
- )
4295
+ yargs43.positional("directory", {
4296
+ describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4297
+ type: "string"
4298
+ }).option("format", {
4299
+ alias: ["f"],
4300
+ describe: "Output format",
4301
+ default: "yaml",
4302
+ choices: ["yaml", "json"],
4303
+ type: "string"
4304
+ }).option("onlyCompositions", {
4305
+ describe: "Only pulling compositions and not patterns",
4306
+ default: false,
4307
+ type: "boolean"
4308
+ }).option("onlyPatterns", {
4309
+ describe: "Only pulling patterns and not compositions",
4310
+ default: false,
4311
+ type: "boolean",
4312
+ hidden: true
4313
+ }).option("mode", {
4314
+ alias: ["m"],
4315
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
4316
+ choices: ["create", "createOrUpdate", "mirror"],
4317
+ default: "mirror",
4318
+ type: "string"
4319
+ })
4364
4320
  )
4365
4321
  )
4366
4322
  )
@@ -4382,8 +4338,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4382
4338
  project: projectId,
4383
4339
  diff: diffMode,
4384
4340
  allowEmptySource,
4385
- verbose,
4386
- resolvedBatchSize
4341
+ verbose
4387
4342
  }) => {
4388
4343
  const fetch2 = nodeFetchProxy(proxy, verbose);
4389
4344
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4394,8 +4349,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4394
4349
  onlyCompositions,
4395
4350
  onlyPatterns,
4396
4351
  patternType,
4397
- verbose,
4398
- batchSize: resolvedBatchSize
4352
+ verbose
4399
4353
  });
4400
4354
  const isPackage = isPathAPackageFile(directory);
4401
4355
  let target;
@@ -4451,7 +4405,7 @@ function componentInstancePullModuleFactory(type, entityType) {
4451
4405
 
4452
4406
  // src/commands/canvas/commands/componentPattern/pull.ts
4453
4407
  var ComponentPatternPullModule = {
4454
- ...componentInstancePullModuleFactory("componentPatterns", "componentPattern"),
4408
+ ...componentInstancePullModuleFactory("componentPatterns"),
4455
4409
  describe: "Pulls all component patterns to local files in a directory",
4456
4410
  builder: (yargs43) => withConfiguration(
4457
4411
  withApiOptions(
@@ -4528,8 +4482,8 @@ function createLocaleValidationHook(uniformLocales) {
4528
4482
  }
4529
4483
 
4530
4484
  // src/commands/canvas/commands/composition/push.ts
4531
- var CompositionPushModule = componentInstancePushModuleFactory("compositions", "composition");
4532
- function componentInstancePushModuleFactory(type, entityType) {
4485
+ var CompositionPushModule = componentInstancePushModuleFactory("compositions");
4486
+ function componentInstancePushModuleFactory(type) {
4533
4487
  return {
4534
4488
  command: "push <directory>",
4535
4489
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
@@ -4539,28 +4493,25 @@ function componentInstancePushModuleFactory(type, entityType) {
4539
4493
  withStateOptions(
4540
4494
  withDebugOptions(
4541
4495
  withDiffOptions(
4542
- withBatchSizeOptions(
4543
- yargs43.positional("directory", {
4544
- describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4545
- type: "string"
4546
- }).option("mode", {
4547
- alias: ["m"],
4548
- 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',
4549
- choices: ["create", "createOrUpdate", "mirror"],
4550
- default: "mirror",
4551
- type: "string"
4552
- }).option("onlyCompositions", {
4553
- describe: "Only pulling compositions and not patterns",
4554
- default: false,
4555
- type: "boolean"
4556
- }).option("onlyPatterns", {
4557
- // backwards compatibility
4558
- default: false,
4559
- type: "boolean",
4560
- hidden: true
4561
- }),
4562
- entityType
4563
- )
4496
+ yargs43.positional("directory", {
4497
+ describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4498
+ type: "string"
4499
+ }).option("mode", {
4500
+ alias: ["m"],
4501
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
4502
+ choices: ["create", "createOrUpdate", "mirror"],
4503
+ default: "mirror",
4504
+ type: "string"
4505
+ }).option("onlyCompositions", {
4506
+ describe: "Only pulling compositions and not patterns",
4507
+ default: false,
4508
+ type: "boolean"
4509
+ }).option("onlyPatterns", {
4510
+ // backwards compatibility
4511
+ default: false,
4512
+ type: "boolean",
4513
+ hidden: true
4514
+ })
4564
4515
  )
4565
4516
  )
4566
4517
  )
@@ -4581,8 +4532,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4581
4532
  patternType,
4582
4533
  diff: diffMode,
4583
4534
  allowEmptySource,
4584
- verbose,
4585
- resolvedBatchSize
4535
+ verbose
4586
4536
  }) => {
4587
4537
  const fetch2 = nodeFetchProxy(proxy, verbose);
4588
4538
  const client = getCanvasClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -4610,8 +4560,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4610
4560
  onlyCompositions,
4611
4561
  onlyPatterns,
4612
4562
  patternType,
4613
- verbose,
4614
- batchSize: resolvedBatchSize
4563
+ verbose
4615
4564
  });
4616
4565
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
4617
4566
  const uniformLocales = await fetchUniformLocales({
@@ -4656,7 +4605,7 @@ function componentInstancePushModuleFactory(type, entityType) {
4656
4605
 
4657
4606
  // src/commands/canvas/commands/componentPattern/push.ts
4658
4607
  var ComponentPatternPushModule = {
4659
- ...componentInstancePushModuleFactory("componentPatterns", "componentPattern"),
4608
+ ...componentInstancePushModuleFactory("componentPatterns"),
4660
4609
  describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
4661
4610
  builder: (yargs43) => withConfiguration(
4662
4611
  withApiOptions(
@@ -4764,27 +4713,24 @@ var CompositionUnpublishModule = {
4764
4713
  withApiOptions(
4765
4714
  withDebugOptions(
4766
4715
  withProjectOptions(
4767
- withBatchSizeOptions(
4768
- yargs43.positional("ids", {
4769
- describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4770
- type: "string"
4771
- }).option("all", {
4772
- alias: ["a"],
4773
- describe: "Un-publishes all compositions. Use composition ID(s) to unpublish specific one(s) instead.",
4774
- default: false,
4775
- type: "boolean"
4776
- }).option("onlyCompositions", {
4777
- describe: "Only un-publishing compositions and not patterns",
4778
- default: false,
4779
- type: "boolean"
4780
- }).option("onlyPatterns", {
4781
- describe: "Only un-publishing patterns and not compositions",
4782
- default: false,
4783
- type: "boolean",
4784
- hidden: true
4785
- }),
4786
- "composition"
4787
- )
4716
+ yargs43.positional("ids", {
4717
+ describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4718
+ type: "string"
4719
+ }).option("all", {
4720
+ alias: ["a"],
4721
+ describe: "Un-publishes all compositions. Use composition ID(s) to unpublish specific one(s) instead.",
4722
+ default: false,
4723
+ type: "boolean"
4724
+ }).option("onlyCompositions", {
4725
+ describe: "Only un-publishing compositions and not patterns",
4726
+ default: false,
4727
+ type: "boolean"
4728
+ }).option("onlyPatterns", {
4729
+ describe: "Only un-publishing patterns and not compositions",
4730
+ default: false,
4731
+ type: "boolean",
4732
+ hidden: true
4733
+ })
4788
4734
  )
4789
4735
  )
4790
4736
  )
@@ -4800,8 +4746,7 @@ var CompositionUnpublishModule = {
4800
4746
  patternType,
4801
4747
  project: projectId,
4802
4748
  whatIf,
4803
- verbose,
4804
- resolvedBatchSize
4749
+ verbose
4805
4750
  }) => {
4806
4751
  if (!all && !ids || all && ids) {
4807
4752
  console.error(`Specify --all or composition ID(s) to unpublish.`);
@@ -4818,8 +4763,7 @@ var CompositionUnpublishModule = {
4818
4763
  onlyCompositions,
4819
4764
  onlyPatterns,
4820
4765
  patternType,
4821
- verbose,
4822
- batchSize: resolvedBatchSize
4766
+ verbose
4823
4767
  });
4824
4768
  const target = createComponentInstanceEngineDataSource({
4825
4769
  client,
@@ -4828,8 +4772,7 @@ var CompositionUnpublishModule = {
4828
4772
  onlyCompositions,
4829
4773
  onlyPatterns,
4830
4774
  patternType,
4831
- verbose,
4832
- batchSize: resolvedBatchSize
4775
+ verbose
4833
4776
  });
4834
4777
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
4835
4778
  for await (const obj of target.objects) {
@@ -5068,37 +5011,34 @@ var CompositionPatternPublishModule = {
5068
5011
  withDebugOptions(
5069
5012
  withProjectOptions(
5070
5013
  withDiffOptions(
5071
- withBatchSizeOptions(
5072
- yargs43.positional("ids", {
5073
- describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
5074
- type: "string"
5075
- }).option("all", {
5076
- alias: ["a"],
5077
- describe: "Publishes all composition patterns. Use compositionId to publish one instead.",
5078
- default: false,
5079
- type: "boolean"
5080
- }).option("publishingState", {
5081
- describe: 'Publishing state to update to. Can be "published" or "preview".',
5082
- default: "published",
5083
- type: "string",
5084
- hidden: true
5085
- }).option("onlyCompositions", {
5086
- describe: "Only publishing compositions and not composition patterns",
5087
- default: false,
5088
- type: "boolean",
5089
- hidden: true
5090
- }).option("patternType", {
5091
- default: "composition",
5092
- choices: ["all", "component", "composition"],
5093
- hidden: true
5094
- }).option("onlyPatterns", {
5095
- describe: "Only pulling composition patterns and not compositions",
5096
- default: true,
5097
- type: "boolean",
5098
- hidden: true
5099
- }),
5100
- "compositionPattern"
5101
- )
5014
+ yargs43.positional("ids", {
5015
+ describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
5016
+ type: "string"
5017
+ }).option("all", {
5018
+ alias: ["a"],
5019
+ describe: "Publishes all composition patterns. Use compositionId to publish one instead.",
5020
+ default: false,
5021
+ type: "boolean"
5022
+ }).option("publishingState", {
5023
+ describe: 'Publishing state to update to. Can be "published" or "preview".',
5024
+ default: "published",
5025
+ type: "string",
5026
+ hidden: true
5027
+ }).option("onlyCompositions", {
5028
+ describe: "Only publishing compositions and not composition patterns",
5029
+ default: false,
5030
+ type: "boolean",
5031
+ hidden: true
5032
+ }).option("patternType", {
5033
+ default: "composition",
5034
+ choices: ["all", "component", "composition"],
5035
+ hidden: true
5036
+ }).option("onlyPatterns", {
5037
+ describe: "Only pulling composition patterns and not compositions",
5038
+ default: true,
5039
+ type: "boolean",
5040
+ hidden: true
5041
+ })
5102
5042
  )
5103
5043
  )
5104
5044
  )
@@ -5108,7 +5048,7 @@ var CompositionPatternPublishModule = {
5108
5048
 
5109
5049
  // src/commands/canvas/commands/compositionPattern/pull.ts
5110
5050
  var CompositionPatternPullModule = {
5111
- ...componentInstancePullModuleFactory("compositionPatterns", "compositionPattern"),
5051
+ ...componentInstancePullModuleFactory("compositionPatterns"),
5112
5052
  describe: "Pulls all composition patterns to local files in a directory",
5113
5053
  builder: (yargs43) => withConfiguration(
5114
5054
  withApiOptions(
@@ -5152,7 +5092,7 @@ var CompositionPatternPullModule = {
5152
5092
 
5153
5093
  // src/commands/canvas/commands/compositionPattern/push.ts
5154
5094
  var CompositionPatternPushModule = {
5155
- ...componentInstancePushModuleFactory("compositionPatterns", "compositionPattern"),
5095
+ ...componentInstancePushModuleFactory("compositionPatterns"),
5156
5096
  describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
5157
5097
  builder: (yargs43) => withConfiguration(
5158
5098
  withApiOptions(
@@ -5303,15 +5243,10 @@ var ContentTypeListModule = {
5303
5243
 
5304
5244
  // src/commands/canvas/contentTypeEngineDataSource.ts
5305
5245
  function createContentTypeEngineDataSource({
5306
- client,
5307
- batchSize,
5308
- verbose
5246
+ client
5309
5247
  }) {
5310
5248
  async function* getObjects() {
5311
- const contentTypes = paginateAsync(
5312
- async (offset, limit2) => (await client.getContentTypes({ offset, limit: limit2 })).contentTypes,
5313
- { pageSize: batchSize ?? 100, verbose, entityName: "content types" }
5314
- );
5249
+ const { contentTypes } = await client.getContentTypes({ offset: 0, limit: 1e3 });
5315
5250
  for await (const ct of contentTypes) {
5316
5251
  const result = {
5317
5252
  id: selectContentTypeIdentifier(ct),
@@ -5343,25 +5278,22 @@ var ContentTypePullModule = {
5343
5278
  withDebugOptions(
5344
5279
  withProjectOptions(
5345
5280
  withDiffOptions(
5346
- withBatchSizeOptions(
5347
- yargs43.positional("directory", {
5348
- 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.",
5349
- type: "string"
5350
- }).option("format", {
5351
- alias: ["f"],
5352
- describe: "Output format",
5353
- default: "yaml",
5354
- choices: ["yaml", "json"],
5355
- type: "string"
5356
- }).option("mode", {
5357
- alias: ["m"],
5358
- 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',
5359
- choices: ["create", "createOrUpdate", "mirror"],
5360
- default: "mirror",
5361
- type: "string"
5362
- }),
5363
- "contentType"
5364
- )
5281
+ yargs43.positional("directory", {
5282
+ describe: "Directory to save the content types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5283
+ type: "string"
5284
+ }).option("format", {
5285
+ alias: ["f"],
5286
+ describe: "Output format",
5287
+ default: "yaml",
5288
+ choices: ["yaml", "json"],
5289
+ type: "string"
5290
+ }).option("mode", {
5291
+ alias: ["m"],
5292
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
5293
+ choices: ["create", "createOrUpdate", "mirror"],
5294
+ default: "mirror",
5295
+ type: "string"
5296
+ })
5365
5297
  )
5366
5298
  )
5367
5299
  )
@@ -5378,8 +5310,7 @@ var ContentTypePullModule = {
5378
5310
  project: projectId,
5379
5311
  diff: diffMode,
5380
5312
  allowEmptySource,
5381
- verbose,
5382
- resolvedBatchSize
5313
+ verbose
5383
5314
  }) => {
5384
5315
  const fetch2 = nodeFetchProxy(proxy, verbose);
5385
5316
  const client = getContentClient({
@@ -5388,11 +5319,7 @@ var ContentTypePullModule = {
5388
5319
  fetch: fetch2,
5389
5320
  projectId
5390
5321
  });
5391
- const source = createContentTypeEngineDataSource({
5392
- client,
5393
- verbose,
5394
- batchSize: resolvedBatchSize
5395
- });
5322
+ const source = createContentTypeEngineDataSource({ client });
5396
5323
  let target;
5397
5324
  const isPackage = isPathAPackageFile(directory);
5398
5325
  if (isPackage) {
@@ -5436,24 +5363,21 @@ var ContentTypePushModule = {
5436
5363
  withDebugOptions(
5437
5364
  withProjectOptions(
5438
5365
  withDiffOptions(
5439
- withBatchSizeOptions(
5440
- yargs43.positional("directory", {
5441
- describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
5442
- type: "string"
5443
- }).option("what-if", {
5444
- alias: ["w"],
5445
- describe: "What-if mode reports what would be done but changes nothing",
5446
- default: false,
5447
- type: "boolean"
5448
- }).option("mode", {
5449
- alias: ["m"],
5450
- 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',
5451
- choices: ["create", "createOrUpdate", "mirror"],
5452
- default: "mirror",
5453
- type: "string"
5454
- }),
5455
- "contentType"
5456
- )
5366
+ yargs43.positional("directory", {
5367
+ describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
5368
+ type: "string"
5369
+ }).option("what-if", {
5370
+ alias: ["w"],
5371
+ describe: "What-if mode reports what would be done but changes nothing",
5372
+ default: false,
5373
+ type: "boolean"
5374
+ }).option("mode", {
5375
+ alias: ["m"],
5376
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
5377
+ choices: ["create", "createOrUpdate", "mirror"],
5378
+ default: "mirror",
5379
+ type: "string"
5380
+ })
5457
5381
  )
5458
5382
  )
5459
5383
  )
@@ -5469,8 +5393,7 @@ var ContentTypePushModule = {
5469
5393
  project: projectId,
5470
5394
  diff: diffMode,
5471
5395
  allowEmptySource,
5472
- verbose,
5473
- resolvedBatchSize
5396
+ verbose
5474
5397
  }) => {
5475
5398
  const fetch2 = nodeFetchProxy(proxy, verbose);
5476
5399
  const client = getContentClient({
@@ -5497,11 +5420,7 @@ var ContentTypePushModule = {
5497
5420
  verbose
5498
5421
  });
5499
5422
  }
5500
- const target = createContentTypeEngineDataSource({
5501
- client,
5502
- verbose,
5503
- batchSize: resolvedBatchSize
5504
- });
5423
+ const target = createContentTypeEngineDataSource({ client });
5505
5424
  await syncEngine({
5506
5425
  source,
5507
5426
  target,
@@ -6169,9 +6088,7 @@ function createEntryEngineDataSource({
6169
6088
  state,
6170
6089
  onlyEntries,
6171
6090
  onlyPatterns,
6172
- entryIDs,
6173
- batchSize,
6174
- verbose
6091
+ entryIDs
6175
6092
  }) {
6176
6093
  const stateId = convertStateOption(state);
6177
6094
  async function* getObjects() {
@@ -6197,7 +6114,7 @@ function createEntryEngineDataSource({
6197
6114
  throw error;
6198
6115
  }
6199
6116
  },
6200
- { pageSize: batchSize ?? 100, verbose, entityName: "entries" }
6117
+ { pageSize: 100 }
6201
6118
  );
6202
6119
  for await (const e of entries) {
6203
6120
  const result = {
@@ -6230,18 +6147,15 @@ var EntryPublishModule = {
6230
6147
  withDiffOptions(
6231
6148
  withApiOptions(
6232
6149
  withProjectOptions(
6233
- withBatchSizeOptions(
6234
- yargs43.positional("ids", {
6235
- describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6236
- type: "string"
6237
- }).option("all", {
6238
- alias: ["a"],
6239
- describe: "Publishes all entries. Use --ids to publish selected entries instead.",
6240
- default: false,
6241
- type: "boolean"
6242
- }),
6243
- "entry"
6244
- )
6150
+ yargs43.positional("ids", {
6151
+ describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6152
+ type: "string"
6153
+ }).option("all", {
6154
+ alias: ["a"],
6155
+ describe: "Publishes all entries. Use --ids to publish selected entries instead.",
6156
+ default: false,
6157
+ type: "boolean"
6158
+ })
6245
6159
  )
6246
6160
  )
6247
6161
  )
@@ -6257,8 +6171,7 @@ var EntryPublishModule = {
6257
6171
  project: projectId,
6258
6172
  whatIf,
6259
6173
  verbose,
6260
- directory,
6261
- resolvedBatchSize
6174
+ directory
6262
6175
  }) => {
6263
6176
  if (!all && !ids || all && ids) {
6264
6177
  console.error(`Specify --all or entry ID(s) to publish.`);
@@ -6271,15 +6184,13 @@ var EntryPublishModule = {
6271
6184
  client,
6272
6185
  state: "preview",
6273
6186
  entryIDs: entryIDsArray,
6274
- onlyEntries: true,
6275
- batchSize: resolvedBatchSize
6187
+ onlyEntries: true
6276
6188
  });
6277
6189
  const target = createEntryEngineDataSource({
6278
6190
  client,
6279
6191
  state: "published",
6280
6192
  entryIDs: entryIDsArray,
6281
- onlyEntries: true,
6282
- batchSize: resolvedBatchSize
6193
+ onlyEntries: true
6283
6194
  });
6284
6195
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6285
6196
  await syncEngine({
@@ -6317,25 +6228,22 @@ var EntryPullModule = {
6317
6228
  withProjectOptions(
6318
6229
  withStateOptions(
6319
6230
  withDiffOptions(
6320
- withBatchSizeOptions(
6321
- yargs43.positional("directory", {
6322
- 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.",
6323
- type: "string"
6324
- }).option("format", {
6325
- alias: ["f"],
6326
- describe: "Output format",
6327
- default: "yaml",
6328
- choices: ["yaml", "json"],
6329
- type: "string"
6330
- }).option("mode", {
6331
- alias: ["m"],
6332
- 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',
6333
- choices: ["create", "createOrUpdate", "mirror"],
6334
- default: "mirror",
6335
- type: "string"
6336
- }),
6337
- "entry"
6338
- )
6231
+ yargs43.positional("directory", {
6232
+ describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6233
+ type: "string"
6234
+ }).option("format", {
6235
+ alias: ["f"],
6236
+ describe: "Output format",
6237
+ default: "yaml",
6238
+ choices: ["yaml", "json"],
6239
+ type: "string"
6240
+ }).option("mode", {
6241
+ alias: ["m"],
6242
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
6243
+ choices: ["create", "createOrUpdate", "mirror"],
6244
+ default: "mirror",
6245
+ type: "string"
6246
+ })
6339
6247
  )
6340
6248
  )
6341
6249
  )
@@ -6354,8 +6262,7 @@ var EntryPullModule = {
6354
6262
  project: projectId,
6355
6263
  diff: diffMode,
6356
6264
  allowEmptySource,
6357
- verbose,
6358
- resolvedBatchSize
6265
+ verbose
6359
6266
  }) => {
6360
6267
  const fetch2 = nodeFetchProxy(proxy, verbose);
6361
6268
  const client = getContentClient({
@@ -6365,13 +6272,7 @@ var EntryPullModule = {
6365
6272
  projectId
6366
6273
  });
6367
6274
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6368
- const source = createEntryEngineDataSource({
6369
- client,
6370
- state,
6371
- onlyEntries: true,
6372
- verbose,
6373
- batchSize: resolvedBatchSize
6374
- });
6275
+ const source = createEntryEngineDataSource({ client, state, onlyEntries: true });
6375
6276
  let target;
6376
6277
  const isPackage = isPathAPackageFile(directory);
6377
6278
  if (isPackage) {
@@ -6433,19 +6334,16 @@ var EntryPushModule = {
6433
6334
  withProjectOptions(
6434
6335
  withStateOptions(
6435
6336
  withDiffOptions(
6436
- withBatchSizeOptions(
6437
- yargs43.positional("directory", {
6438
- describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
6439
- type: "string"
6440
- }).option("mode", {
6441
- alias: ["m"],
6442
- 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',
6443
- choices: ["create", "createOrUpdate", "mirror"],
6444
- default: "mirror",
6445
- type: "string"
6446
- }),
6447
- "entry"
6448
- )
6337
+ yargs43.positional("directory", {
6338
+ describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
6339
+ type: "string"
6340
+ }).option("mode", {
6341
+ alias: ["m"],
6342
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
6343
+ choices: ["create", "createOrUpdate", "mirror"],
6344
+ default: "mirror",
6345
+ type: "string"
6346
+ })
6449
6347
  )
6450
6348
  )
6451
6349
  )
@@ -6463,8 +6361,7 @@ var EntryPushModule = {
6463
6361
  project: projectId,
6464
6362
  diff: diffMode,
6465
6363
  allowEmptySource,
6466
- verbose,
6467
- resolvedBatchSize
6364
+ verbose
6468
6365
  }) => {
6469
6366
  const fetch2 = nodeFetchProxy(proxy, verbose);
6470
6367
  const client = getContentClient({
@@ -6491,13 +6388,7 @@ var EntryPushModule = {
6491
6388
  verbose
6492
6389
  });
6493
6390
  }
6494
- const target = createEntryEngineDataSource({
6495
- client,
6496
- state,
6497
- onlyEntries: true,
6498
- verbose,
6499
- batchSize: resolvedBatchSize
6500
- });
6391
+ const target = createEntryEngineDataSource({ client, state, onlyEntries: true });
6501
6392
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6502
6393
  const uniformLocales = await fetchUniformLocales({
6503
6394
  apiKey,
@@ -6591,37 +6482,24 @@ import { diffJson as diffJson3 } from "diff";
6591
6482
  var EntryUnpublishModule = {
6592
6483
  command: "unpublish [ids]",
6593
6484
  describe: "Unpublish an entry(ies)",
6594
- builder: (yargs43) => withConfiguration(
6595
- withDebugOptions(
6596
- withApiOptions(
6597
- withProjectOptions(
6598
- withBatchSizeOptions(
6599
- yargs43.positional("ids", {
6600
- describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6601
- type: "string"
6602
- }).option("all", {
6603
- alias: ["a"],
6604
- describe: "Un-publishes all entries. Use --all to un-publish selected entries instead.",
6605
- default: false,
6606
- type: "boolean"
6607
- }),
6608
- "entry"
6609
- )
6485
+ builder: (yargs43) => withConfiguration(
6486
+ withDebugOptions(
6487
+ withApiOptions(
6488
+ withProjectOptions(
6489
+ yargs43.positional("ids", {
6490
+ describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
6491
+ type: "string"
6492
+ }).option("all", {
6493
+ alias: ["a"],
6494
+ describe: "Un-publishes all entries. Use --all to un-publish selected entries instead.",
6495
+ default: false,
6496
+ type: "boolean"
6497
+ })
6610
6498
  )
6611
6499
  )
6612
6500
  )
6613
6501
  ),
6614
- handler: async ({
6615
- apiHost,
6616
- apiKey,
6617
- proxy,
6618
- ids,
6619
- all,
6620
- project: projectId,
6621
- whatIf,
6622
- verbose,
6623
- resolvedBatchSize
6624
- }) => {
6502
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
6625
6503
  if (!all && !ids || all && ids) {
6626
6504
  console.error(`Specify --all or entry ID(s) to unpublish.`);
6627
6505
  process.exit(1);
@@ -6634,15 +6512,13 @@ var EntryUnpublishModule = {
6634
6512
  client,
6635
6513
  state: "published",
6636
6514
  entryIDs: entryIDsArray,
6637
- onlyEntries: true,
6638
- batchSize: resolvedBatchSize
6515
+ onlyEntries: true
6639
6516
  });
6640
6517
  const target = createEntryEngineDataSource({
6641
6518
  client,
6642
6519
  state: "preview",
6643
6520
  entryIDs: entryIDsArray,
6644
- onlyEntries: true,
6645
- batchSize: resolvedBatchSize
6521
+ onlyEntries: true
6646
6522
  });
6647
6523
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
6648
6524
  for await (const obj of target.objects) {
@@ -6860,18 +6736,15 @@ var EntryPatternPublishModule = {
6860
6736
  withApiOptions(
6861
6737
  withProjectOptions(
6862
6738
  withDiffOptions(
6863
- withBatchSizeOptions(
6864
- yargs43.positional("ids", {
6865
- describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6866
- type: "string"
6867
- }).option("all", {
6868
- alias: ["a"],
6869
- describe: "Publishes all entry patterns. Use --ids to publish selected entry patterns instead.",
6870
- default: false,
6871
- type: "boolean"
6872
- }),
6873
- "entryPattern"
6874
- )
6739
+ yargs43.positional("ids", {
6740
+ describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
6741
+ type: "string"
6742
+ }).option("all", {
6743
+ alias: ["a"],
6744
+ describe: "Publishes all entry patterns. Use --ids to publish selected entry patterns instead.",
6745
+ default: false,
6746
+ type: "boolean"
6747
+ })
6875
6748
  )
6876
6749
  )
6877
6750
  )
@@ -6887,8 +6760,7 @@ var EntryPatternPublishModule = {
6887
6760
  whatIf,
6888
6761
  project: projectId,
6889
6762
  verbose,
6890
- directory,
6891
- resolvedBatchSize
6763
+ directory
6892
6764
  }) => {
6893
6765
  if (!all && !ids || all && ids) {
6894
6766
  console.error(`Specify --all or entry pattern ID(s) to publish.`);
@@ -6901,15 +6773,13 @@ var EntryPatternPublishModule = {
6901
6773
  client,
6902
6774
  state: "preview",
6903
6775
  entryIDs: entryIDsArray,
6904
- onlyPatterns: true,
6905
- batchSize: resolvedBatchSize
6776
+ onlyPatterns: true
6906
6777
  });
6907
6778
  const target = createEntryEngineDataSource({
6908
6779
  client,
6909
6780
  state: "published",
6910
6781
  entryIDs: entryIDsArray,
6911
- onlyPatterns: true,
6912
- batchSize: resolvedBatchSize
6782
+ onlyPatterns: true
6913
6783
  });
6914
6784
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6915
6785
  await syncEngine({
@@ -6947,25 +6817,22 @@ var EntryPatternPullModule = {
6947
6817
  withProjectOptions(
6948
6818
  withStateOptions(
6949
6819
  withDiffOptions(
6950
- withBatchSizeOptions(
6951
- yargs43.positional("directory", {
6952
- 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.",
6953
- type: "string"
6954
- }).option("format", {
6955
- alias: ["f"],
6956
- describe: "Output format",
6957
- default: "yaml",
6958
- choices: ["yaml", "json"],
6959
- type: "string"
6960
- }).option("mode", {
6961
- alias: ["m"],
6962
- 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',
6963
- choices: ["create", "createOrUpdate", "mirror"],
6964
- default: "mirror",
6965
- type: "string"
6966
- }),
6967
- "entryPattern"
6968
- )
6820
+ yargs43.positional("directory", {
6821
+ describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6822
+ type: "string"
6823
+ }).option("format", {
6824
+ alias: ["f"],
6825
+ describe: "Output format",
6826
+ default: "yaml",
6827
+ choices: ["yaml", "json"],
6828
+ type: "string"
6829
+ }).option("mode", {
6830
+ alias: ["m"],
6831
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
6832
+ choices: ["create", "createOrUpdate", "mirror"],
6833
+ default: "mirror",
6834
+ type: "string"
6835
+ })
6969
6836
  )
6970
6837
  )
6971
6838
  )
@@ -6984,8 +6851,7 @@ var EntryPatternPullModule = {
6984
6851
  project: projectId,
6985
6852
  diff: diffMode,
6986
6853
  allowEmptySource,
6987
- verbose,
6988
- resolvedBatchSize
6854
+ verbose
6989
6855
  }) => {
6990
6856
  const fetch2 = nodeFetchProxy(proxy, verbose);
6991
6857
  const client = getContentClient({
@@ -6995,13 +6861,7 @@ var EntryPatternPullModule = {
6995
6861
  projectId
6996
6862
  });
6997
6863
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
6998
- const source = createEntryEngineDataSource({
6999
- client,
7000
- state,
7001
- onlyPatterns: true,
7002
- verbose,
7003
- batchSize: resolvedBatchSize
7004
- });
6864
+ const source = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7005
6865
  let target;
7006
6866
  const isPackage = isPathAPackageFile(directory);
7007
6867
  if (isPackage) {
@@ -7063,24 +6923,21 @@ var EntryPatternPushModule = {
7063
6923
  withProjectOptions(
7064
6924
  withStateOptions(
7065
6925
  withDiffOptions(
7066
- withBatchSizeOptions(
7067
- yargs43.positional("directory", {
7068
- describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
7069
- type: "string"
7070
- }).option("what-if", {
7071
- alias: ["w"],
7072
- describe: "What-if mode reports what would be done but changes nothing",
7073
- default: false,
7074
- type: "boolean"
7075
- }).option("mode", {
7076
- alias: ["m"],
7077
- 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',
7078
- choices: ["create", "createOrUpdate", "mirror"],
7079
- default: "mirror",
7080
- type: "string"
7081
- }),
7082
- "entryPattern"
7083
- )
6926
+ yargs43.positional("directory", {
6927
+ describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
6928
+ type: "string"
6929
+ }).option("what-if", {
6930
+ alias: ["w"],
6931
+ describe: "What-if mode reports what would be done but changes nothing",
6932
+ default: false,
6933
+ type: "boolean"
6934
+ }).option("mode", {
6935
+ alias: ["m"],
6936
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
6937
+ choices: ["create", "createOrUpdate", "mirror"],
6938
+ default: "mirror",
6939
+ type: "string"
6940
+ })
7084
6941
  )
7085
6942
  )
7086
6943
  )
@@ -7098,8 +6955,7 @@ var EntryPatternPushModule = {
7098
6955
  project: projectId,
7099
6956
  diff: diffMode,
7100
6957
  allowEmptySource,
7101
- verbose,
7102
- resolvedBatchSize
6958
+ verbose
7103
6959
  }) => {
7104
6960
  const fetch2 = nodeFetchProxy(proxy, verbose);
7105
6961
  const client = getContentClient({
@@ -7126,13 +6982,7 @@ var EntryPatternPushModule = {
7126
6982
  verbose
7127
6983
  });
7128
6984
  }
7129
- const target = createEntryEngineDataSource({
7130
- client,
7131
- state,
7132
- onlyPatterns: true,
7133
- verbose,
7134
- batchSize: resolvedBatchSize
7135
- });
6985
+ const target = createEntryEngineDataSource({ client, state, onlyPatterns: true });
7136
6986
  const fileClient = getFileClient({ apiKey, apiHost, fetch: fetch2, projectId });
7137
6987
  const uniformLocales = await fetchUniformLocales({
7138
6988
  apiKey,
@@ -7199,33 +7049,20 @@ var EntryPatternUnpublishModule = {
7199
7049
  withDebugOptions(
7200
7050
  withApiOptions(
7201
7051
  withProjectOptions(
7202
- withBatchSizeOptions(
7203
- yargs43.positional("ids", {
7204
- describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
7205
- type: "string"
7206
- }).option("all", {
7207
- alias: ["a"],
7208
- describe: "Un-publishes all entry patterns. Use --all to un-publish selected entry patterns instead.",
7209
- default: false,
7210
- type: "boolean"
7211
- }),
7212
- "entryPattern"
7213
- )
7052
+ yargs43.positional("ids", {
7053
+ describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
7054
+ type: "string"
7055
+ }).option("all", {
7056
+ alias: ["a"],
7057
+ describe: "Un-publishes all entry patterns. Use --all to un-publish selected entry patterns instead.",
7058
+ default: false,
7059
+ type: "boolean"
7060
+ })
7214
7061
  )
7215
7062
  )
7216
7063
  )
7217
7064
  ),
7218
- handler: async ({
7219
- apiHost,
7220
- apiKey,
7221
- proxy,
7222
- ids,
7223
- all,
7224
- project: projectId,
7225
- whatIf,
7226
- verbose,
7227
- resolvedBatchSize
7228
- }) => {
7065
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf, verbose }) => {
7229
7066
  if (!all && !ids || all && ids) {
7230
7067
  console.error(`Specify --all or entry pattern ID(s) to unpublish.`);
7231
7068
  process.exit(1);
@@ -7238,15 +7075,13 @@ var EntryPatternUnpublishModule = {
7238
7075
  client,
7239
7076
  state: "published",
7240
7077
  entryIDs: entryIDsArray,
7241
- onlyPatterns: true,
7242
- batchSize: resolvedBatchSize
7078
+ onlyPatterns: true
7243
7079
  });
7244
7080
  const target = createEntryEngineDataSource({
7245
7081
  client,
7246
7082
  state: "preview",
7247
7083
  entryIDs: entryIDsArray,
7248
- onlyPatterns: true,
7249
- batchSize: resolvedBatchSize
7084
+ onlyPatterns: true
7250
7085
  });
7251
7086
  const log2 = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
7252
7087
  for await (const obj of target.objects) {
@@ -7332,14 +7167,12 @@ function normalizeLabelForSync(label) {
7332
7167
  return labelWithoutProjectId;
7333
7168
  }
7334
7169
  function createLabelsEngineDataSource({
7335
- client,
7336
- batchSize,
7337
- verbose
7170
+ client
7338
7171
  }) {
7339
7172
  async function* getObjects() {
7340
7173
  const labels = paginateAsync(
7341
7174
  async (offset, limit2) => (await client.getLabels({ offset, limit: limit2 })).labels,
7342
- { pageSize: batchSize ?? 100, verbose, entityName: "labels" }
7175
+ { pageSize: 100 }
7343
7176
  );
7344
7177
  for await (const label of labels) {
7345
7178
  const result = {
@@ -7380,25 +7213,22 @@ var LabelPullModule = {
7380
7213
  withApiOptions(
7381
7214
  withProjectOptions(
7382
7215
  withDiffOptions(
7383
- withBatchSizeOptions(
7384
- yargs43.positional("directory", {
7385
- 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.",
7386
- type: "string"
7387
- }).option("format", {
7388
- alias: ["f"],
7389
- describe: "Output format",
7390
- default: "yaml",
7391
- choices: ["yaml", "json"],
7392
- type: "string"
7393
- }).option("mode", {
7394
- alias: ["m"],
7395
- 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',
7396
- choices: ["create", "createOrUpdate", "mirror"],
7397
- default: "mirror",
7398
- type: "string"
7399
- }),
7400
- "label"
7401
- )
7216
+ yargs43.positional("directory", {
7217
+ describe: "Directory to save the labels to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
7218
+ type: "string"
7219
+ }).option("format", {
7220
+ alias: ["f"],
7221
+ describe: "Output format",
7222
+ default: "yaml",
7223
+ choices: ["yaml", "json"],
7224
+ type: "string"
7225
+ }).option("mode", {
7226
+ alias: ["m"],
7227
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
7228
+ choices: ["create", "createOrUpdate", "mirror"],
7229
+ default: "mirror",
7230
+ type: "string"
7231
+ })
7402
7232
  )
7403
7233
  )
7404
7234
  )
@@ -7415,16 +7245,11 @@ var LabelPullModule = {
7415
7245
  project: projectId,
7416
7246
  diff: diffMode,
7417
7247
  allowEmptySource,
7418
- verbose,
7419
- resolvedBatchSize
7248
+ verbose
7420
7249
  }) => {
7421
7250
  const fetch2 = nodeFetchProxy(proxy, verbose);
7422
7251
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
7423
- const source = createLabelsEngineDataSource({
7424
- client,
7425
- verbose,
7426
- batchSize: resolvedBatchSize
7427
- });
7252
+ const source = createLabelsEngineDataSource({ client });
7428
7253
  let target;
7429
7254
  const isPackage = isPathAPackageFile(directory);
7430
7255
  if (isPackage) {
@@ -7475,19 +7300,16 @@ var LabelPushModule = {
7475
7300
  withApiOptions(
7476
7301
  withProjectOptions(
7477
7302
  withDiffOptions(
7478
- withBatchSizeOptions(
7479
- yargs43.positional("directory", {
7480
- describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
7481
- type: "string"
7482
- }).option("mode", {
7483
- alias: ["m"],
7484
- 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',
7485
- choices: ["create", "createOrUpdate", "mirror"],
7486
- default: "mirror",
7487
- type: "string"
7488
- }),
7489
- "label"
7490
- )
7303
+ yargs43.positional("directory", {
7304
+ describe: "Directory to read the labels from. If a filename is used, a package will be read instead.",
7305
+ type: "string"
7306
+ }).option("mode", {
7307
+ alias: ["m"],
7308
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
7309
+ choices: ["create", "createOrUpdate", "mirror"],
7310
+ default: "mirror",
7311
+ type: "string"
7312
+ })
7491
7313
  )
7492
7314
  )
7493
7315
  )
@@ -7503,8 +7325,7 @@ var LabelPushModule = {
7503
7325
  project: projectId,
7504
7326
  diff: diffMode,
7505
7327
  allowEmptySource,
7506
- verbose,
7507
- resolvedBatchSize
7328
+ verbose
7508
7329
  }) => {
7509
7330
  const fetch2 = nodeFetchProxy(proxy, verbose);
7510
7331
  const client = getLabelClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -7527,11 +7348,7 @@ var LabelPushModule = {
7527
7348
  verbose
7528
7349
  });
7529
7350
  }
7530
- const target = createLabelsEngineDataSource({
7531
- client,
7532
- verbose,
7533
- batchSize: resolvedBatchSize
7534
- });
7351
+ const target = createLabelsEngineDataSource({ client });
7535
7352
  const labelsFailedDueToMissingParent = /* @__PURE__ */ new Set();
7536
7353
  const attemptSync = async () => {
7537
7354
  const lastFailedLabelsCount = labelsFailedDueToMissingParent.size;
@@ -8676,15 +8493,11 @@ var getWorkflowClient = (options) => new WorkflowClient({ ...options, bypassCach
8676
8493
 
8677
8494
  // src/commands/canvas/workflowEngineDataSource.ts
8678
8495
  function createWorkflowEngineDataSource({
8679
- client,
8680
- batchSize,
8681
- verbose
8496
+ client
8682
8497
  }) {
8683
8498
  async function* getObjects() {
8684
- const workflows = paginateAsync(async (offset, limit2) => (await client.get({ offset, limit: limit2 })).results, {
8685
- pageSize: batchSize ?? 100,
8686
- verbose,
8687
- entityName: "workflows"
8499
+ const workflows = paginateAsync(async () => (await client.get()).results, {
8500
+ pageSize: 100
8688
8501
  });
8689
8502
  for await (const workflow of workflows) {
8690
8503
  const { modified, modifiedBy, created, createdBy, ...workflowWithoutStatistics } = workflow;
@@ -8718,25 +8531,22 @@ var WorkflowPullModule = {
8718
8531
  withDebugOptions(
8719
8532
  withProjectOptions(
8720
8533
  withDiffOptions(
8721
- withBatchSizeOptions(
8722
- yargs43.positional("directory", {
8723
- 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.",
8724
- type: "string"
8725
- }).option("format", {
8726
- alias: ["f"],
8727
- describe: "Output format",
8728
- default: "yaml",
8729
- choices: ["yaml", "json"],
8730
- type: "string"
8731
- }).option("mode", {
8732
- alias: ["m"],
8733
- 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',
8734
- choices: ["create", "createOrUpdate", "mirror"],
8735
- default: "mirror",
8736
- type: "string"
8737
- }),
8738
- "workflow"
8739
- )
8534
+ yargs43.positional("directory", {
8535
+ describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
8536
+ type: "string"
8537
+ }).option("format", {
8538
+ alias: ["f"],
8539
+ describe: "Output format",
8540
+ default: "yaml",
8541
+ choices: ["yaml", "json"],
8542
+ type: "string"
8543
+ }).option("mode", {
8544
+ alias: ["m"],
8545
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
8546
+ choices: ["create", "createOrUpdate", "mirror"],
8547
+ default: "mirror",
8548
+ type: "string"
8549
+ })
8740
8550
  )
8741
8551
  )
8742
8552
  )
@@ -8753,16 +8563,11 @@ var WorkflowPullModule = {
8753
8563
  project: projectId,
8754
8564
  diff: diffMode,
8755
8565
  allowEmptySource,
8756
- verbose,
8757
- resolvedBatchSize
8566
+ verbose
8758
8567
  }) => {
8759
8568
  const fetch2 = nodeFetchProxy(proxy, verbose);
8760
8569
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
8761
- const source = createWorkflowEngineDataSource({
8762
- client,
8763
- verbose,
8764
- batchSize: resolvedBatchSize
8765
- });
8570
+ const source = createWorkflowEngineDataSource({ client });
8766
8571
  let target;
8767
8572
  const isPackage = isPathAPackageFile(directory);
8768
8573
  if (isPackage) {
@@ -8806,19 +8611,16 @@ var WorkflowPushModule = {
8806
8611
  withApiOptions(
8807
8612
  withProjectOptions(
8808
8613
  withDiffOptions(
8809
- withBatchSizeOptions(
8810
- yargs43.positional("directory", {
8811
- describe: "Directory to read from. If a filename is used, a package will be read instead.",
8812
- type: "string"
8813
- }).option("mode", {
8814
- alias: ["m"],
8815
- 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',
8816
- choices: ["create", "createOrUpdate", "mirror"],
8817
- default: "mirror",
8818
- type: "string"
8819
- }),
8820
- "workflow"
8821
- )
8614
+ yargs43.positional("directory", {
8615
+ describe: "Directory to read from. If a filename is used, a package will be read instead.",
8616
+ type: "string"
8617
+ }).option("mode", {
8618
+ alias: ["m"],
8619
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
8620
+ choices: ["create", "createOrUpdate", "mirror"],
8621
+ default: "mirror",
8622
+ type: "string"
8623
+ })
8822
8624
  )
8823
8625
  )
8824
8626
  )
@@ -8834,8 +8636,7 @@ var WorkflowPushModule = {
8834
8636
  project: projectId,
8835
8637
  diff: diffMode,
8836
8638
  allowEmptySource,
8837
- verbose,
8838
- resolvedBatchSize
8639
+ verbose
8839
8640
  }) => {
8840
8641
  const fetch2 = nodeFetchProxy(proxy, verbose);
8841
8642
  const client = getWorkflowClient({ apiKey, apiHost, fetch: fetch2, projectId });
@@ -8857,11 +8658,7 @@ var WorkflowPushModule = {
8857
8658
  verbose
8858
8659
  });
8859
8660
  }
8860
- const target = createWorkflowEngineDataSource({
8861
- client,
8862
- verbose,
8863
- batchSize: resolvedBatchSize
8864
- });
8661
+ const target = createWorkflowEngineDataSource({ client });
8865
8662
  await syncEngine({
8866
8663
  source,
8867
8664
  target,
@@ -13217,8 +13014,7 @@ var SyncPullModule = {
13217
13014
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13218
13015
  mode: getPullMode(entityType, config2),
13219
13016
  directory: getPullFilename(entityType, config2),
13220
- allowEmptySource: config2.allowEmptySource,
13221
- ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13017
+ allowEmptySource: config2.allowEmptySource
13222
13018
  }),
13223
13019
  {
13224
13020
  text: `${entityType}\u2026`,
@@ -13383,8 +13179,7 @@ var SyncPushModule = {
13383
13179
  patternType: entityType === "compositionPattern" ? "composition" : entityType === "componentPattern" ? "component" : void 0,
13384
13180
  mode: getPushMode(entityType, config2),
13385
13181
  directory: getPushFilename(entityType, config2),
13386
- allowEmptySource: config2.allowEmptySource,
13387
- ...isPaginatedSyncEntity(entityType) ? { resolvedBatchSize: getEntityBatchSize(entityType, config2) } : {}
13182
+ allowEmptySource: config2.allowEmptySource
13388
13183
  }),
13389
13184
  {
13390
13185
  text: `${entityType}...`,
@@ -13405,12 +13200,10 @@ var SyncPushModule = {
13405
13200
  await spinPromise(
13406
13201
  ComponentPatternPublishModule.handler({
13407
13202
  ...otherParams,
13408
- serialization: config2,
13409
13203
  patternType: "component",
13410
13204
  onlyPatterns: true,
13411
13205
  all: true,
13412
- directory: getPushFilename("componentPattern", config2),
13413
- resolvedBatchSize: getEntityBatchSize("componentPattern", config2)
13206
+ directory: getPushFilename("componentPattern", config2)
13414
13207
  }),
13415
13208
  {
13416
13209
  text: "publishing component patterns...",
@@ -13431,12 +13224,10 @@ var SyncPushModule = {
13431
13224
  await spinPromise(
13432
13225
  CompositionPatternPublishModule.handler({
13433
13226
  ...otherParams,
13434
- serialization: config2,
13435
13227
  all: true,
13436
13228
  onlyPatterns: true,
13437
13229
  patternType: "composition",
13438
- directory: getPushFilename("compositionPattern", config2),
13439
- resolvedBatchSize: getEntityBatchSize("compositionPattern", config2)
13230
+ directory: getPushFilename("compositionPattern", config2)
13440
13231
  }),
13441
13232
  {
13442
13233
  text: "publishing composition patterns...",
@@ -13457,11 +13248,9 @@ var SyncPushModule = {
13457
13248
  await spinPromise(
13458
13249
  CompositionPublishModule.handler({
13459
13250
  ...otherParams,
13460
- serialization: config2,
13461
13251
  all: true,
13462
13252
  onlyCompositions: true,
13463
- directory: getPushFilename("composition", config2),
13464
- resolvedBatchSize: getEntityBatchSize("composition", config2)
13253
+ directory: getPushFilename("composition", config2)
13465
13254
  }),
13466
13255
  {
13467
13256
  text: "publishing compositions...",
@@ -13482,10 +13271,8 @@ var SyncPushModule = {
13482
13271
  await spinPromise(
13483
13272
  EntryPublishModule.handler({
13484
13273
  ...otherParams,
13485
- serialization: config2,
13486
13274
  all: true,
13487
- directory: getPushFilename("entry", config2),
13488
- resolvedBatchSize: getEntityBatchSize("entry", config2)
13275
+ directory: getPushFilename("entry", config2)
13489
13276
  }),
13490
13277
  {
13491
13278
  text: "publishing entries...",
@@ -13506,10 +13293,8 @@ var SyncPushModule = {
13506
13293
  await spinPromise(
13507
13294
  EntryPatternPublishModule.handler({
13508
13295
  ...otherParams,
13509
- serialization: config2,
13510
13296
  all: true,
13511
- directory: getPushFilename("entryPattern", config2),
13512
- resolvedBatchSize: getEntityBatchSize("entryPattern", config2)
13297
+ directory: getPushFilename("entryPattern", config2)
13513
13298
  }),
13514
13299
  {
13515
13300
  text: "publishing entry patterns...",