chore: pretty codebase (#18835)

This commit is contained in:
Josh 2023-11-17 14:48:05 +00:00 committed by GitHub
parent daaec91b04
commit a549feb253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
94 changed files with 2764 additions and 2701 deletions

View File

@ -34,6 +34,22 @@ jobs:
with: with:
filters: .github/filters.yaml filters: .github/filters.yaml
pretty:
name: 'pretty (node: 20)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: nrwl/nx-set-shas@v3
- name: Monorepo install
uses: ./.github/actions/yarn-nm-install
- name: Run lint
run: yarn prettier:check
lint: lint:
name: 'lint (node: 20)' name: 'lint (node: 20)'
needs: [build] needs: [build]

View File

@ -2,4 +2,4 @@ coverage
test-apps test-apps
dist dist
build build
.cache .strapi

View File

@ -2,13 +2,14 @@
title: Strapi (WIP) title: Strapi (WIP)
slug: /api/Strapi slug: /api/Strapi
tags: tags:
- class - class
- public - public
- global - global
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 3 toc_max_heading_level: 3
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# Strapi # Strapi
@ -34,9 +35,9 @@ An instance of Strapi class is available as a global in any Strapi project: `glo
- `serveAdminPanel`: <Type>Boolean</Type> **Default:** true - `serveAdminPanel`: <Type>Boolean</Type> **Default:** true
- Should the admin panel be loaded and serve as a web client - Should the admin panel be loaded and serve as a web client
- The admin panel build will not be delivered if false - The admin panel build will not be delivered if false
- `appDir`: <Type>String</Type> **Default:** `process.cwd()` - `appDir`: <Type>String</Type> **Default:** `process.cwd()`
- The directory relative or absolute path where Strapi will write every file (schemas, generated APIs, controllers or services) - The directory relative or absolute path where Strapi will write every file (schemas, generated APIs, controllers or services)
- `distDir`: <Type>String</Type> **Default:** appDir value - `distDir`: <Type>String</Type> **Default:** appDir value
- The directory relative or absolute path where Strapi will read configurations, schemas and any compiled code - The directory relative or absolute path where Strapi will read configurations, schemas and any compiled code
Instances of the Strapi class can be created using the new keyword. Instances of the Strapi class can be created using the new keyword.
@ -46,6 +47,7 @@ const strapiInstance = new Strapi();
``` ```
### `strapi.container` ### `strapi.container`
- [<Type>Container</Type>](./container) - [<Type>Container</Type>](./container)
The container provides a simple and efficient way to register and manage resources, making it easy to access and use them throughout the application. The container provides a simple and efficient way to register and manage resources, making it easy to access and use them throughout the application.
@ -54,6 +56,7 @@ By registering a registry with the container, it can be easily retrieved by othe
See [Container](./container). See [Container](./container).
### `strapi.dirs` ### `strapi.dirs`
- <Type>Object</Type> - <Type>Object</Type>
Stored paths of file system. Stored paths of file system.
@ -63,24 +66,26 @@ Stored paths of file system.
- `dirs.app`: <Type>[StrapiPathObject](#strapipathobject)</Type> - `dirs.app`: <Type>[StrapiPathObject](#strapipathobject)</Type>
- Sources folder - Sources folder
- `dirs.static`: <Type>Object</Type> Define path to directories involving web client display - `dirs.static`: <Type>Object</Type> Define path to directories involving web client display
- `public`: <Type>String</Type> Path to the folder to serve publicly (like files, images, etc..) - `public`: <Type>String</Type> Path to the folder to serve publicly (like files, images, etc..)
#### StrapiPathObject #### StrapiPathObject
- <Type>Object</Type> - <Type>Object</Type>
A set of paths to specific Strapi project parts. A set of paths to specific Strapi project parts.
- `root`: <Type>String</Type> Root path - `root`: <Type>String</Type> Root path
- `src`: <Type>String</Type> Sources route path to project files - `src`: <Type>String</Type> Sources route path to project files
- `api`: <Type>String</Type> Path to the folder containing project developers' API files (content-types, controllers, services, routes, etc..) - `api`: <Type>String</Type> Path to the folder containing project developers' API files (content-types, controllers, services, routes, etc..)
- `components`: <Type>String</Type> Path to the folder containing project developers' components - `components`: <Type>String</Type> Path to the folder containing project developers' components
- `policies`: <Type>String</Type> Path to the folder where the Strapi project developers' policies are stored - `policies`: <Type>String</Type> Path to the folder where the Strapi project developers' policies are stored
- A set of functions that check the state of the data and prevent the access to the API accordingly - A set of functions that check the state of the data and prevent the access to the API accordingly
- `middlewares`: <Type>String</Type> Path to the folder where the Strapi project developers' middlewares are stored - `middlewares`: <Type>String</Type> Path to the folder where the Strapi project developers' middlewares are stored
- A set of function that wrap around routes and requests - A set of function that wrap around routes and requests
- `config`: <Type>String</Type> Path to the folder containing project developers' config files - `config`: <Type>String</Type> Path to the folder containing project developers' config files
### `strapi.isLoaded` ### `strapi.isLoaded`
- <Type>Boolean</Type> - <Type>Boolean</Type>
- `true`: Everything (all `register` and `bootstrap` functions available in your strapi project) has been loaded - `true`: Everything (all `register` and `bootstrap` functions available in your strapi project) has been loaded
@ -95,44 +100,49 @@ Reload the app.
This function defines itself at the construction of the Strapi class. This function defines itself at the construction of the Strapi class.
### `strapi.server` ### `strapi.server`
- [<Type>StrapiServer</Type>](./strapi-server) - [<Type>StrapiServer</Type>](./strapi-server)
Strapi server object. Strapi server object.
### `strapi.fs` ### `strapi.fs`
- [<Type>StrapiFS</Type>](StrapiFS) - [<Type>StrapiFS</Type>](StrapiFS)
Wrapper around [FS NodeJS module](https://nodejs.org/docs/latest-v18.x/api/fs.html). Wrapper around [FS NodeJS module](https://nodejs.org/docs/latest-v18.x/api/fs.html).
### `strapi.eventHub` ### `strapi.eventHub`
- [<Type>EventHub</Type>](EventHub) - [<Type>EventHub</Type>](EventHub)
The `strapi.eventHub` object is used to manipulate events within a Strapi project. It is an instance of the built-in EventEmitter class from Node.js, which provides a simple way to emit and listen for events. The `strapi.eventHub` object is used to manipulate events within a Strapi project. It is an instance of the built-in EventEmitter class from Node.js, which provides a simple way to emit and listen for events.
The `strapi.eventHub` object is created using the `createEventHub()` function in the [EventHub](EventHub) module of the Strapi core. This function returns a new instance of the EventHub class, which extends the EventEmitter class and adds some additional functionality specific to Strapi. The `strapi.eventHub` object is created using the `createEventHub()` function in the [EventHub](EventHub) module of the Strapi core. This function returns a new instance of the EventHub class, which extends the EventEmitter class and adds some additional functionality specific to Strapi.
#### Examples: #### Examples:
```javascript ```javascript
// Listen for a 'user.updated' event and log the data // Listen for a 'user.updated' event and log the data
strapi.eventHub.on('user.updated', (data) => { strapi.eventHub.on('user.updated', (data) => {
console.log(`User ${data.id} has been updated`); console.log(`User ${data.id} has been updated`);
}); });
// Emit a 'user.created' event with some data // Emit a 'user.created' event with some data
strapi.eventHub.emit('user.created', { username: 'johndoe', email: 'johndoe@example.com' }); strapi.eventHub.emit('user.created', { username: 'johndoe', email: 'johndoe@example.com' });
``` ```
In this example, we are emitting a `user.created` event with some data attached to it, and then listening for a user.updated event and logging the data. These events can be used to trigger actions within the Strapi application or to communicate with external systems. In this example, we are emitting a `user.created` event with some data attached to it, and then listening for a user.updated event and logging the data. These events can be used to trigger actions within the Strapi application or to communicate with external systems.
For more information on how to use the EventEmitter class and its methods, see the [Node.js documentation](ttps://nodejs.org/docs/latest-v18.x/api/events.html#class-eventemitter). For more information on how to use the EventEmitter class and its methods, see the [Node.js documentation](ttps://nodejs.org/docs/latest-v18.x/api/events.html#class-eventemitter).
### `strapi.startupLogger` ### `strapi.startupLogger`
- [<Type>StartupLogger</Type>](StartupLogger) - [<Type>StartupLogger</Type>](StartupLogger)
Object containing predefined logger functions. Used for Strapi startup. (do not use as a logger elsewhere) Object containing predefined logger functions. Used for Strapi startup. (do not use as a logger elsewhere)
### `strapi.log` ### `strapi.log`
- [<Type>Winston</Type>](https://github.com/winstonjs/winston#creating-your-own-logger) - [<Type>Winston</Type>](https://github.com/winstonjs/winston#creating-your-own-logger)
A logger provided by Strapi that uses the Winston logging library. It is the result of calling the `winston.createLogger()` function with the configuration defined by the user of the Strapi application. A logger provided by Strapi that uses the Winston logging library. It is the result of calling the `winston.createLogger()` function with the configuration defined by the user of the Strapi application.
@ -140,6 +150,7 @@ A logger provided by Strapi that uses the Winston logging library. It is the res
The logger provides various methods for logging messages at different levels of severity, including error, warn, info, verbose, debug, and silly. The logging level can be set via the configuration to control which messages are logged. The logger provides various methods for logging messages at different levels of severity, including error, warn, info, verbose, debug, and silly. The logging level can be set via the configuration to control which messages are logged.
#### Examples #### Examples
```javascript ```javascript
// Log an error message // Log an error message
strapi.log.error('Failed to start server', { error: err }); strapi.log.error('Failed to start server', { error: err });
@ -159,16 +170,19 @@ strapi.log.debug('API request received', { method: req.method, path: req.path })
// Log a silly message // Log a silly message
strapi.log.silly('Entered loop', { count: i }); strapi.log.silly('Entered loop', { count: i });
``` ```
In these examples, we are logging messages at different levels of severity, including error, warn, info, verbose, debug, and silly. We are also passing in metadata as an object in the second parameter of each logging method. In these examples, we are logging messages at different levels of severity, including error, warn, info, verbose, debug, and silly. We are also passing in metadata as an object in the second parameter of each logging method.
The messages logged by strapi.log will be output according to the logging configuration set by the user of the Strapi application. This configuration determines which messages are logged and where they are logged (e.g. console, file, etc.). The messages logged by strapi.log will be output according to the logging configuration set by the user of the Strapi application. This configuration determines which messages are logged and where they are logged (e.g. console, file, etc.).
### `strapi.cron` ### `strapi.cron`
- [<Type>CronService</Type>](Cron) - [<Type>CronService</Type>](Cron)
Module to schedule cron jobs for Strapi project. It is an instance of a custom Cron object. Module to schedule cron jobs for Strapi project. It is an instance of a custom Cron object.
### `strapi.telemetry` ### `strapi.telemetry`
- [<Type>TelemetryService</Type>](Telemetry) - [<Type>TelemetryService</Type>](Telemetry)
The `strapi.telemetry` property provides access to the telemetry service instance. This service collects anonymous usage data about your Strapi application to help the Strapi team improve the product. The `strapi.telemetry` property provides access to the telemetry service instance. This service collects anonymous usage data about your Strapi application to help the Strapi team improve the product.
@ -176,6 +190,7 @@ The `strapi.telemetry` property provides access to the telemetry service instanc
By default, the telemetry service is enabled, but you can disable it by setting the telemetryDisabled property to true in your application's package.json file, or by setting the `STRAPI_TELEMETRY_DISABLED` environment variable to true. You can also disable telemetry programmatically by setting the isDisabled property of the `strapi.telemetry` instance to true. By default, the telemetry service is enabled, but you can disable it by setting the telemetryDisabled property to true in your application's package.json file, or by setting the `STRAPI_TELEMETRY_DISABLED` environment variable to true. You can also disable telemetry programmatically by setting the isDisabled property of the `strapi.telemetry` instance to true.
### `strapi.requestContext` ### `strapi.requestContext`
- <Type>Object</Type> Context Storage - <Type>Object</Type> Context Storage
- `run(store, cb)`: <Type>Function</Type> - `run(store, cb)`: <Type>Function</Type>
@ -186,6 +201,7 @@ By default, the telemetry service is enabled, but you can disable it by setting
The request context stores the ctx object from KoaJS on each request. This allows users to have access to the context from anywhere through the Strapi instance. The request context stores the ctx object from KoaJS on each request. This allows users to have access to the context from anywhere through the Strapi instance.
### `strapi.customFields` ### `strapi.customFields`
- <Type>Object</Type> - <Type>Object</Type>
- `register(customField)`: <Type>Function</Type> Register a new custom field - `register(customField)`: <Type>Function</Type> Register a new custom field
@ -193,15 +209,17 @@ The request context stores the ctx object from KoaJS on each request. This allow
This property is a shortcut to `strapi.container.get('custom-fields').add(customField)`. This property is a shortcut to `strapi.container.get('custom-fields').add(customField)`.
#### Examples #### Examples
```javascript ```javascript
strapi.customFields.register({ strapi.customFields.register({
name: 'color', name: 'color',
plugin: 'color-picker', plugin: 'color-picker',
type: 'string', type: 'string',
}); });
``` ```
### `strapi.config` ### `strapi.config`
- <Type>Object</Type> - <Type>Object</Type>
Shortcut to `strapi.container.get('config')`. Shortcut to `strapi.container.get('config')`.
@ -209,6 +227,7 @@ Shortcut to `strapi.container.get('config')`.
See the [config container](#config). See the [config container](#config).
### `strapi.services` ### `strapi.services`
- <Type>Object[]</Type> - <Type>Object[]</Type>
Shortcut to `strapi.container.get('services').getAll()`. Shortcut to `strapi.container.get('services').getAll()`.
@ -216,6 +235,7 @@ Shortcut to `strapi.container.get('services').getAll()`.
See the [services' container](#services). See the [services' container](#services).
### `strapi.service(uid)` ### `strapi.service(uid)`
- `uid`: <Type>String</Type> - `uid`: <Type>String</Type>
Shortcut to `strapi.container.get('services').get(uid)`. Shortcut to `strapi.container.get('services').get(uid)`.
@ -223,6 +243,7 @@ Shortcut to `strapi.container.get('services').get(uid)`.
See the [services' container](#services). See the [services' container](#services).
### `strapi.controllers` ### `strapi.controllers`
- <Type>Object[]</Type> - <Type>Object[]</Type>
Shortcut to `strapi.container.get('controllers').getAll()`. Shortcut to `strapi.container.get('controllers').getAll()`.
@ -230,6 +251,7 @@ Shortcut to `strapi.container.get('controllers').getAll()`.
See the [controllers' container](#controllers). See the [controllers' container](#controllers).
### `strapi.controller(uid)` ### `strapi.controller(uid)`
- `uid`: <Type>String</Type> - `uid`: <Type>String</Type>
Shortcut to `strapi.container.get('controllers').get(uid)`. Shortcut to `strapi.container.get('controllers').get(uid)`.
@ -237,6 +259,7 @@ Shortcut to `strapi.container.get('controllers').get(uid)`.
See the [controllers' container](#controllers). See the [controllers' container](#controllers).
### `strapi.contentTypes` ### `strapi.contentTypes`
- <Type>Object[]</Type> - <Type>Object[]</Type>
Shortcut to `strapi.container.get('content-types').getAll()`. Shortcut to `strapi.container.get('content-types').getAll()`.
@ -244,6 +267,7 @@ Shortcut to `strapi.container.get('content-types').getAll()`.
See the [content-types' container](#content-types). See the [content-types' container](#content-types).
### `strapi.contentType(name)` ### `strapi.contentType(name)`
- `name`: <Type>String</Type> - `name`: <Type>String</Type>
Shortcut to `strapi.container.get('content-types').get(name)`. Shortcut to `strapi.container.get('content-types').get(name)`.
@ -251,6 +275,7 @@ Shortcut to `strapi.container.get('content-types').get(name)`.
See the [content-types' container](#content-types). See the [content-types' container](#content-types).
### `strapi.policies` ### `strapi.policies`
- <Type>Object[]</Type> - <Type>Object[]</Type>
Shortcut to `strapi.container.get('policies').getAll()`. Shortcut to `strapi.container.get('policies').getAll()`.
@ -258,6 +283,7 @@ Shortcut to `strapi.container.get('policies').getAll()`.
See the [policies' container](#policies). See the [policies' container](#policies).
### `strapi.policy(name)` ### `strapi.policy(name)`
- `name`: <Type>String</Type> - `name`: <Type>String</Type>
Shortcut to `strapi.container.get('policies').get(name)`. Shortcut to `strapi.container.get('policies').get(name)`.
@ -265,6 +291,7 @@ Shortcut to `strapi.container.get('policies').get(name)`.
See the [policies' container](#policies). See the [policies' container](#policies).
### `strapi.middlewares` ### `strapi.middlewares`
- <Type>Object[]</Type> - <Type>Object[]</Type>
Shortcut to `strapi.container.get('middlewares').getAll()`. Shortcut to `strapi.container.get('middlewares').getAll()`.
@ -272,6 +299,7 @@ Shortcut to `strapi.container.get('middlewares').getAll()`.
See the [middlewares container](#middlewares). See the [middlewares container](#middlewares).
### `strapi.middleware(name)` ### `strapi.middleware(name)`
- `name`: <Type>String</Type> - `name`: <Type>String</Type>
Shortcut to `strapi.container.get('middlewares').get(name)`. Shortcut to `strapi.container.get('middlewares').get(name)`.
@ -279,6 +307,7 @@ Shortcut to `strapi.container.get('middlewares').get(name)`.
See the [middlewares container](#middlewares). See the [middlewares container](#middlewares).
### `strapi.plugins` ### `strapi.plugins`
- <Type>Object[]</Type> - <Type>Object[]</Type>
Shortcut to `strapi.container.get('plugins').getAll()`. Shortcut to `strapi.container.get('plugins').getAll()`.
@ -286,6 +315,7 @@ Shortcut to `strapi.container.get('plugins').getAll()`.
See the [plugins' container](#plugins). See the [plugins' container](#plugins).
### `strapi.plugin(name)` ### `strapi.plugin(name)`
- `name`: <Type>String</Type> - `name`: <Type>String</Type>
Shortcut to `strapi.container.get('plugins').get(name)`. Shortcut to `strapi.container.get('plugins').get(name)`.
@ -293,6 +323,7 @@ Shortcut to `strapi.container.get('plugins').get(name)`.
See the [plugins' container](#plugins). See the [plugins' container](#plugins).
### `strapi.hooks` ### `strapi.hooks`
- <Type>Object[]</Type> - <Type>Object[]</Type>
Shortcut to `strapi.container.get('hooks').getAll()`. Shortcut to `strapi.container.get('hooks').getAll()`.
@ -300,6 +331,7 @@ Shortcut to `strapi.container.get('hooks').getAll()`.
See the [hooks' container](#hooks). See the [hooks' container](#hooks).
### `strapi.hook(name)` ### `strapi.hook(name)`
- `name`: <Type>String</Type> - `name`: <Type>String</Type>
Shortcut to `strapi.container.get('hooks').get(name)`. Shortcut to `strapi.container.get('hooks').get(name)`.
@ -307,6 +339,7 @@ Shortcut to `strapi.container.get('hooks').get(name)`.
See the [hooks' container](#hooks). See the [hooks' container](#hooks).
### `strapi.api` ### `strapi.api`
- <Type>Object[]</Type> - <Type>Object[]</Type>
Shortcut to `strapi.container.get('apis').getAll()`. Shortcut to `strapi.container.get('apis').getAll()`.
@ -314,6 +347,7 @@ Shortcut to `strapi.container.get('apis').getAll()`.
See the [apis container](#apis). See the [apis container](#apis).
### `strapi.auth` ### `strapi.auth`
- <Type>Object</Type> - <Type>Object</Type>
Shortcut to `strapi.container.get('auth')`. Shortcut to `strapi.container.get('auth')`.
@ -321,6 +355,7 @@ Shortcut to `strapi.container.get('auth')`.
See the [auth' container](#auth). See the [auth' container](#auth).
### `strapi.contentAPI` ### `strapi.contentAPI`
- <Type>Object</Type> - <Type>Object</Type>
Shortcut to `strapi.container.get('content-api')`. Shortcut to `strapi.container.get('content-api')`.
@ -328,6 +363,7 @@ Shortcut to `strapi.container.get('content-api')`.
See the [content-api container](#content-api). See the [content-api container](#content-api).
### `strapi.sanitizers` ### `strapi.sanitizers`
- <Type>Object</Type> - <Type>Object</Type>
Shortcut to `strapi.container.get('sanitizers')`. Shortcut to `strapi.container.get('sanitizers')`.
@ -335,6 +371,7 @@ Shortcut to `strapi.container.get('sanitizers')`.
See the [sanitizers' container](#sanitizers). See the [sanitizers' container](#sanitizers).
### `strapi.validators` ### `strapi.validators`
- <Type>Object</Type> - <Type>Object</Type>
Shortcut to `strapi.container.get('validators')`. Shortcut to `strapi.container.get('validators')`.
@ -342,6 +379,7 @@ Shortcut to `strapi.container.get('validators')`.
See the [validators' container](#validators). See the [validators' container](#validators).
### `strapi.start()` ### `strapi.start()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -349,6 +387,7 @@ TODO
::: :::
### `strapi.destroy()` ### `strapi.destroy()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -362,6 +401,7 @@ TODO
::: :::
### `strapi.openAdmin({ isInitialized })` ### `strapi.openAdmin({ isInitialized })`
- Returns: Promise - Returns: Promise
:::info :::info
@ -369,6 +409,7 @@ TODO
::: :::
### `strapi.postListen()` ### `strapi.postListen()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -376,6 +417,7 @@ TODO
::: :::
### `strapi.listen()` ### `strapi.listen()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -395,6 +437,7 @@ TODO
::: :::
### `strapi.loadAdmin()` ### `strapi.loadAdmin()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -402,6 +445,7 @@ TODO
::: :::
### `strapi.loadPlugins()` ### `strapi.loadPlugins()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -409,6 +453,7 @@ TODO
::: :::
### `strapi.loadPolicies()` ### `strapi.loadPolicies()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -416,6 +461,7 @@ TODO
::: :::
### `strapi.loadAPIs()` ### `strapi.loadAPIs()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -423,6 +469,7 @@ TODO
::: :::
### `strapi.loadComponents()` ### `strapi.loadComponents()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -430,6 +477,7 @@ TODO
::: :::
### `strapi.loadMiddlewares()` ### `strapi.loadMiddlewares()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -437,6 +485,7 @@ TODO
::: :::
### `strapi.loadApp()` ### `strapi.loadApp()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -444,6 +493,7 @@ TODO
::: :::
### `strapi.loadSanitizers()` ### `strapi.loadSanitizers()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -457,6 +507,7 @@ TODO
::: :::
### `strapi.register()` ### `strapi.register()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -464,6 +515,7 @@ TODO
::: :::
### `strapi.bootstrap()` ### `strapi.bootstrap()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -471,6 +523,7 @@ TODO
::: :::
### `strapi.load()` ### `strapi.load()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -478,6 +531,7 @@ TODO
::: :::
### `strapi.startWebhooks()` ### `strapi.startWebhooks()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -491,6 +545,7 @@ TODO
::: :::
### `strapi.runLifecyclesFunctions()` ### `strapi.runLifecyclesFunctions()`
- Returns: Promise - Returns: Promise
:::info :::info
@ -498,6 +553,7 @@ TODO
::: :::
### `strapi.getModel(uid)` ### `strapi.getModel(uid)`
- `uid`: <Type>String</Type> - `uid`: <Type>String</Type>
:::info :::info
@ -505,6 +561,7 @@ TODO
::: :::
### `strapi.query(uid)` ### `strapi.query(uid)`
- `uid`: <Type>String</Type> - `uid`: <Type>String</Type>
:::info :::info
@ -516,6 +573,7 @@ TODO
The strapi containers are accessible via `strapi.container.get('name-of-the-container')`. The strapi containers are accessible via `strapi.container.get('name-of-the-container')`.
### `config` ### `config`
- <Type>Object</Type> - <Type>Object</Type>
- `get(path, defaultValue)`: <Type>Function</Type> - `get(path, defaultValue)`: <Type>Function</Type>
@ -528,7 +586,7 @@ The strapi containers are accessible via `strapi.container.get('name-of-the-cont
- `has(path)`: <Type>Function</Type> - `has(path)`: <Type>Function</Type>
- `path`: <Type>String</Type> - `path`: <Type>String</Type>
- Returns: <Type>Boolean</Type> - Does the `path` match a value stored in the config container. - Returns: <Type>Boolean</Type> - Does the `path` match a value stored in the config container.
- `launchedAt`: <Type>Number</Type> **Default:** `Date.now()` - `launchedAt`: <Type>Number</Type> **Default:** `Date.now()`
Date in milliseconds when the server has started Date in milliseconds when the server has started
- `serveAdminPanel`: <Type>Boolean</Type> **Default:** `true` - `serveAdminPanel`: <Type>Boolean</Type> **Default:** `true`
See [Strapi constructor](#new-strapiopts) options See [Strapi constructor](#new-strapiopts) options
@ -608,4 +666,3 @@ TODO
:::info :::info
TODO TODO
::: :::

View File

@ -2,12 +2,13 @@
title: API (WIP) title: API (WIP)
slug: /api/API slug: /api/API
tags: tags:
- module - module
- public - public
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 3 toc_max_heading_level: 3
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# API # API

View File

@ -2,12 +2,13 @@
title: Container title: Container
slug: /api/container slug: /api/container
tags: tags:
- module - module
- public - public
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 5 toc_max_heading_level: 5
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# Container # Container
@ -31,8 +32,8 @@ The container module permits to generate containers.
const container = createContainer(strapi); const container = createContainer(strapi);
container.register('config', { container.register('config', {
get: (configName) => {}, get: (configName) => {},
set: (configName, value) => {} set: (configName, value) => {},
}); });
const dbConfig = container.get('config').get('database'); const dbConfig = container.get('config').get('database');
@ -95,8 +96,9 @@ container.get('boolean');
container.get('boolean', false); container.get('boolean', false);
// true // true
``` ```
### `container.extend()` ### `container.extend()`
:::info :::info
To be developed To be developed
::: :::

View File

@ -2,12 +2,13 @@
title: Cron Service title: Cron Service
slug: /api/Cron slug: /api/Cron
tags: tags:
- module - module
- public - public
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 3 toc_max_heading_level: 3
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# Cron # Cron
@ -20,7 +21,6 @@ Current state: **Stable**
The Strapi Cron Service provides a way to add, remove, start, and stop cron jobs in a Strapi application. The Strapi Cron Service provides a way to add, remove, start, and stop cron jobs in a Strapi application.
## Module: Cron Service ## Module: Cron Service
### createCronService() ### createCronService()
@ -43,6 +43,7 @@ Adds one or more cron tasks to the service.
- If the value is an object, its `task` property is used as the task function, and its `options` property is used as the cron expression options. - If the value is an object, its `task` property is used as the task function, and its `options` property is used as the cron expression options.
#### Example #### Example
```javascript ```javascript
const { createCronService } = require('packages/core/strapi/lib/services/cron.js'); const { createCronService } = require('packages/core/strapi/lib/services/cron.js');
@ -71,6 +72,7 @@ Removes a cron task from the service.
- The `name` parameter is the name of the task to remove. - The `name` parameter is the name of the task to remove.
#### Example #### Example
```javascript ```javascript
const { createCronService } = require('packages/core/strapi/lib/services/cron.js'); const { createCronService } = require('packages/core/strapi/lib/services/cron.js');
@ -99,6 +101,7 @@ Starts the cron service.
- Schedules all the cron jobs. - Schedules all the cron jobs.
#### Example #### Example
```javascript ```javascript
const { createCronService } = require('packages/core/strapi/lib/services/cron.js'); const { createCronService } = require('packages/core/strapi/lib/services/cron.js');
@ -127,6 +130,7 @@ Stops the cron service.
- Cancels all the scheduled jobs. - Cancels all the scheduled jobs.
#### Example #### Example
```javascript ```javascript
const { createCronService } = require('packages/core/strapi/lib/services/cron.js'); const { createCronService } = require('packages/core/strapi/lib/services/cron.js');
@ -159,6 +163,7 @@ Destroys the cron service.
- Clears the list of cron jobs. - Clears the list of cron jobs.
#### Example #### Example
```javascript ```javascript
const { createCronService } = require('packages/core/strapi/lib/services/cron.js'); const { createCronService } = require('packages/core/strapi/lib/services/cron.js');
@ -184,12 +189,13 @@ cron.destroy();
## Properties ## Properties
### `cron.jobs` ### `cron.jobs`
- <Type>Array</Type> - <Type>Array</Type>
- <Type>Object</Type> - <Type>Object</Type>
- `job`: [<Type>Job</Type>](https://github.com/node-schedule/node-schedule) - Job object by node-schedule - `job`: [<Type>Job</Type>](https://github.com/node-schedule/node-schedule) - Job object by node-schedule
- `options`: <Type>String</Type> - String representing the recurrence of the job ( like '*/5 * * * *' ) - `options`: <Type>String</Type> - String representing the recurrence of the job ( like '_/5 _ \* \* \*' )
- `name`: <Type>String</Type> - The name of the task associated to the job - `name`: <Type>String</Type> - The name of the task associated to the job
An array of the cron jobs added to the service. An array of the cron jobs added to the service.

View File

@ -2,12 +2,13 @@
title: EventHub (WIP) title: EventHub (WIP)
slug: /api/EventHub slug: /api/EventHub
tags: tags:
- module - module
- public - public
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 3 toc_max_heading_level: 3
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# Strapi Event Hub # Strapi Event Hub

View File

@ -2,12 +2,13 @@
title: Startup Logger title: Startup Logger
slug: /api/StartupLogger slug: /api/StartupLogger
tags: tags:
- module - module
- private - private
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 3 toc_max_heading_level: 3
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# API # API

View File

@ -2,12 +2,13 @@
title: StrapiFS (WIP) title: StrapiFS (WIP)
slug: /api/StrapiFS slug: /api/StrapiFS
tags: tags:
- module - module
- public - public
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 3 toc_max_heading_level: 3
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# Strapi File System # Strapi File System
@ -25,16 +26,19 @@ The Strapi FS module is a wrapper around FS NodeJS module to manipulate local fi
### `createStrapiFs(strapi)` ### `createStrapiFs(strapi)`
### `strapiFs.writeAppFile(optPath, data)` ### `strapiFs.writeAppFile(optPath, data)`
:::caution :::caution
Deprecated Deprecated
::: :::
### `strapiFs.writePluginFile(plugin, optPath, data)` ### `strapiFs.writePluginFile(plugin, optPath, data)`
:::caution :::caution
Deprecated Deprecated
::: :::
### `strapiFs.removeAppFile(optPath)` ### `strapiFs.removeAppFile(optPath)`
:::caution :::caution
Deprecated Deprecated
::: :::

View File

@ -2,12 +2,13 @@
title: Strapi server (WIP) title: Strapi server (WIP)
slug: /api/strapi-server slug: /api/strapi-server
tags: tags:
- module - module
- public - public
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 5 toc_max_heading_level: 5
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# Strapi Server # Strapi Server
@ -107,6 +108,7 @@ TODO
::: :::
### `StrapiAPIs` ### `StrapiAPIs`
- <Type>Object</Type> - <Type>Object</Type>
- `content-api`: [<Type>API</Type>](API) - `content-api`: [<Type>API</Type>](API)

View File

@ -2,12 +2,13 @@
title: Telemetry Service title: Telemetry Service
slug: /api/Telemetry slug: /api/Telemetry
tags: tags:
- module - module
- public - public
toc_min_heading_level: 2 toc_min_heading_level: 2
toc_max_heading_level: 3 toc_max_heading_level: 3
--- ---
import Type from '@site/docs/api/components/type'; import Type from '@site/docs/api/components/type';
# Telemetry # Telemetry
@ -21,6 +22,7 @@ Current state: **Stable**
The telemetry service is responsible for collecting and sending anonymous usage data to Strapi. This service is disabled by default, but can be enabled or disabled via configuration. The telemetry service is responsible for collecting and sending anonymous usage data to Strapi. This service is disabled by default, but can be enabled or disabled via configuration.
## Usage Information ## Usage Information
The collected usage data is used to help Strapi improve the product by identifying areas of improvement, tracking feature adoption, and measuring performance. You can learn more about the usage data that is collected by visiting the following link: The collected usage data is used to help Strapi improve the product by identifying areas of improvement, tracking feature adoption, and measuring performance. You can learn more about the usage data that is collected by visiting the following link:
https://docs.strapi.io/developer-docs/latest/getting-started/usage-information.html https://docs.strapi.io/developer-docs/latest/getting-started/usage-information.html
@ -74,6 +76,7 @@ telemetry.destroy();
``` ```
### `telemetry.send(event, payload)` ### `telemetry.send(event, payload)`
- `event`: <Type>String</Type> - The event to be sent. - `event`: <Type>String</Type> - The event to be sent.
- `payload`: [<Type>TelemetryPayload</Type>](#telemetrypayload) - The payload to be sent with the event. - `payload`: [<Type>TelemetryPayload</Type>](#telemetrypayload) - The payload to be sent with the event.
- Returns: Promise - Returns: Promise
@ -89,6 +92,7 @@ telemetry.send('event_name', { key: 'value' });
## Types ## Types
### `TelemetryPayload` ### `TelemetryPayload`
- <Type>Object</Type> - <Type>Object</Type>
- `eventProperties`: <Type>Object</Type> An object that contains additional information about the event. - `eventProperties`: <Type>Object</Type> An object that contains additional information about the event.
@ -99,4 +103,4 @@ Examples of event properties in Strapi include model, containsRelationalFields,
User properties can include information such as the user's operating system, node version, and hostname. These properties are typically used to group events by user or to filter events based on certain user characteristics. User properties can include information such as the user's operating system, node version, and hostname. These properties are typically used to group events by user or to filter events based on certain user characteristics.
Group properties can include information such as the language(s) used in the application, the database being used, and the number of locales. These properties are typically used to group events by application version, environment, or other characteristics. Group properties can include information such as the language(s) used in the application, the database being used, and the number of locales. These properties are typically used to group events by application version, environment, or other characteristics.

View File

@ -42,7 +42,6 @@ const { getFeature } = useLicenseLimits();
const reviewWorkflowOptions = getFeature('review-workflows'); const reviewWorkflowOptions = getFeature('review-workflows');
``` ```
## Typescript ## Typescript
```ts ```ts

View File

@ -56,7 +56,11 @@ import { Box } from '@strapi/design-system';
import { useAdminRoles } from 'path/to/hooks'; import { useAdminRoles } from 'path/to/hooks';
const MyComponent = ({ onMoveItem }) => { const MyComponent = ({ onMoveItem }) => {
const { users: [user], isLoading, refetch } = useAdminRoles({ id: 1 }); const {
users: [user],
isLoading,
refetch,
} = useAdminRoles({ id: 1 });
return /* ... */; return /* ... */;
}; };

View File

@ -60,7 +60,11 @@ import { Box } from '@strapi/design-system';
import { useAdminUsers } from 'path/to/hooks'; import { useAdminUsers } from 'path/to/hooks';
const MyComponent = ({ onMoveItem }) => { const MyComponent = ({ onMoveItem }) => {
const { users: [user], isLoading, refetch } = useAdminUsers({ id: 1 }); const {
users: [user],
isLoading,
refetch,
} = useAdminUsers({ id: 1 });
return /* ... */; return /* ... */;
}; };

View File

@ -24,25 +24,23 @@ import { useAPIErrorHandler, useFetchClient, useNotification } from '@strapi/hel
import getTrad from '../utils'; import getTrad from '../utils';
const Component = () => { const Component = () => {
const { get } = useFetchClient(); const { get } = useFetchClient();
const { formatAPIError } = useAPIErrorHandler(getTrad); const { formatAPIError } = useAPIErrorHandler(getTrad);
const toggleNotification = useNotification(); const toggleNotification = useNotification();
const handleDeleteItem = async () => { const handleDeleteItem = async () => {
try { try {
return await get('/admin'); return await get('/admin');
} catch(error) { } catch (error) {
toggleNotification({ toggleNotification({
type: 'warning', type: 'warning',
message: formatAPIError(error) message: formatAPIError(error),
}) });
}
} }
};
return ( return <button onClick={handleDeleteItem}>Delete item</button>;
<button onClick={handleDeleteItem}>Delete item</button> };
)
}
``` ```
## Methods ## Methods

View File

@ -3,27 +3,15 @@
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build", "build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear", "clear": "docusaurus clear",
"deploy": "docusaurus deploy",
"docusaurus": "docusaurus",
"serve": "docusaurus serve", "serve": "docusaurus serve",
"write-translations": "docusaurus write-translations", "start": "docusaurus start",
"write-heading-ids": "docusaurus write-heading-ids" "swizzle": "docusaurus swizzle",
}, "write-heading-ids": "docusaurus write-heading-ids",
"dependencies": { "write-translations": "docusaurus write-translations"
"@docusaurus/core": "2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.3.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.2.0"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [
@ -36,5 +24,17 @@
"last 1 firefox version", "last 1 firefox version",
"last 1 safari version" "last 1 safari version"
] ]
},
"dependencies": {
"@docusaurus/core": "2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.3.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.2.0"
} }
} }

View File

@ -60,33 +60,19 @@
}, },
"enumeration": { "enumeration": {
"type": "enumeration", "type": "enumeration",
"enum": [ "enum": ["A", "B", "C", "D", "E"]
"A",
"B",
"C",
"D",
"E"
]
}, },
"single_media": { "single_media": {
"type": "media", "type": "media",
"multiple": false, "multiple": false,
"required": false, "required": false,
"allowedTypes": [ "allowedTypes": ["images", "files", "videos"]
"images",
"files",
"videos"
]
}, },
"multiple_media": { "multiple_media": {
"type": "media", "type": "media",
"multiple": true, "multiple": true,
"required": false, "required": false,
"allowedTypes": [ "allowedTypes": ["images", "files", "videos"]
"images",
"files",
"videos"
]
}, },
"json": { "json": {
"type": "json" "type": "json"
@ -103,10 +89,7 @@
}, },
"dynamiczone": { "dynamiczone": {
"type": "dynamiczone", "type": "dynamiczone",
"components": [ "components": ["basic.simple", "blog.test-como"]
"basic.simple",
"blog.test-como"
]
}, },
"one_way_tag": { "one_way_tag": {
"type": "relation", "type": "relation",
@ -162,10 +145,7 @@
}, },
"cats": { "cats": {
"type": "dynamiczone", "type": "dynamiczone",
"components": [ "components": ["basic.relation", "basic.simple"]
"basic.relation",
"basic.simple"
]
} }
} }
} }

View File

@ -47,10 +47,7 @@
} }
}, },
"type": "dynamiczone", "type": "dynamiczone",
"components": [ "components": ["basic.relation", "basic.simple"]
"basic.relation",
"basic.simple"
]
}, },
"single_relation": { "single_relation": {
"type": "component", "type": "component",

View File

@ -36,13 +36,7 @@
"pluginOptions": {} "pluginOptions": {}
}, },
"priceRange": { "priceRange": {
"enum": [ "enum": ["very_cheap", "cheap", "average", "expensive", "very_expensive"],
"very_cheap",
"cheap",
"average",
"expensive",
"very_expensive"
],
"type": "enumeration", "type": "enumeration",
"pluginOptions": { "pluginOptions": {
"i18n": { "i18n": {

View File

@ -1,8 +1,8 @@
{ {
"name": "strapi-plugin-my-plugin", "name": "strapi-plugin-my-plugin",
"version": "0.0.0", "version": "0.0.0",
"description": "This is the description of my plugin.",
"private": true, "private": true,
"description": "This is the description of my plugin.",
"strapi": { "strapi": {
"name": "my-plugin", "name": "my-plugin",
"description": "Description of my plugin.", "description": "Description of my plugin.",

View File

@ -45,6 +45,6 @@ function getCodeCommands(files) {
} }
module.exports = { module.exports = {
'*.{js,ts}': getCodeCommands, '*.{js,ts,jsx,tsx,json}': getCodeCommands,
'*.{md,css,scss,yaml,yml}': ['prettier --write'], '*.{md,mdx,css,scss,yaml,yml}': ['prettier --write'],
}; };

View File

@ -41,8 +41,10 @@
"lint:fix": "nx run-many --target=lint --nx-ignore-cycles -- --fix", "lint:fix": "nx run-many --target=lint --nx-ignore-cycles -- --fix",
"lint:other": "npm run prettier:other -- --check", "lint:other": "npm run prettier:other -- --check",
"prepare": "husky install", "prepare": "husky install",
"prettier:code": "prettier --cache --cache-strategy content \"**/*.{js,ts}\"", "prettier:check": "yarn prettier:code --check && yarn prettier:other --check",
"prettier:other": "prettier --cache --cache-strategy content \"**/*.{md,css,scss,yaml,yml}\"", "prettier:code": "prettier --cache --cache-strategy content \"**/*.{js,ts,jsx,tsx,json}\"",
"prettier:other": "prettier --cache --cache-strategy content \"**/*.{md,mdx,css,scss,yaml,yml}\"",
"prettier:write": "prettier --write \"**/*.{js,ts,jsx,tsx,json,md,mdx,css,scss,yaml,yml}\"",
"setup": "yarn && yarn clean && yarn build", "setup": "yarn && yarn clean && yarn build",
"test:api": "node test/scripts/run-api-tests.js", "test:api": "node test/scripts/run-api-tests.js",
"test:clean": "rimraf ./coverage", "test:clean": "rimraf ./coverage",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -916,4 +916,4 @@
"selectButtonTitle": "选择", "selectButtonTitle": "选择",
"skipToContent": "跳至内容", "skipToContent": "跳至内容",
"submit": "提交" "submit": "提交"
} }

View File

@ -5,4 +5,4 @@
}, },
"include": ["src"], "include": ["src"],
"exclude": ["node_modules"] "exclude": ["node_modules"]
} }

View File

@ -5,6 +5,6 @@
"compilerOptions": { "compilerOptions": {
"types": ["lodash", "jest"], "types": ["lodash", "jest"],
"esModuleInterop": true, "esModuleInterop": true,
"allowJs": true, "allowJs": true
}, }
} }

View File

@ -30,7 +30,7 @@ const config: Config = defineConfig({
import: './dist/ee/server/index.mjs', import: './dist/ee/server/index.mjs',
require: './dist/ee/server/index.js', require: './dist/ee/server/index.js',
runtime: 'node', runtime: 'node',
} },
], ],
dist: './dist', dist: './dist',
/** /**

View File

@ -6,4 +6,4 @@
"rootDir": "./src", "rootDir": "./src",
"outDir": "./dist/server" "outDir": "./dist/server"
} }
} }

View File

@ -33,11 +33,11 @@
"strapi-server.js" "strapi-server.js"
], ],
"scripts": { "scripts": {
"build": "pack-up build",
"lint": "run -T eslint .", "lint": "run -T eslint .",
"test:unit": "run -T jest",
"test:unit:watch": "run -T jest --watch",
"test:ts:back": "run -T tsc --noEmit -p server/tsconfig.json", "test:ts:back": "run -T tsc --noEmit -p server/tsconfig.json",
"build": "pack-up build" "test:unit": "run -T jest",
"test:unit:watch": "run -T jest --watch"
}, },
"dependencies": { "dependencies": {
"@sindresorhus/slugify": "1.1.0", "@sindresorhus/slugify": "1.1.0",

View File

@ -1,9 +1,9 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"include": ["./src"], "include": ["./src"],
"exclude": ["./src/**/*.test.ts"], "exclude": ["./src/**/*.test.ts"],
"compilerOptions": { "compilerOptions": {
"rootDir": "./src", "rootDir": "./src",
"outDir": "./dist/server" "outDir": "./dist/server"
}
} }
}

View File

@ -1,9 +1,8 @@
{ {
"extends": "./server/tsconfig", "extends": "./server/tsconfig",
"compilerOptions": { "compilerOptions": {
"outDir": "dist" "outDir": "dist"
}, },
"include": ["src"], "include": ["src"],
"exclude": ["*.test.*"] "exclude": ["*.test.*"]
} }

View File

@ -1,4 +1,3 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json"
} }

View File

@ -1,10 +1,9 @@
{ {
"extends": "tsconfig/base.json", "extends": "tsconfig/base.json",
"include": ["src"], "include": ["src"],
"exclude": ["node_modules"], "exclude": ["node_modules"],
"compilerOptions": { "compilerOptions": {
"types": ["lodash", "jest"], "types": ["lodash", "jest"],
"esModuleInterop": true "esModuleInterop": true
}
} }
}

View File

@ -256,4 +256,4 @@ const getTypeShape = (attribute: Attribute.Any, { modelType, attributes }: any =
return {}; return {};
} }
} }
}; };

View File

@ -109,4 +109,4 @@ export const replaceTemporaryUIDs = (uidMap: any) => (schema: any) => {
return acc; return acc;
}, {}), }, {}),
}; };
}; };

View File

@ -5,4 +5,4 @@
"declarationDir": "./dist", "declarationDir": "./dist",
"outDir": "./dist" "outDir": "./dist"
} }
} }

View File

@ -1,8 +1,7 @@
{ {
"extends": "tsconfig/client.json", "extends": "tsconfig/client.json",
"include": ["./src", "../shared/types.ts"], "include": ["./src", "../shared/types.ts"],
"compilerOptions": { "compilerOptions": {
"rootDir": "../", "rootDir": "../"
} }
} }

View File

@ -53,9 +53,7 @@
} }
}, },
"summary": "", "summary": "",
"tags": [ "tags": ["Email"]
"Email"
]
} }
} }
}, },

View File

@ -4,5 +4,5 @@
"exclude": ["node_modules"], "exclude": ["node_modules"],
"compilerOptions": { "compilerOptions": {
"esModuleInterop": true "esModuleInterop": true
}, }
} }

View File

@ -1,4 +1,4 @@
{/*- CheckPagePermissions.stories.mdx -*/} {/* - CheckPagePermissions.stories.mdx - */}
import { ArgsTable, Meta } from '@storybook/addon-docs'; import { ArgsTable, Meta } from '@storybook/addon-docs';
import { CheckPagePermissions } from './CheckPagePermissions'; import { CheckPagePermissions } from './CheckPagePermissions';

View File

@ -1,4 +1,4 @@
{/*- CheckPermissions.stories.mdx -*/} {/* - CheckPermissions.stories.mdx - */}
import { ArgsTable, Meta } from '@storybook/addon-docs'; import { ArgsTable, Meta } from '@storybook/addon-docs';
import { CheckPermissions } from './CheckPermissions'; import { CheckPermissions } from './CheckPermissions';

View File

@ -1,4 +1,4 @@
{/*- ConfirmDialog.stories.mdx -*/} {/* - ConfirmDialog.stories.mdx - */}
import { useState } from 'react'; import { useState } from 'react';
import { ArgsTable, Meta, Canvas, Story } from '@storybook/addon-docs'; import { ArgsTable, Meta, Canvas, Story } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- ContentBox.stories.mdx -*/} {/* - ContentBox.stories.mdx - */}
import { useState } from 'react'; import { useState } from 'react';
import { ArgsTable, Meta, Canvas, Story } from '@storybook/addon-docs'; import { ArgsTable, Meta, Canvas, Story } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- DateTimePicker.stories.mdx -*/} {/* - DateTimePicker.stories.mdx - */}
import { useState } from 'react'; import { useState } from 'react';
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';

View File

@ -1,4 +1,4 @@
{/*- DynamicTable.stories.mdx -*/} {/* - DynamicTable.stories.mdx - */}
import { useEffect } from 'react'; import { useEffect } from 'react';
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- FilterListURLQuery.stories.mdx -*/} {/* - FilterListURLQuery.stories.mdx - */}
import { useEffect } from 'react'; import { useEffect } from 'react';
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- FilterPopoverURLQuery.stories.mdx -*/} {/* - FilterPopoverURLQuery.stories.mdx - */}
import { useEffect, useState, useRef } from 'react'; import { useEffect, useState, useRef } from 'react';
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- GenericInput.stories.mdx -*/} {/* - GenericInput.stories.mdx - */}
import { useState } from 'react'; import { useState } from 'react';
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';

View File

@ -1,4 +1,4 @@
{/*- Link.stories.mdx -*/} {/* - Link.stories.mdx - */}
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
import { Box } from '@strapi/design-system'; import { Box } from '@strapi/design-system';

View File

@ -1,4 +1,4 @@
{/*- LinkButton.stories.mdx -*/} {/* - LinkButton.stories.mdx - */}
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
import { Box } from '@strapi/design-system'; import { Box } from '@strapi/design-system';

View File

@ -1,4 +1,4 @@
{/*- PageSizeURLQuery.stories.mdx -*/} {/* - PageSizeURLQuery.stories.mdx - */}
import { useEffect } from 'react'; import { useEffect } from 'react';
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- PaginationURLQuery.stories.mdx -*/} {/* - PaginationURLQuery.stories.mdx - */}
import { useEffect } from 'react'; import { useEffect } from 'react';
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- Search.stories.mdx -*/} {/* - Search.stories.mdx - */}
import { ArgsTable, Meta, Canvas, Story } from '@storybook/addon-docs'; import { ArgsTable, Meta, Canvas, Story } from '@storybook/addon-docs';
import { Flex } from '@strapi/design-system'; import { Flex } from '@strapi/design-system';

View File

@ -1,4 +1,4 @@
{/*- Status.stories.mdx -*/} {/* - Status.stories.mdx - */}
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';
import { Flex } from '@strapi/design-system'; import { Flex } from '@strapi/design-system';

View File

@ -1,4 +1,4 @@
{/*- Table.stories.mdx -*/} {/* - Table.stories.mdx - */}
import { Table, useTableContext } from './Table'; import { Table, useTableContext } from './Table';
import { Tbody, Td, Th, Tr, Typography, BaseCheckbox, Button, Flex } from '@strapi/design-system'; import { Tbody, Td, Th, Tr, Typography, BaseCheckbox, Button, Flex } from '@strapi/design-system';

View File

@ -1,4 +1,4 @@
{/*- formatContentTypeData.stories.mdx -*/} {/* - formatContentTypeData.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';
@ -8,6 +8,7 @@ import { Meta } from '@storybook/addon-docs';
This util is used to format the data received by the backend so it can be used by the admin. This util is used to format the data received by the backend so it can be used by the admin.
It: It:
- sets the key `__temp_key__` to each component (easier for reordering repeatable components) - sets the key `__temp_key__` to each component (easier for reordering repeatable components)
- stringifies JSON fields (easier to harmonize the data format for the json editor from user input or backend data) - stringifies JSON fields (easier to harmonize the data format for the json editor from user input or backend data)
@ -19,7 +20,7 @@ import { formatContentTypeData } from '@strapi/helper-plugin';
const Compo = ({ allLayoutData }) => { const Compo = ({ allLayoutData }) => {
const allLayoutDataRef = useRef(allLayoutData); const allLayoutDataRef = useRef(allLayoutData);
const cleanReceivedData = useCallback(data => { const cleanReceivedData = useCallback((data) => {
return formatContentTypeData( return formatContentTypeData(
data, data,
allLayoutDataRef.current.contentType, allLayoutDataRef.current.contentType,

View File

@ -1,4 +1,4 @@
{/*- useCustomFields.stories.mdx -*/} {/* - useCustomFields.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- GuidedTourProvider.stories.mdx -*/} {/* - GuidedTourProvider.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';
@ -10,7 +10,7 @@ This Provider is used to create a new context for the GuidedTour. The example us
## Usage ## Usage
``` js ```js
import { GuidedTourProvider } from '@strapi/helper-plugin'; import { GuidedTourProvider } from '@strapi/helper-plugin';
const initialState = { const initialState = {
currentStep: null, currentStep: null,
@ -39,8 +39,8 @@ const GuidedTour = ({ children }) => {
init init
); );
const setCurrentStep = step => { const setCurrentStep = (step) => {
// currentStep format: 'contentTypeBuilder.create' // currentStep format: 'contentTypeBuilder.create'
return dispatch({ return dispatch({
type: 'SET_CURRENT_STEP', type: 'SET_CURRENT_STEP',
@ -48,7 +48,7 @@ const GuidedTour = ({ children }) => {
}); });
}; };
const setGuidedTourVisibility = value => { const setGuidedTourVisibility = (value) => {
dispatch({ dispatch({
type: 'SET_GUIDED_TOUR_VISIBILITY', type: 'SET_GUIDED_TOUR_VISIBILITY',
value, value,
@ -63,13 +63,13 @@ const GuidedTour = ({ children }) => {
}); });
}; };
const startSection = sectionName => { const startSection = (sectionName) => {
// Add conditions for the section to start, which will allow the ModalGuidedTour to be visible // Add conditions for the section to start, which will allow the ModalGuidedTour to be visible
return setCurrentStep(`${sectionName}.${step-to-show}`); return setCurrentStep(`${sectionName}.${step - to - show}`);
}; };
const setSkipped = value => { const setSkipped = (value) => {
dispatch({ dispatch({
type: 'SET_SKIPPED', type: 'SET_SKIPPED',
value, value,
@ -92,4 +92,4 @@ const GuidedTour = ({ children }) => {
</GuidedTourProvider> </GuidedTourProvider>
); );
}; };
``` ```

View File

@ -1,4 +1,4 @@
{/*- useNotification.stories.mdx -*/} {/* - useNotification.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- useFocusWhenNavigate.stories.mdx -*/} {/* - useFocusWhenNavigate.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- useLockScroll.stories.mdx -*/} {/* - useLockScroll.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- useLockScroll.stories.mdx -*/} {/* - useLockScroll.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';
@ -14,12 +14,18 @@ This hook is used in order to facilitate the select / partial selection of a glo
import { useSelectionState } from '@strapi/helper-plugin'; import { useSelectionState } from '@strapi/helper-plugin';
const Modal = ({ onToggle, isOpen }) => { const Modal = ({ onToggle, isOpen }) => {
const [selectedAssets, { selectOne, selectAll, selectOnly, selectMultiple, deselectMultiple, setSelections }] = useSelectionState( const [
selectedAssets,
{ selectOne, selectAll, selectOnly, selectMultiple, deselectMultiple, setSelections },
] = useSelectionState(
['id'], // This are the comparaison attribute names ['id'], // This are the comparaison attribute names
[] []
); );
const elements = [{ id: 1, name: 'Hello' }, { id: 2, name: 'World' }]; const elements = [
{ id: 1, name: 'Hello' },
{ id: 2, name: 'World' },
];
// selectOne({ id: 1 name: 'Hello' }) add the object to the selection list // selectOne({ id: 1 name: 'Hello' }) add the object to the selection list
// selectOnly({ id: 1 name: 'Hello' }) add the object to the selection list and remove every others in the list // selectOnly({ id: 1 name: 'Hello' }) add the object to the selection list and remove every others in the list
@ -31,7 +37,7 @@ const Modal = ({ onToggle, isOpen }) => {
return ( return (
<div> <div>
<button onClick={() => selectAll(assets)}>Select all</button> <button onClick={() => selectAll(assets)}>Select all</button>
{elements.map(el => ( {elements.map((el) => (
<div key={el.id}>{el.name}</div> <div key={el.id}>{el.name}</div>
))} ))}
</div> </div>

View File

@ -1,4 +1,4 @@
{/*- RemoveRoundedButton.stories.mdx -*/} {/* - RemoveRoundedButton.stories.mdx - */}
import { Meta, Canvas, Story } from '@storybook/addon-docs'; import { Meta, Canvas, Story } from '@storybook/addon-docs';
import { RemoveRoundedButton } from './RemoveRoundedButton'; import { RemoveRoundedButton } from './RemoveRoundedButton';

View File

@ -1,4 +1,4 @@
{/*- SortIcon.stories.mdx -*/} {/* - SortIcon.stories.mdx - */}
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';
import { Typography } from '@strapi/design-system'; import { Typography } from '@strapi/design-system';

View File

@ -1,4 +1,4 @@
{/*- EmptyStateLayout.stories.mdx -*/} {/* - EmptyStateLayout.stories.mdx - */}
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';
import { import {

View File

@ -1,4 +1,4 @@
{/*- auth.stories.mdx -*/} {/* - auth.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- await-to-js.stories.mdx -*/} {/* - await-to-js.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- difference.stories.mdx -*/} {/* - difference.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- getFileExtension.stories.mdx -*/} {/* - getFileExtension.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- hasPermissions.stories.mdx -*/} {/* - hasPermissions.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- prefixFileUrlWithBackendUrl.stories.mdx -*/} {/* - prefixFileUrlWithBackendUrl.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- pxToRem.stories.mdx -*/} {/* - pxToRem.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- setHexOpacity.stories.mdx -*/} {/* - setHexOpacity.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -1,4 +1,4 @@
{/*- translatedErrors.stories.mdx -*/} {/* - translatedErrors.stories.mdx - */}
import { Meta } from '@storybook/addon-docs'; import { Meta } from '@storybook/addon-docs';

View File

@ -2,7 +2,7 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "dist", "outDir": "dist",
"noEmit": false, "noEmit": false
}, },
"include": ["src"], "include": ["src"],
"exclude": ["node_modules", "**/__tests__/**"] "exclude": ["node_modules", "**/__tests__/**"]

View File

@ -1,7 +1,7 @@
{ {
"extends": "tsconfig/base.json", "extends": "tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"noEmit": true, "noEmit": true
}, },
"include": ["src"], "include": ["src"],
"exclude": ["node_modules"] "exclude": ["node_modules"]

View File

@ -4,7 +4,7 @@
"outDir": "dist", "outDir": "dist",
"noEmit": false, "noEmit": false,
"emitDeclarationOnly": true, "emitDeclarationOnly": true,
"allowJs": false, "allowJs": false
}, },
"include": ["src"], "include": ["src"],
"exclude": ["node_modules", "**/__tests__/**", "dist"] "exclude": ["node_modules", "**/__tests__/**", "dist"]

View File

@ -1,7 +1,7 @@
{ {
"extends": "tsconfig/base.json", "extends": "tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"noEmit": true, "noEmit": true
}, },
"include": ["src"], "include": ["src"],
"exclude": ["node_modules"] "exclude": ["node_modules"]

View File

@ -14,47 +14,51 @@ into `react-select` are forwarded.
<Canvas> <Canvas>
<Story name="base"> <Story name="base">
{() => { {() => {
const [value, setValue] = useState({ value: 22, label: "Folder 2.2" }); const [value, setValue] = useState({ value: 22, label: 'Folder 2.2' });
const options = [ const options = [
{
value: 1,
label: 'Folder 1',
},
{
value: 2,
label: 'Folder 2',
children: [
{ {
value: 1, value: 21,
label: 'Folder 1' label: 'Folder 2.1',
}, },
{ {
value: 2, value: 22,
label: 'Folder 2', label: 'Folder 2.2',
children: [ children: [
{ {
value: 21, value: 221,
label: 'Folder 2.1' label: 'Folder 2.2.1',
}, },
{ {
value: 22, value: 222,
label: 'Folder 2.2', label: 'Folder 2.2.2',
children: [ },
{ ],
value: 221,
label: 'Folder 2.2.1'
},
{
value: 222,
label: 'Folder 2.2.2'
}
]
}
]
}, },
{ ],
value: 3, },
label: 'Folder 3' {
} value: 3,
]; label: 'Folder 3',
return ( },
<> ];
<SelectTree options={options} defaultValue={value} onChange={({ value, label }) => setValue({ value, label })} /> return (
<p>Selected Value: {value.value}</p> <>
</> <SelectTree
) options={options}
defaultValue={value}
onChange={({ value, label }) => setValue({ value, label })}
/>
<p>Selected Value: {value.value}</p>
</>
);
}} }}
</Story> </Story>
</Canvas> </Canvas>

View File

@ -114,4 +114,4 @@
"tabs.title": "Com vols pujar els teus actius?", "tabs.title": "Com vols pujar els teus actius?",
"window.confirm.close-modal.file": "Estàs segur? Els vostres canvis es perdran.", "window.confirm.close-modal.file": "Estàs segur? Els vostres canvis es perdran.",
"window.confirm.close-modal.files": "Estàs segur? Teniu alguns fitxers que encara no s'han penjat." "window.confirm.close-modal.files": "Estàs segur? Teniu alguns fitxers que encara no s'han penjat."
} }

View File

@ -137,4 +137,4 @@
"config.popUpWarning.warning.updateAllSettings": "Ceci changera tous vos paramètres", "config.popUpWarning.warning.updateAllSettings": "Ceci changera tous vos paramètres",
"view-switch.list": "Vue en liste", "view-switch.list": "Vue en liste",
"view-switch.grid": "Vue en grille" "view-switch.grid": "Vue en grille"
} }

View File

@ -19,18 +19,14 @@
} }
}, },
"summary": "", "summary": "",
"tags": [ "tags": ["Upload - File"],
"Upload - File"
],
"requestBody": { "requestBody": {
"description": "Upload files", "description": "Upload files",
"required": true, "required": true,
"content": { "content": {
"multipart/form-data": { "multipart/form-data": {
"schema": { "schema": {
"required": [ "required": ["files"],
"files"
],
"type": "object", "type": "object",
"properties": { "properties": {
"path": { "path": {
@ -93,9 +89,7 @@
} }
}, },
"summary": "", "summary": "",
"tags": [ "tags": ["Upload - File"],
"Upload - File"
],
"requestBody": { "requestBody": {
"description": "Upload files", "description": "Upload files",
"required": true, "required": true,
@ -131,9 +125,7 @@
}, },
"/upload/files": { "/upload/files": {
"get": { "get": {
"tags": [ "tags": ["Upload - File"],
"Upload - File"
],
"responses": { "responses": {
"200": { "200": {
"description": "Get a list of files", "description": "Get a list of files",
@ -165,9 +157,7 @@
} }
} }
], ],
"tags": [ "tags": ["Upload - File"],
"Upload - File"
],
"responses": { "responses": {
"200": { "200": {
"description": "Get a specific file", "description": "Get a specific file",
@ -194,9 +184,7 @@
} }
} }
], ],
"tags": [ "tags": ["Upload - File"],
"Upload - File"
],
"responses": { "responses": {
"200": { "200": {
"description": "Delete a file", "description": "Delete a file",

View File

@ -1,7 +1,7 @@
{ {
"extends": "tsconfig/base.json", "extends": "tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "dist", "outDir": "dist"
}, },
"include": ["src"], "include": ["src"],
"exclude": ["node_modules", "**/__tests__/**"] "exclude": ["node_modules", "**/__tests__/**"]

View File

@ -14,4 +14,4 @@
"Homepage.textBox.label.not-versioned": "Why uploading my project to GitHub?", "Homepage.textBox.label.not-versioned": "Why uploading my project to GitHub?",
"Homepage.textBox.text.versioned": "Strapi Cloud offers a 14 days free trial for you to experiment with your project on the cloud including all features.", "Homepage.textBox.text.versioned": "Strapi Cloud offers a 14 days free trial for you to experiment with your project on the cloud including all features.",
"Homepage.textBox.text.not-versioned": "Strapi Cloud will fetch and deploy your project from your GitHub repository. This is the best way to version, manage and deploy your project. Follow the steps on GitHub to successfully upload it." "Homepage.textBox.text.not-versioned": "Strapi Cloud will fetch and deploy your project from your GitHub repository. This is the best way to version, manage and deploy your project. Follow the steps on GitHub to successfully upload it."
} }

View File

@ -14,4 +14,4 @@
"Homepage.textBox.label.not-versioned": "Pourquoi uploader mon projet sur GitHub ?", "Homepage.textBox.label.not-versioned": "Pourquoi uploader mon projet sur GitHub ?",
"Homepage.textBox.text.versioned": "Strapi Cloud propose un essai gratuit de 14 jours pour te permettre d'expérimenter ton projet sur le cloud !", "Homepage.textBox.text.versioned": "Strapi Cloud propose un essai gratuit de 14 jours pour te permettre d'expérimenter ton projet sur le cloud !",
"Homepage.textBox.text.not-versioned": "Strapi Cloud récupérera et déploiera ton projet à partir de ton repo GitHub. Cest la meilleure façon de versionner, gérer et déployer votre projet. Suivez les étapes sur GitHub pour l'uploader avec succès" "Homepage.textBox.text.not-versioned": "Strapi Cloud récupérera et déploiera ton projet à partir de ton repo GitHub. Cest la meilleure façon de versionner, gérer et déployer votre projet. Suivez les étapes sur GitHub pour l'uploader avec succès"
} }

View File

@ -59,5 +59,4 @@
"plugin.schema.i18n.localized.description-field": "Le champ peut avoir des valeurs différentes dans chaque locale", "plugin.schema.i18n.localized.description-field": "Le champ peut avoir des valeurs différentes dans chaque locale",
"plugin.schema.i18n.localized.label-content-type": "Activer la localisation pour ce type de contenu", "plugin.schema.i18n.localized.label-content-type": "Activer la localisation pour ce type de contenu",
"plugin.schema.i18n.localized.label-field": "Activer la localisation pour ce champ" "plugin.schema.i18n.localized.label-field": "Activer la localisation pour ce champ"
} }

File diff suppressed because it is too large Load Diff

View File

@ -3,4 +3,3 @@
"plugin.description.short": "將 Strapi 錯誤事件傳送至 Sentry。", "plugin.description.short": "將 Strapi 錯誤事件傳送至 Sentry。",
"plugin.name": "Sentry" "plugin.name": "Sentry"
} }

View File

@ -1,20 +1,20 @@
{ {
"$schema": "https://json.schemastore.org/tsconfig", "$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": { "compilerOptions": {
"module": "CommonJS", "module": "CommonJS",
"moduleResolution": "Node", "moduleResolution": "Node",
"lib": ["ES2020"], "lib": ["ES2020"],
"target": "ES2019", "target": "ES2019",
"strict": false, "strict": false,
"skipLibCheck": true, "skipLibCheck": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"incremental": true, "incremental": true,
"esModuleInterop": true, "esModuleInterop": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"noEmitOnError": true, "noEmitOnError": true,
"noImplicitThis": true "noImplicitThis": true
} }
} }