@skmtc/core 0.36.0 → 0.36.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.
- package/esm/parse/v3-0/server/toServerV3.js +11 -1
- package/esm/parse/v3-1/server/toServerV3.js +11 -1
- package/esm/parse/v3-2/server/toServerV3.js +11 -1
- package/package.json +1 -1
- package/script/parse/v3-0/server/toServerV3.js +11 -1
- package/script/parse/v3-1/server/toServerV3.js +11 -1
- package/script/parse/v3-2/server/toServerV3.js +11 -1
|
@@ -3,6 +3,16 @@ import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecif
|
|
|
3
3
|
import { toOptionalServerVariablesV3 } from '../serverVariable/toServerVariableV3.js';
|
|
4
4
|
import { tryParseAt } from '../../../context/tryParseAt.js';
|
|
5
5
|
export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
6
|
+
if (!Array.isArray(servers)) {
|
|
7
|
+
context.logIssueNoKey({
|
|
8
|
+
level: 'error',
|
|
9
|
+
stackTrail,
|
|
10
|
+
parent: servers,
|
|
11
|
+
message: '"servers" must be an array; left out',
|
|
12
|
+
type: 'INVALID_OPERATION'
|
|
13
|
+
});
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
6
16
|
return servers.flatMap((server, index) => {
|
|
7
17
|
const parsed = tryParseAt({
|
|
8
18
|
stackTrail,
|
|
@@ -21,7 +31,7 @@ export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
|
21
31
|
});
|
|
22
32
|
};
|
|
23
33
|
export const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
24
|
-
if (
|
|
34
|
+
if (servers === undefined || servers === null) {
|
|
25
35
|
return undefined;
|
|
26
36
|
}
|
|
27
37
|
return toServersV3({ servers, stackTrail, context });
|
|
@@ -3,6 +3,16 @@ import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecif
|
|
|
3
3
|
import { toOptionalServerVariablesV3 } from '../serverVariable/toServerVariableV3.js';
|
|
4
4
|
import { tryParseAt } from '../../../context/tryParseAt.js';
|
|
5
5
|
export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
6
|
+
if (!Array.isArray(servers)) {
|
|
7
|
+
context.logIssueNoKey({
|
|
8
|
+
level: 'error',
|
|
9
|
+
stackTrail,
|
|
10
|
+
parent: servers,
|
|
11
|
+
message: '"servers" must be an array; left out',
|
|
12
|
+
type: 'INVALID_OPERATION'
|
|
13
|
+
});
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
6
16
|
return servers.flatMap((server, index) => {
|
|
7
17
|
const parsed = tryParseAt({
|
|
8
18
|
stackTrail,
|
|
@@ -21,7 +31,7 @@ export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
|
21
31
|
});
|
|
22
32
|
};
|
|
23
33
|
export const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
24
|
-
if (
|
|
34
|
+
if (servers === undefined || servers === null) {
|
|
25
35
|
return undefined;
|
|
26
36
|
}
|
|
27
37
|
return toServersV3({ servers, stackTrail, context });
|
|
@@ -3,6 +3,16 @@ import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecif
|
|
|
3
3
|
import { toOptionalServerVariablesV3 } from '../serverVariable/toServerVariableV3.js';
|
|
4
4
|
import { tryParseAt } from '../../../context/tryParseAt.js';
|
|
5
5
|
export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
6
|
+
if (!Array.isArray(servers)) {
|
|
7
|
+
context.logIssueNoKey({
|
|
8
|
+
level: 'error',
|
|
9
|
+
stackTrail,
|
|
10
|
+
parent: servers,
|
|
11
|
+
message: '"servers" must be an array; left out',
|
|
12
|
+
type: 'INVALID_OPERATION'
|
|
13
|
+
});
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
6
16
|
return servers.flatMap((server, index) => {
|
|
7
17
|
const parsed = tryParseAt({
|
|
8
18
|
stackTrail,
|
|
@@ -21,7 +31,7 @@ export const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
|
21
31
|
});
|
|
22
32
|
};
|
|
23
33
|
export const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
24
|
-
if (
|
|
34
|
+
if (servers === undefined || servers === null) {
|
|
25
35
|
return undefined;
|
|
26
36
|
}
|
|
27
37
|
return toServersV3({ servers, stackTrail, context });
|
package/package.json
CHANGED
|
@@ -6,6 +6,16 @@ const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toS
|
|
|
6
6
|
const toServerVariableV3_js_1 = require("../serverVariable/toServerVariableV3.js");
|
|
7
7
|
const tryParseAt_js_1 = require("../../../context/tryParseAt.js");
|
|
8
8
|
const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
9
|
+
if (!Array.isArray(servers)) {
|
|
10
|
+
context.logIssueNoKey({
|
|
11
|
+
level: 'error',
|
|
12
|
+
stackTrail,
|
|
13
|
+
parent: servers,
|
|
14
|
+
message: '"servers" must be an array; left out',
|
|
15
|
+
type: 'INVALID_OPERATION'
|
|
16
|
+
});
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
9
19
|
return servers.flatMap((server, index) => {
|
|
10
20
|
const parsed = (0, tryParseAt_js_1.tryParseAt)({
|
|
11
21
|
stackTrail,
|
|
@@ -25,7 +35,7 @@ const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
|
25
35
|
};
|
|
26
36
|
exports.toServersV3 = toServersV3;
|
|
27
37
|
const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
28
|
-
if (
|
|
38
|
+
if (servers === undefined || servers === null) {
|
|
29
39
|
return undefined;
|
|
30
40
|
}
|
|
31
41
|
return (0, exports.toServersV3)({ servers, stackTrail, context });
|
|
@@ -6,6 +6,16 @@ const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toS
|
|
|
6
6
|
const toServerVariableV3_js_1 = require("../serverVariable/toServerVariableV3.js");
|
|
7
7
|
const tryParseAt_js_1 = require("../../../context/tryParseAt.js");
|
|
8
8
|
const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
9
|
+
if (!Array.isArray(servers)) {
|
|
10
|
+
context.logIssueNoKey({
|
|
11
|
+
level: 'error',
|
|
12
|
+
stackTrail,
|
|
13
|
+
parent: servers,
|
|
14
|
+
message: '"servers" must be an array; left out',
|
|
15
|
+
type: 'INVALID_OPERATION'
|
|
16
|
+
});
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
9
19
|
return servers.flatMap((server, index) => {
|
|
10
20
|
const parsed = (0, tryParseAt_js_1.tryParseAt)({
|
|
11
21
|
stackTrail,
|
|
@@ -25,7 +35,7 @@ const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
|
25
35
|
};
|
|
26
36
|
exports.toServersV3 = toServersV3;
|
|
27
37
|
const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
28
|
-
if (
|
|
38
|
+
if (servers === undefined || servers === null) {
|
|
29
39
|
return undefined;
|
|
30
40
|
}
|
|
31
41
|
return (0, exports.toServersV3)({ servers, stackTrail, context });
|
|
@@ -6,6 +6,16 @@ const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toS
|
|
|
6
6
|
const toServerVariableV3_js_1 = require("../serverVariable/toServerVariableV3.js");
|
|
7
7
|
const tryParseAt_js_1 = require("../../../context/tryParseAt.js");
|
|
8
8
|
const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
9
|
+
if (!Array.isArray(servers)) {
|
|
10
|
+
context.logIssueNoKey({
|
|
11
|
+
level: 'error',
|
|
12
|
+
stackTrail,
|
|
13
|
+
parent: servers,
|
|
14
|
+
message: '"servers" must be an array; left out',
|
|
15
|
+
type: 'INVALID_OPERATION'
|
|
16
|
+
});
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
9
19
|
return servers.flatMap((server, index) => {
|
|
10
20
|
const parsed = (0, tryParseAt_js_1.tryParseAt)({
|
|
11
21
|
stackTrail,
|
|
@@ -25,7 +35,7 @@ const toServersV3 = ({ servers, stackTrail, context }) => {
|
|
|
25
35
|
};
|
|
26
36
|
exports.toServersV3 = toServersV3;
|
|
27
37
|
const toOptionalServersV3 = ({ servers, stackTrail, context }) => {
|
|
28
|
-
if (
|
|
38
|
+
if (servers === undefined || servers === null) {
|
|
29
39
|
return undefined;
|
|
30
40
|
}
|
|
31
41
|
return (0, exports.toServersV3)({ servers, stackTrail, context });
|