kintone-migrator 0.24.5 → 0.24.7

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
@@ -10,14 +10,13 @@ import { basename, dirname, extname, join, resolve } from "node:path";
10
10
  import { realpathSync } from "node:fs";
11
11
  import * as v from "valibot";
12
12
  import pc from "picocolors";
13
-
14
13
  //#region src/lib/error.ts
15
14
  var AnyError = class extends Error {
16
15
  constructor(message, cause) {
17
16
  super(message, { cause });
17
+ this.name = "AnyError";
18
18
  }
19
19
  };
20
-
21
20
  //#endregion
22
21
  //#region src/core/domain/action/errorCode.ts
23
22
  const ActionErrorCode = {
@@ -29,7 +28,6 @@ const ActionErrorCode = {
29
28
  AcEmptyActionName: "AC_EMPTY_ACTION_NAME",
30
29
  AcDuplicateIndex: "AC_DUPLICATE_INDEX"
31
30
  };
32
-
33
31
  //#endregion
34
32
  //#region src/core/domain/adminNotes/errorCode.ts
35
33
  const AdminNotesErrorCode = {
@@ -37,7 +35,6 @@ const AdminNotesErrorCode = {
37
35
  AnInvalidConfigYaml: "AN_INVALID_CONFIG_YAML",
38
36
  AnInvalidConfigStructure: "AN_INVALID_CONFIG_STRUCTURE"
39
37
  };
40
-
41
38
  //#endregion
42
39
  //#region src/core/domain/appPermission/errorCode.ts
43
40
  const AppPermissionErrorCode = {
@@ -49,7 +46,6 @@ const AppPermissionErrorCode = {
49
46
  ApEmptyEntityCode: "AP_EMPTY_ENTITY_CODE",
50
47
  ApDuplicateEntity: "AP_DUPLICATE_ENTITY"
51
48
  };
52
-
53
49
  //#endregion
54
50
  //#region src/core/domain/customization/errorCode.ts
55
51
  const CustomizationErrorCode = {
@@ -60,7 +56,6 @@ const CustomizationErrorCode = {
60
56
  CzInvalidResourceType: "CZ_INVALID_RESOURCE_TYPE",
61
57
  CzTooManyFiles: "CZ_TOO_MANY_FILES"
62
58
  };
63
-
64
59
  //#endregion
65
60
  //#region src/core/domain/fieldPermission/errorCode.ts
66
61
  const FieldPermissionErrorCode = {
@@ -74,7 +69,6 @@ const FieldPermissionErrorCode = {
74
69
  FpEmptyEntityCode: "FP_EMPTY_ENTITY_CODE",
75
70
  FpDuplicateFieldCode: "FP_DUPLICATE_FIELD_CODE"
76
71
  };
77
-
78
72
  //#endregion
79
73
  //#region src/core/domain/formSchema/errorCode.ts
80
74
  const FormSchemaErrorCode = {
@@ -89,7 +83,6 @@ const FormSchemaErrorCode = {
89
83
  FsInvalidDecorationElement: "FS_INVALID_DECORATION_ELEMENT",
90
84
  FsEmptyFields: "FS_EMPTY_FIELDS"
91
85
  };
92
-
93
86
  //#endregion
94
87
  //#region src/core/domain/generalSettings/errorCode.ts
95
88
  const GeneralSettingsErrorCode = {
@@ -101,7 +94,6 @@ const GeneralSettingsErrorCode = {
101
94
  GsInvalidBooleanField: "GS_INVALID_BOOLEAN_FIELD",
102
95
  GsInvalidNumberPrecision: "GS_INVALID_NUMBER_PRECISION"
103
96
  };
104
-
105
97
  //#endregion
106
98
  //#region src/core/domain/notification/errorCode.ts
107
99
  const NotificationErrorCode = {
@@ -115,7 +107,6 @@ const NotificationErrorCode = {
115
107
  NtInvalidHoursLater: "NT_INVALID_HOURS_LATER",
116
108
  NtInvalidDaysLater: "NT_INVALID_DAYS_LATER"
117
109
  };
118
-
119
110
  //#endregion
120
111
  //#region src/core/domain/plugin/errorCode.ts
121
112
  const PluginErrorCode = {
@@ -125,7 +116,6 @@ const PluginErrorCode = {
125
116
  PlEmptyPluginId: "PL_EMPTY_PLUGIN_ID",
126
117
  PlDuplicatePluginId: "PL_DUPLICATE_PLUGIN_ID"
127
118
  };
128
-
129
119
  //#endregion
130
120
  //#region src/core/domain/processManagement/errorCode.ts
131
121
  const ProcessManagementErrorCode = {
@@ -138,7 +128,6 @@ const ProcessManagementErrorCode = {
138
128
  PmInvalidActionReference: "PM_INVALID_ACTION_REFERENCE",
139
129
  PmDuplicateActionName: "PM_DUPLICATE_ACTION_NAME"
140
130
  };
141
-
142
131
  //#endregion
143
132
  //#region src/core/domain/projectConfig/errorCode.ts
144
133
  const ProjectConfigErrorCode = {
@@ -151,7 +140,6 @@ const ProjectConfigErrorCode = {
151
140
  PcInvalidConfigStructure: "PC_INVALID_CONFIG_STRUCTURE",
152
141
  PcInvalidAuthConfig: "PC_INVALID_AUTH_CONFIG"
153
142
  };
154
-
155
143
  //#endregion
156
144
  //#region src/core/domain/recordPermission/errorCode.ts
157
145
  const RecordPermissionErrorCode = {
@@ -163,7 +151,6 @@ const RecordPermissionErrorCode = {
163
151
  RpInvalidPermissionValue: "RP_INVALID_PERMISSION_VALUE",
164
152
  RpDuplicateEntity: "RP_DUPLICATE_ENTITY"
165
153
  };
166
-
167
154
  //#endregion
168
155
  //#region src/core/domain/report/errorCode.ts
169
156
  const ReportErrorCode = {
@@ -174,7 +161,6 @@ const ReportErrorCode = {
174
161
  RtInvalidChartMode: "RT_INVALID_CHART_MODE",
175
162
  RtEmptyReportName: "RT_EMPTY_REPORT_NAME"
176
163
  };
177
-
178
164
  //#endregion
179
165
  //#region src/core/domain/seedData/errorCode.ts
180
166
  const SeedDataErrorCode = {
@@ -186,11 +172,9 @@ const SeedDataErrorCode = {
186
172
  SdMissingKeyField: "SD_MISSING_KEY_FIELD",
187
173
  SdInvalidKeyFieldValue: "SD_INVALID_KEY_FIELD_VALUE"
188
174
  };
189
-
190
175
  //#endregion
191
176
  //#region src/core/domain/services/errorCode.ts
192
177
  const DomainServiceErrorCode = { YamlSerializationFailed: "DS_YAML_SERIALIZATION_FAILED" };
193
-
194
178
  //#endregion
195
179
  //#region src/core/domain/view/errorCode.ts
196
180
  const ViewErrorCode = {
@@ -202,10 +186,7 @@ const ViewErrorCode = {
202
186
  VwEmptyViewName: "VW_EMPTY_VIEW_NAME",
203
187
  VwInvalidIndex: "VW_INVALID_INDEX"
204
188
  };
205
-
206
- //#endregion
207
- //#region src/core/domain/error.ts
208
- const BusinessRuleErrorCode = {
189
+ ({
209
190
  ...ActionErrorCode,
210
191
  ...AdminNotesErrorCode,
211
192
  ...AppPermissionErrorCode,
@@ -222,7 +203,7 @@ const BusinessRuleErrorCode = {
222
203
  ...SeedDataErrorCode,
223
204
  ...DomainServiceErrorCode,
224
205
  ...ViewErrorCode
225
- };
206
+ });
226
207
  /**
227
208
  * Domain Layer - Business Rule Error
228
209
  *
@@ -239,7 +220,6 @@ var BusinessRuleError = class extends AnyError {
239
220
  function isBusinessRuleError(error) {
240
221
  return error instanceof BusinessRuleError;
241
222
  }
242
-
243
223
  //#endregion
244
224
  //#region src/core/application/error.ts
245
225
  /**
@@ -333,7 +313,8 @@ const SystemErrorCode = {
333
313
  NetworkError: "NETWORK_ERROR",
334
314
  StorageError: "STORAGE_ERROR",
335
315
  DocumentGenerationError: "DOCUMENT_GENERATION_ERROR",
336
- ExternalApiError: "EXTERNAL_API_ERROR"
316
+ ExternalApiError: "EXTERNAL_API_ERROR",
317
+ ExecutionError: "EXECUTION_ERROR"
337
318
  };
338
319
  var SystemError = class extends ApplicationError {
339
320
  name = "SystemError";
@@ -345,7 +326,6 @@ var SystemError = class extends ApplicationError {
345
326
  function isSystemError(error) {
346
327
  return error instanceof SystemError;
347
328
  }
348
-
349
329
  //#endregion
350
330
  //#region src/core/application/applyFromConfigBase.ts
351
331
  async function applyFromConfig(config) {
@@ -355,19 +335,21 @@ async function applyFromConfig(config) {
355
335
  const remote = await config.fetchRemote();
356
336
  await config.update(parsed, remote);
357
337
  }
358
-
359
338
  //#endregion
360
339
  //#region src/lib/typeGuards.ts
361
340
  /**
362
- * Narrows `unknown` to a plain `Record<string, unknown>`.
363
- * Returns true when the value is a non-null, non-array plain object.
364
- * Excludes built-in types (Date, RegExp, Map, Set) that are technically
365
- * objects but should not be treated as string-keyed records.
341
+ * Narrows `unknown` to `Record<string, unknown>`.
342
+ * Returns true when the value is a non-null, non-array object that is not
343
+ * one of the explicitly excluded built-in types (Date, RegExp, Map, Set).
344
+ *
345
+ * Note: Custom class instances (e.g. `new Foo()`, `new Error()`) and
346
+ * prototype-less objects (`Object.create(null)`) also pass this guard.
347
+ * When combined with `Object.keys()`, only own enumerable string-keyed
348
+ * properties are visible; inherited enumerable properties are not included.
366
349
  */
367
350
  function isRecord(value) {
368
351
  return typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof Date) && !(value instanceof RegExp) && !(value instanceof Map) && !(value instanceof Set);
369
352
  }
370
-
371
353
  //#endregion
372
354
  //#region src/core/domain/typeGuards.ts
373
355
  /**
@@ -431,7 +413,6 @@ function parseEntityBase(raw, index, validTypes, errorCodes, options) {
431
413
  code: raw.code
432
414
  };
433
415
  }
434
-
435
416
  //#endregion
436
417
  //#region src/core/domain/services/yamlConfigParser.ts
437
418
  function parseYamlConfig(rawText, errorCodes, domainLabel) {
@@ -445,24 +426,18 @@ function parseYamlConfig(rawText, errorCodes, domainLabel) {
445
426
  if (!isRecord(parsed)) throw new BusinessRuleError(errorCodes.invalidConfigStructure, `${domainLabel} config must be a YAML object`);
446
427
  return parsed;
447
428
  }
448
-
449
- //#endregion
450
- //#region src/core/domain/action/valueObject.ts
451
- const SRC_TYPES = ["FIELD", "RECORD_URL"];
452
- const VALID_SRC_TYPES = new Set(SRC_TYPES);
429
+ const VALID_SRC_TYPES = new Set(["FIELD", "RECORD_URL"]);
453
430
  function isActionMappingSrcType(value) {
454
431
  return VALID_SRC_TYPES.has(value);
455
432
  }
456
- const ENTITY_TYPES$1 = [
433
+ const VALID_ENTITY_TYPES$9 = new Set([
457
434
  "USER",
458
435
  "GROUP",
459
436
  "ORGANIZATION"
460
- ];
461
- const VALID_ENTITY_TYPES$9 = new Set(ENTITY_TYPES$1);
437
+ ]);
462
438
  function isActionEntityType(value) {
463
439
  return VALID_ENTITY_TYPES$9.has(value);
464
440
  }
465
-
466
441
  //#endregion
467
442
  //#region src/core/domain/action/services/configParser.ts
468
443
  function parseDestApp(raw, actionName) {
@@ -531,13 +506,11 @@ const ActionConfigParser = { parse: (rawText) => {
531
506
  }
532
507
  return { actions };
533
508
  } };
534
-
535
509
  //#endregion
536
510
  //#region src/core/application/action/parseConfig.ts
537
511
  function parseActionConfigText(rawText) {
538
512
  return wrapBusinessRuleError(() => ActionConfigParser.parse(rawText));
539
513
  }
540
-
541
514
  //#endregion
542
515
  //#region src/core/application/action/applyAction.ts
543
516
  async function applyAction({ container }) {
@@ -554,7 +527,6 @@ async function applyAction({ container }) {
554
527
  notFoundMessage: "Action config file not found"
555
528
  });
556
529
  }
557
-
558
530
  //#endregion
559
531
  //#region src/core/adapters/kintone/wrapKintoneError.ts
560
532
  const KINTONE_REVISION_CONFLICT_CODE = "GAIA_CO02";
@@ -608,7 +580,6 @@ function wrapKintoneError(error, message) {
608
580
  }
609
581
  throw new SystemError(SystemErrorCode.ExternalApiError, detail, error);
610
582
  }
611
-
612
583
  //#endregion
613
584
  //#region src/core/adapters/kintone/actionConfigurator.ts
614
585
  function fromKintoneDestApp(raw) {
@@ -712,7 +683,6 @@ var KintoneActionConfigurator = class {
712
683
  }
713
684
  }
714
685
  };
715
-
716
686
  //#endregion
717
687
  //#region src/core/adapters/kintone/appDeployer.ts
718
688
  const VALID_DEPLOY_STATUSES = new Set([
@@ -778,13 +748,11 @@ var KintoneAppDeployer = class {
778
748
  return new Promise((resolve) => setTimeout(resolve, ms));
779
749
  }
780
750
  };
781
-
782
751
  //#endregion
783
752
  //#region src/lib/nodeError.ts
784
753
  function isNodeError(error) {
785
- return error instanceof Error && "code" in error;
754
+ return error instanceof Error && "code" in error && typeof error.code === "string";
786
755
  }
787
-
788
756
  //#endregion
789
757
  //#region src/core/adapters/local/storage.ts
790
758
  function createLocalFileStorage(filePath, label = "file") {
@@ -810,31 +778,23 @@ function createLocalFileStorage(filePath, label = "file") {
810
778
  }
811
779
  };
812
780
  }
813
-
814
781
  //#endregion
815
782
  //#region src/core/adapters/local/actionStorage.ts
816
783
  function createLocalFileActionStorage(filePath) {
817
784
  return createLocalFileStorage(filePath, "action file");
818
785
  }
819
-
820
- //#endregion
821
- //#region src/core/domain/customization/valueObject.ts
822
- const SCOPES = [
786
+ const VALID_SCOPES = new Set([
823
787
  "ALL",
824
788
  "ADMIN",
825
789
  "NONE"
826
- ];
827
- const VALID_SCOPES = new Set(SCOPES);
790
+ ]);
828
791
  function isCustomizationScope(value) {
829
792
  return VALID_SCOPES.has(value);
830
793
  }
831
- const RESOURCE_TYPES = ["FILE", "URL"];
832
- const VALID_RESOURCE_TYPES = new Set(RESOURCE_TYPES);
794
+ const VALID_RESOURCE_TYPES = new Set(["FILE", "URL"]);
833
795
  function isResourceType(value) {
834
796
  return VALID_RESOURCE_TYPES.has(value);
835
797
  }
836
- const DEFAULT_CUSTOMIZATION_SCOPE = "ALL";
837
-
838
798
  //#endregion
839
799
  //#region src/core/adapters/kintone/customizationConfigurator.ts
840
800
  function fromKintoneResource(raw) {
@@ -923,7 +883,6 @@ var KintoneCustomizationConfigurator = class {
923
883
  }
924
884
  }
925
885
  };
926
-
927
886
  //#endregion
928
887
  //#region src/core/adapters/kintone/fileDownloader.ts
929
888
  var KintoneFileDownloader = class {
@@ -939,7 +898,6 @@ var KintoneFileDownloader = class {
939
898
  }
940
899
  }
941
900
  };
942
-
943
901
  //#endregion
944
902
  //#region src/lib/safePath.ts
945
903
  /**
@@ -986,7 +944,6 @@ function isSafePath(targetPath, baseDir) {
986
944
  }
987
945
  return resolvedTarget.startsWith(`${resolvedBase}/`) || resolvedTarget === resolvedBase;
988
946
  }
989
-
990
947
  //#endregion
991
948
  //#region src/core/adapters/kintone/fileUploader.ts
992
949
  var KintoneFileUploader = class {
@@ -1005,7 +962,6 @@ var KintoneFileUploader = class {
1005
962
  }
1006
963
  }
1007
964
  };
1008
-
1009
965
  //#endregion
1010
966
  //#region src/lib/charValidation.ts
1011
967
  /** Returns true if the string contains any control characters (0x00–0x1f or 0x7f). */
@@ -1017,7 +973,7 @@ function hasControlChars(s) {
1017
973
  return false;
1018
974
  }
1019
975
  /** Replaces control characters (0x00–0x1f, 0x7f) with escaped `\\xNN` representation for safe display. */
1020
- function sanitizeForDisplay(s) {
976
+ function sanitizeForDisplay$1(s) {
1021
977
  let result = "";
1022
978
  for (let i = 0; i < s.length; i++) {
1023
979
  const ch = s.charCodeAt(i);
@@ -1026,7 +982,6 @@ function sanitizeForDisplay(s) {
1026
982
  }
1027
983
  return result;
1028
984
  }
1029
-
1030
985
  //#endregion
1031
986
  //#region src/core/domain/formSchema/valueObject.ts
1032
987
  function hasInvalidFieldCodeChars(code) {
@@ -1039,10 +994,9 @@ function hasInvalidFieldCodeChars(code) {
1039
994
  }
1040
995
  const FieldCode = { create: (code) => {
1041
996
  if (code.length === 0) throw new BusinessRuleError(FormSchemaErrorCode.FsEmptyFieldCode, "Field code cannot be empty");
1042
- if (hasInvalidFieldCodeChars(code)) throw new BusinessRuleError(FormSchemaErrorCode.FsInvalidFieldCode, `Field code "${sanitizeForDisplay(code)}" contains invalid characters`);
997
+ if (hasInvalidFieldCodeChars(code)) throw new BusinessRuleError(FormSchemaErrorCode.FsInvalidFieldCode, `Field code "${sanitizeForDisplay$1(code)}" contains invalid characters`);
1043
998
  return code;
1044
999
  } };
1045
-
1046
1000
  //#endregion
1047
1001
  //#region src/core/adapters/kintone/formConfigurator.ts
1048
1002
  const KNOWN_FIELD_TYPES = new Set([
@@ -1452,7 +1406,6 @@ var KintoneFormConfigurator = class {
1452
1406
  }
1453
1407
  }
1454
1408
  };
1455
-
1456
1409
  //#endregion
1457
1410
  //#region src/core/adapters/kintone/recordConverter.ts
1458
1411
  const SYSTEM_FIELDS = new Set([
@@ -1543,7 +1496,6 @@ function fromKintoneRecord(record) {
1543
1496
  }
1544
1497
  return seedRecord;
1545
1498
  }
1546
-
1547
1499
  //#endregion
1548
1500
  //#region src/core/adapters/kintone/recordManager.ts
1549
1501
  function extractId(record) {
@@ -1615,13 +1567,11 @@ var KintoneRecordManager = class {
1615
1567
  }
1616
1568
  }
1617
1569
  };
1618
-
1619
1570
  //#endregion
1620
1571
  //#region src/core/adapters/local/customizationStorage.ts
1621
1572
  function createLocalFileCustomizationStorage(filePath) {
1622
1573
  return createLocalFileStorage(filePath, "customization config file");
1623
1574
  }
1624
-
1625
1575
  //#endregion
1626
1576
  //#region src/core/adapters/local/fileWriter.ts
1627
1577
  var LocalFileWriter = class {
@@ -1639,19 +1589,16 @@ var LocalFileWriter = class {
1639
1589
  }
1640
1590
  }
1641
1591
  };
1642
-
1643
1592
  //#endregion
1644
1593
  //#region src/core/adapters/local/schemaStorage.ts
1645
1594
  function createLocalFileSchemaStorage(filePath) {
1646
1595
  return createLocalFileStorage(filePath, "schema file");
1647
1596
  }
1648
-
1649
1597
  //#endregion
1650
1598
  //#region src/core/adapters/local/seedStorage.ts
1651
1599
  function createLocalFileSeedStorage(filePath) {
1652
1600
  return createLocalFileStorage(filePath, "seed file");
1653
1601
  }
1654
-
1655
1602
  //#endregion
1656
1603
  //#region src/core/application/container/cli.ts
1657
1604
  function buildKintoneAuth(auth) {
@@ -1686,7 +1633,6 @@ function createCustomizationCliContainer(config) {
1686
1633
  appDeployer: new KintoneAppDeployer(client, config.appId)
1687
1634
  };
1688
1635
  }
1689
-
1690
1636
  //#endregion
1691
1637
  //#region src/core/application/container/kintoneClient.ts
1692
1638
  function createKintoneClient(config) {
@@ -1696,7 +1642,6 @@ function createKintoneClient(config) {
1696
1642
  guestSpaceId: config.guestSpaceId
1697
1643
  });
1698
1644
  }
1699
-
1700
1645
  //#endregion
1701
1646
  //#region src/core/application/container/actionCli.ts
1702
1647
  function createActionCliContainer(config) {
@@ -1707,7 +1652,6 @@ function createActionCliContainer(config) {
1707
1652
  appDeployer: new KintoneAppDeployer(client, config.appId)
1708
1653
  };
1709
1654
  }
1710
-
1711
1655
  //#endregion
1712
1656
  //#region src/cli/config.ts
1713
1657
  const CliConfigSchema = v.object({
@@ -1826,14 +1770,12 @@ function resolveAuth(apiToken, username, password) {
1826
1770
  };
1827
1771
  throw new ValidationError(ValidationErrorCode.InvalidInput, "Missing required configuration:\n Either KINTONE_API_TOKEN or KINTONE_USERNAME/KINTONE_PASSWORD is required");
1828
1772
  }
1829
-
1830
1773
  //#endregion
1831
1774
  //#region src/core/domain/projectConfig/entity.ts
1832
1775
  const MultiAppResult = { create: (results) => ({
1833
1776
  results,
1834
1777
  hasFailure: results.some((r) => r.status === "failed")
1835
1778
  }) };
1836
-
1837
1779
  //#endregion
1838
1780
  //#region src/core/application/projectConfig/executeMultiApp.ts
1839
1781
  async function executeMultiApp(plan, executor) {
@@ -1864,7 +1806,6 @@ async function executeMultiApp(plan, executor) {
1864
1806
  }
1865
1807
  return MultiAppResult.create(results);
1866
1808
  }
1867
-
1868
1809
  //#endregion
1869
1810
  //#region src/core/domain/projectConfig/valueObject.ts
1870
1811
  const INVALID_APP_NAME_CHARS = new Set([
@@ -1885,11 +1826,10 @@ function hasInvalidAppNameChars(name) {
1885
1826
  }
1886
1827
  const AppName = { create: (name) => {
1887
1828
  if (name.length === 0) throw new BusinessRuleError(ProjectConfigErrorCode.PcEmptyAppName, "App name cannot be empty");
1888
- if (hasInvalidAppNameChars(name)) throw new BusinessRuleError(ProjectConfigErrorCode.PcInvalidAppName, `App name "${sanitizeForDisplay(name)}" contains invalid characters (path separators or control characters are not allowed)`);
1829
+ if (hasInvalidAppNameChars(name)) throw new BusinessRuleError(ProjectConfigErrorCode.PcInvalidAppName, `App name "${sanitizeForDisplay$1(name)}" contains invalid characters (path separators or control characters are not allowed)`);
1889
1830
  if (name === "." || name === "..") throw new BusinessRuleError(ProjectConfigErrorCode.PcInvalidAppName, `App name "${name}" is not allowed (reserved path component)`);
1890
1831
  return name;
1891
1832
  } };
1892
-
1893
1833
  //#endregion
1894
1834
  //#region src/core/domain/projectConfig/services/configParser.ts
1895
1835
  function asOptionalString(value) {
@@ -1986,7 +1926,6 @@ function parseAuth(raw) {
1986
1926
  throw new BusinessRuleError(ProjectConfigErrorCode.PcInvalidAuthConfig, "Auth must have either apiToken or username/password");
1987
1927
  }
1988
1928
  const ConfigParser = { parse: parseProjectConfig };
1989
-
1990
1929
  //#endregion
1991
1930
  //#region src/core/application/projectConfig/loadProjectConfig.ts
1992
1931
  /**
@@ -2003,7 +1942,6 @@ function loadProjectConfig(input) {
2003
1942
  }
2004
1943
  return ConfigParser.parse(raw);
2005
1944
  }
2006
-
2007
1945
  //#endregion
2008
1946
  //#region src/core/domain/projectConfig/services/dependencyResolver.ts
2009
1947
  /**
@@ -2053,7 +1991,6 @@ function validateDependencyReferences(apps) {
2053
1991
  for (const [name, entry] of apps) for (const dep of entry.dependsOn) if (!apps.has(dep)) throw new BusinessRuleError(ProjectConfigErrorCode.PcUnknownDependency, `App "${name}" depends on unknown app "${dep}"`);
2054
1992
  }
2055
1993
  const DependencyResolver = { resolve: resolveExecutionOrder };
2056
-
2057
1994
  //#endregion
2058
1995
  //#region src/core/application/projectConfig/resolveExecutionPlan.ts
2059
1996
  function resolveExecutionPlan(input) {
@@ -2068,7 +2005,6 @@ function resolveSingleApp(config, appName) {
2068
2005
  if (!entry) throw new NotFoundError(NotFoundErrorCode.AppNotFound, `App "${appName}" not found in project config`);
2069
2006
  return { orderedApps: [entry] };
2070
2007
  }
2071
-
2072
2008
  //#endregion
2073
2009
  //#region src/core/domain/projectConfig/appFilePaths.ts
2074
2010
  function buildAppFilePaths(appName, baseDir) {
@@ -2090,15 +2026,17 @@ function buildAppFilePaths(appName, baseDir) {
2090
2026
  plugin: prefix(`${appName}/plugin.yaml`)
2091
2027
  };
2092
2028
  }
2093
-
2094
- //#endregion
2095
- //#region src/core/application/formSchema/deployApp.ts
2096
- async function deployApp({ container }) {
2097
- await container.appDeployer.deploy();
2098
- }
2099
-
2100
2029
  //#endregion
2101
2030
  //#region src/cli/handleError.ts
2031
+ /**
2032
+ * Log error details without terminating the process.
2033
+ * Use this in contexts where multiple errors may be reported (e.g. multi-app results).
2034
+ *
2035
+ * Note: This function intentionally does NOT show the "Set VERBOSE=1 ..." hint.
2036
+ * The hint is only shown by `handleCliError`, which is the top-level CLI handler.
2037
+ * `logError` is used for per-app error reporting within multi-app runs where the
2038
+ * hint would be noisy if repeated for each failure.
2039
+ */
2102
2040
  function logError(error) {
2103
2041
  if (isBusinessRuleError(error)) {
2104
2042
  p.log.error(`[BusinessRuleError] ${error.code}: ${error.message}`);
@@ -2107,11 +2045,14 @@ function logError(error) {
2107
2045
  }
2108
2046
  if (isValidationError(error)) {
2109
2047
  p.log.error(`[ValidationError] ${error.code}: ${error.message}`);
2048
+ p.log.warn("Hint: Please check your input values and configuration.");
2110
2049
  logErrorDetails(error);
2111
2050
  return;
2112
2051
  }
2113
2052
  if (isSystemError(error)) {
2114
2053
  p.log.error(`[SystemError] ${error.code}: ${error.message}`);
2054
+ const hint = systemErrorHints[error.code];
2055
+ if (hint) p.log.warn(`Hint: ${hint}`);
2115
2056
  logErrorDetails(error);
2116
2057
  return;
2117
2058
  }
@@ -2151,46 +2092,86 @@ function logError(error) {
2151
2092
  }
2152
2093
  p.log.error(`[Error] Unexpected error occurred: ${String(error)}`);
2153
2094
  }
2095
+ /**
2096
+ * Log error details and terminate the process with exit code 1.
2097
+ * Use this as the top-level error handler in CLI command `run` functions.
2098
+ */
2154
2099
  function handleCliError(error) {
2155
2100
  logError(error);
2101
+ if (!isVerbose()) p.log.info("Set VERBOSE=1 for full stack traces.");
2156
2102
  p.outro("Failed.");
2157
2103
  process.exit(1);
2158
2104
  }
2159
2105
  function formatErrorForDisplay(error) {
2160
- if (error instanceof Error) return error.message;
2161
- if (typeof error === "object" && error !== null) return JSON.stringify(error, null, 2);
2162
- return String(error);
2106
+ if (error instanceof Error) return sanitizeString(error.message);
2107
+ if (typeof error === "object" && error !== null) return JSON.stringify(sanitizeForDisplay(error), null, 2);
2108
+ return sanitizeString(String(error));
2109
+ }
2110
+ const systemErrorHints = {
2111
+ NETWORK_ERROR: "Please check your network connection and kintone domain.",
2112
+ EXTERNAL_API_ERROR: "The kintone API returned an unexpected error. Please retry or check the API status.",
2113
+ STORAGE_ERROR: "Failed to read/write a local file. Please check file permissions.",
2114
+ EXECUTION_ERROR: "One or more apps failed during execution. Check the individual errors above."
2115
+ };
2116
+ const SENSITIVE_KEYS = /^(authorization|apitoken|api-token|api_token|apikey|api-key|api_key|password|secret|credentials|x-cybozu-authorization)$/i;
2117
+ const SENSITIVE_VALUE_PATTERNS = /(?<=(?:password|apiToken|api[_-]?token|api[_-]?key|secret|credentials)[=:]\s*)\S+/gi;
2118
+ const AUTHORIZATION_VALUE_PATTERN = /(?<=authorization[=:]\s*)\S+(?:\s+\S+)?/gi;
2119
+ function sanitizeString(value) {
2120
+ return value.replace(AUTHORIZATION_VALUE_PATTERN, "[REDACTED]").replace(SENSITIVE_VALUE_PATTERNS, "[REDACTED]");
2121
+ }
2122
+ function sanitizeForDisplay(obj, seen = /* @__PURE__ */ new WeakSet()) {
2123
+ if (typeof obj !== "object" || obj === null) return obj;
2124
+ if (seen.has(obj)) return "[Circular]";
2125
+ seen.add(obj);
2126
+ if (Array.isArray(obj)) return obj.map((item) => sanitizeForDisplay(item, seen));
2127
+ const result = {};
2128
+ if (obj instanceof Error) {
2129
+ result.message = sanitizeString(obj.message);
2130
+ if (obj.stack) result.stack = sanitizeString(obj.stack);
2131
+ }
2132
+ for (const [key, value] of Object.entries(obj)) if (SENSITIVE_KEYS.test(key)) result[key] = "[REDACTED]";
2133
+ else if (typeof value === "object" && value !== null) result[key] = sanitizeForDisplay(value, seen);
2134
+ else if (typeof value === "string") result[key] = sanitizeString(value);
2135
+ else result[key] = value;
2136
+ return result;
2137
+ }
2138
+ function isVerbose() {
2139
+ return process.env.VERBOSE === "1" || process.env.VERBOSE === "true" || process.env.VERBOSE === "yes";
2163
2140
  }
2164
2141
  function logErrorDetails(error) {
2165
2142
  if (error.cause) {
2143
+ const seen = /* @__PURE__ */ new WeakSet();
2144
+ seen.add(error);
2166
2145
  p.log.warn(`Cause: ${formatErrorForDisplay(error.cause)}`);
2167
- logNestedErrorProperties(error.cause);
2146
+ logNestedErrorProperties(error.cause, seen);
2168
2147
  }
2169
- if (error.stack) p.log.warn(`Stack: ${error.stack}`);
2148
+ if (isVerbose() && error.stack) p.log.warn(`Stack: ${error.stack}`);
2170
2149
  }
2171
- function logNestedErrorProperties(target) {
2150
+ function logNestedErrorProperties(target, seen = /* @__PURE__ */ new WeakSet()) {
2172
2151
  if (typeof target !== "object" || target === null) return;
2152
+ if (seen.has(target)) return;
2153
+ seen.add(target);
2173
2154
  const record = target;
2174
2155
  if (record.error instanceof Error) {
2175
- p.log.warn(` Error: ${record.error.message}`);
2176
- const innerRecord = record.error;
2177
- if (innerRecord.errors && typeof innerRecord.errors === "object") p.log.warn(` Details: ${JSON.stringify(innerRecord.errors, null, 2)}`);
2156
+ p.log.warn(` Error: ${sanitizeString(record.error.message)}`);
2157
+ if (hasObjectProperty(record.error, "errors")) p.log.warn(` Details: ${JSON.stringify(sanitizeForDisplay(record.error.errors), null, 2)}`);
2178
2158
  }
2179
2159
  if (Array.isArray(record.errors)) for (const e of record.errors) if (e instanceof Error) {
2180
- p.log.warn(` - ${e.message}`);
2181
- const inner = e;
2182
- if (inner.errors && typeof inner.errors === "object") p.log.warn(` ${JSON.stringify(inner.errors, null, 2)}`);
2183
- } else p.log.warn(` - ${JSON.stringify(e, null, 2)}`);
2184
- else if (record.errors && typeof record.errors === "object" && !("error" in record)) p.log.warn(`Details: ${JSON.stringify(record.errors, null, 2)}`);
2160
+ p.log.warn(` - ${sanitizeString(e.message)}`);
2161
+ if (hasObjectProperty(e, "errors")) p.log.warn(` ${JSON.stringify(sanitizeForDisplay(e.errors), null, 2)}`);
2162
+ } else p.log.warn(` - ${JSON.stringify(sanitizeForDisplay(e), null, 2)}`);
2163
+ else if (record.errors && typeof record.errors === "object" && !(record.error instanceof Error)) p.log.warn(`Details: ${JSON.stringify(sanitizeForDisplay(record.errors), null, 2)}`);
2185
2164
  if (target instanceof Error && target.cause) {
2186
2165
  p.log.warn(` Caused by: ${formatErrorForDisplay(target.cause)}`);
2187
- logNestedErrorProperties(target.cause);
2166
+ logNestedErrorProperties(target.cause, seen);
2188
2167
  }
2189
2168
  }
2169
+ function hasObjectProperty(obj, key) {
2170
+ return key in obj && typeof obj[key] === "object" && obj[key] !== null;
2171
+ }
2190
2172
  function isApplicationError(error) {
2191
2173
  return error instanceof ApplicationError;
2192
2174
  }
2193
-
2194
2175
  //#endregion
2195
2176
  //#region src/cli/output.ts
2196
2177
  function formatDiffSummary(summary) {
@@ -2299,41 +2280,30 @@ async function confirmAndDeploy(containers, skipConfirm, successMessage = "Deplo
2299
2280
  if (!skipConfirm) {
2300
2281
  const shouldDeploy = await p.confirm({ message: "Deploy to production?" });
2301
2282
  if (p.isCancel(shouldDeploy) || !shouldDeploy) {
2302
- p.log.warn("Applied to preview, but not deployed to production.");
2283
+ const appNames = containers.map((c) => c.appName).filter((n) => n != null);
2284
+ if (appNames.length > 0) p.log.warn(`Applied to preview, but not deployed to production: ${appNames.join(", ")}`);
2285
+ else p.log.warn("Applied to preview, but not deployed to production.");
2303
2286
  return;
2304
2287
  }
2305
2288
  }
2306
2289
  const ds = p.spinner();
2307
2290
  ds.start("Deploying to production...");
2291
+ const deployedNames = [];
2308
2292
  try {
2309
- for (const container of containers) await container.appDeployer.deploy();
2293
+ for (const container of containers) {
2294
+ await container.appDeployer.deploy();
2295
+ if (container.appName) deployedNames.push(container.appName);
2296
+ }
2310
2297
  ds.stop("Deployed to production.");
2311
2298
  } catch (error) {
2312
2299
  ds.stop("Deployment failed.");
2300
+ if (deployedNames.length > 0) p.log.warn(`${deployedNames.length}/${containers.length} app(s) were deployed before the failure: ${deployedNames.join(", ")}`);
2301
+ const notDeployed = containers.map((c) => c.appName).filter((n) => n != null).filter((n) => !deployedNames.includes(n));
2302
+ if (notDeployed.length > 0) p.log.warn(`Not deployed: ${notDeployed.join(", ")}`);
2313
2303
  throw error;
2314
2304
  }
2315
2305
  p.log.success(successMessage);
2316
2306
  }
2317
- async function promptDeploy(container, skipConfirm) {
2318
- if (!skipConfirm) {
2319
- const shouldDeploy = await p.confirm({ message: "Deploy to production?" });
2320
- if (p.isCancel(shouldDeploy) || !shouldDeploy) {
2321
- p.log.warn("Applied to preview, but not deployed to production.");
2322
- return;
2323
- }
2324
- }
2325
- const ds = p.spinner();
2326
- ds.start("Deploying to production...");
2327
- try {
2328
- await deployApp({ container });
2329
- ds.stop("Deployment complete.");
2330
- } catch (error) {
2331
- ds.stop("Deployment failed.");
2332
- throw error;
2333
- }
2334
- p.log.success("Deployed to production.");
2335
- }
2336
-
2337
2307
  //#endregion
2338
2308
  //#region src/cli/projectConfig.ts
2339
2309
  const DEFAULT_CONFIG_PATH = "kintone-migrator.yaml";
@@ -2345,7 +2315,7 @@ function validateExclusiveArgs(values) {
2345
2315
  async function resolveTarget(values) {
2346
2316
  validateExclusiveArgs(values);
2347
2317
  if (values["app-id"]) return { mode: "single-legacy" };
2348
- const configPath = values.config ?? DEFAULT_CONFIG_PATH;
2318
+ const configPath = values.config ?? "kintone-migrator.yaml";
2349
2319
  if (values.app || values.all) {
2350
2320
  const config = loadProjectConfig({ content: await readConfigFile(configPath) });
2351
2321
  const plan = resolveExecutionPlan({
@@ -2438,10 +2408,30 @@ async function routeMultiApp(values, handlers) {
2438
2408
  }
2439
2409
  await handlers.multiApp(target.plan, target.config);
2440
2410
  }
2411
+ /**
2412
+ * High-level multi-app executor that prints app headers before each executor call.
2413
+ * Use this when the executor does not print its own headers (most apply commands).
2414
+ * Delegates to `runMultiAppWithFailCheck` for execution and failure handling.
2415
+ */
2416
+ async function runMultiAppWithHeaders(plan, executor, successMessage) {
2417
+ await runMultiAppWithFailCheck(plan, async (app) => {
2418
+ printAppHeader(app.name, app.appId);
2419
+ await executor(app);
2420
+ }, successMessage);
2421
+ }
2422
+ /**
2423
+ * Low-level multi-app executor that runs apps, prints results, and throws on failure.
2424
+ * Use this directly when the executor needs full control over output (e.g. schema migrate
2425
+ * prints its own headers and performs per-app deploy inside the executor callback).
2426
+ */
2441
2427
  async function runMultiAppWithFailCheck(plan, executor, successMessage) {
2442
2428
  const multiResult = await executeMultiApp(plan, executor);
2443
2429
  printMultiAppResult(multiResult);
2444
- if (multiResult.hasFailure) throw new SystemError(SystemErrorCode.ExternalApiError, "Execution stopped due to failure.");
2430
+ if (multiResult.hasFailure) {
2431
+ const succeededCount = multiResult.results.filter((r) => r.status === "succeeded").length;
2432
+ if (succeededCount > 0) p.log.warn(`${succeededCount} app(s) were applied to preview but may not have been deployed. Check their status in kintone.`);
2433
+ throw new SystemError(SystemErrorCode.ExecutionError, "Execution stopped due to failure.");
2434
+ }
2445
2435
  if (successMessage) p.log.success(successMessage);
2446
2436
  }
2447
2437
  async function configFileExists(configPath) {
@@ -2459,13 +2449,11 @@ async function readConfigFile(configPath) {
2459
2449
  throw new ValidationError(ValidationErrorCode.InvalidInput, `Config file not found: ${configPath}`, cause);
2460
2450
  }
2461
2451
  }
2462
-
2463
2452
  //#endregion
2464
2453
  //#region src/cli/resolveFilePath.ts
2465
2454
  function resolveFilePath(options) {
2466
2455
  return options.cliValue ?? options.envVar ?? (options.app && options.appFileField?.(options.app)) ?? (options.app ? join(options.defaultDir, `${options.app.name}.yaml`) : options.defaultFileName);
2467
2456
  }
2468
-
2469
2457
  //#endregion
2470
2458
  //#region src/cli/createDomainConfigResolver.ts
2471
2459
  /**
@@ -2514,7 +2502,6 @@ function createDomainConfigResolver(options) {
2514
2502
  resolveAppContainerConfig
2515
2503
  };
2516
2504
  }
2517
-
2518
2505
  //#endregion
2519
2506
  //#region src/cli/actionConfig.ts
2520
2507
  const actionArgs = {
@@ -2536,7 +2523,6 @@ const { resolveFilePath: resolveActionFilePath, resolveContainerConfig: resolveA
2536
2523
  actionFilePath: filePath
2537
2524
  })
2538
2525
  });
2539
-
2540
2526
  //#endregion
2541
2527
  //#region src/cli/commands/action/apply.ts
2542
2528
  async function runAction(config) {
@@ -2568,12 +2554,13 @@ var apply_default$12 = define({
2568
2554
  },
2569
2555
  multiApp: async (plan, projectConfig) => {
2570
2556
  const containers = [];
2571
- await runMultiAppWithFailCheck(plan, async (app) => {
2572
- const config = resolveActionAppContainerConfig(app, projectConfig, values);
2573
- printAppHeader(app.name, app.appId);
2574
- const container = await runAction(config);
2575
- containers.push(container);
2576
- }, void 0);
2557
+ await runMultiAppWithHeaders(plan, async (app) => {
2558
+ const container = await runAction(resolveActionAppContainerConfig(app, projectConfig, values));
2559
+ containers.push({
2560
+ appDeployer: container.appDeployer,
2561
+ appName: app.name
2562
+ });
2563
+ });
2577
2564
  await confirmAndDeploy(containers, skipConfirm);
2578
2565
  }
2579
2566
  });
@@ -2582,7 +2569,6 @@ var apply_default$12 = define({
2582
2569
  }
2583
2570
  }
2584
2571
  });
2585
-
2586
2572
  //#endregion
2587
2573
  //#region src/core/domain/services/yamlConfigSerializer.ts
2588
2574
  function serializeToYaml(data) {
@@ -2596,7 +2582,6 @@ function serializeToYaml(data) {
2596
2582
  throw new BusinessRuleError(DomainServiceErrorCode.YamlSerializationFailed, `Failed to serialize config to YAML: ${error instanceof Error ? error.message : String(error)}`, error);
2597
2583
  }
2598
2584
  }
2599
-
2600
2585
  //#endregion
2601
2586
  //#region src/core/domain/action/services/configSerializer.ts
2602
2587
  function serializeDestApp(destApp) {
@@ -2635,7 +2620,6 @@ const ActionConfigSerializer = { serialize: (config) => {
2635
2620
  serialized.actions = actions;
2636
2621
  return serializeToYaml(serialized);
2637
2622
  } };
2638
-
2639
2623
  //#endregion
2640
2624
  //#region src/core/application/captureFromConfigBase.ts
2641
2625
  async function captureFromConfig(config) {
@@ -2645,7 +2629,6 @@ async function captureFromConfig(config) {
2645
2629
  hasExistingConfig: (await config.getStorage()).exists
2646
2630
  };
2647
2631
  }
2648
-
2649
2632
  //#endregion
2650
2633
  //#region src/core/application/action/captureAction.ts
2651
2634
  async function captureAction({ container }) {
@@ -2655,13 +2638,11 @@ async function captureAction({ container }) {
2655
2638
  getStorage: () => container.actionStorage.get()
2656
2639
  });
2657
2640
  }
2658
-
2659
2641
  //#endregion
2660
2642
  //#region src/core/application/action/saveAction.ts
2661
2643
  async function saveAction({ container, input }) {
2662
2644
  await container.actionStorage.update(input.configText);
2663
2645
  }
2664
-
2665
2646
  //#endregion
2666
2647
  //#region src/cli/commands/action/capture.ts
2667
2648
  async function runCaptureAction(config) {
@@ -2704,91 +2685,134 @@ var capture_default$13 = define({
2704
2685
  }
2705
2686
  }
2706
2687
  });
2707
-
2708
2688
  //#endregion
2709
2689
  //#region src/lib/deepEqual.ts
2710
- function isArrayEqual(a, b, seen) {
2690
+ function isArrayEqual(a, b, stack) {
2711
2691
  if (!Array.isArray(b)) return false;
2712
2692
  if (a.length !== b.length) return false;
2713
- for (let i = 0; i < a.length; i++) if (!deepEqualInner(a[i], b[i], seen)) return false;
2693
+ for (let i = 0; i < a.length; i++) if (!deepEqualInner(a[i], b[i], stack)) return false;
2714
2694
  return true;
2715
2695
  }
2716
- function isRecordEqual(a, b, seen) {
2696
+ /**
2697
+ * Compare two objects by own enumerable string keys (via `Object.keys`).
2698
+ *
2699
+ * Note: Custom class instances (e.g. `new Error()`) that pass `isRecord` are
2700
+ * accepted. Because `Error.prototype.message` is non-enumerable, two Error
2701
+ * objects with different messages will compare as equal. Callers should not
2702
+ * rely on this function for types with non-enumerable significant state.
2703
+ */
2704
+ function isRecordEqual(a, b, stack) {
2705
+ if (!isRecord(b)) return false;
2717
2706
  const keysA = Object.keys(a);
2718
2707
  const keysB = Object.keys(b);
2719
2708
  if (keysA.length !== keysB.length) return false;
2720
2709
  for (const key of keysA) {
2721
2710
  if (!Object.hasOwn(b, key)) return false;
2722
- if (!deepEqualInner(a[key], b[key], seen)) return false;
2711
+ if (!deepEqualInner(a[key], b[key], stack)) return false;
2723
2712
  }
2724
2713
  return true;
2725
2714
  }
2726
- function isMapEqual$1(a, b, seen) {
2715
+ /**
2716
+ * Map keys are compared by reference (SameValueZero), not by deep equality.
2717
+ * Two Maps with structurally equal but referentially different object keys
2718
+ * will be considered unequal.
2719
+ */
2720
+ function isMapEqual$1(a, b, stack) {
2727
2721
  if (!(b instanceof Map)) return false;
2728
2722
  if (a.size !== b.size) return false;
2729
2723
  for (const [key, valA] of a) {
2730
2724
  if (!b.has(key)) return false;
2731
- if (!deepEqualInner(valA, b.get(key), seen)) return false;
2725
+ if (!deepEqualInner(valA, b.get(key), stack)) return false;
2726
+ }
2727
+ return true;
2728
+ }
2729
+ function isPrimitiveSet(s) {
2730
+ for (const val of s) {
2731
+ if (val !== null && typeof val === "object") return false;
2732
+ if (typeof val === "function") return false;
2732
2733
  }
2733
2734
  return true;
2734
2735
  }
2735
- function isSetEqual(a, b, _seen) {
2736
+ function isSetEqual(a, b, stack) {
2736
2737
  if (!(b instanceof Set)) return false;
2737
2738
  if (a.size !== b.size) return false;
2739
+ if (isPrimitiveSet(a) && isPrimitiveSet(b)) {
2740
+ for (const val of a) if (!b.has(val)) return false;
2741
+ return true;
2742
+ }
2738
2743
  const remaining = [...b];
2739
2744
  for (const valA of a) {
2740
- const idx = remaining.findIndex((valB) => deepEqualInner(valA, valB, /* @__PURE__ */ new WeakSet()));
2745
+ const stackLen = stack.length;
2746
+ const idx = remaining.findIndex((valB) => {
2747
+ const result = deepEqualInner(valA, valB, stack);
2748
+ if (!result) stack.length = stackLen;
2749
+ return result;
2750
+ });
2741
2751
  if (idx === -1) return false;
2742
2752
  remaining.splice(idx, 1);
2743
2753
  }
2744
2754
  return true;
2745
2755
  }
2746
- function deepEqualInner(a, b, seen) {
2756
+ function deepEqualInner(a, b, stack) {
2747
2757
  if (a === b) return true;
2758
+ if (typeof a === "number" && typeof b === "number" && Number.isNaN(a) && Number.isNaN(b)) return true;
2748
2759
  if (a === null || b === null) return a === b;
2749
2760
  if (typeof a !== typeof b) return false;
2750
2761
  if (typeof a !== "object") return false;
2751
2762
  const objA = a;
2752
2763
  const objB = b;
2753
- if (seen.has(objA) || seen.has(objB)) return false;
2754
- seen.add(objA);
2755
- seen.add(objB);
2756
- if (Array.isArray(objA)) return isArrayEqual(objA, objB, seen);
2757
- if (objA instanceof Date && objB instanceof Date) return objA.getTime() === objB.getTime();
2764
+ if (objA instanceof Date && objB instanceof Date) {
2765
+ const ta = objA.getTime();
2766
+ const tb = objB.getTime();
2767
+ return ta === tb || Number.isNaN(ta) && Number.isNaN(tb);
2768
+ }
2758
2769
  if (objA instanceof Date || objB instanceof Date) return false;
2759
2770
  if (objA instanceof RegExp && objB instanceof RegExp) return String(objA) === String(objB);
2760
2771
  if (objA instanceof RegExp || objB instanceof RegExp) return false;
2761
- if (objA instanceof Map) return isMapEqual$1(objA, objB, seen);
2762
- if (objB instanceof Map) return false;
2763
- if (objA instanceof Set) return isSetEqual(objA, objB, seen);
2764
- if (objB instanceof Set) return false;
2765
- if (isRecord(objA) && isRecord(objB)) return isRecordEqual(objA, objB, seen);
2766
- return false;
2772
+ for (const [sa, sb] of stack) if (sa === objA && sb === objB) return true;
2773
+ stack.push([objA, objB]);
2774
+ try {
2775
+ if (Array.isArray(objA)) return isArrayEqual(objA, objB, stack);
2776
+ if (objA instanceof Map) return isMapEqual$1(objA, objB, stack);
2777
+ if (objB instanceof Map) return false;
2778
+ if (objA instanceof Set) return isSetEqual(objA, objB, stack);
2779
+ if (objB instanceof Set) return false;
2780
+ if (isRecord(objA)) return isRecordEqual(objA, objB, stack);
2781
+ return false;
2782
+ } finally {
2783
+ stack.pop();
2784
+ }
2767
2785
  }
2768
2786
  /**
2769
2787
  * Deep equality comparison for structured data.
2770
2788
  * Supports primitives, plain objects, arrays, Date, RegExp, Map, and Set.
2771
- * Has circular reference protection via a WeakSet-based seen check (tracks both sides).
2772
2789
  *
2773
2790
  * Note: `{ a: undefined }` and `{}` are NOT considered equal. This differs from
2774
2791
  * JSON.stringify behavior but is intentional — explicit undefined properties are
2775
2792
  * semantically distinct from absent properties.
2776
2793
  *
2777
2794
  * Set comparison is order-independent: each element in one set is matched to an
2778
- * element in the other using deep equality (O(n²)).
2795
+ * element in the other using deep equality (O(n²) for non-primitive elements,
2796
+ * O(n) fast path for primitive-only sets).
2797
+ *
2798
+ * Map keys are compared by reference (SameValueZero), not by deep equality.
2799
+ * Two Maps with structurally equal but referentially different object keys
2800
+ * will be considered unequal.
2801
+ *
2802
+ * NaN handling: `deepEqual(NaN, NaN)` returns `true`. Invalid Date objects
2803
+ * (whose `getTime()` returns NaN) are also considered equal to each other.
2779
2804
  *
2780
- * NaN handling: `deepEqual(NaN, NaN)` returns `false` because the comparison
2781
- * uses strict equality (`===`) for primitives, and `NaN !== NaN` in JavaScript.
2805
+ * Signed zero: `-0` and `0` are considered equal (`-0 === 0` is `true`).
2782
2806
  *
2783
- * Circular reference limitation: objects already visited by the traversal are
2784
- * treated as non-equal. This means structurally identical circular references
2785
- * (e.g. `a.self = a` vs `b.self = b`) return `false`. This is a conservative
2786
- * approach that prevents infinite recursion but may produce false negatives.
2807
+ * Circular reference handling: uses a stack-based pair tracker. When the same
2808
+ * `(objA, objB)` pair is encountered again on the current comparison path,
2809
+ * structural equality is assumed to break the cycle. Shared references (DAG
2810
+ * structures) are correctly handled the same sub-object appearing in multiple
2811
+ * properties does not cause false negatives.
2787
2812
  */
2788
2813
  function deepEqual(a, b) {
2789
- return deepEqualInner(a, b, /* @__PURE__ */ new WeakSet());
2814
+ return deepEqualInner(a, b, []);
2790
2815
  }
2791
-
2792
2816
  //#endregion
2793
2817
  //#region src/core/domain/diff.ts
2794
2818
  const typeOrder = {
@@ -2816,7 +2840,6 @@ function buildDiffResult(entries, warnings = []) {
2816
2840
  warnings
2817
2841
  };
2818
2842
  }
2819
-
2820
2843
  //#endregion
2821
2844
  //#region src/core/domain/services/recordDiffDetector.ts
2822
2845
  function detectRecordDiff(localRecord, remoteRecord, callbacks) {
@@ -2829,7 +2852,6 @@ function detectRecordDiff(localRecord, remoteRecord, callbacks) {
2829
2852
  for (const [key, remoteValue] of Object.entries(remoteRecord)) if (!Object.hasOwn(localRecord, key)) entries.push(callbacks.onDeleted(key, remoteValue));
2830
2853
  return entries;
2831
2854
  }
2832
-
2833
2855
  //#endregion
2834
2856
  //#region src/core/domain/action/services/diffDetector.ts
2835
2857
  function compareActions$1(local, remote) {
@@ -2867,7 +2889,6 @@ const ActionDiffDetector = { detect: (local, remote) => {
2867
2889
  })
2868
2890
  }));
2869
2891
  } };
2870
-
2871
2892
  //#endregion
2872
2893
  //#region src/core/application/detectDiffBase.ts
2873
2894
  async function detectDiffFromConfig(config) {
@@ -2876,7 +2897,6 @@ async function detectDiffFromConfig(config) {
2876
2897
  const local = config.parseConfig(storageResult.content);
2877
2898
  return config.detect(local, remote);
2878
2899
  }
2879
-
2880
2900
  //#endregion
2881
2901
  //#region src/core/application/action/detectActionDiff.ts
2882
2902
  async function detectActionDiff({ container }) {
@@ -2888,7 +2908,6 @@ async function detectActionDiff({ container }) {
2888
2908
  notFoundMessage: "Action config file not found"
2889
2909
  });
2890
2910
  }
2891
-
2892
2911
  //#endregion
2893
2912
  //#region src/cli/commands/diffCommandFactory.ts
2894
2913
  function createDiffCommand(config) {
@@ -2934,21 +2953,6 @@ function createDiffCommand(config) {
2934
2953
  }
2935
2954
  });
2936
2955
  }
2937
-
2938
- //#endregion
2939
- //#region src/cli/commands/action/diff.ts
2940
- var diff_default$12 = createDiffCommand({
2941
- description: "Compare local action config with remote kintone app",
2942
- args: actionArgs,
2943
- spinnerMessage: "Comparing action settings...",
2944
- multiAppSuccessMessage: "All action diffs completed successfully.",
2945
- createContainer: createActionCliContainer,
2946
- detectDiff: detectActionDiff,
2947
- printResult: printActionDiffResult,
2948
- resolveContainerConfig: resolveActionContainerConfig,
2949
- resolveAppContainerConfig: resolveActionAppContainerConfig
2950
- });
2951
-
2952
2956
  //#endregion
2953
2957
  //#region src/cli/commands/action/index.ts
2954
2958
  var action_default = define({
@@ -2957,11 +2961,20 @@ var action_default = define({
2957
2961
  subCommands: {
2958
2962
  apply: apply_default$12,
2959
2963
  capture: capture_default$13,
2960
- diff: diff_default$12
2964
+ diff: createDiffCommand({
2965
+ description: "Compare local action config with remote kintone app",
2966
+ args: actionArgs,
2967
+ spinnerMessage: "Comparing action settings...",
2968
+ multiAppSuccessMessage: "All action diffs completed successfully.",
2969
+ createContainer: createActionCliContainer,
2970
+ detectDiff: detectActionDiff,
2971
+ printResult: printActionDiffResult,
2972
+ resolveContainerConfig: resolveActionContainerConfig,
2973
+ resolveAppContainerConfig: resolveActionAppContainerConfig
2974
+ })
2961
2975
  },
2962
2976
  run: () => {}
2963
2977
  });
2964
-
2965
2978
  //#endregion
2966
2979
  //#region src/core/domain/adminNotes/services/configParser.ts
2967
2980
  const AdminNotesConfigParser = { parse: (rawText) => {
@@ -2977,13 +2990,11 @@ const AdminNotesConfigParser = { parse: (rawText) => {
2977
2990
  includeInTemplateAndDuplicates: parsed.includeInTemplateAndDuplicates
2978
2991
  };
2979
2992
  } };
2980
-
2981
2993
  //#endregion
2982
2994
  //#region src/core/application/adminNotes/parseConfig.ts
2983
2995
  function parseAdminNotesConfigText(rawText) {
2984
2996
  return wrapBusinessRuleError(() => AdminNotesConfigParser.parse(rawText));
2985
2997
  }
2986
-
2987
2998
  //#endregion
2988
2999
  //#region src/core/application/adminNotes/applyAdminNotes.ts
2989
3000
  async function applyAdminNotes({ container }) {
@@ -3000,7 +3011,6 @@ async function applyAdminNotes({ container }) {
3000
3011
  notFoundMessage: "Admin notes config file not found"
3001
3012
  });
3002
3013
  }
3003
-
3004
3014
  //#endregion
3005
3015
  //#region src/core/adapters/kintone/adminNotesConfigurator.ts
3006
3016
  var KintoneAdminNotesConfigurator = class {
@@ -3039,13 +3049,11 @@ var KintoneAdminNotesConfigurator = class {
3039
3049
  }
3040
3050
  }
3041
3051
  };
3042
-
3043
3052
  //#endregion
3044
3053
  //#region src/core/adapters/local/adminNotesStorage.ts
3045
3054
  function createLocalFileAdminNotesStorage(filePath) {
3046
3055
  return createLocalFileStorage(filePath, "admin notes file");
3047
3056
  }
3048
-
3049
3057
  //#endregion
3050
3058
  //#region src/core/application/container/adminNotesCli.ts
3051
3059
  function createAdminNotesCliContainer(config) {
@@ -3056,7 +3064,6 @@ function createAdminNotesCliContainer(config) {
3056
3064
  appDeployer: new KintoneAppDeployer(client, config.appId)
3057
3065
  };
3058
3066
  }
3059
-
3060
3067
  //#endregion
3061
3068
  //#region src/cli/adminNotesConfig.ts
3062
3069
  const adminNotesArgs = {
@@ -3078,7 +3085,6 @@ const { resolveFilePath: resolveAdminNotesFilePath, resolveContainerConfig: reso
3078
3085
  adminNotesFilePath: filePath
3079
3086
  })
3080
3087
  });
3081
-
3082
3088
  //#endregion
3083
3089
  //#region src/cli/commands/admin-notes/apply.ts
3084
3090
  async function runAdminNotes(config) {
@@ -3110,12 +3116,13 @@ var apply_default$11 = define({
3110
3116
  },
3111
3117
  multiApp: async (plan, projectConfig) => {
3112
3118
  const containers = [];
3113
- await runMultiAppWithFailCheck(plan, async (app) => {
3114
- const config = resolveAdminNotesAppContainerConfig(app, projectConfig, values);
3115
- printAppHeader(app.name, app.appId);
3116
- const container = await runAdminNotes(config);
3117
- containers.push(container);
3118
- }, void 0);
3119
+ await runMultiAppWithHeaders(plan, async (app) => {
3120
+ const container = await runAdminNotes(resolveAdminNotesAppContainerConfig(app, projectConfig, values));
3121
+ containers.push({
3122
+ appDeployer: container.appDeployer,
3123
+ appName: app.name
3124
+ });
3125
+ });
3119
3126
  await confirmAndDeploy(containers, skipConfirm);
3120
3127
  }
3121
3128
  });
@@ -3124,7 +3131,6 @@ var apply_default$11 = define({
3124
3131
  }
3125
3132
  }
3126
3133
  });
3127
-
3128
3134
  //#endregion
3129
3135
  //#region src/core/domain/adminNotes/services/configSerializer.ts
3130
3136
  const AdminNotesConfigSerializer = { serialize: (config) => {
@@ -3133,7 +3139,6 @@ const AdminNotesConfigSerializer = { serialize: (config) => {
3133
3139
  includeInTemplateAndDuplicates: config.includeInTemplateAndDuplicates
3134
3140
  });
3135
3141
  } };
3136
-
3137
3142
  //#endregion
3138
3143
  //#region src/core/application/adminNotes/captureAdminNotes.ts
3139
3144
  async function captureAdminNotes({ container }) {
@@ -3143,13 +3148,11 @@ async function captureAdminNotes({ container }) {
3143
3148
  getStorage: () => container.adminNotesStorage.get()
3144
3149
  });
3145
3150
  }
3146
-
3147
3151
  //#endregion
3148
3152
  //#region src/core/application/adminNotes/saveAdminNotes.ts
3149
3153
  async function saveAdminNotes({ container, input }) {
3150
3154
  await container.adminNotesStorage.update(input.configText);
3151
3155
  }
3152
-
3153
3156
  //#endregion
3154
3157
  //#region src/cli/commands/admin-notes/capture.ts
3155
3158
  async function runCaptureAdminNotes(config) {
@@ -3192,7 +3195,6 @@ var capture_default$12 = define({
3192
3195
  }
3193
3196
  }
3194
3197
  });
3195
-
3196
3198
  //#endregion
3197
3199
  //#region src/core/domain/adminNotes/services/diffDetector.ts
3198
3200
  function compareConfigs$2(local, remote) {
@@ -3212,7 +3214,6 @@ function compareConfigs$2(local, remote) {
3212
3214
  const AdminNotesDiffDetector = { detect: (local, remote) => {
3213
3215
  return buildDiffResult(compareConfigs$2(local, remote));
3214
3216
  } };
3215
-
3216
3217
  //#endregion
3217
3218
  //#region src/core/application/adminNotes/detectAdminNotesDiff.ts
3218
3219
  async function detectAdminNotesDiff({ container }) {
@@ -3224,21 +3225,6 @@ async function detectAdminNotesDiff({ container }) {
3224
3225
  notFoundMessage: "Admin notes config file not found"
3225
3226
  });
3226
3227
  }
3227
-
3228
- //#endregion
3229
- //#region src/cli/commands/admin-notes/diff.ts
3230
- var diff_default$11 = createDiffCommand({
3231
- description: "Compare local admin notes config with remote kintone app",
3232
- args: adminNotesArgs,
3233
- spinnerMessage: "Comparing admin notes...",
3234
- multiAppSuccessMessage: "All admin notes diffs completed successfully.",
3235
- createContainer: createAdminNotesCliContainer,
3236
- detectDiff: detectAdminNotesDiff,
3237
- printResult: printAdminNotesDiffResult,
3238
- resolveContainerConfig: resolveAdminNotesContainerConfig,
3239
- resolveAppContainerConfig: resolveAdminNotesAppContainerConfig
3240
- });
3241
-
3242
3228
  //#endregion
3243
3229
  //#region src/cli/commands/admin-notes/index.ts
3244
3230
  var admin_notes_default = define({
@@ -3247,11 +3233,20 @@ var admin_notes_default = define({
3247
3233
  subCommands: {
3248
3234
  apply: apply_default$11,
3249
3235
  capture: capture_default$12,
3250
- diff: diff_default$11
3236
+ diff: createDiffCommand({
3237
+ description: "Compare local admin notes config with remote kintone app",
3238
+ args: adminNotesArgs,
3239
+ spinnerMessage: "Comparing admin notes...",
3240
+ multiAppSuccessMessage: "All admin notes diffs completed successfully.",
3241
+ createContainer: createAdminNotesCliContainer,
3242
+ detectDiff: detectAdminNotesDiff,
3243
+ printResult: printAdminNotesDiffResult,
3244
+ resolveContainerConfig: resolveAdminNotesContainerConfig,
3245
+ resolveAppContainerConfig: resolveAdminNotesAppContainerConfig
3246
+ })
3251
3247
  },
3252
3248
  run: () => {}
3253
3249
  });
3254
-
3255
3250
  //#endregion
3256
3251
  //#region src/core/domain/appPermission/services/configParser.ts
3257
3252
  const VALID_ENTITY_TYPES$8 = new Set([
@@ -3297,13 +3292,11 @@ const AppPermissionConfigParser = { parse: (rawText) => {
3297
3292
  }
3298
3293
  return { rights };
3299
3294
  } };
3300
-
3301
3295
  //#endregion
3302
3296
  //#region src/core/application/appPermission/parseConfig.ts
3303
3297
  function parseAppPermissionConfigText(rawText) {
3304
3298
  return wrapBusinessRuleError(() => AppPermissionConfigParser.parse(rawText));
3305
3299
  }
3306
-
3307
3300
  //#endregion
3308
3301
  //#region src/core/application/appPermission/applyAppPermission.ts
3309
3302
  async function applyAppPermission({ container }) {
@@ -3320,7 +3313,6 @@ async function applyAppPermission({ container }) {
3320
3313
  notFoundMessage: "App permission config file not found"
3321
3314
  });
3322
3315
  }
3323
-
3324
3316
  //#endregion
3325
3317
  //#region src/core/adapters/kintone/appPermissionConfigurator.ts
3326
3318
  const VALID_ENTITY_TYPES$7 = new Set([
@@ -3401,13 +3393,11 @@ var KintoneAppPermissionConfigurator = class {
3401
3393
  }
3402
3394
  }
3403
3395
  };
3404
-
3405
3396
  //#endregion
3406
3397
  //#region src/core/adapters/local/appPermissionStorage.ts
3407
3398
  function createLocalFileAppPermissionStorage(filePath) {
3408
3399
  return createLocalFileStorage(filePath, "app permission file");
3409
3400
  }
3410
-
3411
3401
  //#endregion
3412
3402
  //#region src/core/application/container/appPermissionCli.ts
3413
3403
  function createAppPermissionCliContainer(config) {
@@ -3418,7 +3408,6 @@ function createAppPermissionCliContainer(config) {
3418
3408
  appDeployer: new KintoneAppDeployer(client, config.appId)
3419
3409
  };
3420
3410
  }
3421
-
3422
3411
  //#endregion
3423
3412
  //#region src/cli/appAclConfig.ts
3424
3413
  const appAclArgs = {
@@ -3440,7 +3429,6 @@ const { resolveFilePath: resolveAppAclFilePath, resolveContainerConfig: resolveA
3440
3429
  appAclFilePath: filePath
3441
3430
  })
3442
3431
  });
3443
-
3444
3432
  //#endregion
3445
3433
  //#region src/cli/commands/app-acl/apply.ts
3446
3434
  async function runAppAcl(config) {
@@ -3472,12 +3460,13 @@ var apply_default$10 = define({
3472
3460
  },
3473
3461
  multiApp: async (plan, projectConfig) => {
3474
3462
  const containers = [];
3475
- await runMultiAppWithFailCheck(plan, async (app) => {
3476
- const config = resolveAppAclAppContainerConfig(app, projectConfig, values);
3477
- printAppHeader(app.name, app.appId);
3478
- const container = await runAppAcl(config);
3479
- containers.push(container);
3480
- }, void 0);
3463
+ await runMultiAppWithHeaders(plan, async (app) => {
3464
+ const container = await runAppAcl(resolveAppAclAppContainerConfig(app, projectConfig, values));
3465
+ containers.push({
3466
+ appDeployer: container.appDeployer,
3467
+ appName: app.name
3468
+ });
3469
+ });
3481
3470
  await confirmAndDeploy(containers, skipConfirm);
3482
3471
  }
3483
3472
  });
@@ -3486,7 +3475,6 @@ var apply_default$10 = define({
3486
3475
  }
3487
3476
  }
3488
3477
  });
3489
-
3490
3478
  //#endregion
3491
3479
  //#region src/core/domain/appPermission/services/configSerializer.ts
3492
3480
  function serializeAppRight(right) {
@@ -3508,7 +3496,6 @@ function serializeAppRight(right) {
3508
3496
  const AppPermissionConfigSerializer = { serialize: (config) => {
3509
3497
  return serializeToYaml({ rights: config.rights.map(serializeAppRight) });
3510
3498
  } };
3511
-
3512
3499
  //#endregion
3513
3500
  //#region src/core/application/appPermission/captureAppPermission.ts
3514
3501
  async function captureAppPermission({ container }) {
@@ -3518,13 +3505,11 @@ async function captureAppPermission({ container }) {
3518
3505
  getStorage: () => container.appPermissionStorage.get()
3519
3506
  });
3520
3507
  }
3521
-
3522
3508
  //#endregion
3523
3509
  //#region src/core/application/appPermission/saveAppPermission.ts
3524
3510
  async function saveAppPermission({ container, input }) {
3525
3511
  await container.appPermissionStorage.update(input.configText);
3526
3512
  }
3527
-
3528
3513
  //#endregion
3529
3514
  //#region src/cli/commands/app-acl/capture.ts
3530
3515
  async function runCaptureAppAcl(config) {
@@ -3567,7 +3552,6 @@ var capture_default$11 = define({
3567
3552
  }
3568
3553
  }
3569
3554
  });
3570
-
3571
3555
  //#endregion
3572
3556
  //#region src/core/domain/appPermission/services/diffDetector.ts
3573
3557
  const BOOLEAN_FLAGS = [
@@ -3619,7 +3603,6 @@ const AppPermissionDiffDetector = { detect: (local, remote) => {
3619
3603
  });
3620
3604
  return buildDiffResult(entries);
3621
3605
  } };
3622
-
3623
3606
  //#endregion
3624
3607
  //#region src/core/application/appPermission/detectAppPermissionDiff.ts
3625
3608
  async function detectAppPermissionDiff({ container }) {
@@ -3631,21 +3614,6 @@ async function detectAppPermissionDiff({ container }) {
3631
3614
  notFoundMessage: "App permission config file not found"
3632
3615
  });
3633
3616
  }
3634
-
3635
- //#endregion
3636
- //#region src/cli/commands/app-acl/diff.ts
3637
- var diff_default$10 = createDiffCommand({
3638
- description: "Compare local app permission config with remote kintone app",
3639
- args: appAclArgs,
3640
- spinnerMessage: "Comparing app permissions...",
3641
- multiAppSuccessMessage: "All app permission diffs completed successfully.",
3642
- createContainer: createAppPermissionCliContainer,
3643
- detectDiff: detectAppPermissionDiff,
3644
- printResult: printAppPermissionDiffResult,
3645
- resolveContainerConfig: resolveAppAclContainerConfig,
3646
- resolveAppContainerConfig: resolveAppAclAppContainerConfig
3647
- });
3648
-
3649
3617
  //#endregion
3650
3618
  //#region src/cli/commands/app-acl/index.ts
3651
3619
  var app_acl_default = define({
@@ -3654,11 +3622,20 @@ var app_acl_default = define({
3654
3622
  subCommands: {
3655
3623
  apply: apply_default$10,
3656
3624
  capture: capture_default$11,
3657
- diff: diff_default$10
3625
+ diff: createDiffCommand({
3626
+ description: "Compare local app permission config with remote kintone app",
3627
+ args: appAclArgs,
3628
+ spinnerMessage: "Comparing app permissions...",
3629
+ multiAppSuccessMessage: "All app permission diffs completed successfully.",
3630
+ createContainer: createAppPermissionCliContainer,
3631
+ detectDiff: detectAppPermissionDiff,
3632
+ printResult: printAppPermissionDiffResult,
3633
+ resolveContainerConfig: resolveAppAclContainerConfig,
3634
+ resolveAppContainerConfig: resolveAppAclAppContainerConfig
3635
+ })
3658
3636
  },
3659
3637
  run: () => {}
3660
3638
  });
3661
-
3662
3639
  //#endregion
3663
3640
  //#region src/core/domain/customization/services/resourceMerger.ts
3664
3641
  const MAX_RESOURCES_PER_CATEGORY = 30;
@@ -3686,7 +3663,6 @@ const ResourceMerger = {
3686
3663
  return [...kept, ...incoming];
3687
3664
  }
3688
3665
  };
3689
-
3690
3666
  //#endregion
3691
3667
  //#region src/core/domain/customization/services/configParser.ts
3692
3668
  function parseResource(raw, index) {
@@ -3742,13 +3718,11 @@ const CustomizationConfigParser = { parse: (rawText) => {
3742
3718
  mobile
3743
3719
  };
3744
3720
  } };
3745
-
3746
3721
  //#endregion
3747
3722
  //#region src/core/application/customization/parseConfig.ts
3748
3723
  function parseConfigText(rawText) {
3749
3724
  return wrapBusinessRuleError(() => CustomizationConfigParser.parse(rawText));
3750
3725
  }
3751
-
3752
3726
  //#endregion
3753
3727
  //#region src/core/application/customization/applyCustomization.ts
3754
3728
  async function resolveResources(platform, basePath, fileUploader) {
@@ -3801,7 +3775,6 @@ async function applyCustomization({ container, input }) {
3801
3775
  revision: currentCustomization.revision
3802
3776
  });
3803
3777
  }
3804
-
3805
3778
  //#endregion
3806
3779
  //#region src/cli/customizeConfig.ts
3807
3780
  const customizeArgs = {
@@ -3823,7 +3796,6 @@ const { resolveFilePath: resolveCustomizeFilePath, resolveContainerConfig: resol
3823
3796
  customizeFilePath: filePath
3824
3797
  })
3825
3798
  });
3826
-
3827
3799
  //#endregion
3828
3800
  //#region src/core/domain/customization/services/configSerializer.ts
3829
3801
  function serializeResource(resource) {
@@ -3855,7 +3827,6 @@ const CustomizationConfigSerializer = { serialize: (config) => {
3855
3827
  ...hasPlatformResources(config.mobile) ? { mobile: serializePlatform(config.mobile) } : {}
3856
3828
  });
3857
3829
  } };
3858
-
3859
3830
  //#endregion
3860
3831
  //#region src/lib/deduplicateName.ts
3861
3832
  const DEFAULT_MAX_COUNTER = 1e4;
@@ -3864,11 +3835,17 @@ const DEFAULT_MAX_COUNTER = 1e4;
3864
3835
  *
3865
3836
  * NOTE: This function mutates `usedNames` by adding the returned name to the set.
3866
3837
  * This is intentional to allow sequential calls to track used names efficiently.
3838
+ *
3839
+ * Caveat: If `baseName` already ends with `separator + number` (e.g. "app_1" with
3840
+ * separator "_"), the generated suffix may collide with names produced by a different
3841
+ * baseName (e.g. baseName="app" generating "app_1"). Callers should be aware of this
3842
+ * when working with names that may contain the separator.
3867
3843
  */
3868
3844
  function deduplicateName(baseName, usedNames, options) {
3869
3845
  if (baseName === "") throw new Error("baseName must not be empty");
3870
3846
  if (options.separator === "") throw new Error("separator must not be empty");
3871
3847
  if (options.startCounter < 1) throw new Error("startCounter must be >= 1");
3848
+ if (options.maxCounter !== void 0 && options.maxCounter < options.startCounter) throw new Error("maxCounter must be >= startCounter");
3872
3849
  if (!usedNames.has(baseName)) {
3873
3850
  usedNames.add(baseName);
3874
3851
  return baseName;
@@ -3884,7 +3861,6 @@ function deduplicateName(baseName, usedNames, options) {
3884
3861
  usedNames.add(candidate);
3885
3862
  return candidate;
3886
3863
  }
3887
-
3888
3864
  //#endregion
3889
3865
  //#region src/core/application/customization/captureCustomization.ts
3890
3866
  const UNSAFE_FILE_CHARS = /[<>:"|?*\u0000-\u001f]/g;
@@ -3999,13 +3975,11 @@ async function captureCustomization({ container, input }) {
3999
3975
  fileResourceCount: desktopPlan.fileCount + mobilePlan.fileCount
4000
3976
  };
4001
3977
  }
4002
-
4003
3978
  //#endregion
4004
3979
  //#region src/core/application/customization/saveCustomization.ts
4005
3980
  async function saveCustomization({ container, input }) {
4006
3981
  await container.customizationStorage.update(input.configText);
4007
3982
  }
4008
-
4009
3983
  //#endregion
4010
3984
  //#region src/cli/commands/customize/capture.ts
4011
3985
  function deriveFilePrefix(customizeFilePath) {
@@ -4063,7 +4037,6 @@ var capture_default$10 = define({
4063
4037
  }
4064
4038
  }
4065
4039
  });
4066
-
4067
4040
  //#endregion
4068
4041
  //#region src/cli/commands/customize/apply.ts
4069
4042
  async function applyCustomizationForApp(config) {
@@ -4099,12 +4072,13 @@ var apply_default$9 = define({
4099
4072
  },
4100
4073
  multiApp: async (plan, projectConfig) => {
4101
4074
  const containers = [];
4102
- await runMultiAppWithFailCheck(plan, async (app) => {
4103
- const config = resolveCustomizeAppConfig(app, projectConfig, values);
4104
- printAppHeader(app.name, app.appId);
4105
- const container = await applyCustomizationForApp(config);
4106
- containers.push(container);
4107
- }, void 0);
4075
+ await runMultiAppWithHeaders(plan, async (app) => {
4076
+ const container = await applyCustomizationForApp(resolveCustomizeAppConfig(app, projectConfig, values));
4077
+ containers.push({
4078
+ appDeployer: container.appDeployer,
4079
+ appName: app.name
4080
+ });
4081
+ });
4108
4082
  await confirmAndDeploy(containers, skipConfirm, "Customization applied and deployed successfully.");
4109
4083
  }
4110
4084
  });
@@ -4113,7 +4087,6 @@ var apply_default$9 = define({
4113
4087
  }
4114
4088
  }
4115
4089
  });
4116
-
4117
4090
  //#endregion
4118
4091
  //#region src/core/domain/customization/services/diffDetector.ts
4119
4092
  function resourceName(resource) {
@@ -4170,7 +4143,7 @@ function comparePlatform(localJs, localCss, remote, platform, warnings) {
4170
4143
  const CustomizationDiffDetector = { detect: (local, remote) => {
4171
4144
  const entries = [];
4172
4145
  const warnings = [];
4173
- const localScope = local.scope ?? DEFAULT_CUSTOMIZATION_SCOPE;
4146
+ const localScope = local.scope ?? "ALL";
4174
4147
  if (localScope !== remote.scope) entries.push({
4175
4148
  type: "modified",
4176
4149
  platform: "config",
@@ -4182,7 +4155,6 @@ const CustomizationDiffDetector = { detect: (local, remote) => {
4182
4155
  entries.push(...comparePlatform(local.mobile.js, local.mobile.css, remote.mobile, "mobile", warnings));
4183
4156
  return buildDiffResult(entries, warnings);
4184
4157
  } };
4185
-
4186
4158
  //#endregion
4187
4159
  //#region src/core/application/customization/detectCustomizationDiff.ts
4188
4160
  async function detectCustomizationDiff({ container }) {
@@ -4194,21 +4166,6 @@ async function detectCustomizationDiff({ container }) {
4194
4166
  notFoundMessage: "Customization config file not found"
4195
4167
  });
4196
4168
  }
4197
-
4198
- //#endregion
4199
- //#region src/cli/commands/customize/diff.ts
4200
- var diff_default$9 = createDiffCommand({
4201
- description: "Compare local customization config with remote kintone app",
4202
- args: customizeArgs,
4203
- spinnerMessage: "Comparing customization settings...",
4204
- multiAppSuccessMessage: "All customization diffs completed successfully.",
4205
- createContainer: createCustomizationCliContainer,
4206
- detectDiff: detectCustomizationDiff,
4207
- printResult: printCustomizationDiffResult,
4208
- resolveContainerConfig: resolveCustomizeConfig,
4209
- resolveAppContainerConfig: resolveCustomizeAppConfig
4210
- });
4211
-
4212
4169
  //#endregion
4213
4170
  //#region src/cli/commands/customize/index.ts
4214
4171
  var customize_default = define({
@@ -4217,11 +4174,20 @@ var customize_default = define({
4217
4174
  subCommands: {
4218
4175
  apply: apply_default$9,
4219
4176
  capture: capture_default$10,
4220
- diff: diff_default$9
4177
+ diff: createDiffCommand({
4178
+ description: "Compare local customization config with remote kintone app",
4179
+ args: customizeArgs,
4180
+ spinnerMessage: "Comparing customization settings...",
4181
+ multiAppSuccessMessage: "All customization diffs completed successfully.",
4182
+ createContainer: createCustomizationCliContainer,
4183
+ detectDiff: detectCustomizationDiff,
4184
+ printResult: printCustomizationDiffResult,
4185
+ resolveContainerConfig: resolveCustomizeConfig,
4186
+ resolveAppContainerConfig: resolveCustomizeAppConfig
4187
+ })
4221
4188
  },
4222
4189
  run: () => {}
4223
4190
  });
4224
-
4225
4191
  //#endregion
4226
4192
  //#region src/core/adapters/kintone/fieldPermissionConfigurator.ts
4227
4193
  const VALID_ACCESSIBILITIES$1 = new Set([
@@ -4306,13 +4272,11 @@ var KintoneFieldPermissionConfigurator = class {
4306
4272
  }
4307
4273
  }
4308
4274
  };
4309
-
4310
4275
  //#endregion
4311
4276
  //#region src/core/adapters/local/fieldPermissionStorage.ts
4312
4277
  function createLocalFileFieldPermissionStorage(filePath) {
4313
4278
  return createLocalFileStorage(filePath, "field permission file");
4314
4279
  }
4315
-
4316
4280
  //#endregion
4317
4281
  //#region src/core/application/container/fieldPermissionCli.ts
4318
4282
  function createFieldPermissionCliContainer(config) {
@@ -4323,7 +4287,6 @@ function createFieldPermissionCliContainer(config) {
4323
4287
  appDeployer: new KintoneAppDeployer(client, config.appId)
4324
4288
  };
4325
4289
  }
4326
-
4327
4290
  //#endregion
4328
4291
  //#region src/core/domain/fieldPermission/services/configParser.ts
4329
4292
  const VALID_ACCESSIBILITIES = new Set([
@@ -4381,13 +4344,11 @@ const FieldPermissionConfigParser = { parse: (rawText) => {
4381
4344
  }
4382
4345
  return { rights };
4383
4346
  } };
4384
-
4385
4347
  //#endregion
4386
4348
  //#region src/core/application/fieldPermission/parseConfig.ts
4387
4349
  function parseFieldPermissionConfigText(rawText) {
4388
4350
  return wrapBusinessRuleError(() => FieldPermissionConfigParser.parse(rawText));
4389
4351
  }
4390
-
4391
4352
  //#endregion
4392
4353
  //#region src/core/application/fieldPermission/applyFieldPermission.ts
4393
4354
  async function applyFieldPermission({ container }) {
@@ -4404,7 +4365,6 @@ async function applyFieldPermission({ container }) {
4404
4365
  notFoundMessage: "Field permission config file not found"
4405
4366
  });
4406
4367
  }
4407
-
4408
4368
  //#endregion
4409
4369
  //#region src/cli/fieldAclConfig.ts
4410
4370
  const fieldAclArgs = {
@@ -4426,7 +4386,6 @@ const { resolveFilePath: resolveFieldAclFilePath, resolveContainerConfig: resolv
4426
4386
  fieldAclFilePath: filePath
4427
4387
  })
4428
4388
  });
4429
-
4430
4389
  //#endregion
4431
4390
  //#region src/cli/commands/field-acl/apply.ts
4432
4391
  async function runFieldAcl(config) {
@@ -4458,12 +4417,13 @@ var apply_default$8 = define({
4458
4417
  },
4459
4418
  multiApp: async (plan, projectConfig) => {
4460
4419
  const containers = [];
4461
- await runMultiAppWithFailCheck(plan, async (app) => {
4462
- const config = resolveFieldAclAppContainerConfig(app, projectConfig, values);
4463
- printAppHeader(app.name, app.appId);
4464
- const container = await runFieldAcl(config);
4465
- containers.push(container);
4466
- }, void 0);
4420
+ await runMultiAppWithHeaders(plan, async (app) => {
4421
+ const container = await runFieldAcl(resolveFieldAclAppContainerConfig(app, projectConfig, values));
4422
+ containers.push({
4423
+ appDeployer: container.appDeployer,
4424
+ appName: app.name
4425
+ });
4426
+ });
4467
4427
  await confirmAndDeploy(containers, skipConfirm);
4468
4428
  }
4469
4429
  });
@@ -4472,7 +4432,6 @@ var apply_default$8 = define({
4472
4432
  }
4473
4433
  }
4474
4434
  });
4475
-
4476
4435
  //#endregion
4477
4436
  //#region src/core/domain/fieldPermission/services/configSerializer.ts
4478
4437
  function serializeFieldRightEntity(entity) {
@@ -4492,7 +4451,6 @@ const FieldPermissionConfigSerializer = { serialize: (config) => {
4492
4451
  entities: right.entities.map(serializeFieldRightEntity)
4493
4452
  })) });
4494
4453
  } };
4495
-
4496
4454
  //#endregion
4497
4455
  //#region src/core/application/fieldPermission/captureFieldPermission.ts
4498
4456
  async function captureFieldPermission({ container }) {
@@ -4502,13 +4460,11 @@ async function captureFieldPermission({ container }) {
4502
4460
  getStorage: () => container.fieldPermissionStorage.get()
4503
4461
  });
4504
4462
  }
4505
-
4506
4463
  //#endregion
4507
4464
  //#region src/core/application/fieldPermission/saveFieldPermission.ts
4508
4465
  async function saveFieldPermission({ container, input }) {
4509
4466
  await container.fieldPermissionStorage.update(input.configText);
4510
4467
  }
4511
-
4512
4468
  //#endregion
4513
4469
  //#region src/cli/commands/field-acl/capture.ts
4514
4470
  async function runCaptureFieldAcl(config) {
@@ -4551,7 +4507,6 @@ var capture_default$9 = define({
4551
4507
  }
4552
4508
  }
4553
4509
  });
4554
-
4555
4510
  //#endregion
4556
4511
  //#region src/core/domain/fieldPermission/services/diffDetector.ts
4557
4512
  function isEntitiesEqual$1(a, b) {
@@ -4591,7 +4546,6 @@ const FieldPermissionDiffDetector = { detect: (local, remote) => {
4591
4546
  });
4592
4547
  return buildDiffResult(entries);
4593
4548
  } };
4594
-
4595
4549
  //#endregion
4596
4550
  //#region src/core/application/fieldPermission/detectFieldPermissionDiff.ts
4597
4551
  async function detectFieldPermissionDiff({ container }) {
@@ -4603,21 +4557,6 @@ async function detectFieldPermissionDiff({ container }) {
4603
4557
  notFoundMessage: "Field permission config file not found"
4604
4558
  });
4605
4559
  }
4606
-
4607
- //#endregion
4608
- //#region src/cli/commands/field-acl/diff.ts
4609
- var diff_default$8 = createDiffCommand({
4610
- description: "Compare local field permission config with remote kintone app",
4611
- args: fieldAclArgs,
4612
- spinnerMessage: "Comparing field permissions...",
4613
- multiAppSuccessMessage: "All field permission diffs completed successfully.",
4614
- createContainer: createFieldPermissionCliContainer,
4615
- detectDiff: detectFieldPermissionDiff,
4616
- printResult: printFieldPermissionDiffResult,
4617
- resolveContainerConfig: resolveFieldAclContainerConfig,
4618
- resolveAppContainerConfig: resolveFieldAclAppContainerConfig
4619
- });
4620
-
4621
4560
  //#endregion
4622
4561
  //#region src/cli/commands/field-acl/index.ts
4623
4562
  var field_acl_default = define({
@@ -4626,11 +4565,20 @@ var field_acl_default = define({
4626
4565
  subCommands: {
4627
4566
  apply: apply_default$8,
4628
4567
  capture: capture_default$9,
4629
- diff: diff_default$8
4568
+ diff: createDiffCommand({
4569
+ description: "Compare local field permission config with remote kintone app",
4570
+ args: fieldAclArgs,
4571
+ spinnerMessage: "Comparing field permissions...",
4572
+ multiAppSuccessMessage: "All field permission diffs completed successfully.",
4573
+ createContainer: createFieldPermissionCliContainer,
4574
+ detectDiff: detectFieldPermissionDiff,
4575
+ printResult: printFieldPermissionDiffResult,
4576
+ resolveContainerConfig: resolveFieldAclContainerConfig,
4577
+ resolveAppContainerConfig: resolveFieldAclAppContainerConfig
4578
+ })
4630
4579
  },
4631
4580
  run: () => {}
4632
4581
  });
4633
-
4634
4582
  //#endregion
4635
4583
  //#region src/core/adapters/kintone/parseKintoneIntegerField.ts
4636
4584
  function parseKintoneIntegerField(raw, fieldName) {
@@ -4638,7 +4586,6 @@ function parseKintoneIntegerField(raw, fieldName) {
4638
4586
  if (!Number.isFinite(n) || !Number.isInteger(n)) throw new SystemError(SystemErrorCode.ExternalApiError, `Unexpected non-integer ${fieldName} from kintone API: ${raw}`);
4639
4587
  return n;
4640
4588
  }
4641
-
4642
4589
  //#endregion
4643
4590
  //#region src/core/adapters/kintone/generalSettingsConfigurator.ts
4644
4591
  const VALID_THEMES$1 = new Set([
@@ -4771,13 +4718,11 @@ var KintoneGeneralSettingsConfigurator = class {
4771
4718
  }
4772
4719
  }
4773
4720
  };
4774
-
4775
4721
  //#endregion
4776
4722
  //#region src/core/adapters/local/generalSettingsStorage.ts
4777
4723
  function createLocalFileGeneralSettingsStorage(filePath) {
4778
4724
  return createLocalFileStorage(filePath, "general settings file");
4779
4725
  }
4780
-
4781
4726
  //#endregion
4782
4727
  //#region src/core/application/container/generalSettingsCli.ts
4783
4728
  function createGeneralSettingsCliContainer(config) {
@@ -4788,20 +4733,15 @@ function createGeneralSettingsCliContainer(config) {
4788
4733
  appDeployer: new KintoneAppDeployer(client, config.appId)
4789
4734
  };
4790
4735
  }
4791
-
4792
- //#endregion
4793
- //#region src/core/domain/notification/valueObject.ts
4794
- const ENTITY_TYPES = [
4736
+ const VALID_ENTITY_TYPES$4 = new Set([
4795
4737
  "USER",
4796
4738
  "GROUP",
4797
4739
  "ORGANIZATION",
4798
4740
  "FIELD_ENTITY"
4799
- ];
4800
- const VALID_ENTITY_TYPES$4 = new Set(ENTITY_TYPES);
4741
+ ]);
4801
4742
  function isNotificationEntityType(value) {
4802
4743
  return VALID_ENTITY_TYPES$4.has(value);
4803
4744
  }
4804
-
4805
4745
  //#endregion
4806
4746
  //#region src/core/adapters/kintone/notificationConfigurator.ts
4807
4747
  function fromKintoneEntity$2(raw) {
@@ -4998,13 +4938,11 @@ var KintoneNotificationConfigurator = class {
4998
4938
  }
4999
4939
  }
5000
4940
  };
5001
-
5002
4941
  //#endregion
5003
4942
  //#region src/core/adapters/local/notificationStorage.ts
5004
4943
  function createLocalFileNotificationStorage(filePath) {
5005
4944
  return createLocalFileStorage(filePath, "notification file");
5006
4945
  }
5007
-
5008
4946
  //#endregion
5009
4947
  //#region src/core/application/container/notificationCli.ts
5010
4948
  function createNotificationCliContainer(config) {
@@ -5015,7 +4953,6 @@ function createNotificationCliContainer(config) {
5015
4953
  appDeployer: new KintoneAppDeployer(client, config.appId)
5016
4954
  };
5017
4955
  }
5018
-
5019
4956
  //#endregion
5020
4957
  //#region src/core/adapters/kintone/pluginConfigurator.ts
5021
4958
  var KintonePluginConfigurator = class {
@@ -5053,13 +4990,11 @@ var KintonePluginConfigurator = class {
5053
4990
  }
5054
4991
  }
5055
4992
  };
5056
-
5057
4993
  //#endregion
5058
4994
  //#region src/core/adapters/local/pluginStorage.ts
5059
4995
  function createLocalFilePluginStorage(filePath) {
5060
4996
  return createLocalFileStorage(filePath, "plugin file");
5061
4997
  }
5062
-
5063
4998
  //#endregion
5064
4999
  //#region src/core/application/container/pluginCli.ts
5065
5000
  function createPluginCliContainer(config) {
@@ -5070,7 +5005,6 @@ function createPluginCliContainer(config) {
5070
5005
  appDeployer: new KintoneAppDeployer(client, config.appId)
5071
5006
  };
5072
5007
  }
5073
-
5074
5008
  //#endregion
5075
5009
  //#region src/core/adapters/kintone/processManagementConfigurator.ts
5076
5010
  const VALID_ASSIGNEE_TYPES$1 = new Set([
@@ -5202,13 +5136,11 @@ var KintoneProcessManagementConfigurator = class {
5202
5136
  }
5203
5137
  }
5204
5138
  };
5205
-
5206
5139
  //#endregion
5207
5140
  //#region src/core/adapters/local/processManagementStorage.ts
5208
5141
  function createLocalFileProcessManagementStorage(filePath) {
5209
5142
  return createLocalFileStorage(filePath, "process management file");
5210
5143
  }
5211
-
5212
5144
  //#endregion
5213
5145
  //#region src/core/application/container/processManagementCli.ts
5214
5146
  function createProcessManagementCliContainer(config) {
@@ -5219,7 +5151,6 @@ function createProcessManagementCliContainer(config) {
5219
5151
  appDeployer: new KintoneAppDeployer(client, config.appId)
5220
5152
  };
5221
5153
  }
5222
-
5223
5154
  //#endregion
5224
5155
  //#region src/core/adapters/kintone/recordPermissionConfigurator.ts
5225
5156
  const VALID_ENTITY_TYPES$2 = new Set([
@@ -5297,13 +5228,11 @@ var KintoneRecordPermissionConfigurator = class {
5297
5228
  }
5298
5229
  }
5299
5230
  };
5300
-
5301
5231
  //#endregion
5302
5232
  //#region src/core/adapters/local/recordPermissionStorage.ts
5303
5233
  function createLocalFileRecordPermissionStorage(filePath) {
5304
5234
  return createLocalFileStorage(filePath, "record permission file");
5305
5235
  }
5306
-
5307
5236
  //#endregion
5308
5237
  //#region src/core/application/container/recordPermissionCli.ts
5309
5238
  function createRecordPermissionCliContainer(config) {
@@ -5314,10 +5243,7 @@ function createRecordPermissionCliContainer(config) {
5314
5243
  appDeployer: new KintoneAppDeployer(client, config.appId)
5315
5244
  };
5316
5245
  }
5317
-
5318
- //#endregion
5319
- //#region src/core/domain/report/valueObject.ts
5320
- const CHART_TYPES = [
5246
+ const VALID_CHART_TYPES = new Set([
5321
5247
  "BAR",
5322
5248
  "COLUMN",
5323
5249
  "PIE",
@@ -5327,21 +5253,19 @@ const CHART_TYPES = [
5327
5253
  "AREA",
5328
5254
  "SPLINE",
5329
5255
  "SPLINE_AREA"
5330
- ];
5331
- const VALID_CHART_TYPES = new Set(CHART_TYPES);
5256
+ ]);
5332
5257
  function isChartType(value) {
5333
5258
  return VALID_CHART_TYPES.has(value);
5334
5259
  }
5335
- const CHART_MODES = [
5260
+ const VALID_CHART_MODES = new Set([
5336
5261
  "NORMAL",
5337
5262
  "STACKED",
5338
5263
  "PERCENTAGE"
5339
- ];
5340
- const VALID_CHART_MODES = new Set(CHART_MODES);
5264
+ ]);
5341
5265
  function isChartMode(value) {
5342
5266
  return VALID_CHART_MODES.has(value);
5343
5267
  }
5344
- const GROUP_PERS = [
5268
+ const VALID_GROUP_PERS = new Set([
5345
5269
  "YEAR",
5346
5270
  "QUARTER",
5347
5271
  "MONTH",
@@ -5349,59 +5273,53 @@ const GROUP_PERS = [
5349
5273
  "DAY",
5350
5274
  "HOUR",
5351
5275
  "MINUTE"
5352
- ];
5353
- const VALID_GROUP_PERS = new Set(GROUP_PERS);
5276
+ ]);
5354
5277
  function isGroupPer(value) {
5355
5278
  return VALID_GROUP_PERS.has(value);
5356
5279
  }
5357
- const AGGREGATION_TYPES = [
5280
+ const VALID_AGGREGATION_TYPES = new Set([
5358
5281
  "COUNT",
5359
5282
  "SUM",
5360
5283
  "AVERAGE",
5361
5284
  "MAX",
5362
5285
  "MIN"
5363
- ];
5364
- const VALID_AGGREGATION_TYPES = new Set(AGGREGATION_TYPES);
5286
+ ]);
5365
5287
  function isAggregationType(value) {
5366
5288
  return VALID_AGGREGATION_TYPES.has(value);
5367
5289
  }
5368
- const SORT_BYS = [
5290
+ const VALID_SORT_BYS = new Set([
5369
5291
  "TOTAL",
5370
5292
  "GROUP1",
5371
5293
  "GROUP2",
5372
5294
  "GROUP3"
5373
- ];
5374
- const VALID_SORT_BYS = new Set(SORT_BYS);
5295
+ ]);
5375
5296
  function isSortBy(value) {
5376
5297
  return VALID_SORT_BYS.has(value);
5377
5298
  }
5378
- const SORT_ORDERS = ["ASC", "DESC"];
5379
- const VALID_SORT_ORDERS = new Set(SORT_ORDERS);
5299
+ const VALID_SORT_ORDERS = new Set(["ASC", "DESC"]);
5380
5300
  function isSortOrder(value) {
5381
5301
  return VALID_SORT_ORDERS.has(value);
5382
5302
  }
5383
- const PERIODIC_REPORT_EVERYS = [
5303
+ const VALID_PERIODIC_REPORT_EVERYS = new Set([
5384
5304
  "YEAR",
5385
5305
  "QUARTER",
5386
5306
  "MONTH",
5387
5307
  "WEEK",
5388
5308
  "DAY",
5389
5309
  "HOUR"
5390
- ];
5391
- const VALID_PERIODIC_REPORT_EVERYS = new Set(PERIODIC_REPORT_EVERYS);
5310
+ ]);
5392
5311
  function isPeriodicReportEvery(value) {
5393
5312
  return VALID_PERIODIC_REPORT_EVERYS.has(value);
5394
5313
  }
5395
- const PERIODIC_REPORT_PATTERNS = [
5314
+ const VALID_PERIODIC_REPORT_PATTERNS = new Set([
5396
5315
  "JAN_APR_JUL_OCT",
5397
5316
  "FEB_MAY_AUG_NOV",
5398
5317
  "MAR_JUN_SEP_DEC"
5399
- ];
5400
- const VALID_PERIODIC_REPORT_PATTERNS = new Set(PERIODIC_REPORT_PATTERNS);
5318
+ ]);
5401
5319
  function isPeriodicReportPattern(value) {
5402
5320
  return VALID_PERIODIC_REPORT_PATTERNS.has(value);
5403
5321
  }
5404
- const DAYS_OF_WEEK = [
5322
+ const VALID_DAYS_OF_WEEK = new Set([
5405
5323
  "SUNDAY",
5406
5324
  "MONDAY",
5407
5325
  "TUESDAY",
@@ -5409,12 +5327,10 @@ const DAYS_OF_WEEK = [
5409
5327
  "THURSDAY",
5410
5328
  "FRIDAY",
5411
5329
  "SATURDAY"
5412
- ];
5413
- const VALID_DAYS_OF_WEEK = new Set(DAYS_OF_WEEK);
5330
+ ]);
5414
5331
  function isDayOfWeek(value) {
5415
5332
  return VALID_DAYS_OF_WEEK.has(value);
5416
5333
  }
5417
-
5418
5334
  //#endregion
5419
5335
  //#region src/core/adapters/kintone/reportConfigurator.ts
5420
5336
  function fromKintoneGroup(raw) {
@@ -5584,13 +5500,11 @@ var KintoneReportConfigurator = class {
5584
5500
  }
5585
5501
  }
5586
5502
  };
5587
-
5588
5503
  //#endregion
5589
5504
  //#region src/core/adapters/local/reportStorage.ts
5590
5505
  function createLocalFileReportStorage(filePath) {
5591
5506
  return createLocalFileStorage(filePath, "report file");
5592
5507
  }
5593
-
5594
5508
  //#endregion
5595
5509
  //#region src/core/application/container/reportCli.ts
5596
5510
  function createReportCliContainer(config) {
@@ -5601,24 +5515,18 @@ function createReportCliContainer(config) {
5601
5515
  appDeployer: new KintoneAppDeployer(client, config.appId)
5602
5516
  };
5603
5517
  }
5604
-
5605
- //#endregion
5606
- //#region src/core/domain/view/valueObject.ts
5607
- const VIEW_TYPES = [
5518
+ const VALID_VIEW_TYPES = new Set([
5608
5519
  "LIST",
5609
5520
  "CALENDAR",
5610
5521
  "CUSTOM"
5611
- ];
5612
- const VALID_VIEW_TYPES = new Set(VIEW_TYPES);
5522
+ ]);
5613
5523
  function isViewType(value) {
5614
5524
  return VALID_VIEW_TYPES.has(value);
5615
5525
  }
5616
- const DEVICE_TYPES = ["DESKTOP", "ANY"];
5617
- const VALID_DEVICE_TYPES = new Set(DEVICE_TYPES);
5526
+ const VALID_DEVICE_TYPES = new Set(["DESKTOP", "ANY"]);
5618
5527
  function isDeviceType(value) {
5619
5528
  return VALID_DEVICE_TYPES.has(value);
5620
5529
  }
5621
-
5622
5530
  //#endregion
5623
5531
  //#region src/core/adapters/kintone/viewConfigurator.ts
5624
5532
  function fromKintoneView(name, raw) {
@@ -5698,13 +5606,11 @@ var KintoneViewConfigurator = class {
5698
5606
  }
5699
5607
  }
5700
5608
  };
5701
-
5702
5609
  //#endregion
5703
5610
  //#region src/core/adapters/local/viewStorage.ts
5704
5611
  function createLocalFileViewStorage(filePath) {
5705
5612
  return createLocalFileStorage(filePath, "view file");
5706
5613
  }
5707
-
5708
5614
  //#endregion
5709
5615
  //#region src/core/application/container/viewCli.ts
5710
5616
  function createViewCliContainer(config) {
@@ -5715,7 +5621,6 @@ function createViewCliContainer(config) {
5715
5621
  appDeployer: new KintoneAppDeployer(client, config.appId)
5716
5622
  };
5717
5623
  }
5718
-
5719
5624
  //#endregion
5720
5625
  //#region src/core/application/container/captureAllCli.ts
5721
5626
  function createCliCaptureContainers(input) {
@@ -5790,7 +5695,6 @@ function createCliCaptureContainers(input) {
5790
5695
  }
5791
5696
  };
5792
5697
  }
5793
-
5794
5698
  //#endregion
5795
5699
  //#region src/core/adapters/kintone/spaceReader.ts
5796
5700
  /**
@@ -5833,13 +5737,11 @@ var KintoneSpaceReader = class {
5833
5737
  }
5834
5738
  }
5835
5739
  };
5836
-
5837
5740
  //#endregion
5838
5741
  //#region src/core/adapters/local/projectConfigStorage.ts
5839
5742
  function createLocalFileProjectConfigStorage(filePath) {
5840
5743
  return createLocalFileStorage(filePath, "project config file");
5841
5744
  }
5842
-
5843
5745
  //#endregion
5844
5746
  //#region src/core/application/container/initCli.ts
5845
5747
  function createInitCliContainer(config) {
@@ -5848,7 +5750,6 @@ function createInitCliContainer(config) {
5848
5750
  projectConfigStorage: createLocalFileProjectConfigStorage(config.configFilePath)
5849
5751
  };
5850
5752
  }
5851
-
5852
5753
  //#endregion
5853
5754
  //#region src/core/domain/formSchema/services/layoutEnricher.ts
5854
5755
  function enrichLayoutElement(element, fields) {
@@ -5908,7 +5809,6 @@ function collectSubtableInnerFieldCodes(fields) {
5908
5809
  for (const def of fields.values()) if (def.type === "SUBTABLE") for (const subCode of def.properties.fields.keys()) innerCodes.add(subCode);
5909
5810
  return innerCodes;
5910
5811
  }
5911
-
5912
5812
  //#endregion
5913
5813
  //#region src/core/domain/formSchema/services/schemaSerializer.ts
5914
5814
  function serializeSize(size) {
@@ -6010,7 +5910,6 @@ const SchemaSerializer = { serialize: (layout, fields) => {
6010
5910
  defaultStringType: "PLAIN"
6011
5911
  });
6012
5912
  } };
6013
-
6014
5913
  //#endregion
6015
5914
  //#region src/core/application/formSchema/captureSchema.ts
6016
5915
  async function captureSchema({ container }) {
@@ -6021,13 +5920,11 @@ async function captureSchema({ container }) {
6021
5920
  hasExistingSchema: (await container.schemaStorage.get()).exists
6022
5921
  };
6023
5922
  }
6024
-
6025
5923
  //#endregion
6026
5924
  //#region src/core/application/formSchema/saveSchema.ts
6027
5925
  async function saveSchema({ container, input }) {
6028
5926
  await container.schemaStorage.update(input.schemaText);
6029
5927
  }
6030
-
6031
5928
  //#endregion
6032
5929
  //#region src/core/domain/generalSettings/services/configSerializer.ts
6033
5930
  function serializeConfig(config) {
@@ -6060,7 +5957,6 @@ function serializeConfig(config) {
6060
5957
  const GeneralSettingsConfigSerializer = { serialize: (config) => {
6061
5958
  return serializeToYaml(serializeConfig(config));
6062
5959
  } };
6063
-
6064
5960
  //#endregion
6065
5961
  //#region src/core/application/generalSettings/captureGeneralSettings.ts
6066
5962
  async function captureGeneralSettings({ container }) {
@@ -6070,13 +5966,11 @@ async function captureGeneralSettings({ container }) {
6070
5966
  getStorage: () => container.generalSettingsStorage.get()
6071
5967
  });
6072
5968
  }
6073
-
6074
5969
  //#endregion
6075
5970
  //#region src/core/application/generalSettings/saveGeneralSettings.ts
6076
5971
  async function saveGeneralSettings({ container, input }) {
6077
5972
  await container.generalSettingsStorage.update(input.configText);
6078
5973
  }
6079
-
6080
5974
  //#endregion
6081
5975
  //#region src/core/domain/notification/services/configSerializer.ts
6082
5976
  function serializeEntity$1(entity) {
@@ -6134,7 +6028,6 @@ const NotificationConfigSerializer = { serialize: (config) => {
6134
6028
  };
6135
6029
  return serializeToYaml(serialized);
6136
6030
  } };
6137
-
6138
6031
  //#endregion
6139
6032
  //#region src/core/application/notification/captureNotification.ts
6140
6033
  async function captureNotification({ container }) {
@@ -6159,13 +6052,11 @@ async function captureNotification({ container }) {
6159
6052
  hasExistingConfig: (await container.notificationStorage.get()).exists
6160
6053
  };
6161
6054
  }
6162
-
6163
6055
  //#endregion
6164
6056
  //#region src/core/application/notification/saveNotification.ts
6165
6057
  async function saveNotification({ container, input }) {
6166
6058
  await container.notificationStorage.update(input.configText);
6167
6059
  }
6168
-
6169
6060
  //#endregion
6170
6061
  //#region src/core/domain/plugin/services/configSerializer.ts
6171
6062
  const PluginConfigSerializer = { serialize: (config) => {
@@ -6175,7 +6066,6 @@ const PluginConfigSerializer = { serialize: (config) => {
6175
6066
  enabled: plugin.enabled
6176
6067
  })) });
6177
6068
  } };
6178
-
6179
6069
  //#endregion
6180
6070
  //#region src/core/application/plugin/capturePlugin.ts
6181
6071
  async function capturePlugin({ container }) {
@@ -6185,13 +6075,11 @@ async function capturePlugin({ container }) {
6185
6075
  getStorage: () => container.pluginStorage.get()
6186
6076
  });
6187
6077
  }
6188
-
6189
6078
  //#endregion
6190
6079
  //#region src/core/application/plugin/savePlugin.ts
6191
6080
  async function savePlugin({ container, input }) {
6192
6081
  await container.pluginStorage.update(input.configText);
6193
6082
  }
6194
-
6195
6083
  //#endregion
6196
6084
  //#region src/core/domain/processManagement/services/configSerializer.ts
6197
6085
  function serializeProcessEntity(entity) {
@@ -6225,7 +6113,6 @@ const ProcessManagementConfigSerializer = { serialize: (config) => {
6225
6113
  })
6226
6114
  });
6227
6115
  } };
6228
-
6229
6116
  //#endregion
6230
6117
  //#region src/core/application/processManagement/captureProcessManagement.ts
6231
6118
  async function captureProcessManagement({ container }) {
@@ -6235,13 +6122,11 @@ async function captureProcessManagement({ container }) {
6235
6122
  getStorage: () => container.processManagementStorage.get()
6236
6123
  });
6237
6124
  }
6238
-
6239
6125
  //#endregion
6240
6126
  //#region src/core/application/processManagement/saveProcessManagement.ts
6241
6127
  async function saveProcessManagement({ container, input }) {
6242
6128
  await container.processManagementStorage.update(input.configText);
6243
6129
  }
6244
-
6245
6130
  //#endregion
6246
6131
  //#region src/core/domain/recordPermission/services/configSerializer.ts
6247
6132
  function serializeRecordRightEntity(entity) {
@@ -6262,7 +6147,6 @@ const RecordPermissionConfigSerializer = { serialize: (config) => {
6262
6147
  entities: right.entities.map(serializeRecordRightEntity)
6263
6148
  })) });
6264
6149
  } };
6265
-
6266
6150
  //#endregion
6267
6151
  //#region src/core/application/recordPermission/captureRecordPermission.ts
6268
6152
  async function captureRecordPermission({ container }) {
@@ -6272,13 +6156,11 @@ async function captureRecordPermission({ container }) {
6272
6156
  getStorage: () => container.recordPermissionStorage.get()
6273
6157
  });
6274
6158
  }
6275
-
6276
6159
  //#endregion
6277
6160
  //#region src/core/application/recordPermission/saveRecordPermission.ts
6278
6161
  async function saveRecordPermission({ container, input }) {
6279
6162
  await container.recordPermissionStorage.update(input.configText);
6280
6163
  }
6281
-
6282
6164
  //#endregion
6283
6165
  //#region src/core/domain/report/services/configSerializer.ts
6284
6166
  function serializeGroup(group) {
@@ -6333,7 +6215,6 @@ const ReportConfigSerializer = { serialize: (config) => {
6333
6215
  serialized.reports = reports;
6334
6216
  return serializeToYaml(serialized);
6335
6217
  } };
6336
-
6337
6218
  //#endregion
6338
6219
  //#region src/core/application/report/captureReport.ts
6339
6220
  async function captureReport({ container }) {
@@ -6343,13 +6224,11 @@ async function captureReport({ container }) {
6343
6224
  getStorage: () => container.reportStorage.get()
6344
6225
  });
6345
6226
  }
6346
-
6347
6227
  //#endregion
6348
6228
  //#region src/core/application/report/saveReport.ts
6349
6229
  async function saveReport({ container, input }) {
6350
6230
  await container.reportStorage.update(input.configText);
6351
6231
  }
6352
-
6353
6232
  //#endregion
6354
6233
  //#region src/core/domain/seedData/services/seedSerializer.ts
6355
6234
  const SeedSerializer = { serialize: (seedData) => {
@@ -6363,14 +6242,12 @@ const SeedSerializer = { serialize: (seedData) => {
6363
6242
  defaultStringType: "PLAIN"
6364
6243
  });
6365
6244
  } };
6366
-
6367
6245
  //#endregion
6368
6246
  //#region src/core/domain/seedData/valueObject.ts
6369
6247
  const UpsertKey = { create: (key) => {
6370
6248
  if (key.length === 0) throw new BusinessRuleError(SeedDataErrorCode.SdEmptyUpsertKey, "Upsert key cannot be empty");
6371
6249
  return key;
6372
6250
  } };
6373
-
6374
6251
  //#endregion
6375
6252
  //#region src/core/application/seedData/captureSeed.ts
6376
6253
  async function captureSeed({ container, input }) {
@@ -6387,13 +6264,11 @@ async function captureSeed({ container, input }) {
6387
6264
  hasExistingSeed: existing.exists
6388
6265
  };
6389
6266
  }
6390
-
6391
6267
  //#endregion
6392
6268
  //#region src/core/application/seedData/saveSeed.ts
6393
6269
  async function saveSeed({ container, input }) {
6394
6270
  await container.seedStorage.update(input.seedText);
6395
6271
  }
6396
-
6397
6272
  //#endregion
6398
6273
  //#region src/core/domain/view/services/configSerializer.ts
6399
6274
  function serializeViewConfig(config) {
@@ -6417,7 +6292,6 @@ const ViewConfigSerializer = { serialize: (config) => {
6417
6292
  for (const [name, viewConfig] of Object.entries(config.views)) serialized[name] = serializeViewConfig(viewConfig);
6418
6293
  return serializeToYaml({ views: serialized });
6419
6294
  } };
6420
-
6421
6295
  //#endregion
6422
6296
  //#region src/core/application/view/captureView.ts
6423
6297
  async function captureView({ container }) {
@@ -6427,13 +6301,11 @@ async function captureView({ container }) {
6427
6301
  getStorage: () => container.viewStorage.get()
6428
6302
  });
6429
6303
  }
6430
-
6431
6304
  //#endregion
6432
6305
  //#region src/core/application/view/saveView.ts
6433
6306
  async function saveView({ container, input }) {
6434
6307
  await container.viewStorage.update(input.configText);
6435
6308
  }
6436
-
6437
6309
  //#endregion
6438
6310
  //#region src/core/application/init/captureAllForApp.ts
6439
6311
  function buildStandardTask(domain, container, capture, save) {
@@ -6539,8 +6411,6 @@ function isFatalError(error) {
6539
6411
  if (isSystemError(error) && error.code === SystemErrorCode.NetworkError) return true;
6540
6412
  return false;
6541
6413
  }
6542
- /** Number of domains to capture concurrently within each batch. */
6543
- const CAPTURE_BATCH_SIZE = 4;
6544
6414
  /**
6545
6415
  * Capture all domains for a single app, processing tasks in concurrent batches.
6546
6416
  *
@@ -6552,8 +6422,8 @@ const CAPTURE_BATCH_SIZE = 4;
6552
6422
  async function captureAllForApp(args) {
6553
6423
  const tasks = buildCaptureTasks(args);
6554
6424
  const results = [];
6555
- for (let i = 0; i < tasks.length; i += CAPTURE_BATCH_SIZE) {
6556
- const batch = tasks.slice(i, i + CAPTURE_BATCH_SIZE);
6425
+ for (let i = 0; i < tasks.length; i += 4) {
6426
+ const batch = tasks.slice(i, i + 4);
6557
6427
  const settled = await Promise.allSettled(batch.map((task) => task.run()));
6558
6428
  let fatalDomain;
6559
6429
  let fatalReason;
@@ -6575,7 +6445,7 @@ async function captureAllForApp(args) {
6575
6445
  }
6576
6446
  if (fatalDomain !== void 0) {
6577
6447
  const skipError = new SystemError(SystemErrorCode.InternalServerError, `Skipped due to fatal error in "${fatalDomain}"`, fatalReason);
6578
- for (const remaining of tasks.slice(i + CAPTURE_BATCH_SIZE)) results.push({
6448
+ for (const remaining of tasks.slice(i + 4)) results.push({
6579
6449
  domain: remaining.domain,
6580
6450
  success: false,
6581
6451
  error: skipError
@@ -6585,7 +6455,6 @@ async function captureAllForApp(args) {
6585
6455
  }
6586
6456
  return results;
6587
6457
  }
6588
-
6589
6458
  //#endregion
6590
6459
  //#region src/core/application/init/fetchSpaceApps.ts
6591
6460
  async function fetchSpaceApps(args) {
@@ -6593,7 +6462,6 @@ async function fetchSpaceApps(args) {
6593
6462
  if (apps.length === 0) throw new NotFoundError(NotFoundErrorCode.NotFound, `No apps found in space ID: ${args.input.spaceId}`);
6594
6463
  return apps;
6595
6464
  }
6596
-
6597
6465
  //#endregion
6598
6466
  //#region src/core/domain/space/entity.ts
6599
6467
  const UNSAFE_PATH_CHARS = /[<>:"/\\|?*\u0000-\u001f]/g;
@@ -6605,7 +6473,6 @@ function resolveAppName(app) {
6605
6473
  const raw = app.code !== "" ? app.code : app.name !== "" ? app.name : `app-${app.appId}`;
6606
6474
  return AppName.create(sanitizeForFileSystem(raw));
6607
6475
  }
6608
-
6609
6476
  //#endregion
6610
6477
  //#region src/core/application/init/generateProjectConfig.ts
6611
6478
  function deduplicateAppName(baseName, usedNames) {
@@ -6630,7 +6497,6 @@ function generateProjectConfig(input) {
6630
6497
  apps
6631
6498
  }, { lineWidth: 0 });
6632
6499
  }
6633
-
6634
6500
  //#endregion
6635
6501
  //#region src/cli/commands/init.ts
6636
6502
  const initArgs = {
@@ -6676,7 +6542,7 @@ var init_default = define({
6676
6542
  try {
6677
6543
  const values = ctx.values;
6678
6544
  const spaceId = values["space-id"];
6679
- if (!/^\d+$/.test(spaceId)) throw new ValidationError(ValidationErrorCode.InvalidInput, `Invalid space ID: "${spaceId}" (must be a numeric value)`);
6545
+ if (!/^[1-9]\d*$/.test(spaceId)) throw new ValidationError(ValidationErrorCode.InvalidInput, `Invalid space ID: "${spaceId}" (must be a positive integer, e.g. 1, 42, 100)`);
6680
6546
  const kintoneDomain = values.domain ?? process.env.KINTONE_DOMAIN;
6681
6547
  if (!kintoneDomain) throw new ValidationError(ValidationErrorCode.InvalidInput, "Missing required configuration:\n KINTONE_DOMAIN is required");
6682
6548
  const apiToken = values["api-token"] ?? process.env.KINTONE_API_TOKEN;
@@ -6768,7 +6634,6 @@ var init_default = define({
6768
6634
  }
6769
6635
  }
6770
6636
  });
6771
-
6772
6637
  //#endregion
6773
6638
  //#region src/core/domain/notification/services/configParser.ts
6774
6639
  function parseEntity$1(raw, context) {
@@ -6879,13 +6744,11 @@ const NotificationConfigParser = { parse: (rawText) => {
6879
6744
  if (obj.reminder !== void 0) config.reminder = parseReminderConfig(obj.reminder);
6880
6745
  return config;
6881
6746
  } };
6882
-
6883
6747
  //#endregion
6884
6748
  //#region src/core/application/notification/parseConfig.ts
6885
6749
  function parseNotificationConfigText(rawText) {
6886
6750
  return wrapBusinessRuleError(() => NotificationConfigParser.parse(rawText));
6887
6751
  }
6888
-
6889
6752
  //#endregion
6890
6753
  //#region src/core/application/notification/applyNotification.ts
6891
6754
  /**
@@ -6925,7 +6788,6 @@ async function applyNotification({ container }) {
6925
6788
  });
6926
6789
  }
6927
6790
  }
6928
-
6929
6791
  //#endregion
6930
6792
  //#region src/cli/notificationConfig.ts
6931
6793
  const notificationArgs = {
@@ -6947,7 +6809,6 @@ const { resolveFilePath: resolveNotificationFilePath, resolveContainerConfig: re
6947
6809
  notificationFilePath: filePath
6948
6810
  })
6949
6811
  });
6950
-
6951
6812
  //#endregion
6952
6813
  //#region src/cli/commands/notification/apply.ts
6953
6814
  async function runNotification(config) {
@@ -6979,12 +6840,13 @@ var apply_default$7 = define({
6979
6840
  },
6980
6841
  multiApp: async (plan, projectConfig) => {
6981
6842
  const containers = [];
6982
- await runMultiAppWithFailCheck(plan, async (app) => {
6983
- const config = resolveNotificationAppContainerConfig(app, projectConfig, values);
6984
- printAppHeader(app.name, app.appId);
6985
- const container = await runNotification(config);
6986
- containers.push(container);
6987
- }, void 0);
6843
+ await runMultiAppWithHeaders(plan, async (app) => {
6844
+ const container = await runNotification(resolveNotificationAppContainerConfig(app, projectConfig, values));
6845
+ containers.push({
6846
+ appDeployer: container.appDeployer,
6847
+ appName: app.name
6848
+ });
6849
+ });
6988
6850
  await confirmAndDeploy(containers, skipConfirm);
6989
6851
  }
6990
6852
  });
@@ -6993,7 +6855,6 @@ var apply_default$7 = define({
6993
6855
  }
6994
6856
  }
6995
6857
  });
6996
-
6997
6858
  //#endregion
6998
6859
  //#region src/cli/commands/notification/capture.ts
6999
6860
  async function runCaptureNotification(config) {
@@ -7036,7 +6897,6 @@ var capture_default$8 = define({
7036
6897
  }
7037
6898
  }
7038
6899
  });
7039
-
7040
6900
  //#endregion
7041
6901
  //#region src/lib/groupByKey.ts
7042
6902
  /**
@@ -7053,7 +6913,6 @@ function groupByKey(items, keyFn) {
7053
6913
  }
7054
6914
  return map;
7055
6915
  }
7056
-
7057
6916
  //#endregion
7058
6917
  //#region src/core/domain/notification/services/diffDetector.ts
7059
6918
  function serializeEntity(entity) {
@@ -7243,7 +7102,6 @@ const NotificationDiffDetector = { detect: (local, remote) => {
7243
7102
  });
7244
7103
  return buildDiffResult(entries);
7245
7104
  } };
7246
-
7247
7105
  //#endregion
7248
7106
  //#region src/core/application/notification/detectNotificationDiff.ts
7249
7107
  async function detectNotificationDiff({ container }) {
@@ -7268,21 +7126,6 @@ async function detectNotificationDiff({ container }) {
7268
7126
  };
7269
7127
  return NotificationDiffDetector.detect(localConfig, remoteConfig);
7270
7128
  }
7271
-
7272
- //#endregion
7273
- //#region src/cli/commands/notification/diff.ts
7274
- var diff_default$7 = createDiffCommand({
7275
- description: "Compare local notification config with remote kintone app",
7276
- args: notificationArgs,
7277
- spinnerMessage: "Comparing notification settings...",
7278
- multiAppSuccessMessage: "All notification diffs completed successfully.",
7279
- createContainer: createNotificationCliContainer,
7280
- detectDiff: detectNotificationDiff,
7281
- printResult: printNotificationDiffResult,
7282
- resolveContainerConfig: resolveNotificationContainerConfig,
7283
- resolveAppContainerConfig: resolveNotificationAppContainerConfig
7284
- });
7285
-
7286
7129
  //#endregion
7287
7130
  //#region src/cli/commands/notification/index.ts
7288
7131
  var notification_default = define({
@@ -7291,11 +7134,20 @@ var notification_default = define({
7291
7134
  subCommands: {
7292
7135
  apply: apply_default$7,
7293
7136
  capture: capture_default$8,
7294
- diff: diff_default$7
7137
+ diff: createDiffCommand({
7138
+ description: "Compare local notification config with remote kintone app",
7139
+ args: notificationArgs,
7140
+ spinnerMessage: "Comparing notification settings...",
7141
+ multiAppSuccessMessage: "All notification diffs completed successfully.",
7142
+ createContainer: createNotificationCliContainer,
7143
+ detectDiff: detectNotificationDiff,
7144
+ printResult: printNotificationDiffResult,
7145
+ resolveContainerConfig: resolveNotificationContainerConfig,
7146
+ resolveAppContainerConfig: resolveNotificationAppContainerConfig
7147
+ })
7295
7148
  },
7296
7149
  run: () => {}
7297
7150
  });
7298
-
7299
7151
  //#endregion
7300
7152
  //#region src/core/domain/plugin/services/configParser.ts
7301
7153
  function parsePluginEntry(raw, index) {
@@ -7323,13 +7175,11 @@ const PluginConfigParser = { parse: (rawText) => {
7323
7175
  }
7324
7176
  return { plugins };
7325
7177
  } };
7326
-
7327
7178
  //#endregion
7328
7179
  //#region src/core/application/plugin/parseConfig.ts
7329
7180
  function parsePluginConfigText(rawText) {
7330
7181
  return wrapBusinessRuleError(() => PluginConfigParser.parse(rawText));
7331
7182
  }
7332
-
7333
7183
  //#endregion
7334
7184
  //#region src/core/application/plugin/applyPlugin.ts
7335
7185
  async function applyPlugin({ container }) {
@@ -7344,7 +7194,6 @@ async function applyPlugin({ container }) {
7344
7194
  revision: current.revision
7345
7195
  });
7346
7196
  }
7347
-
7348
7197
  //#endregion
7349
7198
  //#region src/cli/pluginConfig.ts
7350
7199
  const pluginArgs = {
@@ -7366,7 +7215,6 @@ const { resolveFilePath: resolvePluginFilePath, resolveContainerConfig: resolveP
7366
7215
  pluginFilePath: filePath
7367
7216
  })
7368
7217
  });
7369
-
7370
7218
  //#endregion
7371
7219
  //#region src/cli/commands/plugin/apply.ts
7372
7220
  async function runPlugin(config) {
@@ -7398,12 +7246,13 @@ var apply_default$6 = define({
7398
7246
  },
7399
7247
  multiApp: async (plan, projectConfig) => {
7400
7248
  const containers = [];
7401
- await runMultiAppWithFailCheck(plan, async (app) => {
7402
- const config = resolvePluginAppContainerConfig(app, projectConfig, values);
7403
- printAppHeader(app.name, app.appId);
7404
- const container = await runPlugin(config);
7405
- containers.push(container);
7406
- }, void 0);
7249
+ await runMultiAppWithHeaders(plan, async (app) => {
7250
+ const container = await runPlugin(resolvePluginAppContainerConfig(app, projectConfig, values));
7251
+ containers.push({
7252
+ appDeployer: container.appDeployer,
7253
+ appName: app.name
7254
+ });
7255
+ });
7407
7256
  await confirmAndDeploy(containers, skipConfirm);
7408
7257
  }
7409
7258
  });
@@ -7412,7 +7261,6 @@ var apply_default$6 = define({
7412
7261
  }
7413
7262
  }
7414
7263
  });
7415
-
7416
7264
  //#endregion
7417
7265
  //#region src/cli/commands/plugin/capture.ts
7418
7266
  async function runCapturePlugin(config) {
@@ -7455,7 +7303,6 @@ var capture_default$7 = define({
7455
7303
  }
7456
7304
  }
7457
7305
  });
7458
-
7459
7306
  //#endregion
7460
7307
  //#region src/core/domain/plugin/services/diffDetector.ts
7461
7308
  const PluginDiffDetector = { detect: (local, remote) => {
@@ -7487,7 +7334,6 @@ const PluginDiffDetector = { detect: (local, remote) => {
7487
7334
  });
7488
7335
  return buildDiffResult(entries);
7489
7336
  } };
7490
-
7491
7337
  //#endregion
7492
7338
  //#region src/core/application/plugin/detectPluginDiff.ts
7493
7339
  async function detectPluginDiff({ container }) {
@@ -7499,21 +7345,6 @@ async function detectPluginDiff({ container }) {
7499
7345
  notFoundMessage: "Plugin config file not found"
7500
7346
  });
7501
7347
  }
7502
-
7503
- //#endregion
7504
- //#region src/cli/commands/plugin/diff.ts
7505
- var diff_default$6 = createDiffCommand({
7506
- description: "Compare local plugin config with remote kintone app",
7507
- args: pluginArgs,
7508
- spinnerMessage: "Comparing plugin settings...",
7509
- multiAppSuccessMessage: "All plugin diffs completed successfully.",
7510
- createContainer: createPluginCliContainer,
7511
- detectDiff: detectPluginDiff,
7512
- printResult: printPluginDiffResult,
7513
- resolveContainerConfig: resolvePluginContainerConfig,
7514
- resolveAppContainerConfig: resolvePluginAppContainerConfig
7515
- });
7516
-
7517
7348
  //#endregion
7518
7349
  //#region src/cli/commands/plugin/index.ts
7519
7350
  var plugin_default = define({
@@ -7522,11 +7353,20 @@ var plugin_default = define({
7522
7353
  subCommands: {
7523
7354
  apply: apply_default$6,
7524
7355
  capture: capture_default$7,
7525
- diff: diff_default$6
7356
+ diff: createDiffCommand({
7357
+ description: "Compare local plugin config with remote kintone app",
7358
+ args: pluginArgs,
7359
+ spinnerMessage: "Comparing plugin settings...",
7360
+ multiAppSuccessMessage: "All plugin diffs completed successfully.",
7361
+ createContainer: createPluginCliContainer,
7362
+ detectDiff: detectPluginDiff,
7363
+ printResult: printPluginDiffResult,
7364
+ resolveContainerConfig: resolvePluginContainerConfig,
7365
+ resolveAppContainerConfig: resolvePluginAppContainerConfig
7366
+ })
7526
7367
  },
7527
7368
  run: () => {}
7528
7369
  });
7529
-
7530
7370
  //#endregion
7531
7371
  //#region src/core/domain/processManagement/services/configParser.ts
7532
7372
  const VALID_ASSIGNEE_TYPES = new Set([
@@ -7627,13 +7467,11 @@ const ProcessManagementConfigParser = { parse: (rawText) => {
7627
7467
  actions
7628
7468
  };
7629
7469
  } };
7630
-
7631
7470
  //#endregion
7632
7471
  //#region src/core/application/processManagement/parseConfig.ts
7633
7472
  function parseProcessManagementConfigText(rawText) {
7634
7473
  return wrapBusinessRuleError(() => ProcessManagementConfigParser.parse(rawText));
7635
7474
  }
7636
-
7637
7475
  //#endregion
7638
7476
  //#region src/core/application/processManagement/applyProcessManagement.ts
7639
7477
  async function applyProcessManagement({ container }) {
@@ -7651,7 +7489,6 @@ async function applyProcessManagement({ container }) {
7651
7489
  newEnable: config.enable
7652
7490
  };
7653
7491
  }
7654
-
7655
7492
  //#endregion
7656
7493
  //#region src/cli/processConfig.ts
7657
7494
  const processArgs = {
@@ -7673,7 +7510,6 @@ const { resolveFilePath: resolveProcessFilePath, resolveContainerConfig: resolve
7673
7510
  processFilePath: filePath
7674
7511
  })
7675
7512
  });
7676
-
7677
7513
  //#endregion
7678
7514
  //#region src/cli/commands/process/apply.ts
7679
7515
  async function runProcessApply(config) {
@@ -7706,12 +7542,13 @@ var apply_default$5 = define({
7706
7542
  },
7707
7543
  multiApp: async (plan, projectConfig) => {
7708
7544
  const containers = [];
7709
- await runMultiAppWithFailCheck(plan, async (app) => {
7710
- const config = resolveProcessAppContainerConfig(app, projectConfig, values);
7711
- printAppHeader(app.name, app.appId);
7712
- const container = await runProcessApply(config);
7713
- containers.push(container);
7714
- }, void 0);
7545
+ await runMultiAppWithHeaders(plan, async (app) => {
7546
+ const container = await runProcessApply(resolveProcessAppContainerConfig(app, projectConfig, values));
7547
+ containers.push({
7548
+ appDeployer: container.appDeployer,
7549
+ appName: app.name
7550
+ });
7551
+ });
7715
7552
  await confirmAndDeploy(containers, skipConfirm);
7716
7553
  }
7717
7554
  });
@@ -7720,7 +7557,6 @@ var apply_default$5 = define({
7720
7557
  }
7721
7558
  }
7722
7559
  });
7723
-
7724
7560
  //#endregion
7725
7561
  //#region src/cli/commands/process/capture.ts
7726
7562
  async function runCaptureProcess(config) {
@@ -7763,7 +7599,6 @@ var capture_default$6 = define({
7763
7599
  }
7764
7600
  }
7765
7601
  });
7766
-
7767
7602
  //#endregion
7768
7603
  //#region src/core/domain/processManagement/services/diffDetector.ts
7769
7604
  function isEntityEqual(a, b) {
@@ -7858,7 +7693,6 @@ function compareConfigs$1(local, remote) {
7858
7693
  const ProcessManagementDiffDetector = { detect: (local, remote) => {
7859
7694
  return buildDiffResult(compareConfigs$1(local, remote));
7860
7695
  } };
7861
-
7862
7696
  //#endregion
7863
7697
  //#region src/core/application/processManagement/detectProcessManagementDiff.ts
7864
7698
  async function detectProcessManagementDiff({ container }) {
@@ -7870,21 +7704,6 @@ async function detectProcessManagementDiff({ container }) {
7870
7704
  notFoundMessage: "Process management config file not found"
7871
7705
  });
7872
7706
  }
7873
-
7874
- //#endregion
7875
- //#region src/cli/commands/process/diff.ts
7876
- var diff_default$5 = createDiffCommand({
7877
- description: "Compare local process management settings with remote kintone app",
7878
- args: processArgs,
7879
- spinnerMessage: "Comparing process management settings...",
7880
- multiAppSuccessMessage: "All process management diffs completed successfully.",
7881
- createContainer: createProcessManagementCliContainer,
7882
- detectDiff: detectProcessManagementDiff,
7883
- printResult: printProcessDiffResult,
7884
- resolveContainerConfig: resolveProcessContainerConfig,
7885
- resolveAppContainerConfig: resolveProcessAppContainerConfig
7886
- });
7887
-
7888
7707
  //#endregion
7889
7708
  //#region src/cli/commands/process/index.ts
7890
7709
  var process_default = define({
@@ -7893,11 +7712,20 @@ var process_default = define({
7893
7712
  subCommands: {
7894
7713
  apply: apply_default$5,
7895
7714
  capture: capture_default$6,
7896
- diff: diff_default$5
7715
+ diff: createDiffCommand({
7716
+ description: "Compare local process management settings with remote kintone app",
7717
+ args: processArgs,
7718
+ spinnerMessage: "Comparing process management settings...",
7719
+ multiAppSuccessMessage: "All process management diffs completed successfully.",
7720
+ createContainer: createProcessManagementCliContainer,
7721
+ detectDiff: detectProcessManagementDiff,
7722
+ printResult: printProcessDiffResult,
7723
+ resolveContainerConfig: resolveProcessContainerConfig,
7724
+ resolveAppContainerConfig: resolveProcessAppContainerConfig
7725
+ })
7897
7726
  },
7898
7727
  run: () => {}
7899
7728
  });
7900
-
7901
7729
  //#endregion
7902
7730
  //#region src/core/domain/recordPermission/services/configParser.ts
7903
7731
  const VALID_ENTITY_TYPES = new Set([
@@ -7952,13 +7780,11 @@ const RecordPermissionConfigParser = { parse: (rawText) => {
7952
7780
  }
7953
7781
  return { rights };
7954
7782
  } };
7955
-
7956
7783
  //#endregion
7957
7784
  //#region src/core/application/recordPermission/parseConfig.ts
7958
7785
  function parseRecordPermissionConfigText(rawText) {
7959
7786
  return wrapBusinessRuleError(() => RecordPermissionConfigParser.parse(rawText));
7960
7787
  }
7961
-
7962
7788
  //#endregion
7963
7789
  //#region src/core/application/recordPermission/applyRecordPermission.ts
7964
7790
  async function applyRecordPermission({ container }) {
@@ -7975,7 +7801,6 @@ async function applyRecordPermission({ container }) {
7975
7801
  notFoundMessage: "Record permission config file not found"
7976
7802
  });
7977
7803
  }
7978
-
7979
7804
  //#endregion
7980
7805
  //#region src/cli/recordAclConfig.ts
7981
7806
  const recordAclArgs = {
@@ -7997,7 +7822,6 @@ const { resolveFilePath: resolveRecordAclFilePath, resolveContainerConfig: resol
7997
7822
  recordAclFilePath: filePath
7998
7823
  })
7999
7824
  });
8000
-
8001
7825
  //#endregion
8002
7826
  //#region src/cli/commands/record-acl/apply.ts
8003
7827
  async function runRecordAcl(config) {
@@ -8029,12 +7853,13 @@ var apply_default$4 = define({
8029
7853
  },
8030
7854
  multiApp: async (plan, projectConfig) => {
8031
7855
  const containers = [];
8032
- await runMultiAppWithFailCheck(plan, async (app) => {
8033
- const config = resolveRecordAclAppContainerConfig(app, projectConfig, values);
8034
- printAppHeader(app.name, app.appId);
8035
- const container = await runRecordAcl(config);
8036
- containers.push(container);
8037
- }, void 0);
7856
+ await runMultiAppWithHeaders(plan, async (app) => {
7857
+ const container = await runRecordAcl(resolveRecordAclAppContainerConfig(app, projectConfig, values));
7858
+ containers.push({
7859
+ appDeployer: container.appDeployer,
7860
+ appName: app.name
7861
+ });
7862
+ });
8038
7863
  await confirmAndDeploy(containers, skipConfirm);
8039
7864
  }
8040
7865
  });
@@ -8043,7 +7868,6 @@ var apply_default$4 = define({
8043
7868
  }
8044
7869
  }
8045
7870
  });
8046
-
8047
7871
  //#endregion
8048
7872
  //#region src/cli/commands/record-acl/capture.ts
8049
7873
  async function runCaptureRecordAcl(config) {
@@ -8086,7 +7910,6 @@ var capture_default$5 = define({
8086
7910
  }
8087
7911
  }
8088
7912
  });
8089
-
8090
7913
  //#endregion
8091
7914
  //#region src/core/domain/recordPermission/services/diffDetector.ts
8092
7915
  function isRightEqual(a, b) {
@@ -8158,7 +7981,6 @@ const RecordPermissionDiffDetector = { detect: (local, remote) => {
8158
7981
  });
8159
7982
  return buildDiffResult(entries);
8160
7983
  } };
8161
-
8162
7984
  //#endregion
8163
7985
  //#region src/core/application/recordPermission/detectRecordPermissionDiff.ts
8164
7986
  async function detectRecordPermissionDiff({ container }) {
@@ -8170,21 +7992,6 @@ async function detectRecordPermissionDiff({ container }) {
8170
7992
  notFoundMessage: "Record permission config file not found"
8171
7993
  });
8172
7994
  }
8173
-
8174
- //#endregion
8175
- //#region src/cli/commands/record-acl/diff.ts
8176
- var diff_default$4 = createDiffCommand({
8177
- description: "Compare local record permission config with remote kintone app",
8178
- args: recordAclArgs,
8179
- spinnerMessage: "Comparing record permissions...",
8180
- multiAppSuccessMessage: "All record permission diffs completed successfully.",
8181
- createContainer: createRecordPermissionCliContainer,
8182
- detectDiff: detectRecordPermissionDiff,
8183
- printResult: printRecordPermissionDiffResult,
8184
- resolveContainerConfig: resolveRecordAclContainerConfig,
8185
- resolveAppContainerConfig: resolveRecordAclAppContainerConfig
8186
- });
8187
-
8188
7995
  //#endregion
8189
7996
  //#region src/cli/commands/record-acl/index.ts
8190
7997
  var record_acl_default = define({
@@ -8193,11 +8000,20 @@ var record_acl_default = define({
8193
8000
  subCommands: {
8194
8001
  apply: apply_default$4,
8195
8002
  capture: capture_default$5,
8196
- diff: diff_default$4
8003
+ diff: createDiffCommand({
8004
+ description: "Compare local record permission config with remote kintone app",
8005
+ args: recordAclArgs,
8006
+ spinnerMessage: "Comparing record permissions...",
8007
+ multiAppSuccessMessage: "All record permission diffs completed successfully.",
8008
+ createContainer: createRecordPermissionCliContainer,
8009
+ detectDiff: detectRecordPermissionDiff,
8010
+ printResult: printRecordPermissionDiffResult,
8011
+ resolveContainerConfig: resolveRecordAclContainerConfig,
8012
+ resolveAppContainerConfig: resolveRecordAclAppContainerConfig
8013
+ })
8197
8014
  },
8198
8015
  run: () => {}
8199
8016
  });
8200
-
8201
8017
  //#endregion
8202
8018
  //#region src/core/domain/report/services/configParser.ts
8203
8019
  function parseGroup(raw, index) {
@@ -8338,13 +8154,11 @@ const ReportConfigParser = { parse: (rawText) => {
8338
8154
  for (const [name, value] of Object.entries(rawReports)) reports[name] = parseReportConfig(value, name);
8339
8155
  return { reports };
8340
8156
  } };
8341
-
8342
8157
  //#endregion
8343
8158
  //#region src/core/application/report/parseConfig.ts
8344
8159
  function parseReportConfigText(rawText) {
8345
8160
  return wrapBusinessRuleError(() => ReportConfigParser.parse(rawText));
8346
8161
  }
8347
-
8348
8162
  //#endregion
8349
8163
  //#region src/core/application/report/applyReport.ts
8350
8164
  async function applyReport({ container }) {
@@ -8361,7 +8175,6 @@ async function applyReport({ container }) {
8361
8175
  notFoundMessage: "Report config file not found"
8362
8176
  });
8363
8177
  }
8364
-
8365
8178
  //#endregion
8366
8179
  //#region src/cli/reportConfig.ts
8367
8180
  const reportArgs = {
@@ -8383,7 +8196,6 @@ const { resolveFilePath: resolveReportFilePath, resolveContainerConfig: resolveR
8383
8196
  reportFilePath: filePath
8384
8197
  })
8385
8198
  });
8386
-
8387
8199
  //#endregion
8388
8200
  //#region src/cli/commands/report/apply.ts
8389
8201
  async function runReport(config) {
@@ -8415,12 +8227,13 @@ var apply_default$3 = define({
8415
8227
  },
8416
8228
  multiApp: async (plan, projectConfig) => {
8417
8229
  const containers = [];
8418
- await runMultiAppWithFailCheck(plan, async (app) => {
8419
- const config = resolveReportAppContainerConfig(app, projectConfig, values);
8420
- printAppHeader(app.name, app.appId);
8421
- const container = await runReport(config);
8422
- containers.push(container);
8423
- }, void 0);
8230
+ await runMultiAppWithHeaders(plan, async (app) => {
8231
+ const container = await runReport(resolveReportAppContainerConfig(app, projectConfig, values));
8232
+ containers.push({
8233
+ appDeployer: container.appDeployer,
8234
+ appName: app.name
8235
+ });
8236
+ });
8424
8237
  await confirmAndDeploy(containers, skipConfirm);
8425
8238
  }
8426
8239
  });
@@ -8429,7 +8242,6 @@ var apply_default$3 = define({
8429
8242
  }
8430
8243
  }
8431
8244
  });
8432
-
8433
8245
  //#endregion
8434
8246
  //#region src/cli/commands/report/capture.ts
8435
8247
  async function runCaptureReport(config) {
@@ -8472,7 +8284,6 @@ var capture_default$4 = define({
8472
8284
  }
8473
8285
  }
8474
8286
  });
8475
-
8476
8287
  //#endregion
8477
8288
  //#region src/core/domain/report/services/diffDetector.ts
8478
8289
  function compareReports(local, remote) {
@@ -8510,7 +8321,6 @@ const ReportDiffDetector = { detect: (local, remote) => {
8510
8321
  })
8511
8322
  }));
8512
8323
  } };
8513
-
8514
8324
  //#endregion
8515
8325
  //#region src/core/application/report/detectReportDiff.ts
8516
8326
  async function detectReportDiff({ container }) {
@@ -8522,21 +8332,6 @@ async function detectReportDiff({ container }) {
8522
8332
  notFoundMessage: "Report config file not found"
8523
8333
  });
8524
8334
  }
8525
-
8526
- //#endregion
8527
- //#region src/cli/commands/report/diff.ts
8528
- var diff_default$3 = createDiffCommand({
8529
- description: "Compare local report config with remote kintone app",
8530
- args: reportArgs,
8531
- spinnerMessage: "Comparing report settings...",
8532
- multiAppSuccessMessage: "All report diffs completed successfully.",
8533
- createContainer: createReportCliContainer,
8534
- detectDiff: detectReportDiff,
8535
- printResult: printReportDiffResult,
8536
- resolveContainerConfig: resolveReportContainerConfig,
8537
- resolveAppContainerConfig: resolveReportAppContainerConfig
8538
- });
8539
-
8540
8335
  //#endregion
8541
8336
  //#region src/cli/commands/report/index.ts
8542
8337
  var report_default = define({
@@ -8545,11 +8340,20 @@ var report_default = define({
8545
8340
  subCommands: {
8546
8341
  apply: apply_default$3,
8547
8342
  capture: capture_default$4,
8548
- diff: diff_default$3
8343
+ diff: createDiffCommand({
8344
+ description: "Compare local report config with remote kintone app",
8345
+ args: reportArgs,
8346
+ spinnerMessage: "Comparing report settings...",
8347
+ multiAppSuccessMessage: "All report diffs completed successfully.",
8348
+ createContainer: createReportCliContainer,
8349
+ detectDiff: detectReportDiff,
8350
+ printResult: printReportDiffResult,
8351
+ resolveContainerConfig: resolveReportContainerConfig,
8352
+ resolveAppContainerConfig: resolveReportAppContainerConfig
8353
+ })
8549
8354
  },
8550
8355
  run: () => {}
8551
8356
  });
8552
-
8553
8357
  //#endregion
8554
8358
  //#region src/cli/commands/schema/capture.ts
8555
8359
  async function runCapture(container, schemaFilePath) {
@@ -8596,7 +8400,6 @@ var capture_default$3 = define({
8596
8400
  }
8597
8401
  }
8598
8402
  });
8599
-
8600
8403
  //#endregion
8601
8404
  //#region src/core/domain/formSchema/services/diffDetector.ts
8602
8405
  function isMapEqual(a, b) {
@@ -8665,7 +8468,6 @@ const DiffDetector = {
8665
8468
  return buildDiffResult(entries);
8666
8469
  }
8667
8470
  };
8668
-
8669
8471
  //#endregion
8670
8472
  //#region src/core/domain/formSchema/entity.ts
8671
8473
  const Schema = { create: (fields, layout) => {
@@ -8675,7 +8477,6 @@ const Schema = { create: (fields, layout) => {
8675
8477
  layout
8676
8478
  };
8677
8479
  } };
8678
-
8679
8480
  //#endregion
8680
8481
  //#region src/core/domain/formSchema/services/schemaParser.ts
8681
8482
  const VALID_UNIT_POSITIONS = new Set(["BEFORE", "AFTER"]);
@@ -9143,13 +8944,11 @@ const SchemaParser = { parse: (rawText) => {
9143
8944
  }
9144
8945
  return Schema.create(fieldMap, layout);
9145
8946
  } };
9146
-
9147
8947
  //#endregion
9148
8948
  //#region src/core/application/formSchema/parseSchema.ts
9149
8949
  function parseSchemaText(rawText) {
9150
8950
  return wrapBusinessRuleError(() => SchemaParser.parse(rawText));
9151
8951
  }
9152
-
9153
8952
  //#endregion
9154
8953
  //#region src/core/application/formSchema/detectDiff.ts
9155
8954
  function fieldPropertiesToDto(field) {
@@ -9200,12 +8999,11 @@ async function detectDiff({ container }) {
9200
8999
  hasLayoutChanges
9201
9000
  };
9202
9001
  }
9203
-
9204
9002
  //#endregion
9205
9003
  //#region src/cli/commands/schema/diff.ts
9206
9004
  async function runDiff(container) {
9207
9005
  const s = p.spinner();
9208
- s.start("Fetching form schema...");
9006
+ s.start("Comparing schema...");
9209
9007
  let result;
9210
9008
  try {
9211
9009
  result = await detectDiff({ container });
@@ -9213,7 +9011,7 @@ async function runDiff(container) {
9213
9011
  s.stop("Comparison failed.");
9214
9012
  throw error;
9215
9013
  }
9216
- s.stop("Form schema fetched.");
9014
+ s.stop("Comparison complete.");
9217
9015
  printDiffResult(result);
9218
9016
  }
9219
9017
  var diff_default$2 = define({
@@ -9245,7 +9043,6 @@ var diff_default$2 = define({
9245
9043
  }
9246
9044
  }
9247
9045
  });
9248
-
9249
9046
  //#endregion
9250
9047
  //#region src/core/adapters/kintone/formDumpReader.ts
9251
9048
  var KintoneFormDumpReader = class {
@@ -9271,7 +9068,6 @@ var KintoneFormDumpReader = class {
9271
9068
  }
9272
9069
  }
9273
9070
  };
9274
-
9275
9071
  //#endregion
9276
9072
  //#region src/core/adapters/local/dumpStorage.ts
9277
9073
  var LocalFileDumpStorage = class {
@@ -9302,7 +9098,6 @@ var LocalFileDumpStorage = class {
9302
9098
  }
9303
9099
  }
9304
9100
  };
9305
-
9306
9101
  //#endregion
9307
9102
  //#region src/core/application/container/dumpCli.ts
9308
9103
  function createDumpCliContainer(config) {
@@ -9311,14 +9106,12 @@ function createDumpCliContainer(config) {
9311
9106
  dumpStorage: new LocalFileDumpStorage(config.filePrefix, process.cwd())
9312
9107
  };
9313
9108
  }
9314
-
9315
9109
  //#endregion
9316
9110
  //#region src/core/application/formSchema/dumpForm.ts
9317
9111
  async function dumpForm({ container }) {
9318
9112
  const rawData = await container.formDumpReader.getRawFormData();
9319
9113
  await Promise.all([container.dumpStorage.saveFields(JSON.stringify(rawData.fields, null, 2)), container.dumpStorage.saveLayout(JSON.stringify(rawData.layout, null, 2))]);
9320
9114
  }
9321
-
9322
9115
  //#endregion
9323
9116
  //#region src/cli/commands/schema/dump.ts
9324
9117
  async function runSingleDump(config) {
@@ -9378,7 +9171,11 @@ var dump_default = define({
9378
9171
  }
9379
9172
  }
9380
9173
  });
9381
-
9174
+ //#endregion
9175
+ //#region src/core/application/formSchema/deployApp.ts
9176
+ async function deployApp({ container }) {
9177
+ await container.appDeployer.deploy();
9178
+ }
9382
9179
  //#endregion
9383
9180
  //#region src/core/domain/formSchema/services/subtableFieldSplitter.ts
9384
9181
  function splitSubtableInnerFields(desired, current) {
@@ -9394,7 +9191,6 @@ function splitSubtableInnerFields(desired, current) {
9394
9191
  deletedInnerFieldCodes
9395
9192
  };
9396
9193
  }
9397
-
9398
9194
  //#endregion
9399
9195
  //#region src/core/domain/formSchema/services/schemaValidator.ts
9400
9196
  const SELECTION_TYPES = new Set([
@@ -9533,7 +9329,6 @@ const SchemaValidator = { validate: (schema) => {
9533
9329
  isValid: issues.every((i) => i.severity !== "error")
9534
9330
  };
9535
9331
  } };
9536
-
9537
9332
  //#endregion
9538
9333
  //#region src/core/application/formSchema/assertSchemaValid.ts
9539
9334
  function assertSchemaValid(schema) {
@@ -9543,7 +9338,6 @@ function assertSchemaValid(schema) {
9543
9338
  throw new ValidationError(ValidationErrorCode.InvalidInput, `Schema validation failed:\n ${messages}`);
9544
9339
  }
9545
9340
  }
9546
-
9547
9341
  //#endregion
9548
9342
  //#region src/core/application/formSchema/executeMigration.ts
9549
9343
  async function executeMigration({ container }) {
@@ -9593,7 +9387,6 @@ async function executeMigration({ container }) {
9593
9387
  }
9594
9388
  if (hasLayoutChanges) await container.formConfigurator.updateLayout(schema.layout);
9595
9389
  }
9596
-
9597
9390
  //#endregion
9598
9391
  //#region src/cli/commands/schema/migrate.ts
9599
9392
  async function runSingleMigrate(container, skipConfirm) {
@@ -9618,7 +9411,7 @@ async function runSingleMigrate(container, skipConfirm) {
9618
9411
  await executeMigration({ container });
9619
9412
  ms.stop("Migration applied.");
9620
9413
  p.log.success("Migration completed successfully.");
9621
- await promptDeploy(container, skipConfirm);
9414
+ await confirmAndDeploy([container], skipConfirm);
9622
9415
  }
9623
9416
  var migrate_default = define({
9624
9417
  name: "migrate",
@@ -9667,7 +9460,7 @@ var migrate_default = define({
9667
9460
  }
9668
9461
  await runMultiAppWithFailCheck(plan, async (app) => {
9669
9462
  const entry = appContainers.find((a) => a.app.name === app.name);
9670
- if (!entry) return;
9463
+ if (!entry) throw new SystemError(SystemErrorCode.InternalServerError, `App container not found for "${app.name}"`);
9671
9464
  const { container, hasChanges } = entry;
9672
9465
  printAppHeader(app.name, app.appId);
9673
9466
  if (!hasChanges) {
@@ -9690,7 +9483,6 @@ var migrate_default = define({
9690
9483
  }
9691
9484
  }
9692
9485
  });
9693
-
9694
9486
  //#endregion
9695
9487
  //#region src/core/application/formSchema/forceOverrideForm.ts
9696
9488
  async function forceOverrideForm({ container }) {
@@ -9744,7 +9536,6 @@ async function forceOverrideForm({ container }) {
9744
9536
  if (toUpdate.length > 0) await container.formConfigurator.updateFields(toUpdate);
9745
9537
  await container.formConfigurator.updateLayout(schema.layout);
9746
9538
  }
9747
-
9748
9539
  //#endregion
9749
9540
  //#region src/core/application/formSchema/resetForm.ts
9750
9541
  async function resetForm({ container }) {
@@ -9758,7 +9549,6 @@ async function resetForm({ container }) {
9758
9549
  if (toDelete.length > 0) await container.formConfigurator.deleteFields(toDelete);
9759
9550
  await container.formConfigurator.updateLayout([]);
9760
9551
  }
9761
-
9762
9552
  //#endregion
9763
9553
  //#region src/cli/commands/schema/override.ts
9764
9554
  async function runSingleOverride(container, skipConfirm) {
@@ -9776,7 +9566,7 @@ async function runSingleOverride(container, skipConfirm) {
9776
9566
  await forceOverrideForm({ container });
9777
9567
  s.stop("Force override applied.");
9778
9568
  p.log.success("Force override completed successfully.");
9779
- await promptDeploy(container, skipConfirm);
9569
+ await confirmAndDeploy([container], skipConfirm);
9780
9570
  }
9781
9571
  async function runSingleReset(container, skipConfirm) {
9782
9572
  p.log.warn(`${pc.bold(pc.red("WARNING:"))} This will delete ALL custom fields, resetting the form to empty.`);
@@ -9792,7 +9582,7 @@ async function runSingleReset(container, skipConfirm) {
9792
9582
  await resetForm({ container });
9793
9583
  s.stop("Form reset applied.");
9794
9584
  p.log.success("Reset completed successfully.");
9795
- await promptDeploy(container, skipConfirm);
9585
+ await confirmAndDeploy([container], skipConfirm);
9796
9586
  }
9797
9587
  var override_default = define({
9798
9588
  name: "override",
@@ -9874,13 +9664,11 @@ var override_default = define({
9874
9664
  }
9875
9665
  }
9876
9666
  });
9877
-
9878
9667
  //#endregion
9879
9668
  //#region src/core/application/container/validateCli.ts
9880
9669
  function createValidateCliContainer(config) {
9881
9670
  return { schemaStorage: createLocalFileSchemaStorage(config.schemaFilePath) };
9882
9671
  }
9883
-
9884
9672
  //#endregion
9885
9673
  //#region src/core/application/formSchema/validateSchema.ts
9886
9674
  async function validateSchema({ container }) {
@@ -9901,7 +9689,6 @@ async function validateSchema({ container }) {
9901
9689
  fieldCount: schema.fields.size
9902
9690
  };
9903
9691
  }
9904
-
9905
9692
  //#endregion
9906
9693
  //#region src/cli/commands/schema/validate.ts
9907
9694
  const validateArgs = {
@@ -9947,42 +9734,6 @@ async function runValidate(schemaFilePath) {
9947
9734
  function resolveSchemaFilePath(values, appSchemaFile) {
9948
9735
  return values["schema-file"] ?? process.env.SCHEMA_FILE_PATH ?? appSchemaFile ?? "schema.yaml";
9949
9736
  }
9950
- var validate_default = define({
9951
- name: "validate",
9952
- description: "Validate schema file without connecting to kintone",
9953
- args: validateArgs,
9954
- run: async (ctx) => {
9955
- try {
9956
- const values = ctx.values;
9957
- await routeMultiApp(values, {
9958
- singleLegacy: async () => {
9959
- if (!await runValidate(resolveSchemaFilePath(values))) {
9960
- p.outro("Validation failed.");
9961
- process.exit(1);
9962
- }
9963
- p.outro("Validation passed.");
9964
- },
9965
- singleApp: async (app) => {
9966
- if (!await runValidate(resolveSchemaFilePath(values, app.schemaFile))) {
9967
- p.outro("Validation failed.");
9968
- process.exit(1);
9969
- }
9970
- p.outro("Validation passed.");
9971
- },
9972
- multiApp: async (plan) => {
9973
- await runMultiAppWithFailCheck(plan, async (app) => {
9974
- printAppHeader(app.name, app.appId);
9975
- const schemaFilePath = resolveSchemaFilePath(values, app.schemaFile);
9976
- if (!printValidationResult(await validateSchema({ container: createValidateCliContainer({ schemaFilePath }) }), schemaFilePath)) throw new ValidationError(ValidationErrorCode.InvalidInput, `Validation failed for app "${app.name}"`);
9977
- }, "All validations passed.");
9978
- }
9979
- });
9980
- } catch (error) {
9981
- handleCliError(error);
9982
- }
9983
- }
9984
- });
9985
-
9986
9737
  //#endregion
9987
9738
  //#region src/cli/commands/schema/index.ts
9988
9739
  var schema_default = define({
@@ -9993,12 +9744,45 @@ var schema_default = define({
9993
9744
  migrate: migrate_default,
9994
9745
  override: override_default,
9995
9746
  capture: capture_default$3,
9996
- validate: validate_default,
9747
+ validate: define({
9748
+ name: "validate",
9749
+ description: "Validate schema file without connecting to kintone",
9750
+ args: validateArgs,
9751
+ run: async (ctx) => {
9752
+ try {
9753
+ const values = ctx.values;
9754
+ await routeMultiApp(values, {
9755
+ singleLegacy: async () => {
9756
+ if (!await runValidate(resolveSchemaFilePath(values))) {
9757
+ p.outro("Validation failed.");
9758
+ process.exit(1);
9759
+ }
9760
+ p.outro("Validation passed.");
9761
+ },
9762
+ singleApp: async (app) => {
9763
+ if (!await runValidate(resolveSchemaFilePath(values, app.schemaFile))) {
9764
+ p.outro("Validation failed.");
9765
+ process.exit(1);
9766
+ }
9767
+ p.outro("Validation passed.");
9768
+ },
9769
+ multiApp: async (plan) => {
9770
+ await runMultiAppWithFailCheck(plan, async (app) => {
9771
+ printAppHeader(app.name, app.appId);
9772
+ const schemaFilePath = resolveSchemaFilePath(values, app.schemaFile);
9773
+ if (!printValidationResult(await validateSchema({ container: createValidateCliContainer({ schemaFilePath }) }), schemaFilePath)) throw new ValidationError(ValidationErrorCode.InvalidInput, `Validation failed for app "${app.name}"`);
9774
+ }, "All validations passed.");
9775
+ }
9776
+ });
9777
+ } catch (error) {
9778
+ handleCliError(error);
9779
+ }
9780
+ }
9781
+ }),
9997
9782
  dump: dump_default
9998
9783
  },
9999
9784
  run: () => {}
10000
9785
  });
10001
-
10002
9786
  //#endregion
10003
9787
  //#region src/core/domain/seedData/services/upsertPlanner.ts
10004
9788
  function recordsEqual(seed, existing, keyField) {
@@ -10042,7 +9826,6 @@ const UpsertPlanner = { plan: (key, seedRecords, existingRecords) => {
10042
9826
  unchanged
10043
9827
  };
10044
9828
  } };
10045
-
10046
9829
  //#endregion
10047
9830
  //#region src/core/domain/seedData/services/seedParser.ts
10048
9831
  function normalizeValue(value) {
@@ -10102,13 +9885,11 @@ const SeedParser = { parse: (rawText) => {
10102
9885
  records
10103
9886
  };
10104
9887
  } };
10105
-
10106
9888
  //#endregion
10107
9889
  //#region src/core/application/seedData/parseConfig.ts
10108
9890
  function parseSeedText(rawText) {
10109
9891
  return wrapBusinessRuleError(() => SeedParser.parse(rawText));
10110
9892
  }
10111
-
10112
9893
  //#endregion
10113
9894
  //#region src/core/application/seedData/upsertSeed.ts
10114
9895
  async function upsertSeed({ container, input }) {
@@ -10148,7 +9929,6 @@ async function upsertSeed({ container, input }) {
10148
9929
  total: plan.toAdd.length + plan.toUpdate.length + plan.unchanged
10149
9930
  };
10150
9931
  }
10151
-
10152
9932
  //#endregion
10153
9933
  //#region src/cli/commands/seed/config.ts
10154
9934
  const { resolveFilePath: resolveSeedFilePath, resolveContainerConfig: resolveSeedConfig, resolveAppContainerConfig: resolveSeedAppConfig } = createDomainConfigResolver({
@@ -10162,7 +9942,6 @@ const { resolveFilePath: resolveSeedFilePath, resolveContainerConfig: resolveSee
10162
9942
  seedFilePath: filePath
10163
9943
  })
10164
9944
  });
10165
-
10166
9945
  //#endregion
10167
9946
  //#region src/cli/commands/seed/apply.ts
10168
9947
  const seedApplyArgs = {
@@ -10245,7 +10024,6 @@ var apply_default$2 = define({
10245
10024
  }
10246
10025
  }
10247
10026
  });
10248
-
10249
10027
  //#endregion
10250
10028
  //#region src/cli/commands/seed/capture.ts
10251
10029
  const seedCaptureArgs = {
@@ -10279,35 +10057,6 @@ async function runSeedCapture(config, keyField) {
10279
10057
  if (!keyField) p.log.info("No key field specified. All records will be added on apply.");
10280
10058
  if (result.hasExistingSeed) p.log.warn("Existing seed file was overwritten.");
10281
10059
  }
10282
- var capture_default$2 = define({
10283
- name: "capture",
10284
- description: "Capture records from kintone app to seed file",
10285
- args: seedCaptureArgs,
10286
- run: async (ctx) => {
10287
- try {
10288
- const values = ctx.values;
10289
- const keyField = values["key-field"];
10290
- await routeMultiApp(values, {
10291
- singleLegacy: async () => {
10292
- await runSeedCapture(resolveSeedConfig(values), keyField);
10293
- },
10294
- singleApp: async (app, projectConfig) => {
10295
- await runSeedCapture(resolveSeedAppConfig(app, projectConfig, values), keyField);
10296
- },
10297
- multiApp: async (plan, projectConfig) => {
10298
- await runMultiAppWithFailCheck(plan, async (app) => {
10299
- const config = resolveSeedAppConfig(app, projectConfig, values);
10300
- printAppHeader(app.name, app.appId);
10301
- await runSeedCapture(config, keyField);
10302
- }, "All captures completed successfully.");
10303
- }
10304
- });
10305
- } catch (error) {
10306
- handleCliError(error);
10307
- }
10308
- }
10309
- });
10310
-
10311
10060
  //#endregion
10312
10061
  //#region src/cli/commands/seed/index.ts
10313
10062
  var seed_default = define({
@@ -10315,11 +10064,37 @@ var seed_default = define({
10315
10064
  description: "Manage kintone seed data (records)",
10316
10065
  subCommands: {
10317
10066
  apply: apply_default$2,
10318
- capture: capture_default$2
10067
+ capture: define({
10068
+ name: "capture",
10069
+ description: "Capture records from kintone app to seed file",
10070
+ args: seedCaptureArgs,
10071
+ run: async (ctx) => {
10072
+ try {
10073
+ const values = ctx.values;
10074
+ const keyField = values["key-field"];
10075
+ await routeMultiApp(values, {
10076
+ singleLegacy: async () => {
10077
+ await runSeedCapture(resolveSeedConfig(values), keyField);
10078
+ },
10079
+ singleApp: async (app, projectConfig) => {
10080
+ await runSeedCapture(resolveSeedAppConfig(app, projectConfig, values), keyField);
10081
+ },
10082
+ multiApp: async (plan, projectConfig) => {
10083
+ await runMultiAppWithFailCheck(plan, async (app) => {
10084
+ const config = resolveSeedAppConfig(app, projectConfig, values);
10085
+ printAppHeader(app.name, app.appId);
10086
+ await runSeedCapture(config, keyField);
10087
+ }, "All captures completed successfully.");
10088
+ }
10089
+ });
10090
+ } catch (error) {
10091
+ handleCliError(error);
10092
+ }
10093
+ }
10094
+ })
10319
10095
  },
10320
10096
  run: () => {}
10321
10097
  });
10322
-
10323
10098
  //#endregion
10324
10099
  //#region src/core/domain/generalSettings/services/configParser.ts
10325
10100
  function parseOptionalBoolean(parsed, fieldName) {
@@ -10428,13 +10203,11 @@ const GeneralSettingsConfigParser = { parse: (rawText) => {
10428
10203
  ...firstMonthOfFiscalYear !== void 0 ? { firstMonthOfFiscalYear } : {}
10429
10204
  };
10430
10205
  } };
10431
-
10432
10206
  //#endregion
10433
10207
  //#region src/core/application/generalSettings/parseConfig.ts
10434
10208
  function parseGeneralSettingsConfigText(rawText) {
10435
10209
  return wrapBusinessRuleError(() => GeneralSettingsConfigParser.parse(rawText));
10436
10210
  }
10437
-
10438
10211
  //#endregion
10439
10212
  //#region src/core/application/generalSettings/applyGeneralSettings.ts
10440
10213
  async function applyGeneralSettings({ container }) {
@@ -10451,7 +10224,6 @@ async function applyGeneralSettings({ container }) {
10451
10224
  notFoundMessage: "General settings config file not found"
10452
10225
  });
10453
10226
  }
10454
-
10455
10227
  //#endregion
10456
10228
  //#region src/cli/settingsConfig.ts
10457
10229
  const settingsArgs = {
@@ -10473,7 +10245,6 @@ const { resolveFilePath: resolveSettingsFilePath, resolveContainerConfig: resolv
10473
10245
  settingsFilePath: filePath
10474
10246
  })
10475
10247
  });
10476
-
10477
10248
  //#endregion
10478
10249
  //#region src/cli/commands/settings/apply.ts
10479
10250
  async function runSettings(config) {
@@ -10505,12 +10276,13 @@ var apply_default$1 = define({
10505
10276
  },
10506
10277
  multiApp: async (plan, projectConfig) => {
10507
10278
  const containers = [];
10508
- await runMultiAppWithFailCheck(plan, async (app) => {
10509
- const config = resolveSettingsAppContainerConfig(app, projectConfig, values);
10510
- printAppHeader(app.name, app.appId);
10511
- const container = await runSettings(config);
10512
- containers.push(container);
10513
- }, "All general settings applied successfully.");
10279
+ await runMultiAppWithHeaders(plan, async (app) => {
10280
+ const container = await runSettings(resolveSettingsAppContainerConfig(app, projectConfig, values));
10281
+ containers.push({
10282
+ appDeployer: container.appDeployer,
10283
+ appName: app.name
10284
+ });
10285
+ });
10514
10286
  await confirmAndDeploy(containers, skipConfirm);
10515
10287
  }
10516
10288
  });
@@ -10519,7 +10291,6 @@ var apply_default$1 = define({
10519
10291
  }
10520
10292
  }
10521
10293
  });
10522
-
10523
10294
  //#endregion
10524
10295
  //#region src/cli/commands/settings/capture.ts
10525
10296
  async function runCaptureSettings(config) {
@@ -10562,7 +10333,6 @@ var capture_default$1 = define({
10562
10333
  }
10563
10334
  }
10564
10335
  });
10565
-
10566
10336
  //#endregion
10567
10337
  //#region src/core/domain/generalSettings/services/diffDetector.ts
10568
10338
  const DEFAULT_STRING = "";
@@ -10624,7 +10394,6 @@ function compareConfigs(local, remote) {
10624
10394
  const GeneralSettingsDiffDetector = { detect: (local, remote) => {
10625
10395
  return buildDiffResult(compareConfigs(local, remote));
10626
10396
  } };
10627
-
10628
10397
  //#endregion
10629
10398
  //#region src/core/application/generalSettings/detectGeneralSettingsDiff.ts
10630
10399
  async function detectGeneralSettingsDiff({ container }) {
@@ -10636,21 +10405,6 @@ async function detectGeneralSettingsDiff({ container }) {
10636
10405
  notFoundMessage: "General settings config file not found"
10637
10406
  });
10638
10407
  }
10639
-
10640
- //#endregion
10641
- //#region src/cli/commands/settings/diff.ts
10642
- var diff_default$1 = createDiffCommand({
10643
- description: "Compare local general settings config with remote kintone app",
10644
- args: settingsArgs,
10645
- spinnerMessage: "Comparing general settings...",
10646
- multiAppSuccessMessage: "All general settings diffs completed successfully.",
10647
- createContainer: createGeneralSettingsCliContainer,
10648
- detectDiff: detectGeneralSettingsDiff,
10649
- printResult: printGeneralSettingsDiffResult,
10650
- resolveContainerConfig: resolveSettingsContainerConfig,
10651
- resolveAppContainerConfig: resolveSettingsAppContainerConfig
10652
- });
10653
-
10654
10408
  //#endregion
10655
10409
  //#region src/cli/commands/settings/index.ts
10656
10410
  var settings_default = define({
@@ -10659,11 +10413,20 @@ var settings_default = define({
10659
10413
  subCommands: {
10660
10414
  apply: apply_default$1,
10661
10415
  capture: capture_default$1,
10662
- diff: diff_default$1
10416
+ diff: createDiffCommand({
10417
+ description: "Compare local general settings config with remote kintone app",
10418
+ args: settingsArgs,
10419
+ spinnerMessage: "Comparing general settings...",
10420
+ multiAppSuccessMessage: "All general settings diffs completed successfully.",
10421
+ createContainer: createGeneralSettingsCliContainer,
10422
+ detectDiff: detectGeneralSettingsDiff,
10423
+ printResult: printGeneralSettingsDiffResult,
10424
+ resolveContainerConfig: resolveSettingsContainerConfig,
10425
+ resolveAppContainerConfig: resolveSettingsAppContainerConfig
10426
+ })
10663
10427
  },
10664
10428
  run: () => {}
10665
10429
  });
10666
-
10667
10430
  //#endregion
10668
10431
  //#region src/core/domain/view/services/configParser.ts
10669
10432
  function parseDeviceType(name, raw) {
@@ -10712,13 +10475,11 @@ const ViewConfigParser = { parse: (rawText) => {
10712
10475
  }
10713
10476
  return { views };
10714
10477
  } };
10715
-
10716
10478
  //#endregion
10717
10479
  //#region src/core/application/view/parseConfig.ts
10718
10480
  function parseViewConfigText(rawText) {
10719
10481
  return wrapBusinessRuleError(() => ViewConfigParser.parse(rawText));
10720
10482
  }
10721
-
10722
10483
  //#endregion
10723
10484
  //#region src/core/application/view/applyView.ts
10724
10485
  async function applyView({ container }) {
@@ -10737,7 +10498,6 @@ async function applyView({ container }) {
10737
10498
  });
10738
10499
  return { skippedBuiltinViews };
10739
10500
  }
10740
-
10741
10501
  //#endregion
10742
10502
  //#region src/cli/viewConfig.ts
10743
10503
  const viewArgs = {
@@ -10759,7 +10519,6 @@ const { resolveFilePath: resolveViewFilePath, resolveContainerConfig: resolveVie
10759
10519
  viewFilePath: filePath
10760
10520
  })
10761
10521
  });
10762
-
10763
10522
  //#endregion
10764
10523
  //#region src/cli/commands/view/apply.ts
10765
10524
  async function runView(config) {
@@ -10792,12 +10551,13 @@ var apply_default = define({
10792
10551
  },
10793
10552
  multiApp: async (plan, projectConfig) => {
10794
10553
  const containers = [];
10795
- await runMultiAppWithFailCheck(plan, async (app) => {
10796
- const config = resolveViewAppContainerConfig(app, projectConfig, values);
10797
- printAppHeader(app.name, app.appId);
10798
- const container = await runView(config);
10799
- containers.push(container);
10800
- }, void 0);
10554
+ await runMultiAppWithHeaders(plan, async (app) => {
10555
+ const container = await runView(resolveViewAppContainerConfig(app, projectConfig, values));
10556
+ containers.push({
10557
+ appDeployer: container.appDeployer,
10558
+ appName: app.name
10559
+ });
10560
+ });
10801
10561
  await confirmAndDeploy(containers, skipConfirm);
10802
10562
  }
10803
10563
  });
@@ -10806,7 +10566,6 @@ var apply_default = define({
10806
10566
  }
10807
10567
  }
10808
10568
  });
10809
-
10810
10569
  //#endregion
10811
10570
  //#region src/cli/commands/view/capture.ts
10812
10571
  async function runCaptureView(config) {
@@ -10849,7 +10608,6 @@ var capture_default = define({
10849
10608
  }
10850
10609
  }
10851
10610
  });
10852
-
10853
10611
  //#endregion
10854
10612
  //#region src/core/domain/view/services/diffDetector.ts
10855
10613
  function describeChanges(local, remote) {
@@ -10889,7 +10647,6 @@ const ViewDiffDetector = { detect: (localViews, remoteViews) => {
10889
10647
  })
10890
10648
  }));
10891
10649
  } };
10892
-
10893
10650
  //#endregion
10894
10651
  //#region src/core/application/view/detectViewDiff.ts
10895
10652
  async function detectViewDiff({ container }) {
@@ -10901,21 +10658,6 @@ async function detectViewDiff({ container }) {
10901
10658
  notFoundMessage: "View config file not found"
10902
10659
  });
10903
10660
  }
10904
-
10905
- //#endregion
10906
- //#region src/cli/commands/view/diff.ts
10907
- var diff_default = createDiffCommand({
10908
- description: "Compare local view config with remote kintone app",
10909
- args: viewArgs,
10910
- spinnerMessage: "Comparing view settings...",
10911
- multiAppSuccessMessage: "All view diffs completed successfully.",
10912
- createContainer: createViewCliContainer,
10913
- detectDiff: detectViewDiff,
10914
- printResult: printViewDiffResult,
10915
- resolveContainerConfig: resolveViewContainerConfig,
10916
- resolveAppContainerConfig: resolveViewAppContainerConfig
10917
- });
10918
-
10919
10661
  //#endregion
10920
10662
  //#region src/cli/commands/view/index.ts
10921
10663
  var view_default = define({
@@ -10924,11 +10666,20 @@ var view_default = define({
10924
10666
  subCommands: {
10925
10667
  apply: apply_default,
10926
10668
  capture: capture_default,
10927
- diff: diff_default
10669
+ diff: createDiffCommand({
10670
+ description: "Compare local view config with remote kintone app",
10671
+ args: viewArgs,
10672
+ spinnerMessage: "Comparing view settings...",
10673
+ multiAppSuccessMessage: "All view diffs completed successfully.",
10674
+ createContainer: createViewCliContainer,
10675
+ detectDiff: detectViewDiff,
10676
+ printResult: printViewDiffResult,
10677
+ resolveContainerConfig: resolveViewContainerConfig,
10678
+ resolveAppContainerConfig: resolveViewAppContainerConfig
10679
+ })
10928
10680
  },
10929
10681
  run: () => {}
10930
10682
  });
10931
-
10932
10683
  //#endregion
10933
10684
  //#region src/cli/index.ts
10934
10685
  function loadVersion() {
@@ -10964,7 +10715,7 @@ await cli(process.argv.slice(2), main, {
10964
10715
  plugin: plugin_default
10965
10716
  }
10966
10717
  });
10967
-
10968
10718
  //#endregion
10969
- export { };
10719
+ export {};
10720
+
10970
10721
  //# sourceMappingURL=index.mjs.map