@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InstanceGatewayRequestError } from './instanceGateway';
|
|
2
2
|
/**
|
|
3
|
-
* Client for platform-held email,
|
|
3
|
+
* Client for platform-held email through the managed gateway, from a managed
|
|
4
|
+
* instance or any app deployed on ForkLaunch.
|
|
4
5
|
*
|
|
5
6
|
* The instance never holds a mail credential. It signs each request with its
|
|
6
7
|
* own HMAC key; the platform sends through Amazon SES from the instance's own
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emailClient.d.ts","sourceRoot":"","sources":["../../src/http/emailClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,2BAA2B,EAE5B,MAAM,mBAAmB,CAAC;AAE3B
|
|
1
|
+
{"version":3,"file":"emailClient.d.ts","sourceRoot":"","sources":["../../src/http/emailClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,2B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
|
|
2704
2704
|
const hmacKey = options2.hmacKey ?? process.env.INSTANCE_HMAC_KEY;
|
|
2705
2705
|
if (!gatewayUrl || !instanceId || !hmacKey) {
|
|
2706
2706
|
throw new Error(
|
|
2707
|
-
`${feature}
|
|
2707
|
+
`${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`
|
|
2708
2708
|
);
|
|
2709
2709
|
}
|
|
2710
2710
|
return { gatewayUrl, instanceId, hmacKey };
|
|
@@ -3256,7 +3256,7 @@ function validateSmsSend(request) {
|
|
|
3256
3256
|
);
|
|
3257
3257
|
}
|
|
3258
3258
|
}
|
|
3259
|
-
var NOT_MANAGED = "SMS
|
|
3259
|
+
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.";
|
|
3260
3260
|
var SmsClient = class {
|
|
3261
3261
|
transport;
|
|
3262
3262
|
constructor(options2 = {}) {
|
|
@@ -3425,7 +3425,7 @@ function voiceRequestProblem(request) {
|
|
|
3425
3425
|
}
|
|
3426
3426
|
var VoiceClient = class {
|
|
3427
3427
|
transport;
|
|
3428
|
-
/** Throws
|
|
3428
|
+
/** Throws without the managed gateway settings (see instanceGatewaySettings). */
|
|
3429
3429
|
constructor(options2 = {}) {
|
|
3430
3430
|
this.transport = createInstanceGatewayTransport(
|
|
3431
3431
|
options2,
|
|
@@ -3588,7 +3588,7 @@ function createStripeClient(options2 = {}) {
|
|
|
3588
3588
|
if (!explicitGateway && !isManagedInstance()) {
|
|
3589
3589
|
if (!options2.apiKey) {
|
|
3590
3590
|
throw new Error(
|
|
3591
|
-
"createStripeClient:
|
|
3591
|
+
"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"
|
|
3592
3592
|
);
|
|
3593
3593
|
}
|
|
3594
3594
|
return new StripeClass(options2.apiKey, options2.config);
|