@hypertestco/node-sdk-v3 0.0.1-21 → 0.0.1-23
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/helpers/getUncommittedChanges.d.ts +1 -0
- package/helpers/isCurrentFolderAGitRepo.d.ts +1 -0
- package/helpers/isHavingUncommittedChanges.d.ts +1 -0
- package/index.cjs +345 -265
- package/index.mjs +346 -266
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -49538,13 +49538,13 @@ var require_B3MultiPropagator = __commonJS({
|
|
|
49538
49538
|
return "";
|
|
49539
49539
|
}
|
|
49540
49540
|
function getDebug(carrier, getter) {
|
|
49541
|
-
const
|
|
49542
|
-
return
|
|
49541
|
+
const debug24 = getHeaderValue(carrier, getter, constants_1.X_B3_FLAGS);
|
|
49542
|
+
return debug24 === "1" ? "1" : void 0;
|
|
49543
49543
|
}
|
|
49544
49544
|
function getTraceFlags(carrier, getter) {
|
|
49545
49545
|
const traceFlags = getHeaderValue(carrier, getter, constants_1.X_B3_SAMPLED);
|
|
49546
|
-
const
|
|
49547
|
-
if (
|
|
49546
|
+
const debug24 = getDebug(carrier, getter);
|
|
49547
|
+
if (debug24 === "1" || VALID_SAMPLED_VALUES.has(traceFlags)) {
|
|
49548
49548
|
return api_1.TraceFlags.SAMPLED;
|
|
49549
49549
|
}
|
|
49550
49550
|
if (traceFlags === void 0 || VALID_UNSAMPLED_VALUES.has(traceFlags)) {
|
|
@@ -49557,11 +49557,11 @@ var require_B3MultiPropagator = __commonJS({
|
|
|
49557
49557
|
const spanContext = api_1.trace.getSpanContext(context54);
|
|
49558
49558
|
if (!spanContext || !(0, api_1.isSpanContextValid)(spanContext) || (0, core_1.isTracingSuppressed)(context54))
|
|
49559
49559
|
return;
|
|
49560
|
-
const
|
|
49560
|
+
const debug24 = context54.getValue(common_1.B3_DEBUG_FLAG_KEY);
|
|
49561
49561
|
setter.set(carrier, constants_1.X_B3_TRACE_ID, spanContext.traceId);
|
|
49562
49562
|
setter.set(carrier, constants_1.X_B3_SPAN_ID, spanContext.spanId);
|
|
49563
|
-
if (
|
|
49564
|
-
setter.set(carrier, constants_1.X_B3_FLAGS,
|
|
49563
|
+
if (debug24 === "1") {
|
|
49564
|
+
setter.set(carrier, constants_1.X_B3_FLAGS, debug24);
|
|
49565
49565
|
} else if (spanContext.traceFlags !== void 0) {
|
|
49566
49566
|
setter.set(carrier, constants_1.X_B3_SAMPLED, (api_1.TraceFlags.SAMPLED & spanContext.traceFlags) === api_1.TraceFlags.SAMPLED ? "1" : "0");
|
|
49567
49567
|
}
|
|
@@ -49570,9 +49570,9 @@ var require_B3MultiPropagator = __commonJS({
|
|
|
49570
49570
|
const traceId = getTraceId(carrier, getter);
|
|
49571
49571
|
const spanId = getSpanId(carrier, getter);
|
|
49572
49572
|
const traceFlags = getTraceFlags(carrier, getter);
|
|
49573
|
-
const
|
|
49573
|
+
const debug24 = getDebug(carrier, getter);
|
|
49574
49574
|
if ((0, api_1.isValidTraceId)(traceId) && (0, api_1.isValidSpanId)(spanId) && isValidSampledValue(traceFlags)) {
|
|
49575
|
-
context54 = context54.setValue(common_1.B3_DEBUG_FLAG_KEY,
|
|
49575
|
+
context54 = context54.setValue(common_1.B3_DEBUG_FLAG_KEY, debug24);
|
|
49576
49576
|
return api_1.trace.setSpanContext(context54, {
|
|
49577
49577
|
traceId,
|
|
49578
49578
|
spanId,
|
|
@@ -51179,9 +51179,9 @@ var require_constants4 = __commonJS({
|
|
|
51179
51179
|
// ../../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/debug.js
|
|
51180
51180
|
var require_debug = __commonJS({
|
|
51181
51181
|
"../../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
51182
|
-
var
|
|
51182
|
+
var debug24 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
51183
51183
|
};
|
|
51184
|
-
module2.exports =
|
|
51184
|
+
module2.exports = debug24;
|
|
51185
51185
|
}
|
|
51186
51186
|
});
|
|
51187
51187
|
|
|
@@ -51193,7 +51193,7 @@ var require_re = __commonJS({
|
|
|
51193
51193
|
MAX_SAFE_BUILD_LENGTH,
|
|
51194
51194
|
MAX_LENGTH
|
|
51195
51195
|
} = require_constants4();
|
|
51196
|
-
var
|
|
51196
|
+
var debug24 = require_debug();
|
|
51197
51197
|
exports2 = module2.exports = {};
|
|
51198
51198
|
var re2 = exports2.re = [];
|
|
51199
51199
|
var safeRe = exports2.safeRe = [];
|
|
@@ -51216,7 +51216,7 @@ var require_re = __commonJS({
|
|
|
51216
51216
|
var createToken = (name, value, isGlobal) => {
|
|
51217
51217
|
const safe = makeSafeRegex(value);
|
|
51218
51218
|
const index = R2++;
|
|
51219
|
-
|
|
51219
|
+
debug24(name, index, value);
|
|
51220
51220
|
t[name] = index;
|
|
51221
51221
|
src[index] = value;
|
|
51222
51222
|
safeSrc[index] = safe;
|
|
@@ -51314,7 +51314,7 @@ var require_identifiers = __commonJS({
|
|
|
51314
51314
|
// ../../node_modules/.pnpm/semver@7.7.1/node_modules/semver/classes/semver.js
|
|
51315
51315
|
var require_semver2 = __commonJS({
|
|
51316
51316
|
"../../node_modules/.pnpm/semver@7.7.1/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
51317
|
-
var
|
|
51317
|
+
var debug24 = require_debug();
|
|
51318
51318
|
var { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2 } = require_constants4();
|
|
51319
51319
|
var { safeRe: re2, safeSrc: src, t } = require_re();
|
|
51320
51320
|
var parseOptions = require_parse_options();
|
|
@@ -51336,7 +51336,7 @@ var require_semver2 = __commonJS({
|
|
|
51336
51336
|
`version is longer than ${MAX_LENGTH} characters`
|
|
51337
51337
|
);
|
|
51338
51338
|
}
|
|
51339
|
-
|
|
51339
|
+
debug24("SemVer", version2, options);
|
|
51340
51340
|
this.options = options;
|
|
51341
51341
|
this.loose = !!options.loose;
|
|
51342
51342
|
this.includePrerelease = !!options.includePrerelease;
|
|
@@ -51384,7 +51384,7 @@ var require_semver2 = __commonJS({
|
|
|
51384
51384
|
return this.version;
|
|
51385
51385
|
}
|
|
51386
51386
|
compare(other) {
|
|
51387
|
-
|
|
51387
|
+
debug24("SemVer.compare", this.version, this.options, other);
|
|
51388
51388
|
if (!(other instanceof _SemVer)) {
|
|
51389
51389
|
if (typeof other === "string" && other === this.version) {
|
|
51390
51390
|
return 0;
|
|
@@ -51417,7 +51417,7 @@ var require_semver2 = __commonJS({
|
|
|
51417
51417
|
do {
|
|
51418
51418
|
const a = this.prerelease[i];
|
|
51419
51419
|
const b2 = other.prerelease[i];
|
|
51420
|
-
|
|
51420
|
+
debug24("prerelease compare", i, a, b2);
|
|
51421
51421
|
if (a === void 0 && b2 === void 0) {
|
|
51422
51422
|
return 0;
|
|
51423
51423
|
} else if (b2 === void 0) {
|
|
@@ -51439,7 +51439,7 @@ var require_semver2 = __commonJS({
|
|
|
51439
51439
|
do {
|
|
51440
51440
|
const a = this.build[i];
|
|
51441
51441
|
const b2 = other.build[i];
|
|
51442
|
-
|
|
51442
|
+
debug24("build compare", i, a, b2);
|
|
51443
51443
|
if (a === void 0 && b2 === void 0) {
|
|
51444
51444
|
return 0;
|
|
51445
51445
|
} else if (b2 === void 0) {
|
|
@@ -52043,21 +52043,21 @@ var require_range = __commonJS({
|
|
|
52043
52043
|
const loose = this.options.loose;
|
|
52044
52044
|
const hr2 = loose ? re2[t.HYPHENRANGELOOSE] : re2[t.HYPHENRANGE];
|
|
52045
52045
|
range = range.replace(hr2, hyphenReplace(this.options.includePrerelease));
|
|
52046
|
-
|
|
52046
|
+
debug24("hyphen replace", range);
|
|
52047
52047
|
range = range.replace(re2[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
52048
|
-
|
|
52048
|
+
debug24("comparator trim", range);
|
|
52049
52049
|
range = range.replace(re2[t.TILDETRIM], tildeTrimReplace);
|
|
52050
|
-
|
|
52050
|
+
debug24("tilde trim", range);
|
|
52051
52051
|
range = range.replace(re2[t.CARETTRIM], caretTrimReplace);
|
|
52052
|
-
|
|
52052
|
+
debug24("caret trim", range);
|
|
52053
52053
|
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
52054
52054
|
if (loose) {
|
|
52055
52055
|
rangeList = rangeList.filter((comp) => {
|
|
52056
|
-
|
|
52056
|
+
debug24("loose invalid filter", comp, this.options);
|
|
52057
52057
|
return !!comp.match(re2[t.COMPARATORLOOSE]);
|
|
52058
52058
|
});
|
|
52059
52059
|
}
|
|
52060
|
-
|
|
52060
|
+
debug24("range list", rangeList);
|
|
52061
52061
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
52062
52062
|
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
52063
52063
|
for (const comp of comparators) {
|
|
@@ -52112,7 +52112,7 @@ var require_range = __commonJS({
|
|
|
52112
52112
|
var cache2 = new LRU();
|
|
52113
52113
|
var parseOptions = require_parse_options();
|
|
52114
52114
|
var Comparator = require_comparator();
|
|
52115
|
-
var
|
|
52115
|
+
var debug24 = require_debug();
|
|
52116
52116
|
var SemVer = require_semver2();
|
|
52117
52117
|
var {
|
|
52118
52118
|
safeRe: re2,
|
|
@@ -52137,15 +52137,15 @@ var require_range = __commonJS({
|
|
|
52137
52137
|
return result;
|
|
52138
52138
|
};
|
|
52139
52139
|
var parseComparator = (comp, options) => {
|
|
52140
|
-
|
|
52140
|
+
debug24("comp", comp, options);
|
|
52141
52141
|
comp = replaceCarets(comp, options);
|
|
52142
|
-
|
|
52142
|
+
debug24("caret", comp);
|
|
52143
52143
|
comp = replaceTildes(comp, options);
|
|
52144
|
-
|
|
52144
|
+
debug24("tildes", comp);
|
|
52145
52145
|
comp = replaceXRanges(comp, options);
|
|
52146
|
-
|
|
52146
|
+
debug24("xrange", comp);
|
|
52147
52147
|
comp = replaceStars(comp, options);
|
|
52148
|
-
|
|
52148
|
+
debug24("stars", comp);
|
|
52149
52149
|
return comp;
|
|
52150
52150
|
};
|
|
52151
52151
|
var isX = (id2) => !id2 || id2.toLowerCase() === "x" || id2 === "*";
|
|
@@ -52155,7 +52155,7 @@ var require_range = __commonJS({
|
|
|
52155
52155
|
var replaceTilde = (comp, options) => {
|
|
52156
52156
|
const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
|
|
52157
52157
|
return comp.replace(r, (_, M2, m2, p, pr2) => {
|
|
52158
|
-
|
|
52158
|
+
debug24("tilde", comp, _, M2, m2, p, pr2);
|
|
52159
52159
|
let ret;
|
|
52160
52160
|
if (isX(M2)) {
|
|
52161
52161
|
ret = "";
|
|
@@ -52164,12 +52164,12 @@ var require_range = __commonJS({
|
|
|
52164
52164
|
} else if (isX(p)) {
|
|
52165
52165
|
ret = `>=${M2}.${m2}.0 <${M2}.${+m2 + 1}.0-0`;
|
|
52166
52166
|
} else if (pr2) {
|
|
52167
|
-
|
|
52167
|
+
debug24("replaceTilde pr", pr2);
|
|
52168
52168
|
ret = `>=${M2}.${m2}.${p}-${pr2} <${M2}.${+m2 + 1}.0-0`;
|
|
52169
52169
|
} else {
|
|
52170
52170
|
ret = `>=${M2}.${m2}.${p} <${M2}.${+m2 + 1}.0-0`;
|
|
52171
52171
|
}
|
|
52172
|
-
|
|
52172
|
+
debug24("tilde return", ret);
|
|
52173
52173
|
return ret;
|
|
52174
52174
|
});
|
|
52175
52175
|
};
|
|
@@ -52177,11 +52177,11 @@ var require_range = __commonJS({
|
|
|
52177
52177
|
return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
|
|
52178
52178
|
};
|
|
52179
52179
|
var replaceCaret = (comp, options) => {
|
|
52180
|
-
|
|
52180
|
+
debug24("caret", comp, options);
|
|
52181
52181
|
const r = options.loose ? re2[t.CARETLOOSE] : re2[t.CARET];
|
|
52182
52182
|
const z2 = options.includePrerelease ? "-0" : "";
|
|
52183
52183
|
return comp.replace(r, (_, M2, m2, p, pr2) => {
|
|
52184
|
-
|
|
52184
|
+
debug24("caret", comp, _, M2, m2, p, pr2);
|
|
52185
52185
|
let ret;
|
|
52186
52186
|
if (isX(M2)) {
|
|
52187
52187
|
ret = "";
|
|
@@ -52194,7 +52194,7 @@ var require_range = __commonJS({
|
|
|
52194
52194
|
ret = `>=${M2}.${m2}.0${z2} <${+M2 + 1}.0.0-0`;
|
|
52195
52195
|
}
|
|
52196
52196
|
} else if (pr2) {
|
|
52197
|
-
|
|
52197
|
+
debug24("replaceCaret pr", pr2);
|
|
52198
52198
|
if (M2 === "0") {
|
|
52199
52199
|
if (m2 === "0") {
|
|
52200
52200
|
ret = `>=${M2}.${m2}.${p}-${pr2} <${M2}.${m2}.${+p + 1}-0`;
|
|
@@ -52205,7 +52205,7 @@ var require_range = __commonJS({
|
|
|
52205
52205
|
ret = `>=${M2}.${m2}.${p}-${pr2} <${+M2 + 1}.0.0-0`;
|
|
52206
52206
|
}
|
|
52207
52207
|
} else {
|
|
52208
|
-
|
|
52208
|
+
debug24("no pr");
|
|
52209
52209
|
if (M2 === "0") {
|
|
52210
52210
|
if (m2 === "0") {
|
|
52211
52211
|
ret = `>=${M2}.${m2}.${p}${z2} <${M2}.${m2}.${+p + 1}-0`;
|
|
@@ -52216,19 +52216,19 @@ var require_range = __commonJS({
|
|
|
52216
52216
|
ret = `>=${M2}.${m2}.${p} <${+M2 + 1}.0.0-0`;
|
|
52217
52217
|
}
|
|
52218
52218
|
}
|
|
52219
|
-
|
|
52219
|
+
debug24("caret return", ret);
|
|
52220
52220
|
return ret;
|
|
52221
52221
|
});
|
|
52222
52222
|
};
|
|
52223
52223
|
var replaceXRanges = (comp, options) => {
|
|
52224
|
-
|
|
52224
|
+
debug24("replaceXRanges", comp, options);
|
|
52225
52225
|
return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
|
|
52226
52226
|
};
|
|
52227
52227
|
var replaceXRange = (comp, options) => {
|
|
52228
52228
|
comp = comp.trim();
|
|
52229
52229
|
const r = options.loose ? re2[t.XRANGELOOSE] : re2[t.XRANGE];
|
|
52230
52230
|
return comp.replace(r, (ret, gtlt, M2, m2, p, pr2) => {
|
|
52231
|
-
|
|
52231
|
+
debug24("xRange", comp, ret, gtlt, M2, m2, p, pr2);
|
|
52232
52232
|
const xM = isX(M2);
|
|
52233
52233
|
const xm2 = xM || isX(m2);
|
|
52234
52234
|
const xp2 = xm2 || isX(p);
|
|
@@ -52275,16 +52275,16 @@ var require_range = __commonJS({
|
|
|
52275
52275
|
} else if (xp2) {
|
|
52276
52276
|
ret = `>=${M2}.${m2}.0${pr2} <${M2}.${+m2 + 1}.0-0`;
|
|
52277
52277
|
}
|
|
52278
|
-
|
|
52278
|
+
debug24("xRange return", ret);
|
|
52279
52279
|
return ret;
|
|
52280
52280
|
});
|
|
52281
52281
|
};
|
|
52282
52282
|
var replaceStars = (comp, options) => {
|
|
52283
|
-
|
|
52283
|
+
debug24("replaceStars", comp, options);
|
|
52284
52284
|
return comp.trim().replace(re2[t.STAR], "");
|
|
52285
52285
|
};
|
|
52286
52286
|
var replaceGTE0 = (comp, options) => {
|
|
52287
|
-
|
|
52287
|
+
debug24("replaceGTE0", comp, options);
|
|
52288
52288
|
return comp.trim().replace(re2[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
52289
52289
|
};
|
|
52290
52290
|
var hyphenReplace = (incPr) => ($0, from, fM, fm2, fp2, fpr, fb, to2, tM, tm2, tp2, tpr) => {
|
|
@@ -52322,7 +52322,7 @@ var require_range = __commonJS({
|
|
|
52322
52322
|
}
|
|
52323
52323
|
if (version2.prerelease.length && !options.includePrerelease) {
|
|
52324
52324
|
for (let i = 0; i < set2.length; i++) {
|
|
52325
|
-
|
|
52325
|
+
debug24(set2[i].semver);
|
|
52326
52326
|
if (set2[i].semver === Comparator.ANY) {
|
|
52327
52327
|
continue;
|
|
52328
52328
|
}
|
|
@@ -52358,7 +52358,7 @@ var require_comparator = __commonJS({
|
|
|
52358
52358
|
}
|
|
52359
52359
|
}
|
|
52360
52360
|
comp = comp.trim().split(/\s+/).join(" ");
|
|
52361
|
-
|
|
52361
|
+
debug24("comparator", comp, options);
|
|
52362
52362
|
this.options = options;
|
|
52363
52363
|
this.loose = !!options.loose;
|
|
52364
52364
|
this.parse(comp);
|
|
@@ -52367,7 +52367,7 @@ var require_comparator = __commonJS({
|
|
|
52367
52367
|
} else {
|
|
52368
52368
|
this.value = this.operator + this.semver.version;
|
|
52369
52369
|
}
|
|
52370
|
-
|
|
52370
|
+
debug24("comp", this);
|
|
52371
52371
|
}
|
|
52372
52372
|
parse(comp) {
|
|
52373
52373
|
const r = this.options.loose ? re2[t.COMPARATORLOOSE] : re2[t.COMPARATOR];
|
|
@@ -52389,7 +52389,7 @@ var require_comparator = __commonJS({
|
|
|
52389
52389
|
return this.value;
|
|
52390
52390
|
}
|
|
52391
52391
|
test(version2) {
|
|
52392
|
-
|
|
52392
|
+
debug24("Comparator.test", version2, this.options.loose);
|
|
52393
52393
|
if (this.semver === ANY || version2 === ANY) {
|
|
52394
52394
|
return true;
|
|
52395
52395
|
}
|
|
@@ -52446,7 +52446,7 @@ var require_comparator = __commonJS({
|
|
|
52446
52446
|
var parseOptions = require_parse_options();
|
|
52447
52447
|
var { safeRe: re2, t } = require_re();
|
|
52448
52448
|
var cmp = require_cmp();
|
|
52449
|
-
var
|
|
52449
|
+
var debug24 = require_debug();
|
|
52450
52450
|
var SemVer = require_semver2();
|
|
52451
52451
|
var Range = require_range();
|
|
52452
52452
|
}
|
|
@@ -54798,11 +54798,11 @@ var require_common3 = __commonJS({
|
|
|
54798
54798
|
let enableOverride = null;
|
|
54799
54799
|
let namespacesCache;
|
|
54800
54800
|
let enabledCache;
|
|
54801
|
-
function
|
|
54802
|
-
if (!
|
|
54801
|
+
function debug24(...args) {
|
|
54802
|
+
if (!debug24.enabled) {
|
|
54803
54803
|
return;
|
|
54804
54804
|
}
|
|
54805
|
-
const self2 =
|
|
54805
|
+
const self2 = debug24;
|
|
54806
54806
|
const curr = Number(/* @__PURE__ */ new Date());
|
|
54807
54807
|
const ms = curr - (prevTime || curr);
|
|
54808
54808
|
self2.diff = ms;
|
|
@@ -54832,12 +54832,12 @@ var require_common3 = __commonJS({
|
|
|
54832
54832
|
const logFn = self2.log || createDebug.log;
|
|
54833
54833
|
logFn.apply(self2, args);
|
|
54834
54834
|
}
|
|
54835
|
-
|
|
54836
|
-
|
|
54837
|
-
|
|
54838
|
-
|
|
54839
|
-
|
|
54840
|
-
Object.defineProperty(
|
|
54835
|
+
debug24.namespace = namespace;
|
|
54836
|
+
debug24.useColors = createDebug.useColors();
|
|
54837
|
+
debug24.color = createDebug.selectColor(namespace);
|
|
54838
|
+
debug24.extend = extend2;
|
|
54839
|
+
debug24.destroy = createDebug.destroy;
|
|
54840
|
+
Object.defineProperty(debug24, "enabled", {
|
|
54841
54841
|
enumerable: true,
|
|
54842
54842
|
configurable: false,
|
|
54843
54843
|
get: () => {
|
|
@@ -54855,9 +54855,9 @@ var require_common3 = __commonJS({
|
|
|
54855
54855
|
}
|
|
54856
54856
|
});
|
|
54857
54857
|
if (typeof createDebug.init === "function") {
|
|
54858
|
-
createDebug.init(
|
|
54858
|
+
createDebug.init(debug24);
|
|
54859
54859
|
}
|
|
54860
|
-
return
|
|
54860
|
+
return debug24;
|
|
54861
54861
|
}
|
|
54862
54862
|
function extend2(namespace, delimiter) {
|
|
54863
54863
|
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
@@ -55382,11 +55382,11 @@ var require_node8 = __commonJS({
|
|
|
55382
55382
|
function load2() {
|
|
55383
55383
|
return process.env.DEBUG;
|
|
55384
55384
|
}
|
|
55385
|
-
function init(
|
|
55386
|
-
|
|
55385
|
+
function init(debug24) {
|
|
55386
|
+
debug24.inspectOpts = {};
|
|
55387
55387
|
const keys = Object.keys(exports2.inspectOpts);
|
|
55388
55388
|
for (let i = 0; i < keys.length; i++) {
|
|
55389
|
-
|
|
55389
|
+
debug24.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
|
|
55390
55390
|
}
|
|
55391
55391
|
}
|
|
55392
55392
|
module2.exports = require_common3()(exports2);
|
|
@@ -55506,7 +55506,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55506
55506
|
var path4 = __require("path");
|
|
55507
55507
|
var Module = __require("module");
|
|
55508
55508
|
var resolve2 = require_resolve();
|
|
55509
|
-
var
|
|
55509
|
+
var debug24 = require_src18()("require-in-the-middle");
|
|
55510
55510
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
55511
55511
|
module2.exports = Hook2;
|
|
55512
55512
|
module2.exports.Hook = Hook2;
|
|
@@ -55559,7 +55559,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55559
55559
|
} else if (filename in __require.cache) {
|
|
55560
55560
|
__require.cache[filename][this._kRitmExports] = exports3;
|
|
55561
55561
|
} else {
|
|
55562
|
-
|
|
55562
|
+
debug24('non-core module is unexpectedly not in require.cache: "%s"', filename);
|
|
55563
55563
|
this._localCache.set(filename, exports3);
|
|
55564
55564
|
}
|
|
55565
55565
|
}
|
|
@@ -55586,10 +55586,10 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55586
55586
|
const patching = /* @__PURE__ */ new Set();
|
|
55587
55587
|
const internals = options ? options.internals === true : false;
|
|
55588
55588
|
const hasWhitelist = Array.isArray(modules);
|
|
55589
|
-
|
|
55589
|
+
debug24("registering require hook");
|
|
55590
55590
|
this._require = Module.prototype.require = function(id2) {
|
|
55591
55591
|
if (self2._unhooked === true) {
|
|
55592
|
-
|
|
55592
|
+
debug24("ignoring require call - module is soft-unhooked");
|
|
55593
55593
|
return self2._origRequire.apply(this, arguments);
|
|
55594
55594
|
}
|
|
55595
55595
|
return patchedRequire.call(this, arguments, false);
|
|
@@ -55598,7 +55598,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55598
55598
|
this._origGetBuiltinModule = process.getBuiltinModule;
|
|
55599
55599
|
this._getBuiltinModule = process.getBuiltinModule = function(id2) {
|
|
55600
55600
|
if (self2._unhooked === true) {
|
|
55601
|
-
|
|
55601
|
+
debug24("ignoring process.getBuiltinModule call - module is soft-unhooked");
|
|
55602
55602
|
return self2._origGetBuiltinModule.apply(this, arguments);
|
|
55603
55603
|
}
|
|
55604
55604
|
return patchedRequire.call(this, arguments, true);
|
|
@@ -55617,20 +55617,20 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55617
55617
|
}
|
|
55618
55618
|
}
|
|
55619
55619
|
} else if (coreOnly) {
|
|
55620
|
-
|
|
55620
|
+
debug24("call to process.getBuiltinModule with unknown built-in id");
|
|
55621
55621
|
return self2._origGetBuiltinModule.apply(this, args);
|
|
55622
55622
|
} else {
|
|
55623
55623
|
try {
|
|
55624
55624
|
filename = Module._resolveFilename(id2, this);
|
|
55625
55625
|
} catch (resolveErr) {
|
|
55626
|
-
|
|
55626
|
+
debug24('Module._resolveFilename("%s") threw %j, calling original Module.require', id2, resolveErr.message);
|
|
55627
55627
|
return self2._origRequire.apply(this, args);
|
|
55628
55628
|
}
|
|
55629
55629
|
}
|
|
55630
55630
|
let moduleName2, basedir;
|
|
55631
|
-
|
|
55631
|
+
debug24("processing %s module require('%s'): %s", core === true ? "core" : "non-core", id2, filename);
|
|
55632
55632
|
if (self2._cache.has(filename, core) === true) {
|
|
55633
|
-
|
|
55633
|
+
debug24("returning already patched cached module: %s", filename);
|
|
55634
55634
|
return self2._cache.get(filename, core);
|
|
55635
55635
|
}
|
|
55636
55636
|
const isPatching = patching.has(filename);
|
|
@@ -55639,13 +55639,13 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55639
55639
|
}
|
|
55640
55640
|
const exports3 = coreOnly ? self2._origGetBuiltinModule.apply(this, args) : self2._origRequire.apply(this, args);
|
|
55641
55641
|
if (isPatching === true) {
|
|
55642
|
-
|
|
55642
|
+
debug24("module is in the process of being patched already - ignoring: %s", filename);
|
|
55643
55643
|
return exports3;
|
|
55644
55644
|
}
|
|
55645
55645
|
patching.delete(filename);
|
|
55646
55646
|
if (core === true) {
|
|
55647
55647
|
if (hasWhitelist === true && modules.includes(filename) === false) {
|
|
55648
|
-
|
|
55648
|
+
debug24("ignoring core module not on whitelist: %s", filename);
|
|
55649
55649
|
return exports3;
|
|
55650
55650
|
}
|
|
55651
55651
|
moduleName2 = filename;
|
|
@@ -55656,13 +55656,13 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55656
55656
|
} else {
|
|
55657
55657
|
const stat = moduleDetailsFromPath(filename);
|
|
55658
55658
|
if (stat === void 0) {
|
|
55659
|
-
|
|
55659
|
+
debug24("could not parse filename: %s", filename);
|
|
55660
55660
|
return exports3;
|
|
55661
55661
|
}
|
|
55662
55662
|
moduleName2 = stat.name;
|
|
55663
55663
|
basedir = stat.basedir;
|
|
55664
55664
|
const fullModuleName = resolveModuleName(stat);
|
|
55665
|
-
|
|
55665
|
+
debug24("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)", moduleName2, id2, fullModuleName, basedir);
|
|
55666
55666
|
let matchFound = false;
|
|
55667
55667
|
if (hasWhitelist) {
|
|
55668
55668
|
if (!id2.startsWith(".") && modules.includes(id2)) {
|
|
@@ -55682,16 +55682,16 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55682
55682
|
try {
|
|
55683
55683
|
res = resolve2.sync(moduleName2, { basedir });
|
|
55684
55684
|
} catch (e) {
|
|
55685
|
-
|
|
55685
|
+
debug24("could not resolve module: %s", moduleName2);
|
|
55686
55686
|
self2._cache.set(filename, exports3, core);
|
|
55687
55687
|
return exports3;
|
|
55688
55688
|
}
|
|
55689
55689
|
if (res !== filename) {
|
|
55690
55690
|
if (internals === true) {
|
|
55691
55691
|
moduleName2 = moduleName2 + path4.sep + path4.relative(basedir, filename);
|
|
55692
|
-
|
|
55692
|
+
debug24("preparing to process require of internal file: %s", moduleName2);
|
|
55693
55693
|
} else {
|
|
55694
|
-
|
|
55694
|
+
debug24("ignoring require of non-main module file: %s", res);
|
|
55695
55695
|
self2._cache.set(filename, exports3, core);
|
|
55696
55696
|
return exports3;
|
|
55697
55697
|
}
|
|
@@ -55699,10 +55699,10 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55699
55699
|
}
|
|
55700
55700
|
}
|
|
55701
55701
|
self2._cache.set(filename, exports3, core);
|
|
55702
|
-
|
|
55702
|
+
debug24("calling require hook: %s", moduleName2);
|
|
55703
55703
|
const patchedExports = onrequire(exports3, moduleName2, basedir);
|
|
55704
55704
|
self2._cache.set(filename, patchedExports, core);
|
|
55705
|
-
|
|
55705
|
+
debug24("returning module: %s", moduleName2);
|
|
55706
55706
|
return patchedExports;
|
|
55707
55707
|
}
|
|
55708
55708
|
}
|
|
@@ -55710,16 +55710,16 @@ var require_require_in_the_middle = __commonJS({
|
|
|
55710
55710
|
this._unhooked = true;
|
|
55711
55711
|
if (this._require === Module.prototype.require) {
|
|
55712
55712
|
Module.prototype.require = this._origRequire;
|
|
55713
|
-
|
|
55713
|
+
debug24("require unhook successful");
|
|
55714
55714
|
} else {
|
|
55715
|
-
|
|
55715
|
+
debug24("require unhook unsuccessful");
|
|
55716
55716
|
}
|
|
55717
55717
|
if (process.getBuiltinModule !== void 0) {
|
|
55718
55718
|
if (this._getBuiltinModule === process.getBuiltinModule) {
|
|
55719
55719
|
process.getBuiltinModule = this._origGetBuiltinModule;
|
|
55720
|
-
|
|
55720
|
+
debug24("process.getBuiltinModule unhook successful");
|
|
55721
55721
|
} else {
|
|
55722
|
-
|
|
55722
|
+
debug24("process.getBuiltinModule unhook unsuccessful");
|
|
55723
55723
|
}
|
|
55724
55724
|
}
|
|
55725
55725
|
};
|
|
@@ -80900,19 +80900,19 @@ var require_proxy_from_env = __commonJS({
|
|
|
80900
80900
|
// ../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.4.0/node_modules/follow-redirects/debug.js
|
|
80901
80901
|
var require_debug2 = __commonJS({
|
|
80902
80902
|
"../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.4.0/node_modules/follow-redirects/debug.js"(exports2, module2) {
|
|
80903
|
-
var
|
|
80903
|
+
var debug24;
|
|
80904
80904
|
module2.exports = function() {
|
|
80905
|
-
if (!
|
|
80905
|
+
if (!debug24) {
|
|
80906
80906
|
try {
|
|
80907
|
-
|
|
80907
|
+
debug24 = require_src18()("follow-redirects");
|
|
80908
80908
|
} catch (error) {
|
|
80909
80909
|
}
|
|
80910
|
-
if (typeof
|
|
80911
|
-
|
|
80910
|
+
if (typeof debug24 !== "function") {
|
|
80911
|
+
debug24 = function() {
|
|
80912
80912
|
};
|
|
80913
80913
|
}
|
|
80914
80914
|
}
|
|
80915
|
-
|
|
80915
|
+
debug24.apply(null, arguments);
|
|
80916
80916
|
};
|
|
80917
80917
|
}
|
|
80918
80918
|
});
|
|
@@ -80926,7 +80926,7 @@ var require_follow_redirects = __commonJS({
|
|
|
80926
80926
|
var https3 = __require("https");
|
|
80927
80927
|
var Writable = __require("stream").Writable;
|
|
80928
80928
|
var assert = __require("assert");
|
|
80929
|
-
var
|
|
80929
|
+
var debug24 = require_debug2();
|
|
80930
80930
|
var useNativeURL = false;
|
|
80931
80931
|
try {
|
|
80932
80932
|
assert(new URL4());
|
|
@@ -81235,7 +81235,7 @@ var require_follow_redirects = __commonJS({
|
|
|
81235
81235
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
81236
81236
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
81237
81237
|
var redirectUrl = resolveUrl(location, currentUrl);
|
|
81238
|
-
|
|
81238
|
+
debug24("redirecting to", redirectUrl.href);
|
|
81239
81239
|
this._isRedirect = true;
|
|
81240
81240
|
spreadUrlObject(redirectUrl, this._options);
|
|
81241
81241
|
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
|
|
@@ -81289,7 +81289,7 @@ var require_follow_redirects = __commonJS({
|
|
|
81289
81289
|
options.hostname = "::1";
|
|
81290
81290
|
}
|
|
81291
81291
|
assert.equal(options.protocol, protocol, "protocol mismatch");
|
|
81292
|
-
|
|
81292
|
+
debug24("options", options);
|
|
81293
81293
|
return new RedirectableRequest(options, callback);
|
|
81294
81294
|
}
|
|
81295
81295
|
function get2(input, options, callback) {
|
|
@@ -94322,7 +94322,7 @@ var require_transform_utils = __commonJS({
|
|
|
94322
94322
|
var require_transformer = __commonJS({
|
|
94323
94323
|
"../../node_modules/.pnpm/istanbul-lib-source-maps@4.0.1_patch_hash=64aa1ef477ab6d1b23b0de660c800e802db4887f5fbe3e34bf8563ccb4c86447/node_modules/istanbul-lib-source-maps/lib/transformer.js"(exports2, module2) {
|
|
94324
94324
|
"use strict";
|
|
94325
|
-
var
|
|
94325
|
+
var debug24 = require_src18()("istanbuljs");
|
|
94326
94326
|
var libCoverage2 = require_istanbul_lib_coverage();
|
|
94327
94327
|
var { MappedCoverage } = require_mapped();
|
|
94328
94328
|
var getMapping = require_get_mapping();
|
|
@@ -94422,7 +94422,7 @@ var require_transformer = __commonJS({
|
|
|
94422
94422
|
getMappedCoverage
|
|
94423
94423
|
);
|
|
94424
94424
|
if (!changed) {
|
|
94425
|
-
|
|
94425
|
+
debug24(`File [${file}] ignored, nothing could be mapped`);
|
|
94426
94426
|
}
|
|
94427
94427
|
} else {
|
|
94428
94428
|
uniqueFiles[getUniqueKey(file)] = {
|
|
@@ -94446,7 +94446,7 @@ var require_map_store = __commonJS({
|
|
|
94446
94446
|
"use strict";
|
|
94447
94447
|
var path4 = __require("path");
|
|
94448
94448
|
var fs3 = __require("fs");
|
|
94449
|
-
var
|
|
94449
|
+
var debug24 = require_src18()("istanbuljs");
|
|
94450
94450
|
var { SourceMapConsumer } = require_source_map();
|
|
94451
94451
|
var pathutils = require_pathutils();
|
|
94452
94452
|
var { SourceMapTransformer } = require_transformer();
|
|
@@ -94495,7 +94495,7 @@ var require_map_store = __commonJS({
|
|
|
94495
94495
|
data: sourceMapUrl.substring(pos + b64.length)
|
|
94496
94496
|
};
|
|
94497
94497
|
} else {
|
|
94498
|
-
|
|
94498
|
+
debug24(`Unable to interpret source map URL: ${sourceMapUrl}`);
|
|
94499
94499
|
}
|
|
94500
94500
|
return;
|
|
94501
94501
|
}
|
|
@@ -94516,7 +94516,7 @@ var require_map_store = __commonJS({
|
|
|
94516
94516
|
data: sourceMap
|
|
94517
94517
|
};
|
|
94518
94518
|
} else {
|
|
94519
|
-
|
|
94519
|
+
debug24(
|
|
94520
94520
|
"Invalid source map object: " + JSON.stringify(sourceMap, null, 2)
|
|
94521
94521
|
);
|
|
94522
94522
|
}
|
|
@@ -94542,8 +94542,8 @@ var require_map_store = __commonJS({
|
|
|
94542
94542
|
...d.data
|
|
94543
94543
|
};
|
|
94544
94544
|
} catch (error) {
|
|
94545
|
-
|
|
94546
|
-
|
|
94545
|
+
debug24("Error returning source map for " + filePath);
|
|
94546
|
+
debug24(error.stack);
|
|
94547
94547
|
return;
|
|
94548
94548
|
}
|
|
94549
94549
|
}
|
|
@@ -94610,8 +94610,8 @@ var require_map_store = __commonJS({
|
|
|
94610
94610
|
});
|
|
94611
94611
|
return smc;
|
|
94612
94612
|
} catch (error) {
|
|
94613
|
-
|
|
94614
|
-
|
|
94613
|
+
debug24("Error returning source map for " + filePath);
|
|
94614
|
+
debug24(error.stack);
|
|
94615
94615
|
return null;
|
|
94616
94616
|
}
|
|
94617
94617
|
}
|
|
@@ -115471,9 +115471,9 @@ var require_debug3 = __commonJS({
|
|
|
115471
115471
|
"../../node_modules/.pnpm/avvio@8.3.2/node_modules/avvio/lib/debug.js"(exports2, module2) {
|
|
115472
115472
|
"use strict";
|
|
115473
115473
|
var { debuglog } = __require("util");
|
|
115474
|
-
var
|
|
115474
|
+
var debug24 = debuglog("avvio");
|
|
115475
115475
|
module2.exports = {
|
|
115476
|
-
debug:
|
|
115476
|
+
debug: debug24
|
|
115477
115477
|
};
|
|
115478
115478
|
}
|
|
115479
115479
|
});
|
|
@@ -115543,7 +115543,7 @@ var require_plugin = __commonJS({
|
|
|
115543
115543
|
"use strict";
|
|
115544
115544
|
var { EventEmitter: EventEmitter14 } = __require("events");
|
|
115545
115545
|
var { inherits: inherits2 } = __require("util");
|
|
115546
|
-
var { debug:
|
|
115546
|
+
var { debug: debug24 } = require_debug3();
|
|
115547
115547
|
var { createPromise } = require_create_promise();
|
|
115548
115548
|
var { AVV_ERR_PLUGIN_EXEC_TIMEOUT } = require_errors();
|
|
115549
115549
|
var { getPluginName } = require_get_plugin_name();
|
|
@@ -115564,7 +115564,7 @@ var require_plugin = __commonJS({
|
|
|
115564
115564
|
}
|
|
115565
115565
|
inherits2(Plugin, EventEmitter14);
|
|
115566
115566
|
Plugin.prototype.exec = function(server, callback) {
|
|
115567
|
-
|
|
115567
|
+
debug24("exec", this.name);
|
|
115568
115568
|
this.server = server;
|
|
115569
115569
|
const func = this.func;
|
|
115570
115570
|
const name = this.name;
|
|
@@ -115573,14 +115573,14 @@ var require_plugin = __commonJS({
|
|
|
115573
115573
|
let timer = null;
|
|
115574
115574
|
const done = (execErr) => {
|
|
115575
115575
|
if (completed) {
|
|
115576
|
-
|
|
115576
|
+
debug24("loading complete", name);
|
|
115577
115577
|
return;
|
|
115578
115578
|
}
|
|
115579
115579
|
this._error = execErr;
|
|
115580
115580
|
if (execErr) {
|
|
115581
|
-
|
|
115581
|
+
debug24("exec errored", name);
|
|
115582
115582
|
} else {
|
|
115583
|
-
|
|
115583
|
+
debug24("exec completed", name);
|
|
115584
115584
|
}
|
|
115585
115585
|
completed = true;
|
|
115586
115586
|
if (timer) {
|
|
@@ -115589,9 +115589,9 @@ var require_plugin = __commonJS({
|
|
|
115589
115589
|
callback(execErr);
|
|
115590
115590
|
};
|
|
115591
115591
|
if (this.timeout > 0) {
|
|
115592
|
-
|
|
115592
|
+
debug24("setting up timeout", name, this.timeout);
|
|
115593
115593
|
timer = setTimeout(function() {
|
|
115594
|
-
|
|
115594
|
+
debug24("timed out", name);
|
|
115595
115595
|
timer = null;
|
|
115596
115596
|
const readyTimeoutErr = new AVV_ERR_PLUGIN_EXEC_TIMEOUT(name);
|
|
115597
115597
|
readyTimeoutErr.fn = func;
|
|
@@ -115603,7 +115603,7 @@ var require_plugin = __commonJS({
|
|
|
115603
115603
|
this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
115604
115604
|
const maybePromiseLike = func(this.server, this.options, done);
|
|
115605
115605
|
if (isPromiseLike(maybePromiseLike)) {
|
|
115606
|
-
|
|
115606
|
+
debug24("exec: resolving promise", name);
|
|
115607
115607
|
maybePromiseLike.then(
|
|
115608
115608
|
() => process.nextTick(done),
|
|
115609
115609
|
(e) => process.nextTick(done, e)
|
|
@@ -115611,7 +115611,7 @@ var require_plugin = __commonJS({
|
|
|
115611
115611
|
}
|
|
115612
115612
|
};
|
|
115613
115613
|
Plugin.prototype.loadedSoFar = function() {
|
|
115614
|
-
|
|
115614
|
+
debug24("loadedSoFar", this.name);
|
|
115615
115615
|
if (this.loaded) {
|
|
115616
115616
|
return Promise.resolve();
|
|
115617
115617
|
}
|
|
@@ -115621,10 +115621,10 @@ var require_plugin = __commonJS({
|
|
|
115621
115621
|
this.queue.pause();
|
|
115622
115622
|
if (this._promise) {
|
|
115623
115623
|
if (afterErr) {
|
|
115624
|
-
|
|
115624
|
+
debug24("rejecting promise", this.name, afterErr);
|
|
115625
115625
|
this._promise.reject(afterErr);
|
|
115626
115626
|
} else {
|
|
115627
|
-
|
|
115627
|
+
debug24("resolving promise", this.name);
|
|
115628
115628
|
this._promise.resolve();
|
|
115629
115629
|
}
|
|
115630
115630
|
this._promise = null;
|
|
@@ -115648,17 +115648,17 @@ var require_plugin = __commonJS({
|
|
|
115648
115648
|
return res;
|
|
115649
115649
|
};
|
|
115650
115650
|
Plugin.prototype.enqueue = function(plugin, callback) {
|
|
115651
|
-
|
|
115651
|
+
debug24("enqueue", this.name, plugin.name);
|
|
115652
115652
|
this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now());
|
|
115653
115653
|
this.queue.push(plugin, callback);
|
|
115654
115654
|
};
|
|
115655
115655
|
Plugin.prototype.finish = function(err, callback) {
|
|
115656
|
-
|
|
115656
|
+
debug24("finish", this.name, err);
|
|
115657
115657
|
const done = () => {
|
|
115658
115658
|
if (this.loaded) {
|
|
115659
115659
|
return;
|
|
115660
115660
|
}
|
|
115661
|
-
|
|
115661
|
+
debug24("loaded", this.name);
|
|
115662
115662
|
this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now());
|
|
115663
115663
|
this.loaded = true;
|
|
115664
115664
|
callback(err);
|
|
@@ -115672,11 +115672,11 @@ var require_plugin = __commonJS({
|
|
|
115672
115672
|
return;
|
|
115673
115673
|
}
|
|
115674
115674
|
const check = () => {
|
|
115675
|
-
|
|
115675
|
+
debug24("check", this.name, this.queue.length(), this.queue.running(), this._promise);
|
|
115676
115676
|
if (this.queue.length() === 0 && this.queue.running() === 0) {
|
|
115677
115677
|
if (this._promise) {
|
|
115678
115678
|
const wrap2 = () => {
|
|
115679
|
-
|
|
115679
|
+
debug24("wrap");
|
|
115680
115680
|
queueMicrotask(check);
|
|
115681
115681
|
};
|
|
115682
115682
|
this._promise.resolve();
|
|
@@ -115686,9 +115686,9 @@ var require_plugin = __commonJS({
|
|
|
115686
115686
|
done();
|
|
115687
115687
|
}
|
|
115688
115688
|
} else {
|
|
115689
|
-
|
|
115689
|
+
debug24("delayed", this.name);
|
|
115690
115690
|
this.queue.drain = () => {
|
|
115691
|
-
|
|
115691
|
+
debug24("drain", this.name);
|
|
115692
115692
|
this.queue.drain = noop2;
|
|
115693
115693
|
queueMicrotask(check);
|
|
115694
115694
|
};
|
|
@@ -115744,18 +115744,18 @@ var require_is_bundled_or_typescript_plugin = __commonJS({
|
|
|
115744
115744
|
var require_thenify = __commonJS({
|
|
115745
115745
|
"../../node_modules/.pnpm/avvio@8.3.2/node_modules/avvio/lib/thenify.js"(exports2, module2) {
|
|
115746
115746
|
"use strict";
|
|
115747
|
-
var { debug:
|
|
115747
|
+
var { debug: debug24 } = require_debug3();
|
|
115748
115748
|
var { kThenifyDoNotWrap } = require_symbols();
|
|
115749
115749
|
function thenify() {
|
|
115750
115750
|
if (this.booted) {
|
|
115751
|
-
|
|
115751
|
+
debug24("thenify returning undefined because we are already booted");
|
|
115752
115752
|
return;
|
|
115753
115753
|
}
|
|
115754
115754
|
if (this[kThenifyDoNotWrap]) {
|
|
115755
115755
|
this[kThenifyDoNotWrap] = false;
|
|
115756
115756
|
return;
|
|
115757
115757
|
}
|
|
115758
|
-
|
|
115758
|
+
debug24("thenify");
|
|
115759
115759
|
return (resolve2, reject) => {
|
|
115760
115760
|
const p = this._loadRegistered();
|
|
115761
115761
|
return p.then(() => {
|
|
@@ -115810,7 +115810,7 @@ var require_boot = __commonJS({
|
|
|
115810
115810
|
} = require_symbols();
|
|
115811
115811
|
var { TimeTree } = require_time_tree();
|
|
115812
115812
|
var { Plugin } = require_plugin();
|
|
115813
|
-
var { debug:
|
|
115813
|
+
var { debug: debug24 } = require_debug3();
|
|
115814
115814
|
var { validatePlugin } = require_validate_plugin();
|
|
115815
115815
|
var { isBundledOrTypescriptPlugin } = require_is_bundled_or_typescript_plugin();
|
|
115816
115816
|
var { isPromiseLike } = require_is_promise_like();
|
|
@@ -115868,7 +115868,7 @@ var require_boot = __commonJS({
|
|
|
115868
115868
|
}, opts, false, 0);
|
|
115869
115869
|
this._trackPluginLoading(this._root);
|
|
115870
115870
|
this._loadPlugin(this._root, (err) => {
|
|
115871
|
-
|
|
115871
|
+
debug24("root plugin ready");
|
|
115872
115872
|
try {
|
|
115873
115873
|
this.emit("preReady");
|
|
115874
115874
|
this._root = null;
|
|
@@ -116099,7 +116099,7 @@ var require_boot = __commonJS({
|
|
|
116099
116099
|
const last = instance2._current[0];
|
|
116100
116100
|
instance2._current.unshift(plugin);
|
|
116101
116101
|
if (instance2._error && !plugin.isAfter) {
|
|
116102
|
-
|
|
116102
|
+
debug24("skipping loading of plugin as instance errored and it is not an after", plugin.name);
|
|
116103
116103
|
process.nextTick(execCallback);
|
|
116104
116104
|
return;
|
|
116105
116105
|
}
|
|
@@ -116108,7 +116108,7 @@ var require_boot = __commonJS({
|
|
|
116108
116108
|
try {
|
|
116109
116109
|
server = instance2.override(server, plugin.func, plugin.options);
|
|
116110
116110
|
} catch (overrideErr) {
|
|
116111
|
-
|
|
116111
|
+
debug24("override errored", plugin.name);
|
|
116112
116112
|
return execCallback(overrideErr);
|
|
116113
116113
|
}
|
|
116114
116114
|
}
|
|
@@ -116152,9 +116152,9 @@ var require_boot = __commonJS({
|
|
|
116152
116152
|
}
|
|
116153
116153
|
function timeoutCall(func, rootErr, context54, cb) {
|
|
116154
116154
|
const name = func.name;
|
|
116155
|
-
|
|
116155
|
+
debug24("setting up ready timeout", name, this._opts.timeout);
|
|
116156
116156
|
let timer = setTimeout(() => {
|
|
116157
|
-
|
|
116157
|
+
debug24("timed out", name);
|
|
116158
116158
|
timer = null;
|
|
116159
116159
|
const toutErr = new AVV_ERR_READY_TIMEOUT(name);
|
|
116160
116160
|
toutErr.fn = func;
|
|
@@ -116186,7 +116186,7 @@ var require_boot = __commonJS({
|
|
|
116186
116186
|
promise = func(this._error);
|
|
116187
116187
|
}
|
|
116188
116188
|
if (promise && typeof promise.then === "function") {
|
|
116189
|
-
|
|
116189
|
+
debug24("resolving close/onClose promise");
|
|
116190
116190
|
promise.then(
|
|
116191
116191
|
() => process.nextTick(cb),
|
|
116192
116192
|
(e) => process.nextTick(cb, e)
|
|
@@ -124636,9 +124636,9 @@ var require_constants7 = __commonJS({
|
|
|
124636
124636
|
// ../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js
|
|
124637
124637
|
var require_debug4 = __commonJS({
|
|
124638
124638
|
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
124639
|
-
var
|
|
124639
|
+
var debug24 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
124640
124640
|
};
|
|
124641
|
-
module2.exports =
|
|
124641
|
+
module2.exports = debug24;
|
|
124642
124642
|
}
|
|
124643
124643
|
});
|
|
124644
124644
|
|
|
@@ -124650,7 +124650,7 @@ var require_re2 = __commonJS({
|
|
|
124650
124650
|
MAX_SAFE_BUILD_LENGTH,
|
|
124651
124651
|
MAX_LENGTH
|
|
124652
124652
|
} = require_constants7();
|
|
124653
|
-
var
|
|
124653
|
+
var debug24 = require_debug4();
|
|
124654
124654
|
exports2 = module2.exports = {};
|
|
124655
124655
|
var re2 = exports2.re = [];
|
|
124656
124656
|
var safeRe = exports2.safeRe = [];
|
|
@@ -124672,7 +124672,7 @@ var require_re2 = __commonJS({
|
|
|
124672
124672
|
var createToken = (name, value, isGlobal) => {
|
|
124673
124673
|
const safe = makeSafeRegex(value);
|
|
124674
124674
|
const index = R2++;
|
|
124675
|
-
|
|
124675
|
+
debug24(name, index, value);
|
|
124676
124676
|
t[name] = index;
|
|
124677
124677
|
src[index] = value;
|
|
124678
124678
|
re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
@@ -124769,7 +124769,7 @@ var require_identifiers2 = __commonJS({
|
|
|
124769
124769
|
// ../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js
|
|
124770
124770
|
var require_semver4 = __commonJS({
|
|
124771
124771
|
"../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
124772
|
-
var
|
|
124772
|
+
var debug24 = require_debug4();
|
|
124773
124773
|
var { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2 } = require_constants7();
|
|
124774
124774
|
var { safeRe: re2, t } = require_re2();
|
|
124775
124775
|
var parseOptions = require_parse_options2();
|
|
@@ -124791,7 +124791,7 @@ var require_semver4 = __commonJS({
|
|
|
124791
124791
|
`version is longer than ${MAX_LENGTH} characters`
|
|
124792
124792
|
);
|
|
124793
124793
|
}
|
|
124794
|
-
|
|
124794
|
+
debug24("SemVer", version2, options);
|
|
124795
124795
|
this.options = options;
|
|
124796
124796
|
this.loose = !!options.loose;
|
|
124797
124797
|
this.includePrerelease = !!options.includePrerelease;
|
|
@@ -124839,7 +124839,7 @@ var require_semver4 = __commonJS({
|
|
|
124839
124839
|
return this.version;
|
|
124840
124840
|
}
|
|
124841
124841
|
compare(other) {
|
|
124842
|
-
|
|
124842
|
+
debug24("SemVer.compare", this.version, this.options, other);
|
|
124843
124843
|
if (!(other instanceof _SemVer)) {
|
|
124844
124844
|
if (typeof other === "string" && other === this.version) {
|
|
124845
124845
|
return 0;
|
|
@@ -124872,7 +124872,7 @@ var require_semver4 = __commonJS({
|
|
|
124872
124872
|
do {
|
|
124873
124873
|
const a = this.prerelease[i];
|
|
124874
124874
|
const b2 = other.prerelease[i];
|
|
124875
|
-
|
|
124875
|
+
debug24("prerelease compare", i, a, b2);
|
|
124876
124876
|
if (a === void 0 && b2 === void 0) {
|
|
124877
124877
|
return 0;
|
|
124878
124878
|
} else if (b2 === void 0) {
|
|
@@ -124894,7 +124894,7 @@ var require_semver4 = __commonJS({
|
|
|
124894
124894
|
do {
|
|
124895
124895
|
const a = this.build[i];
|
|
124896
124896
|
const b2 = other.build[i];
|
|
124897
|
-
|
|
124897
|
+
debug24("build compare", i, a, b2);
|
|
124898
124898
|
if (a === void 0 && b2 === void 0) {
|
|
124899
124899
|
return 0;
|
|
124900
124900
|
} else if (b2 === void 0) {
|
|
@@ -125484,21 +125484,21 @@ var require_range3 = __commonJS({
|
|
|
125484
125484
|
const loose = this.options.loose;
|
|
125485
125485
|
const hr2 = loose ? re2[t.HYPHENRANGELOOSE] : re2[t.HYPHENRANGE];
|
|
125486
125486
|
range = range.replace(hr2, hyphenReplace(this.options.includePrerelease));
|
|
125487
|
-
|
|
125487
|
+
debug24("hyphen replace", range);
|
|
125488
125488
|
range = range.replace(re2[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
125489
|
-
|
|
125489
|
+
debug24("comparator trim", range);
|
|
125490
125490
|
range = range.replace(re2[t.TILDETRIM], tildeTrimReplace);
|
|
125491
|
-
|
|
125491
|
+
debug24("tilde trim", range);
|
|
125492
125492
|
range = range.replace(re2[t.CARETTRIM], caretTrimReplace);
|
|
125493
|
-
|
|
125493
|
+
debug24("caret trim", range);
|
|
125494
125494
|
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
125495
125495
|
if (loose) {
|
|
125496
125496
|
rangeList = rangeList.filter((comp) => {
|
|
125497
|
-
|
|
125497
|
+
debug24("loose invalid filter", comp, this.options);
|
|
125498
125498
|
return !!comp.match(re2[t.COMPARATORLOOSE]);
|
|
125499
125499
|
});
|
|
125500
125500
|
}
|
|
125501
|
-
|
|
125501
|
+
debug24("range list", rangeList);
|
|
125502
125502
|
const rangeMap = /* @__PURE__ */ new Map();
|
|
125503
125503
|
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
125504
125504
|
for (const comp of comparators) {
|
|
@@ -125553,7 +125553,7 @@ var require_range3 = __commonJS({
|
|
|
125553
125553
|
var cache2 = new LRU();
|
|
125554
125554
|
var parseOptions = require_parse_options2();
|
|
125555
125555
|
var Comparator = require_comparator2();
|
|
125556
|
-
var
|
|
125556
|
+
var debug24 = require_debug4();
|
|
125557
125557
|
var SemVer = require_semver4();
|
|
125558
125558
|
var {
|
|
125559
125559
|
safeRe: re2,
|
|
@@ -125578,15 +125578,15 @@ var require_range3 = __commonJS({
|
|
|
125578
125578
|
return result;
|
|
125579
125579
|
};
|
|
125580
125580
|
var parseComparator = (comp, options) => {
|
|
125581
|
-
|
|
125581
|
+
debug24("comp", comp, options);
|
|
125582
125582
|
comp = replaceCarets(comp, options);
|
|
125583
|
-
|
|
125583
|
+
debug24("caret", comp);
|
|
125584
125584
|
comp = replaceTildes(comp, options);
|
|
125585
|
-
|
|
125585
|
+
debug24("tildes", comp);
|
|
125586
125586
|
comp = replaceXRanges(comp, options);
|
|
125587
|
-
|
|
125587
|
+
debug24("xrange", comp);
|
|
125588
125588
|
comp = replaceStars(comp, options);
|
|
125589
|
-
|
|
125589
|
+
debug24("stars", comp);
|
|
125590
125590
|
return comp;
|
|
125591
125591
|
};
|
|
125592
125592
|
var isX = (id2) => !id2 || id2.toLowerCase() === "x" || id2 === "*";
|
|
@@ -125596,7 +125596,7 @@ var require_range3 = __commonJS({
|
|
|
125596
125596
|
var replaceTilde = (comp, options) => {
|
|
125597
125597
|
const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
|
|
125598
125598
|
return comp.replace(r, (_, M2, m2, p, pr2) => {
|
|
125599
|
-
|
|
125599
|
+
debug24("tilde", comp, _, M2, m2, p, pr2);
|
|
125600
125600
|
let ret;
|
|
125601
125601
|
if (isX(M2)) {
|
|
125602
125602
|
ret = "";
|
|
@@ -125605,12 +125605,12 @@ var require_range3 = __commonJS({
|
|
|
125605
125605
|
} else if (isX(p)) {
|
|
125606
125606
|
ret = `>=${M2}.${m2}.0 <${M2}.${+m2 + 1}.0-0`;
|
|
125607
125607
|
} else if (pr2) {
|
|
125608
|
-
|
|
125608
|
+
debug24("replaceTilde pr", pr2);
|
|
125609
125609
|
ret = `>=${M2}.${m2}.${p}-${pr2} <${M2}.${+m2 + 1}.0-0`;
|
|
125610
125610
|
} else {
|
|
125611
125611
|
ret = `>=${M2}.${m2}.${p} <${M2}.${+m2 + 1}.0-0`;
|
|
125612
125612
|
}
|
|
125613
|
-
|
|
125613
|
+
debug24("tilde return", ret);
|
|
125614
125614
|
return ret;
|
|
125615
125615
|
});
|
|
125616
125616
|
};
|
|
@@ -125618,11 +125618,11 @@ var require_range3 = __commonJS({
|
|
|
125618
125618
|
return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
|
|
125619
125619
|
};
|
|
125620
125620
|
var replaceCaret = (comp, options) => {
|
|
125621
|
-
|
|
125621
|
+
debug24("caret", comp, options);
|
|
125622
125622
|
const r = options.loose ? re2[t.CARETLOOSE] : re2[t.CARET];
|
|
125623
125623
|
const z2 = options.includePrerelease ? "-0" : "";
|
|
125624
125624
|
return comp.replace(r, (_, M2, m2, p, pr2) => {
|
|
125625
|
-
|
|
125625
|
+
debug24("caret", comp, _, M2, m2, p, pr2);
|
|
125626
125626
|
let ret;
|
|
125627
125627
|
if (isX(M2)) {
|
|
125628
125628
|
ret = "";
|
|
@@ -125635,7 +125635,7 @@ var require_range3 = __commonJS({
|
|
|
125635
125635
|
ret = `>=${M2}.${m2}.0${z2} <${+M2 + 1}.0.0-0`;
|
|
125636
125636
|
}
|
|
125637
125637
|
} else if (pr2) {
|
|
125638
|
-
|
|
125638
|
+
debug24("replaceCaret pr", pr2);
|
|
125639
125639
|
if (M2 === "0") {
|
|
125640
125640
|
if (m2 === "0") {
|
|
125641
125641
|
ret = `>=${M2}.${m2}.${p}-${pr2} <${M2}.${m2}.${+p + 1}-0`;
|
|
@@ -125646,7 +125646,7 @@ var require_range3 = __commonJS({
|
|
|
125646
125646
|
ret = `>=${M2}.${m2}.${p}-${pr2} <${+M2 + 1}.0.0-0`;
|
|
125647
125647
|
}
|
|
125648
125648
|
} else {
|
|
125649
|
-
|
|
125649
|
+
debug24("no pr");
|
|
125650
125650
|
if (M2 === "0") {
|
|
125651
125651
|
if (m2 === "0") {
|
|
125652
125652
|
ret = `>=${M2}.${m2}.${p}${z2} <${M2}.${m2}.${+p + 1}-0`;
|
|
@@ -125657,19 +125657,19 @@ var require_range3 = __commonJS({
|
|
|
125657
125657
|
ret = `>=${M2}.${m2}.${p} <${+M2 + 1}.0.0-0`;
|
|
125658
125658
|
}
|
|
125659
125659
|
}
|
|
125660
|
-
|
|
125660
|
+
debug24("caret return", ret);
|
|
125661
125661
|
return ret;
|
|
125662
125662
|
});
|
|
125663
125663
|
};
|
|
125664
125664
|
var replaceXRanges = (comp, options) => {
|
|
125665
|
-
|
|
125665
|
+
debug24("replaceXRanges", comp, options);
|
|
125666
125666
|
return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
|
|
125667
125667
|
};
|
|
125668
125668
|
var replaceXRange = (comp, options) => {
|
|
125669
125669
|
comp = comp.trim();
|
|
125670
125670
|
const r = options.loose ? re2[t.XRANGELOOSE] : re2[t.XRANGE];
|
|
125671
125671
|
return comp.replace(r, (ret, gtlt, M2, m2, p, pr2) => {
|
|
125672
|
-
|
|
125672
|
+
debug24("xRange", comp, ret, gtlt, M2, m2, p, pr2);
|
|
125673
125673
|
const xM = isX(M2);
|
|
125674
125674
|
const xm2 = xM || isX(m2);
|
|
125675
125675
|
const xp2 = xm2 || isX(p);
|
|
@@ -125716,16 +125716,16 @@ var require_range3 = __commonJS({
|
|
|
125716
125716
|
} else if (xp2) {
|
|
125717
125717
|
ret = `>=${M2}.${m2}.0${pr2} <${M2}.${+m2 + 1}.0-0`;
|
|
125718
125718
|
}
|
|
125719
|
-
|
|
125719
|
+
debug24("xRange return", ret);
|
|
125720
125720
|
return ret;
|
|
125721
125721
|
});
|
|
125722
125722
|
};
|
|
125723
125723
|
var replaceStars = (comp, options) => {
|
|
125724
|
-
|
|
125724
|
+
debug24("replaceStars", comp, options);
|
|
125725
125725
|
return comp.trim().replace(re2[t.STAR], "");
|
|
125726
125726
|
};
|
|
125727
125727
|
var replaceGTE0 = (comp, options) => {
|
|
125728
|
-
|
|
125728
|
+
debug24("replaceGTE0", comp, options);
|
|
125729
125729
|
return comp.trim().replace(re2[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
125730
125730
|
};
|
|
125731
125731
|
var hyphenReplace = (incPr) => ($0, from, fM, fm2, fp2, fpr, fb, to2, tM, tm2, tp2, tpr) => {
|
|
@@ -125763,7 +125763,7 @@ var require_range3 = __commonJS({
|
|
|
125763
125763
|
}
|
|
125764
125764
|
if (version2.prerelease.length && !options.includePrerelease) {
|
|
125765
125765
|
for (let i = 0; i < set2.length; i++) {
|
|
125766
|
-
|
|
125766
|
+
debug24(set2[i].semver);
|
|
125767
125767
|
if (set2[i].semver === Comparator.ANY) {
|
|
125768
125768
|
continue;
|
|
125769
125769
|
}
|
|
@@ -125799,7 +125799,7 @@ var require_comparator2 = __commonJS({
|
|
|
125799
125799
|
}
|
|
125800
125800
|
}
|
|
125801
125801
|
comp = comp.trim().split(/\s+/).join(" ");
|
|
125802
|
-
|
|
125802
|
+
debug24("comparator", comp, options);
|
|
125803
125803
|
this.options = options;
|
|
125804
125804
|
this.loose = !!options.loose;
|
|
125805
125805
|
this.parse(comp);
|
|
@@ -125808,7 +125808,7 @@ var require_comparator2 = __commonJS({
|
|
|
125808
125808
|
} else {
|
|
125809
125809
|
this.value = this.operator + this.semver.version;
|
|
125810
125810
|
}
|
|
125811
|
-
|
|
125811
|
+
debug24("comp", this);
|
|
125812
125812
|
}
|
|
125813
125813
|
parse(comp) {
|
|
125814
125814
|
const r = this.options.loose ? re2[t.COMPARATORLOOSE] : re2[t.COMPARATOR];
|
|
@@ -125830,7 +125830,7 @@ var require_comparator2 = __commonJS({
|
|
|
125830
125830
|
return this.value;
|
|
125831
125831
|
}
|
|
125832
125832
|
test(version2) {
|
|
125833
|
-
|
|
125833
|
+
debug24("Comparator.test", version2, this.options.loose);
|
|
125834
125834
|
if (this.semver === ANY || version2 === ANY) {
|
|
125835
125835
|
return true;
|
|
125836
125836
|
}
|
|
@@ -125887,7 +125887,7 @@ var require_comparator2 = __commonJS({
|
|
|
125887
125887
|
var parseOptions = require_parse_options2();
|
|
125888
125888
|
var { safeRe: re2, t } = require_re2();
|
|
125889
125889
|
var cmp = require_cmp2();
|
|
125890
|
-
var
|
|
125890
|
+
var debug24 = require_debug4();
|
|
125891
125891
|
var SemVer = require_semver4();
|
|
125892
125892
|
var Range = require_range3();
|
|
125893
125893
|
}
|
|
@@ -154919,7 +154919,7 @@ import fs2 from "fs";
|
|
|
154919
154919
|
import path3 from "path";
|
|
154920
154920
|
|
|
154921
154921
|
// ../../package.json
|
|
154922
|
-
var version = "0.0.1-
|
|
154922
|
+
var version = "0.0.1-23";
|
|
154923
154923
|
|
|
154924
154924
|
// ../utils/syncSleep/index.ts
|
|
154925
154925
|
function synchronousBlock(seconds) {
|
|
@@ -154989,6 +154989,13 @@ var DEFAULT_SERVER_HOST_LISTEN_ON_ALL_INTERFACES = "::";
|
|
|
154989
154989
|
var DEFAULT_TRANSACTION_TIMEOUT_MS = 30 * 1e3;
|
|
154990
154990
|
var NODE_SQL_PARSER_TIMEOUT = 5e3;
|
|
154991
154991
|
var HT_SDK_PLATFORM_HEADER = "ht-sdk-platform-header";
|
|
154992
|
+
var GIT_DIFF_IGNORED_FILES = [
|
|
154993
|
+
"package.json",
|
|
154994
|
+
"package-lock.json",
|
|
154995
|
+
"yarn.lock",
|
|
154996
|
+
"pnpm-lock.yaml",
|
|
154997
|
+
"bun.lockb"
|
|
154998
|
+
];
|
|
154992
154999
|
var CURRENT_REPLAY_RESULT_MOCK_SCHEMA_MAP_VERSION = "v2";
|
|
154993
155000
|
|
|
154994
155001
|
// ../utils/types/index.ts
|
|
@@ -168993,6 +169000,65 @@ var cliClient = {
|
|
|
168993
169000
|
}
|
|
168994
169001
|
};
|
|
168995
169002
|
|
|
169003
|
+
// src/helpers/getUncommittedChanges.ts
|
|
169004
|
+
import { execSync as execSync2 } from "child_process";
|
|
169005
|
+
var debug8 = debug_default("ht-node-sdk::getUncommittedChanges");
|
|
169006
|
+
function getUncommittedChanges() {
|
|
169007
|
+
var _a4, _b2;
|
|
169008
|
+
const projectRoot2 = getProjectRoot();
|
|
169009
|
+
const pathspecs = ["."];
|
|
169010
|
+
pathspecs.push('":(exclude,glob).*/"');
|
|
169011
|
+
pathspecs.push('":(exclude,glob).*"');
|
|
169012
|
+
for (const f of GIT_DIFF_IGNORED_FILES) {
|
|
169013
|
+
pathspecs.push(`":(exclude,glob)**/${f}"`);
|
|
169014
|
+
}
|
|
169015
|
+
const command = `git diff HEAD -- ${pathspecs.join(" ")}`;
|
|
169016
|
+
debug8(`Executing: ${command}`);
|
|
169017
|
+
try {
|
|
169018
|
+
const output = execSync2(command, { cwd: projectRoot2 }).toString().trim();
|
|
169019
|
+
return output;
|
|
169020
|
+
} catch (err) {
|
|
169021
|
+
debug8(`Error executing git diff: ${err.message}`);
|
|
169022
|
+
return ((_b2 = (_a4 = err == null ? void 0 : err.stdout) == null ? void 0 : _a4.toString()) == null ? void 0 : _b2.trim()) || "";
|
|
169023
|
+
}
|
|
169024
|
+
}
|
|
169025
|
+
|
|
169026
|
+
// src/helpers/isCurrentFolderAGitRepo.ts
|
|
169027
|
+
import { execSync as execSync3 } from "child_process";
|
|
169028
|
+
function isCurrentFolderInGitRepoFn() {
|
|
169029
|
+
try {
|
|
169030
|
+
execSync3("git rev-parse HEAD");
|
|
169031
|
+
} catch (_err) {
|
|
169032
|
+
return false;
|
|
169033
|
+
}
|
|
169034
|
+
return true;
|
|
169035
|
+
}
|
|
169036
|
+
|
|
169037
|
+
// src/helpers/isHavingUncommittedChanges.ts
|
|
169038
|
+
import { execSync as execSync4 } from "child_process";
|
|
169039
|
+
function isHavingUncommittedChangesFn() {
|
|
169040
|
+
const projectRoot2 = getProjectRoot();
|
|
169041
|
+
const pathspecs = ["."];
|
|
169042
|
+
pathspecs.push('":(exclude,glob).*/"');
|
|
169043
|
+
pathspecs.push('":(exclude,glob).*"');
|
|
169044
|
+
for (const file of GIT_DIFF_IGNORED_FILES) {
|
|
169045
|
+
pathspecs.push(`":(exclude,glob)**/${file}"`);
|
|
169046
|
+
}
|
|
169047
|
+
const pathspecArgs = pathspecs.join(" ");
|
|
169048
|
+
try {
|
|
169049
|
+
execSync4(
|
|
169050
|
+
`git diff HEAD --ignore-submodules --quiet --exit-code -- ${pathspecArgs}`,
|
|
169051
|
+
{
|
|
169052
|
+
cwd: projectRoot2,
|
|
169053
|
+
stdio: "ignore"
|
|
169054
|
+
}
|
|
169055
|
+
);
|
|
169056
|
+
return false;
|
|
169057
|
+
} catch {
|
|
169058
|
+
return true;
|
|
169059
|
+
}
|
|
169060
|
+
}
|
|
169061
|
+
|
|
168996
169062
|
// src/instrumentation/core/types/ExperimentalFlagEnums.ts
|
|
168997
169063
|
var ExperimentalFlags = /* @__PURE__ */ ((ExperimentalFlags2) => {
|
|
168998
169064
|
ExperimentalFlags2["EnableSqlite3Instrumentation"] = "enableSqlite3Instrumentation";
|
|
@@ -169133,7 +169199,7 @@ var isContinuousCoverageActive = async (backendBaseUrl, serviceIdentifier) => {
|
|
|
169133
169199
|
};
|
|
169134
169200
|
|
|
169135
169201
|
// src/instrumentation/helpers/measureContinuousCoverage.ts
|
|
169136
|
-
var
|
|
169202
|
+
var debug9 = debug_default("ht::node-sdk::measureContinuosCoverage");
|
|
169137
169203
|
async function calculateContinuousCoverage({
|
|
169138
169204
|
serviceIdentifier,
|
|
169139
169205
|
buildId,
|
|
@@ -169142,7 +169208,7 @@ async function calculateContinuousCoverage({
|
|
|
169142
169208
|
if (!("__coverage__" in global)) {
|
|
169143
169209
|
return;
|
|
169144
169210
|
}
|
|
169145
|
-
|
|
169211
|
+
debug9("Calculating continuous coverage...");
|
|
169146
169212
|
const globalCoverage = global.__coverage__;
|
|
169147
169213
|
const latestCoverage = {};
|
|
169148
169214
|
const filePaths = Object.keys(globalCoverage);
|
|
@@ -169171,7 +169237,7 @@ async function calculateContinuousCoverage({
|
|
|
169171
169237
|
commitHash: getGitCommitHash(),
|
|
169172
169238
|
coverage: latestCoverage
|
|
169173
169239
|
});
|
|
169174
|
-
|
|
169240
|
+
debug9("Calculated continuous coverage.");
|
|
169175
169241
|
} catch (e) {
|
|
169176
169242
|
console.error("Error in updating coverage.", e);
|
|
169177
169243
|
}
|
|
@@ -169203,7 +169269,7 @@ var measureContinuousCoverage = ({
|
|
|
169203
169269
|
return;
|
|
169204
169270
|
}
|
|
169205
169271
|
if (!("__coverage__" in global)) {
|
|
169206
|
-
|
|
169272
|
+
debug9("__coverage__ not found in global");
|
|
169207
169273
|
console.error(
|
|
169208
169274
|
"App not started with nyc. Not measuring continuous coverage."
|
|
169209
169275
|
);
|
|
@@ -169220,10 +169286,10 @@ var measureContinuousCoverage = ({
|
|
|
169220
169286
|
serviceId
|
|
169221
169287
|
);
|
|
169222
169288
|
if (!isActive) {
|
|
169223
|
-
|
|
169289
|
+
debug9(`Continuous coverage is not active for service '${serviceId}'.`);
|
|
169224
169290
|
return;
|
|
169225
169291
|
}
|
|
169226
|
-
|
|
169292
|
+
debug9(`Continuous coverage is active for service '${serviceId}'.`);
|
|
169227
169293
|
await calculateContinuousCoverage({
|
|
169228
169294
|
serviceIdentifier: serviceId,
|
|
169229
169295
|
instanceJobId,
|
|
@@ -169784,7 +169850,7 @@ import { types as utilTypes } from "util";
|
|
|
169784
169850
|
// src/instrumentation/core/helpers/shimmer.ts
|
|
169785
169851
|
var import_api25 = __toESM(require_src());
|
|
169786
169852
|
var logger = console.error.bind(console);
|
|
169787
|
-
var
|
|
169853
|
+
var debug10 = debug_default("debug-ht-node-sdk:shimmer");
|
|
169788
169854
|
function defineProperty(obj, name, value) {
|
|
169789
169855
|
Object.defineProperty(obj, name, {
|
|
169790
169856
|
configurable: true,
|
|
@@ -169803,7 +169869,7 @@ function wrap(nodule, name, wrapper) {
|
|
|
169803
169869
|
logger(`no original function ${name.description} to wrap`);
|
|
169804
169870
|
return;
|
|
169805
169871
|
}
|
|
169806
|
-
|
|
169872
|
+
debug10(`no original function ${name} to wrap`);
|
|
169807
169873
|
return;
|
|
169808
169874
|
}
|
|
169809
169875
|
if (!wrapper) {
|
|
@@ -169820,7 +169886,7 @@ function wrap(nodule, name, wrapper) {
|
|
|
169820
169886
|
const wrapped = function(...args) {
|
|
169821
169887
|
const isDate2 = nodule === global && name === "Date";
|
|
169822
169888
|
if (!isDate2) {
|
|
169823
|
-
|
|
169889
|
+
debug10(
|
|
169824
169890
|
`Inside meta wrapper for ${typeof name === "string" ? name : name.description} method, ${internalWrapper.name} patch function`
|
|
169825
169891
|
);
|
|
169826
169892
|
}
|
|
@@ -194461,7 +194527,7 @@ var import_mysql = __toESM(require_mysql());
|
|
|
194461
194527
|
var import_rfdc8 = __toESM(require_rfdc());
|
|
194462
194528
|
import { createContext, runInContext } from "vm";
|
|
194463
194529
|
var clone2 = (0, import_rfdc8.default)();
|
|
194464
|
-
var
|
|
194530
|
+
var debug11 = debug_default("ht-sql-parser");
|
|
194465
194531
|
function removeValueField(obj) {
|
|
194466
194532
|
if (typeof obj !== "object" || obj === null) {
|
|
194467
194533
|
return;
|
|
@@ -194517,8 +194583,8 @@ var SqlParser = class {
|
|
|
194517
194583
|
dialect: this.dialect
|
|
194518
194584
|
}
|
|
194519
194585
|
};
|
|
194520
|
-
|
|
194521
|
-
|
|
194586
|
+
debug11(`Error parsing sql query - ${sql}, parser - ${this.dialect}`);
|
|
194587
|
+
debug11(e);
|
|
194522
194588
|
if (e.message.includes("Script execution timed out")) {
|
|
194523
194589
|
sqlErrorPayload.event = "sql_parser_timeout";
|
|
194524
194590
|
console.error(
|
|
@@ -194559,7 +194625,7 @@ var SqlParser = class {
|
|
|
194559
194625
|
const startTime = Date.now();
|
|
194560
194626
|
const sql = this.parser.sqlify(ast);
|
|
194561
194627
|
const interval = Date.now() - startTime;
|
|
194562
|
-
|
|
194628
|
+
debug11(
|
|
194563
194629
|
`Time taken to sqlify ast - ${interval / 1e3} seconds, by parser - ${this.dialect}`
|
|
194564
194630
|
);
|
|
194565
194631
|
return sql;
|
|
@@ -210387,7 +210453,7 @@ var GraphqlServerRequestMock = class extends HtServerMockAbstract {
|
|
|
210387
210453
|
|
|
210388
210454
|
// src/instrumentation/libraries/graphql/utils.ts
|
|
210389
210455
|
var import_api48 = __toESM(require_src());
|
|
210390
|
-
var
|
|
210456
|
+
var debug12 = debug_default("ht-instrumentation-graphql::utils");
|
|
210391
210457
|
var getTypeString = (typeNode) => {
|
|
210392
210458
|
if (typeNode.kind === "NonNullType") {
|
|
210393
210459
|
return `${getTypeString(typeNode.type)}!`;
|
|
@@ -210487,7 +210553,7 @@ var getVariablesUsed = (currentSelection) => {
|
|
|
210487
210553
|
}
|
|
210488
210554
|
}
|
|
210489
210555
|
} else {
|
|
210490
|
-
|
|
210556
|
+
debug12(`unhandled arg ${arg.kind} - ${arg.value.kind}`);
|
|
210491
210557
|
sendPostHogEvent(
|
|
210492
210558
|
"graphql_unhandled_arg_parsing_error",
|
|
210493
210559
|
arg,
|
|
@@ -210877,7 +210943,7 @@ var addSamplingModeHeader = (requestHeaders) => {
|
|
|
210877
210943
|
};
|
|
210878
210944
|
|
|
210879
210945
|
// src/instrumentation/libraries/graphql/instrumentation.ts
|
|
210880
|
-
var
|
|
210946
|
+
var debug13 = debug_default("ht-instrumentation-graphql" /* HtGraphqlInstrumentation */);
|
|
210881
210947
|
var HtGraphqlInstrumentation = class extends HtInstrumentationBase {
|
|
210882
210948
|
_Original_ApolloServer;
|
|
210883
210949
|
_HT_Patched_ApolloServer;
|
|
@@ -211275,7 +211341,7 @@ var HtGraphqlInstrumentation = class extends HtInstrumentationBase {
|
|
|
211275
211341
|
}
|
|
211276
211342
|
if (plugin.IS_REPLAY_MODE) {
|
|
211277
211343
|
const graphqlReqId = import_api49.context.active().getValue(HT_REQUEST_ID);
|
|
211278
|
-
|
|
211344
|
+
debug13(`received graphql req with htRequestId - ${graphqlReqId}`);
|
|
211279
211345
|
const storeInstance5 = MemoryStore.getInstance();
|
|
211280
211346
|
const selectionSet = storeInstance5.getSelectionSet(graphqlReqId);
|
|
211281
211347
|
const shouldInstrumentDate = shouldInstrumentDateInGraphqlRequest({
|
|
@@ -211662,7 +211728,7 @@ var HtGraphqlInstrumentation = class extends HtInstrumentationBase {
|
|
|
211662
211728
|
}
|
|
211663
211729
|
if (plugin.IS_REPLAY_MODE) {
|
|
211664
211730
|
const graphqlReqId = import_api49.context.active().getValue(HT_REQUEST_ID);
|
|
211665
|
-
|
|
211731
|
+
debug13(`received graphql req with htRequestId - ${graphqlReqId}`);
|
|
211666
211732
|
const storeInstance5 = MemoryStore.getInstance();
|
|
211667
211733
|
const selectionSet = storeInstance5.getSelectionSet(graphqlReqId);
|
|
211668
211734
|
const shouldInstrumentDate = shouldInstrumentDateInGraphqlRequest({
|
|
@@ -213368,7 +213434,7 @@ var generateClusterPath_default = generateClusterPath;
|
|
|
213368
213434
|
|
|
213369
213435
|
// src/instrumentation/libraries/http/helpers/decodeBody.ts
|
|
213370
213436
|
import * as zlib3 from "zlib";
|
|
213371
|
-
var
|
|
213437
|
+
var debug14 = debug_default(
|
|
213372
213438
|
`${"ht-instrumentation-http" /* HtHttpInstrumentation */}-bodyDecoder`
|
|
213373
213439
|
);
|
|
213374
213440
|
var encodingFunctionMap = {
|
|
@@ -213388,7 +213454,7 @@ var decodeBody = async (buffer, encoding) => {
|
|
|
213388
213454
|
});
|
|
213389
213455
|
});
|
|
213390
213456
|
}
|
|
213391
|
-
|
|
213457
|
+
debug14(`Unknown encoding: ${encoding} - skipping decoding.`);
|
|
213392
213458
|
return Promise.resolve(buffer);
|
|
213393
213459
|
};
|
|
213394
213460
|
|
|
@@ -213397,7 +213463,7 @@ var import_busboy = __toESM(require_lib5());
|
|
|
213397
213463
|
var import_qs4 = __toESM(require_lib4());
|
|
213398
213464
|
import { Readable as Readable11 } from "stream";
|
|
213399
213465
|
var MULTIPART_FORM_DATA_HEADER = "multipart/form-data";
|
|
213400
|
-
var
|
|
213466
|
+
var debug15 = debug_default("ht-instrumentation-http" /* HtHttpInstrumentation */);
|
|
213401
213467
|
function busboyMultipartParserAsync(buffer, contentType) {
|
|
213402
213468
|
return new Promise((resolve2, reject) => {
|
|
213403
213469
|
const boundary = contentType.split("boundary=")[1];
|
|
@@ -213514,7 +213580,7 @@ var htHttpBodyParserMultipart = async (bodyBuffer, contentType) => {
|
|
|
213514
213580
|
jsonBody = { fields, filesMetaData };
|
|
213515
213581
|
multipartFiles = filesBodyArr;
|
|
213516
213582
|
} catch (_err) {
|
|
213517
|
-
|
|
213583
|
+
debug15("Error occurred while parsing body");
|
|
213518
213584
|
bodyType = HtHttpBodyType.RAW;
|
|
213519
213585
|
bodyParsingError = true;
|
|
213520
213586
|
const { bufferStr, encoding } = bufferToString(bodyBuffer);
|
|
@@ -213556,14 +213622,14 @@ var htHttpBodyParserSync = (bodyBuffer, contentType) => {
|
|
|
213556
213622
|
rawBody = bufferStr;
|
|
213557
213623
|
rawBodyEncoding = encoding;
|
|
213558
213624
|
} else if (bodyBuffer.length > 0) {
|
|
213559
|
-
|
|
213625
|
+
debug15("contentType not found in htHttpBodyParser");
|
|
213560
213626
|
bodyType = HtHttpBodyType.UNSPECIFIED;
|
|
213561
213627
|
const { bufferStr, encoding } = bufferToString(bodyBuffer);
|
|
213562
213628
|
rawBody = bufferStr;
|
|
213563
213629
|
rawBodyEncoding = encoding;
|
|
213564
213630
|
}
|
|
213565
213631
|
} catch (_err) {
|
|
213566
|
-
|
|
213632
|
+
debug15("Error occurred while parsing body");
|
|
213567
213633
|
bodyType = HtHttpBodyType.RAW;
|
|
213568
213634
|
bodyParsingError = true;
|
|
213569
213635
|
const { bufferStr, encoding } = bufferToString(bodyBuffer);
|
|
@@ -213588,7 +213654,7 @@ var htHttpBodyParser = async (bodyBuffer, contentType) => {
|
|
|
213588
213654
|
};
|
|
213589
213655
|
|
|
213590
213656
|
// src/instrumentation/libraries/http/httpHooks.ts
|
|
213591
|
-
var
|
|
213657
|
+
var debug16 = debug_default("ht-instrumentation-http" /* HtHttpInstrumentation */);
|
|
213592
213658
|
var CONTENT_ENCODING_LOWER_CASE = "content-encoding";
|
|
213593
213659
|
var httpReqObjWeakMap = /* @__PURE__ */ new WeakMap();
|
|
213594
213660
|
var parseHeaders = (headers) => {
|
|
@@ -213692,12 +213758,12 @@ var parseAndStoreFetchHttpRequest = async ({
|
|
|
213692
213758
|
const { httpMeta, ...readableInput } = fetchReqInputObj;
|
|
213693
213759
|
mock.setReadableInput(readableInput, httpMeta || {});
|
|
213694
213760
|
} catch (e) {
|
|
213695
|
-
|
|
213696
|
-
|
|
213761
|
+
debug16(e);
|
|
213762
|
+
debug16("Error occurred while setting client request body.");
|
|
213697
213763
|
}
|
|
213698
213764
|
}).catch(async (err) => {
|
|
213699
|
-
|
|
213700
|
-
|
|
213765
|
+
debug16(err);
|
|
213766
|
+
debug16(
|
|
213701
213767
|
`Error occurred while decoding "${encoding}" client request payload.`
|
|
213702
213768
|
);
|
|
213703
213769
|
try {
|
|
@@ -213708,8 +213774,8 @@ var parseAndStoreFetchHttpRequest = async ({
|
|
|
213708
213774
|
const { httpMeta, ...readableInput } = fetchReqInputObj;
|
|
213709
213775
|
mock.setReadableInput(readableInput, httpMeta || {});
|
|
213710
213776
|
} catch (e) {
|
|
213711
|
-
|
|
213712
|
-
|
|
213777
|
+
debug16(e);
|
|
213778
|
+
debug16("Error occurred while setting client request body.");
|
|
213713
213779
|
}
|
|
213714
213780
|
});
|
|
213715
213781
|
} else {
|
|
@@ -213721,8 +213787,8 @@ var parseAndStoreFetchHttpRequest = async ({
|
|
|
213721
213787
|
const { httpMeta, ...readableInput } = fetchReqInputObj;
|
|
213722
213788
|
mock.setReadableInput(readableInput, httpMeta || {});
|
|
213723
213789
|
} catch (e) {
|
|
213724
|
-
|
|
213725
|
-
|
|
213790
|
+
debug16(e);
|
|
213791
|
+
debug16("Error occurred while setting client request body.");
|
|
213726
213792
|
}
|
|
213727
213793
|
}
|
|
213728
213794
|
} else {
|
|
@@ -213920,8 +213986,8 @@ var httpServerRequestHookRecordMode = (req, mock) => {
|
|
|
213920
213986
|
try {
|
|
213921
213987
|
decodedBody = await decodeBody(bodyBuffer, encoding);
|
|
213922
213988
|
} catch (err) {
|
|
213923
|
-
|
|
213924
|
-
|
|
213989
|
+
debug16(err);
|
|
213990
|
+
debug16(
|
|
213925
213991
|
`Error occurred while decoding "${encoding}" incoming request payload`
|
|
213926
213992
|
);
|
|
213927
213993
|
}
|
|
@@ -213934,8 +214000,8 @@ var httpServerRequestHookRecordMode = (req, mock) => {
|
|
|
213934
214000
|
bodyBuffer: decodedBody
|
|
213935
214001
|
});
|
|
213936
214002
|
} catch (e) {
|
|
213937
|
-
|
|
213938
|
-
|
|
214003
|
+
debug16(e);
|
|
214004
|
+
debug16("Error occurred while setting server request body.");
|
|
213939
214005
|
}
|
|
213940
214006
|
});
|
|
213941
214007
|
});
|
|
@@ -213989,12 +214055,12 @@ var httpServerResponseHookRecordMode = (res, mock) => {
|
|
|
213989
214055
|
mock,
|
|
213990
214056
|
bodyBuffer: decodedBuffer
|
|
213991
214057
|
}).catch((e) => {
|
|
213992
|
-
|
|
213993
|
-
|
|
214058
|
+
debug16(e);
|
|
214059
|
+
debug16("Error occurred while setting server response. #HH-01");
|
|
213994
214060
|
});
|
|
213995
214061
|
}).catch((err) => {
|
|
213996
|
-
|
|
213997
|
-
|
|
214062
|
+
debug16(err);
|
|
214063
|
+
debug16(
|
|
213998
214064
|
`Error occurred while decoding "${encoding}" server response. #HH-02`
|
|
213999
214065
|
);
|
|
214000
214066
|
parseAndSetServerResponseRecordMode({
|
|
@@ -214003,8 +214069,8 @@ var httpServerResponseHookRecordMode = (res, mock) => {
|
|
|
214003
214069
|
mock,
|
|
214004
214070
|
bodyBuffer: buffer
|
|
214005
214071
|
}).catch((e) => {
|
|
214006
|
-
|
|
214007
|
-
|
|
214072
|
+
debug16(e);
|
|
214073
|
+
debug16("Error occurred while setting server response. #HH-03");
|
|
214008
214074
|
});
|
|
214009
214075
|
});
|
|
214010
214076
|
} else {
|
|
@@ -214014,8 +214080,8 @@ var httpServerResponseHookRecordMode = (res, mock) => {
|
|
|
214014
214080
|
mock,
|
|
214015
214081
|
bodyBuffer: buffer
|
|
214016
214082
|
}).catch((e) => {
|
|
214017
|
-
|
|
214018
|
-
|
|
214083
|
+
debug16(e);
|
|
214084
|
+
debug16("Error occurred while setting server response. #HH-04");
|
|
214019
214085
|
});
|
|
214020
214086
|
}
|
|
214021
214087
|
const cTraceId = getCurrTraceId();
|
|
@@ -214092,7 +214158,7 @@ var httpClientRequestHookRecordMode = (req, _mock) => {
|
|
|
214092
214158
|
);
|
|
214093
214159
|
}
|
|
214094
214160
|
}
|
|
214095
|
-
|
|
214161
|
+
debug16(`Outbound request hook trace id: ${currTraceId}`);
|
|
214096
214162
|
const oldEnd = req.end;
|
|
214097
214163
|
const outgoingChunks = [];
|
|
214098
214164
|
req.write = function write(...args) {
|
|
@@ -214114,12 +214180,12 @@ var httpClientRequestHookRecordMode = (req, _mock) => {
|
|
|
214114
214180
|
htHttReqWithoutBody,
|
|
214115
214181
|
bodyBuffer: decodedBuffer
|
|
214116
214182
|
}).catch((e) => {
|
|
214117
|
-
|
|
214118
|
-
|
|
214183
|
+
debug16(e);
|
|
214184
|
+
debug16("Error occurred while setting client request body.");
|
|
214119
214185
|
});
|
|
214120
214186
|
}).catch((err) => {
|
|
214121
|
-
|
|
214122
|
-
|
|
214187
|
+
debug16(err);
|
|
214188
|
+
debug16(
|
|
214123
214189
|
`Error occurred while decoding "${encoding}" client request payload.`
|
|
214124
214190
|
);
|
|
214125
214191
|
parseAndSetClientRequestRecordMode({
|
|
@@ -214127,8 +214193,8 @@ var httpClientRequestHookRecordMode = (req, _mock) => {
|
|
|
214127
214193
|
htHttReqWithoutBody,
|
|
214128
214194
|
bodyBuffer
|
|
214129
214195
|
}).catch((e) => {
|
|
214130
|
-
|
|
214131
|
-
|
|
214196
|
+
debug16(e);
|
|
214197
|
+
debug16("Error occurred while setting client request body.");
|
|
214132
214198
|
});
|
|
214133
214199
|
});
|
|
214134
214200
|
} else {
|
|
@@ -214137,8 +214203,8 @@ var httpClientRequestHookRecordMode = (req, _mock) => {
|
|
|
214137
214203
|
htHttReqWithoutBody,
|
|
214138
214204
|
bodyBuffer
|
|
214139
214205
|
}).catch((e) => {
|
|
214140
|
-
|
|
214141
|
-
|
|
214206
|
+
debug16(e);
|
|
214207
|
+
debug16("Error occurred while setting client request body.");
|
|
214142
214208
|
});
|
|
214143
214209
|
}
|
|
214144
214210
|
return oldEnd.apply(req, args);
|
|
@@ -214211,8 +214277,8 @@ var httpClientResponseHookRecordMode = (req, res, mock) => {
|
|
|
214211
214277
|
try {
|
|
214212
214278
|
decodedBody = await decodeBody(buffer, encoding);
|
|
214213
214279
|
} catch (err) {
|
|
214214
|
-
|
|
214215
|
-
|
|
214280
|
+
debug16(err);
|
|
214281
|
+
debug16(
|
|
214216
214282
|
`Error occurred while decoding "${encoding}" client request's response body.`
|
|
214217
214283
|
);
|
|
214218
214284
|
}
|
|
@@ -214225,8 +214291,8 @@ var httpClientResponseHookRecordMode = (req, res, mock) => {
|
|
|
214225
214291
|
bodyBuffer: decodedBody
|
|
214226
214292
|
});
|
|
214227
214293
|
} catch (e) {
|
|
214228
|
-
|
|
214229
|
-
|
|
214294
|
+
debug16(e);
|
|
214295
|
+
debug16("Error occurred while setting server request body.");
|
|
214230
214296
|
}
|
|
214231
214297
|
});
|
|
214232
214298
|
};
|
|
@@ -214332,12 +214398,12 @@ var httpServerResponseHookReplayMode = (res, req, mock) => {
|
|
|
214332
214398
|
bodyBuffer: decodedBuffer
|
|
214333
214399
|
});
|
|
214334
214400
|
} catch (e) {
|
|
214335
|
-
|
|
214336
|
-
|
|
214401
|
+
debug16(e);
|
|
214402
|
+
debug16("Error occurred while setting server response for replay");
|
|
214337
214403
|
}
|
|
214338
214404
|
}).catch((err) => {
|
|
214339
|
-
|
|
214340
|
-
|
|
214405
|
+
debug16(err);
|
|
214406
|
+
debug16("Error occurred while decoding server response for replay");
|
|
214341
214407
|
try {
|
|
214342
214408
|
parseAndSetServerResponseReplayMode({
|
|
214343
214409
|
res,
|
|
@@ -214348,8 +214414,8 @@ var httpServerResponseHookReplayMode = (res, req, mock) => {
|
|
|
214348
214414
|
bodyBuffer: buffer
|
|
214349
214415
|
});
|
|
214350
214416
|
} catch (e) {
|
|
214351
|
-
|
|
214352
|
-
|
|
214417
|
+
debug16(e);
|
|
214418
|
+
debug16("Error occurred while setting server response for replay");
|
|
214353
214419
|
}
|
|
214354
214420
|
});
|
|
214355
214421
|
} else {
|
|
@@ -214363,8 +214429,8 @@ var httpServerResponseHookReplayMode = (res, req, mock) => {
|
|
|
214363
214429
|
bodyBuffer: buffer
|
|
214364
214430
|
});
|
|
214365
214431
|
} catch (e) {
|
|
214366
|
-
|
|
214367
|
-
|
|
214432
|
+
debug16(e);
|
|
214433
|
+
debug16("Error occurred while setting server response for replay");
|
|
214368
214434
|
}
|
|
214369
214435
|
}
|
|
214370
214436
|
}
|
|
@@ -214804,7 +214870,7 @@ var HttpClientRequestMock = class _HttpClientRequestMock extends HtInstrumentati
|
|
|
214804
214870
|
};
|
|
214805
214871
|
|
|
214806
214872
|
// src/instrumentation/libraries/http/HtMockClientRequest.ts
|
|
214807
|
-
var
|
|
214873
|
+
var debug17 = debug_default(
|
|
214808
214874
|
`${"ht-instrumentation-http" /* HtHttpInstrumentation */}-HtMockClientRequest`
|
|
214809
214875
|
);
|
|
214810
214876
|
var CONTENT_ENCODING_LOWER_CASE2 = "content-encoding";
|
|
@@ -215007,8 +215073,8 @@ var HtMockClientRequest = class {
|
|
|
215007
215073
|
contentEncoding
|
|
215008
215074
|
);
|
|
215009
215075
|
} catch (e) {
|
|
215010
|
-
|
|
215011
|
-
|
|
215076
|
+
debug17(e);
|
|
215077
|
+
debug17("Error occurred while decoding the client request body.");
|
|
215012
215078
|
}
|
|
215013
215079
|
}
|
|
215014
215080
|
const reqContentType = req.getHeader(CONTENT_TYPE_LOWER_CASE) ?? req.getHeader(CONTENT_TYPE_PASCAL_CASE);
|
|
@@ -215055,8 +215121,8 @@ var HtMockClientRequest = class {
|
|
|
215055
215121
|
try {
|
|
215056
215122
|
mockObj = mock.getReplayValue();
|
|
215057
215123
|
} catch (e) {
|
|
215058
|
-
|
|
215059
|
-
|
|
215124
|
+
debug17(e);
|
|
215125
|
+
debug17("Error in getting http client mock replay value");
|
|
215060
215126
|
if (process.env.SHOULD_EMIT_ERROR_IN_HTTP_OUTBOUND === "true") {
|
|
215061
215127
|
this.emit("error", e);
|
|
215062
215128
|
return;
|
|
@@ -215236,7 +215302,7 @@ function getClusterPathHelper(path4) {
|
|
|
215236
215302
|
}
|
|
215237
215303
|
|
|
215238
215304
|
// src/instrumentation/libraries/http/instrumentation.ts
|
|
215239
|
-
var
|
|
215305
|
+
var debug18 = debug_default("ht-instrumentation-http" /* HtHttpInstrumentation */);
|
|
215240
215306
|
var requestMakerFn = (component, args, plugin) => {
|
|
215241
215307
|
const req = component === "http" ? plugin.htHttpRequestFn(...args) : plugin.htHttpsRequestFn(...args);
|
|
215242
215308
|
return req;
|
|
@@ -215310,7 +215376,7 @@ var HtHttpInstrumentation = class extends HtInstrumentationBase {
|
|
|
215310
215376
|
}));
|
|
215311
215377
|
}
|
|
215312
215378
|
} catch (e) {
|
|
215313
|
-
|
|
215379
|
+
debug18(
|
|
215314
215380
|
"Error occurred while setting 'cache-control' header for outgoing fetch request : ",
|
|
215315
215381
|
e
|
|
215316
215382
|
);
|
|
@@ -215326,8 +215392,8 @@ var HtHttpInstrumentation = class extends HtInstrumentationBase {
|
|
|
215326
215392
|
header: HTTP_PARENT_REQUEST_HEADER
|
|
215327
215393
|
}));
|
|
215328
215394
|
} catch (e) {
|
|
215329
|
-
|
|
215330
|
-
|
|
215395
|
+
debug18(e);
|
|
215396
|
+
debug18(
|
|
215331
215397
|
"Error occurred while setting http parent request header for outgoing fetch http call."
|
|
215332
215398
|
);
|
|
215333
215399
|
}
|
|
@@ -215341,8 +215407,8 @@ var HtHttpInstrumentation = class extends HtInstrumentationBase {
|
|
|
215341
215407
|
header: HYPERTEST_SAMPLING_MODE_HEADER
|
|
215342
215408
|
}));
|
|
215343
215409
|
} catch (e) {
|
|
215344
|
-
|
|
215345
|
-
|
|
215410
|
+
debug18(e);
|
|
215411
|
+
debug18(
|
|
215346
215412
|
"Error occurred while setting sampling mode header for outgoing fetch http call."
|
|
215347
215413
|
);
|
|
215348
215414
|
}
|
|
@@ -215606,7 +215672,7 @@ var HtHttpInstrumentation = class extends HtInstrumentationBase {
|
|
|
215606
215672
|
incomingRequestPath: parsedUrl.pathname
|
|
215607
215673
|
});
|
|
215608
215674
|
const htRequestId = request3.headers["x-ht-request-id"];
|
|
215609
|
-
|
|
215675
|
+
debug18(`received req with htRequestId ${htRequestId}`);
|
|
215610
215676
|
const ctxWithRootTraceKeyAndRequestId = import_api56.context.active().setValue(IS_ROOT_TRACE_KEY, false).setValue(HT_REQUEST_ID, htRequestId).setValue(SHOULD_INSTRUMENT_DATE, shouldInstrumentDate);
|
|
215611
215677
|
return import_api56.context.with(ctxWithRootTraceKeyAndRequestId, () => {
|
|
215612
215678
|
const mock = new HttpServerRequestMock({
|
|
@@ -215625,11 +215691,11 @@ var HtHttpInstrumentation = class extends HtInstrumentationBase {
|
|
|
215625
215691
|
import_api56.context.bind(import_api56.context.active(), response);
|
|
215626
215692
|
const isHtSdkGraphqlReq = isHtSdkGraphqlReqFn(request3);
|
|
215627
215693
|
if (isHtSdkGraphqlReq) {
|
|
215628
|
-
|
|
215694
|
+
debug18(
|
|
215629
215695
|
`received a graphql request with htRequestId - ${htRequestId}`
|
|
215630
215696
|
);
|
|
215631
215697
|
} else {
|
|
215632
|
-
|
|
215698
|
+
debug18(
|
|
215633
215699
|
`received a http request with htRequestId - ${htRequestId}`
|
|
215634
215700
|
);
|
|
215635
215701
|
httpServerResponseHookReplayMode(response, request3, mock);
|
|
@@ -217098,7 +217164,7 @@ var MockCursor = class extends Readable12 {
|
|
|
217098
217164
|
};
|
|
217099
217165
|
|
|
217100
217166
|
// src/instrumentation/libraries/mongoose/mongooseHelpers/processPayloadHelpers.ts
|
|
217101
|
-
var
|
|
217167
|
+
var debug19 = debug_default("ht-mongoose-process-payload-helpers");
|
|
217102
217168
|
function isObjectIdInstance2(payload) {
|
|
217103
217169
|
var _a4, _b2;
|
|
217104
217170
|
return typeof payload === "object" && (((_a4 = payload.constructor) == null ? void 0 : _a4.name) === "ObjectId" || ((_b2 = payload.constructor) == null ? void 0 : _b2.name) === "ObjectID") && (payload._bsontype === "ObjectId" || payload._bsontype === "ObjectID");
|
|
@@ -217228,7 +217294,7 @@ var convertSanitizedPayloadToRealPayload3 = (sanitizedPayload, meta, version2) =
|
|
|
217228
217294
|
try {
|
|
217229
217295
|
obj[key] = new ObjectConstructor(obj[key]);
|
|
217230
217296
|
} catch (_e2) {
|
|
217231
|
-
|
|
217297
|
+
debug19("Error converting sanitized payload to real payload", key);
|
|
217232
217298
|
}
|
|
217233
217299
|
}
|
|
217234
217300
|
};
|
|
@@ -219607,7 +219673,7 @@ var HtNodemailerInstrumentation = class extends HtInstrumentationBase {
|
|
|
219607
219673
|
};
|
|
219608
219674
|
|
|
219609
219675
|
// src/instrumentation/libraries/opossum/instrumentation.ts
|
|
219610
|
-
var
|
|
219676
|
+
var debug20 = debug_default("ht-instrumentation-opossum" /* HtOpossumInstrumentation */);
|
|
219611
219677
|
var HtOpossumInstrumentation = class extends HtInstrumentationBase {
|
|
219612
219678
|
_Original_CircuitBreaker;
|
|
219613
219679
|
_HT_Patched_CircuitBreaker;
|
|
@@ -219660,15 +219726,15 @@ var HtOpossumInstrumentation = class extends HtInstrumentationBase {
|
|
|
219660
219726
|
super(...args);
|
|
219661
219727
|
if (process.env.HT_MODE === "RECORD") {
|
|
219662
219728
|
this.on("reject", (err) => {
|
|
219663
|
-
|
|
219729
|
+
debug20("This request is discarded as reject event is emitted", err);
|
|
219664
219730
|
discardRequest();
|
|
219665
219731
|
});
|
|
219666
219732
|
this.on("failure", (err) => {
|
|
219667
|
-
|
|
219733
|
+
debug20("This request is discarded as failure event is emitted", err);
|
|
219668
219734
|
discardRequest();
|
|
219669
219735
|
});
|
|
219670
219736
|
this.on("timeout", (err) => {
|
|
219671
|
-
|
|
219737
|
+
debug20("This request is discarded as timeout event is emitted", err);
|
|
219672
219738
|
discardRequest();
|
|
219673
219739
|
});
|
|
219674
219740
|
}
|
|
@@ -230469,7 +230535,7 @@ var zGenerateReadableInputFromProcessedInputPayload = z.object({
|
|
|
230469
230535
|
});
|
|
230470
230536
|
|
|
230471
230537
|
// src/server/index.ts
|
|
230472
|
-
var
|
|
230538
|
+
var debug21 = debug_default("ht-sdk::server");
|
|
230473
230539
|
var ONE_MB_IN_BYTES2 = 1048576;
|
|
230474
230540
|
var FASTIFY_REQ_PAYLOAD_LIMIT_BYTES = ONE_MB_IN_BYTES2 * 500;
|
|
230475
230541
|
var app = (0, import_fastify.default)({
|
|
@@ -231317,12 +231383,12 @@ app.route({
|
|
|
231317
231383
|
method: "GET",
|
|
231318
231384
|
url: "/isSdkReadyForTest",
|
|
231319
231385
|
handler(_req, reply) {
|
|
231320
|
-
|
|
231386
|
+
debug21("/isSdkReadyForTest called");
|
|
231321
231387
|
const memoryStoreInst = MemoryStore.getInstance();
|
|
231322
231388
|
const retVal = {
|
|
231323
231389
|
isReady: memoryStoreInst.isRootMockUpdated()
|
|
231324
231390
|
};
|
|
231325
|
-
|
|
231391
|
+
debug21(`/isSdkReadyForTest responding with: ${JSON.stringify(retVal)}`);
|
|
231326
231392
|
reply.send(retVal);
|
|
231327
231393
|
}
|
|
231328
231394
|
});
|
|
@@ -231330,14 +231396,14 @@ app.route({
|
|
|
231330
231396
|
method: "GET",
|
|
231331
231397
|
url: "/isAppReadyForTest",
|
|
231332
231398
|
handler(_req, reply) {
|
|
231333
|
-
|
|
231399
|
+
debug21("/isAppReadyForTest called");
|
|
231334
231400
|
const memoryStoreInst = MemoryStore.getInstance();
|
|
231335
231401
|
const retVal = {
|
|
231336
231402
|
isReady: memoryStoreInst.getAppHealthStatus() === "UP",
|
|
231337
231403
|
PID: process.pid,
|
|
231338
231404
|
PPID: process.ppid
|
|
231339
231405
|
};
|
|
231340
|
-
|
|
231406
|
+
debug21(`/isAppReadyForTest responding with: ${JSON.stringify(retVal)}`);
|
|
231341
231407
|
reply.send(retVal);
|
|
231342
231408
|
}
|
|
231343
231409
|
});
|
|
@@ -231499,7 +231565,7 @@ if (typeof fetch === "undefined") {
|
|
|
231499
231565
|
global.Response = import_node_fetch.Response;
|
|
231500
231566
|
global.Request = import_node_fetch.Request;
|
|
231501
231567
|
}
|
|
231502
|
-
var
|
|
231568
|
+
var debug22 = debug_default("ht-sdk::index");
|
|
231503
231569
|
var defaultInstrumentationsForDuplicateMocksFiltering = [
|
|
231504
231570
|
"ht-instrumentation-date" /* HtDateInstrumentation */,
|
|
231505
231571
|
"ht-instrumentation-manual" /* ManualMock */,
|
|
@@ -231616,7 +231682,7 @@ if (typeof fetch === "undefined") {
|
|
|
231616
231682
|
global.Response = import_node_fetch2.Response;
|
|
231617
231683
|
global.Request = import_node_fetch2.Request;
|
|
231618
231684
|
}
|
|
231619
|
-
var
|
|
231685
|
+
var debug23 = debug_default("ht-sdk::index");
|
|
231620
231686
|
var MARK_APP_AS_READY_NOT_CALLED = "[WARNING] markAppAsReady has not been called, please call markAppAsReady after your app boots because tests will not execute without it in REPLAY mode";
|
|
231621
231687
|
var deprecatedAutoInstrumentation = () => {
|
|
231622
231688
|
console.error(
|
|
@@ -231761,6 +231827,20 @@ var initialiseNormally = (htConfig) => {
|
|
|
231761
231827
|
if (!hasHttp2) {
|
|
231762
231828
|
process.env.DD_TRACE_DISABLED_PLUGINS = current === "" ? "http2" : `${current},http2`;
|
|
231763
231829
|
}
|
|
231830
|
+
const isCurrentFolderInGitRepo = isCurrentFolderInGitRepoFn();
|
|
231831
|
+
if (isCurrentFolderInGitRepo && isHavingUncommittedChangesFn()) {
|
|
231832
|
+
const gitDiff = getUncommittedChanges();
|
|
231833
|
+
console.log(
|
|
231834
|
+
"The following are the uncommitted changes in your repository."
|
|
231835
|
+
);
|
|
231836
|
+
console.log(`
|
|
231837
|
+
${gitDiff}
|
|
231838
|
+
`);
|
|
231839
|
+
console.error(
|
|
231840
|
+
"Your repository contains uncommitted changes, please commit them or remove from git tracking and add them to .gitignore before recording requests with hypertest."
|
|
231841
|
+
);
|
|
231842
|
+
process.exit(1);
|
|
231843
|
+
}
|
|
231764
231844
|
}
|
|
231765
231845
|
const packageNames = alreadyRequiredModules();
|
|
231766
231846
|
if (packageNames.size > 0 && process.env.HT_ENV === "prod" && IS_RECORD_MODE) {
|
|
@@ -231912,7 +231992,7 @@ function alreadyRequiredModules() {
|
|
|
231912
231992
|
async function monitorOtelCollectorStatus(exporterUrl) {
|
|
231913
231993
|
const { accessible } = await pingOtelCollector(exporterUrl);
|
|
231914
231994
|
if (accessible) {
|
|
231915
|
-
|
|
231995
|
+
debug23("Hypertest otel collector is accessible");
|
|
231916
231996
|
} else {
|
|
231917
231997
|
console.error(`
|
|
231918
231998
|
ERROR: Hypertest otel collector is not accessible.
|