@crvouga/mockingbird-service-stripe 2.3.1 → 2.3.2

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog — @crvouga/mockingbird-service-stripe
2
2
 
3
+ ## 2.3.2 (2026-10-05)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - preserve Unicode feature names ([d0656f4](https://github.com/crvouga/mockingbird/commit/d0656f49905c78c301024117e1b727765d6ade2d))
8
+ - reject blank marketing features ([9546103](https://github.com/crvouga/mockingbird/commit/9546103a40d0e9c6f7a14dde36f9af3a405ca83e))
9
+ - reject empty customer accounts ([de4c228](https://github.com/crvouga/mockingbird/commit/de4c228831a823ee85309d2722375b31571d5b88))
10
+ - stabilize parity coverage and comparisons ([32eb860](https://github.com/crvouga/mockingbird/commit/32eb860e36590079bde991bebc1d5cb887a6f6eb))
11
+
3
12
  ## 2.3.1 (2026-10-05)
4
13
 
5
14
  ### Fixes and improvements
@@ -2363,7 +2363,7 @@ var stateAdminRoutes = (routes) => {
2363
2363
  };
2364
2364
 
2365
2365
  // ../core/dist/version.js
2366
- var PACKAGE_VERSION = true ? "2.3.1" : UNRELEASED_VERSION;
2366
+ var PACKAGE_VERSION = true ? "2.3.2" : UNRELEASED_VERSION;
2367
2367
 
2368
2368
  // ../core/dist/signing.js
2369
2369
  var encoder = new TextEncoder();
@@ -3825,7 +3825,7 @@ var optionalString = (params, key, current) => {
3825
3825
  if (value === "") return null;
3826
3826
  return value;
3827
3827
  };
3828
- var strip = (value) => value.replace(/^[\s\0]+|[\s\0]+$/g, "");
3828
+ var strip = (value) => value.replace(/^[\t\n\v\f\r \0]+|[\t\n\v\f\r \0]+$/g, "");
3829
3829
  var strippedString = (params, key, current) => {
3830
3830
  const value = params[key];
3831
3831
  if (value === void 0) return current;
@@ -8080,6 +8080,7 @@ var subscriptionHandlers = (services) => {
8080
8080
  GetSubscriptions: async (context) => {
8081
8081
  const scope = requestScope(services, context);
8082
8082
  const params = queryParams(context);
8083
+ if (context.query.customer_account === "") throw parameterInvalidEmpty("customer_account");
8083
8084
  const customer = stringOf(params, "customer");
8084
8085
  if (customer !== null && !scope.account.customers.get(customer))
8085
8086
  throw resourceMissing("customer", customer, "customer", 400);
@@ -10205,7 +10206,7 @@ var productValidators = (mode, current, prefix = "") => {
10205
10206
  marketing_features: (params) => {
10206
10207
  if (!Array.isArray(params.marketing_features)) return;
10207
10208
  params.marketing_features.forEach((feature, index) => {
10208
- if (feature?.name === "")
10209
+ if (typeof feature?.name === "string" && strip(feature.name) === "")
10209
10210
  throw parameterInvalidEmpty(`${at("marketing_features")}[${index}][name]`);
10210
10211
  });
10211
10212
  },
@@ -10237,7 +10238,7 @@ var apply = (current, params, now) => {
10237
10238
  // Stripe trims each feature name.
10238
10239
  params.marketing_features.map((feature) => ({
10239
10240
  ...feature,
10240
- name: feature.name.trim()
10241
+ name: strip(feature.name)
10241
10242
  }))
10242
10243
  );
10243
10244
  next.metadata = mergeMetadata(current.metadata, params.metadata);
@@ -19215,4 +19216,4 @@ export {
19215
19216
  createRuntime2 as createRuntime,
19216
19217
  StripeAPI
19217
19218
  };
19218
- //# sourceMappingURL=chunk-I2MCMD7N.js.map
19219
+ //# sourceMappingURL=chunk-JTG65WGU.js.map