@speclynx/apidom-reference 4.3.1 → 4.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speclynx/apidom-reference",
3
- "version": "4.3.1",
3
+ "version": "4.5.0",
4
4
  "description": "Advanced algorithms for semantic ApiDOM manipulations like dereferencing or resolution.",
5
5
  "keywords": [
6
6
  "apidom",
@@ -279,34 +279,34 @@
279
279
  "license": "Apache-2.0",
280
280
  "dependencies": {
281
281
  "@babel/runtime-corejs3": "^7.28.4",
282
- "@speclynx/apidom-core": "4.3.1",
283
- "@speclynx/apidom-datamodel": "4.3.1",
284
- "@speclynx/apidom-error": "4.3.1",
285
- "@speclynx/apidom-json-pointer": "4.3.1",
286
- "@speclynx/apidom-ns-arazzo-1": "4.3.1",
287
- "@speclynx/apidom-ns-asyncapi-2": "4.3.1",
288
- "@speclynx/apidom-ns-json-schema-2020-12": "4.3.1",
289
- "@speclynx/apidom-ns-openapi-2": "4.3.1",
290
- "@speclynx/apidom-ns-openapi-3-0": "4.3.1",
291
- "@speclynx/apidom-ns-openapi-3-1": "4.3.1",
292
- "@speclynx/apidom-ns-overlay-1": "4.3.1",
293
- "@speclynx/apidom-parser-adapter-arazzo-json-1": "4.3.1",
294
- "@speclynx/apidom-parser-adapter-arazzo-yaml-1": "4.3.1",
295
- "@speclynx/apidom-parser-adapter-asyncapi-json-2": "4.3.1",
296
- "@speclynx/apidom-parser-adapter-asyncapi-yaml-2": "4.3.1",
297
- "@speclynx/apidom-parser-adapter-json": "4.3.1",
298
- "@speclynx/apidom-parser-adapter-openapi-json-2": "4.3.1",
299
- "@speclynx/apidom-parser-adapter-openapi-json-3-0": "4.3.1",
300
- "@speclynx/apidom-parser-adapter-openapi-json-3-1": "4.3.1",
301
- "@speclynx/apidom-parser-adapter-openapi-yaml-2": "4.3.1",
302
- "@speclynx/apidom-parser-adapter-openapi-yaml-3-0": "4.3.1",
303
- "@speclynx/apidom-parser-adapter-openapi-yaml-3-1": "4.3.1",
304
- "@speclynx/apidom-parser-adapter-overlay-json-1": "4.3.1",
305
- "@speclynx/apidom-parser-adapter-overlay-yaml-1": "4.3.1",
306
- "@speclynx/apidom-parser-adapter-yaml-1-2": "4.3.1",
307
- "@speclynx/apidom-traverse": "4.3.1",
282
+ "@speclynx/apidom-core": "4.5.0",
283
+ "@speclynx/apidom-datamodel": "4.5.0",
284
+ "@speclynx/apidom-error": "4.5.0",
285
+ "@speclynx/apidom-json-pointer": "4.5.0",
286
+ "@speclynx/apidom-ns-arazzo-1": "4.5.0",
287
+ "@speclynx/apidom-ns-asyncapi-2": "4.5.0",
288
+ "@speclynx/apidom-ns-json-schema-2020-12": "4.5.0",
289
+ "@speclynx/apidom-ns-openapi-2": "4.5.0",
290
+ "@speclynx/apidom-ns-openapi-3-0": "4.5.0",
291
+ "@speclynx/apidom-ns-openapi-3-1": "4.5.0",
292
+ "@speclynx/apidom-ns-overlay-1": "4.5.0",
293
+ "@speclynx/apidom-parser-adapter-arazzo-json-1": "4.5.0",
294
+ "@speclynx/apidom-parser-adapter-arazzo-yaml-1": "4.5.0",
295
+ "@speclynx/apidom-parser-adapter-asyncapi-json-2": "4.5.0",
296
+ "@speclynx/apidom-parser-adapter-asyncapi-yaml-2": "4.5.0",
297
+ "@speclynx/apidom-parser-adapter-json": "4.5.0",
298
+ "@speclynx/apidom-parser-adapter-openapi-json-2": "4.5.0",
299
+ "@speclynx/apidom-parser-adapter-openapi-json-3-0": "4.5.0",
300
+ "@speclynx/apidom-parser-adapter-openapi-json-3-1": "4.5.0",
301
+ "@speclynx/apidom-parser-adapter-openapi-yaml-2": "4.5.0",
302
+ "@speclynx/apidom-parser-adapter-openapi-yaml-3-0": "4.5.0",
303
+ "@speclynx/apidom-parser-adapter-openapi-yaml-3-1": "4.5.0",
304
+ "@speclynx/apidom-parser-adapter-overlay-json-1": "4.5.0",
305
+ "@speclynx/apidom-parser-adapter-overlay-yaml-1": "4.5.0",
306
+ "@speclynx/apidom-parser-adapter-yaml-1-2": "4.5.0",
307
+ "@speclynx/apidom-traverse": "4.5.0",
308
308
  "@swaggerexpert/arazzo-runtime-expression": "^2.0.3",
309
- "axios": "^1.14.0",
309
+ "axios": "^1.15.0",
310
310
  "picomatch": "^4.0.4",
311
311
  "process": "^0.11.10",
312
312
  "ramda": "~0.32.0",
@@ -326,5 +326,5 @@
326
326
  "README.md",
327
327
  "CHANGELOG.md"
328
328
  ],
329
- "gitHead": "3082a613a41b54b74ad4b53946385c0bd8247b9b"
329
+ "gitHead": "2df7f3dcd368bdbc0644117fb677610a8b4a03a5"
330
330
  }
@@ -18,6 +18,7 @@ exports.parseExtends = _extends.parseExtends;
18
18
  */
19
19
  class OverlayJSON1Parser extends _Parser.default {
20
20
  refractorOpts;
21
+ extends;
21
22
  constructor(options) {
22
23
  const {
23
24
  fileExtensions = [],
@@ -30,6 +31,8 @@ class OverlayJSON1Parser extends _Parser.default {
30
31
  fileExtensions,
31
32
  mediaTypes
32
33
  });
34
+ this.refractorOpts = {};
35
+ this.extends = false;
33
36
  }
34
37
  async canParse(file) {
35
38
  const hasSupportedFileExtension = this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);
@@ -44,10 +47,15 @@ class OverlayJSON1Parser extends _Parser.default {
44
47
  async parse(file, options) {
45
48
  const source = file.toString();
46
49
  try {
47
- const parserOpts = (0, _ramda.pick)(['sourceMap', 'style', 'strict', 'refractorOpts'], this);
50
+ const parserOptsNames = ['sourceMap', 'style', 'strict', 'refractorOpts', 'extends'];
51
+ const parserOptsGlobal = (0, _ramda.pick)(parserOptsNames, this);
52
+ const parserOptsLocal = (0, _ramda.pick)(parserOptsNames, this[this.name] ?? {});
53
+ const parserOpts = {
54
+ ...parserOptsGlobal,
55
+ ...parserOptsLocal
56
+ };
48
57
  const parseResult = await (0, _apidomParserAdapterOverlayJson.parse)(source, parserOpts);
49
- const shouldParseExtends = options?.parse?.parserOpts?.[this.name]?.extends ?? options?.parse?.parserOpts?.extends;
50
- if (shouldParseExtends) {
58
+ if (parserOpts.extends) {
51
59
  await (0, _extends.parseExtends)(parseResult, file.uri, options);
52
60
  }
53
61
  return parseResult;
@@ -11,6 +11,7 @@ import { parseExtends } from "./extends.mjs";
11
11
  */
12
12
  class OverlayJSON1Parser extends Parser {
13
13
  refractorOpts;
14
+ extends;
14
15
  constructor(options) {
15
16
  const {
16
17
  fileExtensions = [],
@@ -23,6 +24,8 @@ class OverlayJSON1Parser extends Parser {
23
24
  fileExtensions,
24
25
  mediaTypes
25
26
  });
27
+ this.refractorOpts = {};
28
+ this.extends = false;
26
29
  }
27
30
  async canParse(file) {
28
31
  const hasSupportedFileExtension = this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);
@@ -37,10 +40,15 @@ class OverlayJSON1Parser extends Parser {
37
40
  async parse(file, options) {
38
41
  const source = file.toString();
39
42
  try {
40
- const parserOpts = pick(['sourceMap', 'style', 'strict', 'refractorOpts'], this);
43
+ const parserOptsNames = ['sourceMap', 'style', 'strict', 'refractorOpts', 'extends'];
44
+ const parserOptsGlobal = pick(parserOptsNames, this);
45
+ const parserOptsLocal = pick(parserOptsNames, this[this.name] ?? {});
46
+ const parserOpts = {
47
+ ...parserOptsGlobal,
48
+ ...parserOptsLocal
49
+ };
41
50
  const parseResult = await parse(source, parserOpts);
42
- const shouldParseExtends = options?.parse?.parserOpts?.[this.name]?.extends ?? options?.parse?.parserOpts?.extends;
43
- if (shouldParseExtends) {
51
+ if (parserOpts.extends) {
44
52
  await parseExtends(parseResult, file.uri, options);
45
53
  }
46
54
  return parseResult;
@@ -18,6 +18,7 @@ exports.parseExtends = _extends.parseExtends;
18
18
  */
19
19
  class OverlayYAML1Parser extends _Parser.default {
20
20
  refractorOpts;
21
+ extends;
21
22
  constructor(options) {
22
23
  const {
23
24
  fileExtensions = [],
@@ -30,6 +31,8 @@ class OverlayYAML1Parser extends _Parser.default {
30
31
  fileExtensions,
31
32
  mediaTypes
32
33
  });
34
+ this.refractorOpts = {};
35
+ this.extends = false;
33
36
  }
34
37
  async canParse(file) {
35
38
  const hasSupportedFileExtension = this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);
@@ -44,10 +47,15 @@ class OverlayYAML1Parser extends _Parser.default {
44
47
  async parse(file, options) {
45
48
  const source = file.toString();
46
49
  try {
47
- const parserOpts = (0, _ramda.pick)(['sourceMap', 'style', 'strict', 'refractorOpts'], this);
50
+ const parserOptsNames = ['sourceMap', 'style', 'strict', 'refractorOpts', 'extends'];
51
+ const parserOptsGlobal = (0, _ramda.pick)(parserOptsNames, this);
52
+ const parserOptsLocal = (0, _ramda.pick)(parserOptsNames, this[this.name] ?? {});
53
+ const parserOpts = {
54
+ ...parserOptsGlobal,
55
+ ...parserOptsLocal
56
+ };
48
57
  const parseResult = await (0, _apidomParserAdapterOverlayYaml.parse)(source, parserOpts);
49
- const shouldParseExtends = options?.parse?.parserOpts?.[this.name]?.extends ?? options?.parse?.parserOpts?.extends;
50
- if (shouldParseExtends) {
58
+ if (parserOpts.extends) {
51
59
  await (0, _extends.parseExtends)(parseResult, file.uri, options);
52
60
  }
53
61
  return parseResult;
@@ -11,6 +11,7 @@ import { parseExtends } from "./extends.mjs";
11
11
  */
12
12
  class OverlayYAML1Parser extends Parser {
13
13
  refractorOpts;
14
+ extends;
14
15
  constructor(options) {
15
16
  const {
16
17
  fileExtensions = [],
@@ -23,6 +24,8 @@ class OverlayYAML1Parser extends Parser {
23
24
  fileExtensions,
24
25
  mediaTypes
25
26
  });
27
+ this.refractorOpts = {};
28
+ this.extends = false;
26
29
  }
27
30
  async canParse(file) {
28
31
  const hasSupportedFileExtension = this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);
@@ -37,10 +40,15 @@ class OverlayYAML1Parser extends Parser {
37
40
  async parse(file, options) {
38
41
  const source = file.toString();
39
42
  try {
40
- const parserOpts = pick(['sourceMap', 'style', 'strict', 'refractorOpts'], this);
43
+ const parserOptsNames = ['sourceMap', 'style', 'strict', 'refractorOpts', 'extends'];
44
+ const parserOptsGlobal = pick(parserOptsNames, this);
45
+ const parserOptsLocal = pick(parserOptsNames, this[this.name] ?? {});
46
+ const parserOpts = {
47
+ ...parserOptsGlobal,
48
+ ...parserOptsLocal
49
+ };
41
50
  const parseResult = await parse(source, parserOpts);
42
- const shouldParseExtends = options?.parse?.parserOpts?.[this.name]?.extends ?? options?.parse?.parserOpts?.extends;
43
- if (shouldParseExtends) {
51
+ if (parserOpts.extends) {
44
52
  await parseExtends(parseResult, file.uri, options);
45
53
  }
46
54
  return parseResult;
@@ -14,6 +14,7 @@ export interface OverlayJSON1ParserOptions extends Omit<ParserOptions, 'name'> {
14
14
  */
15
15
  declare class OverlayJSON1Parser extends Parser {
16
16
  refractorOpts: object;
17
+ extends: boolean;
17
18
  constructor(options?: OverlayJSON1ParserOptions);
18
19
  canParse(file: File): Promise<boolean>;
19
20
  parse(file: File, options?: ReferenceOptions): Promise<ParseResultElement>;
@@ -14,6 +14,7 @@ export interface OverlayYAML1ParserOptions extends Omit<ParserOptions, 'name'> {
14
14
  */
15
15
  declare class OverlayYAML1Parser extends Parser {
16
16
  refractorOpts: object;
17
+ extends: boolean;
17
18
  constructor(options?: OverlayYAML1ParserOptions);
18
19
  canParse(file: File): Promise<boolean>;
19
20
  parse(file: File, options?: ReferenceOptions): Promise<ParseResultElement>;