@strapi/strapi 4.14.0-beta.0 → 4.15.0-alpha.0
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.
- package/README.md +25 -29
- package/bin/strapi.js +1 -1
- package/dist/Strapi.d.ts +102 -0
- package/dist/Strapi.js +544 -0
- package/dist/Strapi.js.map +1 -0
- package/dist/commands/actions/admin/create-user/action.d.ts +11 -0
- package/dist/commands/actions/admin/create-user/action.js +103 -0
- package/dist/commands/actions/admin/create-user/action.js.map +1 -0
- package/dist/commands/actions/admin/create-user/command.d.ts +6 -0
- package/dist/commands/actions/admin/create-user/command.js +19 -0
- package/dist/commands/actions/admin/create-user/command.js.map +1 -0
- package/dist/commands/actions/admin/reset-user-password/action.d.ts +9 -0
- package/dist/commands/actions/admin/reset-user-password/action.js +43 -0
- package/dist/commands/actions/admin/reset-user-password/action.js.map +1 -0
- package/dist/commands/actions/admin/reset-user-password/command.d.ts +6 -0
- package/dist/commands/actions/admin/reset-user-password/command.js +17 -0
- package/dist/commands/actions/admin/reset-user-password/command.js.map +1 -0
- package/dist/commands/actions/build-command/action.d.ts +9 -0
- package/dist/commands/actions/build-command/action.js +20 -0
- package/dist/commands/actions/build-command/action.js.map +1 -0
- package/dist/commands/actions/build-command/command.d.ts +6 -0
- package/dist/commands/actions/build-command/command.js +15 -0
- package/dist/commands/actions/build-command/command.js.map +1 -0
- package/dist/commands/actions/components/list/action.d.ts +2 -0
- package/dist/commands/actions/components/list/action.js +20 -0
- package/dist/commands/actions/components/list/action.js.map +1 -0
- package/dist/commands/actions/components/list/command.d.ts +6 -0
- package/dist/commands/actions/components/list/command.js +14 -0
- package/dist/commands/actions/components/list/command.js.map +1 -0
- package/dist/commands/actions/configuration/dump/action.d.ts +10 -0
- package/dist/commands/actions/configuration/dump/action.js +46 -0
- package/dist/commands/actions/configuration/dump/action.js.map +1 -0
- package/dist/commands/actions/configuration/dump/command.d.ts +6 -0
- package/dist/commands/actions/configuration/dump/command.js +17 -0
- package/dist/commands/actions/configuration/dump/command.js.map +1 -0
- package/dist/commands/actions/configuration/restore/action.d.ts +10 -0
- package/dist/commands/actions/configuration/restore/action.js +153 -0
- package/dist/commands/actions/configuration/restore/action.js.map +1 -0
- package/dist/commands/actions/configuration/restore/command.d.ts +6 -0
- package/dist/commands/actions/configuration/restore/command.js +17 -0
- package/dist/commands/actions/configuration/restore/command.js.map +1 -0
- package/dist/commands/actions/console/action.d.ts +5 -0
- package/dist/commands/actions/console/action.js +26 -0
- package/dist/commands/actions/console/action.js.map +1 -0
- package/dist/commands/actions/console/command.d.ts +6 -0
- package/dist/commands/actions/console/command.js +14 -0
- package/dist/commands/actions/console/command.js.map +1 -0
- package/dist/commands/actions/content-types/list/action.d.ts +2 -0
- package/dist/commands/actions/content-types/list/action.js +20 -0
- package/dist/commands/actions/content-types/list/action.js.map +1 -0
- package/dist/commands/actions/content-types/list/command.d.ts +6 -0
- package/dist/commands/actions/content-types/list/command.js +14 -0
- package/dist/commands/actions/content-types/list/command.js.map +1 -0
- package/dist/commands/actions/controllers/list/action.d.ts +2 -0
- package/dist/commands/actions/controllers/list/action.js +20 -0
- package/dist/commands/actions/controllers/list/action.js.map +1 -0
- package/dist/commands/actions/controllers/list/command.d.ts +6 -0
- package/dist/commands/actions/controllers/list/command.js +14 -0
- package/dist/commands/actions/controllers/list/command.js.map +1 -0
- package/dist/commands/actions/develop/action.d.ts +86 -0
- package/dist/commands/actions/develop/action.js +190 -0
- package/dist/commands/actions/develop/action.js.map +1 -0
- package/dist/commands/actions/develop/command.d.ts +6 -0
- package/dist/commands/actions/develop/command.js +19 -0
- package/dist/commands/actions/develop/command.js.map +1 -0
- package/dist/commands/actions/generate/command.d.ts +6 -0
- package/dist/commands/actions/generate/command.js +19 -0
- package/dist/commands/actions/generate/command.js.map +1 -0
- package/dist/commands/actions/hooks/list/action.d.ts +2 -0
- package/dist/commands/actions/hooks/list/action.js +20 -0
- package/dist/commands/actions/hooks/list/action.js.map +1 -0
- package/dist/commands/actions/hooks/list/command.d.ts +6 -0
- package/dist/commands/actions/hooks/list/command.js +14 -0
- package/dist/commands/actions/hooks/list/command.js.map +1 -0
- package/dist/commands/actions/install/action.d.ts +2 -0
- package/dist/commands/actions/install/action.js +49 -0
- package/dist/commands/actions/install/action.js.map +1 -0
- package/dist/commands/actions/install/command.d.ts +6 -0
- package/dist/commands/actions/install/command.js +14 -0
- package/dist/commands/actions/install/command.js.map +1 -0
- package/dist/commands/actions/middlewares/list/action.d.ts +2 -0
- package/dist/commands/actions/middlewares/list/action.js +20 -0
- package/dist/commands/actions/middlewares/list/action.js.map +1 -0
- package/dist/commands/actions/middlewares/list/command.d.ts +6 -0
- package/dist/commands/actions/middlewares/list/command.js +14 -0
- package/dist/commands/actions/middlewares/list/command.js.map +1 -0
- package/dist/commands/actions/new/action.d.ts +7 -0
- package/dist/commands/actions/new/action.js +12 -0
- package/dist/commands/actions/new/action.js.map +1 -0
- package/dist/commands/actions/new/command.d.ts +6 -0
- package/dist/commands/actions/new/command.js +35 -0
- package/dist/commands/actions/new/command.js.map +1 -0
- package/dist/commands/actions/plugin/build-command/action.d.ts +6 -0
- package/dist/commands/actions/plugin/build-command/action.js +105 -0
- package/dist/commands/actions/plugin/build-command/action.js.map +1 -0
- package/dist/commands/actions/plugin/build-command/command.d.ts +6 -0
- package/dist/commands/actions/plugin/build-command/command.js +17 -0
- package/dist/commands/actions/plugin/build-command/command.js.map +1 -0
- package/dist/commands/actions/policies/list/action.d.ts +2 -0
- package/dist/commands/actions/policies/list/action.js +20 -0
- package/dist/commands/actions/policies/list/action.js.map +1 -0
- package/dist/commands/actions/policies/list/command.d.ts +6 -0
- package/dist/commands/actions/policies/list/command.js +14 -0
- package/dist/commands/actions/policies/list/command.js.map +1 -0
- package/dist/commands/actions/report/action.d.ts +7 -0
- package/dist/commands/actions/report/action.js +32 -0
- package/dist/commands/actions/report/action.js.map +1 -0
- package/dist/commands/actions/report/command.d.ts +6 -0
- package/dist/commands/actions/report/command.js +17 -0
- package/dist/commands/actions/report/command.js.map +1 -0
- package/dist/commands/actions/routes/list/action.d.ts +2 -0
- package/dist/commands/actions/routes/list/action.js +26 -0
- package/dist/commands/actions/routes/list/action.js.map +1 -0
- package/dist/commands/actions/routes/list/command.d.ts +6 -0
- package/dist/commands/actions/routes/list/command.js +14 -0
- package/dist/commands/actions/routes/list/command.js.map +1 -0
- package/dist/commands/actions/services/list/action.d.ts +2 -0
- package/dist/commands/actions/services/list/action.js +20 -0
- package/dist/commands/actions/services/list/action.js.map +1 -0
- package/dist/commands/actions/services/list/command.d.ts +6 -0
- package/dist/commands/actions/services/list/command.js +14 -0
- package/dist/commands/actions/services/list/command.js.map +1 -0
- package/dist/commands/actions/start/action.d.ts +78 -0
- package/dist/commands/actions/start/action.js +22 -0
- package/dist/commands/actions/start/action.js.map +1 -0
- package/dist/commands/actions/start/command.d.ts +6 -0
- package/dist/commands/actions/start/command.js +14 -0
- package/dist/commands/actions/start/command.js.map +1 -0
- package/dist/commands/actions/telemetry/disable/action.d.ts +1 -0
- package/dist/commands/actions/telemetry/disable/action.js +83 -0
- package/dist/commands/actions/telemetry/disable/action.js.map +1 -0
- package/dist/commands/actions/telemetry/disable/command.d.ts +6 -0
- package/dist/commands/actions/telemetry/disable/command.js +14 -0
- package/dist/commands/actions/telemetry/disable/command.js.map +1 -0
- package/dist/commands/actions/telemetry/enable/action.d.ts +2 -0
- package/dist/commands/actions/telemetry/enable/action.js +103 -0
- package/dist/commands/actions/telemetry/enable/action.js.map +1 -0
- package/dist/commands/actions/telemetry/enable/command.d.ts +6 -0
- package/dist/commands/actions/telemetry/enable/command.js +14 -0
- package/dist/commands/actions/telemetry/enable/command.js.map +1 -0
- package/dist/commands/actions/templates/generate/action.d.ts +1 -0
- package/dist/commands/actions/templates/generate/action.js +85 -0
- package/dist/commands/actions/templates/generate/action.js.map +1 -0
- package/dist/commands/actions/templates/generate/command.d.ts +6 -0
- package/dist/commands/actions/templates/generate/command.js +14 -0
- package/dist/commands/actions/templates/generate/command.js.map +1 -0
- package/dist/commands/actions/ts/generate-types/action.d.ts +8 -0
- package/dist/commands/actions/ts/generate-types/action.js +28 -0
- package/dist/commands/actions/ts/generate-types/action.js.map +1 -0
- package/dist/commands/actions/ts/generate-types/command.d.ts +6 -0
- package/dist/commands/actions/ts/generate-types/command.js +18 -0
- package/dist/commands/actions/ts/generate-types/command.js.map +1 -0
- package/dist/commands/actions/uninstall/action.d.ts +5 -0
- package/dist/commands/actions/uninstall/action.js +67 -0
- package/dist/commands/actions/uninstall/action.js.map +1 -0
- package/dist/commands/actions/uninstall/command.d.ts +6 -0
- package/dist/commands/actions/uninstall/command.js +15 -0
- package/dist/commands/actions/uninstall/command.js.map +1 -0
- package/dist/commands/actions/version/command.d.ts +6 -0
- package/dist/commands/actions/version/command.js +19 -0
- package/dist/commands/actions/version/command.js.map +1 -0
- package/dist/commands/actions/watch-admin/action.d.ts +4 -0
- package/dist/commands/actions/watch-admin/action.js +36 -0
- package/dist/commands/actions/watch-admin/action.js.map +1 -0
- package/dist/commands/actions/watch-admin/command.d.ts +6 -0
- package/dist/commands/actions/watch-admin/command.js +15 -0
- package/dist/commands/actions/watch-admin/command.js.map +1 -0
- package/dist/commands/builders/admin.d.ts +8 -0
- package/dist/commands/builders/admin.js +52 -0
- package/dist/commands/builders/admin.js.map +1 -0
- package/dist/commands/builders/index.d.ts +3 -0
- package/dist/commands/builders/index.js +11 -0
- package/dist/commands/builders/index.js.map +1 -0
- package/dist/commands/builders/packages.d.ts +37 -0
- package/dist/commands/builders/packages.js +166 -0
- package/dist/commands/builders/packages.js.map +1 -0
- package/dist/commands/builders/tasks/dts.d.ts +13 -0
- package/dist/commands/builders/tasks/dts.js +143 -0
- package/dist/commands/builders/tasks/dts.js.map +1 -0
- package/dist/commands/builders/tasks/index.d.ts +14 -0
- package/dist/commands/builders/tasks/index.js +14 -0
- package/dist/commands/builders/tasks/index.js.map +1 -0
- package/dist/commands/builders/tasks/vite.d.ts +15 -0
- package/dist/commands/builders/tasks/vite.js +114 -0
- package/dist/commands/builders/tasks/vite.js.map +1 -0
- package/dist/commands/builders/typescript.d.ts +6 -0
- package/dist/commands/builders/typescript.js +29 -0
- package/dist/commands/builders/typescript.js.map +1 -0
- package/dist/commands/index.d.ts +34 -0
- package/dist/commands/index.js +100 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/types.d.ts +5 -0
- package/dist/commands/types.js +3 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/utils/commander.d.ts +35 -0
- package/dist/commands/utils/commander.js +138 -0
- package/dist/commands/utils/commander.js.map +1 -0
- package/dist/commands/utils/helpers.d.ts +50 -0
- package/dist/commands/utils/helpers.js +165 -0
- package/dist/commands/utils/helpers.js.map +1 -0
- package/dist/commands/utils/logger.d.ts +16 -0
- package/dist/commands/utils/logger.js +53 -0
- package/dist/commands/utils/logger.js.map +1 -0
- package/dist/commands/utils/pkg.d.ts +237 -0
- package/dist/commands/utils/pkg.js +316 -0
- package/dist/commands/utils/pkg.js.map +1 -0
- package/dist/compile.d.ts +9 -0
- package/dist/compile.js +20 -0
- package/dist/compile.js.map +1 -0
- package/dist/container.d.ts +2 -0
- package/dist/container.js +39 -0
- package/dist/container.js.map +1 -0
- package/dist/core/app-configuration/config-loader.d.ts +2 -0
- package/dist/core/app-configuration/config-loader.js +22 -0
- package/dist/core/app-configuration/config-loader.js.map +1 -0
- package/dist/core/app-configuration/index.d.ts +35 -0
- package/dist/core/app-configuration/index.js +54 -0
- package/dist/core/app-configuration/index.js.map +1 -0
- package/dist/core/app-configuration/load-config-file.d.ts +1 -0
- package/dist/core/app-configuration/load-config-file.js +49 -0
- package/dist/core/app-configuration/load-config-file.js.map +1 -0
- package/dist/core/bootstrap.d.ts +4 -0
- package/dist/core/bootstrap.js +27 -0
- package/dist/core/bootstrap.js.map +1 -0
- package/dist/core/domain/content-type/index.d.ts +8 -0
- package/dist/core/domain/content-type/index.js +117 -0
- package/dist/core/domain/content-type/index.js.map +1 -0
- package/dist/core/domain/content-type/validator.d.ts +21 -0
- package/dist/core/domain/content-type/validator.js +91 -0
- package/dist/core/domain/content-type/validator.js.map +1 -0
- package/dist/core/domain/module/index.d.ts +38 -0
- package/dist/core/domain/module/index.js +110 -0
- package/dist/core/domain/module/index.js.map +1 -0
- package/dist/core/domain/module/validation.d.ts +13 -0
- package/dist/core/domain/module/validation.js +29 -0
- package/dist/core/domain/module/validation.js.map +1 -0
- package/dist/core/loaders/admin.d.ts +2 -0
- package/dist/core/loaders/admin.js +18 -0
- package/dist/core/loaders/admin.js.map +1 -0
- package/dist/core/loaders/apis.d.ts +2 -0
- package/dist/core/loaders/apis.js +156 -0
- package/dist/core/loaders/apis.js.map +1 -0
- package/dist/core/loaders/components.d.ts +6 -0
- package/dist/core/loaders/components.js +37 -0
- package/dist/core/loaders/components.js.map +1 -0
- package/dist/core/loaders/index.d.ts +18 -0
- package/dist/core/loaders/index.js +26 -0
- package/dist/core/loaders/index.js.map +1 -0
- package/dist/core/loaders/middlewares.d.ts +2 -0
- package/dist/core/loaders/middlewares.js +34 -0
- package/dist/core/loaders/middlewares.js.map +1 -0
- package/dist/core/loaders/plugins/get-enabled-plugins.d.ts +4 -0
- package/dist/core/loaders/plugins/get-enabled-plugins.js +113 -0
- package/dist/core/loaders/plugins/get-enabled-plugins.js.map +1 -0
- package/dist/core/loaders/plugins/get-user-plugins-config.d.ts +6 -0
- package/dist/core/loaders/plugins/get-user-plugins-config.js +31 -0
- package/dist/core/loaders/plugins/get-user-plugins-config.js.map +1 -0
- package/dist/core/loaders/plugins/index.d.ts +2 -0
- package/dist/core/loaders/plugins/index.js +109 -0
- package/dist/core/loaders/plugins/index.js.map +1 -0
- package/dist/core/loaders/policies.d.ts +2 -0
- package/dist/core/loaders/policies.js +28 -0
- package/dist/core/loaders/policies.js.map +1 -0
- package/dist/core/loaders/sanitizers.d.ts +3 -0
- package/dist/core/loaders/sanitizers.js +6 -0
- package/dist/core/loaders/sanitizers.js.map +1 -0
- package/dist/core/loaders/src-index.d.ts +3 -0
- package/dist/core/loaders/src-index.js +37 -0
- package/dist/core/loaders/src-index.js.map +1 -0
- package/dist/core/loaders/validators.d.ts +3 -0
- package/dist/core/loaders/validators.js +6 -0
- package/dist/core/loaders/validators.js.map +1 -0
- package/dist/core/registries/apis.d.ts +7 -0
- package/dist/core/registries/apis.js +24 -0
- package/dist/core/registries/apis.js.map +1 -0
- package/dist/core/registries/config.d.ts +3 -0
- package/dist/core/registries/config.js +23 -0
- package/dist/core/registries/config.js.map +1 -0
- package/dist/core/registries/content-types.d.ts +32 -0
- package/dist/core/registries/content-types.js +70 -0
- package/dist/core/registries/content-types.js.map +1 -0
- package/dist/core/registries/controllers.d.ts +34 -0
- package/dist/core/registries/controllers.js +81 -0
- package/dist/core/registries/controllers.js.map +1 -0
- package/dist/core/registries/custom-fields.d.ts +7 -0
- package/dist/core/registries/custom-fields.js +74 -0
- package/dist/core/registries/custom-fields.js.map +1 -0
- package/dist/core/registries/hooks.d.ts +43 -0
- package/dist/core/registries/hooks.js +59 -0
- package/dist/core/registries/hooks.js.map +1 -0
- package/dist/core/registries/middlewares.d.ts +30 -0
- package/dist/core/registries/middlewares.js +62 -0
- package/dist/core/registries/middlewares.js.map +1 -0
- package/dist/core/registries/modules.d.ts +14 -0
- package/dist/core/registries/modules.js +40 -0
- package/dist/core/registries/modules.js.map +1 -0
- package/dist/core/registries/plugins.d.ts +8 -0
- package/dist/core/registries/plugins.js +24 -0
- package/dist/core/registries/plugins.js.map +1 -0
- package/dist/core/registries/policies.d.ts +33 -0
- package/dist/core/registries/policies.js +64 -0
- package/dist/core/registries/policies.js.map +1 -0
- package/dist/core/registries/sanitizers.d.ts +9 -0
- package/dist/core/registries/sanitizers.js +27 -0
- package/dist/core/registries/sanitizers.js.map +1 -0
- package/dist/core/registries/services.d.ts +34 -0
- package/dist/core/registries/services.js +82 -0
- package/dist/core/registries/services.js.map +1 -0
- package/dist/core/registries/validators.d.ts +9 -0
- package/dist/core/registries/validators.js +27 -0
- package/dist/core/registries/validators.js.map +1 -0
- package/dist/core/utils.d.ts +4 -0
- package/dist/core/utils.js +28 -0
- package/dist/core/utils.js.map +1 -0
- package/dist/core-api/controller/collection-type.d.ts +10 -0
- package/dist/core-api/controller/collection-type.js +95 -0
- package/dist/core-api/controller/collection-type.js.map +1 -0
- package/dist/core-api/controller/index.d.ts +5 -0
- package/dist/core-api/controller/index.js +50 -0
- package/dist/core-api/controller/index.js.map +1 -0
- package/dist/core-api/controller/single-type.d.ts +9 -0
- package/dist/core-api/controller/single-type.js +52 -0
- package/dist/core-api/controller/single-type.js.map +1 -0
- package/dist/core-api/controller/transform.d.ts +21 -0
- package/dist/core-api/controller/transform.js +86 -0
- package/dist/core-api/controller/transform.js.map +1 -0
- package/dist/core-api/routes/index.d.ts +23 -0
- package/dist/core-api/routes/index.js +68 -0
- package/dist/core-api/routes/index.js.map +1 -0
- package/dist/core-api/service/collection-type.d.ts +9 -0
- package/dist/core-api/service/collection-type.js +61 -0
- package/dist/core-api/service/collection-type.js.map +1 -0
- package/dist/core-api/service/get-fetch-params.d.ts +6 -0
- package/dist/core-api/service/get-fetch-params.js +16 -0
- package/dist/core-api/service/get-fetch-params.js.map +1 -0
- package/dist/core-api/service/index.d.ts +8 -0
- package/dist/core-api/service/index.js +18 -0
- package/dist/core-api/service/index.js.map +1 -0
- package/dist/core-api/service/pagination.d.ts +40 -0
- package/dist/core-api/service/pagination.js +97 -0
- package/dist/core-api/service/pagination.js.map +1 -0
- package/dist/core-api/service/single-type.d.ts +8 -0
- package/dist/core-api/service/single-type.js +57 -0
- package/dist/core-api/service/single-type.js.map +1 -0
- package/dist/ee/index.d.ts +19 -0
- package/dist/ee/index.js +185 -0
- package/dist/ee/index.js.map +1 -0
- package/dist/ee/license.d.ts +20 -0
- package/dist/ee/license.js +94 -0
- package/dist/ee/license.js.map +1 -0
- package/dist/factories.d.ts +12 -0
- package/dist/factories.js +70 -0
- package/dist/factories.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/load/filepath-to-prop-path.d.ts +5 -0
- package/dist/load/filepath-to-prop-path.js +21 -0
- package/dist/load/filepath-to-prop-path.js.map +1 -0
- package/dist/load/glob.d.ts +6 -0
- package/dist/load/glob.js +20 -0
- package/dist/load/glob.js.map +1 -0
- package/dist/load/index.d.ts +2 -0
- package/dist/load/index.js +11 -0
- package/dist/load/index.js.map +1 -0
- package/dist/load/load-files.d.ts +9 -0
- package/dist/load/load-files.js +44 -0
- package/dist/load/load-files.js.map +1 -0
- package/dist/load/package-path.d.ts +5 -0
- package/dist/load/package-path.js +11 -0
- package/dist/load/package-path.js.map +1 -0
- package/dist/middlewares/body.d.ts +5 -0
- package/dist/middlewares/body.js +78 -0
- package/dist/middlewares/body.js.map +1 -0
- package/dist/middlewares/compression.d.ts +4 -0
- package/dist/middlewares/compression.js +10 -0
- package/dist/middlewares/compression.js.map +1 -0
- package/dist/middlewares/cors.d.ts +12 -0
- package/dist/middlewares/cors.js +54 -0
- package/dist/middlewares/cors.js.map +1 -0
- package/dist/middlewares/errors.d.ts +3 -0
- package/dist/middlewares/errors.js +35 -0
- package/dist/middlewares/errors.js.map +1 -0
- package/dist/middlewares/favicon.d.ts +4 -0
- package/dist/middlewares/favicon.js +30 -0
- package/dist/middlewares/favicon.js.map +1 -0
- package/dist/middlewares/index.d.ts +2 -0
- package/dist/middlewares/index.js +34 -0
- package/dist/middlewares/index.js.map +1 -0
- package/dist/middlewares/ip.d.ts +4 -0
- package/dist/middlewares/ip.js +10 -0
- package/dist/middlewares/ip.js.map +1 -0
- package/dist/middlewares/logger.d.ts +2 -0
- package/dist/middlewares/logger.js +13 -0
- package/dist/middlewares/logger.js.map +1 -0
- package/dist/middlewares/powered-by.d.ts +5 -0
- package/dist/middlewares/powered-by.js +15 -0
- package/dist/middlewares/powered-by.js.map +1 -0
- package/dist/middlewares/public/index.d.ts +2 -0
- package/dist/middlewares/public/index.js +112 -0
- package/dist/middlewares/public/index.js.map +1 -0
- package/dist/middlewares/public/serve-static.d.ts +3 -0
- package/dist/middlewares/public/serve-static.js +27 -0
- package/dist/middlewares/public/serve-static.js.map +1 -0
- package/dist/middlewares/query.d.ts +2 -0
- package/dist/middlewares/query.js +45 -0
- package/dist/middlewares/query.js.map +1 -0
- package/dist/middlewares/response-time.d.ts +2 -0
- package/dist/middlewares/response-time.js +13 -0
- package/dist/middlewares/response-time.js.map +1 -0
- package/dist/middlewares/responses.d.ts +5 -0
- package/dist/middlewares/responses.js +16 -0
- package/dist/middlewares/responses.js.map +1 -0
- package/dist/middlewares/security.d.ts +4 -0
- package/dist/middlewares/security.js +52 -0
- package/dist/middlewares/security.js.map +1 -0
- package/dist/middlewares/session.d.ts +3 -0
- package/dist/middlewares/session.js +30 -0
- package/dist/middlewares/session.js.map +1 -0
- package/dist/migrations/draft-publish.d.ts +8 -0
- package/dist/migrations/draft-publish.js +46 -0
- package/dist/migrations/draft-publish.js.map +1 -0
- package/dist/services/auth/index.d.ts +25 -0
- package/dist/services/auth/index.js +84 -0
- package/dist/services/auth/index.js.map +1 -0
- package/dist/services/content-api/index.d.ts +53 -0
- package/dist/services/content-api/index.js +62 -0
- package/dist/services/content-api/index.js.map +1 -0
- package/dist/services/content-api/permissions/engine.d.ts +4 -0
- package/dist/services/content-api/permissions/engine.js +8 -0
- package/dist/services/content-api/permissions/engine.js.map +1 -0
- package/dist/services/content-api/permissions/index.d.ts +51 -0
- package/dist/services/content-api/permissions/index.js +110 -0
- package/dist/services/content-api/permissions/index.js.map +1 -0
- package/dist/services/content-api/permissions/providers/action.d.ts +19 -0
- package/dist/services/content-api/permissions/providers/action.js +16 -0
- package/dist/services/content-api/permissions/providers/action.js.map +1 -0
- package/dist/services/content-api/permissions/providers/condition.d.ts +23 -0
- package/dist/services/content-api/permissions/providers/condition.js +16 -0
- package/dist/services/content-api/permissions/providers/condition.js.map +1 -0
- package/dist/services/content-api/permissions/providers/index.d.ts +2 -0
- package/dist/services/content-api/permissions/providers/index.js +11 -0
- package/dist/services/content-api/permissions/providers/index.js.map +1 -0
- package/dist/services/core-store.d.ts +52 -0
- package/dist/services/core-store.js +123 -0
- package/dist/services/core-store.js.map +1 -0
- package/dist/services/cron.d.ts +26 -0
- package/dist/services/cron.js +69 -0
- package/dist/services/cron.js.map +1 -0
- package/dist/services/custom-fields.d.ts +3 -0
- package/dist/services/custom-fields.js +11 -0
- package/dist/services/custom-fields.js.map +1 -0
- package/dist/services/entity-service/attributes/index.d.ts +5 -0
- package/dist/services/entity-service/attributes/index.js +26 -0
- package/dist/services/entity-service/attributes/index.js.map +1 -0
- package/dist/services/entity-service/attributes/transforms.d.ts +9 -0
- package/dist/services/entity-service/attributes/transforms.js +22 -0
- package/dist/services/entity-service/attributes/transforms.js.map +1 -0
- package/dist/services/entity-service/components.d.ts +22 -0
- package/dist/services/entity-service/components.js +381 -0
- package/dist/services/entity-service/components.js.map +1 -0
- package/dist/services/entity-service/index.d.ts +14 -0
- package/dist/services/entity-service/index.js +311 -0
- package/dist/services/entity-service/index.js.map +1 -0
- package/dist/services/entity-service/params.d.ts +7 -0
- package/dist/services/entity-service/params.js +9 -0
- package/dist/services/entity-service/params.js.map +1 -0
- package/dist/services/entity-validator/blocks-validator.d.ts +2 -0
- package/dist/services/entity-validator/blocks-validator.js +127 -0
- package/dist/services/entity-validator/blocks-validator.js.map +1 -0
- package/dist/services/entity-validator/index.d.ts +7 -0
- package/dist/services/entity-validator/index.js +332 -0
- package/dist/services/entity-validator/index.js.map +1 -0
- package/dist/services/entity-validator/validators.d.ts +36 -0
- package/dist/services/entity-validator/validators.js +149 -0
- package/dist/services/entity-validator/validators.js.map +1 -0
- package/dist/services/errors.d.ts +39 -0
- package/dist/services/errors.js +78 -0
- package/dist/services/errors.js.map +1 -0
- package/dist/services/event-hub.d.ts +18 -0
- package/dist/services/event-hub.js +77 -0
- package/dist/services/event-hub.js.map +1 -0
- package/dist/services/fs.d.ts +12 -0
- package/dist/services/fs.js +54 -0
- package/dist/services/fs.js.map +1 -0
- package/dist/services/metrics/admin-user-hash.d.ts +6 -0
- package/dist/services/metrics/admin-user-hash.js +19 -0
- package/dist/services/metrics/admin-user-hash.js.map +1 -0
- package/dist/services/metrics/index.d.ts +13 -0
- package/dist/services/metrics/index.js +53 -0
- package/dist/services/metrics/index.js.map +1 -0
- package/dist/services/metrics/is-truthy.d.ts +2 -0
- package/dist/services/metrics/is-truthy.js +11 -0
- package/dist/services/metrics/is-truthy.js.map +1 -0
- package/dist/services/metrics/middleware.d.ts +6 -0
- package/dist/services/metrics/middleware.js +28 -0
- package/dist/services/metrics/middleware.js.map +1 -0
- package/dist/services/metrics/rate-limiter.d.ts +6 -0
- package/dist/services/metrics/rate-limiter.js +21 -0
- package/dist/services/metrics/rate-limiter.js.map +1 -0
- package/dist/services/metrics/sender.d.ts +12 -0
- package/dist/services/metrics/sender.js +80 -0
- package/dist/services/metrics/sender.js.map +1 -0
- package/dist/services/request-context.d.ts +6 -0
- package/dist/services/request-context.js +14 -0
- package/dist/services/request-context.js.map +1 -0
- package/dist/services/server/admin-api.d.ts +10 -0
- package/dist/services/server/admin-api.js +13 -0
- package/dist/services/server/admin-api.js.map +1 -0
- package/dist/services/server/api.d.ts +14 -0
- package/dist/services/server/api.js +32 -0
- package/dist/services/server/api.js.map +1 -0
- package/dist/services/server/compose-endpoint.d.ts +6 -0
- package/dist/services/server/compose-endpoint.js +121 -0
- package/dist/services/server/compose-endpoint.js.map +1 -0
- package/dist/services/server/content-api.d.ts +10 -0
- package/dist/services/server/content-api.js +13 -0
- package/dist/services/server/content-api.js.map +1 -0
- package/dist/services/server/http-server.d.ts +9 -0
- package/dist/services/server/http-server.js +54 -0
- package/dist/services/server/http-server.js.map +1 -0
- package/dist/services/server/index.d.ts +3 -0
- package/dist/services/server/index.js +91 -0
- package/dist/services/server/index.js.map +1 -0
- package/dist/services/server/koa.d.ts +15 -0
- package/dist/services/server/koa.js +56 -0
- package/dist/services/server/koa.js.map +1 -0
- package/dist/services/server/middleware.d.ts +14 -0
- package/dist/services/server/middleware.js +103 -0
- package/dist/services/server/middleware.js.map +1 -0
- package/dist/services/server/policy.d.ts +3 -0
- package/dist/services/server/policy.js +21 -0
- package/dist/services/server/policy.js.map +1 -0
- package/dist/services/server/register-middlewares.d.ts +6 -0
- package/dist/services/server/register-middlewares.js +82 -0
- package/dist/services/server/register-middlewares.js.map +1 -0
- package/dist/services/server/register-routes.d.ts +6 -0
- package/dist/services/server/register-routes.js +94 -0
- package/dist/services/server/register-routes.js.map +1 -0
- package/dist/services/server/routing.d.ts +32 -0
- package/dist/services/server/routing.js +105 -0
- package/dist/services/server/routing.js.map +1 -0
- package/dist/services/utils/dynamic-zones.d.ts +2 -0
- package/dist/services/utils/dynamic-zones.js +13 -0
- package/dist/services/utils/dynamic-zones.js.map +1 -0
- package/dist/services/utils/upload-files.d.ts +7 -0
- package/dist/services/utils/upload-files.js +74 -0
- package/dist/services/utils/upload-files.js.map +1 -0
- package/dist/services/webhook-runner.d.ts +48 -0
- package/dist/services/webhook-runner.js +141 -0
- package/dist/services/webhook-runner.js.map +1 -0
- package/dist/services/webhook-store.d.ts +49 -0
- package/dist/services/webhook-store.js +106 -0
- package/dist/services/webhook-store.js.map +1 -0
- package/dist/services/worker-queue.d.ts +19 -0
- package/dist/services/worker-queue.js +64 -0
- package/dist/services/worker-queue.js.map +1 -0
- package/dist/utils/addSlash.d.ts +2 -0
- package/dist/utils/addSlash.js +15 -0
- package/dist/utils/addSlash.js.map +1 -0
- package/dist/utils/convert-custom-field-type.d.ts +3 -0
- package/dist/utils/convert-custom-field-type.js +20 -0
- package/dist/utils/convert-custom-field-type.js.map +1 -0
- package/dist/utils/cron.d.ts +7 -0
- package/dist/utils/cron.js +56 -0
- package/dist/utils/cron.js.map +1 -0
- package/dist/utils/ee.d.ts +2 -0
- package/dist/utils/ee.js +8 -0
- package/dist/utils/ee.js.map +1 -0
- package/dist/utils/fetch.d.ts +8 -0
- package/dist/utils/fetch.js +23 -0
- package/dist/utils/fetch.js.map +1 -0
- package/dist/utils/get-dirs.d.ts +9 -0
- package/dist/utils/get-dirs.js +30 -0
- package/dist/utils/get-dirs.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +13 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/is-initialized.d.ts +5 -0
- package/dist/utils/is-initialized.js +21 -0
- package/dist/utils/is-initialized.js.map +1 -0
- package/dist/utils/lifecycles.d.ts +5 -0
- package/dist/utils/lifecycles.js +9 -0
- package/dist/utils/lifecycles.js.map +1 -0
- package/dist/utils/machine-id.d.ts +2 -0
- package/dist/utils/machine-id.js +15 -0
- package/dist/utils/machine-id.js.map +1 -0
- package/dist/utils/open-browser.d.ts +4 -0
- package/dist/utils/open-browser.js +13 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/dist/utils/postinstall.d.ts +1 -0
- package/dist/utils/postinstall.js +32 -0
- package/dist/utils/postinstall.js.map +1 -0
- package/dist/utils/signals.d.ts +2 -0
- package/dist/utils/signals.js +20 -0
- package/dist/utils/signals.js.map +1 -0
- package/dist/utils/startup-logger.d.ts +10 -0
- package/dist/utils/startup-logger.js +68 -0
- package/dist/utils/startup-logger.js.map +1 -0
- package/dist/utils/update-notifier/index.d.ts +8 -0
- package/dist/utils/update-notifier/index.js +85 -0
- package/dist/utils/update-notifier/index.js.map +1 -0
- package/index.js +5 -0
- package/package.json +57 -25
- package/scripts/postinstall.js +7 -0
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -4
- package/ee/LICENSE.txt +0 -1
- package/ee/index.js +0 -213
- package/ee/license.js +0 -109
- package/lib/Strapi.js +0 -591
- package/lib/commands/actions/admin/create-user/action.js +0 -113
- package/lib/commands/actions/admin/create-user/command.js +0 -19
- package/lib/commands/actions/admin/reset-user-password/action.js +0 -52
- package/lib/commands/actions/admin/reset-user-password/command.js +0 -17
- package/lib/commands/actions/build-command/action.js +0 -18
- package/lib/commands/actions/build-command/command.js +0 -15
- package/lib/commands/actions/components/list/action.js +0 -23
- package/lib/commands/actions/components/list/command.js +0 -14
- package/lib/commands/actions/configuration/dump/action.js +0 -51
- package/lib/commands/actions/configuration/dump/command.js +0 -17
- package/lib/commands/actions/configuration/restore/action.js +0 -172
- package/lib/commands/actions/configuration/restore/command.js +0 -17
- package/lib/commands/actions/console/action.js +0 -27
- package/lib/commands/actions/console/command.js +0 -14
- package/lib/commands/actions/content-types/list/action.js +0 -23
- package/lib/commands/actions/content-types/list/command.js +0 -14
- package/lib/commands/actions/controllers/list/action.js +0 -23
- package/lib/commands/actions/controllers/list/command.js +0 -14
- package/lib/commands/actions/develop/action.js +0 -217
- package/lib/commands/actions/develop/command.js +0 -19
- package/lib/commands/actions/export/action.js +0 -184
- package/lib/commands/actions/export/command.js +0 -45
- package/lib/commands/actions/generate/command.js +0 -18
- package/lib/commands/actions/hooks/list/action.js +0 -23
- package/lib/commands/actions/hooks/list/command.js +0 -14
- package/lib/commands/actions/import/action.js +0 -181
- package/lib/commands/actions/import/command.js +0 -97
- package/lib/commands/actions/install/action.js +0 -48
- package/lib/commands/actions/install/command.js +0 -14
- package/lib/commands/actions/middlewares/list/action.js +0 -23
- package/lib/commands/actions/middlewares/list/command.js +0 -14
- package/lib/commands/actions/new/action.js +0 -13
- package/lib/commands/actions/new/command.js +0 -35
- package/lib/commands/actions/plugin/build-command/action.js +0 -137
- package/lib/commands/actions/plugin/build-command/command.js +0 -17
- package/lib/commands/actions/policies/list/action.js +0 -23
- package/lib/commands/actions/policies/list/command.js +0 -14
- package/lib/commands/actions/report/action.js +0 -35
- package/lib/commands/actions/report/command.js +0 -17
- package/lib/commands/actions/routes/list/action.js +0 -29
- package/lib/commands/actions/routes/list/command.js +0 -14
- package/lib/commands/actions/services/list/action.js +0 -23
- package/lib/commands/actions/services/list/command.js +0 -14
- package/lib/commands/actions/start/action.js +0 -25
- package/lib/commands/actions/start/command.js +0 -14
- package/lib/commands/actions/telemetry/disable/action.js +0 -88
- package/lib/commands/actions/telemetry/disable/command.js +0 -14
- package/lib/commands/actions/telemetry/enable/action.js +0 -104
- package/lib/commands/actions/telemetry/enable/command.js +0 -14
- package/lib/commands/actions/templates/generate/action.js +0 -96
- package/lib/commands/actions/templates/generate/command.js +0 -14
- package/lib/commands/actions/transfer/action.js +0 -200
- package/lib/commands/actions/transfer/command.js +0 -115
- package/lib/commands/actions/ts/generate-types/action.js +0 -29
- package/lib/commands/actions/ts/generate-types/command.js +0 -21
- package/lib/commands/actions/uninstall/action.js +0 -68
- package/lib/commands/actions/uninstall/command.js +0 -15
- package/lib/commands/actions/version/command.js +0 -19
- package/lib/commands/actions/watch-admin/action.js +0 -40
- package/lib/commands/actions/watch-admin/command.js +0 -15
- package/lib/commands/builders/admin.js +0 -57
- package/lib/commands/builders/index.js +0 -9
- package/lib/commands/builders/packages.js +0 -252
- package/lib/commands/builders/tasks/dts.js +0 -199
- package/lib/commands/builders/tasks/index.js +0 -29
- package/lib/commands/builders/tasks/vite.js +0 -144
- package/lib/commands/builders/typescript.js +0 -32
- package/lib/commands/index.js +0 -68
- package/lib/commands/utils/commander.js +0 -157
- package/lib/commands/utils/data-transfer.js +0 -427
- package/lib/commands/utils/helpers.js +0 -218
- package/lib/commands/utils/logger.js +0 -97
- package/lib/commands/utils/pkg.js +0 -421
- package/lib/compile.js +0 -20
- package/lib/container.js +0 -45
- package/lib/core/app-configuration/config-loader.js +0 -22
- package/lib/core/app-configuration/index.js +0 -61
- package/lib/core/app-configuration/load-config-file.js +0 -43
- package/lib/core/bootstrap.js +0 -33
- package/lib/core/domain/component/index.js +0 -24
- package/lib/core/domain/component/validator.js +0 -23
- package/lib/core/domain/content-type/index.js +0 -134
- package/lib/core/domain/content-type/validator.js +0 -105
- package/lib/core/domain/module/index.js +0 -108
- package/lib/core/domain/module/validation.js +0 -32
- package/lib/core/loaders/admin.js +0 -16
- package/lib/core/loaders/apis.js +0 -161
- package/lib/core/loaders/components.js +0 -42
- package/lib/core/loaders/index.js +0 -13
- package/lib/core/loaders/middlewares.js +0 -37
- package/lib/core/loaders/plugins/get-enabled-plugins.js +0 -151
- package/lib/core/loaders/plugins/get-user-plugins-config.js +0 -37
- package/lib/core/loaders/plugins/index.js +0 -121
- package/lib/core/loaders/policies.js +0 -29
- package/lib/core/loaders/sanitizers.js +0 -5
- package/lib/core/loaders/src-index.js +0 -39
- package/lib/core/loaders/validators.js +0 -5
- package/lib/core/registries/apis.js +0 -29
- package/lib/core/registries/config.js +0 -21
- package/lib/core/registries/content-types.js +0 -97
- package/lib/core/registries/controllers.d.ts +0 -7
- package/lib/core/registries/controllers.js +0 -114
- package/lib/core/registries/custom-fields.js +0 -89
- package/lib/core/registries/hooks.d.ts +0 -17
- package/lib/core/registries/hooks.js +0 -87
- package/lib/core/registries/middlewares.d.ts +0 -5
- package/lib/core/registries/middlewares.js +0 -89
- package/lib/core/registries/modules.js +0 -44
- package/lib/core/registries/plugins.js +0 -28
- package/lib/core/registries/policies.d.ts +0 -13
- package/lib/core/registries/policies.js +0 -89
- package/lib/core/registries/sanitizers.js +0 -26
- package/lib/core/registries/services.js +0 -114
- package/lib/core/registries/validators.js +0 -26
- package/lib/core/utils.js +0 -32
- package/lib/core-api/controller/collection-type.js +0 -115
- package/lib/core-api/controller/index.js +0 -63
- package/lib/core-api/controller/single-type.js +0 -65
- package/lib/core-api/controller/transform.js +0 -97
- package/lib/core-api/routes/index.js +0 -71
- package/lib/core-api/service/collection-type.js +0 -80
- package/lib/core-api/service/index.js +0 -45
- package/lib/core-api/service/pagination.js +0 -125
- package/lib/core-api/service/single-type.js +0 -72
- package/lib/factories.d.ts +0 -18
- package/lib/factories.js +0 -93
- package/lib/global.d.ts +0 -22
- package/lib/index.d.ts +0 -6
- package/lib/index.js +0 -8
- package/lib/load/filepath-to-prop-path.js +0 -22
- package/lib/load/glob.js +0 -15
- package/lib/load/index.js +0 -9
- package/lib/load/load-files.js +0 -58
- package/lib/load/package-path.js +0 -9
- package/lib/middlewares/body.js +0 -82
- package/lib/middlewares/compression.js +0 -8
- package/lib/middlewares/cors.js +0 -59
- package/lib/middlewares/errors.js +0 -40
- package/lib/middlewares/favicon.js +0 -32
- package/lib/middlewares/index.d.ts +0 -5
- package/lib/middlewares/index.js +0 -33
- package/lib/middlewares/ip.js +0 -8
- package/lib/middlewares/logger.js +0 -14
- package/lib/middlewares/powered-by.js +0 -20
- package/lib/middlewares/public/index.js +0 -94
- package/lib/middlewares/public/serve-static.js +0 -23
- package/lib/middlewares/query.js +0 -52
- package/lib/middlewares/response-time.js +0 -15
- package/lib/middlewares/responses.js +0 -19
- package/lib/middlewares/security.js +0 -57
- package/lib/middlewares/session.js +0 -30
- package/lib/migrations/draft-publish.js +0 -53
- package/lib/services/auth/index.js +0 -109
- package/lib/services/content-api/index.js +0 -74
- package/lib/services/content-api/permissions/engine.js +0 -5
- package/lib/services/content-api/permissions/index.js +0 -148
- package/lib/services/content-api/permissions/providers/action.js +0 -19
- package/lib/services/content-api/permissions/providers/condition.js +0 -19
- package/lib/services/content-api/permissions/providers/index.js +0 -9
- package/lib/services/core-store.js +0 -145
- package/lib/services/cron.js +0 -71
- package/lib/services/custom-fields.js +0 -11
- package/lib/services/entity-service/attributes/index.js +0 -31
- package/lib/services/entity-service/attributes/transforms.js +0 -20
- package/lib/services/entity-service/components.js +0 -497
- package/lib/services/entity-service/index.d.ts +0 -1
- package/lib/services/entity-service/index.js +0 -434
- package/lib/services/entity-service/params.js +0 -9
- package/lib/services/entity-service/types/index.d.ts +0 -228
- package/lib/services/entity-service/types/params/attributes.d.ts +0 -146
- package/lib/services/entity-service/types/params/data.d.ts +0 -4
- package/lib/services/entity-service/types/params/fields.d.ts +0 -74
- package/lib/services/entity-service/types/params/filters/index.d.ts +0 -90
- package/lib/services/entity-service/types/params/filters/operators.d.ts +0 -30
- package/lib/services/entity-service/types/params/index.d.ts +0 -79
- package/lib/services/entity-service/types/params/pagination.d.ts +0 -13
- package/lib/services/entity-service/types/params/populate.d.ts +0 -130
- package/lib/services/entity-service/types/params/publication-state.d.ts +0 -38
- package/lib/services/entity-service/types/params/search.d.ts +0 -1
- package/lib/services/entity-service/types/params/sort.d.ts +0 -106
- package/lib/services/entity-service/types/plugin.d.ts +0 -11
- package/lib/services/entity-service/types/result.d.ts +0 -205
- package/lib/services/entity-validator/index.js +0 -382
- package/lib/services/entity-validator/validators.js +0 -216
- package/lib/services/errors.js +0 -87
- package/lib/services/event-hub.js +0 -83
- package/lib/services/fs.js +0 -58
- package/lib/services/metrics/admin-user-hash.js +0 -21
- package/lib/services/metrics/index.js +0 -61
- package/lib/services/metrics/is-truthy.js +0 -9
- package/lib/services/metrics/middleware.js +0 -33
- package/lib/services/metrics/rate-limiter.js +0 -27
- package/lib/services/metrics/sender.js +0 -90
- package/lib/services/metrics/stringify-deep.js +0 -22
- package/lib/services/request-context.js +0 -17
- package/lib/services/server/admin-api.js +0 -14
- package/lib/services/server/api.js +0 -36
- package/lib/services/server/compose-endpoint.js +0 -141
- package/lib/services/server/content-api.js +0 -16
- package/lib/services/server/http-server.js +0 -64
- package/lib/services/server/index.js +0 -129
- package/lib/services/server/koa.js +0 -62
- package/lib/services/server/middleware.js +0 -132
- package/lib/services/server/policy.js +0 -32
- package/lib/services/server/register-middlewares.js +0 -109
- package/lib/services/server/register-routes.js +0 -105
- package/lib/services/server/routing.js +0 -105
- package/lib/services/utils/dynamic-zones.js +0 -13
- package/lib/services/utils/upload-files.js +0 -79
- package/lib/services/webhook-runner.js +0 -156
- package/lib/services/webhook-store.js +0 -120
- package/lib/services/worker-queue.js +0 -59
- package/lib/types/core/attributes/base.d.ts +0 -77
- package/lib/types/core/attributes/biginteger.d.ts +0 -15
- package/lib/types/core/attributes/boolean.d.ts +0 -14
- package/lib/types/core/attributes/common.d.ts +0 -77
- package/lib/types/core/attributes/component.d.ts +0 -36
- package/lib/types/core/attributes/date-time.d.ts +0 -16
- package/lib/types/core/attributes/date.d.ts +0 -13
- package/lib/types/core/attributes/decimal.d.ts +0 -15
- package/lib/types/core/attributes/dynamic-zone.d.ts +0 -29
- package/lib/types/core/attributes/email.d.ts +0 -14
- package/lib/types/core/attributes/enumeration.d.ts +0 -18
- package/lib/types/core/attributes/float.d.ts +0 -13
- package/lib/types/core/attributes/index.d.ts +0 -26
- package/lib/types/core/attributes/integer.d.ts +0 -15
- package/lib/types/core/attributes/json.d.ts +0 -11
- package/lib/types/core/attributes/media.d.ts +0 -42
- package/lib/types/core/attributes/password.d.ts +0 -15
- package/lib/types/core/attributes/relation.d.ts +0 -152
- package/lib/types/core/attributes/richtext.d.ts +0 -15
- package/lib/types/core/attributes/string.d.ts +0 -20
- package/lib/types/core/attributes/text.d.ts +0 -20
- package/lib/types/core/attributes/time.d.ts +0 -13
- package/lib/types/core/attributes/timestamp.d.ts +0 -15
- package/lib/types/core/attributes/uid.d.ts +0 -43
- package/lib/types/core/attributes/utils.d.ts +0 -143
- package/lib/types/core/commands/index.d.ts +0 -6
- package/lib/types/core/common/controller.d.ts +0 -8
- package/lib/types/core/common/index.d.ts +0 -16
- package/lib/types/core/common/schema.d.ts +0 -3
- package/lib/types/core/common/service.d.ts +0 -5
- package/lib/types/core/common/uid.d.ts +0 -58
- package/lib/types/core/index.d.ts +0 -9
- package/lib/types/core/namespace.d.ts +0 -99
- package/lib/types/core/plugins/index.d.ts +0 -16
- package/lib/types/core/registry.d.ts +0 -68
- package/lib/types/core/schemas/index.d.ts +0 -133
- package/lib/types/core/strapi/index.d.ts +0 -453
- package/lib/types/core/uid.d.ts +0 -167
- package/lib/types/core-api/controller.d.ts +0 -54
- package/lib/types/core-api/index.d.ts +0 -3
- package/lib/types/core-api/router.d.ts +0 -68
- package/lib/types/core-api/service.d.ts +0 -50
- package/lib/types/index.d.ts +0 -8
- package/lib/types/shared/entity-service.d.ts +0 -1
- package/lib/types/shared/index.d.ts +0 -3
- package/lib/types/shared/plugins.d.ts +0 -3
- package/lib/types/shared/registries.d.ts +0 -45
- package/lib/types/utils/array.d.ts +0 -25
- package/lib/types/utils/expression.d.ts +0 -91
- package/lib/types/utils/guard.d.ts +0 -27
- package/lib/types/utils/index.d.ts +0 -27
- package/lib/types/utils/object.d.ts +0 -63
- package/lib/types/utils/string.d.ts +0 -59
- package/lib/types/utils/tuple.d.ts +0 -13
- package/lib/utils/addSlash.js +0 -11
- package/lib/utils/convert-custom-field-type.js +0 -22
- package/lib/utils/cron.js +0 -56
- package/lib/utils/ee.js +0 -3
- package/lib/utils/fetch.js +0 -23
- package/lib/utils/get-dirs.js +0 -31
- package/lib/utils/index.js +0 -11
- package/lib/utils/is-initialized.js +0 -23
- package/lib/utils/lifecycles.js +0 -15
- package/lib/utils/machine-id.js +0 -14
- package/lib/utils/open-browser.js +0 -12
- package/lib/utils/run-checks.js +0 -22
- package/lib/utils/signals.js +0 -24
- package/lib/utils/startup-logger.js +0 -88
- package/lib/utils/success.js +0 -35
- package/lib/utils/update-notifier/index.js +0 -97
- package/lib/utils/url-from-segments.js +0 -12
- /package/{lib → dist}/middlewares/public/assets/images/group_people_1.png +0 -0
- /package/{lib → dist}/middlewares/public/assets/images/group_people_2.png +0 -0
- /package/{lib → dist}/middlewares/public/assets/images/group_people_3.png +0 -0
- /package/{lib → dist}/middlewares/public/assets/images/logo_login.png +0 -0
- /package/{lib → dist}/middlewares/public/index.html +0 -0
- /package/{ee/resources → resources}/key.pub +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.dtsTask = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const ora_1 = __importDefault(require("ora"));
|
|
10
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
11
|
+
class TSConfigNotFoundError extends Error {
|
|
12
|
+
get code() {
|
|
13
|
+
return 'TS_CONFIG_NOT_FOUND';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @description Load a tsconfig.json file and return the parsed config
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
const loadTsConfig = async ({ cwd, path }) => {
|
|
22
|
+
const configPath = typescript_1.default.findConfigFile(cwd, typescript_1.default.sys.fileExists, path);
|
|
23
|
+
if (!configPath) {
|
|
24
|
+
throw new TSConfigNotFoundError(`could not find a valid '${path}'`);
|
|
25
|
+
}
|
|
26
|
+
const configFile = typescript_1.default.readConfigFile(configPath, typescript_1.default.sys.readFile);
|
|
27
|
+
return typescript_1.default.parseJsonConfigFileContent(configFile.config, typescript_1.default.sys, cwd);
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @description
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
const buildTypes = ({ cwd, logger, outDir, tsconfig }) => {
|
|
35
|
+
const compilerOptions = {
|
|
36
|
+
...tsconfig.options,
|
|
37
|
+
declaration: true,
|
|
38
|
+
declarationDir: outDir,
|
|
39
|
+
emitDeclarationOnly: true,
|
|
40
|
+
noEmit: false,
|
|
41
|
+
outDir,
|
|
42
|
+
};
|
|
43
|
+
const program = typescript_1.default.createProgram(tsconfig.fileNames, compilerOptions);
|
|
44
|
+
const emitResult = program.emit();
|
|
45
|
+
const allDiagnostics = typescript_1.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
46
|
+
for (const diagnostic of allDiagnostics) {
|
|
47
|
+
if (diagnostic.file && diagnostic.start) {
|
|
48
|
+
const { line, character } = typescript_1.default.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
|
|
49
|
+
const message = typescript_1.default.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
|
|
50
|
+
const file = path_1.default.relative(cwd, diagnostic.file.fileName);
|
|
51
|
+
const output = [
|
|
52
|
+
`${chalk_1.default.cyan(file)}:${chalk_1.default.cyan(line + 1)}:${chalk_1.default.cyan(character + 1)} - `,
|
|
53
|
+
`${chalk_1.default.gray(`TS${diagnostic.code}:`)} ${message}`,
|
|
54
|
+
].join('');
|
|
55
|
+
if (diagnostic.category === typescript_1.default.DiagnosticCategory.Error) {
|
|
56
|
+
logger.error(output);
|
|
57
|
+
}
|
|
58
|
+
if (diagnostic.category === typescript_1.default.DiagnosticCategory.Warning) {
|
|
59
|
+
logger.warn(output);
|
|
60
|
+
}
|
|
61
|
+
if (diagnostic.category === typescript_1.default.DiagnosticCategory.Message) {
|
|
62
|
+
logger.info(output);
|
|
63
|
+
}
|
|
64
|
+
if (diagnostic.category === typescript_1.default.DiagnosticCategory.Suggestion) {
|
|
65
|
+
logger.info(output);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
logger.info(typescript_1.default.flattenDiagnosticMessageText(diagnostic.messageText, '\n'));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (emitResult.emitSkipped) {
|
|
73
|
+
const errors = allDiagnostics.filter((diag) => diag.category === typescript_1.default.DiagnosticCategory.Error);
|
|
74
|
+
if (errors.length) {
|
|
75
|
+
throw new Error('Failed to compile TypeScript definitions');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const dtsTask = {
|
|
80
|
+
_spinner: null,
|
|
81
|
+
print(ctx, task) {
|
|
82
|
+
const entries = [
|
|
83
|
+
' entries:',
|
|
84
|
+
...task.entries.map((entry) => [
|
|
85
|
+
` – `,
|
|
86
|
+
chalk_1.default.green(`${entry.importId} `),
|
|
87
|
+
`${chalk_1.default.cyan(entry.sourcePath)} ${chalk_1.default.gray('→')} ${chalk_1.default.cyan(entry.targetPath)}`,
|
|
88
|
+
].join('')),
|
|
89
|
+
'',
|
|
90
|
+
];
|
|
91
|
+
this._spinner = (0, ora_1.default)(`Building type files:\n`).start();
|
|
92
|
+
ctx.logger.log([...entries].join('\n'));
|
|
93
|
+
},
|
|
94
|
+
async run(ctx, task) {
|
|
95
|
+
try {
|
|
96
|
+
await Promise.all(task.entries.map(async (entry) => {
|
|
97
|
+
const config = await loadTsConfig({
|
|
98
|
+
/**
|
|
99
|
+
* TODO: this will not scale and assumes all project sourcePaths are `src/index.ts`
|
|
100
|
+
* so we can go back to the "root" of the project...
|
|
101
|
+
*/
|
|
102
|
+
cwd: path_1.default.join(ctx.cwd, entry.sourcePath, '..', '..'),
|
|
103
|
+
path: 'tsconfig.build.json',
|
|
104
|
+
}).catch((err) => {
|
|
105
|
+
if (err instanceof TSConfigNotFoundError) {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
throw err;
|
|
109
|
+
});
|
|
110
|
+
if (config) {
|
|
111
|
+
ctx.logger.debug(`TS config for '${entry.sourcePath}': \n`, config);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
ctx.logger.warn(`You've added a types entry but no tsconfig.json was found for ${entry.targetPath}. Skipping...`);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const { outDir } = config.raw.compilerOptions;
|
|
118
|
+
if (!outDir) {
|
|
119
|
+
throw new Error("tsconfig.json is missing 'compilerOptions.outDir'");
|
|
120
|
+
}
|
|
121
|
+
await buildTypes({
|
|
122
|
+
cwd: ctx.cwd,
|
|
123
|
+
logger: ctx.logger,
|
|
124
|
+
outDir: path_1.default.relative(ctx.cwd, outDir),
|
|
125
|
+
tsconfig: config,
|
|
126
|
+
});
|
|
127
|
+
}));
|
|
128
|
+
await this.success(ctx, task);
|
|
129
|
+
}
|
|
130
|
+
catch (err) {
|
|
131
|
+
this.fail(ctx, task, err);
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
async success() {
|
|
135
|
+
this._spinner?.succeed('Built type files');
|
|
136
|
+
},
|
|
137
|
+
async fail(ctx, task, err) {
|
|
138
|
+
this._spinner?.fail('Failed to build type files');
|
|
139
|
+
throw err;
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
exports.dtsTask = dtsTask;
|
|
143
|
+
//# sourceMappingURL=dts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dts.js","sourceRoot":"","sources":["../../../../src/commands/builders/tasks/dts.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,kDAA0B;AAC1B,8CAAsB;AACtB,4DAA4B;AAS5B,MAAM,qBAAsB,SAAQ,KAAK;IACvC,IAAI,IAAI;QACN,OAAO,qBAAqB,CAAC;IAC/B,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,YAAY,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,EAAuB,EAAE,EAAE;IAChE,MAAM,UAAU,GAAG,oBAAE,CAAC,cAAc,CAAC,GAAG,EAAE,oBAAE,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAEnE,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,qBAAqB,CAAC,2BAA2B,IAAI,GAAG,CAAC,CAAC;KACrE;IAED,MAAM,UAAU,GAAG,oBAAE,CAAC,cAAc,CAAC,UAAU,EAAE,oBAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAElE,OAAO,oBAAE,CAAC,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACvE,CAAC,CAAC;AASF;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAqB,EAAE,EAAE;IAC1E,MAAM,eAAe,GAAG;QACtB,GAAG,QAAQ,CAAC,OAAO;QACnB,WAAW,EAAE,IAAI;QACjB,cAAc,EAAE,MAAM;QACtB,mBAAmB,EAAE,IAAI;QACzB,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAAC;IAEF,MAAM,OAAO,GAAG,oBAAE,CAAC,aAAa,CA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AE,cAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC;oBACtC,QAAQ,EAAE,MAAM;iBACjB,CAAC,CAAC;YACL,CAAC,CAAC,CACH,CAAC;YAEF,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;SAC/B;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;SAC3B;IACH,CAAC;IACD,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG;QACvB,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,4BAA4B,CAAC,CAAC;QAElD,MAAM,GAAG,CAAC;IACZ,CAAC;CACF,CAAC;AAEO,0BAAO"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Ora } from 'ora';
|
|
2
|
+
import { DtsTask } from './dts';
|
|
3
|
+
import { ViteTask } from './vite';
|
|
4
|
+
import type { BuildContext } from '../packages';
|
|
5
|
+
export type Task = ViteTask | DtsTask;
|
|
6
|
+
export interface TaskHandler<TTask extends Task> {
|
|
7
|
+
print: (ctx: BuildContext, task: TTask) => void;
|
|
8
|
+
run: (ctx: BuildContext, task: TTask) => Promise<void>;
|
|
9
|
+
success: (ctx: BuildContext, task: TTask) => Promise<void>;
|
|
10
|
+
fail: (ctx: BuildContext, task: TTask, err: unknown) => Promise<void>;
|
|
11
|
+
_spinner: Ora | null;
|
|
12
|
+
}
|
|
13
|
+
declare const buildTaskHandlers: <T extends DtsTask | ViteTask>(t: T) => TaskHandler<T>;
|
|
14
|
+
export { buildTaskHandlers };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildTaskHandlers = void 0;
|
|
4
|
+
const dts_1 = require("./dts");
|
|
5
|
+
const vite_1 = require("./vite");
|
|
6
|
+
const handlers = {
|
|
7
|
+
'build:js': vite_1.viteTask,
|
|
8
|
+
'build:dts': dts_1.dtsTask,
|
|
9
|
+
};
|
|
10
|
+
const buildTaskHandlers = (t) => {
|
|
11
|
+
return handlers[t.type];
|
|
12
|
+
};
|
|
13
|
+
exports.buildTaskHandlers = buildTaskHandlers;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/builders/tasks/index.ts"],"names":[],"mappings":";;;AACA,+BAAyC;AACzC,iCAA4C;AAa5C,MAAM,QAAQ,GAAG;IACf,UAAU,EAAE,eAAQ;IACpB,WAAW,EAAE,aAAO;CACrB,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAA+B,CAAI,EAAkB,EAAE;IAC/E,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAmB,CAAC;AAC5C,CAAC,CAAC;AAEO,8CAAiB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TaskHandler } from '.';
|
|
2
|
+
import type { Target } from '../packages';
|
|
3
|
+
interface ViteTaskEntry {
|
|
4
|
+
path: string;
|
|
5
|
+
entry?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ViteTask {
|
|
8
|
+
type: 'build:js';
|
|
9
|
+
entries: ViteTaskEntry[];
|
|
10
|
+
format: 'cjs' | 'es';
|
|
11
|
+
output: string;
|
|
12
|
+
runtime: Target;
|
|
13
|
+
}
|
|
14
|
+
declare const viteTask: TaskHandler<ViteTask>;
|
|
15
|
+
export { viteTask };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.viteTask = void 0;
|
|
7
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
const vite_1 = require("vite");
|
|
11
|
+
const plugin_react_1 = __importDefault(require("@vitejs/plugin-react"));
|
|
12
|
+
const ora_1 = __importDefault(require("ora"));
|
|
13
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
const resolveViteConfig = (ctx, task) => {
|
|
18
|
+
const { cwd, distPath, targets, external, extMap, pkg } = ctx;
|
|
19
|
+
const { entries, format, output, runtime } = task;
|
|
20
|
+
const outputExt = extMap[pkg.type || 'commonjs'][format];
|
|
21
|
+
const outDir = path_1.default.relative(cwd, distPath);
|
|
22
|
+
const customLogger = (0, vite_1.createLogger)();
|
|
23
|
+
customLogger.warn = (msg) => ctx.logger.warn(msg);
|
|
24
|
+
customLogger.warnOnce = (msg) => ctx.logger.warn(msg);
|
|
25
|
+
customLogger.error = (msg) => ctx.logger.error(msg);
|
|
26
|
+
const config = {
|
|
27
|
+
configFile: false,
|
|
28
|
+
root: cwd,
|
|
29
|
+
mode: 'production',
|
|
30
|
+
logLevel: 'warn',
|
|
31
|
+
clearScreen: false,
|
|
32
|
+
customLogger,
|
|
33
|
+
build: {
|
|
34
|
+
sourcemap: true,
|
|
35
|
+
/**
|
|
36
|
+
* The task runner will clear this for us
|
|
37
|
+
*/
|
|
38
|
+
emptyOutDir: false,
|
|
39
|
+
target: targets[runtime],
|
|
40
|
+
outDir,
|
|
41
|
+
lib: {
|
|
42
|
+
entry: entries.map((e) => e.entry).filter((v) => Boolean(v)),
|
|
43
|
+
formats: [format],
|
|
44
|
+
/**
|
|
45
|
+
* this enforces the file name to match what the output we've
|
|
46
|
+
* determined from the package.json exports.
|
|
47
|
+
*/
|
|
48
|
+
fileName() {
|
|
49
|
+
return `${path_1.default.relative(outDir, output).replace(/\.[^/.]+$/, '')}${outputExt}`;
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
rollupOptions: {
|
|
53
|
+
external,
|
|
54
|
+
output: {
|
|
55
|
+
chunkFileNames() {
|
|
56
|
+
const parts = outputExt.split('.');
|
|
57
|
+
if (parts.length === 3) {
|
|
58
|
+
return `_chunks/[name]-[hash].${parts[2]}`;
|
|
59
|
+
}
|
|
60
|
+
return `_chunks/[name]-[hash]${outputExt}`;
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* We _could_ omit this, but we'd need to introduce the
|
|
67
|
+
* concept of a custom config for the scripts straight away
|
|
68
|
+
*
|
|
69
|
+
* and since this is isolated to the Strapi CLI, we can make
|
|
70
|
+
* some assumptions and add some weight until we move it outside.
|
|
71
|
+
*/
|
|
72
|
+
plugins: runtime === 'node' ? [] : [(0, plugin_react_1.default)()],
|
|
73
|
+
};
|
|
74
|
+
return config;
|
|
75
|
+
};
|
|
76
|
+
const viteTask = {
|
|
77
|
+
_spinner: null,
|
|
78
|
+
print(ctx, task) {
|
|
79
|
+
const targetLines = [
|
|
80
|
+
' target:',
|
|
81
|
+
...ctx.targets[task.runtime].map((t) => chalk_1.default.cyan(` - ${t}`)),
|
|
82
|
+
];
|
|
83
|
+
const entries = [
|
|
84
|
+
' entries:',
|
|
85
|
+
...task.entries.map((entry) => [
|
|
86
|
+
` – `,
|
|
87
|
+
chalk_1.default.green(`${path_1.default.join(ctx.pkg.name, entry.path)}: `),
|
|
88
|
+
`${chalk_1.default.cyan(entry.entry)} ${chalk_1.default.gray('→')} ${chalk_1.default.cyan(task.output)}`,
|
|
89
|
+
].join('')),
|
|
90
|
+
];
|
|
91
|
+
this._spinner = (0, ora_1.default)(`Building javascript files:\n`).start();
|
|
92
|
+
ctx.logger.log([` format: ${task.format}`, ...targetLines, ...entries].join('\n'));
|
|
93
|
+
},
|
|
94
|
+
async run(ctx, task) {
|
|
95
|
+
try {
|
|
96
|
+
const config = resolveViteConfig(ctx, task);
|
|
97
|
+
ctx.logger.debug('Vite config: \n', config);
|
|
98
|
+
await (0, vite_1.build)(config);
|
|
99
|
+
await this.success(ctx, task);
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
this.fail(ctx, task, err);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
async success() {
|
|
106
|
+
this._spinner?.succeed('Built javascript files');
|
|
107
|
+
},
|
|
108
|
+
async fail(ctx, task, err) {
|
|
109
|
+
this._spinner?.fail('Failed to build javascript files');
|
|
110
|
+
throw err;
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
exports.viteTask = viteTask;
|
|
114
|
+
//# sourceMappingURL=vite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.js","sourceRoot":"","sources":["../../../../src/commands/builders/tasks/vite.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAsD;AACtD,gDAAwB;AACxB,aAAa;AACb,+BAAyD;AACzD,wEAAyC;AACzC,8CAAsB;AACtB,kDAA0B;AAK1B;;GAEG;AACH,MAAM,iBAAiB,GAAG,CAAC,GAAiB,EAAE,IAAc,EAAgB,EAAE;IAC5E,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAC9D,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAClD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,cAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAE5C,MAAM,YAAY,GA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AC,CAAC,aAAa,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtF,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI;QACjB,IAAI;YACF,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC5C,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;YAC5C,MAAM,IAAA,YAAK,EAAC,MAAM,CAAC,CAAC;YACpB,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;SAC/B;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;SAC3B;IACH,CAAC;IACD,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACnD,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG;QACvB,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,kCAAkC,CAAC,CAAC;QAExD,MAAM,GAAG,CAAC;IACZ,CAAC;CACF,CAAC;AAEO,4BAAQ"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
|
+
const typescript_utils_1 = __importDefault(require("@strapi/typescript-utils"));
|
|
9
|
+
const cleanupDistDirectory = async (distDir) => {
|
|
10
|
+
if (!(await fs_extra_1.default.pathExists(distDir))) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const dirContent = await fs_extra_1.default.readdir(distDir);
|
|
14
|
+
const validFilenames = dirContent
|
|
15
|
+
// Ignore the admin build folder
|
|
16
|
+
.filter((filename) => filename !== 'build');
|
|
17
|
+
for (const filename of validFilenames) {
|
|
18
|
+
await fs_extra_1.default.remove(path_1.default.resolve(distDir, filename));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.default = async ({ srcDir, distDir, ignoreDiagnostics = false, }) => {
|
|
22
|
+
const isTSProject = await typescript_utils_1.default.isUsingTypeScript(srcDir);
|
|
23
|
+
if (!isTSProject) {
|
|
24
|
+
throw new Error(`tsconfig file not found in ${srcDir}`);
|
|
25
|
+
}
|
|
26
|
+
await cleanupDistDirectory(distDir);
|
|
27
|
+
return typescript_utils_1.default.compile(srcDir, { configOptions: { ignoreDiagnostics } });
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=typescript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../src/commands/builders/typescript.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,wDAA0B;AAC1B,gFAA+C;AAE/C,MAAM,oBAAoB,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;IACrD,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE;QACnC,OAAO;KACR;IAED,MAAM,UAAU,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,cAAc,GAAG,UAAU;QAC/B,gCAAgC;SAC/B,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;IAE9C,KAAK,MAAM,QAAQ,IAAI,cAAc,EAAE;QACrC,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;KAClD;AACH,CAAC,CAAC;AAEF,kBAAe,KAAK,EAAE,EACpB,MAAM,EACN,OAAO,EACP,iBAAiB,GAAG,KAAK,GAK1B,EAAE,EAAE;IACH,MAAM,WAAW,GAAG,MAAM,0BAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAE5D,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC;KACzD;IAED,MAAM,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAEpC,OAAO,0BAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAC3E,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
declare const strapiCommands: {
|
|
3
|
+
readonly createAdminUser: import("./types").StrapiCommand;
|
|
4
|
+
readonly resetAdminUserPassword: import("./types").StrapiCommand;
|
|
5
|
+
readonly buildCommand: import("./types").StrapiCommand;
|
|
6
|
+
readonly listComponents: import("./types").StrapiCommand;
|
|
7
|
+
readonly configurationDump: import("./types").StrapiCommand;
|
|
8
|
+
readonly configurationRestore: import("./types").StrapiCommand;
|
|
9
|
+
readonly consoleCommand: import("./types").StrapiCommand;
|
|
10
|
+
readonly listContentTypes: import("./types").StrapiCommand;
|
|
11
|
+
readonly listControllers: import("./types").StrapiCommand;
|
|
12
|
+
readonly developCommand: import("./types").StrapiCommand;
|
|
13
|
+
readonly generateCommand: import("./types").StrapiCommand;
|
|
14
|
+
readonly listHooks: import("./types").StrapiCommand;
|
|
15
|
+
readonly installCommand: import("./types").StrapiCommand;
|
|
16
|
+
readonly listMiddlewares: import("./types").StrapiCommand;
|
|
17
|
+
readonly newCommand: import("./types").StrapiCommand;
|
|
18
|
+
readonly listPolicies: import("./types").StrapiCommand;
|
|
19
|
+
readonly reportCommand: import("./types").StrapiCommand;
|
|
20
|
+
readonly listRoutes: import("./types").StrapiCommand;
|
|
21
|
+
readonly listServices: import("./types").StrapiCommand;
|
|
22
|
+
readonly startCommand: import("./types").StrapiCommand;
|
|
23
|
+
readonly disableTelemetry: import("./types").StrapiCommand;
|
|
24
|
+
readonly enableTelemetry: import("./types").StrapiCommand;
|
|
25
|
+
readonly generateTemplates: import("./types").StrapiCommand;
|
|
26
|
+
readonly generateTsTypes: import("./types").StrapiCommand;
|
|
27
|
+
readonly uninstallCommand: import("./types").StrapiCommand;
|
|
28
|
+
readonly versionCommand: import("./types").StrapiCommand;
|
|
29
|
+
readonly watchAdminCommand: import("./types").StrapiCommand;
|
|
30
|
+
readonly buildPluginCommand: import("./types").StrapiCommand;
|
|
31
|
+
};
|
|
32
|
+
declare const buildStrapiCommand: (argv: string[], command?: Command) => Command;
|
|
33
|
+
declare const runStrapiCommand: (argv?: string[], command?: Command) => Promise<void>;
|
|
34
|
+
export { runStrapiCommand, buildStrapiCommand, strapiCommands };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.strapiCommands = exports.buildStrapiCommand = exports.runStrapiCommand = void 0;
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const command_1 = __importDefault(require("./actions/admin/create-user/command"));
|
|
9
|
+
const command_2 = __importDefault(require("./actions/admin/reset-user-password/command"));
|
|
10
|
+
const command_3 = __importDefault(require("./actions/build-command/command")); // in 'build-command' to avoid problems with 'build' being commonly ignored
|
|
11
|
+
const command_4 = __importDefault(require("./actions/components/list/command"));
|
|
12
|
+
const command_5 = __importDefault(require("./actions/configuration/dump/command"));
|
|
13
|
+
const command_6 = __importDefault(require("./actions/configuration/restore/command"));
|
|
14
|
+
const command_7 = __importDefault(require("./actions/console/command"));
|
|
15
|
+
const command_8 = __importDefault(require("./actions/content-types/list/command"));
|
|
16
|
+
const command_9 = __importDefault(require("./actions/controllers/list/command"));
|
|
17
|
+
const command_10 = __importDefault(require("./actions/develop/command"));
|
|
18
|
+
const command_11 = __importDefault(require("./actions/generate/command"));
|
|
19
|
+
const command_12 = __importDefault(require("./actions/hooks/list/command"));
|
|
20
|
+
const command_13 = __importDefault(require("./actions/install/command"));
|
|
21
|
+
const command_14 = __importDefault(require("./actions/middlewares/list/command"));
|
|
22
|
+
const command_15 = __importDefault(require("./actions/new/command"));
|
|
23
|
+
const command_16 = __importDefault(require("./actions/policies/list/command"));
|
|
24
|
+
const command_17 = __importDefault(require("./actions/report/command"));
|
|
25
|
+
const command_18 = __importDefault(require("./actions/routes/list/command"));
|
|
26
|
+
const command_19 = __importDefault(require("./actions/services/list/command"));
|
|
27
|
+
const command_20 = __importDefault(require("./actions/start/command"));
|
|
28
|
+
const command_21 = __importDefault(require("./actions/telemetry/disable/command"));
|
|
29
|
+
const command_22 = __importDefault(require("./actions/telemetry/enable/command"));
|
|
30
|
+
const command_23 = __importDefault(require("./actions/templates/generate/command"));
|
|
31
|
+
const command_24 = __importDefault(require("./actions/ts/generate-types/command"));
|
|
32
|
+
const command_25 = __importDefault(require("./actions/uninstall/command"));
|
|
33
|
+
const command_26 = __importDefault(require("./actions/version/command"));
|
|
34
|
+
const command_27 = __importDefault(require("./actions/watch-admin/command"));
|
|
35
|
+
const command_28 = __importDefault(require("./actions/plugin/build-command/command"));
|
|
36
|
+
const strapiCommands = {
|
|
37
|
+
createAdminUser: command_1.default,
|
|
38
|
+
resetAdminUserPassword: command_2.default,
|
|
39
|
+
buildCommand: command_3.default,
|
|
40
|
+
listComponents: command_4.default,
|
|
41
|
+
configurationDump: command_5.default,
|
|
42
|
+
configurationRestore: command_6.default,
|
|
43
|
+
consoleCommand: command_7.default,
|
|
44
|
+
listContentTypes: command_8.default,
|
|
45
|
+
listControllers: command_9.default,
|
|
46
|
+
developCommand: command_10.default,
|
|
47
|
+
generateCommand: command_11.default,
|
|
48
|
+
listHooks: command_12.default,
|
|
49
|
+
installCommand: command_13.default,
|
|
50
|
+
listMiddlewares: command_14.default,
|
|
51
|
+
newCommand: command_15.default,
|
|
52
|
+
listPolicies: command_16.default,
|
|
53
|
+
reportCommand: command_17.default,
|
|
54
|
+
listRoutes: command_18.default,
|
|
55
|
+
listServices: command_19.default,
|
|
56
|
+
startCommand: command_20.default,
|
|
57
|
+
disableTelemetry: command_21.default,
|
|
58
|
+
enableTelemetry: command_22.default,
|
|
59
|
+
generateTemplates: command_23.default,
|
|
60
|
+
generateTsTypes: command_24.default,
|
|
61
|
+
uninstallCommand: command_25.default,
|
|
62
|
+
versionCommand: command_26.default,
|
|
63
|
+
watchAdminCommand: command_27.default,
|
|
64
|
+
buildPluginCommand: command_28.default,
|
|
65
|
+
};
|
|
66
|
+
exports.strapiCommands = strapiCommands;
|
|
67
|
+
const buildStrapiCommand = (argv, command = new commander_1.Command()) => {
|
|
68
|
+
try {
|
|
69
|
+
// NOTE: this is a hack to allow loading dts commands without make dts a dependency of strapi and thus avoiding circular dependencies
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
71
|
+
const dtsCommands = require(require.resolve('@strapi/data-transfer')).commands;
|
|
72
|
+
Object.assign(strapiCommands, dtsCommands);
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
// noop
|
|
76
|
+
}
|
|
77
|
+
// Initial program setup
|
|
78
|
+
command.storeOptionsAsProperties(false).allowUnknownOption(true);
|
|
79
|
+
// Help command
|
|
80
|
+
command.helpOption('-h, --help', 'Display help for command');
|
|
81
|
+
command.addHelpCommand('help [command]', 'Display help for command');
|
|
82
|
+
const keys = Object.keys(strapiCommands);
|
|
83
|
+
// Load all commands
|
|
84
|
+
keys.forEach((name) => {
|
|
85
|
+
try {
|
|
86
|
+
// Add this command to the Commander command object
|
|
87
|
+
strapiCommands[name]({ command, argv });
|
|
88
|
+
}
|
|
89
|
+
catch (e) {
|
|
90
|
+
console.error(`Failed to load command ${name}`, e);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
return command;
|
|
94
|
+
};
|
|
95
|
+
exports.buildStrapiCommand = buildStrapiCommand;
|
|
96
|
+
const runStrapiCommand = async (argv = process.argv, command = new commander_1.Command()) => {
|
|
97
|
+
await buildStrapiCommand(argv, command).parseAsync(argv);
|
|
98
|
+
};
|
|
99
|
+
exports.runStrapiCommand = runStrapiCommand;
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAoC;AAEpC,kFAAkE;AAClE,0FAAiF;AACjF,8EAA2D,CAAC,2EAA2E;AACvI,gFAA+D;AAC/D,mFAAqE;AACrE,sFAA2E;AAC3E,wEAAuD;AACvD,mFAAoE;AACpE,iFAAiE;AACjE,yEAAuD;AACvD,0EAAyD;AACzD,4EAAqD;AACrD,yEAAuD;AACvD,kFAAiE;AACjE,qEAA+C;AAC/C,+EAA2D;AAC3D,wEAAqD;AACrD,6EAAuD;AACvD,+EAA2D;AAC3D,uEAAmD;AACnD,mFAAmE;AACnE,kFAAiE;AACjE,oFAAqE;AACrE,mFAAkE;AAClE,2EAA2D;AAC3D,yEAAuD;AACvD,6EAA8D;AAC9D,sFAAwE;AAExE,MAAM,cAAc,GAAG;IACrB,eAAe,EAAf,iBAAe;IACf,sBAAsB,EAAtB,iBAAsB;IACtB,YAAY,EAAZ,iBAAY;IACZ,cAAc,EAAd,iBAAc;IACd,iBAAiB,EAAjB,iBAAiB;IACjB,oBAAoB,EAApB,iBAAoB;IACpB,cAAc,EAAd,iBAAc;IACd,gBAAgB,EAAhB,iBAAgB;IAChB,eAAe,EAAf,iBAAe;IACf,cAAc,EAAd,kBAAc;IAC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ACnD,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;SACzC;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,0BAA0B,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;SACpD;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAMyB,gDAAkB;AAJ7C,MAAM,gBAAgB,GAAG,KAAK,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,mBAAO,EAAE,EAAE,EAAE;IAC9E,MAAM,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC,CAAC;AAEO,4CAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/commands/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file includes hooks to use for commander.hook and argParsers for commander.argParser
|
|
3
|
+
*/
|
|
4
|
+
import { Command, Option } from 'commander';
|
|
5
|
+
/**
|
|
6
|
+
* argParser: Parse a comma-delimited string as an array
|
|
7
|
+
*/
|
|
8
|
+
declare const parseList: (value: string) => string[];
|
|
9
|
+
/**
|
|
10
|
+
* Returns an argParser that returns a list
|
|
11
|
+
*/
|
|
12
|
+
declare const getParseListWithChoices: (choices: string[], errorMessage?: string) => (value: string) => string[];
|
|
13
|
+
/**
|
|
14
|
+
* argParser: Parse a string as an integer
|
|
15
|
+
*/
|
|
16
|
+
declare const parseInteger: (value: string) => number;
|
|
17
|
+
/**
|
|
18
|
+
* argParser: Parse a string as a URL object
|
|
19
|
+
*/
|
|
20
|
+
declare const parseURL: (value: string) => URL;
|
|
21
|
+
/**
|
|
22
|
+
* hook: if encrypt==true and key not provided, prompt for it
|
|
23
|
+
*/
|
|
24
|
+
declare const promptEncryptionKey: (thisCommand: Command) => Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* hook: require a confirmation message to be accepted unless forceOption (-f,--force) is used
|
|
27
|
+
*/
|
|
28
|
+
declare const getCommanderConfirmMessage: (message: string, { failMessage }?: {
|
|
29
|
+
failMessage?: string | undefined;
|
|
30
|
+
}) => (command: Command) => Promise<void>;
|
|
31
|
+
declare const confirmMessage: (message: string, { force }?: {
|
|
32
|
+
force?: boolean | undefined;
|
|
33
|
+
}) => Promise<any>;
|
|
34
|
+
declare const forceOption: Option;
|
|
35
|
+
export { getParseListWithChoices, parseList, parseURL, parseInteger, promptEncryptionKey, getCommanderConfirmMessage, confirmMessage, forceOption, };
|