@drawbridge/drawbridge-utils 0.0.112 → 0.0.115

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.
@@ -1,11 +1,11 @@
1
1
  // lib/connections/oauth.js
2
2
  import { createHash, randomBytes } from "crypto";
3
- var credentials = ({ clientId, clientSecret, descriptor }) => (descriptor == null ? void 0 : descriptor.clientAuth) === "basic" ? {
4
- headers: { authorization: "Basic " + Buffer.from(clientId + ":" + clientSecret).toString("base64") },
5
- body: {}
3
+ var credentials = ({ basic, clientId, clientSecret }) => basic ? {
4
+ body: {},
5
+ headers: { authorization: "Basic " + Buffer.from(clientId + ":" + clientSecret).toString("base64") }
6
6
  } : {
7
- headers: {},
8
- body: { client_id: clientId, client_secret: clientSecret }
7
+ body: { client_id: clientId, client_secret: clientSecret },
8
+ headers: {}
9
9
  };
10
10
  var pkcePair = () => {
11
11
  const verifier = randomBytes(32).toString("base64url");
@@ -16,10 +16,11 @@ var pkcePair = () => {
16
16
  };
17
17
  };
18
18
  var consentUrl = ({ challenge, clientId, descriptor, redirect, state } = {}) => {
19
+ var _a;
19
20
  if (!clientId) throw new Error("This deployment has no OAuth client configured, so there is nothing to consent through");
20
- if (!(descriptor == null ? void 0 : descriptor.authorize)) throw new Error("This connection declares no authorize url");
21
+ if (!((_a = descriptor == null ? void 0 : descriptor.urls) == null ? void 0 : _a.authorize)) throw new Error("This connection declares no authorize url");
21
22
  if (descriptor.pkce && !challenge) throw new Error("This connection requires PKCE, so a code challenge is not optional");
22
- return descriptor.authorize + "?" + new URLSearchParams({
23
+ return descriptor.urls.authorize + "?" + new URLSearchParams({
23
24
  // The descriptor's own params go FIRST, so a vendor quirk cannot quietly
24
25
  // overwrite one of the fields below that every consent carries.
25
26
  ...descriptor.params || {},
@@ -34,17 +35,33 @@ var consentUrl = ({ challenge, clientId, descriptor, redirect, state } = {}) =>
34
35
  state
35
36
  });
36
37
  };
37
- var exchange = async ({ clientId, clientSecret, code, descriptor, fetcher = fetch, redirect, verifier } = {}) => {
38
- if (!(descriptor == null ? void 0 : descriptor.token)) throw new Error("This connection declares no token url");
39
- if (descriptor.pkce && !verifier) throw new Error("This connection requires PKCE, so the code verifier is not optional");
40
- const client = credentials({ clientId, clientSecret, descriptor });
41
- const response = await fetcher(descriptor.token, {
38
+ var authToken = async ({
39
+ basic,
40
+ clientId,
41
+ clientSecret,
42
+ code,
43
+ descriptor,
44
+ fetcher = fetch,
45
+ redirect,
46
+ refreshToken,
47
+ verifier
48
+ } = {}) => {
49
+ var _a;
50
+ if (!clientId || !clientSecret) throw new Error("This deployment has no OAuth client configured, so no token can be minted");
51
+ if (!((_a = descriptor == null ? void 0 : descriptor.urls) == null ? void 0 : _a.token)) throw new Error("This connection declares no token url");
52
+ const renewing = !code;
53
+ if (renewing && !refreshToken) throw new Error("Nothing has been consented to yet, so there is no refresh token to spend");
54
+ if (!renewing && descriptor.pkce && !verifier) throw new Error("This connection requires PKCE, so the code verifier is not optional");
55
+ const client = credentials({ basic, clientId, clientSecret });
56
+ const response = await fetcher(descriptor.urls.token, {
42
57
  body: new URLSearchParams({
43
58
  ...client.body,
44
- code: decodeURIComponent(String(code || "").trim()),
45
- grant_type: "authorization_code",
46
- redirect_uri: redirect,
47
- ...descriptor.pkce && { code_verifier: verifier }
59
+ ...renewing ? { grant_type: "refresh_token", refresh_token: refreshToken } : {
60
+ code: decodeURIComponent(String(code || "").trim()),
61
+ grant_type: "authorization_code",
62
+ redirect_uri: redirect,
63
+ ...descriptor.pkce && { code_verifier: verifier }
64
+ }
48
65
  }),
49
66
  headers: { "content-type": "application/x-www-form-urlencoded", ...client.headers },
50
67
  method: "POST",
@@ -52,45 +69,28 @@ var exchange = async ({ clientId, clientSecret, code, descriptor, fetcher = fetc
52
69
  });
53
70
  const body = await response.json().catch(() => ({}));
54
71
  if (!response.ok) {
55
- throw new Error("The vendor refused the exchange (" + response.status + ")" + ((body == null ? void 0 : body.error) ? ": " + body.error : ""));
72
+ throw new Error(
73
+ renewing ? "The vendor refused the refresh token (" + response.status + ") \u2014 reconnect the connection" : "The vendor refused the exchange (" + response.status + ")" + ((body == null ? void 0 : body.error) ? ": " + body.error : "")
74
+ );
56
75
  }
57
- if (!body.access_token) throw new Error("The vendor returned no access token");
76
+ if (!renewing && !body.access_token) throw new Error("The vendor returned no access token");
58
77
  return {
59
78
  accessToken: body.access_token,
60
79
  expiresIn: body.expires_in || null,
80
+ // A REFRESH TOKEN IS NOT UNIVERSAL. Google returns one only with
81
+ // access_type=offline; Mailchimp's tokens do not expire and it returns none
82
+ // at all, so its absence cannot be an error here.
83
+ //
84
+ // On a RENEWAL the same null matters for the opposite reason: a vendor that
85
+ // rotates returns a new one, and dropping it silently invalidates the stored
86
+ // grant on the NEXT refresh — a failure a day late and nowhere near its
87
+ // cause. tokenSettings() keeps the existing one when this is null.
61
88
  refreshToken: body.refresh_token || null,
62
89
  scope: body.scope || null
63
90
  };
64
91
  };
65
- var refresh = async ({ clientId, clientSecret, descriptor, fetcher = fetch, refreshToken } = {}) => {
66
- if (!clientId || !clientSecret) throw new Error("This deployment has no OAuth client configured, so no token can be minted");
67
- if (!refreshToken) throw new Error("Nothing has been consented to yet, so there is no refresh token to spend");
68
- if (!(descriptor == null ? void 0 : descriptor.token)) throw new Error("This connection declares no token url");
69
- const client = credentials({ clientId, clientSecret, descriptor });
70
- const response = await fetcher(descriptor.token, {
71
- body: new URLSearchParams({
72
- ...client.body,
73
- grant_type: "refresh_token",
74
- refresh_token: refreshToken
75
- }),
76
- headers: { "content-type": "application/x-www-form-urlencoded", ...client.headers },
77
- method: "POST",
78
- signal: AbortSignal.timeout(15e3)
79
- });
80
- if (!response.ok) throw new Error("The vendor refused the refresh token (" + response.status + ") \u2014 reconnect the connection");
81
- const body = await response.json();
82
- return {
83
- accessToken: body.access_token,
84
- expiresIn: body.expires_in || null,
85
- // A vendor that rotates its refresh token returns a new one, and dropping
86
- // it silently invalidates the stored grant on the NEXT refresh rather
87
- // than this one — a failure a day late and nowhere near its cause.
88
- refreshToken: body.refresh_token || null
89
- };
90
- };
91
92
  export {
93
+ authToken,
92
94
  consentUrl,
93
- exchange,
94
- pkcePair,
95
- refresh
95
+ pkcePair
96
96
  };
package/dist/features.cjs CHANGED
@@ -94,6 +94,21 @@ var field = {
94
94
  }
95
95
  };
96
96
  var connection = {
97
+ attentive: {
98
+ key: "organization:connection:attentive",
99
+ error: "Plan does not include Attentive connection",
100
+ feature: "Attentive connection"
101
+ },
102
+ // Klaviyo shipped without an entry here, which meant no plan GRANTED its
103
+ // key and the feature gate denied every non-admin request — a latent 403
104
+ // found while adding Attentive. getPlanFeature answers granted:false for a
105
+ // key absent from the plan's map, so a manifest feature key that appears in
106
+ // no plan list is a connection only admins can manage.
107
+ klaviyo: {
108
+ key: "organization:connection:klaviyo",
109
+ error: "Plan does not include Klaviyo connection",
110
+ feature: "Klaviyo connection"
111
+ },
97
112
  mailchimp: {
98
113
  key: "organization:connection:mailchimp",
99
114
  error: "Plan does not include Mailchimp connection",
@@ -68,6 +68,21 @@ const field = {
68
68
  };
69
69
 
70
70
  const connection = {
71
+ attentive : {
72
+ key : 'organization:connection:attentive',
73
+ error : 'Plan does not include Attentive connection',
74
+ feature : 'Attentive connection'
75
+ },
76
+ // Klaviyo shipped without an entry here, which meant no plan GRANTED its
77
+ // key and the feature gate denied every non-admin request — a latent 403
78
+ // found while adding Attentive. getPlanFeature answers granted:false for a
79
+ // key absent from the plan's map, so a manifest feature key that appears in
80
+ // no plan list is a connection only admins can manage.
81
+ klaviyo : {
82
+ key : 'organization:connection:klaviyo',
83
+ error : 'Plan does not include Klaviyo connection',
84
+ feature : 'Klaviyo connection'
85
+ },
71
86
  mailchimp : {
72
87
  key : 'organization:connection:mailchimp',
73
88
  error : 'Plan does not include Mailchimp connection',
@@ -68,6 +68,21 @@ const field = {
68
68
  };
69
69
 
70
70
  const connection = {
71
+ attentive : {
72
+ key : 'organization:connection:attentive',
73
+ error : 'Plan does not include Attentive connection',
74
+ feature : 'Attentive connection'
75
+ },
76
+ // Klaviyo shipped without an entry here, which meant no plan GRANTED its
77
+ // key and the feature gate denied every non-admin request — a latent 403
78
+ // found while adding Attentive. getPlanFeature answers granted:false for a
79
+ // key absent from the plan's map, so a manifest feature key that appears in
80
+ // no plan list is a connection only admins can manage.
81
+ klaviyo : {
82
+ key : 'organization:connection:klaviyo',
83
+ error : 'Plan does not include Klaviyo connection',
84
+ feature : 'Klaviyo connection'
85
+ },
71
86
  mailchimp : {
72
87
  key : 'organization:connection:mailchimp',
73
88
  error : 'Plan does not include Mailchimp connection',
package/dist/features.js CHANGED
@@ -66,6 +66,21 @@ var field = {
66
66
  }
67
67
  };
68
68
  var connection = {
69
+ attentive: {
70
+ key: "organization:connection:attentive",
71
+ error: "Plan does not include Attentive connection",
72
+ feature: "Attentive connection"
73
+ },
74
+ // Klaviyo shipped without an entry here, which meant no plan GRANTED its
75
+ // key and the feature gate denied every non-admin request — a latent 403
76
+ // found while adding Attentive. getPlanFeature answers granted:false for a
77
+ // key absent from the plan's map, so a manifest feature key that appears in
78
+ // no plan list is a connection only admins can manage.
79
+ klaviyo: {
80
+ key: "organization:connection:klaviyo",
81
+ error: "Plan does not include Klaviyo connection",
82
+ feature: "Klaviyo connection"
83
+ },
69
84
  mailchimp: {
70
85
  key: "organization:connection:mailchimp",
71
86
  error: "Plan does not include Mailchimp connection",
@@ -1,5 +1,5 @@
1
1
  // lib/phone.js
2
- import { parsePhoneNumberFromString, isValidPhoneNumber } from "libphonenumber-js";
2
+ import { AsYouType, parsePhoneNumberFromString, isValidPhoneNumber } from "libphonenumber-js";
3
3
  var isValid = (value, country) => {
4
4
  if (!value) return false;
5
5
  try {
package/dist/phone.cjs CHANGED
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // lib/phone.js
20
20
  var phone_exports = {};
21
21
  __export(phone_exports, {
22
+ detectCountry: () => detectCountry,
22
23
  isValid: () => isValid,
23
24
  toE164: () => toE164
24
25
  });
@@ -33,6 +34,16 @@ var toE164 = (value, country) => {
33
34
  return null;
34
35
  }
35
36
  };
37
+ var detectCountry = (value) => {
38
+ if (!value) return null;
39
+ try {
40
+ const parser = new import_libphonenumber_js.AsYouType();
41
+ parser.input(String(value));
42
+ return parser.getCountry() || null;
43
+ } catch {
44
+ return null;
45
+ }
46
+ };
36
47
  var isValid = (value, country) => {
37
48
  if (!value) return false;
38
49
  try {
@@ -43,6 +54,7 @@ var isValid = (value, country) => {
43
54
  };
44
55
  // Annotate the CommonJS export names for ESM import in node:
45
56
  0 && (module.exports = {
57
+ detectCountry,
46
58
  isValid,
47
59
  toE164
48
60
  });
package/dist/phone.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { isValidPhoneNumber, parsePhoneNumberFromString } from 'libphonenumber-js';
1
+ import { AsYouType, isValidPhoneNumber, parsePhoneNumberFromString } from 'libphonenumber-js';
2
2
 
3
3
  // Canonicalize a phone value to E.164 (e.g. '+15551234567'), or null if it cannot
4
4
  // be parsed. `country` (ISO 3166-1 alpha-2, e.g. 'US') is only needed for
@@ -24,6 +24,34 @@ const toE164 = ( value, country ) => {
24
24
 
25
25
  };
26
26
 
27
+ // Resolve which country an entered number belongs to (ISO 3166-1 alpha-2), or null
28
+ // while it is still ambiguous. Backs the country selector on phone fields, which
29
+ // follows the number the visitor types rather than asking them to set it first.
30
+ // libphonenumber only commits to a country once the number is COMPLETE: '+1604…'
31
+ // stays null until the final digit because Canada and the US share the +1 calling
32
+ // code and are told apart by area code. Callers MUST treat null as "leave the
33
+ // current selection alone" — never as "reset it" — or every keystroke short of a
34
+ // finished number would wipe the visitor's country.
35
+ const detectCountry = ( value ) => {
36
+
37
+ if( ! value ) return null;
38
+
39
+ try {
40
+
41
+ const parser = new AsYouType();
42
+
43
+ parser.input( String( value ) );
44
+
45
+ return parser.getCountry() || null;
46
+
47
+ } catch {
48
+
49
+ return null;
50
+
51
+ }
52
+
53
+ };
54
+
27
55
  // Strict validity check (wraps libphonenumber-js). Mirrors the validation
28
56
  // drawbridge-api's submission route already performs on lead phone input.
29
57
  const isValid = ( value, country ) => {
@@ -42,4 +70,4 @@ const isValid = ( value, country ) => {
42
70
 
43
71
  };
44
72
 
45
- export { isValid, toE164 };
73
+ export { detectCountry, isValid, toE164 };
package/dist/phone.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { isValidPhoneNumber, parsePhoneNumberFromString } from 'libphonenumber-js';
1
+ import { AsYouType, isValidPhoneNumber, parsePhoneNumberFromString } from 'libphonenumber-js';
2
2
 
3
3
  // Canonicalize a phone value to E.164 (e.g. '+15551234567'), or null if it cannot
4
4
  // be parsed. `country` (ISO 3166-1 alpha-2, e.g. 'US') is only needed for
@@ -24,6 +24,34 @@ const toE164 = ( value, country ) => {
24
24
 
25
25
  };
26
26
 
27
+ // Resolve which country an entered number belongs to (ISO 3166-1 alpha-2), or null
28
+ // while it is still ambiguous. Backs the country selector on phone fields, which
29
+ // follows the number the visitor types rather than asking them to set it first.
30
+ // libphonenumber only commits to a country once the number is COMPLETE: '+1604…'
31
+ // stays null until the final digit because Canada and the US share the +1 calling
32
+ // code and are told apart by area code. Callers MUST treat null as "leave the
33
+ // current selection alone" — never as "reset it" — or every keystroke short of a
34
+ // finished number would wipe the visitor's country.
35
+ const detectCountry = ( value ) => {
36
+
37
+ if( ! value ) return null;
38
+
39
+ try {
40
+
41
+ const parser = new AsYouType();
42
+
43
+ parser.input( String( value ) );
44
+
45
+ return parser.getCountry() || null;
46
+
47
+ } catch {
48
+
49
+ return null;
50
+
51
+ }
52
+
53
+ };
54
+
27
55
  // Strict validity check (wraps libphonenumber-js). Mirrors the validation
28
56
  // drawbridge-api's submission route already performs on lead phone input.
29
57
  const isValid = ( value, country ) => {
@@ -42,4 +70,4 @@ const isValid = ( value, country ) => {
42
70
 
43
71
  };
44
72
 
45
- export { isValid, toE164 };
73
+ export { detectCountry, isValid, toE164 };
package/dist/phone.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // lib/phone.js
2
- import { parsePhoneNumberFromString, isValidPhoneNumber } from "libphonenumber-js";
2
+ import { AsYouType, parsePhoneNumberFromString, isValidPhoneNumber } from "libphonenumber-js";
3
3
  var toE164 = (value, country) => {
4
4
  if (!value) return null;
5
5
  try {
@@ -9,6 +9,16 @@ var toE164 = (value, country) => {
9
9
  return null;
10
10
  }
11
11
  };
12
+ var detectCountry = (value) => {
13
+ if (!value) return null;
14
+ try {
15
+ const parser = new AsYouType();
16
+ parser.input(String(value));
17
+ return parser.getCountry() || null;
18
+ } catch {
19
+ return null;
20
+ }
21
+ };
12
22
  var isValid = (value, country) => {
13
23
  if (!value) return false;
14
24
  try {
@@ -18,6 +28,7 @@ var isValid = (value, country) => {
18
28
  }
19
29
  };
20
30
  export {
31
+ detectCountry,
21
32
  isValid,
22
33
  toE164
23
34
  };
package/dist/plans.cjs CHANGED
@@ -105,6 +105,21 @@ var field = {
105
105
  }
106
106
  };
107
107
  var connection = {
108
+ attentive: {
109
+ key: "organization:connection:attentive",
110
+ error: "Plan does not include Attentive connection",
111
+ feature: "Attentive connection"
112
+ },
113
+ // Klaviyo shipped without an entry here, which meant no plan GRANTED its
114
+ // key and the feature gate denied every non-admin request — a latent 403
115
+ // found while adding Attentive. getPlanFeature answers granted:false for a
116
+ // key absent from the plan's map, so a manifest feature key that appears in
117
+ // no plan list is a connection only admins can manage.
118
+ klaviyo: {
119
+ key: "organization:connection:klaviyo",
120
+ error: "Plan does not include Klaviyo connection",
121
+ feature: "Klaviyo connection"
122
+ },
108
123
  mailchimp: {
109
124
  key: "organization:connection:mailchimp",
110
125
  error: "Plan does not include Mailchimp connection",
@@ -287,6 +302,8 @@ var unitAmountDecimal = (cents) => {
287
302
  };
288
303
  var all = {
289
304
  features: (array = []) => featuresFor([
305
+ connection.attentive.key,
306
+ connection.klaviyo.key,
290
307
  connection.mailchimp.key,
291
308
  connection.sendgrid.key,
292
309
  connection.shopify.key,
package/dist/plans.d.cts CHANGED
@@ -67,6 +67,8 @@ const unitAmountDecimal = ( cents ) => {
67
67
 
68
68
  const all = {
69
69
  features : ( array = [] ) => featuresFor([
70
+ connection.attentive.key,
71
+ connection.klaviyo.key,
70
72
  connection.mailchimp.key,
71
73
  connection.sendgrid.key,
72
74
  connection.shopify.key,
package/dist/plans.d.ts CHANGED
@@ -67,6 +67,8 @@ const unitAmountDecimal = ( cents ) => {
67
67
 
68
68
  const all = {
69
69
  features : ( array = [] ) => featuresFor([
70
+ connection.attentive.key,
71
+ connection.klaviyo.key,
70
72
  connection.mailchimp.key,
71
73
  connection.sendgrid.key,
72
74
  connection.shopify.key,
package/dist/plans.js CHANGED
@@ -66,6 +66,21 @@ var field = {
66
66
  }
67
67
  };
68
68
  var connection = {
69
+ attentive: {
70
+ key: "organization:connection:attentive",
71
+ error: "Plan does not include Attentive connection",
72
+ feature: "Attentive connection"
73
+ },
74
+ // Klaviyo shipped without an entry here, which meant no plan GRANTED its
75
+ // key and the feature gate denied every non-admin request — a latent 403
76
+ // found while adding Attentive. getPlanFeature answers granted:false for a
77
+ // key absent from the plan's map, so a manifest feature key that appears in
78
+ // no plan list is a connection only admins can manage.
79
+ klaviyo: {
80
+ key: "organization:connection:klaviyo",
81
+ error: "Plan does not include Klaviyo connection",
82
+ feature: "Klaviyo connection"
83
+ },
69
84
  mailchimp: {
70
85
  key: "organization:connection:mailchimp",
71
86
  error: "Plan does not include Mailchimp connection",
@@ -248,6 +263,8 @@ var unitAmountDecimal = (cents) => {
248
263
  };
249
264
  var all = {
250
265
  features: (array = []) => featuresFor([
266
+ connection.attentive.key,
267
+ connection.klaviyo.key,
251
268
  connection.mailchimp.key,
252
269
  connection.sendgrid.key,
253
270
  connection.shopify.key,
package/dist/pricing.cjs CHANGED
@@ -116,6 +116,21 @@ var field = {
116
116
  }
117
117
  };
118
118
  var connection = {
119
+ attentive: {
120
+ key: "organization:connection:attentive",
121
+ error: "Plan does not include Attentive connection",
122
+ feature: "Attentive connection"
123
+ },
124
+ // Klaviyo shipped without an entry here, which meant no plan GRANTED its
125
+ // key and the feature gate denied every non-admin request — a latent 403
126
+ // found while adding Attentive. getPlanFeature answers granted:false for a
127
+ // key absent from the plan's map, so a manifest feature key that appears in
128
+ // no plan list is a connection only admins can manage.
129
+ klaviyo: {
130
+ key: "organization:connection:klaviyo",
131
+ error: "Plan does not include Klaviyo connection",
132
+ feature: "Klaviyo connection"
133
+ },
119
134
  mailchimp: {
120
135
  key: "organization:connection:mailchimp",
121
136
  error: "Plan does not include Mailchimp connection",
@@ -298,6 +313,8 @@ var unitAmountDecimal = (cents) => {
298
313
  };
299
314
  var all = {
300
315
  features: (array = []) => featuresFor([
316
+ connection.attentive.key,
317
+ connection.klaviyo.key,
301
318
  connection.mailchimp.key,
302
319
  connection.sendgrid.key,
303
320
  connection.shopify.key,
package/dist/pricing.js CHANGED
@@ -66,6 +66,21 @@ var field = {
66
66
  }
67
67
  };
68
68
  var connection = {
69
+ attentive: {
70
+ key: "organization:connection:attentive",
71
+ error: "Plan does not include Attentive connection",
72
+ feature: "Attentive connection"
73
+ },
74
+ // Klaviyo shipped without an entry here, which meant no plan GRANTED its
75
+ // key and the feature gate denied every non-admin request — a latent 403
76
+ // found while adding Attentive. getPlanFeature answers granted:false for a
77
+ // key absent from the plan's map, so a manifest feature key that appears in
78
+ // no plan list is a connection only admins can manage.
79
+ klaviyo: {
80
+ key: "organization:connection:klaviyo",
81
+ error: "Plan does not include Klaviyo connection",
82
+ feature: "Klaviyo connection"
83
+ },
69
84
  mailchimp: {
70
85
  key: "organization:connection:mailchimp",
71
86
  error: "Plan does not include Mailchimp connection",
@@ -248,6 +263,8 @@ var unitAmountDecimal = (cents) => {
248
263
  };
249
264
  var all = {
250
265
  features: (array = []) => featuresFor([
266
+ connection.attentive.key,
267
+ connection.klaviyo.key,
251
268
  connection.mailchimp.key,
252
269
  connection.sendgrid.key,
253
270
  connection.shopify.key,
@@ -1,7 +1,7 @@
1
1
  import dns from 'dns';
2
2
  import * as http from 'node:http';
3
3
  import * as https from 'node:https';
4
- import { isBlockedIP, axios } from './axios.cjs';
4
+ import { axios, isBlockedIP } from './axios.cjs';
5
5
  import 'axios';
6
6
  import 'net';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import dns from 'dns';
2
2
  import * as http from 'node:http';
3
3
  import * as https from 'node:https';
4
- import { isBlockedIP, axios } from './axios.js';
4
+ import { axios, isBlockedIP } from './axios.js';
5
5
  import 'axios';
6
6
  import 'net';
7
7