@strapi/plugin-documentation 4.2.0-alpha.O → 4.2.0-beta.2

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.
@@ -167,7 +167,7 @@ const PluginPage = () => {
167
167
  icon={<Trash />}
168
168
  label={formatMessage(
169
169
  {
170
- id: getTrad('pages.PluginPage.table.icon.delete'),
170
+ id: 'global.delete-target',
171
171
  defaultMessage: 'Delete {target}',
172
172
  },
173
173
  { target: `${doc.version}` }
@@ -92,7 +92,7 @@ const SettingsPage = () => {
92
92
  <Stack spacing={4}>
93
93
  <Typography variant="delta" as="h2">
94
94
  {formatMessage({
95
- id: getTrad('pages.SettingsPage.title'),
95
+ id: 'global.settings',
96
96
  defaultMessage: 'Settings',
97
97
  })}
98
98
  </Typography>
@@ -125,7 +125,7 @@ const SettingsPage = () => {
125
125
  <GridItem col={6} s={12}>
126
126
  <TextInput
127
127
  label={formatMessage({
128
- id: getTrad('pages.SettingsPage.password.label'),
128
+ id: 'global.password',
129
129
  defaultMessage: 'Password',
130
130
  })}
131
131
  name="password"
@@ -26,14 +26,11 @@
26
26
  "pages.PluginPage.Button.open": "Åben dokumentation",
27
27
  "pages.PluginPage.header.description": "Konfigurér dokumentations pluginnet",
28
28
  "pages.PluginPage.table.generated": "Sidst genereret",
29
- "pages.PluginPage.table.icon.delete": "Slet {target}",
30
29
  "pages.PluginPage.table.icon.regenerate": "Regenerér {target}",
31
30
  "pages.PluginPage.table.icon.show": "Åben {target}",
32
31
  "pages.PluginPage.table.version": "Version",
33
32
  "pages.SettingsPage.Button.description": "Konfigurér dokumentations pluginnet",
34
33
  "pages.SettingsPage.header.save": "Gem",
35
- "pages.SettingsPage.password.label": "Kodeord",
36
- "pages.SettingsPage.title": "Indstillinger",
37
34
  "pages.SettingsPage.toggle.hint": "Gør dokumentationens endpoint privat",
38
35
  "pages.SettingsPage.toggle.label": "Begrænset adgang",
39
36
  "plugin.description.long": "Opret et OpenAPI dokument og visualisér dit API med SWAGGER UI.",
@@ -26,14 +26,11 @@
26
26
  "pages.PluginPage.Button.open": "Open documentation",
27
27
  "pages.PluginPage.header.description": "Configure the documentation plugin",
28
28
  "pages.PluginPage.table.generated": "Last generated",
29
- "pages.PluginPage.table.icon.delete": "Delete {target}",
30
29
  "pages.PluginPage.table.icon.regenerate": "Regenerate {target}",
31
30
  "pages.PluginPage.table.icon.show": "Open {target}",
32
31
  "pages.PluginPage.table.version": "Version",
33
32
  "pages.SettingsPage.Button.description": "Configure the documentation plugin",
34
33
  "pages.SettingsPage.header.save": "Save",
35
- "pages.SettingsPage.password.label": "Password",
36
- "pages.SettingsPage.title": "Settings",
37
34
  "pages.SettingsPage.toggle.hint": "Make the documentation endpoint private",
38
35
  "pages.SettingsPage.toggle.label": "Restricted Access",
39
36
  "plugin.description.long": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
@@ -26,14 +26,11 @@
26
26
  "pages.PluginPage.Button.open": "Abrir documentación",
27
27
  "pages.PluginPage.header.description": "Configura el plugin de documentación",
28
28
  "pages.PluginPage.table.generated": "Último generado",
29
- "pages.PluginPage.table.icon.delete": "Eliminar {target}",
30
29
  "pages.PluginPage.table.icon.regenerate": "Regenerar {target}",
31
30
  "pages.PluginPage.table.icon.show": "Abrir {target}",
32
31
  "pages.PluginPage.table.version": "Versión",
33
32
  "pages.SettingsPage.Button.description": "Configura el plugin de documentación",
34
33
  "pages.SettingsPage.header.save": "Guardar",
35
- "pages.SettingsPage.password.label": "Contraseña",
36
- "pages.SettingsPage.title": "Ajustes",
37
34
  "pages.SettingsPage.toggle.hint": "Hacer que la documentación sea privada",
38
35
  "pages.SettingsPage.toggle.label": "Acceso restringido",
39
36
  "plugin.description.long": "Cree un documento OpenAPI y visualice su API con SWAGGER UI.",
@@ -26,14 +26,11 @@
26
26
  "pages.PluginPage.Button.open": "도큐멘테이션 열기",
27
27
  "pages.PluginPage.header.description": "도큐멘테이션 플러그인 설정",
28
28
  "pages.PluginPage.table.generated": "최종 생성일",
29
- "pages.PluginPage.table.icon.delete": "{target} 삭제",
30
29
  "pages.PluginPage.table.icon.regenerate": "{target} 재생성",
31
30
  "pages.PluginPage.table.icon.show": "{target} 열기",
32
31
  "pages.PluginPage.table.version": "버전",
33
32
  "pages.SettingsPage.Button.description": "도큐멘테이션 플러그인 설정",
34
33
  "pages.SettingsPage.header.save": "저장",
35
- "pages.SettingsPage.password.label": "비밀번호",
36
- "pages.SettingsPage.title": "설정",
37
34
  "pages.SettingsPage.toggle.hint": "도큐멘테이션 엔드포인트를 비공개로 설정합니다.",
38
35
  "pages.SettingsPage.toggle.label": "액세스 제한",
39
36
  "plugin.description.long": "SWAGER UI를 사용하여 오픈 API 문서를 만들고 API를 시각화합니다.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-documentation",
3
- "version": "4.2.0-alpha.O",
3
+ "version": "4.2.0-beta.2",
4
4
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,8 +24,8 @@
24
24
  "test": "echo \"no tests yet\""
25
25
  },
26
26
  "dependencies": {
27
- "@strapi/helper-plugin": "4.2.0-alpha.O",
28
- "@strapi/utils": "4.2.0-alpha.O",
27
+ "@strapi/helper-plugin": "4.2.0-beta.2",
28
+ "@strapi/utils": "4.2.0-beta.2",
29
29
  "bcryptjs": "2.4.3",
30
30
  "cheerio": "^1.0.0-rc.5",
31
31
  "fs-extra": "10.0.0",
@@ -57,5 +57,5 @@
57
57
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
58
58
  "kind": "plugin"
59
59
  },
60
- "gitHead": "0e1f1ae08565a5f2427753582f37645a43c00cb2"
60
+ "gitHead": "bff73257e7695d6f361c91dda8cc810a2bb70b6e"
61
61
  }
@@ -49,7 +49,7 @@ module.exports = {
49
49
  .getDocumentationVersion();
50
50
 
51
51
  const openAPISpecsPath = path.join(
52
- strapi.dirs.extensions,
52
+ strapi.dirs.app.extensions,
53
53
  'documentation',
54
54
  'documentation',
55
55
  version,
@@ -69,7 +69,7 @@ module.exports = {
69
69
 
70
70
  try {
71
71
  const layoutPath = path.resolve(
72
- strapi.dirs.extensions,
72
+ strapi.dirs.app.extensions,
73
73
  'documentation',
74
74
  'public',
75
75
  'index.html'
@@ -81,7 +81,11 @@ module.exports = {
81
81
  ctx.url = path.basename(`${ctx.url}/index.html`);
82
82
 
83
83
  try {
84
- const staticFolder = path.resolve(strapi.dirs.extensions, 'documentation', 'public');
84
+ const staticFolder = path.resolve(
85
+ strapi.dirs.app.extensions,
86
+ 'documentation',
87
+ 'public'
88
+ );
85
89
  return koaStatic(staticFolder)(ctx, next);
86
90
  } catch (e) {
87
91
  strapi.log.error(e);
@@ -116,7 +120,7 @@ module.exports = {
116
120
 
117
121
  try {
118
122
  const layoutPath = path.resolve(
119
- strapi.dirs.extensions,
123
+ strapi.dirs.app.extensions,
120
124
  'documentation',
121
125
  'public',
122
126
  'login.html'
@@ -127,7 +131,7 @@ module.exports = {
127
131
  ctx.url = path.basename(`${ctx.url}/login.html`);
128
132
 
129
133
  try {
130
- const staticFolder = path.resolve(strapi.dirs.extensions, 'documentation', 'public');
134
+ const staticFolder = path.resolve(strapi.dirs.app.extensions, 'documentation', 'public');
131
135
  return koaStatic(staticFolder)(ctx, next);
132
136
  } catch (e) {
133
137
  strapi.log.error(e);
@@ -17,11 +17,12 @@ module.exports = ({ strapi }) => {
17
17
  },
18
18
 
19
19
  getFullDocumentationPath() {
20
- return path.join(strapi.dirs.extensions, 'documentation', 'documentation');
20
+ return path.join(strapi.dirs.app.extensions, 'documentation', 'documentation');
21
21
  },
22
22
 
23
23
  getCustomDocumentationPath() {
24
- return path.join(strapi.dirs.extensions, 'documentation', 'config', 'settings.json');
24
+ // ??
25
+ return path.join(strapi.dirs.app.extensions, 'documentation', 'config', 'settings.json');
25
26
  },
26
27
 
27
28
  getDocumentationVersions() {
@@ -71,10 +72,10 @@ module.exports = ({ strapi }) => {
71
72
  */
72
73
  getApiDocumentationPath(api) {
73
74
  if (api.getter === 'plugin') {
74
- return path.join(strapi.dirs.extensions, api.name, 'documentation');
75
+ return path.join(strapi.dirs.app.extensions, api.name, 'documentation');
75
76
  }
76
77
 
77
- return path.join(strapi.dirs.api, api.name, 'documentation');
78
+ return path.join(strapi.dirs.app.api, api.name, 'documentation');
78
79
  },
79
80
 
80
81
  async deleteDocumentation(version) {
@@ -172,8 +172,8 @@ module.exports = api => {
172
172
 
173
173
  paths = {
174
174
  ...paths,
175
- ...getPaths(apiInfo).paths
176
- }
175
+ ...getPaths(apiInfo).paths,
176
+ };
177
177
  }
178
178
 
179
179
  return { paths };