@strapi/plugin-documentation 4.11.0-alpha.0 → 4.11.0-beta.1

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.
@@ -64,6 +64,53 @@ describe('Plugin | Documentation | PluginPage', () => {
64
64
  await waitFor(() => expect(screen.getByText('1.0.0')).toBeInTheDocument());
65
65
 
66
66
  expect(firstChild).toMatchInlineSnapshot(`
67
+ .c36 {
68
+ border: 0;
69
+ -webkit-clip: rect(0 0 0 0);
70
+ clip: rect(0 0 0 0);
71
+ height: 1px;
72
+ margin: -1px;
73
+ overflow: hidden;
74
+ padding: 0;
75
+ position: absolute;
76
+ width: 1px;
77
+ }
78
+
79
+ .c9 {
80
+ font-weight: 600;
81
+ font-size: 2rem;
82
+ line-height: 1.25;
83
+ color: #32324d;
84
+ }
85
+
86
+ .c14 {
87
+ font-size: 0.75rem;
88
+ line-height: 1.33;
89
+ font-weight: 600;
90
+ line-height: 0;
91
+ color: #ffffff;
92
+ }
93
+
94
+ .c15 {
95
+ font-size: 1rem;
96
+ line-height: 1.5;
97
+ color: #666687;
98
+ }
99
+
100
+ .c27 {
101
+ font-weight: 600;
102
+ font-size: 0.6875rem;
103
+ line-height: 1.45;
104
+ text-transform: uppercase;
105
+ color: #666687;
106
+ }
107
+
108
+ .c31 {
109
+ font-size: 0.875rem;
110
+ line-height: 1.43;
111
+ color: #32324d;
112
+ }
113
+
67
114
  .c1 {
68
115
  padding-bottom: 56px;
69
116
  }
@@ -126,40 +173,6 @@ describe('Plugin | Documentation | PluginPage', () => {
126
173
  cursor: pointer;
127
174
  }
128
175
 
129
- .c9 {
130
- font-weight: 600;
131
- font-size: 2rem;
132
- line-height: 1.25;
133
- color: #32324d;
134
- }
135
-
136
- .c14 {
137
- font-size: 0.75rem;
138
- line-height: 1.33;
139
- font-weight: 600;
140
- color: #ffffff;
141
- }
142
-
143
- .c15 {
144
- font-size: 1rem;
145
- line-height: 1.5;
146
- color: #666687;
147
- }
148
-
149
- .c27 {
150
- font-weight: 600;
151
- font-size: 0.6875rem;
152
- line-height: 1.45;
153
- text-transform: uppercase;
154
- color: #666687;
155
- }
156
-
157
- .c31 {
158
- font-size: 0.875rem;
159
- line-height: 1.43;
160
- color: #32324d;
161
- }
162
-
163
176
  .c5 {
164
177
  -webkit-align-items: center;
165
178
  -webkit-box-align: center;
@@ -292,18 +305,6 @@ describe('Plugin | Documentation | PluginPage', () => {
292
305
  border: 2px solid #4945ff;
293
306
  }
294
307
 
295
- .c36 {
296
- border: 0;
297
- -webkit-clip: rect(0 0 0 0);
298
- clip: rect(0 0 0 0);
299
- height: 1px;
300
- margin: -1px;
301
- overflow: hidden;
302
- padding: 0;
303
- position: absolute;
304
- width: 1px;
305
- }
306
-
307
308
  .c13 {
308
309
  height: 2rem;
309
310
  }
@@ -56,61 +56,16 @@ describe('Plugin | Documentation | SettingsPage', () => {
56
56
  });
57
57
 
58
58
  expect(firstChild).toMatchInlineSnapshot(`
59
- .c1 {
60
- background: #f6f6f9;
61
- padding-top: 40px;
62
- padding-right: 56px;
63
- padding-bottom: 40px;
64
- padding-left: 56px;
65
- }
66
-
67
- .c3 {
68
- min-width: 0;
69
- }
70
-
71
- .c7 {
72
- background: #4945ff;
73
- padding: 8px;
74
- padding-right: 16px;
75
- padding-left: 16px;
76
- border-radius: 4px;
77
- border-color: #4945ff;
78
- border: 1px solid #4945ff;
79
- cursor: pointer;
80
- }
81
-
82
- .c13 {
83
- padding-right: 56px;
84
- padding-left: 56px;
85
- }
86
-
87
- .c14 {
88
- background: #ffffff;
89
- padding-top: 24px;
90
- padding-right: 32px;
91
- padding-bottom: 24px;
92
- padding-left: 32px;
93
- border-radius: 4px;
94
- box-shadow: 0px 1px 4px rgba(33,33,52,0.1);
95
- }
96
-
97
- .c25 {
98
- background: #f6f6f9;
99
- padding: 4px;
100
- border-radius: 4px;
101
- border-style: solid;
102
- border-width: 1px;
103
- border-color: #dcdce4;
104
- display: -webkit-box;
105
- display: -webkit-flex;
106
- display: -ms-flexbox;
107
- display: flex;
108
- }
109
-
110
- .c27 {
111
- padding-right: 12px;
112
- padding-left: 12px;
113
- border-radius: 4px;
59
+ .c24 {
60
+ border: 0;
61
+ -webkit-clip: rect(0 0 0 0);
62
+ clip: rect(0 0 0 0);
63
+ height: 1px;
64
+ margin: -1px;
65
+ overflow: hidden;
66
+ padding: 0;
67
+ position: absolute;
68
+ width: 1px;
114
69
  }
115
70
 
116
71
  .c6 {
@@ -124,6 +79,7 @@ describe('Plugin | Documentation | SettingsPage', () => {
124
79
  font-size: 0.75rem;
125
80
  line-height: 1.33;
126
81
  font-weight: 600;
82
+ line-height: 0;
127
83
  color: #ffffff;
128
84
  }
129
85
 
@@ -169,6 +125,63 @@ describe('Plugin | Documentation | SettingsPage', () => {
169
125
  color: #666687;
170
126
  }
171
127
 
128
+ .c1 {
129
+ background: #f6f6f9;
130
+ padding-top: 40px;
131
+ padding-right: 56px;
132
+ padding-bottom: 40px;
133
+ padding-left: 56px;
134
+ }
135
+
136
+ .c3 {
137
+ min-width: 0;
138
+ }
139
+
140
+ .c7 {
141
+ background: #4945ff;
142
+ padding: 8px;
143
+ padding-right: 16px;
144
+ padding-left: 16px;
145
+ border-radius: 4px;
146
+ border-color: #4945ff;
147
+ border: 1px solid #4945ff;
148
+ cursor: pointer;
149
+ }
150
+
151
+ .c13 {
152
+ padding-right: 56px;
153
+ padding-left: 56px;
154
+ }
155
+
156
+ .c14 {
157
+ background: #ffffff;
158
+ padding-top: 24px;
159
+ padding-right: 32px;
160
+ padding-bottom: 24px;
161
+ padding-left: 32px;
162
+ border-radius: 4px;
163
+ box-shadow: 0px 1px 4px rgba(33,33,52,0.1);
164
+ }
165
+
166
+ .c25 {
167
+ background: #f6f6f9;
168
+ padding: 4px;
169
+ border-radius: 4px;
170
+ border-style: solid;
171
+ border-width: 1px;
172
+ border-color: #dcdce4;
173
+ display: -webkit-box;
174
+ display: -webkit-flex;
175
+ display: -ms-flexbox;
176
+ display: flex;
177
+ }
178
+
179
+ .c27 {
180
+ padding-right: 12px;
181
+ padding-left: 12px;
182
+ border-radius: 4px;
183
+ }
184
+
172
185
  .c2 {
173
186
  -webkit-align-items: center;
174
187
  -webkit-box-align: center;
@@ -313,18 +326,6 @@ describe('Plugin | Documentation | SettingsPage', () => {
313
326
  border: 2px solid #4945ff;
314
327
  }
315
328
 
316
- .c24 {
317
- border: 0;
318
- -webkit-clip: rect(0 0 0 0);
319
- clip: rect(0 0 0 0);
320
- height: 1px;
321
- margin: -1px;
322
- overflow: hidden;
323
- padding: 0;
324
- position: absolute;
325
- width: 1px;
326
- }
327
-
328
329
  .c10 {
329
330
  height: 2rem;
330
331
  }
@@ -1,14 +1,14 @@
1
1
  const openWithNewTab = (path) => {
2
2
  const url = (() => {
3
3
  if (path.startsWith('/')) {
4
- return `${strapi.backendURL}${path}`;
4
+ return `${window.strapi.backendURL}${path}`;
5
5
  }
6
6
 
7
7
  if (path.startsWith('http')) {
8
8
  return path;
9
9
  }
10
10
 
11
- return `${strapi.backendURL}/${path}`;
11
+ return `${window.strapi.backendURL}/${path}`;
12
12
  })();
13
13
 
14
14
  window.open(url, '_blank');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-documentation",
3
- "version": "4.11.0-alpha.0",
3
+ "version": "4.11.0-beta.1",
4
4
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,23 +30,22 @@
30
30
  "test:front:watch:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
31
31
  },
32
32
  "dependencies": {
33
- "@strapi/design-system": "1.7.4",
34
- "@strapi/helper-plugin": "4.11.0-alpha.0",
35
- "@strapi/icons": "1.7.4",
36
- "@strapi/utils": "4.11.0-alpha.0",
33
+ "@strapi/design-system": "0.0.0-3cf3ff39",
34
+ "@strapi/helper-plugin": "4.11.0-beta.1",
35
+ "@strapi/icons": "0.0.0-3cf3ff39",
36
+ "@strapi/utils": "4.11.0-beta.1",
37
37
  "bcryptjs": "2.4.3",
38
38
  "cheerio": "^1.0.0-rc.12",
39
- "formik": "2.2.9",
39
+ "formik": "2.4.0",
40
40
  "fs-extra": "10.0.0",
41
41
  "immer": "9.0.19",
42
42
  "koa-static": "^5.0.0",
43
43
  "lodash": "4.17.21",
44
44
  "path-to-regexp": "6.2.1",
45
45
  "pluralize": "8.0.0",
46
- "react-copy-to-clipboard": "^5.1.0",
47
46
  "react-helmet": "^6.1.0",
48
47
  "react-intl": "6.4.1",
49
- "react-query": "3.24.3",
48
+ "react-query": "3.39.3",
50
49
  "react-redux": "8.0.5",
51
50
  "redux": "^4.2.1",
52
51
  "reselect": "^4.1.7",
@@ -81,5 +80,5 @@
81
80
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
82
81
  "kind": "plugin"
83
82
  },
84
- "gitHead": "ca5fb0fcfab1b6784208d2ddf6d51617b8893b35"
83
+ "gitHead": "a5fa3bd7e1c4680dd350580620d383612597d25d"
85
84
  }
@@ -182,9 +182,7 @@ module.exports = ({ strapi }) => {
182
182
 
183
183
  generatedDocumentation = produce(generatedDocumentation, (draft) => {
184
184
  if (generatedSchemas) {
185
- draft.components = {
186
- schemas: { ...draft.components.schemas, ...generatedSchemas },
187
- };
185
+ draft.components.schemas = { ...draft.components.schemas, ...generatedSchemas };
188
186
  }
189
187
 
190
188
  if (newApiPath) {