@akemona-org/strapi-admin 3.9.3 → 3.10.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.
Files changed (2) hide show
  1. package/index.js +16 -4
  2. package/package.json +5 -5
package/index.js CHANGED
@@ -103,14 +103,18 @@ window.strapi = Object.assign(window.strapi || {}, {
103
103
  module.exports = {
104
104
  ${plugins
105
105
  .map((name) => {
106
- const shortName = name.replace(/^@akemona-org\/strapi-plugin-/i, '');
106
+ const shortName = name.startsWith('@akemona-org')
107
+ ? name.replace(/^@akemona-org\/strapi-plugin-/i, '')
108
+ : name.replace(/^strapi-plugin-/i, '');
107
109
  const req = `require('../../plugins/${name}/admin/src').default`;
108
110
  return `'${shortName}': ${req},`;
109
111
  })
110
112
  .join('\n')}
111
113
  ${localPlugins
112
114
  .map((name) => {
113
- const shortName = name.replace(/^@akemona-org\/strapi-plugin-/i, '');
115
+ const shortName = name.startsWith('@akemona-org')
116
+ ? name.replace(/^@akemona-org\/strapi-plugin-/i, '')
117
+ : name.replace(/^strapi-plugin-/i, '');
114
118
  const req = `require('../../../plugins/${name}/admin/src').default`;
115
119
  return `'${shortName}': ${req}`;
116
120
  })
@@ -214,7 +218,9 @@ async function createCacheDir(dir) {
214
218
 
215
219
  // override plugins' admin code with user customizations
216
220
  const pluginsToOverride = pluginsToCopy.reduce((acc, current) => {
217
- const pluginName = current.replace(/^@akemona-org\/strapi-plugin-/i, '');
221
+ const pluginName = current.startsWith('@akemona-org')
222
+ ? current.replace(/^@akemona-org\/strapi-plugin-/i, '')
223
+ : current.replace(/^strapi-plugin-/i, '');
218
224
 
219
225
  if (fs.pathExistsSync(path.join(dir, 'extensions', pluginName, 'admin'))) {
220
226
  acc.push(pluginName);
@@ -289,7 +295,13 @@ async function watchFiles(dir, ignoreFiles = []) {
289
295
  fs.existsSync(path.resolve(getPkgPath(dep), 'admin', 'src', 'index.js'))
290
296
  );
291
297
  const pluginsToWatch = appPlugins.map((plugin) =>
292
- path.join(extensionsPath, plugin.replace(/^@akemona-org\/strapi-plugin-/i, ''), 'admin')
298
+ path.join(
299
+ extensionsPath,
300
+ plugin.startsWith('@akemona-org')
301
+ ? plugin.replace(/^@akemona-org\/strapi-plugin-/i, '')
302
+ : plugin.replace(/^strapi-plugin-/i, ''),
303
+ 'admin'
304
+ )
293
305
  );
294
306
  const filesToWatch = [admin, ...pluginsToWatch];
295
307
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.9.3",
6
+ "version": "3.10.0",
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.9.3",
21
- "@akemona-org/strapi-utils": "3.9.3",
20
+ "@akemona-org/strapi-helper-plugin": "3.10.0",
21
+ "@akemona-org/strapi-utils": "3.10.0",
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",
@@ -110,7 +110,7 @@
110
110
  "styled-components": "^5.2.3",
111
111
  "terser-webpack-plugin": "^1.2.3",
112
112
  "url-loader": "^1.1.2",
113
- "video-react": "^0.13.2",
113
+ "video-react": "^0.16.0",
114
114
  "webpack": "^4.46.0",
115
115
  "webpack-cli": "^3.3.12",
116
116
  "webpack-dev-server": "^3.11.2",
@@ -125,5 +125,5 @@
125
125
  "devDependencies": {
126
126
  "webpack-bundle-analyzer": "4.4.0"
127
127
  },
128
- "gitHead": "afdf855b757e253439d18fe71d44de31b4cc80ea"
128
+ "gitHead": "b663a2f33f441789c19223a91f8bec06e1be50d4"
129
129
  }