mc8yp 2.7.2 → 2.7.4
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/dist/cli.mjs +542 -106
- package/package.json +11 -12
package/dist/cli.mjs
CHANGED
|
@@ -1824,7 +1824,7 @@ const consola = createConsola();
|
|
|
1824
1824
|
//#endregion
|
|
1825
1825
|
//#region package.json
|
|
1826
1826
|
var name = "mc8yp";
|
|
1827
|
-
var version = "2.7.
|
|
1827
|
+
var version = "2.7.4";
|
|
1828
1828
|
var description$1 = "Cumulocity IoT MCP Server - Model Context Protocol integration for IoT device management";
|
|
1829
1829
|
//#endregion
|
|
1830
1830
|
//#region \0virtual:core-openapi
|
|
@@ -80232,7 +80232,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
80232
80232
|
});
|
|
80233
80233
|
}
|
|
80234
80234
|
//#endregion
|
|
80235
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
80235
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/Paging.js
|
|
80236
80236
|
/**
|
|
80237
80237
|
* Paging allows you to query the next and previous data chunks
|
|
80238
80238
|
* in a convenient way. You can also go to a specific page or just read
|
|
@@ -80296,7 +80296,7 @@ var Paging = class {
|
|
|
80296
80296
|
}
|
|
80297
80297
|
};
|
|
80298
80298
|
//#endregion
|
|
80299
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
80299
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/Service.js
|
|
80300
80300
|
var Service = class {
|
|
80301
80301
|
constructor(client, realtime) {
|
|
80302
80302
|
this.client = client;
|
|
@@ -118694,7 +118694,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
118694
118694
|
exports.AbortError = AbortError;
|
|
118695
118695
|
}));
|
|
118696
118696
|
//#endregion
|
|
118697
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
118697
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/FetchClient.js
|
|
118698
118698
|
var import_node_ponyfill = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
118699
118699
|
const nodeFetch = require_lib$1();
|
|
118700
118700
|
const realFetch = nodeFetch.default || nodeFetch;
|
|
@@ -118784,7 +118784,7 @@ var FetchClient = class {
|
|
|
118784
118784
|
}
|
|
118785
118785
|
};
|
|
118786
118786
|
//#endregion
|
|
118787
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
118787
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/BasicAuth.js
|
|
118788
118788
|
var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
118789
118789
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
118790
118790
|
var error = function error(message) {
|
|
@@ -118884,7 +118884,7 @@ var BasicAuth = class {
|
|
|
118884
118884
|
}
|
|
118885
118885
|
};
|
|
118886
118886
|
//#endregion
|
|
118887
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
118887
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/BearerAuth.js
|
|
118888
118888
|
const secrets = /* @__PURE__ */ new WeakMap();
|
|
118889
118889
|
var BearerAuth = class {
|
|
118890
118890
|
constructor(token) {
|
|
@@ -118932,7 +118932,7 @@ var BearerAuth = class {
|
|
|
118932
118932
|
}
|
|
118933
118933
|
};
|
|
118934
118934
|
//#endregion
|
|
118935
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
118935
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/BearerAuthFromSessionStorage.js
|
|
118936
118936
|
var BearerAuthFromSessionStorage = class BearerAuthFromSessionStorage extends BearerAuth {
|
|
118937
118937
|
static removeEntriesFromSessionStorage() {
|
|
118938
118938
|
sessionStorage.removeItem(BearerAuthFromSessionStorage.sessionStorageKey);
|
|
@@ -118971,7 +118971,7 @@ BearerAuthFromSessionStorage.sessionStorageKey = "bearerAuthToken";
|
|
|
118971
118971
|
*/
|
|
118972
118972
|
BearerAuthFromSessionStorage.sessionStorageKeyToKeepToken = `bearerAuthTokenKeep`;
|
|
118973
118973
|
//#endregion
|
|
118974
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
118974
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/CookieAuth.js
|
|
118975
118975
|
/**
|
|
118976
118976
|
* Allows to use Cookies for Authorization to the
|
|
118977
118977
|
* Cumulocity API.
|
|
@@ -119018,7 +119018,7 @@ var CookieAuth = class {
|
|
|
119018
119018
|
}
|
|
119019
119019
|
};
|
|
119020
119020
|
//#endregion
|
|
119021
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
119021
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/MicroserviceClientRequestAuth.js
|
|
119022
119022
|
/**
|
|
119023
119023
|
* Allows to use either Cookie-Auth or Basic-Auth
|
|
119024
119024
|
* of a microservice client request header
|
|
@@ -119066,7 +119066,7 @@ var MicroserviceClientRequestAuth = class {
|
|
|
119066
119066
|
}
|
|
119067
119067
|
};
|
|
119068
119068
|
//#endregion
|
|
119069
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
119069
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/NodeJSCookieAuth.js
|
|
119070
119070
|
/**
|
|
119071
119071
|
* Extracts the `authorization` cookie from the `set-cookie` header of a response.
|
|
119072
119072
|
*
|
|
@@ -119081,7 +119081,12 @@ var NodeJSCookieAuth = class extends MicroserviceClientRequestAuth {
|
|
|
119081
119081
|
}
|
|
119082
119082
|
};
|
|
119083
119083
|
//#endregion
|
|
119084
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
119084
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/gettext-typed.js
|
|
119085
|
+
function gettext$1(str) {
|
|
119086
|
+
return str;
|
|
119087
|
+
}
|
|
119088
|
+
//#endregion
|
|
119089
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/core/QueriesUtil.js
|
|
119085
119090
|
var QueriesUtil = class {
|
|
119086
119091
|
constructor() {
|
|
119087
119092
|
this.operatorFns = {
|
|
@@ -122075,7 +122080,7 @@ var require_cometd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
122075
122080
|
});
|
|
122076
122081
|
}));
|
|
122077
122082
|
//#endregion
|
|
122078
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
122083
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/realtime/MetaChannel.js
|
|
122079
122084
|
var import_node = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
122080
122085
|
require_cometd_nodejs_client().adapt();
|
|
122081
122086
|
const lib = require_cometd();
|
|
@@ -122092,7 +122097,7 @@ var MetaChannel;
|
|
|
122092
122097
|
MetaChannel["UNSUBSCRIBE"] = "/meta/unsubscribe";
|
|
122093
122098
|
})(MetaChannel || (MetaChannel = {}));
|
|
122094
122099
|
//#endregion
|
|
122095
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
122100
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/realtime/Realtime.js
|
|
122096
122101
|
var Realtime = class {
|
|
122097
122102
|
/**
|
|
122098
122103
|
* only initializing cometd if it is actually needed
|
|
@@ -122189,7 +122194,7 @@ var Realtime = class {
|
|
|
122189
122194
|
}
|
|
122190
122195
|
};
|
|
122191
122196
|
//#endregion
|
|
122192
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
122197
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/event/EventService.js
|
|
122193
122198
|
/**
|
|
122194
122199
|
* This class allows managing for events.
|
|
122195
122200
|
*/
|
|
@@ -130684,7 +130689,7 @@ var require_es_set_tostringtag = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
130684
130689
|
};
|
|
130685
130690
|
}));
|
|
130686
130691
|
//#endregion
|
|
130687
|
-
//#region node_modules/.pnpm/form-data@4.0.
|
|
130692
|
+
//#region node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/populate.js
|
|
130688
130693
|
var require_populate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
130689
130694
|
module.exports = function(dst, src) {
|
|
130690
130695
|
Object.keys(src).forEach(function(prop) {
|
|
@@ -130694,7 +130699,7 @@ var require_populate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
130694
130699
|
};
|
|
130695
130700
|
}));
|
|
130696
130701
|
//#endregion
|
|
130697
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
130702
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/event/EventBinaryService.js
|
|
130698
130703
|
var import_form_data = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
130699
130704
|
var CombinedStream = require_combined_stream();
|
|
130700
130705
|
var util = __require("util");
|
|
@@ -130711,6 +130716,17 @@ var import_form_data = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
|
|
|
130711
130716
|
var hasOwn = require_hasown();
|
|
130712
130717
|
var populate = require_populate();
|
|
130713
130718
|
/**
|
|
130719
|
+
* Escape CR, LF, and `"` in a multipart `name`/`filename` parameter, so a field
|
|
130720
|
+
* name or filename can not break out of its header line to inject headers or
|
|
130721
|
+
* smuggle additional parts. Matches the WHATWG HTML multipart/form-data encoding.
|
|
130722
|
+
*
|
|
130723
|
+
* @param {string} str - the parameter value to escape
|
|
130724
|
+
* @returns {string} the escaped value
|
|
130725
|
+
*/
|
|
130726
|
+
function escapeHeaderParam(str) {
|
|
130727
|
+
return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
|
|
130728
|
+
}
|
|
130729
|
+
/**
|
|
130714
130730
|
* Create readable "multipart/form-data" streams.
|
|
130715
130731
|
* Can be used to submit forms
|
|
130716
130732
|
* and file uploads to other web applications.
|
|
@@ -130781,7 +130797,7 @@ var import_form_data = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
|
|
|
130781
130797
|
var contentType = this._getContentType(value, options);
|
|
130782
130798
|
var contents = "";
|
|
130783
130799
|
var headers = {
|
|
130784
|
-
"Content-Disposition": ["form-data", "name=\"" + field + "\""].concat(contentDisposition || []),
|
|
130800
|
+
"Content-Disposition": ["form-data", "name=\"" + escapeHeaderParam(field) + "\""].concat(contentDisposition || []),
|
|
130785
130801
|
"Content-Type": [].concat(contentType || [])
|
|
130786
130802
|
};
|
|
130787
130803
|
if (typeof options.header === "object") populate(headers, options.header);
|
|
@@ -130799,7 +130815,7 @@ var import_form_data = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
|
|
|
130799
130815
|
if (typeof options.filepath === "string") filename = path.normalize(options.filepath).replace(/\\/g, "/");
|
|
130800
130816
|
else if (options.filename || value && (value.name || value.path)) filename = path.basename(options.filename || value && (value.name || value.path));
|
|
130801
130817
|
else if (value && value.readable && hasOwn(value, "httpVersion")) filename = path.basename(value.client._httpMessage.path || "");
|
|
130802
|
-
if (filename) return "filename=\"" + filename + "\"";
|
|
130818
|
+
if (filename) return "filename=\"" + escapeHeaderParam(filename) + "\"";
|
|
130803
130819
|
};
|
|
130804
130820
|
FormData.prototype._getContentType = function(value, options) {
|
|
130805
130821
|
var contentType = options.contentType;
|
|
@@ -130926,11 +130942,11 @@ var import_form_data = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
|
|
|
130926
130942
|
FormData.prototype.toString = function() {
|
|
130927
130943
|
return "[object FormData]";
|
|
130928
130944
|
};
|
|
130929
|
-
setToStringTag(FormData, "FormData");
|
|
130945
|
+
setToStringTag(FormData.prototype, "FormData");
|
|
130930
130946
|
module.exports = FormData;
|
|
130931
130947
|
})))(), 1);
|
|
130932
130948
|
//#endregion
|
|
130933
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
130949
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/inventory/InventoryBinaryService.js
|
|
130934
130950
|
var InventoryBinaryService = class extends Service {
|
|
130935
130951
|
constructor() {
|
|
130936
130952
|
super(...arguments);
|
|
@@ -131070,7 +131086,7 @@ var InventoryBinaryService = class extends Service {
|
|
|
131070
131086
|
}
|
|
131071
131087
|
};
|
|
131072
131088
|
//#endregion
|
|
131073
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
131089
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/inventory/InventoryService.js
|
|
131074
131090
|
/**
|
|
131075
131091
|
* Possible types of a child.
|
|
131076
131092
|
*/
|
|
@@ -131904,7 +131920,7 @@ var InventoryService = class extends Service {
|
|
|
131904
131920
|
}
|
|
131905
131921
|
};
|
|
131906
131922
|
//#endregion
|
|
131907
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
131923
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/measurement/MeasurementService.js
|
|
131908
131924
|
/**
|
|
131909
131925
|
* This class allows for managing measurements.
|
|
131910
131926
|
*/
|
|
@@ -132103,7 +132119,7 @@ var MeasurementService = class extends Service {
|
|
|
132103
132119
|
}
|
|
132104
132120
|
};
|
|
132105
132121
|
//#endregion
|
|
132106
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132122
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/measurement/ISeriesFilter.js
|
|
132107
132123
|
var aggregationType;
|
|
132108
132124
|
(function(aggregationType) {
|
|
132109
132125
|
aggregationType["MINUTELY"] = "MINUTELY";
|
|
@@ -132111,7 +132127,7 @@ var aggregationType;
|
|
|
132111
132127
|
aggregationType["DAILY"] = "DAILY";
|
|
132112
132128
|
})(aggregationType || (aggregationType = {}));
|
|
132113
132129
|
//#endregion
|
|
132114
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132130
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/alarm/AlarmService.js
|
|
132115
132131
|
/**
|
|
132116
132132
|
* This class allows for managing alarms.
|
|
132117
132133
|
*/
|
|
@@ -132303,7 +132319,7 @@ var AlarmService = class extends Service {
|
|
|
132303
132319
|
}
|
|
132304
132320
|
};
|
|
132305
132321
|
//#endregion
|
|
132306
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132322
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/operation/OperationService.js
|
|
132307
132323
|
/**
|
|
132308
132324
|
* This class allows for managing operations on a device.
|
|
132309
132325
|
*/
|
|
@@ -132430,7 +132446,7 @@ var OperationService = class extends Service {
|
|
|
132430
132446
|
}
|
|
132431
132447
|
};
|
|
132432
132448
|
//#endregion
|
|
132433
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132449
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkService.js
|
|
132434
132450
|
/**
|
|
132435
132451
|
* This class allows for managing bulk operations.
|
|
132436
132452
|
*/
|
|
@@ -132581,14 +132597,14 @@ var OperationBulkService = class extends Service {
|
|
|
132581
132597
|
}
|
|
132582
132598
|
};
|
|
132583
132599
|
//#endregion
|
|
132584
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132600
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/gettext.js
|
|
132585
132601
|
/**
|
|
132586
132602
|
* Identity function used for marking strings for translation
|
|
132587
132603
|
* @deprecated Use the typed version of gettext instead from typed-gettext file.
|
|
132588
132604
|
*/
|
|
132589
132605
|
const gettext = (t) => t;
|
|
132590
132606
|
//#endregion
|
|
132591
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132607
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkStatus.js
|
|
132592
132608
|
/**
|
|
132593
132609
|
* A bulk operation can have one of the following states.
|
|
132594
132610
|
*/
|
|
@@ -132600,7 +132616,7 @@ var OperationBulkStatus;
|
|
|
132600
132616
|
OperationBulkStatus[OperationBulkStatus["DELETED"] = gettext("DELETED")] = "DELETED";
|
|
132601
132617
|
})(OperationBulkStatus || (OperationBulkStatus = {}));
|
|
132602
132618
|
//#endregion
|
|
132603
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132619
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/operation/OperationBulkGeneralStatus.js
|
|
132604
132620
|
/**
|
|
132605
132621
|
* A bulk operation can have one of the following general statuses.
|
|
132606
132622
|
*/
|
|
@@ -132616,7 +132632,7 @@ var OperationBulkGeneralStatus;
|
|
|
132616
132632
|
OperationBulkGeneralStatus[OperationBulkGeneralStatus["INCORRECT"] = gettext("INCORRECT")] = "INCORRECT";
|
|
132617
132633
|
})(OperationBulkGeneralStatus || (OperationBulkGeneralStatus = {}));
|
|
132618
132634
|
//#endregion
|
|
132619
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132635
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/operation/OperationStatus.js
|
|
132620
132636
|
/**
|
|
132621
132637
|
* An Operation can have one of the following states.
|
|
132622
132638
|
*/
|
|
@@ -132628,7 +132644,7 @@ var OperationStatus;
|
|
|
132628
132644
|
OperationStatus[OperationStatus["FAILED"] = gettext("FAILED")] = "FAILED";
|
|
132629
132645
|
})(OperationStatus || (OperationStatus = {}));
|
|
132630
132646
|
//#endregion
|
|
132631
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
132647
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/tenant/TenantService.js
|
|
132632
132648
|
/**
|
|
132633
132649
|
* @description
|
|
132634
132650
|
* This service allows for managing tenants.
|
|
@@ -132995,14 +133011,14 @@ var TenantService = class extends Service {
|
|
|
132995
133011
|
}
|
|
132996
133012
|
};
|
|
132997
133013
|
//#endregion
|
|
132998
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
133014
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/tenant/TenantStatus.js
|
|
132999
133015
|
var TenantStatus;
|
|
133000
133016
|
(function(TenantStatus) {
|
|
133001
133017
|
TenantStatus[TenantStatus["ACTIVE"] = gettext("ACTIVE")] = "ACTIVE";
|
|
133002
133018
|
TenantStatus[TenantStatus["SUSPENDED"] = gettext("SUSPENDED")] = "SUSPENDED";
|
|
133003
133019
|
})(TenantStatus || (TenantStatus = {}));
|
|
133004
133020
|
//#endregion
|
|
133005
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
133021
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/tenant/TfaStrategy.js
|
|
133006
133022
|
/**
|
|
133007
133023
|
* Represents a strategy used for two-factor authentication.
|
|
133008
133024
|
*/
|
|
@@ -133014,7 +133030,7 @@ var TfaStrategy;
|
|
|
133014
133030
|
TfaStrategy["SMS"] = "SMS";
|
|
133015
133031
|
})(TfaStrategy || (TfaStrategy = {}));
|
|
133016
133032
|
//#endregion
|
|
133017
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
133033
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/user/UserInventoryRoleService.js
|
|
133018
133034
|
/**
|
|
133019
133035
|
* @description
|
|
133020
133036
|
* This service allows for managing current user's inventory roles.
|
|
@@ -133141,7 +133157,7 @@ var UserInventoryRoleService = class extends Service {
|
|
|
133141
133157
|
}
|
|
133142
133158
|
};
|
|
133143
133159
|
//#endregion
|
|
133144
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
133160
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/user/UserService.js
|
|
133145
133161
|
/**
|
|
133146
133162
|
* @description
|
|
133147
133163
|
* This service allows for managing users.
|
|
@@ -133865,7 +133881,7 @@ var UserService = class extends Service {
|
|
|
133865
133881
|
}
|
|
133866
133882
|
};
|
|
133867
133883
|
//#endregion
|
|
133868
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
133884
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/user/PasswordStrength.js
|
|
133869
133885
|
var PasswordStrength;
|
|
133870
133886
|
(function(PasswordStrength) {
|
|
133871
133887
|
PasswordStrength["GREEN"] = "GREEN";
|
|
@@ -133873,7 +133889,7 @@ var PasswordStrength;
|
|
|
133873
133889
|
PasswordStrength["YELLOW"] = "YELLOW";
|
|
133874
133890
|
})(PasswordStrength || (PasswordStrength = {}));
|
|
133875
133891
|
//#endregion
|
|
133876
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
133892
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationBinaryService.js
|
|
133877
133893
|
var ApplicationBinaryService = class extends Service {
|
|
133878
133894
|
constructor(client, applicationOrId) {
|
|
133879
133895
|
super(client);
|
|
@@ -134041,7 +134057,7 @@ var ApplicationBinaryService = class extends Service {
|
|
|
134041
134057
|
}
|
|
134042
134058
|
};
|
|
134043
134059
|
//#endregion
|
|
134044
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134060
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationType.js
|
|
134045
134061
|
var ApplicationType;
|
|
134046
134062
|
(function(ApplicationType) {
|
|
134047
134063
|
ApplicationType["EXTERNAL"] = "EXTERNAL";
|
|
@@ -134050,7 +134066,7 @@ var ApplicationType;
|
|
|
134050
134066
|
ApplicationType["FEATURE"] = "FEATURE";
|
|
134051
134067
|
})(ApplicationType || (ApplicationType = {}));
|
|
134052
134068
|
//#endregion
|
|
134053
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134069
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationService.js
|
|
134054
134070
|
var ApplicationService = class extends Service {
|
|
134055
134071
|
constructor() {
|
|
134056
134072
|
super(...arguments);
|
|
@@ -134512,11 +134528,10 @@ var ApplicationService = class extends Service {
|
|
|
134512
134528
|
*/
|
|
134513
134529
|
getAppManifest(app, version) {
|
|
134514
134530
|
return __awaiter(this, void 0, void 0, function* () {
|
|
134515
|
-
const date = /* @__PURE__ */ new Date();
|
|
134516
134531
|
let result;
|
|
134517
|
-
if (!version) result = yield this.client.fetch(`/apps/${app.contextPath}/cumulocity.json
|
|
134518
|
-
else result = yield this.client.fetch(`/apps/${app.contextPath}@${version}/cumulocity.json
|
|
134519
|
-
if (result.status >= 400) throw new Error(gettext("No Cumulocity IoT manifest found."));
|
|
134532
|
+
if (!version) result = yield this.client.fetch(`/apps/${app.contextPath}/cumulocity.json`, { cache: "no-cache" });
|
|
134533
|
+
else result = yield this.client.fetch(`/apps/${app.contextPath}@${version}/cumulocity.json`, { cache: "no-cache" });
|
|
134534
|
+
if (result.status >= 400) throw new Error(gettext$1("No Cumulocity IoT manifest found."));
|
|
134520
134535
|
return yield result.json();
|
|
134521
134536
|
});
|
|
134522
134537
|
}
|
|
@@ -134639,7 +134654,7 @@ var ApplicationService = class extends Service {
|
|
|
134639
134654
|
}
|
|
134640
134655
|
};
|
|
134641
134656
|
//#endregion
|
|
134642
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134657
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/application/IApplicationInstanceDetails.js
|
|
134643
134658
|
var InstanceStatus;
|
|
134644
134659
|
(function(InstanceStatus) {
|
|
134645
134660
|
InstanceStatus["Up"] = "Up";
|
|
@@ -134648,21 +134663,21 @@ var InstanceStatus;
|
|
|
134648
134663
|
InstanceStatus["Unknown"] = "Unknown";
|
|
134649
134664
|
})(InstanceStatus || (InstanceStatus = {}));
|
|
134650
134665
|
//#endregion
|
|
134651
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134666
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/application/BillingMode.js
|
|
134652
134667
|
var BillingMode;
|
|
134653
134668
|
(function(BillingMode) {
|
|
134654
134669
|
BillingMode["SUBSCRIPTION"] = "SUBSCRIPTION";
|
|
134655
134670
|
BillingMode["RESOURCES"] = "RESOURCES";
|
|
134656
134671
|
})(BillingMode || (BillingMode = {}));
|
|
134657
134672
|
//#endregion
|
|
134658
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134673
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/application/Isolation.js
|
|
134659
134674
|
var Isolation;
|
|
134660
134675
|
(function(Isolation) {
|
|
134661
134676
|
Isolation["PER_TENANT"] = "PER_TENANT";
|
|
134662
134677
|
Isolation["MULTI_TENANT"] = "MULTI_TENANT";
|
|
134663
134678
|
})(Isolation || (Isolation = {}));
|
|
134664
134679
|
//#endregion
|
|
134665
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134680
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/application/ApplicationAvailability.js
|
|
134666
134681
|
var ApplicationAvailability;
|
|
134667
134682
|
(function(ApplicationAvailability) {
|
|
134668
134683
|
ApplicationAvailability[ApplicationAvailability["MARKET"] = gettext("MARKET")] = "MARKET";
|
|
@@ -134670,7 +134685,7 @@ var ApplicationAvailability;
|
|
|
134670
134685
|
ApplicationAvailability[ApplicationAvailability["SHARED"] = gettext("SHARED")] = "SHARED";
|
|
134671
134686
|
})(ApplicationAvailability || (ApplicationAvailability = {}));
|
|
134672
134687
|
//#endregion
|
|
134673
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134688
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/system-options/SystemOptionsService.js
|
|
134674
134689
|
var SystemOptionsService = class extends Service {
|
|
134675
134690
|
constructor() {
|
|
134676
134691
|
super(...arguments);
|
|
@@ -134746,7 +134761,7 @@ var SystemOptionsService = class extends Service {
|
|
|
134746
134761
|
}
|
|
134747
134762
|
};
|
|
134748
134763
|
//#endregion
|
|
134749
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134764
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/tenant-options/TenantOptionsService.js
|
|
134750
134765
|
/**
|
|
134751
134766
|
* @description
|
|
134752
134767
|
* This service allows for managing tenant's options.
|
|
@@ -134923,7 +134938,7 @@ var TenantOptionsService = class extends Service {
|
|
|
134923
134938
|
}
|
|
134924
134939
|
};
|
|
134925
134940
|
//#endregion
|
|
134926
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134941
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/tenant-security-options/TenantSecurityOptionsService.js
|
|
134927
134942
|
/**
|
|
134928
134943
|
* @description
|
|
134929
134944
|
* This service allows to get tenant security option.
|
|
@@ -134969,7 +134984,7 @@ var TenantSecurityOptionsService = class extends Service {
|
|
|
134969
134984
|
}
|
|
134970
134985
|
};
|
|
134971
134986
|
//#endregion
|
|
134972
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
134987
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/TenantLoginOptionsService.js
|
|
134973
134988
|
/**
|
|
134974
134989
|
* @description
|
|
134975
134990
|
* This service allows to get tenant login options.
|
|
@@ -135180,7 +135195,7 @@ var TenantLoginOptionsService = class extends Service {
|
|
|
135180
135195
|
}
|
|
135181
135196
|
};
|
|
135182
135197
|
//#endregion
|
|
135183
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135198
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/tenant-login-options/ITenantLoginOptions.js
|
|
135184
135199
|
var TenantLoginOptionType;
|
|
135185
135200
|
(function(TenantLoginOptionType) {
|
|
135186
135201
|
/**
|
|
@@ -135207,7 +135222,7 @@ var UserManagementSource;
|
|
|
135207
135222
|
UserManagementSource["INTERNAL"] = "INTERNAL";
|
|
135208
135223
|
})(UserManagementSource || (UserManagementSource = {}));
|
|
135209
135224
|
//#endregion
|
|
135210
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135225
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/audit/AuditService.js
|
|
135211
135226
|
var AuditService = class extends Service {
|
|
135212
135227
|
constructor() {
|
|
135213
135228
|
super(...arguments);
|
|
@@ -135296,7 +135311,7 @@ var AuditService = class extends Service {
|
|
|
135296
135311
|
}
|
|
135297
135312
|
};
|
|
135298
135313
|
//#endregion
|
|
135299
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135314
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/audit/AuditRecordType.js
|
|
135300
135315
|
/**
|
|
135301
135316
|
* A specific audit record can have one of the following types
|
|
135302
135317
|
*/
|
|
@@ -135327,7 +135342,7 @@ var AuditRecordType;
|
|
|
135327
135342
|
AuditRecordType["USER_AUTHENTICATION"] = "UserAuthentication";
|
|
135328
135343
|
})(AuditRecordType || (AuditRecordType = {}));
|
|
135329
135344
|
//#endregion
|
|
135330
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135345
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/audit/ChangeType.js
|
|
135331
135346
|
/**
|
|
135332
135347
|
* An audit record can have one of the following change type
|
|
135333
135348
|
*/
|
|
@@ -135338,7 +135353,7 @@ var ChangeType;
|
|
|
135338
135353
|
ChangeType[ChangeType["REMOVED"] = gettext("REMOVED")] = "REMOVED";
|
|
135339
135354
|
})(ChangeType || (ChangeType = {}));
|
|
135340
135355
|
//#endregion
|
|
135341
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135356
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/inventory-role/InventoryRoleService.js
|
|
135342
135357
|
var InventoryRoleService = class extends Service {
|
|
135343
135358
|
constructor() {
|
|
135344
135359
|
super(...arguments);
|
|
@@ -135471,7 +135486,7 @@ var InventoryRoleService = class extends Service {
|
|
|
135471
135486
|
}
|
|
135472
135487
|
};
|
|
135473
135488
|
//#endregion
|
|
135474
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135489
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationStatus.js
|
|
135475
135490
|
/**
|
|
135476
135491
|
* Device registration can have one of the following states.
|
|
135477
135492
|
*/
|
|
@@ -135483,7 +135498,7 @@ var DeviceRegistrationStatus;
|
|
|
135483
135498
|
DeviceRegistrationStatus[DeviceRegistrationStatus["BLOCKED"] = gettext("BLOCKED")] = "BLOCKED";
|
|
135484
135499
|
})(DeviceRegistrationStatus || (DeviceRegistrationStatus = {}));
|
|
135485
135500
|
//#endregion
|
|
135486
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135501
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationService.js
|
|
135487
135502
|
/**
|
|
135488
135503
|
* This class allows registration of a new device.
|
|
135489
135504
|
*/
|
|
@@ -135836,7 +135851,7 @@ var DeviceRegistrationService = class extends Service {
|
|
|
135836
135851
|
}
|
|
135837
135852
|
};
|
|
135838
135853
|
//#endregion
|
|
135839
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135854
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationBulkService.js
|
|
135840
135855
|
/**
|
|
135841
135856
|
* This class allows for bulk registering devices.
|
|
135842
135857
|
*/
|
|
@@ -135896,7 +135911,7 @@ var DeviceRegistrationBulkService = class {
|
|
|
135896
135911
|
}
|
|
135897
135912
|
};
|
|
135898
135913
|
//#endregion
|
|
135899
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135914
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/device-registration/DeviceRegistrationSecurityMode.js
|
|
135900
135915
|
/**
|
|
135901
135916
|
* Device registration can have one of the following security modes.
|
|
135902
135917
|
*/
|
|
@@ -135907,7 +135922,7 @@ var DeviceRegistrationSecurityMode;
|
|
|
135907
135922
|
DeviceRegistrationSecurityMode["IGNORED"] = "IGNORED";
|
|
135908
135923
|
})(DeviceRegistrationSecurityMode || (DeviceRegistrationSecurityMode = {}));
|
|
135909
135924
|
//#endregion
|
|
135910
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135925
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/user-role/UserRoleService.js
|
|
135911
135926
|
/**
|
|
135912
135927
|
* @description
|
|
135913
135928
|
* This service allows for fetch user roles.
|
|
@@ -135971,7 +135986,7 @@ var UserRoleService = class extends Service {
|
|
|
135971
135986
|
}
|
|
135972
135987
|
};
|
|
135973
135988
|
//#endregion
|
|
135974
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
135989
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/user-group/UserGroupService.js
|
|
135975
135990
|
var ChildType;
|
|
135976
135991
|
(function(ChildType) {
|
|
135977
135992
|
ChildType["ROLES"] = "roles";
|
|
@@ -136271,7 +136286,7 @@ var UserGroupService = class extends Service {
|
|
|
136271
136286
|
}
|
|
136272
136287
|
};
|
|
136273
136288
|
//#endregion
|
|
136274
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
136289
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/identity/IdentityService.js
|
|
136275
136290
|
/**
|
|
136276
136291
|
* This class allwos for managing external identifiers.
|
|
136277
136292
|
*/
|
|
@@ -136448,7 +136463,7 @@ var IdentityService = class {
|
|
|
136448
136463
|
}
|
|
136449
136464
|
};
|
|
136450
136465
|
//#endregion
|
|
136451
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
136466
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/smart-groups/SmartGroupsService.js
|
|
136452
136467
|
var SmartGroupsService = class extends Service {
|
|
136453
136468
|
constructor(client) {
|
|
136454
136469
|
super(client);
|
|
@@ -136601,7 +136616,7 @@ var SmartGroupsService = class extends Service {
|
|
|
136601
136616
|
}
|
|
136602
136617
|
};
|
|
136603
136618
|
//#endregion
|
|
136604
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
136619
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/smart-rules/SmartRulesService.js
|
|
136605
136620
|
var SmartRulesService = class SmartRulesService extends Service {
|
|
136606
136621
|
constructor(client) {
|
|
136607
136622
|
super(client);
|
|
@@ -136752,7 +136767,7 @@ var SmartRulesService = class SmartRulesService extends Service {
|
|
|
136752
136767
|
};
|
|
136753
136768
|
SmartRulesService.microserviceName = "smartrule";
|
|
136754
136769
|
//#endregion
|
|
136755
|
-
//#region node_modules/.pnpm/@c8y+client@1023.
|
|
136770
|
+
//#region node_modules/.pnpm/@c8y+client@1023.97.8/node_modules/@c8y/client/lib/esm2015/src/Client.js
|
|
136756
136771
|
var Client = class Client {
|
|
136757
136772
|
/**
|
|
136758
136773
|
* Authenticates the given user. Determines the tenant by itself via a call to tenant/currentTenant.
|
|
@@ -137519,18 +137534,18 @@ function clearActiveTenant() {
|
|
|
137519
137534
|
writeFileSync(CONFIG_FILE, JSON.stringify({ tenantUrl: null }), "utf8");
|
|
137520
137535
|
}
|
|
137521
137536
|
//#endregion
|
|
137522
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137537
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js
|
|
137523
137538
|
const win32Sep = "\\";
|
|
137524
137539
|
function convertPathToPosix(filePath) {
|
|
137525
137540
|
if (filePath.startsWith("\\\\?\\")) return filePath;
|
|
137526
137541
|
return filePath.split(win32Sep).join("/");
|
|
137527
137542
|
}
|
|
137528
137543
|
//#endregion
|
|
137529
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137544
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js
|
|
137530
137545
|
const isWindowsConst = /^win/.test(globalThis.process ? globalThis.process.platform : "");
|
|
137531
137546
|
const isWindows = () => isWindowsConst;
|
|
137532
137547
|
//#endregion
|
|
137533
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137548
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js
|
|
137534
137549
|
const forwardSlashPattern = /\//g;
|
|
137535
137550
|
const protocolPattern = /^(\w{2,}):\/\//i;
|
|
137536
137551
|
const jsonPointerSlash = /~1/g;
|
|
@@ -137934,7 +137949,7 @@ function safePointerToPath(pointer) {
|
|
|
137934
137949
|
});
|
|
137935
137950
|
}
|
|
137936
137951
|
//#endregion
|
|
137937
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
137952
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js
|
|
137938
137953
|
const nonJsonTypes = [
|
|
137939
137954
|
"function",
|
|
137940
137955
|
"symbol",
|
|
@@ -138085,7 +138100,7 @@ function normalizeError(err) {
|
|
|
138085
138100
|
return err;
|
|
138086
138101
|
}
|
|
138087
138102
|
//#endregion
|
|
138088
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138103
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js
|
|
138089
138104
|
function getSchemaBasePath(basePath, value, legacyId = false) {
|
|
138090
138105
|
const schemaId = getSchemaId(value, legacyId);
|
|
138091
138106
|
return schemaId ? resolve$1(basePath, schemaId) : basePath;
|
|
@@ -138101,15 +138116,18 @@ function usesDynamicIdScope(value) {
|
|
|
138101
138116
|
function registerSchemaResources($refs, basePath, value, pathType, dynamicIdScope = false) {
|
|
138102
138117
|
if (!dynamicIdScope) return;
|
|
138103
138118
|
const seen = /* @__PURE__ */ new Set();
|
|
138104
|
-
const visit = (node, scopeBase, inheritedLegacyId) => {
|
|
138119
|
+
const visit = (node, scopeBase, inheritedLegacyId, sourcePath) => {
|
|
138105
138120
|
if (!node || typeof node !== "object" || ArrayBuffer.isView(node) || seen.has(node)) return;
|
|
138106
138121
|
seen.add(node);
|
|
138107
138122
|
const legacyId = getSchemaIdMode(node, inheritedLegacyId);
|
|
138108
138123
|
const nextScopeBase = getSchemaBasePath(scopeBase, node, legacyId);
|
|
138109
|
-
if (nextScopeBase !== scopeBase) $refs._addAlias(nextScopeBase, node, pathType, dynamicIdScope, legacyId);
|
|
138110
|
-
for (const key of Object.keys(node)) visit(node[key], nextScopeBase, legacyId);
|
|
138124
|
+
if (nextScopeBase !== scopeBase) $refs._addAlias(nextScopeBase, node, pathType, dynamicIdScope, legacyId, sourcePath);
|
|
138125
|
+
for (const key of Object.keys(node)) visit(node[key], nextScopeBase, legacyId, joinPointer(sourcePath, key));
|
|
138111
138126
|
};
|
|
138112
|
-
visit(value, basePath, false);
|
|
138127
|
+
visit(value, basePath, false, basePath + "#");
|
|
138128
|
+
}
|
|
138129
|
+
function joinPointer(path, key) {
|
|
138130
|
+
return path + "/" + key.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
138113
138131
|
}
|
|
138114
138132
|
function getSchemaId(value, inheritedLegacyId = false) {
|
|
138115
138133
|
if (!value || typeof value !== "object") return;
|
|
@@ -138128,7 +138146,7 @@ function getSchemaIdMode(value, inheritedLegacyId = false) {
|
|
|
138128
138146
|
return inheritedLegacyId;
|
|
138129
138147
|
}
|
|
138130
138148
|
//#endregion
|
|
138131
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138149
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js
|
|
138132
138150
|
const nullSymbol = Symbol("null");
|
|
138133
138151
|
const slashes = /\//g;
|
|
138134
138152
|
const tildes = /~/g;
|
|
@@ -138453,7 +138471,7 @@ function isAliasedResource($ref) {
|
|
|
138453
138471
|
return Boolean($ref.path && $ref.path in $ref.$refs._aliases);
|
|
138454
138472
|
}
|
|
138455
138473
|
//#endregion
|
|
138456
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138474
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js
|
|
138457
138475
|
/**
|
|
138458
138476
|
* This class represents a single JSON reference and its resolved value.
|
|
138459
138477
|
*
|
|
@@ -138471,6 +138489,8 @@ var $Ref = class $Ref {
|
|
|
138471
138489
|
* @type {string}
|
|
138472
138490
|
*/
|
|
138473
138491
|
path;
|
|
138492
|
+
/** The physical document occurrence represented by a canonical resource alias. */
|
|
138493
|
+
sourcePath;
|
|
138474
138494
|
/**
|
|
138475
138495
|
* The resolved value of the JSON reference.
|
|
138476
138496
|
* Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays).
|
|
@@ -138679,11 +138699,11 @@ var $Ref = class $Ref {
|
|
|
138679
138699
|
static dereference($ref, resolvedValue, options) {
|
|
138680
138700
|
if (resolvedValue && typeof resolvedValue === "object" && $Ref.isExtended$Ref($ref)) {
|
|
138681
138701
|
const merged = {};
|
|
138682
|
-
for (const key of Object.keys($ref)) if (key !== "$ref") defineDataProperty(merged, key, $ref[key]);
|
|
138702
|
+
for (const key of Object.keys($ref)) if (key !== "$ref") defineDataProperty$1(merged, key, $ref[key]);
|
|
138683
138703
|
const mergeKeys = options?.dereference?.mergeKeys ?? true;
|
|
138684
138704
|
const resolvedObject = resolvedValue;
|
|
138685
|
-
for (const key of Object.keys(resolvedObject)) if (!Object.hasOwn(merged, key)) defineDataProperty(merged, key, resolvedObject[key]);
|
|
138686
|
-
else if (mergeKeys && typeof merged[key] === "object" && merged[key] !== null && typeof resolvedObject[key] === "object" && resolvedObject[key] !== null) defineDataProperty(merged, key, deepMerge(resolvedObject[key], merged[key]));
|
|
138705
|
+
for (const key of Object.keys(resolvedObject)) if (!Object.hasOwn(merged, key)) defineDataProperty$1(merged, key, resolvedObject[key]);
|
|
138706
|
+
else if (mergeKeys && typeof merged[key] === "object" && merged[key] !== null && typeof resolvedObject[key] === "object" && resolvedObject[key] !== null) defineDataProperty$1(merged, key, deepMerge(resolvedObject[key], merged[key]));
|
|
138687
138707
|
return merged;
|
|
138688
138708
|
} else return resolvedValue;
|
|
138689
138709
|
}
|
|
@@ -138708,7 +138728,7 @@ function deepMerge(target, source) {
|
|
|
138708
138728
|
if (Array.isArray(sourceValue)) mergedValue = cloneEnumerableProperties(sourceValue);
|
|
138709
138729
|
else if (typeof sourceValue === "object" && sourceValue !== null) mergedValue = deepMerge(Object.hasOwn(targetObject, key) ? targetObject[key] : void 0, sourceValue);
|
|
138710
138730
|
else mergedValue = sourceValue;
|
|
138711
|
-
defineDataProperty(output, key, mergedValue);
|
|
138731
|
+
defineDataProperty$1(output, key, mergedValue);
|
|
138712
138732
|
}
|
|
138713
138733
|
return output;
|
|
138714
138734
|
}
|
|
@@ -138720,10 +138740,10 @@ function deepMerge(target, source) {
|
|
|
138720
138740
|
function cloneEnumerableProperties(value) {
|
|
138721
138741
|
const clone = Array.isArray(value) ? new Array(value.length) : {};
|
|
138722
138742
|
const source = value;
|
|
138723
|
-
for (const key of Object.keys(source)) defineDataProperty(clone, key, source[key]);
|
|
138743
|
+
for (const key of Object.keys(source)) defineDataProperty$1(clone, key, source[key]);
|
|
138724
138744
|
return clone;
|
|
138725
138745
|
}
|
|
138726
|
-
function defineDataProperty(target, key, value) {
|
|
138746
|
+
function defineDataProperty$1(target, key, value) {
|
|
138727
138747
|
Object.defineProperty(target, key, {
|
|
138728
138748
|
configurable: true,
|
|
138729
138749
|
enumerable: true,
|
|
@@ -138732,7 +138752,7 @@ function defineDataProperty(target, key, value) {
|
|
|
138732
138752
|
});
|
|
138733
138753
|
}
|
|
138734
138754
|
//#endregion
|
|
138735
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138755
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js
|
|
138736
138756
|
/**
|
|
138737
138757
|
* When you call the resolve method, the value that gets passed to the callback function (or Promise) is a $Refs object. This same object is accessible via the parser.$refs property of $RefParser objects.
|
|
138738
138758
|
*
|
|
@@ -138840,7 +138860,7 @@ var $Refs = class {
|
|
|
138840
138860
|
this._root$Ref = this._root$Ref || $ref;
|
|
138841
138861
|
return $ref;
|
|
138842
138862
|
}
|
|
138843
|
-
_addAlias(path, value, pathType, dynamicIdScope = false, legacyIdScope = false) {
|
|
138863
|
+
_addAlias(path, value, pathType, dynamicIdScope = false, legacyIdScope = false, sourcePath) {
|
|
138844
138864
|
const withoutHash = stripHash(path);
|
|
138845
138865
|
if (!withoutHash || this._$refs[withoutHash] || this._aliases[withoutHash]) return this._$refs[withoutHash] || this._aliases[withoutHash];
|
|
138846
138866
|
const $ref = new $Ref(this);
|
|
@@ -138849,6 +138869,7 @@ var $Refs = class {
|
|
|
138849
138869
|
$ref.value = value;
|
|
138850
138870
|
$ref.dynamicIdScope = dynamicIdScope;
|
|
138851
138871
|
$ref.legacyIdScope = legacyIdScope;
|
|
138872
|
+
$ref.sourcePath = sourcePath;
|
|
138852
138873
|
this._aliases[withoutHash] = $ref;
|
|
138853
138874
|
return $ref;
|
|
138854
138875
|
}
|
|
@@ -138940,7 +138961,7 @@ function getPaths($refs, types) {
|
|
|
138940
138961
|
});
|
|
138941
138962
|
}
|
|
138942
138963
|
//#endregion
|
|
138943
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
138964
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js
|
|
138944
138965
|
/**
|
|
138945
138966
|
* Returns the given plugins as an array, rather than an object map.
|
|
138946
138967
|
* All other methods in this module expect an array of plugins rather than an object map.
|
|
@@ -139049,7 +139070,7 @@ function getResult(obj, prop, file, callback, $refs) {
|
|
|
139049
139070
|
return value;
|
|
139050
139071
|
}
|
|
139051
139072
|
//#endregion
|
|
139052
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
139073
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js
|
|
139053
139074
|
/**
|
|
139054
139075
|
* Reads and parses the specified file path or URL.
|
|
139055
139076
|
*/
|
|
@@ -139154,7 +139175,7 @@ function isEmpty(value) {
|
|
|
139154
139175
|
return value === void 0 || typeof value === "object" && Object.keys(value).length === 0 || typeof value === "string" && value.trim().length === 0 || Buffer.isBuffer(value) && value.length === 0;
|
|
139155
139176
|
}
|
|
139156
139177
|
//#endregion
|
|
139157
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
139178
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js
|
|
139158
139179
|
var json_default = {
|
|
139159
139180
|
/**
|
|
139160
139181
|
* The order that this parser will run, in relation to other parsers.
|
|
@@ -141701,7 +141722,7 @@ CHOMPING_MODE.CLIP;
|
|
|
141701
141722
|
CHOMPING_MODE.STRIP;
|
|
141702
141723
|
CHOMPING_MODE.KEEP;
|
|
141703
141724
|
//#endregion
|
|
141704
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141725
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js
|
|
141705
141726
|
const legacyDefaultSchema = CORE_SCHEMA.withTags(timestampTag, mergeTag, binaryTag, omapTag, pairsTag, setTag);
|
|
141706
141727
|
var yaml_default = {
|
|
141707
141728
|
/**
|
|
@@ -141751,7 +141772,7 @@ var yaml_default = {
|
|
|
141751
141772
|
}
|
|
141752
141773
|
};
|
|
141753
141774
|
//#endregion
|
|
141754
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141775
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js
|
|
141755
141776
|
const TEXT_REGEXP = /\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)(?:[?#].*)?$/i;
|
|
141756
141777
|
var text_default = {
|
|
141757
141778
|
/**
|
|
@@ -141785,7 +141806,7 @@ var text_default = {
|
|
|
141785
141806
|
}
|
|
141786
141807
|
};
|
|
141787
141808
|
//#endregion
|
|
141788
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141809
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js
|
|
141789
141810
|
const BINARY_REGEXP = /\.(jpeg|jpg|gif|png|bmp|ico)(?:[?#].*)?$/i;
|
|
141790
141811
|
var binary_default = {
|
|
141791
141812
|
/**
|
|
@@ -141814,7 +141835,7 @@ var binary_default = {
|
|
|
141814
141835
|
}
|
|
141815
141836
|
};
|
|
141816
141837
|
//#endregion
|
|
141817
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141838
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js
|
|
141818
141839
|
var file_default = {
|
|
141819
141840
|
/**
|
|
141820
141841
|
* The order that this resolver will run, in relation to other resolvers.
|
|
@@ -141852,7 +141873,7 @@ var file_default = {
|
|
|
141852
141873
|
}
|
|
141853
141874
|
};
|
|
141854
141875
|
//#endregion
|
|
141855
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
141876
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js
|
|
141856
141877
|
var http_default = {
|
|
141857
141878
|
/**
|
|
141858
141879
|
* The order that this resolver will run, in relation to other resolvers.
|
|
@@ -142050,7 +142071,7 @@ function withoutSensitiveHeaders(httpOptions) {
|
|
|
142050
142071
|
};
|
|
142051
142072
|
}
|
|
142052
142073
|
//#endregion
|
|
142053
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142074
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js
|
|
142054
142075
|
const getJsonSchemaRefParserDefaultOptions = () => {
|
|
142055
142076
|
return {
|
|
142056
142077
|
/**
|
|
@@ -142167,7 +142188,7 @@ function isMergeable(val) {
|
|
|
142167
142188
|
return val && typeof val === "object" && !Array.isArray(val) && !(val instanceof RegExp) && !(val instanceof Date) && !(typeof Headers !== "undefined" && val instanceof Headers);
|
|
142168
142189
|
}
|
|
142169
142190
|
//#endregion
|
|
142170
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142191
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js
|
|
142171
142192
|
/**
|
|
142172
142193
|
* Normalizes the given arguments, accounting for optional args.
|
|
142173
142194
|
*/
|
|
@@ -142206,7 +142227,417 @@ function normalizeArgs(_args) {
|
|
|
142206
142227
|
};
|
|
142207
142228
|
}
|
|
142208
142229
|
//#endregion
|
|
142209
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142230
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external/with-matcher.js
|
|
142231
|
+
async function resolveExternalWithMatcher(parser, options, excludedPathMatcher) {
|
|
142232
|
+
const rootPath = parser.$refs._root$Ref.path;
|
|
142233
|
+
const rootScopeBase = parser.$refs._root$Ref.dynamicIdScope ? getSchemaBasePath(rootPath, parser.schema, parser.$refs._root$Ref.legacyIdScope) : rootPath;
|
|
142234
|
+
const context = {
|
|
142235
|
+
$refs: parser.$refs,
|
|
142236
|
+
options,
|
|
142237
|
+
excludedPathMatcher,
|
|
142238
|
+
documentLoads: /* @__PURE__ */ new Map(),
|
|
142239
|
+
externalDocuments: /* @__PURE__ */ new Set(),
|
|
142240
|
+
excludedPaths: /* @__PURE__ */ new Set(),
|
|
142241
|
+
excludedAncestorPaths: /* @__PURE__ */ new Set()
|
|
142242
|
+
};
|
|
142243
|
+
await crawlOccurrence({
|
|
142244
|
+
value: parser.schema,
|
|
142245
|
+
path: rootPath + "#",
|
|
142246
|
+
originPaths: [rootPath + "#"],
|
|
142247
|
+
scopeBase: rootScopeBase,
|
|
142248
|
+
dynamicIdScope: parser.$refs._root$Ref.dynamicIdScope,
|
|
142249
|
+
legacyIdScope: parser.$refs._root$Ref.legacyIdScope
|
|
142250
|
+
}, "#", void 0, void 0, context);
|
|
142251
|
+
await completeExternalDocumentInventory(context);
|
|
142252
|
+
}
|
|
142253
|
+
/** Crawls one logical occurrence, keeping its URI provenance separate from its root-relative path. */
|
|
142254
|
+
async function crawlOccurrence(occurrence, pathFromRoot, activeObjects, activeReferences, context, matcherAlreadyChecked = false) {
|
|
142255
|
+
if (!matcherAlreadyChecked && context.excludedPathMatcher(pathFromRoot, occurrence.value)) {
|
|
142256
|
+
markExcludedOrigins(occurrence, context);
|
|
142257
|
+
return;
|
|
142258
|
+
}
|
|
142259
|
+
const value = occurrence.value;
|
|
142260
|
+
if (!value || typeof value !== "object" || ArrayBuffer.isView(value) || hasObject(activeObjects, value)) return;
|
|
142261
|
+
ensureLocationMetadata(occurrence);
|
|
142262
|
+
const nextActiveObjects = {
|
|
142263
|
+
value,
|
|
142264
|
+
...activeObjects ? { parent: activeObjects } : {}
|
|
142265
|
+
};
|
|
142266
|
+
if ($Ref.is$Ref(value) && $Ref.isAllowed$Ref(value, context.options)) {
|
|
142267
|
+
if (!await crawlReferenceOccurrence(occurrence, pathFromRoot, activeReferences, context) && $Ref.isExtended$Ref(value)) await crawlChildren(occurrence, pathFromRoot, nextActiveObjects, activeReferences, context);
|
|
142268
|
+
return;
|
|
142269
|
+
}
|
|
142270
|
+
await crawlChildren(occurrence, pathFromRoot, nextActiveObjects, activeReferences, context);
|
|
142271
|
+
}
|
|
142272
|
+
async function crawlChildren(occurrence, pathFromRoot, activeObjects, activeReferences, context) {
|
|
142273
|
+
const value = occurrence.value;
|
|
142274
|
+
await Promise.all(Object.keys(value).filter((key) => key !== "$ref").map(async (key) => {
|
|
142275
|
+
const childPathFromRoot = Pointer.join(pathFromRoot, key);
|
|
142276
|
+
if (occurrence.children) {
|
|
142277
|
+
if (requiresChildPrecheck(occurrence, key) && context.excludedPathMatcher(childPathFromRoot, void 0)) {
|
|
142278
|
+
markExcludedChildOrigins(occurrence, key, context);
|
|
142279
|
+
return;
|
|
142280
|
+
}
|
|
142281
|
+
} else {
|
|
142282
|
+
if (Object.getOwnPropertyDescriptor(value, key)?.get && context.excludedPathMatcher(childPathFromRoot, void 0)) {
|
|
142283
|
+
markExcludedChildOrigins(occurrence, key, context);
|
|
142284
|
+
return;
|
|
142285
|
+
}
|
|
142286
|
+
const childValue = value[key];
|
|
142287
|
+
const child = locateChildValue(occurrence, key, childValue);
|
|
142288
|
+
if (context.excludedPathMatcher(childPathFromRoot, childValue)) {
|
|
142289
|
+
markExcludedChildOrigins(occurrence, key, context);
|
|
142290
|
+
return;
|
|
142291
|
+
}
|
|
142292
|
+
await crawlOccurrence(child, childPathFromRoot, activeObjects, activeReferences, context, true);
|
|
142293
|
+
return;
|
|
142294
|
+
}
|
|
142295
|
+
const child = locateChild(occurrence, key);
|
|
142296
|
+
if (!child) return;
|
|
142297
|
+
if (context.excludedPathMatcher(childPathFromRoot, child.value)) {
|
|
142298
|
+
markExcludedChildOrigins(occurrence, key, context);
|
|
142299
|
+
return;
|
|
142300
|
+
}
|
|
142301
|
+
await crawlOccurrence(child, childPathFromRoot, activeObjects, activeReferences, context, true);
|
|
142302
|
+
}));
|
|
142303
|
+
}
|
|
142304
|
+
/** Resolves one reference and crawls its effective, origin-aware value at the same logical path. */
|
|
142305
|
+
async function crawlReferenceOccurrence(source, pathFromRoot, activeReferences, context) {
|
|
142306
|
+
const reference = source.value;
|
|
142307
|
+
const referenceLocation = source.referenceLocation || source;
|
|
142308
|
+
ensureLocationMetadata(referenceLocation);
|
|
142309
|
+
const external = $Ref.isExternal$Ref(reference);
|
|
142310
|
+
const resolutionBase = external && context.options.dereference?.externalReferenceResolution === "root" ? cwd() : referenceLocation.dynamicIdScope ? referenceLocation.scopeBase : referenceLocation.path;
|
|
142311
|
+
const resolvedPath = resolve$1(resolutionBase, reference.$ref);
|
|
142312
|
+
if (hasReference(activeReferences, resolvedPath)) return false;
|
|
142313
|
+
assertReferenceDepth(activeReferences, referenceLocation.path, context.options);
|
|
142314
|
+
if (external && !await loadExternalDocument(reference, resolvedPath, resolutionBase, referenceLocation.path, context)) return false;
|
|
142315
|
+
const nextActiveReferences = {
|
|
142316
|
+
path: resolvedPath,
|
|
142317
|
+
depth: (activeReferences?.depth ?? 0) + 1,
|
|
142318
|
+
...activeReferences ? { parent: activeReferences } : {}
|
|
142319
|
+
};
|
|
142320
|
+
const target = await selectTarget(resolvedPath, pathFromRoot, context, nextActiveReferences);
|
|
142321
|
+
if (!target) return false;
|
|
142322
|
+
await crawlOccurrence(mergeReferenceOccurrence(source, target, context.options.dereference?.mergeKeys ?? true), pathFromRoot, void 0, nextActiveReferences, context);
|
|
142323
|
+
return true;
|
|
142324
|
+
}
|
|
142325
|
+
/** Reads and parses an external document once, even when multiple occurrences race to use it. */
|
|
142326
|
+
async function loadExternalDocument(reference, resolvedPath, resolutionBase, path, context) {
|
|
142327
|
+
const withoutHash = stripHash(resolvedPath);
|
|
142328
|
+
const inFlight = context.documentLoads.get(withoutHash);
|
|
142329
|
+
if (inFlight) return inFlight;
|
|
142330
|
+
const existing = context.$refs._get$Ref(withoutHash);
|
|
142331
|
+
if (existing) {
|
|
142332
|
+
markPhysicalExternalDocument(withoutHash, context);
|
|
142333
|
+
return !isHandledError(existing.value);
|
|
142334
|
+
}
|
|
142335
|
+
const load = parse$1({
|
|
142336
|
+
url: resolvedPath,
|
|
142337
|
+
baseUrl: resolutionBase,
|
|
142338
|
+
reference: reference.$ref
|
|
142339
|
+
}, context.$refs, context.options).then(() => {
|
|
142340
|
+
markPhysicalExternalDocument(withoutHash, context);
|
|
142341
|
+
return true;
|
|
142342
|
+
}).catch((error) => {
|
|
142343
|
+
if (!context.options.continueOnError || !isHandledError(error)) throw error;
|
|
142344
|
+
if (context.$refs._$refs[withoutHash]) {
|
|
142345
|
+
markPhysicalExternalDocument(withoutHash, context);
|
|
142346
|
+
error.source = decodeURI(stripHash(path));
|
|
142347
|
+
error.path = safePointerToPath(getHash(path));
|
|
142348
|
+
}
|
|
142349
|
+
return false;
|
|
142350
|
+
});
|
|
142351
|
+
context.documentLoads.set(withoutHash, load);
|
|
142352
|
+
return load;
|
|
142353
|
+
}
|
|
142354
|
+
/** Records only documents that were physically parsed, never canonical `$id` aliases. */
|
|
142355
|
+
function markPhysicalExternalDocument(documentPath, context) {
|
|
142356
|
+
if (context.$refs._$refs[documentPath]) context.externalDocuments.add(documentPath);
|
|
142357
|
+
}
|
|
142358
|
+
/**
|
|
142359
|
+
* Preserve resolve()'s historical full-document inventory. Physical occurrences excluded by the
|
|
142360
|
+
* matcher-aware crawl remain literal, while every other branch is inventoried as before.
|
|
142361
|
+
*/
|
|
142362
|
+
async function completeExternalDocumentInventory(context) {
|
|
142363
|
+
const rootPath = stripHash(context.$refs._root$Ref.path);
|
|
142364
|
+
for (const documentPath of context.externalDocuments) {
|
|
142365
|
+
if (documentPath === rootPath) continue;
|
|
142366
|
+
const ref = context.$refs._get$Ref(documentPath);
|
|
142367
|
+
if (!ref || isHandledError(ref.value)) continue;
|
|
142368
|
+
const scopeBase = ref.dynamicIdScope ? getSchemaBasePath(ref.path, ref.value, ref.legacyIdScope) : ref.path;
|
|
142369
|
+
await crawlPhysicalOccurrence(ref.value, ref.path + "#", scopeBase, ref.dynamicIdScope, ref.legacyIdScope, void 0, /* @__PURE__ */ new WeakSet(), context);
|
|
142370
|
+
}
|
|
142371
|
+
}
|
|
142372
|
+
/**
|
|
142373
|
+
* Crawls physical document occurrences. An active ancestry chain protects incomplete subtrees
|
|
142374
|
+
* containing exclusions; complete subtrees retain the legacy one-visit identity optimization.
|
|
142375
|
+
*/
|
|
142376
|
+
async function crawlPhysicalOccurrence(value, path, scopeBase, dynamicIdScope, legacyIdScope, activeObjects, seen, context) {
|
|
142377
|
+
if (context.excludedPaths.has(path) || !value || typeof value !== "object" || ArrayBuffer.isView(value) || hasObject(activeObjects, value)) return;
|
|
142378
|
+
const hasExcludedDescendant = context.excludedAncestorPaths.has(path);
|
|
142379
|
+
if (!hasExcludedDescendant && seen.has(value)) return;
|
|
142380
|
+
if (!hasExcludedDescendant) seen.add(value);
|
|
142381
|
+
const nextActiveObjects = {
|
|
142382
|
+
value,
|
|
142383
|
+
...activeObjects ? { parent: activeObjects } : {}
|
|
142384
|
+
};
|
|
142385
|
+
const tasks = [];
|
|
142386
|
+
if ($Ref.isExternal$Ref(value)) {
|
|
142387
|
+
const reference = value;
|
|
142388
|
+
const resolutionBase = context.options.dereference?.externalReferenceResolution === "root" ? cwd() : dynamicIdScope ? scopeBase : path;
|
|
142389
|
+
const resolvedPath = resolve$1(resolutionBase, reference.$ref);
|
|
142390
|
+
tasks.push(loadExternalDocument(reference, resolvedPath, resolutionBase, path, context));
|
|
142391
|
+
}
|
|
142392
|
+
tasks.push(...Object.keys(value).map(async (key) => {
|
|
142393
|
+
const childPath = Pointer.join(path, key);
|
|
142394
|
+
if (context.excludedPaths.has(childPath)) return;
|
|
142395
|
+
const child = value[key];
|
|
142396
|
+
const childLegacyIdScope = getSchemaIdMode(child, legacyIdScope);
|
|
142397
|
+
await crawlPhysicalOccurrence(child, childPath, dynamicIdScope && child && typeof child === "object" && !ArrayBuffer.isView(child) ? getSchemaBasePath(scopeBase, child, childLegacyIdScope) : scopeBase, dynamicIdScope, childLegacyIdScope, nextActiveObjects, seen, context);
|
|
142398
|
+
}));
|
|
142399
|
+
await Promise.all(tasks);
|
|
142400
|
+
}
|
|
142401
|
+
function markExcludedOrigins(target, context) {
|
|
142402
|
+
for (const path of target.originPaths || [target.path]) {
|
|
142403
|
+
const normalizedPath = normalizePhysicalPath(path);
|
|
142404
|
+
if (context.excludedPaths.has(normalizedPath)) continue;
|
|
142405
|
+
context.excludedPaths.add(normalizedPath);
|
|
142406
|
+
let ancestor = stripHash(normalizedPath) + "#";
|
|
142407
|
+
for (const token of Pointer.parse(normalizedPath)) {
|
|
142408
|
+
context.excludedAncestorPaths.add(ancestor);
|
|
142409
|
+
ancestor = Pointer.join(ancestor, token);
|
|
142410
|
+
}
|
|
142411
|
+
}
|
|
142412
|
+
}
|
|
142413
|
+
function markExcludedChildOrigins(parent, key, context) {
|
|
142414
|
+
markExcludedOrigins({
|
|
142415
|
+
...parent,
|
|
142416
|
+
path: Pointer.join(parent.path, key),
|
|
142417
|
+
originPaths: (parent.originPaths || [parent.path]).map((path) => Pointer.join(path, key))
|
|
142418
|
+
}, context);
|
|
142419
|
+
}
|
|
142420
|
+
function normalizePhysicalPath(path) {
|
|
142421
|
+
return stripHash(path) + (getHash(path) || "#");
|
|
142422
|
+
}
|
|
142423
|
+
/** Selects a fragment without following its final reference. */
|
|
142424
|
+
async function selectTarget(resolvedPath, pathFromRoot, context, activeReferences) {
|
|
142425
|
+
const documentPath = stripHash(resolvedPath);
|
|
142426
|
+
const ref = context.$refs._get$Ref(documentPath);
|
|
142427
|
+
if (!ref || isHandledError(ref.value)) return;
|
|
142428
|
+
let current = {
|
|
142429
|
+
value: ref.value,
|
|
142430
|
+
path: ref.path + "#",
|
|
142431
|
+
originPaths: [ref.sourcePath || ref.path + "#"],
|
|
142432
|
+
scopeBase: ref.path,
|
|
142433
|
+
dynamicIdScope: ref.dynamicIdScope,
|
|
142434
|
+
legacyIdScope: ref.legacyIdScope
|
|
142435
|
+
};
|
|
142436
|
+
const isAlias = context.$refs._aliases[documentPath] === ref;
|
|
142437
|
+
if (current.dynamicIdScope && !isAlias) {
|
|
142438
|
+
current.legacyIdScope = getSchemaIdMode(current.value, current.legacyIdScope);
|
|
142439
|
+
current.scopeBase = getSchemaBasePath(current.scopeBase, current.value, current.legacyIdScope);
|
|
142440
|
+
}
|
|
142441
|
+
let tokens;
|
|
142442
|
+
try {
|
|
142443
|
+
tokens = Pointer.parse(resolvedPath);
|
|
142444
|
+
} catch {
|
|
142445
|
+
return;
|
|
142446
|
+
}
|
|
142447
|
+
for (let index = 0; index < tokens.length; index++) {
|
|
142448
|
+
const followed = await followIntermediateReferences(current, pathFromRoot, context, activeReferences);
|
|
142449
|
+
if (!followed) return;
|
|
142450
|
+
current = followed;
|
|
142451
|
+
const token = tokens[index];
|
|
142452
|
+
let child = locateChild(current, token);
|
|
142453
|
+
if (!child || child.value === void 0 || child.value === null && index === tokens.length - 1) {
|
|
142454
|
+
child = void 0;
|
|
142455
|
+
for (let end = tokens.length - 1; end > index; end--) {
|
|
142456
|
+
const joinedToken = tokens.slice(index, end + 1).join("/");
|
|
142457
|
+
const joinedChild = locateChild(current, joinedToken);
|
|
142458
|
+
if (joinedChild?.value !== void 0) {
|
|
142459
|
+
child = joinedChild;
|
|
142460
|
+
index = end;
|
|
142461
|
+
break;
|
|
142462
|
+
}
|
|
142463
|
+
}
|
|
142464
|
+
if (!child) {
|
|
142465
|
+
const nullChild = locateChild(current, token);
|
|
142466
|
+
if (!nullChild || nullChild.value !== null) return;
|
|
142467
|
+
child = nullChild;
|
|
142468
|
+
}
|
|
142469
|
+
}
|
|
142470
|
+
current = child;
|
|
142471
|
+
ensureLocationMetadata(current);
|
|
142472
|
+
}
|
|
142473
|
+
return current;
|
|
142474
|
+
}
|
|
142475
|
+
async function followIntermediateReferences(initial, pathFromRoot, context, activeReferences) {
|
|
142476
|
+
let current = initial;
|
|
142477
|
+
let referenceChain = activeReferences;
|
|
142478
|
+
while ($Ref.is$Ref(current.value) && $Ref.isAllowed$Ref(current.value, context.options)) {
|
|
142479
|
+
const reference = current.value;
|
|
142480
|
+
const referenceLocation = current.referenceLocation || current;
|
|
142481
|
+
ensureLocationMetadata(referenceLocation);
|
|
142482
|
+
const external = $Ref.isExternal$Ref(reference);
|
|
142483
|
+
const resolutionBase = external && context.options.dereference?.externalReferenceResolution === "root" ? cwd() : referenceLocation.dynamicIdScope ? referenceLocation.scopeBase : referenceLocation.path;
|
|
142484
|
+
const resolvedPath = resolve$1(resolutionBase, reference.$ref);
|
|
142485
|
+
if (hasReference(referenceChain, resolvedPath)) return $Ref.isExtended$Ref(reference) ? current : void 0;
|
|
142486
|
+
assertReferenceDepth(referenceChain, referenceLocation.path, context.options);
|
|
142487
|
+
if (external && !await loadExternalDocument(reference, resolvedPath, resolutionBase, referenceLocation.path, context)) return;
|
|
142488
|
+
const nextReferenceChain = {
|
|
142489
|
+
path: resolvedPath,
|
|
142490
|
+
depth: (referenceChain?.depth ?? 0) + 1,
|
|
142491
|
+
...referenceChain ? { parent: referenceChain } : {}
|
|
142492
|
+
};
|
|
142493
|
+
const target = await selectTarget(resolvedPath, pathFromRoot, context, nextReferenceChain);
|
|
142494
|
+
if (!target) return;
|
|
142495
|
+
current = mergeReferenceOccurrence(current, target, context.options.dereference?.mergeKeys ?? true);
|
|
142496
|
+
referenceChain = nextReferenceChain;
|
|
142497
|
+
}
|
|
142498
|
+
return current;
|
|
142499
|
+
}
|
|
142500
|
+
/** Builds the same effective value as dereference, retaining a URI origin for every child. */
|
|
142501
|
+
function mergeReferenceOccurrence(source, target, mergeKeys) {
|
|
142502
|
+
if (!$Ref.isExtended$Ref(source.value) || target.value === null || typeof target.value !== "object") return target;
|
|
142503
|
+
return mergeLocatedObjects(target, source, mergeKeys, true, void 0);
|
|
142504
|
+
}
|
|
142505
|
+
function mergeLocatedObjects(target, source, mergeKeys, ignoreSourceRef, activeMerges) {
|
|
142506
|
+
const targetObject = target.value;
|
|
142507
|
+
const sourceObject = source.value;
|
|
142508
|
+
const existing = findActiveMerge(activeMerges, targetObject, sourceObject);
|
|
142509
|
+
if (existing) return existing;
|
|
142510
|
+
const output = !ignoreSourceRef && Array.isArray(target.value) ? new Array(target.value.length) : {};
|
|
142511
|
+
const children = /* @__PURE__ */ new Map();
|
|
142512
|
+
const merged = {
|
|
142513
|
+
value: output,
|
|
142514
|
+
path: target.path,
|
|
142515
|
+
originPaths: mergeOriginPaths(target, source),
|
|
142516
|
+
scopeBase: target.scopeBase,
|
|
142517
|
+
dynamicIdScope: target.dynamicIdScope,
|
|
142518
|
+
legacyIdScope: target.legacyIdScope,
|
|
142519
|
+
children,
|
|
142520
|
+
resolveMetadata() {
|
|
142521
|
+
ensureLocationMetadata(target);
|
|
142522
|
+
merged.scopeBase = target.scopeBase;
|
|
142523
|
+
merged.dynamicIdScope = target.dynamicIdScope;
|
|
142524
|
+
merged.legacyIdScope = target.legacyIdScope;
|
|
142525
|
+
}
|
|
142526
|
+
};
|
|
142527
|
+
const nextActiveMerges = {
|
|
142528
|
+
target: targetObject,
|
|
142529
|
+
source: sourceObject,
|
|
142530
|
+
value: merged,
|
|
142531
|
+
...activeMerges ? { parent: activeMerges } : {}
|
|
142532
|
+
};
|
|
142533
|
+
const sourceKeys = new Set(Object.keys(sourceObject).filter((key) => !(ignoreSourceRef && key === "$ref")));
|
|
142534
|
+
const targetKeys = new Set(Object.keys(targetObject));
|
|
142535
|
+
const keys = /* @__PURE__ */ new Set([...sourceKeys, ...targetKeys]);
|
|
142536
|
+
for (const key of keys) {
|
|
142537
|
+
const resolveChild = () => {
|
|
142538
|
+
const sourceChild = sourceKeys.has(key) ? locateChild(source, key) : void 0;
|
|
142539
|
+
let child;
|
|
142540
|
+
if (sourceChild && (!targetKeys.has(key) || !mergeKeys || sourceChild.value === null || typeof sourceChild.value !== "object" || Array.isArray(sourceChild.value))) child = sourceChild;
|
|
142541
|
+
else {
|
|
142542
|
+
const targetChild = locateChild(target, key);
|
|
142543
|
+
child = sourceChild && targetChild.value !== null && typeof targetChild.value === "object" ? mergeLocatedObjects(targetChild, sourceChild, true, false, nextActiveMerges) : sourceChild || targetChild;
|
|
142544
|
+
}
|
|
142545
|
+
children.set(key, child);
|
|
142546
|
+
defineDataProperty(output, key, child.value);
|
|
142547
|
+
if (key === "$ref" && typeof child.value === "string") merged.referenceLocation = child.owner || target;
|
|
142548
|
+
return child;
|
|
142549
|
+
};
|
|
142550
|
+
children.set(key, {
|
|
142551
|
+
resolve: resolveChild,
|
|
142552
|
+
requiresPrecheck: childResolutionMayInvokeAccessor(sourceObject, targetObject, key, sourceKeys.has(key), targetKeys.has(key), mergeKeys)
|
|
142553
|
+
});
|
|
142554
|
+
defineLazyProperty(output, key, () => locateChild(merged, key).value);
|
|
142555
|
+
}
|
|
142556
|
+
return merged;
|
|
142557
|
+
}
|
|
142558
|
+
function findActiveMerge(chain, target, source) {
|
|
142559
|
+
for (let current = chain; current; current = current.parent) if (current.target === target && current.source === source) return current.value;
|
|
142560
|
+
}
|
|
142561
|
+
function locateChild(parent, key) {
|
|
142562
|
+
if (parent.children) {
|
|
142563
|
+
const child = parent.children.get(key);
|
|
142564
|
+
if (!child || !("resolve" in child)) return child;
|
|
142565
|
+
const resolved = child.resolve();
|
|
142566
|
+
parent.children.set(key, resolved);
|
|
142567
|
+
return resolved;
|
|
142568
|
+
}
|
|
142569
|
+
const value = parent.value;
|
|
142570
|
+
if (value === null || typeof value !== "object" && typeof value !== "function" || !(key in value)) return;
|
|
142571
|
+
return locateChildValue(parent, key, value[key]);
|
|
142572
|
+
}
|
|
142573
|
+
function locateChildValue(parent, key, childValue) {
|
|
142574
|
+
const child = {
|
|
142575
|
+
value: childValue,
|
|
142576
|
+
path: Pointer.join(parent.path, key),
|
|
142577
|
+
originPaths: (parent.originPaths || [parent.path]).map((path) => Pointer.join(path, key)),
|
|
142578
|
+
scopeBase: parent.scopeBase,
|
|
142579
|
+
dynamicIdScope: parent.dynamicIdScope,
|
|
142580
|
+
legacyIdScope: parent.legacyIdScope,
|
|
142581
|
+
owner: parent,
|
|
142582
|
+
resolveMetadata() {
|
|
142583
|
+
ensureLocationMetadata(parent);
|
|
142584
|
+
const childLegacyIdScope = getSchemaIdMode(childValue, parent.legacyIdScope);
|
|
142585
|
+
child.legacyIdScope = childLegacyIdScope;
|
|
142586
|
+
child.scopeBase = parent.dynamicIdScope && childValue && typeof childValue === "object" && !ArrayBuffer.isView(childValue) ? getSchemaBasePath(parent.scopeBase, childValue, childLegacyIdScope) : parent.scopeBase;
|
|
142587
|
+
}
|
|
142588
|
+
};
|
|
142589
|
+
return child;
|
|
142590
|
+
}
|
|
142591
|
+
function mergeOriginPaths(target, source) {
|
|
142592
|
+
return [.../* @__PURE__ */ new Set([...target.originPaths || [target.path], ...source.originPaths || [source.path]])];
|
|
142593
|
+
}
|
|
142594
|
+
function ensureLocationMetadata(value) {
|
|
142595
|
+
const resolveMetadata = value.resolveMetadata;
|
|
142596
|
+
if (resolveMetadata) {
|
|
142597
|
+
delete value.resolveMetadata;
|
|
142598
|
+
resolveMetadata();
|
|
142599
|
+
}
|
|
142600
|
+
}
|
|
142601
|
+
function requiresChildPrecheck(parent, key) {
|
|
142602
|
+
const child = parent.children?.get(key);
|
|
142603
|
+
return Boolean(child && "resolve" in child && child.requiresPrecheck);
|
|
142604
|
+
}
|
|
142605
|
+
function childResolutionMayInvokeAccessor(source, target, key, sourceHasKey, targetHasKey, mergeKeys) {
|
|
142606
|
+
const sourceDescriptor = sourceHasKey ? Object.getOwnPropertyDescriptor(source, key) : void 0;
|
|
142607
|
+
if (sourceDescriptor?.get) return true;
|
|
142608
|
+
if (!sourceHasKey) return Boolean(targetHasKey && Object.getOwnPropertyDescriptor(target, key)?.get);
|
|
142609
|
+
const sourceValue = sourceDescriptor?.value;
|
|
142610
|
+
return !(!targetHasKey || !mergeKeys || sourceValue === null || typeof sourceValue !== "object" || Array.isArray(sourceValue)) && Boolean(Object.getOwnPropertyDescriptor(target, key)?.get);
|
|
142611
|
+
}
|
|
142612
|
+
function hasObject(chain, value) {
|
|
142613
|
+
for (let current = chain; current; current = current.parent) if (current.value === value) return true;
|
|
142614
|
+
return false;
|
|
142615
|
+
}
|
|
142616
|
+
function hasReference(chain, path) {
|
|
142617
|
+
for (let current = chain; current; current = current.parent) if (current.path === path) return true;
|
|
142618
|
+
return false;
|
|
142619
|
+
}
|
|
142620
|
+
function assertReferenceDepth(chain, path, options) {
|
|
142621
|
+
const maxDepth = options.dereference?.maxDepth ?? 500;
|
|
142622
|
+
if ((chain?.depth ?? 0) >= maxDepth) throw new RangeError(`Maximum dereference depth (${maxDepth}) exceeded at ${path}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);
|
|
142623
|
+
}
|
|
142624
|
+
function defineDataProperty(object, key, value) {
|
|
142625
|
+
Object.defineProperty(object, key, {
|
|
142626
|
+
value,
|
|
142627
|
+
enumerable: true,
|
|
142628
|
+
configurable: true,
|
|
142629
|
+
writable: true
|
|
142630
|
+
});
|
|
142631
|
+
}
|
|
142632
|
+
function defineLazyProperty(object, key, get) {
|
|
142633
|
+
Object.defineProperty(object, key, {
|
|
142634
|
+
get,
|
|
142635
|
+
enumerable: true,
|
|
142636
|
+
configurable: true
|
|
142637
|
+
});
|
|
142638
|
+
}
|
|
142639
|
+
//#endregion
|
|
142640
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js
|
|
142210
142641
|
/**
|
|
142211
142642
|
* Crawls the JSON schema, finds all external JSON references, and resolves their values.
|
|
142212
142643
|
* This method does not mutate the JSON schema. The resolved values are added to {@link $RefParser#$refs}.
|
|
@@ -142218,7 +142649,9 @@ function normalizeArgs(_args) {
|
|
|
142218
142649
|
* including nested references that are contained in externally-referenced files.
|
|
142219
142650
|
*/
|
|
142220
142651
|
function resolveExternal(parser, options) {
|
|
142652
|
+
if (typeof options.resolve?.excludedPathMatcher === "function") return Promise.reject(/* @__PURE__ */ new TypeError("Use the top-level resolveExcludedPathMatcher option; resolve keys are resolver plugins."));
|
|
142221
142653
|
if (!options.resolve?.external) return Promise.resolve();
|
|
142654
|
+
if (options.resolveExcludedPathMatcher) return resolveExternalWithMatcher(parser, options, options.resolveExcludedPathMatcher);
|
|
142222
142655
|
try {
|
|
142223
142656
|
const rootScopeBase = parser.$refs._root$Ref.dynamicIdScope ? getSchemaBasePath(parser.$refs._root$Ref.path, parser.schema, parser.$refs._root$Ref.legacyIdScope) : parser.$refs._root$Ref.path;
|
|
142224
142657
|
const promises = crawl$2(parser.schema, parser.$refs._root$Ref.path + "#", rootScopeBase, parser.$refs._root$Ref.dynamicIdScope, parser.$refs._root$Ref.legacyIdScope, parser.$refs, options);
|
|
@@ -142303,7 +142736,7 @@ async function resolve$Ref($ref, path, scopeBase, dynamicIdScope, $refs, options
|
|
|
142303
142736
|
}
|
|
142304
142737
|
}
|
|
142305
142738
|
//#endregion
|
|
142306
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
142739
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js
|
|
142307
142740
|
/**
|
|
142308
142741
|
* Bundles all external JSON references into the main JSON schema, thus resulting in a schema that
|
|
142309
142742
|
* only has *internal* references, not any *external* references.
|
|
@@ -142332,11 +142765,11 @@ function bundle$1(parser, options) {
|
|
|
142332
142765
|
* @param $refs
|
|
142333
142766
|
* @param options
|
|
142334
142767
|
*/
|
|
142335
|
-
function crawl$1(parent, key, path, scopeBase, dynamicIdScope, legacyIdScope, nestedIdScope, pathFromRoot, indirections, inventory, $refs, options, embeddedResourcePaths, seen) {
|
|
142768
|
+
function crawl$1(parent, key, path, scopeBase, dynamicIdScope, legacyIdScope, nestedIdScope, pathFromRoot, indirections, inventory, $refs, options, embeddedResourcePaths, seen, matcherAlreadyChecked = false) {
|
|
142336
142769
|
const obj = key === null ? parent : parent[key];
|
|
142337
142770
|
const bundleOptions = options.bundle || {};
|
|
142338
142771
|
const isExcludedPath = bundleOptions.excludedPathMatcher || (() => false);
|
|
142339
|
-
if (obj && typeof obj === "object" && !ArrayBuffer.isView(obj) && !isExcludedPath(pathFromRoot) && !seen.has(obj)) {
|
|
142772
|
+
if (obj && typeof obj === "object" && !ArrayBuffer.isView(obj) && (matcherAlreadyChecked || !isExcludedPath(pathFromRoot, obj)) && !seen.has(obj)) {
|
|
142340
142773
|
seen.add(obj);
|
|
142341
142774
|
const currentScopeBase = scopeBase;
|
|
142342
142775
|
if ($Ref.isAllowed$Ref(obj, options)) inventory$Ref(parent, key, path, currentScopeBase, dynamicIdScope, nestedIdScope, pathFromRoot, indirections, inventory, $refs, options, embeddedResourcePaths, seen);
|
|
@@ -142349,7 +142782,9 @@ function crawl$1(parent, key, path, scopeBase, dynamicIdScope, legacyIdScope, ne
|
|
|
142349
142782
|
for (const key of keys) {
|
|
142350
142783
|
const keyPath = Pointer.join(path, key);
|
|
142351
142784
|
const keyPathFromRoot = Pointer.join(pathFromRoot, key);
|
|
142785
|
+
if (Object.getOwnPropertyDescriptor(obj, key)?.get && isExcludedPath(keyPathFromRoot, void 0)) continue;
|
|
142352
142786
|
const value = obj[key];
|
|
142787
|
+
if (isExcludedPath(keyPathFromRoot, value)) continue;
|
|
142353
142788
|
const childLegacyIdScope = getSchemaIdMode(value, legacyIdScope);
|
|
142354
142789
|
const childScopeBase = dynamicIdScope && value && typeof value === "object" && !ArrayBuffer.isView(value) ? getSchemaBasePath(currentScopeBase, value, childLegacyIdScope) : currentScopeBase;
|
|
142355
142790
|
const childHasSchemaIdentifier = dynamicIdScope && hasSchemaIdentifier(value, childLegacyIdScope);
|
|
@@ -142360,7 +142795,7 @@ function crawl$1(parent, key, path, scopeBase, dynamicIdScope, legacyIdScope, ne
|
|
|
142360
142795
|
childEmbeddedResourcePaths.add(stripHash(childScopeBase));
|
|
142361
142796
|
}
|
|
142362
142797
|
if ($Ref.isAllowed$Ref(value, options)) inventory$Ref(obj, key, keyPath, childScopeBase, dynamicIdScope, childNestedIdScope, keyPathFromRoot, indirections, inventory, $refs, options, childEmbeddedResourcePaths, seen);
|
|
142363
|
-
else crawl$1(obj, key, keyPath, childScopeBase, dynamicIdScope, childLegacyIdScope, childNestedIdScope, keyPathFromRoot, indirections, inventory, $refs, options, childEmbeddedResourcePaths, seen);
|
|
142798
|
+
else crawl$1(obj, key, keyPath, childScopeBase, dynamicIdScope, childLegacyIdScope, childNestedIdScope, keyPathFromRoot, indirections, inventory, $refs, options, childEmbeddedResourcePaths, seen, true);
|
|
142364
142799
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
142365
142800
|
if ("$ref" in value) bundleOptions?.onBundle?.(value["$ref"], obj[key], obj, key);
|
|
142366
142801
|
}
|
|
@@ -142587,7 +143022,7 @@ function containsObject(root, target) {
|
|
|
142587
143022
|
return visit(root);
|
|
142588
143023
|
}
|
|
142589
143024
|
//#endregion
|
|
142590
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
143025
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js
|
|
142591
143026
|
var dereference_default = dereference$1;
|
|
142592
143027
|
/**
|
|
142593
143028
|
* Crawls the JSON schema, finds all JSON references, and dereferences them.
|
|
@@ -142630,7 +143065,7 @@ function crawl(obj, path, scopeBase, dynamicIdScope, legacyIdScope, pathFromRoot
|
|
|
142630
143065
|
if (depth > maxDepth) throw new RangeError(`Maximum dereference depth (${maxDepth}) exceeded at ${pathFromRoot}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);
|
|
142631
143066
|
const isExcludedPath = derefOptions.excludedPathMatcher || (() => false);
|
|
142632
143067
|
if (derefOptions?.circular === "ignore" || !processedObjects.has(obj)) {
|
|
142633
|
-
if (obj && typeof obj === "object" && !ArrayBuffer.isView(obj) && !isExcludedPath(pathFromRoot)) {
|
|
143068
|
+
if (obj && typeof obj === "object" && !ArrayBuffer.isView(obj) && !isExcludedPath(pathFromRoot, obj)) {
|
|
142634
143069
|
parents.add(obj);
|
|
142635
143070
|
processedObjects.add(obj);
|
|
142636
143071
|
const currentScopeBase = scopeBase;
|
|
@@ -142642,8 +143077,9 @@ function crawl(obj, path, scopeBase, dynamicIdScope, legacyIdScope, pathFromRoot
|
|
|
142642
143077
|
checkDereferenceTimeout(startTime, options);
|
|
142643
143078
|
const keyPath = Pointer.join(path, key);
|
|
142644
143079
|
const keyPathFromRoot = Pointer.join(pathFromRoot, key);
|
|
142645
|
-
if (isExcludedPath(keyPathFromRoot)) continue;
|
|
143080
|
+
if (Object.getOwnPropertyDescriptor(obj, key)?.get && isExcludedPath(keyPathFromRoot, void 0)) continue;
|
|
142646
143081
|
const value = obj[key];
|
|
143082
|
+
if (isExcludedPath(keyPathFromRoot, value)) continue;
|
|
142647
143083
|
const childLegacyIdScope = getSchemaIdMode(value, legacyIdScope);
|
|
142648
143084
|
const childScopeBase = dynamicIdScope && value && typeof value === "object" && !ArrayBuffer.isView(value) ? getSchemaBasePath(currentScopeBase, value, childLegacyIdScope) : currentScopeBase;
|
|
142649
143085
|
let circular;
|
|
@@ -142760,7 +143196,7 @@ function foundCircularReference(keyPath, $refs, options) {
|
|
|
142760
143196
|
return true;
|
|
142761
143197
|
}
|
|
142762
143198
|
//#endregion
|
|
142763
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
143199
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js
|
|
142764
143200
|
function makeNext() {
|
|
142765
143201
|
if (typeof process === "object" && typeof process.nextTick === "function") return process.nextTick;
|
|
142766
143202
|
else if (typeof setImmediate === "function") return setImmediate;
|
|
@@ -142770,7 +143206,7 @@ function makeNext() {
|
|
|
142770
143206
|
}
|
|
142771
143207
|
var next_default = makeNext();
|
|
142772
143208
|
//#endregion
|
|
142773
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
143209
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js
|
|
142774
143210
|
function maybe(cb, promise) {
|
|
142775
143211
|
if (cb) {
|
|
142776
143212
|
promise.then(function(result) {
|
|
@@ -142786,7 +143222,7 @@ function maybe(cb, promise) {
|
|
|
142786
143222
|
} else return promise;
|
|
142787
143223
|
}
|
|
142788
143224
|
//#endregion
|
|
142789
|
-
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.
|
|
143225
|
+
//#region node_modules/.pnpm/@apidevtools+json-schema-ref-parser@16.0.1_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js
|
|
142790
143226
|
/**
|
|
142791
143227
|
* This class parses a JSON schema, builds a map of its JSON references and their resolved values,
|
|
142792
143228
|
* and provides methods for traversing, manipulating, and dereferencing those references.
|