@drawbridge/drawbridge-utils 0.0.173 → 0.0.175
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 +460 -242
- package/dist/connections/index.d.cts +630 -319
- package/dist/connections/index.d.ts +630 -319
- package/dist/connections/index.js +459 -241
- package/dist/providers.cjs +460 -244
- package/dist/providers.d.cts +6 -6
- package/dist/providers.d.ts +6 -6
- package/dist/providers.js +460 -244
- package/package.json +1 -1
package/dist/providers.d.cts
CHANGED
|
@@ -74,10 +74,10 @@ const providerFields = ( slug ) => (
|
|
|
74
74
|
|
|
75
75
|
// The vendors an admin can configure, in a stable order.
|
|
76
76
|
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
77
|
+
// FROM THE VENDOR DIRECTORY, not from the connection catalog. It used to be
|
|
78
|
+
// derived from which manifests declared a vendor, which meant a vendor could not
|
|
79
|
+
// exist without a connection — Stripe needs credentials and has no manifest. A
|
|
80
|
+
// connection with no vendor behind it, like `webhook`, simply names none.
|
|
81
81
|
const providerSlugs = () => Object.keys( vendors ).sort();
|
|
82
82
|
|
|
83
83
|
// LIVE IS DERIVED, never stored. A stored flag is a second thing to keep in
|
|
@@ -236,7 +236,7 @@ const vendorEnabled = async ({ controller, vendor }) => (
|
|
|
236
236
|
// lookups inside the window.
|
|
237
237
|
const vendorSettings = async ({ controller, slug }) => {
|
|
238
238
|
|
|
239
|
-
const declared = Object.hasOwn( connections, slug ) ?
|
|
239
|
+
const declared = Object.hasOwn( connections, slug ) ? ( connections[ slug ].vendors || [] ) : [];
|
|
240
240
|
|
|
241
241
|
let merged = {};
|
|
242
242
|
|
|
@@ -262,7 +262,7 @@ const vendorSettings = async ({ controller, slug }) => {
|
|
|
262
262
|
// three, or the two would disagree about which vendors a connection depends on.
|
|
263
263
|
const vendorsEnabled = async ({ controller, slug }) => {
|
|
264
264
|
|
|
265
|
-
const declared = Object.hasOwn( connections, slug ) ?
|
|
265
|
+
const declared = Object.hasOwn( connections, slug ) ? ( connections[ slug ].vendors || [] ) : [];
|
|
266
266
|
|
|
267
267
|
for( const vendor of declared ){
|
|
268
268
|
|
package/dist/providers.d.ts
CHANGED
|
@@ -74,10 +74,10 @@ const providerFields = ( slug ) => (
|
|
|
74
74
|
|
|
75
75
|
// The vendors an admin can configure, in a stable order.
|
|
76
76
|
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
77
|
+
// FROM THE VENDOR DIRECTORY, not from the connection catalog. It used to be
|
|
78
|
+
// derived from which manifests declared a vendor, which meant a vendor could not
|
|
79
|
+
// exist without a connection — Stripe needs credentials and has no manifest. A
|
|
80
|
+
// connection with no vendor behind it, like `webhook`, simply names none.
|
|
81
81
|
const providerSlugs = () => Object.keys( vendors ).sort();
|
|
82
82
|
|
|
83
83
|
// LIVE IS DERIVED, never stored. A stored flag is a second thing to keep in
|
|
@@ -236,7 +236,7 @@ const vendorEnabled = async ({ controller, vendor }) => (
|
|
|
236
236
|
// lookups inside the window.
|
|
237
237
|
const vendorSettings = async ({ controller, slug }) => {
|
|
238
238
|
|
|
239
|
-
const declared = Object.hasOwn( connections, slug ) ?
|
|
239
|
+
const declared = Object.hasOwn( connections, slug ) ? ( connections[ slug ].vendors || [] ) : [];
|
|
240
240
|
|
|
241
241
|
let merged = {};
|
|
242
242
|
|
|
@@ -262,7 +262,7 @@ const vendorSettings = async ({ controller, slug }) => {
|
|
|
262
262
|
// three, or the two would disagree about which vendors a connection depends on.
|
|
263
263
|
const vendorsEnabled = async ({ controller, slug }) => {
|
|
264
264
|
|
|
265
|
-
const declared = Object.hasOwn( connections, slug ) ?
|
|
265
|
+
const declared = Object.hasOwn( connections, slug ) ? ( connections[ slug ].vendors || [] ) : [];
|
|
266
266
|
|
|
267
267
|
for( const vendor of declared ){
|
|
268
268
|
|