@strapi/core 0.0.0-experimental.020096d91bef5bab5a6c32b4216da5aeb9383d33 → 0.0.0-experimental.16eaafeff6bd4cd49d56f3c31d002cad71a1134a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @strapi/core might be problematic. Click here for more details.
- package/dist/Strapi.d.ts +52 -59
- package/dist/Strapi.d.ts.map +1 -1
- package/dist/Strapi.js +193 -209
- package/dist/Strapi.js.map +1 -1
- package/dist/Strapi.mjs +165 -201
- package/dist/Strapi.mjs.map +1 -1
- package/dist/configuration/config-loader.d.ts.map +1 -1
- package/dist/configuration/config-loader.js +9 -5
- package/dist/configuration/config-loader.js.map +1 -1
- package/dist/configuration/config-loader.mjs +9 -5
- package/dist/configuration/config-loader.mjs.map +1 -1
- package/dist/configuration/get-dirs.d.ts +10 -0
- package/dist/configuration/get-dirs.d.ts.map +1 -0
- package/dist/{utils → configuration}/get-dirs.js +3 -2
- package/dist/configuration/get-dirs.js.map +1 -0
- package/dist/{utils → configuration}/get-dirs.mjs +3 -2
- package/dist/configuration/get-dirs.mjs.map +1 -0
- package/dist/configuration/index.d.ts +4 -7
- package/dist/configuration/index.d.ts.map +1 -1
- package/dist/configuration/index.js +6 -4
- package/dist/configuration/index.js.map +1 -1
- package/dist/configuration/index.mjs +5 -4
- package/dist/configuration/index.mjs.map +1 -1
- package/dist/container.d.ts +2 -2
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js.map +1 -1
- package/dist/container.mjs.map +1 -1
- package/dist/core-api/controller/collection-type.d.ts +3 -3
- package/dist/core-api/controller/collection-type.d.ts.map +1 -1
- package/dist/core-api/controller/collection-type.js +3 -0
- package/dist/core-api/controller/collection-type.js.map +1 -1
- package/dist/core-api/controller/collection-type.mjs +3 -0
- package/dist/core-api/controller/collection-type.mjs.map +1 -1
- package/dist/core-api/controller/index.d.ts +3 -3
- package/dist/core-api/controller/index.d.ts.map +1 -1
- package/dist/core-api/controller/index.js +5 -5
- package/dist/core-api/controller/index.js.map +1 -1
- package/dist/core-api/controller/index.mjs +6 -6
- package/dist/core-api/controller/index.mjs.map +1 -1
- package/dist/core-api/controller/single-type.d.ts +3 -3
- package/dist/core-api/controller/single-type.d.ts.map +1 -1
- package/dist/core-api/controller/single-type.js +1 -0
- package/dist/core-api/controller/single-type.js.map +1 -1
- package/dist/core-api/controller/single-type.mjs +1 -0
- package/dist/core-api/controller/single-type.mjs.map +1 -1
- package/dist/core-api/controller/transform.d.ts +2 -2
- package/dist/core-api/controller/transform.d.ts.map +1 -1
- package/dist/core-api/controller/transform.js +2 -5
- package/dist/core-api/controller/transform.js.map +1 -1
- package/dist/core-api/controller/transform.mjs +2 -5
- package/dist/core-api/controller/transform.mjs.map +1 -1
- package/dist/core-api/routes/index.d.ts.map +1 -1
- package/dist/core-api/service/collection-type.d.ts +11 -17
- package/dist/core-api/service/collection-type.d.ts.map +1 -1
- package/dist/core-api/service/collection-type.js +18 -7
- package/dist/core-api/service/collection-type.js.map +1 -1
- package/dist/core-api/service/collection-type.mjs +19 -8
- package/dist/core-api/service/collection-type.mjs.map +1 -1
- package/dist/core-api/service/index.d.ts +3 -3
- package/dist/core-api/service/index.d.ts.map +1 -1
- package/dist/core-api/service/index.js.map +1 -1
- package/dist/core-api/service/index.mjs.map +1 -1
- package/dist/core-api/service/pagination.d.ts +4 -11
- package/dist/core-api/service/pagination.d.ts.map +1 -1
- package/dist/core-api/service/pagination.js +14 -40
- package/dist/core-api/service/pagination.js.map +1 -1
- package/dist/core-api/service/pagination.mjs +16 -42
- package/dist/core-api/service/pagination.mjs.map +1 -1
- package/dist/core-api/service/single-type.d.ts +4 -4
- package/dist/core-api/service/single-type.d.ts.map +1 -1
- package/dist/core-api/service/single-type.js +9 -2
- package/dist/core-api/service/single-type.js.map +1 -1
- package/dist/core-api/service/single-type.mjs +9 -2
- package/dist/core-api/service/single-type.mjs.map +1 -1
- package/dist/domain/content-type/index.d.ts +1 -1
- package/dist/domain/content-type/index.d.ts.map +1 -1
- package/dist/domain/content-type/index.js +1 -1
- package/dist/domain/content-type/index.js.map +1 -1
- package/dist/domain/content-type/index.mjs +1 -1
- package/dist/domain/content-type/index.mjs.map +1 -1
- package/dist/domain/module/index.d.ts +24 -23
- package/dist/domain/module/index.d.ts.map +1 -1
- package/dist/domain/module/index.js +2 -1
- package/dist/domain/module/index.js.map +1 -1
- package/dist/domain/module/index.mjs +3 -2
- package/dist/domain/module/index.mjs.map +1 -1
- package/dist/ee/index.d.ts +4 -2
- package/dist/ee/index.d.ts.map +1 -1
- package/dist/ee/index.js.map +1 -1
- package/dist/ee/index.mjs.map +1 -1
- package/dist/ee/license.d.ts +2 -2
- package/dist/ee/license.d.ts.map +1 -1
- package/dist/ee/license.js +2 -1
- package/dist/ee/license.js.map +1 -1
- package/dist/ee/license.mjs +2 -1
- package/dist/ee/license.mjs.map +1 -1
- package/dist/factories.d.ts +10 -10
- package/dist/factories.d.ts.map +1 -1
- package/dist/factories.js +6 -2
- package/dist/factories.js.map +1 -1
- package/dist/factories.mjs +6 -2
- package/dist/factories.mjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -3
- package/dist/index.mjs.map +1 -1
- package/dist/loaders/admin.d.ts +2 -2
- package/dist/loaders/admin.d.ts.map +1 -1
- package/dist/loaders/admin.js +0 -1
- package/dist/loaders/admin.js.map +1 -1
- package/dist/loaders/admin.mjs +0 -1
- package/dist/loaders/admin.mjs.map +1 -1
- package/dist/loaders/apis.d.ts +2 -2
- package/dist/loaders/apis.d.ts.map +1 -1
- package/dist/loaders/apis.js +10 -10
- package/dist/loaders/apis.js.map +1 -1
- package/dist/loaders/apis.mjs +10 -10
- package/dist/loaders/apis.mjs.map +1 -1
- package/dist/loaders/components.d.ts +2 -2
- package/dist/loaders/components.d.ts.map +1 -1
- package/dist/loaders/components.js.map +1 -1
- package/dist/loaders/components.mjs.map +1 -1
- package/dist/loaders/index.d.ts +2 -2
- package/dist/loaders/index.d.ts.map +1 -1
- package/dist/loaders/index.js +0 -2
- package/dist/loaders/index.js.map +1 -1
- package/dist/loaders/index.mjs +0 -2
- package/dist/loaders/index.mjs.map +1 -1
- package/dist/loaders/middlewares.d.ts +2 -2
- package/dist/loaders/middlewares.d.ts.map +1 -1
- package/dist/loaders/middlewares.js.map +1 -1
- package/dist/loaders/middlewares.mjs.map +1 -1
- package/dist/loaders/plugins/get-enabled-plugins.d.ts +2 -2
- package/dist/loaders/plugins/get-enabled-plugins.d.ts.map +1 -1
- package/dist/loaders/plugins/get-enabled-plugins.js +7 -5
- package/dist/loaders/plugins/get-enabled-plugins.js.map +1 -1
- package/dist/loaders/plugins/get-enabled-plugins.mjs +7 -5
- package/dist/loaders/plugins/get-enabled-plugins.mjs.map +1 -1
- package/dist/loaders/plugins/index.d.ts +2 -2
- package/dist/loaders/plugins/index.d.ts.map +1 -1
- package/dist/loaders/plugins/index.js.map +1 -1
- package/dist/loaders/plugins/index.mjs.map +1 -1
- package/dist/loaders/policies.d.ts +2 -2
- package/dist/loaders/policies.d.ts.map +1 -1
- package/dist/loaders/policies.js.map +1 -1
- package/dist/loaders/policies.mjs.map +1 -1
- package/dist/loaders/sanitizers.d.ts +2 -2
- package/dist/loaders/sanitizers.d.ts.map +1 -1
- package/dist/loaders/sanitizers.js.map +1 -1
- package/dist/loaders/sanitizers.mjs.map +1 -1
- package/dist/loaders/src-index.d.ts +2 -2
- package/dist/loaders/src-index.d.ts.map +1 -1
- package/dist/loaders/src-index.js.map +1 -1
- package/dist/loaders/src-index.mjs.map +1 -1
- package/dist/loaders/validators.d.ts +2 -2
- package/dist/loaders/validators.d.ts.map +1 -1
- package/dist/loaders/validators.js.map +1 -1
- package/dist/loaders/validators.mjs.map +1 -1
- package/dist/middlewares/body.d.ts +4 -4
- package/dist/middlewares/body.d.ts.map +1 -1
- package/dist/middlewares/body.js +4 -4
- package/dist/middlewares/body.js.map +1 -1
- package/dist/middlewares/body.mjs +4 -4
- package/dist/middlewares/body.mjs.map +1 -1
- package/dist/middlewares/compression.d.ts +2 -2
- package/dist/middlewares/compression.d.ts.map +1 -1
- package/dist/middlewares/compression.js.map +1 -1
- package/dist/middlewares/compression.mjs.map +1 -1
- package/dist/middlewares/cors.d.ts +2 -2
- package/dist/middlewares/cors.d.ts.map +1 -1
- package/dist/middlewares/cors.js +6 -8
- package/dist/middlewares/cors.js.map +1 -1
- package/dist/middlewares/cors.mjs +6 -8
- package/dist/middlewares/cors.mjs.map +1 -1
- package/dist/middlewares/errors.d.ts +2 -2
- package/dist/middlewares/errors.d.ts.map +1 -1
- package/dist/middlewares/errors.js.map +1 -1
- package/dist/middlewares/errors.mjs.map +1 -1
- package/dist/middlewares/favicon.d.ts +2 -2
- package/dist/middlewares/favicon.d.ts.map +1 -1
- package/dist/middlewares/favicon.js.map +1 -1
- package/dist/middlewares/favicon.mjs.map +1 -1
- package/dist/middlewares/index.d.ts +2 -2
- package/dist/middlewares/index.d.ts.map +1 -1
- package/dist/middlewares/index.js.map +1 -1
- package/dist/middlewares/index.mjs.map +1 -1
- package/dist/middlewares/ip.d.ts +2 -2
- package/dist/middlewares/ip.d.ts.map +1 -1
- package/dist/middlewares/ip.js.map +1 -1
- package/dist/middlewares/ip.mjs.map +1 -1
- package/dist/middlewares/logger.d.ts +2 -2
- package/dist/middlewares/logger.d.ts.map +1 -1
- package/dist/middlewares/logger.js.map +1 -1
- package/dist/middlewares/logger.mjs.map +1 -1
- package/dist/middlewares/powered-by.d.ts +2 -2
- package/dist/middlewares/powered-by.d.ts.map +1 -1
- package/dist/middlewares/powered-by.js.map +1 -1
- package/dist/middlewares/powered-by.mjs.map +1 -1
- package/dist/middlewares/public.d.ts +2 -2
- package/dist/middlewares/public.d.ts.map +1 -1
- package/dist/middlewares/public.js +1 -1
- package/dist/middlewares/public.js.map +1 -1
- package/dist/middlewares/public.mjs +1 -1
- package/dist/middlewares/public.mjs.map +1 -1
- package/dist/middlewares/query.d.ts +2 -2
- package/dist/middlewares/query.d.ts.map +1 -1
- package/dist/middlewares/query.js.map +1 -1
- package/dist/middlewares/query.mjs.map +1 -1
- package/dist/middlewares/response-time.d.ts +2 -2
- package/dist/middlewares/response-time.d.ts.map +1 -1
- package/dist/middlewares/response-time.js.map +1 -1
- package/dist/middlewares/response-time.mjs.map +1 -1
- package/dist/middlewares/responses.d.ts +3 -3
- package/dist/middlewares/responses.d.ts.map +1 -1
- package/dist/middlewares/responses.js.map +1 -1
- package/dist/middlewares/responses.mjs.map +1 -1
- package/dist/middlewares/security.d.ts +2 -2
- package/dist/middlewares/security.d.ts.map +1 -1
- package/dist/middlewares/security.js +11 -4
- package/dist/middlewares/security.js.map +1 -1
- package/dist/middlewares/security.mjs +12 -5
- package/dist/middlewares/security.mjs.map +1 -1
- package/dist/middlewares/session.d.ts +2 -2
- package/dist/middlewares/session.d.ts.map +1 -1
- package/dist/middlewares/session.js.map +1 -1
- package/dist/middlewares/session.mjs.map +1 -1
- package/dist/migrations/database/5.0.0-discard-drafts.d.ts +30 -0
- package/dist/migrations/database/5.0.0-discard-drafts.d.ts.map +1 -0
- package/dist/migrations/database/5.0.0-discard-drafts.js +50 -0
- package/dist/migrations/database/5.0.0-discard-drafts.js.map +1 -0
- package/dist/migrations/database/5.0.0-discard-drafts.mjs +50 -0
- package/dist/migrations/database/5.0.0-discard-drafts.mjs.map +1 -0
- package/dist/migrations/draft-publish.d.ts +17 -0
- package/dist/migrations/draft-publish.d.ts.map +1 -0
- package/dist/migrations/draft-publish.js +42 -0
- package/dist/migrations/draft-publish.js.map +1 -0
- package/dist/migrations/draft-publish.mjs +42 -0
- package/dist/migrations/draft-publish.mjs.map +1 -0
- package/dist/providers/admin.d.ts +3 -0
- package/dist/providers/admin.d.ts.map +1 -0
- package/dist/providers/admin.js +20 -0
- package/dist/providers/admin.js.map +1 -0
- package/dist/providers/admin.mjs +21 -0
- package/dist/providers/admin.mjs.map +1 -0
- package/dist/providers/coreStore.d.ts +3 -0
- package/dist/providers/coreStore.d.ts.map +1 -0
- package/dist/providers/coreStore.js +11 -0
- package/dist/providers/coreStore.js.map +1 -0
- package/dist/providers/coreStore.mjs +12 -0
- package/dist/providers/coreStore.mjs.map +1 -0
- package/dist/providers/cron.d.ts +3 -0
- package/dist/providers/cron.d.ts.map +1 -0
- package/dist/providers/cron.js +20 -0
- package/dist/providers/cron.js.map +1 -0
- package/dist/providers/cron.mjs +21 -0
- package/dist/providers/cron.mjs.map +1 -0
- package/dist/providers/index.d.ts +3 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +11 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/index.mjs +11 -0
- package/dist/providers/index.mjs.map +1 -0
- package/dist/providers/provider.d.ts +9 -0
- package/dist/providers/provider.d.ts.map +1 -0
- package/dist/providers/provider.js +5 -0
- package/dist/providers/provider.js.map +1 -0
- package/dist/providers/provider.mjs +5 -0
- package/dist/providers/provider.mjs.map +1 -0
- package/dist/providers/registries.d.ts +3 -0
- package/dist/providers/registries.d.ts.map +1 -0
- package/dist/providers/registries.js +35 -0
- package/dist/providers/registries.js.map +1 -0
- package/dist/providers/registries.mjs +36 -0
- package/dist/providers/registries.mjs.map +1 -0
- package/dist/providers/telemetry.d.ts +3 -0
- package/dist/providers/telemetry.d.ts.map +1 -0
- package/dist/providers/telemetry.js +19 -0
- package/dist/providers/telemetry.js.map +1 -0
- package/dist/providers/telemetry.mjs +20 -0
- package/dist/providers/telemetry.mjs.map +1 -0
- package/dist/providers/webhooks.d.ts +3 -0
- package/dist/providers/webhooks.d.ts.map +1 -0
- package/dist/providers/webhooks.js +30 -0
- package/dist/providers/webhooks.js.map +1 -0
- package/dist/providers/webhooks.mjs +31 -0
- package/dist/providers/webhooks.mjs.map +1 -0
- package/dist/registries/apis.d.ts +2 -2
- package/dist/registries/apis.d.ts.map +1 -1
- package/dist/registries/apis.js.map +1 -1
- package/dist/registries/apis.mjs.map +1 -1
- package/dist/registries/components.d.ts +6 -6
- package/dist/registries/components.d.ts.map +1 -1
- package/dist/registries/components.js.map +1 -1
- package/dist/registries/components.mjs.map +1 -1
- package/dist/registries/content-types.d.ts +5 -5
- package/dist/registries/content-types.d.ts.map +1 -1
- package/dist/registries/content-types.js.map +1 -1
- package/dist/registries/content-types.mjs.map +1 -1
- package/dist/registries/controllers.d.ts +10 -10
- package/dist/registries/controllers.d.ts.map +1 -1
- package/dist/registries/controllers.js.map +1 -1
- package/dist/registries/controllers.mjs.map +1 -1
- package/dist/registries/custom-fields.d.ts +3 -3
- package/dist/registries/custom-fields.d.ts.map +1 -1
- package/dist/registries/custom-fields.js.map +1 -1
- package/dist/registries/custom-fields.mjs.map +1 -1
- package/dist/registries/index.d.ts +0 -1
- package/dist/registries/index.d.ts.map +1 -1
- package/dist/registries/middlewares.d.ts +6 -6
- package/dist/registries/middlewares.d.ts.map +1 -1
- package/dist/registries/middlewares.js.map +1 -1
- package/dist/registries/middlewares.mjs.map +1 -1
- package/dist/registries/modules.d.ts +2 -2
- package/dist/registries/modules.d.ts.map +1 -1
- package/dist/registries/modules.js.map +1 -1
- package/dist/registries/modules.mjs.map +1 -1
- package/dist/registries/plugins.d.ts +5 -5
- package/dist/registries/plugins.d.ts.map +1 -1
- package/dist/registries/plugins.js.map +1 -1
- package/dist/registries/plugins.mjs.map +1 -1
- package/dist/registries/policies.d.ts +23 -11
- package/dist/registries/policies.d.ts.map +1 -1
- package/dist/registries/policies.js +64 -18
- package/dist/registries/policies.js.map +1 -1
- package/dist/registries/policies.mjs +65 -19
- package/dist/registries/policies.mjs.map +1 -1
- package/dist/registries/services.d.ts +8 -8
- package/dist/registries/services.d.ts.map +1 -1
- package/dist/registries/services.js.map +1 -1
- package/dist/registries/services.mjs.map +1 -1
- package/dist/services/auth/index.d.ts +4 -4
- package/dist/services/auth/index.d.ts.map +1 -1
- package/dist/services/auth/index.js.map +1 -1
- package/dist/services/auth/index.mjs.map +1 -1
- package/dist/services/config.d.ts +3 -0
- package/dist/services/config.d.ts.map +1 -0
- package/dist/services/config.js +47 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/config.mjs +47 -0
- package/dist/services/config.mjs.map +1 -0
- package/dist/services/content-api/index.d.ts +21 -3
- package/dist/services/content-api/index.d.ts.map +1 -1
- package/dist/services/content-api/index.js +28 -2
- package/dist/services/content-api/index.js.map +1 -1
- package/dist/services/content-api/index.mjs +28 -2
- package/dist/services/content-api/index.mjs.map +1 -1
- package/dist/services/content-api/permissions/index.d.ts +3 -3
- package/dist/services/content-api/permissions/index.d.ts.map +1 -1
- package/dist/services/content-api/permissions/index.js +1 -1
- package/dist/services/content-api/permissions/index.js.map +1 -1
- package/dist/services/content-api/permissions/index.mjs +1 -1
- package/dist/services/content-api/permissions/index.mjs.map +1 -1
- package/dist/services/core-store.d.ts.map +1 -1
- package/dist/services/cron.d.ts +2 -2
- package/dist/services/cron.d.ts.map +1 -1
- package/dist/services/cron.js.map +1 -1
- package/dist/services/cron.mjs.map +1 -1
- package/dist/services/custom-fields.d.ts +2 -2
- package/dist/services/custom-fields.d.ts.map +1 -1
- package/dist/services/custom-fields.js.map +1 -1
- package/dist/services/custom-fields.mjs.map +1 -1
- package/dist/services/document-service/attributes/index.d.ts +6 -0
- package/dist/services/document-service/attributes/index.d.ts.map +1 -0
- package/dist/services/{entity-service → document-service}/attributes/index.js +5 -5
- package/dist/services/document-service/attributes/index.js.map +1 -0
- package/dist/services/{entity-service → document-service}/attributes/index.mjs +5 -5
- package/dist/services/document-service/attributes/index.mjs.map +1 -0
- package/dist/services/document-service/attributes/transforms.d.ts +10 -0
- package/dist/services/document-service/attributes/transforms.d.ts.map +1 -0
- package/dist/services/document-service/attributes/transforms.js.map +1 -0
- package/dist/services/document-service/attributes/transforms.mjs.map +1 -0
- package/dist/services/document-service/common.d.ts +2 -2
- package/dist/services/document-service/common.d.ts.map +1 -1
- package/dist/services/document-service/common.js.map +1 -1
- package/dist/services/document-service/common.mjs.map +1 -1
- package/dist/services/document-service/components.d.ts +25 -1
- package/dist/services/document-service/components.d.ts.map +1 -1
- package/dist/services/{entity-service → document-service}/components.js +41 -137
- package/dist/services/document-service/components.js.map +1 -0
- package/dist/services/{entity-service → document-service}/components.mjs +42 -138
- package/dist/services/document-service/components.mjs.map +1 -0
- package/dist/services/document-service/draft-and-publish.d.ts +7 -7
- package/dist/services/document-service/draft-and-publish.d.ts.map +1 -1
- package/dist/services/document-service/draft-and-publish.js.map +1 -1
- package/dist/services/document-service/draft-and-publish.mjs.map +1 -1
- package/dist/services/document-service/entries.d.ts +10 -0
- package/dist/services/document-service/entries.d.ts.map +1 -0
- package/dist/services/document-service/entries.js +96 -0
- package/dist/services/document-service/entries.js.map +1 -0
- package/dist/services/document-service/entries.mjs +96 -0
- package/dist/services/document-service/entries.mjs.map +1 -0
- package/dist/services/document-service/events.d.ts +25 -0
- package/dist/services/document-service/events.d.ts.map +1 -0
- package/dist/services/document-service/events.js +47 -0
- package/dist/services/document-service/events.js.map +1 -0
- package/dist/services/document-service/events.mjs +47 -0
- package/dist/services/document-service/events.mjs.map +1 -0
- package/dist/services/document-service/index.d.ts +2 -4
- package/dist/services/document-service/index.d.ts.map +1 -1
- package/dist/services/document-service/index.js +18 -5
- package/dist/services/document-service/index.js.map +1 -1
- package/dist/services/document-service/index.mjs +16 -3
- package/dist/services/document-service/index.mjs.map +1 -1
- package/dist/services/document-service/internationalization.d.ts +5 -5
- package/dist/services/document-service/internationalization.d.ts.map +1 -1
- package/dist/services/document-service/internationalization.js +14 -5
- package/dist/services/document-service/internationalization.js.map +1 -1
- package/dist/services/document-service/internationalization.mjs +14 -5
- package/dist/services/document-service/internationalization.mjs.map +1 -1
- package/dist/services/document-service/middlewares/errors.d.ts +6 -0
- package/dist/services/document-service/middlewares/errors.d.ts.map +1 -0
- package/dist/services/document-service/middlewares/errors.js +25 -0
- package/dist/services/document-service/middlewares/errors.js.map +1 -0
- package/dist/services/document-service/middlewares/errors.mjs +25 -0
- package/dist/services/document-service/middlewares/errors.mjs.map +1 -0
- package/dist/services/document-service/middlewares/index.d.ts +3 -0
- package/dist/services/document-service/middlewares/index.d.ts.map +1 -0
- package/dist/services/document-service/middlewares/middleware-manager.d.ts +10 -0
- package/dist/services/document-service/middlewares/middleware-manager.d.ts.map +1 -0
- package/dist/services/document-service/{middlewares.js → middlewares/middleware-manager.js} +9 -6
- package/dist/services/document-service/middlewares/middleware-manager.js.map +1 -0
- package/dist/services/document-service/{middlewares.mjs → middlewares/middleware-manager.mjs} +9 -6
- package/dist/services/document-service/middlewares/middleware-manager.mjs.map +1 -0
- package/dist/services/document-service/params.d.ts +3 -1
- package/dist/services/document-service/params.d.ts.map +1 -1
- package/dist/services/document-service/params.js.map +1 -0
- package/dist/services/document-service/params.mjs.map +1 -0
- package/dist/services/document-service/repository.d.ts.map +1 -1
- package/dist/services/document-service/repository.js +155 -181
- package/dist/services/document-service/repository.js.map +1 -1
- package/dist/services/document-service/repository.mjs +139 -165
- package/dist/services/document-service/repository.mjs.map +1 -1
- package/dist/services/document-service/transform/data.d.ts.map +1 -1
- package/dist/services/document-service/transform/data.js +4 -2
- package/dist/services/document-service/transform/data.js.map +1 -1
- package/dist/services/document-service/transform/data.mjs +4 -2
- package/dist/services/document-service/transform/data.mjs.map +1 -1
- package/dist/services/document-service/transform/fields.d.ts +2 -2
- package/dist/services/document-service/transform/fields.d.ts.map +1 -1
- package/dist/services/document-service/transform/fields.js.map +1 -1
- package/dist/services/document-service/transform/fields.mjs.map +1 -1
- package/dist/services/document-service/transform/id-map.d.ts +3 -3
- package/dist/services/document-service/transform/id-map.d.ts.map +1 -1
- package/dist/services/document-service/transform/id-map.js +1 -1
- package/dist/services/document-service/transform/id-map.js.map +1 -1
- package/dist/services/document-service/transform/id-map.mjs +1 -1
- package/dist/services/document-service/transform/id-map.mjs.map +1 -1
- package/dist/services/document-service/transform/id-transform.d.ts +2 -2
- package/dist/services/document-service/transform/id-transform.d.ts.map +1 -1
- package/dist/services/document-service/transform/id-transform.js.map +1 -1
- package/dist/services/document-service/transform/id-transform.mjs.map +1 -1
- package/dist/services/document-service/transform/populate.d.ts +2 -2
- package/dist/services/document-service/transform/populate.d.ts.map +1 -1
- package/dist/services/document-service/transform/populate.js +1 -1
- package/dist/services/document-service/transform/populate.js.map +1 -1
- package/dist/services/document-service/transform/populate.mjs +1 -1
- package/dist/services/document-service/transform/populate.mjs.map +1 -1
- package/dist/services/document-service/transform/query.d.ts +5 -0
- package/dist/services/document-service/transform/query.d.ts.map +1 -0
- package/dist/services/document-service/transform/query.js +9 -0
- package/dist/services/document-service/transform/query.js.map +1 -0
- package/dist/services/document-service/transform/query.mjs +9 -0
- package/dist/services/document-service/transform/query.mjs.map +1 -0
- package/dist/services/document-service/transform/relations/extract/data-ids.d.ts +8 -7
- package/dist/services/document-service/transform/relations/extract/data-ids.d.ts.map +1 -1
- package/dist/services/document-service/transform/relations/extract/data-ids.js +44 -77
- package/dist/services/document-service/transform/relations/extract/data-ids.js.map +1 -1
- package/dist/services/document-service/transform/relations/extract/data-ids.mjs +44 -77
- package/dist/services/document-service/transform/relations/extract/data-ids.mjs.map +1 -1
- package/dist/services/document-service/transform/relations/transform/data-ids.d.ts +8 -4
- package/dist/services/document-service/transform/relations/transform/data-ids.d.ts.map +1 -1
- package/dist/services/document-service/transform/relations/transform/data-ids.js +60 -125
- package/dist/services/document-service/transform/relations/transform/data-ids.js.map +1 -1
- package/dist/services/document-service/transform/relations/transform/data-ids.mjs +61 -126
- package/dist/services/document-service/transform/relations/transform/data-ids.mjs.map +1 -1
- package/dist/services/document-service/transform/relations/transform/default-locale.d.ts +9 -0
- package/dist/services/document-service/transform/relations/transform/default-locale.d.ts.map +1 -0
- package/dist/services/document-service/transform/relations/transform/default-locale.js +32 -0
- package/dist/services/document-service/transform/relations/transform/default-locale.js.map +1 -0
- package/dist/services/document-service/transform/relations/transform/default-locale.mjs +32 -0
- package/dist/services/document-service/transform/relations/transform/default-locale.mjs.map +1 -0
- package/dist/services/document-service/transform/relations/utils/dp.d.ts +3 -3
- package/dist/services/document-service/transform/relations/utils/dp.d.ts.map +1 -1
- package/dist/services/document-service/transform/relations/utils/dp.js +9 -4
- package/dist/services/document-service/transform/relations/utils/dp.js.map +1 -1
- package/dist/services/document-service/transform/relations/utils/dp.mjs +9 -4
- package/dist/services/document-service/transform/relations/utils/dp.mjs.map +1 -1
- package/dist/services/document-service/transform/relations/utils/i18n.d.ts +6 -6
- package/dist/services/document-service/transform/relations/utils/i18n.d.ts.map +1 -1
- package/dist/services/document-service/transform/relations/utils/i18n.js +3 -9
- package/dist/services/document-service/transform/relations/utils/i18n.js.map +1 -1
- package/dist/services/document-service/transform/relations/utils/i18n.mjs +3 -9
- package/dist/services/document-service/transform/relations/utils/i18n.mjs.map +1 -1
- package/dist/services/document-service/transform/relations/utils/map-relation.d.ts +6 -0
- package/dist/services/document-service/transform/relations/utils/map-relation.d.ts.map +1 -0
- package/dist/services/document-service/transform/relations/utils/map-relation.js +91 -0
- package/dist/services/document-service/transform/relations/utils/map-relation.js.map +1 -0
- package/dist/services/document-service/transform/relations/utils/map-relation.mjs +91 -0
- package/dist/services/document-service/transform/relations/utils/map-relation.mjs.map +1 -0
- package/dist/services/document-service/transform/relations/utils/types.d.ts +6 -0
- package/dist/services/document-service/transform/relations/utils/types.d.ts.map +1 -1
- package/dist/services/document-service/transform/types.d.ts +3 -3
- package/dist/services/document-service/transform/types.d.ts.map +1 -1
- package/dist/services/document-service/utils/populate.d.ts +9 -2
- package/dist/services/document-service/utils/populate.d.ts.map +1 -1
- package/dist/services/document-service/utils/populate.js +4 -4
- package/dist/services/document-service/utils/populate.js.map +1 -1
- package/dist/services/document-service/utils/populate.mjs +4 -4
- package/dist/services/document-service/utils/populate.mjs.map +1 -1
- package/dist/services/entity-service/index.d.ts +4 -6
- package/dist/services/entity-service/index.d.ts.map +1 -1
- package/dist/services/entity-service/index.js +44 -203
- package/dist/services/entity-service/index.js.map +1 -1
- package/dist/services/entity-service/index.mjs +38 -197
- package/dist/services/entity-service/index.mjs.map +1 -1
- package/dist/services/entity-validator/index.d.ts +15 -2
- package/dist/services/entity-validator/index.d.ts.map +1 -1
- package/dist/services/entity-validator/index.js +182 -109
- package/dist/services/entity-validator/index.js.map +1 -1
- package/dist/services/entity-validator/index.mjs +182 -109
- package/dist/services/entity-validator/index.mjs.map +1 -1
- package/dist/services/entity-validator/validators.d.ts +24 -22
- package/dist/services/entity-validator/validators.d.ts.map +1 -1
- package/dist/services/entity-validator/validators.js +65 -19
- package/dist/services/entity-validator/validators.js.map +1 -1
- package/dist/services/entity-validator/validators.mjs +58 -11
- package/dist/services/entity-validator/validators.mjs.map +1 -1
- package/dist/services/event-hub.d.ts +1 -0
- package/dist/services/event-hub.d.ts.map +1 -1
- package/dist/services/event-hub.js +9 -4
- package/dist/services/event-hub.js.map +1 -1
- package/dist/services/event-hub.mjs +9 -4
- package/dist/services/event-hub.mjs.map +1 -1
- package/dist/services/features.d.ts +3 -3
- package/dist/services/features.d.ts.map +1 -1
- package/dist/services/features.js.map +1 -1
- package/dist/services/features.mjs.map +1 -1
- package/dist/services/fs.d.ts +2 -2
- package/dist/services/fs.d.ts.map +1 -1
- package/dist/services/fs.js.map +1 -1
- package/dist/services/fs.mjs.map +1 -1
- package/dist/services/metrics/admin-user-hash.d.ts +2 -2
- package/dist/services/metrics/admin-user-hash.d.ts.map +1 -1
- package/dist/services/metrics/admin-user-hash.js.map +1 -1
- package/dist/services/metrics/admin-user-hash.mjs.map +1 -1
- package/dist/services/metrics/index.d.ts +2 -2
- package/dist/services/metrics/index.d.ts.map +1 -1
- package/dist/services/metrics/index.js.map +1 -1
- package/dist/services/metrics/index.mjs.map +1 -1
- package/dist/services/metrics/middleware.d.ts +2 -2
- package/dist/services/metrics/middleware.d.ts.map +1 -1
- package/dist/services/metrics/middleware.js.map +1 -1
- package/dist/services/metrics/middleware.mjs.map +1 -1
- package/dist/services/metrics/rate-limiter.d.ts.map +1 -1
- package/dist/services/metrics/rate-limiter.js.map +1 -1
- package/dist/services/metrics/rate-limiter.mjs.map +1 -1
- package/dist/services/metrics/sender.d.ts +3 -3
- package/dist/services/metrics/sender.d.ts.map +1 -1
- package/dist/services/metrics/sender.js.map +1 -1
- package/dist/services/metrics/sender.mjs.map +1 -1
- package/dist/services/query-params.d.ts +7 -0
- package/dist/services/query-params.d.ts.map +1 -0
- package/dist/services/query-params.js +12 -0
- package/dist/services/query-params.js.map +1 -0
- package/dist/services/query-params.mjs +13 -0
- package/dist/services/query-params.mjs.map +1 -0
- package/dist/services/reloader.d.ts +7 -0
- package/dist/services/reloader.d.ts.map +1 -0
- package/dist/services/reloader.js +36 -0
- package/dist/services/reloader.js.map +1 -0
- package/dist/services/reloader.mjs +36 -0
- package/dist/services/reloader.mjs.map +1 -0
- package/dist/services/server/admin-api.d.ts +3 -3
- package/dist/services/server/admin-api.d.ts.map +1 -1
- package/dist/services/server/admin-api.js.map +1 -1
- package/dist/services/server/admin-api.mjs.map +1 -1
- package/dist/services/server/api.d.ts +3 -3
- package/dist/services/server/api.d.ts.map +1 -1
- package/dist/services/server/api.js.map +1 -1
- package/dist/services/server/api.mjs.map +1 -1
- package/dist/services/server/compose-endpoint.d.ts +2 -2
- package/dist/services/server/compose-endpoint.d.ts.map +1 -1
- package/dist/services/server/compose-endpoint.js +1 -2
- package/dist/services/server/compose-endpoint.js.map +1 -1
- package/dist/services/server/compose-endpoint.mjs +2 -3
- package/dist/services/server/compose-endpoint.mjs.map +1 -1
- package/dist/services/server/content-api.d.ts +3 -3
- package/dist/services/server/content-api.d.ts.map +1 -1
- package/dist/services/server/content-api.js.map +1 -1
- package/dist/services/server/content-api.mjs.map +1 -1
- package/dist/services/server/http-server.d.ts +2 -2
- package/dist/services/server/http-server.d.ts.map +1 -1
- package/dist/services/server/http-server.js.map +1 -1
- package/dist/services/server/http-server.mjs.map +1 -1
- package/dist/services/server/index.d.ts +2 -2
- package/dist/services/server/index.d.ts.map +1 -1
- package/dist/services/server/index.js +2 -3
- package/dist/services/server/index.js.map +1 -1
- package/dist/services/server/index.mjs +2 -3
- package/dist/services/server/index.mjs.map +1 -1
- package/dist/services/server/koa.d.ts.map +1 -1
- package/dist/services/server/koa.js +1 -1
- package/dist/services/server/koa.js.map +1 -1
- package/dist/services/server/koa.mjs +1 -1
- package/dist/services/server/koa.mjs.map +1 -1
- package/dist/services/server/middleware.d.ts +4 -4
- package/dist/services/server/middleware.d.ts.map +1 -1
- package/dist/services/server/middleware.js.map +1 -1
- package/dist/services/server/middleware.mjs.map +1 -1
- package/dist/services/server/policy.d.ts +3 -3
- package/dist/services/server/policy.d.ts.map +1 -1
- package/dist/services/server/policy.js +4 -4
- package/dist/services/server/policy.js.map +1 -1
- package/dist/services/server/policy.mjs +4 -4
- package/dist/services/server/policy.mjs.map +1 -1
- package/dist/services/server/register-middlewares.d.ts +2 -2
- package/dist/services/server/register-middlewares.d.ts.map +1 -1
- package/dist/services/server/register-middlewares.js.map +1 -1
- package/dist/services/server/register-middlewares.mjs.map +1 -1
- package/dist/services/server/register-routes.d.ts +2 -2
- package/dist/services/server/register-routes.d.ts.map +1 -1
- package/dist/services/server/register-routes.js +3 -3
- package/dist/services/server/register-routes.js.map +1 -1
- package/dist/services/server/register-routes.mjs +3 -3
- package/dist/services/server/register-routes.mjs.map +1 -1
- package/dist/services/server/routing.d.ts +5 -5
- package/dist/services/server/routing.d.ts.map +1 -1
- package/dist/services/server/routing.js.map +1 -1
- package/dist/services/server/routing.mjs.map +1 -1
- package/dist/services/utils/dynamic-zones.d.ts.map +1 -1
- package/dist/services/utils/dynamic-zones.js +2 -1
- package/dist/services/utils/dynamic-zones.js.map +1 -1
- package/dist/services/utils/dynamic-zones.mjs +2 -1
- package/dist/services/utils/dynamic-zones.mjs.map +1 -1
- package/dist/services/webhook-runner.d.ts +2 -1
- package/dist/services/webhook-runner.d.ts.map +1 -1
- package/dist/services/webhook-runner.js.map +1 -1
- package/dist/services/webhook-runner.mjs.map +1 -1
- package/dist/services/webhook-store.d.ts +2 -8
- package/dist/services/webhook-store.d.ts.map +1 -1
- package/dist/services/webhook-store.js +14 -8
- package/dist/services/webhook-store.js.map +1 -1
- package/dist/services/webhook-store.mjs +14 -8
- package/dist/services/webhook-store.mjs.map +1 -1
- package/dist/utils/convert-custom-field-type.d.ts +2 -2
- package/dist/utils/convert-custom-field-type.d.ts.map +1 -1
- package/dist/utils/convert-custom-field-type.js.map +1 -1
- package/dist/utils/convert-custom-field-type.mjs.map +1 -1
- package/dist/utils/fetch.d.ts +3 -3
- package/dist/utils/fetch.d.ts.map +1 -1
- package/dist/utils/fetch.js +4 -3
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/fetch.mjs +4 -3
- package/dist/utils/fetch.mjs.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/is-initialized.d.ts +2 -2
- package/dist/utils/is-initialized.d.ts.map +1 -1
- package/dist/utils/is-initialized.js +1 -1
- package/dist/utils/is-initialized.js.map +1 -1
- package/dist/utils/is-initialized.mjs +1 -1
- package/dist/utils/is-initialized.mjs.map +1 -1
- package/dist/utils/load-files.d.ts.map +1 -1
- package/dist/utils/open-browser.d.ts +2 -2
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/open-browser.mjs.map +1 -1
- package/dist/utils/resolve-working-dirs.d.ts +19 -0
- package/dist/utils/resolve-working-dirs.d.ts.map +1 -0
- package/dist/utils/resolve-working-dirs.js +13 -0
- package/dist/utils/resolve-working-dirs.js.map +1 -0
- package/dist/utils/resolve-working-dirs.mjs +11 -0
- package/dist/utils/resolve-working-dirs.mjs.map +1 -0
- package/dist/utils/signals.d.ts +2 -2
- package/dist/utils/signals.d.ts.map +1 -1
- package/dist/utils/signals.js.map +1 -1
- package/dist/utils/signals.mjs.map +1 -1
- package/dist/utils/startup-logger.d.ts +2 -2
- package/dist/utils/startup-logger.d.ts.map +1 -1
- package/dist/utils/startup-logger.js.map +1 -1
- package/dist/utils/startup-logger.mjs.map +1 -1
- package/dist/utils/transform-content-types-to-models.d.ts +54 -99
- package/dist/utils/transform-content-types-to-models.d.ts.map +1 -1
- package/dist/utils/transform-content-types-to-models.js +105 -57
- package/dist/utils/transform-content-types-to-models.js.map +1 -1
- package/dist/utils/transform-content-types-to-models.mjs +105 -57
- package/dist/utils/transform-content-types-to-models.mjs.map +1 -1
- package/dist/utils/update-notifier/index.d.ts +2 -7
- package/dist/utils/update-notifier/index.d.ts.map +1 -1
- package/dist/utils/update-notifier/index.js +11 -14
- package/dist/utils/update-notifier/index.js.map +1 -1
- package/dist/utils/update-notifier/index.mjs +11 -14
- package/dist/utils/update-notifier/index.mjs.map +1 -1
- package/package.json +32 -28
- package/dist/registries/config.d.ts +0 -4
- package/dist/registries/config.d.ts.map +0 -1
- package/dist/registries/config.js +0 -31
- package/dist/registries/config.js.map +0 -1
- package/dist/registries/config.mjs +0 -32
- package/dist/registries/config.mjs.map +0 -1
- package/dist/services/document-service/middlewares.d.ts +0 -8
- package/dist/services/document-service/middlewares.d.ts.map +0 -1
- package/dist/services/document-service/middlewares.js.map +0 -1
- package/dist/services/document-service/middlewares.mjs.map +0 -1
- package/dist/services/document-service/transform/filters.d.ts +0 -3
- package/dist/services/document-service/transform/filters.d.ts.map +0 -1
- package/dist/services/document-service/transform/relations/transform/output-ids.d.ts +0 -4
- package/dist/services/document-service/transform/relations/transform/output-ids.d.ts.map +0 -1
- package/dist/services/document-service/transform/relations/utils/data.js +0 -12
- package/dist/services/document-service/transform/relations/utils/data.js.map +0 -1
- package/dist/services/document-service/transform/relations/utils/data.mjs +0 -12
- package/dist/services/document-service/transform/relations/utils/data.mjs.map +0 -1
- package/dist/services/document-service/transform/sort.d.ts +0 -5
- package/dist/services/document-service/transform/sort.d.ts.map +0 -1
- package/dist/services/document-service/transform/utils.d.ts +0 -9
- package/dist/services/document-service/transform/utils.d.ts.map +0 -1
- package/dist/services/entity-service/attributes/index.d.ts +0 -6
- package/dist/services/entity-service/attributes/index.d.ts.map +0 -1
- package/dist/services/entity-service/attributes/index.js.map +0 -1
- package/dist/services/entity-service/attributes/index.mjs.map +0 -1
- package/dist/services/entity-service/attributes/transforms.d.ts +0 -10
- package/dist/services/entity-service/attributes/transforms.d.ts.map +0 -1
- package/dist/services/entity-service/attributes/transforms.js.map +0 -1
- package/dist/services/entity-service/attributes/transforms.mjs.map +0 -1
- package/dist/services/entity-service/components.d.ts +0 -23
- package/dist/services/entity-service/components.d.ts.map +0 -1
- package/dist/services/entity-service/components.js.map +0 -1
- package/dist/services/entity-service/components.mjs.map +0 -1
- package/dist/services/entity-service/params.d.ts +0 -8
- package/dist/services/entity-service/params.d.ts.map +0 -1
- package/dist/services/entity-service/params.js.map +0 -1
- package/dist/services/entity-service/params.mjs.map +0 -1
- package/dist/services/utils/upload-files.d.ts +0 -8
- package/dist/services/utils/upload-files.d.ts.map +0 -1
- package/dist/services/utils/upload-files.js +0 -64
- package/dist/services/utils/upload-files.js.map +0 -1
- package/dist/services/utils/upload-files.mjs +0 -63
- package/dist/services/utils/upload-files.mjs.map +0 -1
- package/dist/utils/get-dirs.d.ts +0 -9
- package/dist/utils/get-dirs.d.ts.map +0 -1
- package/dist/utils/get-dirs.js.map +0 -1
- package/dist/utils/get-dirs.mjs.map +0 -1
- /package/dist/services/{entity-service → document-service}/attributes/transforms.js +0 -0
- /package/dist/services/{entity-service → document-service}/attributes/transforms.mjs +0 -0
- /package/dist/services/{entity-service → document-service}/params.js +0 -0
- /package/dist/services/{entity-service → document-service}/params.mjs +0 -0
package/dist/Strapi.js
CHANGED
|
@@ -1,162 +1,139 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const globalAgent = require("global-agent");
|
|
2
3
|
const path = require("path");
|
|
3
4
|
const _ = require("lodash");
|
|
4
5
|
const _$1 = require("lodash/fp");
|
|
5
6
|
const logger = require("@strapi/logger");
|
|
6
7
|
const database = require("@strapi/database");
|
|
7
|
-
const strapiUtils = require("@strapi/utils");
|
|
8
8
|
const index = require("./configuration/index.js");
|
|
9
9
|
const factories = require("./factories.js");
|
|
10
|
-
const compile = require("./compile.js");
|
|
11
10
|
const openBrowser = require("./utils/open-browser.js");
|
|
12
11
|
const isInitialized = require("./utils/is-initialized.js");
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const index$5 = require("./utils/update-notifier/index.js");
|
|
12
|
+
const index$2 = require("./ee/index.js");
|
|
13
|
+
require("./utils/update-notifier/index.js");
|
|
16
14
|
const fetch = require("./utils/fetch.js");
|
|
17
15
|
const convertCustomFieldType = require("./utils/convert-custom-field-type.js");
|
|
18
16
|
const startupLogger = require("./utils/startup-logger.js");
|
|
19
17
|
const transformContentTypesToModels = require("./utils/transform-content-types-to-models.js");
|
|
20
|
-
const signals = require("./utils/signals.js");
|
|
21
18
|
const lifecycles = require("./utils/lifecycles.js");
|
|
22
|
-
|
|
23
|
-
const components = require("./registries/components.js");
|
|
24
|
-
const services = require("./registries/services.js");
|
|
25
|
-
const policies = require("./registries/policies.js");
|
|
26
|
-
const middlewares = require("./registries/middlewares.js");
|
|
27
|
-
const hooks = require("./registries/hooks.js");
|
|
28
|
-
const controllers = require("./registries/controllers.js");
|
|
29
|
-
const modules = require("./registries/modules.js");
|
|
30
|
-
const plugins = require("./registries/plugins.js");
|
|
31
|
-
const customFields = require("./registries/custom-fields.js");
|
|
32
|
-
const config = require("./registries/config.js");
|
|
33
|
-
const apis = require("./registries/apis.js");
|
|
34
|
-
const sanitizers = require("./registries/sanitizers.js");
|
|
35
|
-
const validators = require("./registries/validators.js");
|
|
36
|
-
const models = require("./registries/models.js");
|
|
37
|
-
const index$7 = require("./loaders/index.js");
|
|
19
|
+
require("node:path");
|
|
38
20
|
const container = require("./container.js");
|
|
39
21
|
const fs = require("./services/fs.js");
|
|
40
22
|
const eventHub = require("./services/event-hub.js");
|
|
41
|
-
const index$
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const index$8 = require("./services/entity-validator/index.js");
|
|
48
|
-
const index$4 = require("./services/metrics/index.js");
|
|
23
|
+
const index$5 = require("./services/server/index.js");
|
|
24
|
+
const reloader = require("./services/reloader.js");
|
|
25
|
+
const index$1 = require("./providers/index.js");
|
|
26
|
+
const index$7 = require("./services/entity-service/index.js");
|
|
27
|
+
const queryParams = require("./services/query-params.js");
|
|
28
|
+
const index$6 = require("./services/entity-validator/index.js");
|
|
49
29
|
const requestContext = require("./services/request-context.js");
|
|
50
|
-
const index$
|
|
51
|
-
const customFields
|
|
52
|
-
const index$
|
|
30
|
+
const index$4 = require("./services/auth/index.js");
|
|
31
|
+
const customFields = require("./services/custom-fields.js");
|
|
32
|
+
const index$3 = require("./services/content-api/index.js");
|
|
53
33
|
const dynamicZones = require("./services/utils/dynamic-zones.js");
|
|
54
34
|
const features = require("./services/features.js");
|
|
55
|
-
const index$
|
|
35
|
+
const index$8 = require("./services/document-service/index.js");
|
|
36
|
+
const coreStore = require("./services/core-store.js");
|
|
37
|
+
const config = require("./services/config.js");
|
|
56
38
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
function reload() {
|
|
71
|
-
if (state.shouldReload > 0) {
|
|
72
|
-
state.shouldReload -= 1;
|
|
73
|
-
reload.isReloading = false;
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (strapi.config.get("autoReload")) {
|
|
77
|
-
process.send?.("reload");
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
Object.defineProperty(reload, "isWatching", {
|
|
81
|
-
configurable: true,
|
|
82
|
-
enumerable: true,
|
|
83
|
-
set(value) {
|
|
84
|
-
if (state.isWatching === false && value === true) {
|
|
85
|
-
state.shouldReload += 1;
|
|
39
|
+
function _interopNamespace(e) {
|
|
40
|
+
if (e && e.__esModule)
|
|
41
|
+
return e;
|
|
42
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
43
|
+
if (e) {
|
|
44
|
+
for (const k in e) {
|
|
45
|
+
if (k !== "default") {
|
|
46
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
47
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: () => e[k]
|
|
50
|
+
});
|
|
86
51
|
}
|
|
87
|
-
state.isWatching = value;
|
|
88
|
-
},
|
|
89
|
-
get() {
|
|
90
|
-
return state.isWatching;
|
|
91
52
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
53
|
+
}
|
|
54
|
+
n.default = e;
|
|
55
|
+
return Object.freeze(n);
|
|
56
|
+
}
|
|
57
|
+
const globalAgent__namespace = /* @__PURE__ */ _interopNamespace(globalAgent);
|
|
58
|
+
const path__default = /* @__PURE__ */ _interopDefault(path);
|
|
59
|
+
const ___default = /* @__PURE__ */ _interopDefault(_);
|
|
97
60
|
class Strapi extends container.Container {
|
|
98
|
-
server;
|
|
99
|
-
log;
|
|
100
|
-
fs;
|
|
101
|
-
eventHub;
|
|
102
|
-
startupLogger;
|
|
103
|
-
cron;
|
|
104
|
-
webhookRunner;
|
|
105
|
-
webhookStore;
|
|
106
|
-
store;
|
|
107
|
-
entityValidator;
|
|
108
|
-
entityService;
|
|
109
|
-
documents;
|
|
110
|
-
telemetry;
|
|
111
|
-
requestContext;
|
|
112
|
-
customFields;
|
|
113
|
-
fetch;
|
|
114
|
-
dirs;
|
|
115
|
-
admin;
|
|
116
|
-
isLoaded;
|
|
117
|
-
db;
|
|
118
61
|
app;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
// @ts-expect-error - Assigned in constructor
|
|
123
|
-
ee;
|
|
124
|
-
constructor(opts = {}) {
|
|
62
|
+
isLoaded = false;
|
|
63
|
+
internal_config = {};
|
|
64
|
+
constructor(opts) {
|
|
125
65
|
super();
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
this.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
this.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
this.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
66
|
+
this.internal_config = index.loadConfiguration(opts);
|
|
67
|
+
this.registerInternalServices();
|
|
68
|
+
for (const provider of index$1.providers) {
|
|
69
|
+
provider.init?.(this);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
get admin() {
|
|
73
|
+
return this.get("admin");
|
|
74
|
+
}
|
|
75
|
+
get EE() {
|
|
76
|
+
return index$2.isEE;
|
|
77
|
+
}
|
|
78
|
+
get ee() {
|
|
79
|
+
return index$2;
|
|
80
|
+
}
|
|
81
|
+
get dirs() {
|
|
82
|
+
return this.config.get("dirs");
|
|
83
|
+
}
|
|
84
|
+
get reload() {
|
|
85
|
+
return this.get("reload");
|
|
86
|
+
}
|
|
87
|
+
get db() {
|
|
88
|
+
return this.get("db");
|
|
89
|
+
}
|
|
90
|
+
get requestContext() {
|
|
91
|
+
return this.get("requestContext");
|
|
92
|
+
}
|
|
93
|
+
get customFields() {
|
|
94
|
+
return this.get("customFields");
|
|
95
|
+
}
|
|
96
|
+
get entityValidator() {
|
|
97
|
+
return this.get("entityValidator");
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated `strapi.entityService` will be removed in the next major version
|
|
101
|
+
*/
|
|
102
|
+
get entityService() {
|
|
103
|
+
return this.get("entityService");
|
|
104
|
+
}
|
|
105
|
+
get documents() {
|
|
106
|
+
return this.get("documents");
|
|
107
|
+
}
|
|
108
|
+
get features() {
|
|
109
|
+
return this.get("features");
|
|
110
|
+
}
|
|
111
|
+
get fetch() {
|
|
112
|
+
return this.get("fetch");
|
|
113
|
+
}
|
|
114
|
+
get cron() {
|
|
115
|
+
return this.get("cron");
|
|
116
|
+
}
|
|
117
|
+
get log() {
|
|
118
|
+
return this.get("logger");
|
|
119
|
+
}
|
|
120
|
+
get startupLogger() {
|
|
121
|
+
return this.get("startupLogger");
|
|
122
|
+
}
|
|
123
|
+
get eventHub() {
|
|
124
|
+
return this.get("eventHub");
|
|
125
|
+
}
|
|
126
|
+
get fs() {
|
|
127
|
+
return this.get("fs");
|
|
128
|
+
}
|
|
129
|
+
get server() {
|
|
130
|
+
return this.get("server");
|
|
131
|
+
}
|
|
132
|
+
get telemetry() {
|
|
133
|
+
return this.get("telemetry");
|
|
134
|
+
}
|
|
135
|
+
get store() {
|
|
136
|
+
return this.get("coreStore");
|
|
160
137
|
}
|
|
161
138
|
get config() {
|
|
162
139
|
return this.get("config");
|
|
@@ -206,12 +183,12 @@ class Strapi extends container.Container {
|
|
|
206
183
|
hook(name) {
|
|
207
184
|
return this.get("hooks").get(name);
|
|
208
185
|
}
|
|
209
|
-
|
|
210
|
-
// return this.get('apis').get(name);
|
|
211
|
-
// }
|
|
212
|
-
get api() {
|
|
186
|
+
get apis() {
|
|
213
187
|
return this.get("apis").getAll();
|
|
214
188
|
}
|
|
189
|
+
api(name) {
|
|
190
|
+
return this.get("apis").get(name);
|
|
191
|
+
}
|
|
215
192
|
get auth() {
|
|
216
193
|
return this.get("auth");
|
|
217
194
|
}
|
|
@@ -235,15 +212,29 @@ class Strapi extends container.Container {
|
|
|
235
212
|
return this.stopWithError(error);
|
|
236
213
|
}
|
|
237
214
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
215
|
+
// TODO: split into more providers
|
|
216
|
+
registerInternalServices() {
|
|
217
|
+
const config$1 = config.createConfigProvider(this.internal_config, this);
|
|
218
|
+
const logger$1 = logger.createLogger({
|
|
219
|
+
level: "http",
|
|
220
|
+
// Strapi defaults to level 'http'
|
|
221
|
+
...config$1.get("logger"),
|
|
222
|
+
// DEPRECATED
|
|
223
|
+
...config$1.get("server.logger.config")
|
|
224
|
+
});
|
|
225
|
+
this.add("config", () => config$1).add("query-params", queryParams(this)).add("content-api", index$3(this)).add("auth", index$4()).add("server", () => index$5.createServer(this)).add("fs", () => fs(this)).add("eventHub", () => eventHub()).add("startupLogger", () => startupLogger.createStartupLogger(this)).add("logger", () => logger$1).add("fetch", () => fetch.createStrapiFetch(this)).add("features", () => features.createFeaturesService(this)).add("requestContext", requestContext).add("customFields", customFields(this)).add("entityValidator", index$6).add("entityService", () => index$7({ strapi: this, db: this.db })).add("documents", () => index$8.createDocumentService(this)).add(
|
|
226
|
+
"db",
|
|
227
|
+
() => new database.Database(
|
|
228
|
+
___default.default.merge(this.config.get("database"), {
|
|
229
|
+
logger: logger$1,
|
|
230
|
+
settings: {
|
|
231
|
+
migrations: {
|
|
232
|
+
dir: path__default.default.join(this.dirs.app.root, "database/migrations")
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
})
|
|
236
|
+
)
|
|
237
|
+
).add("reload", () => reloader.createReloader(this));
|
|
247
238
|
}
|
|
248
239
|
sendStartupTelemetry() {
|
|
249
240
|
this.telemetry.send("didStartServer", {
|
|
@@ -278,6 +269,7 @@ class Strapi extends container.Container {
|
|
|
278
269
|
async postListen() {
|
|
279
270
|
const isInitialized$1 = await isInitialized.isInitialized(this);
|
|
280
271
|
this.startupLogger.logStartupMessage({ isInitialized: isInitialized$1 });
|
|
272
|
+
this.log.info("Strapi started successfully");
|
|
281
273
|
this.sendStartupTelemetry();
|
|
282
274
|
this.openAdmin({ isInitialized: isInitialized$1 });
|
|
283
275
|
}
|
|
@@ -318,49 +310,32 @@ class Strapi extends container.Container {
|
|
|
318
310
|
}
|
|
319
311
|
process.exit(exitCode);
|
|
320
312
|
}
|
|
321
|
-
|
|
322
|
-
this.
|
|
323
|
-
this.
|
|
313
|
+
async load() {
|
|
314
|
+
await this.register();
|
|
315
|
+
await this.bootstrap();
|
|
316
|
+
this.isLoaded = true;
|
|
317
|
+
return this;
|
|
324
318
|
}
|
|
325
319
|
async register() {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
fetch: this.fetch
|
|
333
|
-
});
|
|
334
|
-
this.registerInternalHooks();
|
|
335
|
-
this.telemetry.register();
|
|
336
|
-
await this.runLifecyclesFunctions(lifecycles.LIFECYCLES.REGISTER);
|
|
320
|
+
this.ee.init(this.dirs.app.root, this.log);
|
|
321
|
+
for (const provider of index$1.providers) {
|
|
322
|
+
await provider.register?.(this);
|
|
323
|
+
}
|
|
324
|
+
await this.runPluginsLifecycles(lifecycles.LIFECYCLES.REGISTER);
|
|
325
|
+
await this.runUserLifecycles(lifecycles.LIFECYCLES.REGISTER);
|
|
337
326
|
convertCustomFieldType.convertCustomFieldType(this);
|
|
338
327
|
return this;
|
|
339
328
|
}
|
|
340
329
|
async bootstrap() {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
...Object.values(this.components)
|
|
345
|
-
|
|
330
|
+
this.configureGlobalProxy();
|
|
331
|
+
const models = [
|
|
332
|
+
...transformContentTypesToModels.transformContentTypesToModels(
|
|
333
|
+
[...Object.values(this.contentTypes), ...Object.values(this.components)],
|
|
334
|
+
this.db.metadata.identifiers
|
|
335
|
+
),
|
|
346
336
|
...this.get("models").get()
|
|
347
337
|
];
|
|
348
|
-
this.db
|
|
349
|
-
this.store = coreStore.createCoreStore({ db: this.db });
|
|
350
|
-
this.webhookStore = webhookStore.createWebhookStore({ db: this.db });
|
|
351
|
-
this.entityValidator = index$8;
|
|
352
|
-
this.entityService = index$9({
|
|
353
|
-
strapi: this,
|
|
354
|
-
db: this.db,
|
|
355
|
-
eventHub: this.eventHub,
|
|
356
|
-
entityValidator: this.entityValidator
|
|
357
|
-
});
|
|
358
|
-
this.documents = index$a.createDocumentService(this);
|
|
359
|
-
if (this.config.get("server.cron.enabled", true)) {
|
|
360
|
-
const cronTasks = this.config.get("server.cron.tasks", {});
|
|
361
|
-
this.cron.add(cronTasks);
|
|
362
|
-
}
|
|
363
|
-
this.telemetry.bootstrap();
|
|
338
|
+
await this.db.init({ models });
|
|
364
339
|
let oldContentTypes;
|
|
365
340
|
if (await this.db.getSchemaConnection().hasTable(coreStore.coreStoreModel.tableName)) {
|
|
366
341
|
oldContentTypes = await this.store.get({
|
|
@@ -375,7 +350,7 @@ class Strapi extends container.Container {
|
|
|
375
350
|
});
|
|
376
351
|
await this.db.schema.sync();
|
|
377
352
|
if (this.EE) {
|
|
378
|
-
await index$
|
|
353
|
+
await index$2.checkLicense({ strapi: this });
|
|
379
354
|
}
|
|
380
355
|
await this.hook("strapi::content-types.afterSync").call({
|
|
381
356
|
oldContentTypes,
|
|
@@ -387,35 +362,51 @@ class Strapi extends container.Container {
|
|
|
387
362
|
key: "schema",
|
|
388
363
|
value: this.contentTypes
|
|
389
364
|
});
|
|
390
|
-
await this.startWebhooks();
|
|
391
365
|
await this.server.initMiddlewares();
|
|
392
366
|
this.server.initRouting();
|
|
393
367
|
await this.contentAPI.permissions.registerActions();
|
|
394
|
-
await this.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
await this.register();
|
|
400
|
-
await this.bootstrap();
|
|
401
|
-
this.isLoaded = true;
|
|
368
|
+
await this.runPluginsLifecycles(lifecycles.LIFECYCLES.BOOTSTRAP);
|
|
369
|
+
for (const provider of index$1.providers) {
|
|
370
|
+
await provider.bootstrap?.(this);
|
|
371
|
+
}
|
|
372
|
+
await this.runUserLifecycles(lifecycles.LIFECYCLES.BOOTSTRAP);
|
|
402
373
|
return this;
|
|
403
374
|
}
|
|
404
|
-
|
|
405
|
-
const
|
|
406
|
-
|
|
375
|
+
configureGlobalProxy() {
|
|
376
|
+
const globalProxy = this.config.get("server.proxy.global");
|
|
377
|
+
const httpProxy = this.config.get("server.proxy.http") || globalProxy;
|
|
378
|
+
const httpsProxy = this.config.get("server.proxy.https") || globalProxy;
|
|
379
|
+
if (!httpProxy && !httpsProxy) {
|
|
407
380
|
return;
|
|
408
381
|
}
|
|
409
|
-
|
|
410
|
-
|
|
382
|
+
globalAgent__namespace.bootstrap();
|
|
383
|
+
if (httpProxy) {
|
|
384
|
+
this.log.info(`Using HTTP proxy: ${httpProxy}`);
|
|
385
|
+
global.GLOBAL_AGENT.HTTP_PROXY = httpProxy;
|
|
386
|
+
}
|
|
387
|
+
if (httpsProxy) {
|
|
388
|
+
this.log.info(`Using HTTPS proxy: ${httpsProxy}`);
|
|
389
|
+
global.GLOBAL_AGENT.HTTPS_PROXY = httpsProxy;
|
|
411
390
|
}
|
|
412
391
|
}
|
|
413
|
-
async
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
await
|
|
392
|
+
async destroy() {
|
|
393
|
+
this.log.info("Shutting down Strapi");
|
|
394
|
+
await this.runPluginsLifecycles(lifecycles.LIFECYCLES.DESTROY);
|
|
395
|
+
for (const provider of index$1.providers) {
|
|
396
|
+
await provider.destroy?.(this);
|
|
418
397
|
}
|
|
398
|
+
await this.runUserLifecycles(lifecycles.LIFECYCLES.DESTROY);
|
|
399
|
+
await this.server.destroy();
|
|
400
|
+
this.eventHub.destroy();
|
|
401
|
+
await this.db?.destroy();
|
|
402
|
+
process.removeAllListeners();
|
|
403
|
+
delete global.strapi;
|
|
404
|
+
this.log.info("Strapi has been shut down");
|
|
405
|
+
}
|
|
406
|
+
async runPluginsLifecycles(lifecycleName) {
|
|
407
|
+
await this.get("modules")[lifecycleName]();
|
|
408
|
+
}
|
|
409
|
+
async runUserLifecycles(lifecycleName) {
|
|
419
410
|
const userLifecycleFunction = this.app && this.app[lifecycleName];
|
|
420
411
|
if (_$1.isFunction(userLifecycleFunction)) {
|
|
421
412
|
await userLifecycleFunction({ strapi: this });
|
|
@@ -430,18 +421,11 @@ class Strapi extends container.Container {
|
|
|
430
421
|
}
|
|
431
422
|
}
|
|
432
423
|
/**
|
|
433
|
-
*
|
|
434
|
-
* @param {string} uid
|
|
424
|
+
* @deprecated Use `strapi.db.query` instead
|
|
435
425
|
*/
|
|
436
426
|
query(uid) {
|
|
437
427
|
return this.db.query(uid);
|
|
438
428
|
}
|
|
439
429
|
}
|
|
440
|
-
|
|
441
|
-
const strapi = new Strapi(options);
|
|
442
|
-
global.strapi = strapi;
|
|
443
|
-
return strapi;
|
|
444
|
-
};
|
|
445
|
-
const init = Object.assign(initFn, { factories, compile });
|
|
446
|
-
module.exports = init;
|
|
430
|
+
module.exports = Strapi;
|
|
447
431
|
//# sourceMappingURL=Strapi.js.map
|
package/dist/Strapi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Strapi.js","sources":["../src/Strapi.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-namespace */\n/* eslint-disable vars-on-top */\n/* eslint-disable no-var */\nimport path from 'path';\nimport _ from 'lodash';\nimport { isFunction } from 'lodash/fp';\nimport { Logger, createLogger } from '@strapi/logger';\nimport { Database } from '@strapi/database';\nimport { hooks } from '@strapi/utils';\nimport type {\n Strapi as StrapiI,\n Server,\n EntityService,\n Documents,\n EventHub,\n StartupLogger,\n CronService,\n WebhookStore,\n CoreStore,\n TelemetryService,\n RequestContext,\n CustomFields,\n Fetch,\n StrapiFS,\n StrapiDirectories,\n Reloader,\n EntityValidator,\n Common,\n Shared,\n Schema,\n} from '@strapi/types';\n\nimport loadConfiguration from './configuration';\n\nimport * as factories from './factories';\nimport compile from './compile';\n\nimport * as utils from './utils';\nimport * as registries from './registries';\nimport * as loaders from './loaders';\nimport { Container } from './container';\nimport createStrapiFs from './services/fs';\nimport createEventHub from './services/event-hub';\nimport { createServer } from './services/server';\nimport createWebhookRunner, { WebhookRunner } from './services/webhook-runner';\nimport { webhookModel, createWebhookStore } from './services/webhook-store';\nimport { createCoreStore, coreStoreModel } from './services/core-store';\nimport createEntityService from './services/entity-service';\n\nimport createCronService from './services/cron';\nimport entityValidator from './services/entity-validator';\nimport createTelemetry from './services/metrics';\nimport requestContext from './services/request-context';\nimport createAuth from './services/auth';\nimport createCustomFields from './services/custom-fields';\nimport createContentAPI from './services/content-api';\nimport getNumberOfDynamicZones from './services/utils/dynamic-zones';\nimport { FeaturesService, createFeaturesService } from './services/features';\nimport { createDocumentService } from './services/document-service';\n\n/**\n * Resolve the working directories based on the instance options.\n *\n * Behavior:\n * - `appDir` is the directory where Strapi will write every file (schemas, generated APIs, controllers or services)\n * - `distDir` is the directory where Strapi will read configurations, schemas and any compiled code\n *\n * Default values:\n * - If `appDir` is `undefined`, it'll be set to `process.cwd()`\n * - If `distDir` is `undefined`, it'll be set to `appDir`\n */\nconst resolveWorkingDirectories = (opts: { appDir?: string; distDir?: string }) => {\n const cwd = process.cwd();\n\n const appDir = opts.appDir ? path.resolve(cwd, opts.appDir) : cwd;\n const distDir = opts.distDir ? path.resolve(cwd, opts.distDir) : appDir;\n\n return { app: appDir, dist: distDir };\n};\n\nconst reloader = (strapi: Strapi) => {\n const state = {\n shouldReload: 0,\n isWatching: true,\n };\n\n function reload() {\n if (state.shouldReload > 0) {\n // Reset the reloading state\n state.shouldReload -= 1;\n reload.isReloading = false;\n return;\n }\n\n if (strapi.config.get('autoReload')) {\n process.send?.('reload');\n }\n }\n\n Object.defineProperty(reload, 'isWatching', {\n configurable: true,\n enumerable: true,\n set(value) {\n // Special state when the reloader is disabled temporarly (see GraphQL plugin example).\n if (state.isWatching === false && value === true) {\n state.shouldReload += 1;\n }\n state.isWatching = value;\n },\n get() {\n return state.isWatching;\n },\n });\n\n reload.isReloading = false;\n reload.isWatching = true;\n\n return reload;\n};\n\nexport type LoadedStrapi = Required<Strapi>;\n\nclass Strapi extends Container implements StrapiI {\n server: Server;\n\n log: Logger;\n\n fs: StrapiFS;\n\n eventHub: EventHub;\n\n startupLogger: StartupLogger;\n\n cron: CronService;\n\n webhookRunner?: WebhookRunner;\n\n webhookStore?: WebhookStore;\n\n store?: CoreStore;\n\n entityValidator?: EntityValidator;\n\n entityService?: EntityService.EntityService;\n\n documents?: Documents.Service;\n\n telemetry: TelemetryService;\n\n requestContext: RequestContext;\n\n customFields: CustomFields.CustomFields;\n\n fetch: Fetch;\n\n dirs: StrapiDirectories;\n\n admin?: Common.Module;\n\n isLoaded: boolean;\n\n db?: Database;\n\n app: any;\n\n EE?: boolean;\n\n reload: Reloader;\n\n features: FeaturesService;\n\n // @ts-expect-error - Assigned in constructor\n ee: StrapiI['ee'];\n\n constructor(opts: StrapiOptions = {}) {\n super();\n\n utils.destroyOnSignal(this);\n\n const rootDirs = resolveWorkingDirectories(opts);\n\n // Load the app configuration from the dist directory\n const appConfig = loadConfiguration(rootDirs, opts);\n\n // Instantiate the Strapi container\n this.add('config', registries.config(appConfig, this))\n .add('content-types', registries.contentTypes())\n .add('components', registries.components())\n .add('services', registries.services(this))\n .add('policies', registries.policies())\n .add('middlewares', registries.middlewares())\n .add('hooks', registries.hooks())\n .add('controllers', registries.controllers(this))\n .add('modules', registries.modules(this))\n .add('plugins', registries.plugins(this))\n .add('custom-fields', registries.customFields(this))\n .add('apis', registries.apis(this))\n .add('sanitizers', registries.sanitizers())\n .add('validators', registries.validators())\n .add('content-api', createContentAPI(this))\n .add('auth', createAuth())\n .add('models', registries.models());\n\n // Create a mapping of every useful directory (for the app, dist and static directories)\n this.dirs = utils.getDirs(rootDirs, { strapi: this });\n\n // Strapi state management variables\n this.isLoaded = false;\n this.reload = reloader(this);\n\n // Instantiate the Koa app & the HTTP server\n this.server = createServer(this);\n\n // Strapi utils instantiation\n this.fs = createStrapiFs(this);\n this.eventHub = createEventHub();\n this.startupLogger = utils.createStartupLogger(this);\n\n // We will continue to support 'logger' to prevent unnecessary deprecations but prioritize server.logger.config\n // So we find: server.logger.config || logger || 'info'\n const logLevel = this.config.get(\n 'server.logger.config',\n this.config.get('logger', { level: 'info' })\n );\n this.log = createLogger(logLevel);\n this.cron = createCronService();\n this.telemetry = createTelemetry(this);\n this.requestContext = requestContext;\n this.customFields = createCustomFields(this);\n this.fetch = utils.createStrapiFetch(this);\n this.features = createFeaturesService(this);\n\n utils.createUpdateNotifier(this).notify();\n\n Object.defineProperty<Strapi>(this, 'EE', {\n get: () => {\n utils.ee.init(this.dirs.app.root, this.log);\n return utils.ee.isEE;\n },\n configurable: false,\n });\n\n Object.defineProperty<Strapi>(this, 'ee', {\n get: () => utils.ee,\n configurable: false,\n });\n }\n\n get config() {\n return this.get('config');\n }\n\n get services() {\n return this.get('services').getAll();\n }\n\n service(uid: Common.UID.Service) {\n return this.get('services').get(uid);\n }\n\n get controllers() {\n return this.get('controllers').getAll();\n }\n\n controller(uid: Common.UID.Controller) {\n return this.get('controllers').get(uid);\n }\n\n get contentTypes(): Shared.ContentTypes {\n return this.get('content-types').getAll();\n }\n\n contentType(name: Common.UID.ContentType) {\n return this.get('content-types').get(name);\n }\n\n get components(): Shared.Components {\n return this.get('components').getAll();\n }\n\n get policies() {\n return this.get('policies').getAll();\n }\n\n policy(name: string) {\n return this.get('policies').get(name);\n }\n\n get middlewares() {\n return this.get('middlewares').getAll();\n }\n\n middleware(name: string) {\n return this.get('middlewares').get(name);\n }\n\n get plugins(): Record<string, Common.Plugin> {\n return this.get('plugins').getAll();\n }\n\n plugin(name: string): Common.Plugin {\n return this.get('plugins').get(name);\n }\n\n get hooks() {\n return this.get('hooks').getAll();\n }\n\n hook(name: string) {\n return this.get('hooks').get(name);\n }\n\n // api(name) {\n // return this.get('apis').get(name);\n // }\n\n get api(): Record<string, Common.Module> {\n return this.get('apis').getAll();\n }\n\n get auth() {\n return this.get('auth');\n }\n\n get contentAPI() {\n return this.get('content-api');\n }\n\n get sanitizers() {\n return this.get('sanitizers');\n }\n\n get validators() {\n return this.get('validators');\n }\n\n async start() {\n try {\n if (!this.isLoaded) {\n await this.load();\n }\n\n await this.listen();\n\n return this;\n } catch (error) {\n return this.stopWithError(error);\n }\n }\n\n async destroy() {\n await this.server.destroy();\n await this.runLifecyclesFunctions(utils.LIFECYCLES.DESTROY);\n\n this.eventHub.destroy();\n\n await this.db?.destroy();\n\n this.telemetry.destroy();\n this.cron.destroy();\n\n process.removeAllListeners();\n\n // @ts-expect-error: Allow clean delete of global.strapi to allow re-instanciation\n delete global.strapi;\n }\n\n sendStartupTelemetry() {\n // Emit started event.\n // do not await to avoid slower startup\n // This event is anonymous\n this.telemetry\n .send('didStartServer', {\n groupProperties: {\n database: this.config.get('database.connection.client'),\n plugins: Object.keys(this.plugins),\n numberOfAllContentTypes: _.size(this.contentTypes), // TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.\n numberOfComponents: _.size(this.components),\n numberOfDynamicZones: getNumberOfDynamicZones(),\n numberOfCustomControllers: Object.values<Common.Controller>(this.controllers).filter(\n // TODO: Fix this at the content API loader level to prevent future types issues\n (controller) => controller !== undefined && factories.isCustomController(controller)\n ).length,\n environment: this.config.environment,\n // TODO: to add back\n // providers: this.config.installedProviders,\n },\n })\n .catch(this.log.error);\n }\n\n async openAdmin({ isInitialized }: { isInitialized: boolean }) {\n const shouldOpenAdmin =\n this.config.get('environment') === 'development' &&\n this.config.get('admin.autoOpen', true) !== false;\n\n if (shouldOpenAdmin && !isInitialized) {\n try {\n await utils.openBrowser(this.config);\n this.telemetry.send('didOpenTab');\n } catch (e) {\n this.telemetry.send('didNotOpenTab');\n }\n }\n }\n\n async postListen() {\n const isInitialized = await utils.isInitialized(this);\n\n this.startupLogger.logStartupMessage({ isInitialized });\n\n this.sendStartupTelemetry();\n this.openAdmin({ isInitialized });\n }\n\n /**\n * Add behaviors to the server\n */\n async listen() {\n return new Promise<void>((resolve, reject) => {\n const onListen = async () => {\n try {\n await this.postListen();\n\n resolve();\n } catch (error) {\n reject(error);\n }\n };\n\n const listenSocket = this.config.get('server.socket');\n\n if (listenSocket) {\n this.server.listen(listenSocket, onListen);\n } else {\n const { host, port } = this.config.get('server');\n\n this.server.listen(port, host, onListen);\n }\n });\n }\n\n stopWithError(err: unknown, customMessage?: string): never {\n this.log.debug(`⛔️ Server wasn't able to start properly.`);\n if (customMessage) {\n this.log.error(customMessage);\n }\n\n this.log.error(err);\n return this.stop();\n }\n\n stop(exitCode = 1): never {\n this.destroy();\n\n if (this.config.get('autoReload')) {\n process.send?.('stop');\n }\n\n // Kill process\n process.exit(exitCode);\n }\n\n registerInternalHooks() {\n this.get('hooks').set('strapi::content-types.beforeSync', hooks.createAsyncParallelHook());\n this.get('hooks').set('strapi::content-types.afterSync', hooks.createAsyncParallelHook());\n }\n\n async register() {\n await loaders.loadApplicationContext(this);\n\n this.get('models').add(coreStoreModel).add(webhookModel);\n\n // init webhook runner\n this.webhookRunner = createWebhookRunner({\n eventHub: this.eventHub,\n logger: this.log,\n configuration: this.config.get('server.webhooks', {}),\n fetch: this.fetch,\n });\n\n this.registerInternalHooks();\n\n this.telemetry.register();\n\n await this.runLifecyclesFunctions(utils.LIFECYCLES.REGISTER);\n // NOTE: Swap type customField for underlying data type\n utils.convertCustomFieldType(this);\n\n return this;\n }\n\n async bootstrap() {\n const models = [\n ...utils.transformContentTypesToModels([\n ...Object.values(this.contentTypes),\n ...Object.values(this.components),\n ]),\n ...this.get('models').get(),\n ];\n\n this.db = await Database.init({ ...this.config.get('database'), models });\n\n this.store = createCoreStore({ db: this.db });\n this.webhookStore = createWebhookStore({ db: this.db });\n\n this.entityValidator = entityValidator;\n this.entityService = createEntityService({\n strapi: this,\n db: this.db,\n eventHub: this.eventHub,\n entityValidator: this.entityValidator,\n });\n\n this.documents = createDocumentService(this);\n\n if (this.config.get('server.cron.enabled', true)) {\n const cronTasks = this.config.get('server.cron.tasks', {});\n this.cron.add(cronTasks);\n }\n\n this.telemetry.bootstrap();\n\n let oldContentTypes;\n if (await this.db.getSchemaConnection().hasTable(coreStoreModel.tableName)) {\n oldContentTypes = await this.store.get({\n type: 'strapi',\n name: 'content_types',\n key: 'schema',\n });\n }\n\n await this.hook('strapi::content-types.beforeSync').call({\n oldContentTypes,\n contentTypes: this.contentTypes,\n });\n\n await this.db.schema.sync();\n\n if (this.EE) {\n await utils.ee.checkLicense({ strapi: this });\n }\n\n await this.hook('strapi::content-types.afterSync').call({\n oldContentTypes,\n contentTypes: this.contentTypes,\n });\n\n await this.store.set({\n type: 'strapi',\n name: 'content_types',\n key: 'schema',\n value: this.contentTypes,\n });\n\n await this.startWebhooks();\n\n await this.server.initMiddlewares();\n this.server.initRouting();\n\n await this.contentAPI.permissions.registerActions();\n\n await this.runLifecyclesFunctions(utils.LIFECYCLES.BOOTSTRAP);\n\n this.cron.start();\n\n return this;\n }\n\n async load() {\n await this.register();\n await this.bootstrap();\n\n this.isLoaded = true;\n\n return this as this & Required<StrapiI>;\n }\n\n async startWebhooks() {\n const webhooks = await this.webhookStore?.findWebhooks();\n if (!webhooks) {\n return;\n }\n\n for (const webhook of webhooks) {\n this.webhookRunner?.add(webhook);\n }\n }\n\n async runLifecyclesFunctions(lifecycleName: 'register' | 'bootstrap' | 'destroy') {\n // plugins\n await this.get('modules')[lifecycleName]();\n\n // admin\n const adminLifecycleFunction = this.admin && this.admin[lifecycleName];\n if (isFunction(adminLifecycleFunction)) {\n await adminLifecycleFunction({ strapi: this });\n }\n\n // user\n const userLifecycleFunction = this.app && this.app[lifecycleName];\n if (isFunction(userLifecycleFunction)) {\n await userLifecycleFunction({ strapi: this });\n }\n }\n\n getModel(uid: Common.UID.ContentType): Schema.ContentType;\n getModel(uid: Common.UID.Component): Schema.Component;\n getModel<TUID extends Common.UID.Schema>(\n uid: TUID\n ): Schema.ContentType | Schema.Component | undefined {\n if (uid in this.contentTypes) {\n return this.contentTypes[uid as Common.UID.ContentType];\n }\n\n if (uid in this.components) {\n return this.components[uid as Common.UID.Component];\n }\n }\n\n /**\n * Binds queries with a specific model\n * @param {string} uid\n */\n query(uid: Common.UID.Schema) {\n return this.db!.query(uid);\n }\n}\n\ninterface StrapiOptions {\n appDir?: string;\n distDir?: string;\n autoReload?: boolean;\n serveAdminPanel?: boolean;\n}\n\ninterface Init {\n (options?: StrapiOptions): StrapiI;\n factories: typeof factories;\n compile: typeof compile;\n}\n\nconst initFn = (options: StrapiOptions = {}): StrapiI => {\n const strapi = new Strapi(options);\n global.strapi = strapi as LoadedStrapi;\n return strapi;\n};\n\nconst init: Init = Object.assign(initFn, { factories, compile });\n\nexport default init;\n"],"names":["path","Container","utils.destroyOnSignal","loadConfiguration","registries.config","registries.contentTypes","registries.components","registries.services","registries.policies","registries.middlewares","registries.hooks","registries.controllers","registries.modules","registries.plugins","registries.customFields","registries.apis","registries.sanitizers","registries.validators","createContentAPI","createAuth","registries.models","utils.getDirs","createServer","createStrapiFs","createEventHub","utils.createStartupLogger","createLogger","createCronService","createTelemetry","createCustomFields","utils.createStrapiFetch","createFeaturesService","utils.createUpdateNotifier","utils.ee","utils.LIFECYCLES","_","getNumberOfDynamicZones","factories.isCustomController","isInitialized","utils.openBrowser","utils.isInitialized","hooks","loaders.loadApplicationContext","coreStoreModel","webhookModel","createWebhookRunner","utils.convertCustomFieldType","models","utils.transformContentTypesToModels","Database","createCoreStore","createWebhookStore","entityValidator","createEntityService","createDocumentService","isFunction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAM,4BAA4B,CAAC,SAAgD;AAC3E,QAAA,MAAM,QAAQ;AAEd,QAAA,SAAS,KAAK,SAASA,cAAA,QAAK,QAAQ,KAAK,KAAK,MAAM,IAAI;AACxD,QAAA,UAAU,KAAK,UAAUA,cAAA,QAA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AAS;AACT,SAAA;AACT;AAEA,MAAM,OAAa,OAAO,OAAO,QAAQ,EAAE,WAAW,QAAS,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"Strapi.js","sources":["../src/Strapi.ts"],"sourcesContent":["import * as globalAgent from 'global-agent';\nimport path from 'path';\nimport _ from 'lodash';\nimport { isFunction } from 'lodash/fp';\nimport { Logger, createLogger } from '@strapi/logger';\nimport { Database } from '@strapi/database';\n\nimport type { Core, Modules, UID, Schema } from '@strapi/types';\n\nimport { loadConfiguration } from './configuration';\n\nimport * as factories from './factories';\n\nimport * as utils from './utils';\nimport { Container } from './container';\nimport createStrapiFs from './services/fs';\nimport createEventHub from './services/event-hub';\nimport { createServer } from './services/server';\nimport { createReloader } from './services/reloader';\n\nimport { providers } from './providers';\nimport createEntityService from './services/entity-service';\nimport createQueryParamService from './services/query-params';\n\nimport entityValidator from './services/entity-validator';\nimport requestContext from './services/request-context';\nimport createAuth from './services/auth';\nimport createCustomFields from './services/custom-fields';\nimport createContentAPI from './services/content-api';\nimport getNumberOfDynamicZones from './services/utils/dynamic-zones';\nimport { FeaturesService, createFeaturesService } from './services/features';\nimport { createDocumentService } from './services/document-service';\n\nimport { coreStoreModel } from './services/core-store';\nimport { createConfigProvider } from './services/config';\n\nclass Strapi extends Container implements Core.Strapi {\n app: any;\n\n isLoaded: boolean = false;\n\n internal_config: Record<string, unknown> = {};\n\n constructor(opts: StrapiOptions) {\n super();\n\n this.internal_config = loadConfiguration(opts);\n\n this.registerInternalServices();\n\n for (const provider of providers) {\n provider.init?.(this);\n }\n }\n\n get admin(): Core.Module {\n return this.get('admin');\n }\n\n get EE(): boolean {\n return utils.ee.isEE;\n }\n\n get ee(): Core.Strapi['ee'] {\n return utils.ee;\n }\n\n get dirs(): Core.StrapiDirectories {\n return this.config.get('dirs');\n }\n\n get reload(): Core.Reloader {\n return this.get('reload');\n }\n\n get db(): Database {\n return this.get('db');\n }\n\n get requestContext(): Modules.RequestContext.RequestContext {\n return this.get('requestContext');\n }\n\n get customFields(): Modules.CustomFields.CustomFields {\n return this.get('customFields');\n }\n\n get entityValidator(): Modules.EntityValidator.EntityValidator {\n return this.get('entityValidator');\n }\n\n /**\n * @deprecated `strapi.entityService` will be removed in the next major version\n */\n get entityService(): Modules.EntityService.EntityService {\n return this.get('entityService');\n }\n\n get documents(): Modules.Documents.Service {\n return this.get('documents');\n }\n\n get features(): FeaturesService {\n return this.get('features');\n }\n\n get fetch(): Modules.Fetch.Fetch {\n return this.get('fetch');\n }\n\n get cron(): Modules.Cron.CronService {\n return this.get('cron');\n }\n\n get log(): Logger {\n return this.get('logger');\n }\n\n get startupLogger(): Core.StartupLogger {\n return this.get('startupLogger');\n }\n\n get eventHub(): Modules.EventHub.EventHub {\n return this.get('eventHub');\n }\n\n get fs(): Core.StrapiFS {\n return this.get('fs');\n }\n\n get server(): Modules.Server.Server {\n return this.get('server');\n }\n\n get telemetry(): Modules.Metrics.TelemetryService {\n return this.get('telemetry');\n }\n\n get store(): Modules.CoreStore.CoreStore {\n return this.get('coreStore');\n }\n\n get config() {\n return this.get('config');\n }\n\n get services() {\n return this.get('services').getAll();\n }\n\n service(uid: UID.Service) {\n return this.get('services').get(uid);\n }\n\n get controllers() {\n return this.get('controllers').getAll();\n }\n\n controller(uid: UID.Controller) {\n return this.get('controllers').get(uid);\n }\n\n get contentTypes(): Schema.ContentTypes {\n return this.get('content-types').getAll();\n }\n\n contentType(name: UID.ContentType) {\n return this.get('content-types').get(name);\n }\n\n get components(): Schema.Components {\n return this.get('components').getAll();\n }\n\n get policies() {\n return this.get('policies').getAll();\n }\n\n policy(name: string) {\n return this.get('policies').get(name);\n }\n\n get middlewares() {\n return this.get('middlewares').getAll();\n }\n\n middleware(name: string) {\n return this.get('middlewares').get(name);\n }\n\n get plugins(): Record<string, Core.Plugin> {\n return this.get('plugins').getAll();\n }\n\n plugin(name: string): Core.Plugin {\n return this.get('plugins').get(name);\n }\n\n get hooks() {\n return this.get('hooks').getAll();\n }\n\n hook(name: string) {\n return this.get('hooks').get(name);\n }\n\n get apis() {\n return this.get('apis').getAll();\n }\n\n api(name: string): Core.Module {\n return this.get('apis').get(name);\n }\n\n get auth() {\n return this.get('auth');\n }\n\n get contentAPI() {\n return this.get('content-api');\n }\n\n get sanitizers() {\n return this.get('sanitizers');\n }\n\n get validators() {\n return this.get('validators');\n }\n\n async start() {\n try {\n if (!this.isLoaded) {\n await this.load();\n }\n\n await this.listen();\n\n return this;\n } catch (error) {\n return this.stopWithError(error);\n }\n }\n\n // TODO: split into more providers\n registerInternalServices() {\n const config = createConfigProvider(this.internal_config, this);\n\n const logger = createLogger({\n level: 'http', // Strapi defaults to level 'http'\n ...config.get('logger'), // DEPRECATED\n ...config.get('server.logger.config'),\n });\n\n // Instantiate the Strapi container\n this.add('config', () => config)\n .add('query-params', createQueryParamService(this))\n .add('content-api', createContentAPI(this))\n .add('auth', createAuth())\n .add('server', () => createServer(this))\n .add('fs', () => createStrapiFs(this))\n .add('eventHub', () => createEventHub())\n .add('startupLogger', () => utils.createStartupLogger(this))\n .add('logger', () => logger)\n .add('fetch', () => utils.createStrapiFetch(this))\n .add('features', () => createFeaturesService(this))\n .add('requestContext', requestContext)\n .add('customFields', createCustomFields(this))\n .add('entityValidator', entityValidator)\n .add('entityService', () => createEntityService({ strapi: this, db: this.db }))\n .add('documents', () => createDocumentService(this))\n .add(\n 'db',\n () =>\n new Database(\n _.merge(this.config.get('database'), {\n logger,\n settings: {\n migrations: {\n dir: path.join(this.dirs.app.root, 'database/migrations'),\n },\n },\n })\n )\n )\n .add('reload', () => createReloader(this));\n }\n\n sendStartupTelemetry() {\n // Emit started event.\n // do not await to avoid slower startup\n // This event is anonymous\n this.telemetry\n .send('didStartServer', {\n groupProperties: {\n database: this.config.get('database.connection.client'),\n plugins: Object.keys(this.plugins),\n numberOfAllContentTypes: _.size(this.contentTypes), // TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.\n numberOfComponents: _.size(this.components),\n numberOfDynamicZones: getNumberOfDynamicZones(),\n numberOfCustomControllers: Object.values<Core.Controller>(this.controllers).filter(\n // TODO: Fix this at the content API loader level to prevent future types issues\n (controller) => controller !== undefined && factories.isCustomController(controller)\n ).length,\n environment: this.config.environment,\n // TODO: to add back\n // providers: this.config.installedProviders,\n },\n })\n .catch(this.log.error);\n }\n\n async openAdmin({ isInitialized }: { isInitialized: boolean }) {\n const shouldOpenAdmin =\n this.config.get('environment') === 'development' &&\n this.config.get('admin.autoOpen', true) !== false;\n\n if (shouldOpenAdmin && !isInitialized) {\n try {\n await utils.openBrowser(this.config);\n this.telemetry.send('didOpenTab');\n } catch (e) {\n this.telemetry.send('didNotOpenTab');\n }\n }\n }\n\n async postListen() {\n const isInitialized = await utils.isInitialized(this);\n\n this.startupLogger.logStartupMessage({ isInitialized });\n\n this.log.info('Strapi started successfully');\n this.sendStartupTelemetry();\n this.openAdmin({ isInitialized });\n }\n\n /**\n * Add behaviors to the server\n */\n async listen() {\n return new Promise<void>((resolve, reject) => {\n const onListen = async () => {\n try {\n await this.postListen();\n\n resolve();\n } catch (error) {\n reject(error);\n }\n };\n\n const listenSocket = this.config.get('server.socket');\n\n if (listenSocket) {\n this.server.listen(listenSocket, onListen);\n } else {\n const { host, port } = this.config.get('server');\n\n this.server.listen(port, host, onListen);\n }\n });\n }\n\n stopWithError(err: unknown, customMessage?: string): never {\n this.log.debug(`⛔️ Server wasn't able to start properly.`);\n if (customMessage) {\n this.log.error(customMessage);\n }\n\n this.log.error(err);\n return this.stop();\n }\n\n stop(exitCode = 1): never {\n this.destroy();\n\n if (this.config.get('autoReload')) {\n process.send?.('stop');\n }\n\n // Kill process\n process.exit(exitCode);\n }\n\n async load() {\n await this.register();\n await this.bootstrap();\n\n this.isLoaded = true;\n\n return this;\n }\n\n async register() {\n // @ts-expect-error: init is internal\n this.ee.init(this.dirs.app.root, this.log);\n\n for (const provider of providers) {\n await provider.register?.(this);\n }\n\n await this.runPluginsLifecycles(utils.LIFECYCLES.REGISTER);\n await this.runUserLifecycles(utils.LIFECYCLES.REGISTER);\n\n // NOTE: Swap type customField for underlying data type\n utils.convertCustomFieldType(this);\n\n return this;\n }\n\n async bootstrap() {\n this.configureGlobalProxy();\n\n const models = [\n ...utils.transformContentTypesToModels(\n [...Object.values(this.contentTypes), ...Object.values(this.components)],\n this.db.metadata.identifiers\n ),\n ...this.get('models').get(),\n ];\n\n await this.db.init({ models });\n\n let oldContentTypes;\n if (await this.db.getSchemaConnection().hasTable(coreStoreModel.tableName)) {\n oldContentTypes = await this.store.get({\n type: 'strapi',\n name: 'content_types',\n key: 'schema',\n });\n }\n\n await this.hook('strapi::content-types.beforeSync').call({\n oldContentTypes,\n contentTypes: this.contentTypes,\n });\n\n await this.db.schema.sync();\n\n if (this.EE) {\n await utils.ee.checkLicense({ strapi: this });\n }\n\n await this.hook('strapi::content-types.afterSync').call({\n oldContentTypes,\n contentTypes: this.contentTypes,\n });\n\n await this.store.set({\n type: 'strapi',\n name: 'content_types',\n key: 'schema',\n value: this.contentTypes,\n });\n\n await this.server.initMiddlewares();\n this.server.initRouting();\n\n await this.contentAPI.permissions.registerActions();\n\n await this.runPluginsLifecycles(utils.LIFECYCLES.BOOTSTRAP);\n\n for (const provider of providers) {\n await provider.bootstrap?.(this);\n }\n\n await this.runUserLifecycles(utils.LIFECYCLES.BOOTSTRAP);\n\n return this;\n }\n\n configureGlobalProxy() {\n const globalProxy = this.config.get('server.proxy.global');\n const httpProxy = this.config.get('server.proxy.http') || globalProxy;\n const httpsProxy = this.config.get('server.proxy.https') || globalProxy;\n\n if (!httpProxy && !httpsProxy) {\n return;\n }\n\n globalAgent.bootstrap();\n\n if (httpProxy) {\n this.log.info(`Using HTTP proxy: ${httpProxy}`);\n (global as any).GLOBAL_AGENT.HTTP_PROXY = httpProxy;\n }\n\n if (httpsProxy) {\n this.log.info(`Using HTTPS proxy: ${httpsProxy}`);\n (global as any).GLOBAL_AGENT.HTTPS_PROXY = httpsProxy;\n }\n }\n\n async destroy() {\n this.log.info('Shutting down Strapi');\n await this.runPluginsLifecycles(utils.LIFECYCLES.DESTROY);\n\n for (const provider of providers) {\n await provider.destroy?.(this);\n }\n\n await this.runUserLifecycles(utils.LIFECYCLES.DESTROY);\n\n await this.server.destroy();\n\n this.eventHub.destroy();\n\n await this.db?.destroy();\n\n process.removeAllListeners();\n\n // @ts-expect-error: Allow clean delete of global.strapi to allow re-instanciation\n delete global.strapi;\n\n this.log.info('Strapi has been shut down');\n }\n\n async runPluginsLifecycles(lifecycleName: 'register' | 'bootstrap' | 'destroy') {\n // plugins\n await this.get('modules')[lifecycleName]();\n }\n\n async runUserLifecycles(lifecycleName: 'register' | 'bootstrap' | 'destroy') {\n // user\n const userLifecycleFunction = this.app && this.app[lifecycleName];\n if (isFunction(userLifecycleFunction)) {\n await userLifecycleFunction({ strapi: this });\n }\n }\n\n getModel(uid: UID.ContentType): Schema.ContentType;\n getModel(uid: UID.Component): Schema.Component;\n getModel<TUID extends UID.Schema>(uid: TUID): Schema.ContentType | Schema.Component | undefined {\n if (uid in this.contentTypes) {\n return this.contentTypes[uid as UID.ContentType];\n }\n\n if (uid in this.components) {\n return this.components[uid as UID.Component];\n }\n }\n\n /**\n * @deprecated Use `strapi.db.query` instead\n */\n query(uid: UID.Schema) {\n return this.db.query(uid);\n }\n}\n\nexport interface StrapiOptions {\n appDir: string;\n distDir: string;\n autoReload?: boolean;\n serveAdminPanel?: boolean;\n}\n\nexport default Strapi;\n"],"names":["Container","loadConfiguration","providers","utils.ee","config","createConfigProvider","logger","createLogger","createQueryParamService","createContentAPI","createAuth","createServer","createStrapiFs","createEventHub","utils.createStartupLogger","utils.createStrapiFetch","createFeaturesService","createCustomFields","entityValidator","createEntityService","createDocumentService","Database","_","path","createReloader","getNumberOfDynamicZones","factories.isCustomController","isInitialized","utils.openBrowser","utils.isInitialized","utils.LIFECYCLES","utils.convertCustomFieldType","utils.transformContentTypesToModels","coreStoreModel","globalAgent","isFunction"],"mappings":";;;;;;;;;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