@toolproof-npm/shared 0.1.91 → 0.1.93
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.
|
@@ -11,12 +11,12 @@ export type ResolveResult = {
|
|
|
11
11
|
entry: ResourceMissingJson;
|
|
12
12
|
path: CreationContextJson[];
|
|
13
13
|
} | {
|
|
14
|
-
status: '
|
|
14
|
+
status: 'potential-output';
|
|
15
15
|
entry: ResourcePotentialOutputJson;
|
|
16
16
|
path: CreationContextJson[];
|
|
17
17
|
} | {
|
|
18
18
|
status: 'unresolved';
|
|
19
|
-
reason: '
|
|
19
|
+
reason: 'not-found' | 'cycle' | 'depth-exceeded';
|
|
20
20
|
path: CreationContextJson[];
|
|
21
21
|
};
|
|
22
22
|
export declare function resolveResourceChain(strategyState: StrategyStateJson, start: CreationContextJson, opts?: {
|
package/dist/_lib/utils/utils.js
CHANGED
|
@@ -30,10 +30,10 @@ export function resolveResourceChain(strategyState, start, opts) {
|
|
|
30
30
|
visited.add(visitKey);
|
|
31
31
|
const bucket = strategyState[current.executionRef];
|
|
32
32
|
if (!bucket)
|
|
33
|
-
return { status: 'unresolved', reason: '
|
|
33
|
+
return { status: 'unresolved', reason: 'not-found', path };
|
|
34
34
|
const entry = bucket[current.resourceRoleRef];
|
|
35
35
|
if (!entry)
|
|
36
|
-
return { status: 'unresolved', reason: '
|
|
36
|
+
return { status: 'unresolved', reason: 'not-found', path };
|
|
37
37
|
if (entry.kind === 'materialized') {
|
|
38
38
|
return { status: 'materialized', entry: entry, path };
|
|
39
39
|
}
|
|
@@ -41,18 +41,18 @@ export function resolveResourceChain(strategyState, start, opts) {
|
|
|
41
41
|
return { status: 'missing', entry: entry, path };
|
|
42
42
|
}
|
|
43
43
|
if (entry.kind === 'potential-output') {
|
|
44
|
-
return { status: '
|
|
44
|
+
return { status: 'potential-output', entry: entry, path };
|
|
45
45
|
}
|
|
46
46
|
// potential-input: follow ref backwards
|
|
47
47
|
if (entry.kind === 'potential-input') {
|
|
48
48
|
const rpi = entry.creationContext;
|
|
49
49
|
if (!rpi)
|
|
50
|
-
return { status: 'unresolved', reason: '
|
|
50
|
+
return { status: 'unresolved', reason: 'not-found', path };
|
|
51
51
|
current = rpi;
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
54
|
// Unknown case
|
|
55
|
-
return { status: 'unresolved', reason: '
|
|
55
|
+
return { status: 'unresolved', reason: 'not-found', path };
|
|
56
56
|
}
|
|
57
57
|
return { status: 'unresolved', reason: 'depth-exceeded', path };
|
|
58
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolproof-npm/shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.93",
|
|
4
4
|
"description": "Core library utilities for ToolProof",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"toolproof",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"typescript": "^5.9.3"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@toolproof-npm/schema": "^0.1.
|
|
62
|
+
"@toolproof-npm/schema": "^0.1.68",
|
|
63
63
|
"firebase-admin": "^13.6.0"
|
|
64
64
|
}
|
|
65
65
|
}
|