@akemona-org/strapi 3.9.4 → 3.10.2
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/lib/Strapi.js
CHANGED
|
@@ -4,10 +4,13 @@ const http = require('http');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const fse = require('fs-extra');
|
|
6
6
|
const Koa = require('koa');
|
|
7
|
-
const Router = require('koa
|
|
7
|
+
const Router = require('@koa/router');
|
|
8
8
|
const _ = require('lodash');
|
|
9
9
|
const chalk = require('chalk');
|
|
10
10
|
const CLITable = require('cli-table3');
|
|
11
|
+
// eslint-disable-next-line import/order
|
|
12
|
+
const loadConfiguration = require('./core/app-configuration'); // loads dotenv
|
|
13
|
+
|
|
11
14
|
const {
|
|
12
15
|
logger,
|
|
13
16
|
models,
|
|
@@ -15,7 +18,6 @@ const {
|
|
|
15
18
|
getAbsoluteServerUrl,
|
|
16
19
|
} = require('@akemona-org/strapi-utils');
|
|
17
20
|
const { createDatabaseManager } = require('@akemona-org/strapi-database');
|
|
18
|
-
const loadConfiguration = require('./core/app-configuration');
|
|
19
21
|
|
|
20
22
|
const utils = require('./utils');
|
|
21
23
|
const loadModules = require('./core/load-modules');
|
|
@@ -87,12 +87,12 @@ module.exports = (strapi) => {
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
strapi.router.get(
|
|
90
|
-
`${strapi.config.admin.path}
|
|
90
|
+
`${strapi.config.admin.path}/(.*)`,
|
|
91
91
|
serveStatic(buildDir, { maxage: maxAge, defer: false, index: 'index.html' })
|
|
92
92
|
);
|
|
93
93
|
|
|
94
94
|
strapi.router.get(`${strapi.config.admin.path}`, serveAdmin);
|
|
95
|
-
strapi.router.get(`${strapi.config.admin.path}
|
|
95
|
+
strapi.router.get(`${strapi.config.admin.path}/(.*)`, serveAdmin);
|
|
96
96
|
},
|
|
97
97
|
};
|
|
98
98
|
};
|
package/lib/utils/openBrowser.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
var execSync = require('child_process').execSync;
|
|
11
11
|
var chalk = require('chalk');
|
|
12
12
|
var spawn = require('cross-spawn');
|
|
13
|
-
var opn = require('
|
|
13
|
+
var opn = require('open');
|
|
14
14
|
const fetch = require('node-fetch');
|
|
15
15
|
const { getAbsoluteAdminUrl } = require('@akemona-org/strapi-utils');
|
|
16
16
|
|
|
@@ -82,19 +82,9 @@ function startBrowserProcess(browser, url) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
// Another special case: on OS X, check if BROWSER has been set to "open".
|
|
86
|
-
// In this case, instead of passing `open` to `opn` (which won't work),
|
|
87
|
-
// just ignore it (thus ensuring the intended behavior, i.e. opening the system browser):
|
|
88
|
-
// https://github.com/facebook/create-react-app/pull/1690#issuecomment-283518768
|
|
89
|
-
if (process.platform === 'darwin' && browser === 'open') {
|
|
90
|
-
browser = undefined;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Fallback to opn
|
|
94
|
-
// (It will always open new tab)
|
|
95
85
|
try {
|
|
96
|
-
|
|
97
|
-
opn(url
|
|
86
|
+
// open in default browser (opn v)
|
|
87
|
+
opn(url).catch(() => {}); // Prevent `unhandledRejection` error.
|
|
98
88
|
return true;
|
|
99
89
|
} catch (err) {
|
|
100
90
|
return false;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.10.2",
|
|
7
7
|
"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: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite",
|
|
8
8
|
"homepage": "https://strapi.akemona.com",
|
|
9
9
|
"directories": {
|
|
@@ -15,17 +15,18 @@
|
|
|
15
15
|
"strapi": "./bin/strapi.js"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@akemona-org/strapi-database": "3.
|
|
19
|
-
"@akemona-org/strapi-generate": "3.
|
|
20
|
-
"@akemona-org/strapi-generate-api": "3.
|
|
21
|
-
"@akemona-org/strapi-generate-controller": "3.
|
|
22
|
-
"@akemona-org/strapi-generate-model": "3.
|
|
23
|
-
"@akemona-org/strapi-generate-new": "3.
|
|
24
|
-
"@akemona-org/strapi-generate-plugin": "3.
|
|
25
|
-
"@akemona-org/strapi-generate-policy": "3.
|
|
26
|
-
"@akemona-org/strapi-generate-service": "3.
|
|
27
|
-
"@akemona-org/strapi-utils": "3.
|
|
28
|
-
"@koa/cors": "
|
|
18
|
+
"@akemona-org/strapi-database": "3.10.2",
|
|
19
|
+
"@akemona-org/strapi-generate": "3.10.2",
|
|
20
|
+
"@akemona-org/strapi-generate-api": "3.10.2",
|
|
21
|
+
"@akemona-org/strapi-generate-controller": "3.10.2",
|
|
22
|
+
"@akemona-org/strapi-generate-model": "3.10.2",
|
|
23
|
+
"@akemona-org/strapi-generate-new": "3.10.2",
|
|
24
|
+
"@akemona-org/strapi-generate-plugin": "3.10.2",
|
|
25
|
+
"@akemona-org/strapi-generate-policy": "3.10.2",
|
|
26
|
+
"@akemona-org/strapi-generate-service": "3.10.2",
|
|
27
|
+
"@akemona-org/strapi-utils": "3.10.2",
|
|
28
|
+
"@koa/cors": "3.4.3",
|
|
29
|
+
"@koa/router": "12.0.0",
|
|
29
30
|
"async": "^2.1.2",
|
|
30
31
|
"boom": "^7.3.0",
|
|
31
32
|
"boxen": "4.2.0",
|
|
@@ -38,35 +39,34 @@
|
|
|
38
39
|
"cross-spawn": "^7.0.3",
|
|
39
40
|
"debug": "^4.1.1",
|
|
40
41
|
"delegates": "^1.0.0",
|
|
41
|
-
"dotenv": "
|
|
42
|
+
"dotenv": "16.0.3",
|
|
42
43
|
"execa": "^1.0.0",
|
|
43
44
|
"fs-extra": "^9.1.0",
|
|
44
45
|
"glob": "^7.1.2",
|
|
45
46
|
"inquirer": "^6.2.1",
|
|
46
47
|
"is-docker": "2.2.1",
|
|
47
|
-
"koa": "
|
|
48
|
-
"koa-body": "
|
|
49
|
-
"koa-compose": "
|
|
50
|
-
"koa-compress": "
|
|
48
|
+
"koa": "2.14.1",
|
|
49
|
+
"koa-body": "4.2.0",
|
|
50
|
+
"koa-compose": "4.1.0",
|
|
51
|
+
"koa-compress": "5.1.0",
|
|
51
52
|
"koa-convert": "^2.0.0",
|
|
52
53
|
"koa-favicon": "^2.0.0",
|
|
53
54
|
"koa-i18n": "^2.1.0",
|
|
54
|
-
"koa-ip": "
|
|
55
|
+
"koa-ip": "2.1.2",
|
|
55
56
|
"koa-locale": "~1.3.0",
|
|
56
57
|
"koa-lusca": "~2.2.0",
|
|
57
|
-
"koa-
|
|
58
|
-
"koa-
|
|
59
|
-
"koa-static": "^5.0.0",
|
|
58
|
+
"koa-session": "6.2.0",
|
|
59
|
+
"koa-static": "5.0.0",
|
|
60
60
|
"lodash": "4.17.21",
|
|
61
61
|
"node-fetch": "2.6.1",
|
|
62
62
|
"node-machine-id": "1.1.12",
|
|
63
|
-
"node-schedule": "1.
|
|
64
|
-
"
|
|
65
|
-
"ora": "
|
|
63
|
+
"node-schedule": "2.1.1",
|
|
64
|
+
"open": "8.4.0",
|
|
65
|
+
"ora": "5.4.1",
|
|
66
66
|
"package-json": "7.0.0",
|
|
67
|
-
"qs": "
|
|
68
|
-
"resolve-cwd": "
|
|
69
|
-
"rimraf": "
|
|
67
|
+
"qs": "6.11.0",
|
|
68
|
+
"resolve-cwd": "3.0.0",
|
|
69
|
+
"rimraf": "4.1.0",
|
|
70
70
|
"semver": "7.3.5"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
@@ -139,5 +139,5 @@
|
|
|
139
139
|
"react",
|
|
140
140
|
"reactjs"
|
|
141
141
|
],
|
|
142
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "740a608ab05dd329c1fd8d329bab3b6d2bea3910"
|
|
143
143
|
}
|