@strapi/strapi 4.12.0-beta.4 → 4.12.0
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.
|
@@ -10,7 +10,7 @@ module.exports = async () => {
|
|
|
10
10
|
const appContext = await strapi.compile();
|
|
11
11
|
const app = await strapi(appContext).load();
|
|
12
12
|
|
|
13
|
-
const list = app.server.listRoutes();
|
|
13
|
+
const list = app.server.mount().listRoutes();
|
|
14
14
|
|
|
15
15
|
const infoTable = new CLITable({
|
|
16
16
|
head: [chalk.blue('Method'), chalk.blue('Path')],
|
|
@@ -24,6 +24,7 @@ const {
|
|
|
24
24
|
getTransferTelemetryPayload,
|
|
25
25
|
setSignalHandler,
|
|
26
26
|
getDiffHandler,
|
|
27
|
+
getAssetsBackupHandler,
|
|
27
28
|
} = require('../../utils/data-transfer');
|
|
28
29
|
const { exitWith } = require('../../utils/helpers');
|
|
29
30
|
|
|
@@ -150,6 +151,11 @@ module.exports = async (opts) => {
|
|
|
150
151
|
|
|
151
152
|
engine.onSchemaDiff(getDiffHandler(engine, { force: opts.force, action: 'transfer' }));
|
|
152
153
|
|
|
154
|
+
engine.addErrorHandler(
|
|
155
|
+
'ASSETS_DIRECTORY_ERR',
|
|
156
|
+
getAssetsBackupHandler(engine, { force: opts.force, action: 'transfer' })
|
|
157
|
+
);
|
|
158
|
+
|
|
153
159
|
progress.on(`stage::start`, ({ stage, data }) => {
|
|
154
160
|
updateLoader(stage, data).start();
|
|
155
161
|
});
|
|
@@ -341,6 +341,34 @@ const getDiffHandler = (engine, { force, action }) => {
|
|
|
341
341
|
};
|
|
342
342
|
};
|
|
343
343
|
|
|
344
|
+
const getAssetsBackupHandler = (engine, { force, action }) => {
|
|
345
|
+
return async (context, next) => {
|
|
346
|
+
// if we abort here, we need to actually exit the process because of conflict with inquirer prompt
|
|
347
|
+
setSignalHandler(async () => {
|
|
348
|
+
await abortTransfer({ engine, strapi });
|
|
349
|
+
exitWith(1, exitMessageText(action, true));
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
console.warn(
|
|
353
|
+
'The backup for the assets could not be created inside the public directory. Ensure Strapi has write permissions on the public directory.'
|
|
354
|
+
);
|
|
355
|
+
const confirmed = await confirmMessage(
|
|
356
|
+
'Do you want to continue without backing up your public/uploads files?',
|
|
357
|
+
{
|
|
358
|
+
force,
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
if (confirmed) {
|
|
363
|
+
context.ignore = true;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// reset handler back to normal
|
|
367
|
+
setSignalHandler(() => abortTransfer({ engine, strapi }));
|
|
368
|
+
return next(context);
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
|
|
344
372
|
module.exports = {
|
|
345
373
|
loadersFactory,
|
|
346
374
|
buildTransferTable,
|
|
@@ -357,4 +385,5 @@ module.exports = {
|
|
|
357
385
|
abortTransfer,
|
|
358
386
|
setSignalHandler,
|
|
359
387
|
getDiffHandler,
|
|
388
|
+
getAssetsBackupHandler,
|
|
360
389
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/strapi",
|
|
3
|
-
"version": "4.12.0
|
|
3
|
+
"version": "4.12.0",
|
|
4
4
|
"description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -81,19 +81,19 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@koa/cors": "3.4.3",
|
|
83
83
|
"@koa/router": "10.1.1",
|
|
84
|
-
"@strapi/admin": "4.12.0
|
|
85
|
-
"@strapi/data-transfer": "4.12.0
|
|
86
|
-
"@strapi/database": "4.12.0
|
|
87
|
-
"@strapi/generate-new": "4.12.0
|
|
88
|
-
"@strapi/generators": "4.12.0
|
|
89
|
-
"@strapi/logger": "4.12.0
|
|
90
|
-
"@strapi/permissions": "4.12.0
|
|
91
|
-
"@strapi/plugin-content-manager": "4.12.0
|
|
92
|
-
"@strapi/plugin-content-type-builder": "4.12.0
|
|
93
|
-
"@strapi/plugin-email": "4.12.0
|
|
94
|
-
"@strapi/plugin-upload": "4.12.0
|
|
95
|
-
"@strapi/typescript-utils": "4.12.0
|
|
96
|
-
"@strapi/utils": "4.12.0
|
|
84
|
+
"@strapi/admin": "4.12.0",
|
|
85
|
+
"@strapi/data-transfer": "4.12.0",
|
|
86
|
+
"@strapi/database": "4.12.0",
|
|
87
|
+
"@strapi/generate-new": "4.12.0",
|
|
88
|
+
"@strapi/generators": "4.12.0",
|
|
89
|
+
"@strapi/logger": "4.12.0",
|
|
90
|
+
"@strapi/permissions": "4.12.0",
|
|
91
|
+
"@strapi/plugin-content-manager": "4.12.0",
|
|
92
|
+
"@strapi/plugin-content-type-builder": "4.12.0",
|
|
93
|
+
"@strapi/plugin-email": "4.12.0",
|
|
94
|
+
"@strapi/plugin-upload": "4.12.0",
|
|
95
|
+
"@strapi/typescript-utils": "4.12.0",
|
|
96
|
+
"@strapi/utils": "4.12.0",
|
|
97
97
|
"bcryptjs": "2.4.3",
|
|
98
98
|
"boxen": "5.1.2",
|
|
99
99
|
"chalk": "4.1.2",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"node": ">=14.19.1 <=18.x.x",
|
|
143
143
|
"npm": ">=6.0.0"
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "7f8109a1a736c1d997fbb445469b3b59550c7aeb"
|
|
146
146
|
}
|