stroid 0.1.4 → 0.1.5
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/CHANGELOG.md +148 -34
- package/README.md +124 -17
- package/dist/async-internal.d.ts +30 -0
- package/dist/async.d.ts +7 -12
- package/dist/async.js +1 -1
- package/dist/chunk-4C666HHU.js +2 -0
- package/dist/chunk-4D6OA3DD.js +2 -0
- package/dist/chunk-6IBJ7CIK.js +14 -0
- package/dist/chunk-BWNLQKTY.js +2 -0
- package/dist/chunk-E33L4MII.js +2 -0
- package/dist/chunk-FSNVSMAV.js +2 -0
- package/dist/chunk-GZQGU64H.js +2 -0
- package/dist/chunk-LWUT37FW.js +13 -0
- package/dist/chunk-NFT6AZXY.js +2 -0
- package/dist/chunk-PHE2BCFG.js +2 -0
- package/dist/chunk-SF6EP56S.js +2 -0
- package/dist/chunk-WE3ZR6OG.js +2 -0
- package/dist/chunk-WXJ3IREA.js +2 -0
- package/dist/chunk-X2MKRN7O.js +14 -0
- package/dist/chunk-Y54SMROI.js +2 -0
- package/dist/computed.d.ts +6 -5
- package/dist/computed.js +1 -1
- package/dist/core-internal.d.ts +23 -0
- package/dist/core.d.ts +3 -2
- package/dist/core.js +1 -1
- package/dist/devtools-internal.d.ts +26 -0
- package/dist/devtools.d.ts +4 -25
- package/dist/devtools.js +1 -1
- package/dist/feature.d.ts +9 -2
- package/dist/feature.js +1 -1
- package/dist/fetch-4RH6MPY3.js +2 -0
- package/dist/graph-D28.d.ts +20 -0
- package/dist/helpers.d.ts +2 -1
- package/dist/helpers.js +1 -1
- package/dist/index-internal.d.ts +19 -19
- package/dist/index.d.cts +40 -22
- package/dist/index.d.ts +40 -22
- package/dist/index.js +1 -1
- package/dist/install.d.ts +16 -4
- package/dist/install.js +1 -1
- package/dist/metrics.d.ts +13 -0
- package/dist/persist.d.ts +3 -1
- package/dist/persist.js +1 -1
- package/dist/psr.d.ts +7 -8
- package/dist/psr.js +1 -1
- package/dist/query.d.ts +17 -0
- package/dist/query.js +2 -0
- package/dist/react/index.d.ts +10 -3
- package/dist/react/index.js +5 -5
- package/dist/registry.d.ts +22 -14
- package/dist/runtime-admin.js +1 -1
- package/dist/runtime-tools.d.ts +38 -65
- package/dist/runtime-tools.js +1 -1
- package/dist/selectors.d.ts +1 -1
- package/dist/selectors.js +1 -1
- package/dist/server/portable.d.ts +27 -0
- package/dist/server/portable.js +2 -0
- package/dist/server.d.ts +9 -20
- package/dist/server.js +1 -1
- package/dist/shared.d.ts +36 -0
- package/dist/store-registry.d.ts +3 -1
- package/dist/sync.d.ts +10 -1
- package/dist/sync.js +1 -1
- package/dist/testing.d.ts +1 -0
- package/dist/testing.js +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/types-internal-2.d.ts +168 -0
- package/dist/{computed-types.d.ts → types-internal-3.d.ts} +1 -1
- package/dist/{options.d.ts → types-internal.d.ts} +25 -9
- package/dist/types.d.ts +12 -2
- package/package.json +80 -26
- package/dist/chunk-645IESIU.js +0 -2
- package/dist/chunk-6ELWGQ4Q.js +0 -2
- package/dist/chunk-BW32TJGE.js +0 -13
- package/dist/chunk-FOQKGHPS.js +0 -26
- package/dist/chunk-KQCSFGHJ.js +0 -2
- package/dist/chunk-M2NJVI36.js +0 -2
- package/dist/chunk-PVATWAY4.js +0 -2
- package/dist/chunk-X3JR32JD.js +0 -2
- package/dist/computed-types.js +0 -2
- package/dist/types/adapters/options.d.ts +0 -335
- package/dist/types/async/cache.d.ts +0 -40
- package/dist/types/async/clone.d.ts +0 -10
- package/dist/types/async/errors.d.ts +0 -3
- package/dist/types/async/fetch.d.ts +0 -37
- package/dist/types/async/inflight.d.ts +0 -30
- package/dist/types/async/rate.d.ts +0 -5
- package/dist/types/async/registry.d.ts +0 -117
- package/dist/types/async/request.d.ts +0 -11
- package/dist/types/async/retry.d.ts +0 -10
- package/dist/types/async.d.ts +0 -10
- package/dist/types/computed/computed-graph.d.ts +0 -33
- package/dist/types/computed/index.d.ts +0 -21
- package/dist/types/computed/types.d.ts +0 -40
- package/dist/types/config.d.ts +0 -10
- package/dist/types/core/index.d.ts +0 -11
- package/dist/types/core/lifecycle-hooks.d.ts +0 -16
- package/dist/types/core/runtime-patch.d.ts +0 -67
- package/dist/types/core/store-admin-impl.d.ts +0 -9
- package/dist/types/core/store-admin.d.ts +0 -9
- package/dist/types/core/store-core.d.ts +0 -13
- package/dist/types/core/store-create.d.ts +0 -16
- package/dist/types/core/store-hydrate-impl.d.ts +0 -35
- package/dist/types/core/store-hydrate.d.ts +0 -9
- package/dist/types/core/store-lifecycle/hooks.d.ts +0 -20
- package/dist/types/core/store-lifecycle/identity.d.ts +0 -23
- package/dist/types/core/store-lifecycle/registry.d.ts +0 -54
- package/dist/types/core/store-lifecycle/types.d.ts +0 -67
- package/dist/types/core/store-lifecycle/validation.d.ts +0 -53
- package/dist/types/core/store-name.d.ts +0 -28
- package/dist/types/core/store-notify.d.ts +0 -13
- package/dist/types/core/store-read.d.ts +0 -18
- package/dist/types/core/store-registry.d.ts +0 -115
- package/dist/types/core/store-replace-impl.d.ts +0 -11
- package/dist/types/core/store-replace.d.ts +0 -9
- package/dist/types/core/store-set-impl.d.ts +0 -13
- package/dist/types/core/store-set.d.ts +0 -9
- package/dist/types/core/store-shared/core.d.ts +0 -13
- package/dist/types/core/store-shared/notify.d.ts +0 -12
- package/dist/types/core/store-transaction.d.ts +0 -28
- package/dist/types/core/store-write-shared.d.ts +0 -25
- package/dist/types/core/store-write.d.ts +0 -13
- package/dist/types/features/feature-registry.d.ts +0 -91
- package/dist/types/features/lifecycle.d.ts +0 -40
- package/dist/types/index.d.ts +0 -17
- package/dist/types/integrations/query.d.ts +0 -8
- package/dist/types/internals/computed-order.d.ts +0 -3
- package/dist/types/internals/config.d.ts +0 -116
- package/dist/types/internals/diagnostics.d.ts +0 -21
- package/dist/types/internals/reporting.d.ts +0 -9
- package/dist/types/internals/store-admin.d.ts +0 -7
- package/dist/types/internals/store-ops.d.ts +0 -13
- package/dist/types/internals/test-reset.d.ts +0 -2
- package/dist/types/internals/write-context.d.ts +0 -20
- package/dist/types/notification/delivery.d.ts +0 -3
- package/dist/types/notification/index.d.ts +0 -10
- package/dist/types/notification/metrics.d.ts +0 -12
- package/dist/types/notification/priority.d.ts +0 -9
- package/dist/types/notification/scheduler.d.ts +0 -11
- package/dist/types/notification/snapshot.d.ts +0 -8
- package/dist/types/runtime-admin/index.d.ts +0 -2
- package/dist/types/runtime-tools/index.d.ts +0 -63
- package/dist/types/store.d.ts +0 -16
- package/dist/types/types/utility.d.ts +0 -17
- package/dist/types/utils/clone.d.ts +0 -4
- package/dist/types/utils/devfreeze.d.ts +0 -2
- package/dist/types/utils/hash.d.ts +0 -8
- package/dist/types/utils/path.d.ts +0 -5
- package/dist/types/utils/validation.d.ts +0 -14
- package/dist/types/utils.d.ts +0 -13
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NotifyState } from "../core/store-registry.js";
|
|
2
|
-
export type FlushPlan = {
|
|
3
|
-
names: string[];
|
|
4
|
-
sliceSize: number;
|
|
5
|
-
chunkDelayMs: number;
|
|
6
|
-
runInline: boolean;
|
|
7
|
-
prioritySet: Set<string> | null;
|
|
8
|
-
};
|
|
9
|
-
export declare const buildFlushPlan: (state: NotifyState) => FlushPlan;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module notification/scheduler
|
|
3
|
-
*
|
|
4
|
-
* LAYER: Notification pipeline
|
|
5
|
-
* OWNS: Flush scheduling and chunk timers.
|
|
6
|
-
*
|
|
7
|
-
* Consumers: notification/index.ts, notification/delivery.ts
|
|
8
|
-
*/
|
|
9
|
-
import { type StoreRegistry } from "../core/store-registry.js";
|
|
10
|
-
export declare const scheduleChunk: (fn: () => void, delayMs: number) => void;
|
|
11
|
-
export declare const scheduleFlush: (registry: StoreRegistry, flush: (registry: StoreRegistry) => void) => void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SnapshotMode } from "../adapters/options.js";
|
|
2
|
-
import type { StoreValue } from "../core/store-lifecycle/types.js";
|
|
3
|
-
export declare const resolveSnapshotMode: (metaEntry: {
|
|
4
|
-
options?: {
|
|
5
|
-
snapshot?: SnapshotMode;
|
|
6
|
-
};
|
|
7
|
-
} | undefined, fallback: SnapshotMode) => SnapshotMode;
|
|
8
|
-
export declare const cloneSnapshot: (value: StoreValue, mode: SnapshotMode) => StoreValue;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { StoreFeatureMeta } from "../features/feature-registry.js";
|
|
2
|
-
import { getAsyncMetrics } from "../async/fetch.js";
|
|
3
|
-
import type { ComputedDescriptor, RuntimeGraph, RuntimeNodeId } from "../computed/types.js";
|
|
4
|
-
export declare const listStores: (pattern?: string) => string[];
|
|
5
|
-
export declare const getStoreMeta: (name: string) => StoreFeatureMeta | null;
|
|
6
|
-
export declare const getInitialState: () => Record<string, unknown>;
|
|
7
|
-
export declare const getMetrics: (name: string) => StoreFeatureMeta["metrics"] | null;
|
|
8
|
-
export declare const getSubscriberCount: (name: string) => number;
|
|
9
|
-
export declare const getAsyncInflightCount: (name: string) => number;
|
|
10
|
-
export type ColdStoreReport = {
|
|
11
|
-
name: string;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
lastReadAt: string | null;
|
|
14
|
-
updateCount: number;
|
|
15
|
-
readCount: number;
|
|
16
|
-
subscriberCount: number;
|
|
17
|
-
ageMs: number;
|
|
18
|
-
verdict: "cold" | "write-only" | "stale" | "active";
|
|
19
|
-
};
|
|
20
|
-
export declare const findColdStores: (options?: {
|
|
21
|
-
unreadThresholdMs?: number;
|
|
22
|
-
includeWriteOnly?: boolean;
|
|
23
|
-
}) => ColdStoreReport[];
|
|
24
|
-
export type StoreHealthEntry = {
|
|
25
|
-
name: string;
|
|
26
|
-
meta: StoreFeatureMeta | null;
|
|
27
|
-
metrics: StoreFeatureMeta["metrics"] | null;
|
|
28
|
-
async: {
|
|
29
|
-
inflight: number;
|
|
30
|
-
lastCorrelationId: string | null;
|
|
31
|
-
traceContext: StoreFeatureMeta["lastTraceContext"] | null;
|
|
32
|
-
};
|
|
33
|
-
persist: {
|
|
34
|
-
queueDepth: number;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export type StoreHealthReport = {
|
|
38
|
-
stores: StoreHealthEntry[];
|
|
39
|
-
async: ReturnType<typeof getAsyncMetrics>;
|
|
40
|
-
registry: {
|
|
41
|
-
totalStores: number;
|
|
42
|
-
coldStores: ColdStoreReport[];
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export declare const getStoreHealth: (name?: string) => StoreHealthEntry | StoreHealthReport | null;
|
|
46
|
-
export declare const getPersistQueueDepth: (name: string) => number;
|
|
47
|
-
export declare const getComputedGraph: () => {
|
|
48
|
-
nodes: string[];
|
|
49
|
-
edges: Array<{
|
|
50
|
-
from: string;
|
|
51
|
-
to: string;
|
|
52
|
-
}>;
|
|
53
|
-
dependencies: Record<string, string[]>;
|
|
54
|
-
dependents: Record<string, string[]>;
|
|
55
|
-
};
|
|
56
|
-
export declare const getRuntimeGraph: () => RuntimeGraph;
|
|
57
|
-
export declare const getComputedDeps: (name: string) => {
|
|
58
|
-
deps: string[];
|
|
59
|
-
dependents: string[];
|
|
60
|
-
} | null;
|
|
61
|
-
export declare const getComputedDescriptor: (nodeId: RuntimeNodeId) => ComputedDescriptor | null;
|
|
62
|
-
export declare const evaluateComputed: (nodeId: RuntimeNodeId, snapshot: Record<string, unknown>) => unknown;
|
|
63
|
-
export type { ComputedClassification, ComputedDescriptor, RuntimeEdgeType, RuntimeGraph, RuntimeGraphEdge, RuntimeGraphGranularity, RuntimeGraphNode, RuntimeNodeId, RuntimeNodeType, } from "../computed/types.js";
|
package/dist/types/store.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module store
|
|
3
|
-
*
|
|
4
|
-
* LAYER: Store runtime
|
|
5
|
-
* OWNS: Module-level behavior and exports for store.
|
|
6
|
-
*
|
|
7
|
-
* Consumers: Internal imports and public API.
|
|
8
|
-
*/
|
|
9
|
-
export type { Path, PathDepth, PathValue, PartialDeep, HydrateSnapshotFor, HydrationFailure, HydrationResult, StoreDefinition, StoreValue, StoreKey, StoreName, StateFor, StoreStateMap, StrictStoreMap, WriteResult, } from "./core/store-lifecycle/types.js";
|
|
10
|
-
export type { FeatureOptions, FeatureOptionsMap, PersistConfig, PersistOptions, MiddlewareCtx, StoreOptions, SnapshotMode, SyncOptions, } from "./adapters/options.js";
|
|
11
|
-
export { setStore, replaceStore, deleteStore, resetStore, hydrateStores, } from "./core/store-write.js";
|
|
12
|
-
export { createStore, createStoreStrict } from "./core/store-create.js";
|
|
13
|
-
export { setStoreBatch, subscribeStore, subscribeInternal as _subscribe, subscribe, getStoreSnapshot, getSnapshot as _getSnapshot, } from "./core/store-notify.js";
|
|
14
|
-
export { getStore, hasStore, isLazyStore, isStoreMaterialized, isLazyPending, _hasStoreEntryInternal, _getStoreValueRef, _getFeatureApi, getInitialState, getMetrics, } from "./core/store-read.js";
|
|
15
|
-
export { clearAllStores, clearStores } from "./runtime-admin/index.js";
|
|
16
|
-
export { store, namespace } from "./core/store-name.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module types/utility
|
|
3
|
-
*
|
|
4
|
-
* LAYER: Types
|
|
5
|
-
* OWNS: Shared utility types for cross-module reuse.
|
|
6
|
-
*
|
|
7
|
-
* Consumers: store-create.ts, store-name.ts, computed.ts, testing.ts.
|
|
8
|
-
*/
|
|
9
|
-
export type NonFunction<T> = T extends Function ? never : T;
|
|
10
|
-
export type DeepReadonly<T> = {
|
|
11
|
-
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
12
|
-
};
|
|
13
|
-
export type StoreId = string | symbol;
|
|
14
|
-
export type TraceContext = {
|
|
15
|
-
traceId: string;
|
|
16
|
-
spanId: string;
|
|
17
|
-
} & Record<string, unknown>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const crc32: (str: string) => number;
|
|
2
|
-
/**
|
|
3
|
-
* Non-cryptographic checksum for integrity (best-effort). Do not use for security.
|
|
4
|
-
* String inputs preserve the legacy CRC32(JSON.stringify(value)) behavior to keep
|
|
5
|
-
* persisted checksums stable across versions.
|
|
6
|
-
*/
|
|
7
|
-
export declare const hashState: (value: unknown) => number;
|
|
8
|
-
export declare const checksumState: (value: unknown) => number;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type PathInput = string | readonly string[] | string[];
|
|
2
|
-
export declare const parsePath: (path: PathInput) => string[];
|
|
3
|
-
export declare const validateDepth: (path: PathInput) => boolean;
|
|
4
|
-
export declare const getByPath: (obj: unknown, path: PathInput) => unknown;
|
|
5
|
-
export declare const setByPath: <T extends Record<string, unknown> | unknown[]>(obj: T, path: PathInput, value: unknown) => T;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const FORBIDDEN_OBJECT_KEYS: Set<string>;
|
|
2
|
-
export declare const runSchemaValidation: (schema: unknown, value: unknown) => {
|
|
3
|
-
ok: boolean;
|
|
4
|
-
data?: unknown;
|
|
5
|
-
error?: unknown;
|
|
6
|
-
};
|
|
7
|
-
declare const SUPPORTED_TYPES: readonly ["object", "array", "string", "number", "boolean", "null"];
|
|
8
|
-
export type SupportedType = typeof SUPPORTED_TYPES[number] | "function" | "map" | "set" | "date" | "undefined" | "bigint" | "symbol";
|
|
9
|
-
export declare const getType: (value: unknown) => SupportedType;
|
|
10
|
-
export declare const isValidData: (value: unknown) => boolean;
|
|
11
|
-
export declare const canReuseSanitized: (value: unknown) => boolean;
|
|
12
|
-
export declare const sanitize: (value: unknown) => unknown;
|
|
13
|
-
export declare const isValidStoreName: (name: string) => boolean;
|
|
14
|
-
export {};
|
package/dist/types/utils.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module utils
|
|
3
|
-
*
|
|
4
|
-
* LAYER: Utilities
|
|
5
|
-
* OWNS: Module-level behavior and exports for utils.
|
|
6
|
-
*
|
|
7
|
-
* Consumers: Internal imports and public API.
|
|
8
|
-
*/
|
|
9
|
-
export { __DEV__, isDev, warn, warnAlways, error, log, critical, suggestStoreName, } from "./internals/diagnostics.js";
|
|
10
|
-
export { crc32, hashState, checksumState } from "./utils/hash.js";
|
|
11
|
-
export { shallowClone, deepClone, shallowEqual, produceClone } from "./utils/clone.js";
|
|
12
|
-
export { parsePath, validateDepth, getByPath, setByPath, type PathInput } from "./utils/path.js";
|
|
13
|
-
export { runSchemaValidation, getType, isValidData, canReuseSanitized, sanitize, isValidStoreName, type SupportedType, } from "./utils/validation.js";
|