@stacksjs/defaults 0.75.378 → 0.75.382

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.
@@ -50,8 +50,9 @@ re-exported CacheLock contract and selected driver separately.
50
50
 
51
51
  `createMemoryCache(options?)` accepts stdTTL, checkPeriod, maxKeys, useClones
52
52
  and prefix. Clone-on-read/write is enabled by default.
53
- `createRedisCache(options?)` accepts URL or host/port/credentials/database/TLS
54
- plus TTL/prefix options. `createSingleStoreCache(options?)` exposes the
53
+ `createRedisCache(options?)` accepts a URL, or host/port/username/password/
54
+ database/TLS, plus TTL/prefix options. A URL wins; otherwise the parts build
55
+ one, and `REDIS_URL` applies only when neither is given. `createSingleStoreCache(options?)` exposes the
55
56
  experimental SQL-backed cache. `createSqliteCache(options?)` keeps entries in
56
57
  a table of a SQLite file (`path`, `table`, `prefix`, `stdTTL`), so they outlive
57
58
  the process: use it for results that are expensive and safe to keep across
@@ -64,16 +65,31 @@ The `cache` export is the driver `config/cache.ts` selects (`driver`, with
64
65
  and once the app's config has loaded. With the default `driver: 'memory'` it
65
66
  answers from the `memory` instance itself. `cacheFromConfig(settings?)` builds
66
67
  the same choice explicitly; `resetConfiguredCache()` forgets it.
67
- The capability registry proves memory and a versioned Redis core/TTL contract;
68
- TLS/authenticated Redis deployments need separate provider evidence. SingleStore
68
+ `config/cache.ts` reads `REDIS_URL`, `REDIS_HOST`, `REDIS_PORT`,
69
+ `REDIS_USERNAME`, `REDIS_PASSWORD` and `REDIS_DB`, as `config/queue.ts` does.
70
+
71
+ The Redis cache lists, flushes and counts every key under `<prefix>:`, so its
72
+ prefix must not contain another subsystem's namespace: the queue keeps
73
+ `stacks:queue`, failed jobs `stacks:failed`, batches `stacks:batches` and
74
+ realtime `stacks:realtime:`. The shipped prefix is `stacks:cache`. An app still
75
+ on `stacks` flushes its job queue with its cache on a shared Redis;
76
+ `cacheFromConfig` warns once, and `redisNamespacesInside(prefix)` lists what a
77
+ prefix holds.
78
+ The capability registry proves memory, a versioned Redis core/TTL contract, a
79
+ connection built from host and port, and namespace isolation from the queue
80
+ and realtime; TLS/authenticated Redis deployments need separate provider
81
+ evidence. SingleStore
69
82
  has no dedicated service conformance matrix. Source:
70
83
  `storage/framework/core/config/src/capabilities.ts`.
71
84
 
72
85
  ## Tag invalidation and advanced patterns
73
86
 
74
87
  `StacksCache.tags(['products', 'tenant-7'])` creates a TaggedCache supporting
75
- put/set/setForever, remember/rememberForever, get/has and flush. Its tag index
76
- uses the same backend; process persistence depends on that backend. Tags label
88
+ put/set/setForever, remember/rememberForever, get/has and flush. Each tagged
89
+ key gets an index entry of its own on the same backend, carrying the key's TTL,
90
+ so a flush deletes what every process on a shared backend tagged, and the index
91
+ does not outlive its keys. Flush lists the tag with `keys()`, which is a SCAN on
92
+ Redis rather than a blocking KEYS. Process persistence depends on the backend. Tags label
77
93
  shared keys rather than granting tenant authorization. Construct an explicit
78
94
  tenant key/prefix as well when isolation matters.
79
95
 
@@ -89,7 +105,9 @@ are distinct from StacksCache and auth's RateLimiter.
89
105
  contract. `drivers/singlestore.ts` owns the experimental backend and
90
106
  `drivers/sqlite.ts` the durable file-backed one (`sqlite-cache.test.ts`).
91
107
  Retained tests: `ttl.test.ts`, `getorset-timeout.test.ts`,
92
- `tagged-flush-race.test.ts`, `redis-contract.test.ts` and
108
+ `tagged-flush-race.test.ts`, `tag-index-processes.test.ts`,
109
+ `sqlite-concurrent-open.test.ts`, `redis-contract.test.ts`,
110
+ `redis-config-connection.test.ts`, `redis-namespaces.test.ts` and
93
111
  `cache-factory.test.ts` under `core/cache/tests/`.
94
112
 
95
113
  ## Representation-aware keys
@@ -252,6 +252,8 @@ Limitations:
252
252
  Retained evidence:
253
253
 
254
254
  - [storage/framework/core/cache/tests/sqlite-cache.test.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/tests/sqlite-cache.test.ts)
255
+ - [storage/framework/core/cache/tests/sqlite-concurrent-open.test.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/tests/sqlite-concurrent-open.test.ts)
256
+ - [storage/framework/core/cache/tests/tag-index-processes.test.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/tests/tag-index-processes.test.ts)
255
257
 
256
258
  ## cache: redis
257
259
 
@@ -265,11 +267,13 @@ Prerequisites:
265
267
 
266
268
  Limitations:
267
269
 
268
- - The retained contract covers core cache and TTL operations; TLS/authenticated deployments require separate provider evidence.
270
+ - The retained contract covers core cache and TTL operations, a connection built from host and port, and namespace isolation from the queue and realtime; TLS/authenticated deployments require separate provider evidence.
269
271
 
270
272
  Retained evidence:
271
273
 
272
274
  - [storage/framework/core/cache/tests/redis-contract.test.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/tests/redis-contract.test.ts)
275
+ - [storage/framework/core/cache/tests/redis-config-connection.test.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/tests/redis-config-connection.test.ts)
276
+ - [storage/framework/core/cache/tests/redis-namespaces.test.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/tests/redis-namespaces.test.ts)
273
277
 
274
278
  ## cache: singlestore
275
279
 
@@ -23,7 +23,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
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) | 171 |
25
25
  | `@stacksjs/build` | [`stacks-build`](../stacks-build/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/build/src/index.ts) | 4 |
26
- | `@stacksjs/cache` | [`stacks-cache`](../stacks-cache/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/src/index.ts) | 14 |
26
+ | `@stacksjs/cache` | [`stacks-cache`](../stacks-cache/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/src/index.ts) | 18 |
27
27
  | `@stacksjs/calendar-api` | [`stacks-calendar`](../stacks-calendar/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/calendar-api/src/index.ts) | 2 |
28
28
  | `@stacksjs/charts` | [`stacks-charts`](../stacks-charts/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/charts/src/index.ts) | 3 |
29
29
  | `@stacksjs/chat` | [`stacks-chat`](../stacks-chat/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/chat/src/index.ts) | 5 |
@@ -75,8 +75,8 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
75
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) | 98 |
79
- | `@stacksjs/scheduler` | [`stacks-scheduler`](../stacks-scheduler/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/src/index.ts) | 14 |
78
+ | `@stacksjs/router` | [`stacks-router`](../stacks-router/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/router/src/index.ts) | 99 |
79
+ | `@stacksjs/scheduler` | [`stacks-scheduler`](../stacks-scheduler/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/src/index.ts) | 15 |
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) | 11 |
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 |
82
82
  | `@stacksjs/server` | [`stacks-server`](../stacks-server/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/index.ts) | 28 |
@@ -235,7 +235,7 @@ Read the entrypoint and package export map for re-exported or type-only surfaces
235
235
 
236
236
  Local source modules: [src/drivers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/src/drivers/index.ts), [src/key.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/src/key.ts).
237
237
 
238
- Evidence directory: [14 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
238
+ Evidence directory: [18 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
239
239
 
240
240
  ### @stacksjs/calendar-api
241
241
 
@@ -725,7 +725,7 @@ Declared runtime exports: `DASHBOARD_ROUTE_GROUPS`, `DEFAULT_ROUTE_BUNDLE_FEATUR
725
725
 
726
726
  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).
727
727
 
728
- Evidence directory: [98 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.
728
+ Evidence directory: [99 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.
729
729
 
730
730
  ### @stacksjs/scheduler
731
731
 
@@ -735,7 +735,7 @@ Read the entrypoint and package export map for re-exported or type-only surfaces
735
735
 
736
736
  Local source modules: [src/run.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/src/run.ts), [src/schedule.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/src/schedule.ts), [src/types.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/src/types.ts).
737
737
 
738
- Evidence directory: [14 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
738
+ Evidence directory: [15 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
739
739
 
740
740
  ### @stacksjs/search-engine
741
741
 
@@ -122,7 +122,7 @@ interface ScheduledJob {
122
122
 
123
123
  ### Timezone Type
124
124
 
125
- The `Timezone` type is a string union of ~70 IANA timezone identifiers (e.g., `'America/New_York'`, `'Europe/Berlin'`, `'Asia/Tokyo'`, `'UTC'`). Default is `'America/Los_Angeles'`.
125
+ The `Timezone` type is a string union of ~70 IANA timezone identifiers (e.g., `'America/New_York'`, `'Europe/Berlin'`, `'Asia/Tokyo'`, `'UTC'`). A task without `setTimeZone()` runs on `config.app.timezone`, or UTC when the app sets none, read when its next run is computed.
126
126
 
127
127
  ### Internal Scheduling Engine
128
128
 
@@ -359,7 +359,7 @@ export default {
359
359
 
360
360
  ## Gotchas
361
361
  - The Schedule constructor starts through a microtask after the synchronous chain; asynchronous configuration arrives too late
362
- - Default timezone is `'America/Los_Angeles'`, not UTC
362
+ - A task's default timezone is the app's (`config.app.timezone`, which `config/app.ts` ships as `'America/Los_Angeles'`), not a fixed zone; UTC when the app sets none
363
363
  - `everySecond()` uses `setInterval`, not cron -- it sets `intervalMs = 1000` and bypasses the cron parser entirely
364
364
  - The `Queue` class in `schedule.ts` is just an empty subclass of `Schedule` (`export class Queue extends Schedule {}`) -- it adds no functionality
365
365
  - `withoutOverlapping()` provides local file locking. `onOneServer()` adds PostgreSQL/MySQL advisory coordination where available
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.378",
5
+ "version": "0.75.382",
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.378",
5
+ "version": "0.75.382",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,9 +45,9 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.378",
49
- "@stacksjs/sanitizer": "0.2.744",
50
- "@stacksjs/stx": "0.2.744",
48
+ "@stacksjs/mobile": "0.75.382",
49
+ "@stacksjs/sanitizer": "0.2.752",
50
+ "@stacksjs/stx": "0.2.752",
51
51
  "@xterm/addon-fit": "^0.11.0",
52
52
  "@xterm/xterm": "^6.0.0",
53
53
  "ts-qr-codes": "^0.1.8"