@noy-db/hub 0.2.0-pre.30 → 0.2.0-pre.31
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/dist/adapter/index.d.ts +9 -0
- package/dist/adapter/index.js +14 -0
- package/dist/attestation/index.d.ts +1 -1
- package/dist/attestation/index.js +3 -3
- package/dist/blobs/index.d.ts +3 -3
- package/dist/bundle/index.d.ts +3 -3
- package/dist/bundle/index.js +1 -1
- package/dist/{chunk-Y6YUWZTS.js → chunk-L5HHBOMS.js} +2 -2
- package/dist/{chunk-BVKLJBJJ.js → chunk-W5NVNJDX.js} +2 -1
- package/dist/{chunk-BVKLJBJJ.js.map → chunk-W5NVNJDX.js.map} +1 -1
- package/dist/consent/index.d.ts +2 -2
- package/dist/{decrypt-partition-Mhjh6nnG.d.ts → decrypt-partition-CXS5KopB.d.ts} +1 -1
- package/dist/derivations/index.d.ts +3 -3
- package/dist/{dev-unlock-DJ3IhgY9.d.ts → dev-unlock-CnHTTVea.d.ts} +1 -1
- package/dist/guards/index.d.ts +3 -3
- package/dist/{hash-DLwkYf1d.d.ts → hash-oc5paYl0.d.ts} +1 -1
- package/dist/history/index.d.ts +3 -3
- package/dist/i18n/index.d.ts +2 -2
- package/dist/{index-CMRIx_zx.d.ts → index-BmhGztUi.d.ts} +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +2 -2
- package/dist/kernel/index.d.ts +2 -2
- package/dist/materialized-views/index.d.ts +3 -3
- package/dist/{mime-magic-CacDBwYp.d.ts → mime-magic-JeLKHRng.d.ts} +1 -1
- package/dist/{noydb-5MIBD77B.js → noydb-NAU2DTFP.js} +2 -2
- package/dist/noydb-NAU2DTFP.js.map +1 -0
- package/dist/overlay-views/index.d.ts +3 -3
- package/dist/periods/index.d.ts +2 -2
- package/dist/session/index.d.ts +3 -3
- package/dist/shadow/index.d.ts +2 -2
- package/dist/snapshots/index.d.ts +2 -2
- package/dist/store/index.d.ts +2 -2
- package/dist/sync/index.d.ts +1 -1
- package/dist/team/index.d.ts +2 -2
- package/dist/{transition-guard-J04-jime.d.ts → transition-guard-Dy3NioQr.d.ts} +1 -1
- package/dist/tx/index.d.ts +2 -2
- package/dist/{with-materialized-view-DNfzC5lH.d.ts → with-materialized-view-DIVeez0W.d.ts} +1 -1
- package/dist/{with-overlayed-view-qk3lbhOd.d.ts → with-overlayed-view-DVZrc5Hb.d.ts} +1 -1
- package/dist/{with-rollup-Dd3_ZG4b.d.ts → with-rollup-CbU-O4wP.d.ts} +1 -1
- package/package.json +62 -221
- package/dist/aggregate/index.cjs +0 -1144
- package/dist/aggregate/index.cjs.map +0 -1
- package/dist/aggregate/index.d.cts +0 -39
- package/dist/attestation/index.cjs +0 -305
- package/dist/attestation/index.cjs.map +0 -1
- package/dist/attestation/index.d.cts +0 -54
- package/dist/blobs/index.cjs +0 -1967
- package/dist/blobs/index.cjs.map +0 -1
- package/dist/blobs/index.d.cts +0 -48
- package/dist/bundle/index.cjs +0 -41045
- package/dist/bundle/index.cjs.map +0 -1
- package/dist/bundle/index.d.cts +0 -187
- package/dist/consent/index.cjs +0 -204
- package/dist/consent/index.cjs.map +0 -1
- package/dist/consent/index.d.cts +0 -27
- package/dist/crdt/index.cjs +0 -152
- package/dist/crdt/index.cjs.map +0 -1
- package/dist/crdt/index.d.cts +0 -30
- package/dist/decrypt-partition-C0iDpbSd.d.cts +0 -558
- package/dist/derivations/index.cjs +0 -469
- package/dist/derivations/index.cjs.map +0 -1
- package/dist/derivations/index.d.cts +0 -74
- package/dist/dev-unlock-0Z6yxfS7.d.cts +0 -263
- package/dist/discriminant-BN9REW3o.d.cts +0 -60
- package/dist/errors-BAWO5Z5a.d.cts +0 -1500
- package/dist/forget/index.cjs +0 -43
- package/dist/forget/index.cjs.map +0 -1
- package/dist/forget/index.d.cts +0 -1
- package/dist/guards/index.cjs +0 -455
- package/dist/guards/index.cjs.map +0 -1
- package/dist/guards/index.d.cts +0 -39
- package/dist/hash-Db8ncXGr.d.cts +0 -63
- package/dist/history/index.cjs +0 -1245
- package/dist/history/index.cjs.map +0 -1
- package/dist/history/index.d.cts +0 -65
- package/dist/i18n/index.cjs +0 -1280
- package/dist/i18n/index.cjs.map +0 -1
- package/dist/i18n/index.d.cts +0 -41
- package/dist/index-BMmajblo.d.cts +0 -362
- package/dist/index-C1SC1EPe.d.cts +0 -1325
- package/dist/index-xJEPkvMb.d.cts +0 -93
- package/dist/index.cjs +0 -48100
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -1050
- package/dist/indexing/index.cjs +0 -803
- package/dist/indexing/index.cjs.map +0 -1
- package/dist/indexing/index.d.cts +0 -36
- package/dist/kernel/index.cjs +0 -751
- package/dist/kernel/index.cjs.map +0 -1
- package/dist/kernel/index.d.cts +0 -11
- package/dist/lazy-builder-eYZzLEL1.d.cts +0 -304
- package/dist/materialized-views/index.cjs +0 -1518
- package/dist/materialized-views/index.cjs.map +0 -1
- package/dist/materialized-views/index.d.cts +0 -187
- package/dist/mime-magic-sdMzsfVK.d.cts +0 -103
- package/dist/overlay-views/index.cjs +0 -399
- package/dist/overlay-views/index.cjs.map +0 -1
- package/dist/overlay-views/index.d.cts +0 -102
- package/dist/periods/index.cjs +0 -1041
- package/dist/periods/index.cjs.map +0 -1
- package/dist/periods/index.d.cts +0 -24
- package/dist/predicate-BmhBSPCH.d.cts +0 -267
- package/dist/query/index.cjs +0 -3480
- package/dist/query/index.cjs.map +0 -1
- package/dist/query/index.d.cts +0 -4
- package/dist/sealed-record/index.cjs +0 -139
- package/dist/sealed-record/index.cjs.map +0 -1
- package/dist/sealed-record/index.d.cts +0 -123
- package/dist/session/index.cjs +0 -495
- package/dist/session/index.cjs.map +0 -1
- package/dist/session/index.d.cts +0 -48
- package/dist/shadow/index.cjs +0 -133
- package/dist/shadow/index.cjs.map +0 -1
- package/dist/shadow/index.d.cts +0 -19
- package/dist/snapshots/index.cjs +0 -937
- package/dist/snapshots/index.cjs.map +0 -1
- package/dist/snapshots/index.d.cts +0 -30
- package/dist/store/index.cjs +0 -1091
- package/dist/store/index.cjs.map +0 -1
- package/dist/store/index.d.cts +0 -501
- package/dist/strategy-BSxFXGzb.d.cts +0 -110
- package/dist/strategy-mJExw4LQ.d.cts +0 -1069
- package/dist/sync/index.cjs +0 -1062
- package/dist/sync/index.cjs.map +0 -1
- package/dist/sync/index.d.cts +0 -45
- package/dist/team/index.cjs +0 -2805
- package/dist/team/index.cjs.map +0 -1
- package/dist/team/index.d.cts +0 -120
- package/dist/transition-guard-tWZIsaXe.d.cts +0 -165
- package/dist/tx/index.cjs +0 -614
- package/dist/tx/index.cjs.map +0 -1
- package/dist/tx/index.d.cts +0 -39
- package/dist/types-CdVfiQgt.d.cts +0 -15275
- package/dist/ulid-DRH25k3y.d.cts +0 -66
- package/dist/util/index.cjs +0 -237
- package/dist/util/index.cjs.map +0 -1
- package/dist/util/index.d.cts +0 -79
- package/dist/with-materialized-view-DfgPcvi9.d.cts +0 -27
- package/dist/with-overlayed-view-Cvfkx1lg.d.cts +0 -13
- package/dist/with-rollup-nIxo7h9z.d.cts +0 -47
- /package/dist/{noydb-5MIBD77B.js.map → adapter/index.js.map} +0 -0
- /package/dist/{chunk-Y6YUWZTS.js.map → chunk-L5HHBOMS.js.map} +0 -0
- /package/dist/{types-DHn9lEP0.d.ts → index-DHn9lEP0.d.ts} +0 -0
package/dist/util/index.d.cts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export { i as isDiscriminant } from '../discriminant-BN9REW3o.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Target-profile aware filename sanitizer.
|
|
5
|
-
*
|
|
6
|
-
* Pure string in / string out. No filesystem access, no I/O. Use this
|
|
7
|
-
* at the boundary where a user-supplied filename meets a storage
|
|
8
|
-
* destination — local FS, ZIP archive, S3 key, URL path, SMB share —
|
|
9
|
-
* to defuse the canonical 14-class footgun before it reaches that
|
|
10
|
-
* destination.
|
|
11
|
-
*
|
|
12
|
-
* ## Threat model
|
|
13
|
-
*
|
|
14
|
-
* 1. Path injection — `..`, NUL bytes, `\` on POSIX, absolute paths.
|
|
15
|
-
* 2. Windows reserved names — `CON`, `PRN`, `AUX`, `NUL`,
|
|
16
|
-
* `COM1-9`, `LPT1-9`, with or without an extension.
|
|
17
|
-
* 3. Windows reserved chars — `< > : " / \ | ? *` plus ASCII 0-31.
|
|
18
|
-
* 4. Trailing `.` and ` ` on Windows / SMB.
|
|
19
|
-
* 5. Unicode normalization drift — same display, different bytes →
|
|
20
|
-
* "two files with the same name" sync ghosts.
|
|
21
|
-
* 6. Bidi override spoofing — U+202E reversing `harmless.exe.txt`
|
|
22
|
-
* into `harmless.txt.exe`.
|
|
23
|
-
* 7. URL `+` ambiguity in S3 presigned URLs.
|
|
24
|
-
* 8. ZIP general-purpose-flag bit 11 (UTF-8 filename) optional in
|
|
25
|
-
* pre-2006 readers.
|
|
26
|
-
* 9-14. Length caps, leading/trailing whitespace + controls,
|
|
27
|
-
* `.DS_Store`-style hidden noise, etc.
|
|
28
|
-
*
|
|
29
|
-
* ## Always-on transforms (every profile)
|
|
30
|
-
*
|
|
31
|
-
* - NFC normalize (`String.prototype.normalize('NFC')`).
|
|
32
|
-
* - Reject NUL — hard fail, not strip. Silent strip enables a
|
|
33
|
-
* classic truncation bypass (`safe.txt\0.exe` → `safe.txt`).
|
|
34
|
-
* - Strip bidi overrides (`U+202A..U+202E`, `U+2066..U+2069`).
|
|
35
|
-
* - Trim leading/trailing whitespace and ASCII control chars.
|
|
36
|
-
*
|
|
37
|
-
* ## Non-goals (i18n boundary policy, )
|
|
38
|
-
*
|
|
39
|
-
* - No transliteration.
|
|
40
|
-
* - No locale-aware slugging.
|
|
41
|
-
* - No script-specific segmentation.
|
|
42
|
-
*
|
|
43
|
-
* @module
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* One of seven storage destinations the sanitizer knows how to defang
|
|
47
|
-
* for. Pick the most restrictive that covers your write site:
|
|
48
|
-
* `'macos-smb'` is the safe default for "I don't know where these
|
|
49
|
-
* files end up but they're going to a real filesystem somewhere."
|
|
50
|
-
*/
|
|
51
|
-
type FilenameProfile = 'posix' | 'windows' | 'macos-smb' | 'zip' | 'url-path' | 's3-key' | 'opaque';
|
|
52
|
-
interface SanitizeFilenameOptions {
|
|
53
|
-
/** Target-destination profile. */
|
|
54
|
-
readonly profile: FilenameProfile;
|
|
55
|
-
/**
|
|
56
|
-
* Override the per-profile length cap. Useful when leaving headroom
|
|
57
|
-
* for a collision suffix — e.g. `maxBytes: 240` on a `posix` write
|
|
58
|
-
* site that wants 15 bytes of slack for `-1`, `-2`, …
|
|
59
|
-
*/
|
|
60
|
-
readonly maxBytes?: number;
|
|
61
|
-
/**
|
|
62
|
-
* Required when `profile === 'opaque'`. The opaque profile replaces
|
|
63
|
-
* the entire input with `${opaqueId}.${ext}` (extension preserved
|
|
64
|
-
* from the input when present).
|
|
65
|
-
*/
|
|
66
|
-
readonly opaqueId?: string;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Sanitize a filename for a target-destination profile. Pure: same
|
|
70
|
-
* input + options always returns the same output, no I/O.
|
|
71
|
-
*
|
|
72
|
-
* Returns the sanitized name. Throws {@link FilenameSanitizationError}
|
|
73
|
-
* when the input cannot be made safe at all (NUL byte, empty after
|
|
74
|
-
* normalization, missing `opaqueId` for the opaque profile,
|
|
75
|
-
* `..` segment that would fall out of any reasonable target).
|
|
76
|
-
*/
|
|
77
|
-
declare function sanitizeFilename(name: string, opts: SanitizeFilenameOptions): string;
|
|
78
|
-
|
|
79
|
-
export { type FilenameProfile, type SanitizeFilenameOptions, sanitizeFilename };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { aK as MaterializedViewStrategy, aL as MaterializedViewStrategyHandle } from './types-CdVfiQgt.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Register a materialized view: a declared query whose result is
|
|
5
|
-
* persisted as a queryable collection and kept fresh as sources
|
|
6
|
-
* change. Writes go through the standard `Collection.put` pipeline;
|
|
7
|
-
* refresh-driven deletes route through `Collection._internalDelete` so
|
|
8
|
-
* user `onDelete` guards on the output collection aren't tripped by
|
|
9
|
-
* housekeeping.
|
|
10
|
-
*
|
|
11
|
-
* Two registration modes:
|
|
12
|
-
* - **single-source** — declare `query: (db) => Query<TRow>`; the
|
|
13
|
-
* dependency analyzer derives source collections from the plan.
|
|
14
|
-
* - **UNION** — declare `unionSources: [{ collection, map }, ...]`
|
|
15
|
-
* plus optional `groupBy` + `aggregate`; the executor reads each
|
|
16
|
-
* arm, maps to the unified row shape, concatenates, then groups
|
|
17
|
-
* and aggregates.
|
|
18
|
-
*
|
|
19
|
-
* The two modes are mutually exclusive — exactly one of `query` /
|
|
20
|
-
* `unionSources` must be set at registration time.
|
|
21
|
-
*
|
|
22
|
-
* See docs/superpowers/specs/2026-05-20-dim14-mv-v2-design.md (single-source v2)
|
|
23
|
-
* and docs/superpowers/specs/2026-05-21-dim14-mv-multikey-and-union.md (UNION).
|
|
24
|
-
*/
|
|
25
|
-
declare function withMaterializedView<TRow extends Record<string, unknown>>(spec: MaterializedViewStrategy<TRow>): MaterializedViewStrategyHandle;
|
|
26
|
-
|
|
27
|
-
export { withMaterializedView as w };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { aM as OverlayedViewStrategy, aR as OverlayedViewStrategyHandle } from './types-CdVfiQgt.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Register a read-shadow overlay: bind an MV-owned base collection to
|
|
5
|
-
* a user-writable overlay so consumers can express operator-editable
|
|
6
|
-
* lifecycles as one declarative block (MV v2 spec § Composition
|
|
7
|
-
* with operator-editable lifecycle).
|
|
8
|
-
*
|
|
9
|
-
* See docs/superpowers/specs/2026-05-20-dim14-mv-v2-design.md.
|
|
10
|
-
*/
|
|
11
|
-
declare function withOverlayedView(spec: OverlayedViewStrategy): OverlayedViewStrategyHandle;
|
|
12
|
-
|
|
13
|
-
export { withOverlayedView as w };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { aC as DerivationStrategy, aG as DerivationStrategyHandle } from './types-CdVfiQgt.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Register a deterministic derivation: one source collection → one or
|
|
5
|
-
* more typed outputs, computed by the user's `derive` function on
|
|
6
|
-
* plaintext after DEK unwrap. Outputs are encrypted with the same DEK
|
|
7
|
-
* as the source and written via the standard `Collection.put` path.
|
|
8
|
-
*
|
|
9
|
-
* See docs/superpowers/specs/2026-05-01-dim14-derivation-v1-design.md.
|
|
10
|
-
*/
|
|
11
|
-
declare function withDerivation<TSource extends Record<string, unknown>, TOutputs extends Record<string, Record<string, unknown>>>(spec: DerivationStrategy<TSource, TOutputs>): DerivationStrategyHandle;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* `withRollup` — aggregate many child records onto a single field of their
|
|
15
|
-
* parent (#376 slice 2). The reverse of a join: instead of reading children
|
|
16
|
-
* on demand, the parent carries a maintained summary.
|
|
17
|
-
*
|
|
18
|
-
* ```ts
|
|
19
|
-
* withRollup<Sale, Buyer>({
|
|
20
|
-
* from: 'sales', // child collection (the trigger)
|
|
21
|
-
* key: 'buyerId', // FK on the child → parent id
|
|
22
|
-
* into: 'buyers', // parent collection
|
|
23
|
-
* field: 'revenueByYear', // field on the parent to maintain
|
|
24
|
-
* compute: (sales) => groupSumByYear(sales, 'total'),
|
|
25
|
-
* })
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* On every write OR delete of a `from` record, the parent at id `child[key]`
|
|
29
|
-
* is recomputed: `compute(allChildren where child[key] === parentId)` is
|
|
30
|
-
* patched onto `parent[field]`. A parent write also recomputes its own
|
|
31
|
-
* aggregate (so a parent created after its children still fills in). Only the
|
|
32
|
-
* `field` is touched — the rest of the parent record is never clobbered — and
|
|
33
|
-
* a value-equality guard suppresses no-op writes. The aggregate is gap-free
|
|
34
|
-
* with respect to child inserts, updates, and deletes.
|
|
35
|
-
*
|
|
36
|
-
* Desugars to a `withDerivation` strategy carrying a `rollup` marker; dispatch
|
|
37
|
-
* handles it without invoking the executor. Eager-only in this slice.
|
|
38
|
-
*/
|
|
39
|
-
declare function withRollup<TChild extends Record<string, unknown> = Record<string, unknown>, TParent extends Record<string, unknown> = Record<string, unknown>>(config: {
|
|
40
|
-
from: string;
|
|
41
|
-
key: keyof TChild & string;
|
|
42
|
-
into: string;
|
|
43
|
-
field: keyof TParent & string;
|
|
44
|
-
compute: (children: TChild[]) => unknown;
|
|
45
|
-
}): DerivationStrategyHandle;
|
|
46
|
-
|
|
47
|
-
export { withRollup as a, withDerivation as w };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|