@speclynx/apidom-reference 5.2.6 → 5.2.7

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": "5.2.6",
3
+ "version": "5.2.7",
4
4
  "description": "Advanced algorithms for semantic ApiDOM manipulations like dereferencing or resolution.",
5
5
  "keywords": [
6
6
  "apidom",
@@ -299,36 +299,35 @@
299
299
  "license": "Apache-2.0",
300
300
  "dependencies": {
301
301
  "@babel/runtime-corejs3": "^8.0.5",
302
- "@speclynx/apidom-core": "5.2.6",
303
- "@speclynx/apidom-datamodel": "5.2.6",
304
- "@speclynx/apidom-error": "5.2.6",
305
- "@speclynx/apidom-json-pointer": "5.2.6",
306
- "@speclynx/apidom-ns-arazzo-1": "5.2.6",
307
- "@speclynx/apidom-ns-asyncapi-2": "5.2.6",
308
- "@speclynx/apidom-ns-json-schema-2020-12": "5.2.6",
309
- "@speclynx/apidom-ns-openapi-2": "5.2.6",
310
- "@speclynx/apidom-ns-openapi-3-0": "5.2.6",
311
- "@speclynx/apidom-ns-openapi-3-1": "5.2.6",
312
- "@speclynx/apidom-ns-overlay-1": "5.2.6",
313
- "@speclynx/apidom-parser-adapter-arazzo-json-1": "5.2.6",
314
- "@speclynx/apidom-parser-adapter-arazzo-yaml-1": "5.2.6",
315
- "@speclynx/apidom-parser-adapter-asyncapi-json-2": "5.2.6",
316
- "@speclynx/apidom-parser-adapter-asyncapi-yaml-2": "5.2.6",
317
- "@speclynx/apidom-parser-adapter-json": "5.2.6",
318
- "@speclynx/apidom-parser-adapter-openapi-json-2": "5.2.6",
319
- "@speclynx/apidom-parser-adapter-openapi-json-3-0": "5.2.6",
320
- "@speclynx/apidom-parser-adapter-openapi-json-3-1": "5.2.6",
321
- "@speclynx/apidom-parser-adapter-openapi-yaml-2": "5.2.6",
322
- "@speclynx/apidom-parser-adapter-openapi-yaml-3-0": "5.2.6",
323
- "@speclynx/apidom-parser-adapter-openapi-yaml-3-1": "5.2.6",
324
- "@speclynx/apidom-parser-adapter-overlay-json-1": "5.2.6",
325
- "@speclynx/apidom-parser-adapter-overlay-yaml-1": "5.2.6",
326
- "@speclynx/apidom-parser-adapter-yaml-1-2": "5.2.6",
327
- "@speclynx/apidom-traverse": "5.2.6",
302
+ "@speclynx/apidom-core": "5.2.7",
303
+ "@speclynx/apidom-datamodel": "5.2.7",
304
+ "@speclynx/apidom-error": "5.2.7",
305
+ "@speclynx/apidom-json-pointer": "5.2.7",
306
+ "@speclynx/apidom-ns-arazzo-1": "5.2.7",
307
+ "@speclynx/apidom-ns-asyncapi-2": "5.2.7",
308
+ "@speclynx/apidom-ns-json-schema-2020-12": "5.2.7",
309
+ "@speclynx/apidom-ns-openapi-2": "5.2.7",
310
+ "@speclynx/apidom-ns-openapi-3-0": "5.2.7",
311
+ "@speclynx/apidom-ns-openapi-3-1": "5.2.7",
312
+ "@speclynx/apidom-ns-overlay-1": "5.2.7",
313
+ "@speclynx/apidom-parser-adapter-arazzo-json-1": "5.2.7",
314
+ "@speclynx/apidom-parser-adapter-arazzo-yaml-1": "5.2.7",
315
+ "@speclynx/apidom-parser-adapter-asyncapi-json-2": "5.2.7",
316
+ "@speclynx/apidom-parser-adapter-asyncapi-yaml-2": "5.2.7",
317
+ "@speclynx/apidom-parser-adapter-json": "5.2.7",
318
+ "@speclynx/apidom-parser-adapter-openapi-json-2": "5.2.7",
319
+ "@speclynx/apidom-parser-adapter-openapi-json-3-0": "5.2.7",
320
+ "@speclynx/apidom-parser-adapter-openapi-json-3-1": "5.2.7",
321
+ "@speclynx/apidom-parser-adapter-openapi-yaml-2": "5.2.7",
322
+ "@speclynx/apidom-parser-adapter-openapi-yaml-3-0": "5.2.7",
323
+ "@speclynx/apidom-parser-adapter-openapi-yaml-3-1": "5.2.7",
324
+ "@speclynx/apidom-parser-adapter-overlay-json-1": "5.2.7",
325
+ "@speclynx/apidom-parser-adapter-overlay-yaml-1": "5.2.7",
326
+ "@speclynx/apidom-parser-adapter-yaml-1-2": "5.2.7",
327
+ "@speclynx/apidom-traverse": "5.2.7",
328
328
  "@swaggerexpert/arazzo-runtime-expression": "^3.2.0",
329
329
  "axios": "^1.20.0",
330
330
  "picomatch": "^4.0.7",
331
- "process": "^0.11.10",
332
331
  "ramda": "~0.32.0",
333
332
  "ramda-adjunct": "^6.1.0"
334
333
  },
@@ -346,5 +345,5 @@
346
345
  "README.md",
347
346
  "CHANGELOG.md"
348
347
  ],
349
- "gitHead": "c78f4a79e2b91b9ad099dff6dff5dc35236ae75b"
348
+ "gitHead": "e99285824ceb947024c97a13c7827843efdaa9e0"
350
349
  }
package/src/util/url.cjs CHANGED
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.unsanitize = exports.toFileSystemPath = exports.stripHash = exports.sanitize = exports.resolve = exports.relative = exports.isURI = exports.isHttpUrl = exports.isFileSystemPath = exports.hasProtocol = exports.getProtocol = exports.getHash = exports.getExtension = exports.getBasename = exports.fromFileSystemPath = exports.cwd = void 0;
8
- var _process = _interopRequireDefault(require("process"));
9
7
  var _ramda = require("ramda");
10
8
  var _ramdaAdjunct = require("ramda-adjunct");
11
9
  /**
@@ -18,7 +16,7 @@ var _ramdaAdjunct = require("ramda-adjunct");
18
16
  * @public
19
17
  */
20
18
 
21
- const isWindows = () => (0, _ramda.pathSatisfies)((0, _ramda.test)(/^win/), ['platform'], _process.default);
19
+ const isWindows = () => (0, _ramda.pathSatisfies)((0, _ramda.test)(/^win/), ['platform'], globalThis.process);
22
20
 
23
21
  /**
24
22
  * Returns the protocol of the given URL, or `undefined` if it has no protocol.
@@ -244,11 +242,15 @@ const stripHash = uri => {
244
242
  */
245
243
  exports.stripHash = stripHash;
246
244
  const cwd = () => {
245
+ const {
246
+ process
247
+ } = globalThis;
248
+
247
249
  // @ts-ignore
248
- if (_process.default.browser) {
250
+ if (typeof process?.cwd !== 'function' || process.browser) {
249
251
  return stripHash(globalThis.location.href);
250
252
  }
251
- const path = _process.default.cwd();
253
+ const path = process.cwd();
252
254
  const lastChar = (0, _ramda.last)(path);
253
255
  if (['/', '\\'].includes(lastChar)) {
254
256
  return path;
package/src/util/url.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import process from 'process';
2
1
  import { pathSatisfies, propOr, pipe, test, last } from 'ramda';
3
2
  import { isUndefined, replaceAll, isNotUndefined, trimCharsEnd } from 'ramda-adjunct';
4
3
 
@@ -12,7 +11,7 @@ import { isUndefined, replaceAll, isNotUndefined, trimCharsEnd } from 'ramda-adj
12
11
  * @public
13
12
  */
14
13
 
15
- const isWindows = () => pathSatisfies(test(/^win/), ['platform'], process);
14
+ const isWindows = () => pathSatisfies(test(/^win/), ['platform'], globalThis.process);
16
15
 
17
16
  /**
18
17
  * Returns the protocol of the given URL, or `undefined` if it has no protocol.
@@ -229,8 +228,12 @@ export const stripHash = uri => {
229
228
  * @public
230
229
  */
231
230
  export const cwd = () => {
231
+ const {
232
+ process
233
+ } = globalThis;
234
+
232
235
  // @ts-ignore
233
- if (process.browser) {
236
+ if (typeof process?.cwd !== 'function' || process.browser) {
234
237
  return stripHash(globalThis.location.href);
235
238
  }
236
239
  const path = process.cwd();