@stoplight/elements-dev-portal 1.6.18 → 1.7.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.
- package/index.esm.js +4 -8
- package/index.js +4 -8
- package/index.mjs +4 -8
- package/package.json +6 -6
- package/styles.min.css +1 -1
- package/version.d.ts +1 -1
- package/web-components.min.js +1 -1
- package/web-components.min.js.LICENSE.txt +3 -3
package/index.esm.js
CHANGED
|
@@ -218,7 +218,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
218
218
|
React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
|
|
219
219
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
220
220
|
|
|
221
|
-
const appVersion = '1.
|
|
221
|
+
const appVersion = '1.7.2';
|
|
222
222
|
|
|
223
223
|
class ResponseError extends Error {
|
|
224
224
|
constructor(message, responseCode) {
|
|
@@ -228,12 +228,11 @@ class ResponseError extends Error {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
const getNodeContent = ({ nodeSlug, projectId, branchSlug, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
231
|
-
const
|
|
232
|
-
const encodedNodeId = encodeURIComponent(nodeId);
|
|
231
|
+
const encodedNodeSlug = encodeURIComponent(nodeSlug);
|
|
233
232
|
const encodedProjectId = encodeURIComponent(projectId);
|
|
234
233
|
const encodedBranchSlug = branchSlug ? encodeURIComponent(branchSlug) : '';
|
|
235
234
|
const branchQuery = encodedBranchSlug ? `?branch=${encodedBranchSlug}` : '';
|
|
236
|
-
const response = yield fetch(`${platformUrl}/api/v1/projects/${encodedProjectId}/nodes/${
|
|
235
|
+
const response = yield fetch(`${platformUrl}/api/v1/projects/${encodedProjectId}/nodes/${encodedNodeSlug}${branchQuery}`, {
|
|
237
236
|
headers: Object.assign({ 'Stoplight-Elements-Version': appVersion }, (platformAuthToken && { Authorization: `Bearer ${platformAuthToken}` })),
|
|
238
237
|
});
|
|
239
238
|
const data = yield response.json();
|
|
@@ -249,10 +248,7 @@ const getNodeContent = ({ nodeSlug, projectId, branchSlug, platformUrl = 'https:
|
|
|
249
248
|
}
|
|
250
249
|
}
|
|
251
250
|
return data;
|
|
252
|
-
});
|
|
253
|
-
function getNodeIdFromSlug(nodeSlug) {
|
|
254
|
-
return nodeSlug.split('-')[0];
|
|
255
|
-
}
|
|
251
|
+
});
|
|
256
252
|
|
|
257
253
|
const getBranches = ({ projectId, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
258
254
|
const encodedProjectId = encodeURIComponent(projectId);
|
package/index.js
CHANGED
|
@@ -245,7 +245,7 @@ const UpgradeToStarter = () => (React__default["default"].createElement(mosaic.F
|
|
|
245
245
|
React__default["default"].createElement(mosaic.Icon, { icon: freeSolidSvgIcons.faExclamationTriangle, size: "4x" }),
|
|
246
246
|
React__default["default"].createElement(mosaic.Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
247
247
|
|
|
248
|
-
const appVersion = '1.
|
|
248
|
+
const appVersion = '1.7.2';
|
|
249
249
|
|
|
250
250
|
class ResponseError extends Error {
|
|
251
251
|
constructor(message, responseCode) {
|
|
@@ -255,12 +255,11 @@ class ResponseError extends Error {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
const getNodeContent = ({ nodeSlug, projectId, branchSlug, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
258
|
-
const
|
|
259
|
-
const encodedNodeId = encodeURIComponent(nodeId);
|
|
258
|
+
const encodedNodeSlug = encodeURIComponent(nodeSlug);
|
|
260
259
|
const encodedProjectId = encodeURIComponent(projectId);
|
|
261
260
|
const encodedBranchSlug = branchSlug ? encodeURIComponent(branchSlug) : '';
|
|
262
261
|
const branchQuery = encodedBranchSlug ? `?branch=${encodedBranchSlug}` : '';
|
|
263
|
-
const response = yield fetch(`${platformUrl}/api/v1/projects/${encodedProjectId}/nodes/${
|
|
262
|
+
const response = yield fetch(`${platformUrl}/api/v1/projects/${encodedProjectId}/nodes/${encodedNodeSlug}${branchQuery}`, {
|
|
264
263
|
headers: Object.assign({ 'Stoplight-Elements-Version': appVersion }, (platformAuthToken && { Authorization: `Bearer ${platformAuthToken}` })),
|
|
265
264
|
});
|
|
266
265
|
const data = yield response.json();
|
|
@@ -276,10 +275,7 @@ const getNodeContent = ({ nodeSlug, projectId, branchSlug, platformUrl = 'https:
|
|
|
276
275
|
}
|
|
277
276
|
}
|
|
278
277
|
return data;
|
|
279
|
-
});
|
|
280
|
-
function getNodeIdFromSlug(nodeSlug) {
|
|
281
|
-
return nodeSlug.split('-')[0];
|
|
282
|
-
}
|
|
278
|
+
});
|
|
283
279
|
|
|
284
280
|
const getBranches = ({ projectId, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
285
281
|
const encodedProjectId = encodeURIComponent(projectId);
|
package/index.mjs
CHANGED
|
@@ -218,7 +218,7 @@ const UpgradeToStarter = () => (React__default.createElement(Flex, { as: "a", hr
|
|
|
218
218
|
React__default.createElement(Icon, { icon: faExclamationTriangle, size: "4x" }),
|
|
219
219
|
React__default.createElement(Box, { pt: 3 }, "Please upgrade your Stoplight Workspace to the Starter Plan to use Elements Dev Portal in production.")));
|
|
220
220
|
|
|
221
|
-
const appVersion = '1.
|
|
221
|
+
const appVersion = '1.7.2';
|
|
222
222
|
|
|
223
223
|
class ResponseError extends Error {
|
|
224
224
|
constructor(message, responseCode) {
|
|
@@ -228,12 +228,11 @@ class ResponseError extends Error {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
const getNodeContent = ({ nodeSlug, projectId, branchSlug, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
231
|
-
const
|
|
232
|
-
const encodedNodeId = encodeURIComponent(nodeId);
|
|
231
|
+
const encodedNodeSlug = encodeURIComponent(nodeSlug);
|
|
233
232
|
const encodedProjectId = encodeURIComponent(projectId);
|
|
234
233
|
const encodedBranchSlug = branchSlug ? encodeURIComponent(branchSlug) : '';
|
|
235
234
|
const branchQuery = encodedBranchSlug ? `?branch=${encodedBranchSlug}` : '';
|
|
236
|
-
const response = yield fetch(`${platformUrl}/api/v1/projects/${encodedProjectId}/nodes/${
|
|
235
|
+
const response = yield fetch(`${platformUrl}/api/v1/projects/${encodedProjectId}/nodes/${encodedNodeSlug}${branchQuery}`, {
|
|
237
236
|
headers: Object.assign({ 'Stoplight-Elements-Version': appVersion }, (platformAuthToken && { Authorization: `Bearer ${platformAuthToken}` })),
|
|
238
237
|
});
|
|
239
238
|
const data = yield response.json();
|
|
@@ -249,10 +248,7 @@ const getNodeContent = ({ nodeSlug, projectId, branchSlug, platformUrl = 'https:
|
|
|
249
248
|
}
|
|
250
249
|
}
|
|
251
250
|
return data;
|
|
252
|
-
});
|
|
253
|
-
function getNodeIdFromSlug(nodeSlug) {
|
|
254
|
-
return nodeSlug.split('-')[0];
|
|
255
|
-
}
|
|
251
|
+
});
|
|
256
252
|
|
|
257
253
|
const getBranches = ({ projectId, platformUrl = 'https://stoplight.io', platformAuthToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
258
254
|
const encodedProjectId = encodeURIComponent(projectId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoplight/elements-dev-portal",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "UI components for composing beautiful developer documentation.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "./index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=
|
|
22
|
+
"node": ">=14.13"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8",
|
|
@@ -27,17 +27,18 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@fortawesome/free-solid-svg-icons": "^5.10.2",
|
|
30
|
-
"@stoplight/elements-core": "~7.5.
|
|
31
|
-
"@stoplight/markdown-viewer": "^5.4.
|
|
30
|
+
"@stoplight/elements-core": "~7.5.18",
|
|
31
|
+
"@stoplight/markdown-viewer": "^5.4.7",
|
|
32
32
|
"@stoplight/mosaic": "^1.16.2",
|
|
33
33
|
"@stoplight/path": "^1.3.2",
|
|
34
|
-
"@stoplight/types": "^
|
|
34
|
+
"@stoplight/types": "^13.0.0",
|
|
35
35
|
"classnames": "^2.2.6",
|
|
36
36
|
"lodash": "^4.17.19",
|
|
37
37
|
"react-query": "^3.15.2",
|
|
38
38
|
"react-router-dom": "^5.2.0",
|
|
39
39
|
"use-debounce": "^6.0.1"
|
|
40
40
|
},
|
|
41
|
+
"type": "commonjs",
|
|
41
42
|
"exports": {
|
|
42
43
|
"./styles.min.css": "./styles.min.css",
|
|
43
44
|
".": {
|
|
@@ -46,6 +47,5 @@
|
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
49
|
"typings": "index.d.ts",
|
|
49
|
-
"type": "commonjs",
|
|
50
50
|
"module": "./index.esm.js"
|
|
51
51
|
}
|