@valbuild/core 0.13.5 → 0.13.6

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.
@@ -3,6 +3,7 @@ import { Source } from "../source";
3
3
  import { result } from "../fp";
4
4
  import { Path, SourceOrExpr } from "../selector";
5
5
  import { SourcePath } from "../val";
6
+ import { Json } from "../Json";
6
7
  export declare class EvalError {
7
8
  readonly message: string;
8
9
  readonly expr: Expr;
@@ -15,5 +16,5 @@ type LocalSelector<S extends Source> = {
15
16
  [SourceOrExpr]: S;
16
17
  [Path]: SourcePath | undefined;
17
18
  };
18
- export declare function evaluate(expr: Expr, source: (ref: string) => LocalSelector<Source>, stack: readonly LocalSelector<Source>[][]): result.Result<LocalSelector<Source>, EvalError>;
19
+ export declare function evaluate(expr: Expr, source: (ref: string) => Promise<Json>, stack: readonly LocalSelector<Source>[][]): Promise<result.Result<LocalSelector<Source>, EvalError>>;
19
20
  export {};
@@ -13,7 +13,7 @@ export { FILE_REF_PROP } from "./source/file";
13
13
  export { VAL_EXTENSION } from "./source";
14
14
  export { derefPatch } from "./patch/deref";
15
15
  export { type SelectorSource, type SelectorOf, GenericSelector, } from "./selector";
16
- import { getVal } from "./fetchVal";
16
+ import { getVal, serializedValOfSelectorSource } from "./fetchVal";
17
17
  import { getRawSource, resolvePath, splitModuleIdAndModulePath } from "./module";
18
18
  import { getSchema } from "./selector";
19
19
  import { getValPath, isVal } from "./val";
@@ -29,6 +29,7 @@ declare const Internal: {
29
29
  getRawSource: typeof getRawSource;
30
30
  resolvePath: typeof resolvePath;
31
31
  splitModuleIdAndModulePath: typeof splitModuleIdAndModulePath;
32
+ serializedValOfSelectorSource: typeof serializedValOfSelectorSource;
32
33
  fetchVal: typeof fetchVal;
33
34
  isVal: typeof isVal;
34
35
  };
@@ -9,7 +9,7 @@ import { RemoteSource } from "../source/remote";
9
9
  import { FileSource } from "../source/file";
10
10
  export type SerializedVal = {
11
11
  val: SerializedVal | Json;
12
- valPath: SourcePath | undefined;
12
+ valPath: SourcePath | null;
13
13
  };
14
14
  export declare function isSerializedVal(val: unknown): val is SerializedVal;
15
15
  export type JsonOfSource<T extends Source> = Json extends T ? Json : T extends I18nSource<readonly string[], infer U> ? JsonOfSource<U> : T extends RemoteSource<infer U> ? JsonOfSource<U> : T extends FileSource ? {