norn-cli 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/cli.js +543 -525
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -35,8 +35,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
35
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
36
|
|
|
37
37
|
// src/pathAccess.ts
|
|
38
|
-
function getPathSegments(
|
|
39
|
-
return
|
|
38
|
+
function getPathSegments(path17) {
|
|
39
|
+
return path17.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => part !== "");
|
|
40
40
|
}
|
|
41
41
|
function getPathPartValue(current, part) {
|
|
42
42
|
if (Array.isArray(current) && part === "count") {
|
|
@@ -44,12 +44,12 @@ function getPathPartValue(current, part) {
|
|
|
44
44
|
}
|
|
45
45
|
return current[part];
|
|
46
46
|
}
|
|
47
|
-
function getNestedPathValue(obj,
|
|
48
|
-
if (!
|
|
47
|
+
function getNestedPathValue(obj, path17) {
|
|
48
|
+
if (!path17 || obj === null || obj === void 0) {
|
|
49
49
|
return obj;
|
|
50
50
|
}
|
|
51
51
|
let current = obj;
|
|
52
|
-
for (const part of getPathSegments(
|
|
52
|
+
for (const part of getPathSegments(path17)) {
|
|
53
53
|
if (current === null || current === void 0) {
|
|
54
54
|
return void 0;
|
|
55
55
|
}
|
|
@@ -8910,11 +8910,11 @@ var require_mime_types = __commonJS({
|
|
|
8910
8910
|
}
|
|
8911
8911
|
return exts[0];
|
|
8912
8912
|
}
|
|
8913
|
-
function lookup(
|
|
8914
|
-
if (!
|
|
8913
|
+
function lookup(path17) {
|
|
8914
|
+
if (!path17 || typeof path17 !== "string") {
|
|
8915
8915
|
return false;
|
|
8916
8916
|
}
|
|
8917
|
-
var extension2 = extname3("x." +
|
|
8917
|
+
var extension2 = extname3("x." + path17).toLowerCase().substr(1);
|
|
8918
8918
|
if (!extension2) {
|
|
8919
8919
|
return false;
|
|
8920
8920
|
}
|
|
@@ -10019,11 +10019,11 @@ var require_form_data = __commonJS({
|
|
|
10019
10019
|
"use strict";
|
|
10020
10020
|
var CombinedStream = require_combined_stream();
|
|
10021
10021
|
var util4 = require("util");
|
|
10022
|
-
var
|
|
10022
|
+
var path17 = require("path");
|
|
10023
10023
|
var http3 = require("http");
|
|
10024
10024
|
var https3 = require("https");
|
|
10025
10025
|
var parseUrl = require("url").parse;
|
|
10026
|
-
var
|
|
10026
|
+
var fs21 = require("fs");
|
|
10027
10027
|
var Stream = require("stream").Stream;
|
|
10028
10028
|
var crypto8 = require("crypto");
|
|
10029
10029
|
var mime = require_mime_types();
|
|
@@ -10090,7 +10090,7 @@ var require_form_data = __commonJS({
|
|
|
10090
10090
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
10091
10091
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
10092
10092
|
} else {
|
|
10093
|
-
|
|
10093
|
+
fs21.stat(value.path, function(err, stat) {
|
|
10094
10094
|
if (err) {
|
|
10095
10095
|
callback(err);
|
|
10096
10096
|
return;
|
|
@@ -10147,11 +10147,11 @@ var require_form_data = __commonJS({
|
|
|
10147
10147
|
FormData3.prototype._getContentDisposition = function(value, options) {
|
|
10148
10148
|
var filename;
|
|
10149
10149
|
if (typeof options.filepath === "string") {
|
|
10150
|
-
filename =
|
|
10150
|
+
filename = path17.normalize(options.filepath).replace(/\\/g, "/");
|
|
10151
10151
|
} else if (options.filename || value && (value.name || value.path)) {
|
|
10152
|
-
filename =
|
|
10152
|
+
filename = path17.basename(options.filename || value && (value.name || value.path));
|
|
10153
10153
|
} else if (value && value.readable && hasOwn(value, "httpVersion")) {
|
|
10154
|
-
filename =
|
|
10154
|
+
filename = path17.basename(value.client._httpMessage.path || "");
|
|
10155
10155
|
}
|
|
10156
10156
|
if (filename) {
|
|
10157
10157
|
return 'filename="' + filename + '"';
|
|
@@ -15118,7 +15118,7 @@ var require_compile = __commonJS({
|
|
|
15118
15118
|
const schOrFunc = root.refs[ref];
|
|
15119
15119
|
if (schOrFunc)
|
|
15120
15120
|
return schOrFunc;
|
|
15121
|
-
let _sch =
|
|
15121
|
+
let _sch = resolve14.call(this, root, ref);
|
|
15122
15122
|
if (_sch === void 0) {
|
|
15123
15123
|
const schema = (_a2 = root.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
|
|
15124
15124
|
const { schemaId } = this.opts;
|
|
@@ -15145,7 +15145,7 @@ var require_compile = __commonJS({
|
|
|
15145
15145
|
function sameSchemaEnv(s1, s2) {
|
|
15146
15146
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
15147
15147
|
}
|
|
15148
|
-
function
|
|
15148
|
+
function resolve14(root, ref) {
|
|
15149
15149
|
let sch;
|
|
15150
15150
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
15151
15151
|
ref = sch;
|
|
@@ -15360,8 +15360,8 @@ var require_utils = __commonJS({
|
|
|
15360
15360
|
}
|
|
15361
15361
|
return ind;
|
|
15362
15362
|
}
|
|
15363
|
-
function removeDotSegments(
|
|
15364
|
-
let input2 =
|
|
15363
|
+
function removeDotSegments(path17) {
|
|
15364
|
+
let input2 = path17;
|
|
15365
15365
|
const output2 = [];
|
|
15366
15366
|
let nextSlash = -1;
|
|
15367
15367
|
let len = 0;
|
|
@@ -15560,8 +15560,8 @@ var require_schemes = __commonJS({
|
|
|
15560
15560
|
wsComponent.secure = void 0;
|
|
15561
15561
|
}
|
|
15562
15562
|
if (wsComponent.resourceName) {
|
|
15563
|
-
const [
|
|
15564
|
-
wsComponent.path =
|
|
15563
|
+
const [path17, query] = wsComponent.resourceName.split("?");
|
|
15564
|
+
wsComponent.path = path17 && path17 !== "/" ? path17 : void 0;
|
|
15565
15565
|
wsComponent.query = query;
|
|
15566
15566
|
wsComponent.resourceName = void 0;
|
|
15567
15567
|
}
|
|
@@ -15720,7 +15720,7 @@ var require_fast_uri = __commonJS({
|
|
|
15720
15720
|
}
|
|
15721
15721
|
return uri;
|
|
15722
15722
|
}
|
|
15723
|
-
function
|
|
15723
|
+
function resolve14(baseURI, relativeURI, options) {
|
|
15724
15724
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
15725
15725
|
const resolved = resolveComponent(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
15726
15726
|
schemelessOptions.skipEscape = true;
|
|
@@ -15947,7 +15947,7 @@ var require_fast_uri = __commonJS({
|
|
|
15947
15947
|
var fastUri = {
|
|
15948
15948
|
SCHEMES,
|
|
15949
15949
|
normalize,
|
|
15950
|
-
resolve:
|
|
15950
|
+
resolve: resolve14,
|
|
15951
15951
|
resolveComponent,
|
|
15952
15952
|
equal,
|
|
15953
15953
|
serialize,
|
|
@@ -18767,8 +18767,8 @@ function validateAgainstSchemaDetailed(value, schemaPath, basePath, workspaceRoo
|
|
|
18767
18767
|
if (!valid && validate3.errors) {
|
|
18768
18768
|
const errors = validate3.errors.map((err) => convertAjvError(err, value));
|
|
18769
18769
|
const errorStrings = validate3.errors.map((err) => {
|
|
18770
|
-
const
|
|
18771
|
-
return `${
|
|
18770
|
+
const path17 = err.instancePath || "(root)";
|
|
18771
|
+
return `${path17}: ${err.message}`;
|
|
18772
18772
|
});
|
|
18773
18773
|
return {
|
|
18774
18774
|
valid: false,
|
|
@@ -18806,8 +18806,8 @@ function validateAgainstSchemaObjectDetailed(value, schema) {
|
|
|
18806
18806
|
if (!valid && validate3.errors) {
|
|
18807
18807
|
const errors = validate3.errors.map((err) => convertAjvError(err, value));
|
|
18808
18808
|
const errorStrings = validate3.errors.map((err) => {
|
|
18809
|
-
const
|
|
18810
|
-
return `${
|
|
18809
|
+
const path17 = err.instancePath || "(root)";
|
|
18810
|
+
return `${path17}: ${err.message}`;
|
|
18811
18811
|
});
|
|
18812
18812
|
return {
|
|
18813
18813
|
valid: false,
|
|
@@ -18977,7 +18977,7 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
|
|
|
18977
18977
|
if (refMatch) {
|
|
18978
18978
|
const responseIdx = parseInt(refMatch[1], 10);
|
|
18979
18979
|
const responseIndex = responseIdx - 1;
|
|
18980
|
-
const
|
|
18980
|
+
const path17 = refMatch[2];
|
|
18981
18981
|
if (responseIndex < 0 || responseIndex >= responses.length) {
|
|
18982
18982
|
return {
|
|
18983
18983
|
value: void 0,
|
|
@@ -18985,12 +18985,12 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
|
|
|
18985
18985
|
};
|
|
18986
18986
|
}
|
|
18987
18987
|
const response = responses[responseIndex];
|
|
18988
|
-
const value = getValueByPath2(response,
|
|
18988
|
+
const value = getValueByPath2(response, path17);
|
|
18989
18989
|
return {
|
|
18990
18990
|
value,
|
|
18991
18991
|
responseIndex: responseIdx,
|
|
18992
18992
|
response,
|
|
18993
|
-
jsonPath:
|
|
18993
|
+
jsonPath: path17,
|
|
18994
18994
|
variableName: responseIndexToVariable?.get(responseIdx)
|
|
18995
18995
|
};
|
|
18996
18996
|
}
|
|
@@ -19007,22 +19007,22 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
|
|
|
19007
19007
|
if (varName in variables) {
|
|
19008
19008
|
const varValue = variables[varName];
|
|
19009
19009
|
if (typeof varValue === "object" && varValue !== null) {
|
|
19010
|
-
const
|
|
19011
|
-
const value = getNestedValue2(varValue,
|
|
19010
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
19011
|
+
const value = getNestedValue2(varValue, path17);
|
|
19012
19012
|
const isHttpResponse = "status" in varValue && "body" in varValue;
|
|
19013
19013
|
return {
|
|
19014
19014
|
value,
|
|
19015
19015
|
variableName: varName,
|
|
19016
|
-
jsonPath:
|
|
19016
|
+
jsonPath: path17,
|
|
19017
19017
|
response: isHttpResponse ? varValue : void 0
|
|
19018
19018
|
};
|
|
19019
19019
|
}
|
|
19020
19020
|
if (typeof varValue === "string") {
|
|
19021
19021
|
try {
|
|
19022
19022
|
const parsed = JSON.parse(varValue);
|
|
19023
|
-
const
|
|
19024
|
-
const value = getNestedValue2(parsed,
|
|
19025
|
-
return { value, variableName: varName, jsonPath:
|
|
19023
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
19024
|
+
const value = getNestedValue2(parsed, path17);
|
|
19025
|
+
return { value, variableName: varName, jsonPath: path17 };
|
|
19026
19026
|
} catch {
|
|
19027
19027
|
return { value: void 0, error: `Cannot access path on non-object variable: ${varName}` };
|
|
19028
19028
|
}
|
|
@@ -19051,14 +19051,14 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
|
|
|
19051
19051
|
const varValue = variables[varName];
|
|
19052
19052
|
if (pathPart) {
|
|
19053
19053
|
if (typeof varValue === "object" && varValue !== null) {
|
|
19054
|
-
const
|
|
19055
|
-
return { value: getNestedValue2(varValue,
|
|
19054
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
19055
|
+
return { value: getNestedValue2(varValue, path17) };
|
|
19056
19056
|
}
|
|
19057
19057
|
if (typeof varValue === "string") {
|
|
19058
19058
|
try {
|
|
19059
19059
|
const parsed = JSON.parse(varValue);
|
|
19060
|
-
const
|
|
19061
|
-
return { value: getNestedValue2(parsed,
|
|
19060
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
19061
|
+
return { value: getNestedValue2(parsed, path17) };
|
|
19062
19062
|
} catch {
|
|
19063
19063
|
return { value: void 0, error: `Cannot access path on non-object variable: ${varName}` };
|
|
19064
19064
|
}
|
|
@@ -19095,8 +19095,8 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
|
|
|
19095
19095
|
}
|
|
19096
19096
|
return { value: void 0, error: `Cannot resolve expression: ${trimmed}` };
|
|
19097
19097
|
}
|
|
19098
|
-
function getNestedValue2(obj,
|
|
19099
|
-
return getNestedPathValue(obj,
|
|
19098
|
+
function getNestedValue2(obj, path17) {
|
|
19099
|
+
return getNestedPathValue(obj, path17);
|
|
19100
19100
|
}
|
|
19101
19101
|
function areValuesEqual(leftValue, rightValue) {
|
|
19102
19102
|
if (leftValue === rightValue) {
|
|
@@ -20978,15 +20978,15 @@ var require_pg_connection_string = __commonJS({
|
|
|
20978
20978
|
if (config2.sslcert || config2.sslkey || config2.sslrootcert || config2.sslmode) {
|
|
20979
20979
|
config2.ssl = {};
|
|
20980
20980
|
}
|
|
20981
|
-
const
|
|
20981
|
+
const fs21 = config2.sslcert || config2.sslkey || config2.sslrootcert ? require("fs") : null;
|
|
20982
20982
|
if (config2.sslcert) {
|
|
20983
|
-
config2.ssl.cert =
|
|
20983
|
+
config2.ssl.cert = fs21.readFileSync(config2.sslcert).toString();
|
|
20984
20984
|
}
|
|
20985
20985
|
if (config2.sslkey) {
|
|
20986
|
-
config2.ssl.key =
|
|
20986
|
+
config2.ssl.key = fs21.readFileSync(config2.sslkey).toString();
|
|
20987
20987
|
}
|
|
20988
20988
|
if (config2.sslrootcert) {
|
|
20989
|
-
config2.ssl.ca =
|
|
20989
|
+
config2.ssl.ca = fs21.readFileSync(config2.sslrootcert).toString();
|
|
20990
20990
|
}
|
|
20991
20991
|
if (options.useLibpqCompat && config2.uselibpqcompat) {
|
|
20992
20992
|
throw new Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");
|
|
@@ -22382,7 +22382,7 @@ var require_dist = __commonJS({
|
|
|
22382
22382
|
function parse5(stream4, callback) {
|
|
22383
22383
|
const parser = new parser_1.Parser();
|
|
22384
22384
|
stream4.on("data", (buffer) => parser.parse(buffer, callback));
|
|
22385
|
-
return new Promise((
|
|
22385
|
+
return new Promise((resolve14) => stream4.on("end", () => resolve14()));
|
|
22386
22386
|
}
|
|
22387
22387
|
exports2.parse = parse5;
|
|
22388
22388
|
}
|
|
@@ -22751,7 +22751,7 @@ var require_split2 = __commonJS({
|
|
|
22751
22751
|
var require_helper = __commonJS({
|
|
22752
22752
|
"node_modules/pgpass/lib/helper.js"(exports2, module2) {
|
|
22753
22753
|
"use strict";
|
|
22754
|
-
var
|
|
22754
|
+
var path17 = require("path");
|
|
22755
22755
|
var Stream = require("stream").Stream;
|
|
22756
22756
|
var split = require_split2();
|
|
22757
22757
|
var util4 = require("util");
|
|
@@ -22790,7 +22790,7 @@ var require_helper = __commonJS({
|
|
|
22790
22790
|
};
|
|
22791
22791
|
module2.exports.getFileName = function(rawEnv) {
|
|
22792
22792
|
var env3 = rawEnv || process.env;
|
|
22793
|
-
var file2 = env3.PGPASSFILE || (isWin ?
|
|
22793
|
+
var file2 = env3.PGPASSFILE || (isWin ? path17.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path17.join(env3.HOME || "./", ".pgpass"));
|
|
22794
22794
|
return file2;
|
|
22795
22795
|
};
|
|
22796
22796
|
module2.exports.usePgPass = function(stats, fname) {
|
|
@@ -22922,16 +22922,16 @@ var require_helper = __commonJS({
|
|
|
22922
22922
|
var require_lib = __commonJS({
|
|
22923
22923
|
"node_modules/pgpass/lib/index.js"(exports2, module2) {
|
|
22924
22924
|
"use strict";
|
|
22925
|
-
var
|
|
22926
|
-
var
|
|
22925
|
+
var path17 = require("path");
|
|
22926
|
+
var fs21 = require("fs");
|
|
22927
22927
|
var helper = require_helper();
|
|
22928
22928
|
module2.exports = function(connInfo, cb) {
|
|
22929
22929
|
var file2 = helper.getFileName();
|
|
22930
|
-
|
|
22930
|
+
fs21.stat(file2, function(err, stat) {
|
|
22931
22931
|
if (err || !helper.usePgPass(stat, file2)) {
|
|
22932
22932
|
return cb(void 0);
|
|
22933
22933
|
}
|
|
22934
|
-
var st =
|
|
22934
|
+
var st = fs21.createReadStream(file2);
|
|
22935
22935
|
helper.getPassword(connInfo, st, cb);
|
|
22936
22936
|
});
|
|
22937
22937
|
};
|
|
@@ -23113,12 +23113,12 @@ var require_client = __commonJS({
|
|
|
23113
23113
|
this._connect(callback);
|
|
23114
23114
|
return;
|
|
23115
23115
|
}
|
|
23116
|
-
return new this._Promise((
|
|
23116
|
+
return new this._Promise((resolve14, reject) => {
|
|
23117
23117
|
this._connect((error2) => {
|
|
23118
23118
|
if (error2) {
|
|
23119
23119
|
reject(error2);
|
|
23120
23120
|
} else {
|
|
23121
|
-
|
|
23121
|
+
resolve14(this);
|
|
23122
23122
|
}
|
|
23123
23123
|
});
|
|
23124
23124
|
});
|
|
@@ -23464,8 +23464,8 @@ var require_client = __commonJS({
|
|
|
23464
23464
|
readTimeout = config2.query_timeout || this.connectionParameters.query_timeout;
|
|
23465
23465
|
query = new Query2(config2, values, callback);
|
|
23466
23466
|
if (!query.callback) {
|
|
23467
|
-
result = new this._Promise((
|
|
23468
|
-
query.callback = (err, res) => err ? reject(err) :
|
|
23467
|
+
result = new this._Promise((resolve14, reject) => {
|
|
23468
|
+
query.callback = (err, res) => err ? reject(err) : resolve14(res);
|
|
23469
23469
|
}).catch((err) => {
|
|
23470
23470
|
Error.captureStackTrace(err);
|
|
23471
23471
|
throw err;
|
|
@@ -23542,8 +23542,8 @@ var require_client = __commonJS({
|
|
|
23542
23542
|
if (cb) {
|
|
23543
23543
|
this.connection.once("end", cb);
|
|
23544
23544
|
} else {
|
|
23545
|
-
return new this._Promise((
|
|
23546
|
-
this.connection.once("end",
|
|
23545
|
+
return new this._Promise((resolve14) => {
|
|
23546
|
+
this.connection.once("end", resolve14);
|
|
23547
23547
|
});
|
|
23548
23548
|
}
|
|
23549
23549
|
}
|
|
@@ -23592,8 +23592,8 @@ var require_pg_pool = __commonJS({
|
|
|
23592
23592
|
const cb = function(err, client) {
|
|
23593
23593
|
err ? rej(err) : res(client);
|
|
23594
23594
|
};
|
|
23595
|
-
const result = new Promise2(function(
|
|
23596
|
-
res =
|
|
23595
|
+
const result = new Promise2(function(resolve14, reject) {
|
|
23596
|
+
res = resolve14;
|
|
23597
23597
|
rej = reject;
|
|
23598
23598
|
}).catch((err) => {
|
|
23599
23599
|
Error.captureStackTrace(err);
|
|
@@ -23654,7 +23654,7 @@ var require_pg_pool = __commonJS({
|
|
|
23654
23654
|
if (typeof Promise2.try === "function") {
|
|
23655
23655
|
return Promise2.try(f);
|
|
23656
23656
|
}
|
|
23657
|
-
return new Promise2((
|
|
23657
|
+
return new Promise2((resolve14) => resolve14(f()));
|
|
23658
23658
|
}
|
|
23659
23659
|
_isFull() {
|
|
23660
23660
|
return this._clients.length >= this.options.max;
|
|
@@ -24047,8 +24047,8 @@ var require_query2 = __commonJS({
|
|
|
24047
24047
|
NativeQuery.prototype._getPromise = function() {
|
|
24048
24048
|
if (this._promise) return this._promise;
|
|
24049
24049
|
this._promise = new Promise(
|
|
24050
|
-
function(
|
|
24051
|
-
this._once("end",
|
|
24050
|
+
function(resolve14, reject) {
|
|
24051
|
+
this._once("end", resolve14);
|
|
24052
24052
|
this._once("error", reject);
|
|
24053
24053
|
}.bind(this)
|
|
24054
24054
|
);
|
|
@@ -24225,12 +24225,12 @@ var require_client2 = __commonJS({
|
|
|
24225
24225
|
this._connect(callback);
|
|
24226
24226
|
return;
|
|
24227
24227
|
}
|
|
24228
|
-
return new this._Promise((
|
|
24228
|
+
return new this._Promise((resolve14, reject) => {
|
|
24229
24229
|
this._connect((error2) => {
|
|
24230
24230
|
if (error2) {
|
|
24231
24231
|
reject(error2);
|
|
24232
24232
|
} else {
|
|
24233
|
-
|
|
24233
|
+
resolve14(this);
|
|
24234
24234
|
}
|
|
24235
24235
|
});
|
|
24236
24236
|
});
|
|
@@ -24254,8 +24254,8 @@ var require_client2 = __commonJS({
|
|
|
24254
24254
|
query = new NativeQuery(config2, values, callback);
|
|
24255
24255
|
if (!query.callback) {
|
|
24256
24256
|
let resolveOut, rejectOut;
|
|
24257
|
-
result = new this._Promise((
|
|
24258
|
-
resolveOut =
|
|
24257
|
+
result = new this._Promise((resolve14, reject) => {
|
|
24258
|
+
resolveOut = resolve14;
|
|
24259
24259
|
rejectOut = reject;
|
|
24260
24260
|
}).catch((err) => {
|
|
24261
24261
|
Error.captureStackTrace(err);
|
|
@@ -24315,8 +24315,8 @@ var require_client2 = __commonJS({
|
|
|
24315
24315
|
}
|
|
24316
24316
|
let result;
|
|
24317
24317
|
if (!cb) {
|
|
24318
|
-
result = new this._Promise(function(
|
|
24319
|
-
cb = (err) => err ? reject(err) :
|
|
24318
|
+
result = new this._Promise(function(resolve14, reject) {
|
|
24319
|
+
cb = (err) => err ? reject(err) : resolve14();
|
|
24320
24320
|
});
|
|
24321
24321
|
}
|
|
24322
24322
|
this.native.end(function() {
|
|
@@ -25014,15 +25014,15 @@ var require_utils4 = __commonJS({
|
|
|
25014
25014
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
25015
25015
|
var PromiseInspection_1 = require_PromiseInspection();
|
|
25016
25016
|
function defer() {
|
|
25017
|
-
let
|
|
25017
|
+
let resolve14 = null;
|
|
25018
25018
|
let reject = null;
|
|
25019
25019
|
const promise2 = new Promise((resolver, rejecter) => {
|
|
25020
|
-
|
|
25020
|
+
resolve14 = resolver;
|
|
25021
25021
|
reject = rejecter;
|
|
25022
25022
|
});
|
|
25023
25023
|
return {
|
|
25024
25024
|
promise: promise2,
|
|
25025
|
-
resolve:
|
|
25025
|
+
resolve: resolve14,
|
|
25026
25026
|
reject
|
|
25027
25027
|
};
|
|
25028
25028
|
}
|
|
@@ -25047,7 +25047,7 @@ var require_utils4 = __commonJS({
|
|
|
25047
25047
|
}
|
|
25048
25048
|
exports2.checkRequiredTime = checkRequiredTime;
|
|
25049
25049
|
function delay(millis) {
|
|
25050
|
-
return new Promise((
|
|
25050
|
+
return new Promise((resolve14) => setTimeout(resolve14, millis));
|
|
25051
25051
|
}
|
|
25052
25052
|
exports2.delay = delay;
|
|
25053
25053
|
function reflect(promise2) {
|
|
@@ -25107,11 +25107,11 @@ var require_PendingOperation = __commonJS({
|
|
|
25107
25107
|
};
|
|
25108
25108
|
exports2.PendingOperation = PendingOperation;
|
|
25109
25109
|
function timeout(promise2, time3) {
|
|
25110
|
-
return new Promise((
|
|
25110
|
+
return new Promise((resolve14, reject) => {
|
|
25111
25111
|
const timeoutHandle = setTimeout(() => reject(new TimeoutError_1.TimeoutError()), time3);
|
|
25112
25112
|
promise2.then((result) => {
|
|
25113
25113
|
clearTimeout(timeoutHandle);
|
|
25114
|
-
|
|
25114
|
+
resolve14(result);
|
|
25115
25115
|
}).catch((err) => {
|
|
25116
25116
|
clearTimeout(timeoutHandle);
|
|
25117
25117
|
reject(err);
|
|
@@ -25319,15 +25319,15 @@ var require_Pool = __commonJS({
|
|
|
25319
25319
|
this._stopReaping();
|
|
25320
25320
|
this.destroyed = true;
|
|
25321
25321
|
return utils_1.reflect(Promise.all(this.pendingCreates.map((create) => utils_1.reflect(create.promise))).then(() => {
|
|
25322
|
-
return new Promise((
|
|
25322
|
+
return new Promise((resolve14, reject) => {
|
|
25323
25323
|
if (this.numPendingValidations() === 0) {
|
|
25324
|
-
|
|
25324
|
+
resolve14();
|
|
25325
25325
|
return;
|
|
25326
25326
|
}
|
|
25327
25327
|
const interval = setInterval(() => {
|
|
25328
25328
|
if (this.numPendingValidations() === 0) {
|
|
25329
25329
|
timers_1.clearInterval(interval);
|
|
25330
|
-
|
|
25330
|
+
resolve14();
|
|
25331
25331
|
}
|
|
25332
25332
|
}, 100);
|
|
25333
25333
|
});
|
|
@@ -25551,17 +25551,17 @@ var require_Pool = __commonJS({
|
|
|
25551
25551
|
}
|
|
25552
25552
|
}
|
|
25553
25553
|
function callbackOrPromise(func) {
|
|
25554
|
-
return new Promise((
|
|
25554
|
+
return new Promise((resolve14, reject) => {
|
|
25555
25555
|
const callback = (err, resource) => {
|
|
25556
25556
|
if (err) {
|
|
25557
25557
|
reject(err);
|
|
25558
25558
|
} else {
|
|
25559
|
-
|
|
25559
|
+
resolve14(resource);
|
|
25560
25560
|
}
|
|
25561
25561
|
};
|
|
25562
25562
|
utils_1.tryPromise(() => func(callback)).then((res) => {
|
|
25563
25563
|
if (res) {
|
|
25564
|
-
|
|
25564
|
+
resolve14(res);
|
|
25565
25565
|
}
|
|
25566
25566
|
}).catch((err) => {
|
|
25567
25567
|
reject(err);
|
|
@@ -25995,7 +25995,7 @@ var require_table = __commonJS({
|
|
|
25995
25995
|
let cursor = -1;
|
|
25996
25996
|
let buffer = "";
|
|
25997
25997
|
let escaped = false;
|
|
25998
|
-
const
|
|
25998
|
+
const path17 = [];
|
|
25999
25999
|
while (++cursor < length) {
|
|
26000
26000
|
const char = name.charAt(cursor);
|
|
26001
26001
|
if (char === "[") {
|
|
@@ -26014,7 +26014,7 @@ var require_table = __commonJS({
|
|
|
26014
26014
|
if (escaped) {
|
|
26015
26015
|
buffer += char;
|
|
26016
26016
|
} else {
|
|
26017
|
-
|
|
26017
|
+
path17.push(buffer);
|
|
26018
26018
|
buffer = "";
|
|
26019
26019
|
}
|
|
26020
26020
|
} else {
|
|
@@ -26022,26 +26022,26 @@ var require_table = __commonJS({
|
|
|
26022
26022
|
}
|
|
26023
26023
|
}
|
|
26024
26024
|
if (buffer) {
|
|
26025
|
-
|
|
26025
|
+
path17.push(buffer);
|
|
26026
26026
|
}
|
|
26027
|
-
switch (
|
|
26027
|
+
switch (path17.length) {
|
|
26028
26028
|
case 1:
|
|
26029
26029
|
return {
|
|
26030
|
-
name:
|
|
26030
|
+
name: path17[0],
|
|
26031
26031
|
schema: null,
|
|
26032
26032
|
database: null
|
|
26033
26033
|
};
|
|
26034
26034
|
case 2:
|
|
26035
26035
|
return {
|
|
26036
|
-
name:
|
|
26037
|
-
schema:
|
|
26036
|
+
name: path17[1],
|
|
26037
|
+
schema: path17[0],
|
|
26038
26038
|
database: null
|
|
26039
26039
|
};
|
|
26040
26040
|
case 3:
|
|
26041
26041
|
return {
|
|
26042
|
-
name:
|
|
26043
|
-
schema:
|
|
26044
|
-
database:
|
|
26042
|
+
name: path17[2],
|
|
26043
|
+
schema: path17[1],
|
|
26044
|
+
database: path17[0]
|
|
26045
26045
|
};
|
|
26046
26046
|
default:
|
|
26047
26047
|
throw new Error("Invalid table name.");
|
|
@@ -26627,10 +26627,10 @@ var require_connection_pool = __commonJS({
|
|
|
26627
26627
|
this._connect(callback);
|
|
26628
26628
|
return this;
|
|
26629
26629
|
}
|
|
26630
|
-
return new shared.Promise((
|
|
26630
|
+
return new shared.Promise((resolve14, reject) => {
|
|
26631
26631
|
return this._connect((err) => {
|
|
26632
26632
|
if (err) return reject(err);
|
|
26633
|
-
|
|
26633
|
+
resolve14(this);
|
|
26634
26634
|
});
|
|
26635
26635
|
});
|
|
26636
26636
|
}
|
|
@@ -26711,10 +26711,10 @@ var require_connection_pool = __commonJS({
|
|
|
26711
26711
|
this._close(callback);
|
|
26712
26712
|
return this;
|
|
26713
26713
|
}
|
|
26714
|
-
return new shared.Promise((
|
|
26714
|
+
return new shared.Promise((resolve14, reject) => {
|
|
26715
26715
|
this._close((err) => {
|
|
26716
26716
|
if (err) return reject(err);
|
|
26717
|
-
|
|
26717
|
+
resolve14(this);
|
|
26718
26718
|
});
|
|
26719
26719
|
});
|
|
26720
26720
|
}
|
|
@@ -26875,8 +26875,8 @@ var require_global_connection = __commonJS({
|
|
|
26875
26875
|
setImmediate(callback);
|
|
26876
26876
|
return null;
|
|
26877
26877
|
}
|
|
26878
|
-
return new shared.Promise((
|
|
26879
|
-
|
|
26878
|
+
return new shared.Promise((resolve14) => {
|
|
26879
|
+
resolve14(globalConnection);
|
|
26880
26880
|
});
|
|
26881
26881
|
}
|
|
26882
26882
|
function on(event, handler) {
|
|
@@ -27087,10 +27087,10 @@ var require_prepared_statement = __commonJS({
|
|
|
27087
27087
|
this._prepare(statement, callback);
|
|
27088
27088
|
return this;
|
|
27089
27089
|
}
|
|
27090
|
-
return new shared.Promise((
|
|
27090
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27091
27091
|
this._prepare(statement, (err) => {
|
|
27092
27092
|
if (err) return reject(err);
|
|
27093
|
-
|
|
27093
|
+
resolve14(this);
|
|
27094
27094
|
});
|
|
27095
27095
|
});
|
|
27096
27096
|
}
|
|
@@ -27153,10 +27153,10 @@ var require_prepared_statement = __commonJS({
|
|
|
27153
27153
|
if (this.stream || typeof callback === "function") {
|
|
27154
27154
|
return this._execute(values, callback);
|
|
27155
27155
|
}
|
|
27156
|
-
return new shared.Promise((
|
|
27156
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27157
27157
|
this._execute(values, (err, recordset) => {
|
|
27158
27158
|
if (err) return reject(err);
|
|
27159
|
-
|
|
27159
|
+
resolve14(recordset);
|
|
27160
27160
|
});
|
|
27161
27161
|
});
|
|
27162
27162
|
}
|
|
@@ -27202,10 +27202,10 @@ var require_prepared_statement = __commonJS({
|
|
|
27202
27202
|
this._unprepare(callback);
|
|
27203
27203
|
return this;
|
|
27204
27204
|
}
|
|
27205
|
-
return new shared.Promise((
|
|
27205
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27206
27206
|
this._unprepare((err) => {
|
|
27207
27207
|
if (err) return reject(err);
|
|
27208
|
-
|
|
27208
|
+
resolve14();
|
|
27209
27209
|
});
|
|
27210
27210
|
});
|
|
27211
27211
|
}
|
|
@@ -27449,7 +27449,7 @@ var require_request = __commonJS({
|
|
|
27449
27449
|
const strings = values.shift();
|
|
27450
27450
|
batch = this._template(strings, values);
|
|
27451
27451
|
}
|
|
27452
|
-
return new shared.Promise((
|
|
27452
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27453
27453
|
this._batch(batch, (err, recordsets, output2, rowsAffected) => {
|
|
27454
27454
|
if (this.stream) {
|
|
27455
27455
|
if (err) this.emit("error", err);
|
|
@@ -27460,7 +27460,7 @@ var require_request = __commonJS({
|
|
|
27460
27460
|
});
|
|
27461
27461
|
}
|
|
27462
27462
|
if (err) return reject(err);
|
|
27463
|
-
|
|
27463
|
+
resolve14({
|
|
27464
27464
|
recordsets,
|
|
27465
27465
|
recordset: recordsets && recordsets[0],
|
|
27466
27466
|
output: output2,
|
|
@@ -27516,10 +27516,10 @@ var require_request = __commonJS({
|
|
|
27516
27516
|
});
|
|
27517
27517
|
return this;
|
|
27518
27518
|
}
|
|
27519
|
-
return new shared.Promise((
|
|
27519
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27520
27520
|
this._bulk(table, options, (err, rowsAffected) => {
|
|
27521
27521
|
if (err) return reject(err);
|
|
27522
|
-
|
|
27522
|
+
resolve14({
|
|
27523
27523
|
rowsAffected
|
|
27524
27524
|
});
|
|
27525
27525
|
});
|
|
@@ -27620,7 +27620,7 @@ var require_request = __commonJS({
|
|
|
27620
27620
|
const strings = values.shift();
|
|
27621
27621
|
command = this._template(strings, values);
|
|
27622
27622
|
}
|
|
27623
|
-
return new shared.Promise((
|
|
27623
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27624
27624
|
this._query(command, (err, recordsets, output2, rowsAffected, columns) => {
|
|
27625
27625
|
if (this.stream) {
|
|
27626
27626
|
if (err) this.emit("error", err);
|
|
@@ -27638,7 +27638,7 @@ var require_request = __commonJS({
|
|
|
27638
27638
|
rowsAffected
|
|
27639
27639
|
};
|
|
27640
27640
|
if (this.arrayRowMode) result.columns = columns;
|
|
27641
|
-
|
|
27641
|
+
resolve14(result);
|
|
27642
27642
|
});
|
|
27643
27643
|
});
|
|
27644
27644
|
}
|
|
@@ -27692,7 +27692,7 @@ var require_request = __commonJS({
|
|
|
27692
27692
|
});
|
|
27693
27693
|
return this;
|
|
27694
27694
|
}
|
|
27695
|
-
return new shared.Promise((
|
|
27695
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27696
27696
|
this._execute(command, (err, recordsets, output2, returnValue, rowsAffected, columns) => {
|
|
27697
27697
|
if (this.stream) {
|
|
27698
27698
|
if (err) this.emit("error", err);
|
|
@@ -27712,7 +27712,7 @@ var require_request = __commonJS({
|
|
|
27712
27712
|
returnValue
|
|
27713
27713
|
};
|
|
27714
27714
|
if (this.arrayRowMode) result.columns = columns;
|
|
27715
|
-
|
|
27715
|
+
resolve14(result);
|
|
27716
27716
|
});
|
|
27717
27717
|
});
|
|
27718
27718
|
}
|
|
@@ -27876,11 +27876,11 @@ var require_transaction = __commonJS({
|
|
|
27876
27876
|
});
|
|
27877
27877
|
return this;
|
|
27878
27878
|
}
|
|
27879
|
-
return new shared.Promise((
|
|
27879
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27880
27880
|
this._begin(isolationLevel, (err) => {
|
|
27881
27881
|
if (err) return reject(err);
|
|
27882
27882
|
this.emit("begin");
|
|
27883
|
-
|
|
27883
|
+
resolve14(this);
|
|
27884
27884
|
});
|
|
27885
27885
|
});
|
|
27886
27886
|
}
|
|
@@ -27923,11 +27923,11 @@ var require_transaction = __commonJS({
|
|
|
27923
27923
|
});
|
|
27924
27924
|
return this;
|
|
27925
27925
|
}
|
|
27926
|
-
return new shared.Promise((
|
|
27926
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27927
27927
|
this._commit((err) => {
|
|
27928
27928
|
if (err) return reject(err);
|
|
27929
27929
|
this.emit("commit");
|
|
27930
|
-
|
|
27930
|
+
resolve14();
|
|
27931
27931
|
});
|
|
27932
27932
|
});
|
|
27933
27933
|
}
|
|
@@ -27972,11 +27972,11 @@ var require_transaction = __commonJS({
|
|
|
27972
27972
|
});
|
|
27973
27973
|
return this;
|
|
27974
27974
|
}
|
|
27975
|
-
return new shared.Promise((
|
|
27975
|
+
return new shared.Promise((resolve14, reject) => {
|
|
27976
27976
|
return this._rollback((err) => {
|
|
27977
27977
|
if (err) return reject(err);
|
|
27978
27978
|
this.emit("rollback", this._aborted);
|
|
27979
|
-
|
|
27979
|
+
resolve14();
|
|
27980
27980
|
});
|
|
27981
27981
|
});
|
|
27982
27982
|
}
|
|
@@ -29217,11 +29217,11 @@ function __metadata(metadataKey, metadataValue) {
|
|
|
29217
29217
|
}
|
|
29218
29218
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
29219
29219
|
function adopt(value) {
|
|
29220
|
-
return value instanceof P ? value : new P(function(
|
|
29221
|
-
|
|
29220
|
+
return value instanceof P ? value : new P(function(resolve14) {
|
|
29221
|
+
resolve14(value);
|
|
29222
29222
|
});
|
|
29223
29223
|
}
|
|
29224
|
-
return new (P || (P = Promise))(function(
|
|
29224
|
+
return new (P || (P = Promise))(function(resolve14, reject) {
|
|
29225
29225
|
function fulfilled(value) {
|
|
29226
29226
|
try {
|
|
29227
29227
|
step(generator.next(value));
|
|
@@ -29237,7 +29237,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
29237
29237
|
}
|
|
29238
29238
|
}
|
|
29239
29239
|
function step(result) {
|
|
29240
|
-
result.done ?
|
|
29240
|
+
result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
29241
29241
|
}
|
|
29242
29242
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
29243
29243
|
});
|
|
@@ -29428,14 +29428,14 @@ function __asyncValues(o) {
|
|
|
29428
29428
|
}, i);
|
|
29429
29429
|
function verb(n) {
|
|
29430
29430
|
i[n] = o[n] && function(v) {
|
|
29431
|
-
return new Promise(function(
|
|
29432
|
-
v = o[n](v), settle2(
|
|
29431
|
+
return new Promise(function(resolve14, reject) {
|
|
29432
|
+
v = o[n](v), settle2(resolve14, reject, v.done, v.value);
|
|
29433
29433
|
});
|
|
29434
29434
|
};
|
|
29435
29435
|
}
|
|
29436
|
-
function settle2(
|
|
29436
|
+
function settle2(resolve14, reject, d, v) {
|
|
29437
29437
|
Promise.resolve(v).then(function(v2) {
|
|
29438
|
-
|
|
29438
|
+
resolve14({ value: v2, done: d });
|
|
29439
29439
|
}, reject);
|
|
29440
29440
|
}
|
|
29441
29441
|
}
|
|
@@ -29527,13 +29527,13 @@ function __disposeResources(env3) {
|
|
|
29527
29527
|
}
|
|
29528
29528
|
return next();
|
|
29529
29529
|
}
|
|
29530
|
-
function __rewriteRelativeImportExtension(
|
|
29531
|
-
if (typeof
|
|
29532
|
-
return
|
|
29530
|
+
function __rewriteRelativeImportExtension(path17, preserveJsx) {
|
|
29531
|
+
if (typeof path17 === "string" && /^\.\.?\//.test(path17)) {
|
|
29532
|
+
return path17.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
29533
29533
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
29534
29534
|
});
|
|
29535
29535
|
}
|
|
29536
|
-
return
|
|
29536
|
+
return path17;
|
|
29537
29537
|
}
|
|
29538
29538
|
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
29539
29539
|
var init_tslib_es6 = __esm({
|
|
@@ -29680,8 +29680,8 @@ var require_msalPlugins = __commonJS({
|
|
|
29680
29680
|
}
|
|
29681
29681
|
};
|
|
29682
29682
|
exports2.msalNodeFlowVSCodeCredentialControl = {
|
|
29683
|
-
setVSCodeAuthRecordPath(
|
|
29684
|
-
exports2.vsCodeAuthRecordPath =
|
|
29683
|
+
setVSCodeAuthRecordPath(path17) {
|
|
29684
|
+
exports2.vsCodeAuthRecordPath = path17;
|
|
29685
29685
|
},
|
|
29686
29686
|
setVSCodeBroker(broker) {
|
|
29687
29687
|
exports2.vsCodeBrokerInfo = {
|
|
@@ -33030,7 +33030,7 @@ var require_index_node_BtzY9XyU = __commonJS({
|
|
|
33030
33030
|
return cachedAtSec > nowSeconds();
|
|
33031
33031
|
}
|
|
33032
33032
|
function delay(t, value) {
|
|
33033
|
-
return new Promise((
|
|
33033
|
+
return new Promise((resolve14) => setTimeout(() => resolve14(value), t));
|
|
33034
33034
|
}
|
|
33035
33035
|
var TimeUtils = /* @__PURE__ */ Object.freeze({
|
|
33036
33036
|
__proto__: null,
|
|
@@ -42422,8 +42422,8 @@ var require_msal_node = __commonJS({
|
|
|
42422
42422
|
var crypto8 = require("crypto");
|
|
42423
42423
|
var msalCommon = require_lib4();
|
|
42424
42424
|
var jwt2 = require_jsonwebtoken();
|
|
42425
|
-
var
|
|
42426
|
-
var
|
|
42425
|
+
var fs21 = require("fs");
|
|
42426
|
+
var path17 = require("path");
|
|
42427
42427
|
var Serializer = class {
|
|
42428
42428
|
/**
|
|
42429
42429
|
* serialize the JSON blob
|
|
@@ -46216,7 +46216,7 @@ var require_msal_node = __commonJS({
|
|
|
46216
46216
|
return cachedAtSec > nowSeconds();
|
|
46217
46217
|
}
|
|
46218
46218
|
function delay(t, value) {
|
|
46219
|
-
return new Promise((
|
|
46219
|
+
return new Promise((resolve14) => setTimeout(() => resolve14(value), t));
|
|
46220
46220
|
}
|
|
46221
46221
|
function createIdTokenEntity(homeAccountId, environment, idToken, clientId, tenantId) {
|
|
46222
46222
|
const idTokenEntity = {
|
|
@@ -48919,7 +48919,7 @@ ${body}`;
|
|
|
48919
48919
|
Host: ${destinationUrl.host}\r
|
|
48920
48920
|
Connection: close\r
|
|
48921
48921
|
` + postRequestStringContent + "\r\n";
|
|
48922
|
-
return new Promise((
|
|
48922
|
+
return new Promise((resolve14, reject) => {
|
|
48923
48923
|
const request = http3.request(tunnelRequestOptions);
|
|
48924
48924
|
if (timeout) {
|
|
48925
48925
|
request.on("timeout", () => {
|
|
@@ -48968,7 +48968,7 @@ Connection: close\r
|
|
|
48968
48968
|
if (this.shouldDestroyRequest(httpStatusCode, networkResponse)) {
|
|
48969
48969
|
request.destroy();
|
|
48970
48970
|
}
|
|
48971
|
-
|
|
48971
|
+
resolve14(networkResponse);
|
|
48972
48972
|
});
|
|
48973
48973
|
socket.on("error", (chunk) => {
|
|
48974
48974
|
request.destroy();
|
|
@@ -49010,7 +49010,7 @@ Connection: close\r
|
|
|
49010
49010
|
customOptions.timeout = timeout;
|
|
49011
49011
|
}
|
|
49012
49012
|
}
|
|
49013
|
-
return new Promise((
|
|
49013
|
+
return new Promise((resolve14, reject) => {
|
|
49014
49014
|
let request;
|
|
49015
49015
|
if (customOptions.protocol === "http:") {
|
|
49016
49016
|
request = http3.request(customOptions);
|
|
@@ -49043,7 +49043,7 @@ Connection: close\r
|
|
|
49043
49043
|
if (this.shouldDestroyRequest(statusCode, networkResponse)) {
|
|
49044
49044
|
request.destroy();
|
|
49045
49045
|
}
|
|
49046
|
-
|
|
49046
|
+
resolve14(networkResponse);
|
|
49047
49047
|
});
|
|
49048
49048
|
});
|
|
49049
49049
|
request.on("error", (chunk) => {
|
|
@@ -50813,7 +50813,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
50813
50813
|
if (this.server) {
|
|
50814
50814
|
throw NodeAuthError.createLoopbackServerAlreadyExistsError();
|
|
50815
50815
|
}
|
|
50816
|
-
return new Promise((
|
|
50816
|
+
return new Promise((resolve14, reject) => {
|
|
50817
50817
|
this.server = http3.createServer((req, res) => {
|
|
50818
50818
|
const url3 = req.url;
|
|
50819
50819
|
if (!url3) {
|
|
@@ -50836,7 +50836,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
50836
50836
|
if (authCodeResponse.error) {
|
|
50837
50837
|
res.end(errorTemplate || `Error occurred: ${authCodeResponse.error}`);
|
|
50838
50838
|
}
|
|
50839
|
-
|
|
50839
|
+
resolve14(authCodeResponse);
|
|
50840
50840
|
});
|
|
50841
50841
|
this.server.listen(0, "127.0.0.1");
|
|
50842
50842
|
});
|
|
@@ -51249,7 +51249,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
51249
51249
|
* @returns
|
|
51250
51250
|
*/
|
|
51251
51251
|
async waitForRedirectUri(loopbackClient) {
|
|
51252
|
-
return new Promise((
|
|
51252
|
+
return new Promise((resolve14, reject) => {
|
|
51253
51253
|
let ticks = 0;
|
|
51254
51254
|
const id = setInterval(() => {
|
|
51255
51255
|
if (LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS / LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS < ticks) {
|
|
@@ -51260,7 +51260,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
51260
51260
|
try {
|
|
51261
51261
|
const r = loopbackClient.getRedirectUri();
|
|
51262
51262
|
clearInterval(id);
|
|
51263
|
-
|
|
51263
|
+
resolve14(r);
|
|
51264
51264
|
return;
|
|
51265
51265
|
} catch (e) {
|
|
51266
51266
|
if (e instanceof AuthError && e.errorCode === NodeAuthErrorMessage.noLoopbackServerExists.code) {
|
|
@@ -52014,8 +52014,8 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52014
52014
|
if (DEFAULT_MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON.includes(httpStatusCode) && currentRetry < DEFAULT_MANAGED_IDENTITY_MAX_RETRIES) {
|
|
52015
52015
|
const retryAfterDelay = this.linearRetryStrategy.calculateDelay(retryAfterHeader, _DefaultManagedIdentityRetryPolicy.DEFAULT_MANAGED_IDENTITY_RETRY_DELAY_MS);
|
|
52016
52016
|
logger.verbose(`Retrying request in ${retryAfterDelay}ms (retry attempt: ${currentRetry + 1})`);
|
|
52017
|
-
await new Promise((
|
|
52018
|
-
return setTimeout(
|
|
52017
|
+
await new Promise((resolve14) => {
|
|
52018
|
+
return setTimeout(resolve14, retryAfterDelay);
|
|
52019
52019
|
});
|
|
52020
52020
|
return true;
|
|
52021
52021
|
}
|
|
@@ -52171,7 +52171,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52171
52171
|
if (!identityEndpoint || !imdsEndpoint) {
|
|
52172
52172
|
const fileDetectionPath = AZURE_ARC_FILE_DETECTION[process.platform];
|
|
52173
52173
|
try {
|
|
52174
|
-
|
|
52174
|
+
fs21.accessSync(fileDetectionPath, fs21.constants.F_OK | fs21.constants.R_OK);
|
|
52175
52175
|
identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT;
|
|
52176
52176
|
imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING;
|
|
52177
52177
|
} catch (err) {
|
|
@@ -52274,7 +52274,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52274
52274
|
throw createManagedIdentityError(platformNotSupported);
|
|
52275
52275
|
}
|
|
52276
52276
|
const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
|
|
52277
|
-
const fileName =
|
|
52277
|
+
const fileName = path17.basename(secretFilePath);
|
|
52278
52278
|
if (!fileName.endsWith(".key")) {
|
|
52279
52279
|
throw createManagedIdentityError(invalidFileExtension);
|
|
52280
52280
|
}
|
|
@@ -52283,7 +52283,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52283
52283
|
}
|
|
52284
52284
|
let secretFileSize;
|
|
52285
52285
|
try {
|
|
52286
|
-
secretFileSize = await
|
|
52286
|
+
secretFileSize = await fs21.statSync(secretFilePath).size;
|
|
52287
52287
|
} catch (e) {
|
|
52288
52288
|
throw createManagedIdentityError(unableToReadSecretFile);
|
|
52289
52289
|
}
|
|
@@ -52292,7 +52292,7 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52292
52292
|
}
|
|
52293
52293
|
let secret;
|
|
52294
52294
|
try {
|
|
52295
|
-
secret =
|
|
52295
|
+
secret = fs21.readFileSync(secretFilePath, EncodingTypes.UTF8);
|
|
52296
52296
|
} catch (e) {
|
|
52297
52297
|
throw createManagedIdentityError(unableToReadSecretFile);
|
|
52298
52298
|
}
|
|
@@ -52469,8 +52469,8 @@ Headers: ${JSON.stringify(headers)}`
|
|
|
52469
52469
|
if ((HTTP_STATUS_400_CODES_FOR_EXPONENTIAL_STRATEGY.includes(httpStatusCode) || httpStatusCode >= msalCommon.HttpStatus.SERVER_ERROR_RANGE_START && httpStatusCode <= msalCommon.HttpStatus.SERVER_ERROR_RANGE_END && currentRetry < this.maxRetries) && currentRetry < this.maxRetries) {
|
|
52470
52470
|
const retryAfterDelay = httpStatusCode === msalCommon.HttpStatus.GONE ? _ImdsRetryPolicy.HTTP_STATUS_GONE_RETRY_AFTER_MS : this.exponentialRetryStrategy.calculateDelay(currentRetry);
|
|
52471
52471
|
logger.verbose(`Retrying request in ${retryAfterDelay}ms (retry attempt: ${currentRetry + 1})`);
|
|
52472
|
-
await new Promise((
|
|
52473
|
-
return setTimeout(
|
|
52472
|
+
await new Promise((resolve14) => {
|
|
52473
|
+
return setTimeout(resolve14, retryAfterDelay);
|
|
52474
52474
|
});
|
|
52475
52475
|
return true;
|
|
52476
52476
|
}
|
|
@@ -53536,7 +53536,7 @@ var require_createAbortablePromise = __commonJS({
|
|
|
53536
53536
|
var abort_controller_1 = require_commonjs3();
|
|
53537
53537
|
function createAbortablePromise(buildPromise, options) {
|
|
53538
53538
|
const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {};
|
|
53539
|
-
return new Promise((
|
|
53539
|
+
return new Promise((resolve14, reject) => {
|
|
53540
53540
|
function rejectOnAbort() {
|
|
53541
53541
|
reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted."));
|
|
53542
53542
|
}
|
|
@@ -53554,7 +53554,7 @@ var require_createAbortablePromise = __commonJS({
|
|
|
53554
53554
|
try {
|
|
53555
53555
|
buildPromise((x) => {
|
|
53556
53556
|
removeListeners();
|
|
53557
|
-
|
|
53557
|
+
resolve14(x);
|
|
53558
53558
|
}, (x) => {
|
|
53559
53559
|
removeListeners();
|
|
53560
53560
|
reject(x);
|
|
@@ -53581,8 +53581,8 @@ var require_delay2 = __commonJS({
|
|
|
53581
53581
|
function delay(timeInMs, options) {
|
|
53582
53582
|
let token;
|
|
53583
53583
|
const { abortSignal, abortErrorMsg } = options ?? {};
|
|
53584
|
-
return (0, createAbortablePromise_js_1.createAbortablePromise)((
|
|
53585
|
-
token = setTimeout(
|
|
53584
|
+
return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve14) => {
|
|
53585
|
+
token = setTimeout(resolve14, timeInMs);
|
|
53586
53586
|
}, {
|
|
53587
53587
|
cleanupBeforeAbort: () => clearTimeout(token),
|
|
53588
53588
|
abortSignal,
|
|
@@ -55417,9 +55417,9 @@ var require_nodeHttpClient = __commonJS({
|
|
|
55417
55417
|
if (stream4.readable === false) {
|
|
55418
55418
|
return Promise.resolve();
|
|
55419
55419
|
}
|
|
55420
|
-
return new Promise((
|
|
55420
|
+
return new Promise((resolve14) => {
|
|
55421
55421
|
const handler = () => {
|
|
55422
|
-
|
|
55422
|
+
resolve14();
|
|
55423
55423
|
stream4.removeListener("close", handler);
|
|
55424
55424
|
stream4.removeListener("end", handler);
|
|
55425
55425
|
stream4.removeListener("error", handler);
|
|
@@ -55574,8 +55574,8 @@ var require_nodeHttpClient = __commonJS({
|
|
|
55574
55574
|
headers: request.headers.toJSON({ preserveCase: true }),
|
|
55575
55575
|
...request.requestOverrides
|
|
55576
55576
|
};
|
|
55577
|
-
return new Promise((
|
|
55578
|
-
const req = isInsecure ? import_node_http.default.request(options,
|
|
55577
|
+
return new Promise((resolve14, reject) => {
|
|
55578
|
+
const req = isInsecure ? import_node_http.default.request(options, resolve14) : import_node_https.default.request(options, resolve14);
|
|
55579
55579
|
req.once("error", (err) => {
|
|
55580
55580
|
reject(
|
|
55581
55581
|
new import_restError.RestError(err.message, { code: err.code ?? import_restError.RestError.REQUEST_SEND_ERROR, request })
|
|
@@ -55663,7 +55663,7 @@ var require_nodeHttpClient = __commonJS({
|
|
|
55663
55663
|
return stream4;
|
|
55664
55664
|
}
|
|
55665
55665
|
function streamToText(stream4) {
|
|
55666
|
-
return new Promise((
|
|
55666
|
+
return new Promise((resolve14, reject) => {
|
|
55667
55667
|
const buffer = [];
|
|
55668
55668
|
stream4.on("data", (chunk) => {
|
|
55669
55669
|
if (Buffer.isBuffer(chunk)) {
|
|
@@ -55673,7 +55673,7 @@ var require_nodeHttpClient = __commonJS({
|
|
|
55673
55673
|
}
|
|
55674
55674
|
});
|
|
55675
55675
|
stream4.on("end", () => {
|
|
55676
|
-
|
|
55676
|
+
resolve14(Buffer.concat(buffer).toString("utf8"));
|
|
55677
55677
|
});
|
|
55678
55678
|
stream4.on("error", (e) => {
|
|
55679
55679
|
if (e && e?.name === "AbortError") {
|
|
@@ -56113,7 +56113,7 @@ var require_helpers = __commonJS({
|
|
|
56113
56113
|
var import_AbortError = require_AbortError2();
|
|
56114
56114
|
var StandardAbortMessage = "The operation was aborted.";
|
|
56115
56115
|
function delay(delayInMs, value, options) {
|
|
56116
|
-
return new Promise((
|
|
56116
|
+
return new Promise((resolve14, reject) => {
|
|
56117
56117
|
let timer = void 0;
|
|
56118
56118
|
let onAborted = void 0;
|
|
56119
56119
|
const rejectOnAbort = () => {
|
|
@@ -56138,7 +56138,7 @@ var require_helpers = __commonJS({
|
|
|
56138
56138
|
}
|
|
56139
56139
|
timer = setTimeout(() => {
|
|
56140
56140
|
removeListeners();
|
|
56141
|
-
|
|
56141
|
+
resolve14(value);
|
|
56142
56142
|
}, delayInMs);
|
|
56143
56143
|
if (options?.abortSignal) {
|
|
56144
56144
|
options.abortSignal.addEventListener("abort", onAborted);
|
|
@@ -56633,8 +56633,8 @@ var require_helpers2 = __commonJS({
|
|
|
56633
56633
|
function req(url3, opts = {}) {
|
|
56634
56634
|
const href = typeof url3 === "string" ? url3 : url3.href;
|
|
56635
56635
|
const req2 = (href.startsWith("https:") ? https3 : http3).request(url3, opts);
|
|
56636
|
-
const promise2 = new Promise((
|
|
56637
|
-
req2.once("response",
|
|
56636
|
+
const promise2 = new Promise((resolve14, reject) => {
|
|
56637
|
+
req2.once("response", resolve14).once("error", reject).end();
|
|
56638
56638
|
});
|
|
56639
56639
|
req2.then = promise2.then.bind(promise2);
|
|
56640
56640
|
return req2;
|
|
@@ -56811,7 +56811,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
56811
56811
|
var debug_1 = __importDefault2(require_src());
|
|
56812
56812
|
var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
56813
56813
|
function parseProxyResponse(socket) {
|
|
56814
|
-
return new Promise((
|
|
56814
|
+
return new Promise((resolve14, reject) => {
|
|
56815
56815
|
let buffersLength = 0;
|
|
56816
56816
|
const buffers = [];
|
|
56817
56817
|
function read() {
|
|
@@ -56877,7 +56877,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
56877
56877
|
}
|
|
56878
56878
|
debug("got proxy server response: %o %o", firstLine, headers);
|
|
56879
56879
|
cleanup();
|
|
56880
|
-
|
|
56880
|
+
resolve14({
|
|
56881
56881
|
connect: {
|
|
56882
56882
|
statusCode,
|
|
56883
56883
|
statusText,
|
|
@@ -58671,8 +58671,8 @@ var require_getClient = __commonJS({
|
|
|
58671
58671
|
}
|
|
58672
58672
|
const { allowInsecureConnection, httpClient } = clientOptions;
|
|
58673
58673
|
const endpointUrl = clientOptions.endpoint ?? endpoint;
|
|
58674
|
-
const client = (
|
|
58675
|
-
const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl,
|
|
58674
|
+
const client = (path17, ...args) => {
|
|
58675
|
+
const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path17, args, { allowInsecureConnection, ...requestOptions });
|
|
58676
58676
|
return {
|
|
58677
58677
|
get: (requestOptions = {}) => {
|
|
58678
58678
|
return buildOperation(
|
|
@@ -61577,15 +61577,15 @@ var require_urlHelpers2 = __commonJS({
|
|
|
61577
61577
|
let isAbsolutePath = false;
|
|
61578
61578
|
let requestUrl = replaceAll(baseUri, urlReplacements);
|
|
61579
61579
|
if (operationSpec.path) {
|
|
61580
|
-
let
|
|
61581
|
-
if (operationSpec.path === "/{nextLink}" &&
|
|
61582
|
-
|
|
61580
|
+
let path17 = replaceAll(operationSpec.path, urlReplacements);
|
|
61581
|
+
if (operationSpec.path === "/{nextLink}" && path17.startsWith("/")) {
|
|
61582
|
+
path17 = path17.substring(1);
|
|
61583
61583
|
}
|
|
61584
|
-
if (isAbsoluteUrl(
|
|
61585
|
-
requestUrl =
|
|
61584
|
+
if (isAbsoluteUrl(path17)) {
|
|
61585
|
+
requestUrl = path17;
|
|
61586
61586
|
isAbsolutePath = true;
|
|
61587
61587
|
} else {
|
|
61588
|
-
requestUrl = appendPath(requestUrl,
|
|
61588
|
+
requestUrl = appendPath(requestUrl, path17);
|
|
61589
61589
|
}
|
|
61590
61590
|
}
|
|
61591
61591
|
const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject);
|
|
@@ -61631,9 +61631,9 @@ var require_urlHelpers2 = __commonJS({
|
|
|
61631
61631
|
}
|
|
61632
61632
|
const searchStart = pathToAppend.indexOf("?");
|
|
61633
61633
|
if (searchStart !== -1) {
|
|
61634
|
-
const
|
|
61634
|
+
const path17 = pathToAppend.substring(0, searchStart);
|
|
61635
61635
|
const search = pathToAppend.substring(searchStart + 1);
|
|
61636
|
-
newPath = newPath +
|
|
61636
|
+
newPath = newPath + path17;
|
|
61637
61637
|
if (search) {
|
|
61638
61638
|
parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search;
|
|
61639
61639
|
}
|
|
@@ -63108,14 +63108,14 @@ var init_open = __esm({
|
|
|
63108
63108
|
}
|
|
63109
63109
|
const subprocess = import_node_child_process5.default.spawn(command, cliArguments, childProcessOptions);
|
|
63110
63110
|
if (options.wait) {
|
|
63111
|
-
return new Promise((
|
|
63111
|
+
return new Promise((resolve14, reject) => {
|
|
63112
63112
|
subprocess.once("error", reject);
|
|
63113
63113
|
subprocess.once("close", (exitCode) => {
|
|
63114
63114
|
if (!options.allowNonzeroExitCode && exitCode > 0) {
|
|
63115
63115
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
63116
63116
|
return;
|
|
63117
63117
|
}
|
|
63118
|
-
|
|
63118
|
+
resolve14(subprocess);
|
|
63119
63119
|
});
|
|
63120
63120
|
});
|
|
63121
63121
|
}
|
|
@@ -64607,7 +64607,7 @@ var require_azureDeveloperCliCredential = __commonJS({
|
|
|
64607
64607
|
const encodedClaims = btoa(claims);
|
|
64608
64608
|
claimsSections = ["--claims", encodedClaims];
|
|
64609
64609
|
}
|
|
64610
|
-
return new Promise((
|
|
64610
|
+
return new Promise((resolve14, reject) => {
|
|
64611
64611
|
try {
|
|
64612
64612
|
const args = [
|
|
64613
64613
|
"auth",
|
|
@@ -64624,7 +64624,7 @@ var require_azureDeveloperCliCredential = __commonJS({
|
|
|
64624
64624
|
cwd: exports2.developerCliCredentialInternals.getSafeWorkingDir(),
|
|
64625
64625
|
timeout
|
|
64626
64626
|
}, (error2, stdout, stderr) => {
|
|
64627
|
-
|
|
64627
|
+
resolve14({ stdout, stderr, error: error2 });
|
|
64628
64628
|
});
|
|
64629
64629
|
} catch (err) {
|
|
64630
64630
|
reject(err);
|
|
@@ -64793,7 +64793,7 @@ var require_azureCliCredential = __commonJS({
|
|
|
64793
64793
|
if (subscription) {
|
|
64794
64794
|
subscriptionSection = ["--subscription", `"${subscription}"`];
|
|
64795
64795
|
}
|
|
64796
|
-
return new Promise((
|
|
64796
|
+
return new Promise((resolve14, reject) => {
|
|
64797
64797
|
try {
|
|
64798
64798
|
const args = [
|
|
64799
64799
|
"account",
|
|
@@ -64807,7 +64807,7 @@ var require_azureCliCredential = __commonJS({
|
|
|
64807
64807
|
];
|
|
64808
64808
|
const command = ["az", ...args].join(" ");
|
|
64809
64809
|
child_process_1.default.exec(command, { cwd: exports2.cliCredentialInternals.getSafeWorkingDir(), timeout }, (error2, stdout, stderr) => {
|
|
64810
|
-
|
|
64810
|
+
resolve14({ stdout, stderr, error: error2 });
|
|
64811
64811
|
});
|
|
64812
64812
|
} catch (err) {
|
|
64813
64813
|
reject(err);
|
|
@@ -64957,7 +64957,7 @@ var require_processUtils = __commonJS({
|
|
|
64957
64957
|
* @internal
|
|
64958
64958
|
*/
|
|
64959
64959
|
execFile(file2, params, options) {
|
|
64960
|
-
return new Promise((
|
|
64960
|
+
return new Promise((resolve14, reject) => {
|
|
64961
64961
|
node_child_process_1.default.execFile(file2, params, options, (error2, stdout, stderr) => {
|
|
64962
64962
|
if (Buffer.isBuffer(stdout)) {
|
|
64963
64963
|
stdout = stdout.toString("utf8");
|
|
@@ -64968,7 +64968,7 @@ var require_processUtils = __commonJS({
|
|
|
64968
64968
|
if (stderr || error2) {
|
|
64969
64969
|
reject(stderr ? new Error(stderr) : error2);
|
|
64970
64970
|
} else {
|
|
64971
|
-
|
|
64971
|
+
resolve14(stdout);
|
|
64972
64972
|
}
|
|
64973
64973
|
});
|
|
64974
64974
|
});
|
|
@@ -66646,7 +66646,7 @@ var require_sender = __commonJS({
|
|
|
66646
66646
|
}
|
|
66647
66647
|
async function sendInParallel(addresses, port, request, signal) {
|
|
66648
66648
|
signal.throwIfAborted();
|
|
66649
|
-
return await new Promise((
|
|
66649
|
+
return await new Promise((resolve14, reject) => {
|
|
66650
66650
|
const sockets = [];
|
|
66651
66651
|
let errorCount = 0;
|
|
66652
66652
|
const onError = (err) => {
|
|
@@ -66660,7 +66660,7 @@ var require_sender = __commonJS({
|
|
|
66660
66660
|
const onMessage = (message) => {
|
|
66661
66661
|
signal.removeEventListener("abort", onAbort);
|
|
66662
66662
|
clearSockets();
|
|
66663
|
-
|
|
66663
|
+
resolve14(message);
|
|
66664
66664
|
};
|
|
66665
66665
|
const onAbort = () => {
|
|
66666
66666
|
clearSockets();
|
|
@@ -66695,7 +66695,7 @@ var require_sender = __commonJS({
|
|
|
66695
66695
|
family: _net.default.isIPv6(host) ? 6 : 4
|
|
66696
66696
|
}];
|
|
66697
66697
|
} else {
|
|
66698
|
-
addresses = await new Promise((
|
|
66698
|
+
addresses = await new Promise((resolve14, reject) => {
|
|
66699
66699
|
const onAbort = () => {
|
|
66700
66700
|
reject(signal.reason);
|
|
66701
66701
|
};
|
|
@@ -66704,7 +66704,7 @@ var require_sender = __commonJS({
|
|
|
66704
66704
|
all: true
|
|
66705
66705
|
}, (err, addresses2) => {
|
|
66706
66706
|
signal.removeEventListener("abort", onAbort);
|
|
66707
|
-
err ? reject(err) :
|
|
66707
|
+
err ? reject(err) : resolve14(addresses2);
|
|
66708
66708
|
});
|
|
66709
66709
|
});
|
|
66710
66710
|
}
|
|
@@ -70179,25 +70179,25 @@ var require_util2 = __commonJS({
|
|
|
70179
70179
|
};
|
|
70180
70180
|
},
|
|
70181
70181
|
createDeferredPromise: function() {
|
|
70182
|
-
let
|
|
70182
|
+
let resolve14;
|
|
70183
70183
|
let reject;
|
|
70184
70184
|
const promise2 = new Promise((res, rej) => {
|
|
70185
|
-
|
|
70185
|
+
resolve14 = res;
|
|
70186
70186
|
reject = rej;
|
|
70187
70187
|
});
|
|
70188
70188
|
return {
|
|
70189
70189
|
promise: promise2,
|
|
70190
|
-
resolve:
|
|
70190
|
+
resolve: resolve14,
|
|
70191
70191
|
reject
|
|
70192
70192
|
};
|
|
70193
70193
|
},
|
|
70194
70194
|
promisify(fn) {
|
|
70195
|
-
return new Promise((
|
|
70195
|
+
return new Promise((resolve14, reject) => {
|
|
70196
70196
|
fn((err, ...args) => {
|
|
70197
70197
|
if (err) {
|
|
70198
70198
|
return reject(err);
|
|
70199
70199
|
}
|
|
70200
|
-
return
|
|
70200
|
+
return resolve14(...args);
|
|
70201
70201
|
});
|
|
70202
70202
|
});
|
|
70203
70203
|
},
|
|
@@ -70988,7 +70988,7 @@ var require_end_of_stream = __commonJS({
|
|
|
70988
70988
|
validateBoolean(opts.cleanup, "cleanup");
|
|
70989
70989
|
autoCleanup = opts.cleanup;
|
|
70990
70990
|
}
|
|
70991
|
-
return new Promise2((
|
|
70991
|
+
return new Promise2((resolve14, reject) => {
|
|
70992
70992
|
const cleanup = eos(stream4, opts, (err) => {
|
|
70993
70993
|
if (autoCleanup) {
|
|
70994
70994
|
cleanup();
|
|
@@ -70996,7 +70996,7 @@ var require_end_of_stream = __commonJS({
|
|
|
70996
70996
|
if (err) {
|
|
70997
70997
|
reject(err);
|
|
70998
70998
|
} else {
|
|
70999
|
-
|
|
70999
|
+
resolve14();
|
|
71000
71000
|
}
|
|
71001
71001
|
});
|
|
71002
71002
|
});
|
|
@@ -72162,7 +72162,7 @@ var require_readable = __commonJS({
|
|
|
72162
72162
|
error2 = this.readableEnded ? null : new AbortError2();
|
|
72163
72163
|
this.destroy(error2);
|
|
72164
72164
|
}
|
|
72165
|
-
return new Promise2((
|
|
72165
|
+
return new Promise2((resolve14, reject) => eos(this, (err) => err && err !== error2 ? reject(err) : resolve14(null)));
|
|
72166
72166
|
};
|
|
72167
72167
|
Readable2.prototype.push = function(chunk, encoding) {
|
|
72168
72168
|
return readableAddChunk(this, chunk, encoding, false);
|
|
@@ -72706,12 +72706,12 @@ var require_readable = __commonJS({
|
|
|
72706
72706
|
}
|
|
72707
72707
|
async function* createAsyncIterator(stream4, options) {
|
|
72708
72708
|
let callback = nop;
|
|
72709
|
-
function next(
|
|
72709
|
+
function next(resolve14) {
|
|
72710
72710
|
if (this === stream4) {
|
|
72711
72711
|
callback();
|
|
72712
72712
|
callback = nop;
|
|
72713
72713
|
} else {
|
|
72714
|
-
callback =
|
|
72714
|
+
callback = resolve14;
|
|
72715
72715
|
}
|
|
72716
72716
|
}
|
|
72717
72717
|
stream4.on("readable", next);
|
|
@@ -73763,7 +73763,7 @@ var require_duplexify = __commonJS({
|
|
|
73763
73763
|
);
|
|
73764
73764
|
};
|
|
73765
73765
|
function fromAsyncGen(fn) {
|
|
73766
|
-
let { promise: promise2, resolve:
|
|
73766
|
+
let { promise: promise2, resolve: resolve14 } = createDeferredPromise();
|
|
73767
73767
|
const ac = new AbortController2();
|
|
73768
73768
|
const signal = ac.signal;
|
|
73769
73769
|
const value = fn(
|
|
@@ -73778,7 +73778,7 @@ var require_duplexify = __commonJS({
|
|
|
73778
73778
|
throw new AbortError2(void 0, {
|
|
73779
73779
|
cause: signal.reason
|
|
73780
73780
|
});
|
|
73781
|
-
({ promise: promise2, resolve:
|
|
73781
|
+
({ promise: promise2, resolve: resolve14 } = createDeferredPromise());
|
|
73782
73782
|
yield chunk;
|
|
73783
73783
|
}
|
|
73784
73784
|
})(),
|
|
@@ -73789,8 +73789,8 @@ var require_duplexify = __commonJS({
|
|
|
73789
73789
|
return {
|
|
73790
73790
|
value,
|
|
73791
73791
|
write(chunk, encoding, cb) {
|
|
73792
|
-
const _resolve =
|
|
73793
|
-
|
|
73792
|
+
const _resolve = resolve14;
|
|
73793
|
+
resolve14 = null;
|
|
73794
73794
|
_resolve({
|
|
73795
73795
|
chunk,
|
|
73796
73796
|
done: false,
|
|
@@ -73798,8 +73798,8 @@ var require_duplexify = __commonJS({
|
|
|
73798
73798
|
});
|
|
73799
73799
|
},
|
|
73800
73800
|
final(cb) {
|
|
73801
|
-
const _resolve =
|
|
73802
|
-
|
|
73801
|
+
const _resolve = resolve14;
|
|
73802
|
+
resolve14 = null;
|
|
73803
73803
|
_resolve({
|
|
73804
73804
|
done: true,
|
|
73805
73805
|
cb
|
|
@@ -74250,7 +74250,7 @@ var require_pipeline4 = __commonJS({
|
|
|
74250
74250
|
callback();
|
|
74251
74251
|
}
|
|
74252
74252
|
};
|
|
74253
|
-
const wait = () => new Promise2((
|
|
74253
|
+
const wait = () => new Promise2((resolve14, reject) => {
|
|
74254
74254
|
if (error2) {
|
|
74255
74255
|
reject(error2);
|
|
74256
74256
|
} else {
|
|
@@ -74258,7 +74258,7 @@ var require_pipeline4 = __commonJS({
|
|
|
74258
74258
|
if (error2) {
|
|
74259
74259
|
reject(error2);
|
|
74260
74260
|
} else {
|
|
74261
|
-
|
|
74261
|
+
resolve14();
|
|
74262
74262
|
}
|
|
74263
74263
|
};
|
|
74264
74264
|
}
|
|
@@ -74902,8 +74902,8 @@ var require_operators = __commonJS({
|
|
|
74902
74902
|
next = null;
|
|
74903
74903
|
}
|
|
74904
74904
|
if (!done && (queue.length >= highWaterMark || cnt >= concurrency)) {
|
|
74905
|
-
await new Promise2((
|
|
74906
|
-
resume =
|
|
74905
|
+
await new Promise2((resolve14) => {
|
|
74906
|
+
resume = resolve14;
|
|
74907
74907
|
});
|
|
74908
74908
|
}
|
|
74909
74909
|
}
|
|
@@ -74937,8 +74937,8 @@ var require_operators = __commonJS({
|
|
|
74937
74937
|
queue.shift();
|
|
74938
74938
|
maybeResume();
|
|
74939
74939
|
}
|
|
74940
|
-
await new Promise2((
|
|
74941
|
-
next =
|
|
74940
|
+
await new Promise2((resolve14) => {
|
|
74941
|
+
next = resolve14;
|
|
74942
74942
|
});
|
|
74943
74943
|
}
|
|
74944
74944
|
} finally {
|
|
@@ -75196,7 +75196,7 @@ var require_promises = __commonJS({
|
|
|
75196
75196
|
var { finished } = require_end_of_stream();
|
|
75197
75197
|
require_stream2();
|
|
75198
75198
|
function pipeline(...streams) {
|
|
75199
|
-
return new Promise2((
|
|
75199
|
+
return new Promise2((resolve14, reject) => {
|
|
75200
75200
|
let signal;
|
|
75201
75201
|
let end;
|
|
75202
75202
|
const lastArg = streams[streams.length - 1];
|
|
@@ -75211,7 +75211,7 @@ var require_promises = __commonJS({
|
|
|
75211
75211
|
if (err) {
|
|
75212
75212
|
reject(err);
|
|
75213
75213
|
} else {
|
|
75214
|
-
|
|
75214
|
+
resolve14(value);
|
|
75215
75215
|
}
|
|
75216
75216
|
},
|
|
75217
75217
|
{
|
|
@@ -76078,7 +76078,7 @@ var require_message_io = __commonJS({
|
|
|
76078
76078
|
credentialsDetails.maxVersion = "TLSv1.2";
|
|
76079
76079
|
}
|
|
76080
76080
|
const secureContext = tls.createSecureContext(credentialsDetails);
|
|
76081
|
-
return new Promise((
|
|
76081
|
+
return new Promise((resolve14, reject) => {
|
|
76082
76082
|
const duplexpair = new _nativeDuplexpair.default();
|
|
76083
76083
|
const securePair = this.securePair = {
|
|
76084
76084
|
cleartext: tls.connect({
|
|
@@ -76109,7 +76109,7 @@ var require_message_io = __commonJS({
|
|
|
76109
76109
|
securePair.cleartext.pipe(this.incomingMessageStream);
|
|
76110
76110
|
this.outgoingMessageStream.pipe(securePair.cleartext);
|
|
76111
76111
|
this.tlsNegotiationComplete = true;
|
|
76112
|
-
|
|
76112
|
+
resolve14();
|
|
76113
76113
|
};
|
|
76114
76114
|
const onError = (err) => {
|
|
76115
76115
|
securePair.encrypted.removeListener("readable", onReadable);
|
|
@@ -79604,7 +79604,7 @@ var require_js_joda = __commonJS({
|
|
|
79604
79604
|
this.fieldValues.put(field, value);
|
|
79605
79605
|
return this;
|
|
79606
79606
|
};
|
|
79607
|
-
_proto.resolve = function
|
|
79607
|
+
_proto.resolve = function resolve14(resolverStyle, resolverFields) {
|
|
79608
79608
|
if (resolverFields != null) {
|
|
79609
79609
|
this.fieldValues.retainAll(resolverFields);
|
|
79610
79610
|
}
|
|
@@ -80208,7 +80208,7 @@ var require_js_joda = __commonJS({
|
|
|
80208
80208
|
_proto.displayName = function displayName() {
|
|
80209
80209
|
return this.toString();
|
|
80210
80210
|
};
|
|
80211
|
-
_proto.resolve = function
|
|
80211
|
+
_proto.resolve = function resolve14() {
|
|
80212
80212
|
return null;
|
|
80213
80213
|
};
|
|
80214
80214
|
_proto.name = function name() {
|
|
@@ -80266,7 +80266,7 @@ var require_js_joda = __commonJS({
|
|
|
80266
80266
|
this.range().checkValidValue(newValue, this);
|
|
80267
80267
|
return temporal.with(ChronoField.DAY_OF_YEAR, temporal.getLong(ChronoField.DAY_OF_YEAR) + (newValue - curValue));
|
|
80268
80268
|
};
|
|
80269
|
-
_proto2.resolve = function
|
|
80269
|
+
_proto2.resolve = function resolve14(fieldValues, partialTemporal, resolverStyle) {
|
|
80270
80270
|
var yearLong = fieldValues.get(ChronoField.YEAR);
|
|
80271
80271
|
var qoyLong = fieldValues.get(QUARTER_OF_YEAR);
|
|
80272
80272
|
if (yearLong == null || qoyLong == null) {
|
|
@@ -80377,7 +80377,7 @@ var require_js_joda = __commonJS({
|
|
|
80377
80377
|
this.range().checkValidValue(newValue, this);
|
|
80378
80378
|
return temporal.plus(MathUtil.safeSubtract(newValue, this.getFrom(temporal)), ChronoUnit.WEEKS);
|
|
80379
80379
|
};
|
|
80380
|
-
_proto4.resolve = function
|
|
80380
|
+
_proto4.resolve = function resolve14(fieldValues, partialTemporal, resolverStyle) {
|
|
80381
80381
|
var wbyLong = fieldValues.get(WEEK_BASED_YEAR);
|
|
80382
80382
|
var dowLong = fieldValues.get(ChronoField.DAY_OF_WEEK);
|
|
80383
80383
|
if (wbyLong == null || dowLong == null) {
|
|
@@ -96449,7 +96449,7 @@ var require_connector = __commonJS({
|
|
|
96449
96449
|
async function connectInParallel(options, lookup, signal) {
|
|
96450
96450
|
signal.throwIfAborted();
|
|
96451
96451
|
const addresses = await lookupAllAddresses(options.host, lookup, signal);
|
|
96452
|
-
return await new Promise((
|
|
96452
|
+
return await new Promise((resolve14, reject) => {
|
|
96453
96453
|
const sockets = new Array(addresses.length);
|
|
96454
96454
|
const errors = [];
|
|
96455
96455
|
function onError(err) {
|
|
@@ -96473,7 +96473,7 @@ var require_connector = __commonJS({
|
|
|
96473
96473
|
socket.removeListener("connect", onConnect);
|
|
96474
96474
|
socket.destroy();
|
|
96475
96475
|
}
|
|
96476
|
-
|
|
96476
|
+
resolve14(this);
|
|
96477
96477
|
}
|
|
96478
96478
|
const onAbort = () => {
|
|
96479
96479
|
for (let j = 0; j < sockets.length; j++) {
|
|
@@ -96504,7 +96504,7 @@ var require_connector = __commonJS({
|
|
|
96504
96504
|
const addresses = await lookupAllAddresses(options.host, lookup, signal);
|
|
96505
96505
|
for (const address of addresses) {
|
|
96506
96506
|
try {
|
|
96507
|
-
return await new Promise((
|
|
96507
|
+
return await new Promise((resolve14, reject) => {
|
|
96508
96508
|
const socket = _net.default.connect({
|
|
96509
96509
|
...options,
|
|
96510
96510
|
host: address.address,
|
|
@@ -96527,7 +96527,7 @@ var require_connector = __commonJS({
|
|
|
96527
96527
|
signal.removeEventListener("abort", onAbort);
|
|
96528
96528
|
socket.removeListener("error", onError);
|
|
96529
96529
|
socket.removeListener("connect", onConnect);
|
|
96530
|
-
|
|
96530
|
+
resolve14(socket);
|
|
96531
96531
|
};
|
|
96532
96532
|
signal.addEventListener("abort", onAbort, {
|
|
96533
96533
|
once: true
|
|
@@ -96556,7 +96556,7 @@ var require_connector = __commonJS({
|
|
|
96556
96556
|
family: 4
|
|
96557
96557
|
}];
|
|
96558
96558
|
} else {
|
|
96559
|
-
return await new Promise((
|
|
96559
|
+
return await new Promise((resolve14, reject) => {
|
|
96560
96560
|
const onAbort = () => {
|
|
96561
96561
|
reject(signal.reason);
|
|
96562
96562
|
};
|
|
@@ -96566,7 +96566,7 @@ var require_connector = __commonJS({
|
|
|
96566
96566
|
all: true
|
|
96567
96567
|
}, (err, addresses) => {
|
|
96568
96568
|
signal.removeEventListener("abort", onAbort);
|
|
96569
|
-
err ? reject(err) :
|
|
96569
|
+
err ? reject(err) : resolve14(addresses);
|
|
96570
96570
|
});
|
|
96571
96571
|
});
|
|
96572
96572
|
}
|
|
@@ -97352,15 +97352,15 @@ var require_connection2 = __commonJS({
|
|
|
97352
97352
|
var DEFAULT_LANGUAGE = "us_english";
|
|
97353
97353
|
var DEFAULT_DATEFORMAT = "mdy";
|
|
97354
97354
|
function withResolvers() {
|
|
97355
|
-
let
|
|
97355
|
+
let resolve14;
|
|
97356
97356
|
let reject;
|
|
97357
97357
|
const promise2 = new Promise((res, rej) => {
|
|
97358
|
-
|
|
97358
|
+
resolve14 = res;
|
|
97359
97359
|
reject = rej;
|
|
97360
97360
|
});
|
|
97361
97361
|
return {
|
|
97362
97362
|
promise: promise2,
|
|
97363
|
-
resolve:
|
|
97363
|
+
resolve: resolve14,
|
|
97364
97364
|
reject
|
|
97365
97365
|
};
|
|
97366
97366
|
}
|
|
@@ -98351,7 +98351,7 @@ var require_connection2 = __commonJS({
|
|
|
98351
98351
|
};
|
|
98352
98352
|
const {
|
|
98353
98353
|
promise: promise2,
|
|
98354
|
-
resolve:
|
|
98354
|
+
resolve: resolve14,
|
|
98355
98355
|
reject
|
|
98356
98356
|
} = withResolvers();
|
|
98357
98357
|
const encryptsocket = tls.connect(encryptOptions);
|
|
@@ -98365,7 +98365,7 @@ var require_connection2 = __commonJS({
|
|
|
98365
98365
|
try {
|
|
98366
98366
|
const onError = reject;
|
|
98367
98367
|
const onConnect = () => {
|
|
98368
|
-
|
|
98368
|
+
resolve14(encryptsocket);
|
|
98369
98369
|
};
|
|
98370
98370
|
encryptsocket.once("error", onError);
|
|
98371
98371
|
encryptsocket.once("secureConnect", onConnect);
|
|
@@ -99408,9 +99408,9 @@ var require_connection2 = __commonJS({
|
|
|
99408
99408
|
this.debug.log("Retry after transient failure connecting to " + server + ":" + port);
|
|
99409
99409
|
const {
|
|
99410
99410
|
promise: promise2,
|
|
99411
|
-
resolve:
|
|
99411
|
+
resolve: resolve14
|
|
99412
99412
|
} = withResolvers();
|
|
99413
|
-
setTimeout(
|
|
99413
|
+
setTimeout(resolve14, this.config.options.connectionRetryInterval);
|
|
99414
99414
|
await promise2;
|
|
99415
99415
|
this.emit("retry");
|
|
99416
99416
|
this.transitionTo(this.STATE.CONNECTING);
|
|
@@ -99920,15 +99920,15 @@ var require_connection_pool2 = __commonJS({
|
|
|
99920
99920
|
return cfg;
|
|
99921
99921
|
}
|
|
99922
99922
|
_poolCreate() {
|
|
99923
|
-
return new shared.Promise((
|
|
99923
|
+
return new shared.Promise((resolve14, reject) => {
|
|
99924
99924
|
const resolveOnce = (v) => {
|
|
99925
|
-
|
|
99926
|
-
|
|
99925
|
+
resolve14(v);
|
|
99926
|
+
resolve14 = reject = () => {
|
|
99927
99927
|
};
|
|
99928
99928
|
};
|
|
99929
99929
|
const rejectOnce = (e) => {
|
|
99930
99930
|
reject(e);
|
|
99931
|
-
|
|
99931
|
+
resolve14 = reject = () => {
|
|
99932
99932
|
};
|
|
99933
99933
|
};
|
|
99934
99934
|
let tedious;
|
|
@@ -99972,9 +99972,9 @@ var require_connection_pool2 = __commonJS({
|
|
|
99972
99972
|
}
|
|
99973
99973
|
_poolValidate(tedious) {
|
|
99974
99974
|
if (tedious && !tedious.closed && !tedious.hasError) {
|
|
99975
|
-
return !this.config.validateConnection || new shared.Promise((
|
|
99975
|
+
return !this.config.validateConnection || new shared.Promise((resolve14) => {
|
|
99976
99976
|
const req = new tds.Request("SELECT 1;", (err) => {
|
|
99977
|
-
|
|
99977
|
+
resolve14(!err);
|
|
99978
99978
|
});
|
|
99979
99979
|
tedious.execSql(req);
|
|
99980
99980
|
});
|
|
@@ -99982,19 +99982,19 @@ var require_connection_pool2 = __commonJS({
|
|
|
99982
99982
|
return false;
|
|
99983
99983
|
}
|
|
99984
99984
|
_poolDestroy(tedious) {
|
|
99985
|
-
return new shared.Promise((
|
|
99985
|
+
return new shared.Promise((resolve14, reject) => {
|
|
99986
99986
|
if (!tedious) {
|
|
99987
|
-
|
|
99987
|
+
resolve14();
|
|
99988
99988
|
return;
|
|
99989
99989
|
}
|
|
99990
99990
|
debug("connection(%d): destroying", IDS.get(tedious));
|
|
99991
99991
|
if (tedious.closed) {
|
|
99992
99992
|
debug("connection(%d): already closed", IDS.get(tedious));
|
|
99993
|
-
|
|
99993
|
+
resolve14();
|
|
99994
99994
|
} else {
|
|
99995
99995
|
tedious.once("end", () => {
|
|
99996
99996
|
debug("connection(%d): destroyed", IDS.get(tedious));
|
|
99997
|
-
|
|
99997
|
+
resolve14();
|
|
99998
99998
|
});
|
|
99999
99999
|
tedious.close();
|
|
100000
100000
|
}
|
|
@@ -101542,12 +101542,12 @@ var require_dist5 = __commonJS({
|
|
|
101542
101542
|
throw new Error(`Unknown format "${name}"`);
|
|
101543
101543
|
return f;
|
|
101544
101544
|
};
|
|
101545
|
-
function addFormats(ajv2, list,
|
|
101545
|
+
function addFormats(ajv2, list, fs21, exportName) {
|
|
101546
101546
|
var _a2;
|
|
101547
101547
|
var _b;
|
|
101548
101548
|
(_a2 = (_b = ajv2.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
101549
101549
|
for (const f of list)
|
|
101550
|
-
ajv2.addFormat(f,
|
|
101550
|
+
ajv2.addFormat(f, fs21[f]);
|
|
101551
101551
|
}
|
|
101552
101552
|
module2.exports = exports2 = formatsPlugin;
|
|
101553
101553
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -101560,8 +101560,8 @@ var require_windows = __commonJS({
|
|
|
101560
101560
|
"node_modules/isexe/windows.js"(exports2, module2) {
|
|
101561
101561
|
module2.exports = isexe;
|
|
101562
101562
|
isexe.sync = sync;
|
|
101563
|
-
var
|
|
101564
|
-
function checkPathExt(
|
|
101563
|
+
var fs21 = require("fs");
|
|
101564
|
+
function checkPathExt(path17, options) {
|
|
101565
101565
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
101566
101566
|
if (!pathext) {
|
|
101567
101567
|
return true;
|
|
@@ -101572,25 +101572,25 @@ var require_windows = __commonJS({
|
|
|
101572
101572
|
}
|
|
101573
101573
|
for (var i = 0; i < pathext.length; i++) {
|
|
101574
101574
|
var p = pathext[i].toLowerCase();
|
|
101575
|
-
if (p &&
|
|
101575
|
+
if (p && path17.substr(-p.length).toLowerCase() === p) {
|
|
101576
101576
|
return true;
|
|
101577
101577
|
}
|
|
101578
101578
|
}
|
|
101579
101579
|
return false;
|
|
101580
101580
|
}
|
|
101581
|
-
function checkStat(stat,
|
|
101581
|
+
function checkStat(stat, path17, options) {
|
|
101582
101582
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
101583
101583
|
return false;
|
|
101584
101584
|
}
|
|
101585
|
-
return checkPathExt(
|
|
101585
|
+
return checkPathExt(path17, options);
|
|
101586
101586
|
}
|
|
101587
|
-
function isexe(
|
|
101588
|
-
|
|
101589
|
-
cb(er, er ? false : checkStat(stat,
|
|
101587
|
+
function isexe(path17, options, cb) {
|
|
101588
|
+
fs21.stat(path17, function(er, stat) {
|
|
101589
|
+
cb(er, er ? false : checkStat(stat, path17, options));
|
|
101590
101590
|
});
|
|
101591
101591
|
}
|
|
101592
|
-
function sync(
|
|
101593
|
-
return checkStat(
|
|
101592
|
+
function sync(path17, options) {
|
|
101593
|
+
return checkStat(fs21.statSync(path17), path17, options);
|
|
101594
101594
|
}
|
|
101595
101595
|
}
|
|
101596
101596
|
});
|
|
@@ -101600,14 +101600,14 @@ var require_mode = __commonJS({
|
|
|
101600
101600
|
"node_modules/isexe/mode.js"(exports2, module2) {
|
|
101601
101601
|
module2.exports = isexe;
|
|
101602
101602
|
isexe.sync = sync;
|
|
101603
|
-
var
|
|
101604
|
-
function isexe(
|
|
101605
|
-
|
|
101603
|
+
var fs21 = require("fs");
|
|
101604
|
+
function isexe(path17, options, cb) {
|
|
101605
|
+
fs21.stat(path17, function(er, stat) {
|
|
101606
101606
|
cb(er, er ? false : checkStat(stat, options));
|
|
101607
101607
|
});
|
|
101608
101608
|
}
|
|
101609
|
-
function sync(
|
|
101610
|
-
return checkStat(
|
|
101609
|
+
function sync(path17, options) {
|
|
101610
|
+
return checkStat(fs21.statSync(path17), options);
|
|
101611
101611
|
}
|
|
101612
101612
|
function checkStat(stat, options) {
|
|
101613
101613
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -101631,7 +101631,7 @@ var require_mode = __commonJS({
|
|
|
101631
101631
|
// node_modules/isexe/index.js
|
|
101632
101632
|
var require_isexe = __commonJS({
|
|
101633
101633
|
"node_modules/isexe/index.js"(exports2, module2) {
|
|
101634
|
-
var
|
|
101634
|
+
var fs21 = require("fs");
|
|
101635
101635
|
var core;
|
|
101636
101636
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
101637
101637
|
core = require_windows();
|
|
@@ -101640,7 +101640,7 @@ var require_isexe = __commonJS({
|
|
|
101640
101640
|
}
|
|
101641
101641
|
module2.exports = isexe;
|
|
101642
101642
|
isexe.sync = sync;
|
|
101643
|
-
function isexe(
|
|
101643
|
+
function isexe(path17, options, cb) {
|
|
101644
101644
|
if (typeof options === "function") {
|
|
101645
101645
|
cb = options;
|
|
101646
101646
|
options = {};
|
|
@@ -101649,17 +101649,17 @@ var require_isexe = __commonJS({
|
|
|
101649
101649
|
if (typeof Promise !== "function") {
|
|
101650
101650
|
throw new TypeError("callback not provided");
|
|
101651
101651
|
}
|
|
101652
|
-
return new Promise(function(
|
|
101653
|
-
isexe(
|
|
101652
|
+
return new Promise(function(resolve14, reject) {
|
|
101653
|
+
isexe(path17, options || {}, function(er, is) {
|
|
101654
101654
|
if (er) {
|
|
101655
101655
|
reject(er);
|
|
101656
101656
|
} else {
|
|
101657
|
-
|
|
101657
|
+
resolve14(is);
|
|
101658
101658
|
}
|
|
101659
101659
|
});
|
|
101660
101660
|
});
|
|
101661
101661
|
}
|
|
101662
|
-
core(
|
|
101662
|
+
core(path17, options || {}, function(er, is) {
|
|
101663
101663
|
if (er) {
|
|
101664
101664
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
101665
101665
|
er = null;
|
|
@@ -101669,9 +101669,9 @@ var require_isexe = __commonJS({
|
|
|
101669
101669
|
cb(er, is);
|
|
101670
101670
|
});
|
|
101671
101671
|
}
|
|
101672
|
-
function sync(
|
|
101672
|
+
function sync(path17, options) {
|
|
101673
101673
|
try {
|
|
101674
|
-
return core.sync(
|
|
101674
|
+
return core.sync(path17, options || {});
|
|
101675
101675
|
} catch (er) {
|
|
101676
101676
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
101677
101677
|
return false;
|
|
@@ -101687,7 +101687,7 @@ var require_isexe = __commonJS({
|
|
|
101687
101687
|
var require_which = __commonJS({
|
|
101688
101688
|
"node_modules/which/which.js"(exports2, module2) {
|
|
101689
101689
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
101690
|
-
var
|
|
101690
|
+
var path17 = require("path");
|
|
101691
101691
|
var COLON = isWindows ? ";" : ":";
|
|
101692
101692
|
var isexe = require_isexe();
|
|
101693
101693
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -101720,27 +101720,27 @@ var require_which = __commonJS({
|
|
|
101720
101720
|
opt = {};
|
|
101721
101721
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
101722
101722
|
const found = [];
|
|
101723
|
-
const step = (i) => new Promise((
|
|
101723
|
+
const step = (i) => new Promise((resolve14, reject) => {
|
|
101724
101724
|
if (i === pathEnv.length)
|
|
101725
|
-
return opt.all && found.length ?
|
|
101725
|
+
return opt.all && found.length ? resolve14(found) : reject(getNotFoundError(cmd));
|
|
101726
101726
|
const ppRaw = pathEnv[i];
|
|
101727
101727
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
101728
|
-
const pCmd =
|
|
101728
|
+
const pCmd = path17.join(pathPart, cmd);
|
|
101729
101729
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
101730
|
-
|
|
101730
|
+
resolve14(subStep(p, i, 0));
|
|
101731
101731
|
});
|
|
101732
|
-
const subStep = (p, i, ii) => new Promise((
|
|
101732
|
+
const subStep = (p, i, ii) => new Promise((resolve14, reject) => {
|
|
101733
101733
|
if (ii === pathExt.length)
|
|
101734
|
-
return
|
|
101734
|
+
return resolve14(step(i + 1));
|
|
101735
101735
|
const ext = pathExt[ii];
|
|
101736
101736
|
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
101737
101737
|
if (!er && is) {
|
|
101738
101738
|
if (opt.all)
|
|
101739
101739
|
found.push(p + ext);
|
|
101740
101740
|
else
|
|
101741
|
-
return
|
|
101741
|
+
return resolve14(p + ext);
|
|
101742
101742
|
}
|
|
101743
|
-
return
|
|
101743
|
+
return resolve14(subStep(p, i, ii + 1));
|
|
101744
101744
|
});
|
|
101745
101745
|
});
|
|
101746
101746
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -101752,7 +101752,7 @@ var require_which = __commonJS({
|
|
|
101752
101752
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
101753
101753
|
const ppRaw = pathEnv[i];
|
|
101754
101754
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
101755
|
-
const pCmd =
|
|
101755
|
+
const pCmd = path17.join(pathPart, cmd);
|
|
101756
101756
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
101757
101757
|
for (let j = 0; j < pathExt.length; j++) {
|
|
101758
101758
|
const cur = p + pathExt[j];
|
|
@@ -101800,7 +101800,7 @@ var require_path_key = __commonJS({
|
|
|
101800
101800
|
var require_resolveCommand = __commonJS({
|
|
101801
101801
|
"node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
101802
101802
|
"use strict";
|
|
101803
|
-
var
|
|
101803
|
+
var path17 = require("path");
|
|
101804
101804
|
var which = require_which();
|
|
101805
101805
|
var getPathKey = require_path_key();
|
|
101806
101806
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -101818,7 +101818,7 @@ var require_resolveCommand = __commonJS({
|
|
|
101818
101818
|
try {
|
|
101819
101819
|
resolved = which.sync(parsed.command, {
|
|
101820
101820
|
path: env3[getPathKey({ env: env3 })],
|
|
101821
|
-
pathExt: withoutPathExt ?
|
|
101821
|
+
pathExt: withoutPathExt ? path17.delimiter : void 0
|
|
101822
101822
|
});
|
|
101823
101823
|
} catch (e) {
|
|
101824
101824
|
} finally {
|
|
@@ -101827,7 +101827,7 @@ var require_resolveCommand = __commonJS({
|
|
|
101827
101827
|
}
|
|
101828
101828
|
}
|
|
101829
101829
|
if (resolved) {
|
|
101830
|
-
resolved =
|
|
101830
|
+
resolved = path17.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
101831
101831
|
}
|
|
101832
101832
|
return resolved;
|
|
101833
101833
|
}
|
|
@@ -101881,8 +101881,8 @@ var require_shebang_command = __commonJS({
|
|
|
101881
101881
|
if (!match) {
|
|
101882
101882
|
return null;
|
|
101883
101883
|
}
|
|
101884
|
-
const [
|
|
101885
|
-
const binary =
|
|
101884
|
+
const [path17, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
101885
|
+
const binary = path17.split("/").pop();
|
|
101886
101886
|
if (binary === "env") {
|
|
101887
101887
|
return argument;
|
|
101888
101888
|
}
|
|
@@ -101895,16 +101895,16 @@ var require_shebang_command = __commonJS({
|
|
|
101895
101895
|
var require_readShebang = __commonJS({
|
|
101896
101896
|
"node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
101897
101897
|
"use strict";
|
|
101898
|
-
var
|
|
101898
|
+
var fs21 = require("fs");
|
|
101899
101899
|
var shebangCommand = require_shebang_command();
|
|
101900
101900
|
function readShebang(command) {
|
|
101901
101901
|
const size = 150;
|
|
101902
101902
|
const buffer = Buffer.alloc(size);
|
|
101903
101903
|
let fd;
|
|
101904
101904
|
try {
|
|
101905
|
-
fd =
|
|
101906
|
-
|
|
101907
|
-
|
|
101905
|
+
fd = fs21.openSync(command, "r");
|
|
101906
|
+
fs21.readSync(fd, buffer, 0, size, 0);
|
|
101907
|
+
fs21.closeSync(fd);
|
|
101908
101908
|
} catch (e) {
|
|
101909
101909
|
}
|
|
101910
101910
|
return shebangCommand(buffer.toString());
|
|
@@ -101917,7 +101917,7 @@ var require_readShebang = __commonJS({
|
|
|
101917
101917
|
var require_parse2 = __commonJS({
|
|
101918
101918
|
"node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
101919
101919
|
"use strict";
|
|
101920
|
-
var
|
|
101920
|
+
var path17 = require("path");
|
|
101921
101921
|
var resolveCommand = require_resolveCommand();
|
|
101922
101922
|
var escape2 = require_escape();
|
|
101923
101923
|
var readShebang = require_readShebang();
|
|
@@ -101942,7 +101942,7 @@ var require_parse2 = __commonJS({
|
|
|
101942
101942
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
101943
101943
|
if (parsed.options.forceShell || needsShell) {
|
|
101944
101944
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
101945
|
-
parsed.command =
|
|
101945
|
+
parsed.command = path17.normalize(parsed.command);
|
|
101946
101946
|
parsed.command = escape2.command(parsed.command);
|
|
101947
101947
|
parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
|
|
101948
101948
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -102591,19 +102591,19 @@ var init_source = __esm({
|
|
|
102591
102591
|
});
|
|
102592
102592
|
|
|
102593
102593
|
// src/cli.ts
|
|
102594
|
-
var
|
|
102594
|
+
var fs20 = __toESM(require("fs"));
|
|
102595
102595
|
var fsPromises = __toESM(require("fs/promises"));
|
|
102596
|
-
var
|
|
102596
|
+
var path16 = __toESM(require("path"));
|
|
102597
102597
|
|
|
102598
102598
|
// src/parser.ts
|
|
102599
102599
|
var path = __toESM(require("path"));
|
|
102600
102600
|
|
|
102601
102601
|
// src/nornapiParser.ts
|
|
102602
|
-
function extractPathParameters(
|
|
102602
|
+
function extractPathParameters(path17) {
|
|
102603
102603
|
const params = [];
|
|
102604
102604
|
const regex = /(?<!\{)\{([a-zA-Z_][a-zA-Z0-9_]*)\}(?!\})/g;
|
|
102605
102605
|
let match;
|
|
102606
|
-
while ((match = regex.exec(
|
|
102606
|
+
while ((match = regex.exec(path17)) !== null) {
|
|
102607
102607
|
params.push(match[1]);
|
|
102608
102608
|
}
|
|
102609
102609
|
return params;
|
|
@@ -102653,12 +102653,12 @@ function parseNornApiFile(content) {
|
|
|
102653
102653
|
if (inEndpointsBlock) {
|
|
102654
102654
|
const endpointMatch = trimmed.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\s+(.+)$/i);
|
|
102655
102655
|
if (endpointMatch) {
|
|
102656
|
-
const
|
|
102656
|
+
const path17 = endpointMatch[3].trim();
|
|
102657
102657
|
endpoints.push({
|
|
102658
102658
|
name: endpointMatch[1],
|
|
102659
102659
|
method: endpointMatch[2].toUpperCase(),
|
|
102660
|
-
path:
|
|
102661
|
-
parameters: extractPathParameters(
|
|
102660
|
+
path: path17,
|
|
102661
|
+
parameters: extractPathParameters(path17)
|
|
102662
102662
|
});
|
|
102663
102663
|
}
|
|
102664
102664
|
continue;
|
|
@@ -103241,8 +103241,8 @@ function extractFileLevelVariables(text) {
|
|
|
103241
103241
|
}
|
|
103242
103242
|
return variables;
|
|
103243
103243
|
}
|
|
103244
|
-
function getNestedValue(obj,
|
|
103245
|
-
return getNestedPathValue(obj,
|
|
103244
|
+
function getNestedValue(obj, path17) {
|
|
103245
|
+
return getNestedPathValue(obj, path17);
|
|
103246
103246
|
}
|
|
103247
103247
|
function valueToString(value) {
|
|
103248
103248
|
if (value === null) {
|
|
@@ -103286,8 +103286,8 @@ function substituteVariables(text, variables) {
|
|
|
103286
103286
|
const value = variables[varName];
|
|
103287
103287
|
if (typeof value === "object" && value !== null) {
|
|
103288
103288
|
if (pathPart) {
|
|
103289
|
-
const
|
|
103290
|
-
const nestedValue = getNestedValue(value,
|
|
103289
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
103290
|
+
const nestedValue = getNestedValue(value, path17);
|
|
103291
103291
|
if (nestedValue === void 0 && varName === ENV_SCOPE_KEY) {
|
|
103292
103292
|
return match;
|
|
103293
103293
|
}
|
|
@@ -103301,8 +103301,8 @@ function substituteVariables(text, variables) {
|
|
|
103301
103301
|
if (pathPart && typeof value === "string") {
|
|
103302
103302
|
try {
|
|
103303
103303
|
const parsed = JSON.parse(value);
|
|
103304
|
-
const
|
|
103305
|
-
const nestedValue = getNestedValue(parsed,
|
|
103304
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
103305
|
+
const nestedValue = getNestedValue(parsed, path17);
|
|
103306
103306
|
if (nestedValue === void 0 && varName === ENV_SCOPE_KEY) {
|
|
103307
103307
|
return match;
|
|
103308
103308
|
}
|
|
@@ -104151,9 +104151,9 @@ function isVisitable(thing) {
|
|
|
104151
104151
|
function removeBrackets(key) {
|
|
104152
104152
|
return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
104153
104153
|
}
|
|
104154
|
-
function renderKey(
|
|
104155
|
-
if (!
|
|
104156
|
-
return
|
|
104154
|
+
function renderKey(path17, key, dots) {
|
|
104155
|
+
if (!path17) return key;
|
|
104156
|
+
return path17.concat(key).map(function each(token, i) {
|
|
104157
104157
|
token = removeBrackets(token);
|
|
104158
104158
|
return !dots && i ? "[" + token + "]" : token;
|
|
104159
104159
|
}).join(dots ? "." : "");
|
|
@@ -104201,9 +104201,9 @@ function toFormData(obj, formData, options) {
|
|
|
104201
104201
|
}
|
|
104202
104202
|
return value;
|
|
104203
104203
|
}
|
|
104204
|
-
function defaultVisitor(value, key,
|
|
104204
|
+
function defaultVisitor(value, key, path17) {
|
|
104205
104205
|
let arr = value;
|
|
104206
|
-
if (value && !
|
|
104206
|
+
if (value && !path17 && typeof value === "object") {
|
|
104207
104207
|
if (utils_default.endsWith(key, "{}")) {
|
|
104208
104208
|
key = metaTokens ? key : key.slice(0, -2);
|
|
104209
104209
|
value = JSON.stringify(value);
|
|
@@ -104222,7 +104222,7 @@ function toFormData(obj, formData, options) {
|
|
|
104222
104222
|
if (isVisitable(value)) {
|
|
104223
104223
|
return true;
|
|
104224
104224
|
}
|
|
104225
|
-
formData.append(renderKey(
|
|
104225
|
+
formData.append(renderKey(path17, key, dots), convertValue(value));
|
|
104226
104226
|
return false;
|
|
104227
104227
|
}
|
|
104228
104228
|
const stack = [];
|
|
@@ -104231,10 +104231,10 @@ function toFormData(obj, formData, options) {
|
|
|
104231
104231
|
convertValue,
|
|
104232
104232
|
isVisitable
|
|
104233
104233
|
});
|
|
104234
|
-
function build(value,
|
|
104234
|
+
function build(value, path17) {
|
|
104235
104235
|
if (utils_default.isUndefined(value)) return;
|
|
104236
104236
|
if (stack.indexOf(value) !== -1) {
|
|
104237
|
-
throw Error("Circular reference detected in " +
|
|
104237
|
+
throw Error("Circular reference detected in " + path17.join("."));
|
|
104238
104238
|
}
|
|
104239
104239
|
stack.push(value);
|
|
104240
104240
|
utils_default.forEach(value, function each(el, key) {
|
|
@@ -104242,11 +104242,11 @@ function toFormData(obj, formData, options) {
|
|
|
104242
104242
|
formData,
|
|
104243
104243
|
el,
|
|
104244
104244
|
utils_default.isString(key) ? key.trim() : key,
|
|
104245
|
-
|
|
104245
|
+
path17,
|
|
104246
104246
|
exposedHelpers
|
|
104247
104247
|
);
|
|
104248
104248
|
if (result === true) {
|
|
104249
|
-
build(el,
|
|
104249
|
+
build(el, path17 ? path17.concat(key) : [key]);
|
|
104250
104250
|
}
|
|
104251
104251
|
});
|
|
104252
104252
|
stack.pop();
|
|
@@ -104458,7 +104458,7 @@ var platform_default = {
|
|
|
104458
104458
|
// node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
104459
104459
|
function toURLEncodedForm(data, options) {
|
|
104460
104460
|
return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
|
|
104461
|
-
visitor: function(value, key,
|
|
104461
|
+
visitor: function(value, key, path17, helpers) {
|
|
104462
104462
|
if (platform_default.isNode && utils_default.isBuffer(value)) {
|
|
104463
104463
|
this.append(key, value.toString("base64"));
|
|
104464
104464
|
return false;
|
|
@@ -104488,11 +104488,11 @@ function arrayToObject(arr) {
|
|
|
104488
104488
|
return obj;
|
|
104489
104489
|
}
|
|
104490
104490
|
function formDataToJSON(formData) {
|
|
104491
|
-
function buildPath(
|
|
104492
|
-
let name =
|
|
104491
|
+
function buildPath(path17, value, target, index) {
|
|
104492
|
+
let name = path17[index++];
|
|
104493
104493
|
if (name === "__proto__") return true;
|
|
104494
104494
|
const isNumericKey = Number.isFinite(+name);
|
|
104495
|
-
const isLast = index >=
|
|
104495
|
+
const isLast = index >= path17.length;
|
|
104496
104496
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
104497
104497
|
if (isLast) {
|
|
104498
104498
|
if (utils_default.hasOwnProp(target, name)) {
|
|
@@ -104505,7 +104505,7 @@ function formDataToJSON(formData) {
|
|
|
104505
104505
|
if (!target[name] || !utils_default.isObject(target[name])) {
|
|
104506
104506
|
target[name] = [];
|
|
104507
104507
|
}
|
|
104508
|
-
const result = buildPath(
|
|
104508
|
+
const result = buildPath(path17, value, target[name], index);
|
|
104509
104509
|
if (result && utils_default.isArray(target[name])) {
|
|
104510
104510
|
target[name] = arrayToObject(target[name]);
|
|
104511
104511
|
}
|
|
@@ -104934,10 +104934,10 @@ utils_default.inherits(CanceledError, AxiosError_default, {
|
|
|
104934
104934
|
var CanceledError_default = CanceledError;
|
|
104935
104935
|
|
|
104936
104936
|
// node_modules/axios/lib/core/settle.js
|
|
104937
|
-
function settle(
|
|
104937
|
+
function settle(resolve14, reject, response) {
|
|
104938
104938
|
const validateStatus2 = response.config.validateStatus;
|
|
104939
104939
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
104940
|
-
|
|
104940
|
+
resolve14(response);
|
|
104941
104941
|
} else {
|
|
104942
104942
|
reject(new AxiosError_default(
|
|
104943
104943
|
"Request failed with status code " + response.status,
|
|
@@ -105560,7 +105560,7 @@ function setProxy(options, configProxy, location) {
|
|
|
105560
105560
|
}
|
|
105561
105561
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
105562
105562
|
var wrapAsync = (asyncExecutor) => {
|
|
105563
|
-
return new Promise((
|
|
105563
|
+
return new Promise((resolve14, reject) => {
|
|
105564
105564
|
let onDone;
|
|
105565
105565
|
let isDone;
|
|
105566
105566
|
const done = (value, isRejected) => {
|
|
@@ -105570,7 +105570,7 @@ var wrapAsync = (asyncExecutor) => {
|
|
|
105570
105570
|
};
|
|
105571
105571
|
const _resolve = (value) => {
|
|
105572
105572
|
done(value);
|
|
105573
|
-
|
|
105573
|
+
resolve14(value);
|
|
105574
105574
|
};
|
|
105575
105575
|
const _reject = (reason) => {
|
|
105576
105576
|
done(reason, true);
|
|
@@ -105622,7 +105622,7 @@ var http2Transport = {
|
|
|
105622
105622
|
}
|
|
105623
105623
|
};
|
|
105624
105624
|
var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
105625
|
-
return wrapAsync(async function dispatchHttpRequest(
|
|
105625
|
+
return wrapAsync(async function dispatchHttpRequest(resolve14, reject, onDone) {
|
|
105626
105626
|
let { data, lookup, family, httpVersion = 1, http2Options } = config2;
|
|
105627
105627
|
const { responseType, responseEncoding } = config2;
|
|
105628
105628
|
const method = config2.method.toUpperCase();
|
|
@@ -105707,7 +105707,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
105707
105707
|
}
|
|
105708
105708
|
let convertedData;
|
|
105709
105709
|
if (method !== "GET") {
|
|
105710
|
-
return settle(
|
|
105710
|
+
return settle(resolve14, reject, {
|
|
105711
105711
|
status: 405,
|
|
105712
105712
|
statusText: "method not allowed",
|
|
105713
105713
|
headers: {},
|
|
@@ -105729,7 +105729,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
105729
105729
|
} else if (responseType === "stream") {
|
|
105730
105730
|
convertedData = import_stream4.default.Readable.from(convertedData);
|
|
105731
105731
|
}
|
|
105732
|
-
return settle(
|
|
105732
|
+
return settle(resolve14, reject, {
|
|
105733
105733
|
data: convertedData,
|
|
105734
105734
|
status: 200,
|
|
105735
105735
|
statusText: "OK",
|
|
@@ -105827,9 +105827,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
105827
105827
|
auth2 = urlUsername + ":" + urlPassword;
|
|
105828
105828
|
}
|
|
105829
105829
|
auth2 && headers.delete("authorization");
|
|
105830
|
-
let
|
|
105830
|
+
let path17;
|
|
105831
105831
|
try {
|
|
105832
|
-
|
|
105832
|
+
path17 = buildURL(
|
|
105833
105833
|
parsed.pathname + parsed.search,
|
|
105834
105834
|
config2.params,
|
|
105835
105835
|
config2.paramsSerializer
|
|
@@ -105847,7 +105847,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
105847
105847
|
false
|
|
105848
105848
|
);
|
|
105849
105849
|
const options = {
|
|
105850
|
-
path:
|
|
105850
|
+
path: path17,
|
|
105851
105851
|
method,
|
|
105852
105852
|
headers: headers.toJSON(),
|
|
105853
105853
|
agents: { http: config2.httpAgent, https: config2.httpsAgent },
|
|
@@ -105948,7 +105948,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
105948
105948
|
};
|
|
105949
105949
|
if (responseType === "stream") {
|
|
105950
105950
|
response.data = responseStream;
|
|
105951
|
-
settle(
|
|
105951
|
+
settle(resolve14, reject, response);
|
|
105952
105952
|
} else {
|
|
105953
105953
|
const responseBuffer = [];
|
|
105954
105954
|
let totalResponseBytes = 0;
|
|
@@ -105996,7 +105996,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
|
|
|
105996
105996
|
} catch (err) {
|
|
105997
105997
|
return reject(AxiosError_default.from(err, null, config2, response.request, response));
|
|
105998
105998
|
}
|
|
105999
|
-
settle(
|
|
105999
|
+
settle(resolve14, reject, response);
|
|
106000
106000
|
});
|
|
106001
106001
|
}
|
|
106002
106002
|
abortEmitter.once("abort", (err) => {
|
|
@@ -106083,14 +106083,14 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
|
|
|
106083
106083
|
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
106084
106084
|
// Standard browser envs support document.cookie
|
|
106085
106085
|
{
|
|
106086
|
-
write(name, value, expires,
|
|
106086
|
+
write(name, value, expires, path17, domain2, secure, sameSite) {
|
|
106087
106087
|
if (typeof document === "undefined") return;
|
|
106088
106088
|
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
106089
106089
|
if (utils_default.isNumber(expires)) {
|
|
106090
106090
|
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
106091
106091
|
}
|
|
106092
|
-
if (utils_default.isString(
|
|
106093
|
-
cookie.push(`path=${
|
|
106092
|
+
if (utils_default.isString(path17)) {
|
|
106093
|
+
cookie.push(`path=${path17}`);
|
|
106094
106094
|
}
|
|
106095
106095
|
if (utils_default.isString(domain2)) {
|
|
106096
106096
|
cookie.push(`domain=${domain2}`);
|
|
@@ -106245,7 +106245,7 @@ var resolveConfig_default = (config2) => {
|
|
|
106245
106245
|
// node_modules/axios/lib/adapters/xhr.js
|
|
106246
106246
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
106247
106247
|
var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
106248
|
-
return new Promise(function dispatchXhrRequest(
|
|
106248
|
+
return new Promise(function dispatchXhrRequest(resolve14, reject) {
|
|
106249
106249
|
const _config = resolveConfig_default(config2);
|
|
106250
106250
|
let requestData = _config.data;
|
|
106251
106251
|
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
|
@@ -106279,7 +106279,7 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
|
|
|
106279
106279
|
request
|
|
106280
106280
|
};
|
|
106281
106281
|
settle(function _resolve(value) {
|
|
106282
|
-
|
|
106282
|
+
resolve14(value);
|
|
106283
106283
|
done();
|
|
106284
106284
|
}, function _reject(err) {
|
|
106285
106285
|
reject(err);
|
|
@@ -106650,8 +106650,8 @@ var factory = (env3) => {
|
|
|
106650
106650
|
responseType = responseType || "text";
|
|
106651
106651
|
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config2);
|
|
106652
106652
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
106653
|
-
return await new Promise((
|
|
106654
|
-
settle(
|
|
106653
|
+
return await new Promise((resolve14, reject) => {
|
|
106654
|
+
settle(resolve14, reject, {
|
|
106655
106655
|
data: responseData,
|
|
106656
106656
|
headers: AxiosHeaders_default.from(response.headers),
|
|
106657
106657
|
status: response.status,
|
|
@@ -107047,8 +107047,8 @@ var CancelToken = class _CancelToken {
|
|
|
107047
107047
|
throw new TypeError("executor must be a function.");
|
|
107048
107048
|
}
|
|
107049
107049
|
let resolvePromise;
|
|
107050
|
-
this.promise = new Promise(function promiseExecutor(
|
|
107051
|
-
resolvePromise =
|
|
107050
|
+
this.promise = new Promise(function promiseExecutor(resolve14) {
|
|
107051
|
+
resolvePromise = resolve14;
|
|
107052
107052
|
});
|
|
107053
107053
|
const token = this;
|
|
107054
107054
|
this.promise.then((cancel) => {
|
|
@@ -107061,9 +107061,9 @@ var CancelToken = class _CancelToken {
|
|
|
107061
107061
|
});
|
|
107062
107062
|
this.promise.then = (onfulfilled) => {
|
|
107063
107063
|
let _resolve;
|
|
107064
|
-
const promise2 = new Promise((
|
|
107065
|
-
token.subscribe(
|
|
107066
|
-
_resolve =
|
|
107064
|
+
const promise2 = new Promise((resolve14) => {
|
|
107065
|
+
token.subscribe(resolve14);
|
|
107066
|
+
_resolve = resolve14;
|
|
107067
107067
|
}).then(onfulfilled);
|
|
107068
107068
|
promise2.cancel = function reject() {
|
|
107069
107069
|
token.unsubscribe(_resolve);
|
|
@@ -107437,10 +107437,10 @@ var safeToStringImpl = (val, seenArrays = /* @__PURE__ */ new WeakSet()) => {
|
|
|
107437
107437
|
var safeToString = (val) => safeToStringImpl(val);
|
|
107438
107438
|
function createPromiseCallback(cb) {
|
|
107439
107439
|
let callback;
|
|
107440
|
-
let
|
|
107440
|
+
let resolve14;
|
|
107441
107441
|
let reject;
|
|
107442
107442
|
const promise2 = new Promise((_resolve, _reject) => {
|
|
107443
|
-
|
|
107443
|
+
resolve14 = _resolve;
|
|
107444
107444
|
reject = _reject;
|
|
107445
107445
|
});
|
|
107446
107446
|
if (typeof cb === "function") {
|
|
@@ -107456,7 +107456,7 @@ function createPromiseCallback(cb) {
|
|
|
107456
107456
|
callback = (err, result) => {
|
|
107457
107457
|
try {
|
|
107458
107458
|
if (err) reject(err);
|
|
107459
|
-
else
|
|
107459
|
+
else resolve14(result);
|
|
107460
107460
|
} catch (e) {
|
|
107461
107461
|
reject(e instanceof Error ? e : new Error());
|
|
107462
107462
|
}
|
|
@@ -107490,18 +107490,18 @@ var MemoryCookieStore = class extends Store {
|
|
|
107490
107490
|
/**
|
|
107491
107491
|
* @internal No doc because this is an overload that supports the implementation
|
|
107492
107492
|
*/
|
|
107493
|
-
findCookie(domain2,
|
|
107493
|
+
findCookie(domain2, path17, key, callback) {
|
|
107494
107494
|
const promiseCallback = createPromiseCallback(callback);
|
|
107495
|
-
if (domain2 == null ||
|
|
107495
|
+
if (domain2 == null || path17 == null || key == null) {
|
|
107496
107496
|
return promiseCallback.resolve(void 0);
|
|
107497
107497
|
}
|
|
107498
|
-
const result = this.idx[domain2]?.[
|
|
107498
|
+
const result = this.idx[domain2]?.[path17]?.[key];
|
|
107499
107499
|
return promiseCallback.resolve(result);
|
|
107500
107500
|
}
|
|
107501
107501
|
/**
|
|
107502
107502
|
* @internal No doc because this is an overload that supports the implementation
|
|
107503
107503
|
*/
|
|
107504
|
-
findCookies(domain2,
|
|
107504
|
+
findCookies(domain2, path17, allowSpecialUseDomain = false, callback) {
|
|
107505
107505
|
if (typeof allowSpecialUseDomain === "function") {
|
|
107506
107506
|
callback = allowSpecialUseDomain;
|
|
107507
107507
|
allowSpecialUseDomain = true;
|
|
@@ -107512,7 +107512,7 @@ var MemoryCookieStore = class extends Store {
|
|
|
107512
107512
|
return promiseCallback.resolve([]);
|
|
107513
107513
|
}
|
|
107514
107514
|
let pathMatcher;
|
|
107515
|
-
if (!
|
|
107515
|
+
if (!path17) {
|
|
107516
107516
|
pathMatcher = function matchAll2(domainIndex) {
|
|
107517
107517
|
for (const curPath in domainIndex) {
|
|
107518
107518
|
const pathIndex = domainIndex[curPath];
|
|
@@ -107527,7 +107527,7 @@ var MemoryCookieStore = class extends Store {
|
|
|
107527
107527
|
} else {
|
|
107528
107528
|
pathMatcher = function matchRFC(domainIndex) {
|
|
107529
107529
|
for (const cookiePath in domainIndex) {
|
|
107530
|
-
if (pathMatch(
|
|
107530
|
+
if (pathMatch(path17, cookiePath)) {
|
|
107531
107531
|
const pathIndex = domainIndex[cookiePath];
|
|
107532
107532
|
for (const key in pathIndex) {
|
|
107533
107533
|
const value = pathIndex[key];
|
|
@@ -107555,14 +107555,14 @@ var MemoryCookieStore = class extends Store {
|
|
|
107555
107555
|
*/
|
|
107556
107556
|
putCookie(cookie, callback) {
|
|
107557
107557
|
const promiseCallback = createPromiseCallback(callback);
|
|
107558
|
-
const { domain: domain2, path:
|
|
107559
|
-
if (domain2 == null ||
|
|
107558
|
+
const { domain: domain2, path: path17, key } = cookie;
|
|
107559
|
+
if (domain2 == null || path17 == null || key == null) {
|
|
107560
107560
|
return promiseCallback.resolve(void 0);
|
|
107561
107561
|
}
|
|
107562
107562
|
const domainEntry = this.idx[domain2] ?? /* @__PURE__ */ Object.create(null);
|
|
107563
107563
|
this.idx[domain2] = domainEntry;
|
|
107564
|
-
const pathEntry = domainEntry[
|
|
107565
|
-
domainEntry[
|
|
107564
|
+
const pathEntry = domainEntry[path17] ?? /* @__PURE__ */ Object.create(null);
|
|
107565
|
+
domainEntry[path17] = pathEntry;
|
|
107566
107566
|
pathEntry[key] = cookie;
|
|
107567
107567
|
return promiseCallback.resolve(void 0);
|
|
107568
107568
|
}
|
|
@@ -107576,20 +107576,20 @@ var MemoryCookieStore = class extends Store {
|
|
|
107576
107576
|
/**
|
|
107577
107577
|
* @internal No doc because this is an overload that supports the implementation
|
|
107578
107578
|
*/
|
|
107579
|
-
removeCookie(domain2,
|
|
107579
|
+
removeCookie(domain2, path17, key, callback) {
|
|
107580
107580
|
const promiseCallback = createPromiseCallback(callback);
|
|
107581
|
-
delete this.idx[domain2]?.[
|
|
107581
|
+
delete this.idx[domain2]?.[path17]?.[key];
|
|
107582
107582
|
return promiseCallback.resolve(void 0);
|
|
107583
107583
|
}
|
|
107584
107584
|
/**
|
|
107585
107585
|
* @internal No doc because this is an overload that supports the implementation
|
|
107586
107586
|
*/
|
|
107587
|
-
removeCookies(domain2,
|
|
107587
|
+
removeCookies(domain2, path17, callback) {
|
|
107588
107588
|
const promiseCallback = createPromiseCallback(callback);
|
|
107589
107589
|
const domainEntry = this.idx[domain2];
|
|
107590
107590
|
if (domainEntry) {
|
|
107591
|
-
if (
|
|
107592
|
-
delete domainEntry[
|
|
107591
|
+
if (path17) {
|
|
107592
|
+
delete domainEntry[path17];
|
|
107593
107593
|
} else {
|
|
107594
107594
|
delete this.idx[domain2];
|
|
107595
107595
|
}
|
|
@@ -107615,8 +107615,8 @@ var MemoryCookieStore = class extends Store {
|
|
|
107615
107615
|
domains.forEach((domain2) => {
|
|
107616
107616
|
const domainEntry = idx[domain2] ?? {};
|
|
107617
107617
|
const paths = Object.keys(domainEntry);
|
|
107618
|
-
paths.forEach((
|
|
107619
|
-
const pathEntry = domainEntry[
|
|
107618
|
+
paths.forEach((path17) => {
|
|
107619
|
+
const pathEntry = domainEntry[path17] ?? {};
|
|
107620
107620
|
const keys = Object.keys(pathEntry);
|
|
107621
107621
|
keys.forEach((key) => {
|
|
107622
107622
|
const keyEntry = pathEntry[key];
|
|
@@ -108500,18 +108500,18 @@ function cookieCompare(a, b) {
|
|
|
108500
108500
|
cmp = (a.creationIndex || 0) - (b.creationIndex || 0);
|
|
108501
108501
|
return cmp;
|
|
108502
108502
|
}
|
|
108503
|
-
function defaultPath(
|
|
108504
|
-
if (!
|
|
108503
|
+
function defaultPath(path17) {
|
|
108504
|
+
if (!path17 || path17.slice(0, 1) !== "/") {
|
|
108505
108505
|
return "/";
|
|
108506
108506
|
}
|
|
108507
|
-
if (
|
|
108508
|
-
return
|
|
108507
|
+
if (path17 === "/") {
|
|
108508
|
+
return path17;
|
|
108509
108509
|
}
|
|
108510
|
-
const rightSlash =
|
|
108510
|
+
const rightSlash = path17.lastIndexOf("/");
|
|
108511
108511
|
if (rightSlash === 0) {
|
|
108512
108512
|
return "/";
|
|
108513
108513
|
}
|
|
108514
|
-
return
|
|
108514
|
+
return path17.slice(0, rightSlash);
|
|
108515
108515
|
}
|
|
108516
108516
|
var IP_REGEX_LOWERCASE = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/;
|
|
108517
108517
|
function domainMatch(domain2, cookieDomain, canonicalize) {
|
|
@@ -108913,7 +108913,7 @@ var CookieJar = class _CookieJar {
|
|
|
108913
108913
|
return promiseCallback.reject(parameterError);
|
|
108914
108914
|
}
|
|
108915
108915
|
const host = canonicalDomain(context.hostname);
|
|
108916
|
-
const
|
|
108916
|
+
const path17 = context.pathname || "/";
|
|
108917
108917
|
const potentiallyTrustworthy = isPotentiallyTrustworthy(
|
|
108918
108918
|
url3,
|
|
108919
108919
|
this.allowSecureOnLocal
|
|
@@ -108944,7 +108944,7 @@ var CookieJar = class _CookieJar {
|
|
|
108944
108944
|
return false;
|
|
108945
108945
|
}
|
|
108946
108946
|
}
|
|
108947
|
-
if (!allPaths && typeof c.path === "string" && !pathMatch(
|
|
108947
|
+
if (!allPaths && typeof c.path === "string" && !pathMatch(path17, c.path)) {
|
|
108948
108948
|
return false;
|
|
108949
108949
|
}
|
|
108950
108950
|
if (c.secure && !potentiallyTrustworthy) {
|
|
@@ -108976,7 +108976,7 @@ var CookieJar = class _CookieJar {
|
|
|
108976
108976
|
}
|
|
108977
108977
|
store.findCookies(
|
|
108978
108978
|
host,
|
|
108979
|
-
allPaths ? null :
|
|
108979
|
+
allPaths ? null : path17,
|
|
108980
108980
|
this.allowSpecialUseDomain,
|
|
108981
108981
|
(err, cookies) => {
|
|
108982
108982
|
if (err) {
|
|
@@ -109570,7 +109570,7 @@ async function sendRequest(request, retryOptions) {
|
|
|
109570
109570
|
return sendRequestWithJar(request, sharedCookieJar, retryOptions);
|
|
109571
109571
|
}
|
|
109572
109572
|
function sleep(ms) {
|
|
109573
|
-
return new Promise((
|
|
109573
|
+
return new Promise((resolve14) => setTimeout(resolve14, ms));
|
|
109574
109574
|
}
|
|
109575
109575
|
function shouldRetry(response, error2) {
|
|
109576
109576
|
if (error2) return true;
|
|
@@ -109982,7 +109982,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
|
|
|
109982
109982
|
captureVar
|
|
109983
109983
|
};
|
|
109984
109984
|
}
|
|
109985
|
-
return new Promise((
|
|
109985
|
+
return new Promise((resolve14) => {
|
|
109986
109986
|
const env3 = {
|
|
109987
109987
|
...process.env,
|
|
109988
109988
|
// Pass variables as environment variables with NORN_ prefix
|
|
@@ -110006,7 +110006,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
|
|
|
110006
110006
|
stderr += data.toString();
|
|
110007
110007
|
});
|
|
110008
110008
|
child.on("error", (err) => {
|
|
110009
|
-
|
|
110009
|
+
resolve14({
|
|
110010
110010
|
success: false,
|
|
110011
110011
|
output: cleanScriptOutput(stdout),
|
|
110012
110012
|
error: `Failed to execute script: ${err.message}`,
|
|
@@ -110020,7 +110020,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
|
|
|
110020
110020
|
child.on("close", (code) => {
|
|
110021
110021
|
const exitCode = code ?? 0;
|
|
110022
110022
|
const cleanedOutput = cleanScriptOutput(stdout);
|
|
110023
|
-
|
|
110023
|
+
resolve14({
|
|
110024
110024
|
success: exitCode === 0,
|
|
110025
110025
|
output: cleanedOutput,
|
|
110026
110026
|
error: stderr.trim(),
|
|
@@ -110086,11 +110086,11 @@ function readJsonFile(filePath, workingDir) {
|
|
|
110086
110086
|
};
|
|
110087
110087
|
}
|
|
110088
110088
|
}
|
|
110089
|
-
function setNestedValue(obj,
|
|
110090
|
-
if (!
|
|
110089
|
+
function setNestedValue(obj, path17, value) {
|
|
110090
|
+
if (!path17 || obj === null || obj === void 0 || typeof obj !== "object") {
|
|
110091
110091
|
return false;
|
|
110092
110092
|
}
|
|
110093
|
-
const parts =
|
|
110093
|
+
const parts = path17.replace(/\[(\d+)\]/g, ".$1").split(".").filter((p) => p !== "");
|
|
110094
110094
|
if (parts.length === 0) {
|
|
110095
110095
|
return false;
|
|
110096
110096
|
}
|
|
@@ -110705,7 +110705,7 @@ finally {
|
|
|
110705
110705
|
const payload = JSON.stringify(request);
|
|
110706
110706
|
const command = getIntegratedPowerShellCommand();
|
|
110707
110707
|
const commandArgs = ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-OutputFormat", "Text", "-EncodedCommand", encodePowerShellCommand(script)];
|
|
110708
|
-
return new Promise((
|
|
110708
|
+
return new Promise((resolve14, reject) => {
|
|
110709
110709
|
const child = (0, import_child_process2.spawn)(command, commandArgs, {
|
|
110710
110710
|
cwd: request.context?.workingDir || process.cwd(),
|
|
110711
110711
|
shell: false,
|
|
@@ -110732,7 +110732,7 @@ finally {
|
|
|
110732
110732
|
}
|
|
110733
110733
|
try {
|
|
110734
110734
|
const parsed = JSON.parse(stdout.trim());
|
|
110735
|
-
|
|
110735
|
+
resolve14(parsed);
|
|
110736
110736
|
} catch (error2) {
|
|
110737
110737
|
reject(new Error(`Invalid PowerShell SQL adapter response: ${error2 instanceof Error ? error2.message : String(error2)}`));
|
|
110738
110738
|
}
|
|
@@ -111136,7 +111136,7 @@ async function runExternalSqlAdapter(command, request, workingDir) {
|
|
|
111136
111136
|
if (!command.length) {
|
|
111137
111137
|
throw new Error("SQL adapter command is empty");
|
|
111138
111138
|
}
|
|
111139
|
-
return new Promise((
|
|
111139
|
+
return new Promise((resolve14, reject) => {
|
|
111140
111140
|
const child = (0, import_child_process3.spawn)(command[0], command.slice(1), {
|
|
111141
111141
|
cwd: workingDir,
|
|
111142
111142
|
env: process.env,
|
|
@@ -111157,7 +111157,7 @@ async function runExternalSqlAdapter(command, request, workingDir) {
|
|
|
111157
111157
|
return;
|
|
111158
111158
|
}
|
|
111159
111159
|
settled = true;
|
|
111160
|
-
|
|
111160
|
+
resolve14(response);
|
|
111161
111161
|
};
|
|
111162
111162
|
child.stdout.on("data", (chunk) => {
|
|
111163
111163
|
stdout += chunk.toString();
|
|
@@ -111221,6 +111221,10 @@ async function runSqlAdapter(target, request, workingDir) {
|
|
|
111221
111221
|
return runExternalSqlAdapter(target.command, request, workingDir);
|
|
111222
111222
|
}
|
|
111223
111223
|
|
|
111224
|
+
// src/mcpClient.ts
|
|
111225
|
+
var fs13 = __toESM(require("fs"));
|
|
111226
|
+
var path11 = __toESM(require("path"));
|
|
111227
|
+
|
|
111224
111228
|
// node_modules/zod/v3/helpers/util.js
|
|
111225
111229
|
var util3;
|
|
111226
111230
|
(function(util4) {
|
|
@@ -111580,8 +111584,8 @@ function getErrorMap() {
|
|
|
111580
111584
|
|
|
111581
111585
|
// node_modules/zod/v3/helpers/parseUtil.js
|
|
111582
111586
|
var makeIssue = (params) => {
|
|
111583
|
-
const { data, path:
|
|
111584
|
-
const fullPath = [...
|
|
111587
|
+
const { data, path: path17, errorMaps, issueData } = params;
|
|
111588
|
+
const fullPath = [...path17, ...issueData.path || []];
|
|
111585
111589
|
const fullIssue = {
|
|
111586
111590
|
...issueData,
|
|
111587
111591
|
path: fullPath
|
|
@@ -111696,11 +111700,11 @@ var errorUtil;
|
|
|
111696
111700
|
|
|
111697
111701
|
// node_modules/zod/v3/types.js
|
|
111698
111702
|
var ParseInputLazyPath = class {
|
|
111699
|
-
constructor(parent, value,
|
|
111703
|
+
constructor(parent, value, path17, key) {
|
|
111700
111704
|
this._cachedPath = [];
|
|
111701
111705
|
this.parent = parent;
|
|
111702
111706
|
this.data = value;
|
|
111703
|
-
this._path =
|
|
111707
|
+
this._path = path17;
|
|
111704
111708
|
this._key = key;
|
|
111705
111709
|
}
|
|
111706
111710
|
get path() {
|
|
@@ -115344,10 +115348,10 @@ function mergeDefs(...defs) {
|
|
|
115344
115348
|
function cloneDef(schema) {
|
|
115345
115349
|
return mergeDefs(schema._zod.def);
|
|
115346
115350
|
}
|
|
115347
|
-
function getElementAtPath(obj,
|
|
115348
|
-
if (!
|
|
115351
|
+
function getElementAtPath(obj, path17) {
|
|
115352
|
+
if (!path17)
|
|
115349
115353
|
return obj;
|
|
115350
|
-
return
|
|
115354
|
+
return path17.reduce((acc, key) => acc?.[key], obj);
|
|
115351
115355
|
}
|
|
115352
115356
|
function promiseAllObject(promisesObj) {
|
|
115353
115357
|
const keys = Object.keys(promisesObj);
|
|
@@ -115730,11 +115734,11 @@ function aborted(x, startIndex = 0) {
|
|
|
115730
115734
|
}
|
|
115731
115735
|
return false;
|
|
115732
115736
|
}
|
|
115733
|
-
function prefixIssues(
|
|
115737
|
+
function prefixIssues(path17, issues) {
|
|
115734
115738
|
return issues.map((iss) => {
|
|
115735
115739
|
var _a2;
|
|
115736
115740
|
(_a2 = iss).path ?? (_a2.path = []);
|
|
115737
|
-
iss.path.unshift(
|
|
115741
|
+
iss.path.unshift(path17);
|
|
115738
115742
|
return iss;
|
|
115739
115743
|
});
|
|
115740
115744
|
}
|
|
@@ -124087,7 +124091,7 @@ var Protocol = class {
|
|
|
124087
124091
|
return;
|
|
124088
124092
|
}
|
|
124089
124093
|
const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
|
|
124090
|
-
await new Promise((
|
|
124094
|
+
await new Promise((resolve14) => setTimeout(resolve14, pollInterval));
|
|
124091
124095
|
options?.signal?.throwIfAborted();
|
|
124092
124096
|
}
|
|
124093
124097
|
} catch (error2) {
|
|
@@ -124104,7 +124108,7 @@ var Protocol = class {
|
|
|
124104
124108
|
*/
|
|
124105
124109
|
request(request, resultSchema, options) {
|
|
124106
124110
|
const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
|
|
124107
|
-
return new Promise((
|
|
124111
|
+
return new Promise((resolve14, reject) => {
|
|
124108
124112
|
const earlyReject = (error2) => {
|
|
124109
124113
|
reject(error2);
|
|
124110
124114
|
};
|
|
@@ -124182,7 +124186,7 @@ var Protocol = class {
|
|
|
124182
124186
|
if (!parseResult.success) {
|
|
124183
124187
|
reject(parseResult.error);
|
|
124184
124188
|
} else {
|
|
124185
|
-
|
|
124189
|
+
resolve14(parseResult.data);
|
|
124186
124190
|
}
|
|
124187
124191
|
} catch (error2) {
|
|
124188
124192
|
reject(error2);
|
|
@@ -124443,12 +124447,12 @@ var Protocol = class {
|
|
|
124443
124447
|
}
|
|
124444
124448
|
} catch {
|
|
124445
124449
|
}
|
|
124446
|
-
return new Promise((
|
|
124450
|
+
return new Promise((resolve14, reject) => {
|
|
124447
124451
|
if (signal.aborted) {
|
|
124448
124452
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
124449
124453
|
return;
|
|
124450
124454
|
}
|
|
124451
|
-
const timeoutId = setTimeout(
|
|
124455
|
+
const timeoutId = setTimeout(resolve14, interval);
|
|
124452
124456
|
signal.addEventListener("abort", () => {
|
|
124453
124457
|
clearTimeout(timeoutId);
|
|
124454
124458
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
@@ -125399,7 +125403,7 @@ var StdioClientTransport = class {
|
|
|
125399
125403
|
if (this._process) {
|
|
125400
125404
|
throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
|
|
125401
125405
|
}
|
|
125402
|
-
return new Promise((
|
|
125406
|
+
return new Promise((resolve14, reject) => {
|
|
125403
125407
|
this._process = (0, import_cross_spawn.default)(this._serverParams.command, this._serverParams.args ?? [], {
|
|
125404
125408
|
// merge default env with server env because mcp server needs some env vars
|
|
125405
125409
|
env: {
|
|
@@ -125416,7 +125420,7 @@ var StdioClientTransport = class {
|
|
|
125416
125420
|
this.onerror?.(error2);
|
|
125417
125421
|
});
|
|
125418
125422
|
this._process.on("spawn", () => {
|
|
125419
|
-
|
|
125423
|
+
resolve14();
|
|
125420
125424
|
});
|
|
125421
125425
|
this._process.on("close", (_code) => {
|
|
125422
125426
|
this._process = void 0;
|
|
@@ -125475,22 +125479,22 @@ var StdioClientTransport = class {
|
|
|
125475
125479
|
if (this._process) {
|
|
125476
125480
|
const processToClose = this._process;
|
|
125477
125481
|
this._process = void 0;
|
|
125478
|
-
const closePromise = new Promise((
|
|
125482
|
+
const closePromise = new Promise((resolve14) => {
|
|
125479
125483
|
processToClose.once("close", () => {
|
|
125480
|
-
|
|
125484
|
+
resolve14();
|
|
125481
125485
|
});
|
|
125482
125486
|
});
|
|
125483
125487
|
try {
|
|
125484
125488
|
processToClose.stdin?.end();
|
|
125485
125489
|
} catch {
|
|
125486
125490
|
}
|
|
125487
|
-
await Promise.race([closePromise, new Promise((
|
|
125491
|
+
await Promise.race([closePromise, new Promise((resolve14) => setTimeout(resolve14, 2e3).unref())]);
|
|
125488
125492
|
if (processToClose.exitCode === null) {
|
|
125489
125493
|
try {
|
|
125490
125494
|
processToClose.kill("SIGTERM");
|
|
125491
125495
|
} catch {
|
|
125492
125496
|
}
|
|
125493
|
-
await Promise.race([closePromise, new Promise((
|
|
125497
|
+
await Promise.race([closePromise, new Promise((resolve14) => setTimeout(resolve14, 2e3).unref())]);
|
|
125494
125498
|
}
|
|
125495
125499
|
if (processToClose.exitCode === null) {
|
|
125496
125500
|
try {
|
|
@@ -125502,15 +125506,15 @@ var StdioClientTransport = class {
|
|
|
125502
125506
|
this._readBuffer.clear();
|
|
125503
125507
|
}
|
|
125504
125508
|
send(message) {
|
|
125505
|
-
return new Promise((
|
|
125509
|
+
return new Promise((resolve14) => {
|
|
125506
125510
|
if (!this._process?.stdin) {
|
|
125507
125511
|
throw new Error("Not connected");
|
|
125508
125512
|
}
|
|
125509
125513
|
const json2 = serializeMessage(message);
|
|
125510
125514
|
if (this._process.stdin.write(json2)) {
|
|
125511
|
-
|
|
125515
|
+
resolve14();
|
|
125512
125516
|
} else {
|
|
125513
|
-
this._process.stdin.once("drain",
|
|
125517
|
+
this._process.stdin.once("drain", resolve14);
|
|
125514
125518
|
}
|
|
125515
125519
|
});
|
|
125516
125520
|
}
|
|
@@ -127284,9 +127288,19 @@ var NornJsonSchemaValidator = class {
|
|
|
127284
127288
|
};
|
|
127285
127289
|
}
|
|
127286
127290
|
};
|
|
127291
|
+
function getNornClientVersion() {
|
|
127292
|
+
try {
|
|
127293
|
+
const packageJsonPath = path11.resolve(__dirname, "..", "package.json");
|
|
127294
|
+
const packageJson = JSON.parse(fs13.readFileSync(packageJsonPath, "utf-8"));
|
|
127295
|
+
return typeof packageJson.version === "string" ? packageJson.version : "0.0.0";
|
|
127296
|
+
} catch {
|
|
127297
|
+
return "0.0.0";
|
|
127298
|
+
}
|
|
127299
|
+
}
|
|
127300
|
+
var NORN_CLIENT_VERSION = getNornClientVersion();
|
|
127287
127301
|
function createClient() {
|
|
127288
127302
|
return new Client2(
|
|
127289
|
-
{ name: "norn", version:
|
|
127303
|
+
{ name: "norn", version: NORN_CLIENT_VERSION },
|
|
127290
127304
|
{
|
|
127291
127305
|
capabilities: {},
|
|
127292
127306
|
jsonSchemaValidator: new NornJsonSchemaValidator()
|
|
@@ -128079,8 +128093,8 @@ function parseJsonBackedValue(value) {
|
|
|
128079
128093
|
return value;
|
|
128080
128094
|
}
|
|
128081
128095
|
}
|
|
128082
|
-
function getVariableValueByPath(
|
|
128083
|
-
const parts = getPathSegments(
|
|
128096
|
+
function getVariableValueByPath(path17, variables) {
|
|
128097
|
+
const parts = getPathSegments(path17);
|
|
128084
128098
|
let current = variables;
|
|
128085
128099
|
for (const part of parts) {
|
|
128086
128100
|
if (current === null || current === void 0) {
|
|
@@ -128433,8 +128447,8 @@ function evaluateValueExpression(expr, runtimeVariables) {
|
|
|
128433
128447
|
if (typeof dataToNavigate !== "object" || dataToNavigate === null) {
|
|
128434
128448
|
return { value: String(varValue), error: `Cannot access path on non-object value` };
|
|
128435
128449
|
}
|
|
128436
|
-
const
|
|
128437
|
-
const parts = getPathSegments(
|
|
128450
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
128451
|
+
const parts = getPathSegments(path17);
|
|
128438
128452
|
let current = dataToNavigate;
|
|
128439
128453
|
for (const part of parts) {
|
|
128440
128454
|
if (current === null || current === void 0) {
|
|
@@ -128569,8 +128583,8 @@ function resolveBareVariables(text, variables) {
|
|
|
128569
128583
|
if (varName in variables) {
|
|
128570
128584
|
const value = variables[varName];
|
|
128571
128585
|
if (pathPart) {
|
|
128572
|
-
const
|
|
128573
|
-
const nestedValue = getNestedValueFromObject(value,
|
|
128586
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
128587
|
+
const nestedValue = getNestedValueFromObject(value, path17);
|
|
128574
128588
|
return valueToString2(nestedValue);
|
|
128575
128589
|
}
|
|
128576
128590
|
return valueToString2(value);
|
|
@@ -128590,8 +128604,8 @@ function resolveBareVariables(text, variables) {
|
|
|
128590
128604
|
if (varName in variables) {
|
|
128591
128605
|
const value = variables[varName];
|
|
128592
128606
|
if (pathPart) {
|
|
128593
|
-
const
|
|
128594
|
-
return valueToString2(getNestedValueFromObject(value,
|
|
128607
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
128608
|
+
return valueToString2(getNestedValueFromObject(value, path17));
|
|
128595
128609
|
}
|
|
128596
128610
|
return valueToString2(value);
|
|
128597
128611
|
}
|
|
@@ -128639,11 +128653,11 @@ function splitExpressionParts(expr) {
|
|
|
128639
128653
|
}
|
|
128640
128654
|
return parts;
|
|
128641
128655
|
}
|
|
128642
|
-
function getNestedValueFromObject(obj,
|
|
128643
|
-
if (!
|
|
128656
|
+
function getNestedValueFromObject(obj, path17) {
|
|
128657
|
+
if (!path17) {
|
|
128644
128658
|
return obj;
|
|
128645
128659
|
}
|
|
128646
|
-
const parts =
|
|
128660
|
+
const parts = path17.split(/\.|\[(\d+)\]/).filter((p) => p !== "" && p !== void 0);
|
|
128647
128661
|
let current = obj;
|
|
128648
128662
|
for (const part of parts) {
|
|
128649
128663
|
if (current === null || current === void 0) {
|
|
@@ -128666,7 +128680,7 @@ function valueToString2(value) {
|
|
|
128666
128680
|
return String(value);
|
|
128667
128681
|
}
|
|
128668
128682
|
function sleep2(ms) {
|
|
128669
|
-
return new Promise((
|
|
128683
|
+
return new Promise((resolve14) => setTimeout(resolve14, ms));
|
|
128670
128684
|
}
|
|
128671
128685
|
function isIfCommand(line2) {
|
|
128672
128686
|
return /^if\s+.+$/i.test(line2.trim());
|
|
@@ -129042,24 +129056,24 @@ function extractCaptureDirectives(content) {
|
|
|
129042
129056
|
for (const line2 of content.split("\n")) {
|
|
129043
129057
|
const match = line2.trim().match(captureRegex);
|
|
129044
129058
|
if (match) {
|
|
129045
|
-
let
|
|
129046
|
-
if (
|
|
129047
|
-
|
|
129059
|
+
let path17 = match[3] || "";
|
|
129060
|
+
if (path17.startsWith(".")) {
|
|
129061
|
+
path17 = path17.substring(1);
|
|
129048
129062
|
}
|
|
129049
129063
|
captures.push({
|
|
129050
129064
|
varName: match[1],
|
|
129051
129065
|
afterRequest: parseInt(match[2], 10),
|
|
129052
|
-
path:
|
|
129066
|
+
path: path17
|
|
129053
129067
|
});
|
|
129054
129068
|
}
|
|
129055
129069
|
}
|
|
129056
129070
|
return captures;
|
|
129057
129071
|
}
|
|
129058
|
-
function getValueByPath(response,
|
|
129059
|
-
if (!
|
|
129072
|
+
function getValueByPath(response, path17) {
|
|
129073
|
+
if (!path17) {
|
|
129060
129074
|
return void 0;
|
|
129061
129075
|
}
|
|
129062
|
-
const parts = getPathSegments(
|
|
129076
|
+
const parts = getPathSegments(path17);
|
|
129063
129077
|
if (parts.length === 0) {
|
|
129064
129078
|
return void 0;
|
|
129065
129079
|
}
|
|
@@ -129438,8 +129452,8 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
|
|
|
129438
129452
|
}
|
|
129439
129453
|
}
|
|
129440
129454
|
if (pathPart) {
|
|
129441
|
-
const
|
|
129442
|
-
newValue = getNestedValueFromObject(value,
|
|
129455
|
+
const path17 = pathPart.replace(/^\./, "");
|
|
129456
|
+
newValue = getNestedValueFromObject(value, path17);
|
|
129443
129457
|
} else {
|
|
129444
129458
|
newValue = value;
|
|
129445
129459
|
}
|
|
@@ -129946,7 +129960,8 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
|
|
|
129946
129960
|
response,
|
|
129947
129961
|
requestMethod: parsed.method,
|
|
129948
129962
|
requestUrl: resolvedUrl,
|
|
129949
|
-
variableName: parsed.varName
|
|
129963
|
+
variableName: parsed.varName,
|
|
129964
|
+
lineNumber: step.lineNumber
|
|
129950
129965
|
};
|
|
129951
129966
|
orderedSteps.push(stepResult);
|
|
129952
129967
|
reportProgress(stepIdx, "request", `var ${parsed.varName} = ${requestDescription}`, stepResult);
|
|
@@ -130131,8 +130146,8 @@ ${indentMultiline(userMessage)}`;
|
|
|
130131
130146
|
if (sequenceSources) {
|
|
130132
130147
|
const sourceFile = sequenceSources.get(targetName.toLowerCase());
|
|
130133
130148
|
if (sourceFile) {
|
|
130134
|
-
const
|
|
130135
|
-
subWorkingDir =
|
|
130149
|
+
const path17 = await import("path");
|
|
130150
|
+
subWorkingDir = path17.dirname(sourceFile);
|
|
130136
130151
|
}
|
|
130137
130152
|
}
|
|
130138
130153
|
const targetLocation = executionContext?.sequenceLocationIndex?.get(targetName.toLowerCase());
|
|
@@ -130238,7 +130253,8 @@ ${indentMultiline(userMessage)}`;
|
|
|
130238
130253
|
stepIndex: stepIdx,
|
|
130239
130254
|
response,
|
|
130240
130255
|
requestMethod: requestParsed.method,
|
|
130241
|
-
requestUrl: requestParsed.url
|
|
130256
|
+
requestUrl: requestParsed.url,
|
|
130257
|
+
lineNumber: step.lineNumber
|
|
130242
130258
|
};
|
|
130243
130259
|
orderedSteps.push(stepResult);
|
|
130244
130260
|
reportProgress(stepIdx, "namedRequest", `run ${targetName} \u2192 ${requestParsed.method} ${requestParsed.url}`, stepResult);
|
|
@@ -130350,7 +130366,8 @@ ${indentMultiline(userMessage)}`;
|
|
|
130350
130366
|
response,
|
|
130351
130367
|
requestMethod: requestParsed.method,
|
|
130352
130368
|
requestUrl: requestParsed.url,
|
|
130353
|
-
variableName: varName
|
|
130369
|
+
variableName: varName,
|
|
130370
|
+
lineNumber: step.lineNumber
|
|
130354
130371
|
};
|
|
130355
130372
|
orderedSteps.push(stepResult);
|
|
130356
130373
|
reportProgress(stepIdx, "namedRequest", `var ${varName} = run ${sequenceName} \u2192 ${requestParsed.method} ${requestParsed.url}`, stepResult);
|
|
@@ -130438,8 +130455,8 @@ ${indentMultiline(userMessage)}`;
|
|
|
130438
130455
|
if (sequenceSources) {
|
|
130439
130456
|
const sourceFile = sequenceSources.get(sequenceName.toLowerCase());
|
|
130440
130457
|
if (sourceFile) {
|
|
130441
|
-
const
|
|
130442
|
-
subWorkingDir =
|
|
130458
|
+
const path17 = await import("path");
|
|
130459
|
+
subWorkingDir = path17.dirname(sourceFile);
|
|
130443
130460
|
}
|
|
130444
130461
|
}
|
|
130445
130462
|
const targetLocation = executionContext?.sequenceLocationIndex?.get(sequenceName.toLowerCase());
|
|
@@ -130621,7 +130638,8 @@ ${indentMultiline(userMessage)}`;
|
|
|
130621
130638
|
stepIndex: stepIdx,
|
|
130622
130639
|
response,
|
|
130623
130640
|
requestMethod: parsed.method,
|
|
130624
|
-
requestUrl: parsed.url
|
|
130641
|
+
requestUrl: parsed.url,
|
|
130642
|
+
lineNumber: step.lineNumber
|
|
130625
130643
|
};
|
|
130626
130644
|
orderedSteps.push(stepResult);
|
|
130627
130645
|
reportProgress(stepIdx, "request", requestDescription, stepResult);
|
|
@@ -131276,7 +131294,7 @@ function formatRunSummary(results, totalDuration, colors) {
|
|
|
131276
131294
|
}
|
|
131277
131295
|
|
|
131278
131296
|
// src/cli/reporters/junit.ts
|
|
131279
|
-
var
|
|
131297
|
+
var fs14 = __toESM(require("fs"));
|
|
131280
131298
|
function escapeXml(text) {
|
|
131281
131299
|
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
131282
131300
|
}
|
|
@@ -131296,7 +131314,7 @@ function generateJUnitReport(results, options) {
|
|
|
131296
131314
|
xml += generateTestSuite(result, redaction);
|
|
131297
131315
|
}
|
|
131298
131316
|
xml += "</testsuites>\n";
|
|
131299
|
-
|
|
131317
|
+
fs14.writeFileSync(outputPath, xml, "utf-8");
|
|
131300
131318
|
}
|
|
131301
131319
|
function generateTestSuite(result, redaction) {
|
|
131302
131320
|
const assertions = result.assertionResults || [];
|
|
@@ -131422,11 +131440,11 @@ Response: ${bodyStr}`;
|
|
|
131422
131440
|
xml += " </testcase>\n";
|
|
131423
131441
|
xml += " </testsuite>\n";
|
|
131424
131442
|
xml += "</testsuites>\n";
|
|
131425
|
-
|
|
131443
|
+
fs14.writeFileSync(outputPath, xml, "utf-8");
|
|
131426
131444
|
}
|
|
131427
131445
|
|
|
131428
131446
|
// src/cli/reporters/html.ts
|
|
131429
|
-
var
|
|
131447
|
+
var fs15 = __toESM(require("fs"));
|
|
131430
131448
|
function escapeHtml(text) {
|
|
131431
131449
|
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
131432
131450
|
}
|
|
@@ -131538,7 +131556,7 @@ function generateHtmlReport(results, options) {
|
|
|
131538
131556
|
</script>
|
|
131539
131557
|
</body>
|
|
131540
131558
|
</html>`;
|
|
131541
|
-
|
|
131559
|
+
fs15.writeFileSync(outputPath, html, "utf-8");
|
|
131542
131560
|
}
|
|
131543
131561
|
function generateSequenceHtml(result, index, redaction) {
|
|
131544
131562
|
const statusClass = result.success ? "passed" : "failed";
|
|
@@ -131980,8 +131998,8 @@ function generateHtmlReportFromResponse(response, testName, options) {
|
|
|
131980
131998
|
}
|
|
131981
131999
|
|
|
131982
132000
|
// src/environmentParser.ts
|
|
131983
|
-
var
|
|
131984
|
-
var
|
|
132001
|
+
var fs17 = __toESM(require("fs"));
|
|
132002
|
+
var path13 = __toESM(require("path"));
|
|
131985
132003
|
|
|
131986
132004
|
// src/secrets/crypto.ts
|
|
131987
132005
|
var crypto7 = __toESM(require("crypto"));
|
|
@@ -132049,20 +132067,20 @@ function decryptSecretValue(encryptedValue, sharedKey) {
|
|
|
132049
132067
|
}
|
|
132050
132068
|
|
|
132051
132069
|
// src/secrets/keyStore.ts
|
|
132052
|
-
var
|
|
132053
|
-
var
|
|
132070
|
+
var fs16 = __toESM(require("fs"));
|
|
132071
|
+
var path12 = __toESM(require("path"));
|
|
132054
132072
|
var CACHE_FILE2 = "secret-keys.json";
|
|
132055
132073
|
var CACHE_VERSION2 = 1;
|
|
132056
132074
|
var CACHE_SCAN_IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", "out"]);
|
|
132057
132075
|
var sessionKeys = /* @__PURE__ */ new Map();
|
|
132058
132076
|
var projectSecretKeyCacheDirs = /* @__PURE__ */ new Map();
|
|
132059
132077
|
function getCacheFilePath(cacheDir) {
|
|
132060
|
-
return
|
|
132078
|
+
return path12.join(cacheDir, CACHE_FILE2);
|
|
132061
132079
|
}
|
|
132062
132080
|
function cacheFileExists(cacheDir) {
|
|
132063
132081
|
const cacheFilePath = getCacheFilePath(cacheDir);
|
|
132064
132082
|
try {
|
|
132065
|
-
return
|
|
132083
|
+
return fs16.existsSync(cacheFilePath) && fs16.statSync(cacheFilePath).isFile();
|
|
132066
132084
|
} catch {
|
|
132067
132085
|
return false;
|
|
132068
132086
|
}
|
|
@@ -132079,13 +132097,13 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
|
|
|
132079
132097
|
if (!dir) {
|
|
132080
132098
|
continue;
|
|
132081
132099
|
}
|
|
132082
|
-
const cacheDir =
|
|
132100
|
+
const cacheDir = path12.join(dir, NORN_CACHE_DIR);
|
|
132083
132101
|
if (cacheFileExists(cacheDir)) {
|
|
132084
132102
|
results.push(cacheDir);
|
|
132085
132103
|
}
|
|
132086
132104
|
let entries;
|
|
132087
132105
|
try {
|
|
132088
|
-
entries =
|
|
132106
|
+
entries = fs16.readdirSync(dir, { withFileTypes: true });
|
|
132089
132107
|
} catch {
|
|
132090
132108
|
continue;
|
|
132091
132109
|
}
|
|
@@ -132096,7 +132114,7 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
|
|
|
132096
132114
|
if (entry.name === NORN_CACHE_DIR || CACHE_SCAN_IGNORED_DIRS.has(entry.name)) {
|
|
132097
132115
|
continue;
|
|
132098
132116
|
}
|
|
132099
|
-
queue.push(
|
|
132117
|
+
queue.push(path12.join(dir, entry.name));
|
|
132100
132118
|
}
|
|
132101
132119
|
}
|
|
132102
132120
|
results.sort();
|
|
@@ -132104,11 +132122,11 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
|
|
|
132104
132122
|
return results;
|
|
132105
132123
|
}
|
|
132106
132124
|
function getCacheDistance(targetPath, cacheDir) {
|
|
132107
|
-
const relative5 =
|
|
132125
|
+
const relative5 = path12.relative(getSearchStartDirectory(targetPath), cacheDir);
|
|
132108
132126
|
if (!relative5 || relative5 === ".") {
|
|
132109
132127
|
return 0;
|
|
132110
132128
|
}
|
|
132111
|
-
return relative5.split(
|
|
132129
|
+
return relative5.split(path12.sep).filter((segment) => segment !== "").length;
|
|
132112
132130
|
}
|
|
132113
132131
|
function findExistingSecretKeyCacheDir(targetPath) {
|
|
132114
132132
|
const projectRoot = findProjectRoot(targetPath);
|
|
@@ -132135,9 +132153,9 @@ function rememberSecretKeyCacheDir(targetPath, cacheDir) {
|
|
|
132135
132153
|
function ensureCacheDir(targetPath) {
|
|
132136
132154
|
const existing = findExistingSecretKeyCacheDir(targetPath);
|
|
132137
132155
|
const projectRoot = findProjectRoot(targetPath);
|
|
132138
|
-
const cacheDir = existing ??
|
|
132139
|
-
if (!
|
|
132140
|
-
|
|
132156
|
+
const cacheDir = existing ?? path12.join(projectRoot, NORN_CACHE_DIR);
|
|
132157
|
+
if (!fs16.existsSync(cacheDir)) {
|
|
132158
|
+
fs16.mkdirSync(cacheDir, { recursive: true });
|
|
132141
132159
|
}
|
|
132142
132160
|
ensureNornCacheGitignore(cacheDir);
|
|
132143
132161
|
rememberSecretKeyCacheDir(targetPath, cacheDir);
|
|
@@ -132149,8 +132167,8 @@ function getReadCachePath(targetPath) {
|
|
|
132149
132167
|
return getCacheFilePath(existing);
|
|
132150
132168
|
}
|
|
132151
132169
|
const projectRoot = findProjectRoot(targetPath);
|
|
132152
|
-
const projectCacheDir =
|
|
132153
|
-
if (
|
|
132170
|
+
const projectCacheDir = path12.join(projectRoot, NORN_CACHE_DIR);
|
|
132171
|
+
if (fs16.existsSync(projectCacheDir) && fs16.statSync(projectCacheDir).isDirectory()) {
|
|
132154
132172
|
return getCacheFilePath(projectCacheDir);
|
|
132155
132173
|
}
|
|
132156
132174
|
return void 0;
|
|
@@ -132160,11 +132178,11 @@ function getWriteCachePath(targetPath) {
|
|
|
132160
132178
|
}
|
|
132161
132179
|
function readCache(targetPath) {
|
|
132162
132180
|
const cachePath = getReadCachePath(targetPath);
|
|
132163
|
-
if (!cachePath || !
|
|
132181
|
+
if (!cachePath || !fs16.existsSync(cachePath)) {
|
|
132164
132182
|
return { version: CACHE_VERSION2, keys: {} };
|
|
132165
132183
|
}
|
|
132166
132184
|
try {
|
|
132167
|
-
const parsed = JSON.parse(
|
|
132185
|
+
const parsed = JSON.parse(fs16.readFileSync(cachePath, "utf8"));
|
|
132168
132186
|
if (parsed.version !== CACHE_VERSION2 || typeof parsed.keys !== "object" || parsed.keys === null) {
|
|
132169
132187
|
return { version: CACHE_VERSION2, keys: {} };
|
|
132170
132188
|
}
|
|
@@ -132175,9 +132193,9 @@ function readCache(targetPath) {
|
|
|
132175
132193
|
}
|
|
132176
132194
|
function writeCache(targetPath, cache) {
|
|
132177
132195
|
const cachePath = getWriteCachePath(targetPath);
|
|
132178
|
-
|
|
132196
|
+
fs16.writeFileSync(cachePath, JSON.stringify(cache, null, 2), { encoding: "utf8", mode: 384 });
|
|
132179
132197
|
try {
|
|
132180
|
-
|
|
132198
|
+
fs16.chmodSync(cachePath, 384);
|
|
132181
132199
|
} catch {
|
|
132182
132200
|
}
|
|
132183
132201
|
}
|
|
@@ -132368,22 +132386,22 @@ function parseEnvFile(content, sourceFilePath) {
|
|
|
132368
132386
|
return config2;
|
|
132369
132387
|
}
|
|
132370
132388
|
function getEnvSearchStartDirectory(targetPath) {
|
|
132371
|
-
const resolvedPath =
|
|
132389
|
+
const resolvedPath = path13.resolve(targetPath);
|
|
132372
132390
|
try {
|
|
132373
|
-
const stats =
|
|
132374
|
-
return stats.isDirectory() ? resolvedPath :
|
|
132391
|
+
const stats = fs17.statSync(resolvedPath);
|
|
132392
|
+
return stats.isDirectory() ? resolvedPath : path13.dirname(resolvedPath);
|
|
132375
132393
|
} catch {
|
|
132376
|
-
return
|
|
132394
|
+
return path13.dirname(resolvedPath);
|
|
132377
132395
|
}
|
|
132378
132396
|
}
|
|
132379
132397
|
function findEnvFileFromPath(filePath) {
|
|
132380
132398
|
let dir = getEnvSearchStartDirectory(filePath);
|
|
132381
132399
|
while (true) {
|
|
132382
|
-
const envPath =
|
|
132383
|
-
if (
|
|
132400
|
+
const envPath = path13.join(dir, ENV_FILENAME);
|
|
132401
|
+
if (fs17.existsSync(envPath)) {
|
|
132384
132402
|
return envPath;
|
|
132385
132403
|
}
|
|
132386
|
-
const parentDir =
|
|
132404
|
+
const parentDir = path13.dirname(dir);
|
|
132387
132405
|
if (parentDir === dir) {
|
|
132388
132406
|
break;
|
|
132389
132407
|
}
|
|
@@ -132408,7 +132426,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile2, impor
|
|
|
132408
132426
|
}
|
|
132409
132427
|
for (const imp of config2.imports) {
|
|
132410
132428
|
const resolvedImportPath = resolveImportPath(imp.path, baseDir);
|
|
132411
|
-
if (!resolvedImportPath || !
|
|
132429
|
+
if (!resolvedImportPath || !fs17.existsSync(resolvedImportPath)) {
|
|
132412
132430
|
errors.push({
|
|
132413
132431
|
message: `Imported file not found: '${imp.path}'`,
|
|
132414
132432
|
filePath: entryFilePath,
|
|
@@ -132424,10 +132442,10 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile2, impor
|
|
|
132424
132442
|
});
|
|
132425
132443
|
continue;
|
|
132426
132444
|
}
|
|
132427
|
-
const normalizedPath =
|
|
132445
|
+
const normalizedPath = path13.resolve(resolvedImportPath);
|
|
132428
132446
|
if (stack.includes(normalizedPath)) {
|
|
132429
|
-
const entryDir =
|
|
132430
|
-
const cycle = [...stack, normalizedPath].map((p) =>
|
|
132447
|
+
const entryDir = path13.dirname(stack[0]);
|
|
132448
|
+
const cycle = [...stack, normalizedPath].map((p) => path13.relative(entryDir, p) || path13.basename(p)).join(" \u2192 ");
|
|
132431
132449
|
errors.push({
|
|
132432
132450
|
message: `Circular import detected: ${cycle}`,
|
|
132433
132451
|
filePath: entryFilePath,
|
|
@@ -132456,7 +132474,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile2, impor
|
|
|
132456
132474
|
if (importedConfig.imports.length > 0) {
|
|
132457
132475
|
const childResult = resolveNornenvImports(
|
|
132458
132476
|
importedConfig,
|
|
132459
|
-
|
|
132477
|
+
path13.dirname(normalizedPath),
|
|
132460
132478
|
normalizedPath,
|
|
132461
132479
|
readFile2,
|
|
132462
132480
|
[...stack, normalizedPath],
|
|
@@ -132474,7 +132492,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile2, impor
|
|
|
132474
132492
|
}
|
|
132475
132493
|
function resolveImportPath(importPath, baseDir) {
|
|
132476
132494
|
const cleaned = importPath.replace(/^["']|["']$/g, "");
|
|
132477
|
-
return
|
|
132495
|
+
return path13.resolve(baseDir, cleaned);
|
|
132478
132496
|
}
|
|
132479
132497
|
function registerVariableOrigins(config2, filePath, origins) {
|
|
132480
132498
|
for (const varName of Object.keys(config2.common)) {
|
|
@@ -132538,12 +132556,12 @@ function mergeConfigs(target, source, targetFilePath, sourceFilePath, variableOr
|
|
|
132538
132556
|
}
|
|
132539
132557
|
}
|
|
132540
132558
|
function toDisplayPath(filePath, entryFilePath) {
|
|
132541
|
-
const entryDir =
|
|
132542
|
-
const relative5 =
|
|
132543
|
-
return relative5 && relative5 !== "" ? relative5 :
|
|
132559
|
+
const entryDir = path13.dirname(entryFilePath);
|
|
132560
|
+
const relative5 = path13.relative(entryDir, filePath);
|
|
132561
|
+
return relative5 && relative5 !== "" ? relative5 : path13.basename(filePath);
|
|
132544
132562
|
}
|
|
132545
132563
|
function loadAndResolveEnvFile(filePath) {
|
|
132546
|
-
const content =
|
|
132564
|
+
const content = fs17.readFileSync(filePath, "utf-8");
|
|
132547
132565
|
const config2 = parseEnvFile(content, filePath);
|
|
132548
132566
|
if (config2.imports.length === 0) {
|
|
132549
132567
|
const secretErrors = resolveEncryptedSecretValues(config2, filePath);
|
|
@@ -132551,9 +132569,9 @@ function loadAndResolveEnvFile(filePath) {
|
|
|
132551
132569
|
}
|
|
132552
132570
|
const result = resolveNornenvImports(
|
|
132553
132571
|
config2,
|
|
132554
|
-
|
|
132572
|
+
path13.dirname(filePath),
|
|
132555
132573
|
filePath,
|
|
132556
|
-
(p) =>
|
|
132574
|
+
(p) => fs17.readFileSync(p, "utf-8")
|
|
132557
132575
|
);
|
|
132558
132576
|
result.secretErrors.push(...resolveEncryptedSecretValues(result.config, filePath));
|
|
132559
132577
|
return result;
|
|
@@ -132619,14 +132637,14 @@ function resolveEncryptedSecretValues(config2, entryFilePath) {
|
|
|
132619
132637
|
}
|
|
132620
132638
|
|
|
132621
132639
|
// src/secrets/cliSecrets.ts
|
|
132622
|
-
var
|
|
132623
|
-
var
|
|
132640
|
+
var fs19 = __toESM(require("fs"));
|
|
132641
|
+
var path15 = __toESM(require("path"));
|
|
132624
132642
|
var readline = __toESM(require("readline"));
|
|
132625
132643
|
var import_process = require("process");
|
|
132626
132644
|
|
|
132627
132645
|
// src/secrets/envFileSecrets.ts
|
|
132628
|
-
var
|
|
132629
|
-
var
|
|
132646
|
+
var fs18 = __toESM(require("fs"));
|
|
132647
|
+
var path14 = __toESM(require("path"));
|
|
132630
132648
|
var envRegex2 = /^\s*\[env:([a-zA-Z_][a-zA-Z0-9_-]*)\]\s*$/;
|
|
132631
132649
|
var secretConnectionStringRegex2 = /^(\s*secret\s+connectionString\s+)([a-zA-Z_][a-zA-Z0-9_]*)(\s*=\s*)(.+)$/;
|
|
132632
132650
|
var secretRegex2 = /^(\s*secret\s+)([a-zA-Z_][a-zA-Z0-9_]*)(\s*=\s*)(.+)$/;
|
|
@@ -132637,7 +132655,7 @@ function detectEol(content) {
|
|
|
132637
132655
|
return content.includes("\r\n") ? "\r\n" : "\n";
|
|
132638
132656
|
}
|
|
132639
132657
|
function isNornenvFilePath(filePath) {
|
|
132640
|
-
return
|
|
132658
|
+
return path14.basename(filePath).toLowerCase() === ".nornenv";
|
|
132641
132659
|
}
|
|
132642
132660
|
function extractSecretLines(content, filePath) {
|
|
132643
132661
|
const lines = splitContentLines(content);
|
|
@@ -132711,7 +132729,7 @@ function findSecretLine(content, variableName, envName) {
|
|
|
132711
132729
|
return secretLines.find((secret) => secret.name === variableName);
|
|
132712
132730
|
}
|
|
132713
132731
|
function loadSecretLine(filePath, variableName, envName) {
|
|
132714
|
-
const content =
|
|
132732
|
+
const content = fs18.readFileSync(filePath, "utf8");
|
|
132715
132733
|
const secret = findSecretLine(content, variableName, envName);
|
|
132716
132734
|
if (!secret) {
|
|
132717
132735
|
const envLabel = envName ? ` in [env:${envName}]` : "";
|
|
@@ -132720,22 +132738,22 @@ function loadSecretLine(filePath, variableName, envName) {
|
|
|
132720
132738
|
return { content, secret };
|
|
132721
132739
|
}
|
|
132722
132740
|
function writeSecretLine(filePath, content) {
|
|
132723
|
-
|
|
132741
|
+
fs18.writeFileSync(filePath, content, "utf8");
|
|
132724
132742
|
}
|
|
132725
132743
|
function discoverNornenvFiles(targetPath) {
|
|
132726
|
-
const resolved =
|
|
132727
|
-
if (!
|
|
132744
|
+
const resolved = path14.resolve(targetPath);
|
|
132745
|
+
if (!fs18.existsSync(resolved)) {
|
|
132728
132746
|
return [];
|
|
132729
132747
|
}
|
|
132730
|
-
const stats =
|
|
132748
|
+
const stats = fs18.statSync(resolved);
|
|
132731
132749
|
if (stats.isFile()) {
|
|
132732
132750
|
return isNornenvFilePath(resolved) ? [resolved] : [];
|
|
132733
132751
|
}
|
|
132734
132752
|
const results = [];
|
|
132735
132753
|
const walk = (dir) => {
|
|
132736
|
-
const entries =
|
|
132754
|
+
const entries = fs18.readdirSync(dir, { withFileTypes: true });
|
|
132737
132755
|
for (const entry of entries) {
|
|
132738
|
-
const fullPath =
|
|
132756
|
+
const fullPath = path14.join(dir, entry.name);
|
|
132739
132757
|
if (entry.isDirectory()) {
|
|
132740
132758
|
if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist" || entry.name === "out") {
|
|
132741
132759
|
continue;
|
|
@@ -132772,8 +132790,8 @@ async function promptLine(question) {
|
|
|
132772
132790
|
}
|
|
132773
132791
|
const rl = readline.createInterface({ input: import_process.stdin, output: import_process.stdout });
|
|
132774
132792
|
try {
|
|
132775
|
-
const answer = await new Promise((
|
|
132776
|
-
rl.question(question,
|
|
132793
|
+
const answer = await new Promise((resolve14) => {
|
|
132794
|
+
rl.question(question, resolve14);
|
|
132777
132795
|
});
|
|
132778
132796
|
const trimmed = answer.trim();
|
|
132779
132797
|
return trimmed === "" ? void 0 : trimmed;
|
|
@@ -132794,8 +132812,8 @@ function formatSecretError(err, envFilePath) {
|
|
|
132794
132812
|
if (!envFilePath) {
|
|
132795
132813
|
return `${err.message}`;
|
|
132796
132814
|
}
|
|
132797
|
-
const relative5 =
|
|
132798
|
-
const fileLabel = relative5 && relative5 !== "" ? relative5 :
|
|
132815
|
+
const relative5 = path15.relative(path15.dirname(envFilePath), err.filePath);
|
|
132816
|
+
const fileLabel = relative5 && relative5 !== "" ? relative5 : path15.basename(err.filePath);
|
|
132799
132817
|
const lineLabel = err.line >= 0 ? `${fileLabel}:${err.line + 1}` : fileLabel;
|
|
132800
132818
|
return `${lineLabel} - ${err.message}`;
|
|
132801
132819
|
}
|
|
@@ -132891,7 +132909,7 @@ async function handleEncrypt(args) {
|
|
|
132891
132909
|
console.error(`Error: encrypt requires --file and --var.`);
|
|
132892
132910
|
return 1;
|
|
132893
132911
|
}
|
|
132894
|
-
const absoluteFilePath =
|
|
132912
|
+
const absoluteFilePath = path15.resolve(filePath);
|
|
132895
132913
|
const { content, secret } = loadSecretLine(absoluteFilePath, variableName, envName);
|
|
132896
132914
|
if (secret.encrypted) {
|
|
132897
132915
|
console.error(`Error: Secret '${variableName}' is already encrypted. Use rotate instead.`);
|
|
@@ -132923,7 +132941,7 @@ async function handleRotate(args) {
|
|
|
132923
132941
|
console.error(`Error: rotate requires --file and --var.`);
|
|
132924
132942
|
return 1;
|
|
132925
132943
|
}
|
|
132926
|
-
const absoluteFilePath =
|
|
132944
|
+
const absoluteFilePath = path15.resolve(filePath);
|
|
132927
132945
|
const { content, secret } = loadSecretLine(absoluteFilePath, variableName, envName);
|
|
132928
132946
|
let kid = explicitKid;
|
|
132929
132947
|
if (!kid && secret.encrypted) {
|
|
@@ -132954,7 +132972,7 @@ async function handleRotate(args) {
|
|
|
132954
132972
|
}
|
|
132955
132973
|
async function handleRekey(args) {
|
|
132956
132974
|
const positional = args.filter((arg) => !arg.startsWith("-"));
|
|
132957
|
-
const targetPath = positional[0] ?
|
|
132975
|
+
const targetPath = positional[0] ? path15.resolve(positional[0]) : process.cwd();
|
|
132958
132976
|
const targetKid = getFlagValue(args, "--kid");
|
|
132959
132977
|
const files = discoverNornenvFiles(targetPath);
|
|
132960
132978
|
if (files.length === 0) {
|
|
@@ -132964,7 +132982,7 @@ async function handleRekey(args) {
|
|
|
132964
132982
|
let updatedFiles = 0;
|
|
132965
132983
|
let updatedSecrets = 0;
|
|
132966
132984
|
for (const filePath of files) {
|
|
132967
|
-
const original =
|
|
132985
|
+
const original = fs19.readFileSync(filePath, "utf8");
|
|
132968
132986
|
const secretLines = extractSecretLines(original, filePath);
|
|
132969
132987
|
if (secretLines.length === 0) {
|
|
132970
132988
|
continue;
|
|
@@ -133015,7 +133033,7 @@ async function handleRekey(args) {
|
|
|
133015
133033
|
updatedSecrets += 1;
|
|
133016
133034
|
}
|
|
133017
133035
|
if (updated !== original) {
|
|
133018
|
-
|
|
133036
|
+
fs19.writeFileSync(filePath, updated, "utf8");
|
|
133019
133037
|
updatedFiles += 1;
|
|
133020
133038
|
}
|
|
133021
133039
|
}
|
|
@@ -133024,7 +133042,7 @@ async function handleRekey(args) {
|
|
|
133024
133042
|
}
|
|
133025
133043
|
async function handleAudit(args) {
|
|
133026
133044
|
const positional = args.filter((arg) => !arg.startsWith("-"));
|
|
133027
|
-
const targetPath = positional[0] ?
|
|
133045
|
+
const targetPath = positional[0] ? path15.resolve(positional[0]) : process.cwd();
|
|
133028
133046
|
const files = discoverNornenvFiles(targetPath);
|
|
133029
133047
|
if (files.length === 0) {
|
|
133030
133048
|
console.log(`No .nornenv files found under ${targetPath}`);
|
|
@@ -133032,7 +133050,7 @@ async function handleAudit(args) {
|
|
|
133032
133050
|
}
|
|
133033
133051
|
const issues = [];
|
|
133034
133052
|
for (const filePath of files) {
|
|
133035
|
-
const content =
|
|
133053
|
+
const content = fs19.readFileSync(filePath, "utf8");
|
|
133036
133054
|
const secrets = extractSecretLines(content, filePath);
|
|
133037
133055
|
for (const secret of secrets) {
|
|
133038
133056
|
if (!secret.encrypted) {
|
|
@@ -133119,9 +133137,9 @@ function printSecretResolutionErrors(errors, envFilePath) {
|
|
|
133119
133137
|
|
|
133120
133138
|
// src/cli.ts
|
|
133121
133139
|
function formatNornenvErrorLocation(rootEnvFilePath, errorFilePath, line2) {
|
|
133122
|
-
const baseDir =
|
|
133123
|
-
const relativePath =
|
|
133124
|
-
const fileLabel = relativePath && relativePath !== "" ? relativePath :
|
|
133140
|
+
const baseDir = path16.dirname(rootEnvFilePath);
|
|
133141
|
+
const relativePath = path16.relative(baseDir, errorFilePath);
|
|
133142
|
+
const fileLabel = relativePath && relativePath !== "" ? relativePath : path16.basename(errorFilePath);
|
|
133125
133143
|
return line2 >= 0 ? `${fileLabel}:${line2 + 1}` : fileLabel;
|
|
133126
133144
|
}
|
|
133127
133145
|
function resolveEnvironmentForPath(targetPath, selectedEnv) {
|
|
@@ -133203,10 +133221,10 @@ function generateTimestamp() {
|
|
|
133203
133221
|
return `${year}-${month}-${day}-${hours}${minutes}${seconds}`;
|
|
133204
133222
|
}
|
|
133205
133223
|
function generateReportPaths(outputDir, inputFile, timestamp) {
|
|
133206
|
-
const baseName =
|
|
133224
|
+
const baseName = path16.basename(inputFile, path16.extname(inputFile));
|
|
133207
133225
|
return {
|
|
133208
|
-
junitPath:
|
|
133209
|
-
htmlPath:
|
|
133226
|
+
junitPath: path16.join(outputDir, `${baseName}-${timestamp}-results.xml`),
|
|
133227
|
+
htmlPath: path16.join(outputDir, `${baseName}-${timestamp}-report.html`)
|
|
133210
133228
|
};
|
|
133211
133229
|
}
|
|
133212
133230
|
function parseArgs(args) {
|
|
@@ -133471,9 +133489,9 @@ async function runSingleRequest(fileContent, variables, cookieJar, apiDefinition
|
|
|
133471
133489
|
function discoverNornFiles(dirPath) {
|
|
133472
133490
|
const files = [];
|
|
133473
133491
|
function walkDir(currentPath) {
|
|
133474
|
-
const entries =
|
|
133492
|
+
const entries = fs20.readdirSync(currentPath, { withFileTypes: true });
|
|
133475
133493
|
for (const entry of entries) {
|
|
133476
|
-
const fullPath =
|
|
133494
|
+
const fullPath = path16.join(currentPath, entry.name);
|
|
133477
133495
|
if (entry.isDirectory()) {
|
|
133478
133496
|
if (!entry.name.startsWith(".") && entry.name !== "node_modules") {
|
|
133479
133497
|
walkDir(fullPath);
|
|
@@ -133493,7 +133511,7 @@ function countTestSequences(fileContent, tagFilterOptions) {
|
|
|
133493
133511
|
return { total: testSequences.length, filtered };
|
|
133494
133512
|
}
|
|
133495
133513
|
async function loadTheoryFile(theoryPath, workingDir) {
|
|
133496
|
-
const absolutePath =
|
|
133514
|
+
const absolutePath = path16.resolve(workingDir, theoryPath);
|
|
133497
133515
|
const content = await fsPromises.readFile(absolutePath, "utf-8");
|
|
133498
133516
|
return JSON.parse(content);
|
|
133499
133517
|
}
|
|
@@ -133614,12 +133632,12 @@ async function main() {
|
|
|
133614
133632
|
if (options.insecure) {
|
|
133615
133633
|
console.error(colors.warning("Warning: TLS certificate verification is disabled (--insecure). Use this only for local development."));
|
|
133616
133634
|
}
|
|
133617
|
-
const inputPath =
|
|
133618
|
-
if (!
|
|
133635
|
+
const inputPath = path16.resolve(options.file);
|
|
133636
|
+
if (!fs20.existsSync(inputPath)) {
|
|
133619
133637
|
console.error(`Error: Path not found: ${inputPath}`);
|
|
133620
133638
|
process.exit(1);
|
|
133621
133639
|
}
|
|
133622
|
-
const isDirectory =
|
|
133640
|
+
const isDirectory = fs20.statSync(inputPath).isDirectory();
|
|
133623
133641
|
let filesToRun;
|
|
133624
133642
|
if (isDirectory) {
|
|
133625
133643
|
filesToRun = discoverNornFiles(inputPath);
|
|
@@ -133686,11 +133704,11 @@ async function main() {
|
|
|
133686
133704
|
}
|
|
133687
133705
|
mergeSecrets(combinedSecretNames, combinedSecretValues, resolvedEnv.secretNames, resolvedEnv.secretValues);
|
|
133688
133706
|
const redaction2 = createRedactionOptions(combinedSecretNames, combinedSecretValues, !options.noRedact);
|
|
133689
|
-
const fileContent =
|
|
133707
|
+
const fileContent = fs20.readFileSync(filePath, "utf-8");
|
|
133690
133708
|
const fileVariables = extractFileLevelVariables(fileContent);
|
|
133691
133709
|
const variables = attachEnvironmentScope({ ...resolvedEnv.variables, ...fileVariables }, resolvedEnv.variables);
|
|
133692
133710
|
const cookieJar = createCookieJar();
|
|
133693
|
-
const workingDir =
|
|
133711
|
+
const workingDir = path16.dirname(filePath);
|
|
133694
133712
|
const importResult = await resolveImports(
|
|
133695
133713
|
fileContent,
|
|
133696
133714
|
workingDir,
|
|
@@ -133858,7 +133876,7 @@ ${fileContent}` : fileContent;
|
|
|
133858
133876
|
let totalTestCount = 0;
|
|
133859
133877
|
let filteredTestCount = 0;
|
|
133860
133878
|
for (const filePath of filesToRun) {
|
|
133861
|
-
const fileContent =
|
|
133879
|
+
const fileContent = fs20.readFileSync(filePath, "utf-8");
|
|
133862
133880
|
const counts = countTestSequences(fileContent, tagFilterOptions);
|
|
133863
133881
|
totalTestCount += counts.total;
|
|
133864
133882
|
filteredTestCount += counts.filtered;
|
|
@@ -133900,16 +133918,16 @@ ${fileContent}` : fileContent;
|
|
|
133900
133918
|
process.exit(1);
|
|
133901
133919
|
}
|
|
133902
133920
|
if (!resolvedEnv.envFilePath && options.env) {
|
|
133903
|
-
const relPath = isDirectory ?
|
|
133921
|
+
const relPath = isDirectory ? path16.relative(inputPath, filePath) : path16.basename(filePath);
|
|
133904
133922
|
console.error(colors.warning(`Warning: --env specified but no .nornenv file found for ${relPath}`));
|
|
133905
133923
|
}
|
|
133906
133924
|
mergeSecrets(combinedSecretNames, combinedSecretValues, resolvedEnv.secretNames, resolvedEnv.secretValues);
|
|
133907
133925
|
const redaction2 = createRedactionOptions(combinedSecretNames, combinedSecretValues, !options.noRedact);
|
|
133908
|
-
const fileContent =
|
|
133926
|
+
const fileContent = fs20.readFileSync(filePath, "utf-8");
|
|
133909
133927
|
const fileVariables = extractFileLevelVariables(fileContent);
|
|
133910
133928
|
const variables = attachEnvironmentScope({ ...resolvedEnv.variables, ...fileVariables }, resolvedEnv.variables);
|
|
133911
133929
|
const cookieJar = createCookieJar();
|
|
133912
|
-
const workingDir =
|
|
133930
|
+
const workingDir = path16.dirname(filePath);
|
|
133913
133931
|
const importResult = await resolveImports(
|
|
133914
133932
|
fileContent,
|
|
133915
133933
|
workingDir,
|
|
@@ -133942,7 +133960,7 @@ ${fileContent}` : fileContent;
|
|
|
133942
133960
|
continue;
|
|
133943
133961
|
}
|
|
133944
133962
|
if (isDirectory && options.output !== "json") {
|
|
133945
|
-
const relPath =
|
|
133963
|
+
const relPath = path16.relative(inputPath, filePath);
|
|
133946
133964
|
console.log(colors.info(`
|
|
133947
133965
|
\u2501\u2501\u2501 ${relPath} \u2501\u2501\u2501`));
|
|
133948
133966
|
}
|
|
@@ -133987,7 +134005,7 @@ ${fileContent}` : fileContent;
|
|
|
133987
134005
|
let htmlOutputPath = options.htmlOutput;
|
|
133988
134006
|
if (options.outputDir) {
|
|
133989
134007
|
const timestamp = generateTimestamp();
|
|
133990
|
-
const baseName = isDirectory ?
|
|
134008
|
+
const baseName = isDirectory ? path16.basename(inputPath) : path16.basename(inputPath, path16.extname(inputPath));
|
|
133991
134009
|
const generatedPaths = generateReportPaths(options.outputDir, baseName + ".norn", timestamp);
|
|
133992
134010
|
if (!junitOutputPath) {
|
|
133993
134011
|
junitOutputPath = generatedPaths.junitPath;
|
|
@@ -133995,12 +134013,12 @@ ${fileContent}` : fileContent;
|
|
|
133995
134013
|
if (!htmlOutputPath) {
|
|
133996
134014
|
htmlOutputPath = generatedPaths.htmlPath;
|
|
133997
134015
|
}
|
|
133998
|
-
if (!
|
|
133999
|
-
|
|
134016
|
+
if (!fs20.existsSync(options.outputDir)) {
|
|
134017
|
+
fs20.mkdirSync(options.outputDir, { recursive: true });
|
|
134000
134018
|
}
|
|
134001
134019
|
}
|
|
134002
134020
|
if (junitOutputPath) {
|
|
134003
|
-
const suiteName = isDirectory ?
|
|
134021
|
+
const suiteName = isDirectory ? path16.basename(inputPath) : path16.basename(inputPath, path16.extname(inputPath));
|
|
134004
134022
|
if (result.type === "request") {
|
|
134005
134023
|
generateJUnitReportFromResponse(
|
|
134006
134024
|
result.results[0],
|
|
@@ -134016,11 +134034,11 @@ ${fileContent}` : fileContent;
|
|
|
134016
134034
|
console.log(colors.info(`JUnit report written to: ${junitOutputPath}`));
|
|
134017
134035
|
}
|
|
134018
134036
|
if (htmlOutputPath) {
|
|
134019
|
-
const title = `Norn Test Report - ${
|
|
134037
|
+
const title = `Norn Test Report - ${path16.basename(inputPath)}`;
|
|
134020
134038
|
if (result.type === "request") {
|
|
134021
134039
|
generateHtmlReportFromResponse(
|
|
134022
134040
|
result.results[0],
|
|
134023
|
-
options.request ||
|
|
134041
|
+
options.request || path16.basename(inputPath),
|
|
134024
134042
|
{ outputPath: htmlOutputPath, redaction, title }
|
|
134025
134043
|
);
|
|
134026
134044
|
} else {
|