mirror of
https://github.com/strapi/strapi.git
synced 2025-09-28 09:49:36 +00:00
Merge branch 'features/typescript' into typescript/types/schema
This commit is contained in:
commit
004024b58f
4
.github/actions/check-pr-status/package.json
vendored
4
.github/actions/check-pr-status/package.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "check-pr-status",
|
"name": "check-pr-status",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
@ -11,6 +11,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/core": "1.8.1",
|
"@actions/core": "1.8.1",
|
||||||
"@actions/github": "5.0.0",
|
"@actions/github": "5.0.0",
|
||||||
"@vercel/ncc": "0.33.3"
|
"@vercel/ncc": "0.34.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
17
.github/workflows/addToProject.yml
vendored
Normal file
17
.github/workflows/addToProject.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Add bugs to bugs project
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- transferred
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
add-to-project:
|
||||||
|
name: Add issue to Support Team project
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/add-to-project@main
|
||||||
|
with:
|
||||||
|
project-url: https://github.com/orgs/strapi/projects/15
|
||||||
|
github-token: ${{ secrets.PROJECT_TRANSFER_TOKEN }}
|
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -65,7 +65,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: yarn build
|
run: yarn build
|
||||||
- name: Run test
|
- name: Run test
|
||||||
run: yarn run -s test:front && codecov -C -F front
|
run: yarn run -s test:front --coverage && codecov -C -F front
|
||||||
|
|
||||||
e2e_ce_pg:
|
e2e_ce_pg:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
2
examples/getstarted/.gitignore
vendored
2
examples/getstarted/.gitignore
vendored
@ -100,7 +100,7 @@ node_modules
|
|||||||
############################
|
############################
|
||||||
|
|
||||||
testApp
|
testApp
|
||||||
coverage
|
/coverage/
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Strapi
|
# Strapi
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "getstarted",
|
"name": "getstarted",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "A Strapi application.",
|
"description": "A Strapi application.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"develop": "strapi develop",
|
"develop": "strapi develop",
|
||||||
@ -12,17 +12,17 @@
|
|||||||
"strapi": "strapi"
|
"strapi": "strapi"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/admin": "4.1.11",
|
"@strapi/admin": "4.1.12",
|
||||||
"@strapi/plugin-documentation": "4.1.11",
|
"@strapi/plugin-documentation": "4.1.12",
|
||||||
"@strapi/plugin-graphql": "4.1.11",
|
"@strapi/plugin-graphql": "4.1.12",
|
||||||
"@strapi/plugin-i18n": "4.1.11",
|
"@strapi/plugin-i18n": "4.1.12",
|
||||||
"@strapi/plugin-sentry": "4.1.11",
|
"@strapi/plugin-sentry": "4.1.12",
|
||||||
"@strapi/plugin-users-permissions": "4.1.11",
|
"@strapi/plugin-users-permissions": "4.1.12",
|
||||||
"@strapi/provider-email-mailgun": "4.1.11",
|
"@strapi/provider-email-mailgun": "4.1.12",
|
||||||
"@strapi/provider-upload-aws-s3": "4.1.11",
|
"@strapi/provider-upload-aws-s3": "4.1.12",
|
||||||
"@strapi/provider-upload-cloudinary": "4.1.11",
|
"@strapi/provider-upload-cloudinary": "4.1.12",
|
||||||
"@strapi/strapi": "4.1.11",
|
"@strapi/strapi": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"@vscode/sqlite3": "5.0.8",
|
"@vscode/sqlite3": "5.0.8",
|
||||||
"better-sqlite3": "7.4.6",
|
"better-sqlite3": "7.4.6",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "kitchensink",
|
"name": "kitchensink",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "A Strapi application.",
|
"description": "A Strapi application.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"develop": "strapi develop",
|
"develop": "strapi develop",
|
||||||
@ -12,12 +12,12 @@
|
|||||||
"strapi": "strapi"
|
"strapi": "strapi"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/admin": "4.1.11",
|
"@strapi/admin": "4.1.12",
|
||||||
"@strapi/provider-email-mailgun": "4.1.11",
|
"@strapi/provider-email-mailgun": "4.1.12",
|
||||||
"@strapi/provider-upload-aws-s3": "4.1.11",
|
"@strapi/provider-upload-aws-s3": "4.1.12",
|
||||||
"@strapi/provider-upload-cloudinary": "4.1.11",
|
"@strapi/provider-upload-cloudinary": "4.1.12",
|
||||||
"@strapi/strapi": "4.1.11",
|
"@strapi/strapi": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"mysql": "2.18.1",
|
"mysql": "2.18.1",
|
||||||
"passport-google-oauth2": "0.2.0",
|
"passport-google-oauth2": "0.2.0",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
"examples/*"
|
"examples/*"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/admin-test-utils",
|
"name": "@strapi/admin-test-utils",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Test utilities for the Strapi administration panel",
|
"description": "Test utilities for the Strapi administration panel",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "create-strapi-app",
|
"name": "create-strapi-app",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Generate a new Strapi application.",
|
"description": "Generate a new Strapi application.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"create-strapi-app",
|
"create-strapi-app",
|
||||||
@ -38,7 +38,7 @@
|
|||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/generate-new": "4.1.11",
|
"@strapi/generate-new": "4.1.12",
|
||||||
"commander": "6.1.0",
|
"commander": "6.1.0",
|
||||||
"inquirer": "8.2.0"
|
"inquirer": "8.2.0"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "create-strapi-starter",
|
"name": "create-strapi-starter",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Generate a new Strapi application.",
|
"description": "Generate a new Strapi application.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"create-strapi-starter",
|
"create-strapi-starter",
|
||||||
@ -38,7 +38,7 @@
|
|||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/generate-new": "4.1.11",
|
"@strapi/generate-new": "4.1.12",
|
||||||
"chalk": "4.1.1",
|
"chalk": "4.1.1",
|
||||||
"ci-info": "3.1.1",
|
"ci-info": "3.1.1",
|
||||||
"commander": "7.1.0",
|
"commander": "7.1.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/admin",
|
"name": "@strapi/admin",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Strapi Admin",
|
"description": "Strapi Admin",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -50,12 +50,12 @@
|
|||||||
"@fortawesome/free-brands-svg-icons": "^5.15.3",
|
"@fortawesome/free-brands-svg-icons": "^5.15.3",
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||||
"@fortawesome/react-fontawesome": "^0.1.14",
|
"@fortawesome/react-fontawesome": "^0.1.14",
|
||||||
"@strapi/babel-plugin-switch-ee-ce": "4.1.11",
|
"@strapi/babel-plugin-switch-ee-ce": "4.1.12",
|
||||||
"@strapi/design-system": "1.1.0",
|
"@strapi/design-system": "1.1.0",
|
||||||
"@strapi/helper-plugin": "4.1.11",
|
"@strapi/helper-plugin": "4.1.12",
|
||||||
"@strapi/icons": "1.1.0",
|
"@strapi/icons": "1.1.0",
|
||||||
"@strapi/typescript-utils": "4.1.11",
|
"@strapi/typescript-utils": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"axios": "0.24.0",
|
"axios": "0.24.0",
|
||||||
"babel-loader": "8.2.3",
|
"babel-loader": "8.2.3",
|
||||||
"babel-plugin-styled-components": "2.0.2",
|
"babel-plugin-styled-components": "2.0.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-content-manager",
|
"name": "@strapi/plugin-content-manager",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "A powerful UI to easily manage your data.",
|
"description": "A powerful UI to easily manage your data.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sindresorhus/slugify": "1.1.0",
|
"@sindresorhus/slugify": "1.1.0",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"lodash": "4.17.21"
|
"lodash": "4.17.21"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-content-type-builder",
|
"name": "@strapi/plugin-content-type-builder",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Strapi plugin to create content type",
|
"description": "Strapi plugin to create content type",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -28,9 +28,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sindresorhus/slugify": "1.1.0",
|
"@sindresorhus/slugify": "1.1.0",
|
||||||
"@strapi/generators": "4.1.11",
|
"@strapi/generators": "4.1.12",
|
||||||
"@strapi/helper-plugin": "4.1.11",
|
"@strapi/helper-plugin": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"fs-extra": "10.0.0",
|
"fs-extra": "10.0.0",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"pluralize": "^8.0.0",
|
"pluralize": "^8.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/database",
|
"name": "@strapi/database",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Strapi's database layer",
|
"description": "Strapi's database layer",
|
||||||
"homepage": "https://strapi.io",
|
"homepage": "https://strapi.io",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-email",
|
"name": "@strapi/plugin-email",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Easily configure your Strapi application to send emails.",
|
"description": "Easily configure your Strapi application to send emails.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -26,12 +26,12 @@
|
|||||||
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/provider-email-sendmail": "4.1.11",
|
"@strapi/provider-email-sendmail": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"lodash": "4.17.21"
|
"lodash": "4.17.21"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@strapi/helper-plugin": "4.1.11"
|
"@strapi/helper-plugin": "4.1.12"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.22.0 <=16.x.x",
|
"node": ">=12.22.0 <=16.x.x",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/helper-plugin",
|
"name": "@strapi/helper-plugin",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Helper for Strapi plugins development",
|
"description": "Helper for Strapi plugins development",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -75,8 +75,8 @@
|
|||||||
"@storybook/builder-webpack5": "6.4.10",
|
"@storybook/builder-webpack5": "6.4.10",
|
||||||
"@storybook/manager-webpack5": "6.4.10",
|
"@storybook/manager-webpack5": "6.4.10",
|
||||||
"@storybook/react": "^6.3.7",
|
"@storybook/react": "^6.3.7",
|
||||||
"@strapi/design-system": "1.1.0",
|
"@strapi/design-system": "1.1.1",
|
||||||
"@strapi/icons": "1.1.0",
|
"@strapi/icons": "1.1.1",
|
||||||
"babel-loader": "^8.2.2",
|
"babel-loader": "^8.2.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"date-fns": "2.22.1",
|
"date-fns": "2.22.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/strapi",
|
"name": "@strapi/strapi",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"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",
|
"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": [
|
"keywords": [
|
||||||
"strapi",
|
"strapi",
|
||||||
@ -80,17 +80,17 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@koa/cors": "3.1.0",
|
"@koa/cors": "3.1.0",
|
||||||
"@koa/router": "10.1.1",
|
"@koa/router": "10.1.1",
|
||||||
"@strapi/admin": "4.1.11",
|
"@strapi/typescript-utils": "4.1.12",
|
||||||
"@strapi/database": "4.1.11",
|
"@strapi/admin": "4.1.12",
|
||||||
"@strapi/generate-new": "4.1.11",
|
"@strapi/database": "4.1.12",
|
||||||
"@strapi/generators": "4.1.11",
|
"@strapi/generate-new": "4.1.12",
|
||||||
"@strapi/logger": "4.1.11",
|
"@strapi/generators": "4.1.12",
|
||||||
"@strapi/plugin-content-manager": "4.1.11",
|
"@strapi/logger": "4.1.12",
|
||||||
"@strapi/plugin-content-type-builder": "4.1.11",
|
"@strapi/plugin-content-manager": "4.1.12",
|
||||||
"@strapi/plugin-email": "4.1.11",
|
"@strapi/plugin-content-type-builder": "4.1.12",
|
||||||
"@strapi/plugin-upload": "4.1.11",
|
"@strapi/plugin-email": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/plugin-upload": "4.1.12",
|
||||||
"@strapi/typescript-utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"boxen": "5.1.2",
|
"boxen": "5.1.2",
|
||||||
"chalk": "4.1.2",
|
"chalk": "4.1.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-upload",
|
"name": "@strapi/plugin-upload",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Makes it easy to upload images and files to your Strapi Application.",
|
"description": "Makes it easy to upload images and files to your Strapi Application.",
|
||||||
"license": "SEE LICENSE IN LICENSE",
|
"license": "SEE LICENSE IN LICENSE",
|
||||||
"author": {
|
"author": {
|
||||||
@ -23,9 +23,9 @@
|
|||||||
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/helper-plugin": "4.1.11",
|
"@strapi/helper-plugin": "4.1.12",
|
||||||
"@strapi/provider-upload-local": "4.1.11",
|
"@strapi/provider-upload-local": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"byte-size": "7.0.1",
|
"byte-size": "7.0.1",
|
||||||
"cropperjs": "1.5.11",
|
"cropperjs": "1.5.11",
|
||||||
"fs-extra": "10.0.0",
|
"fs-extra": "10.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/utils",
|
"name": "@strapi/utils",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Shared utilities for the Strapi packages",
|
"description": "Shared utilities for the Strapi packages",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"strapi",
|
"strapi",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/generate-new",
|
"name": "@strapi/generate-new",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Generate a new Strapi application.",
|
"description": "Generate a new Strapi application.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"generate",
|
"generate",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/generators",
|
"name": "@strapi/generators",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Interactive API generator.",
|
"description": "Interactive API generator.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"strapi",
|
"strapi",
|
||||||
@ -29,9 +29,9 @@
|
|||||||
],
|
],
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/typescript-utils": "4.1.11",
|
"@strapi/typescript-utils": "4.1.12",
|
||||||
"@sindresorhus/slugify": "1.1.0",
|
"@sindresorhus/slugify": "1.1.0",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"chalk": "4.1.2",
|
"chalk": "4.1.2",
|
||||||
"fs-extra": "10.0.0",
|
"fs-extra": "10.0.0",
|
||||||
"node-plop": "0.26.3",
|
"node-plop": "0.26.3",
|
||||||
|
@ -33,6 +33,7 @@ describe('Build Component Schema', () => {
|
|||||||
const [pluginResponseValue, apiResponseValue] = Object.values(schemas);
|
const [pluginResponseValue, apiResponseValue] = Object.values(schemas);
|
||||||
|
|
||||||
const expectedShape = {
|
const expectedShape = {
|
||||||
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
data: {
|
data: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
@ -82,6 +83,7 @@ describe('Build Component Schema', () => {
|
|||||||
const apiListResponseValue = schemas['RestaurantListResponse'];
|
const apiListResponseValue = schemas['RestaurantListResponse'];
|
||||||
|
|
||||||
const expectedShape = {
|
const expectedShape = {
|
||||||
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
data: {
|
data: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-documentation",
|
"name": "@strapi/plugin-documentation",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
|
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -24,8 +24,8 @@
|
|||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/helper-plugin": "4.1.11",
|
"@strapi/helper-plugin": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"cheerio": "^1.0.0-rc.5",
|
"cheerio": "^1.0.0-rc.5",
|
||||||
"fs-extra": "10.0.0",
|
"fs-extra": "10.0.0",
|
||||||
|
@ -95,6 +95,7 @@ const getAllSchemasForContentType = ({ routeInfo, attributes, uniqueName }) => {
|
|||||||
schemas = {
|
schemas = {
|
||||||
...schemas,
|
...schemas,
|
||||||
[`${pascalCase(uniqueName)}ListResponse`]: {
|
[`${pascalCase(uniqueName)}ListResponse`]: {
|
||||||
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
data: {
|
data: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
@ -128,6 +129,7 @@ const getAllSchemasForContentType = ({ routeInfo, attributes, uniqueName }) => {
|
|||||||
schemas = {
|
schemas = {
|
||||||
...schemas,
|
...schemas,
|
||||||
[`${pascalCase(uniqueName)}Response`]: {
|
[`${pascalCase(uniqueName)}Response`]: {
|
||||||
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
data: {
|
data: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-graphql",
|
"name": "@strapi/plugin-graphql",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Adds GraphQL endpoint with default API methods.",
|
"description": "Adds GraphQL endpoint with default API methods.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -30,7 +30,7 @@
|
|||||||
"@apollo/federation": "^0.28.0",
|
"@apollo/federation": "^0.28.0",
|
||||||
"@graphql-tools/schema": "8.1.2",
|
"@graphql-tools/schema": "8.1.2",
|
||||||
"@graphql-tools/utils": "^8.0.2",
|
"@graphql-tools/utils": "^8.0.2",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"apollo-server-core": "3.1.2",
|
"apollo-server-core": "3.1.2",
|
||||||
"apollo-server-koa": "3.1.2",
|
"apollo-server-koa": "3.1.2",
|
||||||
"glob": "^7.1.7",
|
"glob": "^7.1.7",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-i18n",
|
"name": "@strapi/plugin-i18n",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -24,7 +24,7 @@
|
|||||||
"test:unit": "jest --verbose"
|
"test:unit": "jest --verbose"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"lodash": "4.17.21"
|
"lodash": "4.17.21"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-sentry",
|
"name": "@strapi/plugin-sentry",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Send Strapi error events to Sentry",
|
"description": "Send Strapi error events to Sentry",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/plugin-users-permissions",
|
"name": "@strapi/plugin-users-permissions",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Protect your API with a full-authentication process based on JWT",
|
"description": "Protect your API with a full-authentication process based on JWT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -27,8 +27,8 @@
|
|||||||
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/helper-plugin": "4.1.11",
|
"@strapi/helper-plugin": "4.1.12",
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"grant-koa": "5.4.8",
|
"grant-koa": "5.4.8",
|
||||||
"jsonwebtoken": "^8.1.0",
|
"jsonwebtoken": "^8.1.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-email-amazon-ses",
|
"name": "@strapi/provider-email-amazon-ses",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Amazon SES provider for strapi email",
|
"description": "Amazon SES provider for strapi email",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"email",
|
"email",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"node-ses": "^3.0.3"
|
"node-ses": "^3.0.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -26,13 +26,15 @@ npm install @strapi/provider-email-mailgun --save
|
|||||||
| Variable | Type | Description | Required | Default |
|
| Variable | Type | Description | Required | Default |
|
||||||
| ----------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------- | --------- |
|
| ----------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------- | --------- |
|
||||||
| provider | string | The name of the provider you use | yes | |
|
| provider | string | The name of the provider you use | yes | |
|
||||||
| providerOptions | object | Will be directly given to the `require('mailgun-js')`. Please refer to [mailgun-js](https://www.npmjs.com/package/mailgun-js) doc. | yes | |
|
| providerOptions | object | Will be directly given to the `require('mailgun.js')`. Please refer to [mailgun.js](https://www.npmjs.com/package/mailgun.js) doc. | yes | |
|
||||||
| settings | object | Settings | no | {} |
|
| settings | object | Settings | no | {} |
|
||||||
| settings.defaultFrom | string | Default sender mail address | no | undefined |
|
| settings.defaultFrom | string | Default sender mail address | no | undefined |
|
||||||
| settings.defaultReplyTo | string \| array<string> | Default address or addresses the receiver is asked to reply to | no | undefined |
|
| settings.defaultReplyTo | string \| array<string> | Default address or addresses the receiver is asked to reply to | no | undefined |
|
||||||
|
|
||||||
> :warning: The Shipper Email (or defaultfrom) may also need to be changed in the `Email Templates` tab on the admin panel for emails to send properly
|
> :warning: The Shipper Email (or defaultfrom) may also need to be changed in the `Email Templates` tab on the admin panel for emails to send properly
|
||||||
|
|
||||||
|
Since [mailgun-js](https://www.npmjs.com/package/mailgun-js) has been deprecated, this package now uses `mailgun.js` instead. In an effort to avoid breaking changes methods were added to convert existing configuration objects to work with the new package.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
**Path -** `config/plugins.js`
|
**Path -** `config/plugins.js`
|
||||||
@ -44,9 +46,9 @@ module.exports = ({ env }) => ({
|
|||||||
config: {
|
config: {
|
||||||
provider: 'mailgun',
|
provider: 'mailgun',
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
apiKey: env('MAILGUN_API_KEY'),
|
key: env('MAILGUN_API_KEY'), // Required
|
||||||
domain: env('MAILGUN_DOMAIN'), //Required if you have an account with multiple domains
|
domain: env('MAILGUN_DOMAIN'), // Required
|
||||||
host: env('MAILGUN_HOST', 'api.mailgun.net'), //Optional. If domain region is Europe use 'api.eu.mailgun.net'
|
url: env('MAILGUN_URL', 'https://api.mailgun.net'), //Optional. If domain region is Europe use 'https://api.eu.mailgun.net'
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
defaultFrom: 'myemail@protonmail.com',
|
defaultFrom: 'myemail@protonmail.com',
|
||||||
|
@ -0,0 +1,90 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const formData = require('form-data');
|
||||||
|
const Mailgun = require('mailgun.js');
|
||||||
|
|
||||||
|
const provider = require('../index');
|
||||||
|
|
||||||
|
describe('@strapi/provider-email-mailgun', () => {
|
||||||
|
describe('.convertProviderOptions()', () => {
|
||||||
|
it('returns an empty object', () => {
|
||||||
|
expect(provider.convertProviderOptions({})).toEqual({});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns the correct key', () => {
|
||||||
|
expect(
|
||||||
|
provider.convertProviderOptions({
|
||||||
|
apiKey: 'foo',
|
||||||
|
})
|
||||||
|
).toEqual({
|
||||||
|
key: 'foo',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('passes through unknown options', () => {
|
||||||
|
expect(
|
||||||
|
provider.convertProviderOptions({
|
||||||
|
username: 'foo',
|
||||||
|
})
|
||||||
|
).toEqual({
|
||||||
|
username: 'foo',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('correctly merges options objects with defaults', () => {
|
||||||
|
const defaults = {
|
||||||
|
username: 'api',
|
||||||
|
};
|
||||||
|
const providerOptions = {
|
||||||
|
key: 'foo',
|
||||||
|
username: 'bar',
|
||||||
|
domain: 'baz.example.com',
|
||||||
|
};
|
||||||
|
expect({ ...defaults, ...provider.convertProviderOptions(providerOptions) }).toEqual(
|
||||||
|
providerOptions
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Mailgun', () => {
|
||||||
|
it('successfully creates a new Mailgun client', () => {
|
||||||
|
const defaults = {
|
||||||
|
username: 'api',
|
||||||
|
};
|
||||||
|
const providerOptions = {
|
||||||
|
key: 'foo',
|
||||||
|
username: 'bar',
|
||||||
|
domain: 'baz.example.com',
|
||||||
|
};
|
||||||
|
const mailgun = new Mailgun(formData);
|
||||||
|
const mg = mailgun.client({
|
||||||
|
...defaults,
|
||||||
|
...provider.convertProviderOptions(providerOptions),
|
||||||
|
});
|
||||||
|
expect(mg).toMatchObject({
|
||||||
|
messages: {
|
||||||
|
request: {
|
||||||
|
headers: {},
|
||||||
|
key: providerOptions.key,
|
||||||
|
url: 'https://api.mailgun.net',
|
||||||
|
username: providerOptions.username,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('fails to create a new Mailgun client due to missing key', () => {
|
||||||
|
const defaults = {
|
||||||
|
username: 'api',
|
||||||
|
};
|
||||||
|
const providerOptions = {
|
||||||
|
username: 'bar',
|
||||||
|
domain: 'baz.example.com',
|
||||||
|
};
|
||||||
|
const mailgun = new Mailgun(formData);
|
||||||
|
expect(() => {
|
||||||
|
mailgun.client({ ...defaults, ...provider.convertProviderOptions(providerOptions) });
|
||||||
|
}).toThrowError('Parameter "key" is required');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@ -1,40 +1,53 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const mailgunFactory = require('mailgun-js');
|
const formData = require('form-data');
|
||||||
|
const Mailgun = require('mailgun.js');
|
||||||
const { removeUndefined } = require('@strapi/utils');
|
const { removeUndefined } = require('@strapi/utils');
|
||||||
|
|
||||||
|
const optionsMap = {
|
||||||
|
apiKey: { field: 'key', fn: value => value },
|
||||||
|
host: { field: 'url', fn: value => `https://${value || 'api.mailgun.net'}` },
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
convertProviderOptions(providerOptions = {}) {
|
||||||
|
const newOptions = {};
|
||||||
|
if (typeof providerOptions === 'object') {
|
||||||
|
Object.keys(providerOptions).forEach(key => {
|
||||||
|
if (Object.keys(optionsMap).includes(key)) {
|
||||||
|
newOptions[optionsMap[key].field] = optionsMap[key].fn(providerOptions[key]);
|
||||||
|
} else {
|
||||||
|
newOptions[key] = providerOptions[key];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return newOptions;
|
||||||
|
},
|
||||||
|
|
||||||
init(providerOptions = {}, settings = {}) {
|
init(providerOptions = {}, settings = {}) {
|
||||||
const mailgun = mailgunFactory({
|
const defaults = {
|
||||||
mute: false,
|
username: 'api',
|
||||||
...providerOptions,
|
};
|
||||||
});
|
const mailgun = new Mailgun(formData);
|
||||||
|
const mg = mailgun.client({ ...defaults, ...this.convertProviderOptions(providerOptions) });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
send(options) {
|
send(options) {
|
||||||
return new Promise((resolve, reject) => {
|
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;
|
||||||
const { from, to, cc, bcc, replyTo, subject, text, html, ...rest } = options;
|
|
||||||
|
|
||||||
let msg = {
|
let data = {
|
||||||
from: from || settings.defaultFrom,
|
from: from || settings.defaultFrom,
|
||||||
to,
|
to,
|
||||||
cc,
|
cc,
|
||||||
bcc,
|
bcc,
|
||||||
'h:Reply-To': replyTo || settings.defaultReplyTo,
|
'h:Reply-To': replyTo || settings.defaultReplyTo,
|
||||||
subject,
|
subject,
|
||||||
text,
|
text,
|
||||||
html,
|
html,
|
||||||
...rest,
|
...rest,
|
||||||
};
|
};
|
||||||
|
|
||||||
mailgun.messages().send(removeUndefined(msg), function(err) {
|
return mg.messages.create(providerOptions.domain, removeUndefined(data));
|
||||||
if (err) {
|
|
||||||
reject(err);
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-email-mailgun",
|
"name": "@strapi/provider-email-mailgun",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Mailgun provider for strapi email plugin",
|
"description": "Mailgun provider for strapi email plugin",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"email",
|
"email",
|
||||||
@ -36,8 +36,9 @@
|
|||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"mailgun-js": "0.22.0"
|
"form-data": "^4.0.0",
|
||||||
|
"mailgun.js": "5.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.22.0 <=16.x.x",
|
"node": ">=12.22.0 <=16.x.x",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-email-nodemailer",
|
"name": "@strapi/provider-email-nodemailer",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Nodemailer provider for Strapi 3",
|
"description": "Nodemailer provider for Strapi 3",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"strapi",
|
"strapi",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-email-sendgrid",
|
"name": "@strapi/provider-email-sendgrid",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Sendgrid provider for strapi email",
|
"description": "Sendgrid provider for strapi email",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"email",
|
"email",
|
||||||
@ -37,7 +37,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sendgrid/mail": "7.4.7",
|
"@sendgrid/mail": "7.4.7",
|
||||||
"@strapi/utils": "4.1.11"
|
"@strapi/utils": "4.1.12"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.22.0 <=16.x.x",
|
"node": ">=12.22.0 <=16.x.x",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-email-sendmail",
|
"name": "@strapi/provider-email-sendmail",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Sendmail provider for strapi email",
|
"description": "Sendmail provider for strapi email",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"email",
|
"email",
|
||||||
@ -35,7 +35,7 @@
|
|||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"sendmail": "^1.6.1"
|
"sendmail": "^1.6.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-upload-aws-s3",
|
"name": "@strapi/provider-upload-aws-s3",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "AWS S3 provider for strapi upload",
|
"description": "AWS S3 provider for strapi upload",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"upload",
|
"upload",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-upload-cloudinary",
|
"name": "@strapi/provider-upload-cloudinary",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Cloudinary provider for strapi upload",
|
"description": "Cloudinary provider for strapi upload",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"upload",
|
"upload",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"cloudinary": "^1.25.1",
|
"cloudinary": "^1.25.1",
|
||||||
"into-stream": "^5.1.0"
|
"into-stream": "^5.1.0"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-upload-local",
|
"name": "@strapi/provider-upload-local",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Local provider for strapi upload",
|
"description": "Local provider for strapi upload",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"upload",
|
"upload",
|
||||||
@ -35,7 +35,7 @@
|
|||||||
"test": "echo \"no tests yet\""
|
"test": "echo \"no tests yet\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/utils": "4.1.11",
|
"@strapi/utils": "4.1.12",
|
||||||
"fs-extra": "10.0.0"
|
"fs-extra": "10.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/provider-upload-rackspace",
|
"name": "@strapi/provider-upload-rackspace",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Rackspace provider for strapi upload",
|
"description": "Rackspace provider for strapi upload",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/babel-plugin-switch-ee-ce",
|
"name": "@strapi/babel-plugin-switch-ee-ce",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Babel plugin to switch from CE to EE at runtime",
|
"description": "Babel plugin to switch from CE to EE at runtime",
|
||||||
"repository": "git://github.com/strapi/strapi.git",
|
"repository": "git://github.com/strapi/strapi.git",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/logger",
|
"name": "@strapi/logger",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Strapi's logger",
|
"description": "Strapi's logger",
|
||||||
"homepage": "https://strapi.io",
|
"homepage": "https://strapi.io",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@strapi/typescript-utils",
|
"name": "@strapi/typescript-utils",
|
||||||
"version": "4.1.11",
|
"version": "4.1.12",
|
||||||
"description": "Typescript support for Strapi",
|
"description": "Typescript support for Strapi",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"strapi",
|
"strapi",
|
||||||
|
@ -63,16 +63,16 @@ const addMissingKeys = async lang => {
|
|||||||
translationFiles.forEach(addMissingKeyForSingleFile);
|
translationFiles.forEach(addMissingKeyForSingleFile);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.argv.length < 3) {
|
|
||||||
console.warn(
|
|
||||||
chalk.yellow(
|
|
||||||
'Please provide a language. For example:\nnode scripts/front/add-missing-keys-to-other-language.js vi'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
|
if (process.argv.length < 3) {
|
||||||
|
console.warn(
|
||||||
|
chalk.yellow(
|
||||||
|
'Please provide a language. For example:\nnode scripts/front/add-missing-keys-to-other-language.js vi'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
addMissingKeys(process.argv[2]).catch(err => console.error(err));
|
addMissingKeys(process.argv[2]).catch(err => console.error(err));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user