kintone-migrator 0.31.3 → 0.31.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +18 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -713,7 +713,7 @@ const ActionDiffDetector = { detect: (local, remote) => {
|
|
|
713
713
|
if (diffs.length > 0) return {
|
|
714
714
|
type: "modified",
|
|
715
715
|
actionName: name,
|
|
716
|
-
details: diffs.join("
|
|
716
|
+
details: diffs.join("\n")
|
|
717
717
|
};
|
|
718
718
|
},
|
|
719
719
|
onDeleted: (name, remoteAction) => ({
|
|
@@ -2428,6 +2428,11 @@ function colorizeDiffEntry(type) {
|
|
|
2428
2428
|
prefix: type === "added" ? "+" : type === "deleted" ? "-" : "~"
|
|
2429
2429
|
};
|
|
2430
2430
|
}
|
|
2431
|
+
function indentContinuationLines(text, indent = " ") {
|
|
2432
|
+
if (!text.includes("\n")) return text;
|
|
2433
|
+
const [first, ...rest] = text.split("\n");
|
|
2434
|
+
return [first, ...rest.map((line) => line.length > 0 ? `${indent}${line}` : line)].join("\n");
|
|
2435
|
+
}
|
|
2431
2436
|
function printGenericDiffResult(result, title, formatEntry) {
|
|
2432
2437
|
for (const w of result.warnings) p.log.warn(w);
|
|
2433
2438
|
if (result.isEmpty) {
|
|
@@ -2437,7 +2442,7 @@ function printGenericDiffResult(result, title, formatEntry) {
|
|
|
2437
2442
|
p.log.info(`Changes: ${formatDiffSummary(result.summary)}`);
|
|
2438
2443
|
const lines = result.entries.map((entry) => {
|
|
2439
2444
|
const { colorize, prefix } = colorizeDiffEntry(entry.type);
|
|
2440
|
-
return formatEntry(entry, colorize, prefix);
|
|
2445
|
+
return indentContinuationLines(formatEntry(entry, colorize, prefix));
|
|
2441
2446
|
});
|
|
2442
2447
|
p.note(lines.join("\n"), title, { format: (v) => v });
|
|
2443
2448
|
}
|
|
@@ -2465,7 +2470,7 @@ function printDiffResult(result) {
|
|
|
2465
2470
|
if (result.hasLayoutChanges) p.log.info("Layout changes detected.");
|
|
2466
2471
|
const lines = result.entries.map((entry) => {
|
|
2467
2472
|
const { colorize, prefix } = colorizeDiffEntry(entry.type);
|
|
2468
|
-
return `${colorize(prefix)} ${pc.dim("[")}${colorize(entry.fieldCode)}${pc.dim("]")} ${entry.fieldLabel}${pc.dim(":")} ${entry.details}
|
|
2473
|
+
return indentContinuationLines(`${colorize(prefix)} ${pc.dim("[")}${colorize(entry.fieldCode)}${pc.dim("]")} ${entry.fieldLabel}${pc.dim(":")} ${entry.details}`);
|
|
2469
2474
|
});
|
|
2470
2475
|
p.note(lines.join("\n"), "Diff Details", { format: (v) => v });
|
|
2471
2476
|
}
|
|
@@ -3447,7 +3452,7 @@ const AppPermissionDiffDetector = { detect: (local, remote) => {
|
|
|
3447
3452
|
if (diffs.length > 0) entries.push({
|
|
3448
3453
|
type: "modified",
|
|
3449
3454
|
entityKey: key,
|
|
3450
|
-
details: diffs.join("
|
|
3455
|
+
details: diffs.join("\n")
|
|
3451
3456
|
});
|
|
3452
3457
|
}
|
|
3453
3458
|
}
|
|
@@ -3946,7 +3951,7 @@ function describeChanges$1(before, after) {
|
|
|
3946
3951
|
if (before.label !== after.label) changes.push(`label: ${before.label} -> ${after.label}`);
|
|
3947
3952
|
if ((before.noLabel ?? false) !== (after.noLabel ?? false)) changes.push(`noLabel: ${before.noLabel ?? false} -> ${after.noLabel ?? false}`);
|
|
3948
3953
|
if (!isPropertiesEqual(before, after)) changes.push(...describePropertiesChanges(before, after));
|
|
3949
|
-
return changes.length > 0 ? changes.join("
|
|
3954
|
+
return changes.length > 0 ? changes.join("\n") : "no visible changes";
|
|
3950
3955
|
}
|
|
3951
3956
|
function isLayoutEqual(a, b) {
|
|
3952
3957
|
return deepEqual(a, b);
|
|
@@ -7473,7 +7478,7 @@ function compareGeneralSection(local, remote) {
|
|
|
7473
7478
|
type: "modified",
|
|
7474
7479
|
section: "general",
|
|
7475
7480
|
name: key,
|
|
7476
|
-
details: diffs.join("
|
|
7481
|
+
details: diffs.join("\n")
|
|
7477
7482
|
});
|
|
7478
7483
|
}
|
|
7479
7484
|
}
|
|
@@ -7500,7 +7505,7 @@ function describePerRecordChanges(local, remote) {
|
|
|
7500
7505
|
const diffs = [];
|
|
7501
7506
|
if (local.title !== remote.title) diffs.push(`title: "${remote.title}" -> "${local.title}"`);
|
|
7502
7507
|
if (!deepEqual(local.targets, remote.targets)) diffs.push(`targets: ${formatValue(remote.targets)} -> ${formatValue(local.targets)}`);
|
|
7503
|
-
return diffs.length > 0 ? diffs.join("
|
|
7508
|
+
return diffs.length > 0 ? diffs.join("\n") : "changed";
|
|
7504
7509
|
}
|
|
7505
7510
|
function describeReminderChanges(local, remote) {
|
|
7506
7511
|
const diffs = [];
|
|
@@ -7510,7 +7515,7 @@ function describeReminderChanges(local, remote) {
|
|
|
7510
7515
|
if ((local.time ?? "") !== (remote.time ?? "")) diffs.push(`time: "${remote.time ?? ""}" -> "${local.time ?? ""}"`);
|
|
7511
7516
|
if (local.filterCond !== remote.filterCond) diffs.push(`filterCond: "${remote.filterCond}" -> "${local.filterCond}"`);
|
|
7512
7517
|
if (!deepEqual(local.targets, remote.targets)) diffs.push(`targets: ${formatValue(remote.targets)} -> ${formatValue(local.targets)}`);
|
|
7513
|
-
return diffs.length > 0 ? diffs.join("
|
|
7518
|
+
return diffs.length > 0 ? diffs.join("\n") : "changed";
|
|
7514
7519
|
}
|
|
7515
7520
|
function comparePerRecordSection(local, remote) {
|
|
7516
7521
|
const entries = [];
|
|
@@ -7664,7 +7669,7 @@ const PluginDiffDetector = { detect: (local, remote) => {
|
|
|
7664
7669
|
if (diffs.length > 0) entries.push({
|
|
7665
7670
|
type: "modified",
|
|
7666
7671
|
pluginId: id,
|
|
7667
|
-
details: diffs.join("
|
|
7672
|
+
details: diffs.join("\n")
|
|
7668
7673
|
});
|
|
7669
7674
|
}
|
|
7670
7675
|
}
|
|
@@ -7733,7 +7738,7 @@ function compareStates(local, remote, entries) {
|
|
|
7733
7738
|
type: "modified",
|
|
7734
7739
|
category: "state",
|
|
7735
7740
|
name,
|
|
7736
|
-
details: stateDiffs.join("
|
|
7741
|
+
details: stateDiffs.join("\n")
|
|
7737
7742
|
});
|
|
7738
7743
|
}
|
|
7739
7744
|
for (const name of remoteStateNames) if (!localStateNames.has(name)) entries.push({
|
|
@@ -7760,7 +7765,7 @@ function compareActionEntries(local, remote, entries) {
|
|
|
7760
7765
|
type: "modified",
|
|
7761
7766
|
category: "action",
|
|
7762
7767
|
name,
|
|
7763
|
-
details: actionDiffs.join("
|
|
7768
|
+
details: actionDiffs.join("\n")
|
|
7764
7769
|
});
|
|
7765
7770
|
}
|
|
7766
7771
|
}
|
|
@@ -7904,7 +7909,7 @@ const ReportDiffDetector = { detect: (local, remote) => {
|
|
|
7904
7909
|
if (diffs.length > 0) return {
|
|
7905
7910
|
type: "modified",
|
|
7906
7911
|
reportName: name,
|
|
7907
|
-
details: diffs.join("
|
|
7912
|
+
details: diffs.join("\n")
|
|
7908
7913
|
};
|
|
7909
7914
|
},
|
|
7910
7915
|
onDeleted: (name, remoteReport) => ({
|
|
@@ -7957,7 +7962,7 @@ const ViewDiffDetector = { detect: (localViews, remoteViews) => {
|
|
|
7957
7962
|
if (changes.length > 0) return {
|
|
7958
7963
|
type: "modified",
|
|
7959
7964
|
viewName: name,
|
|
7960
|
-
details: changes.join("
|
|
7965
|
+
details: changes.join("\n")
|
|
7961
7966
|
};
|
|
7962
7967
|
},
|
|
7963
7968
|
onDeleted: (name, remoteView) => ({
|