@strapi/strapi 4.10.1-experimental.0 → 4.10.2-alpha.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.
- package/lib/commands/actions/{build → build-command}/command.js +1 -1
- package/lib/commands/actions/telemetry/enable/action.js +3 -3
- package/lib/commands/index.js +1 -1
- package/lib/core/loaders/apis.js +5 -0
- package/lib/utils/machine-id.js +2 -2
- package/package.json +16 -17
- package/coverage/clover.xml +0 -1613
- package/coverage/coverage-final.json +0 -48
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/commands/__tests__/data-transfer/shared/index.html +0 -116
- package/coverage/lcov-report/commands/__tests__/data-transfer/shared/transfer.test.utils.js.html +0 -133
- package/coverage/lcov-report/commands/admin-create.js.html +0 -424
- package/coverage/lcov-report/commands/admin-reset.js.html +0 -241
- package/coverage/lcov-report/commands/generate-template.js.html +0 -373
- package/coverage/lcov-report/commands/index.html +0 -146
- package/coverage/lcov-report/commands/transfer/export.js.html +0 -619
- package/coverage/lcov-report/commands/transfer/import.js.html +0 -562
- package/coverage/lcov-report/commands/transfer/index.html +0 -146
- package/coverage/lcov-report/commands/transfer/transfer.js.html +0 -532
- package/coverage/lcov-report/commands/utils/helpers.js.html +0 -430
- package/coverage/lcov-report/commands/utils/index.html +0 -116
- package/coverage/lcov-report/core/registries/custom-fields.js.html +0 -301
- package/coverage/lcov-report/core/registries/index.html +0 -116
- package/coverage/lcov-report/core-api/controller/collection-type.js.html +0 -418
- package/coverage/lcov-report/core-api/controller/index.html +0 -161
- package/coverage/lcov-report/core-api/controller/index.js.html +0 -220
- package/coverage/lcov-report/core-api/controller/single-type.js.html +0 -274
- package/coverage/lcov-report/core-api/controller/transform.js.html +0 -376
- package/coverage/lcov-report/core-api/service/collection-type.js.html +0 -325
- package/coverage/lcov-report/core-api/service/index.html +0 -161
- package/coverage/lcov-report/core-api/service/index.js.html +0 -220
- package/coverage/lcov-report/core-api/service/pagination.js.html +0 -460
- package/coverage/lcov-report/core-api/service/single-type.js.html +0 -301
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -386
- package/coverage/lcov-report/load/filepath-to-prop-path.js.html +0 -151
- package/coverage/lcov-report/load/index.html +0 -116
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/services/content-api/index.html +0 -116
- package/coverage/lcov-report/services/content-api/index.js.html +0 -307
- package/coverage/lcov-report/services/content-api/permissions/engine.js.html +0 -100
- package/coverage/lcov-report/services/content-api/permissions/index.html +0 -131
- package/coverage/lcov-report/services/content-api/permissions/index.js.html +0 -529
- package/coverage/lcov-report/services/content-api/permissions/providers/action.js.html +0 -142
- package/coverage/lcov-report/services/content-api/permissions/providers/condition.js.html +0 -142
- package/coverage/lcov-report/services/content-api/permissions/providers/index.html +0 -146
- package/coverage/lcov-report/services/content-api/permissions/providers/index.js.html +0 -112
- package/coverage/lcov-report/services/core-store.js.html +0 -520
- package/coverage/lcov-report/services/entity-service/attributes/index.html +0 -131
- package/coverage/lcov-report/services/entity-service/attributes/index.js.html +0 -178
- package/coverage/lcov-report/services/entity-service/attributes/transforms.js.html +0 -145
- package/coverage/lcov-report/services/entity-service/components.js.html +0 -1246
- package/coverage/lcov-report/services/entity-service/index.html +0 -146
- package/coverage/lcov-report/services/entity-service/index.js.html +0 -1120
- package/coverage/lcov-report/services/entity-service/params.js.html +0 -112
- package/coverage/lcov-report/services/entity-validator/__tests__/relations/utils/index.html +0 -116
- package/coverage/lcov-report/services/entity-validator/__tests__/relations/utils/relations.testdata.js.html +0 -544
- package/coverage/lcov-report/services/entity-validator/index.html +0 -131
- package/coverage/lcov-report/services/entity-validator/index.js.html +0 -1231
- package/coverage/lcov-report/services/entity-validator/validators.js.html +0 -733
- package/coverage/lcov-report/services/event-hub.js.html +0 -319
- package/coverage/lcov-report/services/fs.js.html +0 -259
- package/coverage/lcov-report/services/index.html +0 -161
- package/coverage/lcov-report/services/metrics/admin-user-hash.js.html +0 -148
- package/coverage/lcov-report/services/metrics/index.html +0 -206
- package/coverage/lcov-report/services/metrics/index.js.html +0 -265
- package/coverage/lcov-report/services/metrics/is-truthy.js.html +0 -112
- package/coverage/lcov-report/services/metrics/middleware.js.html +0 -184
- package/coverage/lcov-report/services/metrics/rate-limiter.js.html +0 -166
- package/coverage/lcov-report/services/metrics/sender.js.html +0 -394
- package/coverage/lcov-report/services/metrics/stringify-deep.js.html +0 -151
- package/coverage/lcov-report/services/utils/index.html +0 -116
- package/coverage/lcov-report/services/utils/upload-files.js.html +0 -322
- package/coverage/lcov-report/services/worker-queue.js.html +0 -262
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/utils/convert-custom-field-type.js.html +0 -151
- package/coverage/lcov-report/utils/index.html +0 -146
- package/coverage/lcov-report/utils/machine-id.js.html +0 -127
- package/coverage/lcov-report/utils/url-from-segments.js.html +0 -121
- package/lib/commands/__tests__/commands.test.js +0 -20
- package/lib/commands/__tests__/commands.test.utils.js +0 -16
- package/lib/commands/actions/admin/create-user/__tests__/admin.create-user.test.js +0 -450
- package/lib/commands/actions/admin/reset-user-password/__tests__/admin.reset-user-password.test.js +0 -145
- package/lib/commands/actions/export/__tests__/export.test.js +0 -175
- package/lib/commands/actions/import/__tests__/import.test.js +0 -143
- package/lib/commands/actions/templates/generate/__tests__/templates.generate.js +0 -118
- package/lib/commands/actions/transfer/__tests__/transfer.test.js +0 -178
- package/lib/core/registries/__tests__/custom-fields.test.js +0 -152
- package/lib/core-api/__tests__/controller.test.js +0 -39
- package/lib/core-api/controller/__tests__/transform.test.js +0 -226
- package/lib/core-api/service/__tests__/index.test.js +0 -127
- package/lib/core-api/service/__tests__/pagination.test.js +0 -275
- package/lib/load/__tests__/filepath-to-prop-path.test.js +0 -30
- package/lib/middlewares/__tests__/errors.test.js +0 -21
- package/lib/services/__tests__/content-api-permissions.test.js +0 -291
- package/lib/services/__tests__/core-store.test.js +0 -148
- package/lib/services/__tests__/event-hub.test.js +0 -126
- package/lib/services/__tests__/fs.test.js +0 -78
- package/lib/services/__tests__/worker-queue.test.js +0 -47
- package/lib/services/entity-service/__tests__/entity-service-events.test.js +0 -117
- package/lib/services/entity-service/__tests__/entity-service.test.js +0 -587
- package/lib/services/entity-validator/__tests__/biginteger-validators.test.js +0 -220
- package/lib/services/entity-validator/__tests__/date-validators.test.js +0 -183
- package/lib/services/entity-validator/__tests__/datetime-validators.test.js +0 -183
- package/lib/services/entity-validator/__tests__/email-validators.test.js +0 -56
- package/lib/services/entity-validator/__tests__/enumeration-validators.test.js +0 -43
- package/lib/services/entity-validator/__tests__/float-validators.test.js +0 -278
- package/lib/services/entity-validator/__tests__/index.test.js +0 -609
- package/lib/services/entity-validator/__tests__/integer-validators.test.js +0 -278
- package/lib/services/entity-validator/__tests__/relations/attribute-level.test.js +0 -123
- package/lib/services/entity-validator/__tests__/relations/component-level.test.js +0 -275
- package/lib/services/entity-validator/__tests__/relations/dynamic-zone-level.test.js +0 -159
- package/lib/services/entity-validator/__tests__/relations/media-level.test.js +0 -74
- package/lib/services/entity-validator/__tests__/relations/utils/relations.testdata.js +0 -153
- package/lib/services/entity-validator/__tests__/string-validators.test.js +0 -374
- package/lib/services/entity-validator/__tests__/time-validators.test.js +0 -183
- package/lib/services/entity-validator/__tests__/timestamp-validators.test.js +0 -204
- package/lib/services/entity-validator/__tests__/uid-validators.test.js +0 -229
- package/lib/services/metrics/__tests__/admin-user-hash.test.js +0 -41
- package/lib/services/metrics/__tests__/index.test.js +0 -157
- package/lib/services/metrics/__tests__/is-truthy.js +0 -33
- package/lib/services/metrics/__tests__/middleware.test.js +0 -60
- package/lib/services/metrics/__tests__/rate-limiter.test.js +0 -50
- package/lib/services/metrics/__tests__/stringify-deep.test.js +0 -27
- package/lib/utils/__tests__/convert-custom-field-type.test.js +0 -69
- package/lib/utils/__tests__/url-from-segments.test.js +0 -40
- /package/lib/commands/actions/{build → build-command}/action.js +0 -0
|
@@ -11,5 +11,5 @@ module.exports = ({ command }) => {
|
|
|
11
11
|
.command('build')
|
|
12
12
|
.option('--no-optimization', 'Build the admin app without optimizing assets')
|
|
13
13
|
.description('Build the strapi admin app')
|
|
14
|
-
.action(getLocalScript('build'));
|
|
14
|
+
.action(getLocalScript('build-command')); // build-command dir to avoid problems with 'build' being commonly ignored
|
|
15
15
|
};
|
|
@@ -4,7 +4,7 @@ const { resolve } = require('path');
|
|
|
4
4
|
const fse = require('fs-extra');
|
|
5
5
|
const chalk = require('chalk');
|
|
6
6
|
const fetch = require('node-fetch');
|
|
7
|
-
const {
|
|
7
|
+
const { randomUUID } = require('crypto');
|
|
8
8
|
const machineID = require('../../../../utils/machine-id');
|
|
9
9
|
|
|
10
10
|
const readPackageJSON = async (path) => {
|
|
@@ -36,7 +36,7 @@ const generateNewPackageJSON = (packageObj) => {
|
|
|
36
36
|
return {
|
|
37
37
|
...packageObj,
|
|
38
38
|
strapi: {
|
|
39
|
-
uuid:
|
|
39
|
+
uuid: randomUUID(),
|
|
40
40
|
telemetryDisabled: false,
|
|
41
41
|
},
|
|
42
42
|
};
|
|
@@ -45,7 +45,7 @@ const generateNewPackageJSON = (packageObj) => {
|
|
|
45
45
|
...packageObj,
|
|
46
46
|
strapi: {
|
|
47
47
|
...packageObj.strapi,
|
|
48
|
-
uuid: packageObj.strapi.uuid ? packageObj.strapi.uuid :
|
|
48
|
+
uuid: packageObj.strapi.uuid ? packageObj.strapi.uuid : randomUUID(),
|
|
49
49
|
telemetryDisabled: false,
|
|
50
50
|
},
|
|
51
51
|
};
|
package/lib/commands/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const { Command } = require('commander');
|
|
|
5
5
|
const strapiCommands = {
|
|
6
6
|
'admin/create-user': require('./actions/admin/create-user/command'),
|
|
7
7
|
'admin/reset-user-password': require('./actions/admin/reset-user-password/command'),
|
|
8
|
-
build: require('./actions/build/command'),
|
|
8
|
+
build: require('./actions/build-command/command'), // in 'build-command' to avoid problems with 'build' being commonly ignored
|
|
9
9
|
'configuration/dump': require('./actions/configuration/dump/command'),
|
|
10
10
|
'configuration/restore': require('./actions/configuration/restore/command'),
|
|
11
11
|
console: require('./actions/console/command'),
|
package/lib/core/loaders/apis.js
CHANGED
|
@@ -5,6 +5,7 @@ const { existsSync } = require('fs-extra');
|
|
|
5
5
|
const _ = require('lodash');
|
|
6
6
|
const fse = require('fs-extra');
|
|
7
7
|
const { isKebabCase, importDefault } = require('@strapi/utils');
|
|
8
|
+
const { isEmpty } = require('lodash/fp');
|
|
8
9
|
|
|
9
10
|
const DEFAULT_CONTENT_TYPE = {
|
|
10
11
|
schema: {},
|
|
@@ -115,6 +116,10 @@ const loadContentTypes = async (dir) => {
|
|
|
115
116
|
const contentTypeName = normalizeName(fd.name);
|
|
116
117
|
const contentType = await loadDir(join(dir, fd.name));
|
|
117
118
|
|
|
119
|
+
if (isEmpty(contentType) || isEmpty(contentType.schema)) {
|
|
120
|
+
throw new Error(`Could not load content type found at ${dir}`);
|
|
121
|
+
}
|
|
122
|
+
|
|
118
123
|
contentTypes[normalizeName(contentTypeName)] = _.defaults(contentType, DEFAULT_CONTENT_TYPE);
|
|
119
124
|
}
|
|
120
125
|
|
package/lib/utils/machine-id.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const { machineIdSync } = require('node-machine-id');
|
|
4
|
-
const {
|
|
4
|
+
const { randomUUID } = require('crypto');
|
|
5
5
|
|
|
6
6
|
module.exports = () => {
|
|
7
7
|
try {
|
|
8
8
|
const deviceId = machineIdSync();
|
|
9
9
|
return deviceId;
|
|
10
10
|
} catch (error) {
|
|
11
|
-
const deviceId =
|
|
11
|
+
const deviceId = randomUUID();
|
|
12
12
|
return deviceId;
|
|
13
13
|
}
|
|
14
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/strapi",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.2-alpha.0",
|
|
4
4
|
"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: MySQL, MariaDB, PostgreSQL, SQLite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -81,19 +81,19 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@koa/cors": "3.4.3",
|
|
83
83
|
"@koa/router": "10.1.1",
|
|
84
|
-
"@strapi/admin": "4.10.
|
|
85
|
-
"@strapi/data-transfer": "4.10.
|
|
86
|
-
"@strapi/database": "4.10.
|
|
87
|
-
"@strapi/generate-new": "4.10.
|
|
88
|
-
"@strapi/generators": "4.10.
|
|
89
|
-
"@strapi/logger": "4.10.
|
|
90
|
-
"@strapi/permissions": "4.10.
|
|
91
|
-
"@strapi/plugin-content-manager": "4.10.
|
|
92
|
-
"@strapi/plugin-content-type-builder": "4.10.
|
|
93
|
-
"@strapi/plugin-email": "4.10.
|
|
94
|
-
"@strapi/plugin-upload": "4.10.
|
|
95
|
-
"@strapi/typescript-utils": "4.10.
|
|
96
|
-
"@strapi/utils": "4.10.
|
|
84
|
+
"@strapi/admin": "4.10.2-alpha.0",
|
|
85
|
+
"@strapi/data-transfer": "4.10.2-alpha.0",
|
|
86
|
+
"@strapi/database": "4.10.2-alpha.0",
|
|
87
|
+
"@strapi/generate-new": "4.10.2-alpha.0",
|
|
88
|
+
"@strapi/generators": "4.10.2-alpha.0",
|
|
89
|
+
"@strapi/logger": "4.10.2-alpha.0",
|
|
90
|
+
"@strapi/permissions": "4.10.2-alpha.0",
|
|
91
|
+
"@strapi/plugin-content-manager": "4.10.2-alpha.0",
|
|
92
|
+
"@strapi/plugin-content-type-builder": "4.10.2-alpha.0",
|
|
93
|
+
"@strapi/plugin-email": "4.10.2-alpha.0",
|
|
94
|
+
"@strapi/plugin-upload": "4.10.2-alpha.0",
|
|
95
|
+
"@strapi/typescript-utils": "4.10.2-alpha.0",
|
|
96
|
+
"@strapi/utils": "4.10.2-alpha.0",
|
|
97
97
|
"bcryptjs": "2.4.3",
|
|
98
98
|
"boxen": "5.1.2",
|
|
99
99
|
"chalk": "4.1.2",
|
|
@@ -132,8 +132,7 @@
|
|
|
132
132
|
"qs": "6.11.1",
|
|
133
133
|
"resolve-cwd": "3.0.0",
|
|
134
134
|
"semver": "7.3.8",
|
|
135
|
-
"statuses": "2.0.1"
|
|
136
|
-
"uuid": "^8.3.2"
|
|
135
|
+
"statuses": "2.0.1"
|
|
137
136
|
},
|
|
138
137
|
"devDependencies": {
|
|
139
138
|
"supertest": "6.3.3",
|
|
@@ -143,5 +142,5 @@
|
|
|
143
142
|
"node": ">=14.19.1 <=18.x.x",
|
|
144
143
|
"npm": ">=6.0.0"
|
|
145
144
|
},
|
|
146
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "bb1b2273381c3deae0b5bb865e50e8382926bd8c"
|
|
147
146
|
}
|