@stacksjs/defaults 0.75.367 → 0.75.370

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.
@@ -88,7 +88,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
88
88
  | `@stacksjs/socials` | [`stacks-socials`](../stacks-socials/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/index.ts) | 17 |
89
89
  | `@stacksjs/storage` | [`stacks-storage`](../stacks-storage/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/index.ts) | 42 |
90
90
  | `@stacksjs/strings` | [`stacks-strings`](../stacks-strings/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/strings/src/index.ts) | 7 |
91
- | `@stacksjs/testing` | [`stacks-testing`](../stacks-testing/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/index.ts) | 19 |
91
+ | `@stacksjs/testing` | [`stacks-testing`](../stacks-testing/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/index.ts) | 20 |
92
92
  | `@stacksjs/tinker` | [`stacks-repl`](../stacks-repl/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/tinker/src/index.ts) | 1 |
93
93
  | `@stacksjs/tunnel` | [`stacks-tunnel`](../stacks-tunnel/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/tunnel/src/index.ts) | 1 |
94
94
  | `@stacksjs/types` | [`stacks-types`](../stacks-types/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/types/src/index.ts) | 2 |
@@ -853,7 +853,7 @@ Read the entrypoint and package export map for re-exported or type-only surfaces
853
853
 
854
854
  Local source modules: [src/console.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/console.ts), [src/disposable-database.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/disposable-database.ts), [src/events.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/events.ts), [src/feature.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/feature.ts), [src/isolated.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/isolated.ts), [src/mail.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/mail.ts), [src/schema.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/schema.ts), [src/time.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/time.ts).
855
855
 
856
- Evidence directory: [19 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
856
+ Evidence directory: [20 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
857
857
 
858
858
  ### @stacksjs/tinker
859
859
 
@@ -148,7 +148,10 @@ with presentment-currency contributor shares or infer a fee refund from a charge
148
148
  fee when no fee was returned, and exact zero after the full fee was returned,
149
149
  including across settlement currencies. A partial foreign-currency fee return
150
150
  has null remaining/returned presentment cents and requires review; do not infer
151
- an FX amount. Same-currency returns use the provider's actual minor units.
151
+ an FX amount. When the application fee and charge share a currency, use the
152
+ fee's canonical `amount_refunded`, even when individual FeeRefund records settle
153
+ in another currency. Never sum those records across currencies; retain their
154
+ actual settlement amounts independently.
152
155
 
153
156
  `createConnectedAccount` makes a Managed Risk account unless you pass `type` or
154
157
  `controller` (`MANAGED_RISK_CONTROLLER`: Stripe carries losses, full Stripe
@@ -201,7 +204,7 @@ active status before its initial invoice is paid. The helper does not finalize
201
204
  invoices, collect payment, or implement the application's access policy.
202
205
 
203
206
  `collectDirectInvoice(invoiceId, account, { customer, subscription?, currency,
204
- platformFeePercent, approvedTotal, paymentMethod })` performs that collection
207
+ platformFeePercent, approvedTotal, paymentMethod? })` performs that collection
205
208
  step. `approvedTotal` is the inclusive minor-unit amount the buyer approved;
206
209
  the saved method must belong to the original merchant customer. It holds the
207
210
  invoice, prepares its exact after-tax fee, finalizes, verifies the actual invoice
@@ -212,6 +215,8 @@ finalizes without a charge. Results distinguish `paid`, `processing` and
212
215
  available. Do not grant access for processing or customer action. Network errors
213
216
  propagate for durable retry. This helper does not create purchases, establish
214
217
  customer consent or reverse access after a later refund; those remain app policy.
218
+ Without a saved method it returns the held invoice's payment page without a
219
+ charge attempt. Paid recovery needs no card.
215
220
 
216
221
  After a successful direct-charge refund, `creditDirectInvoiceRefund(invoiceId,
217
222
  account, refundId, [{ invoiceLineItem, amount }])` links it to the original
@@ -251,6 +256,10 @@ of setup creation, when Stripe still guarantees the idempotency key; older
251
256
  missing bindings require review, never another purchase. Renewals still need
252
257
  the app's durable `invoice.created` hold/collection path. Apply access policy
253
258
  from both the collection result and current subscription/refund state.
259
+ `DirectInvoicePurchaseExpiredError` is raised only when no bound purchase or
260
+ unbound customer resource was found. Before retiring that attempt, also check
261
+ the app's original invoice/subscription IDs. Unknown resources require review;
262
+ a replacement purchase always needs fresh buyer consent.
254
263
 
255
264
  `directInvoiceTaxFinancials(invoiceId, paymentIntentId, account)` reads canonical
256
265
  collected/credited gross, net and tax plus `requiresReview`. Read it under the
@@ -223,6 +223,8 @@ for (const dialect of ['sqlite', 'postgres'] as const) {
223
223
  Use it inside the isolated fixture after configuring its disposable database;
224
224
  it does not order model dependencies, disable constraints, or replace production
225
225
  migrations (for example, concurrent indexes require their own migration policy).
226
+ Standalone fixture scripts import it from `@stacksjs/testing/schema`; the root
227
+ testing barrel registers Bun test-runner hooks and is for `bun test` files.
226
228
 
227
229
  ## Browser tests: `@stacksjs/testing/browser`
228
230
 
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.367",
5
+ "version": "0.75.370",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.367",
5
+ "version": "0.75.370",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.367",
48
+ "@stacksjs/mobile": "0.75.370",
49
49
  "@stacksjs/sanitizer": "0.2.736",
50
50
  "@stacksjs/stx": "0.2.736",
51
51
  "@xterm/addon-fit": "^0.11.0",