mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Revert "merge main"
This reverts commit 5dc28ed5e5ead9b83b8bb30f96efc6eb6f1d3e3f.
This commit is contained in:
parent
5dc28ed5e5
commit
1a289ca1ff
@ -26,16 +26,14 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
'prefer-destructuring': ['error', { AssignmentExpression: { array: false } }],
|
||||
'no-underscore-dangle': 'off',
|
||||
'no-use-before-define': 'off',
|
||||
eqeqeq: 'warn',
|
||||
'no-underscore-dangle': 'warn',
|
||||
'no-use-before-define': 'warn',
|
||||
'no-param-reassign': 'warn',
|
||||
'no-continue': 'warn',
|
||||
'no-process-exit': 'off',
|
||||
'no-loop-func': 'off',
|
||||
'no-param-reassign': [
|
||||
'error',
|
||||
{
|
||||
props: false,
|
||||
},
|
||||
],
|
||||
'no-plusplus': 'warn',
|
||||
'no-loop-func': 'warn',
|
||||
'guard-for-in': 'warn',
|
||||
},
|
||||
};
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
2
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
@ -20,7 +20,7 @@ https://github.com/strapi/strapi/blob/main/CONTRIBUTING.md#reporting-an-issue
|
||||
|
||||
### Required System information
|
||||
|
||||
<!-- Please ensure you are using the Node LTS version (v14 or v16 or v18) -->
|
||||
<!-- Please ensure you are using the Node LTS version (v14 or v16) -->
|
||||
<!-- Strapi v3 is not supported unless it is a critical/high security issue -->
|
||||
|
||||
- Node.js version:
|
||||
|
||||
2
.github/actions/check-pr-status/package.json
vendored
2
.github/actions/check-pr-status/package.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "check-pr-status",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"main": "dist/index.js",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
|
||||
20
.github/workflows/tests.yml
vendored
20
.github/workflows/tests.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
@ -38,7 +38,7 @@ jobs:
|
||||
CODECOV_TOKEN: ${{ secrets.codecov }}
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
@ -59,7 +59,7 @@ jobs:
|
||||
CODECOV_TOKEN: ${{ secrets.codecov }}
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
@ -80,7 +80,7 @@ jobs:
|
||||
name: '[CE] E2E (postgres, node: ${{ matrix.node }})'
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
services:
|
||||
postgres:
|
||||
# Docker Hub image
|
||||
@ -116,7 +116,7 @@ jobs:
|
||||
name: '[CE] E2E (mysql, node: ${{ matrix.node }})'
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
services:
|
||||
mysql:
|
||||
image: mysql
|
||||
@ -151,7 +151,7 @@ jobs:
|
||||
name: '[CE] E2E (mysql:5 , node: ${{ matrix.node }})'
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5
|
||||
@ -186,7 +186,7 @@ jobs:
|
||||
name: '[CE] E2E (sqlite: ${{ matrix.sqlite_pkg }}, node: ${{ matrix.node }})'
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
sqlite_pkg: ['better-sqlite3', 'sqlite3', '@vscode/sqlite3']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -210,7 +210,7 @@ jobs:
|
||||
STRAPI_LICENSE: ${{ secrets.strapiLicense }}
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
services:
|
||||
postgres:
|
||||
# Docker Hub image
|
||||
@ -250,7 +250,7 @@ jobs:
|
||||
STRAPI_LICENSE: ${{ secrets.strapiLicense }}
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
services:
|
||||
mysql:
|
||||
image: mysql
|
||||
@ -289,7 +289,7 @@ jobs:
|
||||
STRAPI_LICENSE: ${{ secrets.strapiLicense }}
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14, 16, 18]
|
||||
node: [14, 16]
|
||||
sqlite_pkg: ['better-sqlite3', 'sqlite3', '@vscode/sqlite3']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@ -46,7 +46,7 @@ The Strapi core team will review your pull request and either merge it, request
|
||||
|
||||
## Contribution Prerequisites
|
||||
|
||||
- You have [Node.js](https://nodejs.org/en/) at version >= v14 and <= v18 and [Yarn](https://yarnpkg.com/en/) at v1.2.0+ installed.
|
||||
- You have [Node.js](https://nodejs.org/en/) at version >= v14 and <= v16 and [Yarn](https://yarnpkg.com/en/) at v1.2.0+ installed.
|
||||
- You are familiar with [Git](https://git-scm.com).
|
||||
|
||||
**Before submitting your pull request** make sure the following requirements are fulfilled:
|
||||
|
||||
@ -86,7 +86,7 @@ Complete installation requirements can be found in the documentation under <a hr
|
||||
|
||||
**Node:**
|
||||
|
||||
- NodeJS >= 14 <= 18
|
||||
- NodeJS >= 14 <= 16
|
||||
- NPM >= 6.x
|
||||
|
||||
**Database:**
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "getstarted",
|
||||
"private": true,
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "A Strapi application.",
|
||||
"scripts": {
|
||||
"develop": "strapi develop",
|
||||
@ -12,15 +12,15 @@
|
||||
"strapi": "strapi"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/plugin-documentation": "4.3.8",
|
||||
"@strapi/plugin-graphql": "4.3.8",
|
||||
"@strapi/plugin-i18n": "4.3.8",
|
||||
"@strapi/plugin-sentry": "4.3.8",
|
||||
"@strapi/plugin-users-permissions": "4.3.8",
|
||||
"@strapi/provider-email-mailgun": "4.3.8",
|
||||
"@strapi/provider-upload-aws-s3": "4.3.8",
|
||||
"@strapi/provider-upload-cloudinary": "4.3.8",
|
||||
"@strapi/strapi": "4.3.8",
|
||||
"@strapi/plugin-documentation": "4.3.6",
|
||||
"@strapi/plugin-graphql": "4.3.6",
|
||||
"@strapi/plugin-i18n": "4.3.6",
|
||||
"@strapi/plugin-sentry": "4.3.6",
|
||||
"@strapi/plugin-users-permissions": "4.3.6",
|
||||
"@strapi/provider-email-mailgun": "4.3.6",
|
||||
"@strapi/provider-upload-aws-s3": "4.3.6",
|
||||
"@strapi/provider-upload-cloudinary": "4.3.6",
|
||||
"@strapi/strapi": "4.3.6",
|
||||
"@vscode/sqlite3": "5.0.8",
|
||||
"better-sqlite3": "7.4.6",
|
||||
"lodash": "4.17.21",
|
||||
@ -33,7 +33,7 @@
|
||||
"uuid": "getstarted"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"license": "SEE LICENSE IN LICENSE"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "kitchensink-ts",
|
||||
"private": true,
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "A Strapi application",
|
||||
"scripts": {
|
||||
"develop": "strapi develop",
|
||||
@ -10,9 +10,9 @@
|
||||
"strapi": "strapi"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/plugin-i18n": "4.3.8",
|
||||
"@strapi/plugin-users-permissions": "4.3.8",
|
||||
"@strapi/strapi": "4.3.8",
|
||||
"@strapi/plugin-i18n": "4.3.6",
|
||||
"@strapi/plugin-users-permissions": "4.3.6",
|
||||
"@strapi/strapi": "4.3.6",
|
||||
"better-sqlite3": "7.4.6"
|
||||
},
|
||||
"author": {
|
||||
@ -22,7 +22,7 @@
|
||||
"uuid": "getstarted"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "kitchensink",
|
||||
"private": true,
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "A Strapi application.",
|
||||
"scripts": {
|
||||
"develop": "strapi develop",
|
||||
@ -12,10 +12,10 @@
|
||||
"strapi": "strapi"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/provider-email-mailgun": "4.3.8",
|
||||
"@strapi/provider-upload-aws-s3": "4.3.8",
|
||||
"@strapi/provider-upload-cloudinary": "4.3.8",
|
||||
"@strapi/strapi": "4.3.8",
|
||||
"@strapi/provider-email-mailgun": "4.3.6",
|
||||
"@strapi/provider-upload-aws-s3": "4.3.6",
|
||||
"@strapi/provider-upload-cloudinary": "4.3.6",
|
||||
"@strapi/strapi": "4.3.6",
|
||||
"lodash": "4.17.21",
|
||||
"mysql": "2.18.1",
|
||||
"passport-google-oauth2": "0.2.0",
|
||||
@ -26,7 +26,7 @@
|
||||
"uuid": "getstarted"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"license": "SEE LICENSE IN LICENSE"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"packages": [
|
||||
"packages/*",
|
||||
"examples/*"
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
"yargs": "13.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/admin-test-utils",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"private": true,
|
||||
"description": "Test utilities for the Strapi administration panel",
|
||||
"license": "MIT",
|
||||
@ -33,6 +33,6 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x"
|
||||
"node": ">=14.19.1 <=16.x.x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "create-strapi-app",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Generate a new Strapi application.",
|
||||
"keywords": [
|
||||
"create-strapi-app",
|
||||
@ -38,12 +38,12 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/generate-new": "4.3.8",
|
||||
"@strapi/generate-new": "4.3.6",
|
||||
"commander": "6.1.0",
|
||||
"inquirer": "8.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "create-strapi-starter",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Generate a new Strapi application.",
|
||||
"keywords": [
|
||||
"create-strapi-starter",
|
||||
@ -38,7 +38,7 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/generate-new": "4.3.8",
|
||||
"@strapi/generate-new": "4.3.6",
|
||||
"chalk": "4.1.1",
|
||||
"ci-info": "3.3.2",
|
||||
"commander": "7.1.0",
|
||||
@ -48,7 +48,7 @@
|
||||
"ora": "5.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,10 +174,6 @@ const ApiTokenCreateView = () => {
|
||||
} = isCreating
|
||||
? await axiosInstance.post(`/admin/api-tokens`, {
|
||||
...body,
|
||||
lifespan:
|
||||
body.lifespan && parseInt(body.lifespan, 10)
|
||||
? parseInt(body.lifespan, 10)
|
||||
: body.lifespan,
|
||||
permissions: tokenType === 'custom' ? state.selectedActions : null,
|
||||
})
|
||||
: await axiosInstance.put(`/admin/api-tokens/${id}`, {
|
||||
@ -341,7 +337,7 @@ const ApiTokenCreateView = () => {
|
||||
name: apiToken?.name || '',
|
||||
description: apiToken?.description || '',
|
||||
type: apiToken?.type,
|
||||
lifespan: apiToken?.lifespan ? apiToken.lifespan.toString() : apiToken?.lifespan,
|
||||
lifespan: apiToken?.lifespan,
|
||||
}}
|
||||
enableReinitialize
|
||||
onSubmit={(body, actions) => handleSubmit(body, actions, tokenTypeValue)}
|
||||
@ -486,19 +482,19 @@ const ApiTokenCreateView = () => {
|
||||
disabled={!isCreating}
|
||||
placeholder="Select"
|
||||
>
|
||||
<Option value="604800000">
|
||||
<Option value={604800000}>
|
||||
{formatMessage({
|
||||
id: 'Settings.apiTokens.duration.7-days',
|
||||
defaultMessage: '7 days',
|
||||
})}
|
||||
</Option>
|
||||
<Option value="2592000000">
|
||||
<Option value={2592000000}>
|
||||
{formatMessage({
|
||||
id: 'Settings.apiTokens.duration.30-days',
|
||||
defaultMessage: '30 days',
|
||||
})}
|
||||
</Option>
|
||||
<Option value="7776000000">
|
||||
<Option value={2592000000}>
|
||||
{formatMessage({
|
||||
id: 'Settings.apiTokens.duration.90-days',
|
||||
defaultMessage: '90 days',
|
||||
@ -518,7 +514,7 @@ const ApiTokenCreateView = () => {
|
||||
defaultMessage: 'Expiration date',
|
||||
})}: ${getDateOfExpiration(
|
||||
apiToken?.createdAt,
|
||||
parseInt(values.lifespan, 10),
|
||||
values.lifespan,
|
||||
lang
|
||||
)}`}
|
||||
</Typography>
|
||||
|
||||
@ -8,7 +8,7 @@ const schema = yup.object().shape({
|
||||
.oneOf(['read-only', 'full-access', 'custom'])
|
||||
.required(translatedErrors.required),
|
||||
description: yup.string().nullable(),
|
||||
lifespan: yup.number().integer().min(1).nullable().defined(translatedErrors.required),
|
||||
lifespan: yup.number().integer().min(1).nullable(),
|
||||
});
|
||||
|
||||
export default schema;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/admin",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Strapi Admin",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -51,12 +51,13 @@
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "0.5.7",
|
||||
"@strapi/babel-plugin-switch-ee-ce": "4.3.8",
|
||||
"@strapi/babel-plugin-switch-ee-ce": "4.3.6",
|
||||
"@strapi/design-system": "1.2.2",
|
||||
"@strapi/helper-plugin": "4.3.8",
|
||||
"@strapi/helper-plugin": "4.3.6",
|
||||
"@strapi/icons": "1.2.2",
|
||||
"@strapi/typescript-utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/typescript-utils": "4.3.6",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"@strapi/permissions": "4.3.6",
|
||||
"axios": "0.27.2",
|
||||
"babel-loader": "8.2.5",
|
||||
"babel-plugin-styled-components": "2.0.2",
|
||||
@ -151,7 +152,7 @@
|
||||
"@strapi/strapi": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"nx": {
|
||||
|
||||
@ -80,10 +80,12 @@ const buildAdmin = async () => {
|
||||
new Error(
|
||||
messages.errors.reduce((acc, error) => {
|
||||
if (isObject(error)) {
|
||||
return acc + error.message;
|
||||
acc += error.message;
|
||||
} else {
|
||||
acc += error.join('\n\n');
|
||||
}
|
||||
|
||||
return acc + error.join('\n\n');
|
||||
return acc;
|
||||
}, '')
|
||||
)
|
||||
);
|
||||
|
||||
@ -426,11 +426,7 @@ describe('Role', () => {
|
||||
|
||||
const count = jest.fn(() => Promise.resolve(0));
|
||||
let id = 1;
|
||||
const create = jest.fn(({ data }) => {
|
||||
const res = { ...data, id };
|
||||
id += 1;
|
||||
return res;
|
||||
});
|
||||
const create = jest.fn(({ data }) => ({ ...data, id: id++ }));
|
||||
const values = jest.fn(() => actions);
|
||||
const createMany = jest.fn();
|
||||
const assignARoleToAll = jest.fn();
|
||||
|
||||
@ -49,10 +49,9 @@ const unwrapDeep = (obj) => {
|
||||
|
||||
if (_.isPlainObject(v)) {
|
||||
if ('$elemMatch' in v) {
|
||||
_.setWith(acc, key, unwrapDeep(v.$elemMatch));
|
||||
} else {
|
||||
_.setWith(acc, key, unwrapDeep(v));
|
||||
v = v.$elemMatch; // removing this key
|
||||
}
|
||||
_.setWith(acc, key, unwrapDeep(v));
|
||||
} else if (_.isArray(v)) {
|
||||
// prettier-ignore
|
||||
_.setWith(acc, key, v.map(v => unwrapDeep(v)));
|
||||
|
||||
@ -144,7 +144,7 @@ const cleanPermissionsInDatabase = async () => {
|
||||
const total = await strapi.query('admin::permission').count();
|
||||
const pageCount = Math.ceil(total / pageSize);
|
||||
|
||||
for (let page = 0; page < pageCount; page += 1) {
|
||||
for (let page = 0; page < pageCount; page++) {
|
||||
// 1. Find invalid permissions and collect their ID to delete them later
|
||||
const results = await strapi
|
||||
.query('admin::permission')
|
||||
|
||||
@ -84,7 +84,7 @@ if (edition === 'EE') {
|
||||
// Create users with the new role & create associated auth requests
|
||||
const users = [];
|
||||
|
||||
for (let i = 0; i < localTestData.users.length; i += 1) {
|
||||
for (let i = 0; i < localTestData.users.length; ++i) {
|
||||
const userFixture = localTestData.users[i];
|
||||
const userAttributes = {
|
||||
...userFixture,
|
||||
|
||||
@ -145,7 +145,7 @@ describe('Admin User CRUD (e2e)', () => {
|
||||
};
|
||||
};
|
||||
|
||||
for (let i = 0; i < 3; i += 1) {
|
||||
for (let i = 0; i < 3; i++) {
|
||||
const res = await rq({
|
||||
url: '/admin/users',
|
||||
method: 'POST',
|
||||
|
||||
@ -12,7 +12,7 @@ const checkFieldsAreCorrectlyNested = (fields) => {
|
||||
}
|
||||
|
||||
let failed = false;
|
||||
for (let indexA = 0; indexA < fields.length; indexA += 1) {
|
||||
for (let indexA = 0; indexA < fields.length; indexA++) {
|
||||
failed = fields
|
||||
.slice(indexA + 1)
|
||||
.some(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-content-manager",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "A powerful UI to easily manage your data.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -24,11 +24,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sindresorhus/slugify": "1.1.0",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -69,7 +69,7 @@ module.exports = ({ strapi }) => ({
|
||||
});
|
||||
};
|
||||
|
||||
for (const key of Object.keys(model.attributes)) {
|
||||
for (const key in model.attributes) {
|
||||
const attribute = model.attributes[key];
|
||||
|
||||
if (attribute.type === 'component') {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-content-type-builder",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Strapi plugin to create content type",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -28,9 +28,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sindresorhus/slugify": "1.1.0",
|
||||
"@strapi/generators": "4.3.8",
|
||||
"@strapi/helper-plugin": "4.3.8",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/generators": "4.3.6",
|
||||
"@strapi/helper-plugin": "4.3.6",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"fs-extra": "10.0.0",
|
||||
"lodash": "4.17.21",
|
||||
"pluralize": "^8.0.0",
|
||||
@ -48,7 +48,7 @@
|
||||
"@testing-library/react": "12.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -130,7 +130,7 @@ module.exports = function createSchemaHandler(infos) {
|
||||
}
|
||||
|
||||
// set new Attributes
|
||||
for (const key of Object.keys(newAttributes)) {
|
||||
for (const key in newAttributes) {
|
||||
this.setAttribute(key, newAttributes[key]);
|
||||
}
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ describe('Content Type Builder - Content types', () => {
|
||||
const { uid } = createRes.body.data;
|
||||
|
||||
// create data
|
||||
for (let i = 0; i < 2; i += 1) {
|
||||
for (let i = 0; i < 2; i++) {
|
||||
await strapi.query(uid).create({ data: { title: 'Test' } });
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ const processData = (metadata, data = {}, { withDefaults = false } = {}) => {
|
||||
|
||||
const obj = {};
|
||||
|
||||
for (const attributeName of Object.keys(attributes)) {
|
||||
for (const attributeName in attributes) {
|
||||
const attribute = attributes[attributeName];
|
||||
|
||||
if (types.isScalar(attribute.type)) {
|
||||
@ -333,7 +333,7 @@ const createEntityManager = (db) => {
|
||||
async attachRelations(uid, id, data) {
|
||||
const { attributes } = db.metadata.get(uid);
|
||||
|
||||
for (const attributeName of Object.keys(attributes)) {
|
||||
for (const attributeName in attributes) {
|
||||
const attribute = attributes[attributeName];
|
||||
|
||||
const isValidLink = _.has(attributeName, data) && !_.isNil(data[attributeName]);
|
||||
@ -487,7 +487,7 @@ const createEntityManager = (db) => {
|
||||
async updateRelations(uid, id, data) {
|
||||
const { attributes } = db.metadata.get(uid);
|
||||
|
||||
for (const attributeName of Object.keys(attributes)) {
|
||||
for (const attributeName in attributes) {
|
||||
const attribute = attributes[attributeName];
|
||||
|
||||
if (attribute.type !== 'relation' || !_.has(attributeName, data)) {
|
||||
@ -667,7 +667,7 @@ const createEntityManager = (db) => {
|
||||
async deleteRelations(uid, id) {
|
||||
const { attributes } = db.metadata.get(uid);
|
||||
|
||||
for (const attributeName of Object.keys(attributes)) {
|
||||
for (const attributeName in attributes) {
|
||||
const attribute = attributes[attributeName];
|
||||
|
||||
if (attribute.type !== 'relation') {
|
||||
|
||||
@ -54,7 +54,7 @@ const createLifecyclesProvider = (db) => {
|
||||
* @param {Map<any, any>} states
|
||||
*/
|
||||
async run(action, uid, properties, states = new Map()) {
|
||||
for (let i = 0; i < subscribers.length; i += 1) {
|
||||
for (let i = 0; i < subscribers.length; i++) {
|
||||
const subscriber = subscribers[i];
|
||||
if (typeof subscriber === 'function') {
|
||||
const state = states.get(subscriber) || {};
|
||||
|
||||
@ -71,7 +71,7 @@ const applyJoin = (qb, join) => {
|
||||
inner.on(`${rootTable}.${rootColumn}`, `${alias}.${referencedColumn}`);
|
||||
|
||||
if (on) {
|
||||
for (const key of Object.keys(on)) {
|
||||
for (const key in on) {
|
||||
inner.onVal(`${alias}.${key}`, on[key]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ const { fromRow } = require('./transform');
|
||||
const getRootLevelPopulate = (meta) => {
|
||||
const populate = {};
|
||||
|
||||
for (const attributeName of Object.keys(meta.attributes)) {
|
||||
for (const attributeName in meta.attributes) {
|
||||
const attribute = meta.attributes[attributeName];
|
||||
if (attribute.type === 'relation') {
|
||||
populate[attributeName] = true;
|
||||
@ -72,7 +72,7 @@ const processPopulate = (populate, ctx) => {
|
||||
}
|
||||
|
||||
const finalPopulate = {};
|
||||
for (const key of Object.keys(populateMap)) {
|
||||
for (const key in populateMap) {
|
||||
const attribute = meta.attributes[key];
|
||||
|
||||
if (!attribute) {
|
||||
@ -119,7 +119,7 @@ const applyPopulate = async (results, populate, ctx) => {
|
||||
return results;
|
||||
}
|
||||
|
||||
for (const key of Object.keys(populate)) {
|
||||
for (const key in populate) {
|
||||
const attribute = meta.attributes[key];
|
||||
const targetMeta = db.metadata.get(attribute.target);
|
||||
|
||||
@ -540,7 +540,7 @@ const applyPopulate = async (results, populate, ctx) => {
|
||||
}, {});
|
||||
|
||||
const map = {};
|
||||
for (const type of Object.keys(idsByType)) {
|
||||
for (const type in idsByType) {
|
||||
const ids = idsByType[type];
|
||||
|
||||
// type was removed but still in morph relation
|
||||
@ -604,7 +604,7 @@ const applyPopulate = async (results, populate, ctx) => {
|
||||
}, {});
|
||||
|
||||
const map = {};
|
||||
for (const type of Object.keys(idsByType)) {
|
||||
for (const type in idsByType) {
|
||||
const ids = idsByType[type];
|
||||
|
||||
// type was removed but still in morph relation
|
||||
|
||||
@ -53,7 +53,7 @@ const toRow = (meta, data = {}) => {
|
||||
|
||||
const { attributes } = meta;
|
||||
|
||||
for (const key of Object.keys(data)) {
|
||||
for (const key in data) {
|
||||
const attribute = attributes[key];
|
||||
|
||||
if (!attribute || attribute.columnName === key) {
|
||||
|
||||
@ -76,7 +76,7 @@ const processAttributeWhere = (attribute, where, operator = '$eq') => {
|
||||
|
||||
const filters = {};
|
||||
|
||||
for (const key of Object.keys(where)) {
|
||||
for (const key in where) {
|
||||
const value = where[key];
|
||||
|
||||
if (!isOperator(key)) {
|
||||
@ -119,7 +119,7 @@ const processWhere = (where, ctx) => {
|
||||
const filters = {};
|
||||
|
||||
// for each key in where
|
||||
for (const key of Object.keys(where)) {
|
||||
for (const key in where) {
|
||||
const value = where[key];
|
||||
|
||||
// if operator $and $or then loop over them
|
||||
|
||||
@ -27,13 +27,7 @@ const createQueryBuilder = (uid, db) => {
|
||||
};
|
||||
|
||||
let counter = 0;
|
||||
const getAlias = () => {
|
||||
const alias = `t${counter}`;
|
||||
|
||||
counter += 1;
|
||||
|
||||
return alias;
|
||||
};
|
||||
const getAlias = () => `t${counter++}`;
|
||||
|
||||
return {
|
||||
alias: getAlias(),
|
||||
|
||||
@ -295,11 +295,7 @@ const createHelpers = (db) => {
|
||||
|
||||
const { object } = updatedColumn;
|
||||
|
||||
if (object.type === 'increments') {
|
||||
createColumn(tableBuilder, { ...object, type: 'integer' }).alter();
|
||||
} else {
|
||||
createColumn(tableBuilder, object).alter();
|
||||
}
|
||||
createColumn(tableBuilder, object).alter();
|
||||
}
|
||||
|
||||
for (const updatedForeignKey of table.foreignKeys.updated) {
|
||||
|
||||
@ -25,7 +25,7 @@ const createTable = (meta) => {
|
||||
columns: [],
|
||||
};
|
||||
|
||||
for (const key of Object.keys(meta.attributes)) {
|
||||
for (const key in meta.attributes) {
|
||||
const attribute = meta.attributes[key];
|
||||
|
||||
if (types.isRelation(attribute.type)) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/database",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Strapi's database layer",
|
||||
"homepage": "https://strapi.io",
|
||||
"bugs": {
|
||||
@ -39,7 +39,7 @@
|
||||
"umzug": "3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-email",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Easily configure your Strapi application to send emails.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -26,16 +26,16 @@
|
||||
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/provider-email-sendmail": "4.3.8",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/provider-email-sendmail": "4.3.6",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@strapi/helper-plugin": "4.3.8",
|
||||
"@strapi/helper-plugin": "4.3.6",
|
||||
"@testing-library/react": "12.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/helper-plugin",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Helper for Strapi plugins development",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -89,7 +89,7 @@
|
||||
"typescript": "4.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"nx": {
|
||||
|
||||
@ -86,7 +86,7 @@ Complete installation requirements can be found in the documentation under <a hr
|
||||
|
||||
**Node:**
|
||||
|
||||
- NodeJS >= 14 <= 18
|
||||
- NodeJS >= 14 <= 16
|
||||
- NPM >= 6.x
|
||||
|
||||
**Database:**
|
||||
|
||||
@ -9,7 +9,7 @@ const CHUNK_SIZE = 100;
|
||||
* Will dump configurations to a file or stdout
|
||||
* @param {string} file filepath to use as output
|
||||
*/
|
||||
module.exports = async ({ file: filePath, pretty }) => {
|
||||
module.exports = async function ({ file: filePath, pretty }) {
|
||||
const output = filePath ? fs.createWriteStream(filePath) : process.stdout;
|
||||
|
||||
const appContext = await strapi.compile();
|
||||
@ -21,7 +21,7 @@ module.exports = async ({ file: filePath, pretty }) => {
|
||||
|
||||
const pageCount = Math.ceil(count / CHUNK_SIZE);
|
||||
|
||||
for (let page = 0; page < pageCount; page += 1) {
|
||||
for (let page = 0; page < pageCount; page++) {
|
||||
const results = await app
|
||||
.query('strapi::core-store')
|
||||
.findMany({ limit: CHUNK_SIZE, offset: page * CHUNK_SIZE, orderBy: 'key' });
|
||||
|
||||
@ -56,7 +56,7 @@ const transformEntry = (entry, type) => {
|
||||
|
||||
const attributeValues = {};
|
||||
|
||||
for (const key of Object.keys(properties)) {
|
||||
for (const key in properties) {
|
||||
const property = properties[key];
|
||||
const attribute = type && type.attributes[key];
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ module.exports = async (strapi) => {
|
||||
|
||||
validateContentTypesUnicity(apis);
|
||||
|
||||
for (const apiName of Object.keys(apis)) {
|
||||
for (const apiName in apis) {
|
||||
strapi.container.get('apis').add(apiName, apis[apiName]);
|
||||
}
|
||||
};
|
||||
|
||||
@ -59,9 +59,7 @@ const getEnabledPlugins = async (strapi) => {
|
||||
}
|
||||
|
||||
const installedPlugins = {};
|
||||
const dependencies = strapi.config.get('info.dependencies', {});
|
||||
|
||||
for (const dep of Object.keys(dependencies)) {
|
||||
for (const dep in strapi.config.get('info.dependencies', {})) {
|
||||
const packagePath = join(dep, 'package.json');
|
||||
let packageInfo;
|
||||
try {
|
||||
|
||||
@ -34,10 +34,10 @@ const applyUserExtension = async (plugins) => {
|
||||
const extendedSchemas = await loadFiles(extensionsDir, '**/content-types/**/schema.json');
|
||||
const strapiServers = await loadFiles(extensionsDir, '**/strapi-server.js');
|
||||
|
||||
for (const pluginName of Object.keys(plugins)) {
|
||||
for (const pluginName in plugins) {
|
||||
const plugin = plugins[pluginName];
|
||||
// first: load json schema
|
||||
for (const ctName of Object.keys(plugin.contentTypes)) {
|
||||
for (const ctName in plugin.contentTypes) {
|
||||
const extendedSchema = get([pluginName, 'content-types', ctName, 'schema'], extendedSchemas);
|
||||
if (extendedSchema) {
|
||||
plugin.contentTypes[ctName].schema = {
|
||||
@ -57,7 +57,7 @@ const applyUserExtension = async (plugins) => {
|
||||
const applyUserConfig = async (plugins) => {
|
||||
const userPluginsConfig = await getUserPluginsConfig();
|
||||
|
||||
for (const pluginName of Object.keys(plugins)) {
|
||||
for (const pluginName in plugins) {
|
||||
const plugin = plugins[pluginName];
|
||||
const userPluginConfig = getOr({}, `${pluginName}.config`, userPluginsConfig);
|
||||
const defaultConfig =
|
||||
@ -82,7 +82,7 @@ const loadPlugins = async (strapi) => {
|
||||
|
||||
strapi.config.set('enabledPlugins', enabledPlugins);
|
||||
|
||||
for (const pluginName of Object.keys(enabledPlugins)) {
|
||||
for (const pluginName in enabledPlugins) {
|
||||
const enabledPlugin = enabledPlugins[pluginName];
|
||||
|
||||
const serverEntrypointPath = join(enabledPlugin.pathToPlugin, 'strapi-server.js');
|
||||
@ -100,7 +100,7 @@ const loadPlugins = async (strapi) => {
|
||||
await applyUserConfig(plugins);
|
||||
await applyUserExtension(plugins);
|
||||
|
||||
for (const pluginName of Object.keys(plugins)) {
|
||||
for (const pluginName in plugins) {
|
||||
strapi.container.get('plugins').add(pluginName, plugins[pluginName]);
|
||||
}
|
||||
};
|
||||
|
||||
@ -5,7 +5,7 @@ const { createContentType } = require('../domain/content-type');
|
||||
const { addNamespace, hasNamespace } = require('../utils');
|
||||
|
||||
const validateKeySameToSingularName = (contentTypes) => {
|
||||
for (const ctName of Object.keys(contentTypes)) {
|
||||
for (const ctName in contentTypes) {
|
||||
const contentType = contentTypes[ctName];
|
||||
|
||||
if (ctName !== contentType.schema.info.singularName) {
|
||||
@ -63,7 +63,7 @@ const contentTypesRegistry = () => {
|
||||
add(namespace, newContentTypes) {
|
||||
validateKeySameToSingularName(newContentTypes);
|
||||
|
||||
for (const rawCtName of Object.keys(newContentTypes)) {
|
||||
for (const rawCtName in newContentTypes) {
|
||||
const uid = addNamespace(rawCtName, namespace);
|
||||
|
||||
if (has(uid, contentTypes)) {
|
||||
|
||||
@ -48,7 +48,7 @@ const controllersRegistry = () => {
|
||||
const filteredControllers = pickBy((_, uid) => hasNamespace(uid, namespace))(controllers);
|
||||
|
||||
const map = {};
|
||||
for (const uid of Object.keys(filteredControllers)) {
|
||||
for (const uid in filteredControllers) {
|
||||
Object.defineProperty(map, uid, {
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
@ -78,7 +78,7 @@ const controllersRegistry = () => {
|
||||
* @returns
|
||||
*/
|
||||
add(namespace, newControllers) {
|
||||
for (const controllerName of Object.keys(newControllers)) {
|
||||
for (const controllerName in newControllers) {
|
||||
const controller = newControllers[controllerName];
|
||||
const uid = addNamespace(controllerName, namespace);
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ const hooksRegistry = () => {
|
||||
* @returns
|
||||
*/
|
||||
add(namespace, hooks) {
|
||||
for (const hookName of Object.keys(hooks)) {
|
||||
for (const hookName in hooks) {
|
||||
const hook = hooks[hookName];
|
||||
const uid = addNamespace(hookName, namespace);
|
||||
|
||||
|
||||
@ -54,8 +54,8 @@ const middlewaresRegistry = () => {
|
||||
* @param {{ [key: string]: Middleware }} newMiddlewares
|
||||
* @returns
|
||||
*/
|
||||
add(namespace, rawMiddlewares = {}) {
|
||||
for (const middlewareName of Object.keys(rawMiddlewares)) {
|
||||
add(namespace, rawMiddlewares) {
|
||||
for (const middlewareName in rawMiddlewares) {
|
||||
const middleware = rawMiddlewares[middlewareName];
|
||||
const uid = addNamespace(middlewareName, namespace);
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ const policiesRegistry = () => {
|
||||
* @returns
|
||||
*/
|
||||
add(namespace, newPolicies) {
|
||||
for (const policyName of Object.keys(newPolicies)) {
|
||||
for (const policyName in newPolicies) {
|
||||
const policy = newPolicies[policyName];
|
||||
const uid = addNamespace(policyName, namespace);
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ const servicesRegistry = (strapi) => {
|
||||
|
||||
// create lazy accessor to avoid instantiating the services;
|
||||
const map = {};
|
||||
for (const uid of Object.keys(filteredServices)) {
|
||||
for (const uid in filteredServices) {
|
||||
Object.defineProperty(map, uid, {
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
@ -78,7 +78,7 @@ const servicesRegistry = (strapi) => {
|
||||
* @returns
|
||||
*/
|
||||
add(namespace, newServices) {
|
||||
for (const serviceName of Object.keys(newServices)) {
|
||||
for (const serviceName in newServices) {
|
||||
const service = newServices[serviceName];
|
||||
const uid = addNamespace(serviceName, namespace);
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ const createCronService = () => {
|
||||
|
||||
return {
|
||||
add(tasks = {}) {
|
||||
for (const taskExpression of Object.keys(tasks)) {
|
||||
for (const taskExpression in tasks) {
|
||||
const taskValue = tasks[taskExpression];
|
||||
|
||||
let fn;
|
||||
|
||||
@ -18,11 +18,11 @@ const omitComponentData = (contentType, data) => {
|
||||
|
||||
// NOTE: we could generalize the logic to allow CRUD of relation directly in the DB layer
|
||||
const createComponents = async (uid, data) => {
|
||||
const { attributes = {} } = strapi.getModel(uid);
|
||||
const { attributes } = strapi.getModel(uid);
|
||||
|
||||
const componentBody = {};
|
||||
|
||||
for (const attributeName of Object.keys(attributes)) {
|
||||
for (const attributeName in attributes) {
|
||||
const attribute = attributes[attributeName];
|
||||
|
||||
if (!has(attributeName, data) || !contentTypesUtils.isComponentAttribute(attribute)) {
|
||||
@ -118,11 +118,11 @@ const getComponents = async (uid, entity) => {
|
||||
create or update
|
||||
*/
|
||||
const updateComponents = async (uid, entityToUpdate, data) => {
|
||||
const { attributes = {} } = strapi.getModel(uid);
|
||||
const { attributes } = strapi.getModel(uid);
|
||||
|
||||
const componentBody = {};
|
||||
|
||||
for (const attributeName of Object.keys(attributes)) {
|
||||
for (const attributeName in attributes) {
|
||||
const attribute = attributes[attributeName];
|
||||
|
||||
if (!has(attributeName, data)) {
|
||||
@ -275,9 +275,9 @@ const deleteOldDZComponents = async (uid, entityToUpdate, attributeName, dynamic
|
||||
};
|
||||
|
||||
const deleteComponents = async (uid, entityToDelete) => {
|
||||
const { attributes = {} } = strapi.getModel(uid);
|
||||
const { attributes } = strapi.getModel(uid);
|
||||
|
||||
for (const attributeName of Object.keys(attributes)) {
|
||||
for (const attributeName in attributes) {
|
||||
const attribute = attributes[attributeName];
|
||||
|
||||
if (attribute.type === 'component') {
|
||||
|
||||
@ -14,56 +14,51 @@ const { isMediaAttribute, isScalarAttribute, getWritableAttributes } = strapiUti
|
||||
const { ValidationError } = strapiUtils.errors;
|
||||
|
||||
const addMinMax = (validator, { attr, updatedAttribute }) => {
|
||||
let nextValidator = validator;
|
||||
|
||||
if (
|
||||
Number.isInteger(attr.min) &&
|
||||
(attr.required || (Array.isArray(updatedAttribute.value) && updatedAttribute.value.length > 0))
|
||||
) {
|
||||
nextValidator = nextValidator.min(attr.min);
|
||||
validator = validator.min(attr.min);
|
||||
}
|
||||
if (Number.isInteger(attr.max)) {
|
||||
nextValidator = nextValidator.max(attr.max);
|
||||
validator = validator.max(attr.max);
|
||||
}
|
||||
return nextValidator;
|
||||
return validator;
|
||||
};
|
||||
|
||||
const addRequiredValidation = (createOrUpdate) => {
|
||||
return (validator, { attr: { required } }) => {
|
||||
let nextValidator = validator;
|
||||
const addRequiredValidation =
|
||||
(createOrUpdate) =>
|
||||
(validator, { attr: { required } }) => {
|
||||
if (required) {
|
||||
if (createOrUpdate === 'creation') {
|
||||
nextValidator = nextValidator.notNil();
|
||||
validator = validator.notNil();
|
||||
} else if (createOrUpdate === 'update') {
|
||||
nextValidator = nextValidator.notNull();
|
||||
validator = validator.notNull();
|
||||
}
|
||||
} else {
|
||||
nextValidator = nextValidator.nullable();
|
||||
validator = validator.nullable();
|
||||
}
|
||||
return nextValidator;
|
||||
return validator;
|
||||
};
|
||||
};
|
||||
|
||||
const addDefault = (createOrUpdate) => {
|
||||
return (validator, { attr }) => {
|
||||
let nextValidator = validator;
|
||||
|
||||
const addDefault =
|
||||
(createOrUpdate) =>
|
||||
(validator, { attr }) => {
|
||||
if (createOrUpdate === 'creation') {
|
||||
if (
|
||||
((attr.type === 'component' && attr.repeatable) || attr.type === 'dynamiczone') &&
|
||||
!attr.required
|
||||
) {
|
||||
nextValidator = nextValidator.default([]);
|
||||
validator = validator.default([]);
|
||||
} else {
|
||||
nextValidator = nextValidator.default(attr.default);
|
||||
validator = validator.default(attr.default);
|
||||
}
|
||||
} else {
|
||||
nextValidator = nextValidator.default(undefined);
|
||||
validator = validator.default(undefined);
|
||||
}
|
||||
|
||||
return nextValidator;
|
||||
return validator;
|
||||
};
|
||||
};
|
||||
|
||||
const preventCast = (validator) => validator.transform((val, originalVal) => originalVal);
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ describe('Metrics middleware', () => {
|
||||
const sendEvent = jest.fn();
|
||||
const middleware = createMiddleware({ sendEvent });
|
||||
|
||||
for (let i = 0; i < 2000; i += 1) {
|
||||
for (let i = 0; i < 2000; i++) {
|
||||
await middleware(
|
||||
{
|
||||
request: {
|
||||
|
||||
@ -22,7 +22,7 @@ const createMiddleware = ({ sendEvent }) => {
|
||||
sendEvent('didReceiveRequest', { url: ctx.request.url });
|
||||
|
||||
// Increase counter.
|
||||
_state.counter += 1;
|
||||
_state.counter++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ const registerAdminRoutes = (strapi) => {
|
||||
* @param {import('../../').Strapi} strapi
|
||||
*/
|
||||
const registerPluginRoutes = (strapi) => {
|
||||
for (const pluginName of Object.keys(strapi.plugins)) {
|
||||
for (const pluginName in strapi.plugins) {
|
||||
const plugin = strapi.plugins[pluginName];
|
||||
|
||||
const generateRouteScope = createRouteScopeGenerator(`plugin::${pluginName}`);
|
||||
@ -86,7 +86,7 @@ const registerPluginRoutes = (strapi) => {
|
||||
* @param {import('../../').Strapi} strapi
|
||||
*/
|
||||
const registerAPIRoutes = (strapi) => {
|
||||
for (const apiName of Object.keys(strapi.api)) {
|
||||
for (const apiName in strapi.api) {
|
||||
const api = strapi.api[apiName];
|
||||
|
||||
const generateRouteScope = createRouteScopeGenerator(`api::${apiName}`);
|
||||
|
||||
@ -27,7 +27,7 @@ module.exports = async (uid, entity, files) => {
|
||||
let tmpModel = modelDef;
|
||||
let modelUID = uid;
|
||||
|
||||
for (let i = 0; i < path.length; i += 1) {
|
||||
for (let i = 0; i < path.length; i++) {
|
||||
if (!tmpModel) return {};
|
||||
const part = path[i];
|
||||
const attr = tmpModel.attributes[part];
|
||||
|
||||
@ -26,7 +26,7 @@ module.exports = class WorkerQueue {
|
||||
enqueue(payload) {
|
||||
debug('Enqueue event in worker queue');
|
||||
if (this.running < this.concurrency) {
|
||||
this.running += 1;
|
||||
this.running++;
|
||||
this.execute(payload);
|
||||
} else {
|
||||
this.queue.unshift(payload);
|
||||
@ -40,7 +40,7 @@ module.exports = class WorkerQueue {
|
||||
if (payload) {
|
||||
this.execute(payload);
|
||||
} else {
|
||||
this.running -= 1;
|
||||
this.running--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (path) => {
|
||||
let tmpPath = path;
|
||||
if (typeof tmpPath !== 'string') throw new Error('admin.url must be a string');
|
||||
if (tmpPath === '' || tmpPath === '/') return '/';
|
||||
if (typeof path !== 'string') throw new Error('admin.url must be a string');
|
||||
if (path === '' || path === '/') return '/';
|
||||
|
||||
if (tmpPath[0] !== '/') tmpPath = `/${tmpPath}`;
|
||||
if (tmpPath[tmpPath.length - 1] !== '/') tmpPath += '/';
|
||||
return tmpPath;
|
||||
if (path[0] != '/') path = `/${path}`;
|
||||
if (path[path.length - 1] != '/') path += '/';
|
||||
return path;
|
||||
};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/strapi",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"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",
|
||||
"keywords": [
|
||||
"strapi",
|
||||
@ -80,17 +80,18 @@
|
||||
"dependencies": {
|
||||
"@koa/cors": "3.4.1",
|
||||
"@koa/router": "10.1.1",
|
||||
"@strapi/admin": "4.3.8",
|
||||
"@strapi/database": "4.3.8",
|
||||
"@strapi/generate-new": "4.3.8",
|
||||
"@strapi/generators": "4.3.8",
|
||||
"@strapi/logger": "4.3.8",
|
||||
"@strapi/plugin-content-manager": "4.3.8",
|
||||
"@strapi/plugin-content-type-builder": "4.3.8",
|
||||
"@strapi/plugin-email": "4.3.8",
|
||||
"@strapi/plugin-upload": "4.3.8",
|
||||
"@strapi/typescript-utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/admin": "4.3.6",
|
||||
"@strapi/database": "4.3.6",
|
||||
"@strapi/generate-new": "4.3.6",
|
||||
"@strapi/generators": "4.3.6",
|
||||
"@strapi/logger": "4.3.6",
|
||||
"@strapi/plugin-content-manager": "4.3.6",
|
||||
"@strapi/plugin-content-type-builder": "4.3.6",
|
||||
"@strapi/plugin-email": "4.3.6",
|
||||
"@strapi/plugin-upload": "4.3.6",
|
||||
"@strapi/typescript-utils": "4.3.6",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"@strapi/permissions": "4.3.6",
|
||||
"bcryptjs": "2.4.3",
|
||||
"boxen": "5.1.2",
|
||||
"chalk": "4.1.2",
|
||||
@ -136,7 +137,7 @@
|
||||
"typescript": "4.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-upload",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Makes it easy to upload images and files to your Strapi Application.",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"author": {
|
||||
@ -23,9 +23,9 @@
|
||||
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/helper-plugin": "4.3.8",
|
||||
"@strapi/provider-upload-local": "4.3.8",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/helper-plugin": "4.3.6",
|
||||
"@strapi/provider-upload-local": "4.3.6",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"byte-size": "7.0.1",
|
||||
"cropperjs": "1.5.12",
|
||||
"date-fns": "2.29.2",
|
||||
@ -53,7 +53,7 @@
|
||||
"react-test-renderer": "^17.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -21,7 +21,7 @@ const getAssociationFromFieldKey = ({ model, field }) => {
|
||||
let association;
|
||||
let attribute;
|
||||
|
||||
for (let i = 0; i < fieldParts.length; i += 1) {
|
||||
for (let i = 0; i < fieldParts.length; i++) {
|
||||
const part = fieldParts[i];
|
||||
attribute = part;
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ const symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString
|
||||
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
|
||||
|
||||
function printNumber(val) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (val != +val) return 'NaN';
|
||||
const isNegativeZero = val === 0 && 1 / val < 0;
|
||||
return isNegativeZero ? '-0' : `${val}`;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/utils",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Shared utilities for the Strapi packages",
|
||||
"keywords": [
|
||||
"strapi",
|
||||
@ -42,7 +42,7 @@
|
||||
"yup": "0.32.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ async function askDbInfosAndTest(scope) {
|
||||
.then((result) => {
|
||||
if (result && result.shouldRetry === true && retries < MAX_RETRIES - 1) {
|
||||
console.log('Retrying...');
|
||||
retries += 1;
|
||||
retries++;
|
||||
return loop();
|
||||
}
|
||||
})
|
||||
@ -86,7 +86,7 @@ async function askDbInfosAndTest(scope) {
|
||||
}
|
||||
|
||||
console.log('Retrying...');
|
||||
retries += 1;
|
||||
retries++;
|
||||
return loop();
|
||||
}
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ module.exports = (opts) => {
|
||||
...packageJsonStrapi,
|
||||
},
|
||||
engines: {
|
||||
node: '>=14.19.1 <=18.x.x',
|
||||
node: '>=14.19.1 <=16.x.x',
|
||||
npm: '>=6.0.0',
|
||||
},
|
||||
license: 'MIT',
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/generate-new",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Generate a new Strapi application.",
|
||||
"keywords": [
|
||||
"generate",
|
||||
@ -50,7 +50,7 @@
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/generators",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Interactive API generator.",
|
||||
"keywords": [
|
||||
"strapi",
|
||||
@ -30,8 +30,8 @@
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@sindresorhus/slugify": "1.1.0",
|
||||
"@strapi/typescript-utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/typescript-utils": "4.3.6",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"chalk": "4.1.2",
|
||||
"fs-extra": "10.0.0",
|
||||
"node-plop": "0.26.3",
|
||||
@ -39,7 +39,7 @@
|
||||
"pluralize": "8.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-documentation",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -24,8 +24,8 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/helper-plugin": "4.3.8",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/helper-plugin": "4.3.6",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"bcryptjs": "2.4.3",
|
||||
"cheerio": "^1.0.0-rc.12",
|
||||
"fs-extra": "10.0.0",
|
||||
@ -53,7 +53,7 @@
|
||||
"msw": "0.42.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -15,13 +15,12 @@ module.exports = ({ strapi }) => {
|
||||
|
||||
return {
|
||||
registerDoc(doc) {
|
||||
let registeredDoc = doc;
|
||||
// parseYaml
|
||||
if (typeof doc === 'string') {
|
||||
registeredDoc = require('yaml').parse(registeredDoc);
|
||||
doc = require('yaml').parse(doc);
|
||||
}
|
||||
// receive an object we can register it directly
|
||||
registeredDocs.push(registeredDoc);
|
||||
registeredDocs.push(doc);
|
||||
},
|
||||
getDocumentationVersion() {
|
||||
return _.get(config, 'info.version');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-graphql",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Adds GraphQL endpoint with default API methods.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -29,7 +29,7 @@
|
||||
"dependencies": {
|
||||
"@graphql-tools/schema": "8.1.2",
|
||||
"@graphql-tools/utils": "^8.10.0",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"apollo-server-core": "3.1.2",
|
||||
"apollo-server-koa": "3.10.0",
|
||||
"glob": "^7.1.7",
|
||||
@ -52,7 +52,7 @@
|
||||
"@strapi/strapi": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-i18n",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -24,7 +24,7 @@
|
||||
"test:unit": "jest --verbose"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -32,7 +32,7 @@
|
||||
"msw": "0.42.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-sentry",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Send Strapi error events to Sentry",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -30,7 +30,7 @@
|
||||
"@strapi/strapi": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/plugin-users-permissions",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Protect your API with a full-authentication process based on JWT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -27,8 +27,8 @@
|
||||
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/helper-plugin": "4.3.8",
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/helper-plugin": "4.3.6",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"bcryptjs": "2.4.3",
|
||||
"grant-koa": "5.4.8",
|
||||
"jsonwebtoken": "^8.1.0",
|
||||
@ -54,7 +54,7 @@
|
||||
"react-test-renderer": "^17.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
},
|
||||
"strapi": {
|
||||
|
||||
@ -147,7 +147,7 @@ module.exports = {
|
||||
.query('plugin::users-permissions.user')
|
||||
.findOne({ where: { username } });
|
||||
|
||||
if (userWithSameUsername && _.toString(userWithSameUsername.id) !== _.toString(id)) {
|
||||
if (userWithSameUsername && userWithSameUsername.id != id) {
|
||||
throw new ApplicationError('Username already taken');
|
||||
}
|
||||
}
|
||||
@ -157,7 +157,7 @@ module.exports = {
|
||||
.query('plugin::users-permissions.user')
|
||||
.findOne({ where: { email: _.toLower(email) } });
|
||||
|
||||
if (userWithSameEmail && _.toString(userWithSameEmail.id) !== _.toString(id)) {
|
||||
if (userWithSameEmail && userWithSameEmail.id != id) {
|
||||
throw new ApplicationError('Email already taken');
|
||||
}
|
||||
body.email = _.toLower(body.email);
|
||||
|
||||
@ -105,7 +105,7 @@ module.exports = {
|
||||
.query('plugin::users-permissions.user')
|
||||
.findOne({ where: { username } });
|
||||
|
||||
if (userWithSameUsername && _.toString(userWithSameUsername.id) !== _.toString(id)) {
|
||||
if (userWithSameUsername && userWithSameUsername.id != id) {
|
||||
throw new ApplicationError('Username already taken');
|
||||
}
|
||||
}
|
||||
@ -115,7 +115,7 @@ module.exports = {
|
||||
.query('plugin::users-permissions.user')
|
||||
.findOne({ where: { email: email.toLowerCase() } });
|
||||
|
||||
if (userWithSameEmail && _.toString(userWithSameEmail.id) !== _.toString(id)) {
|
||||
if (userWithSameEmail && userWithSameEmail.id != id) {
|
||||
throw new ApplicationError('Email already taken');
|
||||
}
|
||||
ctx.request.body.email = ctx.request.body.email.toLowerCase();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/provider-email-amazon-ses",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Amazon SES provider for strapi email",
|
||||
"keywords": [
|
||||
"email",
|
||||
@ -36,11 +36,11 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"node-ses": "^3.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/provider-email-mailgun",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Mailgun provider for strapi email plugin",
|
||||
"keywords": [
|
||||
"email",
|
||||
@ -36,12 +36,12 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"form-data": "^4.0.0",
|
||||
"mailgun.js": "5.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/provider-email-nodemailer",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Nodemailer provider for Strapi 3",
|
||||
"keywords": [
|
||||
"strapi",
|
||||
@ -53,7 +53,7 @@
|
||||
"nodemailer": "6.7.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/provider-email-sendgrid",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Sendgrid provider for strapi email",
|
||||
"keywords": [
|
||||
"email",
|
||||
@ -37,10 +37,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sendgrid/mail": "7.7.0",
|
||||
"@strapi/utils": "4.3.8"
|
||||
"@strapi/utils": "4.3.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/provider-email-sendmail",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Sendmail provider for strapi email",
|
||||
"keywords": [
|
||||
"email",
|
||||
@ -35,11 +35,11 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"sendmail": "^1.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/provider-upload-aws-s3",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "AWS S3 provider for strapi upload",
|
||||
"keywords": [
|
||||
"upload",
|
||||
@ -41,7 +41,7 @@
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/provider-upload-cloudinary",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Cloudinary provider for strapi upload",
|
||||
"keywords": [
|
||||
"upload",
|
||||
@ -36,12 +36,12 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"cloudinary": "^1.30.1",
|
||||
"into-stream": "^5.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/provider-upload-local",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Local provider for strapi upload",
|
||||
"keywords": [
|
||||
"upload",
|
||||
@ -35,11 +35,11 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@strapi/utils": "4.3.8",
|
||||
"@strapi/utils": "4.3.6",
|
||||
"fs-extra": "10.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/babel-plugin-switch-ee-ce",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"private": false,
|
||||
"description": "Babel plugin to switch from CE to EE at runtime",
|
||||
"repository": "git://github.com/strapi/strapi.git",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/logger",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Strapi's logger",
|
||||
"homepage": "https://strapi.io",
|
||||
"bugs": {
|
||||
@ -35,7 +35,7 @@
|
||||
"winston": "3.3.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=14.19.1 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@strapi/typescript-utils",
|
||||
"version": "4.3.8",
|
||||
"version": "4.3.6",
|
||||
"description": "Typescript support for Strapi",
|
||||
"keywords": [
|
||||
"strapi",
|
||||
@ -32,7 +32,7 @@
|
||||
"typescript": "4.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.19.1 <=18.x.x",
|
||||
"node": ">=12.22.0 <=16.x.x",
|
||||
"npm": ">=6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,10 +13,10 @@ const printResults = (results) => {
|
||||
Object.entries(pkgs).forEach(([packageName, keys]) => {
|
||||
keys.forEach((key) => {
|
||||
console.log(`"${chalk.yellow(value)}" ${packageName} ${chalk.blue(key)}`);
|
||||
keysCount += 1;
|
||||
keysCount++;
|
||||
});
|
||||
});
|
||||
valuesCount += 1;
|
||||
valuesCount++;
|
||||
console.log();
|
||||
});
|
||||
|
||||
|
||||
@ -137,10 +137,10 @@ const merge = async (valuesToMerge) => {
|
||||
valueGroup.forEach((keyGroup) => {
|
||||
updateTranslationFiles(keyGroup, targetKey);
|
||||
keyGroup.replaceAll(`id: '${targetKey}'`);
|
||||
mergedCount += 1;
|
||||
mergedCount++;
|
||||
});
|
||||
}
|
||||
current += 1;
|
||||
current++;
|
||||
}
|
||||
|
||||
console.log(`Merged ${mergedCount} keys`);
|
||||
|
||||
@ -25,7 +25,7 @@ async function run() {
|
||||
}
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
if (req.url === '/spec.yml') {
|
||||
if (req.url == '/spec.yml') {
|
||||
return fse.createReadStream(openAPISpecPath).pipe(res);
|
||||
}
|
||||
|
||||
|
||||
@ -12,11 +12,11 @@ Object.defineProperty(global, 'strapi', {
|
||||
strapiInstance = value;
|
||||
|
||||
strapiInstance.plugin = (name) => strapiInstance.plugins[name];
|
||||
_.mapValues(strapi.plugins, (acc) => {
|
||||
acc.controller = (name) => acc.controllers[name];
|
||||
acc.service = (name) => acc.services[name];
|
||||
acc.contentType = (name) => acc.contentTypes[name];
|
||||
acc.policy = (name) => acc.policies[name];
|
||||
_.mapValues(strapi.plugins, (plugin) => {
|
||||
plugin.controller = (name) => plugin.controllers[name];
|
||||
plugin.service = (name) => plugin.services[name];
|
||||
plugin.contentType = (name) => plugin.contentTypes[name];
|
||||
plugin.policy = (name) => plugin.policies[name];
|
||||
});
|
||||
|
||||
strapiInstance.service = (name = '') => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user