@swagger-api/apidom-ns-json-schema-draft-6 0.76.1 → 0.77.0
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/CHANGELOG.md +10 -0
- package/cjs/elements/JSONSchema.cjs +1 -2
- package/cjs/elements/LinkDescription.cjs +1 -2
- package/cjs/index.cjs +3 -4
- package/cjs/media-types.cjs +1 -2
- package/cjs/namespace.cjs +2 -3
- package/cjs/predicates.cjs +4 -6
- package/cjs/refractor/index.cjs +2 -3
- package/cjs/refractor/plugins/replace-empty-element.cjs +8 -10
- package/cjs/refractor/registration.cjs +1 -1
- package/cjs/refractor/specification.cjs +2 -3
- package/cjs/refractor/toolbox.cjs +3 -5
- package/cjs/refractor/visitors/json-schema/$idVisitor.cjs +1 -2
- package/cjs/refractor/visitors/json-schema/ConstVisitor.cjs +1 -2
- package/cjs/refractor/visitors/json-schema/ExamplesVisitor.cjs +3 -4
- package/cjs/refractor/visitors/json-schema/ItemsVisitor.cjs +2 -3
- package/cjs/refractor/visitors/json-schema/index.cjs +3 -4
- package/cjs/refractor/visitors/json-schema/link-description/SubmissionEncTypeVisitor.cjs +1 -2
- package/cjs/refractor/visitors/json-schema/link-description/index.cjs +2 -3
- package/cjs/traversal/visitor.cjs +2 -3
- package/dist/apidom-ns-json-schema-draft-6.browser.js +1 -1
- package/es/{index.js → index.mjs} +8 -8
- package/es/{namespace.js → namespace.mjs} +2 -2
- package/es/{predicates.js → predicates.mjs} +2 -2
- package/es/refractor/{index.js → index.mjs} +7 -9
- package/es/refractor/plugins/{replace-empty-element.js → replace-empty-element.mjs} +10 -11
- package/es/refractor/{registration.js → registration.mjs} +3 -3
- package/es/refractor/{specification.js → specification.mjs} +7 -7
- package/es/refractor/toolbox.mjs +15 -0
- package/es/refractor/visitors/json-schema/{ExamplesVisitor.js → ExamplesVisitor.mjs} +2 -2
- package/es/refractor/visitors/json-schema/{index.js → index.mjs} +3 -3
- package/es/refractor/visitors/json-schema/link-description/{index.js → index.mjs} +1 -1
- package/es/traversal/visitor.mjs +16 -0
- package/package.json +9 -9
- package/es/refractor/toolbox.js +0 -17
- package/es/traversal/visitor.js +0 -18
- /package/es/elements/{JSONSchema.js → JSONSchema.mjs} +0 -0
- /package/es/elements/{LinkDescription.js → LinkDescription.mjs} +0 -0
- /package/es/{media-types.js → media-types.mjs} +0 -0
- /package/es/refractor/visitors/json-schema/{$idVisitor.js → $idVisitor.mjs} +0 -0
- /package/es/refractor/visitors/json-schema/{ConstVisitor.js → ConstVisitor.mjs} +0 -0
- /package/es/refractor/visitors/json-schema/{ItemsVisitor.js → ItemsVisitor.mjs} +0 -0
- /package/es/refractor/visitors/json-schema/link-description/{SubmissionEncTypeVisitor.js → SubmissionEncTypeVisitor.mjs} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { isRefElement, isLinkElement, isMemberElement, isObjectElement, isArrayElement, isBooleanElement, isNullElement, isElement, isNumberElement, isStringElement } from '@swagger-api/apidom-core';
|
|
2
|
-
export { default as mediaTypes, JSONSchemaDraft6MediaTypes } from "./media-types.
|
|
3
|
-
export { default } from "./namespace.
|
|
4
|
-
export { default as refractorPluginReplaceEmptyElement } from "./refractor/plugins/replace-empty-element.
|
|
5
|
-
export { default as refract, createRefractor } from "./refractor/index.
|
|
6
|
-
export { default as specificationObj } from "./refractor/specification.
|
|
7
|
-
export { isJSONReferenceElement, isJSONSchemaElement, isLinkDescriptionElement, isMediaElement } from "./predicates.
|
|
2
|
+
export { default as mediaTypes, JSONSchemaDraft6MediaTypes } from "./media-types.mjs"; // eslint-disable-next-line no-restricted-exports
|
|
3
|
+
export { default } from "./namespace.mjs";
|
|
4
|
+
export { default as refractorPluginReplaceEmptyElement } from "./refractor/plugins/replace-empty-element.mjs";
|
|
5
|
+
export { default as refract, createRefractor } from "./refractor/index.mjs";
|
|
6
|
+
export { default as specificationObj } from "./refractor/specification.mjs";
|
|
7
|
+
export { isJSONReferenceElement, isJSONSchemaElement, isLinkDescriptionElement, isMediaElement } from "./predicates.mjs";
|
|
8
8
|
export { isJSONReferenceLikeElement, SpecificationVisitor, FallbackVisitor, FixedFieldsVisitor, PatternedFieldsVisitor, MapVisitor, AlternatingVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
9
|
-
export { keyMap, getNodeType } from "./traversal/visitor.
|
|
9
|
+
export { keyMap, getNodeType } from "./traversal/visitor.mjs";
|
|
10
10
|
/**
|
|
11
11
|
* JSON Schema Draft 6 specification elements.
|
|
12
12
|
*/
|
|
13
|
-
export { JSONSchemaElement, LinkDescriptionElement } from "./refractor/registration.
|
|
13
|
+
export { JSONSchemaElement, LinkDescriptionElement } from "./refractor/registration.mjs";
|
|
14
14
|
export { JSONReferenceElement, MediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONReferenceElement, MediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
2
|
-
import JSONSchemaElement from "./elements/JSONSchema.
|
|
3
|
-
import LinkDescriptionElement from "./elements/LinkDescription.
|
|
2
|
+
import JSONSchemaElement from "./elements/JSONSchema.mjs";
|
|
3
|
+
import LinkDescriptionElement from "./elements/LinkDescription.mjs";
|
|
4
4
|
const jsonSchemaDraft6 = {
|
|
5
5
|
namespace: options => {
|
|
6
6
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createPredicate } from '@swagger-api/apidom-core';
|
|
2
|
-
import JSONSchemaElement from "./elements/JSONSchema.
|
|
3
|
-
import LinkDescriptionElement from "./elements/LinkDescription.
|
|
2
|
+
import JSONSchemaElement from "./elements/JSONSchema.mjs";
|
|
3
|
+
import LinkDescriptionElement from "./elements/LinkDescription.mjs";
|
|
4
4
|
export { isJSONReferenceElement, isMediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
5
5
|
export const isJSONSchemaElement = createPredicate(({
|
|
6
6
|
hasBasicElementProps,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
1
|
import { invokeArgs } from 'ramda-adjunct';
|
|
5
2
|
import { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';
|
|
6
|
-
import specification from "./specification.
|
|
7
|
-
import { keyMap, getNodeType } from "../traversal/visitor.
|
|
8
|
-
import createToolbox from "./toolbox.
|
|
3
|
+
import specification from "./specification.mjs";
|
|
4
|
+
import { keyMap, getNodeType } from "../traversal/visitor.mjs";
|
|
5
|
+
import createToolbox from "./toolbox.mjs";
|
|
9
6
|
const refract = (value, {
|
|
10
7
|
specPath = ['visitors', 'document', 'objects', 'JSONSchema', '$visitor'],
|
|
11
8
|
plugins = [],
|
|
@@ -38,7 +35,8 @@ const refract = (value, {
|
|
|
38
35
|
}
|
|
39
36
|
});
|
|
40
37
|
};
|
|
41
|
-
export const createRefractor = specPath => (value, options = {}) => refract(value,
|
|
42
|
-
specPath
|
|
43
|
-
|
|
38
|
+
export const createRefractor = specPath => (value, options = {}) => refract(value, {
|
|
39
|
+
specPath,
|
|
40
|
+
...options
|
|
41
|
+
});
|
|
44
42
|
export default refract;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MemberElement, ArrayElement, ObjectElement, isStringElement, includesClasses, isArrayElement } from '@swagger-api/apidom-core';
|
|
1
|
+
import { MemberElement, ArrayElement, ObjectElement, isStringElement, includesClasses, isArrayElement, cloneDeep, toValue } from '@swagger-api/apidom-core';
|
|
2
2
|
/**
|
|
3
3
|
* JSON Schema Draft 6 specification elements.
|
|
4
4
|
*/
|
|
5
5
|
import { MediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
6
|
-
import JSONSchemaElement from "../../elements/JSONSchema.
|
|
7
|
-
import LinkDescriptionElement from "../../elements/LinkDescription.
|
|
8
|
-
import { getNodeType } from "../../traversal/visitor.
|
|
6
|
+
import JSONSchemaElement from "../../elements/JSONSchema.mjs";
|
|
7
|
+
import LinkDescriptionElement from "../../elements/LinkDescription.mjs";
|
|
8
|
+
import { getNodeType } from "../../traversal/visitor.mjs";
|
|
9
9
|
/**
|
|
10
10
|
* This plugin is specific to YAML 1.2 format, which allows defining key-value pairs
|
|
11
11
|
* with empty key, empty value, or both. If the value is not provided in YAML format,
|
|
@@ -172,9 +172,8 @@ const schema = {
|
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
const findElementFactory = (ancestor, keyName) => {
|
|
175
|
-
var _ancestor$classes$fir, _ancestor$classes$fir2;
|
|
176
175
|
const elementType = getNodeType(ancestor); // @ts-ignore
|
|
177
|
-
const keyMapping = schema[elementType] || schema[(
|
|
176
|
+
const keyMapping = schema[elementType] || schema[toValue(ancestor.classes.first)];
|
|
178
177
|
return typeof keyMapping === 'undefined' ? undefined : Object.prototype.hasOwnProperty.call(keyMapping, '[key: *]') ? keyMapping['[key: *]'] : keyMapping[keyName];
|
|
179
178
|
};
|
|
180
179
|
const plugin = () => () => {
|
|
@@ -184,20 +183,20 @@ const plugin = () => () => {
|
|
|
184
183
|
// no empty Element, continue with next one
|
|
185
184
|
if (!isEmptyElement(element.value)) return undefined;
|
|
186
185
|
const [,,, ancestors] = rest;
|
|
187
|
-
const ancestor = ancestors
|
|
188
|
-
const elementFactory = findElementFactory(ancestor, element.key
|
|
186
|
+
const ancestor = ancestors.at(-1);
|
|
187
|
+
const elementFactory = findElementFactory(ancestor, toValue(element.key));
|
|
189
188
|
|
|
190
189
|
// no element factory found
|
|
191
190
|
if (typeof elementFactory === 'undefined') return undefined;
|
|
192
191
|
const originalValue = element.value;
|
|
193
192
|
return new MemberElement(element.key, elementFactory.call({
|
|
194
193
|
context: ancestor
|
|
195
|
-
}, undefined, originalValue.meta
|
|
194
|
+
}, undefined, cloneDeep(originalValue.meta), cloneDeep(originalValue.attributes)), cloneDeep(element.meta), cloneDeep(element.attributes));
|
|
196
195
|
},
|
|
197
196
|
StringElement(element, ...rest) {
|
|
198
197
|
if (!isEmptyElement(element)) return undefined;
|
|
199
198
|
const [,,, ancestors] = rest;
|
|
200
|
-
const ancestor = ancestors
|
|
199
|
+
const ancestor = ancestors.at(-1);
|
|
201
200
|
|
|
202
201
|
// we're only interested in empty elements in ArrayElements
|
|
203
202
|
if (!isArrayElement(ancestor)) return undefined;
|
|
@@ -207,7 +206,7 @@ const plugin = () => () => {
|
|
|
207
206
|
if (typeof elementFactory === 'undefined') return undefined;
|
|
208
207
|
return elementFactory.call({
|
|
209
208
|
context: element
|
|
210
|
-
}, undefined, element.meta
|
|
209
|
+
}, undefined, cloneDeep(element.meta), cloneDeep(element.attributes));
|
|
211
210
|
}
|
|
212
211
|
}
|
|
213
212
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import JSONSchemaElement from "../elements/JSONSchema.
|
|
2
|
-
import LinkDescriptionElement from "../elements/LinkDescription.
|
|
3
|
-
import { createRefractor } from "./index.
|
|
1
|
+
import JSONSchemaElement from "../elements/JSONSchema.mjs";
|
|
2
|
+
import LinkDescriptionElement from "../elements/LinkDescription.mjs";
|
|
3
|
+
import { createRefractor } from "./index.mjs"; // register refractors specific to element types
|
|
4
4
|
JSONSchemaElement.refract = createRefractor(['visitors', 'document', 'objects', 'JSONSchema', '$visitor']);
|
|
5
5
|
LinkDescriptionElement.refract = createRefractor(['visitors', 'document', 'objects', 'LinkDescription', '$visitor']);
|
|
6
6
|
export { JSONSchemaElement, LinkDescriptionElement };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { pipe, assocPath, dissocPath } from 'ramda';
|
|
2
2
|
import { specificationObj } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
3
|
-
import JSONSchemaVisitor from "./visitors/json-schema/index.
|
|
4
|
-
import JSONSchema$idVisitor from "./visitors/json-schema/$idVisitor.
|
|
5
|
-
import JSONSchemaItemsVisitor from "./visitors/json-schema/ItemsVisitor.
|
|
6
|
-
import JSONSchemaConstVisitor from "./visitors/json-schema/ConstVisitor.
|
|
7
|
-
import JSONSchemaExamplesVisitor from "./visitors/json-schema/ExamplesVisitor.
|
|
8
|
-
import LinkDescriptionVisitor from "./visitors/json-schema/link-description/index.
|
|
9
|
-
import LinkDescriptionSubmissionEncTypeVisitor from "./visitors/json-schema/link-description/SubmissionEncTypeVisitor.
|
|
3
|
+
import JSONSchemaVisitor from "./visitors/json-schema/index.mjs";
|
|
4
|
+
import JSONSchema$idVisitor from "./visitors/json-schema/$idVisitor.mjs";
|
|
5
|
+
import JSONSchemaItemsVisitor from "./visitors/json-schema/ItemsVisitor.mjs";
|
|
6
|
+
import JSONSchemaConstVisitor from "./visitors/json-schema/ConstVisitor.mjs";
|
|
7
|
+
import JSONSchemaExamplesVisitor from "./visitors/json-schema/ExamplesVisitor.mjs";
|
|
8
|
+
import LinkDescriptionVisitor from "./visitors/json-schema/link-description/index.mjs";
|
|
9
|
+
import LinkDescriptionSubmissionEncTypeVisitor from "./visitors/json-schema/link-description/SubmissionEncTypeVisitor.mjs";
|
|
10
10
|
const specification = pipe(
|
|
11
11
|
// JSON Schema object modifications
|
|
12
12
|
assocPath(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], JSONSchemaVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'id']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$id'], JSONSchema$idVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contains'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'items'], JSONSchemaItemsVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'propertyNames'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'const'], JSONSchemaConstVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'examples'], JSONSchemaExamplesVisitor),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createNamespace, isStringElement } from '@swagger-api/apidom-core';
|
|
2
|
+
import * as jsonSchemaDraft6Predicates from "../predicates.mjs";
|
|
3
|
+
import jsonSchemaDraft6Namespace from "../namespace.mjs";
|
|
4
|
+
const createToolbox = () => {
|
|
5
|
+
const namespace = createNamespace(jsonSchemaDraft6Namespace);
|
|
6
|
+
const predicates = {
|
|
7
|
+
...jsonSchemaDraft6Predicates,
|
|
8
|
+
isStringElement
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
predicates,
|
|
12
|
+
namespace
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default createToolbox;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import stampit from 'stampit';
|
|
2
|
-
import { BREAK } from '@swagger-api/apidom-core';
|
|
2
|
+
import { BREAK, cloneDeep } from '@swagger-api/apidom-core';
|
|
3
3
|
import { FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
4
4
|
const ExamplesVisitor = stampit(FallbackVisitor, {
|
|
5
5
|
methods: {
|
|
6
6
|
ArrayElement(arrayElement) {
|
|
7
|
-
this.element = arrayElement
|
|
7
|
+
this.element = cloneDeep(arrayElement);
|
|
8
8
|
this.element.classes.push('json-schema-examples');
|
|
9
9
|
return BREAK;
|
|
10
10
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import stampit from 'stampit';
|
|
2
2
|
import { always } from 'ramda';
|
|
3
|
-
import { BREAK } from '@swagger-api/apidom-core';
|
|
3
|
+
import { BREAK, cloneDeep } from '@swagger-api/apidom-core';
|
|
4
4
|
import { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
5
|
-
import JSONSchemaElement from "../../../elements/JSONSchema.
|
|
5
|
+
import JSONSchemaElement from "../../../elements/JSONSchema.mjs";
|
|
6
6
|
const JSONSchemaVisitor = stampit(FixedFieldsVisitor, FallbackVisitor, {
|
|
7
7
|
props: {
|
|
8
8
|
specPath: always(['document', 'objects', 'JSONSchema'])
|
|
@@ -15,7 +15,7 @@ const JSONSchemaVisitor = stampit(FixedFieldsVisitor, FallbackVisitor, {
|
|
|
15
15
|
return FixedFieldsVisitor.compose.methods.ObjectElement.call(this, objectElement);
|
|
16
16
|
},
|
|
17
17
|
BooleanElement(booleanElement) {
|
|
18
|
-
this.element = booleanElement
|
|
18
|
+
this.element = cloneDeep(booleanElement);
|
|
19
19
|
this.element.classes.push('boolean-json-schema');
|
|
20
20
|
return BREAK;
|
|
21
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import stampit from 'stampit';
|
|
2
2
|
import { always } from 'ramda';
|
|
3
3
|
import { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
|
4
|
-
import LinkDescriptionElement from "../../../../elements/LinkDescription.
|
|
4
|
+
import LinkDescriptionElement from "../../../../elements/LinkDescription.mjs";
|
|
5
5
|
const LinkDescriptionVisitor = stampit(FixedFieldsVisitor, FallbackVisitor, {
|
|
6
6
|
props: {
|
|
7
7
|
specPath: always(['document', 'objects', 'LinkDescription'])
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { keyMap as keyMapBase, isElement } from '@swagger-api/apidom-core';
|
|
2
|
+
|
|
3
|
+
// getNodeType :: Node -> String
|
|
4
|
+
export const getNodeType = element => {
|
|
5
|
+
if (!isElement(element)) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;
|
|
9
|
+
};
|
|
10
|
+
export const keyMap = {
|
|
11
|
+
JSONSchemaDraft6Element: ['content'],
|
|
12
|
+
JSONReferenceElement: ['content'],
|
|
13
|
+
MediaElement: ['content'],
|
|
14
|
+
LinkDescriptionElement: ['content'],
|
|
15
|
+
...keyMapBase
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swagger-api/apidom-ns-json-schema-draft-6",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.77.0",
|
|
4
4
|
"description": "JSON Schema Draft 6 namespace for ApiDOM.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": [
|
|
11
|
-
"./es/refractor/registration.
|
|
11
|
+
"./es/refractor/registration.mjs",
|
|
12
12
|
"./cjs/refractor/registration.cjs"
|
|
13
13
|
],
|
|
14
14
|
"unpkg": "./dist/apidom-ns-json-schema-draft-6.browser.min.js",
|
|
15
15
|
"main": "./cjs/index.cjs",
|
|
16
16
|
"exports": {
|
|
17
17
|
"types": "./types/dist.d.ts",
|
|
18
|
-
"import": "./es/index.
|
|
18
|
+
"import": "./es/index.mjs",
|
|
19
19
|
"require": "./cjs/index.cjs"
|
|
20
20
|
},
|
|
21
21
|
"types": "./types/dist.d.ts",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "npm run clean && run-p --max-parallel ${CPU_CORES:-2} typescript:declaration build:es build:cjs build:umd:browser",
|
|
24
|
-
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es --extensions '.ts' --root-mode 'upward'",
|
|
24
|
+
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward'",
|
|
25
25
|
"build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir cjs --extensions '.ts' --out-file-extension '.cjs' --root-mode 'upward'",
|
|
26
|
-
"build:umd:browser": "cross-env BABEL_ENV=browser
|
|
26
|
+
"build:umd:browser": "cross-env BABEL_ENV=browser webpack --config config/webpack/browser.config.js --progress",
|
|
27
27
|
"lint": "eslint ./",
|
|
28
28
|
"lint:fix": "eslint ./ --fix",
|
|
29
29
|
"clean": "rimraf ./es ./cjs ./dist ./types",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime-corejs3": "^7.20.7",
|
|
45
|
-
"@swagger-api/apidom-core": "^0.
|
|
46
|
-
"@swagger-api/apidom-error": "^0.
|
|
47
|
-
"@swagger-api/apidom-ns-json-schema-draft-4": "^0.
|
|
45
|
+
"@swagger-api/apidom-core": "^0.77.0",
|
|
46
|
+
"@swagger-api/apidom-error": "^0.77.0",
|
|
47
|
+
"@swagger-api/apidom-ns-json-schema-draft-4": "^0.77.0",
|
|
48
48
|
"@types/ramda": "~0.29.3",
|
|
49
49
|
"ramda": "~0.29.0",
|
|
50
50
|
"ramda-adjunct": "^4.1.1",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"README.md",
|
|
61
61
|
"CHANGELOG.md"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "cd8a9d7d2ea8bb8c335c23cd4632830a79c426c9"
|
|
64
64
|
}
|
package/es/refractor/toolbox.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { createNamespace, isStringElement } from '@swagger-api/apidom-core';
|
|
5
|
-
import * as jsonSchemaDraft6Predicates from "../predicates.js";
|
|
6
|
-
import jsonSchemaDraft6Namespace from "../namespace.js";
|
|
7
|
-
const createToolbox = () => {
|
|
8
|
-
const namespace = createNamespace(jsonSchemaDraft6Namespace);
|
|
9
|
-
const predicates = _objectSpread(_objectSpread({}, jsonSchemaDraft6Predicates), {}, {
|
|
10
|
-
isStringElement
|
|
11
|
-
});
|
|
12
|
-
return {
|
|
13
|
-
predicates,
|
|
14
|
-
namespace
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export default createToolbox;
|
package/es/traversal/visitor.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { keyMap as keyMapBase, isElement } from '@swagger-api/apidom-core';
|
|
5
|
-
|
|
6
|
-
// getNodeType :: Node -> String
|
|
7
|
-
export const getNodeType = element => {
|
|
8
|
-
if (!isElement(element)) {
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;
|
|
12
|
-
};
|
|
13
|
-
export const keyMap = _objectSpread({
|
|
14
|
-
JSONSchemaDraft6Element: ['content'],
|
|
15
|
-
JSONReferenceElement: ['content'],
|
|
16
|
-
MediaElement: ['content'],
|
|
17
|
-
LinkDescriptionElement: ['content']
|
|
18
|
-
}, keyMapBase);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|