@akemona-org/strapi-admin 3.7.5 → 3.7.7-next.1
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/README.md +1 -1
- package/admin/src/components/LeftMenu/LeftMenuFooter/index.js +1 -1
- package/admin/src/containers/Admin/index.js +2 -2
- package/admin/src/containers/ApplicationInfosPage/index.js +1 -1
- package/admin/src/containers/HomePage/index.js +1 -1
- package/admin/src/containers/MarketplacePage/PluginCard/index.js +1 -1
- package/index.js +9 -10
- package/package.json +4 -4
- package/webpack.config.js +5 -5
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ We’ve decided it’ll soon be time to end the support for `strapi-admin`.
|
|
|
10
10
|
|
|
11
11
|
After years of iterations, Strapi is going to V4 and we won’t maintain V3 packages when it’ll reach its end-of-support milestone (~end of Q3 2022).
|
|
12
12
|
|
|
13
|
-
If you’ve been using `strapi-admin` and have migrated to V4 (or if you want to), you can find the equivalent and updated version of this package at this [URL](https://github.com/
|
|
13
|
+
If you’ve been using `strapi-admin` and have migrated to V4 (or if you want to), you can find the equivalent and updated version of this package at this [URL](https://github.com/akemona/strapi/tree/master/packages/core/admin) and with the following name on NPM: `@strapi/admin`.
|
|
14
14
|
|
|
15
15
|
If you’ve contributed to the development of this package, thank you again for that! We hope to see you on the V4 soon.
|
|
16
16
|
|
|
@@ -26,7 +26,7 @@ function LeftMenuFooter({ version }) {
|
|
|
26
26
|
</A>
|
|
27
27
|
|
|
28
28
|
<A
|
|
29
|
-
href={`https://github.com/
|
|
29
|
+
href={`https://github.com/akemona/strapi/releases/tag/v${version}`}
|
|
30
30
|
key="github"
|
|
31
31
|
target="_blank"
|
|
32
32
|
rel="noopener noreferrer"
|
|
@@ -128,7 +128,7 @@ export class Admin extends React.Component {
|
|
|
128
128
|
try {
|
|
129
129
|
const {
|
|
130
130
|
data: { tag_name },
|
|
131
|
-
} = await axios.get('https://api.github.com/repos/
|
|
131
|
+
} = await axios.get('https://api.github.com/repos/akemona/strapi/releases/latest');
|
|
132
132
|
const shouldUpdateStrapi = checkLatestStrapiVersion(strapiVersion, tag_name);
|
|
133
133
|
|
|
134
134
|
getStrapiLatestReleaseSucceeded(tag_name, shouldUpdateStrapi);
|
|
@@ -144,7 +144,7 @@ export class Admin extends React.Component {
|
|
|
144
144
|
type: 'info',
|
|
145
145
|
message: { id: 'notification.version.update.message' },
|
|
146
146
|
link: {
|
|
147
|
-
url: `https://github.com/
|
|
147
|
+
url: `https://github.com/akemona/strapi/releases/tag/${tag_name}`,
|
|
148
148
|
label: {
|
|
149
149
|
id: 'notification.version.update.link',
|
|
150
150
|
},
|
|
@@ -47,7 +47,7 @@ const ApplicationInfosPage = () => {
|
|
|
47
47
|
const upgradeLink = shouldUpdateStrapi
|
|
48
48
|
? {
|
|
49
49
|
label: upgradeLabel,
|
|
50
|
-
href: `https://github.com/
|
|
50
|
+
href: `https://github.com/akemona/strapi/releases/tag/${latestStrapiReleaseTag}`,
|
|
51
51
|
}
|
|
52
52
|
: null;
|
|
53
53
|
/* eslint-enable indent */
|
|
@@ -100,7 +100,7 @@ class PluginCard extends React.Component {
|
|
|
100
100
|
<div
|
|
101
101
|
onClick={(e) => {
|
|
102
102
|
window.open(
|
|
103
|
-
`https://github.com/
|
|
103
|
+
`https://github.com/akemona/strapi/tree/master/packages/strapi-plugin-${this.props.plugin.id}`,
|
|
104
104
|
'_blank'
|
|
105
105
|
);
|
|
106
106
|
}}
|
package/index.js
CHANGED
|
@@ -7,8 +7,6 @@ const webpack = require('webpack');
|
|
|
7
7
|
const WebpackDevServer = require('webpack-dev-server');
|
|
8
8
|
const chalk = require('chalk');
|
|
9
9
|
const chokidar = require('chokidar');
|
|
10
|
-
// eslint-disable-next-line node/no-extraneous-require
|
|
11
|
-
const hasEE = false;
|
|
12
10
|
const getWebpackConfig = require('./webpack.config');
|
|
13
11
|
|
|
14
12
|
const getPkgPath = (name) => path.dirname(require.resolve(`${name}/package.json`));
|
|
@@ -16,7 +14,7 @@ const getPkgPath = (name) => path.dirname(require.resolve(`${name}/package.json`
|
|
|
16
14
|
function getCustomWebpackConfig(dir, config) {
|
|
17
15
|
const adminConfigPath = path.join(dir, 'admin', 'admin.config.js');
|
|
18
16
|
|
|
19
|
-
let webpackConfig = getWebpackConfig({ useEE: hasEE({ dir }), ...config });
|
|
17
|
+
let webpackConfig = getWebpackConfig({ useEE: /* hasEE({ dir }) */ false, ...config });
|
|
20
18
|
|
|
21
19
|
if (fs.existsSync(adminConfigPath)) {
|
|
22
20
|
const adminConfig = require(path.resolve(adminConfigPath));
|
|
@@ -105,14 +103,14 @@ window.strapi = Object.assign(window.strapi || {}, {
|
|
|
105
103
|
module.exports = {
|
|
106
104
|
${plugins
|
|
107
105
|
.map((name) => {
|
|
108
|
-
const shortName = name.replace(
|
|
106
|
+
const shortName = name.replace(/^@akemona-org\/strapi-plugin-/i, '');
|
|
109
107
|
const req = `require('../../plugins/${name}/admin/src').default`;
|
|
110
108
|
return `'${shortName}': ${req},`;
|
|
111
109
|
})
|
|
112
110
|
.join('\n')}
|
|
113
111
|
${localPlugins
|
|
114
112
|
.map((name) => {
|
|
115
|
-
const shortName = name.replace(
|
|
113
|
+
const shortName = name.replace(/^@akemona-org\/strapi-plugin-/i, '');
|
|
116
114
|
const req = `require('../../../plugins/${name}/admin/src').default`;
|
|
117
115
|
return `'${shortName}': ${req}`;
|
|
118
116
|
})
|
|
@@ -157,7 +155,8 @@ async function copyAdmin(dest) {
|
|
|
157
155
|
const adminPath = getPkgPath('@akemona-org/strapi-admin');
|
|
158
156
|
|
|
159
157
|
// TODO copy ee folders for plugins
|
|
160
|
-
|
|
158
|
+
// disable ee copy
|
|
159
|
+
// await fs.copy(path.resolve(adminPath, 'ee', 'admin'), path.resolve(dest, 'ee', 'admin'));
|
|
161
160
|
|
|
162
161
|
await fs.ensureDir(path.resolve(dest, 'config'));
|
|
163
162
|
await fs.copy(path.resolve(adminPath, 'admin'), path.resolve(dest, 'admin'));
|
|
@@ -181,7 +180,7 @@ async function createCacheDir(dir) {
|
|
|
181
180
|
|
|
182
181
|
const pluginsToCopy = Object.keys(pkgJSON.dependencies).filter(
|
|
183
182
|
(dep) =>
|
|
184
|
-
dep.startsWith('strapi-plugin') &&
|
|
183
|
+
dep.startsWith('@akemona-org/strapi-plugin') &&
|
|
185
184
|
fs.existsSync(path.resolve(getPkgPath(dep), 'admin', 'src', 'index.js'))
|
|
186
185
|
);
|
|
187
186
|
|
|
@@ -215,7 +214,7 @@ async function createCacheDir(dir) {
|
|
|
215
214
|
|
|
216
215
|
// override plugins' admin code with user customizations
|
|
217
216
|
const pluginsToOverride = pluginsToCopy.reduce((acc, current) => {
|
|
218
|
-
const pluginName = current.replace(
|
|
217
|
+
const pluginName = current.replace(/^@akemona-org\/strapi-plugin-/i, '');
|
|
219
218
|
|
|
220
219
|
if (fs.pathExistsSync(path.join(dir, 'extensions', pluginName, 'admin'))) {
|
|
221
220
|
acc.push(pluginName);
|
|
@@ -286,11 +285,11 @@ async function watchFiles(dir, ignoreFiles = []) {
|
|
|
286
285
|
|
|
287
286
|
const appPlugins = Object.keys(pkgJSON.dependencies).filter(
|
|
288
287
|
(dep) =>
|
|
289
|
-
dep.startsWith('strapi-plugin') &&
|
|
288
|
+
dep.startsWith('@akemona-org/strapi-plugin') &&
|
|
290
289
|
fs.existsSync(path.resolve(getPkgPath(dep), 'admin', 'src', 'index.js'))
|
|
291
290
|
);
|
|
292
291
|
const pluginsToWatch = appPlugins.map((plugin) =>
|
|
293
|
-
path.join(extensionsPath, plugin.replace(
|
|
292
|
+
path.join(extensionsPath, plugin.replace(/^@akemona-org\/strapi-plugin-/i, ''), 'admin')
|
|
294
293
|
);
|
|
295
294
|
const filesToWatch = [admin, ...pluginsToWatch];
|
|
296
295
|
|
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.7-next.1",
|
|
7
7
|
"description": "Strapi Admin",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@akemona-org/strapi-helper-plugin": "3.7.
|
|
21
|
-
"@akemona-org/strapi-utils": "3.7.
|
|
20
|
+
"@akemona-org/strapi-helper-plugin": "3.7.7-next.1",
|
|
21
|
+
"@akemona-org/strapi-utils": "3.7.7-next.1",
|
|
22
22
|
"@babel/core": "^7.14.0",
|
|
23
23
|
"@babel/plugin-proposal-async-generator-functions": "^7.13.15",
|
|
24
24
|
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"webpack-bundle-analyzer": "4.4.0"
|
|
127
127
|
},
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "acb6c1ab4f30dcc63fe40e36f5c7eb8c26ff0f13"
|
|
129
129
|
}
|
package/webpack.config.js
CHANGED
|
@@ -189,7 +189,7 @@ module.exports = ({
|
|
|
189
189
|
MODE: JSON.stringify(URLs.mode), // Allow us to define the public path for the plugins assets.
|
|
190
190
|
PUBLIC_PATH: JSON.stringify(options.publicPath),
|
|
191
191
|
PROJECT_TYPE: JSON.stringify(useEE ? 'Enterprise' : 'Community'),
|
|
192
|
-
ENABLED_EE_FEATURES: JSON.stringify(options.features),
|
|
192
|
+
ENABLED_EE_FEATURES: JSON.stringify(/* options.features */ []),
|
|
193
193
|
}),
|
|
194
194
|
new webpack.NormalModuleReplacementPlugin(/ee_else_ce(\.*)/, function (resource) {
|
|
195
195
|
let wantedPath = path.join(
|
|
@@ -197,14 +197,14 @@ module.exports = ({
|
|
|
197
197
|
'src'
|
|
198
198
|
);
|
|
199
199
|
|
|
200
|
-
if (useEE) {
|
|
200
|
+
/* if (useEE) {
|
|
201
201
|
resource.request = resource.request.replace(
|
|
202
202
|
/ee_else_ce/,
|
|
203
203
|
path.join(wantedPath, '../..', 'ee/admin')
|
|
204
204
|
);
|
|
205
|
-
} else {
|
|
206
|
-
|
|
207
|
-
}
|
|
205
|
+
} else { */
|
|
206
|
+
resource.request = resource.request.replace(/ee_else_ce/, path.join(wantedPath));
|
|
207
|
+
/* } */
|
|
208
208
|
}),
|
|
209
209
|
...webpackPlugins,
|
|
210
210
|
],
|