@forklaunch/core 3.2.0 → 3.2.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/lib/http/emailClient.d.ts +2 -1
- package/lib/http/emailClient.d.ts.map +1 -1
- package/lib/http/index.js +4 -4
- package/lib/http/index.js.map +1 -1
- package/lib/http/index.mjs +4 -4
- package/lib/http/index.mjs.map +1 -1
- package/lib/http/instanceGateway.d.ts +10 -6
- package/lib/http/instanceGateway.d.ts.map +1 -1
- package/lib/http/modelGatewayClient.d.ts +13 -12
- package/lib/http/modelGatewayClient.d.ts.map +1 -1
- package/lib/http/smsClient.d.ts +2 -2
- package/lib/http/smsClient.d.ts.map +1 -1
- package/lib/http/voiceClient.d.ts +4 -4
- package/lib/http/voiceClient.d.ts.map +1 -1
- package/lib/http/whatsappClient.d.ts +5 -5
- package/lib/persistence/compliantField.d.ts.map +1 -1
- package/lib/persistence/index.js +6 -1
- package/lib/persistence/index.js.map +1 -1
- package/lib/persistence/index.mjs +6 -1
- package/lib/persistence/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/http/index.mjs
CHANGED
|
@@ -2589,7 +2589,7 @@ function instanceGatewaySettings(options2 = {}, feature = "The instance gateway"
|
|
|
2589
2589
|
const hmacKey = options2.hmacKey ?? process.env.INSTANCE_HMAC_KEY;
|
|
2590
2590
|
if (!gatewayUrl || !instanceId || !hmacKey) {
|
|
2591
2591
|
throw new Error(
|
|
2592
|
-
`${feature}
|
|
2592
|
+
`${feature} goes through the ForkLaunch managed gateway: PLATFORM_GATEWAY_URL, INSTANCE_ID and INSTANCE_HMAC_KEY must be set. The platform sets them for a managed instance, and at deploy for a component that declares the capability (\`forklaunch infra add <service> <capability>\`), which also points them at the local gateway mock`
|
|
2593
2593
|
);
|
|
2594
2594
|
}
|
|
2595
2595
|
return { gatewayUrl, instanceId, hmacKey };
|
|
@@ -3141,7 +3141,7 @@ function validateSmsSend(request) {
|
|
|
3141
3141
|
);
|
|
3142
3142
|
}
|
|
3143
3143
|
}
|
|
3144
|
-
var NOT_MANAGED = "SMS
|
|
3144
|
+
var NOT_MANAGED = "SMS goes through the ForkLaunch managed gateway: PLATFORM_GATEWAY_URL, INSTANCE_ID and INSTANCE_HMAC_KEY must be set (the platform sets them for a managed instance, and at deploy for a component that declares sms). Locally, run the gateway mock (npx -p @forklaunch/core forklaunch-gateway-mock) and point those variables at it; do not add a Twilio or AWS SDK.";
|
|
3145
3145
|
var SmsClient = class {
|
|
3146
3146
|
transport;
|
|
3147
3147
|
constructor(options2 = {}) {
|
|
@@ -3310,7 +3310,7 @@ function voiceRequestProblem(request) {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
var VoiceClient = class {
|
|
3312
3312
|
transport;
|
|
3313
|
-
/** Throws
|
|
3313
|
+
/** Throws without the managed gateway settings (see instanceGatewaySettings). */
|
|
3314
3314
|
constructor(options2 = {}) {
|
|
3315
3315
|
this.transport = createInstanceGatewayTransport(
|
|
3316
3316
|
options2,
|
|
@@ -3472,7 +3472,7 @@ function createStripeClient(options2 = {}) {
|
|
|
3472
3472
|
if (!explicitGateway && !isManagedInstance()) {
|
|
3473
3473
|
if (!options2.apiKey) {
|
|
3474
3474
|
throw new Error(
|
|
3475
|
-
"createStripeClient:
|
|
3475
|
+
"createStripeClient: no managed gateway (PLATFORM_GATEWAY_URL, INSTANCE_ID and INSTANCE_HMAC_KEY are unset) and no apiKey was given \u2014 pass { apiKey } for local development, or run the gateway mock (forklaunch-gateway-mock) with the managed env"
|
|
3476
3476
|
);
|
|
3477
3477
|
}
|
|
3478
3478
|
return new StripeClass(options2.apiKey, options2.config);
|