@akemona-org/strapi 3.7.1 → 3.7.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/bin/strapi.js
CHANGED
|
@@ -11,6 +11,8 @@ const program = new Command();
|
|
|
11
11
|
// eslint-disable-next-line import/extensions
|
|
12
12
|
const packageJSON = require('../package.json');
|
|
13
13
|
|
|
14
|
+
const strapiPackageName = '@akemona-org/strapi';
|
|
15
|
+
|
|
14
16
|
const checkCwdIsStrapiApp = (name) => {
|
|
15
17
|
let logErrorAndExit = () => {
|
|
16
18
|
console.log(
|
|
@@ -23,7 +25,7 @@ const checkCwdIsStrapiApp = (name) => {
|
|
|
23
25
|
|
|
24
26
|
try {
|
|
25
27
|
const pkgJSON = require(process.cwd() + '/package.json');
|
|
26
|
-
if (!_.has(pkgJSON,
|
|
28
|
+
if (!_.has(pkgJSON, `dependencies.${strapiPackageName}`)) {
|
|
27
29
|
logErrorAndExit(name);
|
|
28
30
|
}
|
|
29
31
|
} catch (err) {
|
|
@@ -36,7 +38,7 @@ const getLocalScript =
|
|
|
36
38
|
(...args) => {
|
|
37
39
|
checkCwdIsStrapiApp(name);
|
|
38
40
|
|
|
39
|
-
const cmdPath = resolveCwd.silent(
|
|
41
|
+
const cmdPath = resolveCwd.silent(`${strapiPackageName}/lib/commands/${name}`);
|
|
40
42
|
if (!cmdPath) {
|
|
41
43
|
console.log(
|
|
42
44
|
`Error loading the local ${yellow(
|
package/lib/commands/install.js
CHANGED
|
@@ -29,7 +29,7 @@ module.exports = async (plugins) => {
|
|
|
29
29
|
// check if rebuild is necessary
|
|
30
30
|
let shouldRebuild = false;
|
|
31
31
|
for (let name of plugins) {
|
|
32
|
-
let pkgPath = findPackagePath(
|
|
32
|
+
let pkgPath = findPackagePath(`@akemona-org/strapi-plugin-${name}`);
|
|
33
33
|
if (existsSync(join(pkgPath, 'admin', 'src', 'index.js'))) {
|
|
34
34
|
shouldRebuild = true;
|
|
35
35
|
}
|
|
@@ -27,7 +27,7 @@ module.exports = async (plugins, { deleteFiles }) => {
|
|
|
27
27
|
// verify should rebuild before removing the pacakge
|
|
28
28
|
let shouldRebuild = false;
|
|
29
29
|
for (let name of plugins) {
|
|
30
|
-
let pkgPath = findPackagePath(
|
|
30
|
+
let pkgPath = findPackagePath(`@akemona-org/strapi-plugin-${name}`);
|
|
31
31
|
if (existsSync(join(pkgPath, 'admin', 'src', 'index.js'))) {
|
|
32
32
|
shouldRebuild = true;
|
|
33
33
|
}
|
package/lib/core/load-admin.js
CHANGED
|
@@ -10,7 +10,7 @@ const mergeRoutes = (a, b, key) =>
|
|
|
10
10
|
_.isArray(a) && _.isArray(b) && key === 'routes' ? a.concat(b) : undefined;
|
|
11
11
|
|
|
12
12
|
module.exports = async (strapi) => {
|
|
13
|
-
const adminPath = findPackagePath('strapi-admin');
|
|
13
|
+
const adminPath = findPackagePath('@akemona-org/strapi-admin');
|
|
14
14
|
const [files, config] = await Promise.all([
|
|
15
15
|
loadFiles(adminPath, '!(config|node_modules|tests|ee|scripts)/*.*(js|json)'),
|
|
16
16
|
loadConfig(adminPath),
|
package/lib/core/load-hooks.js
CHANGED
|
@@ -43,14 +43,14 @@ const loadLocalHooks = (appPath, hooks) => loadHooksInDir(path.resolve(appPath,
|
|
|
43
43
|
|
|
44
44
|
const loadPluginsHooks = async (plugins, hooks) => {
|
|
45
45
|
for (let pluginName of plugins) {
|
|
46
|
-
const dir = path.resolve(findPackagePath(
|
|
46
|
+
const dir = path.resolve(findPackagePath(`@akemona-org/strapi-plugin-${pluginName}`), 'hooks');
|
|
47
47
|
await loadHooksInDir(dir, hooks);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
const loadAdminHooks = async (hooks) => {
|
|
52
52
|
const hooksDir = 'hooks';
|
|
53
|
-
const dir = path.resolve(findPackagePath('strapi-admin'), hooksDir);
|
|
53
|
+
const dir = path.resolve(findPackagePath('@akemona-org/strapi-admin'), hooksDir);
|
|
54
54
|
await loadHooksInDir(dir, hooks);
|
|
55
55
|
|
|
56
56
|
// load ee admin hooks if they exist
|
|
@@ -56,7 +56,10 @@ const createLoaders = (strapi) => {
|
|
|
56
56
|
|
|
57
57
|
const loadPluginsMiddlewares = async (plugins, middlewares) => {
|
|
58
58
|
for (let pluginName of plugins) {
|
|
59
|
-
const dir = path.resolve(
|
|
59
|
+
const dir = path.resolve(
|
|
60
|
+
findPackagePath(`@akemona-org/strapi-plugin-${pluginName}`),
|
|
61
|
+
'middlewares'
|
|
62
|
+
);
|
|
60
63
|
await loadMiddlewaresInDir(dir, middlewares);
|
|
61
64
|
}
|
|
62
65
|
};
|
|
@@ -79,7 +82,7 @@ const createLoaders = (strapi) => {
|
|
|
79
82
|
|
|
80
83
|
const loadAdminMiddlewares = async (middlewares) => {
|
|
81
84
|
const middlewaresDir = 'middlewares';
|
|
82
|
-
const dir = path.resolve(findPackagePath(
|
|
85
|
+
const dir = path.resolve(findPackagePath(`@akemona-org/strapi-admin`), middlewaresDir);
|
|
83
86
|
await loadMiddlewaresInDir(dir, middlewares);
|
|
84
87
|
|
|
85
88
|
// load ee admin middlewares if they exist
|
package/lib/core/load-plugins.js
CHANGED
|
@@ -48,7 +48,7 @@ const loadPlugins = async ({ installedPlugins, config }) => {
|
|
|
48
48
|
let plugins = {};
|
|
49
49
|
|
|
50
50
|
for (let plugin of installedPlugins) {
|
|
51
|
-
const pluginPath = findPackagePath(
|
|
51
|
+
const pluginPath = findPackagePath(`@akemona-org/strapi-plugin-${plugin}`);
|
|
52
52
|
|
|
53
53
|
const files = await loadFiles(
|
|
54
54
|
pluginPath,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.7.
|
|
6
|
+
"version": "3.7.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,16 +15,16 @@
|
|
|
15
15
|
"strapi": "./bin/strapi.js"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@akemona-org/strapi-database": "3.7.
|
|
19
|
-
"@akemona-org/strapi-generate": "3.7.
|
|
20
|
-
"@akemona-org/strapi-generate-api": "3.7.
|
|
21
|
-
"@akemona-org/strapi-generate-controller": "3.7.
|
|
22
|
-
"@akemona-org/strapi-generate-model": "3.7.
|
|
23
|
-
"@akemona-org/strapi-generate-new": "3.7.
|
|
24
|
-
"@akemona-org/strapi-generate-plugin": "3.7.
|
|
25
|
-
"@akemona-org/strapi-generate-policy": "3.7.
|
|
26
|
-
"@akemona-org/strapi-generate-service": "3.7.
|
|
27
|
-
"@akemona-org/strapi-utils": "3.7.
|
|
18
|
+
"@akemona-org/strapi-database": "3.7.2",
|
|
19
|
+
"@akemona-org/strapi-generate": "3.7.2",
|
|
20
|
+
"@akemona-org/strapi-generate-api": "3.7.2",
|
|
21
|
+
"@akemona-org/strapi-generate-controller": "3.7.2",
|
|
22
|
+
"@akemona-org/strapi-generate-model": "3.7.2",
|
|
23
|
+
"@akemona-org/strapi-generate-new": "3.7.2",
|
|
24
|
+
"@akemona-org/strapi-generate-plugin": "3.7.2",
|
|
25
|
+
"@akemona-org/strapi-generate-policy": "3.7.2",
|
|
26
|
+
"@akemona-org/strapi-generate-service": "3.7.2",
|
|
27
|
+
"@akemona-org/strapi-utils": "3.7.2",
|
|
28
28
|
"@koa/cors": "^3.0.0",
|
|
29
29
|
"async": "^2.1.2",
|
|
30
30
|
"boom": "^7.3.0",
|
|
@@ -139,5 +139,5 @@
|
|
|
139
139
|
"react",
|
|
140
140
|
"reactjs"
|
|
141
141
|
],
|
|
142
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "4ab59dbae5135819558c6ae27b45a556ff27cf55"
|
|
143
143
|
}
|