@akemona-org/strapi 3.9.4 → 3.10.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/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-router');
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}/*`, serveAdmin);
95
+ strapi.router.get(`${strapi.config.admin.path}/(.*)`, serveAdmin);
96
96
  },
97
97
  };
98
98
  };
@@ -6,7 +6,7 @@
6
6
 
7
7
  // Public node modules.
8
8
  const _ = require('lodash');
9
- const Router = require('koa-router');
9
+ const Router = require('@koa/router');
10
10
  const createEndpointComposer = require('./utils/composeEndpoint');
11
11
  /**
12
12
  * Router hook
@@ -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('opn');
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
- var options = { app: browser };
97
- opn(url, options).catch(() => {}); // Prevent `unhandledRejection` error.
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.9.4",
6
+ "version": "3.10.1",
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.9.4",
19
- "@akemona-org/strapi-generate": "3.9.4",
20
- "@akemona-org/strapi-generate-api": "3.9.4",
21
- "@akemona-org/strapi-generate-controller": "3.9.4",
22
- "@akemona-org/strapi-generate-model": "3.9.4",
23
- "@akemona-org/strapi-generate-new": "3.9.4",
24
- "@akemona-org/strapi-generate-plugin": "3.9.4",
25
- "@akemona-org/strapi-generate-policy": "3.9.4",
26
- "@akemona-org/strapi-generate-service": "3.9.4",
27
- "@akemona-org/strapi-utils": "3.9.4",
28
- "@koa/cors": "^3.0.0",
18
+ "@akemona-org/strapi-database": "3.10.1",
19
+ "@akemona-org/strapi-generate": "3.10.1",
20
+ "@akemona-org/strapi-generate-api": "3.10.1",
21
+ "@akemona-org/strapi-generate-controller": "3.10.1",
22
+ "@akemona-org/strapi-generate-model": "3.10.1",
23
+ "@akemona-org/strapi-generate-new": "3.10.1",
24
+ "@akemona-org/strapi-generate-plugin": "3.10.1",
25
+ "@akemona-org/strapi-generate-policy": "3.10.1",
26
+ "@akemona-org/strapi-generate-service": "3.10.1",
27
+ "@akemona-org/strapi-utils": "3.10.1",
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": "8.2.0",
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": "^2.13.1",
48
- "koa-body": "^4.2.0",
49
- "koa-compose": "^4.1.0",
50
- "koa-compress": "^5.0.1",
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": "^2.0.0",
55
+ "koa-ip": "2.1.2",
55
56
  "koa-locale": "~1.3.0",
56
57
  "koa-lusca": "~2.2.0",
57
- "koa-router": "^7.4.0",
58
- "koa-session": "^6.2.0",
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
63
  "node-schedule": "1.3.2",
64
- "opn": "^5.3.0",
65
- "ora": "^5.4.0",
64
+ "open": "8.4.0",
65
+ "ora": "5.4.1",
66
66
  "package-json": "7.0.0",
67
- "qs": "^6.10.1",
68
- "resolve-cwd": "^3.0.0",
69
- "rimraf": "^3.0.2",
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": "ae83dbecdc21998aa56ed098a9a62d0010e0bcc4"
142
+ "gitHead": "4f785cebe25d4b310796cbdcdf58a738f7f4ede7"
143
143
  }