@crvouga/mockingbird-service-stripe 1.6.1 → 1.7.0
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/CHANGELOG.md +17 -0
- package/dist/{chunk-SITQPERY.js → chunk-JOGJHELU.js} +15 -10
- package/dist/{chunk-SITQPERY.js.map → chunk-JOGJHELU.js.map} +2 -2
- package/dist/{chunk-44XMO754.js → chunk-XYCRVYSO.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/server.js +2 -2
- package/package.json +2 -1
- /package/dist/{chunk-44XMO754.js.map → chunk-XYCRVYSO.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-stripe
|
|
2
2
|
|
|
3
|
+
## 1.7.0 (2026-09-29)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add hot/warm/cold parity tiers per service ([6621568](https://github.com/crvouga/mockingbird/commit/6621568f6df162838eabab4d3968b5606fe96208))
|
|
8
|
+
|
|
9
|
+
### Fixes and improvements
|
|
10
|
+
|
|
11
|
+
- refuse an empty custom-field name before a malformed customer email ([efec437](https://github.com/crvouga/mockingbird/commit/efec437405a91c884a563d1d354f887fa1d3ce46))
|
|
12
|
+
- report an exponent-notation dimension before a later field's places error ([3b04dd0](https://github.com/crvouga/mockingbird/commit/3b04dd0b22ef2fae289c1cfe082e73ee319db0a6))
|
|
13
|
+
- refuse an empty price when listing subscriptions ([2f6fa7e](https://github.com/crvouga/mockingbird/commit/2f6fa7ead2b37178aa2588f9c22b63d5b6c2dacc))
|
|
14
|
+
- refuse an empty search query before an empty expand ([c97edc1](https://github.com/crvouga/mockingbird/commit/c97edc125f7b1b871ba8c1ff2e85a58bb75a86b0))
|
|
15
|
+
- report param 'id' for a missing invoice item ([20d312c](https://github.com/crvouga/mockingbird/commit/20d312ca9be495793991345793fdec98380fbf5b))
|
|
16
|
+
- 404 when listing items of a missing subscription ([7c3aeb7](https://github.com/crvouga/mockingbird/commit/7c3aeb7b30b7378e85513b5acc4ef71a781aad44))
|
|
17
|
+
- report other invalid body parameters before an empty expand ([900d8e7](https://github.com/crvouga/mockingbird/commit/900d8e7ea35a47bb2b39076b6113fafd6d155e0e))
|
|
18
|
+
- say 'No such invoice item' when listing past a missing invoice item ([a38dd9b](https://github.com/crvouga/mockingbird/commit/a38dd9b464fdee6efd1cdc2db22b2cec01d8659f))
|
|
19
|
+
|
|
3
20
|
## 1.6.1 (2026-09-29)
|
|
4
21
|
|
|
5
22
|
### Fixes and improvements
|
|
@@ -1559,7 +1559,7 @@ var restoreNamespace = (sqlite, namespace, snapshot) => {
|
|
|
1559
1559
|
};
|
|
1560
1560
|
|
|
1561
1561
|
// ../core/dist/version.js
|
|
1562
|
-
var PACKAGE_VERSION = true ? "1.
|
|
1562
|
+
var PACKAGE_VERSION = true ? "1.7.0" : UNRELEASED_VERSION;
|
|
1563
1563
|
|
|
1564
1564
|
// ../core/dist/signing.js
|
|
1565
1565
|
var encoder = new TextEncoder();
|
|
@@ -6700,8 +6700,6 @@ var packageDimensionsError = (issues, raw) => {
|
|
|
6700
6700
|
`Invalid decimal: ${rubyFloat(value)}; must contain at maximum two decimal places.`,
|
|
6701
6701
|
`package_dimensions[${field}]`
|
|
6702
6702
|
);
|
|
6703
|
-
}
|
|
6704
|
-
for (const field of fields) {
|
|
6705
6703
|
const issue = issues.find((item) => item.path === `package_dimensions[${field}]`);
|
|
6706
6704
|
if (issue) return issueToError(issue);
|
|
6707
6705
|
}
|
|
@@ -7064,6 +7062,7 @@ var subscriptionHandlers = (services) => {
|
|
|
7064
7062
|
const customer = stringOf(params, "customer");
|
|
7065
7063
|
if (customer !== null && !scope.account.customers.get(customer))
|
|
7066
7064
|
throw resourceMissing("customer", customer, "customer", 400);
|
|
7065
|
+
if (params.price === "") throw parameterInvalidEmpty("price");
|
|
7067
7066
|
const price = stringOf(params, "price");
|
|
7068
7067
|
if (price !== null && !scope.account.prices.get(price))
|
|
7069
7068
|
throw resourceMissing("price", price, "price", 400);
|
|
@@ -7210,6 +7209,8 @@ var subscriptionHandlers = (services) => {
|
|
|
7210
7209
|
const params = queryParams(context);
|
|
7211
7210
|
const subscription = stringOf(params, "subscription");
|
|
7212
7211
|
if (subscription === null) throw parameterMissing("subscription");
|
|
7212
|
+
if (!scope.account.subscriptions.get(subscription))
|
|
7213
|
+
throw resourceMissing("subscription", subscription, "subscription");
|
|
7213
7214
|
return jsonRes(
|
|
7214
7215
|
200,
|
|
7215
7216
|
await paginate(scope.account.subscriptionItems, params, {
|
|
@@ -11301,7 +11302,17 @@ var toAddress = (raw) => {
|
|
|
11301
11302
|
}
|
|
11302
11303
|
return out;
|
|
11303
11304
|
};
|
|
11305
|
+
var refuseEmptyCustomFields = (params) => {
|
|
11306
|
+
const customFields = params.invoice_settings?.custom_fields;
|
|
11307
|
+
if (!Array.isArray(customFields)) return;
|
|
11308
|
+
customFields.forEach((field, index) => {
|
|
11309
|
+
for (const key of ["name", "value"])
|
|
11310
|
+
if (field?.[key] === "")
|
|
11311
|
+
throw parameterInvalidEmpty(`invoice_settings[custom_fields][${index}][${key}]`);
|
|
11312
|
+
});
|
|
11313
|
+
};
|
|
11304
11314
|
var apply2 = (current, params) => {
|
|
11315
|
+
refuseEmptyCustomFields(params);
|
|
11305
11316
|
const next = { ...current, invoice_settings: { ...current.invoice_settings } };
|
|
11306
11317
|
if (params.address !== void 0)
|
|
11307
11318
|
next.address = params.address === "" ? null : toAddress(params.address);
|
|
@@ -11334,12 +11345,6 @@ var apply2 = (current, params) => {
|
|
|
11334
11345
|
if (params.invoice_settings !== void 0) {
|
|
11335
11346
|
const settings = params.invoice_settings;
|
|
11336
11347
|
if (settings.custom_fields !== void 0) {
|
|
11337
|
-
if (Array.isArray(settings.custom_fields))
|
|
11338
|
-
settings.custom_fields.forEach((field, index) => {
|
|
11339
|
-
for (const key of ["name", "value"])
|
|
11340
|
-
if (field?.[key] === "")
|
|
11341
|
-
throw parameterInvalidEmpty(`invoice_settings[custom_fields][${index}][${key}]`);
|
|
11342
|
-
});
|
|
11343
11348
|
next.invoice_settings.custom_fields = settings.custom_fields === "" ? [] : settings.custom_fields;
|
|
11344
11349
|
}
|
|
11345
11350
|
if (settings.default_payment_method !== void 0)
|
|
@@ -17669,4 +17674,4 @@ export {
|
|
|
17669
17674
|
createRuntime2 as createRuntime,
|
|
17670
17675
|
StripeAPI
|
|
17671
17676
|
};
|
|
17672
|
-
//# sourceMappingURL=chunk-
|
|
17677
|
+
//# sourceMappingURL=chunk-JOGJHELU.js.map
|