kintone-migrator 0.12.1 → 0.12.3
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 +40 -16
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1016,13 +1016,15 @@ function createSeedCliContainer(config) {
|
|
|
1016
1016
|
};
|
|
1017
1017
|
}
|
|
1018
1018
|
function createFieldPermissionCliContainer(config) {
|
|
1019
|
+
const client = new KintoneRestAPIClient({
|
|
1020
|
+
baseUrl: config.baseUrl,
|
|
1021
|
+
auth: buildKintoneAuth(config.auth),
|
|
1022
|
+
guestSpaceId: config.guestSpaceId
|
|
1023
|
+
});
|
|
1019
1024
|
return {
|
|
1020
|
-
fieldPermissionConfigurator: new KintoneFieldPermissionConfigurator(
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
guestSpaceId: config.guestSpaceId
|
|
1024
|
-
}), config.appId),
|
|
1025
|
-
fieldPermissionStorage: new LocalFileFieldPermissionStorage(config.fieldAclFilePath)
|
|
1025
|
+
fieldPermissionConfigurator: new KintoneFieldPermissionConfigurator(client, config.appId),
|
|
1026
|
+
fieldPermissionStorage: new LocalFileFieldPermissionStorage(config.fieldAclFilePath),
|
|
1027
|
+
appDeployer: new KintoneAppDeployer(client, config.appId)
|
|
1026
1028
|
};
|
|
1027
1029
|
}
|
|
1028
1030
|
function createCustomizationCliContainer(config) {
|
|
@@ -1428,7 +1430,7 @@ function printDiffResult(result) {
|
|
|
1428
1430
|
const colorize = entry.type === "added" ? pc.green : entry.type === "deleted" ? pc.red : pc.yellow;
|
|
1429
1431
|
return `${colorize(entry.type === "added" ? "+" : entry.type === "deleted" ? "-" : "~")} ${pc.dim("[")}${colorize(entry.fieldCode)}${pc.dim("]")} ${entry.fieldLabel}${pc.dim(":")} ${entry.details}`;
|
|
1430
1432
|
});
|
|
1431
|
-
p.note(lines.join("\n"), "Diff Details");
|
|
1433
|
+
p.note(lines.join("\n"), "Diff Details", { format: (v) => v });
|
|
1432
1434
|
}
|
|
1433
1435
|
function printAppHeader(appName, appId) {
|
|
1434
1436
|
p.log.step(`\n=== [${pc.bold(appName)}] (app: ${appId}) ===`);
|
|
@@ -2142,7 +2144,7 @@ async function applyCustomizationForApp(config) {
|
|
|
2142
2144
|
s.stop("Customization applied.");
|
|
2143
2145
|
return container;
|
|
2144
2146
|
}
|
|
2145
|
-
async function confirmAndDeploy(containers, skipConfirm) {
|
|
2147
|
+
async function confirmAndDeploy$1(containers, skipConfirm) {
|
|
2146
2148
|
if (!skipConfirm) {
|
|
2147
2149
|
const shouldDeploy = await p.confirm({ message: "Deploy to production?" });
|
|
2148
2150
|
if (p.isCancel(shouldDeploy) || !shouldDeploy) {
|
|
@@ -2166,10 +2168,10 @@ var customize_default = define({
|
|
|
2166
2168
|
const skipConfirm = ctx.values.yes === true;
|
|
2167
2169
|
await routeMultiApp(values, {
|
|
2168
2170
|
singleLegacy: async () => {
|
|
2169
|
-
await confirmAndDeploy([await applyCustomizationForApp(resolveCustomizeConfig(values))], skipConfirm);
|
|
2171
|
+
await confirmAndDeploy$1([await applyCustomizationForApp(resolveCustomizeConfig(values))], skipConfirm);
|
|
2170
2172
|
},
|
|
2171
2173
|
singleApp: async (app, projectConfig) => {
|
|
2172
|
-
await confirmAndDeploy([await applyCustomizationForApp(resolveCustomizeAppConfig(app, projectConfig, values))], skipConfirm);
|
|
2174
|
+
await confirmAndDeploy$1([await applyCustomizationForApp(resolveCustomizeAppConfig(app, projectConfig, values))], skipConfirm);
|
|
2173
2175
|
},
|
|
2174
2176
|
multiApp: async (plan, projectConfig) => {
|
|
2175
2177
|
const containers = [];
|
|
@@ -2179,7 +2181,7 @@ var customize_default = define({
|
|
|
2179
2181
|
const container = await applyCustomizationForApp(config);
|
|
2180
2182
|
containers.push(container);
|
|
2181
2183
|
}, void 0);
|
|
2182
|
-
await confirmAndDeploy(containers, skipConfirm);
|
|
2184
|
+
await confirmAndDeploy$1(containers, skipConfirm);
|
|
2183
2185
|
}
|
|
2184
2186
|
});
|
|
2185
2187
|
} catch (error) {
|
|
@@ -2934,27 +2936,49 @@ async function runFieldAcl(config) {
|
|
|
2934
2936
|
await applyFieldPermission({ container });
|
|
2935
2937
|
s.stop("Field access permissions applied.");
|
|
2936
2938
|
p.log.success("Field access permissions applied successfully.");
|
|
2939
|
+
return container;
|
|
2940
|
+
}
|
|
2941
|
+
async function confirmAndDeploy(containers, skipConfirm) {
|
|
2942
|
+
if (!skipConfirm) {
|
|
2943
|
+
const shouldDeploy = await p.confirm({ message: "運用環境に反映しますか?" });
|
|
2944
|
+
if (p.isCancel(shouldDeploy) || !shouldDeploy) {
|
|
2945
|
+
p.log.warn("テスト環境に反映済みですが、運用環境には反映されていません。");
|
|
2946
|
+
return;
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
const ds = p.spinner();
|
|
2950
|
+
ds.start("運用環境に反映しています...");
|
|
2951
|
+
for (const container of containers) await container.appDeployer.deploy();
|
|
2952
|
+
ds.stop("運用環境への反映が完了しました。");
|
|
2953
|
+
p.log.success("運用環境への反映が完了しました。");
|
|
2937
2954
|
}
|
|
2938
2955
|
var field_acl_default = define({
|
|
2939
2956
|
name: "field-acl",
|
|
2940
2957
|
description: "Apply field access permissions from YAML to kintone app",
|
|
2941
|
-
args:
|
|
2958
|
+
args: {
|
|
2959
|
+
...fieldAclArgs,
|
|
2960
|
+
...confirmArgs
|
|
2961
|
+
},
|
|
2942
2962
|
run: async (ctx) => {
|
|
2943
2963
|
try {
|
|
2944
2964
|
const values = ctx.values;
|
|
2965
|
+
const skipConfirm = values.yes === true;
|
|
2945
2966
|
await routeMultiApp(values, {
|
|
2946
2967
|
singleLegacy: async () => {
|
|
2947
|
-
await runFieldAcl(resolveFieldAclContainerConfig(values));
|
|
2968
|
+
await confirmAndDeploy([await runFieldAcl(resolveFieldAclContainerConfig(values))], skipConfirm);
|
|
2948
2969
|
},
|
|
2949
2970
|
singleApp: async (app, projectConfig) => {
|
|
2950
|
-
await runFieldAcl(resolveFieldAclAppContainerConfig(app, projectConfig, values));
|
|
2971
|
+
await confirmAndDeploy([await runFieldAcl(resolveFieldAclAppContainerConfig(app, projectConfig, values))], skipConfirm);
|
|
2951
2972
|
},
|
|
2952
2973
|
multiApp: async (plan, projectConfig) => {
|
|
2974
|
+
const containers = [];
|
|
2953
2975
|
await runMultiAppWithFailCheck(plan, async (app) => {
|
|
2954
2976
|
const config = resolveFieldAclAppContainerConfig(app, projectConfig, values);
|
|
2955
2977
|
printAppHeader(app.name, app.appId);
|
|
2956
|
-
await runFieldAcl(config);
|
|
2957
|
-
|
|
2978
|
+
const container = await runFieldAcl(config);
|
|
2979
|
+
containers.push(container);
|
|
2980
|
+
}, void 0);
|
|
2981
|
+
await confirmAndDeploy(containers, skipConfirm);
|
|
2958
2982
|
}
|
|
2959
2983
|
});
|
|
2960
2984
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kintone-migrator",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "kintone form schema migration tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hikaru Otabe",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@semantic-release/npm": "^13.1.4",
|
|
64
64
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
65
65
|
"@types/node": "^25.2.3",
|
|
66
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
66
|
+
"@typescript/native-preview": "7.0.0-dev.20260213.1",
|
|
67
67
|
"@vitest/coverage-v8": "^4.0.18",
|
|
68
68
|
"dotenv-cli": "^11.0.0",
|
|
69
69
|
"semantic-release": "^25.0.3",
|