kintone-migrator 0.36.0 → 0.36.1
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 +509 -1018
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -11,15 +11,14 @@ import * as v from "valibot";
|
|
|
11
11
|
import * as p from "@clack/prompts";
|
|
12
12
|
import pc from "picocolors";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
|
-
|
|
14
|
+
// src/lib/error.ts
|
|
15
15
|
var AnyError = class extends Error {
|
|
16
16
|
constructor(message, cause) {
|
|
17
17
|
super(message, { cause });
|
|
18
18
|
this.name = "AnyError";
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
//#region src/core/domain/action/errorCode.ts
|
|
21
|
+
// src/core/domain/action/errorCode.ts
|
|
23
22
|
const ActionErrorCode = {
|
|
24
23
|
AcInvalidConfigStructure: "AC_INVALID_CONFIG_STRUCTURE",
|
|
25
24
|
AcInvalidSrcType: "AC_INVALID_SRC_TYPE",
|
|
@@ -28,14 +27,12 @@ const ActionErrorCode = {
|
|
|
28
27
|
AcDuplicateIndex: "AC_DUPLICATE_INDEX",
|
|
29
28
|
AcUnresolvedConflict: "AC_UNRESOLVED_CONFLICT"
|
|
30
29
|
};
|
|
31
|
-
|
|
32
|
-
//#region src/core/domain/adminNotes/errorCode.ts
|
|
30
|
+
// src/core/domain/adminNotes/errorCode.ts
|
|
33
31
|
const AdminNotesErrorCode = {
|
|
34
32
|
AnInvalidConfigStructure: "AN_INVALID_CONFIG_STRUCTURE",
|
|
35
33
|
AnUnresolvedConflict: "AN_UNRESOLVED_CONFLICT"
|
|
36
34
|
};
|
|
37
|
-
|
|
38
|
-
//#region src/core/domain/appPermission/errorCode.ts
|
|
35
|
+
// src/core/domain/appPermission/errorCode.ts
|
|
39
36
|
const AppPermissionErrorCode = {
|
|
40
37
|
ApInvalidConfigStructure: "AP_INVALID_CONFIG_STRUCTURE",
|
|
41
38
|
ApInvalidEntityType: "AP_INVALID_ENTITY_TYPE",
|
|
@@ -44,11 +41,9 @@ const AppPermissionErrorCode = {
|
|
|
44
41
|
ApDuplicateEntity: "AP_DUPLICATE_ENTITY",
|
|
45
42
|
ApUnresolvedConflict: "AP_UNRESOLVED_CONFLICT"
|
|
46
43
|
};
|
|
47
|
-
|
|
48
|
-
//#region src/core/domain/appRevision/errorCode.ts
|
|
44
|
+
// src/core/domain/appRevision/errorCode.ts
|
|
49
45
|
const AppRevisionErrorCode = { ArInvalidStructure: "AR_INVALID_STRUCTURE" };
|
|
50
|
-
|
|
51
|
-
//#region src/core/domain/customization/errorCode.ts
|
|
46
|
+
// src/core/domain/customization/errorCode.ts
|
|
52
47
|
const CustomizationErrorCode = {
|
|
53
48
|
CzInvalidConfigStructure: "CZ_INVALID_CONFIG_STRUCTURE",
|
|
54
49
|
CzInvalidScope: "CZ_INVALID_SCOPE",
|
|
@@ -56,8 +51,7 @@ const CustomizationErrorCode = {
|
|
|
56
51
|
CzTooManyFiles: "CZ_TOO_MANY_FILES",
|
|
57
52
|
CzUnresolvedConflict: "CZ_UNRESOLVED_CONFLICT"
|
|
58
53
|
};
|
|
59
|
-
|
|
60
|
-
//#region src/core/domain/fieldPermission/errorCode.ts
|
|
54
|
+
// src/core/domain/fieldPermission/errorCode.ts
|
|
61
55
|
const FieldPermissionErrorCode = {
|
|
62
56
|
FpInvalidConfigStructure: "FP_INVALID_CONFIG_STRUCTURE",
|
|
63
57
|
FpInvalidAccessibility: "FP_INVALID_ACCESSIBILITY",
|
|
@@ -68,8 +62,7 @@ const FieldPermissionErrorCode = {
|
|
|
68
62
|
FpDuplicateFieldCode: "FP_DUPLICATE_FIELD_CODE",
|
|
69
63
|
FpUnresolvedConflict: "FP_UNRESOLVED_CONFLICT"
|
|
70
64
|
};
|
|
71
|
-
|
|
72
|
-
//#region src/core/domain/formSchema/errorCode.ts
|
|
65
|
+
// src/core/domain/formSchema/errorCode.ts
|
|
73
66
|
const FormSchemaErrorCode = {
|
|
74
67
|
FsEmptyFieldCode: "FS_EMPTY_FIELD_CODE",
|
|
75
68
|
FsInvalidFieldCode: "FS_INVALID_FIELD_CODE",
|
|
@@ -83,8 +76,7 @@ const FormSchemaErrorCode = {
|
|
|
83
76
|
FsInvalidMergeResolution: "FS_INVALID_MERGE_RESOLUTION",
|
|
84
77
|
FsOrphanMergedField: "FS_ORPHAN_MERGED_FIELD"
|
|
85
78
|
};
|
|
86
|
-
|
|
87
|
-
//#region src/core/domain/generalSettings/errorCode.ts
|
|
79
|
+
// src/core/domain/generalSettings/errorCode.ts
|
|
88
80
|
const GeneralSettingsErrorCode = {
|
|
89
81
|
GsInvalidConfigStructure: "GS_INVALID_CONFIG_STRUCTURE",
|
|
90
82
|
GsInvalidTheme: "GS_INVALID_THEME",
|
|
@@ -93,8 +85,7 @@ const GeneralSettingsErrorCode = {
|
|
|
93
85
|
GsInvalidNumberPrecision: "GS_INVALID_NUMBER_PRECISION",
|
|
94
86
|
GsUnresolvedConflict: "GS_UNRESOLVED_CONFLICT"
|
|
95
87
|
};
|
|
96
|
-
|
|
97
|
-
//#region src/core/domain/notification/errorCode.ts
|
|
88
|
+
// src/core/domain/notification/errorCode.ts
|
|
98
89
|
const NotificationErrorCode = {
|
|
99
90
|
NtInvalidConfigStructure: "NT_INVALID_CONFIG_STRUCTURE",
|
|
100
91
|
NtInvalidEntityType: "NT_INVALID_ENTITY_TYPE",
|
|
@@ -105,16 +96,14 @@ const NotificationErrorCode = {
|
|
|
105
96
|
NtInvalidDaysLater: "NT_INVALID_DAYS_LATER",
|
|
106
97
|
NtUnresolvedConflict: "NT_UNRESOLVED_CONFLICT"
|
|
107
98
|
};
|
|
108
|
-
|
|
109
|
-
//#region src/core/domain/plugin/errorCode.ts
|
|
99
|
+
// src/core/domain/plugin/errorCode.ts
|
|
110
100
|
const PluginErrorCode = {
|
|
111
101
|
PlInvalidConfigStructure: "PL_INVALID_CONFIG_STRUCTURE",
|
|
112
102
|
PlEmptyPluginId: "PL_EMPTY_PLUGIN_ID",
|
|
113
103
|
PlDuplicatePluginId: "PL_DUPLICATE_PLUGIN_ID",
|
|
114
104
|
PlUnresolvedConflict: "PL_UNRESOLVED_CONFLICT"
|
|
115
105
|
};
|
|
116
|
-
|
|
117
|
-
//#region src/core/domain/processManagement/errorCode.ts
|
|
106
|
+
// src/core/domain/processManagement/errorCode.ts
|
|
118
107
|
const ProcessManagementErrorCode = {
|
|
119
108
|
PmInvalidConfigStructure: "PM_INVALID_CONFIG_STRUCTURE",
|
|
120
109
|
PmInvalidAssigneeType: "PM_INVALID_ASSIGNEE_TYPE",
|
|
@@ -123,8 +112,7 @@ const ProcessManagementErrorCode = {
|
|
|
123
112
|
PmInvalidActionReference: "PM_INVALID_ACTION_REFERENCE",
|
|
124
113
|
PmUnresolvedConflict: "PM_UNRESOLVED_CONFLICT"
|
|
125
114
|
};
|
|
126
|
-
|
|
127
|
-
//#region src/core/domain/projectConfig/errorCode.ts
|
|
115
|
+
// src/core/domain/projectConfig/errorCode.ts
|
|
128
116
|
const ProjectConfigErrorCode = {
|
|
129
117
|
PcCircularDependency: "PC_CIRCULAR_DEPENDENCY",
|
|
130
118
|
PcUnknownDependency: "PC_UNKNOWN_DEPENDENCY",
|
|
@@ -135,8 +123,7 @@ const ProjectConfigErrorCode = {
|
|
|
135
123
|
PcInvalidConfigStructure: "PC_INVALID_CONFIG_STRUCTURE",
|
|
136
124
|
PcInvalidAuthConfig: "PC_INVALID_AUTH_CONFIG"
|
|
137
125
|
};
|
|
138
|
-
|
|
139
|
-
//#region src/core/domain/recordPermission/errorCode.ts
|
|
126
|
+
// src/core/domain/recordPermission/errorCode.ts
|
|
140
127
|
const RecordPermissionErrorCode = {
|
|
141
128
|
RpInvalidConfigStructure: "RP_INVALID_CONFIG_STRUCTURE",
|
|
142
129
|
RpInvalidEntityType: "RP_INVALID_ENTITY_TYPE",
|
|
@@ -145,8 +132,7 @@ const RecordPermissionErrorCode = {
|
|
|
145
132
|
RpDuplicateEntity: "RP_DUPLICATE_ENTITY",
|
|
146
133
|
RpUnresolvedConflict: "RP_UNRESOLVED_CONFLICT"
|
|
147
134
|
};
|
|
148
|
-
|
|
149
|
-
//#region src/core/domain/report/errorCode.ts
|
|
135
|
+
// src/core/domain/report/errorCode.ts
|
|
150
136
|
const ReportErrorCode = {
|
|
151
137
|
RtInvalidConfigStructure: "RT_INVALID_CONFIG_STRUCTURE",
|
|
152
138
|
RtInvalidChartType: "RT_INVALID_CHART_TYPE",
|
|
@@ -154,8 +140,7 @@ const ReportErrorCode = {
|
|
|
154
140
|
RtEmptyReportName: "RT_EMPTY_REPORT_NAME",
|
|
155
141
|
RtUnresolvedConflict: "RT_UNRESOLVED_CONFLICT"
|
|
156
142
|
};
|
|
157
|
-
|
|
158
|
-
//#region src/core/domain/seedData/errorCode.ts
|
|
143
|
+
// src/core/domain/seedData/errorCode.ts
|
|
159
144
|
const SeedDataErrorCode = {
|
|
160
145
|
SdEmptyUpsertKey: "SD_EMPTY_UPSERT_KEY",
|
|
161
146
|
SdInvalidSeedStructure: "SD_INVALID_SEED_STRUCTURE",
|
|
@@ -163,8 +148,7 @@ const SeedDataErrorCode = {
|
|
|
163
148
|
SdMissingKeyField: "SD_MISSING_KEY_FIELD",
|
|
164
149
|
SdInvalidKeyFieldValue: "SD_INVALID_KEY_FIELD_VALUE"
|
|
165
150
|
};
|
|
166
|
-
|
|
167
|
-
//#region src/core/domain/view/errorCode.ts
|
|
151
|
+
// src/core/domain/view/errorCode.ts
|
|
168
152
|
const ViewErrorCode = {
|
|
169
153
|
VwInvalidConfigStructure: "VW_INVALID_CONFIG_STRUCTURE",
|
|
170
154
|
VwInvalidViewType: "VW_INVALID_VIEW_TYPE",
|
|
@@ -208,8 +192,7 @@ var BusinessRuleError = class extends AnyError {
|
|
|
208
192
|
function isBusinessRuleError(error) {
|
|
209
193
|
return error instanceof BusinessRuleError;
|
|
210
194
|
}
|
|
211
|
-
|
|
212
|
-
//#region src/core/application/error.ts
|
|
195
|
+
// src/core/application/error.ts
|
|
213
196
|
/**
|
|
214
197
|
* Wraps a function that may throw a {@link BusinessRuleError} and converts it
|
|
215
198
|
* to a {@link ValidationError}. Non-BusinessRuleError exceptions are re-thrown
|
|
@@ -342,8 +325,7 @@ function isFatalError(error) {
|
|
|
342
325
|
if (isSystemError(error) && error.code === SystemErrorCode.NetworkError) return true;
|
|
343
326
|
return false;
|
|
344
327
|
}
|
|
345
|
-
|
|
346
|
-
//#region src/core/application/applyFromConfigBase.ts
|
|
328
|
+
// src/core/application/applyFromConfigBase.ts
|
|
347
329
|
async function applyFromConfig(config) {
|
|
348
330
|
const result = await config.getStorage();
|
|
349
331
|
if (!result.exists) throw new ValidationError(ValidationErrorCode.InvalidInput, config.notFoundMessage);
|
|
@@ -351,8 +333,7 @@ async function applyFromConfig(config) {
|
|
|
351
333
|
const remote = await config.fetchRemote();
|
|
352
334
|
await config.update(parsed, remote);
|
|
353
335
|
}
|
|
354
|
-
|
|
355
|
-
//#region src/lib/typeGuards.ts
|
|
336
|
+
// src/lib/typeGuards.ts
|
|
356
337
|
/**
|
|
357
338
|
* Narrows `unknown` to `Record<string, unknown>`.
|
|
358
339
|
* Returns true when the value is a non-null, non-array object that is not
|
|
@@ -366,8 +347,7 @@ async function applyFromConfig(config) {
|
|
|
366
347
|
function isRecord(value) {
|
|
367
348
|
return typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof Date) && !(value instanceof RegExp) && !(value instanceof Map) && !(value instanceof Set);
|
|
368
349
|
}
|
|
369
|
-
|
|
370
|
-
//#region src/core/domain/typeGuards.ts
|
|
350
|
+
// src/core/domain/typeGuards.ts
|
|
371
351
|
/**
|
|
372
352
|
* Narrows `unknown` to `{ code: string }`.
|
|
373
353
|
*/
|
|
@@ -429,8 +409,7 @@ function parseEntityBase(raw, index, validTypes, errorCodes, options) {
|
|
|
429
409
|
code: raw.code
|
|
430
410
|
};
|
|
431
411
|
}
|
|
432
|
-
|
|
433
|
-
//#region src/core/domain/services/configValidator.ts
|
|
412
|
+
// src/core/domain/services/configValidator.ts
|
|
434
413
|
function validateParsedConfig(parsed, invalidConfigStructure, domainLabel) {
|
|
435
414
|
if (!isRecord(parsed)) throw new BusinessRuleError(invalidConfigStructure, `${domainLabel} config must be an object`);
|
|
436
415
|
return parsed;
|
|
@@ -447,8 +426,7 @@ const VALID_ENTITY_TYPES$9 = /* @__PURE__ */ new Set([
|
|
|
447
426
|
function isActionEntityType(value) {
|
|
448
427
|
return VALID_ENTITY_TYPES$9.has(value);
|
|
449
428
|
}
|
|
450
|
-
|
|
451
|
-
//#region src/core/domain/action/services/configParser.ts
|
|
429
|
+
// src/core/domain/action/services/configParser.ts
|
|
452
430
|
function parseDestApp(raw, actionName) {
|
|
453
431
|
if (!isRecord(raw)) throw new BusinessRuleError(ActionErrorCode.AcInvalidConfigStructure, `Action "${actionName}" destApp must be an object`);
|
|
454
432
|
const result = {};
|
|
@@ -511,8 +489,7 @@ const ActionConfigParser = { parse: (parsed) => {
|
|
|
511
489
|
}
|
|
512
490
|
return { actions };
|
|
513
491
|
} };
|
|
514
|
-
|
|
515
|
-
//#region src/core/application/parseConfigText.ts
|
|
492
|
+
// src/core/application/parseConfigText.ts
|
|
516
493
|
function parseConfigText(codec, rawText, domainLabel) {
|
|
517
494
|
if (rawText.trim().length === 0) throw new ValidationError(ValidationErrorCode.InvalidInput, `${domainLabel} config text is empty`);
|
|
518
495
|
let result;
|
|
@@ -524,14 +501,12 @@ function parseConfigText(codec, rawText, domainLabel) {
|
|
|
524
501
|
if (result == null) throw new ValidationError(ValidationErrorCode.InvalidInput, `${domainLabel} config is empty (no data after parsing)`);
|
|
525
502
|
return result;
|
|
526
503
|
}
|
|
527
|
-
|
|
528
|
-
//#region src/core/application/action/parseConfig.ts
|
|
504
|
+
// src/core/application/action/parseConfig.ts
|
|
529
505
|
function parseActionConfigText(codec, rawText) {
|
|
530
506
|
const parsed = parseConfigText(codec, rawText, "Action");
|
|
531
507
|
return wrapBusinessRuleError(() => ActionConfigParser.parse(parsed));
|
|
532
508
|
}
|
|
533
|
-
|
|
534
|
-
//#region src/core/application/action/applyAction.ts
|
|
509
|
+
// src/core/application/action/applyAction.ts
|
|
535
510
|
async function applyAction({ container }) {
|
|
536
511
|
await applyFromConfig({
|
|
537
512
|
getStorage: () => container.actionStorage.get(),
|
|
@@ -546,8 +521,7 @@ async function applyAction({ container }) {
|
|
|
546
521
|
notFoundMessage: "Action config file not found"
|
|
547
522
|
});
|
|
548
523
|
}
|
|
549
|
-
|
|
550
|
-
//#region src/lib/deepEqual.ts
|
|
524
|
+
// src/lib/deepEqual.ts
|
|
551
525
|
function isArrayEqual(a, b, stack) {
|
|
552
526
|
if (!Array.isArray(b)) return false;
|
|
553
527
|
if (a.length !== b.length) return false;
|
|
@@ -681,8 +655,7 @@ function deepEqualInner(a, b, stack) {
|
|
|
681
655
|
function deepEqual(a, b) {
|
|
682
656
|
return deepEqualInner(a, b, []);
|
|
683
657
|
}
|
|
684
|
-
|
|
685
|
-
//#region src/core/domain/diff.ts
|
|
658
|
+
// src/core/domain/diff.ts
|
|
686
659
|
const typeOrder = {
|
|
687
660
|
added: 0,
|
|
688
661
|
modified: 1,
|
|
@@ -770,15 +743,13 @@ function classifyThreeWay(base, local, remote, eq) {
|
|
|
770
743
|
hasConflict: conflicts.length > 0
|
|
771
744
|
};
|
|
772
745
|
}
|
|
773
|
-
|
|
774
|
-
//#region src/core/domain/services/formatValue.ts
|
|
746
|
+
// src/core/domain/services/formatValue.ts
|
|
775
747
|
function formatValue(v) {
|
|
776
748
|
if (v === void 0) return "(none)";
|
|
777
749
|
if (v === null || typeof v !== "object") return JSON.stringify(v);
|
|
778
750
|
return JSON.stringify(v, null, 2);
|
|
779
751
|
}
|
|
780
|
-
|
|
781
|
-
//#region src/core/domain/services/recordDiffDetector.ts
|
|
752
|
+
// src/core/domain/services/recordDiffDetector.ts
|
|
782
753
|
function detectRecordDiff(localRecord, remoteRecord, callbacks) {
|
|
783
754
|
const entries = [];
|
|
784
755
|
for (const [key, localValue] of Object.entries(localRecord)) if (!Object.hasOwn(remoteRecord, key)) entries.push(callbacks.onAdded(key, localValue));
|
|
@@ -789,8 +760,7 @@ function detectRecordDiff(localRecord, remoteRecord, callbacks) {
|
|
|
789
760
|
for (const [key, remoteValue] of Object.entries(remoteRecord)) if (!Object.hasOwn(localRecord, key)) entries.push(callbacks.onDeleted(key, remoteValue));
|
|
790
761
|
return entries;
|
|
791
762
|
}
|
|
792
|
-
|
|
793
|
-
//#region src/core/domain/action/services/diffDetector.ts
|
|
763
|
+
// src/core/domain/action/services/diffDetector.ts
|
|
794
764
|
function compareActions$1(local, remote) {
|
|
795
765
|
const diffs = [];
|
|
796
766
|
if (local.index !== remote.index) diffs.push(`index: ${remote.index} -> ${local.index}`);
|
|
@@ -825,16 +795,14 @@ const ActionDiffDetector = { detect: (local, remote) => {
|
|
|
825
795
|
})
|
|
826
796
|
}));
|
|
827
797
|
} };
|
|
828
|
-
|
|
829
|
-
//#region src/core/application/detectDiffBase.ts
|
|
798
|
+
// src/core/application/detectDiffBase.ts
|
|
830
799
|
async function detectDiffFromConfig(config) {
|
|
831
800
|
const [storageResult, remote] = await Promise.all([config.getStorage(), config.fetchRemote()]);
|
|
832
801
|
if (!storageResult.exists) throw new ValidationError(ValidationErrorCode.InvalidInput, config.notFoundMessage);
|
|
833
802
|
const local = config.parseConfig(storageResult.content);
|
|
834
803
|
return config.detect(local, remote);
|
|
835
804
|
}
|
|
836
|
-
|
|
837
|
-
//#region src/core/application/action/detectActionDiff.ts
|
|
805
|
+
// src/core/application/action/detectActionDiff.ts
|
|
838
806
|
async function detectActionDiff({ container }) {
|
|
839
807
|
return detectDiffFromConfig({
|
|
840
808
|
getStorage: () => container.actionStorage.get(),
|
|
@@ -844,8 +812,7 @@ async function detectActionDiff({ container }) {
|
|
|
844
812
|
notFoundMessage: "Action config file not found"
|
|
845
813
|
});
|
|
846
814
|
}
|
|
847
|
-
|
|
848
|
-
//#region src/core/adapters/kintone/wrapKintoneError.ts
|
|
815
|
+
// src/core/adapters/kintone/wrapKintoneError.ts
|
|
849
816
|
const KINTONE_REVISION_CONFLICT_CODE = "GAIA_CO02";
|
|
850
817
|
const KINTONE_MAINTENANCE_MODE_CODE = "GAIA_NO02";
|
|
851
818
|
function formatMessage(message, error) {
|
|
@@ -897,8 +864,7 @@ function wrapKintoneError(error, message) {
|
|
|
897
864
|
}
|
|
898
865
|
throw new SystemError(SystemErrorCode.ExternalApiError, detail, error);
|
|
899
866
|
}
|
|
900
|
-
|
|
901
|
-
//#region src/core/adapters/kintone/actionConfigurator.ts
|
|
867
|
+
// src/core/adapters/kintone/actionConfigurator.ts
|
|
902
868
|
function fromKintoneDestApp(raw) {
|
|
903
869
|
const result = {};
|
|
904
870
|
if (raw.app !== void 0) result.app = raw.app;
|
|
@@ -1002,8 +968,7 @@ var KintoneActionConfigurator = class {
|
|
|
1002
968
|
}
|
|
1003
969
|
}
|
|
1004
970
|
};
|
|
1005
|
-
|
|
1006
|
-
//#region src/core/adapters/kintone/appDeployer.ts
|
|
971
|
+
// src/core/adapters/kintone/appDeployer.ts
|
|
1007
972
|
const VALID_DEPLOY_STATUSES = /* @__PURE__ */ new Set([
|
|
1008
973
|
"PROCESSING",
|
|
1009
974
|
"SUCCESS",
|
|
@@ -1069,8 +1034,7 @@ var KintoneAppDeployer = class {
|
|
|
1069
1034
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1070
1035
|
}
|
|
1071
1036
|
};
|
|
1072
|
-
|
|
1073
|
-
//#region src/core/adapters/kintone/appRevisionReader.ts
|
|
1037
|
+
// src/core/adapters/kintone/appRevisionReader.ts
|
|
1074
1038
|
/**
|
|
1075
1039
|
* Reads the current remote app (preview) revision in one place.
|
|
1076
1040
|
*
|
|
@@ -1100,13 +1064,11 @@ var KintoneAppRevisionReader = class {
|
|
|
1100
1064
|
}
|
|
1101
1065
|
}
|
|
1102
1066
|
};
|
|
1103
|
-
|
|
1104
|
-
//#region src/lib/nodeError.ts
|
|
1067
|
+
// src/lib/nodeError.ts
|
|
1105
1068
|
function isNodeError(error) {
|
|
1106
1069
|
return error instanceof Error && "code" in error && typeof error.code === "string";
|
|
1107
1070
|
}
|
|
1108
|
-
|
|
1109
|
-
//#region src/core/adapters/local/storage.ts
|
|
1071
|
+
// src/core/adapters/local/storage.ts
|
|
1110
1072
|
function createLocalFileStorage(filePath, label = "file") {
|
|
1111
1073
|
return {
|
|
1112
1074
|
async get() {
|
|
@@ -1130,23 +1092,19 @@ function createLocalFileStorage(filePath, label = "file") {
|
|
|
1130
1092
|
}
|
|
1131
1093
|
};
|
|
1132
1094
|
}
|
|
1133
|
-
|
|
1134
|
-
//#region src/core/adapters/local/actionStateStorage.ts
|
|
1095
|
+
// src/core/adapters/local/actionStateStorage.ts
|
|
1135
1096
|
function createLocalFileActionStateStorage(filePath) {
|
|
1136
1097
|
return createLocalFileStorage(filePath, "action state file");
|
|
1137
1098
|
}
|
|
1138
|
-
|
|
1139
|
-
//#region src/core/adapters/local/actionStorage.ts
|
|
1099
|
+
// src/core/adapters/local/actionStorage.ts
|
|
1140
1100
|
function createLocalFileActionStorage(filePath) {
|
|
1141
1101
|
return createLocalFileStorage(filePath, "action file");
|
|
1142
1102
|
}
|
|
1143
|
-
|
|
1144
|
-
//#region src/core/adapters/local/appRevisionStorage.ts
|
|
1103
|
+
// src/core/adapters/local/appRevisionStorage.ts
|
|
1145
1104
|
function createLocalFileAppRevisionStorage(filePath) {
|
|
1146
1105
|
return createLocalFileStorage(filePath, "app revision file");
|
|
1147
1106
|
}
|
|
1148
|
-
|
|
1149
|
-
//#region src/core/adapters/yaml/configCodec.ts
|
|
1107
|
+
// src/core/adapters/yaml/configCodec.ts
|
|
1150
1108
|
const configCodec = {
|
|
1151
1109
|
parse: (text) => parse(text),
|
|
1152
1110
|
stringify: (data) => stringify(data, {
|
|
@@ -1167,8 +1125,7 @@ const VALID_RESOURCE_TYPES = /* @__PURE__ */ new Set(["FILE", "URL"]);
|
|
|
1167
1125
|
function isResourceType(value) {
|
|
1168
1126
|
return VALID_RESOURCE_TYPES.has(value);
|
|
1169
1127
|
}
|
|
1170
|
-
|
|
1171
|
-
//#region src/core/adapters/kintone/customizationConfigurator.ts
|
|
1128
|
+
// src/core/adapters/kintone/customizationConfigurator.ts
|
|
1172
1129
|
function fromKintoneResource(raw) {
|
|
1173
1130
|
if (raw.type === "FILE") {
|
|
1174
1131
|
if (!raw.file) throw new SystemError(SystemErrorCode.ExternalApiError, "FILE resource from kintone API is missing file metadata");
|
|
@@ -1257,8 +1214,7 @@ var KintoneCustomizationConfigurator = class {
|
|
|
1257
1214
|
}
|
|
1258
1215
|
}
|
|
1259
1216
|
};
|
|
1260
|
-
|
|
1261
|
-
//#region src/core/adapters/kintone/fileDownloader.ts
|
|
1217
|
+
// src/core/adapters/kintone/fileDownloader.ts
|
|
1262
1218
|
var KintoneFileDownloader = class {
|
|
1263
1219
|
client;
|
|
1264
1220
|
constructor(client) {
|
|
@@ -1273,8 +1229,7 @@ var KintoneFileDownloader = class {
|
|
|
1273
1229
|
}
|
|
1274
1230
|
}
|
|
1275
1231
|
};
|
|
1276
|
-
|
|
1277
|
-
//#region src/lib/safePath.ts
|
|
1232
|
+
// src/lib/safePath.ts
|
|
1278
1233
|
/**
|
|
1279
1234
|
* Returns `true` if {@link targetPath} resolves to a location within
|
|
1280
1235
|
* {@link baseDir}. Follows symlinks via `realpathSync` for both the base
|
|
@@ -1319,8 +1274,7 @@ function isSafePath(targetPath, baseDir) {
|
|
|
1319
1274
|
}
|
|
1320
1275
|
return resolvedTarget.startsWith(`${resolvedBase}/`) || resolvedTarget === resolvedBase;
|
|
1321
1276
|
}
|
|
1322
|
-
|
|
1323
|
-
//#region src/core/adapters/kintone/fileUploader.ts
|
|
1277
|
+
// src/core/adapters/kintone/fileUploader.ts
|
|
1324
1278
|
var KintoneFileUploader = class {
|
|
1325
1279
|
client;
|
|
1326
1280
|
baseDir;
|
|
@@ -1339,8 +1293,7 @@ var KintoneFileUploader = class {
|
|
|
1339
1293
|
}
|
|
1340
1294
|
}
|
|
1341
1295
|
};
|
|
1342
|
-
|
|
1343
|
-
//#region src/core/domain/formSchema/ports/formConfigurator.ts
|
|
1296
|
+
// src/core/domain/formSchema/ports/formConfigurator.ts
|
|
1344
1297
|
/**
|
|
1345
1298
|
* Sentinel passed as `expectedRevision` to explicitly skip the kintone revision
|
|
1346
1299
|
* check (sends `-1` / omits the expected revision). Used by `--force` push so
|
|
@@ -1349,12 +1302,10 @@ var KintoneFileUploader = class {
|
|
|
1349
1302
|
* default tracked revision" (existing migrate behaviour).
|
|
1350
1303
|
*/
|
|
1351
1304
|
const SKIP_REVISION_CHECK = Symbol("skip-revision-check");
|
|
1352
|
-
|
|
1353
|
-
//#region src/core/domain/formSchema/ports/formReadTarget.ts
|
|
1305
|
+
// src/core/domain/formSchema/ports/formReadTarget.ts
|
|
1354
1306
|
/** The generation read when a caller does not specify a target. */
|
|
1355
1307
|
const DEFAULT_FORM_READ_TARGET = "preview";
|
|
1356
|
-
|
|
1357
|
-
//#region src/core/domain/formSchema/services/lookupListDecoder.ts
|
|
1308
|
+
// src/core/domain/formSchema/services/lookupListDecoder.ts
|
|
1358
1309
|
/**
|
|
1359
1310
|
* Reads a lookup list (`fieldMappings`, `lookupPickerFields`) from an external
|
|
1360
1311
|
* value. kintone represents an unset list as `""`, which reads as the empty
|
|
@@ -1364,8 +1315,7 @@ function decodeLookupList(value) {
|
|
|
1364
1315
|
if (value === "") return [];
|
|
1365
1316
|
return Array.isArray(value) ? value : void 0;
|
|
1366
1317
|
}
|
|
1367
|
-
|
|
1368
|
-
//#region src/lib/charValidation.ts
|
|
1318
|
+
// src/lib/charValidation.ts
|
|
1369
1319
|
/** Returns true if the string contains any control characters (0x00–0x1f or 0x7f). */
|
|
1370
1320
|
function hasControlChars(s) {
|
|
1371
1321
|
for (let i = 0; i < s.length; i++) {
|
|
@@ -1384,8 +1334,7 @@ function sanitizeForDisplay$1(s) {
|
|
|
1384
1334
|
}
|
|
1385
1335
|
return result;
|
|
1386
1336
|
}
|
|
1387
|
-
|
|
1388
|
-
//#region src/core/domain/formSchema/valueObject.ts
|
|
1337
|
+
// src/core/domain/formSchema/valueObject.ts
|
|
1389
1338
|
function hasInvalidFieldCodeChars(code) {
|
|
1390
1339
|
if (hasControlChars(code)) return true;
|
|
1391
1340
|
for (let i = 0; i < code.length; i++) {
|
|
@@ -1407,8 +1356,7 @@ const LOOKUP_CAPABLE_TYPES = /* @__PURE__ */ new Set([
|
|
|
1407
1356
|
function isLookupCapableField(field) {
|
|
1408
1357
|
return LOOKUP_CAPABLE_TYPES.has(field.type);
|
|
1409
1358
|
}
|
|
1410
|
-
|
|
1411
|
-
//#region src/core/adapters/kintone/formConfigurator.ts
|
|
1359
|
+
// src/core/adapters/kintone/formConfigurator.ts
|
|
1412
1360
|
const KNOWN_FIELD_TYPES = /* @__PURE__ */ new Set([
|
|
1413
1361
|
"SINGLE_LINE_TEXT",
|
|
1414
1362
|
"MULTI_LINE_TEXT",
|
|
@@ -1905,8 +1853,7 @@ var KintoneFormConfigurator = class {
|
|
|
1905
1853
|
}
|
|
1906
1854
|
}
|
|
1907
1855
|
};
|
|
1908
|
-
|
|
1909
|
-
//#region src/core/adapters/kintone/recordConverter.ts
|
|
1856
|
+
// src/core/adapters/kintone/recordConverter.ts
|
|
1910
1857
|
const SYSTEM_FIELDS = /* @__PURE__ */ new Set([
|
|
1911
1858
|
"$id",
|
|
1912
1859
|
"$revision",
|
|
@@ -1996,8 +1943,7 @@ function fromKintoneRecord(record) {
|
|
|
1996
1943
|
}
|
|
1997
1944
|
return seedRecord;
|
|
1998
1945
|
}
|
|
1999
|
-
|
|
2000
|
-
//#region src/core/adapters/kintone/recordManager.ts
|
|
1946
|
+
// src/core/adapters/kintone/recordManager.ts
|
|
2001
1947
|
function extractId(record) {
|
|
2002
1948
|
const $id = record.$id;
|
|
2003
1949
|
if (!$id || typeof $id.value !== "string") throw new SystemError(SystemErrorCode.ExternalApiError, "Record missing $id field from kintone API response");
|
|
@@ -2069,18 +2015,15 @@ var KintoneRecordManager = class {
|
|
|
2069
2015
|
}
|
|
2070
2016
|
}
|
|
2071
2017
|
};
|
|
2072
|
-
|
|
2073
|
-
//#region src/core/adapters/local/customizationStateStorage.ts
|
|
2018
|
+
// src/core/adapters/local/customizationStateStorage.ts
|
|
2074
2019
|
function createLocalFileCustomizationStateStorage(filePath) {
|
|
2075
2020
|
return createLocalFileStorage(filePath, "customization state file");
|
|
2076
2021
|
}
|
|
2077
|
-
|
|
2078
|
-
//#region src/core/adapters/local/customizationStorage.ts
|
|
2022
|
+
// src/core/adapters/local/customizationStorage.ts
|
|
2079
2023
|
function createLocalFileCustomizationStorage(filePath) {
|
|
2080
2024
|
return createLocalFileStorage(filePath, "customization config file");
|
|
2081
2025
|
}
|
|
2082
|
-
|
|
2083
|
-
//#region src/core/adapters/local/fileContentReader.ts
|
|
2026
|
+
// src/core/adapters/local/fileContentReader.ts
|
|
2084
2027
|
var LocalFileContentReader = class {
|
|
2085
2028
|
async read(filePath) {
|
|
2086
2029
|
try {
|
|
@@ -2091,8 +2034,7 @@ var LocalFileContentReader = class {
|
|
|
2091
2034
|
}
|
|
2092
2035
|
}
|
|
2093
2036
|
};
|
|
2094
|
-
|
|
2095
|
-
//#region src/core/adapters/local/fileWriter.ts
|
|
2037
|
+
// src/core/adapters/local/fileWriter.ts
|
|
2096
2038
|
var LocalFileWriter = class {
|
|
2097
2039
|
baseDir;
|
|
2098
2040
|
constructor(baseDir = process.cwd()) {
|
|
@@ -2109,23 +2051,19 @@ var LocalFileWriter = class {
|
|
|
2109
2051
|
}
|
|
2110
2052
|
}
|
|
2111
2053
|
};
|
|
2112
|
-
|
|
2113
|
-
//#region src/core/adapters/local/schemaStateStorage.ts
|
|
2054
|
+
// src/core/adapters/local/schemaStateStorage.ts
|
|
2114
2055
|
function createLocalFileSchemaStateStorage(filePath) {
|
|
2115
2056
|
return createLocalFileStorage(filePath, "schema state file");
|
|
2116
2057
|
}
|
|
2117
|
-
|
|
2118
|
-
//#region src/core/adapters/local/schemaStorage.ts
|
|
2058
|
+
// src/core/adapters/local/schemaStorage.ts
|
|
2119
2059
|
function createLocalFileSchemaStorage(filePath) {
|
|
2120
2060
|
return createLocalFileStorage(filePath, "schema file");
|
|
2121
2061
|
}
|
|
2122
|
-
|
|
2123
|
-
//#region src/core/adapters/local/seedStorage.ts
|
|
2062
|
+
// src/core/adapters/local/seedStorage.ts
|
|
2124
2063
|
function createLocalFileSeedStorage(filePath) {
|
|
2125
2064
|
return createLocalFileStorage(filePath, "seed file");
|
|
2126
2065
|
}
|
|
2127
|
-
|
|
2128
|
-
//#region src/core/application/container/cli.ts
|
|
2066
|
+
// src/core/application/container/cli.ts
|
|
2129
2067
|
function buildKintoneAuth(auth) {
|
|
2130
2068
|
if (auth.type === "apiToken") return { apiToken: auth.apiToken };
|
|
2131
2069
|
return {
|
|
@@ -2168,8 +2106,7 @@ function createCustomizationCliContainer(config) {
|
|
|
2168
2106
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
2169
2107
|
};
|
|
2170
2108
|
}
|
|
2171
|
-
|
|
2172
|
-
//#region src/core/application/container/kintoneClient.ts
|
|
2109
|
+
// src/core/application/container/kintoneClient.ts
|
|
2173
2110
|
function createKintoneClient(config) {
|
|
2174
2111
|
return new KintoneRestAPIClient({
|
|
2175
2112
|
baseUrl: config.baseUrl,
|
|
@@ -2177,8 +2114,7 @@ function createKintoneClient(config) {
|
|
|
2177
2114
|
guestSpaceId: config.guestSpaceId
|
|
2178
2115
|
});
|
|
2179
2116
|
}
|
|
2180
|
-
|
|
2181
|
-
//#region src/core/application/container/actionCli.ts
|
|
2117
|
+
// src/core/application/container/actionCli.ts
|
|
2182
2118
|
function createActionCliContainer(config) {
|
|
2183
2119
|
const client = config.client ?? createKintoneClient(config);
|
|
2184
2120
|
return {
|
|
@@ -2191,8 +2127,7 @@ function createActionCliContainer(config) {
|
|
|
2191
2127
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
2192
2128
|
};
|
|
2193
2129
|
}
|
|
2194
|
-
|
|
2195
|
-
//#region src/core/domain/projectConfig/appFilePaths.ts
|
|
2130
|
+
// src/core/domain/projectConfig/appFilePaths.ts
|
|
2196
2131
|
function buildAppFilePaths(appName, baseDir) {
|
|
2197
2132
|
const prefix = (path) => baseDir ? join(baseDir, path) : path;
|
|
2198
2133
|
return {
|
|
@@ -2273,8 +2208,7 @@ function buildLegacyAppRevisionFilePath(baseDir) {
|
|
|
2273
2208
|
const path = "state/revision.yaml";
|
|
2274
2209
|
return baseDir ? join(baseDir, path) : path;
|
|
2275
2210
|
}
|
|
2276
|
-
|
|
2277
|
-
//#region src/cli/config.ts
|
|
2211
|
+
// src/cli/config.ts
|
|
2278
2212
|
const CliConfigSchema = v.object({
|
|
2279
2213
|
KINTONE_DOMAIN: v.pipe(v.string(), v.nonEmpty("KINTONE_DOMAIN is required")),
|
|
2280
2214
|
KINTONE_API_TOKEN: v.optional(v.string()),
|
|
@@ -2393,14 +2327,12 @@ function resolveAuth(apiToken, username, password) {
|
|
|
2393
2327
|
};
|
|
2394
2328
|
throw new ValidationError(ValidationErrorCode.InvalidInput, "Missing required configuration:\n Either KINTONE_API_TOKEN or KINTONE_USERNAME/KINTONE_PASSWORD is required");
|
|
2395
2329
|
}
|
|
2396
|
-
|
|
2397
|
-
//#region src/core/domain/projectConfig/entity.ts
|
|
2330
|
+
// src/core/domain/projectConfig/entity.ts
|
|
2398
2331
|
const MultiAppResult = { create: (results) => ({
|
|
2399
2332
|
results,
|
|
2400
2333
|
hasFailure: results.some((r) => r.status === "failed")
|
|
2401
2334
|
}) };
|
|
2402
|
-
|
|
2403
|
-
//#region src/core/application/projectConfig/executeMultiApp.ts
|
|
2335
|
+
// src/core/application/projectConfig/executeMultiApp.ts
|
|
2404
2336
|
async function executeMultiApp(plan, executor) {
|
|
2405
2337
|
const results = [];
|
|
2406
2338
|
let failed = false;
|
|
@@ -2436,8 +2368,7 @@ async function executeMultiApp(plan, executor) {
|
|
|
2436
2368
|
}
|
|
2437
2369
|
return MultiAppResult.create(results);
|
|
2438
2370
|
}
|
|
2439
|
-
|
|
2440
|
-
//#region src/core/domain/projectConfig/valueObject.ts
|
|
2371
|
+
// src/core/domain/projectConfig/valueObject.ts
|
|
2441
2372
|
const INVALID_APP_NAME_CHARS = /* @__PURE__ */ new Set([
|
|
2442
2373
|
"/",
|
|
2443
2374
|
"\\",
|
|
@@ -2460,8 +2391,7 @@ const AppName = { create: (name) => {
|
|
|
2460
2391
|
if (name === "." || name === "..") throw new BusinessRuleError(ProjectConfigErrorCode.PcInvalidAppName, `App name "${name}" is not allowed (reserved path component)`);
|
|
2461
2392
|
return name;
|
|
2462
2393
|
} };
|
|
2463
|
-
|
|
2464
|
-
//#region src/core/domain/projectConfig/services/configParser.ts
|
|
2394
|
+
// src/core/domain/projectConfig/services/configParser.ts
|
|
2465
2395
|
function asOptionalString(value) {
|
|
2466
2396
|
return typeof value === "string" ? value : void 0;
|
|
2467
2397
|
}
|
|
@@ -2556,8 +2486,7 @@ function parseAuth(raw) {
|
|
|
2556
2486
|
throw new BusinessRuleError(ProjectConfigErrorCode.PcInvalidAuthConfig, "Auth must have either apiToken or username/password");
|
|
2557
2487
|
}
|
|
2558
2488
|
const ConfigParser = { parse: parseProjectConfig };
|
|
2559
|
-
|
|
2560
|
-
//#region src/core/application/projectConfig/loadProjectConfig.ts
|
|
2489
|
+
// src/core/application/projectConfig/loadProjectConfig.ts
|
|
2561
2490
|
/**
|
|
2562
2491
|
* Pure function that parses config text into a ProjectConfig.
|
|
2563
2492
|
* Intentionally does not use the container/context object pattern because
|
|
@@ -2567,8 +2496,7 @@ function loadProjectConfig(input, codec) {
|
|
|
2567
2496
|
const raw = parseConfigText(codec, input.content, "Project config");
|
|
2568
2497
|
return wrapBusinessRuleError(() => ConfigParser.parse(raw));
|
|
2569
2498
|
}
|
|
2570
|
-
|
|
2571
|
-
//#region src/core/domain/projectConfig/services/dependencyResolver.ts
|
|
2499
|
+
// src/core/domain/projectConfig/services/dependencyResolver.ts
|
|
2572
2500
|
/**
|
|
2573
2501
|
* Resolves execution order using Kahn's algorithm (BFS topological sort).
|
|
2574
2502
|
* Apps at the same dependency level are sorted alphabetically for deterministic ordering.
|
|
@@ -2616,8 +2544,7 @@ function validateDependencyReferences(apps) {
|
|
|
2616
2544
|
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}"`);
|
|
2617
2545
|
}
|
|
2618
2546
|
const DependencyResolver = { resolve: resolveExecutionOrder };
|
|
2619
|
-
|
|
2620
|
-
//#region src/core/application/projectConfig/resolveExecutionPlan.ts
|
|
2547
|
+
// src/core/application/projectConfig/resolveExecutionPlan.ts
|
|
2621
2548
|
function resolveExecutionPlan(input) {
|
|
2622
2549
|
const { config, appName, all } = input;
|
|
2623
2550
|
if (appName) return resolveSingleApp(config, appName);
|
|
@@ -2630,8 +2557,7 @@ function resolveSingleApp(config, appName) {
|
|
|
2630
2557
|
if (!entry) throw new NotFoundError(NotFoundErrorCode.AppNotFound, `App "${appName}" not found in project config`);
|
|
2631
2558
|
return { orderedApps: [entry] };
|
|
2632
2559
|
}
|
|
2633
|
-
|
|
2634
|
-
//#region src/core/domain/recordPermission/valueObject.ts
|
|
2560
|
+
// src/core/domain/recordPermission/valueObject.ts
|
|
2635
2561
|
/**
|
|
2636
2562
|
* Display form of a right's filterCond. filterCond is a query expression, so
|
|
2637
2563
|
* it is quoted as a value; the empty condition targets all records.
|
|
@@ -2639,8 +2565,7 @@ function resolveSingleApp(config, appName) {
|
|
|
2639
2565
|
function describeRecordPermissionFilter(filterCond) {
|
|
2640
2566
|
return filterCond === "" ? "(all records)" : formatValue(filterCond);
|
|
2641
2567
|
}
|
|
2642
|
-
|
|
2643
|
-
//#region src/cli/handleError.ts
|
|
2568
|
+
// src/cli/handleError.ts
|
|
2644
2569
|
/**
|
|
2645
2570
|
* Log error details without terminating the process.
|
|
2646
2571
|
* Use this in contexts where multiple errors may be reported (e.g. multi-app results).
|
|
@@ -2785,8 +2710,7 @@ function hasObjectProperty(obj, key) {
|
|
|
2785
2710
|
function isApplicationError(error) {
|
|
2786
2711
|
return error instanceof ApplicationError;
|
|
2787
2712
|
}
|
|
2788
|
-
|
|
2789
|
-
//#region src/cli/output.ts
|
|
2713
|
+
// src/cli/output.ts
|
|
2790
2714
|
function formatDiffSummary(summary) {
|
|
2791
2715
|
return [
|
|
2792
2716
|
summary.added > 0 ? pc.green(`+${summary.added} added`) : null,
|
|
@@ -3000,8 +2924,7 @@ async function confirmAndDeploy(containers, skipConfirm, successMessage = "Deplo
|
|
|
3000
2924
|
}
|
|
3001
2925
|
p.log.success(successMessage);
|
|
3002
2926
|
}
|
|
3003
|
-
|
|
3004
|
-
//#region src/cli/projectConfig.ts
|
|
2927
|
+
// src/cli/projectConfig.ts
|
|
3005
2928
|
const DEFAULT_CONFIG_PATH = "kintone-migrator.yaml";
|
|
3006
2929
|
function validateExclusiveArgs(values) {
|
|
3007
2930
|
if (values.app && values.all) throw new ValidationError(ValidationErrorCode.InvalidInput, "--app and --all cannot be used together");
|
|
@@ -3148,13 +3071,11 @@ async function readConfigFile(configPath) {
|
|
|
3148
3071
|
throw new ValidationError(ValidationErrorCode.InvalidInput, `Config file not found: ${configPath}`, cause);
|
|
3149
3072
|
}
|
|
3150
3073
|
}
|
|
3151
|
-
|
|
3152
|
-
//#region src/cli/resolveFilePath.ts
|
|
3074
|
+
// src/cli/resolveFilePath.ts
|
|
3153
3075
|
function resolveFilePath(options) {
|
|
3154
3076
|
return options.cliValue ?? options.envVar ?? (options.app && options.appFileField?.(options.app)) ?? (options.app ? join(options.defaultDir, `${options.app.name}.yaml`) : options.defaultFileName);
|
|
3155
3077
|
}
|
|
3156
|
-
|
|
3157
|
-
//#region src/cli/createDomainConfigResolver.ts
|
|
3078
|
+
// src/cli/createDomainConfigResolver.ts
|
|
3158
3079
|
/**
|
|
3159
3080
|
* Factory that eliminates per-domain boilerplate for CLI config resolution.
|
|
3160
3081
|
*
|
|
@@ -3201,8 +3122,7 @@ function createDomainConfigResolver(options) {
|
|
|
3201
3122
|
resolveAppContainerConfig
|
|
3202
3123
|
};
|
|
3203
3124
|
}
|
|
3204
|
-
|
|
3205
|
-
//#region src/cli/actionConfig.ts
|
|
3125
|
+
// src/cli/actionConfig.ts
|
|
3206
3126
|
const ACTION_STATE_FILE = "action.yaml";
|
|
3207
3127
|
const actionArgs = {
|
|
3208
3128
|
...kintoneArgs,
|
|
@@ -3225,8 +3145,7 @@ const { resolveFilePath: resolveActionFilePath, resolveContainerConfig: resolveA
|
|
|
3225
3145
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
3226
3146
|
})
|
|
3227
3147
|
});
|
|
3228
|
-
|
|
3229
|
-
//#region src/cli/deprecation.ts
|
|
3148
|
+
// src/cli/deprecation.ts
|
|
3230
3149
|
/**
|
|
3231
3150
|
* Prints a one-line deprecation warning steering users from a legacy command to
|
|
3232
3151
|
* its pull/push successor. Emitted via `p.log.warn` so it stays a human-facing
|
|
@@ -3238,8 +3157,7 @@ function printDeprecationWarning(args) {
|
|
|
3238
3157
|
const head = `${pc.yellow("[deprecated]")} \`${oldCommand}\` is deprecated and will be removed in a future major version. Use \`${replacement}\` instead.`;
|
|
3239
3158
|
p.log.warn(note ? `${head}\n${pc.dim(note)}` : head);
|
|
3240
3159
|
}
|
|
3241
|
-
|
|
3242
|
-
//#region src/cli/commands/applyCommandFactory.ts
|
|
3160
|
+
// src/cli/commands/applyCommandFactory.ts
|
|
3243
3161
|
function createApplyCommand(config) {
|
|
3244
3162
|
async function runDiffPreview(containerConfig, diffPreview) {
|
|
3245
3163
|
const container = config.createContainer(containerConfig);
|
|
@@ -3385,8 +3303,7 @@ function createApplyCommand(config) {
|
|
|
3385
3303
|
}
|
|
3386
3304
|
});
|
|
3387
3305
|
}
|
|
3388
|
-
|
|
3389
|
-
//#region src/cli/commands/action/apply.ts
|
|
3306
|
+
// src/cli/commands/action/apply.ts
|
|
3390
3307
|
var apply_default$13 = createApplyCommand({
|
|
3391
3308
|
description: "Apply action settings from YAML to kintone app",
|
|
3392
3309
|
args: actionArgs,
|
|
@@ -3406,8 +3323,7 @@ var apply_default$13 = createApplyCommand({
|
|
|
3406
3323
|
resolveContainerConfig: resolveActionContainerConfig,
|
|
3407
3324
|
resolveAppContainerConfig: resolveActionAppContainerConfig
|
|
3408
3325
|
});
|
|
3409
|
-
|
|
3410
|
-
//#region src/core/domain/action/services/configSerializer.ts
|
|
3326
|
+
// src/core/domain/action/services/configSerializer.ts
|
|
3411
3327
|
function serializeDestApp(destApp) {
|
|
3412
3328
|
const result = {};
|
|
3413
3329
|
if (destApp.code !== void 0) result.code = destApp.code;
|
|
@@ -3444,8 +3360,7 @@ const ActionConfigSerializer = { serialize: (config) => {
|
|
|
3444
3360
|
serialized.actions = actions;
|
|
3445
3361
|
return serialized;
|
|
3446
3362
|
} };
|
|
3447
|
-
|
|
3448
|
-
//#region src/core/application/captureFromConfigBase.ts
|
|
3363
|
+
// src/core/application/captureFromConfigBase.ts
|
|
3449
3364
|
async function captureFromConfig(config) {
|
|
3450
3365
|
const remote = await config.fetchRemote();
|
|
3451
3366
|
return {
|
|
@@ -3453,8 +3368,7 @@ async function captureFromConfig(config) {
|
|
|
3453
3368
|
hasExistingConfig: (await config.getStorage()).exists
|
|
3454
3369
|
};
|
|
3455
3370
|
}
|
|
3456
|
-
|
|
3457
|
-
//#region src/core/application/stringifyConfig.ts
|
|
3371
|
+
// src/core/application/stringifyConfig.ts
|
|
3458
3372
|
function stringifyConfig(codec, data) {
|
|
3459
3373
|
try {
|
|
3460
3374
|
return codec.stringify(data);
|
|
@@ -3462,8 +3376,7 @@ function stringifyConfig(codec, data) {
|
|
|
3462
3376
|
throw new SystemError(SystemErrorCode.InternalServerError, `Failed to serialize config: ${cause instanceof Error ? cause.message : String(cause)}`, cause);
|
|
3463
3377
|
}
|
|
3464
3378
|
}
|
|
3465
|
-
|
|
3466
|
-
//#region src/core/application/action/captureAction.ts
|
|
3379
|
+
// src/core/application/action/captureAction.ts
|
|
3467
3380
|
async function captureAction({ container }) {
|
|
3468
3381
|
return captureFromConfig({
|
|
3469
3382
|
fetchRemote: () => container.actionConfigurator.getActions(),
|
|
@@ -3471,13 +3384,11 @@ async function captureAction({ container }) {
|
|
|
3471
3384
|
getStorage: () => container.actionStorage.get()
|
|
3472
3385
|
});
|
|
3473
3386
|
}
|
|
3474
|
-
|
|
3475
|
-
//#region src/core/application/action/saveAction.ts
|
|
3387
|
+
// src/core/application/action/saveAction.ts
|
|
3476
3388
|
async function saveAction({ container, input }) {
|
|
3477
3389
|
await container.actionStorage.update(input.configText);
|
|
3478
3390
|
}
|
|
3479
|
-
|
|
3480
|
-
//#region src/cli/commands/captureCommandFactory.ts
|
|
3391
|
+
// src/cli/commands/captureCommandFactory.ts
|
|
3481
3392
|
function createCaptureCommand(config) {
|
|
3482
3393
|
async function runCapture(containerConfig) {
|
|
3483
3394
|
const container = config.createContainer(containerConfig);
|
|
@@ -3530,8 +3441,7 @@ function createCaptureCommand(config) {
|
|
|
3530
3441
|
}
|
|
3531
3442
|
});
|
|
3532
3443
|
}
|
|
3533
|
-
|
|
3534
|
-
//#region src/cli/commands/action/capture.ts
|
|
3444
|
+
// src/cli/commands/action/capture.ts
|
|
3535
3445
|
var capture_default$14 = createCaptureCommand({
|
|
3536
3446
|
description: "Capture current action settings from kintone app to file",
|
|
3537
3447
|
args: actionArgs,
|
|
@@ -3550,8 +3460,7 @@ var capture_default$14 = createCaptureCommand({
|
|
|
3550
3460
|
resolveContainerConfig: resolveActionContainerConfig,
|
|
3551
3461
|
resolveAppContainerConfig: resolveActionAppContainerConfig
|
|
3552
3462
|
});
|
|
3553
|
-
|
|
3554
|
-
//#region src/core/domain/recordMerge.ts
|
|
3463
|
+
// src/core/domain/recordMerge.ts
|
|
3555
3464
|
function toMap$1(record) {
|
|
3556
3465
|
return new Map(Object.entries(record));
|
|
3557
3466
|
}
|
|
@@ -3584,8 +3493,7 @@ function resolveEntry(entry, resolution, errorCode) {
|
|
|
3584
3493
|
if (choice === void 0) throw new BusinessRuleError(errorCode, `Unresolved conflict for "${entry.key}"`);
|
|
3585
3494
|
return choice === "local" ? entry.local : entry.remote;
|
|
3586
3495
|
}
|
|
3587
|
-
|
|
3588
|
-
//#region src/core/domain/action/services/actionMerge.ts
|
|
3496
|
+
// src/core/domain/action/services/actionMerge.ts
|
|
3589
3497
|
/**
|
|
3590
3498
|
* Equality for two {@link ActionConfig} values, matching the 2-way
|
|
3591
3499
|
* diffDetector's `compareActions` "no changes" semantics: `index` and
|
|
@@ -3609,8 +3517,7 @@ function computeActionThreeWayMerge(base, local, remote) {
|
|
|
3609
3517
|
function resolveActionMerge(merge, resolution) {
|
|
3610
3518
|
return { actions: resolveRecordMerge(merge, resolution, ActionErrorCode.AcUnresolvedConflict) };
|
|
3611
3519
|
}
|
|
3612
|
-
|
|
3613
|
-
//#region src/core/application/threeWay/threeWayDiff.ts
|
|
3520
|
+
// src/core/application/threeWay/threeWayDiff.ts
|
|
3614
3521
|
/**
|
|
3615
3522
|
* Builds the three-way portion of a {@link ThreeWayDiffResult} from a
|
|
3616
3523
|
* record-keyed merge (view / report / action / plugin / customization / field
|
|
@@ -3693,8 +3600,7 @@ function buildSingleThreeWayDiff(merge, key) {
|
|
|
3693
3600
|
isEmpty: localChanges.length === 0 && remoteDrift.length === 0 && conflicts.length === 0
|
|
3694
3601
|
};
|
|
3695
3602
|
}
|
|
3696
|
-
|
|
3697
|
-
//#region src/core/domain/action/services/actionStateParser.ts
|
|
3603
|
+
// src/core/domain/action/services/actionStateParser.ts
|
|
3698
3604
|
/**
|
|
3699
3605
|
* Parses pre-parsed (codec-decoded) data into an {@link ActionState}.
|
|
3700
3606
|
*
|
|
@@ -3704,8 +3610,7 @@ function buildSingleThreeWayDiff(merge, key) {
|
|
|
3704
3610
|
* the application layer handles codec decoding before calling this.
|
|
3705
3611
|
*/
|
|
3706
3612
|
const ActionStateParser = { parse: (parsed) => ({ config: ActionConfigParser.parse(parsed) }) };
|
|
3707
|
-
|
|
3708
|
-
//#region src/core/domain/appRevision/services/appRevisionParser.ts
|
|
3613
|
+
// src/core/domain/appRevision/services/appRevisionParser.ts
|
|
3709
3614
|
/**
|
|
3710
3615
|
* Parses pre-parsed (codec-decoded) data into an {@link AppRevision}.
|
|
3711
3616
|
*
|
|
@@ -3719,8 +3624,7 @@ const AppRevisionParser = { parse: (parsed) => {
|
|
|
3719
3624
|
if (typeof revision !== "string" || revision.length === 0) throw new BusinessRuleError(AppRevisionErrorCode.ArInvalidStructure, "App revision must have a non-empty \"revision\" string");
|
|
3720
3625
|
return { revision };
|
|
3721
3626
|
} };
|
|
3722
|
-
|
|
3723
|
-
//#region src/core/domain/appRevision/services/appRevisionSerializer.ts
|
|
3627
|
+
// src/core/domain/appRevision/services/appRevisionSerializer.ts
|
|
3724
3628
|
/**
|
|
3725
3629
|
* Serializes an {@link AppRevision} to a plain object suitable for YAML
|
|
3726
3630
|
* stringification (via the codec port in the application layer).
|
|
@@ -3729,8 +3633,7 @@ const AppRevisionParser = { parse: (parsed) => {
|
|
|
3729
3633
|
* application layer handles codec encoding.
|
|
3730
3634
|
*/
|
|
3731
3635
|
const AppRevisionSerializer = { serialize: (appRevision) => ({ revision: appRevision.revision }) };
|
|
3732
|
-
|
|
3733
|
-
//#region src/core/application/appRevisionIo.ts
|
|
3636
|
+
// src/core/application/appRevisionIo.ts
|
|
3734
3637
|
/**
|
|
3735
3638
|
* Loads and parses the locally saved base app revision, or returns undefined
|
|
3736
3639
|
* when none exists yet (first run).
|
|
@@ -3746,8 +3649,7 @@ async function saveAppRevision(storage, codec, revision) {
|
|
|
3746
3649
|
const text = stringifyConfig(codec, AppRevisionSerializer.serialize({ revision }));
|
|
3747
3650
|
await storage.update(text);
|
|
3748
3651
|
}
|
|
3749
|
-
|
|
3750
|
-
//#region src/core/application/threeWay/stateIo.ts
|
|
3652
|
+
// src/core/application/threeWay/stateIo.ts
|
|
3751
3653
|
/**
|
|
3752
3654
|
* Loads and parses a domain snapshot state, or returns undefined when none
|
|
3753
3655
|
* exists (first run). Generic over the snapshot type `TSnapshot`.
|
|
@@ -3770,8 +3672,7 @@ async function saveSnapshotState(storage, codec, serialize, snapshot) {
|
|
|
3770
3672
|
const text = stringifyConfig(codec, serialize(snapshot));
|
|
3771
3673
|
await storage.update(text);
|
|
3772
3674
|
}
|
|
3773
|
-
|
|
3774
|
-
//#region src/core/application/threeWay/loadThreeWayInputs.ts
|
|
3675
|
+
// src/core/application/threeWay/loadThreeWayInputs.ts
|
|
3775
3676
|
/**
|
|
3776
3677
|
* Loads the base snapshot, the base app revision, the local config, and the
|
|
3777
3678
|
* remote config in parallel for a 3-way sync. Generic over the snapshot
|
|
@@ -3792,8 +3693,7 @@ async function loadThreeWayInputs$1(args) {
|
|
|
3792
3693
|
remote
|
|
3793
3694
|
};
|
|
3794
3695
|
}
|
|
3795
|
-
|
|
3796
|
-
//#region src/core/application/action/loadActionThreeWayInputs.ts
|
|
3696
|
+
// src/core/application/action/loadActionThreeWayInputs.ts
|
|
3797
3697
|
/**
|
|
3798
3698
|
* Loads the four inputs of a 3-way action sync (base snapshot, base app
|
|
3799
3699
|
* revision, local YAML, remote config + revision) via the generic
|
|
@@ -3822,8 +3722,7 @@ async function loadActionThreeWayInputs(container) {
|
|
|
3822
3722
|
}
|
|
3823
3723
|
});
|
|
3824
3724
|
}
|
|
3825
|
-
|
|
3826
|
-
//#region src/core/application/action/detectActionThreeWayDiff.ts
|
|
3725
|
+
// src/core/application/action/detectActionThreeWayDiff.ts
|
|
3827
3726
|
/**
|
|
3828
3727
|
* Detects action differences with 3-way awareness.
|
|
3829
3728
|
*
|
|
@@ -3844,8 +3743,7 @@ async function detectActionThreeWayDiff({ container }) {
|
|
|
3844
3743
|
return action.destApp.app ?? action.destApp.code ?? "(unspecified)";
|
|
3845
3744
|
});
|
|
3846
3745
|
}
|
|
3847
|
-
|
|
3848
|
-
//#region src/cli/commands/action/diff.ts
|
|
3746
|
+
// src/cli/commands/action/diff.ts
|
|
3849
3747
|
async function runDiff$12(containerConfig) {
|
|
3850
3748
|
const container = createActionCliContainer(containerConfig);
|
|
3851
3749
|
const s = p.spinner();
|
|
@@ -3885,8 +3783,7 @@ var diff_default$13 = define({
|
|
|
3885
3783
|
}
|
|
3886
3784
|
}
|
|
3887
3785
|
});
|
|
3888
|
-
|
|
3889
|
-
//#region src/core/domain/action/services/actionStateSerializer.ts
|
|
3786
|
+
// src/core/domain/action/services/actionStateSerializer.ts
|
|
3890
3787
|
/**
|
|
3891
3788
|
* Serializes an {@link ActionState} to a plain object suitable for YAML
|
|
3892
3789
|
* stringification (via the codec port in the application layer).
|
|
@@ -3897,8 +3794,7 @@ var diff_default$13 = define({
|
|
|
3897
3794
|
* persisted separately via `AppRevisionStorage`.
|
|
3898
3795
|
*/
|
|
3899
3796
|
const ActionStateSerializer = { serialize: (state) => ActionConfigSerializer.serialize(state.config) };
|
|
3900
|
-
|
|
3901
|
-
//#region src/core/application/action/actionStateIo.ts
|
|
3797
|
+
// src/core/application/action/actionStateIo.ts
|
|
3902
3798
|
/**
|
|
3903
3799
|
* Persists the new base: the actions snapshot (state file) and the app revision
|
|
3904
3800
|
* (`state/<appName>/revision.yaml`) side by side. The two writes are kept
|
|
@@ -3908,8 +3804,7 @@ async function saveActionSnapshotAndRevision(container, config, revision) {
|
|
|
3908
3804
|
await saveSnapshotState(container.actionStateStorage, container.configCodec, ActionStateSerializer.serialize, { config });
|
|
3909
3805
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
3910
3806
|
}
|
|
3911
|
-
|
|
3912
|
-
//#region src/core/application/action/pullAction.ts
|
|
3807
|
+
// src/core/application/action/pullAction.ts
|
|
3913
3808
|
function serializeActions(container, config) {
|
|
3914
3809
|
return stringifyConfig(container.configCodec, ActionConfigSerializer.serialize(config));
|
|
3915
3810
|
}
|
|
@@ -3957,8 +3852,7 @@ async function applyPulledActionMerge({ container, input }) {
|
|
|
3957
3852
|
await saveActionSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
3958
3853
|
return { configText };
|
|
3959
3854
|
}
|
|
3960
|
-
|
|
3961
|
-
//#region src/cli/commands/pullCommandFactory.ts
|
|
3855
|
+
// src/cli/commands/pullCommandFactory.ts
|
|
3962
3856
|
/**
|
|
3963
3857
|
* Names a conflict as the 3-way diff line does ({@link frameThreeWayKey}), for
|
|
3964
3858
|
* domains whose keys embed values quoted in display (see
|
|
@@ -4104,8 +3998,7 @@ function createPullCommand(config) {
|
|
|
4104
3998
|
function capitalize(s) {
|
|
4105
3999
|
return s.length === 0 ? s : s[0].toUpperCase() + s.slice(1);
|
|
4106
4000
|
}
|
|
4107
|
-
|
|
4108
|
-
//#region src/cli/commands/action/pull.ts
|
|
4001
|
+
// src/cli/commands/action/pull.ts
|
|
4109
4002
|
var pull_default$13 = createPullCommand({
|
|
4110
4003
|
description: "Pull remote actions into the local action config (3-way merge)",
|
|
4111
4004
|
args: actionArgs,
|
|
@@ -4141,8 +4034,7 @@ var pull_default$13 = createPullCommand({
|
|
|
4141
4034
|
resolveContainerConfig: resolveActionContainerConfig,
|
|
4142
4035
|
resolveAppContainerConfig: resolveActionAppContainerConfig
|
|
4143
4036
|
});
|
|
4144
|
-
|
|
4145
|
-
//#region src/core/application/threeWay/driftConflict.ts
|
|
4037
|
+
// src/core/application/threeWay/driftConflict.ts
|
|
4146
4038
|
/**
|
|
4147
4039
|
* Builds the standard "remote drifted, pull first" message for a domain.
|
|
4148
4040
|
*
|
|
@@ -4168,8 +4060,7 @@ function buildDriftConflict(pullCommand, extraHint) {
|
|
|
4168
4060
|
const message = buildDriftMessage(pullCommand);
|
|
4169
4061
|
return new ConflictError(ConflictErrorCode.ConfigDrift, extraHint === void 0 ? message : `${message}\n${extraHint}`);
|
|
4170
4062
|
}
|
|
4171
|
-
|
|
4172
|
-
//#region src/core/application/action/pushAction.ts
|
|
4063
|
+
// src/core/application/action/pushAction.ts
|
|
4173
4064
|
/** Pull command name surfaced in the drift hint message. */
|
|
4174
4065
|
const ACTION_PULL_COMMAND = "action pull";
|
|
4175
4066
|
/**
|
|
@@ -4205,8 +4096,7 @@ async function pushAction({ container, input }) {
|
|
|
4205
4096
|
revision: newRevision
|
|
4206
4097
|
};
|
|
4207
4098
|
}
|
|
4208
|
-
|
|
4209
|
-
//#region src/cli/commands/pushCommandFactory.ts
|
|
4099
|
+
// src/cli/commands/pushCommandFactory.ts
|
|
4210
4100
|
/**
|
|
4211
4101
|
* Factory for `push` commands.
|
|
4212
4102
|
*
|
|
@@ -4282,8 +4172,7 @@ function createPushCommand(config) {
|
|
|
4282
4172
|
}
|
|
4283
4173
|
});
|
|
4284
4174
|
}
|
|
4285
|
-
|
|
4286
|
-
//#region src/cli/commands/action/push.ts
|
|
4175
|
+
// src/cli/commands/action/push.ts
|
|
4287
4176
|
var push_default$14 = createPushCommand({
|
|
4288
4177
|
description: "Push the local action config to kintone (with drift detection)",
|
|
4289
4178
|
args: actionArgs,
|
|
@@ -4298,8 +4187,7 @@ var push_default$14 = createPushCommand({
|
|
|
4298
4187
|
resolveContainerConfig: resolveActionContainerConfig,
|
|
4299
4188
|
resolveAppContainerConfig: resolveActionAppContainerConfig
|
|
4300
4189
|
});
|
|
4301
|
-
|
|
4302
|
-
//#region src/cli/commands/action/index.ts
|
|
4190
|
+
// src/cli/commands/action/index.ts
|
|
4303
4191
|
var action_default = define({
|
|
4304
4192
|
name: "action",
|
|
4305
4193
|
description: "Manage kintone action settings",
|
|
@@ -4312,8 +4200,7 @@ var action_default = define({
|
|
|
4312
4200
|
},
|
|
4313
4201
|
run: () => {}
|
|
4314
4202
|
});
|
|
4315
|
-
|
|
4316
|
-
//#region src/core/domain/adminNotes/services/configParser.ts
|
|
4203
|
+
// src/core/domain/adminNotes/services/configParser.ts
|
|
4317
4204
|
const AdminNotesConfigParser = { parse: (parsed) => {
|
|
4318
4205
|
const obj = validateParsedConfig(parsed, AdminNotesErrorCode.AnInvalidConfigStructure, "Admin notes");
|
|
4319
4206
|
if (typeof obj.content !== "string") throw new BusinessRuleError(AdminNotesErrorCode.AnInvalidConfigStructure, "Config must have a \"content\" string property");
|
|
@@ -4323,14 +4210,12 @@ const AdminNotesConfigParser = { parse: (parsed) => {
|
|
|
4323
4210
|
includeInTemplateAndDuplicates: obj.includeInTemplateAndDuplicates
|
|
4324
4211
|
};
|
|
4325
4212
|
} };
|
|
4326
|
-
|
|
4327
|
-
//#region src/core/application/adminNotes/parseConfig.ts
|
|
4213
|
+
// src/core/application/adminNotes/parseConfig.ts
|
|
4328
4214
|
function parseAdminNotesConfigText(codec, rawText) {
|
|
4329
4215
|
const parsed = parseConfigText(codec, rawText, "Admin notes");
|
|
4330
4216
|
return wrapBusinessRuleError(() => AdminNotesConfigParser.parse(parsed));
|
|
4331
4217
|
}
|
|
4332
|
-
|
|
4333
|
-
//#region src/core/application/adminNotes/applyAdminNotes.ts
|
|
4218
|
+
// src/core/application/adminNotes/applyAdminNotes.ts
|
|
4334
4219
|
async function applyAdminNotes({ container }) {
|
|
4335
4220
|
await applyFromConfig({
|
|
4336
4221
|
getStorage: () => container.adminNotesStorage.get(),
|
|
@@ -4345,8 +4230,7 @@ async function applyAdminNotes({ container }) {
|
|
|
4345
4230
|
notFoundMessage: "Admin notes config file not found"
|
|
4346
4231
|
});
|
|
4347
4232
|
}
|
|
4348
|
-
|
|
4349
|
-
//#region src/core/domain/adminNotes/services/diffDetector.ts
|
|
4233
|
+
// src/core/domain/adminNotes/services/diffDetector.ts
|
|
4350
4234
|
const CONTENT_TRUNCATE_LENGTH = 30;
|
|
4351
4235
|
function formatContentPreview(text, maxLength) {
|
|
4352
4236
|
const codePoints = Array.from(text);
|
|
@@ -4370,8 +4254,7 @@ function compareConfigs$2(local, remote) {
|
|
|
4370
4254
|
const AdminNotesDiffDetector = { detect: (local, remote) => {
|
|
4371
4255
|
return buildDiffResult(compareConfigs$2(local, remote));
|
|
4372
4256
|
} };
|
|
4373
|
-
|
|
4374
|
-
//#region src/core/application/adminNotes/detectAdminNotesDiff.ts
|
|
4257
|
+
// src/core/application/adminNotes/detectAdminNotesDiff.ts
|
|
4375
4258
|
async function detectAdminNotesDiff({ container }) {
|
|
4376
4259
|
return detectDiffFromConfig({
|
|
4377
4260
|
getStorage: () => container.adminNotesStorage.get(),
|
|
@@ -4381,8 +4264,7 @@ async function detectAdminNotesDiff({ container }) {
|
|
|
4381
4264
|
notFoundMessage: "Admin notes config file not found"
|
|
4382
4265
|
});
|
|
4383
4266
|
}
|
|
4384
|
-
|
|
4385
|
-
//#region src/core/adapters/kintone/adminNotesConfigurator.ts
|
|
4267
|
+
// src/core/adapters/kintone/adminNotesConfigurator.ts
|
|
4386
4268
|
var KintoneAdminNotesConfigurator = class {
|
|
4387
4269
|
client;
|
|
4388
4270
|
appId;
|
|
@@ -4421,18 +4303,15 @@ var KintoneAdminNotesConfigurator = class {
|
|
|
4421
4303
|
}
|
|
4422
4304
|
}
|
|
4423
4305
|
};
|
|
4424
|
-
|
|
4425
|
-
//#region src/core/adapters/local/adminNotesStateStorage.ts
|
|
4306
|
+
// src/core/adapters/local/adminNotesStateStorage.ts
|
|
4426
4307
|
function createLocalFileAdminNotesStateStorage(filePath) {
|
|
4427
4308
|
return createLocalFileStorage(filePath, "admin notes state file");
|
|
4428
4309
|
}
|
|
4429
|
-
|
|
4430
|
-
//#region src/core/adapters/local/adminNotesStorage.ts
|
|
4310
|
+
// src/core/adapters/local/adminNotesStorage.ts
|
|
4431
4311
|
function createLocalFileAdminNotesStorage(filePath) {
|
|
4432
4312
|
return createLocalFileStorage(filePath, "admin notes file");
|
|
4433
4313
|
}
|
|
4434
|
-
|
|
4435
|
-
//#region src/core/application/container/adminNotesCli.ts
|
|
4314
|
+
// src/core/application/container/adminNotesCli.ts
|
|
4436
4315
|
function createAdminNotesCliContainer(config) {
|
|
4437
4316
|
const client = config.client ?? createKintoneClient(config);
|
|
4438
4317
|
return {
|
|
@@ -4445,8 +4324,7 @@ function createAdminNotesCliContainer(config) {
|
|
|
4445
4324
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
4446
4325
|
};
|
|
4447
4326
|
}
|
|
4448
|
-
|
|
4449
|
-
//#region src/cli/adminNotesConfig.ts
|
|
4327
|
+
// src/cli/adminNotesConfig.ts
|
|
4450
4328
|
const ADMIN_NOTES_STATE_FILE = "admin-notes.yaml";
|
|
4451
4329
|
const adminNotesArgs = {
|
|
4452
4330
|
...kintoneArgs,
|
|
@@ -4469,8 +4347,7 @@ const { resolveFilePath: resolveAdminNotesFilePath, resolveContainerConfig: reso
|
|
|
4469
4347
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
4470
4348
|
})
|
|
4471
4349
|
});
|
|
4472
|
-
|
|
4473
|
-
//#region src/cli/commands/admin-notes/apply.ts
|
|
4350
|
+
// src/cli/commands/admin-notes/apply.ts
|
|
4474
4351
|
var apply_default$12 = createApplyCommand({
|
|
4475
4352
|
description: "Apply admin notes from YAML to kintone app",
|
|
4476
4353
|
args: adminNotesArgs,
|
|
@@ -4490,16 +4367,14 @@ var apply_default$12 = createApplyCommand({
|
|
|
4490
4367
|
resolveContainerConfig: resolveAdminNotesContainerConfig,
|
|
4491
4368
|
resolveAppContainerConfig: resolveAdminNotesAppContainerConfig
|
|
4492
4369
|
});
|
|
4493
|
-
|
|
4494
|
-
//#region src/core/domain/adminNotes/services/configSerializer.ts
|
|
4370
|
+
// src/core/domain/adminNotes/services/configSerializer.ts
|
|
4495
4371
|
const AdminNotesConfigSerializer = { serialize: (config) => {
|
|
4496
4372
|
return {
|
|
4497
4373
|
content: config.content,
|
|
4498
4374
|
includeInTemplateAndDuplicates: config.includeInTemplateAndDuplicates
|
|
4499
4375
|
};
|
|
4500
4376
|
} };
|
|
4501
|
-
|
|
4502
|
-
//#region src/core/application/adminNotes/captureAdminNotes.ts
|
|
4377
|
+
// src/core/application/adminNotes/captureAdminNotes.ts
|
|
4503
4378
|
async function captureAdminNotes({ container }) {
|
|
4504
4379
|
return captureFromConfig({
|
|
4505
4380
|
fetchRemote: () => container.adminNotesConfigurator.getAdminNotes(),
|
|
@@ -4507,13 +4382,11 @@ async function captureAdminNotes({ container }) {
|
|
|
4507
4382
|
getStorage: () => container.adminNotesStorage.get()
|
|
4508
4383
|
});
|
|
4509
4384
|
}
|
|
4510
|
-
|
|
4511
|
-
//#region src/core/application/adminNotes/saveAdminNotes.ts
|
|
4385
|
+
// src/core/application/adminNotes/saveAdminNotes.ts
|
|
4512
4386
|
async function saveAdminNotes({ container, input }) {
|
|
4513
4387
|
await container.adminNotesStorage.update(input.configText);
|
|
4514
4388
|
}
|
|
4515
|
-
|
|
4516
|
-
//#region src/cli/commands/admin-notes/capture.ts
|
|
4389
|
+
// src/cli/commands/admin-notes/capture.ts
|
|
4517
4390
|
var capture_default$13 = createCaptureCommand({
|
|
4518
4391
|
description: "Capture current admin notes from kintone app to file",
|
|
4519
4392
|
args: adminNotesArgs,
|
|
@@ -4532,8 +4405,7 @@ var capture_default$13 = createCaptureCommand({
|
|
|
4532
4405
|
resolveContainerConfig: resolveAdminNotesContainerConfig,
|
|
4533
4406
|
resolveAppContainerConfig: resolveAdminNotesAppContainerConfig
|
|
4534
4407
|
});
|
|
4535
|
-
|
|
4536
|
-
//#region src/core/domain/singleMerge.ts
|
|
4408
|
+
// src/core/domain/singleMerge.ts
|
|
4537
4409
|
/** Classifies a single whole-entity config across base/local/remote. */
|
|
4538
4410
|
function computeSingleThreeWayMerge(base, local, remote, eq) {
|
|
4539
4411
|
const dl = !eq(base, local);
|
|
@@ -4578,8 +4450,7 @@ function resolveSingleMerge(merge, resolution, errorCode) {
|
|
|
4578
4450
|
if (resolution === void 0) throw new BusinessRuleError(errorCode, "Unresolved conflict");
|
|
4579
4451
|
return resolution === "local" ? merge.local : merge.remote;
|
|
4580
4452
|
}
|
|
4581
|
-
|
|
4582
|
-
//#region src/core/domain/adminNotes/services/adminNotesMerge.ts
|
|
4453
|
+
// src/core/domain/adminNotes/services/adminNotesMerge.ts
|
|
4583
4454
|
/**
|
|
4584
4455
|
* Equality for two {@link AdminNotesConfig} values, reusing the 2-way
|
|
4585
4456
|
* diffDetector's "no changes" semantics (`content` + `includeInTemplateAnd
|
|
@@ -4602,8 +4473,7 @@ function computeAdminNotesThreeWayMerge(base, local, remote) {
|
|
|
4602
4473
|
function resolveAdminNotesMerge(merge, resolution) {
|
|
4603
4474
|
return resolveSingleMerge(merge, resolution, AdminNotesErrorCode.AnUnresolvedConflict);
|
|
4604
4475
|
}
|
|
4605
|
-
|
|
4606
|
-
//#region src/core/domain/adminNotes/services/adminNotesStateParser.ts
|
|
4476
|
+
// src/core/domain/adminNotes/services/adminNotesStateParser.ts
|
|
4607
4477
|
/**
|
|
4608
4478
|
* Parses pre-parsed (codec-decoded) data into an {@link AdminNotesState}.
|
|
4609
4479
|
*
|
|
@@ -4613,8 +4483,7 @@ function resolveAdminNotesMerge(merge, resolution) {
|
|
|
4613
4483
|
* YAML; the application layer handles codec decoding before calling this.
|
|
4614
4484
|
*/
|
|
4615
4485
|
const AdminNotesStateParser = { parse: (parsed) => ({ config: AdminNotesConfigParser.parse(parsed) }) };
|
|
4616
|
-
|
|
4617
|
-
//#region src/core/application/adminNotes/loadAdminNotesThreeWayInputs.ts
|
|
4486
|
+
// src/core/application/adminNotes/loadAdminNotesThreeWayInputs.ts
|
|
4618
4487
|
/**
|
|
4619
4488
|
* Loads the four inputs of a 3-way admin notes sync (base snapshot, base app
|
|
4620
4489
|
* revision, local YAML, remote config + revision) via the generic
|
|
@@ -4642,8 +4511,7 @@ async function loadAdminNotesThreeWayInputs(container) {
|
|
|
4642
4511
|
}
|
|
4643
4512
|
});
|
|
4644
4513
|
}
|
|
4645
|
-
|
|
4646
|
-
//#region src/core/application/adminNotes/detectAdminNotesThreeWayDiff.ts
|
|
4514
|
+
// src/core/application/adminNotes/detectAdminNotesThreeWayDiff.ts
|
|
4647
4515
|
/** Fixed key/label for the whole-entity admin notes diff entry. */
|
|
4648
4516
|
const ADMIN_NOTES_DIFF_KEY = "admin-notes";
|
|
4649
4517
|
/**
|
|
@@ -4659,8 +4527,7 @@ async function detectAdminNotesThreeWayDiff({ container }) {
|
|
|
4659
4527
|
};
|
|
4660
4528
|
return buildSingleThreeWayDiff(computeAdminNotesThreeWayMerge(state, local, remote.config), ADMIN_NOTES_DIFF_KEY);
|
|
4661
4529
|
}
|
|
4662
|
-
|
|
4663
|
-
//#region src/cli/commands/admin-notes/diff.ts
|
|
4530
|
+
// src/cli/commands/admin-notes/diff.ts
|
|
4664
4531
|
async function runDiff$11(containerConfig) {
|
|
4665
4532
|
const container = createAdminNotesCliContainer(containerConfig);
|
|
4666
4533
|
const s = p.spinner();
|
|
@@ -4700,8 +4567,7 @@ var diff_default$12 = define({
|
|
|
4700
4567
|
}
|
|
4701
4568
|
}
|
|
4702
4569
|
});
|
|
4703
|
-
|
|
4704
|
-
//#region src/core/domain/adminNotes/services/adminNotesStateSerializer.ts
|
|
4570
|
+
// src/core/domain/adminNotes/services/adminNotesStateSerializer.ts
|
|
4705
4571
|
/**
|
|
4706
4572
|
* Serializes an {@link AdminNotesState} to a plain object suitable for YAML
|
|
4707
4573
|
* stringification (via the codec port in the application layer).
|
|
@@ -4712,8 +4578,7 @@ var diff_default$12 = define({
|
|
|
4712
4578
|
* is persisted separately via `AppRevisionStorage`.
|
|
4713
4579
|
*/
|
|
4714
4580
|
const AdminNotesStateSerializer = { serialize: (state) => AdminNotesConfigSerializer.serialize(state.config) };
|
|
4715
|
-
|
|
4716
|
-
//#region src/core/application/adminNotes/adminNotesStateIo.ts
|
|
4581
|
+
// src/core/application/adminNotes/adminNotesStateIo.ts
|
|
4717
4582
|
/**
|
|
4718
4583
|
* Persists the new base: the admin notes snapshot (state file) and the app
|
|
4719
4584
|
* revision (`state/<appName>/revision.yaml`) side by side. The two writes are
|
|
@@ -4723,8 +4588,7 @@ async function saveAdminNotesSnapshotAndRevision(container, config, revision) {
|
|
|
4723
4588
|
await saveSnapshotState(container.adminNotesStateStorage, container.configCodec, AdminNotesStateSerializer.serialize, { config });
|
|
4724
4589
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
4725
4590
|
}
|
|
4726
|
-
|
|
4727
|
-
//#region src/core/application/adminNotes/pullAdminNotes.ts
|
|
4591
|
+
// src/core/application/adminNotes/pullAdminNotes.ts
|
|
4728
4592
|
function serializeAdminNotes(container, config) {
|
|
4729
4593
|
return stringifyConfig(container.configCodec, AdminNotesConfigSerializer.serialize(config));
|
|
4730
4594
|
}
|
|
@@ -4763,8 +4627,7 @@ async function applyPulledAdminNotesMerge({ container, input }) {
|
|
|
4763
4627
|
await saveAdminNotesSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
4764
4628
|
return { configText };
|
|
4765
4629
|
}
|
|
4766
|
-
|
|
4767
|
-
//#region src/cli/commands/admin-notes/pull.ts
|
|
4630
|
+
// src/cli/commands/admin-notes/pull.ts
|
|
4768
4631
|
/** Fixed conflict key for the single (whole-entity) admin notes config. */
|
|
4769
4632
|
const ADMIN_NOTES_CONFLICT_KEY = "admin-notes";
|
|
4770
4633
|
var pull_default$12 = createPullCommand({
|
|
@@ -4802,8 +4665,7 @@ var pull_default$12 = createPullCommand({
|
|
|
4802
4665
|
resolveContainerConfig: resolveAdminNotesContainerConfig,
|
|
4803
4666
|
resolveAppContainerConfig: resolveAdminNotesAppContainerConfig
|
|
4804
4667
|
});
|
|
4805
|
-
|
|
4806
|
-
//#region src/core/application/adminNotes/pushAdminNotes.ts
|
|
4668
|
+
// src/core/application/adminNotes/pushAdminNotes.ts
|
|
4807
4669
|
/** Pull command name surfaced in the drift hint message. */
|
|
4808
4670
|
const ADMIN_NOTES_PULL_COMMAND = "admin-notes pull";
|
|
4809
4671
|
/**
|
|
@@ -4829,8 +4691,7 @@ async function pushAdminNotes({ container, input }) {
|
|
|
4829
4691
|
revision: newRevision
|
|
4830
4692
|
};
|
|
4831
4693
|
}
|
|
4832
|
-
|
|
4833
|
-
//#region src/cli/commands/admin-notes/push.ts
|
|
4694
|
+
// src/cli/commands/admin-notes/push.ts
|
|
4834
4695
|
var push_default$13 = createPushCommand({
|
|
4835
4696
|
description: "Push the local admin notes config to kintone (with drift detection)",
|
|
4836
4697
|
args: adminNotesArgs,
|
|
@@ -4845,8 +4706,7 @@ var push_default$13 = createPushCommand({
|
|
|
4845
4706
|
resolveContainerConfig: resolveAdminNotesContainerConfig,
|
|
4846
4707
|
resolveAppContainerConfig: resolveAdminNotesAppContainerConfig
|
|
4847
4708
|
});
|
|
4848
|
-
|
|
4849
|
-
//#region src/cli/commands/admin-notes/index.ts
|
|
4709
|
+
// src/cli/commands/admin-notes/index.ts
|
|
4850
4710
|
var admin_notes_default = define({
|
|
4851
4711
|
name: "admin-notes",
|
|
4852
4712
|
description: "Manage kintone admin notes",
|
|
@@ -4859,8 +4719,7 @@ var admin_notes_default = define({
|
|
|
4859
4719
|
},
|
|
4860
4720
|
run: () => {}
|
|
4861
4721
|
});
|
|
4862
|
-
|
|
4863
|
-
//#region src/core/domain/appPermission/services/configParser.ts
|
|
4722
|
+
// src/core/domain/appPermission/services/configParser.ts
|
|
4864
4723
|
const VALID_ENTITY_TYPES$8 = /* @__PURE__ */ new Set([
|
|
4865
4724
|
"USER",
|
|
4866
4725
|
"GROUP",
|
|
@@ -4900,14 +4759,12 @@ const AppPermissionConfigParser = { parse: (parsed) => {
|
|
|
4900
4759
|
}
|
|
4901
4760
|
return { rights };
|
|
4902
4761
|
} };
|
|
4903
|
-
|
|
4904
|
-
//#region src/core/application/appPermission/parseConfig.ts
|
|
4762
|
+
// src/core/application/appPermission/parseConfig.ts
|
|
4905
4763
|
function parseAppPermissionConfigText(codec, rawText) {
|
|
4906
4764
|
const parsed = parseConfigText(codec, rawText, "App permission");
|
|
4907
4765
|
return wrapBusinessRuleError(() => AppPermissionConfigParser.parse(parsed));
|
|
4908
4766
|
}
|
|
4909
|
-
|
|
4910
|
-
//#region src/core/application/appPermission/applyAppPermission.ts
|
|
4767
|
+
// src/core/application/appPermission/applyAppPermission.ts
|
|
4911
4768
|
async function applyAppPermission({ container }) {
|
|
4912
4769
|
await applyFromConfig({
|
|
4913
4770
|
getStorage: () => container.appPermissionStorage.get(),
|
|
@@ -4922,8 +4779,7 @@ async function applyAppPermission({ container }) {
|
|
|
4922
4779
|
notFoundMessage: "App permission config file not found"
|
|
4923
4780
|
});
|
|
4924
4781
|
}
|
|
4925
|
-
|
|
4926
|
-
//#region src/core/domain/appPermission/services/diffDetector.ts
|
|
4782
|
+
// src/core/domain/appPermission/services/diffDetector.ts
|
|
4927
4783
|
const BOOLEAN_FLAGS$1 = [
|
|
4928
4784
|
"includeSubs",
|
|
4929
4785
|
"appEditable",
|
|
@@ -4973,8 +4829,7 @@ const AppPermissionDiffDetector = { detect: (local, remote) => {
|
|
|
4973
4829
|
});
|
|
4974
4830
|
return buildDiffResult(entries);
|
|
4975
4831
|
} };
|
|
4976
|
-
|
|
4977
|
-
//#region src/core/application/appPermission/detectAppPermissionDiff.ts
|
|
4832
|
+
// src/core/application/appPermission/detectAppPermissionDiff.ts
|
|
4978
4833
|
async function detectAppPermissionDiff({ container }) {
|
|
4979
4834
|
return detectDiffFromConfig({
|
|
4980
4835
|
getStorage: () => container.appPermissionStorage.get(),
|
|
@@ -4984,8 +4839,7 @@ async function detectAppPermissionDiff({ container }) {
|
|
|
4984
4839
|
notFoundMessage: "App permission config file not found"
|
|
4985
4840
|
});
|
|
4986
4841
|
}
|
|
4987
|
-
|
|
4988
|
-
//#region src/core/adapters/kintone/appPermissionConfigurator.ts
|
|
4842
|
+
// src/core/adapters/kintone/appPermissionConfigurator.ts
|
|
4989
4843
|
const VALID_ENTITY_TYPES$7 = /* @__PURE__ */ new Set([
|
|
4990
4844
|
"USER",
|
|
4991
4845
|
"GROUP",
|
|
@@ -5066,18 +4920,15 @@ var KintoneAppPermissionConfigurator = class {
|
|
|
5066
4920
|
}
|
|
5067
4921
|
}
|
|
5068
4922
|
};
|
|
5069
|
-
|
|
5070
|
-
//#region src/core/adapters/local/appPermissionStateStorage.ts
|
|
4923
|
+
// src/core/adapters/local/appPermissionStateStorage.ts
|
|
5071
4924
|
function createLocalFileAppPermissionStateStorage(filePath) {
|
|
5072
4925
|
return createLocalFileStorage(filePath, "app permission state file");
|
|
5073
4926
|
}
|
|
5074
|
-
|
|
5075
|
-
//#region src/core/adapters/local/appPermissionStorage.ts
|
|
4927
|
+
// src/core/adapters/local/appPermissionStorage.ts
|
|
5076
4928
|
function createLocalFileAppPermissionStorage(filePath) {
|
|
5077
4929
|
return createLocalFileStorage(filePath, "app permission file");
|
|
5078
4930
|
}
|
|
5079
|
-
|
|
5080
|
-
//#region src/core/application/container/appPermissionCli.ts
|
|
4931
|
+
// src/core/application/container/appPermissionCli.ts
|
|
5081
4932
|
function createAppPermissionCliContainer(config) {
|
|
5082
4933
|
const client = config.client ?? createKintoneClient(config);
|
|
5083
4934
|
return {
|
|
@@ -5090,8 +4941,7 @@ function createAppPermissionCliContainer(config) {
|
|
|
5090
4941
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
5091
4942
|
};
|
|
5092
4943
|
}
|
|
5093
|
-
|
|
5094
|
-
//#region src/cli/appAclConfig.ts
|
|
4944
|
+
// src/cli/appAclConfig.ts
|
|
5095
4945
|
const APP_ACL_STATE_FILE = "app-acl.yaml";
|
|
5096
4946
|
const appAclArgs = {
|
|
5097
4947
|
...kintoneArgs,
|
|
@@ -5114,8 +4964,7 @@ const { resolveFilePath: resolveAppAclFilePath, resolveContainerConfig: resolveA
|
|
|
5114
4964
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
5115
4965
|
})
|
|
5116
4966
|
});
|
|
5117
|
-
|
|
5118
|
-
//#region src/cli/commands/app-acl/apply.ts
|
|
4967
|
+
// src/cli/commands/app-acl/apply.ts
|
|
5119
4968
|
var apply_default$11 = createApplyCommand({
|
|
5120
4969
|
description: "Apply app access permissions from YAML to kintone app",
|
|
5121
4970
|
args: appAclArgs,
|
|
@@ -5135,8 +4984,7 @@ var apply_default$11 = createApplyCommand({
|
|
|
5135
4984
|
resolveContainerConfig: resolveAppAclContainerConfig,
|
|
5136
4985
|
resolveAppContainerConfig: resolveAppAclAppContainerConfig
|
|
5137
4986
|
});
|
|
5138
|
-
|
|
5139
|
-
//#region src/core/domain/appPermission/services/configSerializer.ts
|
|
4987
|
+
// src/core/domain/appPermission/services/configSerializer.ts
|
|
5140
4988
|
function serializeAppRight(right) {
|
|
5141
4989
|
return {
|
|
5142
4990
|
entity: {
|
|
@@ -5156,8 +5004,7 @@ function serializeAppRight(right) {
|
|
|
5156
5004
|
const AppPermissionConfigSerializer = { serialize: (config) => {
|
|
5157
5005
|
return { rights: config.rights.map(serializeAppRight) };
|
|
5158
5006
|
} };
|
|
5159
|
-
|
|
5160
|
-
//#region src/core/application/appPermission/captureAppPermission.ts
|
|
5007
|
+
// src/core/application/appPermission/captureAppPermission.ts
|
|
5161
5008
|
async function captureAppPermission({ container }) {
|
|
5162
5009
|
return captureFromConfig({
|
|
5163
5010
|
fetchRemote: () => container.appPermissionConfigurator.getAppPermissions(),
|
|
@@ -5165,13 +5012,11 @@ async function captureAppPermission({ container }) {
|
|
|
5165
5012
|
getStorage: () => container.appPermissionStorage.get()
|
|
5166
5013
|
});
|
|
5167
5014
|
}
|
|
5168
|
-
|
|
5169
|
-
//#region src/core/application/appPermission/saveAppPermission.ts
|
|
5015
|
+
// src/core/application/appPermission/saveAppPermission.ts
|
|
5170
5016
|
async function saveAppPermission({ container, input }) {
|
|
5171
5017
|
await container.appPermissionStorage.update(input.configText);
|
|
5172
5018
|
}
|
|
5173
|
-
|
|
5174
|
-
//#region src/cli/commands/app-acl/capture.ts
|
|
5019
|
+
// src/cli/commands/app-acl/capture.ts
|
|
5175
5020
|
var capture_default$12 = createCaptureCommand({
|
|
5176
5021
|
description: "Capture current app access permissions from kintone app to file",
|
|
5177
5022
|
args: appAclArgs,
|
|
@@ -5190,8 +5035,7 @@ var capture_default$12 = createCaptureCommand({
|
|
|
5190
5035
|
resolveContainerConfig: resolveAppAclContainerConfig,
|
|
5191
5036
|
resolveAppContainerConfig: resolveAppAclAppContainerConfig
|
|
5192
5037
|
});
|
|
5193
|
-
|
|
5194
|
-
//#region src/core/domain/appPermission/services/appPermissionMerge.ts
|
|
5038
|
+
// src/core/domain/appPermission/services/appPermissionMerge.ts
|
|
5195
5039
|
/**
|
|
5196
5040
|
* 3-way merge for the app permission domain (app-acl).
|
|
5197
5041
|
*
|
|
@@ -5242,8 +5086,7 @@ function resolveAppPermissionMerge(merge, resolution) {
|
|
|
5242
5086
|
const record = resolveRecordMerge(merge, resolution, AppPermissionErrorCode.ApUnresolvedConflict);
|
|
5243
5087
|
return { rights: Object.values(record) };
|
|
5244
5088
|
}
|
|
5245
|
-
|
|
5246
|
-
//#region src/core/domain/appPermission/services/appPermissionStateParser.ts
|
|
5089
|
+
// src/core/domain/appPermission/services/appPermissionStateParser.ts
|
|
5247
5090
|
/**
|
|
5248
5091
|
* Parses pre-parsed (codec-decoded) data into an {@link AppPermissionState}.
|
|
5249
5092
|
*
|
|
@@ -5253,8 +5096,7 @@ function resolveAppPermissionMerge(merge, resolution) {
|
|
|
5253
5096
|
* on YAML; the application layer handles codec decoding before calling this.
|
|
5254
5097
|
*/
|
|
5255
5098
|
const AppPermissionStateParser = { parse: (parsed) => ({ config: AppPermissionConfigParser.parse(parsed) }) };
|
|
5256
|
-
|
|
5257
|
-
//#region src/core/application/appPermission/loadAppPermissionThreeWayInputs.ts
|
|
5099
|
+
// src/core/application/appPermission/loadAppPermissionThreeWayInputs.ts
|
|
5258
5100
|
/**
|
|
5259
5101
|
* Loads the four inputs of a 3-way app permission sync (base snapshot, base app
|
|
5260
5102
|
* revision, local YAML, remote config + revision) via the generic
|
|
@@ -5282,8 +5124,7 @@ async function loadAppPermissionThreeWayInputs(container) {
|
|
|
5282
5124
|
}
|
|
5283
5125
|
});
|
|
5284
5126
|
}
|
|
5285
|
-
|
|
5286
|
-
//#region src/core/application/appPermission/detectAppPermissionThreeWayDiff.ts
|
|
5127
|
+
// src/core/application/appPermission/detectAppPermissionThreeWayDiff.ts
|
|
5287
5128
|
/**
|
|
5288
5129
|
* Detects app permission differences with 3-way awareness.
|
|
5289
5130
|
*
|
|
@@ -5301,8 +5142,7 @@ async function detectAppPermissionThreeWayDiff({ container }) {
|
|
|
5301
5142
|
};
|
|
5302
5143
|
return buildRecordThreeWayDiff(computeAppPermissionThreeWayMerge(state, local, remote.config), (entry) => entry.key);
|
|
5303
5144
|
}
|
|
5304
|
-
|
|
5305
|
-
//#region src/cli/commands/app-acl/diff.ts
|
|
5145
|
+
// src/cli/commands/app-acl/diff.ts
|
|
5306
5146
|
async function runDiff$10(containerConfig) {
|
|
5307
5147
|
const container = createAppPermissionCliContainer(containerConfig);
|
|
5308
5148
|
const s = p.spinner();
|
|
@@ -5342,8 +5182,7 @@ var diff_default$11 = define({
|
|
|
5342
5182
|
}
|
|
5343
5183
|
}
|
|
5344
5184
|
});
|
|
5345
|
-
|
|
5346
|
-
//#region src/core/domain/appPermission/services/appPermissionStateSerializer.ts
|
|
5185
|
+
// src/core/domain/appPermission/services/appPermissionStateSerializer.ts
|
|
5347
5186
|
/**
|
|
5348
5187
|
* Serializes an {@link AppPermissionState} to a plain object suitable for YAML
|
|
5349
5188
|
* stringification (via the codec port in the application layer).
|
|
@@ -5354,8 +5193,7 @@ var diff_default$11 = define({
|
|
|
5354
5193
|
* is persisted separately via `AppRevisionStorage`.
|
|
5355
5194
|
*/
|
|
5356
5195
|
const AppPermissionStateSerializer = { serialize: (state) => AppPermissionConfigSerializer.serialize(state.config) };
|
|
5357
|
-
|
|
5358
|
-
//#region src/core/application/appPermission/appPermissionStateIo.ts
|
|
5196
|
+
// src/core/application/appPermission/appPermissionStateIo.ts
|
|
5359
5197
|
/**
|
|
5360
5198
|
* Persists the new base: the app permission snapshot (state file) and the app
|
|
5361
5199
|
* revision (`state/<appName>/revision.yaml`) side by side. The two writes are
|
|
@@ -5365,8 +5203,7 @@ async function saveAppPermissionSnapshotAndRevision(container, config, revision)
|
|
|
5365
5203
|
await saveSnapshotState(container.appPermissionStateStorage, container.configCodec, AppPermissionStateSerializer.serialize, { config });
|
|
5366
5204
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
5367
5205
|
}
|
|
5368
|
-
|
|
5369
|
-
//#region src/core/application/appPermission/pullAppPermission.ts
|
|
5206
|
+
// src/core/application/appPermission/pullAppPermission.ts
|
|
5370
5207
|
function serializePermissions$2(container, config) {
|
|
5371
5208
|
return stringifyConfig(container.configCodec, AppPermissionConfigSerializer.serialize(config));
|
|
5372
5209
|
}
|
|
@@ -5414,8 +5251,7 @@ async function applyPulledAppPermissionMerge({ container, input }) {
|
|
|
5414
5251
|
await saveAppPermissionSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
5415
5252
|
return { configText };
|
|
5416
5253
|
}
|
|
5417
|
-
|
|
5418
|
-
//#region src/cli/commands/app-acl/pull.ts
|
|
5254
|
+
// src/cli/commands/app-acl/pull.ts
|
|
5419
5255
|
var pull_default$11 = createPullCommand({
|
|
5420
5256
|
description: "Pull remote app permissions into the local app-acl config (3-way merge)",
|
|
5421
5257
|
args: appAclArgs,
|
|
@@ -5451,8 +5287,7 @@ var pull_default$11 = createPullCommand({
|
|
|
5451
5287
|
resolveContainerConfig: resolveAppAclContainerConfig,
|
|
5452
5288
|
resolveAppContainerConfig: resolveAppAclAppContainerConfig
|
|
5453
5289
|
});
|
|
5454
|
-
|
|
5455
|
-
//#region src/core/application/appPermission/pushAppPermission.ts
|
|
5290
|
+
// src/core/application/appPermission/pushAppPermission.ts
|
|
5456
5291
|
/** Pull command name surfaced in the drift hint message. */
|
|
5457
5292
|
const APP_ACL_PULL_COMMAND = "app-acl pull";
|
|
5458
5293
|
/**
|
|
@@ -5485,8 +5320,7 @@ async function pushAppPermission({ container, input }) {
|
|
|
5485
5320
|
revision: newRevision
|
|
5486
5321
|
};
|
|
5487
5322
|
}
|
|
5488
|
-
|
|
5489
|
-
//#region src/cli/commands/app-acl/push.ts
|
|
5323
|
+
// src/cli/commands/app-acl/push.ts
|
|
5490
5324
|
var push_default$12 = createPushCommand({
|
|
5491
5325
|
description: "Push the local app permission config to kintone (with drift detection)",
|
|
5492
5326
|
args: appAclArgs,
|
|
@@ -5501,8 +5335,7 @@ var push_default$12 = createPushCommand({
|
|
|
5501
5335
|
resolveContainerConfig: resolveAppAclContainerConfig,
|
|
5502
5336
|
resolveAppContainerConfig: resolveAppAclAppContainerConfig
|
|
5503
5337
|
});
|
|
5504
|
-
|
|
5505
|
-
//#region src/cli/commands/app-acl/index.ts
|
|
5338
|
+
// src/cli/commands/app-acl/index.ts
|
|
5506
5339
|
var app_acl_default = define({
|
|
5507
5340
|
name: "app-acl",
|
|
5508
5341
|
description: "Manage kintone app access permissions",
|
|
@@ -5515,8 +5348,7 @@ var app_acl_default = define({
|
|
|
5515
5348
|
},
|
|
5516
5349
|
run: () => {}
|
|
5517
5350
|
});
|
|
5518
|
-
|
|
5519
|
-
//#region src/core/domain/customization/services/resourceMerger.ts
|
|
5351
|
+
// src/core/domain/customization/services/resourceMerger.ts
|
|
5520
5352
|
const MAX_RESOURCES_PER_CATEGORY = 30;
|
|
5521
5353
|
function remoteToResolved(resource) {
|
|
5522
5354
|
if (resource.type === "URL") return resource;
|
|
@@ -5542,8 +5374,7 @@ const ResourceMerger = {
|
|
|
5542
5374
|
return [...kept, ...incoming];
|
|
5543
5375
|
}
|
|
5544
5376
|
};
|
|
5545
|
-
|
|
5546
|
-
//#region src/core/domain/customization/services/configParser.ts
|
|
5377
|
+
// src/core/domain/customization/services/configParser.ts
|
|
5547
5378
|
function parseResource(raw, index) {
|
|
5548
5379
|
if (!isRecord(raw)) throw new BusinessRuleError(CustomizationErrorCode.CzInvalidConfigStructure, `Resource at index ${index} must be an object`);
|
|
5549
5380
|
const type = raw.type;
|
|
@@ -5593,14 +5424,12 @@ const CustomizationConfigParser = { parse: (parsed) => {
|
|
|
5593
5424
|
mobile
|
|
5594
5425
|
};
|
|
5595
5426
|
} };
|
|
5596
|
-
|
|
5597
|
-
//#region src/core/application/customization/parseConfig.ts
|
|
5427
|
+
// src/core/application/customization/parseConfig.ts
|
|
5598
5428
|
function parseCustomizationConfigText(codec, rawText) {
|
|
5599
5429
|
const parsed = parseConfigText(codec, rawText, "Customization");
|
|
5600
5430
|
return wrapBusinessRuleError(() => CustomizationConfigParser.parse(parsed));
|
|
5601
5431
|
}
|
|
5602
|
-
|
|
5603
|
-
//#region src/core/application/customization/applyCustomization.ts
|
|
5432
|
+
// src/core/application/customization/applyCustomization.ts
|
|
5604
5433
|
async function resolveResources(platform, basePath, fileUploader) {
|
|
5605
5434
|
const resolveList = async (resources) => {
|
|
5606
5435
|
return Promise.all(resources.map(async (resource) => {
|
|
@@ -5651,8 +5480,7 @@ async function applyCustomization({ container, input }) {
|
|
|
5651
5480
|
revision: currentCustomization.revision
|
|
5652
5481
|
});
|
|
5653
5482
|
}
|
|
5654
|
-
|
|
5655
|
-
//#region src/core/domain/fieldPermission/services/configParser.ts
|
|
5483
|
+
// src/core/domain/fieldPermission/services/configParser.ts
|
|
5656
5484
|
const VALID_ACCESSIBILITIES$1 = /* @__PURE__ */ new Set([
|
|
5657
5485
|
"READ",
|
|
5658
5486
|
"WRITE",
|
|
@@ -5704,14 +5532,12 @@ const FieldPermissionConfigParser = { parse: (parsed) => {
|
|
|
5704
5532
|
}
|
|
5705
5533
|
return { rights };
|
|
5706
5534
|
} };
|
|
5707
|
-
|
|
5708
|
-
//#region src/core/application/fieldPermission/parseConfig.ts
|
|
5535
|
+
// src/core/application/fieldPermission/parseConfig.ts
|
|
5709
5536
|
function parseFieldPermissionConfigText(codec, rawText) {
|
|
5710
5537
|
const parsed = parseConfigText(codec, rawText, "Field permission");
|
|
5711
5538
|
return wrapBusinessRuleError(() => FieldPermissionConfigParser.parse(parsed));
|
|
5712
5539
|
}
|
|
5713
|
-
|
|
5714
|
-
//#region src/core/application/fieldPermission/applyFieldPermission.ts
|
|
5540
|
+
// src/core/application/fieldPermission/applyFieldPermission.ts
|
|
5715
5541
|
async function applyFieldPermission({ container }) {
|
|
5716
5542
|
await applyFromConfig({
|
|
5717
5543
|
getStorage: () => container.fieldPermissionStorage.get(),
|
|
@@ -5726,13 +5552,11 @@ async function applyFieldPermission({ container }) {
|
|
|
5726
5552
|
notFoundMessage: "Field permission config file not found"
|
|
5727
5553
|
});
|
|
5728
5554
|
}
|
|
5729
|
-
|
|
5730
|
-
//#region src/core/application/formSchema/deployApp.ts
|
|
5555
|
+
// src/core/application/formSchema/deployApp.ts
|
|
5731
5556
|
async function deployApp({ container }) {
|
|
5732
5557
|
await container.appDeployer.deploy();
|
|
5733
5558
|
}
|
|
5734
|
-
|
|
5735
|
-
//#region src/core/domain/formSchema/services/diffDetector.ts
|
|
5559
|
+
// src/core/domain/formSchema/services/diffDetector.ts
|
|
5736
5560
|
function isMapEqual(a, b) {
|
|
5737
5561
|
if (a.size !== b.size) return false;
|
|
5738
5562
|
for (const [key, valA] of a) {
|
|
@@ -5827,8 +5651,7 @@ const DiffDetector = {
|
|
|
5827
5651
|
return buildDiffResult(entries);
|
|
5828
5652
|
}
|
|
5829
5653
|
};
|
|
5830
|
-
|
|
5831
|
-
//#region src/core/domain/formSchema/services/layoutEnricher.ts
|
|
5654
|
+
// src/core/domain/formSchema/services/layoutEnricher.ts
|
|
5832
5655
|
function enrichLayoutElement(element, fields) {
|
|
5833
5656
|
if (element.kind !== "field") return element;
|
|
5834
5657
|
const fullField = fields.get(element.field.code);
|
|
@@ -5886,8 +5709,7 @@ function collectSubtableInnerFieldCodes(fields) {
|
|
|
5886
5709
|
for (const def of fields.values()) if (def.type === "SUBTABLE") for (const subCode of def.properties.fields.keys()) innerCodes.add(subCode);
|
|
5887
5710
|
return innerCodes;
|
|
5888
5711
|
}
|
|
5889
|
-
|
|
5890
|
-
//#region src/core/domain/formSchema/services/relatedAppProjection.ts
|
|
5712
|
+
// src/core/domain/formSchema/services/relatedAppProjection.ts
|
|
5891
5713
|
function mapLookupProperties(properties, fieldCode, replace) {
|
|
5892
5714
|
const { lookup, ...rest } = properties;
|
|
5893
5715
|
if (lookup === void 0) return rest;
|
|
@@ -5989,8 +5811,7 @@ function restateBaseFields(base, remote, reference) {
|
|
|
5989
5811
|
return remoteApp !== void 0 && refersTo(relatedApp, remoteApp) ? projectRelatedApp(remoteApp, referenceApps.get(code)) : relatedApp;
|
|
5990
5812
|
});
|
|
5991
5813
|
}
|
|
5992
|
-
|
|
5993
|
-
//#region src/core/domain/formSchema/services/subtableFieldSplitter.ts
|
|
5814
|
+
// src/core/domain/formSchema/services/subtableFieldSplitter.ts
|
|
5994
5815
|
function splitSubtableInnerFields(desired, current) {
|
|
5995
5816
|
const newInnerFields = /* @__PURE__ */ new Map();
|
|
5996
5817
|
const existingInnerFields = /* @__PURE__ */ new Map();
|
|
@@ -6004,8 +5825,7 @@ function splitSubtableInnerFields(desired, current) {
|
|
|
6004
5825
|
deletedInnerFieldCodes
|
|
6005
5826
|
};
|
|
6006
5827
|
}
|
|
6007
|
-
|
|
6008
|
-
//#region src/core/application/formSchema/applySchemaChanges.ts
|
|
5828
|
+
// src/core/application/formSchema/applySchemaChanges.ts
|
|
6009
5829
|
function processModifiedEntry(after, before, fieldsToUpdate, innerFieldsToDelete) {
|
|
6010
5830
|
if (after.type === "SUBTABLE" && before !== void 0 && before.type === "SUBTABLE") {
|
|
6011
5831
|
const { newInnerFields, existingInnerFields, deletedInnerFieldCodes } = splitSubtableInnerFields(after, before);
|
|
@@ -6064,8 +5884,7 @@ async function applySchemaChanges(schema, { container, expectedRevision }) {
|
|
|
6064
5884
|
}
|
|
6065
5885
|
if (hasLayoutChanges) await container.formConfigurator.updateLayout(schema.layout, expectedRevision);
|
|
6066
5886
|
}
|
|
6067
|
-
|
|
6068
|
-
//#region src/core/domain/formSchema/services/schemaValidator.ts
|
|
5887
|
+
// src/core/domain/formSchema/services/schemaValidator.ts
|
|
6069
5888
|
const SELECTION_TYPES = /* @__PURE__ */ new Set([
|
|
6070
5889
|
"CHECK_BOX",
|
|
6071
5890
|
"RADIO_BUTTON",
|
|
@@ -6203,8 +6022,7 @@ const SchemaValidator = { validate: (schema) => {
|
|
|
6203
6022
|
isValid: issues.every((i) => i.severity !== "error")
|
|
6204
6023
|
};
|
|
6205
6024
|
} };
|
|
6206
|
-
|
|
6207
|
-
//#region src/core/application/formSchema/assertSchemaValid.ts
|
|
6025
|
+
// src/core/application/formSchema/assertSchemaValid.ts
|
|
6208
6026
|
function assertSchemaValid(schema) {
|
|
6209
6027
|
const validationResult = SchemaValidator.validate(schema);
|
|
6210
6028
|
if (!validationResult.isValid) {
|
|
@@ -6212,8 +6030,7 @@ function assertSchemaValid(schema) {
|
|
|
6212
6030
|
throw new ValidationError(ValidationErrorCode.InvalidInput, `Schema validation failed:\n ${messages}`);
|
|
6213
6031
|
}
|
|
6214
6032
|
}
|
|
6215
|
-
|
|
6216
|
-
//#region src/core/domain/formSchema/entity.ts
|
|
6033
|
+
// src/core/domain/formSchema/entity.ts
|
|
6217
6034
|
const Schema = { create: (fields, layout) => {
|
|
6218
6035
|
if (fields.size === 0) throw new BusinessRuleError(FormSchemaErrorCode.FsEmptyFields, "Schema must have at least one field");
|
|
6219
6036
|
return {
|
|
@@ -6221,8 +6038,7 @@ const Schema = { create: (fields, layout) => {
|
|
|
6221
6038
|
layout
|
|
6222
6039
|
};
|
|
6223
6040
|
} };
|
|
6224
|
-
|
|
6225
|
-
//#region src/core/domain/formSchema/services/schemaParser.ts
|
|
6041
|
+
// src/core/domain/formSchema/services/schemaParser.ts
|
|
6226
6042
|
const SCHEMA_FILE_OPTIONS = { relatedAppWithBothKeys: "reject" };
|
|
6227
6043
|
const VALID_UNIT_POSITIONS = /* @__PURE__ */ new Set(["BEFORE", "AFTER"]);
|
|
6228
6044
|
const VALID_CALC_FORMATS = /* @__PURE__ */ new Set([
|
|
@@ -6740,14 +6556,12 @@ const SchemaParser = { parse: (parsed, options = SCHEMA_FILE_OPTIONS) => {
|
|
|
6740
6556
|
}
|
|
6741
6557
|
return Schema.create(fieldMap, layout);
|
|
6742
6558
|
} };
|
|
6743
|
-
|
|
6744
|
-
//#region src/core/application/formSchema/parseSchema.ts
|
|
6559
|
+
// src/core/application/formSchema/parseSchema.ts
|
|
6745
6560
|
function parseSchemaText(codec, rawText) {
|
|
6746
6561
|
const parsed = parseConfigText(codec, rawText, "Schema");
|
|
6747
6562
|
return wrapBusinessRuleError(() => SchemaParser.parse(parsed));
|
|
6748
6563
|
}
|
|
6749
|
-
|
|
6750
|
-
//#region src/core/application/formSchema/executeMigration.ts
|
|
6564
|
+
// src/core/application/formSchema/executeMigration.ts
|
|
6751
6565
|
/**
|
|
6752
6566
|
* Reads the local schema YAML and applies it to the remote form.
|
|
6753
6567
|
*
|
|
@@ -6763,8 +6577,7 @@ async function executeMigration({ container }) {
|
|
|
6763
6577
|
assertSchemaValid(schema);
|
|
6764
6578
|
await applySchemaChanges(schema, { container });
|
|
6765
6579
|
}
|
|
6766
|
-
|
|
6767
|
-
//#region src/core/domain/generalSettings/services/configParser.ts
|
|
6580
|
+
// src/core/domain/generalSettings/services/configParser.ts
|
|
6768
6581
|
function parseOptionalBoolean(parsed, fieldName) {
|
|
6769
6582
|
const value = parsed[fieldName];
|
|
6770
6583
|
if (value === void 0 || value === null) return void 0;
|
|
@@ -6863,14 +6676,12 @@ const GeneralSettingsConfigParser = { parse: (parsed) => {
|
|
|
6863
6676
|
...firstMonthOfFiscalYear !== void 0 ? { firstMonthOfFiscalYear } : {}
|
|
6864
6677
|
};
|
|
6865
6678
|
} };
|
|
6866
|
-
|
|
6867
|
-
//#region src/core/application/generalSettings/parseConfig.ts
|
|
6679
|
+
// src/core/application/generalSettings/parseConfig.ts
|
|
6868
6680
|
function parseGeneralSettingsConfigText(codec, rawText) {
|
|
6869
6681
|
const parsed = parseConfigText(codec, rawText, "General settings");
|
|
6870
6682
|
return wrapBusinessRuleError(() => GeneralSettingsConfigParser.parse(parsed));
|
|
6871
6683
|
}
|
|
6872
|
-
|
|
6873
|
-
//#region src/core/application/generalSettings/applyGeneralSettings.ts
|
|
6684
|
+
// src/core/application/generalSettings/applyGeneralSettings.ts
|
|
6874
6685
|
async function applyGeneralSettings({ container }) {
|
|
6875
6686
|
await applyFromConfig({
|
|
6876
6687
|
getStorage: () => container.generalSettingsStorage.get(),
|
|
@@ -6901,8 +6712,7 @@ function isNotificationEntityType(value) {
|
|
|
6901
6712
|
function normalizeReminderTimezone(value) {
|
|
6902
6713
|
return value === null || value === "" ? void 0 : value;
|
|
6903
6714
|
}
|
|
6904
|
-
|
|
6905
|
-
//#region src/core/domain/notification/services/configParser.ts
|
|
6715
|
+
// src/core/domain/notification/services/configParser.ts
|
|
6906
6716
|
const REMINDER_OFFSET_MIN = -1e4;
|
|
6907
6717
|
const REMINDER_OFFSET_MAX = 1e4;
|
|
6908
6718
|
function parseEntity$1(raw, context) {
|
|
@@ -7012,14 +6822,12 @@ const NotificationConfigParser = { parse: (parsed) => {
|
|
|
7012
6822
|
if (obj.reminder !== void 0) config.reminder = parseReminderConfig(obj.reminder);
|
|
7013
6823
|
return config;
|
|
7014
6824
|
} };
|
|
7015
|
-
|
|
7016
|
-
//#region src/core/application/notification/parseConfig.ts
|
|
6825
|
+
// src/core/application/notification/parseConfig.ts
|
|
7017
6826
|
function parseNotificationConfigText(codec, rawText) {
|
|
7018
6827
|
const parsed = parseConfigText(codec, rawText, "Notification");
|
|
7019
6828
|
return wrapBusinessRuleError(() => NotificationConfigParser.parse(parsed));
|
|
7020
6829
|
}
|
|
7021
|
-
|
|
7022
|
-
//#region src/core/application/notification/applyNotification.ts
|
|
6830
|
+
// src/core/application/notification/applyNotification.ts
|
|
7023
6831
|
/**
|
|
7024
6832
|
* Apply notification settings to kintone.
|
|
7025
6833
|
*
|
|
@@ -7056,8 +6864,7 @@ async function applyNotification({ container }) {
|
|
|
7056
6864
|
});
|
|
7057
6865
|
}
|
|
7058
6866
|
}
|
|
7059
|
-
|
|
7060
|
-
//#region src/core/domain/plugin/services/configParser.ts
|
|
6867
|
+
// src/core/domain/plugin/services/configParser.ts
|
|
7061
6868
|
function parsePluginEntry(raw, index) {
|
|
7062
6869
|
if (!isRecord(raw)) throw new BusinessRuleError(PluginErrorCode.PlInvalidConfigStructure, `Plugin at index ${index} must be an object`);
|
|
7063
6870
|
if (typeof raw.id !== "string" || raw.id.length === 0) throw new BusinessRuleError(PluginErrorCode.PlEmptyPluginId, `Plugin at index ${index} must have a non-empty "id" property`);
|
|
@@ -7079,14 +6886,12 @@ const PluginConfigParser = { parse: (parsed) => {
|
|
|
7079
6886
|
}
|
|
7080
6887
|
return { plugins };
|
|
7081
6888
|
} };
|
|
7082
|
-
|
|
7083
|
-
//#region src/core/application/plugin/parseConfig.ts
|
|
6889
|
+
// src/core/application/plugin/parseConfig.ts
|
|
7084
6890
|
function parsePluginConfigText(codec, rawText) {
|
|
7085
6891
|
const parsed = parseConfigText(codec, rawText, "Plugin");
|
|
7086
6892
|
return wrapBusinessRuleError(() => PluginConfigParser.parse(parsed));
|
|
7087
6893
|
}
|
|
7088
|
-
|
|
7089
|
-
//#region src/core/application/plugin/applyPlugin.ts
|
|
6894
|
+
// src/core/application/plugin/applyPlugin.ts
|
|
7090
6895
|
async function applyPlugin({ container }) {
|
|
7091
6896
|
const result = await container.pluginStorage.get();
|
|
7092
6897
|
if (!result.exists) throw new ValidationError(ValidationErrorCode.InvalidInput, "Plugin config file not found");
|
|
@@ -7113,8 +6918,7 @@ async function applyPlugin({ container }) {
|
|
|
7113
6918
|
skipped
|
|
7114
6919
|
};
|
|
7115
6920
|
}
|
|
7116
|
-
|
|
7117
|
-
//#region src/core/domain/processManagement/valueObject.ts
|
|
6921
|
+
// src/core/domain/processManagement/valueObject.ts
|
|
7118
6922
|
/**
|
|
7119
6923
|
* Human-readable label of an action, e.g. `申請する (未申請 → 部長承認待ち)`.
|
|
7120
6924
|
* The name alone is ambiguous: kintone allows several actions with the same
|
|
@@ -7123,8 +6927,7 @@ async function applyPlugin({ container }) {
|
|
|
7123
6927
|
function describeProcessAction(action) {
|
|
7124
6928
|
return `${action.name} (${action.from} → ${action.to})`;
|
|
7125
6929
|
}
|
|
7126
|
-
|
|
7127
|
-
//#region src/core/domain/processManagement/services/configParser.ts
|
|
6930
|
+
// src/core/domain/processManagement/services/configParser.ts
|
|
7128
6931
|
const VALID_ASSIGNEE_TYPES$1 = /* @__PURE__ */ new Set([
|
|
7129
6932
|
"ONE",
|
|
7130
6933
|
"ALL",
|
|
@@ -7214,14 +7017,12 @@ const ProcessManagementConfigParser = { parse: (parsed) => {
|
|
|
7214
7017
|
actions
|
|
7215
7018
|
};
|
|
7216
7019
|
} };
|
|
7217
|
-
|
|
7218
|
-
//#region src/core/application/processManagement/parseConfig.ts
|
|
7020
|
+
// src/core/application/processManagement/parseConfig.ts
|
|
7219
7021
|
function parseProcessManagementConfigText(codec, rawText) {
|
|
7220
7022
|
const parsed = parseConfigText(codec, rawText, "Process management");
|
|
7221
7023
|
return wrapBusinessRuleError(() => ProcessManagementConfigParser.parse(parsed));
|
|
7222
7024
|
}
|
|
7223
|
-
|
|
7224
|
-
//#region src/core/application/processManagement/applyProcessManagement.ts
|
|
7025
|
+
// src/core/application/processManagement/applyProcessManagement.ts
|
|
7225
7026
|
async function applyProcessManagement({ container }) {
|
|
7226
7027
|
const result = await container.processManagementStorage.get();
|
|
7227
7028
|
if (!result.exists) throw new ValidationError(ValidationErrorCode.InvalidInput, "Process management config file not found");
|
|
@@ -7237,8 +7038,7 @@ async function applyProcessManagement({ container }) {
|
|
|
7237
7038
|
newEnable: config.enable
|
|
7238
7039
|
};
|
|
7239
7040
|
}
|
|
7240
|
-
|
|
7241
|
-
//#region src/core/domain/recordPermission/services/configParser.ts
|
|
7041
|
+
// src/core/domain/recordPermission/services/configParser.ts
|
|
7242
7042
|
const VALID_ENTITY_TYPES$3 = /* @__PURE__ */ new Set([
|
|
7243
7043
|
"USER",
|
|
7244
7044
|
"GROUP",
|
|
@@ -7287,14 +7087,12 @@ const RecordPermissionConfigParser = { parse: (parsed) => {
|
|
|
7287
7087
|
}
|
|
7288
7088
|
return { rights };
|
|
7289
7089
|
} };
|
|
7290
|
-
|
|
7291
|
-
//#region src/core/application/recordPermission/parseConfig.ts
|
|
7090
|
+
// src/core/application/recordPermission/parseConfig.ts
|
|
7292
7091
|
function parseRecordPermissionConfigText(codec, rawText) {
|
|
7293
7092
|
const parsed = parseConfigText(codec, rawText, "Record permission");
|
|
7294
7093
|
return wrapBusinessRuleError(() => RecordPermissionConfigParser.parse(parsed));
|
|
7295
7094
|
}
|
|
7296
|
-
|
|
7297
|
-
//#region src/core/application/recordPermission/applyRecordPermission.ts
|
|
7095
|
+
// src/core/application/recordPermission/applyRecordPermission.ts
|
|
7298
7096
|
async function applyRecordPermission({ container }) {
|
|
7299
7097
|
await applyFromConfig({
|
|
7300
7098
|
getStorage: () => container.recordPermissionStorage.get(),
|
|
@@ -7397,8 +7195,7 @@ const VALID_DAYS_OF_WEEK = /* @__PURE__ */ new Set([
|
|
|
7397
7195
|
function isDayOfWeek(value) {
|
|
7398
7196
|
return VALID_DAYS_OF_WEEK.has(value);
|
|
7399
7197
|
}
|
|
7400
|
-
|
|
7401
|
-
//#region src/core/domain/report/services/configParser.ts
|
|
7198
|
+
// src/core/domain/report/services/configParser.ts
|
|
7402
7199
|
function parseGroup(raw, index) {
|
|
7403
7200
|
if (!isRecord(raw)) throw new BusinessRuleError(ReportErrorCode.RtInvalidConfigStructure, `Group at index ${index} must be an object`);
|
|
7404
7201
|
if (typeof raw.code !== "string" || raw.code.length === 0) throw new BusinessRuleError(ReportErrorCode.RtInvalidConfigStructure, `Group at index ${index} must have a non-empty "code" property`);
|
|
@@ -7538,14 +7335,12 @@ const ReportConfigParser = { parse: (parsed) => {
|
|
|
7538
7335
|
for (const [name, value] of Object.entries(rawReports)) reports[name] = parseReportConfig(value, name);
|
|
7539
7336
|
return { reports };
|
|
7540
7337
|
} };
|
|
7541
|
-
|
|
7542
|
-
//#region src/core/application/report/parseConfig.ts
|
|
7338
|
+
// src/core/application/report/parseConfig.ts
|
|
7543
7339
|
function parseReportConfigText(codec, rawText) {
|
|
7544
7340
|
const parsed = parseConfigText(codec, rawText, "Report");
|
|
7545
7341
|
return wrapBusinessRuleError(() => ReportConfigParser.parse(parsed));
|
|
7546
7342
|
}
|
|
7547
|
-
|
|
7548
|
-
//#region src/core/application/report/applyReport.ts
|
|
7343
|
+
// src/core/application/report/applyReport.ts
|
|
7549
7344
|
async function applyReport({ container }) {
|
|
7550
7345
|
await applyFromConfig({
|
|
7551
7346
|
getStorage: () => container.reportStorage.get(),
|
|
@@ -7560,8 +7355,7 @@ async function applyReport({ container }) {
|
|
|
7560
7355
|
notFoundMessage: "Report config file not found"
|
|
7561
7356
|
});
|
|
7562
7357
|
}
|
|
7563
|
-
|
|
7564
|
-
//#region src/core/domain/seedData/services/upsertPlanner.ts
|
|
7358
|
+
// src/core/domain/seedData/services/upsertPlanner.ts
|
|
7565
7359
|
function recordsEqual(seed, existing, keyField) {
|
|
7566
7360
|
const seedKeys = Object.keys(seed).filter((k) => k !== keyField);
|
|
7567
7361
|
for (const key of seedKeys) {
|
|
@@ -7603,14 +7397,12 @@ const UpsertPlanner = { plan: (key, seedRecords, existingRecords) => {
|
|
|
7603
7397
|
unchanged
|
|
7604
7398
|
};
|
|
7605
7399
|
} };
|
|
7606
|
-
|
|
7607
|
-
//#region src/core/domain/seedData/valueObject.ts
|
|
7400
|
+
// src/core/domain/seedData/valueObject.ts
|
|
7608
7401
|
const UpsertKey = { create: (key) => {
|
|
7609
7402
|
if (key.length === 0) throw new BusinessRuleError(SeedDataErrorCode.SdEmptyUpsertKey, "Upsert key cannot be empty");
|
|
7610
7403
|
return key;
|
|
7611
7404
|
} };
|
|
7612
|
-
|
|
7613
|
-
//#region src/core/domain/seedData/services/seedParser.ts
|
|
7405
|
+
// src/core/domain/seedData/services/seedParser.ts
|
|
7614
7406
|
function normalizeValue(value) {
|
|
7615
7407
|
if (value === null || value === void 0) return "";
|
|
7616
7408
|
if (typeof value === "number") return String(value);
|
|
@@ -7661,14 +7453,12 @@ const SeedParser = { parse: (parsed) => {
|
|
|
7661
7453
|
records
|
|
7662
7454
|
};
|
|
7663
7455
|
} };
|
|
7664
|
-
|
|
7665
|
-
//#region src/core/application/seedData/parseConfig.ts
|
|
7456
|
+
// src/core/application/seedData/parseConfig.ts
|
|
7666
7457
|
function parseSeedText(codec, rawText) {
|
|
7667
7458
|
const parsed = parseConfigText(codec, rawText, "Seed");
|
|
7668
7459
|
return wrapBusinessRuleError(() => SeedParser.parse(parsed));
|
|
7669
7460
|
}
|
|
7670
|
-
|
|
7671
|
-
//#region src/core/application/seedData/upsertSeed.ts
|
|
7461
|
+
// src/core/application/seedData/upsertSeed.ts
|
|
7672
7462
|
async function upsertSeed({ container, input }) {
|
|
7673
7463
|
const result = await container.seedStorage.get();
|
|
7674
7464
|
if (!result.exists) throw new ValidationError(ValidationErrorCode.InvalidInput, "Seed file not found");
|
|
@@ -7718,8 +7508,7 @@ const VALID_DEVICE_TYPES = /* @__PURE__ */ new Set(["DESKTOP", "ANY"]);
|
|
|
7718
7508
|
function isDeviceType(value) {
|
|
7719
7509
|
return VALID_DEVICE_TYPES.has(value);
|
|
7720
7510
|
}
|
|
7721
|
-
|
|
7722
|
-
//#region src/core/domain/view/services/configParser.ts
|
|
7511
|
+
// src/core/domain/view/services/configParser.ts
|
|
7723
7512
|
function parseDeviceType(name, raw) {
|
|
7724
7513
|
if (raw === void 0 || raw === null) return void 0;
|
|
7725
7514
|
const deviceStr = String(raw);
|
|
@@ -7762,14 +7551,12 @@ const ViewConfigParser = { parse: (parsed) => {
|
|
|
7762
7551
|
}
|
|
7763
7552
|
return { views };
|
|
7764
7553
|
} };
|
|
7765
|
-
|
|
7766
|
-
//#region src/core/application/view/parseConfig.ts
|
|
7554
|
+
// src/core/application/view/parseConfig.ts
|
|
7767
7555
|
function parseViewConfigText(codec, rawText) {
|
|
7768
7556
|
const parsed = parseConfigText(codec, rawText, "View");
|
|
7769
7557
|
return wrapBusinessRuleError(() => ViewConfigParser.parse(parsed));
|
|
7770
7558
|
}
|
|
7771
|
-
|
|
7772
|
-
//#region src/core/application/view/prepareViewsForUpdate.ts
|
|
7559
|
+
// src/core/application/view/prepareViewsForUpdate.ts
|
|
7773
7560
|
/**
|
|
7774
7561
|
* Filters the views to send to `updateViews`, matching `applyView`'s builtin
|
|
7775
7562
|
* handling: local builtin views are dropped (they cannot be updated) and remote
|
|
@@ -7789,8 +7576,7 @@ function prepareViewsForUpdate(desired, remote) {
|
|
|
7789
7576
|
skippedBuiltinViews
|
|
7790
7577
|
};
|
|
7791
7578
|
}
|
|
7792
|
-
|
|
7793
|
-
//#region src/core/application/view/applyView.ts
|
|
7579
|
+
// src/core/application/view/applyView.ts
|
|
7794
7580
|
async function applyView({ container }) {
|
|
7795
7581
|
const result = await container.viewStorage.get();
|
|
7796
7582
|
if (!result.exists) throw new ValidationError(ValidationErrorCode.InvalidInput, "View config file not found");
|
|
@@ -7803,8 +7589,7 @@ async function applyView({ container }) {
|
|
|
7803
7589
|
});
|
|
7804
7590
|
return { skippedBuiltinViews };
|
|
7805
7591
|
}
|
|
7806
|
-
|
|
7807
|
-
//#region src/core/application/applyAll/applyAllForApp.ts
|
|
7592
|
+
// src/core/application/applyAll/applyAllForApp.ts
|
|
7808
7593
|
function buildPhases$1(args) {
|
|
7809
7594
|
const c = args.containers;
|
|
7810
7595
|
return [
|
|
@@ -8097,8 +7882,7 @@ async function applyAllForApp(args) {
|
|
|
8097
7882
|
deployError: deployResult.error
|
|
8098
7883
|
};
|
|
8099
7884
|
}
|
|
8100
|
-
|
|
8101
|
-
//#region src/core/adapters/kintone/fieldPermissionConfigurator.ts
|
|
7885
|
+
// src/core/adapters/kintone/fieldPermissionConfigurator.ts
|
|
8102
7886
|
const VALID_ACCESSIBILITIES = /* @__PURE__ */ new Set([
|
|
8103
7887
|
"READ",
|
|
8104
7888
|
"WRITE",
|
|
@@ -8183,18 +7967,15 @@ var KintoneFieldPermissionConfigurator = class {
|
|
|
8183
7967
|
}
|
|
8184
7968
|
}
|
|
8185
7969
|
};
|
|
8186
|
-
|
|
8187
|
-
//#region src/core/adapters/local/fieldPermissionStateStorage.ts
|
|
7970
|
+
// src/core/adapters/local/fieldPermissionStateStorage.ts
|
|
8188
7971
|
function createLocalFileFieldPermissionStateStorage(filePath) {
|
|
8189
7972
|
return createLocalFileStorage(filePath, "field permission state file");
|
|
8190
7973
|
}
|
|
8191
|
-
|
|
8192
|
-
//#region src/core/adapters/local/fieldPermissionStorage.ts
|
|
7974
|
+
// src/core/adapters/local/fieldPermissionStorage.ts
|
|
8193
7975
|
function createLocalFileFieldPermissionStorage(filePath) {
|
|
8194
7976
|
return createLocalFileStorage(filePath, "field permission file");
|
|
8195
7977
|
}
|
|
8196
|
-
|
|
8197
|
-
//#region src/core/application/container/fieldPermissionCli.ts
|
|
7978
|
+
// src/core/application/container/fieldPermissionCli.ts
|
|
8198
7979
|
function createFieldPermissionCliContainer(config) {
|
|
8199
7980
|
const client = config.client ?? createKintoneClient(config);
|
|
8200
7981
|
return {
|
|
@@ -8207,15 +7988,13 @@ function createFieldPermissionCliContainer(config) {
|
|
|
8207
7988
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
8208
7989
|
};
|
|
8209
7990
|
}
|
|
8210
|
-
|
|
8211
|
-
//#region src/core/adapters/kintone/parseKintoneIntegerField.ts
|
|
7991
|
+
// src/core/adapters/kintone/parseKintoneIntegerField.ts
|
|
8212
7992
|
function parseKintoneIntegerField(raw, fieldName) {
|
|
8213
7993
|
const n = Number(raw);
|
|
8214
7994
|
if (!Number.isFinite(n) || !Number.isInteger(n)) throw new SystemError(SystemErrorCode.ExternalApiError, `Unexpected non-integer ${fieldName} from kintone API: ${raw}`);
|
|
8215
7995
|
return n;
|
|
8216
7996
|
}
|
|
8217
|
-
|
|
8218
|
-
//#region src/core/adapters/kintone/generalSettingsConfigurator.ts
|
|
7997
|
+
// src/core/adapters/kintone/generalSettingsConfigurator.ts
|
|
8219
7998
|
const VALID_THEMES = /* @__PURE__ */ new Set([
|
|
8220
7999
|
"WHITE",
|
|
8221
8000
|
"RED",
|
|
@@ -8350,18 +8129,15 @@ var KintoneGeneralSettingsConfigurator = class {
|
|
|
8350
8129
|
}
|
|
8351
8130
|
}
|
|
8352
8131
|
};
|
|
8353
|
-
|
|
8354
|
-
//#region src/core/adapters/local/generalSettingsStateStorage.ts
|
|
8132
|
+
// src/core/adapters/local/generalSettingsStateStorage.ts
|
|
8355
8133
|
function createLocalFileGeneralSettingsStateStorage(filePath) {
|
|
8356
8134
|
return createLocalFileStorage(filePath, "general settings state file");
|
|
8357
8135
|
}
|
|
8358
|
-
|
|
8359
|
-
//#region src/core/adapters/local/generalSettingsStorage.ts
|
|
8136
|
+
// src/core/adapters/local/generalSettingsStorage.ts
|
|
8360
8137
|
function createLocalFileGeneralSettingsStorage(filePath) {
|
|
8361
8138
|
return createLocalFileStorage(filePath, "general settings file");
|
|
8362
8139
|
}
|
|
8363
|
-
|
|
8364
|
-
//#region src/core/application/container/generalSettingsCli.ts
|
|
8140
|
+
// src/core/application/container/generalSettingsCli.ts
|
|
8365
8141
|
function createGeneralSettingsCliContainer(config) {
|
|
8366
8142
|
const client = config.client ?? createKintoneClient(config);
|
|
8367
8143
|
return {
|
|
@@ -8374,8 +8150,7 @@ function createGeneralSettingsCliContainer(config) {
|
|
|
8374
8150
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
8375
8151
|
};
|
|
8376
8152
|
}
|
|
8377
|
-
|
|
8378
|
-
//#region src/core/adapters/kintone/notificationConfigurator.ts
|
|
8153
|
+
// src/core/adapters/kintone/notificationConfigurator.ts
|
|
8379
8154
|
function fromKintoneEntity$2(raw) {
|
|
8380
8155
|
if (!isNotificationEntityType(raw.type)) throw new SystemError(SystemErrorCode.ExternalApiError, `Unexpected entity type from kintone API (entity): ${raw.type}`);
|
|
8381
8156
|
return {
|
|
@@ -8575,18 +8350,15 @@ var KintoneNotificationConfigurator = class {
|
|
|
8575
8350
|
}
|
|
8576
8351
|
}
|
|
8577
8352
|
};
|
|
8578
|
-
|
|
8579
|
-
//#region src/core/adapters/local/notificationStateStorage.ts
|
|
8353
|
+
// src/core/adapters/local/notificationStateStorage.ts
|
|
8580
8354
|
function createLocalFileNotificationStateStorage(filePath) {
|
|
8581
8355
|
return createLocalFileStorage(filePath, "notification state file");
|
|
8582
8356
|
}
|
|
8583
|
-
|
|
8584
|
-
//#region src/core/adapters/local/notificationStorage.ts
|
|
8357
|
+
// src/core/adapters/local/notificationStorage.ts
|
|
8585
8358
|
function createLocalFileNotificationStorage(filePath) {
|
|
8586
8359
|
return createLocalFileStorage(filePath, "notification file");
|
|
8587
8360
|
}
|
|
8588
|
-
|
|
8589
|
-
//#region src/core/application/container/notificationCli.ts
|
|
8361
|
+
// src/core/application/container/notificationCli.ts
|
|
8590
8362
|
function createNotificationCliContainer(config) {
|
|
8591
8363
|
const client = config.client ?? createKintoneClient(config);
|
|
8592
8364
|
return {
|
|
@@ -8599,8 +8371,7 @@ function createNotificationCliContainer(config) {
|
|
|
8599
8371
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
8600
8372
|
};
|
|
8601
8373
|
}
|
|
8602
|
-
|
|
8603
|
-
//#region src/core/adapters/kintone/pluginConfigurator.ts
|
|
8374
|
+
// src/core/adapters/kintone/pluginConfigurator.ts
|
|
8604
8375
|
var KintonePluginConfigurator = class {
|
|
8605
8376
|
client;
|
|
8606
8377
|
appId;
|
|
@@ -8638,18 +8409,15 @@ var KintonePluginConfigurator = class {
|
|
|
8638
8409
|
}
|
|
8639
8410
|
}
|
|
8640
8411
|
};
|
|
8641
|
-
|
|
8642
|
-
//#region src/core/adapters/local/pluginStateStorage.ts
|
|
8412
|
+
// src/core/adapters/local/pluginStateStorage.ts
|
|
8643
8413
|
function createLocalFilePluginStateStorage(filePath) {
|
|
8644
8414
|
return createLocalFileStorage(filePath, "plugin state file");
|
|
8645
8415
|
}
|
|
8646
|
-
|
|
8647
|
-
//#region src/core/adapters/local/pluginStorage.ts
|
|
8416
|
+
// src/core/adapters/local/pluginStorage.ts
|
|
8648
8417
|
function createLocalFilePluginStorage(filePath) {
|
|
8649
8418
|
return createLocalFileStorage(filePath, "plugin file");
|
|
8650
8419
|
}
|
|
8651
|
-
|
|
8652
|
-
//#region src/core/application/container/pluginCli.ts
|
|
8420
|
+
// src/core/application/container/pluginCli.ts
|
|
8653
8421
|
function createPluginCliContainer(config) {
|
|
8654
8422
|
const client = config.client ?? createKintoneClient(config);
|
|
8655
8423
|
return {
|
|
@@ -8662,8 +8430,7 @@ function createPluginCliContainer(config) {
|
|
|
8662
8430
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
8663
8431
|
};
|
|
8664
8432
|
}
|
|
8665
|
-
|
|
8666
|
-
//#region src/core/adapters/kintone/processManagementConfigurator.ts
|
|
8433
|
+
// src/core/adapters/kintone/processManagementConfigurator.ts
|
|
8667
8434
|
const VALID_ASSIGNEE_TYPES = /* @__PURE__ */ new Set([
|
|
8668
8435
|
"ONE",
|
|
8669
8436
|
"ALL",
|
|
@@ -8795,18 +8562,15 @@ var KintoneProcessManagementConfigurator = class {
|
|
|
8795
8562
|
}
|
|
8796
8563
|
}
|
|
8797
8564
|
};
|
|
8798
|
-
|
|
8799
|
-
//#region src/core/adapters/local/processManagementStateStorage.ts
|
|
8565
|
+
// src/core/adapters/local/processManagementStateStorage.ts
|
|
8800
8566
|
function createLocalFileProcessManagementStateStorage(filePath) {
|
|
8801
8567
|
return createLocalFileStorage(filePath, "process management state file");
|
|
8802
8568
|
}
|
|
8803
|
-
|
|
8804
|
-
//#region src/core/adapters/local/processManagementStorage.ts
|
|
8569
|
+
// src/core/adapters/local/processManagementStorage.ts
|
|
8805
8570
|
function createLocalFileProcessManagementStorage(filePath) {
|
|
8806
8571
|
return createLocalFileStorage(filePath, "process management file");
|
|
8807
8572
|
}
|
|
8808
|
-
|
|
8809
|
-
//#region src/core/application/container/processManagementCli.ts
|
|
8573
|
+
// src/core/application/container/processManagementCli.ts
|
|
8810
8574
|
function createProcessManagementCliContainer(config) {
|
|
8811
8575
|
const client = config.client ?? createKintoneClient(config);
|
|
8812
8576
|
return {
|
|
@@ -8819,8 +8583,7 @@ function createProcessManagementCliContainer(config) {
|
|
|
8819
8583
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
8820
8584
|
};
|
|
8821
8585
|
}
|
|
8822
|
-
|
|
8823
|
-
//#region src/core/adapters/kintone/recordPermissionConfigurator.ts
|
|
8586
|
+
// src/core/adapters/kintone/recordPermissionConfigurator.ts
|
|
8824
8587
|
const VALID_ENTITY_TYPES = /* @__PURE__ */ new Set([
|
|
8825
8588
|
"USER",
|
|
8826
8589
|
"GROUP",
|
|
@@ -8898,18 +8661,15 @@ var KintoneRecordPermissionConfigurator = class {
|
|
|
8898
8661
|
}
|
|
8899
8662
|
}
|
|
8900
8663
|
};
|
|
8901
|
-
|
|
8902
|
-
//#region src/core/adapters/local/recordPermissionStateStorage.ts
|
|
8664
|
+
// src/core/adapters/local/recordPermissionStateStorage.ts
|
|
8903
8665
|
function createLocalFileRecordPermissionStateStorage(filePath) {
|
|
8904
8666
|
return createLocalFileStorage(filePath, "record permission state file");
|
|
8905
8667
|
}
|
|
8906
|
-
|
|
8907
|
-
//#region src/core/adapters/local/recordPermissionStorage.ts
|
|
8668
|
+
// src/core/adapters/local/recordPermissionStorage.ts
|
|
8908
8669
|
function createLocalFileRecordPermissionStorage(filePath) {
|
|
8909
8670
|
return createLocalFileStorage(filePath, "record permission file");
|
|
8910
8671
|
}
|
|
8911
|
-
|
|
8912
|
-
//#region src/core/application/container/recordPermissionCli.ts
|
|
8672
|
+
// src/core/application/container/recordPermissionCli.ts
|
|
8913
8673
|
function createRecordPermissionCliContainer(config) {
|
|
8914
8674
|
const client = config.client ?? createKintoneClient(config);
|
|
8915
8675
|
return {
|
|
@@ -8922,8 +8682,7 @@ function createRecordPermissionCliContainer(config) {
|
|
|
8922
8682
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
8923
8683
|
};
|
|
8924
8684
|
}
|
|
8925
|
-
|
|
8926
|
-
//#region src/core/adapters/kintone/reportConfigurator.ts
|
|
8685
|
+
// src/core/adapters/kintone/reportConfigurator.ts
|
|
8927
8686
|
function fromKintoneGroup(raw) {
|
|
8928
8687
|
const result = { code: raw.code };
|
|
8929
8688
|
if (raw.per !== void 0) {
|
|
@@ -9095,18 +8854,15 @@ var KintoneReportConfigurator = class {
|
|
|
9095
8854
|
}
|
|
9096
8855
|
}
|
|
9097
8856
|
};
|
|
9098
|
-
|
|
9099
|
-
//#region src/core/adapters/local/reportStateStorage.ts
|
|
8857
|
+
// src/core/adapters/local/reportStateStorage.ts
|
|
9100
8858
|
function createLocalFileReportStateStorage(filePath) {
|
|
9101
8859
|
return createLocalFileStorage(filePath, "report state file");
|
|
9102
8860
|
}
|
|
9103
|
-
|
|
9104
|
-
//#region src/core/adapters/local/reportStorage.ts
|
|
8861
|
+
// src/core/adapters/local/reportStorage.ts
|
|
9105
8862
|
function createLocalFileReportStorage(filePath) {
|
|
9106
8863
|
return createLocalFileStorage(filePath, "report file");
|
|
9107
8864
|
}
|
|
9108
|
-
|
|
9109
|
-
//#region src/core/application/container/reportCli.ts
|
|
8865
|
+
// src/core/application/container/reportCli.ts
|
|
9110
8866
|
function createReportCliContainer(config) {
|
|
9111
8867
|
const client = config.client ?? createKintoneClient(config);
|
|
9112
8868
|
return {
|
|
@@ -9119,8 +8875,7 @@ function createReportCliContainer(config) {
|
|
|
9119
8875
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
9120
8876
|
};
|
|
9121
8877
|
}
|
|
9122
|
-
|
|
9123
|
-
//#region src/core/adapters/kintone/viewConfigurator.ts
|
|
8878
|
+
// src/core/adapters/kintone/viewConfigurator.ts
|
|
9124
8879
|
function fromKintoneView(name, raw) {
|
|
9125
8880
|
if (!isViewType(raw.type)) throw new SystemError(SystemErrorCode.ExternalApiError, `Unexpected view type from kintone API: ${raw.type}`);
|
|
9126
8881
|
let device;
|
|
@@ -9200,18 +8955,15 @@ var KintoneViewConfigurator = class {
|
|
|
9200
8955
|
}
|
|
9201
8956
|
}
|
|
9202
8957
|
};
|
|
9203
|
-
|
|
9204
|
-
//#region src/core/adapters/local/viewStateStorage.ts
|
|
8958
|
+
// src/core/adapters/local/viewStateStorage.ts
|
|
9205
8959
|
function createLocalFileViewStateStorage(filePath) {
|
|
9206
8960
|
return createLocalFileStorage(filePath, "view state file");
|
|
9207
8961
|
}
|
|
9208
|
-
|
|
9209
|
-
//#region src/core/adapters/local/viewStorage.ts
|
|
8962
|
+
// src/core/adapters/local/viewStorage.ts
|
|
9210
8963
|
function createLocalFileViewStorage(filePath) {
|
|
9211
8964
|
return createLocalFileStorage(filePath, "view file");
|
|
9212
8965
|
}
|
|
9213
|
-
|
|
9214
|
-
//#region src/core/application/container/viewCli.ts
|
|
8966
|
+
// src/core/application/container/viewCli.ts
|
|
9215
8967
|
function createViewCliContainer(config) {
|
|
9216
8968
|
const client = config.client ?? createKintoneClient(config);
|
|
9217
8969
|
return {
|
|
@@ -9224,8 +8976,7 @@ function createViewCliContainer(config) {
|
|
|
9224
8976
|
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
9225
8977
|
};
|
|
9226
8978
|
}
|
|
9227
|
-
|
|
9228
|
-
//#region src/core/application/container/applyAllCli.ts
|
|
8979
|
+
// src/core/application/container/applyAllCli.ts
|
|
9229
8980
|
function createCliApplyAllContainers(input) {
|
|
9230
8981
|
const client = createKintoneClient(input);
|
|
9231
8982
|
const base = {
|
|
@@ -9353,8 +9104,7 @@ function createCliApplyAllContainers(input) {
|
|
|
9353
9104
|
paths
|
|
9354
9105
|
};
|
|
9355
9106
|
}
|
|
9356
|
-
|
|
9357
|
-
//#region src/core/domain/customization/services/diffDetector.ts
|
|
9107
|
+
// src/core/domain/customization/services/diffDetector.ts
|
|
9358
9108
|
function resourceName(resource) {
|
|
9359
9109
|
if (resource.type === "URL") return resource.url;
|
|
9360
9110
|
const parts = resource.path.replace(/\\/g, "/").split("/").filter(Boolean);
|
|
@@ -9434,8 +9184,7 @@ const CustomizationDiffDetector = { detect: (local, remote, modifiedFileNames) =
|
|
|
9434
9184
|
entries.push(...comparePlatform(local.mobile.js, local.mobile.css, remote.mobile, "mobile", warnings, modifiedFileNames));
|
|
9435
9185
|
return buildDiffResult(entries, warnings);
|
|
9436
9186
|
} };
|
|
9437
|
-
|
|
9438
|
-
//#region src/core/application/customization/detectCustomizationDiff.ts
|
|
9187
|
+
// src/core/application/customization/detectCustomizationDiff.ts
|
|
9439
9188
|
/**
|
|
9440
9189
|
* Finds matched FILE resource pairs (local FILE + remote FILE with same basename)
|
|
9441
9190
|
* across all platforms and categories.
|
|
@@ -9480,8 +9229,7 @@ async function detectCustomizationDiff({ container, input }) {
|
|
|
9480
9229
|
}
|
|
9481
9230
|
return CustomizationDiffDetector.detect(local, remote, modifiedFileNames);
|
|
9482
9231
|
}
|
|
9483
|
-
|
|
9484
|
-
//#region src/core/domain/fieldPermission/services/diffDetector.ts
|
|
9232
|
+
// src/core/domain/fieldPermission/services/diffDetector.ts
|
|
9485
9233
|
function isEntitiesEqual$1(a, b) {
|
|
9486
9234
|
return deepEqual(a.entities.map((e) => ({
|
|
9487
9235
|
accessibility: e.accessibility,
|
|
@@ -9526,8 +9274,7 @@ const FieldPermissionDiffDetector = { detect: (local, remote) => {
|
|
|
9526
9274
|
});
|
|
9527
9275
|
return buildDiffResult(entries);
|
|
9528
9276
|
} };
|
|
9529
|
-
|
|
9530
|
-
//#region src/core/application/fieldPermission/detectFieldPermissionDiff.ts
|
|
9277
|
+
// src/core/application/fieldPermission/detectFieldPermissionDiff.ts
|
|
9531
9278
|
async function detectFieldPermissionDiff({ container }) {
|
|
9532
9279
|
return detectDiffFromConfig({
|
|
9533
9280
|
getStorage: () => container.fieldPermissionStorage.get(),
|
|
@@ -9537,8 +9284,7 @@ async function detectFieldPermissionDiff({ container }) {
|
|
|
9537
9284
|
notFoundMessage: "Field permission config file not found"
|
|
9538
9285
|
});
|
|
9539
9286
|
}
|
|
9540
|
-
|
|
9541
|
-
//#region src/core/application/formSchema/detectDiff.ts
|
|
9287
|
+
// src/core/application/formSchema/detectDiff.ts
|
|
9542
9288
|
function fieldPropertiesToDto(field) {
|
|
9543
9289
|
if (field.type === "SUBTABLE") {
|
|
9544
9290
|
const innerFields = {};
|
|
@@ -9589,8 +9335,7 @@ async function detectDiff({ container, input }) {
|
|
|
9589
9335
|
hasLayoutChanges
|
|
9590
9336
|
};
|
|
9591
9337
|
}
|
|
9592
|
-
|
|
9593
|
-
//#region src/core/domain/generalSettings/services/diffDetector.ts
|
|
9338
|
+
// src/core/domain/generalSettings/services/diffDetector.ts
|
|
9594
9339
|
const DEFAULT_STRING = "";
|
|
9595
9340
|
const DEFAULT_BOOLEAN = false;
|
|
9596
9341
|
const DEFAULT_FIRST_MONTH = 1;
|
|
@@ -9647,8 +9392,7 @@ function compareConfigs$1(local, remote) {
|
|
|
9647
9392
|
const GeneralSettingsDiffDetector = { detect: (local, remote) => {
|
|
9648
9393
|
return buildDiffResult(compareConfigs$1(local, remote));
|
|
9649
9394
|
} };
|
|
9650
|
-
|
|
9651
|
-
//#region src/core/application/generalSettings/detectGeneralSettingsDiff.ts
|
|
9395
|
+
// src/core/application/generalSettings/detectGeneralSettingsDiff.ts
|
|
9652
9396
|
async function detectGeneralSettingsDiff({ container }) {
|
|
9653
9397
|
return detectDiffFromConfig({
|
|
9654
9398
|
getStorage: () => container.generalSettingsStorage.get(),
|
|
@@ -9658,8 +9402,7 @@ async function detectGeneralSettingsDiff({ container }) {
|
|
|
9658
9402
|
notFoundMessage: "General settings config file not found"
|
|
9659
9403
|
});
|
|
9660
9404
|
}
|
|
9661
|
-
|
|
9662
|
-
//#region src/lib/groupByKey.ts
|
|
9405
|
+
// src/lib/groupByKey.ts
|
|
9663
9406
|
/**
|
|
9664
9407
|
* Groups items by a key function into a Map where each key maps to an array of items.
|
|
9665
9408
|
* Multiple items can share the same key, producing a multimap structure.
|
|
@@ -9674,8 +9417,7 @@ function groupByKey(items, keyFn) {
|
|
|
9674
9417
|
}
|
|
9675
9418
|
return map;
|
|
9676
9419
|
}
|
|
9677
|
-
|
|
9678
|
-
//#region src/lib/pairByKeyInOrder.ts
|
|
9420
|
+
// src/lib/pairByKeyInOrder.ts
|
|
9679
9421
|
/**
|
|
9680
9422
|
* Pairs local and remote items by key. Items sharing a key are matched by
|
|
9681
9423
|
* their order of appearance, so the n-th local item with a key pairs with the
|
|
@@ -9724,8 +9466,7 @@ function pairByKeyInOrder(local, remote, keyFn) {
|
|
|
9724
9466
|
}
|
|
9725
9467
|
return pairs;
|
|
9726
9468
|
}
|
|
9727
|
-
|
|
9728
|
-
//#region src/core/domain/notification/entity.ts
|
|
9469
|
+
// src/core/domain/notification/entity.ts
|
|
9729
9470
|
/**
|
|
9730
9471
|
* Display name of a per-record notification: the title as a name, otherwise
|
|
9731
9472
|
* the filterCond quoted as a value so that it is distinguishable from a title
|
|
@@ -9736,8 +9477,7 @@ function describePerRecordNotification(notif) {
|
|
|
9736
9477
|
if (notif.filterCond !== "") return formatValue(notif.filterCond);
|
|
9737
9478
|
return "(empty filter)";
|
|
9738
9479
|
}
|
|
9739
|
-
|
|
9740
|
-
//#region src/core/domain/notification/services/diffDetector.ts
|
|
9480
|
+
// src/core/domain/notification/services/diffDetector.ts
|
|
9741
9481
|
function serializeEntity$1(entity) {
|
|
9742
9482
|
return `${entity.type}:${entity.code}`;
|
|
9743
9483
|
}
|
|
@@ -9901,8 +9641,7 @@ const NotificationDiffDetector = { detect: (local, remote) => {
|
|
|
9901
9641
|
});
|
|
9902
9642
|
return buildDiffResult(entries);
|
|
9903
9643
|
} };
|
|
9904
|
-
|
|
9905
|
-
//#region src/core/application/notification/loadNotificationRemote.ts
|
|
9644
|
+
// src/core/application/notification/loadNotificationRemote.ts
|
|
9906
9645
|
/**
|
|
9907
9646
|
* Fetches the three remote sub-configs (general / perRecord / reminder) and
|
|
9908
9647
|
* bundles them into a single {@link NotificationRemote}.
|
|
@@ -9935,16 +9674,14 @@ async function loadNotificationRemote(container) {
|
|
|
9935
9674
|
revision: general.revision
|
|
9936
9675
|
};
|
|
9937
9676
|
}
|
|
9938
|
-
|
|
9939
|
-
//#region src/core/application/notification/detectNotificationDiff.ts
|
|
9677
|
+
// src/core/application/notification/detectNotificationDiff.ts
|
|
9940
9678
|
async function detectNotificationDiff({ container }) {
|
|
9941
9679
|
const [storageResult, remote] = await Promise.all([container.notificationStorage.get(), loadNotificationRemote(container)]);
|
|
9942
9680
|
if (!storageResult.exists) throw new ValidationError(ValidationErrorCode.InvalidInput, "Notification config file not found");
|
|
9943
9681
|
const localConfig = parseNotificationConfigText(container.configCodec, storageResult.content);
|
|
9944
9682
|
return NotificationDiffDetector.detect(localConfig, remote.config);
|
|
9945
9683
|
}
|
|
9946
|
-
|
|
9947
|
-
//#region src/core/domain/plugin/services/diffDetector.ts
|
|
9684
|
+
// src/core/domain/plugin/services/diffDetector.ts
|
|
9948
9685
|
const PluginDiffDetector = { detect: (local, remote) => {
|
|
9949
9686
|
const entries = [];
|
|
9950
9687
|
const localMap = new Map(local.plugins.map((p) => [p.id, p]));
|
|
@@ -9974,8 +9711,7 @@ const PluginDiffDetector = { detect: (local, remote) => {
|
|
|
9974
9711
|
});
|
|
9975
9712
|
return buildDiffResult(entries);
|
|
9976
9713
|
} };
|
|
9977
|
-
|
|
9978
|
-
//#region src/core/application/plugin/detectPluginDiff.ts
|
|
9714
|
+
// src/core/application/plugin/detectPluginDiff.ts
|
|
9979
9715
|
async function detectPluginDiff({ container }) {
|
|
9980
9716
|
return detectDiffFromConfig({
|
|
9981
9717
|
getStorage: () => container.pluginStorage.get(),
|
|
@@ -9985,8 +9721,7 @@ async function detectPluginDiff({ container }) {
|
|
|
9985
9721
|
notFoundMessage: "Plugin config file not found"
|
|
9986
9722
|
});
|
|
9987
9723
|
}
|
|
9988
|
-
|
|
9989
|
-
//#region src/core/domain/processManagement/services/diffDetector.ts
|
|
9724
|
+
// src/core/domain/processManagement/services/diffDetector.ts
|
|
9990
9725
|
function isEntityEqual(a, b) {
|
|
9991
9726
|
if (a.type !== b.type) return false;
|
|
9992
9727
|
if ((a.code ?? "") !== (b.code ?? "")) return false;
|
|
@@ -10138,8 +9873,7 @@ function compareConfigs(local, remote) {
|
|
|
10138
9873
|
const ProcessManagementDiffDetector = { detect: (local, remote) => {
|
|
10139
9874
|
return buildDiffResult(compareConfigs(local, remote));
|
|
10140
9875
|
} };
|
|
10141
|
-
|
|
10142
|
-
//#region src/core/application/processManagement/detectProcessManagementDiff.ts
|
|
9876
|
+
// src/core/application/processManagement/detectProcessManagementDiff.ts
|
|
10143
9877
|
async function detectProcessManagementDiff({ container }) {
|
|
10144
9878
|
return detectDiffFromConfig({
|
|
10145
9879
|
getStorage: () => container.processManagementStorage.get(),
|
|
@@ -10149,8 +9883,7 @@ async function detectProcessManagementDiff({ container }) {
|
|
|
10149
9883
|
notFoundMessage: "Process management config file not found"
|
|
10150
9884
|
});
|
|
10151
9885
|
}
|
|
10152
|
-
|
|
10153
|
-
//#region src/core/domain/recordPermission/services/diffDetector.ts
|
|
9886
|
+
// src/core/domain/recordPermission/services/diffDetector.ts
|
|
10154
9887
|
function isRightEqual(a, b) {
|
|
10155
9888
|
return deepEqual(a.entities.map((e) => ({
|
|
10156
9889
|
type: e.entity.type,
|
|
@@ -10210,8 +9943,7 @@ const RecordPermissionDiffDetector = { detect: (local, remote) => {
|
|
|
10210
9943
|
}
|
|
10211
9944
|
return buildDiffResult(entries);
|
|
10212
9945
|
} };
|
|
10213
|
-
|
|
10214
|
-
//#region src/core/application/recordPermission/detectRecordPermissionDiff.ts
|
|
9946
|
+
// src/core/application/recordPermission/detectRecordPermissionDiff.ts
|
|
10215
9947
|
async function detectRecordPermissionDiff({ container }) {
|
|
10216
9948
|
return detectDiffFromConfig({
|
|
10217
9949
|
getStorage: () => container.recordPermissionStorage.get(),
|
|
@@ -10221,8 +9953,7 @@ async function detectRecordPermissionDiff({ container }) {
|
|
|
10221
9953
|
notFoundMessage: "Record permission config file not found"
|
|
10222
9954
|
});
|
|
10223
9955
|
}
|
|
10224
|
-
|
|
10225
|
-
//#region src/core/domain/report/services/diffDetector.ts
|
|
9956
|
+
// src/core/domain/report/services/diffDetector.ts
|
|
10226
9957
|
function compareReports(local, remote) {
|
|
10227
9958
|
const diffs = [];
|
|
10228
9959
|
if (local.name !== remote.name) diffs.push(`name: ${formatValue(remote.name)} -> ${formatValue(local.name)}`);
|
|
@@ -10258,8 +9989,7 @@ const ReportDiffDetector = { detect: (local, remote) => {
|
|
|
10258
9989
|
})
|
|
10259
9990
|
}));
|
|
10260
9991
|
} };
|
|
10261
|
-
|
|
10262
|
-
//#region src/core/application/report/detectReportDiff.ts
|
|
9992
|
+
// src/core/application/report/detectReportDiff.ts
|
|
10263
9993
|
async function detectReportDiff({ container }) {
|
|
10264
9994
|
return detectDiffFromConfig({
|
|
10265
9995
|
getStorage: () => container.reportStorage.get(),
|
|
@@ -10269,8 +9999,7 @@ async function detectReportDiff({ container }) {
|
|
|
10269
9999
|
notFoundMessage: "Report config file not found"
|
|
10270
10000
|
});
|
|
10271
10001
|
}
|
|
10272
|
-
|
|
10273
|
-
//#region src/core/domain/view/services/diffDetector.ts
|
|
10002
|
+
// src/core/domain/view/services/diffDetector.ts
|
|
10274
10003
|
function checkOptionalStringChange(changes, field, localVal, remoteVal) {
|
|
10275
10004
|
if ((localVal ?? "") !== (remoteVal ?? "")) changes.push(`${field}: ${formatValue(remoteVal ?? "")} -> ${formatValue(localVal ?? "")}`);
|
|
10276
10005
|
}
|
|
@@ -10311,8 +10040,7 @@ const ViewDiffDetector = { detect: (localViews, remoteViews) => {
|
|
|
10311
10040
|
})
|
|
10312
10041
|
}));
|
|
10313
10042
|
} };
|
|
10314
|
-
|
|
10315
|
-
//#region src/core/application/view/detectViewDiff.ts
|
|
10043
|
+
// src/core/application/view/detectViewDiff.ts
|
|
10316
10044
|
async function detectViewDiff({ container }) {
|
|
10317
10045
|
return detectDiffFromConfig({
|
|
10318
10046
|
getStorage: () => container.viewStorage.get(),
|
|
@@ -10322,8 +10050,7 @@ async function detectViewDiff({ container }) {
|
|
|
10322
10050
|
notFoundMessage: "View config file not found"
|
|
10323
10051
|
});
|
|
10324
10052
|
}
|
|
10325
|
-
|
|
10326
|
-
//#region src/core/application/diffAll/diffAllForApp.ts
|
|
10053
|
+
// src/core/application/diffAll/diffAllForApp.ts
|
|
10327
10054
|
function buildDiffTasks(args) {
|
|
10328
10055
|
const c = args.containers;
|
|
10329
10056
|
return [
|
|
@@ -10477,8 +10204,7 @@ async function diffAllForApp(args) {
|
|
|
10477
10204
|
}
|
|
10478
10205
|
return results;
|
|
10479
10206
|
}
|
|
10480
|
-
|
|
10481
|
-
//#region src/cli/applyAllOutput.ts
|
|
10207
|
+
// src/cli/applyAllOutput.ts
|
|
10482
10208
|
const domainDisplayName$3 = {
|
|
10483
10209
|
schema: "Schema",
|
|
10484
10210
|
customize: "Customization",
|
|
@@ -10530,8 +10256,7 @@ function printApplyAllResults(output) {
|
|
|
10530
10256
|
if (skipped > 0) parts.push(pc.yellow(`${skipped} skipped`));
|
|
10531
10257
|
p.log.message(` Summary: ${parts.length > 0 ? parts.join(pc.dim(" | ")) : "No domains processed"}`);
|
|
10532
10258
|
}
|
|
10533
|
-
|
|
10534
|
-
//#region src/cli/diffAllOutput.ts
|
|
10259
|
+
// src/cli/diffAllOutput.ts
|
|
10535
10260
|
const domainDisplayName$2 = {
|
|
10536
10261
|
schema: "Schema",
|
|
10537
10262
|
customize: "Customization",
|
|
@@ -10627,8 +10352,7 @@ function printDiffAllResults(results) {
|
|
|
10627
10352
|
if (failed > 0) parts.push(pc.red(`${failed} failed`));
|
|
10628
10353
|
p.log.message(` ${parts.join(pc.dim(", "))}`);
|
|
10629
10354
|
}
|
|
10630
|
-
|
|
10631
|
-
//#region src/cli/commands/apply.ts
|
|
10355
|
+
// src/cli/commands/apply.ts
|
|
10632
10356
|
const dryRunArgs = { "dry-run": {
|
|
10633
10357
|
type: "boolean",
|
|
10634
10358
|
description: "Show diff preview only without applying changes"
|
|
@@ -10792,8 +10516,7 @@ var apply_default$10 = define({
|
|
|
10792
10516
|
}
|
|
10793
10517
|
}
|
|
10794
10518
|
});
|
|
10795
|
-
|
|
10796
|
-
//#region src/core/application/container/captureAllCli.ts
|
|
10519
|
+
// src/core/application/container/captureAllCli.ts
|
|
10797
10520
|
function createCliCaptureContainers(input) {
|
|
10798
10521
|
const client = createKintoneClient(input);
|
|
10799
10522
|
const base = {
|
|
@@ -10892,8 +10615,7 @@ function createCliCaptureContainers(input) {
|
|
|
10892
10615
|
}
|
|
10893
10616
|
};
|
|
10894
10617
|
}
|
|
10895
|
-
|
|
10896
|
-
//#region src/core/domain/customization/services/configSerializer.ts
|
|
10618
|
+
// src/core/domain/customization/services/configSerializer.ts
|
|
10897
10619
|
function serializeResource(resource, platform, category, decorate) {
|
|
10898
10620
|
const serialized = resource.type === "FILE" ? {
|
|
10899
10621
|
type: "FILE",
|
|
@@ -10927,8 +10649,7 @@ const CustomizationConfigSerializer = { serialize: (config, decorate) => {
|
|
|
10927
10649
|
...hasPlatformResources(config.mobile) ? { mobile: serializePlatform(config.mobile, "mobile", decorate) } : {}
|
|
10928
10650
|
};
|
|
10929
10651
|
} };
|
|
10930
|
-
|
|
10931
|
-
//#region src/core/domain/customization/services/customizationMerge.ts
|
|
10652
|
+
// src/core/domain/customization/services/customizationMerge.ts
|
|
10932
10653
|
/**
|
|
10933
10654
|
* Per-side placeholder for "no content digest for this key". Distinct per side
|
|
10934
10655
|
* so an untracked key never compares equal across sides by accident.
|
|
@@ -11171,8 +10892,7 @@ function rebuild(chosen, scope, local, remote) {
|
|
|
11171
10892
|
}
|
|
11172
10893
|
};
|
|
11173
10894
|
}
|
|
11174
|
-
|
|
11175
|
-
//#region src/lib/deduplicateName.ts
|
|
10895
|
+
// src/lib/deduplicateName.ts
|
|
11176
10896
|
const DEFAULT_MAX_COUNTER = 1e4;
|
|
11177
10897
|
/**
|
|
11178
10898
|
* Generate a unique name by appending a counter suffix if the base name is already taken.
|
|
@@ -11205,8 +10925,7 @@ function deduplicateName(baseName, usedNames, options) {
|
|
|
11205
10925
|
usedNames.add(candidate);
|
|
11206
10926
|
return candidate;
|
|
11207
10927
|
}
|
|
11208
|
-
|
|
11209
|
-
//#region src/core/application/customization/captureCustomization.ts
|
|
10928
|
+
// src/core/application/customization/captureCustomization.ts
|
|
11210
10929
|
const UNSAFE_FILE_CHARS = /[<>:"|?*\u0000-\u001f]/g;
|
|
11211
10930
|
function sanitizeFileName(name) {
|
|
11212
10931
|
const sanitized = basename(name).replace(UNSAFE_FILE_CHARS, "_");
|
|
@@ -11332,13 +11051,11 @@ async function captureCustomization({ container, input }) {
|
|
|
11332
11051
|
fileResourceCount: desktopPlan.fileCount + mobilePlan.fileCount
|
|
11333
11052
|
};
|
|
11334
11053
|
}
|
|
11335
|
-
|
|
11336
|
-
//#region src/core/application/customization/saveCustomization.ts
|
|
11054
|
+
// src/core/application/customization/saveCustomization.ts
|
|
11337
11055
|
async function saveCustomization({ container, input }) {
|
|
11338
11056
|
await container.customizationStorage.update(input.configText);
|
|
11339
11057
|
}
|
|
11340
|
-
|
|
11341
|
-
//#region src/core/domain/fieldPermission/services/configSerializer.ts
|
|
11058
|
+
// src/core/domain/fieldPermission/services/configSerializer.ts
|
|
11342
11059
|
function serializeFieldRightEntity(entity) {
|
|
11343
11060
|
const result = {
|
|
11344
11061
|
accessibility: entity.accessibility,
|
|
@@ -11356,8 +11073,7 @@ const FieldPermissionConfigSerializer = { serialize: (config) => {
|
|
|
11356
11073
|
entities: right.entities.map(serializeFieldRightEntity)
|
|
11357
11074
|
})) };
|
|
11358
11075
|
} };
|
|
11359
|
-
|
|
11360
|
-
//#region src/core/application/fieldPermission/captureFieldPermission.ts
|
|
11076
|
+
// src/core/application/fieldPermission/captureFieldPermission.ts
|
|
11361
11077
|
async function captureFieldPermission({ container }) {
|
|
11362
11078
|
return captureFromConfig({
|
|
11363
11079
|
fetchRemote: () => container.fieldPermissionConfigurator.getFieldPermissions(),
|
|
@@ -11365,13 +11081,11 @@ async function captureFieldPermission({ container }) {
|
|
|
11365
11081
|
getStorage: () => container.fieldPermissionStorage.get()
|
|
11366
11082
|
});
|
|
11367
11083
|
}
|
|
11368
|
-
|
|
11369
|
-
//#region src/core/application/fieldPermission/saveFieldPermission.ts
|
|
11084
|
+
// src/core/application/fieldPermission/saveFieldPermission.ts
|
|
11370
11085
|
async function saveFieldPermission({ container, input }) {
|
|
11371
11086
|
await container.fieldPermissionStorage.update(input.configText);
|
|
11372
11087
|
}
|
|
11373
|
-
|
|
11374
|
-
//#region src/core/domain/formSchema/services/schemaSerializer.ts
|
|
11088
|
+
// src/core/domain/formSchema/services/schemaSerializer.ts
|
|
11375
11089
|
function serializeSize(size) {
|
|
11376
11090
|
const result = {};
|
|
11377
11091
|
if (size.width !== void 0) result.width = size.width;
|
|
@@ -11467,8 +11181,7 @@ function serializeLayoutItem(item, fields) {
|
|
|
11467
11181
|
const SchemaSerializer = { serialize: (layout, fields) => {
|
|
11468
11182
|
return { layout: layout.map((item) => serializeLayoutItem(item, fields)) };
|
|
11469
11183
|
} };
|
|
11470
|
-
|
|
11471
|
-
//#region src/core/application/formSchema/captureSchema.ts
|
|
11184
|
+
// src/core/application/formSchema/captureSchema.ts
|
|
11472
11185
|
/**
|
|
11473
11186
|
* The existing schema file, which decides how the captured related apps are
|
|
11474
11187
|
* referred to; `undefined` when there is none or it cannot be parsed.
|
|
@@ -11495,13 +11208,11 @@ async function captureSchema({ container }) {
|
|
|
11495
11208
|
hasExistingSchema: existingResult.exists
|
|
11496
11209
|
};
|
|
11497
11210
|
}
|
|
11498
|
-
|
|
11499
|
-
//#region src/core/application/formSchema/saveSchema.ts
|
|
11211
|
+
// src/core/application/formSchema/saveSchema.ts
|
|
11500
11212
|
async function saveSchema({ container, input }) {
|
|
11501
11213
|
await container.schemaStorage.update(input.schemaText);
|
|
11502
11214
|
}
|
|
11503
|
-
|
|
11504
|
-
//#region src/core/domain/generalSettings/services/configSerializer.ts
|
|
11215
|
+
// src/core/domain/generalSettings/services/configSerializer.ts
|
|
11505
11216
|
function serializeConfig(config) {
|
|
11506
11217
|
const result = {};
|
|
11507
11218
|
if (config.name !== void 0) result.name = config.name;
|
|
@@ -11532,8 +11243,7 @@ function serializeConfig(config) {
|
|
|
11532
11243
|
const GeneralSettingsConfigSerializer = { serialize: (config) => {
|
|
11533
11244
|
return serializeConfig(config);
|
|
11534
11245
|
} };
|
|
11535
|
-
|
|
11536
|
-
//#region src/core/application/generalSettings/captureGeneralSettings.ts
|
|
11246
|
+
// src/core/application/generalSettings/captureGeneralSettings.ts
|
|
11537
11247
|
async function captureGeneralSettings({ container }) {
|
|
11538
11248
|
return captureFromConfig({
|
|
11539
11249
|
fetchRemote: () => container.generalSettingsConfigurator.getGeneralSettings(),
|
|
@@ -11541,13 +11251,11 @@ async function captureGeneralSettings({ container }) {
|
|
|
11541
11251
|
getStorage: () => container.generalSettingsStorage.get()
|
|
11542
11252
|
});
|
|
11543
11253
|
}
|
|
11544
|
-
|
|
11545
|
-
//#region src/core/application/generalSettings/saveGeneralSettings.ts
|
|
11254
|
+
// src/core/application/generalSettings/saveGeneralSettings.ts
|
|
11546
11255
|
async function saveGeneralSettings({ container, input }) {
|
|
11547
11256
|
await container.generalSettingsStorage.update(input.configText);
|
|
11548
11257
|
}
|
|
11549
|
-
|
|
11550
|
-
//#region src/core/domain/notification/services/configSerializer.ts
|
|
11258
|
+
// src/core/domain/notification/services/configSerializer.ts
|
|
11551
11259
|
function serializeEntity(entity) {
|
|
11552
11260
|
return {
|
|
11553
11261
|
type: entity.type,
|
|
@@ -11603,8 +11311,7 @@ const NotificationConfigSerializer = { serialize: (config) => {
|
|
|
11603
11311
|
};
|
|
11604
11312
|
return serialized;
|
|
11605
11313
|
} };
|
|
11606
|
-
|
|
11607
|
-
//#region src/core/application/notification/captureNotification.ts
|
|
11314
|
+
// src/core/application/notification/captureNotification.ts
|
|
11608
11315
|
async function captureNotification({ container }) {
|
|
11609
11316
|
const { config } = await loadNotificationRemote(container);
|
|
11610
11317
|
return {
|
|
@@ -11612,13 +11319,11 @@ async function captureNotification({ container }) {
|
|
|
11612
11319
|
hasExistingConfig: (await container.notificationStorage.get()).exists
|
|
11613
11320
|
};
|
|
11614
11321
|
}
|
|
11615
|
-
|
|
11616
|
-
//#region src/core/application/notification/saveNotification.ts
|
|
11322
|
+
// src/core/application/notification/saveNotification.ts
|
|
11617
11323
|
async function saveNotification({ container, input }) {
|
|
11618
11324
|
await container.notificationStorage.update(input.configText);
|
|
11619
11325
|
}
|
|
11620
|
-
|
|
11621
|
-
//#region src/core/domain/plugin/services/configSerializer.ts
|
|
11326
|
+
// src/core/domain/plugin/services/configSerializer.ts
|
|
11622
11327
|
const PluginConfigSerializer = { serialize: (config) => {
|
|
11623
11328
|
return { plugins: config.plugins.map((plugin) => ({
|
|
11624
11329
|
id: plugin.id,
|
|
@@ -11626,8 +11331,7 @@ const PluginConfigSerializer = { serialize: (config) => {
|
|
|
11626
11331
|
enabled: plugin.enabled
|
|
11627
11332
|
})) };
|
|
11628
11333
|
} };
|
|
11629
|
-
|
|
11630
|
-
//#region src/core/application/plugin/capturePlugin.ts
|
|
11334
|
+
// src/core/application/plugin/capturePlugin.ts
|
|
11631
11335
|
async function capturePlugin({ container }) {
|
|
11632
11336
|
return captureFromConfig({
|
|
11633
11337
|
fetchRemote: () => container.pluginConfigurator.getPlugins(),
|
|
@@ -11635,13 +11339,11 @@ async function capturePlugin({ container }) {
|
|
|
11635
11339
|
getStorage: () => container.pluginStorage.get()
|
|
11636
11340
|
});
|
|
11637
11341
|
}
|
|
11638
|
-
|
|
11639
|
-
//#region src/core/application/plugin/savePlugin.ts
|
|
11342
|
+
// src/core/application/plugin/savePlugin.ts
|
|
11640
11343
|
async function savePlugin({ container, input }) {
|
|
11641
11344
|
await container.pluginStorage.update(input.configText);
|
|
11642
11345
|
}
|
|
11643
|
-
|
|
11644
|
-
//#region src/core/domain/processManagement/services/configSerializer.ts
|
|
11346
|
+
// src/core/domain/processManagement/services/configSerializer.ts
|
|
11645
11347
|
function serializeProcessEntity(entity) {
|
|
11646
11348
|
const result = { type: entity.type };
|
|
11647
11349
|
if (entity.code !== void 0) result.code = entity.code;
|
|
@@ -11673,8 +11375,7 @@ const ProcessManagementConfigSerializer = { serialize: (config) => {
|
|
|
11673
11375
|
})
|
|
11674
11376
|
};
|
|
11675
11377
|
} };
|
|
11676
|
-
|
|
11677
|
-
//#region src/core/application/processManagement/captureProcessManagement.ts
|
|
11378
|
+
// src/core/application/processManagement/captureProcessManagement.ts
|
|
11678
11379
|
async function captureProcessManagement({ container }) {
|
|
11679
11380
|
return captureFromConfig({
|
|
11680
11381
|
fetchRemote: () => container.processManagementConfigurator.getProcessManagement(),
|
|
@@ -11682,13 +11383,11 @@ async function captureProcessManagement({ container }) {
|
|
|
11682
11383
|
getStorage: () => container.processManagementStorage.get()
|
|
11683
11384
|
});
|
|
11684
11385
|
}
|
|
11685
|
-
|
|
11686
|
-
//#region src/core/application/processManagement/saveProcessManagement.ts
|
|
11386
|
+
// src/core/application/processManagement/saveProcessManagement.ts
|
|
11687
11387
|
async function saveProcessManagement({ container, input }) {
|
|
11688
11388
|
await container.processManagementStorage.update(input.configText);
|
|
11689
11389
|
}
|
|
11690
|
-
|
|
11691
|
-
//#region src/core/domain/recordPermission/services/configSerializer.ts
|
|
11390
|
+
// src/core/domain/recordPermission/services/configSerializer.ts
|
|
11692
11391
|
function serializeRecordRightEntity(entity) {
|
|
11693
11392
|
return {
|
|
11694
11393
|
entity: {
|
|
@@ -11707,8 +11406,7 @@ const RecordPermissionConfigSerializer = { serialize: (config) => {
|
|
|
11707
11406
|
entities: right.entities.map(serializeRecordRightEntity)
|
|
11708
11407
|
})) };
|
|
11709
11408
|
} };
|
|
11710
|
-
|
|
11711
|
-
//#region src/core/application/recordPermission/captureRecordPermission.ts
|
|
11409
|
+
// src/core/application/recordPermission/captureRecordPermission.ts
|
|
11712
11410
|
async function captureRecordPermission({ container }) {
|
|
11713
11411
|
return captureFromConfig({
|
|
11714
11412
|
fetchRemote: () => container.recordPermissionConfigurator.getRecordPermissions(),
|
|
@@ -11716,13 +11414,11 @@ async function captureRecordPermission({ container }) {
|
|
|
11716
11414
|
getStorage: () => container.recordPermissionStorage.get()
|
|
11717
11415
|
});
|
|
11718
11416
|
}
|
|
11719
|
-
|
|
11720
|
-
//#region src/core/application/recordPermission/saveRecordPermission.ts
|
|
11417
|
+
// src/core/application/recordPermission/saveRecordPermission.ts
|
|
11721
11418
|
async function saveRecordPermission({ container, input }) {
|
|
11722
11419
|
await container.recordPermissionStorage.update(input.configText);
|
|
11723
11420
|
}
|
|
11724
|
-
|
|
11725
|
-
//#region src/core/domain/report/services/configSerializer.ts
|
|
11421
|
+
// src/core/domain/report/services/configSerializer.ts
|
|
11726
11422
|
function serializeGroup(group) {
|
|
11727
11423
|
const result = { code: group.code };
|
|
11728
11424
|
if (group.per !== void 0) result.per = group.per;
|
|
@@ -11775,8 +11471,7 @@ const ReportConfigSerializer = { serialize: (config) => {
|
|
|
11775
11471
|
serialized.reports = reports;
|
|
11776
11472
|
return serialized;
|
|
11777
11473
|
} };
|
|
11778
|
-
|
|
11779
|
-
//#region src/core/application/report/captureReport.ts
|
|
11474
|
+
// src/core/application/report/captureReport.ts
|
|
11780
11475
|
async function captureReport({ container }) {
|
|
11781
11476
|
return captureFromConfig({
|
|
11782
11477
|
fetchRemote: () => container.reportConfigurator.getReports(),
|
|
@@ -11784,13 +11479,11 @@ async function captureReport({ container }) {
|
|
|
11784
11479
|
getStorage: () => container.reportStorage.get()
|
|
11785
11480
|
});
|
|
11786
11481
|
}
|
|
11787
|
-
|
|
11788
|
-
//#region src/core/application/report/saveReport.ts
|
|
11482
|
+
// src/core/application/report/saveReport.ts
|
|
11789
11483
|
async function saveReport({ container, input }) {
|
|
11790
11484
|
await container.reportStorage.update(input.configText);
|
|
11791
11485
|
}
|
|
11792
|
-
|
|
11793
|
-
//#region src/core/domain/seedData/services/seedSerializer.ts
|
|
11486
|
+
// src/core/domain/seedData/services/seedSerializer.ts
|
|
11794
11487
|
const SeedSerializer = { serialize: (seedData) => {
|
|
11795
11488
|
const records = seedData.records.map((record) => ({ ...record }));
|
|
11796
11489
|
return seedData.key !== null ? {
|
|
@@ -11798,8 +11491,7 @@ const SeedSerializer = { serialize: (seedData) => {
|
|
|
11798
11491
|
records
|
|
11799
11492
|
} : { records };
|
|
11800
11493
|
} };
|
|
11801
|
-
|
|
11802
|
-
//#region src/core/application/seedData/captureSeed.ts
|
|
11494
|
+
// src/core/application/seedData/captureSeed.ts
|
|
11803
11495
|
async function captureSeed({ container, input }) {
|
|
11804
11496
|
const key = input.keyField ? UpsertKey.create(input.keyField) : null;
|
|
11805
11497
|
const records = (await container.recordManager.getAllRecords()).map(({ record }) => record);
|
|
@@ -11814,13 +11506,11 @@ async function captureSeed({ container, input }) {
|
|
|
11814
11506
|
hasExistingSeed: existing.exists
|
|
11815
11507
|
};
|
|
11816
11508
|
}
|
|
11817
|
-
|
|
11818
|
-
//#region src/core/application/seedData/saveSeed.ts
|
|
11509
|
+
// src/core/application/seedData/saveSeed.ts
|
|
11819
11510
|
async function saveSeed({ container, input }) {
|
|
11820
11511
|
await container.seedStorage.update(input.seedText);
|
|
11821
11512
|
}
|
|
11822
|
-
|
|
11823
|
-
//#region src/core/domain/view/services/configSerializer.ts
|
|
11513
|
+
// src/core/domain/view/services/configSerializer.ts
|
|
11824
11514
|
function serializeViewConfig(config) {
|
|
11825
11515
|
const result = {
|
|
11826
11516
|
type: config.type,
|
|
@@ -11842,8 +11532,7 @@ const ViewConfigSerializer = { serialize: (config) => {
|
|
|
11842
11532
|
for (const [name, viewConfig] of Object.entries(config.views)) serialized[name] = serializeViewConfig(viewConfig);
|
|
11843
11533
|
return { views: serialized };
|
|
11844
11534
|
} };
|
|
11845
|
-
|
|
11846
|
-
//#region src/core/application/view/captureView.ts
|
|
11535
|
+
// src/core/application/view/captureView.ts
|
|
11847
11536
|
async function captureView({ container }) {
|
|
11848
11537
|
return captureFromConfig({
|
|
11849
11538
|
fetchRemote: () => container.viewConfigurator.getViews(),
|
|
@@ -11851,13 +11540,11 @@ async function captureView({ container }) {
|
|
|
11851
11540
|
getStorage: () => container.viewStorage.get()
|
|
11852
11541
|
});
|
|
11853
11542
|
}
|
|
11854
|
-
|
|
11855
|
-
//#region src/core/application/view/saveView.ts
|
|
11543
|
+
// src/core/application/view/saveView.ts
|
|
11856
11544
|
async function saveView({ container, input }) {
|
|
11857
11545
|
await container.viewStorage.update(input.configText);
|
|
11858
11546
|
}
|
|
11859
|
-
|
|
11860
|
-
//#region src/core/application/init/captureAllForApp.ts
|
|
11547
|
+
// src/core/application/init/captureAllForApp.ts
|
|
11861
11548
|
function buildStandardTask(domain, container, capture, save) {
|
|
11862
11549
|
return {
|
|
11863
11550
|
domain,
|
|
@@ -11999,8 +11686,7 @@ async function captureAllForApp(args) {
|
|
|
11999
11686
|
}
|
|
12000
11687
|
return results;
|
|
12001
11688
|
}
|
|
12002
|
-
|
|
12003
|
-
//#region src/cli/captureAllOutput.ts
|
|
11689
|
+
// src/cli/captureAllOutput.ts
|
|
12004
11690
|
const domainPathKey = {
|
|
12005
11691
|
schema: "schema",
|
|
12006
11692
|
customize: "customize",
|
|
@@ -12036,8 +11722,7 @@ function printCaptureAllResults(results, paths) {
|
|
|
12036
11722
|
if (failed > 0) parts.push(pc.red(`${failed} failed`));
|
|
12037
11723
|
p.log.message(` Summary: ${parts.join(pc.dim(" | "))}`);
|
|
12038
11724
|
}
|
|
12039
|
-
|
|
12040
|
-
//#region src/cli/commands/capture.ts
|
|
11725
|
+
// src/cli/commands/capture.ts
|
|
12041
11726
|
const captureArgs = {
|
|
12042
11727
|
domain: kintoneArgs.domain,
|
|
12043
11728
|
username: kintoneArgs.username,
|
|
@@ -12095,8 +11780,7 @@ var capture_default$11 = define({
|
|
|
12095
11780
|
}
|
|
12096
11781
|
}
|
|
12097
11782
|
});
|
|
12098
|
-
|
|
12099
|
-
//#region src/core/domain/appRevision/services/deployStateEvaluator.ts
|
|
11783
|
+
// src/core/domain/appRevision/services/deployStateEvaluator.ts
|
|
12100
11784
|
const DeployStateEvaluator = {
|
|
12101
11785
|
/** Derives the {@link DeployState} from the revisions of both generations. */
|
|
12102
11786
|
evaluate: ({ preview, published }) => {
|
|
@@ -12117,15 +11801,13 @@ const DeployStateEvaluator = {
|
|
|
12117
11801
|
/** True when a deploy would publish something that is waiting in preview. */
|
|
12118
11802
|
hasUndeployedChanges: (state) => state.kind !== "upToDate"
|
|
12119
11803
|
};
|
|
12120
|
-
|
|
12121
|
-
//#region src/core/application/appRevision/checkDeployState.ts
|
|
11804
|
+
// src/core/application/appRevision/checkDeployState.ts
|
|
12122
11805
|
/** Tells whether the app's preview holds changes a deploy would publish. */
|
|
12123
11806
|
async function checkDeployState({ container }) {
|
|
12124
11807
|
const generations = await container.appRevisionGenerationsReader.read();
|
|
12125
11808
|
return DeployStateEvaluator.evaluate(generations);
|
|
12126
11809
|
}
|
|
12127
|
-
|
|
12128
|
-
//#region src/core/adapters/kintone/appRevisionGenerationsReader.ts
|
|
11810
|
+
// src/core/adapters/kintone/appRevisionGenerationsReader.ts
|
|
12129
11811
|
const KINTONE_APP_NOT_FOUND_CODE = "GAIA_AP01";
|
|
12130
11812
|
/**
|
|
12131
11813
|
* Reads both generations' revisions through `getAppAcl`.
|
|
@@ -12180,13 +11862,11 @@ var KintoneAppRevisionGenerationsReader = class {
|
|
|
12180
11862
|
return revision;
|
|
12181
11863
|
}
|
|
12182
11864
|
};
|
|
12183
|
-
|
|
12184
|
-
//#region src/core/application/container/deployStateCli.ts
|
|
11865
|
+
// src/core/application/container/deployStateCli.ts
|
|
12185
11866
|
function createDeployStateCliContainer(config) {
|
|
12186
11867
|
return { appRevisionGenerationsReader: new KintoneAppRevisionGenerationsReader(config.client ?? createKintoneClient(config), config.appId) };
|
|
12187
11868
|
}
|
|
12188
|
-
|
|
12189
|
-
//#region src/cli/commands/check-pending.ts
|
|
11869
|
+
// src/cli/commands/check-pending.ts
|
|
12190
11870
|
const checkPendingArgs = {
|
|
12191
11871
|
domain: kintoneArgs.domain,
|
|
12192
11872
|
username: kintoneArgs.username,
|
|
@@ -12258,8 +11938,7 @@ var check_pending_default = define({
|
|
|
12258
11938
|
}
|
|
12259
11939
|
}
|
|
12260
11940
|
});
|
|
12261
|
-
|
|
12262
|
-
//#region src/cli/customizeConfig.ts
|
|
11941
|
+
// src/cli/customizeConfig.ts
|
|
12263
11942
|
const CUSTOMIZE_STATE_FILE = "customize.yaml";
|
|
12264
11943
|
const customizeArgs = {
|
|
12265
11944
|
...kintoneArgs,
|
|
@@ -12282,8 +11961,7 @@ const { resolveFilePath: resolveCustomizeFilePath, resolveContainerConfig: resol
|
|
|
12282
11961
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
12283
11962
|
})
|
|
12284
11963
|
});
|
|
12285
|
-
|
|
12286
|
-
//#region src/cli/commands/customize/capture.ts
|
|
11964
|
+
// src/cli/commands/customize/capture.ts
|
|
12287
11965
|
function computeBasePath(customizeFilePath) {
|
|
12288
11966
|
const filePrefix = deriveFilePrefix(customizeFilePath);
|
|
12289
11967
|
return join(dirname(resolve(customizeFilePath)), filePrefix);
|
|
@@ -12348,8 +12026,7 @@ var capture_default$10 = define({
|
|
|
12348
12026
|
}
|
|
12349
12027
|
}
|
|
12350
12028
|
});
|
|
12351
|
-
|
|
12352
|
-
//#region src/cli/commands/customize/apply.ts
|
|
12029
|
+
// src/cli/commands/customize/apply.ts
|
|
12353
12030
|
function createCustomizationContainer(config) {
|
|
12354
12031
|
return {
|
|
12355
12032
|
container: createCustomizationCliContainer(config),
|
|
@@ -12487,8 +12164,7 @@ var apply_default$9 = define({
|
|
|
12487
12164
|
}
|
|
12488
12165
|
}
|
|
12489
12166
|
});
|
|
12490
|
-
|
|
12491
|
-
//#region src/lib/contentDigest.ts
|
|
12167
|
+
// src/lib/contentDigest.ts
|
|
12492
12168
|
const PREFIX = "sha256:";
|
|
12493
12169
|
const DIGEST_PATTERN = /^sha256:[0-9a-f]{64}$/;
|
|
12494
12170
|
/**
|
|
@@ -12515,8 +12191,7 @@ function computeContentDigest(data) {
|
|
|
12515
12191
|
function isContentDigest(value) {
|
|
12516
12192
|
return typeof value === "string" && DIGEST_PATTERN.test(value);
|
|
12517
12193
|
}
|
|
12518
|
-
|
|
12519
|
-
//#region src/core/application/customization/customizationDigests.ts
|
|
12194
|
+
// src/core/application/customization/customizationDigests.ts
|
|
12520
12195
|
/**
|
|
12521
12196
|
* Digests the given local FILE resources.
|
|
12522
12197
|
*
|
|
@@ -12598,8 +12273,7 @@ async function computeRemoteFileDigests(remote, downloader, keys) {
|
|
|
12598
12273
|
const results = await Promise.all(targets.map(async ({ key, fileKey }) => [key, computeContentDigest(await downloader.download(fileKey))]));
|
|
12599
12274
|
return new Map(results);
|
|
12600
12275
|
}
|
|
12601
|
-
|
|
12602
|
-
//#region src/core/application/customization/customizationThreeWayMerge.ts
|
|
12276
|
+
// src/core/application/customization/customizationThreeWayMerge.ts
|
|
12603
12277
|
/**
|
|
12604
12278
|
* Assembles the customization 3-way merge shared by `diff`, `push` and `pull`.
|
|
12605
12279
|
*
|
|
@@ -12647,8 +12321,7 @@ function intersect(a, b) {
|
|
|
12647
12321
|
function subset(digests, keys) {
|
|
12648
12322
|
return new Map([...digests].filter(([key]) => keys.has(key)));
|
|
12649
12323
|
}
|
|
12650
|
-
|
|
12651
|
-
//#region src/core/domain/customization/services/customizationStateParser.ts
|
|
12324
|
+
// src/core/domain/customization/services/customizationStateParser.ts
|
|
12652
12325
|
/**
|
|
12653
12326
|
* Collects the per-FILE `digest` entries into the merge's key space. The
|
|
12654
12327
|
* structure itself is already validated by {@link CustomizationConfigParser},
|
|
@@ -12696,8 +12369,7 @@ const CustomizationStateParser = { parse: (parsed) => ({
|
|
|
12696
12369
|
config: CustomizationConfigParser.parse(parsed),
|
|
12697
12370
|
fileDigests: parseFileDigests(parsed)
|
|
12698
12371
|
}) };
|
|
12699
|
-
|
|
12700
|
-
//#region src/core/application/customization/customizationRemote.ts
|
|
12372
|
+
// src/core/application/customization/customizationRemote.ts
|
|
12701
12373
|
/**
|
|
12702
12374
|
* Converts the kintone remote customization (file metadata) into a
|
|
12703
12375
|
* {@link CustomizationConfig} view for the file-name-keyed 3-way merge. Remote
|
|
@@ -12725,8 +12397,7 @@ function toResource(resource) {
|
|
|
12725
12397
|
path: resource.file.name
|
|
12726
12398
|
};
|
|
12727
12399
|
}
|
|
12728
|
-
|
|
12729
|
-
//#region src/core/application/customization/loadCustomizationThreeWayInputs.ts
|
|
12400
|
+
// src/core/application/customization/loadCustomizationThreeWayInputs.ts
|
|
12730
12401
|
/**
|
|
12731
12402
|
* Loads the four inputs of a 3-way customization sync (base snapshot, base app
|
|
12732
12403
|
* revision, local YAML, remote customization + revision) via the generic
|
|
@@ -12760,8 +12431,7 @@ async function loadCustomizationThreeWayInputs(container) {
|
|
|
12760
12431
|
}
|
|
12761
12432
|
});
|
|
12762
12433
|
}
|
|
12763
|
-
|
|
12764
|
-
//#region src/core/application/customization/detectCustomizationThreeWayDiff.ts
|
|
12434
|
+
// src/core/application/customization/detectCustomizationThreeWayDiff.ts
|
|
12765
12435
|
/** How many resource keys a note lists inline before summarizing the rest. */
|
|
12766
12436
|
const MAX_LISTED_KEYS = 10;
|
|
12767
12437
|
/**
|
|
@@ -12831,8 +12501,7 @@ async function detectCustomizationThreeWayDiff({ container, input }) {
|
|
|
12831
12501
|
});
|
|
12832
12502
|
return buildRecordThreeWayDiff(merge, (entry) => entry.key, { notes: buildNotes(estimatedKeys, unreadableLocalKeys, new Set(merge.entries.filter((entry) => entry.change.kind === "localOnly" || entry.change.kind === "remoteOnly" || entry.change.kind === "conflict").map((entry) => entry.key))) });
|
|
12833
12503
|
}
|
|
12834
|
-
|
|
12835
|
-
//#region src/cli/commands/customize/diff.ts
|
|
12504
|
+
// src/cli/commands/customize/diff.ts
|
|
12836
12505
|
async function runDiff$9(containerConfig) {
|
|
12837
12506
|
const container = createCustomizationCliContainer(containerConfig);
|
|
12838
12507
|
const basePath = computeBasePath(containerConfig.customizeFilePath);
|
|
@@ -12877,8 +12546,7 @@ var diff_default$10 = define({
|
|
|
12877
12546
|
}
|
|
12878
12547
|
}
|
|
12879
12548
|
});
|
|
12880
|
-
|
|
12881
|
-
//#region src/core/domain/customization/services/customizationStateSerializer.ts
|
|
12549
|
+
// src/core/domain/customization/services/customizationStateSerializer.ts
|
|
12882
12550
|
/**
|
|
12883
12551
|
* Serializes a {@link CustomizationState} to a plain object suitable for YAML
|
|
12884
12552
|
* stringification (via the codec port in the application layer).
|
|
@@ -12896,8 +12564,7 @@ const CustomizationStateSerializer = { serialize: (state) => CustomizationConfig
|
|
|
12896
12564
|
const digest = state.fileDigests.get(resourceKey(platform, category, resourceName(resource)));
|
|
12897
12565
|
return digest === void 0 ? void 0 : { digest };
|
|
12898
12566
|
}) };
|
|
12899
|
-
|
|
12900
|
-
//#region src/core/application/customization/customizationStateIo.ts
|
|
12567
|
+
// src/core/application/customization/customizationStateIo.ts
|
|
12901
12568
|
/**
|
|
12902
12569
|
* Persists the new base: the customization snapshot (config + FILE content
|
|
12903
12570
|
* digests) and the app revision (`state/<appName>/revision.yaml`) side by side.
|
|
@@ -12917,8 +12584,7 @@ async function saveCustomizationSnapshotAndRevision(container, config, fileDiges
|
|
|
12917
12584
|
});
|
|
12918
12585
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
12919
12586
|
}
|
|
12920
|
-
|
|
12921
|
-
//#region src/core/application/customization/pullCustomization.ts
|
|
12587
|
+
// src/core/application/customization/pullCustomization.ts
|
|
12922
12588
|
/**
|
|
12923
12589
|
* First stage of `customize pull`.
|
|
12924
12590
|
*
|
|
@@ -13047,8 +12713,7 @@ function remoteFileKeyMap(remote) {
|
|
|
13047
12713
|
for (const { platform, category, resource } of walkCustomizationBuckets(remote)) if (resource.type === "FILE") map.set(remoteFileResourceKey(platform, category, resource.file.name), resource.file.fileKey);
|
|
13048
12714
|
return map;
|
|
13049
12715
|
}
|
|
13050
|
-
|
|
13051
|
-
//#region src/cli/commands/customize/pull.ts
|
|
12716
|
+
// src/cli/commands/customize/pull.ts
|
|
13052
12717
|
/**
|
|
13053
12718
|
* Derives the path bases `runPull` feeds to the application layer.
|
|
13054
12719
|
*
|
|
@@ -13244,8 +12909,7 @@ var pull_default$10 = define({
|
|
|
13244
12909
|
}
|
|
13245
12910
|
}
|
|
13246
12911
|
});
|
|
13247
|
-
|
|
13248
|
-
//#region src/core/application/customization/pushCustomization.ts
|
|
12912
|
+
// src/core/application/customization/pushCustomization.ts
|
|
13249
12913
|
/** Pull command name surfaced in the drift hint message. */
|
|
13250
12914
|
const CUSTOMIZE_PULL_COMMAND = "customize pull";
|
|
13251
12915
|
function inferredDriftHint(count) {
|
|
@@ -13334,8 +12998,7 @@ async function pushCustomization({ container, input }) {
|
|
|
13334
12998
|
revision: newRevision
|
|
13335
12999
|
};
|
|
13336
13000
|
}
|
|
13337
|
-
|
|
13338
|
-
//#region src/cli/commands/customize/push.ts
|
|
13001
|
+
// src/cli/commands/customize/push.ts
|
|
13339
13002
|
const TOCTOU_MESSAGE = "The remote changed while applying. Run `customize pull` and retry.";
|
|
13340
13003
|
/**
|
|
13341
13004
|
* Hand-written push command for customization: the file-entity domain needs a
|
|
@@ -13408,8 +13071,7 @@ var push_default$11 = define({
|
|
|
13408
13071
|
}
|
|
13409
13072
|
}
|
|
13410
13073
|
});
|
|
13411
|
-
|
|
13412
|
-
//#region src/cli/commands/customize/index.ts
|
|
13074
|
+
// src/cli/commands/customize/index.ts
|
|
13413
13075
|
var customize_default = define({
|
|
13414
13076
|
name: "customize",
|
|
13415
13077
|
description: "Manage kintone JS/CSS customizations",
|
|
@@ -13422,8 +13084,7 @@ var customize_default = define({
|
|
|
13422
13084
|
},
|
|
13423
13085
|
run: () => {}
|
|
13424
13086
|
});
|
|
13425
|
-
|
|
13426
|
-
//#region src/core/application/container/diffAllCli.ts
|
|
13087
|
+
// src/core/application/container/diffAllCli.ts
|
|
13427
13088
|
function createCliDiffAllContainers(input) {
|
|
13428
13089
|
const client = createKintoneClient(input);
|
|
13429
13090
|
const base = {
|
|
@@ -13518,8 +13179,7 @@ function createCliDiffAllContainers(input) {
|
|
|
13518
13179
|
}
|
|
13519
13180
|
};
|
|
13520
13181
|
}
|
|
13521
|
-
|
|
13522
|
-
//#region src/cli/commands/diff.ts
|
|
13182
|
+
// src/cli/commands/diff.ts
|
|
13523
13183
|
const diffArgs = {
|
|
13524
13184
|
domain: kintoneArgs.domain,
|
|
13525
13185
|
username: kintoneArgs.username,
|
|
@@ -13572,8 +13232,7 @@ var diff_default$9 = define({
|
|
|
13572
13232
|
}
|
|
13573
13233
|
}
|
|
13574
13234
|
});
|
|
13575
|
-
|
|
13576
|
-
//#region src/cli/fieldAclConfig.ts
|
|
13235
|
+
// src/cli/fieldAclConfig.ts
|
|
13577
13236
|
const FIELD_ACL_STATE_FILE = "field-acl.yaml";
|
|
13578
13237
|
const fieldAclArgs = {
|
|
13579
13238
|
...kintoneArgs,
|
|
@@ -13596,8 +13255,7 @@ const { resolveFilePath: resolveFieldAclFilePath, resolveContainerConfig: resolv
|
|
|
13596
13255
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
13597
13256
|
})
|
|
13598
13257
|
});
|
|
13599
|
-
|
|
13600
|
-
//#region src/cli/commands/field-acl/apply.ts
|
|
13258
|
+
// src/cli/commands/field-acl/apply.ts
|
|
13601
13259
|
var apply_default$8 = createApplyCommand({
|
|
13602
13260
|
description: "Apply field access permissions from YAML to kintone app",
|
|
13603
13261
|
args: fieldAclArgs,
|
|
@@ -13617,8 +13275,7 @@ var apply_default$8 = createApplyCommand({
|
|
|
13617
13275
|
resolveContainerConfig: resolveFieldAclContainerConfig,
|
|
13618
13276
|
resolveAppContainerConfig: resolveFieldAclAppContainerConfig
|
|
13619
13277
|
});
|
|
13620
|
-
|
|
13621
|
-
//#region src/cli/commands/field-acl/capture.ts
|
|
13278
|
+
// src/cli/commands/field-acl/capture.ts
|
|
13622
13279
|
var capture_default$9 = createCaptureCommand({
|
|
13623
13280
|
description: "Capture current field access permissions from kintone app to file",
|
|
13624
13281
|
args: fieldAclArgs,
|
|
@@ -13637,8 +13294,7 @@ var capture_default$9 = createCaptureCommand({
|
|
|
13637
13294
|
resolveContainerConfig: resolveFieldAclContainerConfig,
|
|
13638
13295
|
resolveAppContainerConfig: resolveFieldAclAppContainerConfig
|
|
13639
13296
|
});
|
|
13640
|
-
|
|
13641
|
-
//#region src/core/domain/fieldPermission/services/fieldPermissionMerge.ts
|
|
13297
|
+
// src/core/domain/fieldPermission/services/fieldPermissionMerge.ts
|
|
13642
13298
|
/**
|
|
13643
13299
|
* 3-way merge for the field permission domain (field-acl).
|
|
13644
13300
|
*
|
|
@@ -13690,8 +13346,7 @@ function resolveFieldPermissionMerge(merge, resolution) {
|
|
|
13690
13346
|
const record = resolveRecordMerge(merge, resolution, FieldPermissionErrorCode.FpUnresolvedConflict);
|
|
13691
13347
|
return { rights: Object.values(record) };
|
|
13692
13348
|
}
|
|
13693
|
-
|
|
13694
|
-
//#region src/core/domain/fieldPermission/services/fieldPermissionStateParser.ts
|
|
13349
|
+
// src/core/domain/fieldPermission/services/fieldPermissionStateParser.ts
|
|
13695
13350
|
/**
|
|
13696
13351
|
* Parses pre-parsed (codec-decoded) data into a {@link FieldPermissionState}.
|
|
13697
13352
|
*
|
|
@@ -13701,8 +13356,7 @@ function resolveFieldPermissionMerge(merge, resolution) {
|
|
|
13701
13356
|
* on YAML; the application layer handles codec decoding before calling this.
|
|
13702
13357
|
*/
|
|
13703
13358
|
const FieldPermissionStateParser = { parse: (parsed) => ({ config: FieldPermissionConfigParser.parse(parsed) }) };
|
|
13704
|
-
|
|
13705
|
-
//#region src/core/application/fieldPermission/loadFieldPermissionThreeWayInputs.ts
|
|
13359
|
+
// src/core/application/fieldPermission/loadFieldPermissionThreeWayInputs.ts
|
|
13706
13360
|
/**
|
|
13707
13361
|
* Loads the four inputs of a 3-way field permission sync (base snapshot, base
|
|
13708
13362
|
* app revision, local YAML, remote config + revision) via the generic
|
|
@@ -13730,8 +13384,7 @@ async function loadFieldPermissionThreeWayInputs(container) {
|
|
|
13730
13384
|
}
|
|
13731
13385
|
});
|
|
13732
13386
|
}
|
|
13733
|
-
|
|
13734
|
-
//#region src/core/application/fieldPermission/detectFieldPermissionThreeWayDiff.ts
|
|
13387
|
+
// src/core/application/fieldPermission/detectFieldPermissionThreeWayDiff.ts
|
|
13735
13388
|
/**
|
|
13736
13389
|
* Detects field permission differences with 3-way awareness.
|
|
13737
13390
|
*
|
|
@@ -13749,8 +13402,7 @@ async function detectFieldPermissionThreeWayDiff({ container }) {
|
|
|
13749
13402
|
};
|
|
13750
13403
|
return buildRecordThreeWayDiff(computeFieldPermissionThreeWayMerge(state, local, remote.config), (entry) => entry.key);
|
|
13751
13404
|
}
|
|
13752
|
-
|
|
13753
|
-
//#region src/cli/commands/field-acl/diff.ts
|
|
13405
|
+
// src/cli/commands/field-acl/diff.ts
|
|
13754
13406
|
async function runDiff$8(containerConfig) {
|
|
13755
13407
|
const container = createFieldPermissionCliContainer(containerConfig);
|
|
13756
13408
|
const s = p.spinner();
|
|
@@ -13790,8 +13442,7 @@ var diff_default$8 = define({
|
|
|
13790
13442
|
}
|
|
13791
13443
|
}
|
|
13792
13444
|
});
|
|
13793
|
-
|
|
13794
|
-
//#region src/core/domain/fieldPermission/services/fieldPermissionStateSerializer.ts
|
|
13445
|
+
// src/core/domain/fieldPermission/services/fieldPermissionStateSerializer.ts
|
|
13795
13446
|
/**
|
|
13796
13447
|
* Serializes a {@link FieldPermissionState} to a plain object suitable for YAML
|
|
13797
13448
|
* stringification (via the codec port in the application layer).
|
|
@@ -13802,8 +13453,7 @@ var diff_default$8 = define({
|
|
|
13802
13453
|
* is persisted separately via `AppRevisionStorage`.
|
|
13803
13454
|
*/
|
|
13804
13455
|
const FieldPermissionStateSerializer = { serialize: (state) => FieldPermissionConfigSerializer.serialize(state.config) };
|
|
13805
|
-
|
|
13806
|
-
//#region src/core/application/fieldPermission/fieldPermissionStateIo.ts
|
|
13456
|
+
// src/core/application/fieldPermission/fieldPermissionStateIo.ts
|
|
13807
13457
|
/**
|
|
13808
13458
|
* Persists the new base: the field permission snapshot (state file) and the app
|
|
13809
13459
|
* revision (`state/<appName>/revision.yaml`) side by side. The two writes are
|
|
@@ -13813,8 +13463,7 @@ async function saveFieldPermissionSnapshotAndRevision(container, config, revisio
|
|
|
13813
13463
|
await saveSnapshotState(container.fieldPermissionStateStorage, container.configCodec, FieldPermissionStateSerializer.serialize, { config });
|
|
13814
13464
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
13815
13465
|
}
|
|
13816
|
-
|
|
13817
|
-
//#region src/core/application/fieldPermission/pullFieldPermission.ts
|
|
13466
|
+
// src/core/application/fieldPermission/pullFieldPermission.ts
|
|
13818
13467
|
function serializePermissions$1(container, config) {
|
|
13819
13468
|
return stringifyConfig(container.configCodec, FieldPermissionConfigSerializer.serialize(config));
|
|
13820
13469
|
}
|
|
@@ -13862,8 +13511,7 @@ async function applyPulledFieldPermissionMerge({ container, input }) {
|
|
|
13862
13511
|
await saveFieldPermissionSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
13863
13512
|
return { configText };
|
|
13864
13513
|
}
|
|
13865
|
-
|
|
13866
|
-
//#region src/cli/commands/field-acl/pull.ts
|
|
13514
|
+
// src/cli/commands/field-acl/pull.ts
|
|
13867
13515
|
var pull_default$9 = createPullCommand({
|
|
13868
13516
|
description: "Pull remote field permissions into the local field-acl config (3-way merge)",
|
|
13869
13517
|
args: fieldAclArgs,
|
|
@@ -13899,8 +13547,7 @@ var pull_default$9 = createPullCommand({
|
|
|
13899
13547
|
resolveContainerConfig: resolveFieldAclContainerConfig,
|
|
13900
13548
|
resolveAppContainerConfig: resolveFieldAclAppContainerConfig
|
|
13901
13549
|
});
|
|
13902
|
-
|
|
13903
|
-
//#region src/core/application/fieldPermission/pushFieldPermission.ts
|
|
13550
|
+
// src/core/application/fieldPermission/pushFieldPermission.ts
|
|
13904
13551
|
/** Pull command name surfaced in the drift hint message. */
|
|
13905
13552
|
const FIELD_ACL_PULL_COMMAND = "field-acl pull";
|
|
13906
13553
|
/**
|
|
@@ -13933,8 +13580,7 @@ async function pushFieldPermission({ container, input }) {
|
|
|
13933
13580
|
revision: newRevision
|
|
13934
13581
|
};
|
|
13935
13582
|
}
|
|
13936
|
-
|
|
13937
|
-
//#region src/cli/commands/field-acl/push.ts
|
|
13583
|
+
// src/cli/commands/field-acl/push.ts
|
|
13938
13584
|
var push_default$10 = createPushCommand({
|
|
13939
13585
|
description: "Push the local field permission config to kintone (with drift detection)",
|
|
13940
13586
|
args: fieldAclArgs,
|
|
@@ -13949,8 +13595,7 @@ var push_default$10 = createPushCommand({
|
|
|
13949
13595
|
resolveContainerConfig: resolveFieldAclContainerConfig,
|
|
13950
13596
|
resolveAppContainerConfig: resolveFieldAclAppContainerConfig
|
|
13951
13597
|
});
|
|
13952
|
-
|
|
13953
|
-
//#region src/cli/commands/field-acl/index.ts
|
|
13598
|
+
// src/cli/commands/field-acl/index.ts
|
|
13954
13599
|
var field_acl_default = define({
|
|
13955
13600
|
name: "field-acl",
|
|
13956
13601
|
description: "Manage kintone field access permissions",
|
|
@@ -13963,8 +13608,7 @@ var field_acl_default = define({
|
|
|
13963
13608
|
},
|
|
13964
13609
|
run: () => {}
|
|
13965
13610
|
});
|
|
13966
|
-
|
|
13967
|
-
//#region src/core/adapters/kintone/appLister.ts
|
|
13611
|
+
// src/core/adapters/kintone/appLister.ts
|
|
13968
13612
|
const PAGE_LIMIT = 100;
|
|
13969
13613
|
const MAX_PAGES = 1e3;
|
|
13970
13614
|
var KintoneAppLister = class {
|
|
@@ -14000,8 +13644,7 @@ var KintoneAppLister = class {
|
|
|
14000
13644
|
}
|
|
14001
13645
|
}
|
|
14002
13646
|
};
|
|
14003
|
-
|
|
14004
|
-
//#region src/core/adapters/kintone/spaceReader.ts
|
|
13647
|
+
// src/core/adapters/kintone/spaceReader.ts
|
|
14005
13648
|
/**
|
|
14006
13649
|
* Reads space information from the kintone REST API.
|
|
14007
13650
|
*
|
|
@@ -14043,13 +13686,11 @@ var KintoneSpaceReader = class {
|
|
|
14043
13686
|
}
|
|
14044
13687
|
}
|
|
14045
13688
|
};
|
|
14046
|
-
|
|
14047
|
-
//#region src/core/adapters/local/projectConfigStorage.ts
|
|
13689
|
+
// src/core/adapters/local/projectConfigStorage.ts
|
|
14048
13690
|
function createLocalFileProjectConfigStorage(filePath) {
|
|
14049
13691
|
return createLocalFileStorage(filePath, "project config file");
|
|
14050
13692
|
}
|
|
14051
|
-
|
|
14052
|
-
//#region src/core/application/container/initCli.ts
|
|
13693
|
+
// src/core/application/container/initCli.ts
|
|
14053
13694
|
function createInitCliContainer(config) {
|
|
14054
13695
|
const client = config.client ?? createKintoneClient(config);
|
|
14055
13696
|
return {
|
|
@@ -14058,22 +13699,19 @@ function createInitCliContainer(config) {
|
|
|
14058
13699
|
projectConfigStorage: createLocalFileProjectConfigStorage(config.configFilePath)
|
|
14059
13700
|
};
|
|
14060
13701
|
}
|
|
14061
|
-
|
|
14062
|
-
//#region src/core/application/init/fetchAllApps.ts
|
|
13702
|
+
// src/core/application/init/fetchAllApps.ts
|
|
14063
13703
|
async function fetchAllApps(args) {
|
|
14064
13704
|
const apps = await args.container.appLister.getAllApps();
|
|
14065
13705
|
if (apps.length === 0) throw new NotFoundError(NotFoundErrorCode.NotFound, "No apps found. Please check your API token permissions.");
|
|
14066
13706
|
return apps;
|
|
14067
13707
|
}
|
|
14068
|
-
|
|
14069
|
-
//#region src/core/application/init/fetchSpaceApps.ts
|
|
13708
|
+
// src/core/application/init/fetchSpaceApps.ts
|
|
14070
13709
|
async function fetchSpaceApps(args) {
|
|
14071
13710
|
const apps = await args.container.spaceReader.getSpaceApps(args.input.spaceId);
|
|
14072
13711
|
if (apps.length === 0) throw new NotFoundError(NotFoundErrorCode.NotFound, `No apps found in space ID: ${args.input.spaceId}`);
|
|
14073
13712
|
return apps;
|
|
14074
13713
|
}
|
|
14075
|
-
|
|
14076
|
-
//#region src/core/domain/app/entity.ts
|
|
13714
|
+
// src/core/domain/app/entity.ts
|
|
14077
13715
|
const UNSAFE_PATH_CHARS = /[<>:"/\\|?*\u0000-\u001f]/g;
|
|
14078
13716
|
function sanitizeForFileSystem(name) {
|
|
14079
13717
|
const sanitized = name.replace(UNSAFE_PATH_CHARS, "_").replace(/\.+$/, "");
|
|
@@ -14083,8 +13721,7 @@ function resolveAppName(app) {
|
|
|
14083
13721
|
const raw = app.code !== "" ? app.code : app.name !== "" ? app.name : `app-${app.appId}`;
|
|
14084
13722
|
return AppName.create(sanitizeForFileSystem(raw));
|
|
14085
13723
|
}
|
|
14086
|
-
|
|
14087
|
-
//#region src/core/application/init/generateProjectConfig.ts
|
|
13724
|
+
// src/core/application/init/generateProjectConfig.ts
|
|
14088
13725
|
function deduplicateAppName(baseName, usedNames) {
|
|
14089
13726
|
return AppName.create(deduplicateName(baseName, usedNames, {
|
|
14090
13727
|
separator: "-",
|
|
@@ -14107,8 +13744,7 @@ function generateProjectConfig(input, codec) {
|
|
|
14107
13744
|
apps
|
|
14108
13745
|
});
|
|
14109
13746
|
}
|
|
14110
|
-
|
|
14111
|
-
//#region src/cli/commands/init.ts
|
|
13747
|
+
// src/cli/commands/init.ts
|
|
14112
13748
|
const initArgs = {
|
|
14113
13749
|
"space-id": {
|
|
14114
13750
|
type: "string",
|
|
@@ -14258,8 +13894,7 @@ var init_default = define({
|
|
|
14258
13894
|
}
|
|
14259
13895
|
}
|
|
14260
13896
|
});
|
|
14261
|
-
|
|
14262
|
-
//#region src/cli/notificationConfig.ts
|
|
13897
|
+
// src/cli/notificationConfig.ts
|
|
14263
13898
|
const NOTIFICATION_STATE_FILE = "notification.yaml";
|
|
14264
13899
|
const notificationArgs = {
|
|
14265
13900
|
...kintoneArgs,
|
|
@@ -14282,8 +13917,7 @@ const { resolveFilePath: resolveNotificationFilePath, resolveContainerConfig: re
|
|
|
14282
13917
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
14283
13918
|
})
|
|
14284
13919
|
});
|
|
14285
|
-
|
|
14286
|
-
//#region src/cli/commands/notification/apply.ts
|
|
13920
|
+
// src/cli/commands/notification/apply.ts
|
|
14287
13921
|
var apply_default$7 = createApplyCommand({
|
|
14288
13922
|
description: "Apply notification settings from YAML to kintone app",
|
|
14289
13923
|
args: notificationArgs,
|
|
@@ -14303,8 +13937,7 @@ var apply_default$7 = createApplyCommand({
|
|
|
14303
13937
|
resolveContainerConfig: resolveNotificationContainerConfig,
|
|
14304
13938
|
resolveAppContainerConfig: resolveNotificationAppContainerConfig
|
|
14305
13939
|
});
|
|
14306
|
-
|
|
14307
|
-
//#region src/cli/commands/notification/capture.ts
|
|
13940
|
+
// src/cli/commands/notification/capture.ts
|
|
14308
13941
|
var capture_default$8 = createCaptureCommand({
|
|
14309
13942
|
description: "Capture current notification settings from kintone app to file",
|
|
14310
13943
|
args: notificationArgs,
|
|
@@ -14323,8 +13956,7 @@ var capture_default$8 = createCaptureCommand({
|
|
|
14323
13956
|
resolveContainerConfig: resolveNotificationContainerConfig,
|
|
14324
13957
|
resolveAppContainerConfig: resolveNotificationAppContainerConfig
|
|
14325
13958
|
});
|
|
14326
|
-
|
|
14327
|
-
//#region src/core/domain/services/filterCondKey.ts
|
|
13959
|
+
// src/core/domain/services/filterCondKey.ts
|
|
14328
13960
|
/**
|
|
14329
13961
|
* Merge key of the `index`-th entry among the entries sharing `filterCond`
|
|
14330
13962
|
* (record permission rights, perRecord notifications). The index suffix comes
|
|
@@ -14343,8 +13975,7 @@ function describeFilterCondKey(key) {
|
|
|
14343
13975
|
const indexStart = key.lastIndexOf("#");
|
|
14344
13976
|
return `${formatValue(key.slice(0, indexStart))}${key.slice(indexStart)}`;
|
|
14345
13977
|
}
|
|
14346
|
-
|
|
14347
|
-
//#region src/core/domain/notification/services/notificationMerge.ts
|
|
13978
|
+
// src/core/domain/notification/services/notificationMerge.ts
|
|
14348
13979
|
/**
|
|
14349
13980
|
* 3-way merge for the notification domain (general / perRecord / reminder).
|
|
14350
13981
|
*
|
|
@@ -14514,8 +14145,7 @@ function resolveNotificationMerge(merge, resolution) {
|
|
|
14514
14145
|
}
|
|
14515
14146
|
};
|
|
14516
14147
|
}
|
|
14517
|
-
|
|
14518
|
-
//#region src/core/domain/notification/services/notificationStateParser.ts
|
|
14148
|
+
// src/core/domain/notification/services/notificationStateParser.ts
|
|
14519
14149
|
/**
|
|
14520
14150
|
* Parses pre-parsed (codec-decoded) data into a {@link NotificationState}.
|
|
14521
14151
|
*
|
|
@@ -14525,8 +14155,7 @@ function resolveNotificationMerge(merge, resolution) {
|
|
|
14525
14155
|
* YAML; the application layer handles codec decoding before calling this.
|
|
14526
14156
|
*/
|
|
14527
14157
|
const NotificationStateParser = { parse: (parsed) => ({ config: NotificationConfigParser.parse(parsed) }) };
|
|
14528
|
-
|
|
14529
|
-
//#region src/core/application/notification/loadNotificationThreeWayInputs.ts
|
|
14158
|
+
// src/core/application/notification/loadNotificationThreeWayInputs.ts
|
|
14530
14159
|
/**
|
|
14531
14160
|
* Loads the four inputs of a 3-way notification sync (base snapshot, base app
|
|
14532
14161
|
* revision, local YAML, remote config + revision) via the generic
|
|
@@ -14550,8 +14179,7 @@ async function loadNotificationThreeWayInputs(container) {
|
|
|
14550
14179
|
loadRemote: async () => loadNotificationRemote(container)
|
|
14551
14180
|
});
|
|
14552
14181
|
}
|
|
14553
|
-
|
|
14554
|
-
//#region src/core/application/notification/detectNotificationThreeWayDiff.ts
|
|
14182
|
+
// src/core/application/notification/detectNotificationThreeWayDiff.ts
|
|
14555
14183
|
/**
|
|
14556
14184
|
* Human label for a merge entry. Uses the section-appropriate display value
|
|
14557
14185
|
* (`describePerRecordNotification` for perRecord, the title or else the
|
|
@@ -14658,8 +14286,7 @@ async function detectNotificationThreeWayDiff({ container }) {
|
|
|
14658
14286
|
};
|
|
14659
14287
|
return buildThreeWay(computeNotificationThreeWayMerge(state, local, remote.config));
|
|
14660
14288
|
}
|
|
14661
|
-
|
|
14662
|
-
//#region src/cli/commands/notification/diff.ts
|
|
14289
|
+
// src/cli/commands/notification/diff.ts
|
|
14663
14290
|
async function runDiff$7(containerConfig) {
|
|
14664
14291
|
const container = createNotificationCliContainer(containerConfig);
|
|
14665
14292
|
const s = p.spinner();
|
|
@@ -14699,8 +14326,7 @@ var diff_default$7 = define({
|
|
|
14699
14326
|
}
|
|
14700
14327
|
}
|
|
14701
14328
|
});
|
|
14702
|
-
|
|
14703
|
-
//#region src/core/domain/notification/services/notificationStateSerializer.ts
|
|
14329
|
+
// src/core/domain/notification/services/notificationStateSerializer.ts
|
|
14704
14330
|
/**
|
|
14705
14331
|
* Serializes a {@link NotificationState} to a plain object suitable for YAML
|
|
14706
14332
|
* stringification (via the codec port in the application layer).
|
|
@@ -14711,8 +14337,7 @@ var diff_default$7 = define({
|
|
|
14711
14337
|
* is persisted separately via `AppRevisionStorage`.
|
|
14712
14338
|
*/
|
|
14713
14339
|
const NotificationStateSerializer = { serialize: (state) => NotificationConfigSerializer.serialize(state.config) };
|
|
14714
|
-
|
|
14715
|
-
//#region src/core/application/notification/notificationStateIo.ts
|
|
14340
|
+
// src/core/application/notification/notificationStateIo.ts
|
|
14716
14341
|
/**
|
|
14717
14342
|
* Persists the new base: the notification snapshot (state file) and the app
|
|
14718
14343
|
* revision (`state/<appName>/revision.yaml`) side by side. The two writes are
|
|
@@ -14725,8 +14350,7 @@ async function saveNotificationSnapshotAndRevision(container, config, revision)
|
|
|
14725
14350
|
await saveSnapshotState(container.notificationStateStorage, container.configCodec, NotificationStateSerializer.serialize, { config });
|
|
14726
14351
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
14727
14352
|
}
|
|
14728
|
-
|
|
14729
|
-
//#region src/core/application/notification/pullNotification.ts
|
|
14353
|
+
// src/core/application/notification/pullNotification.ts
|
|
14730
14354
|
function serializeNotification(container, config) {
|
|
14731
14355
|
return stringifyConfig(container.configCodec, NotificationConfigSerializer.serialize(config));
|
|
14732
14356
|
}
|
|
@@ -14774,8 +14398,7 @@ async function applyPulledNotificationMerge({ container, input }) {
|
|
|
14774
14398
|
await saveNotificationSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
14775
14399
|
return { configText };
|
|
14776
14400
|
}
|
|
14777
|
-
|
|
14778
|
-
//#region src/cli/commands/notification/pull.ts
|
|
14401
|
+
// src/cli/commands/notification/pull.ts
|
|
14779
14402
|
var pull_default$8 = createPullCommand({
|
|
14780
14403
|
description: "Pull remote notifications into the local notification config (3-way merge)",
|
|
14781
14404
|
args: notificationArgs,
|
|
@@ -14812,8 +14435,7 @@ var pull_default$8 = createPullCommand({
|
|
|
14812
14435
|
resolveContainerConfig: resolveNotificationContainerConfig,
|
|
14813
14436
|
resolveAppContainerConfig: resolveNotificationAppContainerConfig
|
|
14814
14437
|
});
|
|
14815
|
-
|
|
14816
|
-
//#region src/core/application/notification/pushNotification.ts
|
|
14438
|
+
// src/core/application/notification/pushNotification.ts
|
|
14817
14439
|
/** Pull command name surfaced in the drift hint message. */
|
|
14818
14440
|
const NOTIFICATION_PULL_COMMAND = "notification pull";
|
|
14819
14441
|
/**
|
|
@@ -14896,8 +14518,7 @@ async function pushNotification({ container, input }) {
|
|
|
14896
14518
|
revision
|
|
14897
14519
|
};
|
|
14898
14520
|
}
|
|
14899
|
-
|
|
14900
|
-
//#region src/cli/commands/notification/push.ts
|
|
14521
|
+
// src/cli/commands/notification/push.ts
|
|
14901
14522
|
var push_default$9 = createPushCommand({
|
|
14902
14523
|
description: "Push the local notification config to kintone (with drift detection)",
|
|
14903
14524
|
args: notificationArgs,
|
|
@@ -14912,8 +14533,7 @@ var push_default$9 = createPushCommand({
|
|
|
14912
14533
|
resolveContainerConfig: resolveNotificationContainerConfig,
|
|
14913
14534
|
resolveAppContainerConfig: resolveNotificationAppContainerConfig
|
|
14914
14535
|
});
|
|
14915
|
-
|
|
14916
|
-
//#region src/cli/commands/notification/index.ts
|
|
14536
|
+
// src/cli/commands/notification/index.ts
|
|
14917
14537
|
var notification_default = define({
|
|
14918
14538
|
name: "notification",
|
|
14919
14539
|
description: "Manage kintone notification settings",
|
|
@@ -14926,8 +14546,7 @@ var notification_default = define({
|
|
|
14926
14546
|
},
|
|
14927
14547
|
run: () => {}
|
|
14928
14548
|
});
|
|
14929
|
-
|
|
14930
|
-
//#region src/cli/pluginConfig.ts
|
|
14549
|
+
// src/cli/pluginConfig.ts
|
|
14931
14550
|
const PLUGIN_STATE_FILE = "plugin.yaml";
|
|
14932
14551
|
const pluginArgs = {
|
|
14933
14552
|
...kintoneArgs,
|
|
@@ -14950,8 +14569,7 @@ const { resolveFilePath: resolvePluginFilePath, resolveContainerConfig: resolveP
|
|
|
14950
14569
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
14951
14570
|
})
|
|
14952
14571
|
});
|
|
14953
|
-
|
|
14954
|
-
//#region src/cli/commands/plugin/apply.ts
|
|
14572
|
+
// src/cli/commands/plugin/apply.ts
|
|
14955
14573
|
var apply_default$6 = createApplyCommand({
|
|
14956
14574
|
description: "Apply plugins from YAML to kintone app",
|
|
14957
14575
|
args: pluginArgs,
|
|
@@ -14976,8 +14594,7 @@ var apply_default$6 = createApplyCommand({
|
|
|
14976
14594
|
resolveContainerConfig: resolvePluginContainerConfig,
|
|
14977
14595
|
resolveAppContainerConfig: resolvePluginAppContainerConfig
|
|
14978
14596
|
});
|
|
14979
|
-
|
|
14980
|
-
//#region src/cli/commands/plugin/capture.ts
|
|
14597
|
+
// src/cli/commands/plugin/capture.ts
|
|
14981
14598
|
var capture_default$7 = createCaptureCommand({
|
|
14982
14599
|
description: "Capture current plugins from kintone app to file",
|
|
14983
14600
|
args: pluginArgs,
|
|
@@ -14996,8 +14613,7 @@ var capture_default$7 = createCaptureCommand({
|
|
|
14996
14613
|
resolveContainerConfig: resolvePluginContainerConfig,
|
|
14997
14614
|
resolveAppContainerConfig: resolvePluginAppContainerConfig
|
|
14998
14615
|
});
|
|
14999
|
-
|
|
15000
|
-
//#region src/core/domain/plugin/services/pluginMerge.ts
|
|
14616
|
+
// src/core/domain/plugin/services/pluginMerge.ts
|
|
15001
14617
|
/**
|
|
15002
14618
|
* 3-way merge for the plugin domain (plugin id keyed).
|
|
15003
14619
|
*
|
|
@@ -15033,8 +14649,7 @@ function resolvePluginMerge(merge, resolution) {
|
|
|
15033
14649
|
const record = resolveRecordMerge(merge, resolution, PluginErrorCode.PlUnresolvedConflict);
|
|
15034
14650
|
return { plugins: Object.values(record) };
|
|
15035
14651
|
}
|
|
15036
|
-
|
|
15037
|
-
//#region src/core/domain/plugin/services/pluginStateParser.ts
|
|
14652
|
+
// src/core/domain/plugin/services/pluginStateParser.ts
|
|
15038
14653
|
/**
|
|
15039
14654
|
* Parses pre-parsed (codec-decoded) data into a {@link PluginState}.
|
|
15040
14655
|
*
|
|
@@ -15044,8 +14659,7 @@ function resolvePluginMerge(merge, resolution) {
|
|
|
15044
14659
|
* the application layer handles codec decoding before calling this.
|
|
15045
14660
|
*/
|
|
15046
14661
|
const PluginStateParser = { parse: (parsed) => ({ config: PluginConfigParser.parse(parsed) }) };
|
|
15047
|
-
|
|
15048
|
-
//#region src/core/application/plugin/loadPluginThreeWayInputs.ts
|
|
14662
|
+
// src/core/application/plugin/loadPluginThreeWayInputs.ts
|
|
15049
14663
|
/**
|
|
15050
14664
|
* Loads the four inputs of a 3-way plugin sync (base snapshot, base app
|
|
15051
14665
|
* revision, local YAML, remote config + revision) via the generic
|
|
@@ -15073,8 +14687,7 @@ async function loadPluginThreeWayInputs(container) {
|
|
|
15073
14687
|
}
|
|
15074
14688
|
});
|
|
15075
14689
|
}
|
|
15076
|
-
|
|
15077
|
-
//#region src/core/application/plugin/detectPluginThreeWayDiff.ts
|
|
14690
|
+
// src/core/application/plugin/detectPluginThreeWayDiff.ts
|
|
15078
14691
|
/**
|
|
15079
14692
|
* Detects plugin differences with 3-way awareness.
|
|
15080
14693
|
*
|
|
@@ -15094,8 +14707,7 @@ async function detectPluginThreeWayDiff({ container }) {
|
|
|
15094
14707
|
return (entry.local ?? entry.remote ?? entry.base)?.name ?? entry.key;
|
|
15095
14708
|
});
|
|
15096
14709
|
}
|
|
15097
|
-
|
|
15098
|
-
//#region src/cli/commands/plugin/diff.ts
|
|
14710
|
+
// src/cli/commands/plugin/diff.ts
|
|
15099
14711
|
async function runDiff$6(containerConfig) {
|
|
15100
14712
|
const container = createPluginCliContainer(containerConfig);
|
|
15101
14713
|
const s = p.spinner();
|
|
@@ -15135,8 +14747,7 @@ var diff_default$6 = define({
|
|
|
15135
14747
|
}
|
|
15136
14748
|
}
|
|
15137
14749
|
});
|
|
15138
|
-
|
|
15139
|
-
//#region src/core/domain/plugin/services/pluginStateSerializer.ts
|
|
14750
|
+
// src/core/domain/plugin/services/pluginStateSerializer.ts
|
|
15140
14751
|
/**
|
|
15141
14752
|
* Serializes a {@link PluginState} to a plain object suitable for YAML
|
|
15142
14753
|
* stringification (via the codec port in the application layer).
|
|
@@ -15147,8 +14758,7 @@ var diff_default$6 = define({
|
|
|
15147
14758
|
* persisted separately via `AppRevisionStorage`.
|
|
15148
14759
|
*/
|
|
15149
14760
|
const PluginStateSerializer = { serialize: (state) => PluginConfigSerializer.serialize(state.config) };
|
|
15150
|
-
|
|
15151
|
-
//#region src/core/application/plugin/pluginStateIo.ts
|
|
14761
|
+
// src/core/application/plugin/pluginStateIo.ts
|
|
15152
14762
|
/**
|
|
15153
14763
|
* Persists the new base: the plugins snapshot (state file) and the app revision
|
|
15154
14764
|
* (`state/<appName>/revision.yaml`) side by side. The two writes are kept
|
|
@@ -15158,8 +14768,7 @@ async function savePluginSnapshotAndRevision(container, config, revision) {
|
|
|
15158
14768
|
await saveSnapshotState(container.pluginStateStorage, container.configCodec, PluginStateSerializer.serialize, { config });
|
|
15159
14769
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
15160
14770
|
}
|
|
15161
|
-
|
|
15162
|
-
//#region src/core/application/plugin/pullPlugin.ts
|
|
14771
|
+
// src/core/application/plugin/pullPlugin.ts
|
|
15163
14772
|
function serializePlugins(container, config) {
|
|
15164
14773
|
return stringifyConfig(container.configCodec, PluginConfigSerializer.serialize(config));
|
|
15165
14774
|
}
|
|
@@ -15208,8 +14817,7 @@ async function applyPulledPluginMerge({ container, input }) {
|
|
|
15208
14817
|
await savePluginSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
15209
14818
|
return { configText };
|
|
15210
14819
|
}
|
|
15211
|
-
|
|
15212
|
-
//#region src/cli/commands/plugin/pull.ts
|
|
14820
|
+
// src/cli/commands/plugin/pull.ts
|
|
15213
14821
|
var pull_default$7 = createPullCommand({
|
|
15214
14822
|
description: "Pull remote plugins into the local plugin config (3-way merge)",
|
|
15215
14823
|
args: pluginArgs,
|
|
@@ -15245,8 +14853,7 @@ var pull_default$7 = createPullCommand({
|
|
|
15245
14853
|
resolveContainerConfig: resolvePluginContainerConfig,
|
|
15246
14854
|
resolveAppContainerConfig: resolvePluginAppContainerConfig
|
|
15247
14855
|
});
|
|
15248
|
-
|
|
15249
|
-
//#region src/core/application/plugin/pushPlugin.ts
|
|
14856
|
+
// src/core/application/plugin/pushPlugin.ts
|
|
15250
14857
|
/** Pull command name surfaced in the drift hint message. */
|
|
15251
14858
|
const PLUGIN_PULL_COMMAND = "plugin pull";
|
|
15252
14859
|
/**
|
|
@@ -15336,8 +14943,7 @@ async function pushPlugin({ container, input }) {
|
|
|
15336
14943
|
skipped
|
|
15337
14944
|
};
|
|
15338
14945
|
}
|
|
15339
|
-
|
|
15340
|
-
//#region src/cli/commands/plugin/push.ts
|
|
14946
|
+
// src/cli/commands/plugin/push.ts
|
|
15341
14947
|
var push_default$8 = createPushCommand({
|
|
15342
14948
|
description: "Push the local plugin config to kintone (add-only, with drift detection)",
|
|
15343
14949
|
args: pluginArgs,
|
|
@@ -15359,8 +14965,7 @@ var push_default$8 = createPushCommand({
|
|
|
15359
14965
|
resolveContainerConfig: resolvePluginContainerConfig,
|
|
15360
14966
|
resolveAppContainerConfig: resolvePluginAppContainerConfig
|
|
15361
14967
|
});
|
|
15362
|
-
|
|
15363
|
-
//#region src/cli/commands/plugin/index.ts
|
|
14968
|
+
// src/cli/commands/plugin/index.ts
|
|
15364
14969
|
var plugin_default = define({
|
|
15365
14970
|
name: "plugin",
|
|
15366
14971
|
description: "Manage kintone plugins",
|
|
@@ -15373,8 +14978,7 @@ var plugin_default = define({
|
|
|
15373
14978
|
},
|
|
15374
14979
|
run: () => {}
|
|
15375
14980
|
});
|
|
15376
|
-
|
|
15377
|
-
//#region src/cli/processConfig.ts
|
|
14981
|
+
// src/cli/processConfig.ts
|
|
15378
14982
|
const PROCESS_STATE_FILE = "process.yaml";
|
|
15379
14983
|
const processArgs = {
|
|
15380
14984
|
...kintoneArgs,
|
|
@@ -15397,8 +15001,7 @@ const { resolveFilePath: resolveProcessFilePath, resolveContainerConfig: resolve
|
|
|
15397
15001
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
15398
15002
|
})
|
|
15399
15003
|
});
|
|
15400
|
-
|
|
15401
|
-
//#region src/cli/commands/process/apply.ts
|
|
15004
|
+
// src/cli/commands/process/apply.ts
|
|
15402
15005
|
var apply_default$5 = createApplyCommand({
|
|
15403
15006
|
description: "Apply process management settings from YAML to kintone app",
|
|
15404
15007
|
args: processArgs,
|
|
@@ -15421,8 +15024,7 @@ var apply_default$5 = createApplyCommand({
|
|
|
15421
15024
|
resolveContainerConfig: resolveProcessContainerConfig,
|
|
15422
15025
|
resolveAppContainerConfig: resolveProcessAppContainerConfig
|
|
15423
15026
|
});
|
|
15424
|
-
|
|
15425
|
-
//#region src/cli/commands/process/capture.ts
|
|
15027
|
+
// src/cli/commands/process/capture.ts
|
|
15426
15028
|
var capture_default$6 = createCaptureCommand({
|
|
15427
15029
|
description: "Capture current process management settings from kintone app to file",
|
|
15428
15030
|
args: processArgs,
|
|
@@ -15441,8 +15043,7 @@ var capture_default$6 = createCaptureCommand({
|
|
|
15441
15043
|
resolveContainerConfig: resolveProcessContainerConfig,
|
|
15442
15044
|
resolveAppContainerConfig: resolveProcessAppContainerConfig
|
|
15443
15045
|
});
|
|
15444
|
-
|
|
15445
|
-
//#region src/core/domain/processManagement/services/processManagementMerge.ts
|
|
15046
|
+
// src/core/domain/processManagement/services/processManagementMerge.ts
|
|
15446
15047
|
/**
|
|
15447
15048
|
* Equality for two {@link ProcessManagementConfig} values, reusing the 2-way
|
|
15448
15049
|
* diffDetector's "no changes" semantics (`enable` + order-sensitive entity
|
|
@@ -15471,8 +15072,7 @@ function computeProcessManagementThreeWayMerge(base, local, remote) {
|
|
|
15471
15072
|
function resolveProcessManagementMerge(merge, resolution) {
|
|
15472
15073
|
return resolveSingleMerge(merge, resolution, ProcessManagementErrorCode.PmUnresolvedConflict);
|
|
15473
15074
|
}
|
|
15474
|
-
|
|
15475
|
-
//#region src/core/domain/processManagement/services/processManagementStateParser.ts
|
|
15075
|
+
// src/core/domain/processManagement/services/processManagementStateParser.ts
|
|
15476
15076
|
/**
|
|
15477
15077
|
* Parses pre-parsed (codec-decoded) data into a {@link ProcessManagementState}.
|
|
15478
15078
|
*
|
|
@@ -15482,8 +15082,7 @@ function resolveProcessManagementMerge(merge, resolution) {
|
|
|
15482
15082
|
* depend on YAML; the application layer handles codec decoding before this.
|
|
15483
15083
|
*/
|
|
15484
15084
|
const ProcessManagementStateParser = { parse: (parsed) => ({ config: ProcessManagementConfigParser.parse(parsed) }) };
|
|
15485
|
-
|
|
15486
|
-
//#region src/core/application/processManagement/loadProcessManagementThreeWayInputs.ts
|
|
15085
|
+
// src/core/application/processManagement/loadProcessManagementThreeWayInputs.ts
|
|
15487
15086
|
/**
|
|
15488
15087
|
* Loads the four inputs of a 3-way process sync (base snapshot, base app
|
|
15489
15088
|
* revision, local YAML, remote config + revision) via the generic
|
|
@@ -15511,8 +15110,7 @@ async function loadProcessManagementThreeWayInputs(container) {
|
|
|
15511
15110
|
}
|
|
15512
15111
|
});
|
|
15513
15112
|
}
|
|
15514
|
-
|
|
15515
|
-
//#region src/core/application/processManagement/detectProcessManagementThreeWayDiff.ts
|
|
15113
|
+
// src/core/application/processManagement/detectProcessManagementThreeWayDiff.ts
|
|
15516
15114
|
/** Fixed key/label for the whole-entity process diff entry. */
|
|
15517
15115
|
const PROCESS_DIFF_KEY = "process";
|
|
15518
15116
|
/**
|
|
@@ -15529,8 +15127,7 @@ async function detectProcessManagementThreeWayDiff({ container }) {
|
|
|
15529
15127
|
};
|
|
15530
15128
|
return buildSingleThreeWayDiff(computeProcessManagementThreeWayMerge(state, local, remote.config), PROCESS_DIFF_KEY);
|
|
15531
15129
|
}
|
|
15532
|
-
|
|
15533
|
-
//#region src/cli/commands/process/diff.ts
|
|
15130
|
+
// src/cli/commands/process/diff.ts
|
|
15534
15131
|
async function runDiff$5(containerConfig) {
|
|
15535
15132
|
const container = createProcessManagementCliContainer(containerConfig);
|
|
15536
15133
|
const s = p.spinner();
|
|
@@ -15570,8 +15167,7 @@ var diff_default$5 = define({
|
|
|
15570
15167
|
}
|
|
15571
15168
|
}
|
|
15572
15169
|
});
|
|
15573
|
-
|
|
15574
|
-
//#region src/core/domain/processManagement/services/processManagementStateSerializer.ts
|
|
15170
|
+
// src/core/domain/processManagement/services/processManagementStateSerializer.ts
|
|
15575
15171
|
/**
|
|
15576
15172
|
* Serializes a {@link ProcessManagementState} to a plain object suitable for
|
|
15577
15173
|
* YAML stringification (via the codec port in the application layer).
|
|
@@ -15582,8 +15178,7 @@ var diff_default$5 = define({
|
|
|
15582
15178
|
* is persisted separately via `AppRevisionStorage`.
|
|
15583
15179
|
*/
|
|
15584
15180
|
const ProcessManagementStateSerializer = { serialize: (state) => ProcessManagementConfigSerializer.serialize(state.config) };
|
|
15585
|
-
|
|
15586
|
-
//#region src/core/application/processManagement/processManagementStateIo.ts
|
|
15181
|
+
// src/core/application/processManagement/processManagementStateIo.ts
|
|
15587
15182
|
/**
|
|
15588
15183
|
* Persists the new base: the process snapshot (state file) and the app revision
|
|
15589
15184
|
* (`state/<appName>/revision.yaml`) side by side. The two writes are kept
|
|
@@ -15593,8 +15188,7 @@ async function saveProcessManagementSnapshotAndRevision(container, config, revis
|
|
|
15593
15188
|
await saveSnapshotState(container.processManagementStateStorage, container.configCodec, ProcessManagementStateSerializer.serialize, { config });
|
|
15594
15189
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
15595
15190
|
}
|
|
15596
|
-
|
|
15597
|
-
//#region src/core/application/processManagement/pullProcessManagement.ts
|
|
15191
|
+
// src/core/application/processManagement/pullProcessManagement.ts
|
|
15598
15192
|
function serializeProcess(container, config) {
|
|
15599
15193
|
return stringifyConfig(container.configCodec, ProcessManagementConfigSerializer.serialize(config));
|
|
15600
15194
|
}
|
|
@@ -15633,8 +15227,7 @@ async function applyPulledProcessManagementMerge({ container, input }) {
|
|
|
15633
15227
|
await saveProcessManagementSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
15634
15228
|
return { configText };
|
|
15635
15229
|
}
|
|
15636
|
-
|
|
15637
|
-
//#region src/cli/commands/process/pull.ts
|
|
15230
|
+
// src/cli/commands/process/pull.ts
|
|
15638
15231
|
/** Fixed conflict key for the single (whole-entity) process config. */
|
|
15639
15232
|
const PROCESS_CONFLICT_KEY = "process";
|
|
15640
15233
|
var pull_default$6 = createPullCommand({
|
|
@@ -15672,8 +15265,7 @@ var pull_default$6 = createPullCommand({
|
|
|
15672
15265
|
resolveContainerConfig: resolveProcessContainerConfig,
|
|
15673
15266
|
resolveAppContainerConfig: resolveProcessAppContainerConfig
|
|
15674
15267
|
});
|
|
15675
|
-
|
|
15676
|
-
//#region src/core/application/processManagement/pushProcessManagement.ts
|
|
15268
|
+
// src/core/application/processManagement/pushProcessManagement.ts
|
|
15677
15269
|
/** Pull command name surfaced in the drift hint message. */
|
|
15678
15270
|
const PROCESS_PULL_COMMAND = "process pull";
|
|
15679
15271
|
/**
|
|
@@ -15700,8 +15292,7 @@ async function pushProcessManagement({ container, input }) {
|
|
|
15700
15292
|
revision: newRevision
|
|
15701
15293
|
};
|
|
15702
15294
|
}
|
|
15703
|
-
|
|
15704
|
-
//#region src/cli/commands/process/push.ts
|
|
15295
|
+
// src/cli/commands/process/push.ts
|
|
15705
15296
|
var push_default$7 = createPushCommand({
|
|
15706
15297
|
description: "Push the local process management config to kintone (with drift detection)",
|
|
15707
15298
|
args: processArgs,
|
|
@@ -15716,8 +15307,7 @@ var push_default$7 = createPushCommand({
|
|
|
15716
15307
|
resolveContainerConfig: resolveProcessContainerConfig,
|
|
15717
15308
|
resolveAppContainerConfig: resolveProcessAppContainerConfig
|
|
15718
15309
|
});
|
|
15719
|
-
|
|
15720
|
-
//#region src/cli/commands/process/index.ts
|
|
15310
|
+
// src/cli/commands/process/index.ts
|
|
15721
15311
|
var process_default = define({
|
|
15722
15312
|
name: "process",
|
|
15723
15313
|
description: "Manage kintone process management settings",
|
|
@@ -15730,8 +15320,7 @@ var process_default = define({
|
|
|
15730
15320
|
},
|
|
15731
15321
|
run: () => {}
|
|
15732
15322
|
});
|
|
15733
|
-
|
|
15734
|
-
//#region src/core/domain/formSchema/services/threeWayMerge.ts
|
|
15323
|
+
// src/core/domain/formSchema/services/threeWayMerge.ts
|
|
15735
15324
|
/**
|
|
15736
15325
|
* Normalizes a field map so that base/local/remote share the same population
|
|
15737
15326
|
* before 3-way classification (ADR-007).
|
|
@@ -15916,8 +15505,7 @@ function resolveFieldEntry(entry, resolution) {
|
|
|
15916
15505
|
case "conflict": return resolution.fields.get(entry.key) === "remote" ? entry.remote : entry.local;
|
|
15917
15506
|
}
|
|
15918
15507
|
}
|
|
15919
|
-
|
|
15920
|
-
//#region src/core/domain/formSchema/services/schemaStateParser.ts
|
|
15508
|
+
// src/core/domain/formSchema/services/schemaStateParser.ts
|
|
15921
15509
|
const STATE_OPTIONS = { relatedAppWithBothKeys: "app" };
|
|
15922
15510
|
/**
|
|
15923
15511
|
* Parses pre-parsed (codec-decoded) data into a {@link SchemaState}.
|
|
@@ -15941,8 +15529,7 @@ const SchemaStateParser = { parse: (parsed) => {
|
|
|
15941
15529
|
})() : parsed;
|
|
15942
15530
|
return { schema: SchemaParser.parse(rest, STATE_OPTIONS) };
|
|
15943
15531
|
} };
|
|
15944
|
-
|
|
15945
|
-
//#region src/core/domain/formSchema/services/schemaStateSerializer.ts
|
|
15532
|
+
// src/core/domain/formSchema/services/schemaStateSerializer.ts
|
|
15946
15533
|
/**
|
|
15947
15534
|
* Serializes a {@link SchemaState} to a plain object suitable for YAML
|
|
15948
15535
|
* stringification (via the codec port in the application layer).
|
|
@@ -15959,8 +15546,7 @@ const SchemaStateSerializer = { serialize: (state) => {
|
|
|
15959
15546
|
const enrichedLayout = enrichLayoutWithFields(state.schema.layout, state.schema.fields);
|
|
15960
15547
|
return SchemaSerializer.serialize(enrichedLayout, state.schema.fields);
|
|
15961
15548
|
} };
|
|
15962
|
-
|
|
15963
|
-
//#region src/core/application/formSchema/schemaStateIo.ts
|
|
15549
|
+
// src/core/application/formSchema/schemaStateIo.ts
|
|
15964
15550
|
/** Loads and parses the schema state, or returns undefined when none exists. */
|
|
15965
15551
|
async function loadState(storage, codec) {
|
|
15966
15552
|
const result = await storage.get();
|
|
@@ -15977,8 +15563,7 @@ async function saveState(storage, codec, schema) {
|
|
|
15977
15563
|
const text = stringifyConfig(codec, SchemaStateSerializer.serialize({ schema }));
|
|
15978
15564
|
await storage.update(text);
|
|
15979
15565
|
}
|
|
15980
|
-
|
|
15981
|
-
//#region src/core/application/formSchema/loadThreeWayInputs.ts
|
|
15566
|
+
// src/core/application/formSchema/loadThreeWayInputs.ts
|
|
15982
15567
|
/**
|
|
15983
15568
|
* Loads the three inputs of a 3-way schema sync: the base snapshot (state), the
|
|
15984
15569
|
* local YAML schema, and the remote schema, plus the current remote revision.
|
|
@@ -16010,8 +15595,7 @@ function restateBase(base, remoteFields, local) {
|
|
|
16010
15595
|
const fields = restateBaseFields(base.fields, remoteFields, local?.fields);
|
|
16011
15596
|
return Schema.create(fields, enrichLayoutWithFields(base.layout, fields));
|
|
16012
15597
|
}
|
|
16013
|
-
|
|
16014
|
-
//#region src/core/application/formSchema/pullSchema.ts
|
|
15598
|
+
// src/core/application/formSchema/pullSchema.ts
|
|
16015
15599
|
function serializeSchema(container, schema) {
|
|
16016
15600
|
const enrichedLayout = enrichLayoutWithFields(schema.layout, schema.fields);
|
|
16017
15601
|
return stringifyConfig(container.configCodec, SchemaSerializer.serialize(enrichedLayout, schema.fields));
|
|
@@ -16081,8 +15665,7 @@ async function applyPulledMerge({ container, input }) {
|
|
|
16081
15665
|
await saveSnapshotAndRevision(container, input.remoteSchema, input.remoteRevision);
|
|
16082
15666
|
return { schemaText };
|
|
16083
15667
|
}
|
|
16084
|
-
|
|
16085
|
-
//#region src/core/domain/generalSettings/services/generalSettingsMerge.ts
|
|
15668
|
+
// src/core/domain/generalSettings/services/generalSettingsMerge.ts
|
|
16086
15669
|
/**
|
|
16087
15670
|
* Equality for two {@link GeneralSettingsConfig} values, reusing the 2-way
|
|
16088
15671
|
* diffDetector's "no changes" semantics (kintone-default normalization of
|
|
@@ -16105,8 +15688,7 @@ function computeGeneralSettingsThreeWayMerge(base, local, remote) {
|
|
|
16105
15688
|
function resolveGeneralSettingsMerge(merge, resolution) {
|
|
16106
15689
|
return resolveSingleMerge(merge, resolution, GeneralSettingsErrorCode.GsUnresolvedConflict);
|
|
16107
15690
|
}
|
|
16108
|
-
|
|
16109
|
-
//#region src/core/domain/generalSettings/services/generalSettingsStateSerializer.ts
|
|
15691
|
+
// src/core/domain/generalSettings/services/generalSettingsStateSerializer.ts
|
|
16110
15692
|
/**
|
|
16111
15693
|
* Serializes a {@link GeneralSettingsState} to a plain object suitable for YAML
|
|
16112
15694
|
* stringification (via the codec port in the application layer).
|
|
@@ -16117,8 +15699,7 @@ function resolveGeneralSettingsMerge(merge, resolution) {
|
|
|
16117
15699
|
* is persisted separately via `AppRevisionStorage`.
|
|
16118
15700
|
*/
|
|
16119
15701
|
const GeneralSettingsStateSerializer = { serialize: (state) => GeneralSettingsConfigSerializer.serialize(state.config) };
|
|
16120
|
-
|
|
16121
|
-
//#region src/core/application/generalSettings/generalSettingsStateIo.ts
|
|
15702
|
+
// src/core/application/generalSettings/generalSettingsStateIo.ts
|
|
16122
15703
|
/**
|
|
16123
15704
|
* Persists the new base: the settings snapshot (state file) and the app revision
|
|
16124
15705
|
* (`state/<appName>/revision.yaml`) side by side. The two writes are kept
|
|
@@ -16128,8 +15709,7 @@ async function saveGeneralSettingsSnapshotAndRevision(container, config, revisio
|
|
|
16128
15709
|
await saveSnapshotState(container.generalSettingsStateStorage, container.configCodec, GeneralSettingsStateSerializer.serialize, { config });
|
|
16129
15710
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
16130
15711
|
}
|
|
16131
|
-
|
|
16132
|
-
//#region src/core/domain/generalSettings/services/generalSettingsStateParser.ts
|
|
15712
|
+
// src/core/domain/generalSettings/services/generalSettingsStateParser.ts
|
|
16133
15713
|
/**
|
|
16134
15714
|
* Parses pre-parsed (codec-decoded) data into a {@link GeneralSettingsState}.
|
|
16135
15715
|
*
|
|
@@ -16139,8 +15719,7 @@ async function saveGeneralSettingsSnapshotAndRevision(container, config, revisio
|
|
|
16139
15719
|
* on YAML; the application layer handles codec decoding before calling this.
|
|
16140
15720
|
*/
|
|
16141
15721
|
const GeneralSettingsStateParser = { parse: (parsed) => ({ config: GeneralSettingsConfigParser.parse(parsed) }) };
|
|
16142
|
-
|
|
16143
|
-
//#region src/core/application/generalSettings/loadGeneralSettingsThreeWayInputs.ts
|
|
15722
|
+
// src/core/application/generalSettings/loadGeneralSettingsThreeWayInputs.ts
|
|
16144
15723
|
/**
|
|
16145
15724
|
* Loads the four inputs of a 3-way settings sync (base snapshot, base app
|
|
16146
15725
|
* revision, local YAML, remote config + revision) via the generic
|
|
@@ -16168,8 +15747,7 @@ async function loadGeneralSettingsThreeWayInputs(container) {
|
|
|
16168
15747
|
}
|
|
16169
15748
|
});
|
|
16170
15749
|
}
|
|
16171
|
-
|
|
16172
|
-
//#region src/core/application/generalSettings/pullGeneralSettings.ts
|
|
15750
|
+
// src/core/application/generalSettings/pullGeneralSettings.ts
|
|
16173
15751
|
function serializeSettings(container, config) {
|
|
16174
15752
|
return stringifyConfig(container.configCodec, GeneralSettingsConfigSerializer.serialize(config));
|
|
16175
15753
|
}
|
|
@@ -16217,8 +15795,7 @@ async function applyPulledGeneralSettingsMerge({ container, input }) {
|
|
|
16217
15795
|
await saveGeneralSettingsSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
16218
15796
|
return { configText };
|
|
16219
15797
|
}
|
|
16220
|
-
|
|
16221
|
-
//#region src/core/domain/recordPermission/services/recordPermissionMerge.ts
|
|
15798
|
+
// src/core/domain/recordPermission/services/recordPermissionMerge.ts
|
|
16222
15799
|
/**
|
|
16223
15800
|
* 3-way merge for the record permission domain (record-acl).
|
|
16224
15801
|
*
|
|
@@ -16280,8 +15857,7 @@ function resolveRecordPermissionMerge(merge, resolution) {
|
|
|
16280
15857
|
const record = resolveRecordMerge(merge, resolution, RecordPermissionErrorCode.RpUnresolvedConflict);
|
|
16281
15858
|
return { rights: Object.values(record) };
|
|
16282
15859
|
}
|
|
16283
|
-
|
|
16284
|
-
//#region src/core/domain/recordPermission/services/recordPermissionStateParser.ts
|
|
15860
|
+
// src/core/domain/recordPermission/services/recordPermissionStateParser.ts
|
|
16285
15861
|
/**
|
|
16286
15862
|
* Parses pre-parsed (codec-decoded) data into a {@link RecordPermissionState}.
|
|
16287
15863
|
*
|
|
@@ -16291,8 +15867,7 @@ function resolveRecordPermissionMerge(merge, resolution) {
|
|
|
16291
15867
|
* on YAML; the application layer handles codec decoding before calling this.
|
|
16292
15868
|
*/
|
|
16293
15869
|
const RecordPermissionStateParser = { parse: (parsed) => ({ config: RecordPermissionConfigParser.parse(parsed) }) };
|
|
16294
|
-
|
|
16295
|
-
//#region src/core/application/recordPermission/loadRecordPermissionThreeWayInputs.ts
|
|
15870
|
+
// src/core/application/recordPermission/loadRecordPermissionThreeWayInputs.ts
|
|
16296
15871
|
/**
|
|
16297
15872
|
* Loads the four inputs of a 3-way record permission sync (base snapshot, base
|
|
16298
15873
|
* app revision, local YAML, remote config + revision) via the generic
|
|
@@ -16320,8 +15895,7 @@ async function loadRecordPermissionThreeWayInputs(container) {
|
|
|
16320
15895
|
}
|
|
16321
15896
|
});
|
|
16322
15897
|
}
|
|
16323
|
-
|
|
16324
|
-
//#region src/core/domain/recordPermission/services/recordPermissionStateSerializer.ts
|
|
15898
|
+
// src/core/domain/recordPermission/services/recordPermissionStateSerializer.ts
|
|
16325
15899
|
/**
|
|
16326
15900
|
* Serializes a {@link RecordPermissionState} to a plain object suitable for YAML
|
|
16327
15901
|
* stringification (via the codec port in the application layer).
|
|
@@ -16332,8 +15906,7 @@ async function loadRecordPermissionThreeWayInputs(container) {
|
|
|
16332
15906
|
* is persisted separately via `AppRevisionStorage`.
|
|
16333
15907
|
*/
|
|
16334
15908
|
const RecordPermissionStateSerializer = { serialize: (state) => RecordPermissionConfigSerializer.serialize(state.config) };
|
|
16335
|
-
|
|
16336
|
-
//#region src/core/application/recordPermission/recordPermissionStateIo.ts
|
|
15909
|
+
// src/core/application/recordPermission/recordPermissionStateIo.ts
|
|
16337
15910
|
/**
|
|
16338
15911
|
* Persists the new base: the record permission snapshot (state file) and the
|
|
16339
15912
|
* app revision (`state/<appName>/revision.yaml`) side by side. The two writes
|
|
@@ -16343,8 +15916,7 @@ async function saveRecordPermissionSnapshotAndRevision(container, config, revisi
|
|
|
16343
15916
|
await saveSnapshotState(container.recordPermissionStateStorage, container.configCodec, RecordPermissionStateSerializer.serialize, { config });
|
|
16344
15917
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
16345
15918
|
}
|
|
16346
|
-
|
|
16347
|
-
//#region src/core/application/recordPermission/pullRecordPermission.ts
|
|
15919
|
+
// src/core/application/recordPermission/pullRecordPermission.ts
|
|
16348
15920
|
function serializePermissions(container, config) {
|
|
16349
15921
|
return stringifyConfig(container.configCodec, RecordPermissionConfigSerializer.serialize(config));
|
|
16350
15922
|
}
|
|
@@ -16392,8 +15964,7 @@ async function applyPulledRecordPermissionMerge({ container, input }) {
|
|
|
16392
15964
|
await saveRecordPermissionSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
16393
15965
|
return { configText };
|
|
16394
15966
|
}
|
|
16395
|
-
|
|
16396
|
-
//#region src/core/domain/report/services/reportMerge.ts
|
|
15967
|
+
// src/core/domain/report/services/reportMerge.ts
|
|
16397
15968
|
/**
|
|
16398
15969
|
* Equality for two {@link ReportConfig} values, matching the 2-way
|
|
16399
15970
|
* diffDetector's `compareReports` "no changes" semantics: `name` / `chartType` /
|
|
@@ -16424,8 +15995,7 @@ function computeReportThreeWayMerge(base, local, remote) {
|
|
|
16424
15995
|
function resolveReportMerge(merge, resolution) {
|
|
16425
15996
|
return { reports: resolveRecordMerge(merge, resolution, ReportErrorCode.RtUnresolvedConflict) };
|
|
16426
15997
|
}
|
|
16427
|
-
|
|
16428
|
-
//#region src/core/domain/report/services/reportStateParser.ts
|
|
15998
|
+
// src/core/domain/report/services/reportStateParser.ts
|
|
16429
15999
|
/**
|
|
16430
16000
|
* Parses pre-parsed (codec-decoded) data into a {@link ReportState}.
|
|
16431
16001
|
*
|
|
@@ -16435,8 +16005,7 @@ function resolveReportMerge(merge, resolution) {
|
|
|
16435
16005
|
* the application layer handles codec decoding before calling this.
|
|
16436
16006
|
*/
|
|
16437
16007
|
const ReportStateParser = { parse: (parsed) => ({ config: ReportConfigParser.parse(parsed) }) };
|
|
16438
|
-
|
|
16439
|
-
//#region src/core/application/report/loadReportThreeWayInputs.ts
|
|
16008
|
+
// src/core/application/report/loadReportThreeWayInputs.ts
|
|
16440
16009
|
/**
|
|
16441
16010
|
* Loads the four inputs of a 3-way report sync (base snapshot, base app
|
|
16442
16011
|
* revision, local YAML, remote config + revision) via the generic
|
|
@@ -16465,8 +16034,7 @@ async function loadReportThreeWayInputs(container) {
|
|
|
16465
16034
|
}
|
|
16466
16035
|
});
|
|
16467
16036
|
}
|
|
16468
|
-
|
|
16469
|
-
//#region src/core/domain/report/services/reportStateSerializer.ts
|
|
16037
|
+
// src/core/domain/report/services/reportStateSerializer.ts
|
|
16470
16038
|
/**
|
|
16471
16039
|
* Serializes a {@link ReportState} to a plain object suitable for YAML
|
|
16472
16040
|
* stringification (via the codec port in the application layer).
|
|
@@ -16477,8 +16045,7 @@ async function loadReportThreeWayInputs(container) {
|
|
|
16477
16045
|
* persisted separately via `AppRevisionStorage`.
|
|
16478
16046
|
*/
|
|
16479
16047
|
const ReportStateSerializer = { serialize: (state) => ReportConfigSerializer.serialize(state.config) };
|
|
16480
|
-
|
|
16481
|
-
//#region src/core/application/report/reportStateIo.ts
|
|
16048
|
+
// src/core/application/report/reportStateIo.ts
|
|
16482
16049
|
/**
|
|
16483
16050
|
* Persists the new base: the reports snapshot (state file) and the app revision
|
|
16484
16051
|
* (`state/<appName>/revision.yaml`) side by side. The two writes are kept
|
|
@@ -16488,8 +16055,7 @@ async function saveReportSnapshotAndRevision(container, config, revision) {
|
|
|
16488
16055
|
await saveSnapshotState(container.reportStateStorage, container.configCodec, ReportStateSerializer.serialize, { config });
|
|
16489
16056
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
16490
16057
|
}
|
|
16491
|
-
|
|
16492
|
-
//#region src/core/application/report/pullReport.ts
|
|
16058
|
+
// src/core/application/report/pullReport.ts
|
|
16493
16059
|
function serializeReports(container, config) {
|
|
16494
16060
|
return stringifyConfig(container.configCodec, ReportConfigSerializer.serialize(config));
|
|
16495
16061
|
}
|
|
@@ -16537,8 +16103,7 @@ async function applyPulledReportMerge({ container, input }) {
|
|
|
16537
16103
|
await saveReportSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
16538
16104
|
return { configText };
|
|
16539
16105
|
}
|
|
16540
|
-
|
|
16541
|
-
//#region src/core/application/threeWay/remoteRevision.ts
|
|
16106
|
+
// src/core/application/threeWay/remoteRevision.ts
|
|
16542
16107
|
/**
|
|
16543
16108
|
* Reads the current remote app (preview) revision via {@link AppRevisionReader}.
|
|
16544
16109
|
* This is the single, domain-agnostic path the `--all` early-skip uses to
|
|
@@ -16548,8 +16113,7 @@ async function applyPulledReportMerge({ container, input }) {
|
|
|
16548
16113
|
async function getCurrentRemoteRevision(container) {
|
|
16549
16114
|
return container.appRevisionReader.getCurrent();
|
|
16550
16115
|
}
|
|
16551
|
-
|
|
16552
|
-
//#region src/core/domain/view/services/viewMerge.ts
|
|
16116
|
+
// src/core/domain/view/services/viewMerge.ts
|
|
16553
16117
|
/**
|
|
16554
16118
|
* Equality for two {@link ViewConfig} values, matching the 2-way diffDetector's
|
|
16555
16119
|
* "no changes" semantics: optional strings treat `undefined` and `""` as
|
|
@@ -16574,8 +16138,7 @@ function computeViewThreeWayMerge(base, local, remote) {
|
|
|
16574
16138
|
function resolveViewMerge(merge, resolution) {
|
|
16575
16139
|
return { views: resolveRecordMerge(merge, resolution, ViewErrorCode.VwUnresolvedConflict) };
|
|
16576
16140
|
}
|
|
16577
|
-
|
|
16578
|
-
//#region src/core/domain/view/services/viewStateParser.ts
|
|
16141
|
+
// src/core/domain/view/services/viewStateParser.ts
|
|
16579
16142
|
/**
|
|
16580
16143
|
* Parses pre-parsed (codec-decoded) data into a {@link ViewState}.
|
|
16581
16144
|
*
|
|
@@ -16585,8 +16148,7 @@ function resolveViewMerge(merge, resolution) {
|
|
|
16585
16148
|
* application layer handles codec decoding before calling this.
|
|
16586
16149
|
*/
|
|
16587
16150
|
const ViewStateParser = { parse: (parsed) => ({ config: ViewConfigParser.parse(parsed) }) };
|
|
16588
|
-
|
|
16589
|
-
//#region src/core/application/view/loadViewThreeWayInputs.ts
|
|
16151
|
+
// src/core/application/view/loadViewThreeWayInputs.ts
|
|
16590
16152
|
/**
|
|
16591
16153
|
* Loads the four inputs of a 3-way view sync (base snapshot, base app revision,
|
|
16592
16154
|
* local YAML, remote config + revision) via the generic
|
|
@@ -16615,8 +16177,7 @@ async function loadViewThreeWayInputs(container) {
|
|
|
16615
16177
|
}
|
|
16616
16178
|
});
|
|
16617
16179
|
}
|
|
16618
|
-
|
|
16619
|
-
//#region src/core/domain/view/services/viewStateSerializer.ts
|
|
16180
|
+
// src/core/domain/view/services/viewStateSerializer.ts
|
|
16620
16181
|
/**
|
|
16621
16182
|
* Serializes a {@link ViewState} to a plain object suitable for YAML
|
|
16622
16183
|
* stringification (via the codec port in the application layer).
|
|
@@ -16627,8 +16188,7 @@ async function loadViewThreeWayInputs(container) {
|
|
|
16627
16188
|
* persisted separately via `AppRevisionStorage`.
|
|
16628
16189
|
*/
|
|
16629
16190
|
const ViewStateSerializer = { serialize: (state) => ViewConfigSerializer.serialize(state.config) };
|
|
16630
|
-
|
|
16631
|
-
//#region src/core/application/view/viewStateIo.ts
|
|
16191
|
+
// src/core/application/view/viewStateIo.ts
|
|
16632
16192
|
/**
|
|
16633
16193
|
* Persists the new base: the views snapshot (state file) and the app revision
|
|
16634
16194
|
* (`state/<appName>/revision.yaml`) side by side. The two writes are kept
|
|
@@ -16638,8 +16198,7 @@ async function saveViewSnapshotAndRevision(container, config, revision) {
|
|
|
16638
16198
|
await saveSnapshotState(container.viewStateStorage, container.configCodec, ViewStateSerializer.serialize, { config });
|
|
16639
16199
|
await saveAppRevision(container.appRevisionStorage, container.configCodec, revision);
|
|
16640
16200
|
}
|
|
16641
|
-
|
|
16642
|
-
//#region src/core/application/view/pullView.ts
|
|
16201
|
+
// src/core/application/view/pullView.ts
|
|
16643
16202
|
function serializeViews(container, config) {
|
|
16644
16203
|
return stringifyConfig(container.configCodec, ViewConfigSerializer.serialize(config));
|
|
16645
16204
|
}
|
|
@@ -16687,8 +16246,7 @@ async function applyPulledViewMerge({ container, input }) {
|
|
|
16687
16246
|
await saveViewSnapshotAndRevision(container, input.remoteConfig, input.remoteRevision);
|
|
16688
16247
|
return { configText };
|
|
16689
16248
|
}
|
|
16690
|
-
|
|
16691
|
-
//#region src/core/application/pullAll/pullAllForApp.ts
|
|
16249
|
+
// src/core/application/pullAll/pullAllForApp.ts
|
|
16692
16250
|
function toError$1(error) {
|
|
16693
16251
|
return error instanceof Error ? error : new Error(String(error));
|
|
16694
16252
|
}
|
|
@@ -17088,8 +16646,7 @@ async function pullAllForApp(args) {
|
|
|
17088
16646
|
results
|
|
17089
16647
|
};
|
|
17090
16648
|
}
|
|
17091
|
-
|
|
17092
|
-
//#region src/cli/pullAllOutput.ts
|
|
16649
|
+
// src/cli/pullAllOutput.ts
|
|
17093
16650
|
const domainDisplayName$1 = {
|
|
17094
16651
|
schema: "Schema",
|
|
17095
16652
|
customize: "Customization",
|
|
@@ -17138,8 +16695,7 @@ function printPullAllResults(output) {
|
|
|
17138
16695
|
function pullAllHasFailure(output) {
|
|
17139
16696
|
return output.results.some((r) => !r.success && r.skipped !== "not-found" && r.skipped !== "conflict");
|
|
17140
16697
|
}
|
|
17141
|
-
|
|
17142
|
-
//#region src/cli/commands/pull.ts
|
|
16698
|
+
// src/cli/commands/pull.ts
|
|
17143
16699
|
const pullArgs = {
|
|
17144
16700
|
domain: kintoneArgs.domain,
|
|
17145
16701
|
username: kintoneArgs.username,
|
|
@@ -17233,8 +16789,7 @@ var pull_default$5 = define({
|
|
|
17233
16789
|
}
|
|
17234
16790
|
}
|
|
17235
16791
|
});
|
|
17236
|
-
|
|
17237
|
-
//#region src/core/application/formSchema/pushSchema.ts
|
|
16792
|
+
// src/core/application/formSchema/pushSchema.ts
|
|
17238
16793
|
/** Message thrown when the remote drifted from base and `--force` was not set. */
|
|
17239
16794
|
const PUSH_DRIFT_MESSAGE = "The remote has changed since the base snapshot. Run `schema pull` first.";
|
|
17240
16795
|
/**
|
|
@@ -17278,8 +16833,7 @@ async function pushSchema({ container, input }) {
|
|
|
17278
16833
|
revision: newRevision
|
|
17279
16834
|
};
|
|
17280
16835
|
}
|
|
17281
|
-
|
|
17282
|
-
//#region src/core/application/generalSettings/pushGeneralSettings.ts
|
|
16836
|
+
// src/core/application/generalSettings/pushGeneralSettings.ts
|
|
17283
16837
|
/** Pull command name surfaced in the drift hint message. */
|
|
17284
16838
|
const SETTINGS_PULL_COMMAND = "settings pull";
|
|
17285
16839
|
/**
|
|
@@ -17313,8 +16867,7 @@ async function pushGeneralSettings({ container, input }) {
|
|
|
17313
16867
|
revision: newRevision
|
|
17314
16868
|
};
|
|
17315
16869
|
}
|
|
17316
|
-
|
|
17317
|
-
//#region src/core/application/recordPermission/pushRecordPermission.ts
|
|
16870
|
+
// src/core/application/recordPermission/pushRecordPermission.ts
|
|
17318
16871
|
/** Pull command name surfaced in the drift hint message. */
|
|
17319
16872
|
const RECORD_ACL_PULL_COMMAND = "record-acl pull";
|
|
17320
16873
|
/**
|
|
@@ -17347,8 +16900,7 @@ async function pushRecordPermission({ container, input }) {
|
|
|
17347
16900
|
revision: newRevision
|
|
17348
16901
|
};
|
|
17349
16902
|
}
|
|
17350
|
-
|
|
17351
|
-
//#region src/core/application/report/pushReport.ts
|
|
16903
|
+
// src/core/application/report/pushReport.ts
|
|
17352
16904
|
/** Pull command name surfaced in the drift hint message. */
|
|
17353
16905
|
const REPORT_PULL_COMMAND = "report pull";
|
|
17354
16906
|
/**
|
|
@@ -17384,8 +16936,7 @@ async function pushReport({ container, input }) {
|
|
|
17384
16936
|
revision: newRevision
|
|
17385
16937
|
};
|
|
17386
16938
|
}
|
|
17387
|
-
|
|
17388
|
-
//#region src/core/application/view/pushView.ts
|
|
16939
|
+
// src/core/application/view/pushView.ts
|
|
17389
16940
|
/** Pull command name surfaced in the drift hint message. */
|
|
17390
16941
|
const VIEW_PULL_COMMAND = "view pull";
|
|
17391
16942
|
/**
|
|
@@ -17423,8 +16974,7 @@ async function pushView({ container, input }) {
|
|
|
17423
16974
|
skippedBuiltinViews
|
|
17424
16975
|
};
|
|
17425
16976
|
}
|
|
17426
|
-
|
|
17427
|
-
//#region src/core/application/pushAll/pushAllForApp.ts
|
|
16977
|
+
// src/core/application/pushAll/pushAllForApp.ts
|
|
17428
16978
|
function buildPhases(args) {
|
|
17429
16979
|
const c = args.containers;
|
|
17430
16980
|
const force = args.force;
|
|
@@ -17780,8 +17330,7 @@ async function resyncBaseRevision(containers) {
|
|
|
17780
17330
|
const revision = await getCurrentRemoteRevision(containers.view);
|
|
17781
17331
|
await saveAppRevision(containers.view.appRevisionStorage, containers.view.configCodec, revision);
|
|
17782
17332
|
}
|
|
17783
|
-
|
|
17784
|
-
//#region src/cli/pushAllOutput.ts
|
|
17333
|
+
// src/cli/pushAllOutput.ts
|
|
17785
17334
|
const domainDisplayName = {
|
|
17786
17335
|
schema: "Schema",
|
|
17787
17336
|
customize: "Customization",
|
|
@@ -17828,8 +17377,7 @@ function printPushAllResults(output) {
|
|
|
17828
17377
|
function pushAllHasFailure(output) {
|
|
17829
17378
|
return output.phases.flatMap((pr) => pr.results).some((r) => !r.success && r.skipped !== "not-found" && r.skipped !== "drift") || output.deployError !== void 0;
|
|
17830
17379
|
}
|
|
17831
|
-
|
|
17832
|
-
//#region src/cli/commands/push.ts
|
|
17380
|
+
// src/cli/commands/push.ts
|
|
17833
17381
|
const pushArgs$1 = {
|
|
17834
17382
|
domain: kintoneArgs.domain,
|
|
17835
17383
|
username: kintoneArgs.username,
|
|
@@ -17914,8 +17462,7 @@ var push_default$6 = define({
|
|
|
17914
17462
|
}
|
|
17915
17463
|
}
|
|
17916
17464
|
});
|
|
17917
|
-
|
|
17918
|
-
//#region src/cli/recordAclConfig.ts
|
|
17465
|
+
// src/cli/recordAclConfig.ts
|
|
17919
17466
|
const RECORD_ACL_STATE_FILE = "record-acl.yaml";
|
|
17920
17467
|
const recordAclArgs = {
|
|
17921
17468
|
...kintoneArgs,
|
|
@@ -17938,8 +17485,7 @@ const { resolveFilePath: resolveRecordAclFilePath, resolveContainerConfig: resol
|
|
|
17938
17485
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
17939
17486
|
})
|
|
17940
17487
|
});
|
|
17941
|
-
|
|
17942
|
-
//#region src/cli/commands/record-acl/apply.ts
|
|
17488
|
+
// src/cli/commands/record-acl/apply.ts
|
|
17943
17489
|
var apply_default$4 = createApplyCommand({
|
|
17944
17490
|
description: "Apply record access permissions from YAML to kintone app",
|
|
17945
17491
|
args: recordAclArgs,
|
|
@@ -17959,8 +17505,7 @@ var apply_default$4 = createApplyCommand({
|
|
|
17959
17505
|
resolveContainerConfig: resolveRecordAclContainerConfig,
|
|
17960
17506
|
resolveAppContainerConfig: resolveRecordAclAppContainerConfig
|
|
17961
17507
|
});
|
|
17962
|
-
|
|
17963
|
-
//#region src/cli/commands/record-acl/capture.ts
|
|
17508
|
+
// src/cli/commands/record-acl/capture.ts
|
|
17964
17509
|
var capture_default$5 = createCaptureCommand({
|
|
17965
17510
|
description: "Capture current record access permissions from kintone app to file",
|
|
17966
17511
|
args: recordAclArgs,
|
|
@@ -17979,8 +17524,7 @@ var capture_default$5 = createCaptureCommand({
|
|
|
17979
17524
|
resolveContainerConfig: resolveRecordAclContainerConfig,
|
|
17980
17525
|
resolveAppContainerConfig: resolveRecordAclAppContainerConfig
|
|
17981
17526
|
});
|
|
17982
|
-
|
|
17983
|
-
//#region src/core/application/recordPermission/detectRecordPermissionThreeWayDiff.ts
|
|
17527
|
+
// src/core/application/recordPermission/detectRecordPermissionThreeWayDiff.ts
|
|
17984
17528
|
/**
|
|
17985
17529
|
* Detects record permission differences with 3-way awareness.
|
|
17986
17530
|
*
|
|
@@ -18001,8 +17545,7 @@ async function detectRecordPermissionThreeWayDiff({ container }) {
|
|
|
18001
17545
|
return right ? describeRecordPermissionFilter(right.filterCond) : entry.key;
|
|
18002
17546
|
}, { describeKey: describeRecordPermissionMergeKey });
|
|
18003
17547
|
}
|
|
18004
|
-
|
|
18005
|
-
//#region src/cli/commands/record-acl/diff.ts
|
|
17548
|
+
// src/cli/commands/record-acl/diff.ts
|
|
18006
17549
|
async function runDiff$4(containerConfig) {
|
|
18007
17550
|
const container = createRecordPermissionCliContainer(containerConfig);
|
|
18008
17551
|
const s = p.spinner();
|
|
@@ -18042,8 +17585,7 @@ var diff_default$4 = define({
|
|
|
18042
17585
|
}
|
|
18043
17586
|
}
|
|
18044
17587
|
});
|
|
18045
|
-
|
|
18046
|
-
//#region src/cli/commands/record-acl/pull.ts
|
|
17588
|
+
// src/cli/commands/record-acl/pull.ts
|
|
18047
17589
|
var pull_default$4 = createPullCommand({
|
|
18048
17590
|
description: "Pull remote record permissions into the local record-acl config (3-way merge)",
|
|
18049
17591
|
args: recordAclArgs,
|
|
@@ -18080,8 +17622,7 @@ var pull_default$4 = createPullCommand({
|
|
|
18080
17622
|
resolveContainerConfig: resolveRecordAclContainerConfig,
|
|
18081
17623
|
resolveAppContainerConfig: resolveRecordAclAppContainerConfig
|
|
18082
17624
|
});
|
|
18083
|
-
|
|
18084
|
-
//#region src/cli/commands/record-acl/push.ts
|
|
17625
|
+
// src/cli/commands/record-acl/push.ts
|
|
18085
17626
|
var push_default$5 = createPushCommand({
|
|
18086
17627
|
description: "Push the local record permission config to kintone (with drift detection)",
|
|
18087
17628
|
args: recordAclArgs,
|
|
@@ -18096,8 +17637,7 @@ var push_default$5 = createPushCommand({
|
|
|
18096
17637
|
resolveContainerConfig: resolveRecordAclContainerConfig,
|
|
18097
17638
|
resolveAppContainerConfig: resolveRecordAclAppContainerConfig
|
|
18098
17639
|
});
|
|
18099
|
-
|
|
18100
|
-
//#region src/cli/commands/record-acl/index.ts
|
|
17640
|
+
// src/cli/commands/record-acl/index.ts
|
|
18101
17641
|
var record_acl_default = define({
|
|
18102
17642
|
name: "record-acl",
|
|
18103
17643
|
description: "Manage kintone record access permissions",
|
|
@@ -18110,8 +17650,7 @@ var record_acl_default = define({
|
|
|
18110
17650
|
},
|
|
18111
17651
|
run: () => {}
|
|
18112
17652
|
});
|
|
18113
|
-
|
|
18114
|
-
//#region src/cli/reportConfig.ts
|
|
17653
|
+
// src/cli/reportConfig.ts
|
|
18115
17654
|
const REPORT_STATE_FILE = "report.yaml";
|
|
18116
17655
|
const reportArgs = {
|
|
18117
17656
|
...kintoneArgs,
|
|
@@ -18134,8 +17673,7 @@ const { resolveFilePath: resolveReportFilePath, resolveContainerConfig: resolveR
|
|
|
18134
17673
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
18135
17674
|
})
|
|
18136
17675
|
});
|
|
18137
|
-
|
|
18138
|
-
//#region src/cli/commands/report/apply.ts
|
|
17676
|
+
// src/cli/commands/report/apply.ts
|
|
18139
17677
|
var apply_default$3 = createApplyCommand({
|
|
18140
17678
|
description: "Apply report settings from YAML to kintone app",
|
|
18141
17679
|
args: reportArgs,
|
|
@@ -18155,8 +17693,7 @@ var apply_default$3 = createApplyCommand({
|
|
|
18155
17693
|
resolveContainerConfig: resolveReportContainerConfig,
|
|
18156
17694
|
resolveAppContainerConfig: resolveReportAppContainerConfig
|
|
18157
17695
|
});
|
|
18158
|
-
|
|
18159
|
-
//#region src/cli/commands/report/capture.ts
|
|
17696
|
+
// src/cli/commands/report/capture.ts
|
|
18160
17697
|
var capture_default$4 = createCaptureCommand({
|
|
18161
17698
|
description: "Capture current report settings from kintone app to file",
|
|
18162
17699
|
args: reportArgs,
|
|
@@ -18175,8 +17712,7 @@ var capture_default$4 = createCaptureCommand({
|
|
|
18175
17712
|
resolveContainerConfig: resolveReportContainerConfig,
|
|
18176
17713
|
resolveAppContainerConfig: resolveReportAppContainerConfig
|
|
18177
17714
|
});
|
|
18178
|
-
|
|
18179
|
-
//#region src/core/application/report/detectReportThreeWayDiff.ts
|
|
17715
|
+
// src/core/application/report/detectReportThreeWayDiff.ts
|
|
18180
17716
|
/**
|
|
18181
17717
|
* Detects report differences with 3-way awareness.
|
|
18182
17718
|
*
|
|
@@ -18195,8 +17731,7 @@ async function detectReportThreeWayDiff({ container }) {
|
|
|
18195
17731
|
return (entry.local ?? entry.remote ?? entry.base)?.chartType ?? "";
|
|
18196
17732
|
});
|
|
18197
17733
|
}
|
|
18198
|
-
|
|
18199
|
-
//#region src/cli/commands/report/diff.ts
|
|
17734
|
+
// src/cli/commands/report/diff.ts
|
|
18200
17735
|
async function runDiff$3(containerConfig) {
|
|
18201
17736
|
const container = createReportCliContainer(containerConfig);
|
|
18202
17737
|
const s = p.spinner();
|
|
@@ -18236,8 +17771,7 @@ var diff_default$3 = define({
|
|
|
18236
17771
|
}
|
|
18237
17772
|
}
|
|
18238
17773
|
});
|
|
18239
|
-
|
|
18240
|
-
//#region src/cli/commands/report/pull.ts
|
|
17774
|
+
// src/cli/commands/report/pull.ts
|
|
18241
17775
|
var pull_default$3 = createPullCommand({
|
|
18242
17776
|
description: "Pull remote reports into the local report config (3-way merge)",
|
|
18243
17777
|
args: reportArgs,
|
|
@@ -18273,8 +17807,7 @@ var pull_default$3 = createPullCommand({
|
|
|
18273
17807
|
resolveContainerConfig: resolveReportContainerConfig,
|
|
18274
17808
|
resolveAppContainerConfig: resolveReportAppContainerConfig
|
|
18275
17809
|
});
|
|
18276
|
-
|
|
18277
|
-
//#region src/cli/commands/report/push.ts
|
|
17810
|
+
// src/cli/commands/report/push.ts
|
|
18278
17811
|
var push_default$4 = createPushCommand({
|
|
18279
17812
|
description: "Push the local report config to kintone (with drift detection)",
|
|
18280
17813
|
args: reportArgs,
|
|
@@ -18289,8 +17822,7 @@ var push_default$4 = createPushCommand({
|
|
|
18289
17822
|
resolveContainerConfig: resolveReportContainerConfig,
|
|
18290
17823
|
resolveAppContainerConfig: resolveReportAppContainerConfig
|
|
18291
17824
|
});
|
|
18292
|
-
|
|
18293
|
-
//#region src/cli/commands/report/index.ts
|
|
17825
|
+
// src/cli/commands/report/index.ts
|
|
18294
17826
|
var report_default = define({
|
|
18295
17827
|
name: "report",
|
|
18296
17828
|
description: "Manage kintone report settings",
|
|
@@ -18303,8 +17835,7 @@ var report_default = define({
|
|
|
18303
17835
|
},
|
|
18304
17836
|
run: () => {}
|
|
18305
17837
|
});
|
|
18306
|
-
|
|
18307
|
-
//#region src/cli/commands/schema/capture.ts
|
|
17838
|
+
// src/cli/commands/schema/capture.ts
|
|
18308
17839
|
async function runCapture(container, schemaFilePath) {
|
|
18309
17840
|
const s = p.spinner();
|
|
18310
17841
|
s.start("Capturing current form schema...");
|
|
@@ -18354,8 +17885,7 @@ var capture_default$3 = define({
|
|
|
18354
17885
|
}
|
|
18355
17886
|
}
|
|
18356
17887
|
});
|
|
18357
|
-
|
|
18358
|
-
//#region src/core/application/formSchema/detectThreeWayDiff.ts
|
|
17888
|
+
// src/core/application/formSchema/detectThreeWayDiff.ts
|
|
18359
17889
|
/**
|
|
18360
17890
|
* Detects differences with 3-way awareness.
|
|
18361
17891
|
*
|
|
@@ -18431,8 +17961,7 @@ function buildLayoutExtras(layoutConflict, layoutLocalChanged, layoutRemoteChang
|
|
|
18431
17961
|
}];
|
|
18432
17962
|
return [];
|
|
18433
17963
|
}
|
|
18434
|
-
|
|
18435
|
-
//#region src/cli/commands/schema/formReadTarget.ts
|
|
17964
|
+
// src/cli/commands/schema/formReadTarget.ts
|
|
18436
17965
|
/**
|
|
18437
17966
|
* Shared `--published` flag for the schema commands that read a form definition
|
|
18438
17967
|
* (`dump` / `diff`). Kept next to its users rather than in `src/cli/config.ts`,
|
|
@@ -18445,8 +17974,7 @@ const formReadTargetArgs = { published: {
|
|
|
18445
17974
|
function resolveFormReadTarget(values) {
|
|
18446
17975
|
return values.published ? "published" : "preview";
|
|
18447
17976
|
}
|
|
18448
|
-
|
|
18449
|
-
//#region src/cli/commands/schema/diff.ts
|
|
17977
|
+
// src/cli/commands/schema/diff.ts
|
|
18450
17978
|
async function runDiff$2(container, target) {
|
|
18451
17979
|
printSchemaDiffTarget(target);
|
|
18452
17980
|
const s = p.spinner();
|
|
@@ -18505,8 +18033,7 @@ var diff_default$2 = define({
|
|
|
18505
18033
|
}
|
|
18506
18034
|
}
|
|
18507
18035
|
});
|
|
18508
|
-
|
|
18509
|
-
//#region src/core/adapters/kintone/formDumpReader.ts
|
|
18036
|
+
// src/core/adapters/kintone/formDumpReader.ts
|
|
18510
18037
|
const GET_RAW_FORM_DATA_FAILURE_MESSAGES = {
|
|
18511
18038
|
preview: "Failed to fetch raw form data for dump",
|
|
18512
18039
|
published: "Failed to fetch published raw form data for dump (the app may not be deployed yet, or the credentials may not be allowed to read it)"
|
|
@@ -18537,8 +18064,7 @@ var KintoneFormDumpReader = class {
|
|
|
18537
18064
|
}
|
|
18538
18065
|
}
|
|
18539
18066
|
};
|
|
18540
|
-
|
|
18541
|
-
//#region src/core/adapters/local/dumpStorage.ts
|
|
18067
|
+
// src/core/adapters/local/dumpStorage.ts
|
|
18542
18068
|
var LocalFileDumpStorage = class {
|
|
18543
18069
|
filePrefix;
|
|
18544
18070
|
baseDir;
|
|
@@ -18569,22 +18095,19 @@ var LocalFileDumpStorage = class {
|
|
|
18569
18095
|
}
|
|
18570
18096
|
}
|
|
18571
18097
|
};
|
|
18572
|
-
|
|
18573
|
-
//#region src/core/application/container/dumpCli.ts
|
|
18098
|
+
// src/core/application/container/dumpCli.ts
|
|
18574
18099
|
function createDumpCliContainer(config) {
|
|
18575
18100
|
return {
|
|
18576
18101
|
formDumpReader: new KintoneFormDumpReader(config.client ?? createKintoneClient(config), config.appId),
|
|
18577
18102
|
dumpStorage: new LocalFileDumpStorage(config.filePrefix, process.cwd())
|
|
18578
18103
|
};
|
|
18579
18104
|
}
|
|
18580
|
-
|
|
18581
|
-
//#region src/core/application/formSchema/dumpForm.ts
|
|
18105
|
+
// src/core/application/formSchema/dumpForm.ts
|
|
18582
18106
|
async function dumpForm({ container, input }) {
|
|
18583
18107
|
const rawData = await container.formDumpReader.getRawFormData(input?.target ?? "preview");
|
|
18584
18108
|
await Promise.all([container.dumpStorage.saveFields(JSON.stringify(rawData.fields, null, 2)), container.dumpStorage.saveLayout(JSON.stringify(rawData.layout, null, 2))]);
|
|
18585
18109
|
}
|
|
18586
|
-
|
|
18587
|
-
//#region src/cli/commands/schema/dump.ts
|
|
18110
|
+
// src/cli/commands/schema/dump.ts
|
|
18588
18111
|
async function runSingleDump(config, basePrefix, target) {
|
|
18589
18112
|
const filePrefix = `${basePrefix}${target === "published" ? "published-" : ""}`;
|
|
18590
18113
|
const container = createDumpCliContainer({
|
|
@@ -18648,8 +18171,7 @@ var dump_default = define({
|
|
|
18648
18171
|
}
|
|
18649
18172
|
}
|
|
18650
18173
|
});
|
|
18651
|
-
|
|
18652
|
-
//#region src/cli/commands/schema/migrate.ts
|
|
18174
|
+
// src/cli/commands/schema/migrate.ts
|
|
18653
18175
|
async function runSingleMigrate(container, skipConfirm) {
|
|
18654
18176
|
const s = p.spinner();
|
|
18655
18177
|
s.start("Detecting changes...");
|
|
@@ -18749,8 +18271,7 @@ var migrate_default = define({
|
|
|
18749
18271
|
}
|
|
18750
18272
|
}
|
|
18751
18273
|
});
|
|
18752
|
-
|
|
18753
|
-
//#region src/core/application/formSchema/forceOverrideForm.ts
|
|
18274
|
+
// src/core/application/formSchema/forceOverrideForm.ts
|
|
18754
18275
|
function classifySubtableField(fieldCode, schemaDef, currentFields, result) {
|
|
18755
18276
|
const currentDef = currentFields.get(fieldCode);
|
|
18756
18277
|
if (currentDef !== void 0 && currentDef.type === "SUBTABLE") {
|
|
@@ -18809,8 +18330,7 @@ async function forceOverrideForm({ container }) {
|
|
|
18809
18330
|
if (classification.toUpdate.length > 0) await container.formConfigurator.updateFields(classification.toUpdate);
|
|
18810
18331
|
await container.formConfigurator.updateLayout(schema.layout);
|
|
18811
18332
|
}
|
|
18812
|
-
|
|
18813
|
-
//#region src/core/application/formSchema/resetForm.ts
|
|
18333
|
+
// src/core/application/formSchema/resetForm.ts
|
|
18814
18334
|
async function resetForm({ container }) {
|
|
18815
18335
|
const currentFields = await container.formConfigurator.getFields();
|
|
18816
18336
|
const subtableInnerCodes = collectSubtableInnerFieldCodes(currentFields);
|
|
@@ -18822,8 +18342,7 @@ async function resetForm({ container }) {
|
|
|
18822
18342
|
if (toDelete.length > 0) await container.formConfigurator.deleteFields(toDelete);
|
|
18823
18343
|
await container.formConfigurator.updateLayout([]);
|
|
18824
18344
|
}
|
|
18825
|
-
|
|
18826
|
-
//#region src/cli/commands/schema/override.ts
|
|
18345
|
+
// src/cli/commands/schema/override.ts
|
|
18827
18346
|
async function runSingleOverride(container, skipConfirm) {
|
|
18828
18347
|
p.log.warn(`${pc.bold(pc.red("WARNING:"))} This will replace the entire form with the declared schema.`);
|
|
18829
18348
|
p.log.warn("Fields not defined in the schema will be deleted.");
|
|
@@ -18937,8 +18456,7 @@ var override_default = define({
|
|
|
18937
18456
|
}
|
|
18938
18457
|
}
|
|
18939
18458
|
});
|
|
18940
|
-
|
|
18941
|
-
//#region src/cli/commands/schema/pull.ts
|
|
18459
|
+
// src/cli/commands/schema/pull.ts
|
|
18942
18460
|
async function resolveConflicts(merge, options) {
|
|
18943
18461
|
const fields = /* @__PURE__ */ new Map();
|
|
18944
18462
|
for (const conflict of merge.fieldConflicts) {
|
|
@@ -19107,16 +18625,14 @@ var push_default$3 = createPushCommand({
|
|
|
19107
18625
|
resolveContainerConfig: (values) => resolveConfig(values),
|
|
19108
18626
|
resolveAppContainerConfig: (app, projectConfig, values) => resolveAppCliConfig(app, projectConfig, values)
|
|
19109
18627
|
});
|
|
19110
|
-
|
|
19111
|
-
//#region src/core/application/container/validateCli.ts
|
|
18628
|
+
// src/core/application/container/validateCli.ts
|
|
19112
18629
|
function createValidateCliContainer(config) {
|
|
19113
18630
|
return {
|
|
19114
18631
|
configCodec,
|
|
19115
18632
|
schemaStorage: createLocalFileSchemaStorage(config.schemaFilePath)
|
|
19116
18633
|
};
|
|
19117
18634
|
}
|
|
19118
|
-
|
|
19119
|
-
//#region src/core/application/formSchema/validateSchema.ts
|
|
18635
|
+
// src/core/application/formSchema/validateSchema.ts
|
|
19120
18636
|
async function validateSchema({ container }) {
|
|
19121
18637
|
const result = await container.schemaStorage.get();
|
|
19122
18638
|
if (!result.exists) throw new ValidationError(ValidationErrorCode.InvalidInput, "Schema file not found");
|
|
@@ -19135,8 +18651,7 @@ async function validateSchema({ container }) {
|
|
|
19135
18651
|
fieldCount: schema.fields.size
|
|
19136
18652
|
};
|
|
19137
18653
|
}
|
|
19138
|
-
|
|
19139
|
-
//#region src/cli/commands/schema/validate.ts
|
|
18654
|
+
// src/cli/commands/schema/validate.ts
|
|
19140
18655
|
const validateArgs = {
|
|
19141
18656
|
"schema-file": {
|
|
19142
18657
|
type: "string",
|
|
@@ -19215,8 +18730,7 @@ var validate_default = define({
|
|
|
19215
18730
|
}
|
|
19216
18731
|
}
|
|
19217
18732
|
});
|
|
19218
|
-
|
|
19219
|
-
//#region src/cli/commands/schema/index.ts
|
|
18733
|
+
// src/cli/commands/schema/index.ts
|
|
19220
18734
|
var schema_default = define({
|
|
19221
18735
|
name: "schema",
|
|
19222
18736
|
description: "Manage kintone form schemas",
|
|
@@ -19232,8 +18746,7 @@ var schema_default = define({
|
|
|
19232
18746
|
},
|
|
19233
18747
|
run: () => {}
|
|
19234
18748
|
});
|
|
19235
|
-
|
|
19236
|
-
//#region src/cli/commands/seed/config.ts
|
|
18749
|
+
// src/cli/commands/seed/config.ts
|
|
19237
18750
|
const { resolveFilePath: resolveSeedFilePath, resolveContainerConfig: resolveSeedConfig, resolveAppContainerConfig: resolveSeedAppConfig } = createDomainConfigResolver({
|
|
19238
18751
|
fileArgKey: "seed-file",
|
|
19239
18752
|
envVar: () => process.env.SEED_FILE_PATH,
|
|
@@ -19245,8 +18758,7 @@ const { resolveFilePath: resolveSeedFilePath, resolveContainerConfig: resolveSee
|
|
|
19245
18758
|
seedFilePath: filePath
|
|
19246
18759
|
})
|
|
19247
18760
|
});
|
|
19248
|
-
|
|
19249
|
-
//#region src/cli/commands/seed/push.ts
|
|
18761
|
+
// src/cli/commands/seed/push.ts
|
|
19250
18762
|
const seedPushArgs = {
|
|
19251
18763
|
...kintoneArgs,
|
|
19252
18764
|
...multiAppArgs,
|
|
@@ -19333,8 +18845,7 @@ var push_default$2 = define({
|
|
|
19333
18845
|
args: seedPushArgs,
|
|
19334
18846
|
run: runSeedPush
|
|
19335
18847
|
});
|
|
19336
|
-
|
|
19337
|
-
//#region src/cli/commands/seed/apply.ts
|
|
18848
|
+
// src/cli/commands/seed/apply.ts
|
|
19338
18849
|
/**
|
|
19339
18850
|
* Deprecation alias for `seed push`. Kept so existing `seed apply` scripts keep
|
|
19340
18851
|
* working; emits a warning and delegates to the same upsert run.
|
|
@@ -19352,8 +18863,7 @@ var apply_default$2 = define({
|
|
|
19352
18863
|
await runSeedPush(ctx);
|
|
19353
18864
|
}
|
|
19354
18865
|
});
|
|
19355
|
-
|
|
19356
|
-
//#region src/cli/commands/seed/capture.ts
|
|
18866
|
+
// src/cli/commands/seed/capture.ts
|
|
19357
18867
|
const seedCaptureArgs = {
|
|
19358
18868
|
...kintoneArgs,
|
|
19359
18869
|
...multiAppArgs,
|
|
@@ -19413,8 +18923,7 @@ var capture_default$2 = define({
|
|
|
19413
18923
|
}
|
|
19414
18924
|
}
|
|
19415
18925
|
});
|
|
19416
|
-
|
|
19417
|
-
//#region src/cli/commands/seed/index.ts
|
|
18926
|
+
// src/cli/commands/seed/index.ts
|
|
19418
18927
|
var seed_default = define({
|
|
19419
18928
|
name: "seed",
|
|
19420
18929
|
description: "Manage kintone seed data (records)",
|
|
@@ -19425,8 +18934,7 @@ var seed_default = define({
|
|
|
19425
18934
|
},
|
|
19426
18935
|
run: () => {}
|
|
19427
18936
|
});
|
|
19428
|
-
|
|
19429
|
-
//#region src/cli/settingsConfig.ts
|
|
18937
|
+
// src/cli/settingsConfig.ts
|
|
19430
18938
|
const SETTINGS_STATE_FILE = "settings.yaml";
|
|
19431
18939
|
const settingsArgs = {
|
|
19432
18940
|
...kintoneArgs,
|
|
@@ -19449,8 +18957,7 @@ const { resolveFilePath: resolveSettingsFilePath, resolveContainerConfig: resolv
|
|
|
19449
18957
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
19450
18958
|
})
|
|
19451
18959
|
});
|
|
19452
|
-
|
|
19453
|
-
//#region src/cli/commands/settings/apply.ts
|
|
18960
|
+
// src/cli/commands/settings/apply.ts
|
|
19454
18961
|
var apply_default$1 = createApplyCommand({
|
|
19455
18962
|
description: "Apply general settings from YAML to kintone app",
|
|
19456
18963
|
args: settingsArgs,
|
|
@@ -19470,8 +18977,7 @@ var apply_default$1 = createApplyCommand({
|
|
|
19470
18977
|
resolveContainerConfig: resolveSettingsContainerConfig,
|
|
19471
18978
|
resolveAppContainerConfig: resolveSettingsAppContainerConfig
|
|
19472
18979
|
});
|
|
19473
|
-
|
|
19474
|
-
//#region src/cli/commands/settings/capture.ts
|
|
18980
|
+
// src/cli/commands/settings/capture.ts
|
|
19475
18981
|
var capture_default$1 = createCaptureCommand({
|
|
19476
18982
|
description: "Capture current general settings from kintone app to file",
|
|
19477
18983
|
args: settingsArgs,
|
|
@@ -19490,8 +18996,7 @@ var capture_default$1 = createCaptureCommand({
|
|
|
19490
18996
|
resolveContainerConfig: resolveSettingsContainerConfig,
|
|
19491
18997
|
resolveAppContainerConfig: resolveSettingsAppContainerConfig
|
|
19492
18998
|
});
|
|
19493
|
-
|
|
19494
|
-
//#region src/core/application/generalSettings/detectGeneralSettingsThreeWayDiff.ts
|
|
18999
|
+
// src/core/application/generalSettings/detectGeneralSettingsThreeWayDiff.ts
|
|
19495
19000
|
/** Fixed key/label for the whole-entity settings diff entry. */
|
|
19496
19001
|
const SETTINGS_DIFF_KEY = "settings";
|
|
19497
19002
|
/**
|
|
@@ -19510,8 +19015,7 @@ async function detectGeneralSettingsThreeWayDiff({ container }) {
|
|
|
19510
19015
|
};
|
|
19511
19016
|
return buildSingleThreeWayDiff(computeGeneralSettingsThreeWayMerge(state, local, remote.config), SETTINGS_DIFF_KEY);
|
|
19512
19017
|
}
|
|
19513
|
-
|
|
19514
|
-
//#region src/cli/commands/settings/diff.ts
|
|
19018
|
+
// src/cli/commands/settings/diff.ts
|
|
19515
19019
|
async function runDiff$1(containerConfig) {
|
|
19516
19020
|
const container = createGeneralSettingsCliContainer(containerConfig);
|
|
19517
19021
|
const s = p.spinner();
|
|
@@ -19551,8 +19055,7 @@ var diff_default$1 = define({
|
|
|
19551
19055
|
}
|
|
19552
19056
|
}
|
|
19553
19057
|
});
|
|
19554
|
-
|
|
19555
|
-
//#region src/cli/commands/settings/pull.ts
|
|
19058
|
+
// src/cli/commands/settings/pull.ts
|
|
19556
19059
|
/** Fixed conflict key for the single (whole-entity) settings config. */
|
|
19557
19060
|
const SETTINGS_CONFLICT_KEY = "settings";
|
|
19558
19061
|
var pull_default$1 = createPullCommand({
|
|
@@ -19590,8 +19093,7 @@ var pull_default$1 = createPullCommand({
|
|
|
19590
19093
|
resolveContainerConfig: resolveSettingsContainerConfig,
|
|
19591
19094
|
resolveAppContainerConfig: resolveSettingsAppContainerConfig
|
|
19592
19095
|
});
|
|
19593
|
-
|
|
19594
|
-
//#region src/cli/commands/settings/push.ts
|
|
19096
|
+
// src/cli/commands/settings/push.ts
|
|
19595
19097
|
var push_default$1 = createPushCommand({
|
|
19596
19098
|
description: "Push the local general settings config to kintone (with drift detection)",
|
|
19597
19099
|
args: settingsArgs,
|
|
@@ -19606,8 +19108,7 @@ var push_default$1 = createPushCommand({
|
|
|
19606
19108
|
resolveContainerConfig: resolveSettingsContainerConfig,
|
|
19607
19109
|
resolveAppContainerConfig: resolveSettingsAppContainerConfig
|
|
19608
19110
|
});
|
|
19609
|
-
|
|
19610
|
-
//#region src/cli/commands/settings/index.ts
|
|
19111
|
+
// src/cli/commands/settings/index.ts
|
|
19611
19112
|
var settings_default = define({
|
|
19612
19113
|
name: "settings",
|
|
19613
19114
|
description: "Manage kintone general settings",
|
|
@@ -19620,8 +19121,7 @@ var settings_default = define({
|
|
|
19620
19121
|
},
|
|
19621
19122
|
run: () => {}
|
|
19622
19123
|
});
|
|
19623
|
-
|
|
19624
|
-
//#region src/cli/viewConfig.ts
|
|
19124
|
+
// src/cli/viewConfig.ts
|
|
19625
19125
|
const VIEW_STATE_FILE = "view.yaml";
|
|
19626
19126
|
const viewArgs = {
|
|
19627
19127
|
...kintoneArgs,
|
|
@@ -19644,8 +19144,7 @@ const { resolveFilePath: resolveViewFilePath, resolveContainerConfig: resolveVie
|
|
|
19644
19144
|
appRevisionFilePath: app ? buildAppRevisionFilePath(app.name) : buildLegacyAppRevisionFilePath()
|
|
19645
19145
|
})
|
|
19646
19146
|
});
|
|
19647
|
-
|
|
19648
|
-
//#region src/cli/commands/view/apply.ts
|
|
19147
|
+
// src/cli/commands/view/apply.ts
|
|
19649
19148
|
var apply_default = createApplyCommand({
|
|
19650
19149
|
description: "Apply view settings from YAML to kintone app",
|
|
19651
19150
|
args: viewArgs,
|
|
@@ -19668,8 +19167,7 @@ var apply_default = createApplyCommand({
|
|
|
19668
19167
|
resolveContainerConfig: resolveViewContainerConfig,
|
|
19669
19168
|
resolveAppContainerConfig: resolveViewAppContainerConfig
|
|
19670
19169
|
});
|
|
19671
|
-
|
|
19672
|
-
//#region src/cli/commands/view/capture.ts
|
|
19170
|
+
// src/cli/commands/view/capture.ts
|
|
19673
19171
|
var capture_default = createCaptureCommand({
|
|
19674
19172
|
description: "Capture current view settings from kintone app to file",
|
|
19675
19173
|
args: viewArgs,
|
|
@@ -19688,8 +19186,7 @@ var capture_default = createCaptureCommand({
|
|
|
19688
19186
|
resolveContainerConfig: resolveViewContainerConfig,
|
|
19689
19187
|
resolveAppContainerConfig: resolveViewAppContainerConfig
|
|
19690
19188
|
});
|
|
19691
|
-
|
|
19692
|
-
//#region src/core/application/view/detectViewThreeWayDiff.ts
|
|
19189
|
+
// src/core/application/view/detectViewThreeWayDiff.ts
|
|
19693
19190
|
/**
|
|
19694
19191
|
* Detects view differences with 3-way awareness.
|
|
19695
19192
|
*
|
|
@@ -19708,8 +19205,7 @@ async function detectViewThreeWayDiff({ container }) {
|
|
|
19708
19205
|
return (entry.local ?? entry.remote ?? entry.base)?.type ?? "";
|
|
19709
19206
|
});
|
|
19710
19207
|
}
|
|
19711
|
-
|
|
19712
|
-
//#region src/cli/commands/view/diff.ts
|
|
19208
|
+
// src/cli/commands/view/diff.ts
|
|
19713
19209
|
async function runDiff(containerConfig) {
|
|
19714
19210
|
const container = createViewCliContainer(containerConfig);
|
|
19715
19211
|
const s = p.spinner();
|
|
@@ -19749,8 +19245,7 @@ var diff_default = define({
|
|
|
19749
19245
|
}
|
|
19750
19246
|
}
|
|
19751
19247
|
});
|
|
19752
|
-
|
|
19753
|
-
//#region src/cli/commands/view/pull.ts
|
|
19248
|
+
// src/cli/commands/view/pull.ts
|
|
19754
19249
|
var pull_default = createPullCommand({
|
|
19755
19250
|
description: "Pull remote views into the local view config (3-way merge)",
|
|
19756
19251
|
args: viewArgs,
|
|
@@ -19786,8 +19281,7 @@ var pull_default = createPullCommand({
|
|
|
19786
19281
|
resolveContainerConfig: resolveViewContainerConfig,
|
|
19787
19282
|
resolveAppContainerConfig: resolveViewAppContainerConfig
|
|
19788
19283
|
});
|
|
19789
|
-
|
|
19790
|
-
//#region src/cli/commands/view/push.ts
|
|
19284
|
+
// src/cli/commands/view/push.ts
|
|
19791
19285
|
var push_default = createPushCommand({
|
|
19792
19286
|
description: "Push the local view config to kintone (with drift detection)",
|
|
19793
19287
|
args: viewArgs,
|
|
@@ -19803,8 +19297,7 @@ var push_default = createPushCommand({
|
|
|
19803
19297
|
resolveContainerConfig: resolveViewContainerConfig,
|
|
19804
19298
|
resolveAppContainerConfig: resolveViewAppContainerConfig
|
|
19805
19299
|
});
|
|
19806
|
-
|
|
19807
|
-
//#region src/cli/commands/view/index.ts
|
|
19300
|
+
// src/cli/commands/view/index.ts
|
|
19808
19301
|
var view_default = define({
|
|
19809
19302
|
name: "view",
|
|
19810
19303
|
description: "Manage kintone view settings",
|
|
@@ -19817,8 +19310,7 @@ var view_default = define({
|
|
|
19817
19310
|
},
|
|
19818
19311
|
run: () => {}
|
|
19819
19312
|
});
|
|
19820
|
-
|
|
19821
|
-
//#region src/cli/index.ts
|
|
19313
|
+
// src/cli/index.ts
|
|
19822
19314
|
function loadVersion() {
|
|
19823
19315
|
try {
|
|
19824
19316
|
return createRequire(import.meta.url)("../package.json").version;
|
|
@@ -19858,7 +19350,6 @@ await cli(process.argv.slice(2), main, {
|
|
|
19858
19350
|
plugin: plugin_default
|
|
19859
19351
|
}
|
|
19860
19352
|
});
|
|
19861
|
-
//#endregion
|
|
19862
19353
|
export {};
|
|
19863
19354
|
|
|
19864
19355
|
//# sourceMappingURL=index.mjs.map
|