Skip to content

Commit

Permalink
Merge branch 'strapi:master' into strapi/fix/issue-13453-documentatio…
Browse files Browse the repository at this point in the history
…n-fix
  • Loading branch information
meganoob1337 committed Aug 1, 2022
2 parents f4519a8 + ce6c3f9 commit 2143c2d
Show file tree
Hide file tree
Showing 747 changed files with 36,136 additions and 8,565 deletions.
2 changes: 1 addition & 1 deletion .github/actions/check-pr-status/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "check-pr-status",
"version": "4.2.2",
"version": "4.3.0",
"main": "dist/index.js",
"license": "MIT",
"private": true,
Expand Down
3 changes: 3 additions & 0 deletions .github/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
displayName: '.github',
};
61 changes: 61 additions & 0 deletions examples/admin-development/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"shippedProposals": true,
"loose": true
}
],
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-transform-shorthand-properties",
"@babel/plugin-transform-block-scoping",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
],
[
"@babel/plugin-proposal-private-methods",
{
"loose": true
}
],
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-syntax-dynamic-import",
[
"@babel/plugin-proposal-object-rest-spread",
{
"loose": true,
"useBuiltIns": true
}
],
"@babel/plugin-transform-classes",
"@babel/plugin-transform-arrow-functions",
"@babel/plugin-transform-parameters",
"@babel/plugin-transform-destructuring",
"@babel/plugin-transform-spread",
"@babel/plugin-transform-for-of",
"babel-plugin-macros",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
[
"babel-plugin-polyfill-corejs3",
{
"method": "usage-global",
"absoluteImports": "core-js",
"version": "3.21.1"
}
]
]
}
15 changes: 15 additions & 0 deletions examples/admin-development/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
stories: [
'../*.stories.mdx',
'../../../packages/core/**/admin/src/**/*.stories.mdx',
'../../../packages/core/**/admin/src/**/*.stories.@(js|jsx|ts|tsx)',
'../../../packages/plugins/**/admin/src/**/*.stories.mdx',
'../../../packages/plugins/**/admin/src/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: '@storybook/react',
};
27 changes: 27 additions & 0 deletions examples/admin-development/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ThemeProvider, lightTheme } from '@strapi/design-system';
import { IntlProvider } from 'react-intl';
import { MemoryRouter } from 'react-router-dom';

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};

export const decorators = [
Story => (
<MemoryRouter>
<ThemeProvider theme={lightTheme}>
<IntlProvider messages={{}} textComponent="span" locale="en">
<main>
<Story />
</main>
</IntlProvider>
</ThemeProvider>
</MemoryRouter>
),
];
9 changes: 9 additions & 0 deletions examples/admin-development/Introduction.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Meta } from '@storybook/addon-docs';

<Meta title="Introduction" />

# Welcome to the documentation

Use this app to develop local components in plugins.

To do so just create a story in your plugins `./admin/src` folder
41 changes: 41 additions & 0 deletions examples/admin-development/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "admin-development",
"version": "4.3.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.16.7",
"@babel/plugin-proposal-class-properties": "7.16.7",
"@babel/plugin-proposal-decorators": "7.16.7",
"@babel/plugin-proposal-export-default-from": "7.16.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.16.7",
"@babel/plugin-proposal-object-rest-spread": "7.16.7",
"@babel/plugin-proposal-optional-chaining": "7.16.7",
"@babel/plugin-proposal-private-methods": "7.16.7",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-arrow-functions": "7.16.7",
"@babel/plugin-transform-block-scoping": "7.16.7",
"@babel/plugin-transform-classes": "7.16.7",
"@babel/plugin-transform-destructuring": "7.17.7",
"@babel/plugin-transform-for-of": "7.16.7",
"@babel/plugin-transform-parameters": "7.16.7",
"@babel/plugin-transform-shorthand-properties": "7.16.7",
"@babel/plugin-transform-spread": "7.16.7",
"@babel/preset-env": "7.16.11",
"@babel/preset-typescript": "7.16.7",
"@storybook/addon-actions": "6.4.10",
"@storybook/addon-essentials": "6.4.10",
"@storybook/addon-interactions": "6.4.10",
"@storybook/addon-links": "6.4.10",
"@storybook/react": "^6.3.7",
"@storybook/testing-library": "^0.0.9",
"babel-loader": "^8.2.4",
"babel-plugin-macros": "3.1.0",
"babel-plugin-polyfill-corejs3": "0.5.2",
"core-js": "3.21.1"
},
"scripts": {
"storybook": "start-storybook -p 6007",
"build-storybook": "build-storybook"
}
}
2 changes: 1 addition & 1 deletion examples/getstarted/config/src/cron-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
*/
// '0 0 1 * * 1': async function({ strapi }) {
// // Add your own logic here (e.g. send a queue of email, create a database backup, etc.).
// }
// },
// 'myJob': {
// task: ({ strapi }) => { /* Add your own logic here */ },
// options: {
Expand Down
11 changes: 0 additions & 11 deletions examples/getstarted/global.d.ts

This file was deleted.

24 changes: 12 additions & 12 deletions examples/getstarted/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "getstarted",
"private": true,
"version": "4.2.2",
"version": "4.3.0",
"description": "A Strapi application.",
"scripts": {
"develop": "strapi develop",
Expand All @@ -12,17 +12,17 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/admin": "4.2.2",
"@strapi/plugin-documentation": "4.2.2",
"@strapi/plugin-graphql": "4.2.2",
"@strapi/plugin-i18n": "4.2.2",
"@strapi/plugin-sentry": "4.2.2",
"@strapi/plugin-users-permissions": "4.2.2",
"@strapi/provider-email-mailgun": "4.2.2",
"@strapi/provider-upload-aws-s3": "4.2.2",
"@strapi/provider-upload-cloudinary": "4.2.2",
"@strapi/strapi": "4.2.2",
"@strapi/utils": "4.2.2",
"@strapi/admin": "4.3.0",
"@strapi/plugin-documentation": "4.3.0",
"@strapi/plugin-graphql": "4.3.0",
"@strapi/plugin-i18n": "4.3.0",
"@strapi/plugin-sentry": "4.3.0",
"@strapi/plugin-users-permissions": "4.3.0",
"@strapi/provider-email-mailgun": "4.3.0",
"@strapi/provider-upload-aws-s3": "4.3.0",
"@strapi/provider-upload-cloudinary": "4.3.0",
"@strapi/strapi": "4.3.0",
"@strapi/utils": "4.3.0",
"@vscode/sqlite3": "5.0.8",
"better-sqlite3": "7.4.6",
"lodash": "4.17.21",
Expand Down
9 changes: 9 additions & 0 deletions examples/getstarted/src/admin/app.example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const config = {
locales: ['fr'],
};
const bootstrap = () => {};

export default {
config,
bootstrap,
};
6 changes: 0 additions & 6 deletions examples/getstarted/src/admin/app.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,6 @@
"localized": true
}
}
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string",
"maxLength": 3
},
"time": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "time"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions examples/kitchensink-ts/config/admin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default ({ env }) => ({
auth: {
secret: env('ADMIN_JWT_SECRET', 'example-token'),
},
apiToken: {
salt: env('API_TOKEN_SALT', 'example-salt'),
},
});
7 changes: 7 additions & 0 deletions examples/kitchensink-ts/config/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
rest: {
defaultLimit: 25,
maxLimit: 100,
withCount: true,
},
};
11 changes: 11 additions & 0 deletions examples/kitchensink-ts/config/database.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import path from 'path';

export default ({ env }) => ({
connection: {
client: 'sqlite',
connection: {
filename: path.join(__dirname, '..', '..', env('DATABASE_FILENAME', '.tmp/data.db')),
},
useNullAsDefault: true,
},
});
12 changes: 12 additions & 0 deletions examples/kitchensink-ts/config/middlewares.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default [
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
'strapi::favicon',
'strapi::public',
];
7 changes: 7 additions & 0 deletions examples/kitchensink-ts/config/server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
app: {
keys: env.array('APP_KEYS'),
},
});
File renamed without changes.
29 changes: 29 additions & 0 deletions examples/kitchensink-ts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "kitchensink-ts",
"private": true,
"version": "4.3.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"dependencies": {
"@strapi/plugin-i18n": "4.1.12",
"@strapi/plugin-users-permissions": "4.1.12",
"@strapi/strapi": "4.2.2",
"better-sqlite3": "7.4.6"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "getstarted"
},
"engines": {
"node": ">=14.19.1 <=16.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}
File renamed without changes.
5 changes: 5 additions & 0 deletions examples/kitchensink-ts/src/admin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "@strapi/typescript-utils/tsconfigs/admin",
"include": ["../plugins/**/admin/src/**/*", "./"],
"exclude": ["node_modules/", "build/", "dist/", "**/*.test.ts"]
}
6 changes: 6 additions & 0 deletions examples/kitchensink-ts/src/admin/webpack.config.example.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default (config, webpack) => {
// Note: we provide webpack above so you should not `require` it
// Perform customizations to webpack config
// Important: return the modified config
return config;
};
File renamed without changes.
20 changes: 20 additions & 0 deletions examples/kitchensink-ts/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import '@strapi/strapi';

export default {
/**
* An asynchronous register function that runs before
* your application is initialized.
*
* This gives you an opportunity to extend code.
*/
register(/*{ strapi }*/) {},

/**
* An asynchronous bootstrap function that runs before
* your application gets started.
*
* This gives you an opportunity to set up your data model,
* run jobs, or perform some special logic.
*/
bootstrap(/*{ strapi }*/) {},
};

0 comments on commit 2143c2d

Please sign in to comment.