@strapi/strapi 5.55.1 → 5.57.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.
Files changed (200) hide show
  1. package/admin-styles.css +5 -0
  2. package/dist/cli/commands/build.d.ts.map +1 -1
  3. package/dist/cli/commands/content-types/rename-field.d.ts +13 -0
  4. package/dist/cli/commands/content-types/rename-field.d.ts.map +1 -0
  5. package/dist/cli/commands/develop.d.ts.map +1 -1
  6. package/dist/cli/commands/enterprise/index.d.ts +7 -0
  7. package/dist/cli/commands/enterprise/index.d.ts.map +1 -0
  8. package/dist/cli/commands/enterprise/install/action.d.ts +36 -0
  9. package/dist/cli/commands/enterprise/install/action.d.ts.map +1 -0
  10. package/dist/cli/commands/enterprise/install/checklist-prompt.d.ts +14 -0
  11. package/dist/cli/commands/enterprise/install/checklist-prompt.d.ts.map +1 -0
  12. package/dist/cli/commands/enterprise/install/constants.d.ts +7 -0
  13. package/dist/cli/commands/enterprise/install/constants.d.ts.map +1 -0
  14. package/dist/cli/commands/enterprise/install/directories.d.ts +3 -0
  15. package/dist/cli/commands/enterprise/install/directories.d.ts.map +1 -0
  16. package/dist/cli/commands/enterprise/install/discovery.d.ts +29 -0
  17. package/dist/cli/commands/enterprise/install/discovery.d.ts.map +1 -0
  18. package/dist/cli/commands/enterprise/install/errors.d.ts +11 -0
  19. package/dist/cli/commands/enterprise/install/errors.d.ts.map +1 -0
  20. package/dist/cli/commands/enterprise/install/install-packages.d.ts +11 -0
  21. package/dist/cli/commands/enterprise/install/install-packages.d.ts.map +1 -0
  22. package/dist/cli/commands/enterprise/install/license.d.ts +27 -0
  23. package/dist/cli/commands/enterprise/install/license.d.ts.map +1 -0
  24. package/dist/cli/commands/enterprise/install/package-manager.d.ts +17 -0
  25. package/dist/cli/commands/enterprise/install/package-manager.d.ts.map +1 -0
  26. package/dist/cli/commands/enterprise/install/plugin-status.d.ts +44 -0
  27. package/dist/cli/commands/enterprise/install/plugin-status.d.ts.map +1 -0
  28. package/dist/cli/commands/enterprise/install/registry-access.d.ts +55 -0
  29. package/dist/cli/commands/enterprise/install/registry-access.d.ts.map +1 -0
  30. package/dist/cli/commands/enterprise/install/registry.d.ts +54 -0
  31. package/dist/cli/commands/enterprise/install/registry.d.ts.map +1 -0
  32. package/dist/cli/commands/enterprise/install/selection.d.ts +62 -0
  33. package/dist/cli/commands/enterprise/install/selection.d.ts.map +1 -0
  34. package/dist/cli/commands/enterprise/install/setup-links.d.ts +16 -0
  35. package/dist/cli/commands/enterprise/install/setup-links.d.ts.map +1 -0
  36. package/dist/cli/commands/enterprise/install/versions.d.ts +42 -0
  37. package/dist/cli/commands/enterprise/install/versions.d.ts.map +1 -0
  38. package/dist/cli/commands/index.d.ts.map +1 -1
  39. package/dist/cli/utils/commander.d.ts.map +1 -1
  40. package/dist/cli/utils/helpers.d.ts +1 -1
  41. package/dist/cli/utils/helpers.d.ts.map +1 -1
  42. package/dist/node/core/admin-vite-aliases.d.ts +9 -0
  43. package/dist/node/core/admin-vite-aliases.d.ts.map +1 -1
  44. package/dist/node/core/aliases.d.ts +4 -1
  45. package/dist/node/core/aliases.d.ts.map +1 -1
  46. package/dist/node/core/scan-roots.d.ts +20 -0
  47. package/dist/node/core/scan-roots.d.ts.map +1 -0
  48. package/dist/node/create-build-context.d.ts +10 -1
  49. package/dist/node/create-build-context.d.ts.map +1 -1
  50. package/dist/node/develop.d.ts.map +1 -1
  51. package/dist/node/staticFiles.d.ts +3 -1
  52. package/dist/node/staticFiles.d.ts.map +1 -1
  53. package/dist/node/vite/config.d.ts.map +1 -1
  54. package/dist/node/vite/plugins.d.ts +2 -1
  55. package/dist/node/vite/plugins.d.ts.map +1 -1
  56. package/dist/node/vite/plugins.test.d.ts +2 -0
  57. package/dist/node/vite/plugins.test.d.ts.map +1 -0
  58. package/dist/package.json.js +1 -1
  59. package/dist/package.json.mjs +1 -1
  60. package/dist/src/cli/commands/build.js +4 -2
  61. package/dist/src/cli/commands/build.js.map +1 -1
  62. package/dist/src/cli/commands/build.mjs +4 -2
  63. package/dist/src/cli/commands/build.mjs.map +1 -1
  64. package/dist/src/cli/commands/content-types/rename-field.js +63 -0
  65. package/dist/src/cli/commands/content-types/rename-field.js.map +1 -0
  66. package/dist/src/cli/commands/content-types/rename-field.mjs +54 -0
  67. package/dist/src/cli/commands/content-types/rename-field.mjs.map +1 -0
  68. package/dist/src/cli/commands/develop.js +4 -2
  69. package/dist/src/cli/commands/develop.js.map +1 -1
  70. package/dist/src/cli/commands/develop.mjs +4 -2
  71. package/dist/src/cli/commands/develop.mjs.map +1 -1
  72. package/dist/src/cli/commands/enterprise/index.js +17 -0
  73. package/dist/src/cli/commands/enterprise/index.js.map +1 -0
  74. package/dist/src/cli/commands/enterprise/index.mjs +15 -0
  75. package/dist/src/cli/commands/enterprise/index.mjs.map +1 -0
  76. package/dist/src/cli/commands/enterprise/install/action.js +253 -0
  77. package/dist/src/cli/commands/enterprise/install/action.js.map +1 -0
  78. package/dist/src/cli/commands/enterprise/install/action.mjs +244 -0
  79. package/dist/src/cli/commands/enterprise/install/action.mjs.map +1 -0
  80. package/dist/src/cli/commands/enterprise/install/checklist-prompt.js +117 -0
  81. package/dist/src/cli/commands/enterprise/install/checklist-prompt.js.map +1 -0
  82. package/dist/src/cli/commands/enterprise/install/checklist-prompt.mjs +110 -0
  83. package/dist/src/cli/commands/enterprise/install/checklist-prompt.mjs.map +1 -0
  84. package/dist/src/cli/commands/enterprise/install/constants.js +16 -0
  85. package/dist/src/cli/commands/enterprise/install/constants.js.map +1 -0
  86. package/dist/src/cli/commands/enterprise/install/constants.mjs +9 -0
  87. package/dist/src/cli/commands/enterprise/install/constants.mjs.map +1 -0
  88. package/dist/src/cli/commands/enterprise/install/directories.js +23 -0
  89. package/dist/src/cli/commands/enterprise/install/directories.js.map +1 -0
  90. package/dist/src/cli/commands/enterprise/install/directories.mjs +17 -0
  91. package/dist/src/cli/commands/enterprise/install/directories.mjs.map +1 -0
  92. package/dist/src/cli/commands/enterprise/install/discovery.js +109 -0
  93. package/dist/src/cli/commands/enterprise/install/discovery.js.map +1 -0
  94. package/dist/src/cli/commands/enterprise/install/discovery.mjs +104 -0
  95. package/dist/src/cli/commands/enterprise/install/discovery.mjs.map +1 -0
  96. package/dist/src/cli/commands/enterprise/install/errors.js +26 -0
  97. package/dist/src/cli/commands/enterprise/install/errors.js.map +1 -0
  98. package/dist/src/cli/commands/enterprise/install/errors.mjs +22 -0
  99. package/dist/src/cli/commands/enterprise/install/errors.mjs.map +1 -0
  100. package/dist/src/cli/commands/enterprise/install/install-packages.js +39 -0
  101. package/dist/src/cli/commands/enterprise/install/install-packages.js.map +1 -0
  102. package/dist/src/cli/commands/enterprise/install/install-packages.mjs +32 -0
  103. package/dist/src/cli/commands/enterprise/install/install-packages.mjs.map +1 -0
  104. package/dist/src/cli/commands/enterprise/install/license.js +144 -0
  105. package/dist/src/cli/commands/enterprise/install/license.js.map +1 -0
  106. package/dist/src/cli/commands/enterprise/install/license.mjs +132 -0
  107. package/dist/src/cli/commands/enterprise/install/license.mjs.map +1 -0
  108. package/dist/src/cli/commands/enterprise/install/package-manager.js +72 -0
  109. package/dist/src/cli/commands/enterprise/install/package-manager.js.map +1 -0
  110. package/dist/src/cli/commands/enterprise/install/package-manager.mjs +62 -0
  111. package/dist/src/cli/commands/enterprise/install/package-manager.mjs.map +1 -0
  112. package/dist/src/cli/commands/enterprise/install/plugin-status.js +47 -0
  113. package/dist/src/cli/commands/enterprise/install/plugin-status.js.map +1 -0
  114. package/dist/src/cli/commands/enterprise/install/plugin-status.mjs +45 -0
  115. package/dist/src/cli/commands/enterprise/install/plugin-status.mjs.map +1 -0
  116. package/dist/src/cli/commands/enterprise/install/registry-access.js +293 -0
  117. package/dist/src/cli/commands/enterprise/install/registry-access.js.map +1 -0
  118. package/dist/src/cli/commands/enterprise/install/registry-access.mjs +277 -0
  119. package/dist/src/cli/commands/enterprise/install/registry-access.mjs.map +1 -0
  120. package/dist/src/cli/commands/enterprise/install/registry.js +98 -0
  121. package/dist/src/cli/commands/enterprise/install/registry.js.map +1 -0
  122. package/dist/src/cli/commands/enterprise/install/registry.mjs +95 -0
  123. package/dist/src/cli/commands/enterprise/install/registry.mjs.map +1 -0
  124. package/dist/src/cli/commands/enterprise/install/selection.js +148 -0
  125. package/dist/src/cli/commands/enterprise/install/selection.js.map +1 -0
  126. package/dist/src/cli/commands/enterprise/install/selection.mjs +141 -0
  127. package/dist/src/cli/commands/enterprise/install/selection.mjs.map +1 -0
  128. package/dist/src/cli/commands/enterprise/install/setup-links.js +34 -0
  129. package/dist/src/cli/commands/enterprise/install/setup-links.js.map +1 -0
  130. package/dist/src/cli/commands/enterprise/install/setup-links.mjs +31 -0
  131. package/dist/src/cli/commands/enterprise/install/setup-links.mjs.map +1 -0
  132. package/dist/src/cli/commands/enterprise/install/versions.js +127 -0
  133. package/dist/src/cli/commands/enterprise/install/versions.js.map +1 -0
  134. package/dist/src/cli/commands/enterprise/install/versions.mjs +107 -0
  135. package/dist/src/cli/commands/enterprise/install/versions.mjs.map +1 -0
  136. package/dist/src/cli/commands/export/action.js +4 -4
  137. package/dist/src/cli/commands/export/action.js.map +1 -1
  138. package/dist/src/cli/commands/export/action.mjs +2 -2
  139. package/dist/src/cli/commands/export/action.mjs.map +1 -1
  140. package/dist/src/cli/commands/import/action.js +2 -2
  141. package/dist/src/cli/commands/import/action.js.map +1 -1
  142. package/dist/src/cli/commands/import/action.mjs +1 -1
  143. package/dist/src/cli/commands/import/action.mjs.map +1 -1
  144. package/dist/src/cli/commands/index.js +4 -0
  145. package/dist/src/cli/commands/index.js.map +1 -1
  146. package/dist/src/cli/commands/index.mjs +24 -20
  147. package/dist/src/cli/commands/index.mjs.map +1 -1
  148. package/dist/src/cli/commands/routes/list.js +2 -2
  149. package/dist/src/cli/commands/routes/list.js.map +1 -1
  150. package/dist/src/cli/commands/routes/list.mjs +1 -1
  151. package/dist/src/cli/commands/routes/list.mjs.map +1 -1
  152. package/dist/src/cli/commands/transfer/action.js +2 -2
  153. package/dist/src/cli/commands/transfer/action.js.map +1 -1
  154. package/dist/src/cli/commands/transfer/action.mjs +1 -1
  155. package/dist/src/cli/commands/transfer/action.mjs.map +1 -1
  156. package/dist/src/cli/utils/commander.js +1 -2
  157. package/dist/src/cli/utils/commander.js.map +1 -1
  158. package/dist/src/cli/utils/commander.mjs +1 -2
  159. package/dist/src/cli/utils/commander.mjs.map +1 -1
  160. package/dist/src/cli/utils/data-transfer.js +2 -2
  161. package/dist/src/cli/utils/data-transfer.js.map +1 -1
  162. package/dist/src/cli/utils/data-transfer.mjs +2 -2
  163. package/dist/src/cli/utils/data-transfer.mjs.map +1 -1
  164. package/dist/src/cli/utils/helpers.js +6 -6
  165. package/dist/src/cli/utils/helpers.js.map +1 -1
  166. package/dist/src/cli/utils/helpers.mjs +4 -4
  167. package/dist/src/cli/utils/helpers.mjs.map +1 -1
  168. package/dist/src/node/core/admin-vite-aliases.js +51 -0
  169. package/dist/src/node/core/admin-vite-aliases.js.map +1 -1
  170. package/dist/src/node/core/admin-vite-aliases.mjs +46 -1
  171. package/dist/src/node/core/admin-vite-aliases.mjs.map +1 -1
  172. package/dist/src/node/core/aliases.js +6 -0
  173. package/dist/src/node/core/aliases.js.map +1 -1
  174. package/dist/src/node/core/aliases.mjs +6 -1
  175. package/dist/src/node/core/aliases.mjs.map +1 -1
  176. package/dist/src/node/core/scan-roots.js +87 -0
  177. package/dist/src/node/core/scan-roots.js.map +1 -0
  178. package/dist/src/node/core/scan-roots.mjs +79 -0
  179. package/dist/src/node/core/scan-roots.mjs.map +1 -0
  180. package/dist/src/node/create-build-context.js +40 -1
  181. package/dist/src/node/create-build-context.js.map +1 -1
  182. package/dist/src/node/create-build-context.mjs +40 -1
  183. package/dist/src/node/create-build-context.mjs.map +1 -1
  184. package/dist/src/node/develop.js +2 -1
  185. package/dist/src/node/develop.js.map +1 -1
  186. package/dist/src/node/develop.mjs +2 -1
  187. package/dist/src/node/develop.mjs.map +1 -1
  188. package/dist/src/node/staticFiles.js +43 -0
  189. package/dist/src/node/staticFiles.js.map +1 -1
  190. package/dist/src/node/staticFiles.mjs +42 -1
  191. package/dist/src/node/staticFiles.mjs.map +1 -1
  192. package/dist/src/node/vite/config.js +12 -2
  193. package/dist/src/node/vite/config.js.map +1 -1
  194. package/dist/src/node/vite/config.mjs +8 -2
  195. package/dist/src/node/vite/config.mjs.map +1 -1
  196. package/dist/src/node/vite/plugins.js +27 -1
  197. package/dist/src/node/vite/plugins.js.map +1 -1
  198. package/dist/src/node/vite/plugins.mjs +23 -1
  199. package/dist/src/node/vite/plugins.mjs.map +1 -1
  200. package/package.json +31 -26
@@ -1 +1 @@
1
- {"version":3,"file":"admin-vite-aliases.d.ts","sourceRoot":"","sources":["../../../src/node/core/admin-vite-aliases.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,QAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CAIjE,CAAC;AAEL;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,QAAO,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAa5E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,QAAO,MAAM,EACL,CAAC"}
1
+ {"version":3,"file":"admin-vite-aliases.d.ts","sourceRoot":"","sources":["../../../src/node/core/admin-vite-aliases.ts"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,QAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CAMjE,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,KAAG,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAiC9E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,QAAO,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAa5E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,QAAO,MAAM,EACL,CAAC"}
@@ -1,8 +1,11 @@
1
1
  import { StrapiMonorepo } from './monorepo';
2
+ declare const getMonorepoEeAdminSource: ({ monorepo, }: {
3
+ monorepo?: StrapiMonorepo;
4
+ }) => string | undefined;
2
5
  declare const getMonorepoAliases: ({ monorepo }: {
3
6
  monorepo?: StrapiMonorepo;
4
7
  }) => {
5
8
  [k: string]: string;
6
9
  };
7
- export { getMonorepoAliases };
10
+ export { getMonorepoAliases, getMonorepoEeAdminSource };
8
11
  //# sourceMappingURL=aliases.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../../src/node/core/aliases.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA2B5C,QAAA,MAAM,kBAAkB,GAAI,cAAc;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAE;;CAUtE,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../../src/node/core/aliases.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAiC5C,QAAA,MAAM,wBAAwB,GAAI,eAE/B;IACD,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,KAAG,MAAM,GAAG,SAAmF,CAAC;AAEjG,QAAA,MAAM,kBAAkB,GAAI,cAAc;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAE;;CAUtE,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { BuildContext } from '../create-build-context';
2
+ /** The `@strapi/strapi` dependencies that `src/admin.ts` imports, so no plugin walk finds them */
3
+ declare const HOST_ADMIN_PACKAGES: string[];
4
+ type ScanContext = Pick<BuildContext, 'cwd' | 'runtimeDir' | 'plugins' | 'customisations'>;
5
+ /**
6
+ * The directories Tailwind scans for class names. Tailwind never looks in `node_modules`, so the
7
+ * stylesheet must name every directory that holds admin code.
8
+ *
9
+ * @param dev - true for the Vite development server, which serves `admin/src`. Tailwind must scan
10
+ * what Vite serves. Every other case scans `dist`
11
+ */
12
+ declare const getScanRoots: (ctx: ScanContext, dev: boolean) => Promise<string[]>;
13
+ /**
14
+ * Converts a system path to the glob form the `@source` lines need. A glob separator is a forward
15
+ * slash on every platform, Windows included
16
+ */
17
+ declare const toGlobPath: (value: string) => string;
18
+ export { getScanRoots, toGlobPath, HOST_ADMIN_PACKAGES };
19
+ export type { ScanContext };
20
+ //# sourceMappingURL=scan-roots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scan-roots.d.ts","sourceRoot":"","sources":["../../../src/node/core/scan-roots.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,kGAAkG;AAClG,QAAA,MAAM,mBAAmB,UASxB,CAAC;AAEF,KAAK,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,YAAY,GAAG,SAAS,GAAG,gBAAgB,CAAC,CAAC;AAE3F;;;;;;GAMG;AACH,QAAA,MAAM,YAAY,GAAU,KAAK,WAAW,EAAE,KAAK,OAAO,KAAG,OAAO,CAAC,MAAM,EAAE,CA8C5E,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG,MAAmC,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC;AACzD,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -28,12 +28,21 @@ interface BuildContext extends BaseContext {
28
28
  * incl. internal plugins, third party plugins & local plugins
29
29
  */
30
30
  plugins: PluginMeta[];
31
+ /**
32
+ * True when the `unstableNextDesignSystem` future flag is on and the bundler is Vite. The single
33
+ * decision point for the Tailwind plugin, the host stylesheet and the scan roots
34
+ */
35
+ nextDesignSystem: boolean;
36
+ /** The directories Tailwind scans. Computed once: the stylesheet, Vite and the watcher share it */
37
+ scanRoots: string[];
31
38
  }
32
39
  interface CreateBuildContextArgs extends CLIContext {
33
40
  strapi?: Core.Strapi;
34
41
  options?: BaseOptions;
42
+ /** If true, Tailwind scans source and not `dist`. E.g. for Vite development server, which serves `admin/src` */
43
+ dev?: boolean;
35
44
  }
36
- declare const createBuildContext: ({ cwd, logger, tsconfig, strapi, options, }: CreateBuildContextArgs) => Promise<BuildContext>;
45
+ declare const createBuildContext: ({ cwd, logger, tsconfig, strapi, options, dev, }: CreateBuildContextArgs) => Promise<BuildContext>;
37
46
  export { createBuildContext };
38
47
  export type { BuildContext, CreateBuildContextArgs };
39
48
  //# sourceMappingURL=create-build-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-build-context.d.ts","sourceRoot":"","sources":["../../src/node/create-build-context.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,UAAU,EAA+C,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,OAAO,EAAmB,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,UAAU,YAAa,SAAQ,WAAW;IACxC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACtD;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,UAAU,sBAAuB,SAAQ,UAAU;IACjD,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AASD,QAAA,MAAM,kBAAkB,GAAU,6CAM/B,sBAAsB,KAAG,OAAO,CAAC,YAAY,CAwH/C,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"create-build-context.d.ts","sourceRoot":"","sources":["../../src/node/create-build-context.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,UAAU,EAA+C,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,OAAO,EAAmB,MAAM,6BAA6B,CAAC;AAGvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,UAAU,YAAa,SAAQ,WAAW;IACxC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACtD;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB;;;OAGG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mGAAmG;IACnG,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,UAAU,sBAAuB,SAAQ,UAAU;IACjD,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,gHAAgH;IAChH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAkCD,QAAA,MAAM,kBAAkB,GAAU,kDAO/B,sBAAsB,KAAG,OAAO,CAAC,YAAY,CAgJ/C,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"develop.d.ts","sourceRoot":"","sources":["../../src/node/develop.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAyB/C,UAAU,cAAe,SAAQ,UAAU;IACzC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA4CD,QAAA,MAAM,OAAO,GAAU,qFASpB,cAAc,kBAkOhB,CAAC;AAwFF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"develop.d.ts","sourceRoot":"","sources":["../../src/node/develop.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAyB/C,UAAU,cAAe,SAAQ,UAAU;IACzC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA4CD,QAAA,MAAM,OAAO,GAAU,qFASpB,cAAc,kBAmOhB,CAAC;AAwFF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import type { BuildContext } from './create-build-context';
2
+ declare const getStylesheet: (ctx: BuildContext) => string;
3
+ declare const getEntryModule: (ctx: BuildContext) => string;
2
4
  interface GetDocumentHTMLArgs extends Pick<BuildContext, 'logger'> {
3
5
  props?: {
4
6
  entryPath?: string;
@@ -10,5 +12,5 @@ interface GetDocumentHTMLArgs extends Pick<BuildContext, 'logger'> {
10
12
  */
11
13
  declare const getDocumentHTML: ({ logger, props }: GetDocumentHTMLArgs) => string;
12
14
  declare const writeStaticClientFiles: (ctx: BuildContext) => Promise<void>;
13
- export { writeStaticClientFiles, getDocumentHTML };
15
+ export { writeStaticClientFiles, getDocumentHTML, getStylesheet, getEntryModule };
14
16
  //# sourceMappingURL=staticFiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"staticFiles.d.ts","sourceRoot":"","sources":["../../src/node/staticFiles.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAqC3D,UAAU,mBAAoB,SAAQ,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC;IAChE,KAAK,CAAC,EAAE;QACN,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;;GAGG;AACH,QAAA,MAAM,eAAe,GAAI,mBAAwB,mBAAmB,WAKnE,CAAC;AAgBF,QAAA,MAAM,sBAAsB,GAAU,KAAK,YAAY,kBAuCtD,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"staticFiles.d.ts","sourceRoot":"","sources":["../../src/node/staticFiles.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAwC3D,QAAA,MAAM,aAAa,GAAI,KAAK,YAAY,KAAG,MAQtC,CAAC;AAEN,QAAA,MAAM,cAAc,GAAI,KAAK,YAAY,KAAG,MAkC3C,CAAC;AAEF,UAAU,mBAAoB,SAAQ,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC;IAChE,KAAK,CAAC,EAAE;QACN,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;;GAGG;AACH,QAAA,MAAM,eAAe,GAAI,mBAAwB,mBAAmB,WAKnE,CAAC;AAgBF,QAAA,MAAM,sBAAsB,GAAU,KAAK,YAAY,kBA4CtD,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/vite/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAYrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAwJ5D,QAAA,MAAM,uBAAuB,GAAU,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAuB9E,CAAC;AAEF,QAAA,MAAM,wBAAwB,GAAU,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAmC/E,CAAC;AAMF,QAAA,MAAM,yBAAyB,GAAU,QAAQ,YAAY,EAAE,KAAK,YAAY,wBAQ/E,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/vite/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAYrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA6J5D,QAAA,MAAM,uBAAuB,GAAU,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAuB9E,CAAC;AAEF,QAAA,MAAM,wBAAwB,GAAU,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAmC/E,CAAC;AAMF,QAAA,MAAM,yBAAyB,GAAU,QAAQ,YAAY,EAAE,KAAK,YAAY,wBAQ/E,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { Plugin } from 'vite';
2
2
  import type { BuildContext } from '../create-build-context';
3
- declare const buildFilesPlugin: (ctx: BuildContext) => Plugin;
3
+ type BuildFilesContext = Pick<BuildContext, 'cwd' | 'runtimeDir' | 'basePath' | 'logger' | 'nextDesignSystem'>;
4
+ declare const buildFilesPlugin: (ctx: BuildFilesContext) => Plugin;
4
5
  export { buildFilesPlugin };
5
6
  //# sourceMappingURL=plugins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/node/vite/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,QAAA,MAAM,gBAAgB,GAAI,KAAK,YAAY,KAAG,MA2C7C,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/node/vite/plugins.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,KAAK,iBAAiB,GAAG,IAAI,CAC3B,YAAY,EACZ,KAAK,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,kBAAkB,CAClE,CAAC;AA4EF,QAAA,MAAM,gBAAgB,GAAI,KAAK,iBAAiB,KAAG,MACwB,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plugins.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.test.d.ts","sourceRoot":"","sources":["../../../src/node/vite/plugins.test.ts"],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "5.55.1";
3
+ var version = "5.57.0";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.js.map
@@ -1,4 +1,4 @@
1
- var version = "5.55.1";
1
+ var version = "5.57.0";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=package.json.mjs.map
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var commander = require('commander');
4
- var build = require('../../node/build.js');
5
4
  var errors = require('../../node/core/errors.js');
6
5
 
7
6
  const action = async (options)=>{
@@ -9,7 +8,10 @@ const action = async (options)=>{
9
8
  if (options.bundler === 'webpack') {
10
9
  options.logger.warn('[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.');
11
10
  }
12
- await build.build(options);
11
+ // Loaded lazily: every command is registered on CLI startup, so a static import would make
12
+ // `strapi start` load the whole admin build toolchain (including admin source via staticFiles).
13
+ const { build: nodeBuild } = await Promise.resolve().then(function () { return require('../../node/build.js'); });
14
+ await nodeBuild(options);
13
15
  } catch (err) {
14
16
  errors.handleUnexpectedError(err);
15
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sources":["../../../../src/cli/commands/build.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport type { StrapiCommand } from '../types';\n\nimport { build as nodeBuild, BuildOptions } from '../../node/build';\nimport { handleUnexpectedError } from '../../node/core/errors';\n\ntype BuildCLIOptions = BuildOptions;\n\nconst action = async (options: BuildCLIOptions) => {\n try {\n if (options.bundler === 'webpack') {\n options.logger.warn(\n '[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.'\n );\n }\n\n await nodeBuild(options);\n } catch (err) {\n handleUnexpectedError(err);\n }\n};\n\n/**\n * `$ strapi build`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n return createCommand('build')\n .option('--bundler [bundler]', 'Bundler to use (webpack or vite)', 'vite')\n .option('-d, --debug', 'Enable debugging mode with verbose logs', false)\n .option('--minify', 'Minify the output', true)\n .option('--silent', \"Don't log anything\", false)\n .option('--sourcemap', 'Produce sourcemaps', false)\n .option('--stats', 'Print build statistics to the console', false)\n .option('--install-deps', 'Auto-install missing admin dependencies', false)\n .description('Build the strapi admin app')\n .action(async (options: BuildCLIOptions) => {\n return action({ ...options, ...ctx });\n });\n};\n\nexport { command };\n"],"names":["action","options","bundler","logger","warn","nodeBuild","err","handleUnexpectedError","command","ctx","createCommand","option","description"],"mappings":";;;;;;AAQA,MAAMA,SAAS,OAAOC,OAAAA,GAAAA;IACpB,IAAI;QACF,IAAIA,OAAAA,CAAQC,OAAO,KAAK,SAAA,EAAW;YACjCD,OAAAA,CAAQE,MAAM,CAACC,IAAI,CACjB,yFAAA,CAAA;AAEJ,QAAA;AAEA,QAAA,MAAMC,WAAAA,CAAUJ,OAAAA,CAAAA;AAClB,IAAA,CAAA,CAAE,OAAOK,GAAAA,EAAK;QACZC,4BAAAA,CAAsBD,GAAAA,CAAAA;AACxB,IAAA;AACF,CAAA;AAEA;;AAEC,IACD,MAAME,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,OAAOC,wBAAc,OAAA,CAAA,CAClBC,MAAM,CAAC,qBAAA,EAAuB,kCAAA,EAAoC,QAClEA,MAAM,CAAC,eAAe,yCAAA,EAA2C,KAAA,CAAA,CACjEA,MAAM,CAAC,UAAA,EAAY,qBAAqB,IAAA,CAAA,CACxCA,MAAM,CAAC,UAAA,EAAY,oBAAA,EAAsB,KAAA,CAAA,CACzCA,MAAM,CAAC,aAAA,EAAe,oBAAA,EAAsB,OAC5CA,MAAM,CAAC,WAAW,uCAAA,EAAyC,KAAA,CAAA,CAC3DA,MAAM,CAAC,gBAAA,EAAkB,2CAA2C,KAAA,CAAA,CACpEC,WAAW,CAAC,4BAAA,CAAA,CACZZ,MAAM,CAAC,OAAOC,OAAAA,GAAAA;AACb,QAAA,OAAOD,MAAAA,CAAO;AAAE,YAAA,GAAGC,OAAO;AAAE,YAAA,GAAGQ;AAAI,SAAA,CAAA;AACrC,IAAA,CAAA,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"build.js","sources":["../../../../src/cli/commands/build.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport type { StrapiCommand } from '../types';\n\nimport type { BuildOptions } from '../../node/build';\nimport { handleUnexpectedError } from '../../node/core/errors';\n\ntype BuildCLIOptions = BuildOptions;\n\nconst action = async (options: BuildCLIOptions) => {\n try {\n if (options.bundler === 'webpack') {\n options.logger.warn(\n '[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.'\n );\n }\n\n // Loaded lazily: every command is registered on CLI startup, so a static import would make\n // `strapi start` load the whole admin build toolchain (including admin source via staticFiles).\n const { build: nodeBuild } = await import('../../node/build');\n await nodeBuild(options);\n } catch (err) {\n handleUnexpectedError(err);\n }\n};\n\n/**\n * `$ strapi build`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n return createCommand('build')\n .option('--bundler [bundler]', 'Bundler to use (webpack or vite)', 'vite')\n .option('-d, --debug', 'Enable debugging mode with verbose logs', false)\n .option('--minify', 'Minify the output', true)\n .option('--silent', \"Don't log anything\", false)\n .option('--sourcemap', 'Produce sourcemaps', false)\n .option('--stats', 'Print build statistics to the console', false)\n .option('--install-deps', 'Auto-install missing admin dependencies', false)\n .description('Build the strapi admin app')\n .action(async (options: BuildCLIOptions) => {\n return action({ ...options, ...ctx });\n });\n};\n\nexport { command };\n"],"names":["action","options","bundler","logger","warn","build","nodeBuild","err","handleUnexpectedError","command","ctx","createCommand","option","description"],"mappings":";;;;;AAQA,MAAMA,SAAS,OAAOC,OAAAA,GAAAA;IACpB,IAAI;QACF,IAAIA,OAAAA,CAAQC,OAAO,KAAK,SAAA,EAAW;YACjCD,OAAAA,CAAQE,MAAM,CAACC,IAAI,CACjB,yFAAA,CAAA;AAEJ,QAAA;;;AAIA,QAAA,MAAM,EAAEC,KAAAA,EAAOC,SAAS,EAAE,GAAG,MAAM,oDAAO,qBAAA,KAAA;AAC1C,QAAA,MAAMA,SAAAA,CAAUL,OAAAA,CAAAA;AAClB,IAAA,CAAA,CAAE,OAAOM,GAAAA,EAAK;QACZC,4BAAAA,CAAsBD,GAAAA,CAAAA;AACxB,IAAA;AACF,CAAA;AAEA;;AAEC,IACD,MAAME,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,OAAOC,wBAAc,OAAA,CAAA,CAClBC,MAAM,CAAC,qBAAA,EAAuB,kCAAA,EAAoC,QAClEA,MAAM,CAAC,eAAe,yCAAA,EAA2C,KAAA,CAAA,CACjEA,MAAM,CAAC,UAAA,EAAY,qBAAqB,IAAA,CAAA,CACxCA,MAAM,CAAC,UAAA,EAAY,oBAAA,EAAsB,KAAA,CAAA,CACzCA,MAAM,CAAC,aAAA,EAAe,oBAAA,EAAsB,OAC5CA,MAAM,CAAC,WAAW,uCAAA,EAAyC,KAAA,CAAA,CAC3DA,MAAM,CAAC,gBAAA,EAAkB,2CAA2C,KAAA,CAAA,CACpEC,WAAW,CAAC,4BAAA,CAAA,CACZb,MAAM,CAAC,OAAOC,OAAAA,GAAAA;AACb,QAAA,OAAOD,MAAAA,CAAO;AAAE,YAAA,GAAGC,OAAO;AAAE,YAAA,GAAGS;AAAI,SAAA,CAAA;AACrC,IAAA,CAAA,CAAA;AACJ;;;;"}
@@ -1,5 +1,4 @@
1
1
  import { createCommand } from 'commander';
2
- import { build } from '../../node/build.mjs';
3
2
  import { handleUnexpectedError } from '../../node/core/errors.mjs';
4
3
 
5
4
  const action = async (options)=>{
@@ -7,7 +6,10 @@ const action = async (options)=>{
7
6
  if (options.bundler === 'webpack') {
8
7
  options.logger.warn('[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.');
9
8
  }
10
- await build(options);
9
+ // Loaded lazily: every command is registered on CLI startup, so a static import would make
10
+ // `strapi start` load the whole admin build toolchain (including admin source via staticFiles).
11
+ const { build: nodeBuild } = await import('../../node/build.mjs');
12
+ await nodeBuild(options);
11
13
  } catch (err) {
12
14
  handleUnexpectedError(err);
13
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"build.mjs","sources":["../../../../src/cli/commands/build.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport type { StrapiCommand } from '../types';\n\nimport { build as nodeBuild, BuildOptions } from '../../node/build';\nimport { handleUnexpectedError } from '../../node/core/errors';\n\ntype BuildCLIOptions = BuildOptions;\n\nconst action = async (options: BuildCLIOptions) => {\n try {\n if (options.bundler === 'webpack') {\n options.logger.warn(\n '[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.'\n );\n }\n\n await nodeBuild(options);\n } catch (err) {\n handleUnexpectedError(err);\n }\n};\n\n/**\n * `$ strapi build`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n return createCommand('build')\n .option('--bundler [bundler]', 'Bundler to use (webpack or vite)', 'vite')\n .option('-d, --debug', 'Enable debugging mode with verbose logs', false)\n .option('--minify', 'Minify the output', true)\n .option('--silent', \"Don't log anything\", false)\n .option('--sourcemap', 'Produce sourcemaps', false)\n .option('--stats', 'Print build statistics to the console', false)\n .option('--install-deps', 'Auto-install missing admin dependencies', false)\n .description('Build the strapi admin app')\n .action(async (options: BuildCLIOptions) => {\n return action({ ...options, ...ctx });\n });\n};\n\nexport { command };\n"],"names":["action","options","bundler","logger","warn","nodeBuild","err","handleUnexpectedError","command","ctx","createCommand","option","description"],"mappings":";;;;AAQA,MAAMA,SAAS,OAAOC,OAAAA,GAAAA;IACpB,IAAI;QACF,IAAIA,OAAAA,CAAQC,OAAO,KAAK,SAAA,EAAW;YACjCD,OAAAA,CAAQE,MAAM,CAACC,IAAI,CACjB,yFAAA,CAAA;AAEJ,QAAA;AAEA,QAAA,MAAMC,KAAAA,CAAUJ,OAAAA,CAAAA;AAClB,IAAA,CAAA,CAAE,OAAOK,GAAAA,EAAK;QACZC,qBAAAA,CAAsBD,GAAAA,CAAAA;AACxB,IAAA;AACF,CAAA;AAEA;;AAEC,IACD,MAAME,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,OAAOC,cAAc,OAAA,CAAA,CAClBC,MAAM,CAAC,qBAAA,EAAuB,kCAAA,EAAoC,QAClEA,MAAM,CAAC,eAAe,yCAAA,EAA2C,KAAA,CAAA,CACjEA,MAAM,CAAC,UAAA,EAAY,qBAAqB,IAAA,CAAA,CACxCA,MAAM,CAAC,UAAA,EAAY,oBAAA,EAAsB,KAAA,CAAA,CACzCA,MAAM,CAAC,aAAA,EAAe,oBAAA,EAAsB,OAC5CA,MAAM,CAAC,WAAW,uCAAA,EAAyC,KAAA,CAAA,CAC3DA,MAAM,CAAC,gBAAA,EAAkB,2CAA2C,KAAA,CAAA,CACpEC,WAAW,CAAC,4BAAA,CAAA,CACZZ,MAAM,CAAC,OAAOC,OAAAA,GAAAA;AACb,QAAA,OAAOD,MAAAA,CAAO;AAAE,YAAA,GAAGC,OAAO;AAAE,YAAA,GAAGQ;AAAI,SAAA,CAAA;AACrC,IAAA,CAAA,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"build.mjs","sources":["../../../../src/cli/commands/build.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport type { StrapiCommand } from '../types';\n\nimport type { BuildOptions } from '../../node/build';\nimport { handleUnexpectedError } from '../../node/core/errors';\n\ntype BuildCLIOptions = BuildOptions;\n\nconst action = async (options: BuildCLIOptions) => {\n try {\n if (options.bundler === 'webpack') {\n options.logger.warn(\n '[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.'\n );\n }\n\n // Loaded lazily: every command is registered on CLI startup, so a static import would make\n // `strapi start` load the whole admin build toolchain (including admin source via staticFiles).\n const { build: nodeBuild } = await import('../../node/build');\n await nodeBuild(options);\n } catch (err) {\n handleUnexpectedError(err);\n }\n};\n\n/**\n * `$ strapi build`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n return createCommand('build')\n .option('--bundler [bundler]', 'Bundler to use (webpack or vite)', 'vite')\n .option('-d, --debug', 'Enable debugging mode with verbose logs', false)\n .option('--minify', 'Minify the output', true)\n .option('--silent', \"Don't log anything\", false)\n .option('--sourcemap', 'Produce sourcemaps', false)\n .option('--stats', 'Print build statistics to the console', false)\n .option('--install-deps', 'Auto-install missing admin dependencies', false)\n .description('Build the strapi admin app')\n .action(async (options: BuildCLIOptions) => {\n return action({ ...options, ...ctx });\n });\n};\n\nexport { command };\n"],"names":["action","options","bundler","logger","warn","build","nodeBuild","err","handleUnexpectedError","command","ctx","createCommand","option","description"],"mappings":";;;AAQA,MAAMA,SAAS,OAAOC,OAAAA,GAAAA;IACpB,IAAI;QACF,IAAIA,OAAAA,CAAQC,OAAO,KAAK,SAAA,EAAW;YACjCD,OAAAA,CAAQE,MAAM,CAACC,IAAI,CACjB,yFAAA,CAAA;AAEJ,QAAA;;;AAIA,QAAA,MAAM,EAAEC,KAAAA,EAAOC,SAAS,EAAE,GAAG,MAAM,OAAO,sBAAA,CAAA;AAC1C,QAAA,MAAMA,SAAAA,CAAUL,OAAAA,CAAAA;AAClB,IAAA,CAAA,CAAE,OAAOM,GAAAA,EAAK;QACZC,qBAAAA,CAAsBD,GAAAA,CAAAA;AACxB,IAAA;AACF,CAAA;AAEA;;AAEC,IACD,MAAME,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,OAAOC,cAAc,OAAA,CAAA,CAClBC,MAAM,CAAC,qBAAA,EAAuB,kCAAA,EAAoC,QAClEA,MAAM,CAAC,eAAe,yCAAA,EAA2C,KAAA,CAAA,CACjEA,MAAM,CAAC,UAAA,EAAY,qBAAqB,IAAA,CAAA,CACxCA,MAAM,CAAC,UAAA,EAAY,oBAAA,EAAsB,KAAA,CAAA,CACzCA,MAAM,CAAC,aAAA,EAAe,oBAAA,EAAsB,OAC5CA,MAAM,CAAC,WAAW,uCAAA,EAAyC,KAAA,CAAA,CAC3DA,MAAM,CAAC,gBAAA,EAAkB,2CAA2C,KAAA,CAAA,CACpEC,WAAW,CAAC,4BAAA,CAAA,CACZb,MAAM,CAAC,OAAOC,OAAAA,GAAAA;AACb,QAAA,OAAOD,MAAAA,CAAO;AAAE,YAAA,GAAGC,OAAO;AAAE,YAAA,GAAGS;AAAI,SAAA,CAAA;AACrC,IAAA,CAAA,CAAA;AACJ;;;;"}
@@ -0,0 +1,63 @@
1
+ 'use strict';
2
+
3
+ var path = require('node:path');
4
+ var commander = require('commander');
5
+ var chalk = require('chalk');
6
+ var fse = require('fs-extra');
7
+ var core = require('@strapi/core');
8
+ var helpers = require('../../utils/helpers.js');
9
+
10
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
+
12
+ var path__default = /*#__PURE__*/_interopDefault(path);
13
+ var chalk__default = /*#__PURE__*/_interopDefault(chalk);
14
+ var fse__default = /*#__PURE__*/_interopDefault(fse);
15
+
16
+ const listMigrationFiles = async (dir)=>{
17
+ try {
18
+ return new Set(await fse__default.default.readdir(dir));
19
+ } catch {
20
+ // The directory may not exist yet (no migrations generated before).
21
+ return new Set();
22
+ }
23
+ };
24
+ /**
25
+ * Renames an attribute on a content-type or component and generates the
26
+ * data-preserving migration in a single step, reusing the same rename resolver
27
+ * the Content-Type Builder admin uses.
28
+ */ const action = async (uid, oldName, newName)=>{
29
+ const appContext = await core.compileStrapi();
30
+ const app = await core.createStrapi(appContext).load();
31
+ try {
32
+ // The Content-Type Builder always writes to the app's *source* migrations
33
+ // dir (the database-configured dir points at build output when
34
+ // `useTypescriptMigrations` is enabled).
35
+ const migrationsDir = path__default.default.join(app.dirs.app.root, 'database', 'migrations');
36
+ const before = await listMigrationFiles(migrationsDir);
37
+ await app.plugin('content-type-builder').service('schema').renameAttribute(uid, oldName, newName);
38
+ const after = await listMigrationFiles(migrationsDir);
39
+ const created = [
40
+ ...after
41
+ ].filter((file)=>!before.has(file));
42
+ // The service refuses renames it cannot migrate before touching the schema,
43
+ // so a rename without a migration file means something went wrong.
44
+ if (created.length === 0) {
45
+ throw new Error(`Renamed "${oldName}" to "${newName}" on ${uid}, but no rename migration was written to ${migrationsDir}. Check the schema file before restarting.`);
46
+ }
47
+ console.log(chalk__default.default.green(`Renamed "${oldName}" to "${newName}" on ${uid}.`));
48
+ created.forEach((file)=>{
49
+ console.log(`Generated migration ${path__default.default.join(migrationsDir, file)}`);
50
+ });
51
+ } finally{
52
+ await app.destroy();
53
+ }
54
+ };
55
+ /**
56
+ * `$ strapi rename:field <uid> <oldName> <newName>`
57
+ */ const command = ()=>{
58
+ return commander.createCommand('rename:field').arguments('<uid> <oldName> <newName>').description('Rename a content-type or component attribute and generate a data-preserving migration').action(helpers.runAction('rename:field', action));
59
+ };
60
+
61
+ exports.action = action;
62
+ exports.command = command;
63
+ //# sourceMappingURL=rename-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rename-field.js","sources":["../../../../../src/cli/commands/content-types/rename-field.ts"],"sourcesContent":["import path from 'node:path';\nimport { createCommand } from 'commander';\nimport chalk from 'chalk';\nimport fse from 'fs-extra';\n\nimport { createStrapi, compileStrapi } from '@strapi/core';\n\nimport type { StrapiCommand } from '../../types';\nimport { runAction } from '../../utils/helpers';\n\nconst listMigrationFiles = async (dir: string): Promise<Set<string>> => {\n try {\n return new Set(await fse.readdir(dir));\n } catch {\n // The directory may not exist yet (no migrations generated before).\n return new Set();\n }\n};\n\n/**\n * Renames an attribute on a content-type or component and generates the\n * data-preserving migration in a single step, reusing the same rename resolver\n * the Content-Type Builder admin uses.\n */\nconst action = async (uid: string, oldName: string, newName: string) => {\n const appContext = await compileStrapi();\n const app = await createStrapi(appContext).load();\n\n try {\n // The Content-Type Builder always writes to the app's *source* migrations\n // dir (the database-configured dir points at build output when\n // `useTypescriptMigrations` is enabled).\n const migrationsDir = path.join(app.dirs.app.root, 'database', 'migrations');\n\n const before = await listMigrationFiles(migrationsDir);\n\n await app\n .plugin('content-type-builder')\n .service('schema')\n .renameAttribute(uid, oldName, newName);\n\n const after = await listMigrationFiles(migrationsDir);\n const created = [...after].filter((file) => !before.has(file));\n\n // The service refuses renames it cannot migrate before touching the schema,\n // so a rename without a migration file means something went wrong.\n if (created.length === 0) {\n throw new Error(\n `Renamed \"${oldName}\" to \"${newName}\" on ${uid}, but no rename migration was written to ${migrationsDir}. Check the schema file before restarting.`\n );\n }\n\n console.log(chalk.green(`Renamed \"${oldName}\" to \"${newName}\" on ${uid}.`));\n\n created.forEach((file) => {\n console.log(`Generated migration ${path.join(migrationsDir, file)}`);\n });\n } finally {\n await app.destroy();\n }\n};\n\n/**\n * `$ strapi rename:field <uid> <oldName> <newName>`\n */\nconst command: StrapiCommand = () => {\n return createCommand('rename:field')\n .arguments('<uid> <oldName> <newName>')\n .description(\n 'Rename a content-type or component attribute and generate a data-preserving migration'\n )\n .action(runAction('rename:field', action));\n};\n\nexport { action, command };\n"],"names":["listMigrationFiles","dir","Set","fse","readdir","action","uid","oldName","newName","appContext","compileStrapi","app","createStrapi","load","migrationsDir","path","join","dirs","root","before","plugin","service","renameAttribute","after","created","filter","file","has","length","Error","console","log","chalk","green","forEach","destroy","command","createCommand","arguments","description","runAction"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAMA,qBAAqB,OAAOC,GAAAA,GAAAA;IAChC,IAAI;AACF,QAAA,OAAO,IAAIC,GAAAA,CAAI,MAAMC,oBAAAA,CAAIC,OAAO,CAACH,GAAAA,CAAAA,CAAAA;AACnC,IAAA,CAAA,CAAE,OAAM;;AAEN,QAAA,OAAO,IAAIC,GAAAA,EAAAA;AACb,IAAA;AACF,CAAA;AAEA;;;;AAIC,IACD,MAAMG,MAAAA,GAAS,OAAOC,GAAAA,EAAaC,OAAAA,EAAiBC,OAAAA,GAAAA;AAClD,IAAA,MAAMC,aAAa,MAAMC,kBAAAA,EAAAA;AACzB,IAAA,MAAMC,GAAAA,GAAM,MAAMC,iBAAAA,CAAaH,UAAAA,CAAAA,CAAYI,IAAI,EAAA;IAE/C,IAAI;;;;QAIF,MAAMC,aAAAA,GAAgBC,qBAAAA,CAAKC,IAAI,CAACL,GAAAA,CAAIM,IAAI,CAACN,GAAG,CAACO,IAAI,EAAE,UAAA,EAAY,YAAA,CAAA;QAE/D,MAAMC,MAAAA,GAAS,MAAMnB,kBAAAA,CAAmBc,aAAAA,CAAAA;QAExC,MAAMH,GAAAA,CACHS,MAAM,CAAC,sBAAA,CAAA,CACPC,OAAO,CAAC,QAAA,CAAA,CACRC,eAAe,CAAChB,GAAAA,EAAKC,OAAAA,EAASC,OAAAA,CAAAA;QAEjC,MAAMe,KAAAA,GAAQ,MAAMvB,kBAAAA,CAAmBc,aAAAA,CAAAA;AACvC,QAAA,MAAMU,OAAAA,GAAU;AAAID,YAAAA,GAAAA;AAAM,SAAA,CAACE,MAAM,CAAC,CAACC,OAAS,CAACP,MAAAA,CAAOQ,GAAG,CAACD,IAAAA,CAAAA,CAAAA;;;QAIxD,IAAIF,OAAAA,CAAQI,MAAM,KAAK,CAAA,EAAG;AACxB,YAAA,MAAM,IAAIC,KAAAA,CACR,CAAC,SAAS,EAAEtB,QAAQ,MAAM,EAAEC,OAAAA,CAAQ,KAAK,EAAEF,GAAAA,CAAI,yCAAyC,EAAEQ,aAAAA,CAAc,0CAA0C,CAAC,CAAA;AAEvJ,QAAA;AAEAgB,QAAAA,OAAAA,CAAQC,GAAG,CAACC,sBAAAA,CAAMC,KAAK,CAAC,CAAC,SAAS,EAAE1B,OAAAA,CAAQ,MAAM,EAAEC,OAAAA,CAAQ,KAAK,EAAEF,GAAAA,CAAI,CAAC,CAAC,CAAA,CAAA;QAEzEkB,OAAAA,CAAQU,OAAO,CAAC,CAACR,IAAAA,GAAAA;YACfI,OAAAA,CAAQC,GAAG,CAAC,CAAC,oBAAoB,EAAEhB,qBAAAA,CAAKC,IAAI,CAACF,aAAAA,EAAeY,IAAAA,CAAAA,CAAAA,CAAO,CAAA;AACrE,QAAA,CAAA,CAAA;IACF,CAAA,QAAU;AACR,QAAA,MAAMf,IAAIwB,OAAO,EAAA;AACnB,IAAA;AACF;AAEA;;AAEC,UACKC,OAAAA,GAAyB,IAAA;IAC7B,OAAOC,uBAAAA,CAAc,cAAA,CAAA,CAClBC,SAAS,CAAC,2BAAA,CAAA,CACVC,WAAW,CACV,uFAAA,CAAA,CAEDlC,MAAM,CAACmC,iBAAAA,CAAU,cAAA,EAAgBnC,MAAAA,CAAAA,CAAAA;AACtC;;;;;"}
@@ -0,0 +1,54 @@
1
+ import path from 'node:path';
2
+ import { createCommand } from 'commander';
3
+ import chalk from 'chalk';
4
+ import fse from 'fs-extra';
5
+ import { compileStrapi, createStrapi } from '@strapi/core';
6
+ import { runAction } from '../../utils/helpers.mjs';
7
+
8
+ const listMigrationFiles = async (dir)=>{
9
+ try {
10
+ return new Set(await fse.readdir(dir));
11
+ } catch {
12
+ // The directory may not exist yet (no migrations generated before).
13
+ return new Set();
14
+ }
15
+ };
16
+ /**
17
+ * Renames an attribute on a content-type or component and generates the
18
+ * data-preserving migration in a single step, reusing the same rename resolver
19
+ * the Content-Type Builder admin uses.
20
+ */ const action = async (uid, oldName, newName)=>{
21
+ const appContext = await compileStrapi();
22
+ const app = await createStrapi(appContext).load();
23
+ try {
24
+ // The Content-Type Builder always writes to the app's *source* migrations
25
+ // dir (the database-configured dir points at build output when
26
+ // `useTypescriptMigrations` is enabled).
27
+ const migrationsDir = path.join(app.dirs.app.root, 'database', 'migrations');
28
+ const before = await listMigrationFiles(migrationsDir);
29
+ await app.plugin('content-type-builder').service('schema').renameAttribute(uid, oldName, newName);
30
+ const after = await listMigrationFiles(migrationsDir);
31
+ const created = [
32
+ ...after
33
+ ].filter((file)=>!before.has(file));
34
+ // The service refuses renames it cannot migrate before touching the schema,
35
+ // so a rename without a migration file means something went wrong.
36
+ if (created.length === 0) {
37
+ throw new Error(`Renamed "${oldName}" to "${newName}" on ${uid}, but no rename migration was written to ${migrationsDir}. Check the schema file before restarting.`);
38
+ }
39
+ console.log(chalk.green(`Renamed "${oldName}" to "${newName}" on ${uid}.`));
40
+ created.forEach((file)=>{
41
+ console.log(`Generated migration ${path.join(migrationsDir, file)}`);
42
+ });
43
+ } finally{
44
+ await app.destroy();
45
+ }
46
+ };
47
+ /**
48
+ * `$ strapi rename:field <uid> <oldName> <newName>`
49
+ */ const command = ()=>{
50
+ return createCommand('rename:field').arguments('<uid> <oldName> <newName>').description('Rename a content-type or component attribute and generate a data-preserving migration').action(runAction('rename:field', action));
51
+ };
52
+
53
+ export { action, command };
54
+ //# sourceMappingURL=rename-field.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rename-field.mjs","sources":["../../../../../src/cli/commands/content-types/rename-field.ts"],"sourcesContent":["import path from 'node:path';\nimport { createCommand } from 'commander';\nimport chalk from 'chalk';\nimport fse from 'fs-extra';\n\nimport { createStrapi, compileStrapi } from '@strapi/core';\n\nimport type { StrapiCommand } from '../../types';\nimport { runAction } from '../../utils/helpers';\n\nconst listMigrationFiles = async (dir: string): Promise<Set<string>> => {\n try {\n return new Set(await fse.readdir(dir));\n } catch {\n // The directory may not exist yet (no migrations generated before).\n return new Set();\n }\n};\n\n/**\n * Renames an attribute on a content-type or component and generates the\n * data-preserving migration in a single step, reusing the same rename resolver\n * the Content-Type Builder admin uses.\n */\nconst action = async (uid: string, oldName: string, newName: string) => {\n const appContext = await compileStrapi();\n const app = await createStrapi(appContext).load();\n\n try {\n // The Content-Type Builder always writes to the app's *source* migrations\n // dir (the database-configured dir points at build output when\n // `useTypescriptMigrations` is enabled).\n const migrationsDir = path.join(app.dirs.app.root, 'database', 'migrations');\n\n const before = await listMigrationFiles(migrationsDir);\n\n await app\n .plugin('content-type-builder')\n .service('schema')\n .renameAttribute(uid, oldName, newName);\n\n const after = await listMigrationFiles(migrationsDir);\n const created = [...after].filter((file) => !before.has(file));\n\n // The service refuses renames it cannot migrate before touching the schema,\n // so a rename without a migration file means something went wrong.\n if (created.length === 0) {\n throw new Error(\n `Renamed \"${oldName}\" to \"${newName}\" on ${uid}, but no rename migration was written to ${migrationsDir}. Check the schema file before restarting.`\n );\n }\n\n console.log(chalk.green(`Renamed \"${oldName}\" to \"${newName}\" on ${uid}.`));\n\n created.forEach((file) => {\n console.log(`Generated migration ${path.join(migrationsDir, file)}`);\n });\n } finally {\n await app.destroy();\n }\n};\n\n/**\n * `$ strapi rename:field <uid> <oldName> <newName>`\n */\nconst command: StrapiCommand = () => {\n return createCommand('rename:field')\n .arguments('<uid> <oldName> <newName>')\n .description(\n 'Rename a content-type or component attribute and generate a data-preserving migration'\n )\n .action(runAction('rename:field', action));\n};\n\nexport { action, command };\n"],"names":["listMigrationFiles","dir","Set","fse","readdir","action","uid","oldName","newName","appContext","compileStrapi","app","createStrapi","load","migrationsDir","path","join","dirs","root","before","plugin","service","renameAttribute","after","created","filter","file","has","length","Error","console","log","chalk","green","forEach","destroy","command","createCommand","arguments","description","runAction"],"mappings":";;;;;;;AAUA,MAAMA,qBAAqB,OAAOC,GAAAA,GAAAA;IAChC,IAAI;AACF,QAAA,OAAO,IAAIC,GAAAA,CAAI,MAAMC,GAAAA,CAAIC,OAAO,CAACH,GAAAA,CAAAA,CAAAA;AACnC,IAAA,CAAA,CAAE,OAAM;;AAEN,QAAA,OAAO,IAAIC,GAAAA,EAAAA;AACb,IAAA;AACF,CAAA;AAEA;;;;AAIC,IACD,MAAMG,MAAAA,GAAS,OAAOC,GAAAA,EAAaC,OAAAA,EAAiBC,OAAAA,GAAAA;AAClD,IAAA,MAAMC,aAAa,MAAMC,aAAAA,EAAAA;AACzB,IAAA,MAAMC,GAAAA,GAAM,MAAMC,YAAAA,CAAaH,UAAAA,CAAAA,CAAYI,IAAI,EAAA;IAE/C,IAAI;;;;QAIF,MAAMC,aAAAA,GAAgBC,IAAAA,CAAKC,IAAI,CAACL,GAAAA,CAAIM,IAAI,CAACN,GAAG,CAACO,IAAI,EAAE,UAAA,EAAY,YAAA,CAAA;QAE/D,MAAMC,MAAAA,GAAS,MAAMnB,kBAAAA,CAAmBc,aAAAA,CAAAA;QAExC,MAAMH,GAAAA,CACHS,MAAM,CAAC,sBAAA,CAAA,CACPC,OAAO,CAAC,QAAA,CAAA,CACRC,eAAe,CAAChB,GAAAA,EAAKC,OAAAA,EAASC,OAAAA,CAAAA;QAEjC,MAAMe,KAAAA,GAAQ,MAAMvB,kBAAAA,CAAmBc,aAAAA,CAAAA;AACvC,QAAA,MAAMU,OAAAA,GAAU;AAAID,YAAAA,GAAAA;AAAM,SAAA,CAACE,MAAM,CAAC,CAACC,OAAS,CAACP,MAAAA,CAAOQ,GAAG,CAACD,IAAAA,CAAAA,CAAAA;;;QAIxD,IAAIF,OAAAA,CAAQI,MAAM,KAAK,CAAA,EAAG;AACxB,YAAA,MAAM,IAAIC,KAAAA,CACR,CAAC,SAAS,EAAEtB,QAAQ,MAAM,EAAEC,OAAAA,CAAQ,KAAK,EAAEF,GAAAA,CAAI,yCAAyC,EAAEQ,aAAAA,CAAc,0CAA0C,CAAC,CAAA;AAEvJ,QAAA;AAEAgB,QAAAA,OAAAA,CAAQC,GAAG,CAACC,KAAAA,CAAMC,KAAK,CAAC,CAAC,SAAS,EAAE1B,OAAAA,CAAQ,MAAM,EAAEC,OAAAA,CAAQ,KAAK,EAAEF,GAAAA,CAAI,CAAC,CAAC,CAAA,CAAA;QAEzEkB,OAAAA,CAAQU,OAAO,CAAC,CAACR,IAAAA,GAAAA;YACfI,OAAAA,CAAQC,GAAG,CAAC,CAAC,oBAAoB,EAAEhB,IAAAA,CAAKC,IAAI,CAACF,aAAAA,EAAeY,IAAAA,CAAAA,CAAAA,CAAO,CAAA;AACrE,QAAA,CAAA,CAAA;IACF,CAAA,QAAU;AACR,QAAA,MAAMf,IAAIwB,OAAO,EAAA;AACnB,IAAA;AACF;AAEA;;AAEC,UACKC,OAAAA,GAAyB,IAAA;IAC7B,OAAOC,aAAAA,CAAc,cAAA,CAAA,CAClBC,SAAS,CAAC,2BAAA,CAAA,CACVC,WAAW,CACV,uFAAA,CAAA,CAEDlC,MAAM,CAACmC,SAAAA,CAAU,cAAA,EAAgBnC,MAAAA,CAAAA,CAAAA;AACtC;;;;"}
@@ -2,7 +2,6 @@
2
2
 
3
3
  var commander = require('commander');
4
4
  var cluster = require('node:cluster');
5
- var develop = require('../../node/develop.js');
6
5
  var errors = require('../../node/core/errors.js');
7
6
 
8
7
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -16,7 +15,10 @@ const action = async (options)=>{
16
15
  options.logger.warn('[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.');
17
16
  }
18
17
  }
19
- await develop.develop(options);
18
+ // Loaded lazily: every command is registered on CLI startup, so a static import would make
19
+ // `strapi start` load the whole admin build toolchain (including admin source via staticFiles).
20
+ const { develop: nodeDevelop } = await Promise.resolve().then(function () { return require('../../node/develop.js'); });
21
+ await nodeDevelop(options);
20
22
  } catch (err) {
21
23
  errors.handleUnexpectedError(err);
22
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"develop.js","sources":["../../../../src/cli/commands/develop.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport cluster from 'node:cluster';\nimport type { StrapiCommand } from '../types';\nimport { develop as nodeDevelop, DevelopOptions } from '../../node/develop';\nimport { handleUnexpectedError } from '../../node/core/errors';\n\ntype DevelopCLIOptions = DevelopOptions;\n\nconst action = async (options: DevelopCLIOptions) => {\n try {\n if (cluster.isPrimary) {\n if (options.bundler === 'webpack') {\n options.logger.warn(\n '[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.'\n );\n }\n }\n\n await nodeDevelop(options);\n } catch (err) {\n handleUnexpectedError(err);\n }\n};\n\n/**\n * `$ strapi develop`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n return createCommand('develop')\n .alias('dev')\n .option('--bundler [bundler]', 'Bundler to use (webpack or vite)', 'vite')\n .option('-d, --debug', 'Enable debugging mode with verbose logs', false)\n .option('--silent', \"Don't log anything\", false)\n .option('--polling', 'Watch for file changes in network directories', false)\n .option('--watch-admin', 'Watch the admin panel for hot changes', true)\n .option('--no-watch-admin', 'Do not watch the admin panel for hot changes')\n .option('--build-admin', 'Build the admin panel', true)\n .option('--no-build-admin', 'Do not build the admin panel in case watch is disabled')\n .option('--open', 'Open the admin in your browser', true)\n .option('--install-deps', 'Auto-install missing admin dependencies', true)\n .option('--no-install-deps', 'Do not auto-install missing admin dependencies')\n .description('Start your Strapi application in development mode')\n .action(async (options: DevelopCLIOptions) => {\n return action({ ...options, ...ctx });\n });\n};\n\nexport { command };\n"],"names":["action","options","cluster","isPrimary","bundler","logger","warn","nodeDevelop","err","handleUnexpectedError","command","ctx","createCommand","alias","option","description"],"mappings":";;;;;;;;;;;AAQA,MAAMA,SAAS,OAAOC,OAAAA,GAAAA;IACpB,IAAI;QACF,IAAIC,wBAAAA,CAAQC,SAAS,EAAE;YACrB,IAAIF,OAAAA,CAAQG,OAAO,KAAK,SAAA,EAAW;gBACjCH,OAAAA,CAAQI,MAAM,CAACC,IAAI,CACjB,yFAAA,CAAA;AAEJ,YAAA;AACF,QAAA;AAEA,QAAA,MAAMC,eAAAA,CAAYN,OAAAA,CAAAA;AACpB,IAAA,CAAA,CAAE,OAAOO,GAAAA,EAAK;QACZC,4BAAAA,CAAsBD,GAAAA,CAAAA;AACxB,IAAA;AACF,CAAA;AAEA;;AAEC,IACD,MAAME,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,OAAOC,uBAAAA,CAAc,SAAA,CAAA,CAClBC,KAAK,CAAC,KAAA,CAAA,CACNC,MAAM,CAAC,qBAAA,EAAuB,kCAAA,EAAoC,MAAA,CAAA,CAClEA,MAAM,CAAC,aAAA,EAAe,yCAAA,EAA2C,KAAA,CAAA,CACjEA,MAAM,CAAC,UAAA,EAAY,oBAAA,EAAsB,KAAA,CAAA,CACzCA,MAAM,CAAC,WAAA,EAAa,+CAAA,EAAiD,KAAA,CAAA,CACrEA,MAAM,CAAC,eAAA,EAAiB,yCAAyC,IAAA,CAAA,CACjEA,MAAM,CAAC,kBAAA,EAAoB,8CAAA,CAAA,CAC3BA,MAAM,CAAC,eAAA,EAAiB,uBAAA,EAAyB,IAAA,CAAA,CACjDA,MAAM,CAAC,kBAAA,EAAoB,wDAAA,CAAA,CAC3BA,MAAM,CAAC,QAAA,EAAU,gCAAA,EAAkC,IAAA,CAAA,CACnDA,MAAM,CAAC,gBAAA,EAAkB,yCAAA,EAA2C,IAAA,CAAA,CACpEA,MAAM,CAAC,mBAAA,EAAqB,gDAAA,CAAA,CAC5BC,WAAW,CAAC,mDAAA,CAAA,CACZf,MAAM,CAAC,OAAOC,OAAAA,GAAAA;AACb,QAAA,OAAOD,MAAAA,CAAO;AAAE,YAAA,GAAGC,OAAO;AAAE,YAAA,GAAGU;AAAI,SAAA,CAAA;AACrC,IAAA,CAAA,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"develop.js","sources":["../../../../src/cli/commands/develop.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport cluster from 'node:cluster';\nimport type { StrapiCommand } from '../types';\nimport type { DevelopOptions } from '../../node/develop';\nimport { handleUnexpectedError } from '../../node/core/errors';\n\ntype DevelopCLIOptions = DevelopOptions;\n\nconst action = async (options: DevelopCLIOptions) => {\n try {\n if (cluster.isPrimary) {\n if (options.bundler === 'webpack') {\n options.logger.warn(\n '[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.'\n );\n }\n }\n\n // Loaded lazily: every command is registered on CLI startup, so a static import would make\n // `strapi start` load the whole admin build toolchain (including admin source via staticFiles).\n const { develop: nodeDevelop } = await import('../../node/develop');\n await nodeDevelop(options);\n } catch (err) {\n handleUnexpectedError(err);\n }\n};\n\n/**\n * `$ strapi develop`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n return createCommand('develop')\n .alias('dev')\n .option('--bundler [bundler]', 'Bundler to use (webpack or vite)', 'vite')\n .option('-d, --debug', 'Enable debugging mode with verbose logs', false)\n .option('--silent', \"Don't log anything\", false)\n .option('--polling', 'Watch for file changes in network directories', false)\n .option('--watch-admin', 'Watch the admin panel for hot changes', true)\n .option('--no-watch-admin', 'Do not watch the admin panel for hot changes')\n .option('--build-admin', 'Build the admin panel', true)\n .option('--no-build-admin', 'Do not build the admin panel in case watch is disabled')\n .option('--open', 'Open the admin in your browser', true)\n .option('--install-deps', 'Auto-install missing admin dependencies', true)\n .option('--no-install-deps', 'Do not auto-install missing admin dependencies')\n .description('Start your Strapi application in development mode')\n .action(async (options: DevelopCLIOptions) => {\n return action({ ...options, ...ctx });\n });\n};\n\nexport { command };\n"],"names":["action","options","cluster","isPrimary","bundler","logger","warn","develop","nodeDevelop","err","handleUnexpectedError","command","ctx","createCommand","alias","option","description"],"mappings":";;;;;;;;;;AAQA,MAAMA,SAAS,OAAOC,OAAAA,GAAAA;IACpB,IAAI;QACF,IAAIC,wBAAAA,CAAQC,SAAS,EAAE;YACrB,IAAIF,OAAAA,CAAQG,OAAO,KAAK,SAAA,EAAW;gBACjCH,OAAAA,CAAQI,MAAM,CAACC,IAAI,CACjB,yFAAA,CAAA;AAEJ,YAAA;AACF,QAAA;;;AAIA,QAAA,MAAM,EAAEC,OAAAA,EAASC,WAAW,EAAE,GAAG,MAAM,oDAAO,uBAAA,KAAA;AAC9C,QAAA,MAAMA,WAAAA,CAAYP,OAAAA,CAAAA;AACpB,IAAA,CAAA,CAAE,OAAOQ,GAAAA,EAAK;QACZC,4BAAAA,CAAsBD,GAAAA,CAAAA;AACxB,IAAA;AACF,CAAA;AAEA;;AAEC,IACD,MAAME,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,OAAOC,uBAAAA,CAAc,SAAA,CAAA,CAClBC,KAAK,CAAC,KAAA,CAAA,CACNC,MAAM,CAAC,qBAAA,EAAuB,kCAAA,EAAoC,MAAA,CAAA,CAClEA,MAAM,CAAC,aAAA,EAAe,yCAAA,EAA2C,KAAA,CAAA,CACjEA,MAAM,CAAC,UAAA,EAAY,oBAAA,EAAsB,KAAA,CAAA,CACzCA,MAAM,CAAC,WAAA,EAAa,+CAAA,EAAiD,KAAA,CAAA,CACrEA,MAAM,CAAC,eAAA,EAAiB,yCAAyC,IAAA,CAAA,CACjEA,MAAM,CAAC,kBAAA,EAAoB,8CAAA,CAAA,CAC3BA,MAAM,CAAC,eAAA,EAAiB,uBAAA,EAAyB,IAAA,CAAA,CACjDA,MAAM,CAAC,kBAAA,EAAoB,wDAAA,CAAA,CAC3BA,MAAM,CAAC,QAAA,EAAU,gCAAA,EAAkC,IAAA,CAAA,CACnDA,MAAM,CAAC,gBAAA,EAAkB,yCAAA,EAA2C,IAAA,CAAA,CACpEA,MAAM,CAAC,mBAAA,EAAqB,gDAAA,CAAA,CAC5BC,WAAW,CAAC,mDAAA,CAAA,CACZhB,MAAM,CAAC,OAAOC,OAAAA,GAAAA;AACb,QAAA,OAAOD,MAAAA,CAAO;AAAE,YAAA,GAAGC,OAAO;AAAE,YAAA,GAAGW;AAAI,SAAA,CAAA;AACrC,IAAA,CAAA,CAAA;AACJ;;;;"}
@@ -1,6 +1,5 @@
1
1
  import { createCommand } from 'commander';
2
2
  import cluster from 'node:cluster';
3
- import { develop } from '../../node/develop.mjs';
4
3
  import { handleUnexpectedError } from '../../node/core/errors.mjs';
5
4
 
6
5
  const action = async (options)=>{
@@ -10,7 +9,10 @@ const action = async (options)=>{
10
9
  options.logger.warn('[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.');
11
10
  }
12
11
  }
13
- await develop(options);
12
+ // Loaded lazily: every command is registered on CLI startup, so a static import would make
13
+ // `strapi start` load the whole admin build toolchain (including admin source via staticFiles).
14
+ const { develop: nodeDevelop } = await import('../../node/develop.mjs');
15
+ await nodeDevelop(options);
14
16
  } catch (err) {
15
17
  handleUnexpectedError(err);
16
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"develop.mjs","sources":["../../../../src/cli/commands/develop.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport cluster from 'node:cluster';\nimport type { StrapiCommand } from '../types';\nimport { develop as nodeDevelop, DevelopOptions } from '../../node/develop';\nimport { handleUnexpectedError } from '../../node/core/errors';\n\ntype DevelopCLIOptions = DevelopOptions;\n\nconst action = async (options: DevelopCLIOptions) => {\n try {\n if (cluster.isPrimary) {\n if (options.bundler === 'webpack') {\n options.logger.warn(\n '[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.'\n );\n }\n }\n\n await nodeDevelop(options);\n } catch (err) {\n handleUnexpectedError(err);\n }\n};\n\n/**\n * `$ strapi develop`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n return createCommand('develop')\n .alias('dev')\n .option('--bundler [bundler]', 'Bundler to use (webpack or vite)', 'vite')\n .option('-d, --debug', 'Enable debugging mode with verbose logs', false)\n .option('--silent', \"Don't log anything\", false)\n .option('--polling', 'Watch for file changes in network directories', false)\n .option('--watch-admin', 'Watch the admin panel for hot changes', true)\n .option('--no-watch-admin', 'Do not watch the admin panel for hot changes')\n .option('--build-admin', 'Build the admin panel', true)\n .option('--no-build-admin', 'Do not build the admin panel in case watch is disabled')\n .option('--open', 'Open the admin in your browser', true)\n .option('--install-deps', 'Auto-install missing admin dependencies', true)\n .option('--no-install-deps', 'Do not auto-install missing admin dependencies')\n .description('Start your Strapi application in development mode')\n .action(async (options: DevelopCLIOptions) => {\n return action({ ...options, ...ctx });\n });\n};\n\nexport { command };\n"],"names":["action","options","cluster","isPrimary","bundler","logger","warn","nodeDevelop","err","handleUnexpectedError","command","ctx","createCommand","alias","option","description"],"mappings":";;;;;AAQA,MAAMA,SAAS,OAAOC,OAAAA,GAAAA;IACpB,IAAI;QACF,IAAIC,OAAAA,CAAQC,SAAS,EAAE;YACrB,IAAIF,OAAAA,CAAQG,OAAO,KAAK,SAAA,EAAW;gBACjCH,OAAAA,CAAQI,MAAM,CAACC,IAAI,CACjB,yFAAA,CAAA;AAEJ,YAAA;AACF,QAAA;AAEA,QAAA,MAAMC,OAAAA,CAAYN,OAAAA,CAAAA;AACpB,IAAA,CAAA,CAAE,OAAOO,GAAAA,EAAK;QACZC,qBAAAA,CAAsBD,GAAAA,CAAAA;AACxB,IAAA;AACF,CAAA;AAEA;;AAEC,IACD,MAAME,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,OAAOC,aAAAA,CAAc,SAAA,CAAA,CAClBC,KAAK,CAAC,KAAA,CAAA,CACNC,MAAM,CAAC,qBAAA,EAAuB,kCAAA,EAAoC,MAAA,CAAA,CAClEA,MAAM,CAAC,aAAA,EAAe,yCAAA,EAA2C,KAAA,CAAA,CACjEA,MAAM,CAAC,UAAA,EAAY,oBAAA,EAAsB,KAAA,CAAA,CACzCA,MAAM,CAAC,WAAA,EAAa,+CAAA,EAAiD,KAAA,CAAA,CACrEA,MAAM,CAAC,eAAA,EAAiB,yCAAyC,IAAA,CAAA,CACjEA,MAAM,CAAC,kBAAA,EAAoB,8CAAA,CAAA,CAC3BA,MAAM,CAAC,eAAA,EAAiB,uBAAA,EAAyB,IAAA,CAAA,CACjDA,MAAM,CAAC,kBAAA,EAAoB,wDAAA,CAAA,CAC3BA,MAAM,CAAC,QAAA,EAAU,gCAAA,EAAkC,IAAA,CAAA,CACnDA,MAAM,CAAC,gBAAA,EAAkB,yCAAA,EAA2C,IAAA,CAAA,CACpEA,MAAM,CAAC,mBAAA,EAAqB,gDAAA,CAAA,CAC5BC,WAAW,CAAC,mDAAA,CAAA,CACZf,MAAM,CAAC,OAAOC,OAAAA,GAAAA;AACb,QAAA,OAAOD,MAAAA,CAAO;AAAE,YAAA,GAAGC,OAAO;AAAE,YAAA,GAAGU;AAAI,SAAA,CAAA;AACrC,IAAA,CAAA,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"develop.mjs","sources":["../../../../src/cli/commands/develop.ts"],"sourcesContent":["import { createCommand } from 'commander';\nimport cluster from 'node:cluster';\nimport type { StrapiCommand } from '../types';\nimport type { DevelopOptions } from '../../node/develop';\nimport { handleUnexpectedError } from '../../node/core/errors';\n\ntype DevelopCLIOptions = DevelopOptions;\n\nconst action = async (options: DevelopCLIOptions) => {\n try {\n if (cluster.isPrimary) {\n if (options.bundler === 'webpack') {\n options.logger.warn(\n '[@strapi/strapi]: Using webpack as a bundler is deprecated. You should migrate to vite.'\n );\n }\n }\n\n // Loaded lazily: every command is registered on CLI startup, so a static import would make\n // `strapi start` load the whole admin build toolchain (including admin source via staticFiles).\n const { develop: nodeDevelop } = await import('../../node/develop');\n await nodeDevelop(options);\n } catch (err) {\n handleUnexpectedError(err);\n }\n};\n\n/**\n * `$ strapi develop`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n return createCommand('develop')\n .alias('dev')\n .option('--bundler [bundler]', 'Bundler to use (webpack or vite)', 'vite')\n .option('-d, --debug', 'Enable debugging mode with verbose logs', false)\n .option('--silent', \"Don't log anything\", false)\n .option('--polling', 'Watch for file changes in network directories', false)\n .option('--watch-admin', 'Watch the admin panel for hot changes', true)\n .option('--no-watch-admin', 'Do not watch the admin panel for hot changes')\n .option('--build-admin', 'Build the admin panel', true)\n .option('--no-build-admin', 'Do not build the admin panel in case watch is disabled')\n .option('--open', 'Open the admin in your browser', true)\n .option('--install-deps', 'Auto-install missing admin dependencies', true)\n .option('--no-install-deps', 'Do not auto-install missing admin dependencies')\n .description('Start your Strapi application in development mode')\n .action(async (options: DevelopCLIOptions) => {\n return action({ ...options, ...ctx });\n });\n};\n\nexport { command };\n"],"names":["action","options","cluster","isPrimary","bundler","logger","warn","develop","nodeDevelop","err","handleUnexpectedError","command","ctx","createCommand","alias","option","description"],"mappings":";;;;AAQA,MAAMA,SAAS,OAAOC,OAAAA,GAAAA;IACpB,IAAI;QACF,IAAIC,OAAAA,CAAQC,SAAS,EAAE;YACrB,IAAIF,OAAAA,CAAQG,OAAO,KAAK,SAAA,EAAW;gBACjCH,OAAAA,CAAQI,MAAM,CAACC,IAAI,CACjB,yFAAA,CAAA;AAEJ,YAAA;AACF,QAAA;;;AAIA,QAAA,MAAM,EAAEC,OAAAA,EAASC,WAAW,EAAE,GAAG,MAAM,OAAO,wBAAA,CAAA;AAC9C,QAAA,MAAMA,WAAAA,CAAYP,OAAAA,CAAAA;AACpB,IAAA,CAAA,CAAE,OAAOQ,GAAAA,EAAK;QACZC,qBAAAA,CAAsBD,GAAAA,CAAAA;AACxB,IAAA;AACF,CAAA;AAEA;;AAEC,IACD,MAAME,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,OAAOC,aAAAA,CAAc,SAAA,CAAA,CAClBC,KAAK,CAAC,KAAA,CAAA,CACNC,MAAM,CAAC,qBAAA,EAAuB,kCAAA,EAAoC,MAAA,CAAA,CAClEA,MAAM,CAAC,aAAA,EAAe,yCAAA,EAA2C,KAAA,CAAA,CACjEA,MAAM,CAAC,UAAA,EAAY,oBAAA,EAAsB,KAAA,CAAA,CACzCA,MAAM,CAAC,WAAA,EAAa,+CAAA,EAAiD,KAAA,CAAA,CACrEA,MAAM,CAAC,eAAA,EAAiB,yCAAyC,IAAA,CAAA,CACjEA,MAAM,CAAC,kBAAA,EAAoB,8CAAA,CAAA,CAC3BA,MAAM,CAAC,eAAA,EAAiB,uBAAA,EAAyB,IAAA,CAAA,CACjDA,MAAM,CAAC,kBAAA,EAAoB,wDAAA,CAAA,CAC3BA,MAAM,CAAC,QAAA,EAAU,gCAAA,EAAkC,IAAA,CAAA,CACnDA,MAAM,CAAC,gBAAA,EAAkB,yCAAA,EAA2C,IAAA,CAAA,CACpEA,MAAM,CAAC,mBAAA,EAAqB,gDAAA,CAAA,CAC5BC,WAAW,CAAC,mDAAA,CAAA,CACZhB,MAAM,CAAC,OAAOC,OAAAA,GAAAA;AACb,QAAA,OAAOD,MAAAA,CAAO;AAAE,YAAA,GAAGC,OAAO;AAAE,YAAA,GAAGW;AAAI,SAAA,CAAA;AACrC,IAAA,CAAA,CAAA;AACJ;;;;"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var commander = require('commander');
4
+ var helpers = require('../../utils/helpers.js');
5
+ var action = require('./install/action.js');
6
+
7
+ /**
8
+ * `$ strapi enterprise`
9
+ */ const command = ({ ctx })=>{
10
+ const enterprise = commander.createCommand('enterprise').description('Manage Strapi Enterprise plugins for your Strapi application');
11
+ // `$ strapi enterprise install [packages...]`
12
+ enterprise.command('install [packages...]').description('Install or upgrade Strapi Enterprise plugins. Without package names, choose them from a list.').action(helpers.runAction('enterprise:install', (packages = [])=>action.action(packages, ctx)));
13
+ return enterprise;
14
+ };
15
+
16
+ exports.command = command;
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/cli/commands/enterprise/index.ts"],"sourcesContent":["import { createCommand } from 'commander';\n\nimport type { StrapiCommand } from '../../types';\nimport { runAction } from '../../utils/helpers';\nimport { action as install } from './install/action';\n\n/**\n * `$ strapi enterprise`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n const enterprise = createCommand('enterprise').description(\n 'Manage Strapi Enterprise plugins for your Strapi application'\n );\n\n // `$ strapi enterprise install [packages...]`\n enterprise\n .command('install [packages...]')\n .description(\n 'Install or upgrade Strapi Enterprise plugins. Without package names, choose them from a list.'\n )\n .action(runAction('enterprise:install', (packages: string[] = []) => install(packages, ctx)));\n\n return enterprise;\n};\n\nexport { command };\n"],"names":["command","ctx","enterprise","createCommand","description","action","runAction","packages","install"],"mappings":";;;;;;AAMA;;AAEC,IACD,MAAMA,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,MAAMC,UAAAA,GAAaC,uBAAAA,CAAc,YAAA,CAAA,CAAcC,WAAW,CACxD,8DAAA,CAAA;;AAIFF,IAAAA,UAAAA,CACGF,OAAO,CAAC,uBAAA,CAAA,CACRI,WAAW,CACV,+FAAA,CAAA,CAEDC,MAAM,CAACC,iBAAAA,CAAU,sBAAsB,CAACC,QAAAA,GAAqB,EAAE,GAAKC,cAAQD,QAAAA,EAAUN,GAAAA,CAAAA,CAAAA,CAAAA;IAEzF,OAAOC,UAAAA;AACT;;;;"}
@@ -0,0 +1,15 @@
1
+ import { createCommand } from 'commander';
2
+ import { runAction } from '../../utils/helpers.mjs';
3
+ import { action } from './install/action.mjs';
4
+
5
+ /**
6
+ * `$ strapi enterprise`
7
+ */ const command = ({ ctx })=>{
8
+ const enterprise = createCommand('enterprise').description('Manage Strapi Enterprise plugins for your Strapi application');
9
+ // `$ strapi enterprise install [packages...]`
10
+ enterprise.command('install [packages...]').description('Install or upgrade Strapi Enterprise plugins. Without package names, choose them from a list.').action(runAction('enterprise:install', (packages = [])=>action(packages, ctx)));
11
+ return enterprise;
12
+ };
13
+
14
+ export { command };
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../src/cli/commands/enterprise/index.ts"],"sourcesContent":["import { createCommand } from 'commander';\n\nimport type { StrapiCommand } from '../../types';\nimport { runAction } from '../../utils/helpers';\nimport { action as install } from './install/action';\n\n/**\n * `$ strapi enterprise`\n */\nconst command: StrapiCommand = ({ ctx }) => {\n const enterprise = createCommand('enterprise').description(\n 'Manage Strapi Enterprise plugins for your Strapi application'\n );\n\n // `$ strapi enterprise install [packages...]`\n enterprise\n .command('install [packages...]')\n .description(\n 'Install or upgrade Strapi Enterprise plugins. Without package names, choose them from a list.'\n )\n .action(runAction('enterprise:install', (packages: string[] = []) => install(packages, ctx)));\n\n return enterprise;\n};\n\nexport { command };\n"],"names":["command","ctx","enterprise","createCommand","description","action","runAction","packages","install"],"mappings":";;;;AAMA;;AAEC,IACD,MAAMA,OAAAA,GAAyB,CAAC,EAAEC,GAAG,EAAE,GAAA;AACrC,IAAA,MAAMC,UAAAA,GAAaC,aAAAA,CAAc,YAAA,CAAA,CAAcC,WAAW,CACxD,8DAAA,CAAA;;AAIFF,IAAAA,UAAAA,CACGF,OAAO,CAAC,uBAAA,CAAA,CACRI,WAAW,CACV,+FAAA,CAAA,CAEDC,MAAM,CAACC,SAAAA,CAAU,sBAAsB,CAACC,QAAAA,GAAqB,EAAE,GAAKC,OAAQD,QAAAA,EAAUN,GAAAA,CAAAA,CAAAA,CAAAA;IAEzF,OAAOC,UAAAA;AACT;;;;"}