@signaltree/guardrails 4.0.16 → 4.1.0
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/factories/index.d.ts +1 -48
- package/dist/factories/index.js +15 -810
- package/dist/{index.js → lib/guardrails.js} +94 -262
- package/dist/lib/rules.js +62 -0
- package/dist/noop.d.ts +1 -19
- package/dist/noop.js +13 -20
- package/package.json +29 -20
- package/src/factories/index.d.ts +20 -0
- package/src/index.d.ts +4 -0
- package/src/lib/guardrails.d.ts +3 -0
- package/src/lib/rules.d.ts +8 -0
- package/src/lib/types.d.ts +138 -0
- package/src/noop.d.ts +11 -0
- package/dist/factories/index.cjs +0 -922
- package/dist/factories/index.cjs.map +0 -1
- package/dist/factories/index.d.cts +0 -48
- package/dist/factories/index.js.map +0 -1
- package/dist/index.cjs +0 -783
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -44
- package/dist/index.d.ts +0 -44
- package/dist/index.js.map +0 -1
- package/dist/noop.cjs +0 -31
- package/dist/noop.cjs.map +0 -1
- package/dist/noop.d.cts +0 -19
- package/dist/noop.js.map +0 -1
- package/dist/types-DfZ9n1yX.d.cts +0 -255
- package/dist/types-DfZ9n1yX.d.ts +0 -255
|
@@ -1,48 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { G as GuardrailsConfig } from '../types-DfZ9n1yX.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Factory Patterns for SignalTree with Guardrails
|
|
6
|
-
* @packageDocumentation
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
type SignalTreeFactory<T extends Record<string, unknown>> = (initial: T, config?: TreeConfig) => SignalTree<T>;
|
|
10
|
-
type EnhancerFn<T extends Record<string, unknown>> = (tree: SignalTree<T>) => SignalTree<T>;
|
|
11
|
-
interface FeatureTreeOptions<T extends Record<string, unknown>> {
|
|
12
|
-
name: string;
|
|
13
|
-
env?: 'development' | 'test' | 'staging' | 'production';
|
|
14
|
-
persistence?: boolean | Record<string, unknown>;
|
|
15
|
-
guardrails?: boolean | GuardrailsConfig;
|
|
16
|
-
devtools?: boolean;
|
|
17
|
-
enhancers?: EnhancerFn<T>[];
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Framework-agnostic factory for creating feature trees with guardrails
|
|
21
|
-
*/
|
|
22
|
-
declare function createFeatureTree<T extends Record<string, unknown>>(signalTree: SignalTreeFactory<T>, initial: T, options: FeatureTreeOptions<T>): SignalTree<T>;
|
|
23
|
-
/**
|
|
24
|
-
* Angular-specific factory
|
|
25
|
-
*/
|
|
26
|
-
declare function createAngularFeatureTree<T extends Record<string, unknown>>(signalTree: SignalTreeFactory<T>, initial: T, options: Omit<FeatureTreeOptions<T>, 'env'>): SignalTree<T>;
|
|
27
|
-
/**
|
|
28
|
-
* App shell tree with strict budgets
|
|
29
|
-
*/
|
|
30
|
-
declare function createAppShellTree<T extends Record<string, unknown>>(signalTree: SignalTreeFactory<T>, initial: T): SignalTree<T>;
|
|
31
|
-
/**
|
|
32
|
-
* Performance tree for real-time scenarios
|
|
33
|
-
*/
|
|
34
|
-
declare function createPerformanceTree<T extends Record<string, unknown>>(signalTree: SignalTreeFactory<T>, initial: T, name: string): SignalTree<T>;
|
|
35
|
-
/**
|
|
36
|
-
* Form tree with validation rules
|
|
37
|
-
*/
|
|
38
|
-
declare function createFormTree<T extends Record<string, unknown>>(signalTree: SignalTreeFactory<T>, initial: T, formName: string): SignalTree<T>;
|
|
39
|
-
/**
|
|
40
|
-
* Cache tree with relaxed rules
|
|
41
|
-
*/
|
|
42
|
-
declare function createCacheTree<T extends Record<string, unknown>>(signalTree: SignalTreeFactory<T>, initial: T): SignalTree<T>;
|
|
43
|
-
/**
|
|
44
|
-
* Test tree with strict enforcement
|
|
45
|
-
*/
|
|
46
|
-
declare function createTestTree<T extends Record<string, unknown>>(signalTree: SignalTreeFactory<T>, initial: T, overrides?: Partial<GuardrailsConfig>): SignalTree<T>;
|
|
47
|
-
|
|
48
|
-
export { createAngularFeatureTree, createAppShellTree, createCacheTree, createFeatureTree, createFormTree, createPerformanceTree, createTestTree };
|
|
1
|
+
export * from "./src/factories/index";
|