cursedbelt-core 2.1.0 → 2.1.1
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/core/activity/index.d.ts +2 -2
- package/dist/core/activity/index.js +1 -1
- package/dist/core/activity/model.d.ts +2 -2
- package/dist/core/analytics/index.d.ts +2 -2
- package/dist/core/analytics/index.js +2 -2
- package/dist/core/category/index.d.ts +3 -3
- package/dist/core/category/index.js +2 -2
- package/dist/core/category/memoryStore.d.ts +1 -1
- package/dist/core/category/memoryStore.js +1 -1
- package/dist/core/category/tree.d.ts +1 -1
- package/dist/core/colorScheme/index.d.ts +1 -1
- package/dist/core/colorScheme/index.js +1 -1
- package/dist/core/folder-tree/actions.d.ts +1 -1
- package/dist/core/folder-tree/actions.js +1 -1
- package/dist/core/folder-tree/index.d.ts +3 -3
- package/dist/core/folder-tree/index.js +3 -3
- package/dist/core/folder-tree/tree.js +1 -1
- package/dist/core/master-lock/index.d.ts +4 -4
- package/dist/core/master-lock/index.js +4 -4
- package/dist/core/master-lock/wire.d.ts +1 -1
- package/dist/core/media/ffmpeg.d.ts +1 -1
- package/dist/core/media/format.d.ts +1 -1
- package/dist/core/media/index.d.ts +12 -12
- package/dist/core/media/index.js +11 -11
- package/dist/core/media/mediaItem.d.ts +1 -1
- package/dist/core/media/renderPlan.d.ts +1 -1
- package/dist/core/media/renderPlan.js +1 -1
- package/dist/core/media/validate.d.ts +1 -1
- package/dist/core/media/validate.js +1 -1
- package/dist/core/navigation/coverageTest.d.ts +1 -1
- package/dist/core/navigation/coverageTest.js +1 -1
- package/dist/core/navigation/index.d.ts +6 -6
- package/dist/core/navigation/index.js +6 -6
- package/dist/core/navigation/migrateNavPreferences.d.ts +1 -1
- package/dist/core/navigation/navigationSelectors.d.ts +1 -1
- package/dist/core/navigation/navigationSelectors.js +1 -1
- package/dist/core/navigation/searchCatalogue.d.ts +1 -1
- package/dist/core/palette/fuzzyRank.d.ts +1 -1
- package/dist/core/palette/index.d.ts +3 -3
- package/dist/core/palette/index.js +3 -3
- package/dist/core/sharing/index.d.ts +2 -2
- package/dist/core/sharing/index.js +1 -1
- package/dist/core/tokens/registry.d.ts +2 -2
- package/dist/core/tokens/registry.js +1 -1
- package/dist/core/uiScale/index.d.ts +2 -2
- package/dist/core/uiScale/index.js +2 -2
- package/dist/core/uiScale/uiScaleStore.js +1 -1
- package/dist/core/wire/__fixtures__/rowsMarshalWorker.js +1 -1
- package/dist/core/wire/index.d.ts +4 -4
- package/dist/core/wire/index.js +4 -4
- package/dist/core/wire/ingress.d.ts +1 -1
- package/dist/core/wire/ingress.js +3 -3
- package/dist/core/wire/marshalWorker.d.ts +1 -1
- package/dist/core/wire/marshalWorker.js +2 -2
- package/dist/core/wire/marshalling.js +1 -1
- package/dist/ctgr/chunkAccumulator.d.ts +1 -1
- package/dist/ctgr/chunkAccumulator.js +2 -2
- package/dist/ctgr/chunkStore.d.ts +1 -1
- package/dist/ctgr/chunkStore.js +2 -2
- package/dist/ctgr/codec.d.ts +1 -1
- package/dist/ctgr/codec.js +5 -5
- package/dist/ctgr/index.d.ts +9 -9
- package/dist/ctgr/index.js +9 -9
- package/dist/ctgr/v0compat.d.ts +1 -1
- package/dist/ctgr/v0compat.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +3 -3
- package/package.json +2 -2
- package/src/config/appConfig.spec.ts +1 -1
- package/src/core/activity/index.ts +2 -2
- package/src/core/activity/model.ts +2 -2
- package/src/core/analytics/index.ts +2 -2
- package/src/core/analytics/range.spec.ts +1 -1
- package/src/core/analytics/schedule.spec.ts +1 -1
- package/src/core/category/category.spec.ts +1 -1
- package/src/core/category/index.ts +3 -3
- package/src/core/category/memoryStore.ts +2 -2
- package/src/core/category/tree.ts +1 -1
- package/src/core/color.spec.ts +1 -1
- package/src/core/colorScheme/colorScheme.spec.ts +1 -1
- package/src/core/colorScheme/index.ts +1 -1
- package/src/core/download.spec.ts +1 -1
- package/src/core/duplicates/index.spec.ts +1 -1
- package/src/core/events/ccEventBus.spec.ts +1 -1
- package/src/core/file-tree/fileTreeModel.spec.ts +1 -1
- package/src/core/folder-tree/actions.spec.ts +2 -2
- package/src/core/folder-tree/actions.ts +2 -2
- package/src/core/folder-tree/index.ts +3 -3
- package/src/core/folder-tree/path.spec.ts +1 -1
- package/src/core/folder-tree/tree.spec.ts +1 -1
- package/src/core/folder-tree/tree.ts +1 -1
- package/src/core/master-lock/index.ts +4 -4
- package/src/core/master-lock/kdf.spec.ts +2 -2
- package/src/core/master-lock/presence.spec.ts +1 -1
- package/src/core/master-lock/wire.spec.ts +1 -1
- package/src/core/master-lock/wire.ts +1 -1
- package/src/core/media/bgRemoval.spec.ts +1 -1
- package/src/core/media/ffmpeg.spec.ts +2 -2
- package/src/core/media/ffmpeg.ts +1 -1
- package/src/core/media/format.spec.ts +1 -1
- package/src/core/media/format.ts +1 -1
- package/src/core/media/index.ts +12 -12
- package/src/core/media/mediaItem.spec.ts +2 -2
- package/src/core/media/mediaItem.ts +1 -1
- package/src/core/media/renderPlan.spec.ts +1 -1
- package/src/core/media/renderPlan.ts +2 -2
- package/src/core/media/segment.spec.ts +1 -1
- package/src/core/media/size.spec.ts +1 -1
- package/src/core/media/trim.spec.ts +1 -1
- package/src/core/media/validate.spec.ts +2 -2
- package/src/core/media/validate.ts +2 -2
- package/src/core/media/videoCuts.spec.ts +1 -1
- package/src/core/navigation/coverageTest.ts +2 -2
- package/src/core/navigation/index.ts +6 -6
- package/src/core/navigation/migrateNavPreferences.ts +1 -1
- package/src/core/navigation/navigation.spec.ts +1 -1
- package/src/core/navigation/navigationSelectors.ts +1 -1
- package/src/core/navigation/searchCatalogue.ts +1 -1
- package/src/core/net/reconnectSchedule.spec.ts +1 -1
- package/src/core/palette/fuzzyRank.ts +1 -1
- package/src/core/palette/index.ts +3 -3
- package/src/core/palette/palette.spec.ts +4 -4
- package/src/core/schema/projection.spec.ts +1 -1
- package/src/core/sharing/index.ts +2 -2
- package/src/core/sharing/model.spec.ts +1 -1
- package/src/core/tokens/registry.spec.ts +1 -1
- package/src/core/tokens/registry.ts +2 -2
- package/src/core/uiScale/index.ts +2 -2
- package/src/core/uiScale/uiScale.spec.ts +1 -1
- package/src/core/uiScale/uiScaleStore.ts +1 -1
- package/src/core/wire/__fixtures__/rowsMarshalWorker.ts +1 -1
- package/src/core/wire/index.ts +4 -4
- package/src/core/wire/ingress.spec.ts +2 -2
- package/src/core/wire/ingress.ts +3 -3
- package/src/core/wire/marshalWorker.spec.ts +2 -2
- package/src/core/wire/marshalWorker.ts +2 -2
- package/src/core/wire/marshalling.spec.ts +1 -1
- package/src/core/wire/marshalling.ts +1 -1
- package/src/core/wire/wireHub.spec.ts +1 -1
- package/src/ctgr/chunkAccumulator.ts +3 -3
- package/src/ctgr/chunkStore.spec.ts +2 -2
- package/src/ctgr/chunkStore.ts +3 -3
- package/src/ctgr/codec.spec.ts +4 -4
- package/src/ctgr/codec.ts +5 -5
- package/src/ctgr/index.ts +9 -9
- package/src/ctgr/v0compat.spec.ts +2 -2
- package/src/ctgr/v0compat.ts +3 -3
- package/src/index.ts +2 -2
- package/src/testTmpRoot.spec.ts +1 -1
- package/src/testing/index.ts +3 -3
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
* - Inconsistency errors (e.g., second chunk claims different total count) delete the entry immediately; recovery requires retransmitting all chunks from the client
|
|
62
62
|
* - The service itself is a singleton; do NOT create multiple instances per server or request thread
|
|
63
63
|
*/
|
|
64
|
-
import type { CtgrDecoded } from './types';
|
|
64
|
+
import type { CtgrDecoded } from './types.js';
|
|
65
65
|
/**
|
|
66
66
|
* Configuration for ChunkAccumulator resource limits and timing behavior.
|
|
67
67
|
*
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
* - Inconsistency errors (e.g., second chunk claims different total count) delete the entry immediately; recovery requires retransmitting all chunks from the client
|
|
62
62
|
* - The service itself is a singleton; do NOT create multiple instances per server or request thread
|
|
63
63
|
*/
|
|
64
|
-
import { decodePayload, parseChunk } from './codec';
|
|
65
|
-
import { sha256Hex } from './digest';
|
|
64
|
+
import { decodePayload, parseChunk } from './codec.js';
|
|
65
|
+
import { sha256Hex } from './digest.js';
|
|
66
66
|
/**
|
|
67
67
|
* ChunkAccumulator — The hardened service for multi-chunk payload assembly.
|
|
68
68
|
*
|
package/dist/ctgr/chunkStore.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* It NEVER throws: a malformed/corrupt/oversized payload returns an `Error` the
|
|
10
10
|
* middleware maps to a 400; an intermediate chunk returns `false` (→ 202).
|
|
11
11
|
*/
|
|
12
|
-
import { decodePayload, parseChunk } from './codec';
|
|
13
|
-
import { sha256Hex } from './digest';
|
|
12
|
+
import { decodePayload, parseChunk } from './codec.js';
|
|
13
|
+
import { sha256Hex } from './digest.js';
|
|
14
14
|
export class ChunkStore {
|
|
15
15
|
entries = new Map();
|
|
16
16
|
maxInFlight;
|
package/dist/ctgr/codec.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CtgrDecoded, type CtgrMethod, type EncodedRequest, type EncodeOpts, type UploadedFile } from './types';
|
|
1
|
+
import { type CtgrDecoded, type CtgrMethod, type EncodedRequest, type EncodeOpts, type UploadedFile } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Encode a mutating request into one or more `/ctgr<XX>` GET-twin chunks. Small
|
|
4
4
|
* bodies become a single chunk; large bodies gzip (when over the threshold) and split
|
package/dist/ctgr/codec.js
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* double-base64'd and whose swap/reverse was trivially-reversible obfuscation, not
|
|
12
12
|
* protection — the real protection (getOnly JWT claim + CSRF guard) is unchanged.
|
|
13
13
|
*/
|
|
14
|
-
import { fromBase64, fromBase64url, toBase64url } from './base64url';
|
|
15
|
-
import { gunzip, gzip } from './compress';
|
|
16
|
-
import { crc32 } from './crc32';
|
|
17
|
-
import { sha256Hex } from './digest';
|
|
18
|
-
import { ABBREV_TO_METHOD, CTGR_WIRE_VERSION, METHOD_TO_ABBREV, } from './types';
|
|
14
|
+
import { fromBase64, fromBase64url, toBase64url } from './base64url.js';
|
|
15
|
+
import { gunzip, gzip } from './compress.js';
|
|
16
|
+
import { crc32 } from './crc32.js';
|
|
17
|
+
import { sha256Hex } from './digest.js';
|
|
18
|
+
import { ABBREV_TO_METHOD, CTGR_WIRE_VERSION, METHOD_TO_ABBREV, } from './types.js';
|
|
19
19
|
const DEFAULT_CHUNK_SIZE = 1800;
|
|
20
20
|
const DEFAULT_GZIP_THRESHOLD = 1024;
|
|
21
21
|
const textEncoder = new TextEncoder();
|
package/dist/ctgr/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { fromBase64, fromBase64url, toBase64, toBase64url } from './base64url';
|
|
2
|
-
export { ChunkAccumulator, type ChunkAccumulatorConfig, } from './chunkAccumulator';
|
|
3
|
-
export { ChunkStore, type ChunkStoreOpts } from './chunkStore';
|
|
4
|
-
export { decodePayload, decodeRequest, encodeRequest, extractFiles, type ParsedChunk, parseChunk, } from './codec';
|
|
5
|
-
export { gunzip, gzip } from './compress';
|
|
6
|
-
export { crc32 } from './crc32';
|
|
7
|
-
export { sha256Hex } from './digest';
|
|
8
|
-
export { ABBREV_TO_METHOD, CTGR_WIRE_VERSION, type CtgrAbbrev, type CtgrDecoded, type CtgrMethod, type EncodedChunk, type EncodedRequest, type EncodeOpts, METHOD_TO_ABBREV, type SerializedFile, type UploadedFile, } from './types';
|
|
9
|
-
export { decodeV0Payload, V0ChunkStore, type V0ChunkStoreOpts } from './v0compat';
|
|
1
|
+
export { fromBase64, fromBase64url, toBase64, toBase64url } from './base64url.js';
|
|
2
|
+
export { ChunkAccumulator, type ChunkAccumulatorConfig, } from './chunkAccumulator.js';
|
|
3
|
+
export { ChunkStore, type ChunkStoreOpts } from './chunkStore.js';
|
|
4
|
+
export { decodePayload, decodeRequest, encodeRequest, extractFiles, type ParsedChunk, parseChunk, } from './codec.js';
|
|
5
|
+
export { gunzip, gzip } from './compress.js';
|
|
6
|
+
export { crc32 } from './crc32.js';
|
|
7
|
+
export { sha256Hex } from './digest.js';
|
|
8
|
+
export { ABBREV_TO_METHOD, CTGR_WIRE_VERSION, type CtgrAbbrev, type CtgrDecoded, type CtgrMethod, type EncodedChunk, type EncodedRequest, type EncodeOpts, METHOD_TO_ABBREV, type SerializedFile, type UploadedFile, } from './types.js';
|
|
9
|
+
export { decodeV0Payload, V0ChunkStore, type V0ChunkStoreOpts } from './v0compat.js';
|
package/dist/ctgr/index.js
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* The ChunkAccumulator is the primary abstraction for multi-chunk payload assembly;
|
|
7
7
|
* ChunkStore is kept for backward compatibility (they are identical implementations).
|
|
8
8
|
*/
|
|
9
|
-
export { fromBase64, fromBase64url, toBase64, toBase64url } from './base64url';
|
|
10
|
-
export { ChunkAccumulator, } from './chunkAccumulator';
|
|
11
|
-
export { ChunkStore } from './chunkStore';
|
|
12
|
-
export { decodePayload, decodeRequest, encodeRequest, extractFiles, parseChunk, } from './codec';
|
|
13
|
-
export { gunzip, gzip } from './compress';
|
|
14
|
-
export { crc32 } from './crc32';
|
|
15
|
-
export { sha256Hex } from './digest';
|
|
16
|
-
export { ABBREV_TO_METHOD, CTGR_WIRE_VERSION, METHOD_TO_ABBREV, } from './types';
|
|
17
|
-
export { decodeV0Payload, V0ChunkStore } from './v0compat';
|
|
9
|
+
export { fromBase64, fromBase64url, toBase64, toBase64url } from './base64url.js';
|
|
10
|
+
export { ChunkAccumulator, } from './chunkAccumulator.js';
|
|
11
|
+
export { ChunkStore } from './chunkStore.js';
|
|
12
|
+
export { decodePayload, decodeRequest, encodeRequest, extractFiles, parseChunk, } from './codec.js';
|
|
13
|
+
export { gunzip, gzip } from './compress.js';
|
|
14
|
+
export { crc32 } from './crc32.js';
|
|
15
|
+
export { sha256Hex } from './digest.js';
|
|
16
|
+
export { ABBREV_TO_METHOD, CTGR_WIRE_VERSION, METHOD_TO_ABBREV, } from './types.js';
|
|
17
|
+
export { decodeV0Payload, V0ChunkStore } from './v0compat.js';
|
package/dist/ctgr/v0compat.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CtgrDecoded, CtgrMethod } from './types';
|
|
1
|
+
import type { CtgrDecoded, CtgrMethod } from './types.js';
|
|
2
2
|
/** Reverse the v0 client pipeline (`encode→reverse→swap→encode→swap`) and parse JSON. */
|
|
3
3
|
export declare function decodeV0Payload(encoded: string): unknown;
|
|
4
4
|
export interface V0ChunkStoreOpts {
|
package/dist/ctgr/v0compat.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* heuristic, since v1 always sets `_cv=1`. v0 carried the method only in the path
|
|
10
10
|
* (`/ctgr<XX>`), so the middleware passes the path-derived method in.
|
|
11
11
|
*/
|
|
12
|
-
import { fromBase64 } from './base64url';
|
|
13
|
-
import { extractFiles } from './codec';
|
|
12
|
+
import { fromBase64 } from './base64url.js';
|
|
13
|
+
import { extractFiles } from './codec.js';
|
|
14
14
|
const decodeBase64Utf8 = (str) => new TextDecoder().decode(fromBase64(str));
|
|
15
15
|
const reverseString = (str) => str.split('').reverse().join('');
|
|
16
16
|
const swapEnds = (str) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
* drag 47 dependencies into every consumer.
|
|
12
12
|
*/
|
|
13
13
|
export declare const VERSION = "1.0.0";
|
|
14
|
-
export { contrastText } from './core/color';
|
|
15
|
-
export { isSiteCopyKey, SITE_COPY_BAKED_ONLY, SITE_COPY_DEFAULTS, SITE_COPY_KEYS, SITE_COPY_MAX_VALUE_LENGTH, type SiteCopyKey, } from './core/site/siteCopy';
|
|
14
|
+
export { contrastText } from './core/color.js';
|
|
15
|
+
export { isSiteCopyKey, SITE_COPY_BAKED_ONLY, SITE_COPY_DEFAULTS, SITE_COPY_KEYS, SITE_COPY_MAX_VALUE_LENGTH, type SiteCopyKey, } from './core/site/siteCopy.js';
|
package/dist/index.js
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
export const VERSION = '1.0.0';
|
|
14
14
|
// The two root-level conveniences the pre-split "." barrel actually served:
|
|
15
15
|
// the WCAG readable-foreground picker and the baked marketing-copy contract.
|
|
16
|
-
export { contrastText } from './core/color';
|
|
17
|
-
export { isSiteCopyKey, SITE_COPY_BAKED_ONLY, SITE_COPY_DEFAULTS, SITE_COPY_KEYS, SITE_COPY_MAX_VALUE_LENGTH, } from './core/site/siteCopy';
|
|
16
|
+
export { contrastText } from './core/color.js';
|
|
17
|
+
export { isSiteCopyKey, SITE_COPY_BAKED_ONLY, SITE_COPY_DEFAULTS, SITE_COPY_KEYS, SITE_COPY_MAX_VALUE_LENGTH, } from './core/site/siteCopy.js';
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { installCheapDomInspect } from "./domInspect";
|
|
2
|
-
export { asBody, bytesResponse, bytesStream } from "./bytes";
|
|
3
|
-
export { type FetchImpl, fakeFetch } from "./fakeFetch";
|
|
1
|
+
export { installCheapDomInspect } from "./domInspect.js";
|
|
2
|
+
export { asBody, bytesResponse, bytesStream } from "./bytes.js";
|
|
3
|
+
export { type FetchImpl, fakeFetch } from "./fakeFetch.js";
|
package/dist/testing/index.js
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
// can `import { installCheapDomInspect } from "cursedbelt-core/testing"` instead of
|
|
7
7
|
// keeping a ~60-line hand-port of domInspect.ts — the file already lived here,
|
|
8
8
|
// it just had no export.
|
|
9
|
-
export { installCheapDomInspect } from "./domInspect";
|
|
10
|
-
export { asBody, bytesResponse, bytesStream } from "./bytes";
|
|
11
|
-
export { fakeFetch } from "./fakeFetch";
|
|
9
|
+
export { installCheapDomInspect } from "./domInspect.js";
|
|
10
|
+
export { asBody, bytesResponse, bytesStream } from "./bytes.js";
|
|
11
|
+
export { fakeFetch } from "./fakeFetch.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cursedbelt-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Framework-agnostic core of the cursedbelt split — isomorphic domain logic. cwip below it, cursedbelt-server and cursedbelt (react) above it.",
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
},
|
|
363
363
|
"dependencies": {
|
|
364
364
|
"@leeoniya/ufuzzy": "^1.0.19",
|
|
365
|
-
"cwip": "^4.
|
|
365
|
+
"cwip": "^4.6.0"
|
|
366
366
|
},
|
|
367
367
|
"peerDependencies": {
|
|
368
368
|
"zod": "^4.4.0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
import { AppConfigSchema, effectiveSignupMode, featureKeysOf, resolveInstanceFeatures, ROUTE_PATH_RE } from './appConfig';
|
|
2
|
+
import { AppConfigSchema, effectiveSignupMode, featureKeysOf, resolveInstanceFeatures, ROUTE_PATH_RE } from './appConfig.js';
|
|
3
3
|
|
|
4
4
|
const base = (over: Record<string, unknown> = {}) => ({
|
|
5
5
|
configVersion: 1,
|
|
@@ -12,10 +12,10 @@ export {
|
|
|
12
12
|
describeActivityResource,
|
|
13
13
|
isActivityAction,
|
|
14
14
|
isActivityOutcome,
|
|
15
|
-
} from "./model";
|
|
15
|
+
} from "./model.js";
|
|
16
16
|
export type {
|
|
17
17
|
ActivityEvent,
|
|
18
18
|
ActivityEventInput,
|
|
19
19
|
ActivityOutcome,
|
|
20
20
|
ActivityResource,
|
|
21
|
-
} from "./model";
|
|
21
|
+
} from "./model.js";
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* - **`id` is source-qualified** (`log:41`, `share:12`), because the stream is a
|
|
31
31
|
* UNION over more than one table and two tables' autoincrements collide at 1.
|
|
32
32
|
*/
|
|
33
|
-
import type { ShareEvent } from "../sharing/model";
|
|
33
|
+
import type { ShareEvent } from "../sharing/model.js";
|
|
34
34
|
|
|
35
35
|
/** How it went. `denied` is its own outcome rather than an `error`: a refused
|
|
36
36
|
* action is the single most interesting row in an audit trail, and one that
|
|
@@ -44,7 +44,7 @@ export const isActivityOutcome = (value: unknown): value is ActivityOutcome =>
|
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* What was acted on: `(app, kind, id)` — deliberately identical to
|
|
47
|
-
* {@link import("../sharing/model").ShareResource}, so a resource can be handed
|
|
47
|
+
* {@link import("../sharing/model.js").ShareResource}, so a resource can be handed
|
|
48
48
|
* from one primitive to the other without a translation layer.
|
|
49
49
|
*/
|
|
50
50
|
export interface ActivityResource {
|
|
@@ -8,12 +8,12 @@ export type {
|
|
|
8
8
|
CategoryCreateInput,
|
|
9
9
|
CategoryNode,
|
|
10
10
|
CategoryStore,
|
|
11
|
-
} from './types';
|
|
11
|
+
} from './types.js';
|
|
12
12
|
export {
|
|
13
13
|
buildCategoryForest,
|
|
14
14
|
categoryPath,
|
|
15
15
|
descendantCategoryIds,
|
|
16
16
|
flattenCategoryForest,
|
|
17
17
|
wouldCreateCycle,
|
|
18
|
-
} from './tree';
|
|
19
|
-
export { createMemoryCategoryStore } from './memoryStore';
|
|
18
|
+
} from './tree.js';
|
|
19
|
+
export { createMemoryCategoryStore } from './memoryStore.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Category, CategoryCreateInput, CategoryStore } from './types';
|
|
2
|
-
import { wouldCreateCycle } from './tree';
|
|
1
|
+
import type { Category, CategoryCreateInput, CategoryStore } from './types.js';
|
|
2
|
+
import { wouldCreateCycle } from './tree.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Zero-config in-memory {@link CategoryStore}: a per-boot `Map` per tenant, so a
|
package/src/core/color.spec.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
import { createCcEventBus, MAX_EVENT_DEPTH } from './ccEventBus';
|
|
2
|
+
import { createCcEventBus, MAX_EVENT_DEPTH } from './ccEventBus.js';
|
|
3
3
|
|
|
4
4
|
describe('CCEventBus', () => {
|
|
5
5
|
it('delivers to every subscriber of a type and to nobody else', async () => {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* both are pinned here side by side rather than each in isolation.
|
|
10
10
|
*/
|
|
11
11
|
import { describe, expect, test } from "bun:test";
|
|
12
|
-
import { folderMoveTargets, planFolderMergeInto } from "./actions";
|
|
13
|
-
import { buildFolderTree, planFolderMove } from "./tree";
|
|
12
|
+
import { folderMoveTargets, planFolderMergeInto } from "./actions.js";
|
|
13
|
+
import { buildFolderTree, planFolderMove } from "./tree.js";
|
|
14
14
|
|
|
15
15
|
const PATHS = [
|
|
16
16
|
"rock",
|
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
isFolderPathUnder,
|
|
35
35
|
parseFolderPath,
|
|
36
36
|
serializeFolderPath,
|
|
37
|
-
} from "./path";
|
|
38
|
-
import type { FolderNode, FolderRemap } from "./tree";
|
|
37
|
+
} from "./path.js";
|
|
38
|
+
import type { FolderNode, FolderRemap } from "./tree.js";
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Move everything at or under `source` INTO `destination`, and stop `source` existing.
|
|
@@ -26,7 +26,7 @@ export {
|
|
|
26
26
|
normalizeFolderName,
|
|
27
27
|
parseFolderPath,
|
|
28
28
|
serializeFolderPath,
|
|
29
|
-
} from "./path";
|
|
29
|
+
} from "./path.js";
|
|
30
30
|
export {
|
|
31
31
|
buildFolderIndex,
|
|
32
32
|
buildFolderTree,
|
|
@@ -37,10 +37,10 @@ export {
|
|
|
37
37
|
planFolderDelete,
|
|
38
38
|
planFolderMove,
|
|
39
39
|
planFolderRename,
|
|
40
|
-
} from "./tree";
|
|
40
|
+
} from "./tree.js";
|
|
41
41
|
export {
|
|
42
42
|
type FolderDeleteMode,
|
|
43
43
|
type FolderTarget,
|
|
44
44
|
folderMoveTargets,
|
|
45
45
|
planFolderMergeInto,
|
|
46
|
-
} from "./actions";
|
|
46
|
+
} from "./actions.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
normalizeFolderName,
|
|
18
18
|
parseFolderPath,
|
|
19
19
|
serializeFolderPath,
|
|
20
|
-
} from "./path";
|
|
20
|
+
} from "./path.js";
|
|
21
21
|
|
|
22
22
|
/** A node in the derived tree. `path` is the full segment array from the root; a
|
|
23
23
|
* `child` node's path is its parent's plus one segment. */
|
|
@@ -16,7 +16,7 @@ export {
|
|
|
16
16
|
isMasterLockKdfParams,
|
|
17
17
|
newMasterLockKdfParams,
|
|
18
18
|
unb64u,
|
|
19
|
-
} from "./kdf";
|
|
19
|
+
} from "./kdf.js";
|
|
20
20
|
export {
|
|
21
21
|
BASE_DELAY_MS,
|
|
22
22
|
DEFAULT_IDLE_MS,
|
|
@@ -27,7 +27,7 @@ export {
|
|
|
27
27
|
clampIdleMs,
|
|
28
28
|
delayAfter,
|
|
29
29
|
windowRemaining,
|
|
30
|
-
} from "./policy";
|
|
30
|
+
} from "./policy.js";
|
|
31
31
|
export {
|
|
32
32
|
MASTER_LOCK_COOKIE,
|
|
33
33
|
masterLockCookieName,
|
|
@@ -46,10 +46,10 @@ export {
|
|
|
46
46
|
type MasterLockSettingsRequest,
|
|
47
47
|
type MasterLockStatus,
|
|
48
48
|
type MasterLockUnlockRequest,
|
|
49
|
-
} from "./wire";
|
|
49
|
+
} from "./wire.js";
|
|
50
50
|
export {
|
|
51
51
|
PRESENCE_ATTRIBUTE,
|
|
52
52
|
type PresenceMedia,
|
|
53
53
|
isPresenceMedia,
|
|
54
54
|
isSomebodyWatching,
|
|
55
|
-
} from "./presence";
|
|
55
|
+
} from "./presence.js";
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
deriveMasterLockVerifier,
|
|
18
18
|
isMasterLockKdfParams,
|
|
19
19
|
newMasterLockKdfParams,
|
|
20
|
-
} from ".";
|
|
21
|
-
import { b64u, unb64u } from "./kdf";
|
|
20
|
+
} from "./index.js";
|
|
21
|
+
import { b64u, unb64u } from "./kdf.js";
|
|
22
22
|
|
|
23
23
|
// The exact fixture `apps/vault/src/crypto/kdf.test.ts` derives against.
|
|
24
24
|
const FIXED: MasterLockKdfParams = {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* hole it was asked to close.
|
|
11
11
|
*/
|
|
12
12
|
import { describe, expect, test } from "bun:test";
|
|
13
|
-
import { PRESENCE_ATTRIBUTE, type PresenceMedia, isPresenceMedia, isSomebodyWatching } from "./presence";
|
|
13
|
+
import { PRESENCE_ATTRIBUTE, type PresenceMedia, isPresenceMedia, isSomebodyWatching } from "./presence.js";
|
|
14
14
|
|
|
15
15
|
const media = (over: Partial<PresenceMedia> & { presence?: string } = {}): PresenceMedia => ({
|
|
16
16
|
paused: false,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* it was told to mount and the browser would fetch what it was told to fetch.
|
|
10
10
|
*/
|
|
11
11
|
import { describe, expect, it } from "bun:test";
|
|
12
|
-
import { MASTER_LOCK_PATHS, MASTER_LOCK_PREFIX } from "./wire";
|
|
12
|
+
import { MASTER_LOCK_PATHS, MASTER_LOCK_PREFIX } from "./wire.js";
|
|
13
13
|
|
|
14
14
|
describe("MASTER_LOCK_PATHS", () => {
|
|
15
15
|
it("keeps every surface under the one prefix the guard reserves", () => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* One module both halves import, so a rename cannot make the browser talk to a route that
|
|
5
5
|
* no longer exists.
|
|
6
6
|
*/
|
|
7
|
-
import type { MasterLockKdfParams } from "./kdf";
|
|
7
|
+
import type { MasterLockKdfParams } from "./kdf.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The mount prefix. Everything under it is reachable while LOCKED (it is how you unlock);
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
parseFfmpegProgress,
|
|
8
8
|
parseFfprobe,
|
|
9
9
|
videoCodecPlan,
|
|
10
|
-
} from './ffmpeg';
|
|
11
|
-
import type { VideoTrimSpec } from './types';
|
|
10
|
+
} from './ffmpeg.js';
|
|
11
|
+
import type { VideoTrimSpec } from './types.js';
|
|
12
12
|
|
|
13
13
|
const trim = (over: Partial<VideoTrimSpec> = {}): VideoTrimSpec => ({
|
|
14
14
|
inputPath: '/in.mp4',
|
package/src/core/media/ffmpeg.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// (`server/media-bun/video.ts` spawns these against native ffmpeg) and the browser editor
|
|
4
4
|
// (`react/media` executes the same argv against ffmpeg.wasm). Unit tested without ffmpeg.
|
|
5
5
|
|
|
6
|
-
import type { VideoFormat, VideoProgressEvent, VideoQuality, VideoTrimSpec } from './types';
|
|
6
|
+
import type { VideoFormat, VideoProgressEvent, VideoQuality, VideoTrimSpec } from './types.js';
|
|
7
7
|
|
|
8
8
|
/** Codec + rate-control plan for an output container at a quality preset. */
|
|
9
9
|
export interface VideoCodecPlan {
|
package/src/core/media/format.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Pure format helpers — MIME/extension lookup, quality clamping, thumbnail-format
|
|
2
2
|
// selection. No npm deps; shared by the server adapter, the React layer, and tests.
|
|
3
3
|
|
|
4
|
-
import type { ImageOutputFormat } from './types';
|
|
4
|
+
import type { ImageOutputFormat } from './types.js';
|
|
5
5
|
|
|
6
6
|
export const IMAGE_OUTPUT_FORMATS: readonly ImageOutputFormat[] = ['jpeg', 'png', 'webp', 'avif'];
|
|
7
7
|
|