@membranehq/sdk 0.15.6 → 0.17.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/dist/bundle.d.ts +6 -0
- package/dist/bundle.js +414 -313
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/external-event-subscriptions-accessors.d.ts +1 -0
- package/dist/dts/api-client.d.ts +1 -1
- package/dist/dts/index.browser.d.ts +1 -0
- package/dist/dts/self-hosting-tokens/index.d.ts +1 -0
- package/dist/dts/self-hosting-tokens/types.d.ts +38 -0
- package/dist/dts/ui.test.d.ts +1 -0
- package/dist/dts/workspace-elements/api/connections-api.d.ts +7 -2
- package/dist/dts/workspace-elements/api/connections-api.test.d.ts +1 -0
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +38 -38
- package/dist/dts/workspace-elements/utils/index.d.ts +1 -0
- package/dist/dts/workspace-elements/utils/zod-schema-utils.d.ts +2 -0
- package/dist/dts/workspace-elements/utils/zod-schema-utils.test.d.ts +1 -0
- package/dist/index.browser.d.mts +87 -41
- package/dist/index.browser.d.ts +87 -41
- package/dist/index.browser.js +153 -39
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +146 -39
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +87 -41
- package/dist/index.node.d.ts +87 -41
- package/dist/index.node.js +153 -39
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +146 -39
- package/dist/index.node.mjs.map +1 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -7898,7 +7898,7 @@
|
|
|
7898
7898
|
const version = {
|
|
7899
7899
|
major: 4,
|
|
7900
7900
|
minor: 3,
|
|
7901
|
-
patch:
|
|
7901
|
+
patch: 6,
|
|
7902
7902
|
};
|
|
7903
7903
|
|
|
7904
7904
|
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
@@ -9260,11 +9260,9 @@
|
|
|
9260
9260
|
if (keyResult instanceof Promise) {
|
|
9261
9261
|
throw new Error("Async schemas not supported in object keys currently");
|
|
9262
9262
|
}
|
|
9263
|
-
// Numeric string fallback: if key
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
keyResult.issues.length &&
|
|
9267
|
-
keyResult.issues.some((iss) => iss.code === "invalid_type" && iss.expected === "number");
|
|
9263
|
+
// Numeric string fallback: if key is a numeric string and failed, retry with Number(key)
|
|
9264
|
+
// This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals
|
|
9265
|
+
const checkNumericKey = typeof key === "string" && number$2.test(key) && keyResult.issues.length;
|
|
9268
9266
|
if (checkNumericKey) {
|
|
9269
9267
|
const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
|
|
9270
9268
|
if (retryResult instanceof Promise) {
|
|
@@ -16917,7 +16915,7 @@
|
|
|
16917
16915
|
}
|
|
16918
16916
|
}
|
|
16919
16917
|
// When ref was extracted to $defs, remove properties that match the definition
|
|
16920
|
-
if (refSchema.$ref) {
|
|
16918
|
+
if (refSchema.$ref && refSeen.def) {
|
|
16921
16919
|
for (const key in schema) {
|
|
16922
16920
|
if (key === "$ref" || key === "allOf")
|
|
16923
16921
|
continue;
|
|
@@ -22189,36 +22187,64 @@
|
|
|
22189
22187
|
WorkspaceElementDependencyType["Parent"] = "PARENT";
|
|
22190
22188
|
})(WorkspaceElementDependencyType || (WorkspaceElementDependencyType = {}));
|
|
22191
22189
|
const BaseWorkspaceElement = object({
|
|
22192
|
-
id: string$1(),
|
|
22193
|
-
name: string$1(),
|
|
22190
|
+
id: string$1().describe('Internal database ID of the element. Assigned by the API; unique per element.'),
|
|
22191
|
+
name: string$1().describe('Display name of the workspace element.'),
|
|
22194
22192
|
});
|
|
22195
22193
|
const BaseMembraneInterfaceEditableProperties = object({
|
|
22196
|
-
uuid: string$1()
|
|
22197
|
-
|
|
22198
|
-
|
|
22199
|
-
|
|
22200
|
-
|
|
22194
|
+
uuid: string$1()
|
|
22195
|
+
.optional()
|
|
22196
|
+
.describe('Stable unique identifier (UUID). Can be provided on create; otherwise generated. Must be unique across elements of this type.'),
|
|
22197
|
+
key: string$1()
|
|
22198
|
+
.optional()
|
|
22199
|
+
.describe('Stable key for referencing the element (e.g. in selectors). Unique per (parent, integration) scope. Generated from name if not provided on create.'),
|
|
22200
|
+
name: string$1().optional().describe('Display name. Optional on create; used to generate key when key is omitted.'),
|
|
22201
|
+
description: string$1().optional().describe('Optional human-readable description.'),
|
|
22202
|
+
meta: record(string$1(), any()).optional().describe('Optional key-value metadata.'),
|
|
22201
22203
|
});
|
|
22202
22204
|
const BaseMembraneInterfaceReadOnlyProperties = object({
|
|
22203
|
-
name: string$1(),
|
|
22204
|
-
state: _enum(WorkspaceElementState)
|
|
22205
|
-
|
|
22206
|
-
|
|
22207
|
-
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
|
|
22205
|
+
name: string$1().describe('Display name. Always present in API responses (filled by API if not set on create).'),
|
|
22206
|
+
state: _enum(WorkspaceElementState)
|
|
22207
|
+
.optional()
|
|
22208
|
+
.describe('Current lifecycle or health state (e.g. READY, SETUP_FAILED, CONFIGURATION_ERROR). Set by the engine during setup and validation.'),
|
|
22209
|
+
errors: array(ErrorDataSchema).optional().describe('Validation or setup errors when state is not READY.'),
|
|
22210
|
+
revision: string$1()
|
|
22211
|
+
.optional()
|
|
22212
|
+
.describe('Opaque revision token; changes on each update. Used for optimistic concurrency.'),
|
|
22213
|
+
createdAt: string$1().optional().describe('ISO date when the element was created.'),
|
|
22214
|
+
updatedAt: string$1().optional().describe('ISO date when the element was last updated.'),
|
|
22215
|
+
archivedAt: string$1()
|
|
22216
|
+
.optional()
|
|
22217
|
+
.describe('When set, the element is archived (soft-deleted). Archived elements cannot be patched.'),
|
|
22218
|
+
isDeactivated: boolean$1()
|
|
22219
|
+
.optional()
|
|
22220
|
+
.describe('When true, setup is skipped and the element is treated as inactive (e.g. when dependencies are deactivated or the element is archived).'),
|
|
22221
|
+
isReadOnly: boolean$1()
|
|
22222
|
+
.optional()
|
|
22223
|
+
.describe('When true, the element cannot be modified (e.g. published package elements or elements from another workspace).'),
|
|
22212
22224
|
});
|
|
22213
22225
|
const BaseMembraneInterface = BaseWorkspaceElement.merge(BaseMembraneInterfaceEditableProperties).merge(BaseMembraneInterfaceReadOnlyProperties);
|
|
22214
22226
|
const BaseIntegrationLevelMembraneInterfaceEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
|
|
22215
|
-
integrationId: string$1()
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22227
|
+
integrationId: string$1()
|
|
22228
|
+
.optional()
|
|
22229
|
+
.describe('Internal ID of the integration this element belongs to. Omit for universal elements; set for integration-specific elements. Uniqueness of key is scoped per integration.'),
|
|
22230
|
+
integrationUuid: string$1()
|
|
22231
|
+
.optional()
|
|
22232
|
+
.describe('UUID of the integration; alternative to integrationId when creating from export. Resolved to integrationId by the API.'),
|
|
22233
|
+
parentId: string$1()
|
|
22234
|
+
.optional()
|
|
22235
|
+
.describe('Internal ID of the parent workspace element. Used for hierarchy (e.g. integration-level under universal). Child key uniqueness is scoped by parent and integration.'),
|
|
22236
|
+
parentUuid: string$1()
|
|
22237
|
+
.optional()
|
|
22238
|
+
.describe('UUID of the parent element; alternative to parentId when creating (e.g. from export). Resolved to parentId by the API.'),
|
|
22239
|
+
connectionId: string$1()
|
|
22240
|
+
.optional()
|
|
22241
|
+
.describe('Connection ID. Used when filtering by connection in list/selector queries, or when creating or identifying connection-level instances.'),
|
|
22242
|
+
instanceKey: string$1()
|
|
22243
|
+
.optional()
|
|
22244
|
+
.describe('Key identifying a specific connection-level instance when multiple instances exist per (element, connection). Used in selector queries and when creating instances.'),
|
|
22245
|
+
isUniversal: boolean$1()
|
|
22246
|
+
.optional()
|
|
22247
|
+
.describe('When true, the element is universal (shared across all integrations). Requires universal-element access. Omit or false for integration-specific elements.'),
|
|
22222
22248
|
});
|
|
22223
22249
|
const BaseIntegrationLevelMembraneInterfaceReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
|
|
22224
22250
|
isCustomized: boolean$1().optional(),
|
|
@@ -23420,6 +23446,9 @@
|
|
|
23420
23446
|
async resubscribe() {
|
|
23421
23447
|
await this.client.post(this.getPath('resubscribe'));
|
|
23422
23448
|
}
|
|
23449
|
+
async refreshWebhook() {
|
|
23450
|
+
await this.client.post(this.getPath('refresh-webhook'));
|
|
23451
|
+
}
|
|
23423
23452
|
async pullEvents() {
|
|
23424
23453
|
await this.client.post(this.getPath('pull-events'));
|
|
23425
23454
|
}
|
|
@@ -24607,7 +24636,9 @@
|
|
|
24607
24636
|
redirectUri: string$1().optional(),
|
|
24608
24637
|
customState: string$1().optional(),
|
|
24609
24638
|
});
|
|
24610
|
-
ConnectPayload.omit({ input: true, redirectUri: true })
|
|
24639
|
+
ConnectPayload.omit({ input: true, redirectUri: true }).extend({
|
|
24640
|
+
theme: _enum(['light', 'dark', 'auto']).optional(),
|
|
24641
|
+
});
|
|
24611
24642
|
|
|
24612
24643
|
class UI {
|
|
24613
24644
|
constructor(client) {
|
|
@@ -24628,7 +24659,7 @@
|
|
|
24628
24659
|
}
|
|
24629
24660
|
}
|
|
24630
24661
|
|
|
24631
|
-
/*! Axios v1.13.
|
|
24662
|
+
/*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
24632
24663
|
/**
|
|
24633
24664
|
* Create a bound version of a function with a specified `this` context
|
|
24634
24665
|
*
|
|
@@ -24644,30 +24675,30 @@
|
|
|
24644
24675
|
|
|
24645
24676
|
// utils is a library of generic helper functions non-specific to axios
|
|
24646
24677
|
|
|
24647
|
-
const {toString} = Object.prototype;
|
|
24648
|
-
const {getPrototypeOf} = Object;
|
|
24649
|
-
const {iterator, toStringTag} = Symbol;
|
|
24678
|
+
const { toString } = Object.prototype;
|
|
24679
|
+
const { getPrototypeOf } = Object;
|
|
24680
|
+
const { iterator, toStringTag } = Symbol;
|
|
24650
24681
|
|
|
24651
|
-
const kindOf = (cache => thing => {
|
|
24652
|
-
|
|
24653
|
-
|
|
24682
|
+
const kindOf = ((cache) => (thing) => {
|
|
24683
|
+
const str = toString.call(thing);
|
|
24684
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
24654
24685
|
})(Object.create(null));
|
|
24655
24686
|
|
|
24656
24687
|
const kindOfTest = (type) => {
|
|
24657
24688
|
type = type.toLowerCase();
|
|
24658
|
-
return (thing) => kindOf(thing) === type
|
|
24689
|
+
return (thing) => kindOf(thing) === type;
|
|
24659
24690
|
};
|
|
24660
24691
|
|
|
24661
|
-
const typeOfTest = type => thing => typeof thing === type;
|
|
24692
|
+
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
24662
24693
|
|
|
24663
24694
|
/**
|
|
24664
|
-
* Determine if a value is
|
|
24695
|
+
* Determine if a value is a non-null object
|
|
24665
24696
|
*
|
|
24666
24697
|
* @param {Object} val The value to test
|
|
24667
24698
|
*
|
|
24668
24699
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
24669
24700
|
*/
|
|
24670
|
-
const {isArray} = Array;
|
|
24701
|
+
const { isArray } = Array;
|
|
24671
24702
|
|
|
24672
24703
|
/**
|
|
24673
24704
|
* Determine if a value is undefined
|
|
@@ -24676,7 +24707,7 @@
|
|
|
24676
24707
|
*
|
|
24677
24708
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
24678
24709
|
*/
|
|
24679
|
-
const isUndefined = typeOfTest(
|
|
24710
|
+
const isUndefined = typeOfTest("undefined");
|
|
24680
24711
|
|
|
24681
24712
|
/**
|
|
24682
24713
|
* Determine if a value is a Buffer
|
|
@@ -24686,8 +24717,14 @@
|
|
|
24686
24717
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
24687
24718
|
*/
|
|
24688
24719
|
function isBuffer(val) {
|
|
24689
|
-
return
|
|
24690
|
-
|
|
24720
|
+
return (
|
|
24721
|
+
val !== null &&
|
|
24722
|
+
!isUndefined(val) &&
|
|
24723
|
+
val.constructor !== null &&
|
|
24724
|
+
!isUndefined(val.constructor) &&
|
|
24725
|
+
isFunction$1(val.constructor.isBuffer) &&
|
|
24726
|
+
val.constructor.isBuffer(val)
|
|
24727
|
+
);
|
|
24691
24728
|
}
|
|
24692
24729
|
|
|
24693
24730
|
/**
|
|
@@ -24697,8 +24734,7 @@
|
|
|
24697
24734
|
*
|
|
24698
24735
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
24699
24736
|
*/
|
|
24700
|
-
const isArrayBuffer = kindOfTest(
|
|
24701
|
-
|
|
24737
|
+
const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
24702
24738
|
|
|
24703
24739
|
/**
|
|
24704
24740
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -24709,10 +24745,10 @@
|
|
|
24709
24745
|
*/
|
|
24710
24746
|
function isArrayBufferView(val) {
|
|
24711
24747
|
let result;
|
|
24712
|
-
if (
|
|
24748
|
+
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
24713
24749
|
result = ArrayBuffer.isView(val);
|
|
24714
24750
|
} else {
|
|
24715
|
-
result =
|
|
24751
|
+
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
24716
24752
|
}
|
|
24717
24753
|
return result;
|
|
24718
24754
|
}
|
|
@@ -24724,7 +24760,7 @@
|
|
|
24724
24760
|
*
|
|
24725
24761
|
* @returns {boolean} True if value is a String, otherwise false
|
|
24726
24762
|
*/
|
|
24727
|
-
const isString = typeOfTest(
|
|
24763
|
+
const isString = typeOfTest("string");
|
|
24728
24764
|
|
|
24729
24765
|
/**
|
|
24730
24766
|
* Determine if a value is a Function
|
|
@@ -24732,7 +24768,7 @@
|
|
|
24732
24768
|
* @param {*} val The value to test
|
|
24733
24769
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
24734
24770
|
*/
|
|
24735
|
-
const isFunction$1 = typeOfTest(
|
|
24771
|
+
const isFunction$1 = typeOfTest("function");
|
|
24736
24772
|
|
|
24737
24773
|
/**
|
|
24738
24774
|
* Determine if a value is a Number
|
|
@@ -24741,7 +24777,7 @@
|
|
|
24741
24777
|
*
|
|
24742
24778
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
24743
24779
|
*/
|
|
24744
|
-
const isNumber = typeOfTest(
|
|
24780
|
+
const isNumber = typeOfTest("number");
|
|
24745
24781
|
|
|
24746
24782
|
/**
|
|
24747
24783
|
* Determine if a value is an Object
|
|
@@ -24750,7 +24786,7 @@
|
|
|
24750
24786
|
*
|
|
24751
24787
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
24752
24788
|
*/
|
|
24753
|
-
const isObject = (thing) => thing !== null && typeof thing ===
|
|
24789
|
+
const isObject = (thing) => thing !== null && typeof thing === "object";
|
|
24754
24790
|
|
|
24755
24791
|
/**
|
|
24756
24792
|
* Determine if a value is a Boolean
|
|
@@ -24758,7 +24794,7 @@
|
|
|
24758
24794
|
* @param {*} thing The value to test
|
|
24759
24795
|
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
24760
24796
|
*/
|
|
24761
|
-
const isBoolean = thing => thing === true || thing === false;
|
|
24797
|
+
const isBoolean = (thing) => thing === true || thing === false;
|
|
24762
24798
|
|
|
24763
24799
|
/**
|
|
24764
24800
|
* Determine if a value is a plain Object
|
|
@@ -24768,12 +24804,18 @@
|
|
|
24768
24804
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
24769
24805
|
*/
|
|
24770
24806
|
const isPlainObject = (val) => {
|
|
24771
|
-
if (kindOf(val) !==
|
|
24807
|
+
if (kindOf(val) !== "object") {
|
|
24772
24808
|
return false;
|
|
24773
24809
|
}
|
|
24774
24810
|
|
|
24775
24811
|
const prototype = getPrototypeOf(val);
|
|
24776
|
-
return (
|
|
24812
|
+
return (
|
|
24813
|
+
(prototype === null ||
|
|
24814
|
+
prototype === Object.prototype ||
|
|
24815
|
+
Object.getPrototypeOf(prototype) === null) &&
|
|
24816
|
+
!(toStringTag in val) &&
|
|
24817
|
+
!(iterator in val)
|
|
24818
|
+
);
|
|
24777
24819
|
};
|
|
24778
24820
|
|
|
24779
24821
|
/**
|
|
@@ -24790,7 +24832,10 @@
|
|
|
24790
24832
|
}
|
|
24791
24833
|
|
|
24792
24834
|
try {
|
|
24793
|
-
return
|
|
24835
|
+
return (
|
|
24836
|
+
Object.keys(val).length === 0 &&
|
|
24837
|
+
Object.getPrototypeOf(val) === Object.prototype
|
|
24838
|
+
);
|
|
24794
24839
|
} catch (e) {
|
|
24795
24840
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
24796
24841
|
return false;
|
|
@@ -24804,7 +24849,7 @@
|
|
|
24804
24849
|
*
|
|
24805
24850
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
24806
24851
|
*/
|
|
24807
|
-
const isDate = kindOfTest(
|
|
24852
|
+
const isDate = kindOfTest("Date");
|
|
24808
24853
|
|
|
24809
24854
|
/**
|
|
24810
24855
|
* Determine if a value is a File
|
|
@@ -24813,7 +24858,7 @@
|
|
|
24813
24858
|
*
|
|
24814
24859
|
* @returns {boolean} True if value is a File, otherwise false
|
|
24815
24860
|
*/
|
|
24816
|
-
const isFile = kindOfTest(
|
|
24861
|
+
const isFile = kindOfTest("File");
|
|
24817
24862
|
|
|
24818
24863
|
/**
|
|
24819
24864
|
* Determine if a value is a Blob
|
|
@@ -24822,7 +24867,7 @@
|
|
|
24822
24867
|
*
|
|
24823
24868
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
24824
24869
|
*/
|
|
24825
|
-
const isBlob$1 = kindOfTest(
|
|
24870
|
+
const isBlob$1 = kindOfTest("Blob");
|
|
24826
24871
|
|
|
24827
24872
|
/**
|
|
24828
24873
|
* Determine if a value is a FileList
|
|
@@ -24831,7 +24876,7 @@
|
|
|
24831
24876
|
*
|
|
24832
24877
|
* @returns {boolean} True if value is a File, otherwise false
|
|
24833
24878
|
*/
|
|
24834
|
-
const isFileList = kindOfTest(
|
|
24879
|
+
const isFileList = kindOfTest("FileList");
|
|
24835
24880
|
|
|
24836
24881
|
/**
|
|
24837
24882
|
* Determine if a value is a Stream
|
|
@@ -24851,15 +24896,16 @@
|
|
|
24851
24896
|
*/
|
|
24852
24897
|
const isFormData = (thing) => {
|
|
24853
24898
|
let kind;
|
|
24854
|
-
return
|
|
24855
|
-
|
|
24856
|
-
|
|
24857
|
-
|
|
24858
|
-
|
|
24859
|
-
|
|
24860
|
-
|
|
24861
|
-
|
|
24862
|
-
|
|
24899
|
+
return (
|
|
24900
|
+
thing &&
|
|
24901
|
+
((typeof FormData === "function" && thing instanceof FormData) ||
|
|
24902
|
+
(isFunction$1(thing.append) &&
|
|
24903
|
+
((kind = kindOf(thing)) === "formdata" ||
|
|
24904
|
+
// detect form-data instance
|
|
24905
|
+
(kind === "object" &&
|
|
24906
|
+
isFunction$1(thing.toString) &&
|
|
24907
|
+
thing.toString() === "[object FormData]"))))
|
|
24908
|
+
);
|
|
24863
24909
|
};
|
|
24864
24910
|
|
|
24865
24911
|
/**
|
|
@@ -24869,9 +24915,14 @@
|
|
|
24869
24915
|
*
|
|
24870
24916
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
24871
24917
|
*/
|
|
24872
|
-
const isURLSearchParams = kindOfTest(
|
|
24918
|
+
const isURLSearchParams = kindOfTest("URLSearchParams");
|
|
24873
24919
|
|
|
24874
|
-
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
24920
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
24921
|
+
"ReadableStream",
|
|
24922
|
+
"Request",
|
|
24923
|
+
"Response",
|
|
24924
|
+
"Headers",
|
|
24925
|
+
].map(kindOfTest);
|
|
24875
24926
|
|
|
24876
24927
|
/**
|
|
24877
24928
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -24880,8 +24931,8 @@
|
|
|
24880
24931
|
*
|
|
24881
24932
|
* @returns {String} The String freed of excess whitespace
|
|
24882
24933
|
*/
|
|
24883
|
-
const trim = (str) =>
|
|
24884
|
-
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
24934
|
+
const trim = (str) =>
|
|
24935
|
+
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
24885
24936
|
|
|
24886
24937
|
/**
|
|
24887
24938
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
@@ -24892,15 +24943,16 @@
|
|
|
24892
24943
|
* If 'obj' is an Object callback will be called passing
|
|
24893
24944
|
* the value, key, and complete object for each property.
|
|
24894
24945
|
*
|
|
24895
|
-
* @param {Object|Array} obj The object to iterate
|
|
24946
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
24896
24947
|
* @param {Function} fn The callback to invoke for each item
|
|
24897
24948
|
*
|
|
24898
|
-
* @param {
|
|
24949
|
+
* @param {Object} [options]
|
|
24950
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
24899
24951
|
* @returns {any}
|
|
24900
24952
|
*/
|
|
24901
|
-
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
24953
|
+
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
24902
24954
|
// Don't bother if no value provided
|
|
24903
|
-
if (obj === null || typeof obj ===
|
|
24955
|
+
if (obj === null || typeof obj === "undefined") {
|
|
24904
24956
|
return;
|
|
24905
24957
|
}
|
|
24906
24958
|
|
|
@@ -24908,7 +24960,7 @@
|
|
|
24908
24960
|
let l;
|
|
24909
24961
|
|
|
24910
24962
|
// Force an array if not already something iterable
|
|
24911
|
-
if (typeof obj !==
|
|
24963
|
+
if (typeof obj !== "object") {
|
|
24912
24964
|
/*eslint no-param-reassign:0*/
|
|
24913
24965
|
obj = [obj];
|
|
24914
24966
|
}
|
|
@@ -24925,7 +24977,9 @@
|
|
|
24925
24977
|
}
|
|
24926
24978
|
|
|
24927
24979
|
// Iterate over object keys
|
|
24928
|
-
const keys = allOwnKeys
|
|
24980
|
+
const keys = allOwnKeys
|
|
24981
|
+
? Object.getOwnPropertyNames(obj)
|
|
24982
|
+
: Object.keys(obj);
|
|
24929
24983
|
const len = keys.length;
|
|
24930
24984
|
let key;
|
|
24931
24985
|
|
|
@@ -24937,7 +24991,7 @@
|
|
|
24937
24991
|
}
|
|
24938
24992
|
|
|
24939
24993
|
function findKey(obj, key) {
|
|
24940
|
-
if (isBuffer(obj)){
|
|
24994
|
+
if (isBuffer(obj)) {
|
|
24941
24995
|
return null;
|
|
24942
24996
|
}
|
|
24943
24997
|
|
|
@@ -24957,10 +25011,15 @@
|
|
|
24957
25011
|
const _global = (() => {
|
|
24958
25012
|
/*eslint no-undef:0*/
|
|
24959
25013
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
24960
|
-
return typeof self !== "undefined"
|
|
25014
|
+
return typeof self !== "undefined"
|
|
25015
|
+
? self
|
|
25016
|
+
: typeof window !== "undefined"
|
|
25017
|
+
? window
|
|
25018
|
+
: global;
|
|
24961
25019
|
})();
|
|
24962
25020
|
|
|
24963
|
-
const isContextDefined = (context) =>
|
|
25021
|
+
const isContextDefined = (context) =>
|
|
25022
|
+
!isUndefined(context) && context !== _global;
|
|
24964
25023
|
|
|
24965
25024
|
/**
|
|
24966
25025
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -24972,7 +25031,7 @@
|
|
|
24972
25031
|
* Example:
|
|
24973
25032
|
*
|
|
24974
25033
|
* ```js
|
|
24975
|
-
*
|
|
25034
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
24976
25035
|
* console.log(result.foo); // outputs 456
|
|
24977
25036
|
* ```
|
|
24978
25037
|
*
|
|
@@ -24981,10 +25040,15 @@
|
|
|
24981
25040
|
* @returns {Object} Result of all merge properties
|
|
24982
25041
|
*/
|
|
24983
25042
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
24984
|
-
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
25043
|
+
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
24985
25044
|
const result = {};
|
|
24986
25045
|
const assignValue = (val, key) => {
|
|
24987
|
-
|
|
25046
|
+
// Skip dangerous property names to prevent prototype pollution
|
|
25047
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
25048
|
+
return;
|
|
25049
|
+
}
|
|
25050
|
+
|
|
25051
|
+
const targetKey = (caseless && findKey(result, key)) || key;
|
|
24988
25052
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
24989
25053
|
result[targetKey] = merge(result[targetKey], val);
|
|
24990
25054
|
} else if (isPlainObject(val)) {
|
|
@@ -25009,17 +25073,32 @@
|
|
|
25009
25073
|
* @param {Object} b The object to copy properties from
|
|
25010
25074
|
* @param {Object} thisArg The object to bind function to
|
|
25011
25075
|
*
|
|
25012
|
-
* @param {
|
|
25076
|
+
* @param {Object} [options]
|
|
25077
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
25013
25078
|
* @returns {Object} The resulting value of object a
|
|
25014
25079
|
*/
|
|
25015
|
-
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
25016
|
-
forEach(
|
|
25017
|
-
|
|
25018
|
-
|
|
25019
|
-
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25080
|
+
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
25081
|
+
forEach(
|
|
25082
|
+
b,
|
|
25083
|
+
(val, key) => {
|
|
25084
|
+
if (thisArg && isFunction$1(val)) {
|
|
25085
|
+
Object.defineProperty(a, key, {
|
|
25086
|
+
value: bind(val, thisArg),
|
|
25087
|
+
writable: true,
|
|
25088
|
+
enumerable: true,
|
|
25089
|
+
configurable: true,
|
|
25090
|
+
});
|
|
25091
|
+
} else {
|
|
25092
|
+
Object.defineProperty(a, key, {
|
|
25093
|
+
value: val,
|
|
25094
|
+
writable: true,
|
|
25095
|
+
enumerable: true,
|
|
25096
|
+
configurable: true,
|
|
25097
|
+
});
|
|
25098
|
+
}
|
|
25099
|
+
},
|
|
25100
|
+
{ allOwnKeys },
|
|
25101
|
+
);
|
|
25023
25102
|
return a;
|
|
25024
25103
|
};
|
|
25025
25104
|
|
|
@@ -25031,7 +25110,7 @@
|
|
|
25031
25110
|
* @returns {string} content value without BOM
|
|
25032
25111
|
*/
|
|
25033
25112
|
const stripBOM = (content) => {
|
|
25034
|
-
if (content.charCodeAt(0) ===
|
|
25113
|
+
if (content.charCodeAt(0) === 0xfeff) {
|
|
25035
25114
|
content = content.slice(1);
|
|
25036
25115
|
}
|
|
25037
25116
|
return content;
|
|
@@ -25047,10 +25126,18 @@
|
|
|
25047
25126
|
* @returns {void}
|
|
25048
25127
|
*/
|
|
25049
25128
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
25050
|
-
constructor.prototype = Object.create(
|
|
25051
|
-
|
|
25052
|
-
|
|
25053
|
-
|
|
25129
|
+
constructor.prototype = Object.create(
|
|
25130
|
+
superConstructor.prototype,
|
|
25131
|
+
descriptors,
|
|
25132
|
+
);
|
|
25133
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
25134
|
+
value: constructor,
|
|
25135
|
+
writable: true,
|
|
25136
|
+
enumerable: false,
|
|
25137
|
+
configurable: true,
|
|
25138
|
+
});
|
|
25139
|
+
Object.defineProperty(constructor, "super", {
|
|
25140
|
+
value: superConstructor.prototype,
|
|
25054
25141
|
});
|
|
25055
25142
|
props && Object.assign(constructor.prototype, props);
|
|
25056
25143
|
};
|
|
@@ -25079,13 +25166,20 @@
|
|
|
25079
25166
|
i = props.length;
|
|
25080
25167
|
while (i-- > 0) {
|
|
25081
25168
|
prop = props[i];
|
|
25082
|
-
if (
|
|
25169
|
+
if (
|
|
25170
|
+
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
|
|
25171
|
+
!merged[prop]
|
|
25172
|
+
) {
|
|
25083
25173
|
destObj[prop] = sourceObj[prop];
|
|
25084
25174
|
merged[prop] = true;
|
|
25085
25175
|
}
|
|
25086
25176
|
}
|
|
25087
25177
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
25088
|
-
} while (
|
|
25178
|
+
} while (
|
|
25179
|
+
sourceObj &&
|
|
25180
|
+
(!filter || filter(sourceObj, destObj)) &&
|
|
25181
|
+
sourceObj !== Object.prototype
|
|
25182
|
+
);
|
|
25089
25183
|
|
|
25090
25184
|
return destObj;
|
|
25091
25185
|
};
|
|
@@ -25109,7 +25203,6 @@
|
|
|
25109
25203
|
return lastIndex !== -1 && lastIndex === position;
|
|
25110
25204
|
};
|
|
25111
25205
|
|
|
25112
|
-
|
|
25113
25206
|
/**
|
|
25114
25207
|
* Returns new array from array like object or null if failed
|
|
25115
25208
|
*
|
|
@@ -25138,12 +25231,12 @@
|
|
|
25138
25231
|
* @returns {Array}
|
|
25139
25232
|
*/
|
|
25140
25233
|
// eslint-disable-next-line func-names
|
|
25141
|
-
const isTypedArray = (TypedArray => {
|
|
25234
|
+
const isTypedArray = ((TypedArray) => {
|
|
25142
25235
|
// eslint-disable-next-line func-names
|
|
25143
|
-
return thing => {
|
|
25236
|
+
return (thing) => {
|
|
25144
25237
|
return TypedArray && thing instanceof TypedArray;
|
|
25145
25238
|
};
|
|
25146
|
-
})(typeof Uint8Array !==
|
|
25239
|
+
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
25147
25240
|
|
|
25148
25241
|
/**
|
|
25149
25242
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -25186,18 +25279,22 @@
|
|
|
25186
25279
|
};
|
|
25187
25280
|
|
|
25188
25281
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
25189
|
-
const isHTMLForm = kindOfTest(
|
|
25282
|
+
const isHTMLForm = kindOfTest("HTMLFormElement");
|
|
25190
25283
|
|
|
25191
|
-
const toCamelCase = str => {
|
|
25192
|
-
return str
|
|
25193
|
-
|
|
25284
|
+
const toCamelCase = (str) => {
|
|
25285
|
+
return str
|
|
25286
|
+
.toLowerCase()
|
|
25287
|
+
.replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
25194
25288
|
return p1.toUpperCase() + p2;
|
|
25195
|
-
}
|
|
25196
|
-
);
|
|
25289
|
+
});
|
|
25197
25290
|
};
|
|
25198
25291
|
|
|
25199
25292
|
/* Creating a function that will check if an object has a property. */
|
|
25200
|
-
const hasOwnProperty = (
|
|
25293
|
+
const hasOwnProperty = (
|
|
25294
|
+
({ hasOwnProperty }) =>
|
|
25295
|
+
(obj, prop) =>
|
|
25296
|
+
hasOwnProperty.call(obj, prop)
|
|
25297
|
+
)(Object.prototype);
|
|
25201
25298
|
|
|
25202
25299
|
/**
|
|
25203
25300
|
* Determine if a value is a RegExp object
|
|
@@ -25206,7 +25303,7 @@
|
|
|
25206
25303
|
*
|
|
25207
25304
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
25208
25305
|
*/
|
|
25209
|
-
const isRegExp = kindOfTest(
|
|
25306
|
+
const isRegExp = kindOfTest("RegExp");
|
|
25210
25307
|
|
|
25211
25308
|
const reduceDescriptors = (obj, reducer) => {
|
|
25212
25309
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -25230,7 +25327,10 @@
|
|
|
25230
25327
|
const freezeMethods = (obj) => {
|
|
25231
25328
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
25232
25329
|
// skip restricted props in strict mode
|
|
25233
|
-
if (
|
|
25330
|
+
if (
|
|
25331
|
+
isFunction$1(obj) &&
|
|
25332
|
+
["arguments", "caller", "callee"].indexOf(name) !== -1
|
|
25333
|
+
) {
|
|
25234
25334
|
return false;
|
|
25235
25335
|
}
|
|
25236
25336
|
|
|
@@ -25240,14 +25340,14 @@
|
|
|
25240
25340
|
|
|
25241
25341
|
descriptor.enumerable = false;
|
|
25242
25342
|
|
|
25243
|
-
if (
|
|
25343
|
+
if ("writable" in descriptor) {
|
|
25244
25344
|
descriptor.writable = false;
|
|
25245
25345
|
return;
|
|
25246
25346
|
}
|
|
25247
25347
|
|
|
25248
25348
|
if (!descriptor.set) {
|
|
25249
25349
|
descriptor.set = () => {
|
|
25250
|
-
throw Error(
|
|
25350
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
25251
25351
|
};
|
|
25252
25352
|
}
|
|
25253
25353
|
});
|
|
@@ -25257,12 +25357,14 @@
|
|
|
25257
25357
|
const obj = {};
|
|
25258
25358
|
|
|
25259
25359
|
const define = (arr) => {
|
|
25260
|
-
arr.forEach(value => {
|
|
25360
|
+
arr.forEach((value) => {
|
|
25261
25361
|
obj[value] = true;
|
|
25262
25362
|
});
|
|
25263
25363
|
};
|
|
25264
25364
|
|
|
25265
|
-
isArray(arrayOrString)
|
|
25365
|
+
isArray(arrayOrString)
|
|
25366
|
+
? define(arrayOrString)
|
|
25367
|
+
: define(String(arrayOrString).split(delimiter));
|
|
25266
25368
|
|
|
25267
25369
|
return obj;
|
|
25268
25370
|
};
|
|
@@ -25270,11 +25372,11 @@
|
|
|
25270
25372
|
const noop = () => {};
|
|
25271
25373
|
|
|
25272
25374
|
const toFiniteNumber = (value, defaultValue) => {
|
|
25273
|
-
return value != null && Number.isFinite(value = +value)
|
|
25375
|
+
return value != null && Number.isFinite((value = +value))
|
|
25376
|
+
? value
|
|
25377
|
+
: defaultValue;
|
|
25274
25378
|
};
|
|
25275
25379
|
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
25380
|
/**
|
|
25279
25381
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
25280
25382
|
*
|
|
@@ -25283,14 +25385,18 @@
|
|
|
25283
25385
|
* @returns {boolean}
|
|
25284
25386
|
*/
|
|
25285
25387
|
function isSpecCompliantForm(thing) {
|
|
25286
|
-
return !!(
|
|
25388
|
+
return !!(
|
|
25389
|
+
thing &&
|
|
25390
|
+
isFunction$1(thing.append) &&
|
|
25391
|
+
thing[toStringTag] === "FormData" &&
|
|
25392
|
+
thing[iterator]
|
|
25393
|
+
);
|
|
25287
25394
|
}
|
|
25288
25395
|
|
|
25289
25396
|
const toJSONObject = (obj) => {
|
|
25290
25397
|
const stack = new Array(10);
|
|
25291
25398
|
|
|
25292
25399
|
const visit = (source, i) => {
|
|
25293
|
-
|
|
25294
25400
|
if (isObject(source)) {
|
|
25295
25401
|
if (stack.indexOf(source) >= 0) {
|
|
25296
25402
|
return;
|
|
@@ -25301,7 +25407,7 @@
|
|
|
25301
25407
|
return source;
|
|
25302
25408
|
}
|
|
25303
25409
|
|
|
25304
|
-
if(!(
|
|
25410
|
+
if (!("toJSON" in source)) {
|
|
25305
25411
|
stack[i] = source;
|
|
25306
25412
|
const target = isArray(source) ? [] : {};
|
|
25307
25413
|
|
|
@@ -25322,10 +25428,13 @@
|
|
|
25322
25428
|
return visit(obj, 0);
|
|
25323
25429
|
};
|
|
25324
25430
|
|
|
25325
|
-
const isAsyncFn = kindOfTest(
|
|
25431
|
+
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
25326
25432
|
|
|
25327
25433
|
const isThenable = (thing) =>
|
|
25328
|
-
thing &&
|
|
25434
|
+
thing &&
|
|
25435
|
+
(isObject(thing) || isFunction$1(thing)) &&
|
|
25436
|
+
isFunction$1(thing.then) &&
|
|
25437
|
+
isFunction$1(thing.catch);
|
|
25329
25438
|
|
|
25330
25439
|
// original code
|
|
25331
25440
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
@@ -25335,32 +25444,35 @@
|
|
|
25335
25444
|
return setImmediate;
|
|
25336
25445
|
}
|
|
25337
25446
|
|
|
25338
|
-
return postMessageSupported
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
|
|
25447
|
+
return postMessageSupported
|
|
25448
|
+
? ((token, callbacks) => {
|
|
25449
|
+
_global.addEventListener(
|
|
25450
|
+
"message",
|
|
25451
|
+
({ source, data }) => {
|
|
25452
|
+
if (source === _global && data === token) {
|
|
25453
|
+
callbacks.length && callbacks.shift()();
|
|
25454
|
+
}
|
|
25455
|
+
},
|
|
25456
|
+
false,
|
|
25457
|
+
);
|
|
25344
25458
|
|
|
25345
|
-
|
|
25346
|
-
|
|
25347
|
-
|
|
25348
|
-
|
|
25349
|
-
|
|
25350
|
-
|
|
25351
|
-
|
|
25352
|
-
isFunction$1(_global.postMessage)
|
|
25353
|
-
);
|
|
25459
|
+
return (cb) => {
|
|
25460
|
+
callbacks.push(cb);
|
|
25461
|
+
_global.postMessage(token, "*");
|
|
25462
|
+
};
|
|
25463
|
+
})(`axios@${Math.random()}`, [])
|
|
25464
|
+
: (cb) => setTimeout(cb);
|
|
25465
|
+
})(typeof setImmediate === "function", isFunction$1(_global.postMessage));
|
|
25354
25466
|
|
|
25355
|
-
const asap =
|
|
25356
|
-
|
|
25467
|
+
const asap =
|
|
25468
|
+
typeof queueMicrotask !== "undefined"
|
|
25469
|
+
? queueMicrotask.bind(_global)
|
|
25470
|
+
: (typeof process !== "undefined" && process.nextTick) || _setImmediate;
|
|
25357
25471
|
|
|
25358
25472
|
// *********************
|
|
25359
25473
|
|
|
25360
|
-
|
|
25361
25474
|
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
25362
25475
|
|
|
25363
|
-
|
|
25364
25476
|
const utils$1 = {
|
|
25365
25477
|
isArray,
|
|
25366
25478
|
isArrayBuffer,
|
|
@@ -25418,113 +25530,78 @@
|
|
|
25418
25530
|
isThenable,
|
|
25419
25531
|
setImmediate: _setImmediate,
|
|
25420
25532
|
asap,
|
|
25421
|
-
isIterable
|
|
25533
|
+
isIterable,
|
|
25422
25534
|
};
|
|
25423
25535
|
|
|
25424
|
-
|
|
25425
|
-
|
|
25426
|
-
|
|
25427
|
-
|
|
25428
|
-
|
|
25429
|
-
|
|
25430
|
-
|
|
25431
|
-
|
|
25432
|
-
*
|
|
25433
|
-
* @returns {Error} The created error.
|
|
25434
|
-
*/
|
|
25435
|
-
function AxiosError$1(message, code, config, request, response) {
|
|
25436
|
-
Error.call(this);
|
|
25536
|
+
class AxiosError$1 extends Error {
|
|
25537
|
+
static from(error, code, config, request, response, customProps) {
|
|
25538
|
+
const axiosError = new AxiosError$1(error.message, code || error.code, config, request, response);
|
|
25539
|
+
axiosError.cause = error;
|
|
25540
|
+
axiosError.name = error.name;
|
|
25541
|
+
customProps && Object.assign(axiosError, customProps);
|
|
25542
|
+
return axiosError;
|
|
25543
|
+
}
|
|
25437
25544
|
|
|
25438
|
-
|
|
25439
|
-
|
|
25440
|
-
|
|
25441
|
-
|
|
25442
|
-
|
|
25545
|
+
/**
|
|
25546
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
25547
|
+
*
|
|
25548
|
+
* @param {string} message The error message.
|
|
25549
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
25550
|
+
* @param {Object} [config] The config.
|
|
25551
|
+
* @param {Object} [request] The request.
|
|
25552
|
+
* @param {Object} [response] The response.
|
|
25553
|
+
*
|
|
25554
|
+
* @returns {Error} The created error.
|
|
25555
|
+
*/
|
|
25556
|
+
constructor(message, code, config, request, response) {
|
|
25557
|
+
super(message);
|
|
25558
|
+
this.name = 'AxiosError';
|
|
25559
|
+
this.isAxiosError = true;
|
|
25560
|
+
code && (this.code = code);
|
|
25561
|
+
config && (this.config = config);
|
|
25562
|
+
request && (this.request = request);
|
|
25563
|
+
if (response) {
|
|
25564
|
+
this.response = response;
|
|
25565
|
+
this.status = response.status;
|
|
25566
|
+
}
|
|
25567
|
+
}
|
|
25443
25568
|
|
|
25444
|
-
|
|
25445
|
-
|
|
25446
|
-
|
|
25447
|
-
|
|
25448
|
-
|
|
25449
|
-
|
|
25450
|
-
|
|
25451
|
-
|
|
25452
|
-
|
|
25569
|
+
toJSON() {
|
|
25570
|
+
return {
|
|
25571
|
+
// Standard
|
|
25572
|
+
message: this.message,
|
|
25573
|
+
name: this.name,
|
|
25574
|
+
// Microsoft
|
|
25575
|
+
description: this.description,
|
|
25576
|
+
number: this.number,
|
|
25577
|
+
// Mozilla
|
|
25578
|
+
fileName: this.fileName,
|
|
25579
|
+
lineNumber: this.lineNumber,
|
|
25580
|
+
columnNumber: this.columnNumber,
|
|
25581
|
+
stack: this.stack,
|
|
25582
|
+
// Axios
|
|
25583
|
+
config: utils$1.toJSONObject(this.config),
|
|
25584
|
+
code: this.code,
|
|
25585
|
+
status: this.status,
|
|
25586
|
+
};
|
|
25587
|
+
}
|
|
25453
25588
|
}
|
|
25454
25589
|
|
|
25455
|
-
|
|
25456
|
-
|
|
25457
|
-
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25461
|
-
|
|
25462
|
-
|
|
25463
|
-
|
|
25464
|
-
|
|
25465
|
-
|
|
25466
|
-
|
|
25467
|
-
|
|
25468
|
-
stack: this.stack,
|
|
25469
|
-
// Axios
|
|
25470
|
-
config: utils$1.toJSONObject(this.config),
|
|
25471
|
-
code: this.code,
|
|
25472
|
-
status: this.status
|
|
25473
|
-
};
|
|
25474
|
-
}
|
|
25475
|
-
});
|
|
25476
|
-
|
|
25477
|
-
const prototype$1 = AxiosError$1.prototype;
|
|
25478
|
-
const descriptors = {};
|
|
25479
|
-
|
|
25480
|
-
[
|
|
25481
|
-
'ERR_BAD_OPTION_VALUE',
|
|
25482
|
-
'ERR_BAD_OPTION',
|
|
25483
|
-
'ECONNABORTED',
|
|
25484
|
-
'ETIMEDOUT',
|
|
25485
|
-
'ERR_NETWORK',
|
|
25486
|
-
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
25487
|
-
'ERR_DEPRECATED',
|
|
25488
|
-
'ERR_BAD_RESPONSE',
|
|
25489
|
-
'ERR_BAD_REQUEST',
|
|
25490
|
-
'ERR_CANCELED',
|
|
25491
|
-
'ERR_NOT_SUPPORT',
|
|
25492
|
-
'ERR_INVALID_URL'
|
|
25493
|
-
// eslint-disable-next-line func-names
|
|
25494
|
-
].forEach(code => {
|
|
25495
|
-
descriptors[code] = {value: code};
|
|
25496
|
-
});
|
|
25497
|
-
|
|
25498
|
-
Object.defineProperties(AxiosError$1, descriptors);
|
|
25499
|
-
Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
25500
|
-
|
|
25501
|
-
// eslint-disable-next-line func-names
|
|
25502
|
-
AxiosError$1.from = (error, code, config, request, response, customProps) => {
|
|
25503
|
-
const axiosError = Object.create(prototype$1);
|
|
25590
|
+
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
25591
|
+
AxiosError$1.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
25592
|
+
AxiosError$1.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
25593
|
+
AxiosError$1.ECONNABORTED = 'ECONNABORTED';
|
|
25594
|
+
AxiosError$1.ETIMEDOUT = 'ETIMEDOUT';
|
|
25595
|
+
AxiosError$1.ERR_NETWORK = 'ERR_NETWORK';
|
|
25596
|
+
AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
25597
|
+
AxiosError$1.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
25598
|
+
AxiosError$1.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
25599
|
+
AxiosError$1.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
25600
|
+
AxiosError$1.ERR_CANCELED = 'ERR_CANCELED';
|
|
25601
|
+
AxiosError$1.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
25602
|
+
AxiosError$1.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
25504
25603
|
|
|
25505
|
-
|
|
25506
|
-
return obj !== Error.prototype;
|
|
25507
|
-
}, prop => {
|
|
25508
|
-
return prop !== 'isAxiosError';
|
|
25509
|
-
});
|
|
25510
|
-
|
|
25511
|
-
const msg = error && error.message ? error.message : 'Error';
|
|
25512
|
-
|
|
25513
|
-
// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
|
|
25514
|
-
const errCode = code == null && error ? error.code : code;
|
|
25515
|
-
AxiosError$1.call(axiosError, msg, errCode, config, request, response);
|
|
25516
|
-
|
|
25517
|
-
// Chain the original error on the standard field; non-enumerable to avoid JSON noise
|
|
25518
|
-
if (error && axiosError.cause == null) {
|
|
25519
|
-
Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
|
|
25520
|
-
}
|
|
25521
|
-
|
|
25522
|
-
axiosError.name = (error && error.name) || 'Error';
|
|
25523
|
-
|
|
25524
|
-
customProps && Object.assign(axiosError, customProps);
|
|
25525
|
-
|
|
25526
|
-
return axiosError;
|
|
25527
|
-
};
|
|
25604
|
+
const AxiosError$2 = AxiosError$1;
|
|
25528
25605
|
|
|
25529
25606
|
// eslint-disable-next-line strict
|
|
25530
25607
|
const httpAdapter = null;
|
|
@@ -25649,7 +25726,7 @@
|
|
|
25649
25726
|
}
|
|
25650
25727
|
|
|
25651
25728
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
25652
|
-
throw new AxiosError$
|
|
25729
|
+
throw new AxiosError$2('Blob is not supported. Use a Buffer instead.');
|
|
25653
25730
|
}
|
|
25654
25731
|
|
|
25655
25732
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
@@ -25823,29 +25900,26 @@
|
|
|
25823
25900
|
* @returns {string} The formatted url
|
|
25824
25901
|
*/
|
|
25825
25902
|
function buildURL(url, params, options) {
|
|
25826
|
-
/*eslint no-param-reassign:0*/
|
|
25827
25903
|
if (!params) {
|
|
25828
25904
|
return url;
|
|
25829
25905
|
}
|
|
25830
|
-
|
|
25906
|
+
|
|
25831
25907
|
const _encode = options && options.encode || encode;
|
|
25832
25908
|
|
|
25833
|
-
|
|
25834
|
-
options
|
|
25835
|
-
|
|
25836
|
-
};
|
|
25837
|
-
}
|
|
25909
|
+
const _options = utils$1.isFunction(options) ? {
|
|
25910
|
+
serialize: options
|
|
25911
|
+
} : options;
|
|
25838
25912
|
|
|
25839
|
-
const serializeFn =
|
|
25913
|
+
const serializeFn = _options && _options.serialize;
|
|
25840
25914
|
|
|
25841
25915
|
let serializedParams;
|
|
25842
25916
|
|
|
25843
25917
|
if (serializeFn) {
|
|
25844
|
-
serializedParams = serializeFn(params,
|
|
25918
|
+
serializedParams = serializeFn(params, _options);
|
|
25845
25919
|
} else {
|
|
25846
25920
|
serializedParams = utils$1.isURLSearchParams(params) ?
|
|
25847
25921
|
params.toString() :
|
|
25848
|
-
new AxiosURLSearchParams(params,
|
|
25922
|
+
new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
25849
25923
|
}
|
|
25850
25924
|
|
|
25851
25925
|
if (serializedParams) {
|
|
@@ -25870,6 +25944,7 @@
|
|
|
25870
25944
|
*
|
|
25871
25945
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
25872
25946
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
25947
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
25873
25948
|
*
|
|
25874
25949
|
* @return {Number} An ID used to remove interceptor later
|
|
25875
25950
|
*/
|
|
@@ -25931,7 +26006,8 @@
|
|
|
25931
26006
|
const transitionalDefaults = {
|
|
25932
26007
|
silentJSONParsing: true,
|
|
25933
26008
|
forcedJSONParsing: true,
|
|
25934
|
-
clarifyTimeoutError: false
|
|
26009
|
+
clarifyTimeoutError: false,
|
|
26010
|
+
legacyInterceptorReqResOrdering: true
|
|
25935
26011
|
};
|
|
25936
26012
|
|
|
25937
26013
|
const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
@@ -26219,7 +26295,7 @@
|
|
|
26219
26295
|
} catch (e) {
|
|
26220
26296
|
if (strictJSONParsing) {
|
|
26221
26297
|
if (e.name === 'SyntaxError') {
|
|
26222
|
-
throw AxiosError$
|
|
26298
|
+
throw AxiosError$2.from(e, AxiosError$2.ERR_BAD_RESPONSE, this, null, this.response);
|
|
26223
26299
|
}
|
|
26224
26300
|
throw e;
|
|
26225
26301
|
}
|
|
@@ -26653,24 +26729,24 @@
|
|
|
26653
26729
|
return !!(value && value.__CANCEL__);
|
|
26654
26730
|
}
|
|
26655
26731
|
|
|
26656
|
-
|
|
26657
|
-
|
|
26658
|
-
|
|
26659
|
-
|
|
26660
|
-
|
|
26661
|
-
|
|
26662
|
-
|
|
26663
|
-
|
|
26664
|
-
|
|
26665
|
-
|
|
26666
|
-
|
|
26667
|
-
|
|
26668
|
-
|
|
26732
|
+
class CanceledError$1 extends AxiosError$2 {
|
|
26733
|
+
/**
|
|
26734
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
26735
|
+
*
|
|
26736
|
+
* @param {string=} message The message.
|
|
26737
|
+
* @param {Object=} config The config.
|
|
26738
|
+
* @param {Object=} request The request.
|
|
26739
|
+
*
|
|
26740
|
+
* @returns {CanceledError} The created error.
|
|
26741
|
+
*/
|
|
26742
|
+
constructor(message, config, request) {
|
|
26743
|
+
super(message == null ? 'canceled' : message, AxiosError$2.ERR_CANCELED, config, request);
|
|
26744
|
+
this.name = 'CanceledError';
|
|
26745
|
+
this.__CANCEL__ = true;
|
|
26746
|
+
}
|
|
26669
26747
|
}
|
|
26670
26748
|
|
|
26671
|
-
|
|
26672
|
-
__CANCEL__: true
|
|
26673
|
-
});
|
|
26749
|
+
const CanceledError$2 = CanceledError$1;
|
|
26674
26750
|
|
|
26675
26751
|
/**
|
|
26676
26752
|
* Resolve or reject a Promise based on response status.
|
|
@@ -26686,9 +26762,9 @@
|
|
|
26686
26762
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
26687
26763
|
resolve(response);
|
|
26688
26764
|
} else {
|
|
26689
|
-
reject(new AxiosError$
|
|
26765
|
+
reject(new AxiosError$2(
|
|
26690
26766
|
'Request failed with status code ' + response.status,
|
|
26691
|
-
[AxiosError$
|
|
26767
|
+
[AxiosError$2.ERR_BAD_REQUEST, AxiosError$2.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
26692
26768
|
response.config,
|
|
26693
26769
|
response.request,
|
|
26694
26770
|
response
|
|
@@ -26911,6 +26987,10 @@
|
|
|
26911
26987
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
26912
26988
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
26913
26989
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
26990
|
+
if (typeof url !== 'string') {
|
|
26991
|
+
return false;
|
|
26992
|
+
}
|
|
26993
|
+
|
|
26914
26994
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
26915
26995
|
}
|
|
26916
26996
|
|
|
@@ -26946,7 +27026,8 @@
|
|
|
26946
27026
|
return requestedURL;
|
|
26947
27027
|
}
|
|
26948
27028
|
|
|
26949
|
-
const headersToObject = (thing) =>
|
|
27029
|
+
const headersToObject = (thing) =>
|
|
27030
|
+
thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
|
|
26950
27031
|
|
|
26951
27032
|
/**
|
|
26952
27033
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -26964,7 +27045,7 @@
|
|
|
26964
27045
|
|
|
26965
27046
|
function getMergedValue(target, source, prop, caseless) {
|
|
26966
27047
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
26967
|
-
return utils$1.merge.call({caseless}, target, source);
|
|
27048
|
+
return utils$1.merge.call({ caseless }, target, source);
|
|
26968
27049
|
} else if (utils$1.isPlainObject(source)) {
|
|
26969
27050
|
return utils$1.merge({}, source);
|
|
26970
27051
|
} else if (utils$1.isArray(source)) {
|
|
@@ -26973,7 +27054,6 @@
|
|
|
26973
27054
|
return source;
|
|
26974
27055
|
}
|
|
26975
27056
|
|
|
26976
|
-
// eslint-disable-next-line consistent-return
|
|
26977
27057
|
function mergeDeepProperties(a, b, prop, caseless) {
|
|
26978
27058
|
if (!utils$1.isUndefined(b)) {
|
|
26979
27059
|
return getMergedValue(a, b, prop, caseless);
|
|
@@ -27036,14 +27116,27 @@
|
|
|
27036
27116
|
socketPath: defaultToConfig2,
|
|
27037
27117
|
responseEncoding: defaultToConfig2,
|
|
27038
27118
|
validateStatus: mergeDirectKeys,
|
|
27039
|
-
headers: (a, b, prop) =>
|
|
27119
|
+
headers: (a, b, prop) =>
|
|
27120
|
+
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
27040
27121
|
};
|
|
27041
27122
|
|
|
27042
|
-
utils$1.forEach(
|
|
27043
|
-
|
|
27044
|
-
|
|
27045
|
-
|
|
27046
|
-
|
|
27123
|
+
utils$1.forEach(
|
|
27124
|
+
Object.keys({ ...config1, ...config2 }),
|
|
27125
|
+
function computeConfigValue(prop) {
|
|
27126
|
+
if (
|
|
27127
|
+
prop === "__proto__" ||
|
|
27128
|
+
prop === "constructor" ||
|
|
27129
|
+
prop === "prototype"
|
|
27130
|
+
)
|
|
27131
|
+
return;
|
|
27132
|
+
const merge = utils$1.hasOwnProp(mergeMap, prop)
|
|
27133
|
+
? mergeMap[prop]
|
|
27134
|
+
: mergeDeepProperties;
|
|
27135
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
27136
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
|
|
27137
|
+
(config[prop] = configValue);
|
|
27138
|
+
},
|
|
27139
|
+
);
|
|
27047
27140
|
|
|
27048
27141
|
return config;
|
|
27049
27142
|
}
|
|
@@ -27188,7 +27281,7 @@
|
|
|
27188
27281
|
return;
|
|
27189
27282
|
}
|
|
27190
27283
|
|
|
27191
|
-
reject(new AxiosError$
|
|
27284
|
+
reject(new AxiosError$2('Request aborted', AxiosError$2.ECONNABORTED, config, request));
|
|
27192
27285
|
|
|
27193
27286
|
// Clean up request
|
|
27194
27287
|
request = null;
|
|
@@ -27200,7 +27293,7 @@
|
|
|
27200
27293
|
// (message may be empty; when present, surface it)
|
|
27201
27294
|
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
27202
27295
|
const msg = event && event.message ? event.message : 'Network Error';
|
|
27203
|
-
const err = new AxiosError$
|
|
27296
|
+
const err = new AxiosError$2(msg, AxiosError$2.ERR_NETWORK, config, request);
|
|
27204
27297
|
// attach the underlying event for consumers who want details
|
|
27205
27298
|
err.event = event || null;
|
|
27206
27299
|
reject(err);
|
|
@@ -27214,9 +27307,9 @@
|
|
|
27214
27307
|
if (_config.timeoutErrorMessage) {
|
|
27215
27308
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
27216
27309
|
}
|
|
27217
|
-
reject(new AxiosError$
|
|
27310
|
+
reject(new AxiosError$2(
|
|
27218
27311
|
timeoutErrorMessage,
|
|
27219
|
-
transitional.clarifyTimeoutError ? AxiosError$
|
|
27312
|
+
transitional.clarifyTimeoutError ? AxiosError$2.ETIMEDOUT : AxiosError$2.ECONNABORTED,
|
|
27220
27313
|
config,
|
|
27221
27314
|
request));
|
|
27222
27315
|
|
|
@@ -27266,7 +27359,7 @@
|
|
|
27266
27359
|
if (!request) {
|
|
27267
27360
|
return;
|
|
27268
27361
|
}
|
|
27269
|
-
reject(!cancel || cancel.type ? new CanceledError$
|
|
27362
|
+
reject(!cancel || cancel.type ? new CanceledError$2(null, config, request) : cancel);
|
|
27270
27363
|
request.abort();
|
|
27271
27364
|
request = null;
|
|
27272
27365
|
};
|
|
@@ -27280,7 +27373,7 @@
|
|
|
27280
27373
|
const protocol = parseProtocol(_config.url);
|
|
27281
27374
|
|
|
27282
27375
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
27283
|
-
reject(new AxiosError$
|
|
27376
|
+
reject(new AxiosError$2('Unsupported protocol ' + protocol + ':', AxiosError$2.ERR_BAD_REQUEST, config));
|
|
27284
27377
|
return;
|
|
27285
27378
|
}
|
|
27286
27379
|
|
|
@@ -27303,13 +27396,13 @@
|
|
|
27303
27396
|
aborted = true;
|
|
27304
27397
|
unsubscribe();
|
|
27305
27398
|
const err = reason instanceof Error ? reason : this.reason;
|
|
27306
|
-
controller.abort(err instanceof AxiosError$
|
|
27399
|
+
controller.abort(err instanceof AxiosError$2 ? err : new CanceledError$2(err instanceof Error ? err.message : err));
|
|
27307
27400
|
}
|
|
27308
27401
|
};
|
|
27309
27402
|
|
|
27310
27403
|
let timer = timeout && setTimeout(() => {
|
|
27311
27404
|
timer = null;
|
|
27312
|
-
onabort(new AxiosError$
|
|
27405
|
+
onabort(new AxiosError$2(`timeout of ${timeout}ms exceeded`, AxiosError$2.ETIMEDOUT));
|
|
27313
27406
|
}, timeout);
|
|
27314
27407
|
|
|
27315
27408
|
const unsubscribe = () => {
|
|
@@ -27495,7 +27588,7 @@
|
|
|
27495
27588
|
return method.call(res);
|
|
27496
27589
|
}
|
|
27497
27590
|
|
|
27498
|
-
throw new AxiosError$
|
|
27591
|
+
throw new AxiosError$2(`Response type '${type}' is not supported`, AxiosError$2.ERR_NOT_SUPPORT, config);
|
|
27499
27592
|
});
|
|
27500
27593
|
});
|
|
27501
27594
|
})());
|
|
@@ -27661,14 +27754,14 @@
|
|
|
27661
27754
|
|
|
27662
27755
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
27663
27756
|
throw Object.assign(
|
|
27664
|
-
new AxiosError$
|
|
27757
|
+
new AxiosError$2('Network Error', AxiosError$2.ERR_NETWORK, config, request, err && err.response),
|
|
27665
27758
|
{
|
|
27666
27759
|
cause: err.cause || err
|
|
27667
27760
|
}
|
|
27668
27761
|
)
|
|
27669
27762
|
}
|
|
27670
27763
|
|
|
27671
|
-
throw AxiosError$
|
|
27764
|
+
throw AxiosError$2.from(err, err && err.code, config, request, err && err.response);
|
|
27672
27765
|
}
|
|
27673
27766
|
}
|
|
27674
27767
|
};
|
|
@@ -27773,7 +27866,7 @@
|
|
|
27773
27866
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
27774
27867
|
|
|
27775
27868
|
if (adapter === undefined) {
|
|
27776
|
-
throw new AxiosError$
|
|
27869
|
+
throw new AxiosError$2(`Unknown adapter '${id}'`);
|
|
27777
27870
|
}
|
|
27778
27871
|
}
|
|
27779
27872
|
|
|
@@ -27794,7 +27887,7 @@
|
|
|
27794
27887
|
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
27795
27888
|
'as no adapter specified';
|
|
27796
27889
|
|
|
27797
|
-
throw new AxiosError$
|
|
27890
|
+
throw new AxiosError$2(
|
|
27798
27891
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
27799
27892
|
'ERR_NOT_SUPPORT'
|
|
27800
27893
|
);
|
|
@@ -27833,7 +27926,7 @@
|
|
|
27833
27926
|
}
|
|
27834
27927
|
|
|
27835
27928
|
if (config.signal && config.signal.aborted) {
|
|
27836
|
-
throw new CanceledError$
|
|
27929
|
+
throw new CanceledError$2(null, config);
|
|
27837
27930
|
}
|
|
27838
27931
|
}
|
|
27839
27932
|
|
|
@@ -27893,7 +27986,7 @@
|
|
|
27893
27986
|
});
|
|
27894
27987
|
}
|
|
27895
27988
|
|
|
27896
|
-
const VERSION$1 = "1.13.
|
|
27989
|
+
const VERSION$1 = "1.13.5";
|
|
27897
27990
|
|
|
27898
27991
|
const validators$1 = {};
|
|
27899
27992
|
|
|
@@ -27923,9 +28016,9 @@
|
|
|
27923
28016
|
// eslint-disable-next-line func-names
|
|
27924
28017
|
return (value, opt, opts) => {
|
|
27925
28018
|
if (validator === false) {
|
|
27926
|
-
throw new AxiosError$
|
|
28019
|
+
throw new AxiosError$2(
|
|
27927
28020
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
27928
|
-
AxiosError$
|
|
28021
|
+
AxiosError$2.ERR_DEPRECATED
|
|
27929
28022
|
);
|
|
27930
28023
|
}
|
|
27931
28024
|
|
|
@@ -27964,7 +28057,7 @@
|
|
|
27964
28057
|
|
|
27965
28058
|
function assertOptions(options, schema, allowUnknown) {
|
|
27966
28059
|
if (typeof options !== 'object') {
|
|
27967
|
-
throw new AxiosError$
|
|
28060
|
+
throw new AxiosError$2('options must be an object', AxiosError$2.ERR_BAD_OPTION_VALUE);
|
|
27968
28061
|
}
|
|
27969
28062
|
const keys = Object.keys(options);
|
|
27970
28063
|
let i = keys.length;
|
|
@@ -27975,12 +28068,12 @@
|
|
|
27975
28068
|
const value = options[opt];
|
|
27976
28069
|
const result = value === undefined || validator(value, opt, options);
|
|
27977
28070
|
if (result !== true) {
|
|
27978
|
-
throw new AxiosError$
|
|
28071
|
+
throw new AxiosError$2('option ' + opt + ' must be ' + result, AxiosError$2.ERR_BAD_OPTION_VALUE);
|
|
27979
28072
|
}
|
|
27980
28073
|
continue;
|
|
27981
28074
|
}
|
|
27982
28075
|
if (allowUnknown !== true) {
|
|
27983
|
-
throw new AxiosError$
|
|
28076
|
+
throw new AxiosError$2('Unknown option ' + opt, AxiosError$2.ERR_BAD_OPTION);
|
|
27984
28077
|
}
|
|
27985
28078
|
}
|
|
27986
28079
|
}
|
|
@@ -28061,7 +28154,8 @@
|
|
|
28061
28154
|
validator.assertOptions(transitional, {
|
|
28062
28155
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
28063
28156
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
28064
|
-
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
28157
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
28158
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
28065
28159
|
}, false);
|
|
28066
28160
|
}
|
|
28067
28161
|
|
|
@@ -28118,7 +28212,14 @@
|
|
|
28118
28212
|
|
|
28119
28213
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
28120
28214
|
|
|
28121
|
-
|
|
28215
|
+
const transitional = config.transitional || transitionalDefaults;
|
|
28216
|
+
const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
|
|
28217
|
+
|
|
28218
|
+
if (legacyInterceptorReqResOrdering) {
|
|
28219
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
28220
|
+
} else {
|
|
28221
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
28222
|
+
}
|
|
28122
28223
|
});
|
|
28123
28224
|
|
|
28124
28225
|
const responseInterceptorChain = [];
|
|
@@ -28273,7 +28374,7 @@
|
|
|
28273
28374
|
return;
|
|
28274
28375
|
}
|
|
28275
28376
|
|
|
28276
|
-
token.reason = new CanceledError$
|
|
28377
|
+
token.reason = new CanceledError$2(message, config, request);
|
|
28277
28378
|
resolvePromise(token.reason);
|
|
28278
28379
|
});
|
|
28279
28380
|
}
|
|
@@ -28357,7 +28458,7 @@
|
|
|
28357
28458
|
*
|
|
28358
28459
|
* ```js
|
|
28359
28460
|
* function f(x, y, z) {}
|
|
28360
|
-
*
|
|
28461
|
+
* const args = [1, 2, 3];
|
|
28361
28462
|
* f.apply(null, args);
|
|
28362
28463
|
* ```
|
|
28363
28464
|
*
|
|
@@ -28498,14 +28599,14 @@
|
|
|
28498
28599
|
axios$1.Axios = Axios$2;
|
|
28499
28600
|
|
|
28500
28601
|
// Expose Cancel & CancelToken
|
|
28501
|
-
axios$1.CanceledError = CanceledError$
|
|
28602
|
+
axios$1.CanceledError = CanceledError$2;
|
|
28502
28603
|
axios$1.CancelToken = CancelToken$2;
|
|
28503
28604
|
axios$1.isCancel = isCancel$1;
|
|
28504
28605
|
axios$1.VERSION = VERSION$1;
|
|
28505
28606
|
axios$1.toFormData = toFormData$1;
|
|
28506
28607
|
|
|
28507
28608
|
// Expose AxiosError class
|
|
28508
|
-
axios$1.AxiosError = AxiosError$
|
|
28609
|
+
axios$1.AxiosError = AxiosError$2;
|
|
28509
28610
|
|
|
28510
28611
|
// alias for CanceledError for backward compatibility
|
|
28511
28612
|
axios$1.Cancel = axios$1.CanceledError;
|
|
@@ -28905,7 +29006,7 @@
|
|
|
28905
29006
|
const axiosGlobal = ((axios$1$1 === null || axios$1$1 === void 0 ? void 0 : axios$1$1.default) || axios$1$1);
|
|
28906
29007
|
const axios = axiosGlobal.create();
|
|
28907
29008
|
const DEFAULT_API_URI = 'https://api.getmembrane.com';
|
|
28908
|
-
const DEFAULT_UI_URI = 'https://
|
|
29009
|
+
const DEFAULT_UI_URI = 'https://ui.getmembrane.com';
|
|
28909
29010
|
const membraneClientOptionsSchema = object({
|
|
28910
29011
|
token: string$1().nullish(),
|
|
28911
29012
|
fetchToken: _function().nullish(),
|