@suss/ir-core 0.33.0 → 0.34.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/README.md +30 -30
- package/dist/{chunk-N564FH5U.js → chunk-WOXA5GBL.js} +251 -208
- package/dist/index.cjs +335 -248
- package/dist/index.d.cts +399 -355
- package/dist/index.d.ts +399 -355
- package/dist/index.js +68 -26
- package/dist/{schemas-CIns0fqF.d.cts → schemas-CghZNwSE.d.cts} +88 -81
- package/dist/{schemas-CIns0fqF.d.ts → schemas-CghZNwSE.d.ts} +88 -81
- package/dist/schemas.cjs +248 -208
- package/dist/schemas.d.cts +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
FunctionCallSemanticsSchema,
|
|
10
10
|
GraphqlOperationSemanticsSchema,
|
|
11
11
|
GraphqlResolverSemanticsSchema,
|
|
12
|
+
IoSemanticsSchema,
|
|
12
13
|
MessageBusSemanticsSchema,
|
|
13
14
|
MetricSemanticsSchema,
|
|
14
15
|
RestSemanticsSchema,
|
|
@@ -32,6 +33,8 @@ import {
|
|
|
32
33
|
formatChannel,
|
|
33
34
|
gqlIdentityKey,
|
|
34
35
|
hasNameHole,
|
|
36
|
+
ioIdentityKey,
|
|
37
|
+
isModuleName,
|
|
35
38
|
methodsAgree,
|
|
36
39
|
metricIdentityKey,
|
|
37
40
|
namePatternFromSub,
|
|
@@ -59,7 +62,7 @@ import {
|
|
|
59
62
|
typeDefinitionKey,
|
|
60
63
|
unitIdentityKey,
|
|
61
64
|
withDefinitionsInlined
|
|
62
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-WOXA5GBL.js";
|
|
63
66
|
|
|
64
67
|
// src/semconv.ts
|
|
65
68
|
function semconvAttributes(binding) {
|
|
@@ -139,6 +142,9 @@ function boundaryLabel(binding) {
|
|
|
139
142
|
function displayLabel(binding) {
|
|
140
143
|
return boundaryLabel(binding) ?? `${binding.semantics.name}:${binding.recognition}`;
|
|
141
144
|
}
|
|
145
|
+
function labelWithDetail(binding, detail) {
|
|
146
|
+
return `${boundaryLabel(binding) ?? binding.semantics.name} ${detail}`;
|
|
147
|
+
}
|
|
142
148
|
function normalizeRuleBoundary(raw) {
|
|
143
149
|
const trimmed = raw.trim();
|
|
144
150
|
for (const behavior of allBehaviors()) {
|
|
@@ -319,39 +325,45 @@ var SuppressionSideSchema = z2.object({
|
|
|
319
325
|
}).optional();
|
|
320
326
|
var SuppressionRuleSchema = z2.object({
|
|
321
327
|
/**
|
|
322
|
-
* The finding kind to match,
|
|
323
|
-
* string
|
|
324
|
-
*
|
|
328
|
+
* The finding kind to match, behavioral or intent. The schema accepts
|
|
329
|
+
* any string because ir-core cannot import either IR's kind enum. The
|
|
330
|
+
* CLI's loader checks it against both.
|
|
325
331
|
*/
|
|
326
332
|
kind: z2.string().optional(),
|
|
327
333
|
/**
|
|
328
|
-
*
|
|
329
|
-
* "fn:@acme/api::getUser". REST
|
|
330
|
-
*
|
|
331
|
-
* equal.
|
|
334
|
+
* The boundary's human-readable key, such as "GET /pet/{petId}" or
|
|
335
|
+
* "fn:@acme/api::getUser". A REST key goes through the same path
|
|
336
|
+
* normalizer the checkers use, so `:id` and `{id}` compare equal.
|
|
332
337
|
*/
|
|
333
338
|
boundary: z2.string().optional(),
|
|
334
339
|
/**
|
|
335
|
-
* Consumer-side discriminators, the narrowest useful match.
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
340
|
+
* Consumer-side discriminators, the narrowest useful match. They
|
|
341
|
+
* apply only to behavioral findings. A rule that sets `consumer`
|
|
342
|
+
* never matches an intent finding, because an intent finding has no
|
|
343
|
+
* consumer side.
|
|
339
344
|
*/
|
|
340
345
|
consumer: SuppressionSideSchema,
|
|
341
346
|
/**
|
|
342
|
-
* Provider-side discriminators, the
|
|
343
|
-
* about a status the provider produces has its
|
|
344
|
-
* side, and that id is the only
|
|
345
|
-
* that one finding. As with `consumer`, a rule
|
|
346
|
-
* `provider` never matches an intent finding.
|
|
347
|
+
* Provider-side discriminators, matching the same fields as
|
|
348
|
+
* `consumer`. A finding about a status the provider produces has its
|
|
349
|
+
* transition id on this side, and that id is the only value narrow
|
|
350
|
+
* enough to pick out that one finding. As with `consumer`, a rule
|
|
351
|
+
* that sets `provider` never matches an intent finding.
|
|
347
352
|
*/
|
|
348
353
|
provider: SuppressionSideSchema,
|
|
349
354
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
|
|
355
|
+
* The title of one PRD scenario. A PRD finding's boundary is the
|
|
356
|
+
* whole PRD, so without this a rule accepts every scenario in it,
|
|
357
|
+
* including one added later. A rule that sets `scenario` matches
|
|
358
|
+
* only intent findings about a scenario with that title.
|
|
359
|
+
*/
|
|
360
|
+
scenario: z2.string().optional(),
|
|
361
|
+
/**
|
|
362
|
+
* "narrow", the default, requires `kind` plus one of `boundary`,
|
|
363
|
+
* `scenario`, `consumer.transitionId` or `provider.transitionId`, so
|
|
364
|
+
* the rule targets a specific class of finding. "broad" allows a
|
|
365
|
+
* match on kind alone or boundary alone, and such a rule also
|
|
366
|
+
* silences future regressions in that category.
|
|
355
367
|
*/
|
|
356
368
|
scope: z2.enum(["narrow", "broad"]).default("narrow"),
|
|
357
369
|
/** Required human-written justification. */
|
|
@@ -365,18 +377,19 @@ var SuppressionFileSchema = z2.object({
|
|
|
365
377
|
}).strict();
|
|
366
378
|
function validateRule(rule) {
|
|
367
379
|
if (rule.scope === "broad") {
|
|
368
|
-
if (rule.kind === void 0 && rule.boundary === void 0 && rule.consumer === void 0 && rule.provider === void 0) {
|
|
369
|
-
return "broad-scope rule must constrain at least one field (kind, boundary, consumer, or provider)";
|
|
380
|
+
if (rule.kind === void 0 && rule.boundary === void 0 && rule.scenario === void 0 && rule.consumer === void 0 && rule.provider === void 0) {
|
|
381
|
+
return "broad-scope rule must constrain at least one field (kind, boundary, scenario, consumer, or provider)";
|
|
370
382
|
}
|
|
371
383
|
return null;
|
|
372
384
|
}
|
|
373
385
|
const hasKind = rule.kind !== void 0;
|
|
374
386
|
const hasBoundary = rule.boundary !== void 0;
|
|
387
|
+
const hasScenario = rule.scenario !== void 0;
|
|
375
388
|
const hasTransition = rule.consumer?.transitionId !== void 0 || rule.provider?.transitionId !== void 0;
|
|
376
|
-
if (hasKind && (hasBoundary || hasTransition)) {
|
|
389
|
+
if (hasKind && (hasBoundary || hasScenario || hasTransition)) {
|
|
377
390
|
return null;
|
|
378
391
|
}
|
|
379
|
-
return "narrow-scope rule must specify kind AND (boundary OR consumer.transitionId OR provider.transitionId); set scope: 'broad' to silence wider categories";
|
|
392
|
+
return "narrow-scope rule must specify kind AND (boundary OR scenario OR consumer.transitionId OR provider.transitionId); set scope: 'broad' to silence wider categories";
|
|
380
393
|
}
|
|
381
394
|
function ruleBoundaryMatchesKey(ruleBoundary, key) {
|
|
382
395
|
if (key === null) {
|
|
@@ -428,6 +441,12 @@ function countsForThreshold(finding) {
|
|
|
428
441
|
return finding.suppressed.effect === "downgrade";
|
|
429
442
|
}
|
|
430
443
|
|
|
444
|
+
// src/testName.ts
|
|
445
|
+
var TEST_TITLE_SEPARATOR = " > ";
|
|
446
|
+
function testUnitName(titles) {
|
|
447
|
+
return titles.join(TEST_TITLE_SEPARATOR);
|
|
448
|
+
}
|
|
449
|
+
|
|
431
450
|
// src/typeShapeMatch.ts
|
|
432
451
|
function bodyShapesMatch(actual, declared) {
|
|
433
452
|
if (actual.type === "unknown" || declared.type === "unknown") {
|
|
@@ -615,6 +634,14 @@ function packageExportBinding(opts) {
|
|
|
615
634
|
exportPath: opts.exportPath
|
|
616
635
|
});
|
|
617
636
|
}
|
|
637
|
+
function moduleExportBinding(opts) {
|
|
638
|
+
return functionCallBinding({
|
|
639
|
+
transport: "in-process",
|
|
640
|
+
recognition: opts.recognition,
|
|
641
|
+
module: opts.module,
|
|
642
|
+
exportName: opts.exportName
|
|
643
|
+
});
|
|
644
|
+
}
|
|
618
645
|
function graphqlResolverBinding(opts) {
|
|
619
646
|
return {
|
|
620
647
|
transport: opts.transport,
|
|
@@ -697,6 +724,13 @@ function metricBinding(opts) {
|
|
|
697
724
|
recognition: opts.recognition
|
|
698
725
|
};
|
|
699
726
|
}
|
|
727
|
+
function ioBinding(opts) {
|
|
728
|
+
return {
|
|
729
|
+
transport: "in-process",
|
|
730
|
+
semantics: { name: "io", target: namedOrNull(opts.target, "io target") },
|
|
731
|
+
recognition: opts.recognition
|
|
732
|
+
};
|
|
733
|
+
}
|
|
700
734
|
export {
|
|
701
735
|
BoundaryBindingSchema,
|
|
702
736
|
ConfidenceInfoSchema,
|
|
@@ -709,6 +743,7 @@ export {
|
|
|
709
743
|
FunctionCallSemanticsSchema,
|
|
710
744
|
GraphqlOperationSemanticsSchema,
|
|
711
745
|
GraphqlResolverSemanticsSchema,
|
|
746
|
+
IoSemanticsSchema,
|
|
712
747
|
MessageBusSemanticsSchema,
|
|
713
748
|
MetricSemanticsSchema,
|
|
714
749
|
NOTHING_DEPLOYED,
|
|
@@ -721,6 +756,7 @@ export {
|
|
|
721
756
|
StorageSemanticsSchema,
|
|
722
757
|
SuppressionFileSchema,
|
|
723
758
|
SuppressionRuleSchema,
|
|
759
|
+
TEST_TITLE_SEPARATOR,
|
|
724
760
|
TypeShapeSchema,
|
|
725
761
|
UnitInvocationSemanticsSchema,
|
|
726
762
|
applySuppressionsToFindings,
|
|
@@ -754,12 +790,17 @@ export {
|
|
|
754
790
|
groundBinding,
|
|
755
791
|
groundedPairingKey,
|
|
756
792
|
hasNameHole,
|
|
793
|
+
ioBinding,
|
|
794
|
+
ioIdentityKey,
|
|
757
795
|
isGraphqlOperationBinding,
|
|
796
|
+
isModuleName,
|
|
797
|
+
labelWithDetail,
|
|
758
798
|
leavesTheProcess,
|
|
759
799
|
messageBusBinding,
|
|
760
800
|
methodsAgree,
|
|
761
801
|
metricBinding,
|
|
762
802
|
metricIdentityKey,
|
|
803
|
+
moduleExportBinding,
|
|
763
804
|
namePatternFromSub,
|
|
764
805
|
namePatternKey,
|
|
765
806
|
nameReference,
|
|
@@ -799,6 +840,7 @@ export {
|
|
|
799
840
|
storageContainerLabel,
|
|
800
841
|
storageLabel,
|
|
801
842
|
storageSystemLabel,
|
|
843
|
+
testUnitName,
|
|
802
844
|
typeDefinitionKey,
|
|
803
845
|
unitIdentityKey,
|
|
804
846
|
unitInvocationBinding,
|
|
@@ -40,6 +40,12 @@ declare const FunctionCallSemanticsSchema: z.ZodObject<{
|
|
|
40
40
|
exportPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
type FunctionCallSemantics = z.infer<typeof FunctionCallSemanticsSchema>;
|
|
43
|
+
/**
|
|
44
|
+
* Whether `module` is the name a project gave one of its modules rather
|
|
45
|
+
* than a path. A path always has a separator in it, and a module name
|
|
46
|
+
* never does, so a rewrite that makes paths relative leaves a name alone.
|
|
47
|
+
*/
|
|
48
|
+
declare function isModuleName(module: string): boolean;
|
|
43
49
|
|
|
44
50
|
declare const GraphqlOperationSemanticsSchema: z.ZodObject<{
|
|
45
51
|
name: z.ZodLiteral<"graphql-operation">;
|
|
@@ -80,20 +86,19 @@ declare const MessageBusSemanticsSchema: z.ZodObject<{
|
|
|
80
86
|
}, z.core.$strip>;
|
|
81
87
|
type MessageBusSemantics = z.infer<typeof MessageBusSemanticsSchema>;
|
|
82
88
|
/**
|
|
83
|
-
* The bus technologies the schema allows. It
|
|
84
|
-
*
|
|
89
|
+
* The bus technologies the schema allows. It is derived from the enum,
|
|
90
|
+
* so there is no hand-written copy to fall out of step.
|
|
85
91
|
*/
|
|
86
92
|
type MessageBusTechnology = MessageBusSemantics["messageBus"];
|
|
87
93
|
|
|
88
94
|
/**
|
|
89
|
-
*
|
|
95
|
+
* The list of protocol definitions, and the lookups built from it.
|
|
90
96
|
*
|
|
91
|
-
* Each protocol
|
|
92
|
-
* `BoundarySemanticsDefinition`.
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* each list.
|
|
97
|
+
* Each protocol module in this directory exports one
|
|
98
|
+
* `BoundarySemanticsDefinition`. They are listed twice, once for the
|
|
99
|
+
* schema union and once for the behavior lookup, and the type check at
|
|
100
|
+
* the bottom fails compilation if the two lists differ. Besides its own
|
|
101
|
+
* module, a new protocol needs one line in each list.
|
|
97
102
|
*/
|
|
98
103
|
|
|
99
104
|
/**
|
|
@@ -171,6 +176,9 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
171
176
|
}>;
|
|
172
177
|
name: z.ZodLiteral<"unit-invocation">;
|
|
173
178
|
instanceName: z.ZodNullable<z.ZodString>;
|
|
179
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
180
|
+
name: z.ZodLiteral<"io">;
|
|
181
|
+
target: z.ZodNullable<z.ZodString>;
|
|
174
182
|
}, z.core.$strip>], "name">;
|
|
175
183
|
type Semantics = z.infer<typeof SemanticsSchema>;
|
|
176
184
|
|
|
@@ -191,44 +199,43 @@ type RestSemantics = z.infer<typeof RestSemanticsSchema>;
|
|
|
191
199
|
*/
|
|
192
200
|
declare function normalizePath(path: string): string;
|
|
193
201
|
/**
|
|
194
|
-
* A path with every parameter
|
|
195
|
-
* and `/users/:userId` both
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
* A parameter's range stays, since `{tenant?}` serves a different set
|
|
200
|
-
* of requests from `{tenant}`.
|
|
202
|
+
* A path with every parameter name removed, for comparing two paths.
|
|
203
|
+
* `/users/{id}` and `/users/:userId` both become `/users/{}`, since a
|
|
204
|
+
* parameter's name does not change which requests the path serves. A
|
|
205
|
+
* parameter's range stays, since `{tenant?}` serves a different set of
|
|
206
|
+
* requests from `{tenant}`.
|
|
201
207
|
*/
|
|
202
208
|
declare function pathShape(path: string): string;
|
|
203
209
|
/**
|
|
204
210
|
* Whether two REST methods mean the same thing. Equal methods agree,
|
|
205
|
-
* and `"*"` agrees with any
|
|
206
|
-
* responds to every method responds to this one. A null method
|
|
207
|
-
*
|
|
211
|
+
* and `"*"` agrees with any given method, because a handler that
|
|
212
|
+
* responds to every method responds to this one. A null method means
|
|
213
|
+
* the source never gave one, so it agrees with nothing.
|
|
208
214
|
*
|
|
209
|
-
* This is the counterpart of `busesAgree`.
|
|
210
|
-
*
|
|
215
|
+
* This is the REST counterpart of `busesAgree`. There is no list of
|
|
216
|
+
* known methods, so a wildcard pairs with whatever methods consumers
|
|
217
|
+
* write.
|
|
211
218
|
*/
|
|
212
219
|
declare function methodsAgree(a: string | null, b: string | null): boolean;
|
|
213
220
|
/**
|
|
214
221
|
* Whether a declared route path admits a concrete request path. Both
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
222
|
+
* are normalized first. A hole in the request path is compared as plain
|
|
223
|
+
* text, so a mount pattern admits a route inside it and rejects a wider
|
|
224
|
+
* route.
|
|
218
225
|
*/
|
|
219
226
|
declare function routePathAdmits(declaredPath: string, requestPath: string): boolean;
|
|
220
227
|
/** Whether two declared route paths serve at least one request in common. */
|
|
221
228
|
declare function routePathsMeet(a: string, b: string): boolean;
|
|
222
229
|
|
|
223
230
|
/**
|
|
224
|
-
* The
|
|
225
|
-
*
|
|
226
|
-
* `DeployableUnitSchema
|
|
231
|
+
* The dedicated pass pairs on `(deploymentTarget, instanceName)`, which
|
|
232
|
+
* is a deployable unit, so the two fields come from
|
|
233
|
+
* `DeployableUnitSchema`.
|
|
227
234
|
*
|
|
228
|
-
* A provider
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
235
|
+
* A provider sets both. The reading side is code, and code does not say
|
|
236
|
+
* which deployment will run it, so a recognizer at a read leaves both
|
|
237
|
+
* out and does not guess. The pairing pass takes the deployment from
|
|
238
|
+
* the provider.
|
|
232
239
|
*/
|
|
233
240
|
declare const RuntimeConfigSemanticsSchema: z.ZodObject<{
|
|
234
241
|
deploymentTarget: z.ZodOptional<z.ZodEnum<{
|
|
@@ -252,37 +259,36 @@ declare const StorageSemanticsSchema: z.ZodObject<{
|
|
|
252
259
|
}, z.core.$strip>;
|
|
253
260
|
type StorageSemantics = z.infer<typeof StorageSemanticsSchema>;
|
|
254
261
|
/**
|
|
255
|
-
* `postgresql:invoices
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
262
|
+
* The store's label, such as `postgresql:invoices` or
|
|
263
|
+
* `aws.dynamodb:editions#by-publication`. Storage has no identity key,
|
|
264
|
+
* so `suss ask`, the pass that indexes accesses, and an intent doc all
|
|
265
|
+
* refer to a store by this label.
|
|
259
266
|
*/
|
|
260
267
|
declare function storageLabel(semantics: StorageSemantics): string;
|
|
261
|
-
/** The
|
|
268
|
+
/** The storage system, or `<unknown engine>` when it is null. */
|
|
262
269
|
declare function storageSystemLabel(semantics: StorageSemantics): string;
|
|
263
270
|
/**
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
271
|
+
* The column list an access records when it reads every column, as a
|
|
272
|
+
* query without an explicit projection does. It means all columns and
|
|
273
|
+
* does not list any, so code comparing column lists has to handle it
|
|
274
|
+
* separately.
|
|
268
275
|
*/
|
|
269
276
|
declare const EVERY_FIELD = "*";
|
|
270
|
-
/** The store
|
|
277
|
+
/** The store's label without the storage system, as a finding writes it. */
|
|
271
278
|
declare function storageContainerLabel(semantics: StorageSemantics): string;
|
|
272
279
|
|
|
273
280
|
/**
|
|
274
|
-
*
|
|
281
|
+
* The zod schemas for the primitives every suss IR uses.
|
|
275
282
|
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* here, in one place none of those IRs needs another IR to reach.
|
|
283
|
+
* `TypeShape` is the structure of a value. `BoundaryBinding` and its
|
|
284
|
+
* `Semantics` variants identify a boundary. `SourceLocation` says where
|
|
285
|
+
* something is in the source, and `Confidence` says how much to trust a
|
|
286
|
+
* claim. Behavioral summaries and intent docs are both built from these,
|
|
287
|
+
* so they live in a package of their own and neither IR depends on the
|
|
288
|
+
* other.
|
|
283
289
|
*
|
|
284
|
-
* The schemas are the
|
|
285
|
-
*
|
|
290
|
+
* The schemas are the source of truth. The package index derives the
|
|
291
|
+
* types from them with `z.infer`.
|
|
286
292
|
*/
|
|
287
293
|
|
|
288
294
|
declare const ConfidenceSourceSchema: z.ZodEnum<{
|
|
@@ -297,17 +303,17 @@ declare const ConfidenceLevelSchema: z.ZodEnum<{
|
|
|
297
303
|
low: "low";
|
|
298
304
|
}>;
|
|
299
305
|
/**
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
306
|
+
* The result of checking a claim by running the code (`suss
|
|
307
|
+
* corroborate`). The harness generates inputs that satisfy the claim's
|
|
308
|
+
* own conditions and runs the function on them.
|
|
309
|
+
*
|
|
310
|
+
* - `observed`: every run agreed with the claim.
|
|
311
|
+
* - `refuted`: at least one run disagreed, which is either an extractor
|
|
312
|
+
* bug or a surprise. `counterexample` gives the input.
|
|
313
|
+
* - `untested`: no run produced a verdict. No satisfying input was
|
|
314
|
+
* found, or every run hit a dependency the harness cannot supply.
|
|
308
315
|
*
|
|
309
|
-
* Corroboration adds
|
|
310
|
-
* evidence, and it never rewrites the derived claim.
|
|
316
|
+
* Corroboration adds evidence to a derived claim and never rewrites it.
|
|
311
317
|
*/
|
|
312
318
|
declare const CorroborationSchema: z.ZodObject<{
|
|
313
319
|
outcome: z.ZodEnum<{
|
|
@@ -354,6 +360,7 @@ declare const SourceLocationSchema: z.ZodObject<{
|
|
|
354
360
|
}, z.core.$strip>>;
|
|
355
361
|
exportName: z.ZodNullable<z.ZodString>;
|
|
356
362
|
workspace: z.ZodOptional<z.ZodString>;
|
|
363
|
+
module: z.ZodOptional<z.ZodString>;
|
|
357
364
|
}, z.core.$strip>;
|
|
358
365
|
declare const BoundaryBindingSchema: z.ZodObject<{
|
|
359
366
|
transport: z.ZodString;
|
|
@@ -428,6 +435,9 @@ declare const BoundaryBindingSchema: z.ZodObject<{
|
|
|
428
435
|
}>;
|
|
429
436
|
name: z.ZodLiteral<"unit-invocation">;
|
|
430
437
|
instanceName: z.ZodNullable<z.ZodString>;
|
|
438
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
439
|
+
name: z.ZodLiteral<"io">;
|
|
440
|
+
target: z.ZodNullable<z.ZodString>;
|
|
431
441
|
}, z.core.$strip>], "name">;
|
|
432
442
|
recognition: z.ZodString;
|
|
433
443
|
}, z.core.$strip>;
|
|
@@ -478,24 +488,22 @@ type TypeShape = {
|
|
|
478
488
|
def?: string | undefined;
|
|
479
489
|
/**
|
|
480
490
|
* The file that declares this type, when the project declares it.
|
|
481
|
-
* Absent for a name the language or a dependency
|
|
482
|
-
* the same thing everywhere.
|
|
491
|
+
* Absent for a name the language or a dependency defines, which
|
|
492
|
+
* means the same thing everywhere.
|
|
483
493
|
*
|
|
484
|
-
* A name on its own does not identify a type. Two modules each
|
|
485
|
-
*
|
|
486
|
-
*
|
|
494
|
+
* A name on its own does not identify a type. Two modules that each
|
|
495
|
+
* declare a `User` produce the same ref, and `from` is the only
|
|
496
|
+
* field that tells them apart.
|
|
487
497
|
*/
|
|
488
498
|
from?: string | undefined;
|
|
489
499
|
} | {
|
|
490
500
|
type: "unknown";
|
|
491
501
|
};
|
|
492
502
|
/**
|
|
493
|
-
* The key a table of definitions uses for the type a ref points at
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
* on the ref. A name that the language or a dependency owns has no
|
|
498
|
-
* file, and keys on the name alone.
|
|
503
|
+
* The key a table of definitions uses for the type a ref points at,
|
|
504
|
+
* which is the ref's `def`. Null for a ref without one, such as a name
|
|
505
|
+
* the language or a dependency defines, and such a ref is never looked
|
|
506
|
+
* up.
|
|
499
507
|
*/
|
|
500
508
|
declare function typeDefinitionKey(ref: {
|
|
501
509
|
def?: string | undefined;
|
|
@@ -505,16 +513,15 @@ declare const TypeShapeSchema: z.ZodType<TypeShape>;
|
|
|
505
513
|
* A shape with the definitions it refers to substituted back into it.
|
|
506
514
|
*
|
|
507
515
|
* Comparing two shapes means comparing their structure, and a ref has
|
|
508
|
-
* none.
|
|
509
|
-
*
|
|
510
|
-
* reads what it always read.
|
|
516
|
+
* none. Substituting the definitions once means no comparison has to
|
|
517
|
+
* look anything up in a table.
|
|
511
518
|
*
|
|
512
|
-
* Substituting a definition
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
519
|
+
* Substituting a definition does not count as a level of nesting. If it
|
|
520
|
+
* did, a type six levels deep would come back three deep, and a
|
|
521
|
+
* consumer reading a field past that would be told the provider lacks
|
|
522
|
+
* it. A type that refers to itself stops at a key already substituted
|
|
523
|
+
* on this path, the same cycle guard the shape walk uses.
|
|
517
524
|
*/
|
|
518
525
|
declare function withDefinitionsInlined(shape: TypeShape, definitions: Record<string, TypeShape> | undefined, depth?: number, inProgress?: ReadonlySet<string>): TypeShape;
|
|
519
526
|
|
|
520
|
-
export {
|
|
527
|
+
export { storageLabel as A, BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, EVERY_FIELD as E, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, storageSystemLabel as H, typeDefinitionKey as I, withDefinitionsInlined as J, 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, isModuleName as t, methodsAgree as u, normalizePath as v, pathShape as w, routePathAdmits as x, routePathsMeet as y, storageContainerLabel as z };
|