Skip to content

Commit b2d6f24

Browse files
chore: 2022-08-24 release (#427)
* [skip ci] Open PR * chore(firestore-stripe-invoices): 0.2.1 release * chore(firestore-stripe-payments): 0.3.1 release * fix(firestore-stripe-payments): renamed create checkout min instances config (#428) * chore: Remove lockfiles from .gitignore Re-generated `package-lock.json` for each extension, too * fix(firestore-stripe-payments): renamed create checkout min instances config * fix: added eventchannel check Co-authored-by: Jonathan Steele <[email protected]> Co-authored-by: Darren Ackers <[email protected]>
1 parent f03f541 commit b2d6f24

File tree

7 files changed

+18
-10
lines changed

7 files changed

+18
-10
lines changed

firestore-stripe-invoices/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Version 0.2.1 - 2022-08-24
2+
[chore] Added `package-lock.json` to version control to prevent installation issues. [#426]
3+
14
## Version 0.2.0 - 2022-04-26
25

36
[feat] - Add `invoice.paid`, `invoice.updated` to permitted webhook events list. #356

firestore-stripe-invoices/extension.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
name: firestore-stripe-invoices
16-
version: 0.2.0
16+
version: 0.2.1
1717
specVersion: v1beta
1818

1919
displayName: Send Invoices using Stripe

firestore-stripe-invoices/functions/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const stripe = new Stripe(config.stripeSecretKey, {
2828
// https://stripe.com/docs/building-plugins#setappinfo
2929
appInfo: {
3030
name: 'Firebase firestore-stripe-invoices',
31-
version: '0.2.0',
31+
version: '0.2.1',
3232
},
3333
});
3434

firestore-stripe-payments/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Version 0.3.1 - 2022-08-24
2+
[chore] Added `package-lock.json` to version control to prevent installation issues. [#426]
3+
14
## Version 0.3.0 - 2022-08-23
25
[feat] Allow configurable minimum instances for `createCheckoutSession` function. [#375]
36

firestore-stripe-payments/extension.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
name: firestore-stripe-payments
16-
version: 0.3.0
16+
version: 0.3.1
1717
specVersion: v1beta
1818

1919
displayName: Run Payments with Stripe
@@ -249,7 +249,6 @@ params:
249249

250250
- param: CREATE_CHECKOUT_SESSION_MIN_INSTANCES
251251
label: Minimum instances for createCheckoutSession function
252-
type: secret
253252
description: >-
254253
Set the minimum number of function instances that should be always be available to create Checkout Sessions.
255254
This number can be adjusted to reduce cold starts and increase the responsiveness

firestore-stripe-payments/functions/src/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ export default {
2222
stripeConfigCollectionPath: process.env.STRIPE_CONFIG_COLLECTION,
2323
syncUsersOnCreate: process.env.SYNC_USERS_ON_CREATE === 'Sync',
2424
autoDeleteUsers: process.env.DELETE_STRIPE_CUSTOMERS === 'Auto delete',
25-
minCheckoutInstances: Number(process.env.CREATE_CHECKOUT_MIN_INSTANCES) ?? 0,
25+
minCheckoutInstances:
26+
Number(process.env.CREATE_CHECKOUT_SESSION_MIN_INSTANCES) ?? 0,
2627
};

firestore-stripe-payments/functions/src/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const stripe = new Stripe(config.stripeSecretKey, {
3535
// https://stripe.com/docs/building-plugins#setappinfo
3636
appInfo: {
3737
name: 'Firebase firestore-stripe-payments',
38-
version: '0.3.0',
38+
version: '0.3.1',
3939
},
4040
});
4141

@@ -808,10 +808,12 @@ export const handleWebhookEvents = functions.handler.https.onRequest(
808808
);
809809
}
810810

811-
await eventChannel?.publish({
812-
type: `com.stripe.v1.${event.type}`,
813-
data: event.data.object,
814-
});
811+
if (eventChannel) {
812+
await eventChannel.publish({
813+
type: `com.stripe.v1.${event.type}`,
814+
data: event.data.object,
815+
});
816+
}
815817

816818
logs.webhookHandlerSucceeded(event.id, event.type);
817819
} catch (error) {

0 commit comments

Comments
 (0)