@strapi/plugin-documentation 0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282 → 0.0.0-experimental.63624e21eb5b0713345a0cf2f68f1c40eab427bc

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 (78) hide show
  1. package/README.md +1 -1
  2. package/dist/admin/pages/App.js.map +1 -1
  3. package/dist/admin/pages/App.mjs.map +1 -1
  4. package/dist/admin/pages/Settings.js +2 -2
  5. package/dist/admin/pages/Settings.js.map +1 -1
  6. package/dist/admin/pages/Settings.mjs +2 -2
  7. package/dist/admin/pages/Settings.mjs.map +1 -1
  8. package/dist/admin/src/services/api.d.ts +4 -4
  9. package/dist/admin/translations/ko.json.js +4 -1
  10. package/dist/admin/translations/ko.json.js.map +1 -1
  11. package/dist/admin/translations/ko.json.mjs +4 -1
  12. package/dist/admin/translations/ko.json.mjs.map +1 -1
  13. package/dist/server/controllers/documentation.js +6 -1
  14. package/dist/server/controllers/documentation.js.map +1 -1
  15. package/dist/server/controllers/documentation.mjs +6 -1
  16. package/dist/server/controllers/documentation.mjs.map +1 -1
  17. package/dist/server/controllers/index.js.map +1 -1
  18. package/dist/server/controllers/index.mjs.map +1 -1
  19. package/dist/server/index.js.map +1 -1
  20. package/dist/server/index.mjs.map +1 -1
  21. package/dist/server/routes/index.js +2 -1
  22. package/dist/server/routes/index.js.map +1 -1
  23. package/dist/server/routes/index.mjs +2 -1
  24. package/dist/server/routes/index.mjs.map +1 -1
  25. package/dist/server/services/documentation.js +40 -8
  26. package/dist/server/services/documentation.js.map +1 -1
  27. package/dist/server/services/documentation.mjs +41 -9
  28. package/dist/server/services/documentation.mjs.map +1 -1
  29. package/dist/server/services/helpers/build-component-schema.js +21 -6
  30. package/dist/server/services/helpers/build-component-schema.js.map +1 -1
  31. package/dist/server/services/helpers/build-component-schema.mjs +18 -6
  32. package/dist/server/services/helpers/build-component-schema.mjs.map +1 -1
  33. package/dist/server/services/helpers/utils/clean-schema-attributes.js +14 -13
  34. package/dist/server/services/helpers/utils/clean-schema-attributes.js.map +1 -1
  35. package/dist/server/services/helpers/utils/clean-schema-attributes.mjs +14 -13
  36. package/dist/server/services/helpers/utils/clean-schema-attributes.mjs.map +1 -1
  37. package/dist/server/services/helpers/utils/loop-content-type-names.js +1 -0
  38. package/dist/server/services/helpers/utils/loop-content-type-names.js.map +1 -1
  39. package/dist/server/services/helpers/utils/loop-content-type-names.mjs +1 -0
  40. package/dist/server/services/helpers/utils/loop-content-type-names.mjs.map +1 -1
  41. package/dist/server/services/helpers/utils/query-params.js +11 -1
  42. package/dist/server/services/helpers/utils/query-params.js.map +1 -1
  43. package/dist/server/services/helpers/utils/query-params.mjs +11 -1
  44. package/dist/server/services/helpers/utils/query-params.mjs.map +1 -1
  45. package/dist/server/services/index.js.map +1 -1
  46. package/dist/server/services/index.mjs.map +1 -1
  47. package/dist/server/services/override.js +19 -3
  48. package/dist/server/services/override.js.map +1 -1
  49. package/dist/server/services/override.mjs +19 -3
  50. package/dist/server/services/override.mjs.map +1 -1
  51. package/dist/server/src/config/index.d.ts +1 -1
  52. package/dist/server/src/controllers/documentation.d.ts.map +1 -1
  53. package/dist/server/src/controllers/index.d.ts.map +1 -1
  54. package/dist/server/src/index.d.ts +5 -2
  55. package/dist/server/src/index.d.ts.map +1 -1
  56. package/dist/server/src/routes/index.d.ts +4 -3
  57. package/dist/server/src/routes/index.d.ts.map +1 -1
  58. package/dist/server/src/services/documentation.d.ts +35 -0
  59. package/dist/server/src/services/documentation.d.ts.map +1 -1
  60. package/dist/server/src/services/helpers/build-component-schema.d.ts +3 -1
  61. package/dist/server/src/services/helpers/build-component-schema.d.ts.map +1 -1
  62. package/dist/server/src/services/helpers/index.d.ts +2 -2
  63. package/dist/server/src/services/helpers/index.d.ts.map +1 -1
  64. package/dist/server/src/services/helpers/utils/clean-schema-attributes.d.ts +2 -2
  65. package/dist/server/src/services/helpers/utils/clean-schema-attributes.d.ts.map +1 -1
  66. package/dist/server/src/services/helpers/utils/loop-content-type-names.d.ts.map +1 -1
  67. package/dist/server/src/services/helpers/utils/query-params.d.ts.map +1 -1
  68. package/dist/server/src/services/index.d.ts +5 -4
  69. package/dist/server/src/services/index.d.ts.map +1 -1
  70. package/dist/server/src/services/override.d.ts +16 -0
  71. package/dist/server/src/services/override.d.ts.map +1 -1
  72. package/dist/server/src/types/controllers.d.ts +26 -0
  73. package/dist/server/src/types/controllers.d.ts.map +1 -0
  74. package/dist/server/src/types/services.d.ts +47 -0
  75. package/dist/server/src/types/services.d.ts.map +1 -0
  76. package/dist/server/src/types.d.ts +1 -0
  77. package/dist/server/src/types.d.ts.map +1 -1
  78. package/package.json +28 -16
@@ -6,8 +6,17 @@ const createService = ({ strapi })=>{
6
6
  const registeredOverrides = [];
7
7
  const excludedFromGeneration = [];
8
8
  return {
9
- registeredOverrides,
10
- excludedFromGeneration,
9
+ /**
10
+ * The registered overrides, merged by `generateFullDoc` in registration order.
11
+ *
12
+ * @internal
13
+ */ registeredOverrides,
14
+ /**
15
+ * The APIs and plugins left out of the generated paths. Names are kept as given, duplicates
16
+ * included.
17
+ *
18
+ * @internal
19
+ */ excludedFromGeneration,
11
20
  /**
12
21
  *
13
22
  * @param {(string | string[])} api - The name of the api or and array of apis to exclude from generation
@@ -18,7 +27,11 @@ const createService = ({ strapi })=>{
18
27
  }
19
28
  excludedFromGeneration.push(api);
20
29
  },
21
- isEnabled (name) {
30
+ /**
31
+ * Whether `name` is excluded from generation. Despite its name, `true` means excluded.
32
+ *
33
+ * @internal
34
+ */ isEnabled (name) {
22
35
  return excludedFromGeneration.includes(name);
23
36
  },
24
37
  registerOverride (override, opts) {
@@ -36,6 +49,9 @@ const createService = ({ strapi })=>{
36
49
  overrideToRegister = require('yaml').parse(overrideToRegister);
37
50
  }
38
51
  // receive an object we can register it directly
52
+ // TODO @Nico text that parses to a scalar, an array or `null` is registered as is, so
53
+ // `registeredOverrides` can hold more than OpenAPI parts; the exclusions above are also
54
+ // applied before a parse error is thrown.
39
55
  registeredOverrides.push(overrideToRegister);
40
56
  }
41
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"override.js","sources":["../../../server/src/services/override.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { getPluginsThatNeedDocumentation } from './utils/get-plugins-that-need-documentation';\nimport type { PluginConfig } from '../types';\n\nexport type OverrideService = ReturnType<typeof createService>;\n\nconst createService = ({ strapi }: { strapi: Core.Strapi }) => {\n const registeredOverrides: Partial<PluginConfig>[] = [];\n const excludedFromGeneration: string[] = [];\n\n return {\n registeredOverrides,\n excludedFromGeneration,\n /**\n *\n * @param {(string | string[])} api - The name of the api or and array of apis to exclude from generation\n */\n excludeFromGeneration(api: string | string[]) {\n if (Array.isArray(api)) {\n excludedFromGeneration.push(...api);\n\n return;\n }\n\n excludedFromGeneration.push(api);\n },\n\n isEnabled(name: string) {\n return excludedFromGeneration.includes(name);\n },\n\n registerOverride(\n override: Partial<PluginConfig>,\n opts?: { pluginOrigin: string; excludeFromGeneration?: string[] }\n ) {\n const { pluginOrigin, excludeFromGeneration = [] } = opts ?? {};\n\n const pluginsThatNeedDocumentation = getPluginsThatNeedDocumentation(\n strapi.config.get('plugin::documentation')\n );\n // Don't apply the override if the plugin is not in the list of plugins that need documentation\n if (pluginOrigin && !pluginsThatNeedDocumentation.includes(pluginOrigin)) return;\n\n if (excludeFromGeneration.length) {\n this.excludeFromGeneration(excludeFromGeneration);\n }\n\n let overrideToRegister = override;\n // Parse yaml if we receive a string\n if (typeof override === 'string') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n overrideToRegister = require('yaml').parse(overrideToRegister);\n }\n // receive an object we can register it directly\n registeredOverrides.push(overrideToRegister);\n },\n };\n};\n\nexport default createService;\n"],"names":["createService","strapi","registeredOverrides","excludedFromGeneration","excludeFromGeneration","api","Array","isArray","push","isEnabled","name","includes","registerOverride","override","opts","pluginOrigin","pluginsThatNeedDocumentation","getPluginsThatNeedDocumentation","config","get","length","overrideToRegister","require","parse"],"mappings":";;;;AAOA,MAAMA,aAAAA,GAAgB,CAAC,EAAEC,MAAM,EAA2B,GAAA;AACxD,IAAA,MAAMC,sBAA+C,EAAE;AACvD,IAAA,MAAMC,yBAAmC,EAAE;IAE3C,OAAO;AACLD,QAAAA,mBAAAA;AACAC,QAAAA,sBAAAA;AACA;;;AAGC,QACDC,uBAAsBC,GAAsB,EAAA;YAC1C,IAAIC,KAAAA,CAAMC,OAAO,CAACF,GAAAA,CAAAA,EAAM;AACtBF,gBAAAA,sBAAAA,CAAuBK,IAAI,CAAA,GAAIH,GAAAA,CAAAA;AAE/B,gBAAA;AACF,YAAA;AAEAF,YAAAA,sBAAAA,CAAuBK,IAAI,CAACH,GAAAA,CAAAA;AAC9B,QAAA,CAAA;AAEAI,QAAAA,SAAAA,CAAAA,CAAUC,IAAY,EAAA;YACpB,OAAOP,sBAAAA,CAAuBQ,QAAQ,CAACD,IAAAA,CAAAA;AACzC,QAAA,CAAA;QAEAE,gBAAAA,CAAAA,CACEC,QAA+B,EAC/BC,IAAiE,EAAA;YAEjE,MAAM,EAAEC,YAAY,EAAEX,qBAAAA,GAAwB,EAAE,EAAE,GAAGU,QAAQ,EAAC;AAE9D,YAAA,MAAME,+BAA+BC,+DAAAA,CACnChB,MAAAA,CAAOiB,MAAM,CAACC,GAAG,CAAC,uBAAA,CAAA,CAAA;;AAGpB,YAAA,IAAIJ,YAAAA,IAAgB,CAACC,4BAAAA,CAA6BL,QAAQ,CAACI,YAAAA,CAAAA,EAAe;YAE1E,IAAIX,qBAAAA,CAAsBgB,MAAM,EAAE;gBAChC,IAAI,CAAChB,qBAAqB,CAACA,qBAAAA,CAAAA;AAC7B,YAAA;AAEA,YAAA,IAAIiB,kBAAAA,GAAqBR,QAAAA;;YAEzB,IAAI,OAAOA,aAAa,QAAA,EAAU;;gBAEhCQ,kBAAAA,GAAqBC,OAAAA,CAAQ,MAAA,CAAA,CAAQC,KAAK,CAACF,kBAAAA,CAAAA;AAC7C,YAAA;;AAEAnB,YAAAA,mBAAAA,CAAoBM,IAAI,CAACa,kBAAAA,CAAAA;AAC3B,QAAA;AACF,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"override.js","sources":["../../../server/src/services/override.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { getPluginsThatNeedDocumentation } from './utils/get-plugins-that-need-documentation';\nimport type { PluginConfig } from '../types';\n\nexport type OverrideService = ReturnType<typeof createService>;\n\nconst createService = ({ strapi }: { strapi: Core.Strapi }) => {\n const registeredOverrides: Partial<PluginConfig>[] = [];\n const excludedFromGeneration: string[] = [];\n\n return {\n /**\n * The registered overrides, merged by `generateFullDoc` in registration order.\n *\n * @internal\n */\n registeredOverrides,\n /**\n * The APIs and plugins left out of the generated paths. Names are kept as given, duplicates\n * included.\n *\n * @internal\n */\n excludedFromGeneration,\n /**\n *\n * @param {(string | string[])} api - The name of the api or and array of apis to exclude from generation\n */\n excludeFromGeneration(api: string | string[]) {\n if (Array.isArray(api)) {\n excludedFromGeneration.push(...api);\n\n return;\n }\n\n excludedFromGeneration.push(api);\n },\n\n /**\n * Whether `name` is excluded from generation. Despite its name, `true` means excluded.\n *\n * @internal\n */\n isEnabled(name: string) {\n return excludedFromGeneration.includes(name);\n },\n\n registerOverride(\n override: Partial<PluginConfig>,\n opts?: { pluginOrigin: string; excludeFromGeneration?: string[] }\n ) {\n const { pluginOrigin, excludeFromGeneration = [] } = opts ?? {};\n\n const pluginsThatNeedDocumentation = getPluginsThatNeedDocumentation(\n strapi.config.get('plugin::documentation')\n );\n // Don't apply the override if the plugin is not in the list of plugins that need documentation\n if (pluginOrigin && !pluginsThatNeedDocumentation.includes(pluginOrigin)) return;\n\n if (excludeFromGeneration.length) {\n this.excludeFromGeneration(excludeFromGeneration);\n }\n\n let overrideToRegister = override;\n // Parse yaml if we receive a string\n if (typeof override === 'string') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n overrideToRegister = require('yaml').parse(overrideToRegister);\n }\n // receive an object we can register it directly\n // TODO @Nico text that parses to a scalar, an array or `null` is registered as is, so\n // `registeredOverrides` can hold more than OpenAPI parts; the exclusions above are also\n // applied before a parse error is thrown.\n registeredOverrides.push(overrideToRegister);\n },\n };\n};\n\nexport default createService;\n"],"names":["createService","strapi","registeredOverrides","excludedFromGeneration","excludeFromGeneration","api","Array","isArray","push","isEnabled","name","includes","registerOverride","override","opts","pluginOrigin","pluginsThatNeedDocumentation","getPluginsThatNeedDocumentation","config","get","length","overrideToRegister","require","parse"],"mappings":";;;;AAOA,MAAMA,aAAAA,GAAgB,CAAC,EAAEC,MAAM,EAA2B,GAAA;AACxD,IAAA,MAAMC,sBAA+C,EAAE;AACvD,IAAA,MAAMC,yBAAmC,EAAE;IAE3C,OAAO;AACL;;;;QAKAD,mBAAAA;AACA;;;;;QAMAC,sBAAAA;AACA;;;AAGC,QACDC,uBAAsBC,GAAsB,EAAA;YAC1C,IAAIC,KAAAA,CAAMC,OAAO,CAACF,GAAAA,CAAAA,EAAM;AACtBF,gBAAAA,sBAAAA,CAAuBK,IAAI,CAAA,GAAIH,GAAAA,CAAAA;AAE/B,gBAAA;AACF,YAAA;AAEAF,YAAAA,sBAAAA,CAAuBK,IAAI,CAACH,GAAAA,CAAAA;AAC9B,QAAA,CAAA;AAEA;;;;AAIC,QACDI,WAAUC,IAAY,EAAA;YACpB,OAAOP,sBAAAA,CAAuBQ,QAAQ,CAACD,IAAAA,CAAAA;AACzC,QAAA,CAAA;QAEAE,gBAAAA,CAAAA,CACEC,QAA+B,EAC/BC,IAAiE,EAAA;YAEjE,MAAM,EAAEC,YAAY,EAAEX,qBAAAA,GAAwB,EAAE,EAAE,GAAGU,QAAQ,EAAC;AAE9D,YAAA,MAAME,+BAA+BC,+DAAAA,CACnChB,MAAAA,CAAOiB,MAAM,CAACC,GAAG,CAAC,uBAAA,CAAA,CAAA;;AAGpB,YAAA,IAAIJ,YAAAA,IAAgB,CAACC,4BAAAA,CAA6BL,QAAQ,CAACI,YAAAA,CAAAA,EAAe;YAE1E,IAAIX,qBAAAA,CAAsBgB,MAAM,EAAE;gBAChC,IAAI,CAAChB,qBAAqB,CAACA,qBAAAA,CAAAA;AAC7B,YAAA;AAEA,YAAA,IAAIiB,kBAAAA,GAAqBR,QAAAA;;YAEzB,IAAI,OAAOA,aAAa,QAAA,EAAU;;gBAEhCQ,kBAAAA,GAAqBC,OAAAA,CAAQ,MAAA,CAAA,CAAQC,KAAK,CAACF,kBAAAA,CAAAA;AAC7C,YAAA;;;;;AAKAnB,YAAAA,mBAAAA,CAAoBM,IAAI,CAACa,kBAAAA,CAAAA;AAC3B,QAAA;AACF,KAAA;AACF;;;;"}
@@ -4,8 +4,17 @@ const createService = ({ strapi })=>{
4
4
  const registeredOverrides = [];
5
5
  const excludedFromGeneration = [];
6
6
  return {
7
- registeredOverrides,
8
- excludedFromGeneration,
7
+ /**
8
+ * The registered overrides, merged by `generateFullDoc` in registration order.
9
+ *
10
+ * @internal
11
+ */ registeredOverrides,
12
+ /**
13
+ * The APIs and plugins left out of the generated paths. Names are kept as given, duplicates
14
+ * included.
15
+ *
16
+ * @internal
17
+ */ excludedFromGeneration,
9
18
  /**
10
19
  *
11
20
  * @param {(string | string[])} api - The name of the api or and array of apis to exclude from generation
@@ -16,7 +25,11 @@ const createService = ({ strapi })=>{
16
25
  }
17
26
  excludedFromGeneration.push(api);
18
27
  },
19
- isEnabled (name) {
28
+ /**
29
+ * Whether `name` is excluded from generation. Despite its name, `true` means excluded.
30
+ *
31
+ * @internal
32
+ */ isEnabled (name) {
20
33
  return excludedFromGeneration.includes(name);
21
34
  },
22
35
  registerOverride (override, opts) {
@@ -34,6 +47,9 @@ const createService = ({ strapi })=>{
34
47
  overrideToRegister = require('yaml').parse(overrideToRegister);
35
48
  }
36
49
  // receive an object we can register it directly
50
+ // TODO @Nico text that parses to a scalar, an array or `null` is registered as is, so
51
+ // `registeredOverrides` can hold more than OpenAPI parts; the exclusions above are also
52
+ // applied before a parse error is thrown.
37
53
  registeredOverrides.push(overrideToRegister);
38
54
  }
39
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"override.mjs","sources":["../../../server/src/services/override.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { getPluginsThatNeedDocumentation } from './utils/get-plugins-that-need-documentation';\nimport type { PluginConfig } from '../types';\n\nexport type OverrideService = ReturnType<typeof createService>;\n\nconst createService = ({ strapi }: { strapi: Core.Strapi }) => {\n const registeredOverrides: Partial<PluginConfig>[] = [];\n const excludedFromGeneration: string[] = [];\n\n return {\n registeredOverrides,\n excludedFromGeneration,\n /**\n *\n * @param {(string | string[])} api - The name of the api or and array of apis to exclude from generation\n */\n excludeFromGeneration(api: string | string[]) {\n if (Array.isArray(api)) {\n excludedFromGeneration.push(...api);\n\n return;\n }\n\n excludedFromGeneration.push(api);\n },\n\n isEnabled(name: string) {\n return excludedFromGeneration.includes(name);\n },\n\n registerOverride(\n override: Partial<PluginConfig>,\n opts?: { pluginOrigin: string; excludeFromGeneration?: string[] }\n ) {\n const { pluginOrigin, excludeFromGeneration = [] } = opts ?? {};\n\n const pluginsThatNeedDocumentation = getPluginsThatNeedDocumentation(\n strapi.config.get('plugin::documentation')\n );\n // Don't apply the override if the plugin is not in the list of plugins that need documentation\n if (pluginOrigin && !pluginsThatNeedDocumentation.includes(pluginOrigin)) return;\n\n if (excludeFromGeneration.length) {\n this.excludeFromGeneration(excludeFromGeneration);\n }\n\n let overrideToRegister = override;\n // Parse yaml if we receive a string\n if (typeof override === 'string') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n overrideToRegister = require('yaml').parse(overrideToRegister);\n }\n // receive an object we can register it directly\n registeredOverrides.push(overrideToRegister);\n },\n };\n};\n\nexport default createService;\n"],"names":["createService","strapi","registeredOverrides","excludedFromGeneration","excludeFromGeneration","api","Array","isArray","push","isEnabled","name","includes","registerOverride","override","opts","pluginOrigin","pluginsThatNeedDocumentation","getPluginsThatNeedDocumentation","config","get","length","overrideToRegister","require","parse"],"mappings":";;AAOA,MAAMA,aAAAA,GAAgB,CAAC,EAAEC,MAAM,EAA2B,GAAA;AACxD,IAAA,MAAMC,sBAA+C,EAAE;AACvD,IAAA,MAAMC,yBAAmC,EAAE;IAE3C,OAAO;AACLD,QAAAA,mBAAAA;AACAC,QAAAA,sBAAAA;AACA;;;AAGC,QACDC,uBAAsBC,GAAsB,EAAA;YAC1C,IAAIC,KAAAA,CAAMC,OAAO,CAACF,GAAAA,CAAAA,EAAM;AACtBF,gBAAAA,sBAAAA,CAAuBK,IAAI,CAAA,GAAIH,GAAAA,CAAAA;AAE/B,gBAAA;AACF,YAAA;AAEAF,YAAAA,sBAAAA,CAAuBK,IAAI,CAACH,GAAAA,CAAAA;AAC9B,QAAA,CAAA;AAEAI,QAAAA,SAAAA,CAAAA,CAAUC,IAAY,EAAA;YACpB,OAAOP,sBAAAA,CAAuBQ,QAAQ,CAACD,IAAAA,CAAAA;AACzC,QAAA,CAAA;QAEAE,gBAAAA,CAAAA,CACEC,QAA+B,EAC/BC,IAAiE,EAAA;YAEjE,MAAM,EAAEC,YAAY,EAAEX,qBAAAA,GAAwB,EAAE,EAAE,GAAGU,QAAQ,EAAC;AAE9D,YAAA,MAAME,+BAA+BC,+BAAAA,CACnChB,MAAAA,CAAOiB,MAAM,CAACC,GAAG,CAAC,uBAAA,CAAA,CAAA;;AAGpB,YAAA,IAAIJ,YAAAA,IAAgB,CAACC,4BAAAA,CAA6BL,QAAQ,CAACI,YAAAA,CAAAA,EAAe;YAE1E,IAAIX,qBAAAA,CAAsBgB,MAAM,EAAE;gBAChC,IAAI,CAAChB,qBAAqB,CAACA,qBAAAA,CAAAA;AAC7B,YAAA;AAEA,YAAA,IAAIiB,kBAAAA,GAAqBR,QAAAA;;YAEzB,IAAI,OAAOA,aAAa,QAAA,EAAU;;gBAEhCQ,kBAAAA,GAAqBC,OAAAA,CAAQ,MAAA,CAAA,CAAQC,KAAK,CAACF,kBAAAA,CAAAA;AAC7C,YAAA;;AAEAnB,YAAAA,mBAAAA,CAAoBM,IAAI,CAACa,kBAAAA,CAAAA;AAC3B,QAAA;AACF,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"override.mjs","sources":["../../../server/src/services/override.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { getPluginsThatNeedDocumentation } from './utils/get-plugins-that-need-documentation';\nimport type { PluginConfig } from '../types';\n\nexport type OverrideService = ReturnType<typeof createService>;\n\nconst createService = ({ strapi }: { strapi: Core.Strapi }) => {\n const registeredOverrides: Partial<PluginConfig>[] = [];\n const excludedFromGeneration: string[] = [];\n\n return {\n /**\n * The registered overrides, merged by `generateFullDoc` in registration order.\n *\n * @internal\n */\n registeredOverrides,\n /**\n * The APIs and plugins left out of the generated paths. Names are kept as given, duplicates\n * included.\n *\n * @internal\n */\n excludedFromGeneration,\n /**\n *\n * @param {(string | string[])} api - The name of the api or and array of apis to exclude from generation\n */\n excludeFromGeneration(api: string | string[]) {\n if (Array.isArray(api)) {\n excludedFromGeneration.push(...api);\n\n return;\n }\n\n excludedFromGeneration.push(api);\n },\n\n /**\n * Whether `name` is excluded from generation. Despite its name, `true` means excluded.\n *\n * @internal\n */\n isEnabled(name: string) {\n return excludedFromGeneration.includes(name);\n },\n\n registerOverride(\n override: Partial<PluginConfig>,\n opts?: { pluginOrigin: string; excludeFromGeneration?: string[] }\n ) {\n const { pluginOrigin, excludeFromGeneration = [] } = opts ?? {};\n\n const pluginsThatNeedDocumentation = getPluginsThatNeedDocumentation(\n strapi.config.get('plugin::documentation')\n );\n // Don't apply the override if the plugin is not in the list of plugins that need documentation\n if (pluginOrigin && !pluginsThatNeedDocumentation.includes(pluginOrigin)) return;\n\n if (excludeFromGeneration.length) {\n this.excludeFromGeneration(excludeFromGeneration);\n }\n\n let overrideToRegister = override;\n // Parse yaml if we receive a string\n if (typeof override === 'string') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n overrideToRegister = require('yaml').parse(overrideToRegister);\n }\n // receive an object we can register it directly\n // TODO @Nico text that parses to a scalar, an array or `null` is registered as is, so\n // `registeredOverrides` can hold more than OpenAPI parts; the exclusions above are also\n // applied before a parse error is thrown.\n registeredOverrides.push(overrideToRegister);\n },\n };\n};\n\nexport default createService;\n"],"names":["createService","strapi","registeredOverrides","excludedFromGeneration","excludeFromGeneration","api","Array","isArray","push","isEnabled","name","includes","registerOverride","override","opts","pluginOrigin","pluginsThatNeedDocumentation","getPluginsThatNeedDocumentation","config","get","length","overrideToRegister","require","parse"],"mappings":";;AAOA,MAAMA,aAAAA,GAAgB,CAAC,EAAEC,MAAM,EAA2B,GAAA;AACxD,IAAA,MAAMC,sBAA+C,EAAE;AACvD,IAAA,MAAMC,yBAAmC,EAAE;IAE3C,OAAO;AACL;;;;QAKAD,mBAAAA;AACA;;;;;QAMAC,sBAAAA;AACA;;;AAGC,QACDC,uBAAsBC,GAAsB,EAAA;YAC1C,IAAIC,KAAAA,CAAMC,OAAO,CAACF,GAAAA,CAAAA,EAAM;AACtBF,gBAAAA,sBAAAA,CAAuBK,IAAI,CAAA,GAAIH,GAAAA,CAAAA;AAE/B,gBAAA;AACF,YAAA;AAEAF,YAAAA,sBAAAA,CAAuBK,IAAI,CAACH,GAAAA,CAAAA;AAC9B,QAAA,CAAA;AAEA;;;;AAIC,QACDI,WAAUC,IAAY,EAAA;YACpB,OAAOP,sBAAAA,CAAuBQ,QAAQ,CAACD,IAAAA,CAAAA;AACzC,QAAA,CAAA;QAEAE,gBAAAA,CAAAA,CACEC,QAA+B,EAC/BC,IAAiE,EAAA;YAEjE,MAAM,EAAEC,YAAY,EAAEX,qBAAAA,GAAwB,EAAE,EAAE,GAAGU,QAAQ,EAAC;AAE9D,YAAA,MAAME,+BAA+BC,+BAAAA,CACnChB,MAAAA,CAAOiB,MAAM,CAACC,GAAG,CAAC,uBAAA,CAAA,CAAA;;AAGpB,YAAA,IAAIJ,YAAAA,IAAgB,CAACC,4BAAAA,CAA6BL,QAAQ,CAACI,YAAAA,CAAAA,EAAe;YAE1E,IAAIX,qBAAAA,CAAsBgB,MAAM,EAAE;gBAChC,IAAI,CAAChB,qBAAqB,CAACA,qBAAAA,CAAAA;AAC7B,YAAA;AAEA,YAAA,IAAIiB,kBAAAA,GAAqBR,QAAAA;;YAEzB,IAAI,OAAOA,aAAa,QAAA,EAAU;;gBAEhCQ,kBAAAA,GAAqBC,OAAAA,CAAQ,MAAA,CAAA,CAAQC,KAAK,CAACF,kBAAAA,CAAAA;AAC7C,YAAA;;;;;AAKAnB,YAAAA,mBAAAA,CAAoBM,IAAI,CAACa,kBAAAA,CAAAA;AAC3B,QAAA;AACF,KAAA;AACF;;;;"}
@@ -1,4 +1,4 @@
1
1
  export declare const config: {
2
- default: import("../types").PluginConfig;
2
+ default: import("..").PluginConfig;
3
3
  };
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/documentation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;;kBAwBL,GAAG,CAAC,OAAO;eAkBd,GAAG,CAAC,OAAO,QAAQ,GAAG,CAAC,IAAI;mBA4DvB,GAAG,CAAC,OAAO,QAAQ,GAAG,CAAC,IAAI;eA4C/B,GAAG,CAAC,OAAO;uBAwBH,GAAG,CAAC,OAAO;mBAwBf,GAAG,CAAC,OAAO;wBAwBN,GAAG,CAAC,OAAO;;AAnMvC,wBAoNE"}
1
+ {"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/documentation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;;kBA2BL,GAAG,CAAC,OAAO;eAkBd,GAAG,CAAC,OAAO,QAAQ,GAAG,CAAC,IAAI;mBA4DvB,GAAG,CAAC,OAAO,QAAQ,GAAG,CAAC,IAAI;eA4C/B,GAAG,CAAC,OAAO;uBA0BH,GAAG,CAAC,OAAO;mBAwBf,GAAG,CAAC,OAAO;wBAwBN,GAAG,CAAC,OAAO;;AArMvC,wBAsNE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,wBAEE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,wBAEwB"}
@@ -1,5 +1,8 @@
1
1
  import { bootstrap } from './bootstrap';
2
2
  import { register } from './register';
3
+ export type * from './types';
4
+ export type * from './types/services';
5
+ export type * from './types/controllers';
3
6
  declare const _default: {
4
7
  bootstrap: typeof bootstrap;
5
8
  config: {
@@ -52,7 +55,7 @@ declare const _default: {
52
55
  register: typeof register;
53
56
  services: {
54
57
  documentation: ({ strapi }: {
55
- strapi: import("@strapi/types/dist/core").Strapi;
58
+ strapi: import("@strapi/types/dist/core/strapi.js").Strapi;
56
59
  }) => {
57
60
  getDocumentationVersion(): string;
58
61
  getFullDocumentationPath(): string;
@@ -73,7 +76,7 @@ declare const _default: {
73
76
  generateFullDoc(versionOpt?: string): Promise<void>;
74
77
  };
75
78
  override: ({ strapi }: {
76
- strapi: import("@strapi/types/dist/core").Strapi;
79
+ strapi: import("@strapi/types/dist/core/strapi.js").Strapi;
77
80
  }) => {
78
81
  registeredOverrides: Partial<import("./types").PluginConfig>[];
79
82
  excludedFromGeneration: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAcuqB,CAAC;;;;;AAR9sB,wBAOE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAMtC,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,qBAAqB,CAAC;;;;;;;;;;;;;oBAU0B,CAAC;;;;;;;;uBAA6J,CAAC;oBAA6B,CAAC;;;;;;;;;;;;;gBAAoM,CAAC;uBAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAAihB,CAAC;;;;;AARx/B,wBAOE"}
@@ -1,10 +1,11 @@
1
- declare const _default: ({
1
+ import type Koa from 'koa';
2
+ declare const routes: ({
2
3
  method: string;
3
4
  path: string;
4
5
  handler: string;
5
6
  config: {
6
7
  auth: boolean;
7
- middlewares: ((ctx: import("koa").Context, next: import("koa").Next) => Promise<any>)[];
8
+ middlewares: ((ctx: Koa.Context, next: Koa.Next) => Promise<any>)[];
8
9
  policies?: undefined;
9
10
  };
10
11
  } | {
@@ -31,5 +32,5 @@ declare const _default: ({
31
32
  middlewares?: undefined;
32
33
  };
33
34
  })[];
34
- export default _default;
35
+ export default routes;
35
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBA+EE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAM3B,QAAA,MAAM,MAAM,EAAE,CACV;IACE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QACN,IAAI,EAAE,OAAO,CAAC;QACd,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACpE,QAAQ,CAAC,EAAE,SAAS,CAAC;KACtB,CAAC;CACH,GACD;IACE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QACN,IAAI,EAAE,OAAO,CAAC;QACd,WAAW,CAAC,EAAE,SAAS,CAAC;QACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;KACtB,CAAC;CACH,GACD;IACE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QACN,QAAQ,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE;gBAAE,OAAO,EAAE,MAAM,EAAE,CAAA;aAAE,CAAA;SAAE,EAAE,CAAC;QAC5D,IAAI,CAAC,EAAE,SAAS,CAAC;QACjB,WAAW,CAAC,EAAE,SAAS,CAAC;KACzB,CAAC;CACH,CACJ,EA+EqE,CAAC;AAEvE,eAAe,MAAM,CAAC"}
@@ -8,20 +8,53 @@ export type DocumentationService = ReturnType<typeof createService>;
8
8
  declare const createService: ({ strapi }: {
9
9
  strapi: Core.Strapi;
10
10
  }) => {
11
+ /**
12
+ * The documentation version of the plugin config (`info.version`).
13
+ *
14
+ * @internal
15
+ */
11
16
  getDocumentationVersion(): string;
17
+ /**
18
+ * The folder that holds one folder per generated version, each with its
19
+ * `full_documentation.json`.
20
+ *
21
+ * @internal
22
+ */
12
23
  getFullDocumentationPath(): string;
24
+ /**
25
+ * The generated versions. A version whose file cannot be read is left out.
26
+ *
27
+ * @internal
28
+ */
13
29
  getDocumentationVersions(): Version[];
14
30
  /**
15
31
  * Returns settings stored in core-store
32
+ *
33
+ * @internal
16
34
  */
17
35
  getDocumentationAccess(): Promise<{
18
36
  restrictedAccess: boolean;
19
37
  }>;
38
+ /**
39
+ * The documentation folder of an API (`getter: 'api'`) or of a plugin (`getter: 'plugin'`).
40
+ *
41
+ * @internal
42
+ */
20
43
  getApiDocumentationPath(api: {
21
44
  name: string;
22
45
  getter: string;
23
46
  }): string;
47
+ /**
48
+ * Removes the files of a version. A version that was never generated resolves without error.
49
+ *
50
+ * @internal
51
+ */
24
52
  deleteDocumentation(version: string): Promise<void>;
53
+ /**
54
+ * The APIs, then the documented plugins, with the names of their content types.
55
+ *
56
+ * @internal
57
+ */
25
58
  getPluginAndApiInfo(): {
26
59
  name: string;
27
60
  getter: string;
@@ -29,6 +62,8 @@ declare const createService: ({ strapi }: {
29
62
  }[];
30
63
  /**
31
64
  * @description - Creates the Swagger json files
65
+ *
66
+ * @internal
32
67
  */
33
68
  generateFullDoc(versionOpt?: string): Promise<void>;
34
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../../../server/src/services/documentation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQ1C,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpE,QAAA,MAAM,aAAa,GAAI,YAAY;IAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAA;CAAE;;;gCAqB1B,OAAO,EAAE;IAuBrC;;OAEG;;;;iCAY0B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;iCAc1B,MAAM;;;;;;IA6BzC;;OAEG;iCACgC,MAAM;CA6G5C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../../../server/src/services/documentation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQ1C,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpE,QAAA,MAAM,aAAa,GAAI,YAAY;IAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAA;CAAE;IAMtD;;;;OAIG;;IAKH;;;;;OAKG;;IAYH;;;;OAIG;gCACyB,OAAO,EAAE;IAuBrC;;;;OAIG;;;;IAYH;;;;OAIG;iCAC0B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAc7D;;;;OAIG;iCACgC,MAAM;IASzC;;;;OAIG;;;;;;IAqBH;;;;OAIG;iCACgC,MAAM;CAmH5C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import type { Api } from '../../types';
2
- declare const buildComponentSchema: (api: Api) => {};
2
+ declare const getRelationTargetSchemaNames: (api: Api) => Map<string, string>;
3
+ declare const buildComponentSchema: (api: Api, relationTargetSchemaNames?: Map<string, string>) => {};
3
4
  export default buildComponentSchema;
5
+ export { getRelationTargetSchemaNames };
4
6
  //# sourceMappingURL=build-component-schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-component-schema.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/helpers/build-component-schema.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,GAAG,EAAW,MAAM,aAAa,CAAC;AAgJhD,QAAA,MAAM,oBAAoB,GAAI,KAAK,GAAG,OAKrC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"build-component-schema.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/helpers/build-component-schema.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,GAAG,EAAW,MAAM,aAAa,CAAC;AAwJhD,QAAA,MAAM,4BAA4B,GAAI,KAAK,GAAG,wBAS7C,CAAC;AAEF,QAAA,MAAM,oBAAoB,GACxB,KAAK,GAAG,EACR,+CAA6D,OAQ9D,CAAC;AAEF,eAAe,oBAAoB,CAAC;AACpC,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import builApiEndpointPath from './build-api-endpoint-path';
2
- import buildComponentSchema from './build-component-schema';
3
- export { builApiEndpointPath, buildComponentSchema };
2
+ import buildComponentSchema, { getRelationTargetSchemaNames } from './build-component-schema';
3
+ export { builApiEndpointPath, buildComponentSchema, getRelationTargetSchemaNames };
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,2BAA2B,CAAC;AAC5D,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,2BAA2B,CAAC;AAC5D,OAAO,oBAAoB,EAAE,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAE9F,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import type { Struct } from '@strapi/types';
2
2
  import type { OpenAPIV3 } from 'openapi-types';
3
3
  interface Options {
4
- typeMap?: Map<string, boolean>;
5
4
  isRequest?: boolean;
5
+ relationTargetSchemaNames?: Map<string, string>;
6
6
  didAddStrapiComponentsToSchemas: (name: string, schema: object) => boolean;
7
7
  }
8
8
  /**
@@ -10,6 +10,6 @@ interface Options {
10
10
  *
11
11
  * @returns Attributes using OpenAPI acceptable data types
12
12
  */
13
- declare const cleanSchemaAttributes: (attributes: Struct.SchemaAttributes, { typeMap, isRequest, didAddStrapiComponentsToSchemas }: Options) => Record<string, OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject>;
13
+ declare const cleanSchemaAttributes: (attributes: Struct.SchemaAttributes, { isRequest, relationTargetSchemaNames, didAddStrapiComponentsToSchemas }: Options) => Record<string, OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject>;
14
14
  export default cleanSchemaAttributes;
15
15
  //# sourceMappingURL=clean-schema-attributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clean-schema-attributes.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/helpers/utils/clean-schema-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C,UAAU,OAAO;IACf,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+BAA+B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5E;AAgBD;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,GACzB,YAAY,MAAM,CAAC,gBAAgB,EACnC,yDAA6E,OAAO,KACnF,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,GAAG,SAAS,CAAC,eAAe,CA+NnE,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"clean-schema-attributes.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/helpers/utils/clean-schema-attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C,UAAU,OAAO;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,+BAA+B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5E;AAgBD;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,GACzB,YAAY,MAAM,CAAC,gBAAgB,EACnC,2EAAmF,OAAO,KACzF,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,GAAG,SAAS,CAAC,eAAe,CAmOnE,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"loop-content-type-names.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/helpers/utils/loop-content-type-names.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,QAAA,MAAM,oBAAoB,GAAI,KAAK,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,KAAK,GAAG,OA2CvE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"loop-content-type-names.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/helpers/utils/loop-content-type-names.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,QAAA,MAAM,oBAAoB,GAAI,KAAK,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,KAAK,GAAG,OA4CvE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"query-params.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/helpers/utils/query-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,QAAA,MAAM,MAAM,EAAE,SAAS,CAAC,eAAe,EAuGtC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"query-params.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/helpers/utils/query-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,QAAA,MAAM,MAAM,EAAE,SAAS,CAAC,eAAe,EA+GtC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,8 +1,9 @@
1
+ import type { Core } from '@strapi/types';
1
2
  import { type DocumentationService } from './documentation';
2
3
  import { type OverrideService } from './override';
3
4
  declare const _default: {
4
5
  documentation: ({ strapi }: {
5
- strapi: import("@strapi/types/dist/core").Strapi;
6
+ strapi: Core.Strapi;
6
7
  }) => {
7
8
  getDocumentationVersion(): string;
8
9
  getFullDocumentationPath(): string;
@@ -23,13 +24,13 @@ declare const _default: {
23
24
  generateFullDoc(versionOpt?: string): Promise<void>;
24
25
  };
25
26
  override: ({ strapi }: {
26
- strapi: import("@strapi/types/dist/core").Strapi;
27
+ strapi: Core.Strapi;
27
28
  }) => {
28
- registeredOverrides: Partial<import("../types").PluginConfig>[];
29
+ registeredOverrides: Partial<import("..").PluginConfig>[];
29
30
  excludedFromGeneration: string[];
30
31
  excludeFromGeneration(api: string | string[]): void;
31
32
  isEnabled(name: string): boolean;
32
- registerOverride(override: Partial<import("../types").PluginConfig>, opts?: {
33
+ registerOverride(override: Partial<import("..").PluginConfig>, opts?: {
33
34
  pluginOrigin: string;
34
35
  excludeFromGeneration?: string[];
35
36
  }): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings":"AAEA,OAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAW+nB,CAAC;;;;AAT5rB,wBAGE;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,aAAa,EAAE,oBAAoB,CAAC;IACpC,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAK1C,OAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAiBuvB,CAAC;;;;AATpzB,wBAG6C;AAE7C,MAAM,MAAM,QAAQ,GAAG;IACrB,aAAa,EAAE,oBAAoB,CAAC;IACpC,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC"}
@@ -4,13 +4,29 @@ export type OverrideService = ReturnType<typeof createService>;
4
4
  declare const createService: ({ strapi }: {
5
5
  strapi: Core.Strapi;
6
6
  }) => {
7
+ /**
8
+ * The registered overrides, merged by `generateFullDoc` in registration order.
9
+ *
10
+ * @internal
11
+ */
7
12
  registeredOverrides: Partial<PluginConfig>[];
13
+ /**
14
+ * The APIs and plugins left out of the generated paths. Names are kept as given, duplicates
15
+ * included.
16
+ *
17
+ * @internal
18
+ */
8
19
  excludedFromGeneration: string[];
9
20
  /**
10
21
  *
11
22
  * @param {(string | string[])} api - The name of the api or and array of apis to exclude from generation
12
23
  */
13
24
  excludeFromGeneration(api: string | string[]): void;
25
+ /**
26
+ * Whether `name` is excluded from generation. Despite its name, `true` means excluded.
27
+ *
28
+ * @internal
29
+ */
14
30
  isEnabled(name: string): boolean;
15
31
  registerOverride(override: Partial<PluginConfig>, opts?: {
16
32
  pluginOrigin: string;
@@ -1 +1 @@
1
- {"version":3,"file":"override.d.ts","sourceRoot":"","sources":["../../../../server/src/services/override.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAE/D,QAAA,MAAM,aAAa,GAAI,YAAY;IAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAA;CAAE;;;IAOtD;;;OAGG;+BACwB,MAAM,GAAG,MAAM,EAAE;oBAU5B,MAAM;+BAKV,OAAO,CAAC,YAAY,CAAC,SACxB;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE;CAwBtE,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"override.d.ts","sourceRoot":"","sources":["../../../../server/src/services/override.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAE/D,QAAA,MAAM,aAAa,GAAI,YAAY;IAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAA;CAAE;IAKtD;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;OAGG;+BACwB,MAAM,GAAG,MAAM,EAAE;IAU5C;;;;OAIG;oBACa,MAAM;+BAKV,OAAO,CAAC,YAAY,CAAC,SACxB;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE;CA2BtE,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { Core } from '@strapi/types';
2
+ /** Actions serving the documentation page and its login, and admin actions on the documentation. */
3
+ export type DocumentationController = {
4
+ getInfos: Core.ControllerHandler;
5
+ index: Core.ControllerHandler;
6
+ loginView: Core.ControllerHandler;
7
+ login: Core.ControllerHandler;
8
+ regenerateDoc: Core.ControllerHandler;
9
+ deleteDoc: Core.ControllerHandler;
10
+ updateSettings: Core.ControllerHandler;
11
+ };
12
+ /** The controller contracts by name, as in the plugin's controllers map. Used to check the routes. */
13
+ export type Controllers = {
14
+ documentation: DocumentationController;
15
+ };
16
+ /** Default controller contracts loaded with the Documentation server types. */
17
+ declare global {
18
+ namespace Strapi {
19
+ namespace Registries {
20
+ interface PackageControllers {
21
+ 'plugin::documentation.documentation': Controllers['documentation'];
22
+ }
23
+ }
24
+ }
25
+ }
26
+ //# sourceMappingURL=controllers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controllers.d.ts","sourceRoot":"","sources":["../../../../server/src/types/controllers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,oGAAoG;AACpG,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,IAAI,CAAC,iBAAiB,CAAC;IACjC,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC;IAC9B,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC;IAClC,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC;IAC9B,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC;IACtC,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC;CACxC,CAAC;AAEF,sGAAsG;AACtG,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE,uBAAuB,CAAC;CACxC,CAAC;AAEF,+EAA+E;AAC/E,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,MAAM,CAAC;QAEf,UAAU,UAAU,CAAC;YACnB,UAAU,kBAAkB;gBAC1B,qCAAqC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;aACrE;SACF;KACF;CACF"}
@@ -0,0 +1,47 @@
1
+ import type { Services } from '../services';
2
+ import type { Config, PluginConfig } from '../types';
3
+ export type { Services } from '../services';
4
+ /**
5
+ * The registered `override` service: lets plugins and applications add their own OpenAPI parts to
6
+ * the generated documentation.
7
+ */
8
+ export type OverrideService = Omit<Services['override'], 'registerOverride'> & {
9
+ /**
10
+ * Registers an OpenAPI part merged into every generated documentation version, or only into the
11
+ * version its `info.version` names.
12
+ *
13
+ * @param override - The OpenAPI part, or its YAML or JSON text. Text is parsed when it is
14
+ * registered, and a parse error is thrown to the caller.
15
+ * @param opts.pluginOrigin - The plugin the override documents. The override is skipped when that
16
+ * plugin is not in the documented plugins.
17
+ * @param opts.excludeFromGeneration - APIs and plugins left out of the generated paths, as
18
+ * `excludeFromGeneration` does.
19
+ */
20
+ registerOverride(override: Partial<PluginConfig> | string, opts?: {
21
+ pluginOrigin?: string;
22
+ excludeFromGeneration?: string[];
23
+ }): void;
24
+ };
25
+ /** Default contracts loaded with the Documentation server types. */
26
+ declare global {
27
+ namespace Strapi {
28
+ namespace Registries {
29
+ /** The plugin config merged with its defaults. */
30
+ interface PackageConfigs {
31
+ 'plugin::documentation': PluginConfig;
32
+ }
33
+ /**
34
+ * The access settings of the documentation page, written with `restrictedAccess: false` at the
35
+ * first start. `password` is the bcrypt hash of the access password, missing until one is set.
36
+ */
37
+ interface Stores {
38
+ plugin_documentation_config: Config;
39
+ }
40
+ interface PackageServices {
41
+ 'plugin::documentation.documentation': Services['documentation'];
42
+ 'plugin::documentation.override': OverrideService;
43
+ }
44
+ }
45
+ }
46
+ }
47
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../server/src/types/services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAErD,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,GAAG;IAC7E;;;;;;;;;;OAUG;IACH,gBAAgB,CACd,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,MAAM,EACxC,IAAI,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GACjE,IAAI,CAAC;CACT,CAAC;AAEF,oEAAoE;AACpE,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,MAAM,CAAC;QAEf,UAAU,UAAU,CAAC;YACnB,kDAAkD;YAClD,UAAU,cAAc;gBACtB,uBAAuB,EAAE,YAAY,CAAC;aACvC;YAED;;;eAGG;YACH,UAAU,MAAM;gBACd,2BAA2B,EAAE,MAAM,CAAC;aACrC;YAED,UAAU,eAAe;gBACvB,qCAAqC,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;gBACjE,gCAAgC,EAAE,eAAe,CAAC;aACnD;SACF;KACF;CACF"}
@@ -14,6 +14,7 @@ export type PluginConfig = OpenAPIV3.Document & {
14
14
  };
15
15
  };
16
16
  export interface ApiInfo {
17
+ uid: string;
17
18
  routeInfo: Core.Router;
18
19
  attributes: Struct.SchemaAttributes;
19
20
  uniqueName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../server/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,MAAM;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,QAAQ,GAAG;IAC9C,IAAI,EAAE,SAAS,CAAC,UAAU,GAAG;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,iBAAiB,EAAE;QACjB,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACzB,mBAAmB,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;KAClF,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,GAAG,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../server/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,MAAM;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,QAAQ,GAAG;IAC9C,IAAI,EAAE,SAAS,CAAC,UAAU,GAAG;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,iBAAiB,EAAE;QACjB,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACzB,mBAAmB,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;KAClF,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,GAAG,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-documentation",
3
- "version": "0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282",
3
+ "version": "0.0.0-experimental.63624e21eb5b0713345a0cf2f68f1c40eab427bc",
4
4
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
5
5
  "homepage": "https://strapi.io",
6
6
  "bugs": {
@@ -52,24 +52,25 @@
52
52
  "build:types:server": "run -T tsc -p server/tsconfig.build.json --emitDeclarationOnly",
53
53
  "build:types:admin": "run -T tsc -p admin/tsconfig.build.json --emitDeclarationOnly",
54
54
  "clean": "run -T rimraf ./dist",
55
- "lint": "run -T eslint .",
55
+ "lint": "run -T eslint . --max-warnings=0",
56
56
  "test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
57
57
  "test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
58
58
  "test:ts:front": "run -T tsc -p admin/tsconfig.json",
59
- "test:ts:back": "run -T tsc --noEmit -p server/tsconfig.json",
59
+ "test:ts:back": "run -T tsc -p server/tsconfig.json",
60
60
  "test:unit": "run -T jest --verbose",
61
61
  "test:unit:watch": "run -T jest --watch",
62
62
  "watch": "run -T rollup -c -w"
63
63
  },
64
64
  "dependencies": {
65
65
  "@reduxjs/toolkit": "1.9.7",
66
- "@strapi/admin": "0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282",
67
- "@strapi/design-system": "2.2.1",
68
- "@strapi/icons": "2.2.1",
69
- "@strapi/utils": "0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282",
66
+ "@strapi/admin": "0.0.0-experimental.63624e21eb5b0713345a0cf2f68f1c40eab427bc",
67
+ "@strapi/design-system": "2.2.4",
68
+ "@strapi/icons": "2.2.4",
69
+ "@strapi/types": "0.0.0-experimental.63624e21eb5b0713345a0cf2f68f1c40eab427bc",
70
+ "@strapi/utils": "0.0.0-experimental.63624e21eb5b0713345a0cf2f68f1c40eab427bc",
70
71
  "bcryptjs": "2.4.3",
71
72
  "cheerio": "^1.2.0",
72
- "formik": "2.4.5",
73
+ "formik": "2.4.9",
73
74
  "fs-extra": "11.3.4",
74
75
  "immer": "9.0.21",
75
76
  "koa-static": "^5.0.0",
@@ -82,14 +83,18 @@
82
83
  },
83
84
  "devDependencies": {
84
85
  "@apidevtools/swagger-parser": "^10.1.0",
85
- "@strapi/admin-test-utils": "0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282",
86
- "@strapi/strapi": "0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282",
87
- "@strapi/types": "0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282",
86
+ "@strapi/admin-test-utils": "0.0.0-experimental.63624e21eb5b0713345a0cf2f68f1c40eab427bc",
87
+ "@strapi/strapi": "0.0.0-experimental.63624e21eb5b0713345a0cf2f68f1c40eab427bc",
88
+ "@testing-library/dom": "10.4.1",
89
+ "@testing-library/jest-dom": "6.9.1",
88
90
  "@testing-library/react": "16.3.2",
89
91
  "@testing-library/user-event": "14.6.1",
90
92
  "@types/fs-extra": "11.0.4",
93
+ "@types/jest": "29.5.2",
91
94
  "@types/koa": "2.15.2",
95
+ "@types/node": "20.19.41",
92
96
  "@types/swagger-ui-dist": "3.30.4",
97
+ "jest": "29.6.0",
93
98
  "koa": "2.16.4",
94
99
  "koa-body": "6.0.1",
95
100
  "koa-session": "7.0.2",
@@ -97,18 +102,18 @@
97
102
  "openapi-types": "12.1.3",
98
103
  "react": "18.3.1",
99
104
  "react-dom": "18.3.1",
100
- "react-router-dom": "6.30.3",
105
+ "react-router-dom": "6.30.6",
101
106
  "styled-components": "6.4.1"
102
107
  },
103
108
  "peerDependencies": {
104
- "@strapi/strapi": "0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282",
105
- "react": "^17.0.0 || ^18.0.0",
106
- "react-dom": "^17.0.0 || ^18.0.0",
109
+ "@strapi/strapi": "0.0.0-experimental.63624e21eb5b0713345a0cf2f68f1c40eab427bc",
110
+ "react": "^18.0.0",
111
+ "react-dom": "^18.0.0",
107
112
  "react-router-dom": "^6.30.3",
108
113
  "styled-components": "^6.0.0"
109
114
  },
110
115
  "engines": {
111
- "node": ">=20.19.0 <=26.x.x",
116
+ "node": ">=20.0.0 <=26.x.x",
112
117
  "npm": ">=6.0.0"
113
118
  },
114
119
  "strapi": {
@@ -116,5 +121,12 @@
116
121
  "name": "documentation",
117
122
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
118
123
  "kind": "plugin"
124
+ },
125
+ "typesVersions": {
126
+ "*": {
127
+ "strapi-server": [
128
+ "dist/server/src/index.d.ts"
129
+ ]
130
+ }
119
131
  }
120
132
  }