@stacksjs/defaults 0.75.236 → 0.75.238
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/ai/skills/stacks-auth/SKILL.md +9 -1
- package/ai/skills/stacks-dependencies/SKILL.md +27 -14
- package/ai/skills/stacks-native/CATALOG.md +9 -9
- package/ai/skills/stacks-realtime/SKILL.md +12 -0
- package/ai/skills/stacks-router/SKILL.md +31 -0
- package/ai/skills/stacks-testing/SKILL.md +5 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +2 -2
|
@@ -212,6 +212,14 @@ authenticated and CSRF protected.
|
|
|
212
212
|
|
|
213
213
|
## Authorization Gates (gate.ts)
|
|
214
214
|
|
|
215
|
+
Gate registrations, policies and before/after callbacks are shared by native
|
|
216
|
+
module copies in one JavaScript process, including separately bundled Actions.
|
|
217
|
+
`Gate.flush()` clears those registrations across every copy. This shares no
|
|
218
|
+
request identity, token or authorization decision. Native `AuthorizationResponse`
|
|
219
|
+
objects can cross bundle copies; arbitrary objects, forged prototypes and
|
|
220
|
+
accessor fields are rejected. A conflicting shared-state version/shape refuses
|
|
221
|
+
module initialization. This does not synchronize different processes or Workers.
|
|
222
|
+
|
|
215
223
|
### Gate Functions
|
|
216
224
|
- `define<T>(ability: string, callback: GateCallback<T>): void`
|
|
217
225
|
- `policy(model: string | { name }, policyClass: new () => Policy): void`
|
|
@@ -225,7 +233,7 @@ authenticated and CSRF protected.
|
|
|
225
233
|
- `all(abilities[], user, ...args): Promise<boolean>`
|
|
226
234
|
- `none(abilities[], user, ...args): Promise<boolean>`
|
|
227
235
|
- `authorize(ability, user, ...args): Promise<AuthorizationResponse>` - throws on deny
|
|
228
|
-
- `inspect(ability, user, ...args): Promise<AuthorizationResponse>` -
|
|
236
|
+
- `inspect(ability, user, ...args): Promise<AuthorizationResponse>` - detailed result; invalid callback returns throw
|
|
229
237
|
- `has(ability): boolean`
|
|
230
238
|
- `hasPolicy(model): boolean`
|
|
231
239
|
- `abilities(): string[]`
|
|
@@ -97,25 +97,38 @@ bun run build:reset # Full reset: rm deps → reinstall → generate →
|
|
|
97
97
|
|
|
98
98
|
## Lockfiles
|
|
99
99
|
|
|
100
|
-
A Stacks
|
|
100
|
+
A Stacks workspace commits two lockfiles with separate ownership:
|
|
101
101
|
|
|
102
|
-
- `bun.lock`
|
|
103
|
-
- `pantry.lock`
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
- `bun.lock` owns the complete JavaScript graph in `node_modules/`.
|
|
103
|
+
- `pantry.lock` owns the system toolchain and explicitly declared Pantry
|
|
104
|
+
packages in `pantry/`. It also records workspace declarations, but Pantry
|
|
105
|
+
0.11.102 and later delegates workspace JavaScript installs to the selected
|
|
106
|
+
package manager instead of installing a second npm graph.
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
Use the published Pantry version pinned by the repository's CI. A normal
|
|
109
|
+
install migrates legacy Pantry npm shadows after checking their recorded and
|
|
110
|
+
installed identities. Do not remove those entries or directories by hand.
|
|
111
|
+
Native platform records can differ between hosts. Review the generated
|
|
112
|
+
changes and use the repository's lock guards: an allowed platform addition
|
|
113
|
+
does not excuse stale workspace declarations or a lost system-toolchain block.
|
|
112
114
|
|
|
113
115
|
**Regenerating.** Use the repository's declared, Pantry-managed Bun. Change the
|
|
114
116
|
ranges, run `bun install`, then `pantry install --ignore-scripts --quiet`, and
|
|
115
|
-
commit both lockfiles with the manifests.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
commit both lockfiles with the manifests. These are real dependency installs,
|
|
118
|
+
which can download native packages and invoke the JavaScript package manager;
|
|
119
|
+
they are not metadata-only operations. The native CLI has no supported
|
|
120
|
+
`install --lockfile-only` mode. Pantry 0.11.103 and later forwards
|
|
121
|
+
`--ignore-scripts` to the JavaScript package manager as well as suppressing
|
|
122
|
+
Pantry project hooks. On 0.11.102 the flag does not suppress JavaScript
|
|
123
|
+
lifecycle scripts; use the qualified 0.11.103 or later when that policy matters.
|
|
124
|
+
A plain `pantry install` can also activate project services and run
|
|
125
|
+
`postDatabaseSetup` or `postSetup` hooks, including migrations and seeding.
|
|
126
|
+
|
|
127
|
+
After migration, run `bun install --frozen-lockfile` and
|
|
128
|
+
`pantry install --frozen-lockfile --ignore-scripts --quiet`, and verify that
|
|
129
|
+
neither committed lockfile changes. Frozen mode rejects a legacy JavaScript
|
|
130
|
+
shadow graph that still needs migration; resolve it through the normal install
|
|
131
|
+
before checking the frozen graph.
|
|
119
132
|
|
|
120
133
|
Check `head -2 bun.lock` says `lockfileVersion: 2`; an older Bun on PATH
|
|
121
134
|
downgrades it.
|
|
@@ -18,7 +18,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
18
18
|
| `@stacksjs/api` | [`stacks-api`](../stacks-api/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/api/src/index.ts) | 9 |
|
|
19
19
|
| `@stacksjs/arrays` | [`stacks-arrays`](../stacks-arrays/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/arrays/src/index.ts) | 6 |
|
|
20
20
|
| `@stacksjs/audio` | [`stacks-audio`](../stacks-audio/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/audio/src/index.ts) | 2 |
|
|
21
|
-
| `@stacksjs/auth` | [`stacks-auth`](../stacks-auth/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/index.ts) |
|
|
21
|
+
| `@stacksjs/auth` | [`stacks-auth`](../stacks-auth/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/index.ts) | 119 |
|
|
22
22
|
| `@stacksjs/browser` | [`stacks-browser`](../stacks-browser/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/index.ts) | 8 |
|
|
23
23
|
| `@stacksjs/browser-extension` | [`stacks-browser-extension`](../stacks-browser-extension/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser-extension/src/index.ts) | 7 |
|
|
24
24
|
| `@stacksjs/buddy` | [`stacks-buddy`](../stacks-buddy/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/src/index.ts) | 151 |
|
|
@@ -72,10 +72,10 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
72
72
|
| `@stacksjs/push` | [`stacks-push`](../stacks-push/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/index.ts) | 6 |
|
|
73
73
|
| `@stacksjs/query-builder` | [`stacks-query-builder`](../stacks-query-builder/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/query-builder/src/index.ts) | 6 |
|
|
74
74
|
| `@stacksjs/queue` | [`stacks-queue`](../stacks-queue/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/index.ts) | 48 |
|
|
75
|
-
| `@stacksjs/realtime` | [`stacks-realtime`](../stacks-realtime/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/index.ts) |
|
|
75
|
+
| `@stacksjs/realtime` | [`stacks-realtime`](../stacks-realtime/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/index.ts) | 12 |
|
|
76
76
|
| `@stacksjs/registry` | [`stacks-registry`](../stacks-registry/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/registry/src/index.ts) | 1 |
|
|
77
77
|
| `@stacksjs/repl` | [`stacks-repl`](../stacks-repl/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/repl/src/index.ts) | 2 |
|
|
78
|
-
| `@stacksjs/router` | [`stacks-router`](../stacks-router/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/index.ts) |
|
|
78
|
+
| `@stacksjs/router` | [`stacks-router`](../stacks-router/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/index.ts) | 93 |
|
|
79
79
|
| `@stacksjs/scheduler` | [`stacks-scheduler`](../stacks-scheduler/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/src/index.ts) | 13 |
|
|
80
80
|
| `@stacksjs/search-engine` | [`stacks-search-engine`](../stacks-search-engine/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/search-engine/src/index.ts) | 10 |
|
|
81
81
|
| `@stacksjs/security` | [`stacks-security`](../stacks-security/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/security/src/index.ts) | 11 |
|
|
@@ -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) |
|
|
91
|
+
| `@stacksjs/testing` | [`stacks-testing`](../stacks-testing/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/index.ts) | 17 |
|
|
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 |
|
|
@@ -185,7 +185,7 @@ Declared runtime exports: `DEFAULT_ROLE_PACKS`, `createBqbRbacStore`, `generateT
|
|
|
185
185
|
|
|
186
186
|
Local source modules: [src/authentication.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/authentication.ts), [src/authenticator.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/authenticator.ts), [src/authorizable.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/authorizable.ts), [src/browser-session.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/browser-session.ts), [src/client.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/client.ts), [src/cookie-auth.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/cookie-auth.ts), [src/credential-user.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/credential-user.ts), [src/email-verification.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/email-verification.ts), [src/gate.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/gate.ts), [src/magic-link.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/magic-link.ts), [src/middleware.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/middleware.ts), [src/oauth-authorization-codes.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-authorization-codes.ts), [src/oauth-authorization-endpoint.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-authorization-endpoint.ts), [src/oauth-authorization-requests.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-authorization-requests.ts), [src/oauth-authorization-response.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-authorization-response.ts), [src/oauth-authorization.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-authorization.ts), [src/oauth-browser-session.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-browser-session.ts), [src/oauth-client-registration.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-client-registration.ts), [src/oauth-consent.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-consent.ts), [src/oauth-delegated-access.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-delegated-access.ts), [src/oauth-dynamic-registration.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-dynamic-registration.ts), [src/oauth-grants.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-grants.ts), [src/oauth-introspection.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-introspection.ts), [src/oauth-metadata.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-metadata.ts), [src/oauth-pkce.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-pkce.ts), [src/oauth-protected-resource.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-protected-resource.ts), [src/oauth-provider.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-provider.ts), [src/oauth-pruning.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-pruning.ts), [src/oauth-revocation.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-revocation.ts), [src/oauth-server.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-server.ts), [src/oauth-token-endpoint.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-token-endpoint.ts), [src/oauth-token-exchange.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-token-exchange.ts), [src/oauth-token-request.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-token-request.ts), [src/oauth-token-response.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/oauth-token-response.ts), [src/page-gate.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/page-gate.ts), [src/passkey.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/passkey.ts), [src/passkeys.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/passkeys.ts), [src/password/reset.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/password/reset.ts), [src/permissions.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/permissions.ts), [src/policy.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/policy.ts), [src/rate-limiter.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/rate-limiter.ts), [src/rbac-seed.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/rbac-seed.ts), [src/rbac-store-bqb.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/rbac-store-bqb.ts), [src/rbac.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/rbac.ts), [src/referrals.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/referrals.ts), [src/register.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/register.ts), [src/request-token.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/request-token.ts), [src/session-auth.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/session-auth.ts), [src/session-handoff.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/session-handoff.ts), [src/socials.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/socials.ts), [src/team.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/team.ts), [src/tokens.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/tokens.ts), [src/two-factor.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/two-factor.ts), [src/user.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/user.ts).
|
|
187
187
|
|
|
188
|
-
Evidence directory: [
|
|
188
|
+
Evidence directory: [119 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
189
189
|
|
|
190
190
|
### @stacksjs/browser
|
|
191
191
|
|
|
@@ -697,7 +697,7 @@ Declared runtime exports: `LegacyBroadcast`, `StacksChannel`, `channel`, `create
|
|
|
697
697
|
|
|
698
698
|
Local source modules: [src/broadcast.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/broadcast.ts), [src/channel.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/channel.ts), [src/emit.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/emit.ts), [src/replay-buffer.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/replay-buffer.ts), [src/server-instance.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/server-instance.ts), [src/stream.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/stream.ts), [src/ws.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/ws.ts).
|
|
699
699
|
|
|
700
|
-
Evidence directory: [
|
|
700
|
+
Evidence directory: [12 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
701
701
|
|
|
702
702
|
### @stacksjs/registry
|
|
703
703
|
|
|
@@ -719,11 +719,11 @@ Evidence directory: [2 retained tests](https://github.com/stacksjs/stacks/blob/m
|
|
|
719
719
|
|
|
720
720
|
Guidance: [`stacks-router`](../stacks-router/SKILL.md). Source: [storage/framework/core/router/src/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/index.ts).
|
|
721
721
|
|
|
722
|
-
Declared runtime exports: `DASHBOARD_ROUTE_GROUPS`, `DEFAULT_ROUTE_BUNDLE_FEATURES`, `DEFAULT_ROUTE_REGISTRY`, `DatabaseSessionStore`, `EncryptedSessionStore`, `FileSessionStore`, `JSON_CONTENT_TYPE`, `MemorySessionStore`, `Middleware`, `PathParamError`, `RedisSessionStore`, `RequestBodyError`, `appRouteRegistry`, `assertRouteMiddlewareResolvable`, `bundleMounts`, `cacheRedisConnection`, `cacheRequestQuery`, `checkApplicationHealth`, `clearCsrfModuleCache`, `clearCurrentRequest`, `clearMiddlewareCache`, `clearRateLimit`, `clearRouteModelBindings`, `clearTrackedQueries`, `clientAddress`, `configureViewDirectories`, `createErrorResponse`, `createMiddlewareErrorResponse`, `createNotFoundResponse`, `createSessionStore`, `createStacksRouter`, `createStacksSessionStore`, `createTypedRouter`, `createValidationErrorResponse`, `dashboardGroupMiddleware`, `defineMiddleware`, `defineRouteModelBinding`, `describeUnknownDashboardGroups`, `disableViewRouting`, `enhanceRequest`, `fallbackStorage`, `findUnresolvableRouteMiddleware`, `getCurrentRequest`, `getQueryShapeCounts`, `getTraceId`, `installMiddlewareHotReload`, `isApiRequest`, `isRouterAction`, `listNamedRoutes`, `listRegisteredRoutes`, `listRootMountedAppRoutes`, `loadMiddlewareHandlers`, `loadRoutes`, `mountedDefaultRouteBundles`, `parseJsonText`, `rateLimit`, `rateLimitScale`, `rateLimitStatus`, `readJsonBody`, `readTextBody`, `request`, `resetBootHooks`, `resetRateLimiters`, `resetSharedRateLimitStorage`, `resolveDashboardAccess`, `resolveRouteModel`, `route`, `routeModelBindings`, `routeParams`, `runBootHooks`, `runHealthProbes`, `runWithRequest`, `safePathParam`, `sanitizePathParam`, `scaledLimit`, `serve`, `serverResponse`, `setCurrentRequest`, `setRouteModelFallback`, `sharedRateLimitStorage`, `signUrl`, `signedUrl`, `stream`, `trackQuery`, `trustedProxies`, `url`, `useRateLimitStorage`, `verifySignedUrl`, `verifySignedUrlMiddleware`, `warnOnMultipleRouterInstances`, `withTraceId`, `wrapAction`.
|
|
722
|
+
Declared runtime exports: `DASHBOARD_ROUTE_GROUPS`, `DEFAULT_ROUTE_BUNDLE_FEATURES`, `DEFAULT_ROUTE_REGISTRY`, `DatabaseSessionStore`, `EncryptedSessionStore`, `FileSessionStore`, `JSON_CONTENT_TYPE`, `MemorySessionStore`, `Middleware`, `PathParamError`, `RedisSessionStore`, `RequestBodyError`, `appRouteRegistry`, `assertRouteMiddlewareResolvable`, `bundleMounts`, `cacheRedisConnection`, `cacheRequestQuery`, `checkApplicationHealth`, `clearCsrfModuleCache`, `clearCurrentRequest`, `clearMiddlewareCache`, `clearRateLimit`, `clearRouteModelBindings`, `clearTrackedQueries`, `clientAddress`, `configureViewDirectories`, `createErrorResponse`, `createMiddlewareErrorResponse`, `createNotFoundResponse`, `createSessionStore`, `createStacksRouter`, `createStacksSessionStore`, `createTypedRouter`, `createValidationErrorResponse`, `dashboardGroupMiddleware`, `defineMiddleware`, `defineRouteModelBinding`, `describeUnknownDashboardGroups`, `disableViewRouting`, `enhanceRequest`, `fallbackStorage`, `findUnresolvableRouteMiddleware`, `getCurrentRequest`, `getQueryShapeCounts`, `getTraceId`, `installMiddlewareHotReload`, `isApiRequest`, `isRouterAction`, `listNamedRoutes`, `listRedirectRoutes`, `listRegisteredRoutes`, `listRootMountedAppRoutes`, `loadMiddlewareHandlers`, `loadRoutes`, `mountedDefaultRouteBundles`, `parseJsonText`, `rateLimit`, `rateLimitScale`, `rateLimitStatus`, `readJsonBody`, `readTextBody`, `request`, `resetBootHooks`, `resetRateLimiters`, `resetSharedRateLimitStorage`, `resolveDashboardAccess`, `resolveRouteModel`, `route`, `routeModelBindings`, `routeParams`, `runBootHooks`, `runHealthProbes`, `runWithRequest`, `safePathParam`, `sanitizePathParam`, `scaledLimit`, `serve`, `serverResponse`, `setCurrentRequest`, `setRouteModelFallback`, `sharedRateLimitStorage`, `signUrl`, `signedUrl`, `stream`, `trackQuery`, `trustedProxies`, `url`, `useRateLimitStorage`, `verifySignedUrl`, `verifySignedUrlMiddleware`, `warnOnMultipleRouterInstances`, `withTraceId`, `wrapAction`.
|
|
723
723
|
|
|
724
724
|
Local source modules: [src/api-shape.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/api-shape.ts), [src/body.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/body.ts), [src/dashboard-access.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/dashboard-access.ts), [src/encrypted-session-store.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/encrypted-session-store.ts), [src/error-handler.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/error-handler.ts), [src/health.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/health.ts), [src/json.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/json.ts), [src/middleware.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/middleware.ts), [src/path-sanitize.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/path-sanitize.ts), [src/rate-limit.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/rate-limit.ts), [src/request-augmentation.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/request-augmentation.ts), [src/request-context.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/request-context.ts), [src/route-loader.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/route-loader.ts), [src/route-model-binding.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/route-model-binding.ts), [src/security-settings.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/security-settings.ts), [src/session-factory.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/session-factory.ts), [src/signed-url.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/signed-url.ts), [src/stacks-router.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/stacks-router.ts), [src/typed-router.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/typed-router.ts).
|
|
725
725
|
|
|
726
|
-
Evidence directory: [
|
|
726
|
+
Evidence directory: [93 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
727
727
|
|
|
728
728
|
### @stacksjs/scheduler
|
|
729
729
|
|
|
@@ -851,7 +851,7 @@ Read the entrypoint and package export map for re-exported or type-only surfaces
|
|
|
851
851
|
|
|
852
852
|
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/time.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/time.ts).
|
|
853
853
|
|
|
854
|
-
Evidence directory: [
|
|
854
|
+
Evidence directory: [17 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.
|
|
855
855
|
|
|
856
856
|
### @stacksjs/tinker
|
|
857
857
|
|
|
@@ -391,6 +391,18 @@ resolve current credentials, grants and expiry on every call; context binding
|
|
|
391
391
|
does not freeze authorization facts. Pass the request's abort signal. Cancellation, failed authorization and slow consumers remove the hook.
|
|
392
392
|
Streams bound both queued events and pending authorization work (64 by default).
|
|
393
393
|
|
|
394
|
+
Optional `onEnqueue(chunk, broadcast)` runs after successful native enqueue with
|
|
395
|
+
the exact queued Uint8Array and original `{ channel, event, data }` metadata.
|
|
396
|
+
Connected/heartbeat metadata is null. Do not mutate the chunk. This observes
|
|
397
|
+
local queue admission, not remote receipt or reader demand. Optional `onClose()`
|
|
398
|
+
runs once after removing the subscription, heartbeat and abort listener. These
|
|
399
|
+
callbacks are captured before initial authorization awaits, keep the subscriber's
|
|
400
|
+
async context and preserve their options receiver. They run synchronously;
|
|
401
|
+
enqueue observer throws or accidental promise rejections close the stream.
|
|
402
|
+
Close observer failures are contained. Initial unauthorized responses create no
|
|
403
|
+
subscription and do not notify close. The optional hooks leave wire bytes,
|
|
404
|
+
authorization, capacity and existing callers unchanged.
|
|
405
|
+
|
|
394
406
|
STX's `useBroadcastStream({ request, endpoint, onMessage, onConnected })` makes
|
|
395
407
|
fresh authenticated requests using the application's injected transport, reconnects
|
|
396
408
|
with backoff, and cancels on `close()`. Re-read durable state in `onConnected`;
|
|
@@ -32,6 +32,29 @@ route.options('/users', handler)
|
|
|
32
32
|
route.health() // GET /health endpoint
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
### Redirects
|
|
36
|
+
|
|
37
|
+
Laravel's `Route::redirect` and `Route::permanentRedirect`:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
route.redirect('/here', '/there') // 302
|
|
41
|
+
route.redirect('/here', '/there', 307) // any of 301, 302, 303, 307, 308
|
|
42
|
+
route.permanentRedirect('/old', '/new') // 301
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The incoming query string is carried onto the target unless the target names
|
|
46
|
+
its own. Group prefixes apply, and the call returns a chainable route.
|
|
47
|
+
|
|
48
|
+
A redirect for a page path goes in a root-mounted route file (`'web'` in
|
|
49
|
+
`app/Routes.ts`, or any entry with `prefix: ''`). The views server answers
|
|
50
|
+
page paths and never loads route files, so `buddy generate:types` writes those
|
|
51
|
+
redirects to `storage/framework/auto-imports/routes.ts` (`routeRedirects`) and
|
|
52
|
+
both `buddy dev` and `buddy serve` answer them before looking for a page: no
|
|
53
|
+
`config/server.ts` proxy rule and no hop to the API. Re-run
|
|
54
|
+
`generate:types` after adding one (CI's barrel check catches a stale map).
|
|
55
|
+
Exact paths only; a `{param}` redirect stays an API route. A rule in
|
|
56
|
+
`config/server.ts` `redirects` wins a clash.
|
|
57
|
+
|
|
35
58
|
### Zero-allocation static responses
|
|
36
59
|
|
|
37
60
|
Use `staticResponse()` only when the response is final at registration time and
|
|
@@ -98,6 +121,14 @@ route.group({ prefix: '/api/v1', middleware: ['auth', 'throttle'] }, () => {
|
|
|
98
121
|
- Action object: an imported action, passed directly — see typed routes below
|
|
99
122
|
- Controller: `'Controllers/UserController@index'` — calls controller method
|
|
100
123
|
|
|
124
|
+
Generated Action registries keep their source `.ts` targets. For current
|
|
125
|
+
`app/Actions/` files, the loader uses a colocated regular `.js` file only when
|
|
126
|
+
the exact source target is absent. An existing source always wins, including
|
|
127
|
+
when its import fails. Nested Actions and app overrides follow the same rule.
|
|
128
|
+
Packaged defaults, controllers and middleware keep their own resolution.
|
|
129
|
+
This supports native app-build output; it does not qualify a complete server
|
|
130
|
+
image or Docker deployment.
|
|
131
|
+
|
|
101
132
|
## The strings are typed
|
|
102
133
|
|
|
103
134
|
Action paths, middleware aliases and route names are all checked at compile
|
|
@@ -249,6 +249,11 @@ expect(pageAuditClean(report)).toBe(true) // no duplicate /api/ requests, failed
|
|
|
249
249
|
live-reload stream (`*/_stx/hmr*`) with a day-long retry so a save mid-run cannot reload the
|
|
250
250
|
page, accepts JavaScript dialogs and records them in `errors`, removes "HeadlessChrome" from the
|
|
251
251
|
user agent, and passes `--use-mock-keychain`. `profile` keeps one profile across relaunches.
|
|
252
|
+
- **One Chrome per process, a browser context per `launch()`**: same executable, headless mode
|
|
253
|
+
and `args` share the process; each launch gets its own cookies, storage, cache and service
|
|
254
|
+
workers (`Network.clearBrowserCookies` clears only its own). `close()` disposes the context and
|
|
255
|
+
the Chrome lingers 1.5 s for the next launch; `closeSharedBrowsers()` stops it now. `profile`,
|
|
256
|
+
`shared: false` or `STACKS_BROWSER_SHARED=0` get a Chrome of their own.
|
|
252
257
|
- **Pausing requests next to live reload.** Chrome keeps one `Fetch.enable` pattern set per
|
|
253
258
|
session (a second call replaces it, `Fetch.disable` drops all) and sends every paused request to
|
|
254
259
|
every listener, so the session layers them. `await cdp.intercept([{ urlPattern: '*/api/slow*' }],
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.238",
|
|
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.
|
|
5
|
+
"version": "0.75.238",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@iconify-json/f7": "^1.2.2",
|
|
46
46
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
47
|
-
"@stacksjs/mobile": "0.75.
|
|
47
|
+
"@stacksjs/mobile": "0.75.238",
|
|
48
48
|
"@stacksjs/sanitizer": "^0.2.534",
|
|
49
49
|
"@xterm/addon-fit": "^0.11.0",
|
|
50
50
|
"@xterm/xterm": "^6.0.0",
|