@ontemper/sdk 0.10.4 → 0.12.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.
Files changed (62) hide show
  1. package/README.md +134 -12
  2. package/dist/Contract/Manifest.d.ts +3 -2
  3. package/dist/Contract/Manifest.d.ts.map +1 -1
  4. package/dist/Contract/Manifest.js +2 -0
  5. package/dist/Contract/Manifest.js.map +1 -1
  6. package/dist/Contract/StaticGraph.d.ts +96 -0
  7. package/dist/Contract/StaticGraph.d.ts.map +1 -0
  8. package/dist/Contract/StaticGraph.js +92 -0
  9. package/dist/Contract/StaticGraph.js.map +1 -0
  10. package/dist/Contract/index.d.ts +1 -0
  11. package/dist/Contract/index.d.ts.map +1 -1
  12. package/dist/Contract/index.js +1 -0
  13. package/dist/Contract/index.js.map +1 -1
  14. package/dist/Manifest.d.ts +1 -1
  15. package/dist/Manifest.d.ts.map +1 -1
  16. package/dist/Manifest.js +17 -75
  17. package/dist/Manifest.js.map +1 -1
  18. package/dist/StaticGraph.d.ts +87 -0
  19. package/dist/StaticGraph.d.ts.map +1 -0
  20. package/dist/StaticGraph.js +237 -0
  21. package/dist/StaticGraph.js.map +1 -0
  22. package/dist/StaticGraphAnalyzer.d.ts +7 -0
  23. package/dist/StaticGraphAnalyzer.d.ts.map +1 -0
  24. package/dist/StaticGraphAnalyzer.js +162 -0
  25. package/dist/StaticGraphAnalyzer.js.map +1 -0
  26. package/dist/StaticGraphCalls.d.ts +15 -0
  27. package/dist/StaticGraphCalls.d.ts.map +1 -0
  28. package/dist/StaticGraphCalls.js +1028 -0
  29. package/dist/StaticGraphCalls.js.map +1 -0
  30. package/dist/StaticGraphDeclarations.d.ts +43 -0
  31. package/dist/StaticGraphDeclarations.d.ts.map +1 -0
  32. package/dist/StaticGraphDeclarations.js +443 -0
  33. package/dist/StaticGraphDeclarations.js.map +1 -0
  34. package/dist/StaticGraphProcess.d.ts +2 -0
  35. package/dist/StaticGraphProcess.d.ts.map +1 -0
  36. package/dist/StaticGraphProcess.js +55 -0
  37. package/dist/StaticGraphProcess.js.map +1 -0
  38. package/dist/StaticGraphProject.d.ts +65 -0
  39. package/dist/StaticGraphProject.d.ts.map +1 -0
  40. package/dist/StaticGraphProject.js +303 -0
  41. package/dist/StaticGraphProject.js.map +1 -0
  42. package/dist/StaticGraphProtocol.d.ts +82 -0
  43. package/dist/StaticGraphProtocol.d.ts.map +1 -0
  44. package/dist/StaticGraphProtocol.js +36 -0
  45. package/dist/StaticGraphProtocol.js.map +1 -0
  46. package/dist/StaticGraphRuntime.d.ts +25 -0
  47. package/dist/StaticGraphRuntime.d.ts.map +1 -0
  48. package/dist/StaticGraphRuntime.js +60 -0
  49. package/dist/StaticGraphRuntime.js.map +1 -0
  50. package/dist/StaticGraphValues.d.ts +243 -0
  51. package/dist/StaticGraphValues.d.ts.map +1 -0
  52. package/dist/StaticGraphValues.js +845 -0
  53. package/dist/StaticGraphValues.js.map +1 -0
  54. package/dist/StepCatalogRules.d.ts +33 -0
  55. package/dist/StepCatalogRules.d.ts.map +1 -0
  56. package/dist/StepCatalogRules.js +64 -0
  57. package/dist/StepCatalogRules.js.map +1 -0
  58. package/dist/cli.d.ts +1 -1
  59. package/dist/cli.d.ts.map +1 -1
  60. package/dist/cli.js +67 -9
  61. package/dist/cli.js.map +1 -1
  62. package/package.json +13 -4
@@ -0,0 +1,36 @@
1
+ import { Schema } from 'effect';
2
+ import { FlowStaticGraphEndpoint } from './Contract/StaticGraph.js';
3
+ /** One endpoint the API declares; `trigger` is its annotation when the code writes it as literals. */
4
+ export const AnalyzedEndpoint = Schema.Struct({
5
+ group: Schema.String,
6
+ name: Schema.String,
7
+ method: Schema.String,
8
+ path: Schema.String,
9
+ trigger: Schema.optionalKey(Schema.Json),
10
+ });
11
+ /** One resource a `Step.make` call names: a declaration with its identity, or a value that is no declaration. */
12
+ export const AnalyzedResource = Schema.Union([
13
+ Schema.Struct({ state: Schema.Literals(['declared', 'undeclared', 'second']), identity: Schema.String }),
14
+ Schema.Struct({ state: Schema.Literal('foreign') }),
15
+ ]);
16
+ /** One module-level `Step.make` call, as written. A `null` title or summary is a literal that is not text. */
17
+ export const AnalyzedStep = Schema.Struct({
18
+ id: Schema.String,
19
+ title: Schema.NullOr(Schema.String),
20
+ kind: Schema.String,
21
+ summary: Schema.optionalKey(Schema.NullOr(Schema.String)),
22
+ resources: Schema.Array(AnalyzedResource),
23
+ });
24
+ /**
25
+ * What the analyzer process prints. A part it could not derive is `null`, with a warning that says why: it
26
+ * never prints a partial list in its place. Without endpoints, `failureKind` says whether the source stopped the
27
+ * analyzer or the analyzer itself could not run.
28
+ */
29
+ export const AnalyzerOutput = Schema.Struct({
30
+ endpoints: Schema.NullOr(Schema.Array(AnalyzedEndpoint)),
31
+ steps: Schema.NullOr(Schema.Array(AnalyzedStep)),
32
+ graph: Schema.NullOr(Schema.Array(FlowStaticGraphEndpoint)),
33
+ warnings: Schema.Array(Schema.String),
34
+ failureKind: Schema.optionalKey(Schema.Literals(['runtime', 'source'])),
35
+ });
36
+ //# sourceMappingURL=StaticGraphProtocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticGraphProtocol.js","sourceRoot":"","sources":["../src/StaticGraphProtocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAcpE,sGAAsG;AACtG,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;CACzC,CAAC,CAAC;AAGH,iHAAiH;AACjH,MAAM,CAAC,MAAM,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AAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ export interface AnalyzerRuntime {
2
+ /** The absolute path of the binary. */
3
+ readonly command: string;
4
+ /** The whole environment of the analyzer: it gets no variable of the caller, so no secret reaches it. */
5
+ readonly env: Readonly<Record<string, string>>;
6
+ /**
7
+ * The working directory of the analyzer: the root of the file system. A `node` on `PATH` can be the launcher of a
8
+ * version manager, which reads `.tool-versions`, `mise.toml`, or `package.json` from the working directory and
9
+ * the folders above it. No folder of the checkout is above the root, so the checkout chooses no runtime.
10
+ */
11
+ readonly cwd: string;
12
+ }
13
+ /**
14
+ * The first `node` of `searchPath` that no file of the checkout can stand for, or `undefined`. A package script
15
+ * puts the `node_modules/.bin` of the checkout on `PATH`, so a `node` counts only in an absolute folder, and only
16
+ * when neither its path nor the file it links to is inside the project or inside a `node_modules` folder.
17
+ */
18
+ export declare const trustedNode: (project: string, searchPath: string | undefined) => string | undefined;
19
+ /**
20
+ * The runtimes to try, in order. A Node caller starts its own binary: it already runs the caller, so it is no file
21
+ * the checkout chose. A Bun caller starts a trusted Node or nothing: Bun ignores the heap flag, and in the working
22
+ * directory, which can be the checkout, it loads the preloads that a `bunfig.toml` names.
23
+ */
24
+ export declare const analyzerRuntimes: (project: string) => ReadonlyArray<AnalyzerRuntime>;
25
+ //# sourceMappingURL=StaticGraphRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticGraphRuntime.d.ts","sourceRoot":"","sources":["../src/StaticGraphRuntime.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yGAAyG;IACzG,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAuBD;;;;GAIG;AACH,eAAO,MAAM,WAAW,YAAa,MAAM,cAAc,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAetF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAAa,MAAM,KAAG,aAAa,CAAC,eAAe,CAK/E,CAAC"}
@@ -0,0 +1,60 @@
1
+ // The runtimes that start the static graph analyzer (FLOW-11). A caller can run under a `PATH` that holds
2
+ // folders of the checkout, so this module never starts a program by its name: it starts absolute paths only.
3
+ // It loads no `typescript` and imports no workflow code.
4
+ import { accessSync, constants, realpathSync, statSync } from 'node:fs';
5
+ import { delimiter, isAbsolute, join, parse, resolve, sep } from 'node:path';
6
+ const NODE = process.platform === 'win32' ? 'node.exe' : 'node';
7
+ const canonical = (path) => {
8
+ try {
9
+ return realpathSync(path);
10
+ }
11
+ catch {
12
+ return undefined;
13
+ }
14
+ };
15
+ const isExecutableFile = (path) => {
16
+ try {
17
+ accessSync(path, constants.X_OK);
18
+ return statSync(path).isFile();
19
+ }
20
+ catch {
21
+ return false;
22
+ }
23
+ };
24
+ const isInside = (path, folder) => path === folder || path.startsWith(`${folder}${sep}`);
25
+ /**
26
+ * The first `node` of `searchPath` that no file of the checkout can stand for, or `undefined`. A package script
27
+ * puts the `node_modules/.bin` of the checkout on `PATH`, so a `node` counts only in an absolute folder, and only
28
+ * when neither its path nor the file it links to is inside the project or inside a `node_modules` folder.
29
+ */
30
+ export const trustedNode = (project, searchPath) => {
31
+ const given = resolve(project);
32
+ const checkout = [given, canonical(given) ?? given];
33
+ const ofCheckout = (path) => checkout.some((folder) => isInside(path, folder)) || path.split(sep).includes('node_modules');
34
+ for (const folder of (searchPath ?? '').split(delimiter)) {
35
+ // An empty or relative entry names a folder under the working directory, which can be the checkout.
36
+ if (!isAbsolute(folder))
37
+ continue;
38
+ const command = join(folder, NODE);
39
+ const real = canonical(command);
40
+ if (real === undefined || ofCheckout(command) || ofCheckout(real))
41
+ continue;
42
+ // The path as `PATH` names it: a version manager links `node` to one launcher that reads its own name.
43
+ if (isExecutableFile(real))
44
+ return command;
45
+ }
46
+ return undefined;
47
+ };
48
+ /**
49
+ * The runtimes to try, in order. A Node caller starts its own binary: it already runs the caller, so it is no file
50
+ * the checkout chose. A Bun caller starts a trusted Node or nothing: Bun ignores the heap flag, and in the working
51
+ * directory, which can be the checkout, it loads the preloads that a `bunfig.toml` names.
52
+ */
53
+ export const analyzerRuntimes = (project) => {
54
+ const cwd = parse(resolve(project)).root;
55
+ if (process.versions.bun === undefined)
56
+ return [{ command: process.execPath, env: {}, cwd }];
57
+ const node = trustedNode(project, process.env.PATH);
58
+ return node === undefined ? [] : [{ command: node, env: {}, cwd }];
59
+ };
60
+ //# sourceMappingURL=StaticGraphRuntime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticGraphRuntime.js","sourceRoot":"","sources":["../src/StaticGraphRuntime.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,6GAA6G;AAC7G,yDAAyD;AACzD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAe7E,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;AAEhE,MAAM,SAAS,GAAG,CAAC,IAAY,EAAsB,EAAE;IACrD,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAW,EAAE;IACjD,IAAI,CAAC;QACH,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,QAAQ,CAAC,IAAI,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,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAkC,EAAE;IAClF,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACzC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7F,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;AACrE,CAAC,CAAC"}
@@ -0,0 +1,243 @@
1
+ import type { Schema } from 'effect';
2
+ import ts from 'typescript';
3
+ import type { StaticFlowNode } from './Contract/StaticGraph.js';
4
+ import { type FunctionNode, type Project } from './StaticGraphProject.ts';
5
+ import type { AnalyzerLimits } from './StaticGraphProtocol.js';
6
+ type Decl = {
7
+ readonly kind: 'variable';
8
+ readonly node: ts.VariableDeclaration;
9
+ readonly path: ReadonlyArray<string> | undefined;
10
+ readonly constant: boolean;
11
+ } | {
12
+ readonly kind: 'function';
13
+ readonly node: FunctionNode;
14
+ } | {
15
+ readonly kind: 'class';
16
+ readonly node: ts.ClassLikeDeclaration;
17
+ } | {
18
+ readonly kind: 'parameter';
19
+ readonly node: ts.ParameterDeclaration;
20
+ readonly path: ReadonlyArray<string> | undefined;
21
+ } | {
22
+ readonly kind: 'import';
23
+ readonly node: ts.ImportDeclaration;
24
+ readonly name: string;
25
+ } | {
26
+ readonly kind: 'opaque';
27
+ };
28
+ /** The arguments of the calls the analyzer is inside of, by parameter; a closure keeps the one it was made in. */
29
+ export interface Env {
30
+ readonly parent: Env | undefined;
31
+ readonly bindings: ReadonlyMap<ts.ParameterDeclaration, Binding>;
32
+ }
33
+ export type Binding = {
34
+ readonly expression: ts.Expression;
35
+ readonly env: Env;
36
+ } | {
37
+ readonly value: Value;
38
+ };
39
+ export declare const ROOT_ENV: Env;
40
+ export interface LibValue {
41
+ readonly t: 'lib';
42
+ readonly module: string;
43
+ readonly path: ReadonlyArray<string>;
44
+ }
45
+ export interface FunctionValue {
46
+ readonly t: 'function';
47
+ readonly node: FunctionNode;
48
+ readonly env: Env;
49
+ /** The step each call runs, for a function that `step.fn` built; `null` for a step outside the catalog. */
50
+ readonly step: string | null | undefined;
51
+ /** `Effect.fn` and `step.fn` functions return an Effect, so a call alone runs nothing. */
52
+ readonly lazy: boolean;
53
+ /** The pipeable arguments after the body of `Effect.fn(name)(body, ...pipes)`, with the Env they were written in. */
54
+ readonly pipes: ReadonlyArray<ts.Expression>;
55
+ readonly pipesEnv: Env;
56
+ }
57
+ interface ClassValue {
58
+ readonly t: 'class';
59
+ readonly node: ts.ClassLikeDeclaration;
60
+ readonly env: Env;
61
+ }
62
+ export interface ObjectValue {
63
+ readonly t: 'object';
64
+ readonly node: ts.ObjectLiteralExpression;
65
+ readonly env: Env;
66
+ }
67
+ interface ServiceValue {
68
+ readonly t: 'service';
69
+ readonly tag: ts.Node;
70
+ readonly name: string;
71
+ }
72
+ /** A call or a choice the analyzer walks where it runs; `lib` marks what a package call returned. */
73
+ export interface ExpressionValue {
74
+ readonly t: 'expression';
75
+ readonly node: ts.Expression;
76
+ readonly env: Env;
77
+ readonly lib: boolean;
78
+ }
79
+ /** What an expression is, as far as the source alone says. */
80
+ export type Value = {
81
+ readonly t: 'unknown';
82
+ } | {
83
+ readonly t: 'text';
84
+ readonly value: string;
85
+ } | {
86
+ readonly t: 'number';
87
+ readonly value: number;
88
+ } | {
89
+ readonly t: 'literal';
90
+ readonly value: boolean | null;
91
+ } | LibValue | {
92
+ readonly t: 'libValue';
93
+ }
94
+ /** A module that can run steps and that the analyzer does not read. */
95
+ | {
96
+ readonly t: 'external';
97
+ readonly module: string;
98
+ } | {
99
+ readonly t: 'module';
100
+ readonly file: ts.SourceFile;
101
+ } | FunctionValue
102
+ /** `Effect.fn(name)` or `step.fn(options)`: it takes the body next. */
103
+ | {
104
+ readonly t: 'builder';
105
+ readonly step: string | null | undefined;
106
+ } | {
107
+ readonly t: 'step';
108
+ readonly id: string | null;
109
+ } | {
110
+ readonly t: 'stepRun';
111
+ readonly id: string | null;
112
+ } | {
113
+ readonly t: 'stepFn';
114
+ readonly id: string | null;
115
+ } | ClassValue | {
116
+ readonly t: 'instance';
117
+ readonly class: ClassValue;
118
+ } | ObjectValue | {
119
+ readonly t: 'array';
120
+ readonly node: ts.ArrayLiteralExpression;
121
+ readonly env: Env;
122
+ } | ServiceValue | ExpressionValue
123
+ /** An effect the analyzer already walked, passed on as an argument. */
124
+ | {
125
+ readonly t: 'walked';
126
+ readonly nodes: ReadonlyArray<StaticFlowNode>;
127
+ }
128
+ /** A service member with no single production implementation. */
129
+ | {
130
+ readonly t: 'ambiguous';
131
+ readonly label: string;
132
+ }
133
+ /** One of several values, such as a member of a service whose implementation returns one of two records. */
134
+ | {
135
+ readonly t: 'choice';
136
+ readonly options: ReadonlyArray<Value>;
137
+ }
138
+ /** What `Effect.result`, `Effect.exit`, or `Effect.option` succeeds with: a record of Effect around `inner`. */
139
+ | {
140
+ readonly t: 'wrapped';
141
+ readonly inner: Value;
142
+ };
143
+ export declare const UNKNOWN: Value;
144
+ export declare const LIB_VALUE: Value;
145
+ /** How a provider of a service names its implementation: an Effect that makes it, the value, or a function that returns it. */
146
+ export interface Provider {
147
+ readonly kind: 'effect' | 'value' | 'thunk';
148
+ readonly expression: ts.Expression;
149
+ readonly env: Env;
150
+ /** What tells this implementation from another; `undefined` for one that a helper call made. */
151
+ readonly identity: ts.Node | undefined;
152
+ }
153
+ export interface Handler {
154
+ readonly expression: ts.Expression;
155
+ readonly env: Env;
156
+ }
157
+ export interface Analysis {
158
+ readonly project: Project;
159
+ readonly limits: AnalyzerLimits;
160
+ readonly scopes: Map<ts.Node, Map<string, Decl>>;
161
+ /** The id of each module-level `Step.make` call that the catalog can hold. */
162
+ readonly stepIds: Map<ts.Node, string>;
163
+ readonly providers: Map<ts.Node, Array<Provider>>;
164
+ readonly handlers: Map<string, Handler>;
165
+ /** Walks of functions that read no parameter, by the way they were called, so a helper called often is walked once. */
166
+ readonly memo: Map<string, Map<ts.Node, ReadonlyArray<StaticFlowNode>>>;
167
+ /** The functions the analyzer is inside of; a function already in it is a recursion. */
168
+ readonly stack: Array<ts.Node>;
169
+ /** The named functions and values in `stack`: the call depth. An inline callback is no call, so it does not count. */
170
+ depth: number;
171
+ /** For each entry of `stack`, whether its walk depends on its caller: such a walk is not kept for another call. */
172
+ readonly dependent: Array<boolean>;
173
+ /** Whether the walk that `within` ended last depends on its caller. */
174
+ lastDependent: boolean;
175
+ /** The function or value each recursion mark stands for. */
176
+ readonly recursions: WeakMap<StaticFlowNode, ts.Node>;
177
+ readonly evaluating: Set<ts.Node>;
178
+ /** The layer calls already read outside every helper call. */
179
+ readonly layersSeen: Set<ts.Node>;
180
+ readonly warnings: Array<string>;
181
+ /** A layer the analyzer cannot read is wired, so it may provide any service. */
182
+ unknownLayer: boolean;
183
+ work: number;
184
+ }
185
+ export declare const tick: (ctx: Analysis) => void;
186
+ export declare const propertyName: (name: ts.PropertyName | ts.BindingName | undefined) => string | undefined;
187
+ /** The name the source gives a function, a class, or the value of a call, such as the `const` that holds it. */
188
+ export declare const declaredName: (node: ts.Node) => string | undefined;
189
+ /**
190
+ * Walks inside `node`. Past the call depth budget the graph is withheld, never cut (FLOW-10): every reader of a
191
+ * named function enters it here, so none answers at the budget with a value that only looks unknown.
192
+ */
193
+ export declare const within: <A>(ctx: Analysis, node: ts.Node, walk: () => A) => A;
194
+ /**
195
+ * Marks the walks from `owner` inward as dependent on their caller: `owner` and the walks inside it for a
196
+ * parameter of `owner`, only the walks inside it for a recursion into `owner`. An owner that already
197
+ * returned, such as the maker of a closure, marks every walk.
198
+ */
199
+ export declare const markDependent: (ctx: Analysis, owner: ts.Node, includeOwner: boolean) => void;
200
+ export declare const unwrap: (expression: ts.Expression) => ts.Expression;
201
+ export declare const isGenerator: (node: FunctionNode) => boolean;
202
+ export declare const lookup: (ctx: Analysis, identifier: ts.Identifier) => Decl | undefined;
203
+ export declare const functionValue: (node: FunctionNode, env: Env) => FunctionValue;
204
+ export declare const bindingOf: (env: Env, parameter: ts.ParameterDeclaration) => Binding | undefined;
205
+ /** The Env of one call of `fn`: each parameter holds its argument, unevaluated until the body reads it. */
206
+ export declare const bindArguments: (fn: FunctionValue, bindings: ReadonlyArray<Binding | undefined>) => Env;
207
+ export declare const argumentBindings: (expressions: ReadonlyArray<ts.Expression>, env: Env) => ReadonlyArray<Binding>;
208
+ /** The one expression a function returns: its expression body, or the expression of its only `return`. */
209
+ export declare const resultExpression: (node: FunctionNode) => ts.Expression | undefined;
210
+ interface Api {
211
+ readonly effect: boolean;
212
+ readonly sdk: boolean;
213
+ readonly ns: string;
214
+ readonly name: string;
215
+ }
216
+ /** The namespace and name of a package export: `import { Effect } from 'effect'` and `import * as Effect from 'effect/Effect'` name one. */
217
+ export declare const apiOf: (value: LibValue) => Api;
218
+ export declare const isEffectApi: (value: Value, ns: string, names: ReadonlyArray<string>) => value is LibValue;
219
+ /** The value a module exports under `name`, through re-exports; `seen` stops a re-export cycle. */
220
+ export declare function exported(ctx: Analysis, file: ts.SourceFile, name: string, seen: Set<string>): Value;
221
+ export declare const words: (text: string) => ReadonlySet<string>;
222
+ export declare function evaluate(ctx: Analysis, expression: ts.Expression, env: Env): Value;
223
+ export declare const FUNCTION_BUILDERS: string[];
224
+ export declare const lastFunction: (ctx: Analysis, given: ReadonlyArray<ts.Expression>, env: Env) => FunctionValue | undefined;
225
+ export declare const effectName: (value: Value) => string | undefined;
226
+ export declare const isPipeFunction: (value: Value) => boolean;
227
+ export declare const DEFERRED: string[];
228
+ export declare function member(ctx: Analysis, base: Value, name: string): Value;
229
+ /** The package export at the root of `X<…>()(…)` call chains, such as `Context.Service` or `Variable`. */
230
+ export declare const rootCallee: (ctx: Analysis, expression: ts.Expression, env: Env) => Value;
231
+ export declare const extendsExpression: (node: ts.ClassLikeDeclaration) => ts.Expression | undefined;
232
+ /** What `yield*` of a value gives: the service of a service key, or a package value. */
233
+ export declare function resultOf(ctx: Analysis, value: Value): Value;
234
+ /** A value the source writes as literals, through `const` names; `undefined` when a part is computed. */
235
+ export declare const literalOf: (ctx: Analysis, expression: ts.Expression, env: Env, depth: number) => {
236
+ readonly value: Schema.Json;
237
+ } | undefined;
238
+ /** The text an expression is written as, through `const` names; only text names a step, an endpoint, or a path. */
239
+ export declare const textOf: (ctx: Analysis, expression: ts.Expression | undefined, env: Env) => string | undefined;
240
+ /** The expression an object literal gives `name`; the last property with the name wins. */
241
+ export declare const propertyExpression: (node: ts.ObjectLiteralExpression, name: string) => ts.Expression | undefined;
242
+ export {};
243
+ //# sourceMappingURL=StaticGraphValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaticGraphValues.d.ts","sourceRoot":"","sources":["../src/StaticGraphValues.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,KAAK,YAAY,EAGjB,KAAK,OAAO,EAGb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,KAAK,IAAI,GACL;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC;IAEtC,QAAQ,CAAC,I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