@stripe/connect-js 3.3.11-beta-1 → 3.3.12-beta-1
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/connect.esm.js +4 -3
- package/dist/connect.js +4 -3
- package/dist/pure.esm.js +4 -3
- package/dist/pure.js +4 -3
- package/dist/src/utils/jestHelpers.d.ts +1 -1
- package/package.json +1 -1
- package/src/shared.ts +7 -2
- package/src/utils/jestHelpers.ts +1 -1
package/dist/connect.esm.js
CHANGED
|
@@ -62,12 +62,13 @@ const componentNameMapping = {
|
|
|
62
62
|
};
|
|
63
63
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
64
64
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
65
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
65
66
|
const findScript = () => {
|
|
66
|
-
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
67
|
+
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
|
|
67
68
|
};
|
|
68
69
|
const injectScript = () => {
|
|
69
70
|
const script = document.createElement("script");
|
|
70
|
-
script.src =
|
|
71
|
+
script.src = V1_URL;
|
|
71
72
|
const head = document.head;
|
|
72
73
|
if (!head) {
|
|
73
74
|
throw new Error("Expected document.head not to be null. Connect.js requires a <head> element.");
|
|
@@ -201,7 +202,7 @@ const createWrapper = stripeConnect => {
|
|
|
201
202
|
sdk: true,
|
|
202
203
|
sdkOptions: {
|
|
203
204
|
// This will be replaced by the npm package version when bundling
|
|
204
|
-
sdkVersion: "3.3.
|
|
205
|
+
sdkVersion: "3.3.12-beta-1"
|
|
205
206
|
}
|
|
206
207
|
})
|
|
207
208
|
}));
|
package/dist/connect.js
CHANGED
|
@@ -66,12 +66,13 @@ const componentNameMapping = {
|
|
|
66
66
|
};
|
|
67
67
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
68
68
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
69
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
69
70
|
const findScript = () => {
|
|
70
|
-
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
71
|
+
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
|
|
71
72
|
};
|
|
72
73
|
const injectScript = () => {
|
|
73
74
|
const script = document.createElement("script");
|
|
74
|
-
script.src =
|
|
75
|
+
script.src = V1_URL;
|
|
75
76
|
const head = document.head;
|
|
76
77
|
if (!head) {
|
|
77
78
|
throw new Error("Expected document.head not to be null. Connect.js requires a <head> element.");
|
|
@@ -205,7 +206,7 @@ const createWrapper = stripeConnect => {
|
|
|
205
206
|
sdk: true,
|
|
206
207
|
sdkOptions: {
|
|
207
208
|
// This will be replaced by the npm package version when bundling
|
|
208
|
-
sdkVersion: "3.3.
|
|
209
|
+
sdkVersion: "3.3.12-beta-1"
|
|
209
210
|
}
|
|
210
211
|
})
|
|
211
212
|
}));
|
package/dist/pure.esm.js
CHANGED
|
@@ -62,12 +62,13 @@ const componentNameMapping = {
|
|
|
62
62
|
};
|
|
63
63
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
64
64
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
65
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
65
66
|
const findScript = () => {
|
|
66
|
-
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
67
|
+
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
|
|
67
68
|
};
|
|
68
69
|
const injectScript = () => {
|
|
69
70
|
const script = document.createElement("script");
|
|
70
|
-
script.src =
|
|
71
|
+
script.src = V1_URL;
|
|
71
72
|
const head = document.head;
|
|
72
73
|
if (!head) {
|
|
73
74
|
throw new Error("Expected document.head not to be null. Connect.js requires a <head> element.");
|
|
@@ -201,7 +202,7 @@ const createWrapper = stripeConnect => {
|
|
|
201
202
|
sdk: true,
|
|
202
203
|
sdkOptions: {
|
|
203
204
|
// This will be replaced by the npm package version when bundling
|
|
204
|
-
sdkVersion: "3.3.
|
|
205
|
+
sdkVersion: "3.3.12-beta-1"
|
|
205
206
|
}
|
|
206
207
|
})
|
|
207
208
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -66,12 +66,13 @@ const componentNameMapping = {
|
|
|
66
66
|
};
|
|
67
67
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
68
68
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
69
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
69
70
|
const findScript = () => {
|
|
70
|
-
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
71
|
+
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || null;
|
|
71
72
|
};
|
|
72
73
|
const injectScript = () => {
|
|
73
74
|
const script = document.createElement("script");
|
|
74
|
-
script.src =
|
|
75
|
+
script.src = V1_URL;
|
|
75
76
|
const head = document.head;
|
|
76
77
|
if (!head) {
|
|
77
78
|
throw new Error("Expected document.head not to be null. Connect.js requires a <head> element.");
|
|
@@ -205,7 +206,7 @@ const createWrapper = stripeConnect => {
|
|
|
205
206
|
sdk: true,
|
|
206
207
|
sdkOptions: {
|
|
207
208
|
// This will be replaced by the npm package version when bundling
|
|
208
|
-
sdkVersion: "3.3.
|
|
209
|
+
sdkVersion: "3.3.12-beta-1"
|
|
209
210
|
}
|
|
210
211
|
})
|
|
211
212
|
}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SCRIPT_SELECTOR = "script[src^=\"https://connect-js.stripe.com/
|
|
1
|
+
export declare const SCRIPT_SELECTOR = "script[src^=\"https://connect-js.stripe.com/v1.0/connect.js\"]";
|
|
2
2
|
export {};
|
package/package.json
CHANGED
package/src/shared.ts
CHANGED
|
@@ -70,18 +70,23 @@ interface StripeConnectWrapper {
|
|
|
70
70
|
const EXISTING_SCRIPT_MESSAGE =
|
|
71
71
|
"loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
72
72
|
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
73
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
73
74
|
|
|
74
75
|
export const findScript = (): HTMLScriptElement | null => {
|
|
75
76
|
return (
|
|
76
77
|
document.querySelectorAll<HTMLScriptElement>(
|
|
77
78
|
`script[src="${V0_URL}"]`
|
|
78
|
-
)[0] ||
|
|
79
|
+
)[0] ||
|
|
80
|
+
document.querySelectorAll<HTMLScriptElement>(
|
|
81
|
+
`script[src="${V1_URL}"]`
|
|
82
|
+
)[0] ||
|
|
83
|
+
null
|
|
79
84
|
);
|
|
80
85
|
};
|
|
81
86
|
|
|
82
87
|
const injectScript = (): HTMLScriptElement => {
|
|
83
88
|
const script = document.createElement("script");
|
|
84
|
-
script.src =
|
|
89
|
+
script.src = V1_URL;
|
|
85
90
|
|
|
86
91
|
const head = document.head;
|
|
87
92
|
|
package/src/utils/jestHelpers.ts
CHANGED