kintone-migrator 0.34.3 → 0.34.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 +37 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -16275,6 +16275,7 @@ function buildPhases(args) {
|
|
|
16275
16275
|
container: c.schema,
|
|
16276
16276
|
input: { force }
|
|
16277
16277
|
});
|
|
16278
|
+
return [];
|
|
16278
16279
|
}
|
|
16279
16280
|
}]
|
|
16280
16281
|
},
|
|
@@ -16291,6 +16292,7 @@ function buildPhases(args) {
|
|
|
16291
16292
|
force
|
|
16292
16293
|
}
|
|
16293
16294
|
});
|
|
16295
|
+
return [];
|
|
16294
16296
|
}
|
|
16295
16297
|
}, {
|
|
16296
16298
|
domain: "view",
|
|
@@ -16300,6 +16302,7 @@ function buildPhases(args) {
|
|
|
16300
16302
|
container: c.view,
|
|
16301
16303
|
input: { force }
|
|
16302
16304
|
});
|
|
16305
|
+
return [];
|
|
16303
16306
|
}
|
|
16304
16307
|
}]
|
|
16305
16308
|
},
|
|
@@ -16314,6 +16317,7 @@ function buildPhases(args) {
|
|
|
16314
16317
|
container: c.fieldPermission,
|
|
16315
16318
|
input: { force }
|
|
16316
16319
|
});
|
|
16320
|
+
return [];
|
|
16317
16321
|
}
|
|
16318
16322
|
},
|
|
16319
16323
|
{
|
|
@@ -16324,6 +16328,7 @@ function buildPhases(args) {
|
|
|
16324
16328
|
container: c.appPermission,
|
|
16325
16329
|
input: { force }
|
|
16326
16330
|
});
|
|
16331
|
+
return [];
|
|
16327
16332
|
}
|
|
16328
16333
|
},
|
|
16329
16334
|
{
|
|
@@ -16334,6 +16339,7 @@ function buildPhases(args) {
|
|
|
16334
16339
|
container: c.recordPermission,
|
|
16335
16340
|
input: { force }
|
|
16336
16341
|
});
|
|
16342
|
+
return [];
|
|
16337
16343
|
}
|
|
16338
16344
|
}
|
|
16339
16345
|
]
|
|
@@ -16349,6 +16355,7 @@ function buildPhases(args) {
|
|
|
16349
16355
|
container: c.settings,
|
|
16350
16356
|
input: { force }
|
|
16351
16357
|
});
|
|
16358
|
+
return [];
|
|
16352
16359
|
}
|
|
16353
16360
|
},
|
|
16354
16361
|
{
|
|
@@ -16359,6 +16366,7 @@ function buildPhases(args) {
|
|
|
16359
16366
|
container: c.notification,
|
|
16360
16367
|
input: { force }
|
|
16361
16368
|
});
|
|
16369
|
+
return [];
|
|
16362
16370
|
}
|
|
16363
16371
|
},
|
|
16364
16372
|
{
|
|
@@ -16369,6 +16377,7 @@ function buildPhases(args) {
|
|
|
16369
16377
|
container: c.report,
|
|
16370
16378
|
input: { force }
|
|
16371
16379
|
});
|
|
16380
|
+
return [];
|
|
16372
16381
|
}
|
|
16373
16382
|
},
|
|
16374
16383
|
{
|
|
@@ -16379,6 +16388,7 @@ function buildPhases(args) {
|
|
|
16379
16388
|
container: c.action,
|
|
16380
16389
|
input: { force }
|
|
16381
16390
|
});
|
|
16391
|
+
return [];
|
|
16382
16392
|
}
|
|
16383
16393
|
},
|
|
16384
16394
|
{
|
|
@@ -16389,6 +16399,7 @@ function buildPhases(args) {
|
|
|
16389
16399
|
container: c.process,
|
|
16390
16400
|
input: { force }
|
|
16391
16401
|
});
|
|
16402
|
+
return [];
|
|
16392
16403
|
}
|
|
16393
16404
|
},
|
|
16394
16405
|
{
|
|
@@ -16399,16 +16410,34 @@ function buildPhases(args) {
|
|
|
16399
16410
|
container: c.adminNotes,
|
|
16400
16411
|
input: { force }
|
|
16401
16412
|
});
|
|
16413
|
+
return [];
|
|
16402
16414
|
}
|
|
16403
16415
|
},
|
|
16404
16416
|
{
|
|
16405
16417
|
domain: "plugin",
|
|
16406
16418
|
storageExists: async () => (await c.plugin.pluginStorage.get()).exists,
|
|
16407
16419
|
run: async () => {
|
|
16408
|
-
await pushPlugin({
|
|
16420
|
+
const result = await pushPlugin({
|
|
16409
16421
|
container: c.plugin,
|
|
16410
16422
|
input: { force }
|
|
16411
16423
|
});
|
|
16424
|
+
const warnings = [];
|
|
16425
|
+
const deletions = result.skipped.filter((o) => o.reason === "delete").map((o) => o.pluginId);
|
|
16426
|
+
const modifications = result.skipped.filter((o) => o.reason === "modify").map((o) => o.pluginId);
|
|
16427
|
+
const addDisabled = result.skipped.filter((o) => o.reason === "add-disabled").map((o) => o.pluginId);
|
|
16428
|
+
if (deletions.length > 0) warnings.push({
|
|
16429
|
+
domain: "plugin",
|
|
16430
|
+
message: `Cannot remove plugins via the kintone API (add-only); left on the app: ${deletions.join(", ")}`
|
|
16431
|
+
});
|
|
16432
|
+
if (modifications.length > 0) warnings.push({
|
|
16433
|
+
domain: "plugin",
|
|
16434
|
+
message: `Cannot modify existing plugins (name/enabled) via the kintone API (add-only); unchanged: ${modifications.join(", ")}`
|
|
16435
|
+
});
|
|
16436
|
+
if (addDisabled.length > 0) warnings.push({
|
|
16437
|
+
domain: "plugin",
|
|
16438
|
+
message: `Cannot add plugins in a disabled state via the kintone API (add-only; adding would force-enable them); not added — set enabled: false manually in the kintone admin UI: ${addDisabled.join(", ")}`
|
|
16439
|
+
});
|
|
16440
|
+
return warnings;
|
|
16412
16441
|
}
|
|
16413
16442
|
}
|
|
16414
16443
|
]
|
|
@@ -16448,11 +16477,12 @@ async function executeSchemaPhase(phase, containers, state) {
|
|
|
16448
16477
|
continue;
|
|
16449
16478
|
}
|
|
16450
16479
|
try {
|
|
16451
|
-
await task.run();
|
|
16480
|
+
const warnings = await task.run();
|
|
16452
16481
|
await deployApp({ container: containers.schema });
|
|
16453
16482
|
results.push({
|
|
16454
16483
|
domain: task.domain,
|
|
16455
|
-
success: true
|
|
16484
|
+
success: true,
|
|
16485
|
+
warnings
|
|
16456
16486
|
});
|
|
16457
16487
|
} catch (error) {
|
|
16458
16488
|
const err = toError(error);
|
|
@@ -16499,10 +16529,11 @@ async function executeStandardPhase(phase, state) {
|
|
|
16499
16529
|
continue;
|
|
16500
16530
|
}
|
|
16501
16531
|
try {
|
|
16502
|
-
await task.run();
|
|
16532
|
+
const warnings = await task.run();
|
|
16503
16533
|
results.push({
|
|
16504
16534
|
domain: task.domain,
|
|
16505
|
-
success: true
|
|
16535
|
+
success: true,
|
|
16536
|
+
warnings
|
|
16506
16537
|
});
|
|
16507
16538
|
} catch (error) {
|
|
16508
16539
|
const err = toError(error);
|
|
@@ -16615,6 +16646,7 @@ function printPhaseResult(phaseResult) {
|
|
|
16615
16646
|
for (const result of phaseResult.results) {
|
|
16616
16647
|
p.log.message(formatTaskResult(result));
|
|
16617
16648
|
if (!result.success && result.skipped === false) logError(result.error);
|
|
16649
|
+
if (result.success) for (const warning of result.warnings) p.log.warn(warning.message);
|
|
16618
16650
|
}
|
|
16619
16651
|
}
|
|
16620
16652
|
function printPushAllResults(output) {
|