@stacksjs/defaults 0.75.451 → 0.75.452
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-browser/SKILL.md +10 -0
- package/ai/skills/stacks-native/CATALOG.md +8 -8
- package/ai/skills/stacks-objects/SKILL.md +17 -2
- package/ai/skills/stacks-storage/SKILL.md +7 -0
- package/ai/skills/stacks-utils/SKILL.md +35 -2
- package/ide/vscode/package.json +1 -1
- package/package.json +2 -2
|
@@ -113,3 +113,13 @@ composables/useAuth.ts/useApi.ts/csrf.ts/request-error.ts and utils/fetch.ts.
|
|
|
113
113
|
Tests: client-bundle-safety.test.ts, use-auth-refresh.test.ts (refresh, session
|
|
114
114
|
resilience, burst expiry, authGuard, handoff code), auth.test.ts, csrf.test.ts,
|
|
115
115
|
request-error.test.ts and api-url.test.ts under core/browser/tests.
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## Retry timing
|
|
119
|
+
|
|
120
|
+
`retry` and `calculateDelay` are available through the utilities entry. Retry
|
|
121
|
+
budgets must be finite non-negative safe integers; delays and backoff factors
|
|
122
|
+
must be finite non-negative numbers. Invalid options reject before invoking
|
|
123
|
+
work. Retry runs once plus the allowed retries, preserving the final error.
|
|
124
|
+
Backoff/jitter delays saturate at the platform timer maximum (2147483647 ms),
|
|
125
|
+
including numeric overflow. Large delays never fall through to one-ms timers.
|
|
@@ -19,7 +19,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
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) | 12 |
|
|
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) | 3 |
|
|
21
21
|
| `@stacksjs/auth` | [`stacks-auth`](../stacks-auth/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/index.ts) | 127 |
|
|
22
|
-
| `@stacksjs/browser` | [`stacks-browser`](../stacks-browser/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/index.ts) |
|
|
22
|
+
| `@stacksjs/browser` | [`stacks-browser`](../stacks-browser/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/index.ts) | 9 |
|
|
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) | 9 |
|
|
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) | 180 |
|
|
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) | 6 |
|
|
@@ -64,7 +64,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
64
64
|
| `@stacksjs/model-meta` | [`stacks-models`](../stacks-models/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/model-meta/src/index.ts) | 1 |
|
|
65
65
|
| `@stacksjs/newsletter` | [`stacks-newsletter`](../stacks-newsletter/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/newsletter/src/index.ts) | 7 |
|
|
66
66
|
| `@stacksjs/notifications` | [`stacks-notifications`](../stacks-notifications/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/notifications/src/index.ts) | 18 |
|
|
67
|
-
| `@stacksjs/objects` | [`stacks-objects`](../stacks-objects/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/objects/src/index.ts) |
|
|
67
|
+
| `@stacksjs/objects` | [`stacks-objects`](../stacks-objects/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/objects/src/index.ts) | 10 |
|
|
68
68
|
| `@stacksjs/orm` | [`stacks-orm`](../stacks-orm/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/orm/src/index.ts) | 77 |
|
|
69
69
|
| `@stacksjs/pagination` | [`stacks-pagination`](../stacks-pagination/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/pagination/src/index.ts) | 1 |
|
|
70
70
|
| `@stacksjs/path` | [`stacks-path`](../stacks-path/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/path/src/index.ts) | 13 |
|
|
@@ -86,14 +86,14 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
|
|
|
86
86
|
| `@stacksjs/slug` | [`stacks-slug`](../stacks-slug/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/slug/src/index.ts) | 5 |
|
|
87
87
|
| `@stacksjs/sms` | [`stacks-sms`](../stacks-sms/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/index.ts) | 6 |
|
|
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) | 18 |
|
|
89
|
-
| `@stacksjs/storage` | [`stacks-storage`](../stacks-storage/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/index.ts) |
|
|
89
|
+
| `@stacksjs/storage` | [`stacks-storage`](../stacks-storage/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/index.ts) | 49 |
|
|
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) | 11 |
|
|
91
91
|
| `@stacksjs/testing` | [`stacks-testing`](../stacks-testing/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/testing/src/index.ts) | 24 |
|
|
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 |
|
|
95
95
|
| `@stacksjs/ui` | [`stacks-ui`](../stacks-ui/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/ui/src/index.ts) | 6 |
|
|
96
|
-
| `@stacksjs/utils` | [`stacks-utils`](../stacks-utils/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/index.ts) |
|
|
96
|
+
| `@stacksjs/utils` | [`stacks-utils`](../stacks-utils/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/index.ts) | 28 |
|
|
97
97
|
| `@stacksjs/validation` | [`stacks-validation`](../stacks-validation/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/validation/src/index.ts) | 25 |
|
|
98
98
|
| `@stacksjs/video` | [`stacks-video`](../stacks-video/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/video/src/index.ts) | 3 |
|
|
99
99
|
| `@stacksjs/whois` | [`stacks-whois`](../stacks-whois/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/whois/src/index.ts) | 5 |
|
|
@@ -199,7 +199,7 @@ Declared runtime exports: `BrowserQueryBuilder`, `BrowserQueryError`, `browserAu
|
|
|
199
199
|
|
|
200
200
|
Local source modules: [src/auto-init.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/auto-init.ts), [src/composables/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/composables/index.ts), [src/model-loader.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/model-loader.ts), [src/types/globals.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/types/globals.ts), [src/utils/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/utils/index.ts).
|
|
201
201
|
|
|
202
|
-
Evidence directory: [
|
|
202
|
+
Evidence directory: [9 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
203
203
|
|
|
204
204
|
### @stacksjs/browser-extension
|
|
205
205
|
|
|
@@ -631,7 +631,7 @@ Declared runtime exports: `clearUndefined`, `deepMerge`, `hasOwnProperty`, `isKe
|
|
|
631
631
|
|
|
632
632
|
Local source modules: [src/transform.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/objects/src/transform.ts).
|
|
633
633
|
|
|
634
|
-
Evidence directory: [
|
|
634
|
+
Evidence directory: [10 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/objects/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
635
635
|
|
|
636
636
|
### @stacksjs/orm
|
|
637
637
|
|
|
@@ -843,7 +843,7 @@ Declared runtime exports: `PathSanitizeError`, `Storage`, `StorageManager`, `Upl
|
|
|
843
843
|
|
|
844
844
|
Local source modules: [src/adapters/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/adapters/index.ts), [src/bounded-text-file.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/bounded-text-file.ts), [src/completed-artifact-directory.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/completed-artifact-directory.ts), [src/copy.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/copy.ts), [src/delete.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/delete.ts), [src/drivers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/drivers/index.ts), [src/facade.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/facade.ts), [src/file-info.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/file-info.ts), [src/files.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/files.ts), [src/folders.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/folders.ts), [src/fs.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/fs.ts), [src/glob.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/glob.ts), [src/hash.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/hash.ts), [src/helpers.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/helpers.ts), [src/mime-verify.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/mime-verify.ts), [src/path-sanitize.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/path-sanitize.ts), [src/provision.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/provision.ts), [src/s3-presigned-post.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/s3-presigned-post.ts), [src/signed-url.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/signed-url.ts), [src/static-serve.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/static-serve.ts), [src/storage.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/storage.ts), [src/temporary-workspaces.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/temporary-workspaces.ts), [src/types.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/types.ts), [src/types/filesystem.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/types/filesystem.ts), [src/uploaded-file.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/uploaded-file.ts), [src/zip.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/zip.ts).
|
|
845
845
|
|
|
846
|
-
Evidence directory: [
|
|
846
|
+
Evidence directory: [49 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
847
847
|
|
|
848
848
|
### @stacksjs/strings
|
|
849
849
|
|
|
@@ -911,7 +911,7 @@ Declared runtime exports: `browserUtils`, `clamp`, `notNullish`, `retry`, `useOn
|
|
|
911
911
|
|
|
912
912
|
Local source modules: [src/bytes.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/bytes.ts), [src/clean.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/clean.ts), [src/colors.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/colors.ts), [src/config.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/config.ts), [src/debounce.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/debounce.ts), [src/detect.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/detect.ts), [src/equal.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/equal.ts), [src/errors.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/errors.ts), [src/export-size.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/export-size.ts), [src/find.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/find.ts), [src/git.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/git.ts), [src/hash.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/hash.ts), [src/helpers.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/helpers.ts), [src/macroable.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/macroable.ts), [src/markdown.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/markdown.ts), [src/merge.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/merge.ts), [src/observer.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/observer.ts), [src/pipe.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/pipe.ts), [src/pipeline.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/pipeline.ts), [src/safe-json.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/safe-json.ts), [src/size.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/size.ts), [src/versions.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/src/versions.ts).
|
|
913
913
|
|
|
914
|
-
Evidence directory: [
|
|
914
|
+
Evidence directory: [28 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/utils/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
|
|
915
915
|
|
|
916
916
|
### @stacksjs/validation
|
|
917
917
|
|
|
@@ -26,7 +26,7 @@ additional transforms re-exported from transform.ts.
|
|
|
26
26
|
function objectMap<K extends string, V, NK extends PropertyKey = K, NV = V>(
|
|
27
27
|
obj: Record<K, V>,
|
|
28
28
|
fn: (key: K, value: V) => [NK, NV] | undefined,
|
|
29
|
-
): Record<NK, NV
|
|
29
|
+
): Partial<Record<NK, NV>>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
The callback receives `(key, value)` and must return either:
|
|
@@ -61,7 +61,7 @@ function deepMerge<T extends object = object, S extends object = T>(
|
|
|
61
61
|
): DeepMerge<T, S>
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Recursively merges source objects into target
|
|
64
|
+
Recursively merges source objects into target, overlaying sources from left to right.
|
|
65
65
|
|
|
66
66
|
Key behaviors:
|
|
67
67
|
- Only merges "mergeable objects" (objects that are not arrays, checked via `isObject()` and `!Array.isArray()`)
|
|
@@ -86,6 +86,11 @@ built-in instance values while merging record keys recursively. A replaced Date
|
|
|
86
86
|
target no longer exposes Date methods. The authoritative type is in
|
|
87
87
|
`core/types/src/utils.ts`; verify consumers against built declarations.
|
|
88
88
|
|
|
89
|
+
Plain-record graph merges track source nodes per overlay. Self/mutual cycles
|
|
90
|
+
and shared nodes terminate and reuse the first destination for that source node.
|
|
91
|
+
Arrays and non-plain values remain atomic; later source overlays use fresh graph
|
|
92
|
+
tracking while updating the same target.
|
|
93
|
+
|
|
89
94
|
### objectPick -- Pick Properties by Key
|
|
90
95
|
```typescript
|
|
91
96
|
function objectPick<O extends object, T extends keyof O>(
|
|
@@ -198,6 +203,10 @@ parser. `getPath(source, path, fallback?)` reads a nested value;
|
|
|
198
203
|
`mapValues` preserves optional properties and omits symbol keys in its result type,
|
|
199
204
|
matching its enumerable string-key traversal. The pure `@stacksjs/objects/transform`
|
|
200
205
|
entry ships both JavaScript and declarations.
|
|
206
|
+
`omit` normalizes numeric exclusions to string property keys, as JavaScript does.
|
|
207
|
+
`objectMap` returns a partial record: a callback may omit entries, so narrow a
|
|
208
|
+
result value before assuming it exists.
|
|
209
|
+
|
|
201
210
|
`setPath(source, path, value)` performs a persistent update by copying containers
|
|
202
211
|
along the path and sharing unaffected siblings. Treat paths as application-owned
|
|
203
212
|
inputs; this helper is not a path authorization boundary. Array `length` updates
|
|
@@ -225,3 +234,9 @@ Retained evidence: `core/objects/tests/transform.test.ts`.
|
|
|
225
234
|
- `hasOwnProperty` accepts `null`/`undefined` objects without throwing.
|
|
226
235
|
- `objectPick` with `omitUndefined=false` (default) includes keys even if their values are `undefined`, as long as the key exists in the object.
|
|
227
236
|
- `@stacksjs/utils` does not re-export these. Its `merge` / `defu` is a separate merge that builds a new object.
|
|
237
|
+
|
|
238
|
+
Path inference normalizes numeric/string aliases and distributes finite union
|
|
239
|
+
steps. Broad string/number/template steps and open index-signature object sources
|
|
240
|
+
return `unknown`; narrow before using them. Length changes drop fixed tuple index
|
|
241
|
+
guarantees, and generic array results include possible holes. Numeric-looking
|
|
242
|
+
named siblings such as `-1` and `1.5` retain their own value types.
|
|
@@ -610,6 +610,13 @@ const files = getFiles('dir/', ['node_modules']) // with exclusions
|
|
|
610
610
|
deleteFiles('dir/', ['keep.txt']) // delete all except exclusions
|
|
611
611
|
```
|
|
612
612
|
|
|
613
|
+
Recursive deletion unlinks symlinks, including an explicit symlink root, without
|
|
614
|
+
traversing their targets. Listing skips root and descendant symlink entries and cycles. Symlink ancestors
|
|
615
|
+
below the longest cwd/temp anchor reject; platform aliases above it are accepted.
|
|
616
|
+
Exclusions protect paths.
|
|
617
|
+
Config updates copy own enumerable entries and preserve `__proto__` as data;
|
|
618
|
+
inherited fields/getters are not read.
|
|
619
|
+
|
|
613
620
|
### Config File Helper
|
|
614
621
|
|
|
615
622
|
```typescript
|
|
@@ -221,6 +221,8 @@ Pipeline.send('hello')
|
|
|
221
221
|
```
|
|
222
222
|
|
|
223
223
|
Internally uses `reduceRight` so pipes execute in order (first pipe wraps outermost).
|
|
224
|
+
`through()` snapshots its readonly input array. Builder-local `pipe()` calls and
|
|
225
|
+
later edits to the caller array do not change other pipelines.
|
|
224
226
|
|
|
225
227
|
## Markdown Tables (`markdown.ts`)
|
|
226
228
|
|
|
@@ -231,6 +233,7 @@ interface MarkdownTableOptions {
|
|
|
231
233
|
delimiter?: string // default: '|'
|
|
232
234
|
delimiterStart?: boolean // default: true
|
|
233
235
|
delimiterEnd?: boolean // default: true
|
|
236
|
+
escapeCells?: boolean // default: true; false accepts preformatted cells
|
|
234
237
|
alignDelimiter?: string // default: '-'
|
|
235
238
|
}
|
|
236
239
|
|
|
@@ -265,6 +268,11 @@ loadYaml(content) // alias for parseYaml
|
|
|
265
268
|
dumpYaml(object) // Bun.YAML.stringify(content), falls back to JSON.stringify
|
|
266
269
|
```
|
|
267
270
|
|
|
271
|
+
Tables normalize headers and data rows to the same column count. Text cells
|
|
272
|
+
escape literal backslashes and pipes and replace CR/LF with `<br>`, keeping one
|
|
273
|
+
cell from creating columns or rows. `escapeCells: false` preserves caller-owned
|
|
274
|
+
Markdown escaping. This is table structure handling, not an HTML sanitizer.
|
|
275
|
+
|
|
268
276
|
## Macroable (`macroable.ts`)
|
|
269
277
|
|
|
270
278
|
Laravel-inspired dynamic method registration on classes.
|
|
@@ -298,6 +306,13 @@ Enhanced.macro('newMethod', fn)
|
|
|
298
306
|
|
|
299
307
|
Static methods: `macro(name, fn, replace?)`, `mixin(obj, replace?)`, `hasMacro(name)`, `flushMacros()`, `getMacros()`.
|
|
300
308
|
|
|
309
|
+
Registrations belong to the receiving constructor in all three APIs. Descendants
|
|
310
|
+
see effective inherited macros; sibling mutations are isolated. Flush removes
|
|
311
|
+
only own registrations, restoring original descriptors and revealing inherited
|
|
312
|
+
methods again. Existing native methods need explicit `replace: true` (the third
|
|
313
|
+
argument); `constructor` is reserved. Failed installation publishes no registry
|
|
314
|
+
entry. `getMacros` includes effective inherited macro names.
|
|
315
|
+
|
|
301
316
|
## ResizeObserver (`observer.ts`)
|
|
302
317
|
|
|
303
318
|
```typescript
|
|
@@ -314,7 +329,12 @@ const stop = observeElementSize(element, (entry) => {
|
|
|
314
329
|
stop() // stop observing
|
|
315
330
|
```
|
|
316
331
|
|
|
317
|
-
The polyfill
|
|
332
|
+
The polyfill polls bounding-box width/height with `requestAnimationFrame` (or a
|
|
333
|
+
16-ms timeout). It delivers initial measurements and size changes, not position
|
|
334
|
+
changes or every frame. Callback errors still reach host error reporting while
|
|
335
|
+
monitoring continues. Unobserve/disconnect discard measurements and pending work;
|
|
336
|
+
reobserving starts with a new initial delivery. This simple fallback does not
|
|
337
|
+
implement native content/border/device-pixel box measurement distinctions.
|
|
318
338
|
|
|
319
339
|
## Deep Equality (`equal.ts`)
|
|
320
340
|
|
|
@@ -468,6 +488,16 @@ two corresponding holes compare equal. Host objects and Errors remain identity
|
|
|
468
488
|
comparisons. Read retained equal tests for a non-plain object rather than
|
|
469
489
|
assuming every object with similar printable fields is equal.
|
|
470
490
|
|
|
491
|
+
`retry` (re-exported from the browser package) validates a finite non-negative
|
|
492
|
+
safe-integer retry count before work starts. It runs once plus that retry budget.
|
|
493
|
+
Delay and factor must be finite non-negative numbers. `calculateDelay` saturates
|
|
494
|
+
exponential/jitter output at 2147483647 ms, preventing platform timeout overflow
|
|
495
|
+
from turning long backoffs into rapid retries.
|
|
496
|
+
|
|
497
|
+
`setEnvValue` preserves literal dollar replacement sequences for existing and
|
|
498
|
+
appended keys. Unknown-error helpers guard accessors/proxies and return safe
|
|
499
|
+
fallbacks instead of replacing the original error during extraction.
|
|
500
|
+
|
|
471
501
|
## Gotchas
|
|
472
502
|
- `merge()` concatenates arrays instead of replacing them -- this differs from spread/Object.assign behavior
|
|
473
503
|
- `mergeDefaults()`/`defu()` gives precedence to the FIRST argument (the object), not the defaults
|
|
@@ -480,4 +510,7 @@ assuming every object with similar printable fields is equal.
|
|
|
480
510
|
- `detectIndent` in utils (`detect.ts`) is a different, simpler implementation than the one in strings (`detect-indent.ts`)
|
|
481
511
|
- `isDeepEqual` uses `getTypeName` from `@stacksjs/types` for type checking
|
|
482
512
|
- Version comparison uses `Bun.semver.order()` which returns -1, 0, or 1
|
|
483
|
-
- `cleanProject()`
|
|
513
|
+
- `cleanProject()` removes lock files and generated artifacts using native filesystem
|
|
514
|
+
operations, including nested framework `dist` and `node_modules` directories.
|
|
515
|
+
Symlink entries may be unlinked as artifacts, but aliased parents and external
|
|
516
|
+
targets are never traversed.
|
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.452",
|
|
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.452",
|
|
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.
|
|
48
|
+
"@stacksjs/mobile": "0.75.452",
|
|
49
49
|
"@stacksjs/sanitizer": "0.2.794",
|
|
50
50
|
"@stacksjs/stx": "0.2.794",
|
|
51
51
|
"@xterm/addon-fit": "^0.11.0",
|