@drawbridge/drawbridge-utils 0.0.174 → 0.0.176
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/connections/index.cjs +3202 -1831
- package/dist/connections/index.d.cts +11 -8866
- package/dist/connections/index.d.ts +11 -8866
- package/dist/connections/index.js +3183 -1827
- package/dist/connections/oauth.cjs +4 -4
- package/dist/connections/oauth.d.cts +10 -8
- package/dist/connections/oauth.d.ts +10 -8
- package/dist/connections/oauth.js +4 -4
- package/dist/features.cjs +7546 -42
- package/dist/features.d.cts +46 -42
- package/dist/features.d.ts +46 -42
- package/dist/features.js +7534 -42
- package/dist/index-B8JhYfvU.d.ts +11928 -0
- package/dist/index-qY18QITf.d.cts +11928 -0
- package/dist/plans.cjs +7542 -51
- package/dist/plans.d.cts +28 -10
- package/dist/plans.d.ts +28 -10
- package/dist/plans.js +7542 -51
- package/dist/pricing.cjs +7687 -209
- package/dist/pricing.d.cts +25 -17
- package/dist/pricing.d.ts +25 -17
- package/dist/pricing.js +7687 -209
- package/dist/providers.cjs +3084 -1891
- package/dist/providers.d.cts +8 -19
- package/dist/providers.d.ts +8 -19
- package/dist/providers.js +3081 -1888
- package/package.json +1 -1
package/dist/providers.d.cts
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
import { vendors, mergeSettings, connections } from './
|
|
1
|
+
import { a0 as vendors, F as mergeSettings, x as connections } from './index-qY18QITf.cjs';
|
|
2
2
|
import { decrypt, encrypt } from './encrypt.cjs';
|
|
3
3
|
import { slugify } from './slugify.cjs';
|
|
4
|
+
import './usage.cjs';
|
|
4
5
|
import './connections/oauth.cjs';
|
|
5
6
|
import 'node:crypto';
|
|
6
7
|
import './phone.cjs';
|
|
7
8
|
import 'libphonenumber-js';
|
|
8
9
|
import './http.cjs';
|
|
9
|
-
import './pricing.cjs';
|
|
10
|
-
import './billing.cjs';
|
|
11
|
-
import './transactions.cjs';
|
|
12
|
-
import '@drawbridge/drawbridge-telemetry';
|
|
13
|
-
import './usage.cjs';
|
|
14
|
-
import './plans.cjs';
|
|
15
|
-
import './features.cjs';
|
|
16
|
-
import './index.cjs';
|
|
17
|
-
import 'currency-codes';
|
|
18
|
-
import './color.cjs';
|
|
19
|
-
import 'tinycolor2';
|
|
20
|
-
import './nanoid.cjs';
|
|
21
10
|
import 'nanoid';
|
|
22
11
|
import './email.cjs';
|
|
23
12
|
import './safe-http.cjs';
|
|
@@ -74,10 +63,10 @@ const providerFields = ( slug ) => (
|
|
|
74
63
|
|
|
75
64
|
// The vendors an admin can configure, in a stable order.
|
|
76
65
|
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
66
|
+
// FROM THE VENDOR DIRECTORY, not from the connection catalog. It used to be
|
|
67
|
+
// derived from which manifests declared a vendor, which meant a vendor could not
|
|
68
|
+
// exist without a connection — Stripe needs credentials and has no manifest. A
|
|
69
|
+
// connection with no vendor behind it, like `webhook`, simply names none.
|
|
81
70
|
const providerSlugs = () => Object.keys( vendors ).sort();
|
|
82
71
|
|
|
83
72
|
// LIVE IS DERIVED, never stored. A stored flag is a second thing to keep in
|
|
@@ -236,7 +225,7 @@ const vendorEnabled = async ({ controller, vendor }) => (
|
|
|
236
225
|
// lookups inside the window.
|
|
237
226
|
const vendorSettings = async ({ controller, slug }) => {
|
|
238
227
|
|
|
239
|
-
const declared = Object.hasOwn( connections, slug ) ?
|
|
228
|
+
const declared = Object.hasOwn( connections, slug ) ? ( connections[ slug ].vendors || [] ) : [];
|
|
240
229
|
|
|
241
230
|
let merged = {};
|
|
242
231
|
|
|
@@ -262,7 +251,7 @@ const vendorSettings = async ({ controller, slug }) => {
|
|
|
262
251
|
// three, or the two would disagree about which vendors a connection depends on.
|
|
263
252
|
const vendorsEnabled = async ({ controller, slug }) => {
|
|
264
253
|
|
|
265
|
-
const declared = Object.hasOwn( connections, slug ) ?
|
|
254
|
+
const declared = Object.hasOwn( connections, slug ) ? ( connections[ slug ].vendors || [] ) : [];
|
|
266
255
|
|
|
267
256
|
for( const vendor of declared ){
|
|
268
257
|
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
import { vendors, mergeSettings, connections } from './
|
|
1
|
+
import { a0 as vendors, F as mergeSettings, x as connections } from './index-B8JhYfvU.js';
|
|
2
2
|
import { decrypt, encrypt } from './encrypt.js';
|
|
3
3
|
import { slugify } from './slugify.js';
|
|
4
|
+
import './usage.js';
|
|
4
5
|
import './connections/oauth.js';
|
|
5
6
|
import 'node:crypto';
|
|
6
7
|
import './phone.js';
|
|
7
8
|
import 'libphonenumber-js';
|
|
8
9
|
import './http.js';
|
|
9
|
-
import './pricing.js';
|
|
10
|
-
import './billing.js';
|
|
11
|
-
import './transactions.js';
|
|
12
|
-
import '@drawbridge/drawbridge-telemetry';
|
|
13
|
-
import './usage.js';
|
|
14
|
-
import './plans.js';
|
|
15
|
-
import './features.js';
|
|
16
|
-
import './index.js';
|
|
17
|
-
import 'currency-codes';
|
|
18
|
-
import './color.js';
|
|
19
|
-
import 'tinycolor2';
|
|
20
|
-
import './nanoid.js';
|
|
21
10
|
import 'nanoid';
|
|
22
11
|
import './email.js';
|
|
23
12
|
import './safe-http.js';
|
|
@@ -74,10 +63,10 @@ const providerFields = ( slug ) => (
|
|
|
74
63
|
|
|
75
64
|
// The vendors an admin can configure, in a stable order.
|
|
76
65
|
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
66
|
+
// FROM THE VENDOR DIRECTORY, not from the connection catalog. It used to be
|
|
67
|
+
// derived from which manifests declared a vendor, which meant a vendor could not
|
|
68
|
+
// exist without a connection — Stripe needs credentials and has no manifest. A
|
|
69
|
+
// connection with no vendor behind it, like `webhook`, simply names none.
|
|
81
70
|
const providerSlugs = () => Object.keys( vendors ).sort();
|
|
82
71
|
|
|
83
72
|
// LIVE IS DERIVED, never stored. A stored flag is a second thing to keep in
|
|
@@ -236,7 +225,7 @@ const vendorEnabled = async ({ controller, vendor }) => (
|
|
|
236
225
|
// lookups inside the window.
|
|
237
226
|
const vendorSettings = async ({ controller, slug }) => {
|
|
238
227
|
|
|
239
|
-
const declared = Object.hasOwn( connections, slug ) ?
|
|
228
|
+
const declared = Object.hasOwn( connections, slug ) ? ( connections[ slug ].vendors || [] ) : [];
|
|
240
229
|
|
|
241
230
|
let merged = {};
|
|
242
231
|
|
|
@@ -262,7 +251,7 @@ const vendorSettings = async ({ controller, slug }) => {
|
|
|
262
251
|
// three, or the two would disagree about which vendors a connection depends on.
|
|
263
252
|
const vendorsEnabled = async ({ controller, slug }) => {
|
|
264
253
|
|
|
265
|
-
const declared = Object.hasOwn( connections, slug ) ?
|
|
254
|
+
const declared = Object.hasOwn( connections, slug ) ? ( connections[ slug ].vendors || [] ) : [];
|
|
266
255
|
|
|
267
256
|
for( const vendor of declared ){
|
|
268
257
|
|