@assinafy/cli 2.8.0 → 2.10.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/README.en.md +70 -67
- package/README.md +28 -24
- package/THIRD_PARTY_NOTICES.md +9 -9
- package/dist/api.cjs +204 -55
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +202 -55
- package/dist/api.js.map +1 -1
- package/dist/cli.cjs +1413 -559
- package/dist/types/api/client.d.ts +2 -0
- package/dist/types/api/client.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/resources/assignments.d.ts +7 -1
- package/dist/types/api/resources/assignments.d.ts.map +1 -1
- package/dist/types/api/resources/authentication.d.ts +1 -3
- package/dist/types/api/resources/authentication.d.ts.map +1 -1
- package/dist/types/api/resources/documents.d.ts +7 -1
- package/dist/types/api/resources/documents.d.ts.map +1 -1
- package/dist/types/api/resources/envelopes.d.ts +7 -1
- package/dist/types/api/resources/envelopes.d.ts.map +1 -1
- package/dist/types/api/resources/scheduled-sends.d.ts +11 -0
- package/dist/types/api/resources/scheduled-sends.d.ts.map +1 -0
- package/dist/types/api/types.d.ts +36 -2
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/api/utils.d.ts +3 -0
- package/dist/types/api/utils.d.ts.map +1 -1
- package/docs/README.md +3 -1
- package/docs/api-operations-staging.json +1262 -0
- package/docs/api-operations.json +89 -1
- package/docs/api-reference-staging.md +18466 -0
- package/docs/api-reference.md +1830 -323
- package/docs/assignments.md +46 -0
- package/docs/auth.md +3 -16
- package/docs/documents.md +47 -0
- package/docs/envelopes.md +29 -0
- package/docs/scheduled-sends.md +63 -0
- package/docs/sdk-reference.md +66 -4
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +4 -4
package/dist/cli.cjs
CHANGED
|
@@ -47,13 +47,13 @@ var require_picocolors = __commonJS({
|
|
|
47
47
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
48
48
|
};
|
|
49
49
|
var replaceClose = (string, close, replace, index) => {
|
|
50
|
-
let result = "",
|
|
50
|
+
let result = "", cursor2 = 0;
|
|
51
51
|
do {
|
|
52
|
-
result += string.substring(
|
|
53
|
-
|
|
54
|
-
index = string.indexOf(close,
|
|
52
|
+
result += string.substring(cursor2, index) + replace;
|
|
53
|
+
cursor2 = index + close.length;
|
|
54
|
+
index = string.indexOf(close, cursor2);
|
|
55
55
|
} while (~index);
|
|
56
|
-
return result + string.substring(
|
|
56
|
+
return result + string.substring(cursor2);
|
|
57
57
|
};
|
|
58
58
|
var createColors = (enabled = isColorSupported) => {
|
|
59
59
|
let f = enabled ? formatter : () => String;
|
|
@@ -10802,8 +10802,8 @@ var require_browser = __commonJS({
|
|
|
10802
10802
|
if (!this.useColors) {
|
|
10803
10803
|
return;
|
|
10804
10804
|
}
|
|
10805
|
-
const
|
|
10806
|
-
args.splice(1, 0,
|
|
10805
|
+
const c2 = "color: " + this.color;
|
|
10806
|
+
args.splice(1, 0, c2, "color: inherit");
|
|
10807
10807
|
let index = 0;
|
|
10808
10808
|
let lastC = 0;
|
|
10809
10809
|
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
@@ -10815,7 +10815,7 @@ var require_browser = __commonJS({
|
|
|
10815
10815
|
lastC = index;
|
|
10816
10816
|
}
|
|
10817
10817
|
});
|
|
10818
|
-
args.splice(lastC, 0,
|
|
10818
|
+
args.splice(lastC, 0, c2);
|
|
10819
10819
|
}
|
|
10820
10820
|
exports2.log = console.debug || console.log || (() => {
|
|
10821
10821
|
});
|
|
@@ -10985,8 +10985,8 @@ var require_node = __commonJS({
|
|
|
10985
10985
|
function formatArgs(args) {
|
|
10986
10986
|
const { namespace: name, useColors: useColors2 } = this;
|
|
10987
10987
|
if (useColors2) {
|
|
10988
|
-
const
|
|
10989
|
-
const colorCode = "\x1B[3" + (
|
|
10988
|
+
const c2 = this.color;
|
|
10989
|
+
const colorCode = "\x1B[3" + (c2 < 8 ? c2 : "8;5;" + c2);
|
|
10990
10990
|
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
10991
10991
|
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
10992
10992
|
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
@@ -11085,7 +11085,7 @@ var require_src2 = __commonJS({
|
|
|
11085
11085
|
const { stack } = new Error();
|
|
11086
11086
|
if (typeof stack !== "string")
|
|
11087
11087
|
return false;
|
|
11088
|
-
return stack.split("\n").some((
|
|
11088
|
+
return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
|
|
11089
11089
|
}
|
|
11090
11090
|
function createAgent(callback, opts) {
|
|
11091
11091
|
return new createAgent.Agent(callback, opts);
|
|
@@ -12024,69 +12024,13 @@ var require_follow_redirects = __commonJS({
|
|
|
12024
12024
|
return URL2 && value instanceof URL2;
|
|
12025
12025
|
}
|
|
12026
12026
|
function escapeRegex(regex) {
|
|
12027
|
-
return regex.replace(/[[\]
|
|
12027
|
+
return regex.replace(/[\^$\\.*+?()[\]{}|]/g, "\\$&");
|
|
12028
12028
|
}
|
|
12029
12029
|
module2.exports = wrap({ http: http3, https: https2 });
|
|
12030
12030
|
module2.exports.wrap = wrap;
|
|
12031
12031
|
}
|
|
12032
12032
|
});
|
|
12033
12033
|
|
|
12034
|
-
// node_modules/sisteransi/src/index.js
|
|
12035
|
-
var require_src3 = __commonJS({
|
|
12036
|
-
"node_modules/sisteransi/src/index.js"(exports2, module2) {
|
|
12037
|
-
"use strict";
|
|
12038
|
-
var ESC2 = "\x1B";
|
|
12039
|
-
var CSI2 = `${ESC2}[`;
|
|
12040
|
-
var beep = "\x07";
|
|
12041
|
-
var cursor3 = {
|
|
12042
|
-
to(x, y) {
|
|
12043
|
-
if (!y) return `${CSI2}${x + 1}G`;
|
|
12044
|
-
return `${CSI2}${y + 1};${x + 1}H`;
|
|
12045
|
-
},
|
|
12046
|
-
move(x, y) {
|
|
12047
|
-
let ret = "";
|
|
12048
|
-
if (x < 0) ret += `${CSI2}${-x}D`;
|
|
12049
|
-
else if (x > 0) ret += `${CSI2}${x}C`;
|
|
12050
|
-
if (y < 0) ret += `${CSI2}${-y}A`;
|
|
12051
|
-
else if (y > 0) ret += `${CSI2}${y}B`;
|
|
12052
|
-
return ret;
|
|
12053
|
-
},
|
|
12054
|
-
up: (count = 1) => `${CSI2}${count}A`,
|
|
12055
|
-
down: (count = 1) => `${CSI2}${count}B`,
|
|
12056
|
-
forward: (count = 1) => `${CSI2}${count}C`,
|
|
12057
|
-
backward: (count = 1) => `${CSI2}${count}D`,
|
|
12058
|
-
nextLine: (count = 1) => `${CSI2}E`.repeat(count),
|
|
12059
|
-
prevLine: (count = 1) => `${CSI2}F`.repeat(count),
|
|
12060
|
-
left: `${CSI2}G`,
|
|
12061
|
-
hide: `${CSI2}?25l`,
|
|
12062
|
-
show: `${CSI2}?25h`,
|
|
12063
|
-
save: `${ESC2}7`,
|
|
12064
|
-
restore: `${ESC2}8`
|
|
12065
|
-
};
|
|
12066
|
-
var scroll = {
|
|
12067
|
-
up: (count = 1) => `${CSI2}S`.repeat(count),
|
|
12068
|
-
down: (count = 1) => `${CSI2}T`.repeat(count)
|
|
12069
|
-
};
|
|
12070
|
-
var erase3 = {
|
|
12071
|
-
screen: `${CSI2}2J`,
|
|
12072
|
-
up: (count = 1) => `${CSI2}1J`.repeat(count),
|
|
12073
|
-
down: (count = 1) => `${CSI2}J`.repeat(count),
|
|
12074
|
-
line: `${CSI2}2K`,
|
|
12075
|
-
lineEnd: `${CSI2}K`,
|
|
12076
|
-
lineStart: `${CSI2}1K`,
|
|
12077
|
-
lines(count) {
|
|
12078
|
-
let clear = "";
|
|
12079
|
-
for (let i2 = 0; i2 < count; i2++)
|
|
12080
|
-
clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
|
|
12081
|
-
if (count)
|
|
12082
|
-
clear += cursor3.left;
|
|
12083
|
-
return clear;
|
|
12084
|
-
}
|
|
12085
|
-
};
|
|
12086
|
-
module2.exports = { cursor: cursor3, scroll, erase: erase3, beep };
|
|
12087
|
-
}
|
|
12088
|
-
});
|
|
12089
|
-
|
|
12090
12034
|
// node_modules/commander/lib/error.js
|
|
12091
12035
|
var CommanderError = class extends Error {
|
|
12092
12036
|
/**
|
|
@@ -12314,11 +12258,11 @@ var Help = class {
|
|
|
12314
12258
|
visibleOptions.push(helpOption);
|
|
12315
12259
|
} else if (helpOption.long && !removeLong) {
|
|
12316
12260
|
visibleOptions.push(
|
|
12317
|
-
cmd.createOption(helpOption.long, helpOption.description)
|
|
12261
|
+
cmd.createOption(helpOption.long, helpOption.description).helpGroup(helpOption.helpGroupHeading)
|
|
12318
12262
|
);
|
|
12319
12263
|
} else if (helpOption.short && !removeShort) {
|
|
12320
12264
|
visibleOptions.push(
|
|
12321
|
-
cmd.createOption(helpOption.short, helpOption.description)
|
|
12265
|
+
cmd.createOption(helpOption.short, helpOption.description).helpGroup(helpOption.helpGroupHeading)
|
|
12322
12266
|
);
|
|
12323
12267
|
}
|
|
12324
12268
|
}
|
|
@@ -12850,7 +12794,7 @@ var Option = class {
|
|
|
12850
12794
|
this.description = description || "";
|
|
12851
12795
|
this.required = flags.includes("<");
|
|
12852
12796
|
this.optional = flags.includes("[");
|
|
12853
|
-
this.variadic =
|
|
12797
|
+
this.variadic = new RegExp("\\p{ID_Continue}\\.\\.\\.[>\\]]$", "u").test(flags);
|
|
12854
12798
|
this.mandatory = false;
|
|
12855
12799
|
const optionFlags = splitOptionFlags(flags);
|
|
12856
12800
|
this.short = optionFlags.shortFlag;
|
|
@@ -14033,7 +13977,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
14033
13977
|
getOptionValueSourceWithGlobals(key) {
|
|
14034
13978
|
let source;
|
|
14035
13979
|
this._getCommandAndAncestors().forEach((cmd) => {
|
|
14036
|
-
if (cmd.
|
|
13980
|
+
if (Object.hasOwn(cmd._optionValueSources, key)) {
|
|
14037
13981
|
source = cmd.getOptionValueSource(key);
|
|
14038
13982
|
}
|
|
14039
13983
|
});
|
|
@@ -14676,7 +14620,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
14676
14620
|
return arg.length > 1 && arg[0] === "-";
|
|
14677
14621
|
}
|
|
14678
14622
|
const negativeNumberArg = (arg) => {
|
|
14679
|
-
if (!/^-(\d+|\d*\.\d+)(
|
|
14623
|
+
if (!/^-(\d+|\d*\.\d+)([eE][+-]?\d+)?$/.test(arg)) return false;
|
|
14680
14624
|
return !this._getCommandAndAncestors().some(
|
|
14681
14625
|
(cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short))
|
|
14682
14626
|
);
|
|
@@ -15124,7 +15068,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
15124
15068
|
* (This does not override a group set directly on the subcommand using .helpGroup().)
|
|
15125
15069
|
*
|
|
15126
15070
|
* @example
|
|
15127
|
-
* program.commandsGroup('Development Commands:);
|
|
15071
|
+
* program.commandsGroup('Development Commands:');
|
|
15128
15072
|
* program.command('watch')...
|
|
15129
15073
|
* program.command('lint')...
|
|
15130
15074
|
* ...
|
|
@@ -15295,7 +15239,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
15295
15239
|
* Pass in false to disable the built-in help option.
|
|
15296
15240
|
*
|
|
15297
15241
|
* @example
|
|
15298
|
-
* program.helpOption('-?, --help' 'show help'); // customise
|
|
15242
|
+
* program.helpOption('-?, --help', 'show help'); // customise
|
|
15299
15243
|
* program.helpOption(false); // disable
|
|
15300
15244
|
*
|
|
15301
15245
|
* @param {(string | boolean)} flags
|
|
@@ -15424,16 +15368,20 @@ function incrementNodeInspectorPort(args) {
|
|
|
15424
15368
|
let debugHost = "127.0.0.1";
|
|
15425
15369
|
let debugPort = "9229";
|
|
15426
15370
|
let match;
|
|
15427
|
-
if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
15371
|
+
if ((match = arg.match(/^(--inspect(-brk|-wait)?)$/)) !== null) {
|
|
15428
15372
|
debugOption = match[1];
|
|
15429
|
-
} else if ((match = arg.match(
|
|
15373
|
+
} else if ((match = arg.match(
|
|
15374
|
+
/^(--inspect(-brk|-port|-wait)?)=(\[[^\]]+\]|[^:]+)$/
|
|
15375
|
+
)) !== null) {
|
|
15430
15376
|
debugOption = match[1];
|
|
15431
15377
|
if (/^\d+$/.test(match[3])) {
|
|
15432
15378
|
debugPort = match[3];
|
|
15433
15379
|
} else {
|
|
15434
15380
|
debugHost = match[3];
|
|
15435
15381
|
}
|
|
15436
|
-
} else if ((match = arg.match(
|
|
15382
|
+
} else if ((match = arg.match(
|
|
15383
|
+
/^(--inspect(-brk|-port|-wait)?)=(\[[^\]]+\]|[^:]+):(\d+)$/
|
|
15384
|
+
)) !== null) {
|
|
15437
15385
|
debugOption = match[1];
|
|
15438
15386
|
debugHost = match[3];
|
|
15439
15387
|
debugPort = match[4];
|
|
@@ -15580,10 +15528,16 @@ var isPlainObject = (val) => {
|
|
|
15580
15528
|
return false;
|
|
15581
15529
|
}
|
|
15582
15530
|
const prototype2 = getPrototypeOf(val);
|
|
15583
|
-
return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat
|
|
15584
|
-
//
|
|
15585
|
-
//
|
|
15586
|
-
|
|
15531
|
+
return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the
|
|
15532
|
+
// value is tagged/iterable, ignoring members reachable only through shared
|
|
15533
|
+
// or terminal prototype boundaries. This is exactly what
|
|
15534
|
+
// hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted
|
|
15535
|
+
// above (null, Object.prototype, or a terminal null-prototype template) is
|
|
15536
|
+
// a boundary, so the walk never inspects anything but `val`'s own members,
|
|
15537
|
+
// and stops before even those when `val` is itself the boundary
|
|
15538
|
+
// Object.prototype. Checking that inline avoids allocating the walker's
|
|
15539
|
+
// `seen` list twice per call on the mergeConfig / merge hot path.
|
|
15540
|
+
(isPrototypeBoundary(val, prototype2, true) || !hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator));
|
|
15587
15541
|
};
|
|
15588
15542
|
var isEmptyObject = (val) => {
|
|
15589
15543
|
if (!isObject(val) || isBuffer(val)) {
|
|
@@ -15639,12 +15593,12 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
15639
15593
|
return;
|
|
15640
15594
|
}
|
|
15641
15595
|
let i2;
|
|
15642
|
-
let
|
|
15596
|
+
let l;
|
|
15643
15597
|
if (typeof obj !== "object") {
|
|
15644
15598
|
obj = [obj];
|
|
15645
15599
|
}
|
|
15646
15600
|
if (isArray(obj)) {
|
|
15647
|
-
for (i2 = 0,
|
|
15601
|
+
for (i2 = 0, l = obj.length; i2 < l; i2++) {
|
|
15648
15602
|
fn.call(null, obj[i2], i2, obj);
|
|
15649
15603
|
}
|
|
15650
15604
|
} else {
|
|
@@ -15684,11 +15638,21 @@ var isContextDefined = (context) => !isUndefined(context) && context !== _global
|
|
|
15684
15638
|
function merge(...objs) {
|
|
15685
15639
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
15686
15640
|
const result = {};
|
|
15641
|
+
const lowerCaseKeys = caseless ? /* @__PURE__ */ Object.create(null) : null;
|
|
15687
15642
|
const assignValue = (val, key) => {
|
|
15688
15643
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
15689
15644
|
return;
|
|
15690
15645
|
}
|
|
15691
|
-
|
|
15646
|
+
let targetKey = key;
|
|
15647
|
+
if (lowerCaseKeys && typeof key === "string") {
|
|
15648
|
+
const lowerKey = key.toLowerCase();
|
|
15649
|
+
const knownKey = lowerCaseKeys[lowerKey];
|
|
15650
|
+
if (knownKey !== void 0 && hasOwnProperty(result, knownKey)) {
|
|
15651
|
+
targetKey = knownKey;
|
|
15652
|
+
} else {
|
|
15653
|
+
lowerCaseKeys[lowerKey] = key;
|
|
15654
|
+
}
|
|
15655
|
+
}
|
|
15692
15656
|
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
|
|
15693
15657
|
if (isPlainObject(existing) && isPlainObject(val)) {
|
|
15694
15658
|
result[targetKey] = merge(existing, val);
|
|
@@ -15700,13 +15664,13 @@ function merge(...objs) {
|
|
|
15700
15664
|
result[targetKey] = val;
|
|
15701
15665
|
}
|
|
15702
15666
|
};
|
|
15703
|
-
for (let i2 = 0,
|
|
15667
|
+
for (let i2 = 0, l = objs.length; i2 < l; i2++) {
|
|
15704
15668
|
const source = objs[i2];
|
|
15705
15669
|
if (!source || isBuffer(source)) {
|
|
15706
15670
|
continue;
|
|
15707
15671
|
}
|
|
15708
15672
|
forEach(source, assignValue);
|
|
15709
|
-
if (typeof source !== "object" || isArray(source)) {
|
|
15673
|
+
if (typeof source !== "object" || isArray(source) || !Object.getOwnPropertySymbols) {
|
|
15710
15674
|
continue;
|
|
15711
15675
|
}
|
|
15712
15676
|
const symbols = Object.getOwnPropertySymbols(source);
|
|
@@ -15802,7 +15766,24 @@ var toArray = (thing) => {
|
|
|
15802
15766
|
if (!thing) return null;
|
|
15803
15767
|
if (isArray(thing)) return thing;
|
|
15804
15768
|
let i2 = thing.length;
|
|
15805
|
-
if (!
|
|
15769
|
+
if (!Number.isSafeInteger(i2) || i2 < 0 || i2 > 4294967295) return null;
|
|
15770
|
+
const indexes = /* @__PURE__ */ new Set();
|
|
15771
|
+
const seen = /* @__PURE__ */ new Set();
|
|
15772
|
+
let source = thing;
|
|
15773
|
+
while (source != null && indexes.size < i2) {
|
|
15774
|
+
if (seen.has(source)) return null;
|
|
15775
|
+
seen.add(source);
|
|
15776
|
+
const prototype2 = getPrototypeOf(source);
|
|
15777
|
+
if (isPrototypeBoundary(source, prototype2, source === thing)) break;
|
|
15778
|
+
Object.getOwnPropertyNames(source).forEach((key) => {
|
|
15779
|
+
const index = +key;
|
|
15780
|
+
if (Number.isInteger(index) && index >= 0 && index < i2 && String(index) === key && hasOwnProperty(source, key)) {
|
|
15781
|
+
indexes.add(index);
|
|
15782
|
+
}
|
|
15783
|
+
});
|
|
15784
|
+
source = prototype2;
|
|
15785
|
+
}
|
|
15786
|
+
if (indexes.size !== i2) return null;
|
|
15806
15787
|
const arr = new Array(i2);
|
|
15807
15788
|
while (i2-- > 0) {
|
|
15808
15789
|
arr[i2] = thing[i2];
|
|
@@ -16034,7 +16015,7 @@ var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
|
16034
16015
|
"user-agent"
|
|
16035
16016
|
]);
|
|
16036
16017
|
var parseHeaders_default = (rawHeaders) => {
|
|
16037
|
-
const parsed =
|
|
16018
|
+
const parsed = /* @__PURE__ */ Object.create(null);
|
|
16038
16019
|
let key;
|
|
16039
16020
|
let val;
|
|
16040
16021
|
let i2;
|
|
@@ -16202,9 +16183,11 @@ function parseParameters(value) {
|
|
|
16202
16183
|
return parameters;
|
|
16203
16184
|
}
|
|
16204
16185
|
var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
16186
|
+
var PROTO_HEADER_SLOT = "__Proto__";
|
|
16187
|
+
var headerSlot = (name) => name === "__proto__" ? PROTO_HEADER_SLOT : name;
|
|
16205
16188
|
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
16206
16189
|
if (utils_default.isFunction(filter2)) {
|
|
16207
|
-
return filter2.call(
|
|
16190
|
+
return filter2.call(context, value, header);
|
|
16208
16191
|
}
|
|
16209
16192
|
if (isHeaderNameFilter) {
|
|
16210
16193
|
value = header;
|
|
@@ -16249,7 +16232,7 @@ var AxiosHeaders = class {
|
|
|
16249
16232
|
}
|
|
16250
16233
|
const key = utils_default.findKey(self2, lHeader);
|
|
16251
16234
|
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
16252
|
-
self2[key || _header] = normalizeValue(_value);
|
|
16235
|
+
self2[headerSlot(key || _header)] = normalizeValue(_value);
|
|
16253
16236
|
}
|
|
16254
16237
|
}
|
|
16255
16238
|
const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
@@ -16342,7 +16325,7 @@ var AxiosHeaders = class {
|
|
|
16342
16325
|
}
|
|
16343
16326
|
normalize(format) {
|
|
16344
16327
|
const self2 = this;
|
|
16345
|
-
const headers =
|
|
16328
|
+
const headers = /* @__PURE__ */ Object.create(null);
|
|
16346
16329
|
utils_default.forEach(this, (value, header) => {
|
|
16347
16330
|
const key = utils_default.findKey(headers, header);
|
|
16348
16331
|
if (key) {
|
|
@@ -16350,7 +16333,7 @@ var AxiosHeaders = class {
|
|
|
16350
16333
|
delete self2[header];
|
|
16351
16334
|
return;
|
|
16352
16335
|
}
|
|
16353
|
-
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
16336
|
+
const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());
|
|
16354
16337
|
if (normalized !== header) {
|
|
16355
16338
|
delete self2[header];
|
|
16356
16339
|
}
|
|
@@ -16500,6 +16483,28 @@ function aggregateErrorMessage(error) {
|
|
|
16500
16483
|
}).filter(Boolean).join("; ");
|
|
16501
16484
|
return message || error.name || "AggregateError";
|
|
16502
16485
|
}
|
|
16486
|
+
var CAUSED_BY_SEPARATOR = "\nCaused by: ";
|
|
16487
|
+
var $causeStack = /* @__PURE__ */ Symbol("causeStack");
|
|
16488
|
+
function getCauseStackIndex(error, stack) {
|
|
16489
|
+
const causeStack = utils_default.hasOwnProp(error, $causeStack) && error[$causeStack];
|
|
16490
|
+
return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1;
|
|
16491
|
+
}
|
|
16492
|
+
function appendCauseStack(target, source) {
|
|
16493
|
+
try {
|
|
16494
|
+
const sourceStack = source && source.stack;
|
|
16495
|
+
if (typeof sourceStack !== "string" || !sourceStack) {
|
|
16496
|
+
return;
|
|
16497
|
+
}
|
|
16498
|
+
const targetStack = target.stack;
|
|
16499
|
+
if (typeof targetStack !== "string" || !targetStack) {
|
|
16500
|
+
return;
|
|
16501
|
+
}
|
|
16502
|
+
const causeStack = CAUSED_BY_SEPARATOR + sourceStack;
|
|
16503
|
+
target.stack = targetStack + causeStack;
|
|
16504
|
+
Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack });
|
|
16505
|
+
} catch (e) {
|
|
16506
|
+
}
|
|
16507
|
+
}
|
|
16503
16508
|
var AxiosError = class _AxiosError extends Error {
|
|
16504
16509
|
static from(error, code, config, request, response, customProps) {
|
|
16505
16510
|
let message = error.message;
|
|
@@ -16515,6 +16520,7 @@ var AxiosError = class _AxiosError extends Error {
|
|
|
16515
16520
|
configurable: true
|
|
16516
16521
|
});
|
|
16517
16522
|
axiosError.name = error.name;
|
|
16523
|
+
appendCauseStack(axiosError, error);
|
|
16518
16524
|
if (error.status != null && axiosError.status == null) {
|
|
16519
16525
|
axiosError.status = error.status;
|
|
16520
16526
|
}
|
|
@@ -16826,6 +16832,12 @@ function trimHandlers(handlers) {
|
|
|
16826
16832
|
handlers.pop();
|
|
16827
16833
|
}
|
|
16828
16834
|
}
|
|
16835
|
+
function normalizeHandlerId(id) {
|
|
16836
|
+
if (typeof id === "string" && id !== "" && String(Number(id)) === id) {
|
|
16837
|
+
return Number(id);
|
|
16838
|
+
}
|
|
16839
|
+
return id;
|
|
16840
|
+
}
|
|
16829
16841
|
function syncHandlerEntries(manager, internals) {
|
|
16830
16842
|
const handlers = manager.handlers;
|
|
16831
16843
|
const length = countHandlers(handlers);
|
|
@@ -16896,9 +16908,10 @@ var InterceptorManager = class {
|
|
|
16896
16908
|
eject(id) {
|
|
16897
16909
|
const internals = this[$internals2];
|
|
16898
16910
|
syncHandlerEntries(this, internals);
|
|
16899
|
-
const
|
|
16911
|
+
const handlerId = normalizeHandlerId(id);
|
|
16912
|
+
const entry = internals.handlerEntries.get(handlerId);
|
|
16900
16913
|
if (entry) {
|
|
16901
|
-
internals.handlerEntries.delete(
|
|
16914
|
+
internals.handlerEntries.delete(handlerId);
|
|
16902
16915
|
if (this.handlers[entry.index] !== entry.handler) {
|
|
16903
16916
|
return;
|
|
16904
16917
|
}
|
|
@@ -16958,7 +16971,8 @@ var transitional_default = {
|
|
|
16958
16971
|
clarifyTimeoutError: false,
|
|
16959
16972
|
legacyInterceptorReqResOrdering: true,
|
|
16960
16973
|
advertiseZstdAcceptEncoding: false,
|
|
16961
|
-
validateStatusUndefinedResolves: true
|
|
16974
|
+
validateStatusUndefinedResolves: true,
|
|
16975
|
+
encodeBasicAuthUsername: false
|
|
16962
16976
|
};
|
|
16963
16977
|
|
|
16964
16978
|
// node_modules/axios/lib/platform/node/index.js
|
|
@@ -17068,6 +17082,24 @@ function arrayToObject(arr) {
|
|
|
17068
17082
|
}
|
|
17069
17083
|
return obj;
|
|
17070
17084
|
}
|
|
17085
|
+
function normalizeArray(value) {
|
|
17086
|
+
if (!utils_default.isArray(value)) return value;
|
|
17087
|
+
const keys = Object.keys(value);
|
|
17088
|
+
return keys.length !== value.length || keys.some((key, index) => key !== String(index)) ? arrayToObject(value) : value;
|
|
17089
|
+
}
|
|
17090
|
+
function normalizeArrays(obj) {
|
|
17091
|
+
const pending = [obj];
|
|
17092
|
+
while (pending.length) {
|
|
17093
|
+
const target = pending.pop();
|
|
17094
|
+
Object.keys(target).forEach((key) => {
|
|
17095
|
+
const value = target[key] = normalizeArray(target[key]);
|
|
17096
|
+
if (utils_default.isArray(value) || utils_default.isPlainObject(value)) {
|
|
17097
|
+
pending.push(value);
|
|
17098
|
+
}
|
|
17099
|
+
});
|
|
17100
|
+
}
|
|
17101
|
+
return obj;
|
|
17102
|
+
}
|
|
17071
17103
|
function formDataToJSON(formData) {
|
|
17072
17104
|
function buildPath(path6, value, target, index) {
|
|
17073
17105
|
throwIfDepthExceeded(index);
|
|
@@ -17078,6 +17110,7 @@ function formDataToJSON(formData) {
|
|
|
17078
17110
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
17079
17111
|
if (isLast) {
|
|
17080
17112
|
if (utils_default.hasOwnProp(target, name)) {
|
|
17113
|
+
target[name] = normalizeArray(target[name]);
|
|
17081
17114
|
target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
17082
17115
|
} else {
|
|
17083
17116
|
target[name] = value;
|
|
@@ -17098,7 +17131,7 @@ function formDataToJSON(formData) {
|
|
|
17098
17131
|
utils_default.forEachEntry(formData, (name, value) => {
|
|
17099
17132
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
17100
17133
|
});
|
|
17101
|
-
return obj;
|
|
17134
|
+
return normalizeArrays(obj);
|
|
17102
17135
|
}
|
|
17103
17136
|
return null;
|
|
17104
17137
|
}
|
|
@@ -17446,16 +17479,16 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
|
17446
17479
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
17447
17480
|
|
|
17448
17481
|
// node_modules/axios/lib/env/data.js
|
|
17449
|
-
var VERSION = "1.
|
|
17482
|
+
var VERSION = "1.21.1";
|
|
17450
17483
|
|
|
17451
17484
|
// node_modules/axios/lib/helpers/parseProtocol.js
|
|
17452
17485
|
function parseProtocol(url2) {
|
|
17453
17486
|
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
|
|
17454
|
-
return match && match[1] || "";
|
|
17487
|
+
return match && match[1].toLowerCase() || "";
|
|
17455
17488
|
}
|
|
17456
17489
|
|
|
17457
17490
|
// node_modules/axios/lib/helpers/fromDataURI.js
|
|
17458
|
-
var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)
|
|
17491
|
+
var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/i;
|
|
17459
17492
|
function fromDataURI(uri, asBlob, options) {
|
|
17460
17493
|
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
|
17461
17494
|
const protocol = parseProtocol(uri);
|
|
@@ -17478,7 +17511,10 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
17478
17511
|
} else if (params) {
|
|
17479
17512
|
mime = "text/plain" + params;
|
|
17480
17513
|
}
|
|
17481
|
-
const buffer = encoding === "base64" ? Buffer.from(
|
|
17514
|
+
const buffer = encoding === "base64" ? Buffer.from(
|
|
17515
|
+
body.replace(/%([\da-f]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))),
|
|
17516
|
+
"base64"
|
|
17517
|
+
) : Buffer.from(decodeURIComponent(body), encoding);
|
|
17482
17518
|
if (asBlob) {
|
|
17483
17519
|
if (!_Blob) {
|
|
17484
17520
|
throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
|
|
@@ -17564,7 +17600,10 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
17564
17600
|
const timeWindow = internals.timeWindow;
|
|
17565
17601
|
const divider = 1e3 / timeWindow;
|
|
17566
17602
|
const bytesThreshold = maxRate / divider;
|
|
17567
|
-
|
|
17603
|
+
let minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
|
17604
|
+
if (maxRate) {
|
|
17605
|
+
minChunkSize = Math.min(bytesThreshold, minChunkSize);
|
|
17606
|
+
}
|
|
17568
17607
|
const pushChunk = (_chunk, _callback) => {
|
|
17569
17608
|
const bytes = Buffer.byteLength(_chunk);
|
|
17570
17609
|
internals.bytesSeen += bytes;
|
|
@@ -17580,6 +17619,9 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
17580
17619
|
}
|
|
17581
17620
|
};
|
|
17582
17621
|
const transformChunk = (_chunk, _callback) => {
|
|
17622
|
+
if (this.destroyed) {
|
|
17623
|
+
return _callback();
|
|
17624
|
+
}
|
|
17583
17625
|
const chunkSize = Buffer.byteLength(_chunk);
|
|
17584
17626
|
let chunkRemainder = null;
|
|
17585
17627
|
let maxChunkSize = readableHighWaterMark;
|
|
@@ -17602,7 +17644,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
17602
17644
|
}, timeWindow - passed);
|
|
17603
17645
|
}
|
|
17604
17646
|
if (bytesLeft < maxChunkSize) {
|
|
17605
|
-
maxChunkSize = bytesLeft;
|
|
17647
|
+
maxChunkSize = Math.max(1, Math.floor(bytesLeft));
|
|
17606
17648
|
}
|
|
17607
17649
|
}
|
|
17608
17650
|
if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) {
|
|
@@ -17660,9 +17702,9 @@ var CRLF_BYTES = textEncoder.encode(CRLF);
|
|
|
17660
17702
|
var CRLF_BYTES_COUNT = 2;
|
|
17661
17703
|
var FormDataPart = class {
|
|
17662
17704
|
constructor(name, value) {
|
|
17663
|
-
const { escapeName } = this.constructor;
|
|
17705
|
+
const { escapeName: escapeName2 } = this.constructor;
|
|
17664
17706
|
const isStringValue = utils_default.isString(value);
|
|
17665
|
-
let headers = `Content-Disposition: form-data; name="${
|
|
17707
|
+
let headers = `Content-Disposition: form-data; name="${escapeName2(name)}"${!isStringValue && value.name ? `; filename="${escapeName2(value.name)}"` : ""}${CRLF}`;
|
|
17666
17708
|
if (isStringValue) {
|
|
17667
17709
|
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
|
17668
17710
|
} else {
|
|
@@ -17823,7 +17865,7 @@ var Http2Sessions = class {
|
|
|
17823
17865
|
timer = null;
|
|
17824
17866
|
}
|
|
17825
17867
|
stream4.once("close", () => {
|
|
17826
|
-
if (!--streamsCount) {
|
|
17868
|
+
if (!--streamsCount && !removed) {
|
|
17827
17869
|
timer = setTimeout(() => {
|
|
17828
17870
|
timer = null;
|
|
17829
17871
|
removeSession();
|
|
@@ -17835,6 +17877,7 @@ var Http2Sessions = class {
|
|
|
17835
17877
|
}
|
|
17836
17878
|
session2.once("close", removeSession);
|
|
17837
17879
|
session2.once("error", removeSession);
|
|
17880
|
+
session2.once("goaway", removeSession);
|
|
17838
17881
|
let entry = [session2, options];
|
|
17839
17882
|
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
17840
17883
|
return session2;
|
|
@@ -17858,6 +17901,7 @@ var callbackify = (fn, reducer) => {
|
|
|
17858
17901
|
var callbackify_default = callbackify;
|
|
17859
17902
|
|
|
17860
17903
|
// node_modules/axios/lib/helpers/shouldBypassProxy.js
|
|
17904
|
+
var import_url2 = require("url");
|
|
17861
17905
|
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
|
|
17862
17906
|
var trimTrailingDots = (value) => {
|
|
17863
17907
|
let end = value.length;
|
|
@@ -18051,7 +18095,20 @@ var normalizeNoProxyHost = (hostname) => {
|
|
|
18051
18095
|
if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
|
|
18052
18096
|
hostname = hostname.slice(1, -1);
|
|
18053
18097
|
}
|
|
18054
|
-
|
|
18098
|
+
let trimmed = trimTrailingDots(hostname);
|
|
18099
|
+
if (trimmed.indexOf(":") !== -1) {
|
|
18100
|
+
try {
|
|
18101
|
+
trimmed = new URL("http://[" + trimmed + "]/").hostname.slice(1, -1);
|
|
18102
|
+
} catch (_err) {
|
|
18103
|
+
return trimmed;
|
|
18104
|
+
}
|
|
18105
|
+
} else if (/[\u0080-\uffff]/.test(trimmed)) {
|
|
18106
|
+
const prefix = /^[*.]+/.exec(trimmed);
|
|
18107
|
+
const start = prefix ? prefix[0] : "";
|
|
18108
|
+
const ascii = (0, import_url2.domainToASCII)(trimmed.slice(start.length));
|
|
18109
|
+
if (!ascii) return "";
|
|
18110
|
+
trimmed = start + trimTrailingDots(ascii);
|
|
18111
|
+
}
|
|
18055
18112
|
const ipv4 = normalizeIPAddress(trimmed);
|
|
18056
18113
|
if (ipv4 !== trimmed) {
|
|
18057
18114
|
return ipv4;
|
|
@@ -18322,6 +18379,26 @@ var estimateBase64BufferAllocation = (body) => {
|
|
|
18322
18379
|
}
|
|
18323
18380
|
return Math.floor((len - padding) * 3 / 4);
|
|
18324
18381
|
};
|
|
18382
|
+
var estimatePercentDecodedBase64BufferAllocation = (body) => {
|
|
18383
|
+
if (body.indexOf("%") === -1) {
|
|
18384
|
+
return estimateBase64BufferAllocation(body);
|
|
18385
|
+
}
|
|
18386
|
+
let length = 0;
|
|
18387
|
+
let previous = 0;
|
|
18388
|
+
let last = 0;
|
|
18389
|
+
for (let i2 = 0, len = body.length; i2 < len; i2++) {
|
|
18390
|
+
let code = body.charCodeAt(i2);
|
|
18391
|
+
if (code === 37 && isPercentEncodedByte(body, i2, len)) {
|
|
18392
|
+
code = hexValue(body.charCodeAt(i2 + 1)) * 16 + hexValue(body.charCodeAt(i2 + 2));
|
|
18393
|
+
i2 += 2;
|
|
18394
|
+
}
|
|
18395
|
+
length++;
|
|
18396
|
+
previous = last;
|
|
18397
|
+
last = code;
|
|
18398
|
+
}
|
|
18399
|
+
const padding = last === 61 ? previous === 61 ? 2 : 1 : 0;
|
|
18400
|
+
return Math.floor((length - padding) * 3 / 4);
|
|
18401
|
+
};
|
|
18325
18402
|
var estimatePercentDecodedBase64Bytes = (body) => {
|
|
18326
18403
|
const len = body.length;
|
|
18327
18404
|
let significant = 0;
|
|
@@ -18351,28 +18428,28 @@ var estimatePercentDecodedBase64Bytes = (body) => {
|
|
|
18351
18428
|
}
|
|
18352
18429
|
return base64Bytes(significant);
|
|
18353
18430
|
};
|
|
18354
|
-
var estimateDataURLBytes = (url2, estimateBase64) => {
|
|
18431
|
+
var estimateDataURLBytes = (url2, estimateBase64, base64Pattern) => {
|
|
18355
18432
|
if (!url2 || typeof url2 !== "string") return 0;
|
|
18356
|
-
if (
|
|
18433
|
+
if (!/^data:/i.test(url2)) return 0;
|
|
18357
18434
|
const comma = url2.indexOf(",");
|
|
18358
18435
|
if (comma < 0) return 0;
|
|
18359
18436
|
const meta = url2.slice(5, comma);
|
|
18360
18437
|
const body = url2.slice(comma + 1);
|
|
18361
|
-
const isBase64 =
|
|
18438
|
+
const isBase64 = base64Pattern.test(meta);
|
|
18362
18439
|
if (isBase64) {
|
|
18363
18440
|
return estimateBase64(body);
|
|
18364
18441
|
}
|
|
18365
18442
|
let bytes = 0;
|
|
18366
18443
|
for (let i2 = 0, len = body.length; i2 < len; i2++) {
|
|
18367
|
-
const
|
|
18368
|
-
if (
|
|
18444
|
+
const c2 = body.charCodeAt(i2);
|
|
18445
|
+
if (c2 === 37 && isPercentEncodedByte(body, i2, len)) {
|
|
18369
18446
|
bytes += 1;
|
|
18370
18447
|
i2 += 2;
|
|
18371
|
-
} else if (
|
|
18448
|
+
} else if (c2 < 128) {
|
|
18372
18449
|
bytes += 1;
|
|
18373
|
-
} else if (
|
|
18450
|
+
} else if (c2 < 2048) {
|
|
18374
18451
|
bytes += 2;
|
|
18375
|
-
} else if (
|
|
18452
|
+
} else if (c2 >= 55296 && c2 <= 56319 && i2 + 1 < len) {
|
|
18376
18453
|
const next = body.charCodeAt(i2 + 1);
|
|
18377
18454
|
if (next >= 56320 && next <= 57343) {
|
|
18378
18455
|
bytes += 4;
|
|
@@ -18390,11 +18467,12 @@ function estimateDataURLDecodedBytes(url2) {
|
|
|
18390
18467
|
const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
|
|
18391
18468
|
return estimateDataURLBytes(
|
|
18392
18469
|
fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex),
|
|
18393
|
-
estimatePercentDecodedBase64Bytes
|
|
18470
|
+
estimatePercentDecodedBase64Bytes,
|
|
18471
|
+
/; *base64[\t\n\f\r ]*$/i
|
|
18394
18472
|
);
|
|
18395
18473
|
}
|
|
18396
18474
|
function estimateDataURLBufferAllocation(url2) {
|
|
18397
|
-
return estimateDataURLBytes(url2,
|
|
18475
|
+
return estimateDataURLBytes(url2, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);
|
|
18398
18476
|
}
|
|
18399
18477
|
|
|
18400
18478
|
// node_modules/axios/lib/adapters/http.js
|
|
@@ -18428,6 +18506,18 @@ function handleSocketError(err) {
|
|
|
18428
18506
|
var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
|
|
18429
18507
|
var tunnelingAgentCache = /* @__PURE__ */ new Map();
|
|
18430
18508
|
var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
|
|
18509
|
+
var directAgents = /* @__PURE__ */ new WeakMap();
|
|
18510
|
+
var directAgentHooks = ["createConnection", "getName"];
|
|
18511
|
+
var nativeAgentPoolHooks = [
|
|
18512
|
+
"addRequest",
|
|
18513
|
+
"createSocket",
|
|
18514
|
+
"removeSocket",
|
|
18515
|
+
"keepSocketAlive",
|
|
18516
|
+
"reuseSocket",
|
|
18517
|
+
"_getSession",
|
|
18518
|
+
"_cacheSession",
|
|
18519
|
+
"_evictSession"
|
|
18520
|
+
];
|
|
18431
18521
|
var NODE_NATIVE_ENV_PROXY_SUPPORT = {
|
|
18432
18522
|
22: 21,
|
|
18433
18523
|
24: 5
|
|
@@ -18457,6 +18547,49 @@ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.
|
|
|
18457
18547
|
function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
|
|
18458
18548
|
return isHttps.test(options.protocol) ? configHttpsAgent || import_https.default.globalAgent : configHttpAgent || import_http.default.globalAgent;
|
|
18459
18549
|
}
|
|
18550
|
+
function getDirectAgent(configuredAgent, transport) {
|
|
18551
|
+
if (!process.allowedNodeEnvironmentFlags || !process.allowedNodeEnvironmentFlags.has("--use-env-proxy")) {
|
|
18552
|
+
return configuredAgent;
|
|
18553
|
+
}
|
|
18554
|
+
const agent = configuredAgent || transport.globalAgent;
|
|
18555
|
+
const options = agent && agent.options;
|
|
18556
|
+
if (!(agent instanceof transport.Agent) || agent.protocol !== transport.globalAgent.protocol || !options || !utils_default.hasOwnProp(options, "proxyEnv") || typeof options.proxyEnv !== "object" || options.proxyEnv === null) {
|
|
18557
|
+
return configuredAgent;
|
|
18558
|
+
}
|
|
18559
|
+
for (const hook of nativeAgentPoolHooks) {
|
|
18560
|
+
if (utils_default.isFunction(transport.Agent.prototype[hook]) && agent[hook] !== transport.Agent.prototype[hook]) {
|
|
18561
|
+
throw new AxiosError_default(
|
|
18562
|
+
"proxy: false cannot adapt an agent overriding " + hook + "; use an agent constructed without proxyEnv",
|
|
18563
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE
|
|
18564
|
+
);
|
|
18565
|
+
}
|
|
18566
|
+
}
|
|
18567
|
+
let direct = directAgents.get(agent);
|
|
18568
|
+
if (!direct) {
|
|
18569
|
+
direct = new transport.Agent({ ...options, proxyEnv: void 0 });
|
|
18570
|
+
const destroy = agent.destroy;
|
|
18571
|
+
agent.destroy = function destroyWithDirectAgent() {
|
|
18572
|
+
try {
|
|
18573
|
+
return destroy.apply(this, arguments);
|
|
18574
|
+
} finally {
|
|
18575
|
+
direct.destroy();
|
|
18576
|
+
}
|
|
18577
|
+
};
|
|
18578
|
+
directAgents.set(agent, direct);
|
|
18579
|
+
}
|
|
18580
|
+
for (const hook of directAgentHooks) {
|
|
18581
|
+
direct[hook] = agent[hook] === transport.Agent.prototype[hook] ? transport.Agent.prototype[hook] : bind(agent[hook], agent);
|
|
18582
|
+
}
|
|
18583
|
+
return direct;
|
|
18584
|
+
}
|
|
18585
|
+
function setDirectAgent(options, configHttpAgent, configHttpsAgent) {
|
|
18586
|
+
const secure = isHttps.test(options.protocol);
|
|
18587
|
+
const agent = getDirectAgent(secure ? configHttpsAgent : configHttpAgent, secure ? import_https.default : import_http.default);
|
|
18588
|
+
options.agent = agent;
|
|
18589
|
+
if (options.agents) {
|
|
18590
|
+
options.agents[secure ? "https" : "http"] = agent;
|
|
18591
|
+
}
|
|
18592
|
+
}
|
|
18460
18593
|
function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
18461
18594
|
const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
|
|
18462
18595
|
const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
|
|
@@ -18464,13 +18597,12 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
|
18464
18597
|
if (agent) return agent;
|
|
18465
18598
|
const merged = userHttpsAgent && userHttpsAgent.options ? { ...userHttpsAgent.options, ...agentOptions } : agentOptions;
|
|
18466
18599
|
agent = new import_https_proxy_agent.default(merged);
|
|
18467
|
-
|
|
18468
|
-
|
|
18469
|
-
const
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
}
|
|
18600
|
+
const callback = agent.callback;
|
|
18601
|
+
agent.callback = function axiosTunnelingAgentCallback(req, opts) {
|
|
18602
|
+
const originTLSAgent = userHttpsAgent || import_https.default.globalAgent;
|
|
18603
|
+
const originTLSOptions = originTLSAgent && originTLSAgent.options;
|
|
18604
|
+
return callback.call(this, req, { ...originTLSOptions, ...opts });
|
|
18605
|
+
};
|
|
18474
18606
|
agent[kAxiosInstalledTunnel] = true;
|
|
18475
18607
|
cache.set(key, agent);
|
|
18476
18608
|
return agent;
|
|
@@ -18494,6 +18626,10 @@ var flushOnFinish = (stream4, [throttled, flush]) => {
|
|
|
18494
18626
|
};
|
|
18495
18627
|
var http2Sessions = new Http2Sessions_default();
|
|
18496
18628
|
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
18629
|
+
if (!isSameOriginRedirect(options, requestDetails)) {
|
|
18630
|
+
stripMatchingHeaders(options.headers, /* @__PURE__ */ new Set(["authorization", "cookie"]));
|
|
18631
|
+
delete options.auth;
|
|
18632
|
+
}
|
|
18497
18633
|
if (options.beforeRedirects.proxy) {
|
|
18498
18634
|
options.beforeRedirects.proxy(options);
|
|
18499
18635
|
}
|
|
@@ -18503,6 +18639,9 @@ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
|
18503
18639
|
if (options.beforeRedirects.sensitiveHeaders) {
|
|
18504
18640
|
options.beforeRedirects.sensitiveHeaders(options, requestDetails);
|
|
18505
18641
|
}
|
|
18642
|
+
if (options.beforeRedirects.direct) {
|
|
18643
|
+
options.beforeRedirects.direct(options);
|
|
18644
|
+
}
|
|
18506
18645
|
if (options.beforeRedirects.config) {
|
|
18507
18646
|
options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
18508
18647
|
}
|
|
@@ -18548,6 +18687,9 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent,
|
|
|
18548
18687
|
if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) {
|
|
18549
18688
|
options.agent = void 0;
|
|
18550
18689
|
}
|
|
18690
|
+
if (isRedirect && options.agents && options.agents.https && options.agents.https[kAxiosInstalledTunnel]) {
|
|
18691
|
+
options.agents.https = configHttpsAgent;
|
|
18692
|
+
}
|
|
18551
18693
|
if (proxy) {
|
|
18552
18694
|
const isProxyURL = proxy instanceof URL;
|
|
18553
18695
|
const readProxyField = (key) => isProxyURL || utils_default.hasOwnProp(proxy, key) ? proxy[key] : void 0;
|
|
@@ -18728,9 +18870,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
18728
18870
|
if (httpVersion === void 0) httpVersion = 1;
|
|
18729
18871
|
const rawHttpVersion = httpVersion;
|
|
18730
18872
|
let http2Options = own2("http2Options");
|
|
18873
|
+
const configProxy = own2("proxy");
|
|
18731
18874
|
const httpAgent = own2("httpAgent");
|
|
18732
18875
|
const httpsAgent = own2("httpsAgent");
|
|
18733
|
-
const configProxy = own2("proxy");
|
|
18734
18876
|
const responseType = own2("responseType");
|
|
18735
18877
|
const responseEncoding = own2("responseEncoding");
|
|
18736
18878
|
const socketPath = own2("socketPath");
|
|
@@ -18869,6 +19011,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
18869
19011
|
} catch (err) {
|
|
18870
19012
|
throw AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config);
|
|
18871
19013
|
}
|
|
19014
|
+
if (maxContentLength > -1 && (responseType === "blob" ? convertedData.size : convertedData.length) > maxContentLength) {
|
|
19015
|
+
return reject(
|
|
19016
|
+
new AxiosError_default(
|
|
19017
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
19018
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
19019
|
+
config
|
|
19020
|
+
)
|
|
19021
|
+
);
|
|
19022
|
+
}
|
|
18872
19023
|
if (responseType === "text") {
|
|
18873
19024
|
convertedData = convertedData.toString(responseEncoding);
|
|
18874
19025
|
if (!responseEncoding || responseEncoding === "utf8") {
|
|
@@ -19071,9 +19222,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
19071
19222
|
}
|
|
19072
19223
|
let transport;
|
|
19073
19224
|
let isNativeTransport = false;
|
|
19074
|
-
let transportEnforcesMaxBodyLength = false;
|
|
19075
19225
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
19076
|
-
if (
|
|
19226
|
+
if (!isHttp2 && configProxy === false) {
|
|
19227
|
+
setDirectAgent(options, httpAgent, httpsAgent);
|
|
19228
|
+
options.beforeRedirects.direct = (redirectOptions) => {
|
|
19229
|
+
setDirectAgent(redirectOptions, httpAgent, httpsAgent);
|
|
19230
|
+
};
|
|
19231
|
+
} else if (options.agent == null) {
|
|
19077
19232
|
options.agent = isHttpsRequest ? httpsAgent : httpAgent;
|
|
19078
19233
|
}
|
|
19079
19234
|
if (isHttp2) {
|
|
@@ -19095,7 +19250,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
19095
19250
|
transport = isHttpsRequest ? import_https.default : import_http.default;
|
|
19096
19251
|
isNativeTransport = true;
|
|
19097
19252
|
} else {
|
|
19098
|
-
transportEnforcesMaxBodyLength = true;
|
|
19099
19253
|
options.sensitiveHeaders = [];
|
|
19100
19254
|
if (maxRedirects) {
|
|
19101
19255
|
options.maxRedirects = maxRedirects;
|
|
@@ -19381,7 +19535,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
19381
19535
|
}
|
|
19382
19536
|
});
|
|
19383
19537
|
let uploadStream = data;
|
|
19384
|
-
if (maxBodyLength > -1
|
|
19538
|
+
if (maxBodyLength > -1) {
|
|
19385
19539
|
const limit = maxBodyLength;
|
|
19386
19540
|
let bytesSent = 0;
|
|
19387
19541
|
uploadStream = import_stream4.default.pipeline(
|
|
@@ -19418,16 +19572,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
19418
19572
|
});
|
|
19419
19573
|
};
|
|
19420
19574
|
|
|
19421
|
-
// node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
19422
|
-
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
|
|
19423
|
-
url2 = new URL(url2, platform_default.origin);
|
|
19424
|
-
return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
|
|
19425
|
-
})(
|
|
19426
|
-
new URL(platform_default.origin),
|
|
19427
|
-
platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
|
|
19428
|
-
) : () => true;
|
|
19429
|
-
|
|
19430
19575
|
// node_modules/axios/lib/helpers/cookies.js
|
|
19576
|
+
var decodeCookieValue = (value) => {
|
|
19577
|
+
try {
|
|
19578
|
+
return decodeURIComponent(value);
|
|
19579
|
+
} catch (e) {
|
|
19580
|
+
return value;
|
|
19581
|
+
}
|
|
19582
|
+
};
|
|
19431
19583
|
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
19432
19584
|
// Standard browser envs support document.cookie
|
|
19433
19585
|
{
|
|
@@ -19453,20 +19605,29 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
|
19453
19605
|
},
|
|
19454
19606
|
read(name) {
|
|
19455
19607
|
if (typeof document === "undefined") return null;
|
|
19456
|
-
const
|
|
19608
|
+
const cookieString = document.cookie;
|
|
19609
|
+
if (!cookieString) return null;
|
|
19610
|
+
const cookies = cookieString.split(";");
|
|
19457
19611
|
for (let i2 = 0; i2 < cookies.length; i2++) {
|
|
19458
19612
|
const cookie = cookies[i2].replace(/^\s+/, "");
|
|
19459
19613
|
const eq = cookie.indexOf("=");
|
|
19460
19614
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
19461
|
-
|
|
19462
|
-
return decodeURIComponent(cookie.slice(eq + 1));
|
|
19463
|
-
} catch (e) {
|
|
19464
|
-
return cookie.slice(eq + 1);
|
|
19465
|
-
}
|
|
19615
|
+
return decodeCookieValue(cookie.slice(eq + 1));
|
|
19466
19616
|
}
|
|
19467
19617
|
}
|
|
19468
19618
|
return null;
|
|
19469
19619
|
},
|
|
19620
|
+
async readAsync(name) {
|
|
19621
|
+
try {
|
|
19622
|
+
const store = typeof window !== "undefined" && window.cookieStore;
|
|
19623
|
+
if (store && utils_default.isFunction(store.get)) {
|
|
19624
|
+
const cookie = await store.get(name);
|
|
19625
|
+
return cookie ? decodeCookieValue(cookie.value) : null;
|
|
19626
|
+
}
|
|
19627
|
+
} catch (e) {
|
|
19628
|
+
}
|
|
19629
|
+
return this.read(name);
|
|
19630
|
+
},
|
|
19470
19631
|
remove(name) {
|
|
19471
19632
|
this.write(name, "", Date.now() - 864e5, "/");
|
|
19472
19633
|
}
|
|
@@ -19479,130 +19640,224 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
|
19479
19640
|
read() {
|
|
19480
19641
|
return null;
|
|
19481
19642
|
},
|
|
19643
|
+
async readAsync() {
|
|
19644
|
+
return null;
|
|
19645
|
+
},
|
|
19482
19646
|
remove() {
|
|
19483
19647
|
}
|
|
19484
19648
|
}
|
|
19485
19649
|
);
|
|
19486
19650
|
|
|
19651
|
+
// node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
19652
|
+
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2) => (url2) => {
|
|
19653
|
+
url2 = new URL(url2, document.baseURI || platform_default.origin);
|
|
19654
|
+
return origin2.protocol === url2.protocol && origin2.host === url2.host && origin2.port === url2.port;
|
|
19655
|
+
})(new URL(platform_default.origin)) : () => true;
|
|
19656
|
+
|
|
19657
|
+
// node_modules/axios/lib/core/assertParamsAcyclic.js
|
|
19658
|
+
function assertParamsAcyclic(params) {
|
|
19659
|
+
const pending = [{ value: params }];
|
|
19660
|
+
const active = /* @__PURE__ */ new WeakSet();
|
|
19661
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
19662
|
+
while (pending.length) {
|
|
19663
|
+
const { value, done } = pending.pop();
|
|
19664
|
+
if (!utils_default.isPlainObject(value) && !utils_default.isArray(value)) continue;
|
|
19665
|
+
if (done) {
|
|
19666
|
+
active.delete(value);
|
|
19667
|
+
continue;
|
|
19668
|
+
}
|
|
19669
|
+
if (active.has(value)) {
|
|
19670
|
+
throw new AxiosError_default(
|
|
19671
|
+
"Circular reference detected in params",
|
|
19672
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE
|
|
19673
|
+
);
|
|
19674
|
+
}
|
|
19675
|
+
if (visited.has(value)) continue;
|
|
19676
|
+
visited.add(value);
|
|
19677
|
+
active.add(value);
|
|
19678
|
+
pending.push({ value, done: true });
|
|
19679
|
+
const keys = Object.keys(value);
|
|
19680
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
19681
|
+
Object.getOwnPropertySymbols(value).forEach((key) => {
|
|
19682
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
19683
|
+
if (descriptor && descriptor.enumerable) keys.push(key);
|
|
19684
|
+
});
|
|
19685
|
+
}
|
|
19686
|
+
keys.forEach((key) => {
|
|
19687
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
19688
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
19689
|
+
if (descriptor && utils_default.hasOwnProp(descriptor, "value")) {
|
|
19690
|
+
pending.push({ value: descriptor.value });
|
|
19691
|
+
}
|
|
19692
|
+
} else {
|
|
19693
|
+
pending.push({ value: value[key] });
|
|
19694
|
+
}
|
|
19695
|
+
});
|
|
19696
|
+
}
|
|
19697
|
+
}
|
|
19698
|
+
|
|
19487
19699
|
// node_modules/axios/lib/core/mergeConfig.js
|
|
19488
19700
|
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
|
19489
19701
|
var ownEnumerableKeys = (thing) => {
|
|
19490
19702
|
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
19491
19703
|
return Object.keys(thing).concat(
|
|
19492
|
-
Object.getOwnPropertySymbols(thing).filter(
|
|
19493
|
-
|
|
19494
|
-
|
|
19704
|
+
Object.getOwnPropertySymbols(thing).filter((symbol2) => {
|
|
19705
|
+
const descriptor = Object.getOwnPropertyDescriptor(thing, symbol2);
|
|
19706
|
+
return descriptor && descriptor.enumerable;
|
|
19707
|
+
})
|
|
19495
19708
|
);
|
|
19496
19709
|
}
|
|
19497
19710
|
return Object.keys(thing);
|
|
19498
19711
|
};
|
|
19499
|
-
function
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
const
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19511
|
-
|
|
19512
|
-
|
|
19513
|
-
if (
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
19518
|
-
|
|
19519
|
-
|
|
19520
|
-
|
|
19712
|
+
function mergeParams(a2, b) {
|
|
19713
|
+
const pending = [];
|
|
19714
|
+
const copies = /* @__PURE__ */ new WeakMap();
|
|
19715
|
+
const empty = {};
|
|
19716
|
+
function copy(target, source) {
|
|
19717
|
+
if (!utils_default.isPlainObject(source)) {
|
|
19718
|
+
return utils_default.isArray(source) ? source.slice() : source;
|
|
19719
|
+
}
|
|
19720
|
+
const base = utils_default.isPlainObject(target) ? target : empty;
|
|
19721
|
+
let bases = copies.get(source);
|
|
19722
|
+
if (!bases) {
|
|
19723
|
+
bases = /* @__PURE__ */ new WeakMap();
|
|
19724
|
+
copies.set(source, bases);
|
|
19725
|
+
}
|
|
19726
|
+
if (bases.has(base)) return bases.get(base);
|
|
19727
|
+
const result2 = {};
|
|
19728
|
+
bases.set(base, result2);
|
|
19729
|
+
pending.push({ base, source, result: result2 });
|
|
19730
|
+
return result2;
|
|
19731
|
+
}
|
|
19732
|
+
const result = utils_default.isUndefined(b) ? copy(void 0, a2) : copy(a2, b);
|
|
19733
|
+
while (pending.length) {
|
|
19734
|
+
const { base, source, result: target } = pending.pop();
|
|
19735
|
+
const baseKeys = new Set(ownEnumerableKeys(base));
|
|
19736
|
+
const sourceKeys = new Set(ownEnumerableKeys(source));
|
|
19737
|
+
const keys = /* @__PURE__ */ new Set([...baseKeys, ...sourceKeys]);
|
|
19738
|
+
keys.forEach((key) => {
|
|
19739
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") return;
|
|
19740
|
+
const hasSource = sourceKeys.has(key);
|
|
19741
|
+
const value = hasSource ? source[key] : void 0;
|
|
19742
|
+
const previous = (!hasSource || utils_default.isPlainObject(value)) && baseKeys.has(key) ? base[key] : void 0;
|
|
19743
|
+
target[key] = hasSource ? copy(previous, value) : copy(void 0, previous);
|
|
19744
|
+
});
|
|
19521
19745
|
}
|
|
19522
|
-
|
|
19523
|
-
|
|
19524
|
-
|
|
19525
|
-
|
|
19526
|
-
|
|
19527
|
-
}
|
|
19746
|
+
assertParamsAcyclic(result);
|
|
19747
|
+
return result;
|
|
19748
|
+
}
|
|
19749
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
19750
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
19751
|
+
return utils_default.merge.call({ caseless }, target, source);
|
|
19752
|
+
} else if (utils_default.isPlainObject(source)) {
|
|
19753
|
+
return utils_default.merge({}, source);
|
|
19754
|
+
} else if (utils_default.isArray(source)) {
|
|
19755
|
+
return source.slice();
|
|
19756
|
+
}
|
|
19757
|
+
return source;
|
|
19758
|
+
}
|
|
19759
|
+
function mergeDeepProperties(a2, b, prop, caseless) {
|
|
19760
|
+
if (!utils_default.isUndefined(b)) {
|
|
19761
|
+
return getMergedValue(a2, b, prop, caseless);
|
|
19762
|
+
} else if (!utils_default.isUndefined(a2)) {
|
|
19763
|
+
return getMergedValue(void 0, a2, prop, caseless);
|
|
19528
19764
|
}
|
|
19529
|
-
|
|
19530
|
-
|
|
19531
|
-
|
|
19532
|
-
|
|
19765
|
+
}
|
|
19766
|
+
function valueFromConfig2(a2, b) {
|
|
19767
|
+
if (!utils_default.isUndefined(b)) {
|
|
19768
|
+
return getMergedValue(void 0, b);
|
|
19533
19769
|
}
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19538
|
-
|
|
19539
|
-
|
|
19770
|
+
}
|
|
19771
|
+
function defaultToConfig2(a2, b) {
|
|
19772
|
+
if (!utils_default.isUndefined(b)) {
|
|
19773
|
+
return getMergedValue(void 0, b);
|
|
19774
|
+
} else if (!utils_default.isUndefined(a2)) {
|
|
19775
|
+
return getMergedValue(void 0, a2);
|
|
19540
19776
|
}
|
|
19541
|
-
|
|
19542
|
-
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
} else {
|
|
19549
|
-
return void 0;
|
|
19777
|
+
}
|
|
19778
|
+
function getMergedTransitionalOption(config1, config2, prop) {
|
|
19779
|
+
const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
|
|
19780
|
+
if (!utils_default.isUndefined(transitional2)) {
|
|
19781
|
+
if (utils_default.isPlainObject(transitional2)) {
|
|
19782
|
+
if (utils_default.hasOwnProp(transitional2, prop)) {
|
|
19783
|
+
return transitional2[prop];
|
|
19550
19784
|
}
|
|
19785
|
+
} else {
|
|
19786
|
+
return void 0;
|
|
19551
19787
|
}
|
|
19552
|
-
const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
|
|
19553
|
-
if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) {
|
|
19554
|
-
return transitional1[prop];
|
|
19555
|
-
}
|
|
19556
|
-
return void 0;
|
|
19557
19788
|
}
|
|
19558
|
-
|
|
19559
|
-
|
|
19560
|
-
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
|
|
19564
|
-
|
|
19565
|
-
|
|
19566
|
-
|
|
19567
|
-
|
|
19568
|
-
|
|
19569
|
-
|
|
19570
|
-
|
|
19571
|
-
|
|
19572
|
-
|
|
19573
|
-
|
|
19574
|
-
|
|
19575
|
-
|
|
19576
|
-
|
|
19577
|
-
|
|
19578
|
-
|
|
19579
|
-
|
|
19580
|
-
|
|
19581
|
-
|
|
19582
|
-
|
|
19583
|
-
|
|
19584
|
-
|
|
19585
|
-
|
|
19586
|
-
|
|
19587
|
-
|
|
19588
|
-
|
|
19589
|
-
|
|
19590
|
-
|
|
19591
|
-
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
|
|
19595
|
-
|
|
19596
|
-
|
|
19597
|
-
|
|
19598
|
-
|
|
19789
|
+
const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
|
|
19790
|
+
if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) {
|
|
19791
|
+
return transitional1[prop];
|
|
19792
|
+
}
|
|
19793
|
+
return void 0;
|
|
19794
|
+
}
|
|
19795
|
+
function mergeDirectKeys(a2, b, prop, config1, config2) {
|
|
19796
|
+
if (utils_default.hasOwnProp(config2, prop)) {
|
|
19797
|
+
return getMergedValue(a2, b);
|
|
19798
|
+
} else if (utils_default.hasOwnProp(config1, prop)) {
|
|
19799
|
+
return getMergedValue(void 0, a2);
|
|
19800
|
+
}
|
|
19801
|
+
}
|
|
19802
|
+
function mergeHeaders(a2, b, prop) {
|
|
19803
|
+
return mergeDeepProperties(headersToObject(a2), headersToObject(b), prop, true);
|
|
19804
|
+
}
|
|
19805
|
+
var hasOwnPropertyDescriptor = Object.freeze({
|
|
19806
|
+
__proto__: null,
|
|
19807
|
+
value: Object.prototype.hasOwnProperty,
|
|
19808
|
+
enumerable: false,
|
|
19809
|
+
writable: true,
|
|
19810
|
+
configurable: true
|
|
19811
|
+
});
|
|
19812
|
+
var mergeMap = {
|
|
19813
|
+
url: valueFromConfig2,
|
|
19814
|
+
method: valueFromConfig2,
|
|
19815
|
+
data: valueFromConfig2,
|
|
19816
|
+
baseURL: defaultToConfig2,
|
|
19817
|
+
transformRequest: defaultToConfig2,
|
|
19818
|
+
transformResponse: defaultToConfig2,
|
|
19819
|
+
params: mergeParams,
|
|
19820
|
+
paramsSerializer: defaultToConfig2,
|
|
19821
|
+
timeout: defaultToConfig2,
|
|
19822
|
+
timeoutErrorMessage: defaultToConfig2,
|
|
19823
|
+
withCredentials: defaultToConfig2,
|
|
19824
|
+
withXSRFToken: defaultToConfig2,
|
|
19825
|
+
adapter: defaultToConfig2,
|
|
19826
|
+
responseType: defaultToConfig2,
|
|
19827
|
+
xsrfCookieName: defaultToConfig2,
|
|
19828
|
+
xsrfHeaderName: defaultToConfig2,
|
|
19829
|
+
onUploadProgress: defaultToConfig2,
|
|
19830
|
+
onDownloadProgress: defaultToConfig2,
|
|
19831
|
+
decompress: defaultToConfig2,
|
|
19832
|
+
maxContentLength: defaultToConfig2,
|
|
19833
|
+
maxBodyLength: defaultToConfig2,
|
|
19834
|
+
beforeRedirect: defaultToConfig2,
|
|
19835
|
+
transport: defaultToConfig2,
|
|
19836
|
+
httpAgent: defaultToConfig2,
|
|
19837
|
+
httpsAgent: defaultToConfig2,
|
|
19838
|
+
cancelToken: defaultToConfig2,
|
|
19839
|
+
socketPath: defaultToConfig2,
|
|
19840
|
+
allowedSocketPaths: defaultToConfig2,
|
|
19841
|
+
responseEncoding: defaultToConfig2,
|
|
19842
|
+
validateStatus: mergeDirectKeys,
|
|
19843
|
+
headers: mergeHeaders
|
|
19844
|
+
};
|
|
19845
|
+
function mergeConfig(config1, config2) {
|
|
19846
|
+
config1 = config1 || {};
|
|
19847
|
+
config2 = config2 || {};
|
|
19848
|
+
const config = /* @__PURE__ */ Object.create(null);
|
|
19849
|
+
Object.defineProperty(config, "hasOwnProperty", hasOwnPropertyDescriptor);
|
|
19850
|
+
const keys = ownEnumerableKeys({ ...config1, ...config2 });
|
|
19851
|
+
for (let i2 = 0, len = keys.length; i2 < len; i2++) {
|
|
19852
|
+
const prop = keys[i2];
|
|
19853
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") continue;
|
|
19599
19854
|
const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
19600
19855
|
const a2 = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
|
|
19601
19856
|
const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0;
|
|
19602
|
-
const configValue = merge2(a2, b, prop);
|
|
19857
|
+
const configValue = merge2 === mergeDirectKeys ? merge2(a2, b, prop, config1, config2) : merge2(a2, b, prop);
|
|
19603
19858
|
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
19604
|
-
}
|
|
19605
|
-
if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
|
|
19859
|
+
}
|
|
19860
|
+
if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption(config1, config2, "validateStatusUndefinedResolves") === false) {
|
|
19606
19861
|
if (utils_default.hasOwnProp(config1, "validateStatus")) {
|
|
19607
19862
|
config.validateStatus = getMergedValue(void 0, config1.validateStatus);
|
|
19608
19863
|
} else {
|
|
@@ -19617,7 +19872,8 @@ var encodeUTF8 = (str) => encodeURIComponent(str).replace(
|
|
|
19617
19872
|
/%([0-9A-F]{2})/gi,
|
|
19618
19873
|
(_, hex) => String.fromCharCode(parseInt(hex, 16))
|
|
19619
19874
|
);
|
|
19620
|
-
|
|
19875
|
+
var readCookie = (name) => cookies_default.read(name);
|
|
19876
|
+
function resolveConfig(config, readXsrfCookie = readCookie) {
|
|
19621
19877
|
const newConfig = mergeConfig({}, config);
|
|
19622
19878
|
const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
19623
19879
|
const data = own2("data");
|
|
@@ -19638,10 +19894,15 @@ function resolveConfig(config) {
|
|
|
19638
19894
|
if (auth) {
|
|
19639
19895
|
const username = utils_default.getSafeProp(auth, "username") || "";
|
|
19640
19896
|
const password2 = utils_default.getSafeProp(auth, "password") || "";
|
|
19897
|
+
const transitional2 = own2("transitional");
|
|
19898
|
+
const encodeUsername = transitional2 && utils_default.hasOwnProp(transitional2, "encodeBasicAuthUsername") && transitional2.encodeBasicAuthUsername === true;
|
|
19641
19899
|
try {
|
|
19642
19900
|
headers.set(
|
|
19643
19901
|
"Authorization",
|
|
19644
|
-
|
|
19902
|
+
// Preserve legacy username bytes unless the caller opts in to UTF-8.
|
|
19903
|
+
"Basic " + btoa(
|
|
19904
|
+
(encodeUsername ? encodeUTF8(username) : username) + ":" + (password2 ? encodeUTF8(password2) : "")
|
|
19905
|
+
)
|
|
19645
19906
|
);
|
|
19646
19907
|
} catch (e) {
|
|
19647
19908
|
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config);
|
|
@@ -19661,7 +19922,7 @@ function resolveConfig(config) {
|
|
|
19661
19922
|
}
|
|
19662
19923
|
const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url);
|
|
19663
19924
|
if (shouldSendXSRF) {
|
|
19664
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName &&
|
|
19925
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);
|
|
19665
19926
|
if (xsrfValue) {
|
|
19666
19927
|
headers.set(xsrfHeaderName, xsrfValue);
|
|
19667
19928
|
}
|
|
@@ -19675,16 +19936,50 @@ var resolveConfig_default = resolveConfig;
|
|
|
19675
19936
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
19676
19937
|
var xhr_default = isXHRAdapterSupported && function(config) {
|
|
19677
19938
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
19678
|
-
|
|
19939
|
+
let useAsyncXsrf;
|
|
19940
|
+
try {
|
|
19941
|
+
const store = platform_default.hasStandardBrowserEnv && typeof window !== "undefined" && window.cookieStore;
|
|
19942
|
+
useAsyncXsrf = store && utils_default.isFunction(store.get);
|
|
19943
|
+
} catch (e) {
|
|
19944
|
+
}
|
|
19945
|
+
let xsrfCookieName;
|
|
19946
|
+
const _config = resolveConfig_default(
|
|
19947
|
+
config,
|
|
19948
|
+
useAsyncXsrf ? (name) => {
|
|
19949
|
+
xsrfCookieName = name;
|
|
19950
|
+
return null;
|
|
19951
|
+
} : void 0
|
|
19952
|
+
);
|
|
19679
19953
|
let requestData = _config.data;
|
|
19680
19954
|
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
|
|
19681
19955
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
19682
19956
|
let onCanceled;
|
|
19957
|
+
let timeoutId;
|
|
19683
19958
|
let uploadThrottled, downloadThrottled;
|
|
19684
19959
|
let flushUpload, flushDownload, flushDownloadWithEvent;
|
|
19685
19960
|
function done() {
|
|
19686
|
-
|
|
19687
|
-
|
|
19961
|
+
clearTimeout(timeoutId);
|
|
19962
|
+
try {
|
|
19963
|
+
flushUpload && flushUpload();
|
|
19964
|
+
} catch (err) {
|
|
19965
|
+
setTimeout(() => {
|
|
19966
|
+
throw err;
|
|
19967
|
+
});
|
|
19968
|
+
}
|
|
19969
|
+
try {
|
|
19970
|
+
flushDownload && flushDownload();
|
|
19971
|
+
} catch (err) {
|
|
19972
|
+
setTimeout(() => {
|
|
19973
|
+
throw err;
|
|
19974
|
+
});
|
|
19975
|
+
}
|
|
19976
|
+
if (request) {
|
|
19977
|
+
downloadThrottled && request.removeEventListener("progress", downloadThrottled);
|
|
19978
|
+
if (request.upload) {
|
|
19979
|
+
uploadThrottled && request.upload.removeEventListener("progress", uploadThrottled);
|
|
19980
|
+
flushUpload && request.upload.removeEventListener("loadend", flushUpload);
|
|
19981
|
+
}
|
|
19982
|
+
}
|
|
19688
19983
|
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
19689
19984
|
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
|
19690
19985
|
}
|
|
@@ -19770,6 +20065,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
19770
20065
|
request = null;
|
|
19771
20066
|
};
|
|
19772
20067
|
request.ontimeout = function handleTimeout() {
|
|
20068
|
+
if (!request) return;
|
|
19773
20069
|
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
|
19774
20070
|
const transitional2 = _config.transitional || transitional_default;
|
|
19775
20071
|
if (_config.timeoutErrorMessage) {
|
|
@@ -19787,11 +20083,6 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
19787
20083
|
request = null;
|
|
19788
20084
|
};
|
|
19789
20085
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
19790
|
-
if ("setRequestHeader" in request) {
|
|
19791
|
-
utils_default.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
|
|
19792
|
-
request.setRequestHeader(key, val);
|
|
19793
|
-
});
|
|
19794
|
-
}
|
|
19795
20086
|
if (!utils_default.isUndefined(_config.withCredentials)) {
|
|
19796
20087
|
request.withCredentials = !!_config.withCredentials;
|
|
19797
20088
|
}
|
|
@@ -19816,15 +20107,18 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
19816
20107
|
return;
|
|
19817
20108
|
}
|
|
19818
20109
|
reject(!cancel2 || cancel2.type ? new CanceledError_default(null, config, request) : cancel2);
|
|
19819
|
-
request
|
|
20110
|
+
const xhr = request;
|
|
19820
20111
|
done();
|
|
19821
20112
|
request = null;
|
|
20113
|
+
xhr.abort();
|
|
19822
20114
|
};
|
|
19823
20115
|
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
20116
|
+
if (!request) return;
|
|
19824
20117
|
if (_config.signal) {
|
|
19825
20118
|
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
19826
20119
|
}
|
|
19827
20120
|
}
|
|
20121
|
+
if (!request) return;
|
|
19828
20122
|
const protocol = parseProtocol(_config.url);
|
|
19829
20123
|
if (protocol && !platform_default.protocols.includes(protocol)) {
|
|
19830
20124
|
reject(
|
|
@@ -19837,7 +20131,58 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
19837
20131
|
done();
|
|
19838
20132
|
return;
|
|
19839
20133
|
}
|
|
19840
|
-
|
|
20134
|
+
const sendRequest = () => {
|
|
20135
|
+
if (!request) return;
|
|
20136
|
+
if ("setRequestHeader" in request) {
|
|
20137
|
+
utils_default.forEach(
|
|
20138
|
+
toByteStringHeaderObject(requestHeaders),
|
|
20139
|
+
function setRequestHeader(val, key) {
|
|
20140
|
+
request.setRequestHeader(key, val);
|
|
20141
|
+
}
|
|
20142
|
+
);
|
|
20143
|
+
}
|
|
20144
|
+
request.send(requestData || null);
|
|
20145
|
+
};
|
|
20146
|
+
if (xsrfCookieName) {
|
|
20147
|
+
const now = typeof performance !== "undefined" && utils_default.isFunction(performance.now) ? () => performance.now() : Date.now;
|
|
20148
|
+
const deadline = request.timeout > 0 ? now() + Number(request.timeout) : void 0;
|
|
20149
|
+
const abortOnTimeout = () => {
|
|
20150
|
+
if (!request) return;
|
|
20151
|
+
const xhr = request;
|
|
20152
|
+
xhr.ontimeout();
|
|
20153
|
+
xhr.abort();
|
|
20154
|
+
};
|
|
20155
|
+
if (deadline !== void 0) {
|
|
20156
|
+
const scheduleTimeout = () => {
|
|
20157
|
+
const remaining = deadline - now();
|
|
20158
|
+
if (remaining > 0) {
|
|
20159
|
+
timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 2147483647));
|
|
20160
|
+
} else {
|
|
20161
|
+
abortOnTimeout();
|
|
20162
|
+
}
|
|
20163
|
+
};
|
|
20164
|
+
scheduleTimeout();
|
|
20165
|
+
}
|
|
20166
|
+
cookies_default.readAsync(xsrfCookieName).then((value) => {
|
|
20167
|
+
if (!request) return;
|
|
20168
|
+
if (deadline !== void 0 && now() >= deadline) {
|
|
20169
|
+
abortOnTimeout();
|
|
20170
|
+
return;
|
|
20171
|
+
}
|
|
20172
|
+
if (value) {
|
|
20173
|
+
const headerName = utils_default.hasOwnProp(_config, "xsrfHeaderName") && _config.xsrfHeaderName;
|
|
20174
|
+
requestHeaders.set(headerName, value);
|
|
20175
|
+
}
|
|
20176
|
+
sendRequest();
|
|
20177
|
+
}).catch((error) => {
|
|
20178
|
+
if (!request) return;
|
|
20179
|
+
reject(AxiosError_default.from(error, null, config, request));
|
|
20180
|
+
done();
|
|
20181
|
+
request = null;
|
|
20182
|
+
});
|
|
20183
|
+
} else {
|
|
20184
|
+
sendRequest();
|
|
20185
|
+
}
|
|
19841
20186
|
});
|
|
19842
20187
|
};
|
|
19843
20188
|
|
|
@@ -19870,7 +20215,8 @@ var composeSignals = (signals, timeout) => {
|
|
|
19870
20215
|
timer && clearTimeout(timer);
|
|
19871
20216
|
timer = null;
|
|
19872
20217
|
signals.forEach((signal2) => {
|
|
19873
|
-
|
|
20218
|
+
const unsubscribeSignal = utils_default.getSafeProp(signal2, "unsubscribe");
|
|
20219
|
+
utils_default.isFunction(unsubscribeSignal) ? unsubscribeSignal.call(signal2, onabort) : signal2.removeEventListener("abort", onabort);
|
|
19874
20220
|
});
|
|
19875
20221
|
signals = null;
|
|
19876
20222
|
};
|
|
@@ -19970,6 +20316,110 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
|
19970
20316
|
);
|
|
19971
20317
|
};
|
|
19972
20318
|
|
|
20319
|
+
// node_modules/axios/lib/helpers/formDataToBlob.js
|
|
20320
|
+
var CRLF2 = "\r\n";
|
|
20321
|
+
var normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF2);
|
|
20322
|
+
var escapeName = (value) => String(value).replace(
|
|
20323
|
+
/[\r\n"]/g,
|
|
20324
|
+
(char) => char === "\r" ? "%0D" : char === "\n" ? "%0A" : "%22"
|
|
20325
|
+
);
|
|
20326
|
+
var stringBytes = (value, normalize) => {
|
|
20327
|
+
let length = 0;
|
|
20328
|
+
for (let i2 = 0; i2 < value.length; i2++) {
|
|
20329
|
+
const code = value.charCodeAt(i2);
|
|
20330
|
+
if (normalize && (code === 13 || code === 10)) {
|
|
20331
|
+
if (code === 13 && value.charCodeAt(i2 + 1) === 10) i2++;
|
|
20332
|
+
length += 2;
|
|
20333
|
+
} else if (code < 128) {
|
|
20334
|
+
length++;
|
|
20335
|
+
} else if (code < 2048) {
|
|
20336
|
+
length += 2;
|
|
20337
|
+
} else if (code >= 55296 && code <= 56319 && value.charCodeAt(i2 + 1) >= 56320 && value.charCodeAt(i2 + 1) <= 57343) {
|
|
20338
|
+
length += 4;
|
|
20339
|
+
i2++;
|
|
20340
|
+
} else {
|
|
20341
|
+
length += 3;
|
|
20342
|
+
}
|
|
20343
|
+
}
|
|
20344
|
+
return length;
|
|
20345
|
+
};
|
|
20346
|
+
var FormDataError = class extends TypeError {
|
|
20347
|
+
constructor(message, reason) {
|
|
20348
|
+
super(message);
|
|
20349
|
+
this.name = "FormDataError";
|
|
20350
|
+
this.reason = reason;
|
|
20351
|
+
}
|
|
20352
|
+
};
|
|
20353
|
+
function formDataToBlob(form, Blob2, limit, limitError, boundary) {
|
|
20354
|
+
if (!utils_default.isFunction(Blob2)) {
|
|
20355
|
+
throw new FormDataError("Blob is not supported", "blob");
|
|
20356
|
+
}
|
|
20357
|
+
if (!utils_default.isString(boundary) || !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || / $/.test(boundary)) {
|
|
20358
|
+
throw new FormDataError("Invalid multipart boundary", "boundary");
|
|
20359
|
+
}
|
|
20360
|
+
const footer = "--" + boundary + "--" + CRLF2;
|
|
20361
|
+
let length = footer.length;
|
|
20362
|
+
const parts = [];
|
|
20363
|
+
const checkLength = (extra) => {
|
|
20364
|
+
if (length + extra > limit) throw limitError();
|
|
20365
|
+
};
|
|
20366
|
+
checkLength(0);
|
|
20367
|
+
for (const [name, value] of form) {
|
|
20368
|
+
const isString2 = utils_default.isString(value);
|
|
20369
|
+
const valueLength = isString2 ? stringBytes(value, true) : value.size;
|
|
20370
|
+
if (!Number.isFinite(valueLength) || valueLength < 0) {
|
|
20371
|
+
throw new FormDataError("Unsupported FormData part size", "part");
|
|
20372
|
+
}
|
|
20373
|
+
checkLength(
|
|
20374
|
+
valueLength + stringBytes(name, true) + (!isString2 && value.name ? stringBytes(value.name, false) : 0) + (!isString2 && value.type ? stringBytes(value.type, false) : 0)
|
|
20375
|
+
);
|
|
20376
|
+
let header = "--" + boundary + CRLF2 + 'Content-Disposition: form-data; name="' + escapeName(normalizeLines(name)) + '"';
|
|
20377
|
+
if (!isString2) {
|
|
20378
|
+
header += '; filename="' + escapeName(utils_default.isString(value.name) ? value.name : "blob") + '"' + CRLF2 + "Content-Type: " + String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
|
|
20379
|
+
}
|
|
20380
|
+
header += CRLF2 + CRLF2;
|
|
20381
|
+
const partLength = stringBytes(header, false) + valueLength + CRLF2.length;
|
|
20382
|
+
checkLength(partLength);
|
|
20383
|
+
length += partLength;
|
|
20384
|
+
parts.push({ header, value, isString: isString2 });
|
|
20385
|
+
}
|
|
20386
|
+
const blobParts = [];
|
|
20387
|
+
for (const part of parts) {
|
|
20388
|
+
blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF2);
|
|
20389
|
+
}
|
|
20390
|
+
blobParts.push(footer);
|
|
20391
|
+
return new Blob2(blobParts, { type: "multipart/form-data; boundary=" + boundary });
|
|
20392
|
+
}
|
|
20393
|
+
|
|
20394
|
+
// node_modules/axios/lib/core/createMultipartBody.js
|
|
20395
|
+
function createMultipartBody(form, Blob2, limit, limitError, boundary) {
|
|
20396
|
+
if (!utils_default.isFunction(Blob2)) {
|
|
20397
|
+
throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
|
|
20398
|
+
}
|
|
20399
|
+
if (boundary === void 0) {
|
|
20400
|
+
if (utils_default.isFunction(platform_default.generateString)) {
|
|
20401
|
+
boundary = "axios-" + platform_default.generateString(36, "0123456789abcdef");
|
|
20402
|
+
} else {
|
|
20403
|
+
const crypto2 = utils_default.global.crypto;
|
|
20404
|
+
if (!crypto2 || !utils_default.isFunction(crypto2.getRandomValues)) {
|
|
20405
|
+
throw new AxiosError_default("Random byte generation is not supported", AxiosError_default.ERR_NOT_SUPPORT);
|
|
20406
|
+
}
|
|
20407
|
+
const random = new Uint8Array(18);
|
|
20408
|
+
crypto2.getRandomValues(random);
|
|
20409
|
+
boundary = "axios-" + Array.from(random, (value) => ("0" + value.toString(16)).slice(-2)).join("");
|
|
20410
|
+
}
|
|
20411
|
+
}
|
|
20412
|
+
try {
|
|
20413
|
+
return formDataToBlob(form, Blob2, limit, limitError, boundary);
|
|
20414
|
+
} catch (error) {
|
|
20415
|
+
if (error instanceof FormDataError) {
|
|
20416
|
+
const code = error.reason === "boundary" ? AxiosError_default.ERR_BAD_OPTION_VALUE : AxiosError_default.ERR_BAD_REQUEST;
|
|
20417
|
+
throw new AxiosError_default(error.message, code);
|
|
20418
|
+
}
|
|
20419
|
+
throw error;
|
|
20420
|
+
}
|
|
20421
|
+
}
|
|
20422
|
+
|
|
19973
20423
|
// node_modules/axios/lib/adapters/fetch.js
|
|
19974
20424
|
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
19975
20425
|
var DEFAULT_REQUEST_OPTIONS = {
|
|
@@ -20022,11 +20472,13 @@ var factory = (env) => {
|
|
|
20022
20472
|
},
|
|
20023
20473
|
{
|
|
20024
20474
|
Request: globalObject.Request,
|
|
20025
|
-
Response: globalObject.Response
|
|
20475
|
+
Response: globalObject.Response,
|
|
20476
|
+
Blob: globalObject.Blob
|
|
20026
20477
|
},
|
|
20027
20478
|
env
|
|
20028
20479
|
);
|
|
20029
|
-
const
|
|
20480
|
+
const envFetch = utils_default.hasOwnProp(env, "fetch") ? env.fetch : void 0;
|
|
20481
|
+
const { Request, Response, Blob: Blob2 } = env;
|
|
20030
20482
|
const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
|
|
20031
20483
|
const isRequestSupported = isFunction2(Request);
|
|
20032
20484
|
const isResponseSupported = isFunction2(Response);
|
|
@@ -20052,6 +20504,13 @@ var factory = (env) => {
|
|
|
20052
20504
|
return duplexAccessed && !hasContentType;
|
|
20053
20505
|
});
|
|
20054
20506
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
20507
|
+
const requestDefaults = Object.assign(/* @__PURE__ */ Object.create(null), DEFAULT_REQUEST_OPTIONS);
|
|
20508
|
+
if (isRequestSupported && !test(() => new Request(platform_default.origin, requestDefaults))) {
|
|
20509
|
+
delete requestDefaults.cache;
|
|
20510
|
+
if (!test(() => new Request(platform_default.origin, requestDefaults))) {
|
|
20511
|
+
requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache;
|
|
20512
|
+
}
|
|
20513
|
+
}
|
|
20055
20514
|
const resolvers = {
|
|
20056
20515
|
stream: supportsResponseStream && ((res) => res.body)
|
|
20057
20516
|
};
|
|
@@ -20077,13 +20536,6 @@ var factory = (env) => {
|
|
|
20077
20536
|
if (utils_default.isBlob(body)) {
|
|
20078
20537
|
return body.size;
|
|
20079
20538
|
}
|
|
20080
|
-
if (utils_default.isSpecCompliantForm(body)) {
|
|
20081
|
-
const _request = new Request(platform_default.origin, {
|
|
20082
|
-
method: "POST",
|
|
20083
|
-
body
|
|
20084
|
-
});
|
|
20085
|
-
return (await _request.arrayBuffer()).byteLength;
|
|
20086
|
-
}
|
|
20087
20539
|
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
|
|
20088
20540
|
return body.byteLength;
|
|
20089
20541
|
}
|
|
@@ -20131,6 +20583,7 @@ var factory = (env) => {
|
|
|
20131
20583
|
});
|
|
20132
20584
|
let requestContentLength;
|
|
20133
20585
|
let pendingBodyError = null;
|
|
20586
|
+
let pendingResponseError = null;
|
|
20134
20587
|
const maxBodyLengthError = () => new AxiosError_default(
|
|
20135
20588
|
"Request body larger than maxBodyLength limit",
|
|
20136
20589
|
AxiosError_default.ERR_BAD_REQUEST,
|
|
@@ -20148,8 +20601,9 @@ var factory = (env) => {
|
|
|
20148
20601
|
password: password2
|
|
20149
20602
|
};
|
|
20150
20603
|
}
|
|
20604
|
+
let parsedURL;
|
|
20151
20605
|
if (maybeWithAuthCredentials(url2)) {
|
|
20152
|
-
|
|
20606
|
+
parsedURL = new URL(url2, platform_default.origin);
|
|
20153
20607
|
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
20154
20608
|
const urlUsername = decodeURIComponentSafe2(parsedURL.username);
|
|
20155
20609
|
const urlPassword = decodeURIComponentSafe2(parsedURL.password);
|
|
@@ -20171,8 +20625,8 @@ var factory = (env) => {
|
|
|
20171
20625
|
"Basic " + btoa(encodeUTF82((auth.username || "") + ":" + (auth.password || "")))
|
|
20172
20626
|
);
|
|
20173
20627
|
}
|
|
20174
|
-
if (hasMaxContentLength &&
|
|
20175
|
-
const estimated = estimateDataURLDecodedBytes(
|
|
20628
|
+
if (hasMaxContentLength && parsedURL && parsedURL.protocol === "data:") {
|
|
20629
|
+
const estimated = estimateDataURLDecodedBytes(parsedURL.href);
|
|
20176
20630
|
if (estimated > maxContentLength) {
|
|
20177
20631
|
throw new AxiosError_default(
|
|
20178
20632
|
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
@@ -20182,6 +20636,23 @@ var factory = (env) => {
|
|
|
20182
20636
|
);
|
|
20183
20637
|
}
|
|
20184
20638
|
}
|
|
20639
|
+
const formContentType = utils_default.isSpecCompliantForm(data) && AxiosHeaders_default.from(own2("headers")).getContentType();
|
|
20640
|
+
let formBoundary;
|
|
20641
|
+
if (utils_default.isString(formContentType) && /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim())) {
|
|
20642
|
+
const parameters = AxiosHeaders_default.parseParameters(formContentType);
|
|
20643
|
+
if (utils_default.hasOwnProp(parameters, "boundary")) formBoundary = parameters.boundary;
|
|
20644
|
+
}
|
|
20645
|
+
if (utils_default.isSpecCompliantForm(data) && method !== "get" && method !== "head" && (hasMaxBodyLength || onUploadProgress && supportsRequestStream || formBoundary !== void 0)) {
|
|
20646
|
+
data = createMultipartBody(
|
|
20647
|
+
data,
|
|
20648
|
+
Blob2,
|
|
20649
|
+
hasMaxBodyLength ? maxBodyLength : Infinity,
|
|
20650
|
+
maxBodyLengthError,
|
|
20651
|
+
formBoundary
|
|
20652
|
+
);
|
|
20653
|
+
headers.setContentType(formBoundary === void 0 ? data.type : formContentType);
|
|
20654
|
+
requestContentLength = data.size;
|
|
20655
|
+
}
|
|
20185
20656
|
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
20186
20657
|
const outboundLength = await getBodyLength(data);
|
|
20187
20658
|
if (typeof outboundLength === "number" && isFinite(outboundLength)) {
|
|
@@ -20262,7 +20733,7 @@ var factory = (env) => {
|
|
|
20262
20733
|
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
20263
20734
|
});
|
|
20264
20735
|
if (isRequestSupported) {
|
|
20265
|
-
utils_default.forEach(
|
|
20736
|
+
utils_default.forEach(requestDefaults, (value, key) => {
|
|
20266
20737
|
if (resolvedOptions[key] === void 0) {
|
|
20267
20738
|
resolvedOptions[key] = value;
|
|
20268
20739
|
}
|
|
@@ -20310,7 +20781,7 @@ var factory = (env) => {
|
|
|
20310
20781
|
if (hasMaxContentLength) {
|
|
20311
20782
|
bytesRead = loadedBytes;
|
|
20312
20783
|
if (bytesRead > maxContentLength) {
|
|
20313
|
-
throw new AxiosError_default(
|
|
20784
|
+
throw pendingResponseError = new AxiosError_default(
|
|
20314
20785
|
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
20315
20786
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
20316
20787
|
config,
|
|
@@ -20385,6 +20856,9 @@ var factory = (env) => {
|
|
|
20385
20856
|
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
20386
20857
|
throw pendingBodyError;
|
|
20387
20858
|
}
|
|
20859
|
+
if (pendingResponseError) {
|
|
20860
|
+
throw pendingResponseError;
|
|
20861
|
+
}
|
|
20388
20862
|
if (err instanceof AxiosError_default) {
|
|
20389
20863
|
request && !err.request && (err.request = request);
|
|
20390
20864
|
throw err;
|
|
@@ -20412,9 +20886,15 @@ var factory = (env) => {
|
|
|
20412
20886
|
};
|
|
20413
20887
|
var seedCache = /* @__PURE__ */ new Map();
|
|
20414
20888
|
var getFetch = (config) => {
|
|
20415
|
-
|
|
20416
|
-
const
|
|
20417
|
-
|
|
20889
|
+
const env = /* @__PURE__ */ Object.create(null);
|
|
20890
|
+
const configuredEnv = config && utils_default.hasOwnProp(config, "env") && config.env;
|
|
20891
|
+
["fetch", "Request", "Response", "Blob"].forEach((key) => {
|
|
20892
|
+
if (configuredEnv && utils_default.hasOwnProp(configuredEnv, key)) {
|
|
20893
|
+
env[key] = configuredEnv[key];
|
|
20894
|
+
}
|
|
20895
|
+
});
|
|
20896
|
+
const { fetch: fetch2, Request, Response, Blob: Blob2 } = env;
|
|
20897
|
+
const seeds = [Request, Response, fetch2, Blob2];
|
|
20418
20898
|
let len = seeds.length, i2 = len, seed, target, map = seedCache;
|
|
20419
20899
|
while (i2--) {
|
|
20420
20900
|
seed = seeds[i2];
|
|
@@ -20500,6 +20980,12 @@ function throwIfCancellationRequested(config) {
|
|
|
20500
20980
|
throw new CanceledError_default(null, config);
|
|
20501
20981
|
}
|
|
20502
20982
|
}
|
|
20983
|
+
function resolveClock() {
|
|
20984
|
+
return typeof performance !== "undefined" && utils_default.isFunction(performance.now) ? () => performance.now() : Date.now;
|
|
20985
|
+
}
|
|
20986
|
+
function elapsedSince(now, start) {
|
|
20987
|
+
return Math.max(0, Math.round(now() - start));
|
|
20988
|
+
}
|
|
20503
20989
|
function dispatchRequest(_config) {
|
|
20504
20990
|
const config = utils_default.toSafeFlatObject(_config);
|
|
20505
20991
|
throwIfCancellationRequested(config);
|
|
@@ -20509,9 +20995,12 @@ function dispatchRequest(_config) {
|
|
|
20509
20995
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
20510
20996
|
}
|
|
20511
20997
|
const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
|
|
20998
|
+
const now = resolveClock();
|
|
20999
|
+
const start = now();
|
|
20512
21000
|
return adapter2(config).then(
|
|
20513
21001
|
function onAdapterResolution(response) {
|
|
20514
21002
|
throwIfCancellationRequested(config);
|
|
21003
|
+
response.duration = elapsedSince(now, start);
|
|
20515
21004
|
config.response = response;
|
|
20516
21005
|
try {
|
|
20517
21006
|
response.data = transformData.call(config, config.transformResponse, response);
|
|
@@ -20525,6 +21014,7 @@ function dispatchRequest(_config) {
|
|
|
20525
21014
|
if (!isCancel(reason)) {
|
|
20526
21015
|
throwIfCancellationRequested(config);
|
|
20527
21016
|
if (reason && reason.response) {
|
|
21017
|
+
reason.response.duration = elapsedSince(now, start);
|
|
20528
21018
|
config.response = reason.response;
|
|
20529
21019
|
try {
|
|
20530
21020
|
reason.response.data = transformData.call(
|
|
@@ -20612,6 +21102,27 @@ var validator_default = {
|
|
|
20612
21102
|
|
|
20613
21103
|
// node_modules/axios/lib/core/Axios.js
|
|
20614
21104
|
var validators2 = validator_default.validators;
|
|
21105
|
+
var isHeadersBucket = (value) => {
|
|
21106
|
+
if (value == null || utils_default.isPlainObject(value) || value instanceof AxiosHeaders_default) {
|
|
21107
|
+
return true;
|
|
21108
|
+
}
|
|
21109
|
+
try {
|
|
21110
|
+
return utils_default.isObject(value) && utils_default.getSafeProp(value, Symbol.toStringTag) === "AxiosHeaders" && [
|
|
21111
|
+
"toJSON",
|
|
21112
|
+
"set",
|
|
21113
|
+
"get",
|
|
21114
|
+
"has",
|
|
21115
|
+
"delete",
|
|
21116
|
+
"clear",
|
|
21117
|
+
"normalize",
|
|
21118
|
+
"concat",
|
|
21119
|
+
"toString",
|
|
21120
|
+
Symbol.iterator
|
|
21121
|
+
].every((method) => utils_default.isFunction(utils_default.getSafeProp(value, method)));
|
|
21122
|
+
} catch (e) {
|
|
21123
|
+
return false;
|
|
21124
|
+
}
|
|
21125
|
+
};
|
|
20615
21126
|
var Axios = class {
|
|
20616
21127
|
constructor(instanceConfig) {
|
|
20617
21128
|
this.defaults = instanceConfig || {};
|
|
@@ -20647,9 +21158,13 @@ var Axios = class {
|
|
|
20647
21158
|
} else if (stack) {
|
|
20648
21159
|
const firstNewlineIndex = stack.indexOf("\n");
|
|
20649
21160
|
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
20650
|
-
const
|
|
20651
|
-
|
|
20652
|
-
|
|
21161
|
+
const duplicateCheckSuffix = secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1);
|
|
21162
|
+
const currentStack = String(err.stack);
|
|
21163
|
+
const causeIndex = getCauseStackIndex(err, currentStack);
|
|
21164
|
+
const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex);
|
|
21165
|
+
const causeSection = causeIndex === -1 ? "" : currentStack.slice(causeIndex);
|
|
21166
|
+
if (!stackHead.endsWith(duplicateCheckSuffix)) {
|
|
21167
|
+
err.stack = stackHead + "\n" + stack + causeSection;
|
|
20653
21168
|
}
|
|
20654
21169
|
}
|
|
20655
21170
|
} catch (e) {
|
|
@@ -20676,7 +21191,8 @@ var Axios = class {
|
|
|
20676
21191
|
clarifyTimeoutError: validators2.transitional(validators2.boolean),
|
|
20677
21192
|
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean),
|
|
20678
21193
|
advertiseZstdAcceptEncoding: validators2.transitional(validators2.boolean),
|
|
20679
|
-
validateStatusUndefinedResolves: validators2.transitional(validators2.boolean)
|
|
21194
|
+
validateStatusUndefinedResolves: validators2.transitional(validators2.boolean),
|
|
21195
|
+
encodeBasicAuthUsername: validators2.transitional(validators2.boolean)
|
|
20680
21196
|
},
|
|
20681
21197
|
false
|
|
20682
21198
|
);
|
|
@@ -20698,7 +21214,7 @@ var Axios = class {
|
|
|
20698
21214
|
}
|
|
20699
21215
|
}
|
|
20700
21216
|
if (config.allowAbsoluteUrls !== void 0) {
|
|
20701
|
-
} else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
21217
|
+
} else if (utils_default.hasOwnProp(this.defaults, "allowAbsoluteUrls") && this.defaults.allowAbsoluteUrls !== void 0) {
|
|
20702
21218
|
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
20703
21219
|
} else {
|
|
20704
21220
|
config.allowAbsoluteUrls = true;
|
|
@@ -20712,9 +21228,16 @@ var Axios = class {
|
|
|
20712
21228
|
true
|
|
20713
21229
|
);
|
|
20714
21230
|
config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase();
|
|
20715
|
-
|
|
21231
|
+
const commonHeaders = utils_default.getSafeProp(headers, "common");
|
|
21232
|
+
const methodHeaders = utils_default.getSafeProp(headers, config.method);
|
|
21233
|
+
const contextHeaders = headers && utils_default.merge(
|
|
21234
|
+
isHeadersBucket(commonHeaders) ? commonHeaders : void 0,
|
|
21235
|
+
isHeadersBucket(methodHeaders) ? methodHeaders : void 0
|
|
21236
|
+
);
|
|
20716
21237
|
headers && utils_default.forEach(methodList_default.concat("common"), (method) => {
|
|
20717
|
-
|
|
21238
|
+
if (isHeadersBucket(utils_default.getSafeProp(headers, method))) {
|
|
21239
|
+
delete headers[method];
|
|
21240
|
+
}
|
|
20718
21241
|
});
|
|
20719
21242
|
config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
|
|
20720
21243
|
const requestInterceptorChain = [];
|
|
@@ -20796,7 +21319,7 @@ var Axios = class {
|
|
|
20796
21319
|
}
|
|
20797
21320
|
};
|
|
20798
21321
|
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
20799
|
-
Axios.prototype[method] = function(url2, config) {
|
|
21322
|
+
Axios.prototype[method] = async function(url2, config) {
|
|
20800
21323
|
return this.request(
|
|
20801
21324
|
mergeConfig(config || {}, {
|
|
20802
21325
|
method,
|
|
@@ -20808,7 +21331,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
|
|
|
20808
21331
|
});
|
|
20809
21332
|
utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
|
|
20810
21333
|
function generateHTTPMethod(isForm) {
|
|
20811
|
-
return function httpMethod(url2, data, config) {
|
|
21334
|
+
return async function httpMethod(url2, data, config) {
|
|
20812
21335
|
return this.request(
|
|
20813
21336
|
mergeConfig(config || {}, {
|
|
20814
21337
|
method,
|
|
@@ -20915,8 +21438,8 @@ var CancelToken = class _CancelToken {
|
|
|
20915
21438
|
*/
|
|
20916
21439
|
static source() {
|
|
20917
21440
|
let cancel2;
|
|
20918
|
-
const token = new _CancelToken(function executor(
|
|
20919
|
-
cancel2 =
|
|
21441
|
+
const token = new _CancelToken(function executor(c2) {
|
|
21442
|
+
cancel2 = c2;
|
|
20920
21443
|
});
|
|
20921
21444
|
return {
|
|
20922
21445
|
token,
|
|
@@ -21166,6 +21689,60 @@ var PartialWorkflowError = class extends AssinafyError {
|
|
|
21166
21689
|
|
|
21167
21690
|
// src/api/utils.ts
|
|
21168
21691
|
var import_node_http = require("http");
|
|
21692
|
+
|
|
21693
|
+
// src/api/types.ts
|
|
21694
|
+
var SIGNER_CAPACITIES = [
|
|
21695
|
+
"Sign",
|
|
21696
|
+
"Approve",
|
|
21697
|
+
"Acknowledge",
|
|
21698
|
+
"Party",
|
|
21699
|
+
"Witness",
|
|
21700
|
+
"Intervening",
|
|
21701
|
+
"Receipt",
|
|
21702
|
+
"IssuerEndorserGuarantor",
|
|
21703
|
+
"IssuerEndorserGuarantorSurety",
|
|
21704
|
+
"Surety",
|
|
21705
|
+
"PartySurety",
|
|
21706
|
+
"JointDebtor",
|
|
21707
|
+
"PartyJointDebtor",
|
|
21708
|
+
"ContractingParty",
|
|
21709
|
+
"ContractedParty",
|
|
21710
|
+
"Landlord",
|
|
21711
|
+
"Tenant",
|
|
21712
|
+
"Buyer",
|
|
21713
|
+
"Seller",
|
|
21714
|
+
"AttorneyInFact",
|
|
21715
|
+
"LegalRepresentative",
|
|
21716
|
+
"Employer",
|
|
21717
|
+
"Employee"
|
|
21718
|
+
];
|
|
21719
|
+
var PUSH_PREFERENCE_CODES = [
|
|
21720
|
+
"SignerViewed",
|
|
21721
|
+
"SignerSigned",
|
|
21722
|
+
"DocumentCompleted",
|
|
21723
|
+
"SignerDeclined",
|
|
21724
|
+
"DocumentAboutToExpire",
|
|
21725
|
+
"DocumentExpired",
|
|
21726
|
+
"SignerIdentityReviewRequired",
|
|
21727
|
+
"SignerWhatsappFailed"
|
|
21728
|
+
];
|
|
21729
|
+
var NOTIFICATION_PREFERENCE_CODES = [
|
|
21730
|
+
"DocumentCompleted",
|
|
21731
|
+
"SignerDeclined",
|
|
21732
|
+
"DocumentCancelled",
|
|
21733
|
+
"DocumentAboutToExpire",
|
|
21734
|
+
"DocumentExpired",
|
|
21735
|
+
"DocumentExpirationReset",
|
|
21736
|
+
"DocumentProcessingFailed",
|
|
21737
|
+
"TemplateProcessingFailed",
|
|
21738
|
+
"SignerWhatsappFailed",
|
|
21739
|
+
"ContractRenewalNotice",
|
|
21740
|
+
"ContractExpiring",
|
|
21741
|
+
"ContractExpired",
|
|
21742
|
+
"ContractRenewed"
|
|
21743
|
+
];
|
|
21744
|
+
|
|
21745
|
+
// src/api/utils.ts
|
|
21169
21746
|
var DOCUMENT_ARTIFACT_NAMES = [
|
|
21170
21747
|
"original",
|
|
21171
21748
|
"certificated",
|
|
@@ -21276,6 +21853,16 @@ function requireExpiration(value, name = "expires_at") {
|
|
|
21276
21853
|
requireIso8601(timestamp, name);
|
|
21277
21854
|
return value;
|
|
21278
21855
|
}
|
|
21856
|
+
function requireScheduledTime(value, name = "send_at") {
|
|
21857
|
+
if (typeof value === "number") {
|
|
21858
|
+
if (!Number.isSafeInteger(value))
|
|
21859
|
+
throw new ValidationError(`${name} must be an integer Unix time`);
|
|
21860
|
+
} else if (typeof value === "string") {
|
|
21861
|
+
requireExpiration(value, name);
|
|
21862
|
+
} else {
|
|
21863
|
+
throw new ValidationError(`${name} must be an ISO 8601 time or integer Unix time`);
|
|
21864
|
+
}
|
|
21865
|
+
}
|
|
21279
21866
|
function requireEmail(value) {
|
|
21280
21867
|
if (!value || !EMAIL_RE.test(value)) {
|
|
21281
21868
|
throw new ValidationError("Invalid email address", { email: value });
|
|
@@ -21283,6 +21870,9 @@ function requireEmail(value) {
|
|
|
21283
21870
|
return value;
|
|
21284
21871
|
}
|
|
21285
21872
|
function validateSignerOptions(input) {
|
|
21873
|
+
if (input.sign_as != null && !SIGNER_CAPACITIES.includes(input.sign_as)) {
|
|
21874
|
+
throw new ValidationError("sign_as must be a published signer capacity or null");
|
|
21875
|
+
}
|
|
21286
21876
|
if (input.embedded !== void 0 && typeof input.embedded !== "boolean") {
|
|
21287
21877
|
throw new ValidationError("embedded must be a boolean");
|
|
21288
21878
|
}
|
|
@@ -21481,7 +22071,7 @@ var BaseResource = class {
|
|
|
21481
22071
|
}
|
|
21482
22072
|
};
|
|
21483
22073
|
function safeIdentifier(value, name) {
|
|
21484
|
-
if (value === "." || value === ".." || /[\s/?#\\%]/.test(value)) {
|
|
22074
|
+
if (typeof value !== "string" || value === "." || value === ".." || /[\s/?#\\%]/.test(value)) {
|
|
21485
22075
|
throw new ValidationError(`${name} contains invalid URL characters`);
|
|
21486
22076
|
}
|
|
21487
22077
|
return value;
|
|
@@ -21516,11 +22106,15 @@ function toInt(value) {
|
|
|
21516
22106
|
|
|
21517
22107
|
// src/api/resources/assignments.ts
|
|
21518
22108
|
function buildAssignmentPayload(payload, options = {}) {
|
|
22109
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
|
|
22110
|
+
throw new ValidationError("Assignment payload must be an object");
|
|
22111
|
+
}
|
|
21519
22112
|
if (payload.method !== void 0 && payload.method !== "virtual" && payload.method !== "collect") {
|
|
21520
22113
|
throw new ValidationError("method must be virtual or collect");
|
|
21521
22114
|
}
|
|
21522
22115
|
const signers = extractSignerRefs(payload);
|
|
21523
22116
|
validateCreditCeiling(payload.max_total_credits);
|
|
22117
|
+
if (payload.expires_at != null) requireScheduledTime(payload.expires_at, "expires_at");
|
|
21524
22118
|
if (signers.length === 0) {
|
|
21525
22119
|
throw new ValidationError("At least one signer is required", {
|
|
21526
22120
|
signers: payload.signers ?? payload.signer_ids ?? payload.signerIds
|
|
@@ -21535,15 +22129,17 @@ function buildAssignmentPayload(payload, options = {}) {
|
|
|
21535
22129
|
if (!options.skipDigitalCertificateStepValidation) {
|
|
21536
22130
|
validateSigningSteps(normalisedSigners);
|
|
21537
22131
|
}
|
|
21538
|
-
return
|
|
21539
|
-
|
|
21540
|
-
|
|
21541
|
-
|
|
21542
|
-
|
|
21543
|
-
|
|
21544
|
-
|
|
21545
|
-
|
|
21546
|
-
|
|
22132
|
+
return Object.fromEntries(
|
|
22133
|
+
Object.entries({
|
|
22134
|
+
method,
|
|
22135
|
+
signers: normalisedSigners,
|
|
22136
|
+
message: payload.message,
|
|
22137
|
+
expires_at: payload.expires_at,
|
|
22138
|
+
copy_receivers: payload.copy_receivers,
|
|
22139
|
+
entries: payload.entries,
|
|
22140
|
+
max_total_credits: payload.max_total_credits
|
|
22141
|
+
}).filter(([, value]) => value !== void 0)
|
|
22142
|
+
);
|
|
21547
22143
|
}
|
|
21548
22144
|
function extractSignerRefs(payload) {
|
|
21549
22145
|
const populatedAliases = [payload.signers, payload.signer_ids, payload.signerIds].filter(
|
|
@@ -21560,21 +22156,24 @@ function extractSignerRefs(payload) {
|
|
|
21560
22156
|
}
|
|
21561
22157
|
function normaliseSignerRef(ref, options) {
|
|
21562
22158
|
if (typeof ref === "string") {
|
|
21563
|
-
if (!ref) throw new ValidationError("Signer ID cannot be empty");
|
|
22159
|
+
if (!ref.trim()) throw new ValidationError("Signer ID cannot be empty");
|
|
21564
22160
|
return { id: ref };
|
|
21565
22161
|
}
|
|
21566
22162
|
if (ref && typeof ref === "object") {
|
|
21567
22163
|
const input = ref;
|
|
21568
22164
|
const id = input.id ?? input.signer_id;
|
|
21569
22165
|
validateSignerOptions(input);
|
|
21570
|
-
const normalised =
|
|
21571
|
-
|
|
21572
|
-
|
|
21573
|
-
|
|
21574
|
-
|
|
21575
|
-
|
|
21576
|
-
|
|
21577
|
-
|
|
22166
|
+
const normalised = Object.fromEntries(
|
|
22167
|
+
Object.entries({
|
|
22168
|
+
id,
|
|
22169
|
+
sign_as: input.sign_as,
|
|
22170
|
+
verification_method: input.verification_method,
|
|
22171
|
+
notification_methods: input.notification_methods,
|
|
22172
|
+
step: input.step,
|
|
22173
|
+
embedded: input.embedded
|
|
22174
|
+
}).filter(([, value]) => value !== void 0)
|
|
22175
|
+
);
|
|
22176
|
+
if (typeof id === "string" && id.trim().length > 0) {
|
|
21578
22177
|
return normalised;
|
|
21579
22178
|
}
|
|
21580
22179
|
if (options.allowSignersWithoutId && Object.keys(normalised).length > 0) {
|
|
@@ -21587,6 +22186,30 @@ function normaliseSignerRef(ref, options) {
|
|
|
21587
22186
|
throw new ValidationError("Invalid signer reference", { ref });
|
|
21588
22187
|
}
|
|
21589
22188
|
var AssignmentResource = class extends BaseResource {
|
|
22189
|
+
/** Keep a request for later; no invitation or charge until the server sends it. */
|
|
22190
|
+
async schedule(documentId, payload) {
|
|
22191
|
+
const id = this.requireId(documentId, "Document ID");
|
|
22192
|
+
requireScheduledTime(payload?.send_at);
|
|
22193
|
+
const body = { ...buildAssignmentPayload(payload), send_at: payload.send_at };
|
|
22194
|
+
return this.call(
|
|
22195
|
+
"Failed to schedule assignment",
|
|
22196
|
+
() => this.http.post(`/documents/${id}/scheduled-sends`, body)
|
|
22197
|
+
);
|
|
22198
|
+
}
|
|
22199
|
+
async signerCapacities(documentId) {
|
|
22200
|
+
const id = this.requireId(documentId, "Document ID");
|
|
22201
|
+
return this.call(
|
|
22202
|
+
"Failed to fetch signer capacities",
|
|
22203
|
+
() => this.http.get(`/documents/${id}/signer-capacities`)
|
|
22204
|
+
);
|
|
22205
|
+
}
|
|
22206
|
+
async notificationHistory(documentId) {
|
|
22207
|
+
const id = this.requireId(documentId, "Document ID");
|
|
22208
|
+
return this.call(
|
|
22209
|
+
"Failed to fetch notification history",
|
|
22210
|
+
() => this.http.get(`/documents/${id}/notification-history`)
|
|
22211
|
+
);
|
|
22212
|
+
}
|
|
21590
22213
|
/** Fetch an account review and available evidence for a signer's identity verification. */
|
|
21591
22214
|
async getIdentityVerification(documentId, assignmentId, signerId) {
|
|
21592
22215
|
const docId = this.requireId(documentId, "Document ID");
|
|
@@ -21828,14 +22451,6 @@ var AuthenticationResource = class extends BaseResource {
|
|
|
21828
22451
|
() => this.http.post("/auth/link-social-login", payload)
|
|
21829
22452
|
);
|
|
21830
22453
|
}
|
|
21831
|
-
/** `POST /users/api-keys` — generate (and rotate) the current user's API key. */
|
|
21832
|
-
async createApiKey(password2) {
|
|
21833
|
-
if (!password2) throw new ValidationError("password is required");
|
|
21834
|
-
return this.call(
|
|
21835
|
-
"Failed to create API key",
|
|
21836
|
-
() => this.http.post("/users/api-keys", { password: password2 })
|
|
21837
|
-
);
|
|
21838
|
-
}
|
|
21839
22454
|
/**
|
|
21840
22455
|
* `GET /users/api-keys` — fetch a masked version of the current API key, or
|
|
21841
22456
|
* `null` if no key has been generated yet.
|
|
@@ -22050,6 +22665,25 @@ var FAILED_STATUSES = /* @__PURE__ */ new Set([
|
|
|
22050
22665
|
"expired"
|
|
22051
22666
|
]);
|
|
22052
22667
|
var DocumentResource = class extends BaseResource {
|
|
22668
|
+
/** Read contacts who receive a completion email without document access. */
|
|
22669
|
+
async listWatchers(documentId) {
|
|
22670
|
+
const id = this.requireId(documentId, "Document ID");
|
|
22671
|
+
return this.call(
|
|
22672
|
+
"Failed to list document watchers",
|
|
22673
|
+
() => this.http.get(`/documents/${id}/watchers`)
|
|
22674
|
+
);
|
|
22675
|
+
}
|
|
22676
|
+
/** Replace all watchers; an empty list clears them. Owner credentials required. */
|
|
22677
|
+
async setWatchers(documentId, watcherIds) {
|
|
22678
|
+
const id = this.requireId(documentId, "Document ID");
|
|
22679
|
+
if (!Array.isArray(watcherIds) || new Set(watcherIds).size > 10 || watcherIds.some((value) => typeof value !== "string" || !value.trim())) {
|
|
22680
|
+
throw new ValidationError("watcher_ids must contain at most 10 nonblank contact IDs");
|
|
22681
|
+
}
|
|
22682
|
+
return this.call(
|
|
22683
|
+
"Failed to set document watchers",
|
|
22684
|
+
() => this.http.put(`/documents/${id}/watchers`, { watcher_ids: watcherIds })
|
|
22685
|
+
);
|
|
22686
|
+
}
|
|
22053
22687
|
/**
|
|
22054
22688
|
* Upload a PDF to the workspace.
|
|
22055
22689
|
*
|
|
@@ -22254,6 +22888,11 @@ var DocumentResource = class extends BaseResource {
|
|
|
22254
22888
|
const id = this.requireId(documentId, "Document ID");
|
|
22255
22889
|
return this.call("Failed to delete document", () => this.http.delete(`/documents/${id}`));
|
|
22256
22890
|
}
|
|
22891
|
+
/** Cancel an open document while retaining its files and history. */
|
|
22892
|
+
async cancel(documentId) {
|
|
22893
|
+
const id = this.requireId(documentId, "Document ID");
|
|
22894
|
+
return this.call("Failed to cancel document", () => this.http.put(`/documents/${id}/cancel`));
|
|
22895
|
+
}
|
|
22257
22896
|
/** List the tags attached to a document. */
|
|
22258
22897
|
async listTags(documentId, accountId) {
|
|
22259
22898
|
const accId = this.accountId(accountId);
|
|
@@ -22580,6 +23219,26 @@ function validateOrigin(value) {
|
|
|
22580
23219
|
|
|
22581
23220
|
// src/api/resources/envelopes.ts
|
|
22582
23221
|
var EnvelopeResource = class extends BaseResource {
|
|
23222
|
+
/** Schedule one envelope request; idempotency headers are not supported here. */
|
|
23223
|
+
async schedule(payload, accountId) {
|
|
23224
|
+
const id = this.accountId(accountId);
|
|
23225
|
+
validateCreate(payload);
|
|
23226
|
+
requireScheduledTime(payload.send_at);
|
|
23227
|
+
return this.call(
|
|
23228
|
+
"Failed to schedule envelope",
|
|
23229
|
+
() => this.http.post(`/accounts/${id}/scheduled-sends`, payload)
|
|
23230
|
+
);
|
|
23231
|
+
}
|
|
23232
|
+
/** Estimate one reminder for the whole envelope without sending or charging. */
|
|
23233
|
+
async estimateResendCost(envelopeId, signerId, accountId) {
|
|
23234
|
+
const id = this.accountId(accountId);
|
|
23235
|
+
const eid = this.requireId(envelopeId, "Envelope ID");
|
|
23236
|
+
const sid = this.requireId(signerId, "Signer ID");
|
|
23237
|
+
return this.call(
|
|
23238
|
+
"Failed to estimate envelope reminder cost",
|
|
23239
|
+
() => this.http.post(`/accounts/${id}/envelopes/${eid}/signers/${sid}/estimate-resend-cost`)
|
|
23240
|
+
);
|
|
23241
|
+
}
|
|
22583
23242
|
async list(params = {}, accountId) {
|
|
22584
23243
|
const id = this.accountId(accountId);
|
|
22585
23244
|
if (params.status !== void 0 && !["open", "closed"].includes(params.status))
|
|
@@ -23079,6 +23738,35 @@ function httpsUrl(value, name) {
|
|
|
23079
23738
|
return url2;
|
|
23080
23739
|
}
|
|
23081
23740
|
|
|
23741
|
+
// src/api/resources/scheduled-sends.ts
|
|
23742
|
+
var ScheduledSendResource = class extends BaseResource {
|
|
23743
|
+
async list(params = {}, accountId) {
|
|
23744
|
+
const id = this.accountId(accountId);
|
|
23745
|
+
return this.callList(
|
|
23746
|
+
"Failed to list scheduled sends",
|
|
23747
|
+
() => this.http.get(`/accounts/${id}/scheduled-sends`, { params: cleanParams({ ...params }) })
|
|
23748
|
+
);
|
|
23749
|
+
}
|
|
23750
|
+
/** Cancel only a pending request; nothing is sent or charged. */
|
|
23751
|
+
async cancel(scheduledSendId, accountId) {
|
|
23752
|
+
const id = this.accountId(accountId);
|
|
23753
|
+
const sid = this.requireId(scheduledSendId, "Scheduled send ID");
|
|
23754
|
+
return this.call(
|
|
23755
|
+
"Failed to cancel scheduled send",
|
|
23756
|
+
() => this.http.put(`/accounts/${id}/scheduled-sends/${sid}/cancel`)
|
|
23757
|
+
);
|
|
23758
|
+
}
|
|
23759
|
+
/** Execute a pending request now, sending invitations and charging its current cost. */
|
|
23760
|
+
async send(scheduledSendId, accountId) {
|
|
23761
|
+
const id = this.accountId(accountId);
|
|
23762
|
+
const sid = this.requireId(scheduledSendId, "Scheduled send ID");
|
|
23763
|
+
return this.call(
|
|
23764
|
+
"Failed to send scheduled request",
|
|
23765
|
+
() => this.http.put(`/accounts/${id}/scheduled-sends/${sid}/send`)
|
|
23766
|
+
);
|
|
23767
|
+
}
|
|
23768
|
+
};
|
|
23769
|
+
|
|
23082
23770
|
// src/api/resources/signer-documents.ts
|
|
23083
23771
|
var SignerDocumentsResource = class extends BaseResource {
|
|
23084
23772
|
/** `GET /signers/{signer_id}/document?signer-access-code=…` */
|
|
@@ -23685,33 +24373,6 @@ var TemplateResource = class extends BaseResource {
|
|
|
23685
24373
|
}
|
|
23686
24374
|
};
|
|
23687
24375
|
|
|
23688
|
-
// src/api/types.ts
|
|
23689
|
-
var PUSH_PREFERENCE_CODES = [
|
|
23690
|
-
"SignerViewed",
|
|
23691
|
-
"SignerSigned",
|
|
23692
|
-
"DocumentCompleted",
|
|
23693
|
-
"SignerDeclined",
|
|
23694
|
-
"DocumentAboutToExpire",
|
|
23695
|
-
"DocumentExpired",
|
|
23696
|
-
"SignerIdentityReviewRequired",
|
|
23697
|
-
"SignerWhatsappFailed"
|
|
23698
|
-
];
|
|
23699
|
-
var NOTIFICATION_PREFERENCE_CODES = [
|
|
23700
|
-
"DocumentCompleted",
|
|
23701
|
-
"SignerDeclined",
|
|
23702
|
-
"DocumentCancelled",
|
|
23703
|
-
"DocumentAboutToExpire",
|
|
23704
|
-
"DocumentExpired",
|
|
23705
|
-
"DocumentExpirationReset",
|
|
23706
|
-
"DocumentProcessingFailed",
|
|
23707
|
-
"TemplateProcessingFailed",
|
|
23708
|
-
"SignerWhatsappFailed",
|
|
23709
|
-
"ContractRenewalNotice",
|
|
23710
|
-
"ContractExpiring",
|
|
23711
|
-
"ContractExpired",
|
|
23712
|
-
"ContractRenewed"
|
|
23713
|
-
];
|
|
23714
|
-
|
|
23715
24376
|
// src/api/resources/users.ts
|
|
23716
24377
|
var UsersResource = class extends BaseResource {
|
|
23717
24378
|
/** Fetch the authenticated user's profile. */
|
|
@@ -24226,6 +24887,7 @@ var AssinafyClient = class _AssinafyClient {
|
|
|
24226
24887
|
contracts;
|
|
24227
24888
|
signers;
|
|
24228
24889
|
workspaces;
|
|
24890
|
+
scheduledSends;
|
|
24229
24891
|
assignments;
|
|
24230
24892
|
webhooks;
|
|
24231
24893
|
templates;
|
|
@@ -24300,6 +24962,11 @@ var AssinafyClient = class _AssinafyClient {
|
|
|
24300
24962
|
this.defaultAccountId,
|
|
24301
24963
|
this.logger
|
|
24302
24964
|
);
|
|
24965
|
+
this.scheduledSends = new ScheduledSendResource(
|
|
24966
|
+
this.axiosInstance,
|
|
24967
|
+
this.defaultAccountId,
|
|
24968
|
+
this.logger
|
|
24969
|
+
);
|
|
24303
24970
|
this.webhooks = new WebhookResource(this.axiosInstance, this.defaultAccountId, this.logger);
|
|
24304
24971
|
this.templates = new TemplateResource(this.axiosInstance, this.defaultAccountId, this.logger);
|
|
24305
24972
|
this.tags = new TagResource(this.axiosInstance, this.defaultAccountId, this.logger);
|
|
@@ -24371,7 +25038,8 @@ var AssinafyClient = class _AssinafyClient {
|
|
|
24371
25038
|
verification_method: signer.verification_method ?? (useWhatsapp ? "Whatsapp" : void 0),
|
|
24372
25039
|
notification_methods: signer.notification_methods ?? (useWhatsapp ? ["Whatsapp"] : void 0),
|
|
24373
25040
|
step: signer.step,
|
|
24374
|
-
embedded: signer.embedded
|
|
25041
|
+
embedded: signer.embedded,
|
|
25042
|
+
sign_as: signer.sign_as
|
|
24375
25043
|
};
|
|
24376
25044
|
validateSignerOptions(reference);
|
|
24377
25045
|
return { reference, payload };
|
|
@@ -24608,7 +25276,7 @@ function printError(err, config) {
|
|
|
24608
25276
|
// node_modules/@clack/core/dist/index.mjs
|
|
24609
25277
|
var import_node_util4 = require("util");
|
|
24610
25278
|
var import_node_process2 = require("process");
|
|
24611
|
-
var
|
|
25279
|
+
var f$1 = __toESM(require("readline"), 1);
|
|
24612
25280
|
var import_node_readline = __toESM(require("readline"), 1);
|
|
24613
25281
|
|
|
24614
25282
|
// node_modules/fast-string-truncated-width/dist/utils.js
|
|
@@ -24697,7 +25365,7 @@ var getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {})
|
|
|
24697
25365
|
if (index >= length) {
|
|
24698
25366
|
break outer;
|
|
24699
25367
|
}
|
|
24700
|
-
for (let i2 = 0,
|
|
25368
|
+
for (let i2 = 0, l = PARSE_BLOCKS.length; i2 < l; i2++) {
|
|
24701
25369
|
const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
|
|
24702
25370
|
BLOCK_RE.lastIndex = index;
|
|
24703
25371
|
if (BLOCK_RE.test(input)) {
|
|
@@ -24947,8 +25615,60 @@ function wrapAnsi(string, columns, options) {
|
|
|
24947
25615
|
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
24948
25616
|
}
|
|
24949
25617
|
|
|
25618
|
+
// node_modules/sisteransi/dist/index.js
|
|
25619
|
+
var ESC2 = "\x1B";
|
|
25620
|
+
var CSI2 = `${ESC2}[`;
|
|
25621
|
+
var cursor = {
|
|
25622
|
+
to(x, y) {
|
|
25623
|
+
if (!y)
|
|
25624
|
+
return `${CSI2}${x + 1}G`;
|
|
25625
|
+
return `${CSI2}${y + 1};${x + 1}H`;
|
|
25626
|
+
},
|
|
25627
|
+
move(x, y) {
|
|
25628
|
+
let ret = "";
|
|
25629
|
+
if (x < 0)
|
|
25630
|
+
ret += `${CSI2}${-x}D`;
|
|
25631
|
+
else if (x > 0)
|
|
25632
|
+
ret += `${CSI2}${x}C`;
|
|
25633
|
+
if (y < 0)
|
|
25634
|
+
ret += `${CSI2}${-y}A`;
|
|
25635
|
+
else if (y > 0)
|
|
25636
|
+
ret += `${CSI2}${y}B`;
|
|
25637
|
+
return ret;
|
|
25638
|
+
},
|
|
25639
|
+
up: (count = 1) => `${CSI2}${count}A`,
|
|
25640
|
+
down: (count = 1) => `${CSI2}${count}B`,
|
|
25641
|
+
forward: (count = 1) => `${CSI2}${count}C`,
|
|
25642
|
+
backward: (count = 1) => `${CSI2}${count}D`,
|
|
25643
|
+
nextLine: (count = 1) => `${CSI2}E`.repeat(count),
|
|
25644
|
+
prevLine: (count = 1) => `${CSI2}F`.repeat(count),
|
|
25645
|
+
left: `${CSI2}G`,
|
|
25646
|
+
hide: `${CSI2}?25l`,
|
|
25647
|
+
show: `${CSI2}?25h`,
|
|
25648
|
+
save: `${ESC2}7`,
|
|
25649
|
+
restore: `${ESC2}8`
|
|
25650
|
+
};
|
|
25651
|
+
var erase = {
|
|
25652
|
+
screen: `${CSI2}2J`,
|
|
25653
|
+
up: (count = 1) => `${CSI2}1J`.repeat(count),
|
|
25654
|
+
down: (count = 1) => `${CSI2}J`.repeat(count),
|
|
25655
|
+
line: `${CSI2}2K`,
|
|
25656
|
+
lineEnd: `${CSI2}K`,
|
|
25657
|
+
lineStart: `${CSI2}1K`,
|
|
25658
|
+
lines(count) {
|
|
25659
|
+
let clear2 = "";
|
|
25660
|
+
for (let i2 = 0; i2 < count; i2++)
|
|
25661
|
+
clear2 += this.line + (i2 < count - 1 ? cursor.up() : "");
|
|
25662
|
+
if (count)
|
|
25663
|
+
clear2 += cursor.left;
|
|
25664
|
+
return clear2;
|
|
25665
|
+
}
|
|
25666
|
+
};
|
|
25667
|
+
var clear = {
|
|
25668
|
+
screen: `${ESC2}c`
|
|
25669
|
+
};
|
|
25670
|
+
|
|
24950
25671
|
// node_modules/@clack/core/dist/index.mjs
|
|
24951
|
-
var import_sisteransi = __toESM(require_src3(), 1);
|
|
24952
25672
|
var import_node_tty = require("tty");
|
|
24953
25673
|
var a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
24954
25674
|
var t = [
|
|
@@ -24982,6 +25702,7 @@ var settings = {
|
|
|
24982
25702
|
error: "Something went wrong"
|
|
24983
25703
|
},
|
|
24984
25704
|
withGuide: true,
|
|
25705
|
+
accessible: void 0,
|
|
24985
25706
|
date: {
|
|
24986
25707
|
monthNames: [...t],
|
|
24987
25708
|
messages: {
|
|
@@ -24993,6 +25714,12 @@ var settings = {
|
|
|
24993
25714
|
}
|
|
24994
25715
|
}
|
|
24995
25716
|
};
|
|
25717
|
+
function isAccessible(n2) {
|
|
25718
|
+
if (n2 !== void 0) return n2;
|
|
25719
|
+
if (settings.accessible !== void 0) return settings.accessible;
|
|
25720
|
+
const e = process.env.ACCESSIBLE;
|
|
25721
|
+
return e !== void 0 && e !== "" && e !== "0" && e !== "false";
|
|
25722
|
+
}
|
|
24996
25723
|
function isActionKey(n2, e) {
|
|
24997
25724
|
if (typeof n2 == "string")
|
|
24998
25725
|
return settings.aliases.get(n2) === e;
|
|
@@ -25025,59 +25752,55 @@ function block({
|
|
|
25025
25752
|
input: e = import_node_process2.stdin,
|
|
25026
25753
|
output: r2 = import_node_process2.stdout,
|
|
25027
25754
|
overwrite: o = true,
|
|
25028
|
-
hideCursor:
|
|
25755
|
+
hideCursor: n2 = true
|
|
25029
25756
|
} = {}) {
|
|
25030
|
-
const s =
|
|
25757
|
+
const s = f$1.createInterface({
|
|
25031
25758
|
input: e,
|
|
25032
25759
|
output: r2,
|
|
25033
25760
|
prompt: "",
|
|
25034
25761
|
tabSize: 1
|
|
25035
25762
|
});
|
|
25036
|
-
|
|
25037
|
-
const
|
|
25038
|
-
const
|
|
25039
|
-
if (isActionKey([
|
|
25040
|
-
|
|
25763
|
+
f$1.emitKeypressEvents(e, s), e instanceof import_node_tty.ReadStream && e.isTTY && e.setRawMode(true);
|
|
25764
|
+
const t2 = (l, { name: i2, sequence: p }) => {
|
|
25765
|
+
const w = String(l);
|
|
25766
|
+
if (isActionKey([w, i2, p], "cancel")) {
|
|
25767
|
+
n2 && r2.write(cursor.show), process.exit(0);
|
|
25041
25768
|
return;
|
|
25042
25769
|
}
|
|
25043
25770
|
if (!o) return;
|
|
25044
|
-
const
|
|
25045
|
-
|
|
25046
|
-
|
|
25047
|
-
e.once("keypress",
|
|
25771
|
+
const c2 = i2 === "return" ? 0 : -1, a2 = i2 === "return" ? -1 : 0;
|
|
25772
|
+
f$1.moveCursor(r2, c2, a2, () => {
|
|
25773
|
+
f$1.clearLine(r2, 1, () => {
|
|
25774
|
+
e.once("keypress", t2);
|
|
25048
25775
|
});
|
|
25049
25776
|
});
|
|
25050
25777
|
};
|
|
25051
|
-
return
|
|
25052
|
-
e.off("keypress",
|
|
25778
|
+
return n2 && r2.write(cursor.hide), e.once("keypress", t2), () => {
|
|
25779
|
+
e.off("keypress", t2), n2 && r2.write(cursor.show), e instanceof import_node_tty.ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
|
|
25053
25780
|
};
|
|
25054
25781
|
}
|
|
25055
25782
|
var getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
|
|
25056
25783
|
var getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
|
|
25057
|
-
function wrapTextWithPrefix(e, r2, o,
|
|
25058
|
-
const
|
|
25059
|
-
return wrapAnsi(r2,
|
|
25784
|
+
function wrapTextWithPrefix(e, r2, o, n2 = o, s = o, t2) {
|
|
25785
|
+
const l = getColumns(e ?? import_node_process2.stdout), i2 = dist_default2(o);
|
|
25786
|
+
return wrapAnsi(r2, l - i2, {
|
|
25060
25787
|
hard: true,
|
|
25061
25788
|
trim: false
|
|
25062
25789
|
}).split(`
|
|
25063
|
-
`).map((
|
|
25064
|
-
const
|
|
25065
|
-
return
|
|
25790
|
+
`).map((c2, a2, g) => {
|
|
25791
|
+
const m = t2 ? t2(c2, a2) : c2;
|
|
25792
|
+
return a2 === 0 ? `${n2}${m}` : a2 === g.length - 1 ? `${s}${m}` : `${o}${m}`;
|
|
25066
25793
|
}).join(`
|
|
25067
25794
|
`);
|
|
25068
25795
|
}
|
|
25069
|
-
function runValidation(e,
|
|
25796
|
+
function runValidation(e, a2) {
|
|
25070
25797
|
if ("~standard" in e) {
|
|
25071
|
-
const
|
|
25072
|
-
|
|
25073
|
-
throw new TypeError(
|
|
25074
|
-
"Schema validation must be synchronous. Update `validate()` and remove any asynchronous logic."
|
|
25075
|
-
);
|
|
25076
|
-
return a2.issues?.at(0)?.message;
|
|
25798
|
+
const n2 = e["~standard"].validate(a2);
|
|
25799
|
+
return n2 instanceof Promise ? n2.then((r2) => r2.issues?.at(0)?.message) : n2.issues?.at(0)?.message;
|
|
25077
25800
|
}
|
|
25078
|
-
return e(
|
|
25801
|
+
return e(a2);
|
|
25079
25802
|
}
|
|
25080
|
-
var
|
|
25803
|
+
var C$1 = class C {
|
|
25081
25804
|
input;
|
|
25082
25805
|
output;
|
|
25083
25806
|
_abortSignal;
|
|
@@ -25092,9 +25815,17 @@ var V = class {
|
|
|
25092
25815
|
error = "";
|
|
25093
25816
|
value;
|
|
25094
25817
|
userInput = "";
|
|
25818
|
+
/**
|
|
25819
|
+
* Whether accessible (static, screen-reader friendly) output is enabled for
|
|
25820
|
+
* this prompt, resolved from the `accessible` option, the global setting,
|
|
25821
|
+
* and the `ACCESSIBLE` env var.
|
|
25822
|
+
*/
|
|
25823
|
+
get accessible() {
|
|
25824
|
+
return isAccessible(this.opts.accessible);
|
|
25825
|
+
}
|
|
25095
25826
|
constructor(t2, e = true) {
|
|
25096
|
-
const { input: i2 = import_node_process2.stdin, output:
|
|
25097
|
-
this.opts = o, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render =
|
|
25827
|
+
const { input: i2 = import_node_process2.stdin, output: s = import_node_process2.stdout, render: r2, signal: n2, ...o } = t2;
|
|
25828
|
+
this.opts = o, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = r2.bind(this), this._track = e, this._abortSignal = n2, this.input = i2, this.output = s;
|
|
25098
25829
|
}
|
|
25099
25830
|
/**
|
|
25100
25831
|
* Unsubscribe all listeners
|
|
@@ -25132,11 +25863,11 @@ var V = class {
|
|
|
25132
25863
|
* @param data - The data to pass to the callback
|
|
25133
25864
|
*/
|
|
25134
25865
|
emit(t2, ...e) {
|
|
25135
|
-
const i2 = this._subscribers.get(t2) ?? [],
|
|
25136
|
-
for (const
|
|
25137
|
-
|
|
25138
|
-
for (const
|
|
25139
|
-
|
|
25866
|
+
const i2 = this._subscribers.get(t2) ?? [], s = [];
|
|
25867
|
+
for (const r2 of i2)
|
|
25868
|
+
r2.cb(...e), r2.once && s.push(() => i2.splice(i2.indexOf(r2), 1));
|
|
25869
|
+
for (const r2 of s)
|
|
25870
|
+
r2();
|
|
25140
25871
|
}
|
|
25141
25872
|
prompt() {
|
|
25142
25873
|
return new Promise((t2) => {
|
|
@@ -25158,9 +25889,9 @@ var V = class {
|
|
|
25158
25889
|
escapeCodeTimeout: 50,
|
|
25159
25890
|
terminal: true
|
|
25160
25891
|
}), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), setRawMode(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
25161
|
-
this.output.write(
|
|
25892
|
+
this.output.write(cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
|
|
25162
25893
|
}), this.once("cancel", () => {
|
|
25163
|
-
this.output.write(
|
|
25894
|
+
this.output.write(cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
|
|
25164
25895
|
});
|
|
25165
25896
|
});
|
|
25166
25897
|
}
|
|
@@ -25179,70 +25910,73 @@ var V = class {
|
|
|
25179
25910
|
_clearUserInput() {
|
|
25180
25911
|
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
25181
25912
|
}
|
|
25182
|
-
onKeypress(t2, e) {
|
|
25183
|
-
if (this.
|
|
25184
|
-
if (this.
|
|
25185
|
-
|
|
25186
|
-
|
|
25913
|
+
async onKeypress(t2, e) {
|
|
25914
|
+
if (this.state !== "validating") {
|
|
25915
|
+
if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && settings.aliases.has(e.name) && this.emit("cursor", settings.aliases.get(e.name)), settings.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2, e), e?.name === "return" && this._shouldSubmit(t2, e)) {
|
|
25916
|
+
if (this.opts.validate) {
|
|
25917
|
+
const i2 = runValidation(this.opts.validate, this.value);
|
|
25918
|
+
let s;
|
|
25919
|
+
i2 instanceof Promise ? (this.state = "validating", this.render(), s = await i2) : s = i2, s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
|
|
25920
|
+
}
|
|
25921
|
+
this.state !== "error" && (this.state = "submit");
|
|
25187
25922
|
}
|
|
25188
|
-
this.state
|
|
25923
|
+
isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
25189
25924
|
}
|
|
25190
|
-
isActionKey([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
25191
25925
|
}
|
|
25192
25926
|
close() {
|
|
25193
25927
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
25194
25928
|
`), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
25195
25929
|
}
|
|
25196
25930
|
restoreCursor() {
|
|
25197
|
-
const t2 = wrapAnsi(this._prevFrame,
|
|
25931
|
+
const t2 = wrapAnsi(this._prevFrame, getColumns(this.output), { hard: true, trim: false }).split(`
|
|
25198
25932
|
`).length - 1;
|
|
25199
|
-
this.output.write(
|
|
25933
|
+
this.output.write(cursor.move(-999, t2 * -1));
|
|
25200
25934
|
}
|
|
25201
25935
|
render() {
|
|
25202
|
-
const t2 = wrapAnsi(this._render(this) ?? "",
|
|
25936
|
+
const t2 = wrapAnsi(this._render(this) ?? "", getColumns(this.output), {
|
|
25203
25937
|
hard: true,
|
|
25204
25938
|
trim: false
|
|
25205
25939
|
});
|
|
25206
25940
|
if (t2 !== this._prevFrame) {
|
|
25207
25941
|
if (this.state === "initial")
|
|
25208
|
-
this.output.write(
|
|
25942
|
+
this.output.write(cursor.hide);
|
|
25209
25943
|
else {
|
|
25210
25944
|
const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
|
|
25211
25945
|
if (this.restoreCursor(), e) {
|
|
25212
|
-
const
|
|
25213
|
-
let
|
|
25214
|
-
if (
|
|
25946
|
+
const s = Math.max(0, e.numLinesAfter - i2), r2 = Math.max(0, e.numLinesBefore - i2);
|
|
25947
|
+
let n2 = e.lines.find((o) => o >= s);
|
|
25948
|
+
if (n2 === void 0) {
|
|
25215
25949
|
this._prevFrame = t2;
|
|
25216
25950
|
return;
|
|
25217
25951
|
}
|
|
25218
25952
|
if (e.lines.length === 1) {
|
|
25219
|
-
this.output.write(
|
|
25953
|
+
this.output.write(cursor.move(0, n2 - r2)), this.output.write(erase.lines(1));
|
|
25220
25954
|
const o = t2.split(`
|
|
25221
25955
|
`);
|
|
25222
|
-
this.output.write(o[
|
|
25956
|
+
this.output.write(o[n2]), this._prevFrame = t2, this.output.write(cursor.move(0, o.length - n2 - 1));
|
|
25223
25957
|
return;
|
|
25224
25958
|
} else if (e.lines.length > 1) {
|
|
25225
|
-
if (
|
|
25226
|
-
|
|
25959
|
+
if (s < r2)
|
|
25960
|
+
n2 = s;
|
|
25227
25961
|
else {
|
|
25228
|
-
const h2 =
|
|
25229
|
-
h2 > 0 && this.output.write(
|
|
25962
|
+
const h2 = n2 - r2;
|
|
25963
|
+
h2 > 0 && this.output.write(cursor.move(0, h2));
|
|
25230
25964
|
}
|
|
25231
|
-
this.output.write(
|
|
25232
|
-
const
|
|
25233
|
-
`).slice(
|
|
25234
|
-
this.output.write(
|
|
25965
|
+
this.output.write(erase.down());
|
|
25966
|
+
const m = t2.split(`
|
|
25967
|
+
`).slice(n2);
|
|
25968
|
+
this.output.write(m.join(`
|
|
25235
25969
|
`)), this._prevFrame = t2;
|
|
25236
25970
|
return;
|
|
25237
25971
|
}
|
|
25238
25972
|
}
|
|
25239
|
-
this.output.write(
|
|
25973
|
+
this.output.write(erase.down());
|
|
25240
25974
|
}
|
|
25241
25975
|
this.output.write(t2), this.state === "initial" && (this.state = "active"), this._prevFrame = t2;
|
|
25242
25976
|
}
|
|
25243
25977
|
}
|
|
25244
25978
|
};
|
|
25245
|
-
var r = class extends
|
|
25979
|
+
var r = class extends C$1 {
|
|
25246
25980
|
get cursor() {
|
|
25247
25981
|
return this.value ? 0 : 1;
|
|
25248
25982
|
}
|
|
@@ -25253,13 +25987,13 @@ var r = class extends V {
|
|
|
25253
25987
|
super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
|
|
25254
25988
|
this.value = this._value;
|
|
25255
25989
|
}), this.on("confirm", (i2) => {
|
|
25256
|
-
this.output.write(
|
|
25990
|
+
this.output.write(cursor.move(0, -1)), this.value = i2, this.state = "submit", this.close();
|
|
25257
25991
|
}), this.on("cursor", () => {
|
|
25258
25992
|
this.value = !this.value;
|
|
25259
25993
|
});
|
|
25260
25994
|
}
|
|
25261
25995
|
};
|
|
25262
|
-
var u
|
|
25996
|
+
var u = class extends C$1 {
|
|
25263
25997
|
_mask = "\u2022";
|
|
25264
25998
|
get cursor() {
|
|
25265
25999
|
return this._cursor;
|
|
@@ -25287,7 +26021,7 @@ var u$1 = class u extends V {
|
|
|
25287
26021
|
});
|
|
25288
26022
|
}
|
|
25289
26023
|
};
|
|
25290
|
-
var n = class extends
|
|
26024
|
+
var n = class extends C$1 {
|
|
25291
26025
|
get userInputWithCursor() {
|
|
25292
26026
|
if (this.state === "submit")
|
|
25293
26027
|
return this.userInput;
|
|
@@ -25317,7 +26051,6 @@ var import_node_util5 = require("util");
|
|
|
25317
26051
|
var import_node_process3 = __toESM(require("process"), 1);
|
|
25318
26052
|
var import_node_fs3 = require("fs");
|
|
25319
26053
|
var import_node_path3 = require("path");
|
|
25320
|
-
var import_sisteransi2 = __toESM(require_src3(), 1);
|
|
25321
26054
|
function isUnicodeSupported() {
|
|
25322
26055
|
if (import_node_process3.default.platform !== "win32") {
|
|
25323
26056
|
return import_node_process3.default.env.TERM !== "linux";
|
|
@@ -25326,7 +26059,7 @@ function isUnicodeSupported() {
|
|
|
25326
26059
|
}
|
|
25327
26060
|
var unicode = isUnicodeSupported();
|
|
25328
26061
|
var isCI = () => process.env.CI === "true";
|
|
25329
|
-
var unicodeOr = (
|
|
26062
|
+
var unicodeOr = (e, o) => unicode ? e : o;
|
|
25330
26063
|
var S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
|
|
25331
26064
|
var S_STEP_CANCEL = unicodeOr("\u25A0", "x");
|
|
25332
26065
|
var S_STEP_ERROR = unicodeOr("\u25B2", "x");
|
|
@@ -25352,8 +26085,8 @@ var S_INFO = unicodeOr("\u25CF", "\u2022");
|
|
|
25352
26085
|
var S_SUCCESS = unicodeOr("\u25C6", "*");
|
|
25353
26086
|
var S_WARN = unicodeOr("\u25B2", "!");
|
|
25354
26087
|
var S_ERROR = unicodeOr("\u25A0", "x");
|
|
25355
|
-
var symbol = (
|
|
25356
|
-
switch (
|
|
26088
|
+
var symbol = (e) => {
|
|
26089
|
+
switch (e) {
|
|
25357
26090
|
case "initial":
|
|
25358
26091
|
case "active":
|
|
25359
26092
|
return (0, import_node_util5.styleText)("cyan", S_STEP_ACTIVE);
|
|
@@ -25363,41 +26096,43 @@ var symbol = (o) => {
|
|
|
25363
26096
|
return (0, import_node_util5.styleText)("yellow", S_STEP_ERROR);
|
|
25364
26097
|
case "submit":
|
|
25365
26098
|
return (0, import_node_util5.styleText)("green", S_STEP_SUBMIT);
|
|
26099
|
+
case "validating":
|
|
26100
|
+
return (0, import_node_util5.styleText)("dim", S_STEP_ACTIVE);
|
|
25366
26101
|
}
|
|
25367
26102
|
};
|
|
25368
|
-
var confirm = (
|
|
25369
|
-
const a2 =
|
|
26103
|
+
var confirm = (e) => {
|
|
26104
|
+
const a2 = e.active ?? "Yes", o = e.inactive ?? "No";
|
|
25370
26105
|
return new r({
|
|
25371
26106
|
active: a2,
|
|
25372
|
-
inactive:
|
|
25373
|
-
signal:
|
|
25374
|
-
input:
|
|
25375
|
-
output:
|
|
25376
|
-
initialValue:
|
|
26107
|
+
inactive: o,
|
|
26108
|
+
signal: e.signal,
|
|
26109
|
+
input: e.input,
|
|
26110
|
+
output: e.output,
|
|
26111
|
+
initialValue: e.initialValue ?? true,
|
|
25377
26112
|
render() {
|
|
25378
|
-
const
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
),
|
|
26113
|
+
const i2 = e.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l = i2 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
|
|
26114
|
+
e.output,
|
|
26115
|
+
e.message,
|
|
26116
|
+
l,
|
|
26117
|
+
u3
|
|
26118
|
+
), s = `${i2 ? `${(0, import_node_util5.styleText)("gray", S_BAR)}
|
|
25384
26119
|
` : ""}${f}
|
|
25385
|
-
`,
|
|
26120
|
+
`, c2 = this.value ? a2 : o;
|
|
25386
26121
|
switch (this.state) {
|
|
25387
26122
|
case "submit": {
|
|
25388
|
-
const r2 =
|
|
25389
|
-
return `${
|
|
26123
|
+
const r2 = i2 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : "";
|
|
26124
|
+
return `${s}${r2}${(0, import_node_util5.styleText)("dim", c2)}`;
|
|
25390
26125
|
}
|
|
25391
26126
|
case "cancel": {
|
|
25392
|
-
const r2 =
|
|
25393
|
-
return `${
|
|
26127
|
+
const r2 = i2 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : "";
|
|
26128
|
+
return `${s}${r2}${(0, import_node_util5.styleText)(["strikethrough", "dim"], c2)}${i2 ? `
|
|
25394
26129
|
${(0, import_node_util5.styleText)("gray", S_BAR)}` : ""}`;
|
|
25395
26130
|
}
|
|
25396
26131
|
default: {
|
|
25397
|
-
const r2 =
|
|
25398
|
-
return `${
|
|
26132
|
+
const r2 = i2 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : "", g = i2 ? (0, import_node_util5.styleText)("cyan", S_BAR_END) : "";
|
|
26133
|
+
return `${s}${r2}${this.value ? `${(0, import_node_util5.styleText)("green", S_RADIO_ACTIVE)} ${a2}` : `${(0, import_node_util5.styleText)("dim", S_RADIO_INACTIVE)} ${(0, import_node_util5.styleText)("dim", a2)}`}${e.vertical ? i2 ? `
|
|
25399
26134
|
${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : `
|
|
25400
|
-
` : ` ${(0, import_node_util5.styleText)("dim", "/")} `}${this.value ? `${(0, import_node_util5.styleText)("dim", S_RADIO_INACTIVE)} ${(0, import_node_util5.styleText)("dim",
|
|
26135
|
+
` : ` ${(0, import_node_util5.styleText)("dim", "/")} `}${this.value ? `${(0, import_node_util5.styleText)("dim", S_RADIO_INACTIVE)} ${(0, import_node_util5.styleText)("dim", o)}` : `${(0, import_node_util5.styleText)("green", S_RADIO_ACTIVE)} ${o}`}
|
|
25401
26136
|
${g}
|
|
25402
26137
|
`;
|
|
25403
26138
|
}
|
|
@@ -25416,123 +26151,142 @@ var cancel = (o = "", t2) => {
|
|
|
25416
26151
|
|
|
25417
26152
|
`);
|
|
25418
26153
|
};
|
|
25419
|
-
var password = (
|
|
25420
|
-
validate:
|
|
25421
|
-
mask:
|
|
25422
|
-
signal:
|
|
25423
|
-
input:
|
|
25424
|
-
output:
|
|
26154
|
+
var password = (e) => new u({
|
|
26155
|
+
validate: e.validate,
|
|
26156
|
+
mask: e.mask ?? S_PASSWORD_MASK,
|
|
26157
|
+
signal: e.signal,
|
|
26158
|
+
input: e.input,
|
|
26159
|
+
output: e.output,
|
|
25425
26160
|
render() {
|
|
25426
|
-
const
|
|
25427
|
-
` : ""}${symbol(this.state)} ${
|
|
25428
|
-
`,
|
|
26161
|
+
const r2 = e.withGuide ?? settings.withGuide, o = `${r2 ? `${(0, import_node_util5.styleText)("gray", S_BAR)}
|
|
26162
|
+
` : ""}${symbol(this.state)} ${e.message}
|
|
26163
|
+
`, m = this.userInputWithCursor, i2 = this.masked;
|
|
25429
26164
|
switch (this.state) {
|
|
25430
26165
|
case "error": {
|
|
25431
|
-
const s =
|
|
25432
|
-
return
|
|
25433
|
-
${s}${
|
|
26166
|
+
const s = r2 ? `${(0, import_node_util5.styleText)("yellow", S_BAR)} ` : "", n2 = r2 ? `${(0, import_node_util5.styleText)("yellow", S_BAR_END)} ` : "", d = i2 ?? "";
|
|
26167
|
+
return e.clearOnError && this.clear(), `${o.trim()}
|
|
26168
|
+
${s}${d}
|
|
25434
26169
|
${n2}${(0, import_node_util5.styleText)("yellow", this.error)}
|
|
25435
26170
|
`;
|
|
25436
26171
|
}
|
|
25437
26172
|
case "submit": {
|
|
25438
|
-
const s =
|
|
26173
|
+
const s = r2 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : "", n2 = i2 ? (0, import_node_util5.styleText)("dim", i2) : "";
|
|
25439
26174
|
return `${o}${s}${n2}`;
|
|
25440
26175
|
}
|
|
25441
26176
|
case "cancel": {
|
|
25442
|
-
const s =
|
|
25443
|
-
return `${o}${s}${n2}${i2 &&
|
|
26177
|
+
const s = r2 ? `${(0, import_node_util5.styleText)("gray", S_BAR)} ` : "", n2 = i2 ? (0, import_node_util5.styleText)(["strikethrough", "dim"], i2) : "";
|
|
26178
|
+
return `${o}${s}${n2}${i2 && r2 ? `
|
|
25444
26179
|
${(0, import_node_util5.styleText)("gray", S_BAR)}` : ""}`;
|
|
25445
26180
|
}
|
|
25446
26181
|
default: {
|
|
25447
|
-
const s =
|
|
25448
|
-
return `${o}${s}${
|
|
26182
|
+
const s = r2 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : "", n2 = r2 ? (0, import_node_util5.styleText)("cyan", S_BAR_END) : "";
|
|
26183
|
+
return `${o}${s}${m}
|
|
25449
26184
|
${n2}
|
|
25450
26185
|
`;
|
|
25451
26186
|
}
|
|
25452
26187
|
}
|
|
25453
26188
|
}
|
|
25454
26189
|
}).prompt();
|
|
25455
|
-
var
|
|
26190
|
+
var Y = 3e4;
|
|
26191
|
+
var Z = (c2) => (0, import_node_util5.styleText)("magenta", c2);
|
|
25456
26192
|
var spinner = ({
|
|
25457
|
-
indicator:
|
|
25458
|
-
onCancel:
|
|
26193
|
+
indicator: c2 = "dots",
|
|
26194
|
+
onCancel: b,
|
|
25459
26195
|
output: n2 = process.stdout,
|
|
25460
|
-
cancelMessage:
|
|
25461
|
-
errorMessage:
|
|
25462
|
-
frames:
|
|
25463
|
-
delay:
|
|
25464
|
-
signal:
|
|
25465
|
-
...
|
|
26196
|
+
cancelMessage: _,
|
|
26197
|
+
errorMessage: C2,
|
|
26198
|
+
frames: M = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
|
|
26199
|
+
delay: O = unicode ? 80 : 120,
|
|
26200
|
+
signal: g,
|
|
26201
|
+
...E
|
|
25466
26202
|
} = {}) => {
|
|
25467
|
-
const
|
|
25468
|
-
let
|
|
25469
|
-
const
|
|
25470
|
-
const
|
|
25471
|
-
|
|
25472
|
-
},
|
|
25473
|
-
process.on("uncaughtExceptionMonitor",
|
|
25474
|
-
},
|
|
25475
|
-
process.removeListener("uncaughtExceptionMonitor",
|
|
25476
|
-
},
|
|
25477
|
-
if (
|
|
25478
|
-
|
|
26203
|
+
const u3 = isCI(), h2 = isAccessible(E.accessible);
|
|
26204
|
+
let x, I, p = false, l = false, r2 = "", v, w = performance.now();
|
|
26205
|
+
const y = getColumns(n2), F = E?.styleFrame ?? Z, S = (e) => {
|
|
26206
|
+
const s = e > 1 ? C2 ?? settings.messages.error : _ ?? settings.messages.cancel;
|
|
26207
|
+
l = e === 1, p && (m(s, e), l && typeof b == "function" && b());
|
|
26208
|
+
}, $ = () => S(2), a2 = () => S(1), H = () => {
|
|
26209
|
+
process.on("uncaughtExceptionMonitor", $), process.on("unhandledRejection", $), process.on("SIGINT", a2), process.on("SIGTERM", a2), process.on("exit", S), g && g.addEventListener("abort", a2);
|
|
26210
|
+
}, B = () => {
|
|
26211
|
+
process.removeListener("uncaughtExceptionMonitor", $), process.removeListener("unhandledRejection", $), process.removeListener("SIGINT", a2), process.removeListener("SIGTERM", a2), process.removeListener("exit", S), g && g.removeEventListener("abort", a2);
|
|
26212
|
+
}, R2 = () => {
|
|
26213
|
+
if (v === void 0) return;
|
|
26214
|
+
u3 && n2.write(`
|
|
25479
26215
|
`);
|
|
25480
|
-
const
|
|
26216
|
+
const s = wrapAnsi(v, y, {
|
|
25481
26217
|
hard: true,
|
|
25482
26218
|
trim: false
|
|
25483
26219
|
}).split(`
|
|
25484
26220
|
`);
|
|
25485
|
-
|
|
25486
|
-
},
|
|
25487
|
-
const
|
|
25488
|
-
return
|
|
25489
|
-
}, N =
|
|
25490
|
-
|
|
26221
|
+
s.length > 1 && n2.write(cursor.up(s.length - 1)), n2.write(cursor.to(0)), n2.write(erase.down());
|
|
26222
|
+
}, L = (e) => e.replace(/\.+$/, ""), T = (e) => {
|
|
26223
|
+
const s = (performance.now() - e) / 1e3, i2 = Math.floor(s / 60), t2 = Math.floor(s % 60);
|
|
26224
|
+
return i2 > 0 ? `[${i2}m ${t2}s]` : `[${t2}s]`;
|
|
26225
|
+
}, N = E.withGuide ?? settings.withGuide, P = (e = "") => {
|
|
26226
|
+
if (p = true, l = false, r2 = L(e), w = performance.now(), H(), h2) {
|
|
26227
|
+
r2 !== "" && n2.write(`${r2}
|
|
26228
|
+
`), I = setInterval(() => {
|
|
26229
|
+
n2.write(r2 === "" ? `still working
|
|
26230
|
+
` : `still working: ${r2}
|
|
26231
|
+
`);
|
|
26232
|
+
}, Y);
|
|
26233
|
+
return;
|
|
26234
|
+
}
|
|
26235
|
+
x = block({ output: n2 }), N && n2.write(`${(0, import_node_util5.styleText)("gray", S_BAR)}
|
|
25491
26236
|
`);
|
|
25492
|
-
let
|
|
25493
|
-
|
|
25494
|
-
if (
|
|
26237
|
+
let s = 0, i2 = 0;
|
|
26238
|
+
I = setInterval(() => {
|
|
26239
|
+
if (u3 && r2 === v)
|
|
25495
26240
|
return;
|
|
25496
|
-
|
|
25497
|
-
const
|
|
25498
|
-
let
|
|
25499
|
-
if (
|
|
25500
|
-
|
|
25501
|
-
else if (
|
|
25502
|
-
|
|
26241
|
+
R2(), v = r2;
|
|
26242
|
+
const t2 = F(M[s]);
|
|
26243
|
+
let o;
|
|
26244
|
+
if (u3)
|
|
26245
|
+
o = `${t2} ${r2}...`;
|
|
26246
|
+
else if (c2 === "timer")
|
|
26247
|
+
o = `${t2} ${r2} ${T(w)}`;
|
|
25503
26248
|
else {
|
|
25504
|
-
const
|
|
25505
|
-
|
|
26249
|
+
const j = ".".repeat(Math.floor(i2)).slice(0, 3);
|
|
26250
|
+
o = `${t2} ${r2}${j}`;
|
|
25506
26251
|
}
|
|
25507
|
-
const
|
|
26252
|
+
const D = wrapAnsi(o, y, {
|
|
25508
26253
|
hard: true,
|
|
25509
26254
|
trim: false
|
|
25510
26255
|
});
|
|
25511
|
-
n2.write(
|
|
25512
|
-
},
|
|
25513
|
-
},
|
|
25514
|
-
if (
|
|
25515
|
-
|
|
25516
|
-
|
|
25517
|
-
|
|
25518
|
-
|
|
25519
|
-
`)
|
|
26256
|
+
n2.write(D), s = s + 1 < M.length ? s + 1 : 0, i2 = i2 < 4 ? i2 + 0.125 : 0;
|
|
26257
|
+
}, O);
|
|
26258
|
+
}, m = (e = "", s = 0, i2 = false) => {
|
|
26259
|
+
if (p) {
|
|
26260
|
+
if (p = false, l = s === 1, clearInterval(I), h2 || R2(), r2 = e ?? r2, !i2)
|
|
26261
|
+
if (h2) {
|
|
26262
|
+
const t2 = s === 1 ? _ ?? settings.messages.cancel : s === 2 ? C2 ?? settings.messages.error : "Done", o = r2 || t2;
|
|
26263
|
+
c2 === "timer" ? n2.write(`${o} ${T(w)}
|
|
26264
|
+
`) : n2.write(`${o}
|
|
26265
|
+
`);
|
|
26266
|
+
} else {
|
|
26267
|
+
const t2 = s === 0 ? (0, import_node_util5.styleText)("green", S_STEP_SUBMIT) : s === 1 ? (0, import_node_util5.styleText)("red", S_STEP_CANCEL) : (0, import_node_util5.styleText)("red", S_STEP_ERROR);
|
|
26268
|
+
c2 === "timer" ? n2.write(`${t2} ${r2} ${T(w)}
|
|
26269
|
+
`) : n2.write(`${t2} ${r2}
|
|
26270
|
+
`);
|
|
26271
|
+
}
|
|
26272
|
+
B(), x?.();
|
|
26273
|
+
}
|
|
25520
26274
|
};
|
|
25521
26275
|
return {
|
|
25522
26276
|
start: P,
|
|
25523
|
-
stop: (e = "") =>
|
|
26277
|
+
stop: (e = "") => m(e, 0),
|
|
25524
26278
|
message: (e = "") => {
|
|
25525
|
-
|
|
26279
|
+
r2 = L(e ?? r2);
|
|
25526
26280
|
},
|
|
25527
|
-
cancel: (e = "") =>
|
|
25528
|
-
error: (e = "") =>
|
|
25529
|
-
clear: () =>
|
|
26281
|
+
cancel: (e = "") => m(e, 1),
|
|
26282
|
+
error: (e = "") => m(e, 2),
|
|
26283
|
+
clear: () => m("", 0, true),
|
|
25530
26284
|
get isCancelled() {
|
|
25531
|
-
return
|
|
26285
|
+
return l;
|
|
25532
26286
|
}
|
|
25533
26287
|
};
|
|
25534
26288
|
};
|
|
25535
|
-
var
|
|
26289
|
+
var u2 = {
|
|
25536
26290
|
light: unicodeOr("\u2500", "-"),
|
|
25537
26291
|
heavy: unicodeOr("\u2501", "="),
|
|
25538
26292
|
block: unicodeOr("\u2588", "#")
|
|
@@ -25542,42 +26296,48 @@ var SELECT_INSTRUCTIONS = [
|
|
|
25542
26296
|
`${(0, import_node_util5.styleText)("dim", "Enter:")} confirm`
|
|
25543
26297
|
];
|
|
25544
26298
|
var i = `${(0, import_node_util5.styleText)("gray", S_BAR)} `;
|
|
25545
|
-
var text = (
|
|
25546
|
-
validate:
|
|
25547
|
-
placeholder:
|
|
25548
|
-
defaultValue:
|
|
25549
|
-
initialValue:
|
|
25550
|
-
output:
|
|
25551
|
-
signal:
|
|
25552
|
-
input:
|
|
26299
|
+
var text = (t2) => new n({
|
|
26300
|
+
validate: t2.validate,
|
|
26301
|
+
placeholder: t2.placeholder,
|
|
26302
|
+
defaultValue: t2.defaultValue,
|
|
26303
|
+
initialValue: t2.initialValue,
|
|
26304
|
+
output: t2.output,
|
|
26305
|
+
signal: t2.signal,
|
|
26306
|
+
input: t2.input,
|
|
25553
26307
|
render() {
|
|
25554
|
-
const
|
|
25555
|
-
` : ""}${symbol(this.state)} `}${
|
|
25556
|
-
`,
|
|
26308
|
+
const r2 = t2?.withGuide ?? settings.withGuide, l = `${`${r2 ? `${(0, import_node_util5.styleText)("gray", S_BAR)}
|
|
26309
|
+
` : ""}${symbol(this.state)} `}${t2.message}
|
|
26310
|
+
`, d = t2.placeholder && t2.placeholder.length > 0 ? (
|
|
25557
26311
|
// biome-ignore lint/style/noNonNullAssertion: guarded by placeholder.length > 0
|
|
25558
|
-
(0, import_node_util5.styleText)("inverse",
|
|
25559
|
-
) : (0, import_node_util5.styleText)(["inverse", "hidden"], "_"), o = this.userInput ? this.userInputWithCursor :
|
|
26312
|
+
(0, import_node_util5.styleText)("inverse", t2.placeholder[0]) + (0, import_node_util5.styleText)("dim", t2.placeholder.slice(1))
|
|
26313
|
+
) : (0, import_node_util5.styleText)(["inverse", "hidden"], "_"), o = this.userInput ? this.userInputWithCursor : d, s = this.value ?? "";
|
|
25560
26314
|
switch (this.state) {
|
|
26315
|
+
case "validating": {
|
|
26316
|
+
const n2 = r2 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : "", i2 = r2 ? (0, import_node_util5.styleText)("cyan", S_BAR_END) : "", c2 = (0, import_node_util5.styleText)("dim", o), $ = (0, import_node_util5.styleText)("dim", "Validating...");
|
|
26317
|
+
return `${l}${n2}${c2}
|
|
26318
|
+
${i2} ${$}
|
|
26319
|
+
`;
|
|
26320
|
+
}
|
|
25561
26321
|
case "error": {
|
|
25562
|
-
const n2 = this.error ? ` ${(0, import_node_util5.styleText)("yellow", this.error)}` : "",
|
|
25563
|
-
return `${
|
|
25564
|
-
${
|
|
25565
|
-
${
|
|
26322
|
+
const n2 = this.error ? ` ${(0, import_node_util5.styleText)("yellow", this.error)}` : "", i2 = r2 ? `${(0, import_node_util5.styleText)("yellow", S_BAR)} ` : "", c2 = r2 ? (0, import_node_util5.styleText)("yellow", S_BAR_END) : "";
|
|
26323
|
+
return `${l.trim()}
|
|
26324
|
+
${i2}${o}
|
|
26325
|
+
${c2}${n2}
|
|
25566
26326
|
`;
|
|
25567
26327
|
}
|
|
25568
26328
|
case "submit": {
|
|
25569
|
-
const n2 =
|
|
25570
|
-
return `${
|
|
26329
|
+
const n2 = s ? `${r2 ? " " : ""}${(0, import_node_util5.styleText)("dim", s)}` : "", i2 = r2 ? (0, import_node_util5.styleText)("gray", S_BAR) : "";
|
|
26330
|
+
return `${l}${i2}${n2}`;
|
|
25571
26331
|
}
|
|
25572
26332
|
case "cancel": {
|
|
25573
|
-
const n2 =
|
|
25574
|
-
return `${
|
|
25575
|
-
${
|
|
26333
|
+
const n2 = s ? ` ${(0, import_node_util5.styleText)(["strikethrough", "dim"], s)}` : "", i2 = r2 ? (0, import_node_util5.styleText)("gray", S_BAR) : "";
|
|
26334
|
+
return `${l}${i2}${n2}${s.trim() ? `
|
|
26335
|
+
${i2}` : ""}`;
|
|
25576
26336
|
}
|
|
25577
26337
|
default: {
|
|
25578
|
-
const n2 =
|
|
25579
|
-
return `${
|
|
25580
|
-
${
|
|
26338
|
+
const n2 = r2 ? `${(0, import_node_util5.styleText)("cyan", S_BAR)} ` : "", i2 = r2 ? (0, import_node_util5.styleText)("cyan", S_BAR_END) : "";
|
|
26339
|
+
return `${l}${n2}${o}
|
|
26340
|
+
${i2}
|
|
25581
26341
|
`;
|
|
25582
26342
|
}
|
|
25583
26343
|
}
|
|
@@ -25970,8 +26730,8 @@ function renderTable(rows, columns) {
|
|
|
25970
26730
|
if (rows.length === 0) {
|
|
25971
26731
|
return import_picocolors4.default.dim("(no results)");
|
|
25972
26732
|
}
|
|
25973
|
-
const headers = columns.map((
|
|
25974
|
-
const body = rows.map((row) => columns.map((
|
|
26733
|
+
const headers = columns.map((c2) => sanitizeTerminalText(c2.header));
|
|
26734
|
+
const body = rows.map((row) => columns.map((c2) => formatCell(c2.value(row))));
|
|
25975
26735
|
const widths = headers.map((header, i2) => {
|
|
25976
26736
|
const cellMax = body.reduce((max, cells) => Math.max(max, displayWidth(cells[i2] ?? "")), 0);
|
|
25977
26737
|
return Math.max(displayWidth(header), cellMax);
|
|
@@ -25979,7 +26739,7 @@ function renderTable(rows, columns) {
|
|
|
25979
26739
|
const pad = (text2, width) => text2 + " ".repeat(Math.max(0, width - displayWidth(text2)));
|
|
25980
26740
|
const headerLine = headers.map((h2, i2) => import_picocolors4.default.bold(pad(h2, widths[i2] ?? 0))).join(" ");
|
|
25981
26741
|
const lines = body.map(
|
|
25982
|
-
(cells) => cells.map((
|
|
26742
|
+
(cells) => cells.map((c2, i2) => pad(c2, widths[i2] ?? 0)).join(" ").trimEnd()
|
|
25983
26743
|
);
|
|
25984
26744
|
return [headerLine, ...lines].join("\n");
|
|
25985
26745
|
}
|
|
@@ -26234,6 +26994,31 @@ var reviewIdentityCommand = new Command("review-identity").description("Approve
|
|
|
26234
26994
|
});
|
|
26235
26995
|
});
|
|
26236
26996
|
var assignmentsCommand = new Command("assignments").description("Create and manage signing assignments").addCommand(listCommand).addCommand(createCommand).addCommand(estimateCostCommand).addCommand(resetExpirationCommand).addCommand(resendCommand).addCommand(estimateResendCostCommand).addCommand(whatsappCommand).addCommand(identityVerificationCommand).addCommand(identityImageCommand).addCommand(reviewIdentityCommand);
|
|
26997
|
+
assignmentsCommand.addCommand(
|
|
26998
|
+
new Command("schedule").description("Schedule an assignment without sending or charging now").argument("<documentId>", "Document ID").requiredOption("--data <json>", "Assignment JSON with send_at (ISO 8601 or Unix seconds)").action(async (id, opts, command) => {
|
|
26999
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
27000
|
+
const payload = parseJsonObject(
|
|
27001
|
+
opts.data,
|
|
27002
|
+
"--data"
|
|
27003
|
+
);
|
|
27004
|
+
printData(await client.assignments.schedule(id, payload), config);
|
|
27005
|
+
});
|
|
27006
|
+
})
|
|
27007
|
+
);
|
|
27008
|
+
for (const [name, method] of [
|
|
27009
|
+
["signer-capacities", "signerCapacities"],
|
|
27010
|
+
["notification-history", "notificationHistory"]
|
|
27011
|
+
]) {
|
|
27012
|
+
assignmentsCommand.addCommand(
|
|
27013
|
+
new Command(name).description(
|
|
27014
|
+
name === "signer-capacities" ? "Read the capacities signers were assigned" : "Read notification delivery/open times"
|
|
27015
|
+
).argument("<documentId>", "Document ID").action(async (id, _opts, command) => {
|
|
27016
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
27017
|
+
printData(await client.assignments[method](id), config);
|
|
27018
|
+
});
|
|
27019
|
+
})
|
|
27020
|
+
);
|
|
27021
|
+
}
|
|
26237
27022
|
|
|
26238
27023
|
// src/commands/auth.ts
|
|
26239
27024
|
function resetPasswordPayload(email, resetToken, newPassword) {
|
|
@@ -26478,22 +27263,6 @@ var resetPasswordCommand = new Command("reset-password").description(
|
|
|
26478
27263
|
printData(result, config);
|
|
26479
27264
|
});
|
|
26480
27265
|
});
|
|
26481
|
-
var apiKeyCreateCommand = new Command("create").description("Generate (and rotate) the current user API key").addOption(
|
|
26482
|
-
new Option("--password <password>", "Account password (prompted if omitted)").env(
|
|
26483
|
-
"ASSINAFY_PASSWORD"
|
|
26484
|
-
)
|
|
26485
|
-
).action(async (opts, command) => {
|
|
26486
|
-
await runWithClient(command, async ({ client, config }) => {
|
|
26487
|
-
const password2 = opts.password ?? await promptSecret("Password");
|
|
26488
|
-
const result = await withSpinner(
|
|
26489
|
-
"Creating API key",
|
|
26490
|
-
config,
|
|
26491
|
-
() => client.auth.createApiKey(password2)
|
|
26492
|
-
);
|
|
26493
|
-
printSuccess("API key generated", config);
|
|
26494
|
-
printData(result, config, (r2) => renderKeyValue({ api_key: r2.api_key }));
|
|
26495
|
-
});
|
|
26496
|
-
});
|
|
26497
27266
|
var apiKeyGetCommand = new Command("get").description("Show the masked current API key").action(async (_opts, command) => {
|
|
26498
27267
|
await runWithClient(command, async ({ client, config }) => {
|
|
26499
27268
|
const result = await withSpinner("Fetching API key", config, () => client.auth.getApiKey());
|
|
@@ -26512,7 +27281,7 @@ var apiKeyDeleteCommand = new Command("delete").alias("rm").description("Revoke
|
|
|
26512
27281
|
printData({ revoked: true }, config);
|
|
26513
27282
|
});
|
|
26514
27283
|
});
|
|
26515
|
-
var apiKeysCommand = new Command("api-keys").description("
|
|
27284
|
+
var apiKeysCommand = new Command("api-keys").description("Inspect or revoke the current user personal API key").addCommand(apiKeyGetCommand).addCommand(apiKeyDeleteCommand);
|
|
26516
27285
|
var authCommand = new Command("auth").description("Authentication, password management, and personal API keys").addCommand(loginCommand).addCommand(socialLoginCommand).addCommand(linkSocialLoginCommand).addCommand(changePasswordCommand).addCommand(requestResetCommand).addCommand(resetPasswordCommand).addCommand(apiKeysCommand).addCommand(mfaCommand);
|
|
26517
27286
|
|
|
26518
27287
|
// src/commands/config/index.ts
|
|
@@ -27145,6 +27914,19 @@ var deleteCommand = new Command("delete").alias("rm").description("Delete a docu
|
|
|
27145
27914
|
printData({ deleted: id }, config);
|
|
27146
27915
|
});
|
|
27147
27916
|
});
|
|
27917
|
+
var cancelCommand = new Command("cancel").description("Cancel an open document while retaining its files and history").argument("<id>", "Document ID").option("-y, --yes", "Skip the confirmation prompt").action(async (id, opts, command) => {
|
|
27918
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
27919
|
+
const ok = await confirmDestructive(`Cancel document ${id}?`, Boolean(opts.yes));
|
|
27920
|
+
if (!ok) return;
|
|
27921
|
+
const document2 = await withSpinner(
|
|
27922
|
+
"Cancelling document",
|
|
27923
|
+
config,
|
|
27924
|
+
() => client.documents.cancel(id)
|
|
27925
|
+
);
|
|
27926
|
+
printSuccess(`Cancelled document ${id}`, config);
|
|
27927
|
+
printData(document2, config);
|
|
27928
|
+
});
|
|
27929
|
+
});
|
|
27148
27930
|
var tagsCommand = new Command("tags").description("List the tags attached to a document").argument("<id>", "Document ID").action(async (id, _opts, command) => {
|
|
27149
27931
|
await runWithClient(command, async ({ client, config }) => {
|
|
27150
27932
|
const accountId = requireAccountId(config);
|
|
@@ -27330,7 +28112,27 @@ var waitCommand = new Command("wait").description("Poll a document until it is r
|
|
|
27330
28112
|
printData(doc, config, (d) => renderKeyValue({ id: d.id, status: d.status }));
|
|
27331
28113
|
});
|
|
27332
28114
|
});
|
|
27333
|
-
var documentsCommand = new Command("documents").description("Upload, list, download, and manage documents").addCommand(uploadCommand).addCommand(listCommand4).addCommand(searchCommand).addCommand(getCommand3).addCommand(renameCommand).addCommand(downloadCommand).addCommand(thumbnailCommand).addCommand(downloadPageCommand).addCommand(activitiesCommand).addCommand(deleteCommand).addCommand(tagsCommand).addCommand(tagsSetCommand).addCommand(tagsAddCommand).addCommand(tagsRemoveCommand).addCommand(createFromTemplateCommand).addCommand(estimateTemplateCostCommand).addCommand(verifyCommand).addCommand(statusesCommand).addCommand(publicCommand).addCommand(sendTokenCommand).addCommand(progressCommand).addCommand(waitCommand);
|
|
28115
|
+
var documentsCommand = new Command("documents").description("Upload, list, download, and manage documents").addCommand(uploadCommand).addCommand(listCommand4).addCommand(searchCommand).addCommand(getCommand3).addCommand(renameCommand).addCommand(downloadCommand).addCommand(thumbnailCommand).addCommand(downloadPageCommand).addCommand(activitiesCommand).addCommand(cancelCommand).addCommand(deleteCommand).addCommand(tagsCommand).addCommand(tagsSetCommand).addCommand(tagsAddCommand).addCommand(tagsRemoveCommand).addCommand(createFromTemplateCommand).addCommand(estimateTemplateCostCommand).addCommand(verifyCommand).addCommand(statusesCommand).addCommand(publicCommand).addCommand(sendTokenCommand).addCommand(progressCommand).addCommand(waitCommand);
|
|
28116
|
+
documentsCommand.addCommand(
|
|
28117
|
+
new Command("watchers").description("List document watchers (owner credentials required)").argument("<documentId>", "Document ID").action(async (id, _opts, command) => {
|
|
28118
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
28119
|
+
printData(await client.documents.listWatchers(id), config);
|
|
28120
|
+
});
|
|
28121
|
+
})
|
|
28122
|
+
);
|
|
28123
|
+
documentsCommand.addCommand(
|
|
28124
|
+
new Command("set-watchers").description("Replace contacts notified when the document ends").argument("<documentId>", "Document ID").requiredOption("--watcher-ids <json>", "JSON array of contact IDs; [] removes all watchers").action(async (id, opts, command) => {
|
|
28125
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
28126
|
+
printData(
|
|
28127
|
+
await client.documents.setWatchers(
|
|
28128
|
+
id,
|
|
28129
|
+
parseJsonArray(opts.watcherIds, "--watcher-ids")
|
|
28130
|
+
),
|
|
28131
|
+
config
|
|
28132
|
+
);
|
|
28133
|
+
});
|
|
28134
|
+
})
|
|
28135
|
+
);
|
|
27334
28136
|
|
|
27335
28137
|
// src/commands/embed.ts
|
|
27336
28138
|
var origins = new Command("origins").description("Manage origins allowed to embed signing pages");
|
|
@@ -27533,6 +28335,27 @@ envelopesCommand.addCommand(
|
|
|
27533
28335
|
});
|
|
27534
28336
|
})
|
|
27535
28337
|
);
|
|
28338
|
+
envelopesCommand.addCommand(
|
|
28339
|
+
new Command("schedule").description("Schedule an envelope without sending or charging now").requiredOption("--data <json>", "Envelope JSON with send_at (ISO 8601 or Unix seconds)").action(async (opts, command) => {
|
|
28340
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
28341
|
+
const payload = parseJsonObject(
|
|
28342
|
+
opts.data,
|
|
28343
|
+
"--data"
|
|
28344
|
+
);
|
|
28345
|
+
printData(await client.envelopes.schedule(payload, requireAccountId(config)), config);
|
|
28346
|
+
});
|
|
28347
|
+
})
|
|
28348
|
+
);
|
|
28349
|
+
envelopesCommand.addCommand(
|
|
28350
|
+
new Command("estimate-resend-cost").description("Estimate one envelope reminder without sending or charging").argument("<envelopeId>", "Envelope ID").argument("<signerId>", "Signer ID").action(async (id, signerId, _opts, command) => {
|
|
28351
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
28352
|
+
printData(
|
|
28353
|
+
await client.envelopes.estimateResendCost(id, signerId, requireAccountId(config)),
|
|
28354
|
+
config
|
|
28355
|
+
);
|
|
28356
|
+
});
|
|
28357
|
+
})
|
|
28358
|
+
);
|
|
27536
28359
|
|
|
27537
28360
|
// src/commands/fields.ts
|
|
27538
28361
|
var fieldColumns = [
|
|
@@ -27851,6 +28674,37 @@ var userinfoCommand = new Command("userinfo").description("Read OIDC claims usin
|
|
|
27851
28674
|
});
|
|
27852
28675
|
var oauthCommand = new Command("oauth").description("OAuth 2.1 authorization, PKCE, token rotation, and OpenID Connect").addCommand(connectCommand).addCommand(metadataCommand).addCommand(discoveryCommand).addCommand(authorizeCommand).addCommand(exchangeCommand).addCommand(refreshCommand).addCommand(revokeCommand).addCommand(userinfoCommand);
|
|
27853
28676
|
|
|
28677
|
+
// src/commands/scheduled-sends.ts
|
|
28678
|
+
var scheduledSendsCommand = new Command("scheduled-sends").description(
|
|
28679
|
+
"List, cancel or send queued requests"
|
|
28680
|
+
);
|
|
28681
|
+
scheduledSendsCommand.addCommand(
|
|
28682
|
+
addPaginationOptions(new Command("list").description("List queued assignments and envelopes")).option("--document <id>", "Filter by document ID").action(async (opts, command) => {
|
|
28683
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
28684
|
+
printData(
|
|
28685
|
+
await client.scheduledSends.list(
|
|
28686
|
+
{ ...listParams(opts), document_id: opts.document },
|
|
28687
|
+
requireAccountId(config)
|
|
28688
|
+
),
|
|
28689
|
+
config
|
|
28690
|
+
);
|
|
28691
|
+
});
|
|
28692
|
+
})
|
|
28693
|
+
);
|
|
28694
|
+
for (const action of ["cancel", "send"]) {
|
|
28695
|
+
scheduledSendsCommand.addCommand(
|
|
28696
|
+
new Command(action).description(
|
|
28697
|
+
action === "send" ? "Send now, charging the current cost and notifying signers" : "Cancel a pending request without sending"
|
|
28698
|
+
).argument("<scheduledSendId>", "Scheduled send ID").option("-y, --yes", "Skip confirmation").action(async (id, opts, command) => {
|
|
28699
|
+
await runWithClient(command, async ({ client, config }) => {
|
|
28700
|
+
if (!await confirmDestructive(`${action} scheduled request ${id}?`, Boolean(opts.yes)))
|
|
28701
|
+
return;
|
|
28702
|
+
printData(await client.scheduledSends[action](id, requireAccountId(config)), config);
|
|
28703
|
+
});
|
|
28704
|
+
})
|
|
28705
|
+
);
|
|
28706
|
+
}
|
|
28707
|
+
|
|
27854
28708
|
// src/commands/send.ts
|
|
27855
28709
|
var phonePattern = /^\+?[\d\s().-]*\d[\d\s().-]*$/;
|
|
27856
28710
|
function parseSignerSpec(spec) {
|
|
@@ -29135,7 +29989,7 @@ function handleStreamError(err, fallback, exit = process.exit) {
|
|
|
29135
29989
|
// package.json
|
|
29136
29990
|
var package_default = {
|
|
29137
29991
|
name: "@assinafy/cli",
|
|
29138
|
-
version: "2.
|
|
29992
|
+
version: "2.10.0",
|
|
29139
29993
|
description: "The official command-line interface for the Assinafy digital-signature API",
|
|
29140
29994
|
license: "MIT",
|
|
29141
29995
|
type: "module",
|
|
@@ -29209,7 +30063,7 @@ var package_default = {
|
|
|
29209
30063
|
prepublishOnly: "npm run typecheck && npm run lint && npm run test && npm run build && npm run verify:bundle"
|
|
29210
30064
|
},
|
|
29211
30065
|
dependencies: {
|
|
29212
|
-
"@types/node": "^
|
|
30066
|
+
"@types/node": "^26.6.6",
|
|
29213
30067
|
axios: "^1.20.0"
|
|
29214
30068
|
},
|
|
29215
30069
|
devDependencies: {
|
|
@@ -29218,10 +30072,10 @@ var package_default = {
|
|
|
29218
30072
|
"@commander-js/extra-typings": "^15.0.0",
|
|
29219
30073
|
commander: "^15.0.0",
|
|
29220
30074
|
picocolors: "^1.1.1",
|
|
29221
|
-
tsup: "^
|
|
30075
|
+
tsup: "^9.0.0",
|
|
29222
30076
|
tsx: "^4.23.12",
|
|
29223
30077
|
typescript: "^7.0.2",
|
|
29224
|
-
vitest: "^
|
|
30078
|
+
vitest: "^5.1.0"
|
|
29225
30079
|
},
|
|
29226
30080
|
overrides: {
|
|
29227
30081
|
esbuild: "^0.28.2"
|
|
@@ -29251,7 +30105,7 @@ ${import_picocolors7.default.gray("Examples:")}
|
|
|
29251
30105
|
|
|
29252
30106
|
${import_picocolors7.default.gray("Sandbox:")} target it with ${import_picocolors7.default.blue("--base-url https://sandbox.assinafy.com.br/v1")}
|
|
29253
30107
|
`
|
|
29254
|
-
).addCommand(sendCommand).addCommand(documentsCommand).addCommand(envelopesCommand).addCommand(embedCommand).addCommand(contractsCommand).addCommand(signersCommand).addCommand(assignmentsCommand).addCommand(templatesCommand).addCommand(tagsCommand2).addCommand(fieldsCommand).addCommand(webhooksCommand).addCommand(workspacesCommand).addCommand(usersCommand).addCommand(signerCommand).addCommand(authCommand).addCommand(oauthCommand).addCommand(loginCommand2).addCommand(logoutCommand).addCommand(whoamiCommand).addCommand(configCommand).addCommand(docsCommand);
|
|
30108
|
+
).addCommand(sendCommand).addCommand(documentsCommand).addCommand(envelopesCommand).addCommand(embedCommand).addCommand(contractsCommand).addCommand(signersCommand).addCommand(assignmentsCommand).addCommand(scheduledSendsCommand).addCommand(templatesCommand).addCommand(tagsCommand2).addCommand(fieldsCommand).addCommand(webhooksCommand).addCommand(workspacesCommand).addCommand(usersCommand).addCommand(signerCommand).addCommand(authCommand).addCommand(oauthCommand).addCommand(loginCommand2).addCommand(logoutCommand).addCommand(whoamiCommand).addCommand(configCommand).addCommand(docsCommand);
|
|
29255
30109
|
program2.parseAsync().catch((err) => {
|
|
29256
30110
|
process.stderr.write(
|
|
29257
30111
|
`${import_picocolors7.default.red("error:")} ${sanitizeTerminalText(err instanceof Error ? err.message : String(err))}
|