@stripe/connect-js 3.3.9 → 3.3.10
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 +5 -4
- package/dist/connect.js +5 -4
- package/dist/pure.esm.js +5 -4
- package/dist/pure.js +5 -4
- package/package.json +1 -1
- package/src/shared.ts +8 -3
package/dist/connect.esm.js
CHANGED
|
@@ -34,13 +34,14 @@ const componentNameMapping = {
|
|
|
34
34
|
documents: "stripe-connect-documents"
|
|
35
35
|
};
|
|
36
36
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
37
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
37
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
38
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
38
39
|
const findScript = () => {
|
|
39
|
-
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
40
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
40
41
|
};
|
|
41
42
|
const injectScript = () => {
|
|
42
43
|
const script = document.createElement("script");
|
|
43
|
-
script.src =
|
|
44
|
+
script.src = V1_URL;
|
|
44
45
|
const head = document.head;
|
|
45
46
|
if (!head) {
|
|
46
47
|
throw new Error("Expected document.head not to be null. Connect.js requires a <head> element.");
|
|
@@ -174,7 +175,7 @@ const createWrapper = stripeConnect => {
|
|
|
174
175
|
sdk: true,
|
|
175
176
|
sdkOptions: {
|
|
176
177
|
// This will be replaced by the npm package version when bundling
|
|
177
|
-
sdkVersion: "3.3.
|
|
178
|
+
sdkVersion: "3.3.10"
|
|
178
179
|
}
|
|
179
180
|
})
|
|
180
181
|
}));
|
package/dist/connect.js
CHANGED
|
@@ -38,13 +38,14 @@ const componentNameMapping = {
|
|
|
38
38
|
documents: "stripe-connect-documents"
|
|
39
39
|
};
|
|
40
40
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
41
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
41
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
42
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
42
43
|
const findScript = () => {
|
|
43
|
-
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
44
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
44
45
|
};
|
|
45
46
|
const injectScript = () => {
|
|
46
47
|
const script = document.createElement("script");
|
|
47
|
-
script.src =
|
|
48
|
+
script.src = V1_URL;
|
|
48
49
|
const head = document.head;
|
|
49
50
|
if (!head) {
|
|
50
51
|
throw new Error("Expected document.head not to be null. Connect.js requires a <head> element.");
|
|
@@ -178,7 +179,7 @@ const createWrapper = stripeConnect => {
|
|
|
178
179
|
sdk: true,
|
|
179
180
|
sdkOptions: {
|
|
180
181
|
// This will be replaced by the npm package version when bundling
|
|
181
|
-
sdkVersion: "3.3.
|
|
182
|
+
sdkVersion: "3.3.10"
|
|
182
183
|
}
|
|
183
184
|
})
|
|
184
185
|
}));
|
package/dist/pure.esm.js
CHANGED
|
@@ -34,13 +34,14 @@ const componentNameMapping = {
|
|
|
34
34
|
documents: "stripe-connect-documents"
|
|
35
35
|
};
|
|
36
36
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
37
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
37
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
38
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
38
39
|
const findScript = () => {
|
|
39
|
-
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
40
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
40
41
|
};
|
|
41
42
|
const injectScript = () => {
|
|
42
43
|
const script = document.createElement("script");
|
|
43
|
-
script.src =
|
|
44
|
+
script.src = V1_URL;
|
|
44
45
|
const head = document.head;
|
|
45
46
|
if (!head) {
|
|
46
47
|
throw new Error("Expected document.head not to be null. Connect.js requires a <head> element.");
|
|
@@ -174,7 +175,7 @@ const createWrapper = stripeConnect => {
|
|
|
174
175
|
sdk: true,
|
|
175
176
|
sdkOptions: {
|
|
176
177
|
// This will be replaced by the npm package version when bundling
|
|
177
|
-
sdkVersion: "3.3.
|
|
178
|
+
sdkVersion: "3.3.10"
|
|
178
179
|
}
|
|
179
180
|
})
|
|
180
181
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -38,13 +38,14 @@ const componentNameMapping = {
|
|
|
38
38
|
documents: "stripe-connect-documents"
|
|
39
39
|
};
|
|
40
40
|
const EXISTING_SCRIPT_MESSAGE = "loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
41
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
41
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
42
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
42
43
|
const findScript = () => {
|
|
43
|
-
return document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
44
|
+
return document.querySelectorAll(`script[src="${V1_URL}"]`)[0] || document.querySelectorAll(`script[src="${V0_URL}"]`)[0] || null;
|
|
44
45
|
};
|
|
45
46
|
const injectScript = () => {
|
|
46
47
|
const script = document.createElement("script");
|
|
47
|
-
script.src =
|
|
48
|
+
script.src = V1_URL;
|
|
48
49
|
const head = document.head;
|
|
49
50
|
if (!head) {
|
|
50
51
|
throw new Error("Expected document.head not to be null. Connect.js requires a <head> element.");
|
|
@@ -178,7 +179,7 @@ const createWrapper = stripeConnect => {
|
|
|
178
179
|
sdk: true,
|
|
179
180
|
sdkOptions: {
|
|
180
181
|
// This will be replaced by the npm package version when bundling
|
|
181
|
-
sdkVersion: "3.3.
|
|
182
|
+
sdkVersion: "3.3.10"
|
|
182
183
|
}
|
|
183
184
|
})
|
|
184
185
|
}));
|
package/package.json
CHANGED
package/src/shared.ts
CHANGED
|
@@ -46,19 +46,24 @@ interface StripeConnectWrapper {
|
|
|
46
46
|
|
|
47
47
|
const EXISTING_SCRIPT_MESSAGE =
|
|
48
48
|
"loadConnect was called but an existing Connect.js script already exists in the document; existing script parameters will be used";
|
|
49
|
-
const V0_URL = "https://connect-js.stripe.com/
|
|
49
|
+
const V0_URL = "https://connect-js.stripe.com/v0.1/connect.js";
|
|
50
|
+
const V1_URL = "https://connect-js.stripe.com/v1.0/connect.js";
|
|
50
51
|
|
|
51
52
|
export const findScript = (): HTMLScriptElement | null => {
|
|
52
53
|
return (
|
|
54
|
+
document.querySelectorAll<HTMLScriptElement>(
|
|
55
|
+
`script[src="${V1_URL}"]`
|
|
56
|
+
)[0] ||
|
|
53
57
|
document.querySelectorAll<HTMLScriptElement>(
|
|
54
58
|
`script[src="${V0_URL}"]`
|
|
55
|
-
)[0] ||
|
|
59
|
+
)[0] ||
|
|
60
|
+
null
|
|
56
61
|
);
|
|
57
62
|
};
|
|
58
63
|
|
|
59
64
|
const injectScript = (): HTMLScriptElement => {
|
|
60
65
|
const script = document.createElement("script");
|
|
61
|
-
script.src =
|
|
66
|
+
script.src = V1_URL;
|
|
62
67
|
|
|
63
68
|
const head = document.head;
|
|
64
69
|
|