@suss/ir-core 0.20.0 → 0.21.1
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/{chunk-52CH76PE.js → chunk-PPQWK62O.js} +325 -61
- package/dist/index.cjs +442 -205
- package/dist/index.d.cts +321 -112
- package/dist/index.d.ts +321 -112
- package/dist/index.js +135 -144
- package/dist/{schemas-Dt93kAZT.d.cts → schemas-Dn1AzzWd.d.cts} +37 -1
- package/dist/{schemas-Dt93kAZT.d.ts → schemas-Dn1AzzWd.d.ts} +37 -1
- package/dist/schemas.cjs +209 -61
- package/dist/schemas.d.cts +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ConfidenceSourceSchema,
|
|
6
6
|
CorroborationSchema,
|
|
7
7
|
DeployableUnitSchema,
|
|
8
|
+
EVERY_FIELD,
|
|
8
9
|
FunctionCallSemanticsSchema,
|
|
9
10
|
GraphqlOperationSemanticsSchema,
|
|
10
11
|
GraphqlResolverSemanticsSchema,
|
|
@@ -16,27 +17,44 @@ import {
|
|
|
16
17
|
SourceLocationSchema,
|
|
17
18
|
StorageSemanticsSchema,
|
|
18
19
|
TypeShapeSchema,
|
|
20
|
+
UnitInvocationSemanticsSchema,
|
|
19
21
|
allBehaviors,
|
|
20
22
|
behaviorOf,
|
|
23
|
+
boundaryNameString,
|
|
21
24
|
busIdentityKey,
|
|
22
25
|
busesAgree,
|
|
23
26
|
channelsPair,
|
|
27
|
+
dispatchByType,
|
|
24
28
|
ecsContainerInstanceName,
|
|
29
|
+
fixedTextLength,
|
|
25
30
|
fnIdentityKey,
|
|
26
31
|
formatChannel,
|
|
27
32
|
gqlIdentityKey,
|
|
33
|
+
hasNameHole,
|
|
28
34
|
methodsAgree,
|
|
29
35
|
metricIdentityKey,
|
|
36
|
+
namePatternFromSub,
|
|
37
|
+
namePatternKey,
|
|
38
|
+
namesAgree,
|
|
39
|
+
namesNothing,
|
|
30
40
|
normalizePath,
|
|
41
|
+
parseBoundaryName,
|
|
31
42
|
parseChannel,
|
|
32
43
|
pathAfterOrigin,
|
|
33
44
|
pathShape,
|
|
45
|
+
patternHole,
|
|
46
|
+
referenceFromName,
|
|
47
|
+
referenceName,
|
|
48
|
+
referenceOf,
|
|
34
49
|
routePathAdmits,
|
|
35
50
|
semconvMappingOf,
|
|
36
51
|
statesAnOrigin,
|
|
52
|
+
storageContainerLabel,
|
|
53
|
+
storageLabel,
|
|
37
54
|
typeDefinitionKey,
|
|
55
|
+
unitIdentityKey,
|
|
38
56
|
withDefinitionsInlined
|
|
39
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-PPQWK62O.js";
|
|
40
58
|
|
|
41
59
|
// src/semconv.ts
|
|
42
60
|
function semconvAttributes(binding) {
|
|
@@ -58,6 +76,9 @@ function semconvAttributes(binding) {
|
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
// src/boundaryKey.ts
|
|
79
|
+
function bindingIs(binding, name) {
|
|
80
|
+
return binding?.semantics.name === name;
|
|
81
|
+
}
|
|
61
82
|
function boundaryKey(binding) {
|
|
62
83
|
return behaviorOf(binding.semantics).identityKey(binding.semantics);
|
|
63
84
|
}
|
|
@@ -71,12 +92,16 @@ function withRewrittenPaths(binding, rewrite) {
|
|
|
71
92
|
semantics: behavior.rewritePaths(binding.semantics, rewrite)
|
|
72
93
|
};
|
|
73
94
|
}
|
|
74
|
-
function groundedPairingKey(binding,
|
|
95
|
+
function groundedPairingKey(binding, deployment) {
|
|
96
|
+
return pairingKey(groundBinding(binding, deployment));
|
|
97
|
+
}
|
|
98
|
+
function groundBinding(binding, deployment) {
|
|
75
99
|
const behavior = behaviorOf(binding.semantics);
|
|
76
|
-
const grounded = behavior.groundName?.(binding.semantics,
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
100
|
+
const grounded = behavior.groundName?.(binding.semantics, deployment) ?? null;
|
|
101
|
+
return grounded === null ? binding : { ...binding, semantics: grounded };
|
|
102
|
+
}
|
|
103
|
+
function nameReference(binding) {
|
|
104
|
+
return behaviorOf(binding.semantics).nameReference?.(binding.semantics) ?? null;
|
|
80
105
|
}
|
|
81
106
|
function pairingKey(binding) {
|
|
82
107
|
const behavior = behaviorOf(binding.semantics);
|
|
@@ -125,140 +150,60 @@ function servesRequest(binding, method, path) {
|
|
|
125
150
|
}
|
|
126
151
|
return serves(binding.semantics, method, path);
|
|
127
152
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const handler = table[value.type];
|
|
132
|
-
return handler(value);
|
|
153
|
+
function withinScope(binding, scope) {
|
|
154
|
+
const within = behaviorOf(binding.semantics).withinScope;
|
|
155
|
+
return within === void 0 ? false : within(binding.semantics, scope);
|
|
133
156
|
}
|
|
134
157
|
|
|
135
|
-
// src/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
};
|
|
159
|
-
var nameString = {
|
|
160
|
-
literal: (name) => name.value,
|
|
161
|
-
pattern: (name) => name.parts.map((part) => dispatchByType(partString, part)).join(""),
|
|
162
|
-
reference: (name) => patternHole(name.path.join("."))
|
|
163
|
-
};
|
|
164
|
-
function boundaryNameString(name) {
|
|
165
|
-
return dispatchByType(nameString, name);
|
|
166
|
-
}
|
|
167
|
-
function patternHole(label) {
|
|
168
|
-
return `{${label}}`;
|
|
169
|
-
}
|
|
170
|
-
function namePatternFromSub(value) {
|
|
171
|
-
if (Array.isArray(value)) {
|
|
172
|
-
return typeof value[0] === "string" ? namePatternFromSub(value[0]) : null;
|
|
173
|
-
}
|
|
174
|
-
if (typeof value !== "string") {
|
|
175
|
-
return null;
|
|
158
|
+
// src/boundarySpelling.ts
|
|
159
|
+
function resourceNameIn(spelling) {
|
|
160
|
+
if (spelling.startsWith("arn:")) {
|
|
161
|
+
const segments2 = spelling.split(":");
|
|
162
|
+
return segments2[6] ?? segments2[5] ?? spelling;
|
|
163
|
+
}
|
|
164
|
+
const segments = spelling.split("/");
|
|
165
|
+
if (segments.length >= 4 && segments.length % 2 === 0) {
|
|
166
|
+
return segments[segments.length - 1] ?? spelling;
|
|
167
|
+
}
|
|
168
|
+
return spelling;
|
|
169
|
+
}
|
|
170
|
+
function spellingTokens(text) {
|
|
171
|
+
return text.toLowerCase().replace(/[{}]/g, " ").split(/[\s:#,()/]+/).filter((token) => token.length > 0);
|
|
172
|
+
}
|
|
173
|
+
function bindingTokens(binding) {
|
|
174
|
+
const tokens = new Set(spellingTokens(displayLabel(binding)));
|
|
175
|
+
for (const value of Object.values(binding.semantics)) {
|
|
176
|
+
if (typeof value === "string") {
|
|
177
|
+
for (const token of spellingTokens(value)) {
|
|
178
|
+
tokens.add(token);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
176
181
|
}
|
|
177
|
-
|
|
178
|
-
|
|
182
|
+
for (const token of [...tokens]) {
|
|
183
|
+
for (const part of token.split(".")) {
|
|
184
|
+
tokens.add(part);
|
|
185
|
+
}
|
|
179
186
|
}
|
|
180
|
-
return
|
|
181
|
-
SUB_TOKEN,
|
|
182
|
-
(_whole, inner) => patternHole(inner)
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
function namesNothing(name) {
|
|
186
|
-
return parseBoundaryName(name).type === "reference";
|
|
187
|
-
}
|
|
188
|
-
function hasNameHole(name) {
|
|
189
|
-
return parseBoundaryName(name).type !== "literal";
|
|
190
|
-
}
|
|
191
|
-
function namePatternKey(name) {
|
|
192
|
-
return dispatchByType(
|
|
193
|
-
{
|
|
194
|
-
literal: (parsed) => parsed.value,
|
|
195
|
-
pattern: (parsed) => boundaryNameString({
|
|
196
|
-
type: "pattern",
|
|
197
|
-
parts: parsed.parts.map(
|
|
198
|
-
(part) => part.type === "hole" ? { type: "hole", label: "" } : part
|
|
199
|
-
)
|
|
200
|
-
}),
|
|
201
|
-
reference: () => patternHole("")
|
|
202
|
-
},
|
|
203
|
-
parseBoundaryName(name)
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
function fixedTextLength(name) {
|
|
207
|
-
return dispatchByType(
|
|
208
|
-
{
|
|
209
|
-
literal: (parsed) => parsed.value.length,
|
|
210
|
-
pattern: (parsed) => parsed.parts.reduce(
|
|
211
|
-
(total, part) => total + (part.type === "text" ? part.text.length : 0),
|
|
212
|
-
0
|
|
213
|
-
),
|
|
214
|
-
reference: () => 0
|
|
215
|
-
},
|
|
216
|
-
parseBoundaryName(name)
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
function quote(text) {
|
|
220
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
221
|
-
}
|
|
222
|
-
function admits(pattern, name) {
|
|
223
|
-
const source = pattern.parts.map((part) => part.type === "hole" ? ".+" : quote(part.text)).join("");
|
|
224
|
-
return new RegExp(`^${source}$`).test(name);
|
|
187
|
+
return tokens;
|
|
225
188
|
}
|
|
226
|
-
function
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
if (left.type === "reference" || right.type === "reference") {
|
|
189
|
+
function namesBoundaryExactly(subject, binding) {
|
|
190
|
+
const wanted = new Set(spellingTokens(subject));
|
|
191
|
+
if (wanted.size === 0) {
|
|
230
192
|
return false;
|
|
231
193
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
if (left.type === "pattern") {
|
|
236
|
-
return admits(left, b);
|
|
237
|
-
}
|
|
238
|
-
if (right.type === "pattern") {
|
|
239
|
-
return admits(right, a);
|
|
240
|
-
}
|
|
241
|
-
return a === b;
|
|
242
|
-
}
|
|
243
|
-
function referenceName(reference) {
|
|
244
|
-
const path = [reference.root, ...reference.fields];
|
|
245
|
-
if (path.some((part) => part === "")) {
|
|
246
|
-
return null;
|
|
194
|
+
const spelled = new Set(spellingTokens(displayLabel(binding)));
|
|
195
|
+
if (spelled.size !== wanted.size) {
|
|
196
|
+
return false;
|
|
247
197
|
}
|
|
248
|
-
return
|
|
198
|
+
return [...spelled].every((token) => wanted.has(token));
|
|
249
199
|
}
|
|
250
|
-
function
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
const root = name.path[0];
|
|
255
|
-
if (root === void 0 || name.path.some((part) => part === "")) {
|
|
256
|
-
return null;
|
|
200
|
+
function namesBoundary(subject, binding) {
|
|
201
|
+
const wanted = spellingTokens(subject);
|
|
202
|
+
if (wanted.length === 0) {
|
|
203
|
+
return false;
|
|
257
204
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
function referenceFromName(name) {
|
|
261
|
-
return referenceOf(parseBoundaryName(name));
|
|
205
|
+
const tokens = bindingTokens(binding);
|
|
206
|
+
return wanted.every((token) => tokens.has(token));
|
|
262
207
|
}
|
|
263
208
|
|
|
264
209
|
// src/codeScope.ts
|
|
@@ -274,26 +219,43 @@ function fileInCodeScope(file, scope) {
|
|
|
274
219
|
return path === prefix || path.startsWith(`${prefix}/`);
|
|
275
220
|
}
|
|
276
221
|
|
|
277
|
-
// src/
|
|
222
|
+
// src/deployment.ts
|
|
223
|
+
var NOTHING_DEPLOYED = {
|
|
224
|
+
variableFor: () => null,
|
|
225
|
+
setTo: () => null,
|
|
226
|
+
pointsAt: () => null
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
// src/relation.ts
|
|
278
230
|
import { z } from "zod";
|
|
279
|
-
var
|
|
280
|
-
|
|
281
|
-
|
|
231
|
+
var RelationSchema = z.enum([
|
|
232
|
+
"provides",
|
|
233
|
+
"reads",
|
|
234
|
+
"writes",
|
|
235
|
+
"invokes"
|
|
236
|
+
]);
|
|
237
|
+
var EffectRelationSchema = RelationSchema.exclude(["provides"]);
|
|
238
|
+
|
|
239
|
+
// src/suppressions.ts
|
|
240
|
+
import { z as z2 } from "zod";
|
|
241
|
+
var SuppressionSideSchema = z2.object({
|
|
242
|
+
summary: z2.string().optional(),
|
|
243
|
+
transitionId: z2.string().optional()
|
|
282
244
|
}).optional();
|
|
283
|
-
var SuppressionRuleSchema =
|
|
245
|
+
var SuppressionRuleSchema = z2.object({
|
|
284
246
|
/**
|
|
285
247
|
* The finding kind to match, behavioural or intent. It is an open
|
|
286
248
|
* string here because this package is below both IRs, and the loader
|
|
287
249
|
* is what validates it against the published kind enums.
|
|
288
250
|
*/
|
|
289
|
-
kind:
|
|
251
|
+
kind: z2.string().optional(),
|
|
290
252
|
/**
|
|
291
253
|
* Boundary as a human-readable key, e.g. "GET /pet/{petId}" or
|
|
292
254
|
* "fn:@acme/api::getUser". REST keys are normalized via the same
|
|
293
255
|
* path normalizer the checkers use, so `:id` and `{id}` compare
|
|
294
256
|
* equal.
|
|
295
257
|
*/
|
|
296
|
-
boundary:
|
|
258
|
+
boundary: z2.string().optional(),
|
|
297
259
|
/**
|
|
298
260
|
* Consumer-side discriminators, the narrowest useful match. These
|
|
299
261
|
* mean something only for behavioural findings: a rule that
|
|
@@ -316,15 +278,15 @@ var SuppressionRuleSchema = z.object({
|
|
|
316
278
|
* kind-only or boundary-only matches, which also silence future
|
|
317
279
|
* regressions in that category.
|
|
318
280
|
*/
|
|
319
|
-
scope:
|
|
281
|
+
scope: z2.enum(["narrow", "broad"]).default("narrow"),
|
|
320
282
|
/** Required human-written justification. */
|
|
321
|
-
reason:
|
|
283
|
+
reason: z2.string().min(1),
|
|
322
284
|
/** What to do when a finding matches. */
|
|
323
|
-
effect:
|
|
285
|
+
effect: z2.enum(["mark", "downgrade", "hide"]).default("mark")
|
|
324
286
|
}).strict();
|
|
325
|
-
var SuppressionFileSchema =
|
|
326
|
-
version:
|
|
327
|
-
rules:
|
|
287
|
+
var SuppressionFileSchema = z2.object({
|
|
288
|
+
version: z2.literal(1),
|
|
289
|
+
rules: z2.array(SuppressionRuleSchema)
|
|
328
290
|
}).strict();
|
|
329
291
|
function validateRule(rule) {
|
|
330
292
|
if (rule.scope === "broad") {
|
|
@@ -614,6 +576,17 @@ function runtimeConfigBinding(opts) {
|
|
|
614
576
|
recognition: opts.recognition
|
|
615
577
|
};
|
|
616
578
|
}
|
|
579
|
+
function unitInvocationBinding(opts) {
|
|
580
|
+
return {
|
|
581
|
+
transport: "invoke",
|
|
582
|
+
semantics: {
|
|
583
|
+
name: "unit-invocation",
|
|
584
|
+
deploymentTarget: opts.deploymentTarget,
|
|
585
|
+
instanceName: namedOrNull(opts.instanceName, "invoked unit")
|
|
586
|
+
},
|
|
587
|
+
recognition: opts.recognition
|
|
588
|
+
};
|
|
589
|
+
}
|
|
617
590
|
function storageBinding(opts) {
|
|
618
591
|
return {
|
|
619
592
|
transport: opts.transport ?? opts.storageSystem,
|
|
@@ -656,11 +629,15 @@ export {
|
|
|
656
629
|
ConfidenceSourceSchema,
|
|
657
630
|
CorroborationSchema,
|
|
658
631
|
DeployableUnitSchema,
|
|
632
|
+
EVERY_FIELD,
|
|
633
|
+
EffectRelationSchema,
|
|
659
634
|
FunctionCallSemanticsSchema,
|
|
660
635
|
GraphqlOperationSemanticsSchema,
|
|
661
636
|
GraphqlResolverSemanticsSchema,
|
|
662
637
|
MessageBusSemanticsSchema,
|
|
663
638
|
MetricSemanticsSchema,
|
|
639
|
+
NOTHING_DEPLOYED,
|
|
640
|
+
RelationSchema,
|
|
664
641
|
RestSemanticsSchema,
|
|
665
642
|
RuntimeConfigSemanticsSchema,
|
|
666
643
|
SemanticsSchema,
|
|
@@ -669,7 +646,10 @@ export {
|
|
|
669
646
|
SuppressionFileSchema,
|
|
670
647
|
SuppressionRuleSchema,
|
|
671
648
|
TypeShapeSchema,
|
|
649
|
+
UnitInvocationSemanticsSchema,
|
|
672
650
|
applySuppressionsToFindings,
|
|
651
|
+
bindingIs,
|
|
652
|
+
bindingTokens,
|
|
673
653
|
bodyShapesMatch,
|
|
674
654
|
boundaryKey,
|
|
675
655
|
boundaryLabel,
|
|
@@ -692,6 +672,7 @@ export {
|
|
|
692
672
|
gqlIdentityKey,
|
|
693
673
|
graphqlOperationBinding,
|
|
694
674
|
graphqlResolverBinding,
|
|
675
|
+
groundBinding,
|
|
695
676
|
groundedPairingKey,
|
|
696
677
|
hasNameHole,
|
|
697
678
|
isGraphqlOperationBinding,
|
|
@@ -701,7 +682,10 @@ export {
|
|
|
701
682
|
metricIdentityKey,
|
|
702
683
|
namePatternFromSub,
|
|
703
684
|
namePatternKey,
|
|
685
|
+
nameReference,
|
|
704
686
|
namesAgree,
|
|
687
|
+
namesBoundary,
|
|
688
|
+
namesBoundaryExactly,
|
|
705
689
|
namesNothing,
|
|
706
690
|
normalizePath,
|
|
707
691
|
normalizeRuleBoundary,
|
|
@@ -716,6 +700,7 @@ export {
|
|
|
716
700
|
referenceName,
|
|
717
701
|
referenceOf,
|
|
718
702
|
reportsUnpairedItself,
|
|
703
|
+
resourceNameIn,
|
|
719
704
|
restBinding,
|
|
720
705
|
routePathAdmits,
|
|
721
706
|
ruleBoundaryMatchesKey,
|
|
@@ -723,10 +708,16 @@ export {
|
|
|
723
708
|
semanticsAgree,
|
|
724
709
|
semconvAttributes,
|
|
725
710
|
servesRequest,
|
|
711
|
+
spellingTokens,
|
|
726
712
|
statesAnOrigin,
|
|
727
713
|
storageBinding,
|
|
714
|
+
storageContainerLabel,
|
|
715
|
+
storageLabel,
|
|
728
716
|
typeDefinitionKey,
|
|
717
|
+
unitIdentityKey,
|
|
718
|
+
unitInvocationBinding,
|
|
729
719
|
validateRule,
|
|
730
720
|
withDefinitionsInlined,
|
|
731
|
-
withRewrittenPaths
|
|
721
|
+
withRewrittenPaths,
|
|
722
|
+
withinScope
|
|
732
723
|
};
|
|
@@ -155,6 +155,16 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
155
155
|
name: z.ZodLiteral<"metric">;
|
|
156
156
|
metricSystem: z.ZodString;
|
|
157
157
|
metricType: z.ZodNullable<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
deploymentTarget: z.ZodEnum<{
|
|
160
|
+
lambda: "lambda";
|
|
161
|
+
"ecs-task": "ecs-task";
|
|
162
|
+
container: "container";
|
|
163
|
+
"k8s-deployment": "k8s-deployment";
|
|
164
|
+
worker: "worker";
|
|
165
|
+
}>;
|
|
166
|
+
name: z.ZodLiteral<"unit-invocation">;
|
|
167
|
+
instanceName: z.ZodNullable<z.ZodString>;
|
|
158
168
|
}, z.core.$strip>], "name">;
|
|
159
169
|
type Semantics = z.infer<typeof SemanticsSchema>;
|
|
160
170
|
|
|
@@ -220,6 +230,22 @@ declare const StorageSemanticsSchema: z.ZodObject<{
|
|
|
220
230
|
accessPath: z.ZodNullable<z.ZodString>;
|
|
221
231
|
}, z.core.$strip>;
|
|
222
232
|
type StorageSemantics = z.infer<typeof StorageSemanticsSchema>;
|
|
233
|
+
/**
|
|
234
|
+
* `postgresql:invoices`, `aws.dynamodb:editions#by-publication`. The
|
|
235
|
+
* pairing pass has no key to fall back on here, so a reader who types
|
|
236
|
+
* this back at `suss ask`, the pass that indexes accesses by it, and an
|
|
237
|
+
* intent doc that says which store a write reaches all read this one.
|
|
238
|
+
*/
|
|
239
|
+
declare function storageLabel(semantics: StorageSemantics): string;
|
|
240
|
+
/**
|
|
241
|
+
* What an access writes for its columns when it asked for all of them,
|
|
242
|
+
* which is a query with no explicit projection. It covers every column
|
|
243
|
+
* rather than saying which one, so anything comparing column lists has
|
|
244
|
+
* to tell it apart from a list of columns.
|
|
245
|
+
*/
|
|
246
|
+
declare const EVERY_FIELD = "*";
|
|
247
|
+
/** The store on its own, which a finding writes without the system. */
|
|
248
|
+
declare function storageContainerLabel(semantics: StorageSemantics): string;
|
|
223
249
|
|
|
224
250
|
/**
|
|
225
251
|
* @suss/ir-core schemas: primitives shared by every suss IR.
|
|
@@ -366,6 +392,16 @@ declare const BoundaryBindingSchema: z.ZodObject<{
|
|
|
366
392
|
name: z.ZodLiteral<"metric">;
|
|
367
393
|
metricSystem: z.ZodString;
|
|
368
394
|
metricType: z.ZodNullable<z.ZodString>;
|
|
395
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
396
|
+
deploymentTarget: z.ZodEnum<{
|
|
397
|
+
lambda: "lambda";
|
|
398
|
+
"ecs-task": "ecs-task";
|
|
399
|
+
container: "container";
|
|
400
|
+
"k8s-deployment": "k8s-deployment";
|
|
401
|
+
worker: "worker";
|
|
402
|
+
}>;
|
|
403
|
+
name: z.ZodLiteral<"unit-invocation">;
|
|
404
|
+
instanceName: z.ZodNullable<z.ZodString>;
|
|
369
405
|
}, z.core.$strip>], "name">;
|
|
370
406
|
recognition: z.ZodString;
|
|
371
407
|
}, z.core.$strip>;
|
|
@@ -455,4 +491,4 @@ declare const TypeShapeSchema: z.ZodType<TypeShape>;
|
|
|
455
491
|
*/
|
|
456
492
|
declare function withDefinitionsInlined(shape: TypeShape, definitions: Record<string, TypeShape> | undefined, depth?: number, inProgress?: ReadonlySet<string>): TypeShape;
|
|
457
493
|
|
|
458
|
-
export { BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, type MessageBusSemantics as M, type RestSemantics as R, type Semantics as S, type TypeShape as T, ConfidenceLevelSchema as a, ConfidenceSourceSchema as b, CorroborationSchema as c, SourceLocationSchema as d, type MessageBusTechnology as e, DeployableUnitSchema as f, FunctionCallSemanticsSchema as g, GraphqlOperationSemanticsSchema as h, type GraphqlResolverSemantics as i, GraphqlResolverSemanticsSchema as j, MessageBusSemanticsSchema as k, RestSemanticsSchema as l, type RuntimeConfigSemantics as m, RuntimeConfigSemanticsSchema as n, SemanticsSchema as o, type StorageSemantics as p, StorageSemanticsSchema as q, TypeShapeSchema as r, ecsContainerInstanceName as s, methodsAgree as t, normalizePath as u, pathShape as v, routePathAdmits as w,
|
|
494
|
+
export { withDefinitionsInlined as A, BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, EVERY_FIELD as E, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, type MessageBusSemantics as M, type RestSemantics as R, type Semantics as S, type TypeShape as T, ConfidenceLevelSchema as a, ConfidenceSourceSchema as b, CorroborationSchema as c, SourceLocationSchema as d, type MessageBusTechnology as e, DeployableUnitSchema as f, FunctionCallSemanticsSchema as g, GraphqlOperationSemanticsSchema as h, type GraphqlResolverSemantics as i, GraphqlResolverSemanticsSchema as j, MessageBusSemanticsSchema as k, RestSemanticsSchema as l, type RuntimeConfigSemantics as m, RuntimeConfigSemanticsSchema as n, SemanticsSchema as o, type StorageSemantics as p, StorageSemanticsSchema as q, TypeShapeSchema as r, ecsContainerInstanceName as s, methodsAgree as t, normalizePath as u, pathShape as v, routePathAdmits as w, storageContainerLabel as x, storageLabel as y, typeDefinitionKey as z };
|
|
@@ -155,6 +155,16 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
155
155
|
name: z.ZodLiteral<"metric">;
|
|
156
156
|
metricSystem: z.ZodString;
|
|
157
157
|
metricType: z.ZodNullable<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
deploymentTarget: z.ZodEnum<{
|
|
160
|
+
lambda: "lambda";
|
|
161
|
+
"ecs-task": "ecs-task";
|
|
162
|
+
container: "container";
|
|
163
|
+
"k8s-deployment": "k8s-deployment";
|
|
164
|
+
worker: "worker";
|
|
165
|
+
}>;
|
|
166
|
+
name: z.ZodLiteral<"unit-invocation">;
|
|
167
|
+
instanceName: z.ZodNullable<z.ZodString>;
|
|
158
168
|
}, z.core.$strip>], "name">;
|
|
159
169
|
type Semantics = z.infer<typeof SemanticsSchema>;
|
|
160
170
|
|
|
@@ -220,6 +230,22 @@ declare const StorageSemanticsSchema: z.ZodObject<{
|
|
|
220
230
|
accessPath: z.ZodNullable<z.ZodString>;
|
|
221
231
|
}, z.core.$strip>;
|
|
222
232
|
type StorageSemantics = z.infer<typeof StorageSemanticsSchema>;
|
|
233
|
+
/**
|
|
234
|
+
* `postgresql:invoices`, `aws.dynamodb:editions#by-publication`. The
|
|
235
|
+
* pairing pass has no key to fall back on here, so a reader who types
|
|
236
|
+
* this back at `suss ask`, the pass that indexes accesses by it, and an
|
|
237
|
+
* intent doc that says which store a write reaches all read this one.
|
|
238
|
+
*/
|
|
239
|
+
declare function storageLabel(semantics: StorageSemantics): string;
|
|
240
|
+
/**
|
|
241
|
+
* What an access writes for its columns when it asked for all of them,
|
|
242
|
+
* which is a query with no explicit projection. It covers every column
|
|
243
|
+
* rather than saying which one, so anything comparing column lists has
|
|
244
|
+
* to tell it apart from a list of columns.
|
|
245
|
+
*/
|
|
246
|
+
declare const EVERY_FIELD = "*";
|
|
247
|
+
/** The store on its own, which a finding writes without the system. */
|
|
248
|
+
declare function storageContainerLabel(semantics: StorageSemantics): string;
|
|
223
249
|
|
|
224
250
|
/**
|
|
225
251
|
* @suss/ir-core schemas: primitives shared by every suss IR.
|
|
@@ -366,6 +392,16 @@ declare const BoundaryBindingSchema: z.ZodObject<{
|
|
|
366
392
|
name: z.ZodLiteral<"metric">;
|
|
367
393
|
metricSystem: z.ZodString;
|
|
368
394
|
metricType: z.ZodNullable<z.ZodString>;
|
|
395
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
396
|
+
deploymentTarget: z.ZodEnum<{
|
|
397
|
+
lambda: "lambda";
|
|
398
|
+
"ecs-task": "ecs-task";
|
|
399
|
+
container: "container";
|
|
400
|
+
"k8s-deployment": "k8s-deployment";
|
|
401
|
+
worker: "worker";
|
|
402
|
+
}>;
|
|
403
|
+
name: z.ZodLiteral<"unit-invocation">;
|
|
404
|
+
instanceName: z.ZodNullable<z.ZodString>;
|
|
369
405
|
}, z.core.$strip>], "name">;
|
|
370
406
|
recognition: z.ZodString;
|
|
371
407
|
}, z.core.$strip>;
|
|
@@ -455,4 +491,4 @@ declare const TypeShapeSchema: z.ZodType<TypeShape>;
|
|
|
455
491
|
*/
|
|
456
492
|
declare function withDefinitionsInlined(shape: TypeShape, definitions: Record<string, TypeShape> | undefined, depth?: number, inProgress?: ReadonlySet<string>): TypeShape;
|
|
457
493
|
|
|
458
|
-
export { BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, type MessageBusSemantics as M, type RestSemantics as R, type Semantics as S, type TypeShape as T, ConfidenceLevelSchema as a, ConfidenceSourceSchema as b, CorroborationSchema as c, SourceLocationSchema as d, type MessageBusTechnology as e, DeployableUnitSchema as f, FunctionCallSemanticsSchema as g, GraphqlOperationSemanticsSchema as h, type GraphqlResolverSemantics as i, GraphqlResolverSemanticsSchema as j, MessageBusSemanticsSchema as k, RestSemanticsSchema as l, type RuntimeConfigSemantics as m, RuntimeConfigSemanticsSchema as n, SemanticsSchema as o, type StorageSemantics as p, StorageSemanticsSchema as q, TypeShapeSchema as r, ecsContainerInstanceName as s, methodsAgree as t, normalizePath as u, pathShape as v, routePathAdmits as w,
|
|
494
|
+
export { withDefinitionsInlined as A, BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, EVERY_FIELD as E, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, type MessageBusSemantics as M, type RestSemantics as R, type Semantics as S, type TypeShape as T, ConfidenceLevelSchema as a, ConfidenceSourceSchema as b, CorroborationSchema as c, SourceLocationSchema as d, type MessageBusTechnology as e, DeployableUnitSchema as f, FunctionCallSemanticsSchema as g, GraphqlOperationSemanticsSchema as h, type GraphqlResolverSemantics as i, GraphqlResolverSemanticsSchema as j, MessageBusSemanticsSchema as k, RestSemanticsSchema as l, type RuntimeConfigSemantics as m, RuntimeConfigSemanticsSchema as n, SemanticsSchema as o, type StorageSemantics as p, StorageSemanticsSchema as q, TypeShapeSchema as r, ecsContainerInstanceName as s, methodsAgree as t, normalizePath as u, pathShape as v, routePathAdmits as w, storageContainerLabel as x, storageLabel as y, typeDefinitionKey as z };
|