@suss/ir-core 0.32.0 → 0.33.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/README.md +2 -2
- package/dist/{chunk-ODHT5T2Q.js → chunk-N564FH5U.js} +22 -5
- package/dist/index.cjs +84 -8
- package/dist/index.d.cts +60 -18
- package/dist/index.d.ts +60 -18
- package/dist/index.js +62 -4
- package/dist/{schemas-BDB_vB6m.d.cts → schemas-CIns0fqF.d.cts} +29 -13
- package/dist/{schemas-BDB_vB6m.d.ts → schemas-CIns0fqF.d.ts} +29 -13
- package/dist/schemas.cjs +21 -5
- 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/README.md
CHANGED
|
@@ -108,8 +108,8 @@ v0: type shapes, boundary bindings + constructors, source locations, confidence.
|
|
|
108
108
|
|
|
109
109
|
## More
|
|
110
110
|
|
|
111
|
-
- [Documentation](https://
|
|
112
|
-
- [Every package and pack suss ships](https://
|
|
111
|
+
- [Documentation](https://suss.sh/)
|
|
112
|
+
- [Every package and pack suss ships](https://suss.sh/packs/catalog)
|
|
113
113
|
- [Source and issues](https://github.com/nimbuscloud-ai/suss)
|
|
114
114
|
|
|
115
115
|
## Coverage
|
|
@@ -212,6 +212,12 @@ var MessageBusSemanticsSchema = z4.object({
|
|
|
212
212
|
"aws.sns",
|
|
213
213
|
"s3",
|
|
214
214
|
"eventbridge",
|
|
215
|
+
// A Kinesis stream and a Firehose delivery stream are different
|
|
216
|
+
// APIs with different destinations, so a stream named `orders` and
|
|
217
|
+
// a delivery stream named `orders` are not the same channel.
|
|
218
|
+
"aws_kinesis",
|
|
219
|
+
"aws_firehose",
|
|
220
|
+
"gcp_pubsub",
|
|
215
221
|
"bullmq",
|
|
216
222
|
"kafka",
|
|
217
223
|
"nats",
|
|
@@ -880,7 +886,10 @@ function ecsContainerInstanceName(taskDefinitionLogicalId, containerName) {
|
|
|
880
886
|
}
|
|
881
887
|
|
|
882
888
|
// src/semantics/runtimeConfig.ts
|
|
883
|
-
var RuntimeConfigSemanticsSchema = DeployableUnitSchema.
|
|
889
|
+
var RuntimeConfigSemanticsSchema = DeployableUnitSchema.partial({
|
|
890
|
+
deploymentTarget: true,
|
|
891
|
+
instanceName: true
|
|
892
|
+
}).extend({
|
|
884
893
|
name: z8.literal("runtime-config")
|
|
885
894
|
});
|
|
886
895
|
var runtimeConfigSemantics = defineBoundarySemantics({
|
|
@@ -907,10 +916,13 @@ var StorageSemanticsSchema = z9.object({
|
|
|
907
916
|
name: z9.literal("storage"),
|
|
908
917
|
/**
|
|
909
918
|
* Which store this is: postgresql, mysql, aws.dynamodb, or our own
|
|
910
|
-
* word for one OpenTelemetry never named, such as s3
|
|
911
|
-
*
|
|
919
|
+
* word for one OpenTelemetry never named, such as s3, or null when
|
|
920
|
+
* the source states one this reader could not settle. Two products'
|
|
921
|
+
* containers can share a name, so this keeps them apart. A null
|
|
922
|
+
* keeps none of them apart, and the pairing pass says what it does
|
|
923
|
+
* with one.
|
|
912
924
|
*/
|
|
913
|
-
storageSystem: z9.string(),
|
|
925
|
+
storageSystem: z9.string().nullable(),
|
|
914
926
|
/**
|
|
915
927
|
* The ORM, schema, or deployment scope. A single-database setup uses
|
|
916
928
|
* `"default"`, and a monorepo with several schemas gives each one its
|
|
@@ -973,8 +985,12 @@ var storageSemantics = defineBoundarySemantics({
|
|
|
973
985
|
}
|
|
974
986
|
});
|
|
975
987
|
function storageLabel(semantics) {
|
|
976
|
-
return `${semantics
|
|
988
|
+
return `${storageSystemLabel(semantics)}:${storageContainerLabel(semantics)}`;
|
|
977
989
|
}
|
|
990
|
+
function storageSystemLabel(semantics) {
|
|
991
|
+
return semantics.storageSystem ?? UNKNOWN_ENGINE;
|
|
992
|
+
}
|
|
993
|
+
var UNKNOWN_ENGINE = "<unknown engine>";
|
|
978
994
|
var EVERY_FIELD = "*";
|
|
979
995
|
function storageContainerLabel(semantics) {
|
|
980
996
|
const container = semantics.container ?? "<unnamed container>";
|
|
@@ -1271,6 +1287,7 @@ export {
|
|
|
1271
1287
|
RuntimeConfigSemanticsSchema,
|
|
1272
1288
|
StorageSemanticsSchema,
|
|
1273
1289
|
storageLabel,
|
|
1290
|
+
storageSystemLabel,
|
|
1274
1291
|
EVERY_FIELD,
|
|
1275
1292
|
storageContainerLabel,
|
|
1276
1293
|
UnitInvocationSemanticsSchema,
|
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ __export(index_exports, {
|
|
|
34
34
|
MessageBusSemanticsSchema: () => MessageBusSemanticsSchema,
|
|
35
35
|
MetricSemanticsSchema: () => MetricSemanticsSchema,
|
|
36
36
|
NOTHING_DEPLOYED: () => NOTHING_DEPLOYED,
|
|
37
|
+
PLATFORM_INJECTED_ENV_VARS: () => PLATFORM_INJECTED_ENV_VARS,
|
|
37
38
|
RelationSchema: () => RelationSchema,
|
|
38
39
|
RestSemanticsSchema: () => RestSemanticsSchema,
|
|
39
40
|
RuntimeConfigSemanticsSchema: () => RuntimeConfigSemanticsSchema,
|
|
@@ -94,6 +95,7 @@ __export(index_exports, {
|
|
|
94
95
|
pairingKey: () => pairingKey,
|
|
95
96
|
parseBoundaryName: () => parseBoundaryName,
|
|
96
97
|
parseChannel: () => parseChannel,
|
|
98
|
+
parseHandler: () => parseHandler,
|
|
97
99
|
pathAfterOrigin: () => pathAfterOrigin,
|
|
98
100
|
pathShape: () => pathShape,
|
|
99
101
|
patternHole: () => patternHole,
|
|
@@ -118,6 +120,7 @@ __export(index_exports, {
|
|
|
118
120
|
storageBinding: () => storageBinding,
|
|
119
121
|
storageContainerLabel: () => storageContainerLabel,
|
|
120
122
|
storageLabel: () => storageLabel,
|
|
123
|
+
storageSystemLabel: () => storageSystemLabel,
|
|
121
124
|
typeDefinitionKey: () => typeDefinitionKey,
|
|
122
125
|
unitIdentityKey: () => unitIdentityKey,
|
|
123
126
|
unitInvocationBinding: () => unitInvocationBinding,
|
|
@@ -342,6 +345,12 @@ var MessageBusSemanticsSchema = import_zod4.z.object({
|
|
|
342
345
|
"aws.sns",
|
|
343
346
|
"s3",
|
|
344
347
|
"eventbridge",
|
|
348
|
+
// A Kinesis stream and a Firehose delivery stream are different
|
|
349
|
+
// APIs with different destinations, so a stream named `orders` and
|
|
350
|
+
// a delivery stream named `orders` are not the same channel.
|
|
351
|
+
"aws_kinesis",
|
|
352
|
+
"aws_firehose",
|
|
353
|
+
"gcp_pubsub",
|
|
345
354
|
"bullmq",
|
|
346
355
|
"kafka",
|
|
347
356
|
"nats",
|
|
@@ -1010,7 +1019,10 @@ function ecsContainerInstanceName(taskDefinitionLogicalId, containerName) {
|
|
|
1010
1019
|
}
|
|
1011
1020
|
|
|
1012
1021
|
// src/semantics/runtimeConfig.ts
|
|
1013
|
-
var RuntimeConfigSemanticsSchema = DeployableUnitSchema.
|
|
1022
|
+
var RuntimeConfigSemanticsSchema = DeployableUnitSchema.partial({
|
|
1023
|
+
deploymentTarget: true,
|
|
1024
|
+
instanceName: true
|
|
1025
|
+
}).extend({
|
|
1014
1026
|
name: import_zod8.z.literal("runtime-config")
|
|
1015
1027
|
});
|
|
1016
1028
|
var runtimeConfigSemantics = defineBoundarySemantics({
|
|
@@ -1037,10 +1049,13 @@ var StorageSemanticsSchema = import_zod9.z.object({
|
|
|
1037
1049
|
name: import_zod9.z.literal("storage"),
|
|
1038
1050
|
/**
|
|
1039
1051
|
* Which store this is: postgresql, mysql, aws.dynamodb, or our own
|
|
1040
|
-
* word for one OpenTelemetry never named, such as s3
|
|
1041
|
-
*
|
|
1052
|
+
* word for one OpenTelemetry never named, such as s3, or null when
|
|
1053
|
+
* the source states one this reader could not settle. Two products'
|
|
1054
|
+
* containers can share a name, so this keeps them apart. A null
|
|
1055
|
+
* keeps none of them apart, and the pairing pass says what it does
|
|
1056
|
+
* with one.
|
|
1042
1057
|
*/
|
|
1043
|
-
storageSystem: import_zod9.z.string(),
|
|
1058
|
+
storageSystem: import_zod9.z.string().nullable(),
|
|
1044
1059
|
/**
|
|
1045
1060
|
* The ORM, schema, or deployment scope. A single-database setup uses
|
|
1046
1061
|
* `"default"`, and a monorepo with several schemas gives each one its
|
|
@@ -1103,8 +1118,12 @@ var storageSemantics = defineBoundarySemantics({
|
|
|
1103
1118
|
}
|
|
1104
1119
|
});
|
|
1105
1120
|
function storageLabel(semantics) {
|
|
1106
|
-
return `${semantics
|
|
1121
|
+
return `${storageSystemLabel(semantics)}:${storageContainerLabel(semantics)}`;
|
|
1107
1122
|
}
|
|
1123
|
+
function storageSystemLabel(semantics) {
|
|
1124
|
+
return semantics.storageSystem ?? UNKNOWN_ENGINE;
|
|
1125
|
+
}
|
|
1126
|
+
var UNKNOWN_ENGINE = "<unknown engine>";
|
|
1108
1127
|
var EVERY_FIELD = "*";
|
|
1109
1128
|
function storageContainerLabel(semantics) {
|
|
1110
1129
|
const container = semantics.container ?? "<unnamed container>";
|
|
@@ -1535,6 +1554,17 @@ function fileInCodeScope(file, scope) {
|
|
|
1535
1554
|
const path = codeScopePath(file);
|
|
1536
1555
|
return path === prefix || path.startsWith(`${prefix}/`);
|
|
1537
1556
|
}
|
|
1557
|
+
function parseHandler(handler) {
|
|
1558
|
+
const trimmed = handler.trim();
|
|
1559
|
+
const lastDot = trimmed.lastIndexOf(".");
|
|
1560
|
+
if (lastDot <= 0 || lastDot === trimmed.length - 1) {
|
|
1561
|
+
return null;
|
|
1562
|
+
}
|
|
1563
|
+
return {
|
|
1564
|
+
modulePath: trimmed.slice(0, lastDot),
|
|
1565
|
+
exportName: trimmed.slice(lastDot + 1)
|
|
1566
|
+
};
|
|
1567
|
+
}
|
|
1538
1568
|
|
|
1539
1569
|
// src/deployment.ts
|
|
1540
1570
|
var NOTHING_DEPLOYED = {
|
|
@@ -1543,6 +1573,49 @@ var NOTHING_DEPLOYED = {
|
|
|
1543
1573
|
pointsAt: () => null
|
|
1544
1574
|
};
|
|
1545
1575
|
|
|
1576
|
+
// src/platformEnvVars.ts
|
|
1577
|
+
var PLATFORM_INJECTED_ENV_VARS = {
|
|
1578
|
+
lambda: [
|
|
1579
|
+
"AWS_REGION",
|
|
1580
|
+
"AWS_DEFAULT_REGION",
|
|
1581
|
+
"AWS_LAMBDA_FUNCTION_NAME",
|
|
1582
|
+
"AWS_LAMBDA_FUNCTION_VERSION",
|
|
1583
|
+
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE",
|
|
1584
|
+
"AWS_LAMBDA_LOG_GROUP_NAME",
|
|
1585
|
+
"AWS_LAMBDA_LOG_STREAM_NAME",
|
|
1586
|
+
"AWS_LAMBDA_RUNTIME_API",
|
|
1587
|
+
"AWS_EXECUTION_ENV",
|
|
1588
|
+
"AWS_ACCESS_KEY_ID",
|
|
1589
|
+
"AWS_SECRET_ACCESS_KEY",
|
|
1590
|
+
"AWS_SESSION_TOKEN",
|
|
1591
|
+
"LAMBDA_TASK_ROOT",
|
|
1592
|
+
"LAMBDA_RUNTIME_DIR",
|
|
1593
|
+
"_HANDLER",
|
|
1594
|
+
"_X_AMZN_TRACE_ID",
|
|
1595
|
+
"TZ"
|
|
1596
|
+
],
|
|
1597
|
+
"ecs-task": [
|
|
1598
|
+
"AWS_DEFAULT_REGION",
|
|
1599
|
+
"AWS_REGION",
|
|
1600
|
+
"ECS_CONTAINER_METADATA_URI",
|
|
1601
|
+
"ECS_CONTAINER_METADATA_URI_V4",
|
|
1602
|
+
"ECS_AGENT_URI"
|
|
1603
|
+
],
|
|
1604
|
+
// Which variables a container gets depends on what runs it, and the
|
|
1605
|
+
// bare target says nothing about that, so the pack for the product
|
|
1606
|
+
// states them.
|
|
1607
|
+
container: [],
|
|
1608
|
+
"k8s-deployment": [
|
|
1609
|
+
"KUBERNETES_SERVICE_HOST",
|
|
1610
|
+
"KUBERNETES_SERVICE_PORT",
|
|
1611
|
+
"KUBERNETES_PORT",
|
|
1612
|
+
"HOSTNAME"
|
|
1613
|
+
],
|
|
1614
|
+
// A Worker reads its configuration off the argument every trigger
|
|
1615
|
+
// takes, and Cloudflare puts nothing of its own on it.
|
|
1616
|
+
worker: []
|
|
1617
|
+
};
|
|
1618
|
+
|
|
1546
1619
|
// src/relation.ts
|
|
1547
1620
|
var import_zod13 = require("zod");
|
|
1548
1621
|
var RelationSchema = import_zod13.z.enum([
|
|
@@ -1887,8 +1960,8 @@ function runtimeConfigBinding(opts) {
|
|
|
1887
1960
|
transport: "os",
|
|
1888
1961
|
semantics: {
|
|
1889
1962
|
name: "runtime-config",
|
|
1890
|
-
deploymentTarget: opts.deploymentTarget,
|
|
1891
|
-
instanceName: opts.instanceName
|
|
1963
|
+
...opts.deploymentTarget === void 0 ? {} : { deploymentTarget: opts.deploymentTarget },
|
|
1964
|
+
...opts.instanceName === void 0 ? {} : { instanceName: opts.instanceName }
|
|
1892
1965
|
},
|
|
1893
1966
|
recognition: opts.recognition
|
|
1894
1967
|
};
|
|
@@ -1906,7 +1979,7 @@ function unitInvocationBinding(opts) {
|
|
|
1906
1979
|
}
|
|
1907
1980
|
function storageBinding(opts) {
|
|
1908
1981
|
return {
|
|
1909
|
-
transport: opts.transport ?? opts.storageSystem,
|
|
1982
|
+
transport: opts.transport ?? opts.storageSystem ?? "storage",
|
|
1910
1983
|
semantics: {
|
|
1911
1984
|
name: "storage",
|
|
1912
1985
|
storageSystem: opts.storageSystem,
|
|
@@ -1955,6 +2028,7 @@ function metricBinding(opts) {
|
|
|
1955
2028
|
MessageBusSemanticsSchema,
|
|
1956
2029
|
MetricSemanticsSchema,
|
|
1957
2030
|
NOTHING_DEPLOYED,
|
|
2031
|
+
PLATFORM_INJECTED_ENV_VARS,
|
|
1958
2032
|
RelationSchema,
|
|
1959
2033
|
RestSemanticsSchema,
|
|
1960
2034
|
RuntimeConfigSemanticsSchema,
|
|
@@ -2015,6 +2089,7 @@ function metricBinding(opts) {
|
|
|
2015
2089
|
pairingKey,
|
|
2016
2090
|
parseBoundaryName,
|
|
2017
2091
|
parseChannel,
|
|
2092
|
+
parseHandler,
|
|
2018
2093
|
pathAfterOrigin,
|
|
2019
2094
|
pathShape,
|
|
2020
2095
|
patternHole,
|
|
@@ -2039,6 +2114,7 @@ function metricBinding(opts) {
|
|
|
2039
2114
|
storageBinding,
|
|
2040
2115
|
storageContainerLabel,
|
|
2041
2116
|
storageLabel,
|
|
2117
|
+
storageSystemLabel,
|
|
2042
2118
|
typeDefinitionKey,
|
|
2043
2119
|
unitIdentityKey,
|
|
2044
2120
|
unitInvocationBinding,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { T as TypeShape, M as MessageBusSemantics, D as DeployableUnit, S as Semantics, B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, d as SourceLocationSchema, e as MessageBusTechnology } from './schemas-
|
|
3
|
-
export { f as DeployableUnitSchema, E as EVERY_FIELD, F as FunctionCallSemantics, g as FunctionCallSemanticsSchema, G as GraphqlOperationSemantics, h as GraphqlOperationSemanticsSchema, i as GraphqlResolverSemantics, j as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, R as RestSemantics, l as RestSemanticsSchema, m as RuntimeConfigSemantics, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, p as StorageSemantics, q as StorageSemanticsSchema, r as TypeShapeSchema, s as ecsContainerInstanceName, t as methodsAgree, u as normalizePath, v as pathShape, w as routePathAdmits, x as routePathsMeet, y as storageContainerLabel, z as storageLabel, A as
|
|
2
|
+
import { T as TypeShape, M as MessageBusSemantics, D as DeployableUnit, S as Semantics, B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, d as SourceLocationSchema, e as MessageBusTechnology } from './schemas-CIns0fqF.cjs';
|
|
3
|
+
export { f as DeployableUnitSchema, E as EVERY_FIELD, F as FunctionCallSemantics, g as FunctionCallSemanticsSchema, G as GraphqlOperationSemantics, h as GraphqlOperationSemanticsSchema, i as GraphqlResolverSemantics, j as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, R as RestSemantics, l as RestSemanticsSchema, m as RuntimeConfigSemantics, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, p as StorageSemantics, q as StorageSemanticsSchema, r as TypeShapeSchema, s as ecsContainerInstanceName, t as methodsAgree, u as normalizePath, v as pathShape, w as routePathAdmits, x as routePathsMeet, y as storageContainerLabel, z as storageLabel, A as storageSystemLabel, H as typeDefinitionKey, I as withDefinitionsInlined } from './schemas-CIns0fqF.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The boundary-name syntax, parsed and printed in one place.
|
|
@@ -683,15 +683,17 @@ declare function channelsPair(a: string, b: string): boolean;
|
|
|
683
683
|
|
|
684
684
|
/**
|
|
685
685
|
* One convention for the source directory a deployable unit is built
|
|
686
|
-
* from,
|
|
686
|
+
* from, one test for whether a file is inside it, and one reading of
|
|
687
|
+
* the handler string that says which code the platform calls.
|
|
687
688
|
*
|
|
688
689
|
* A deploy template gives a directory per unit, and a summary stores it
|
|
689
690
|
* as `metadata.codeScope.path`. Producers write that path and the
|
|
690
691
|
* checker reads it back as a prefix test, so the two sides have to
|
|
691
|
-
* agree on whether it ends in a slash.
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
*
|
|
692
|
+
* agree on whether it ends in a slash. The test also has to stop at a
|
|
693
|
+
* segment boundary, or `src/foo` would cover `src/foobar` and a handler
|
|
694
|
+
* would pair with the wrong function. A CloudFormation template and a
|
|
695
|
+
* Terraform configuration spell a handler the same way, so they read it
|
|
696
|
+
* through the same function rather than through two of them.
|
|
695
697
|
*/
|
|
696
698
|
/**
|
|
697
699
|
* The canonical form of a code-scope directory: no leading `./`, no
|
|
@@ -708,11 +710,22 @@ declare function codeScopePath(raw: string): string;
|
|
|
708
710
|
* trailing slash and one stored without it are read the same way.
|
|
709
711
|
*/
|
|
710
712
|
declare function fileInCodeScope(file: string, scope: string): boolean;
|
|
713
|
+
interface ParsedHandler {
|
|
714
|
+
modulePath: string;
|
|
715
|
+
exportName: string;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Split a handler string into its module path and exported symbol.
|
|
719
|
+
* The final dot separates them: `"src/handlers/confirmToken.handler"` →
|
|
720
|
+
* `{ modulePath: "src/handlers/confirmToken", exportName: "handler" }`.
|
|
721
|
+
* Returns null when there's no dot, since there's no export to bind to.
|
|
722
|
+
*/
|
|
723
|
+
declare function parseHandler(handler: string): ParsedHandler | null;
|
|
711
724
|
|
|
712
725
|
/**
|
|
713
726
|
* The DispatchTable idiom: dispatch on a discriminated union through a
|
|
714
727
|
* mapped-type Record, so a missing variant is a type error rather than a
|
|
715
|
-
* runtime fall-through. It is decision #8 in docs
|
|
728
|
+
* runtime fall-through. It is decision #8 in design/docs-internal/style.md.
|
|
716
729
|
*
|
|
717
730
|
* It is here rather than in one package because the decision applies
|
|
718
731
|
* repo-wide, and every package that walks an IR union needs it. Three
|
|
@@ -729,6 +742,30 @@ declare function dispatchByType<T extends {
|
|
|
729
742
|
type: string;
|
|
730
743
|
}, R>(table: DispatchTable<T, R>, value: T): R;
|
|
731
744
|
|
|
745
|
+
/**
|
|
746
|
+
* The variables a deployment medium puts in a process's environment
|
|
747
|
+
* whatever its configuration says.
|
|
748
|
+
*
|
|
749
|
+
* Code reads them and nothing declares them, so a reader that left them
|
|
750
|
+
* out would accuse every deployment of failing to supply `AWS_REGION`.
|
|
751
|
+
* Two readers describe the same Lambda, a CloudFormation template and a
|
|
752
|
+
* Terraform configuration, and a variable one of them knew about and
|
|
753
|
+
* the other did not would be an error in one and not the other, so the
|
|
754
|
+
* list is stated once here. A medium whose vendor documents a different
|
|
755
|
+
* set per product, Cloud Run's `K_SERVICE` against a plain container's
|
|
756
|
+
* nothing, states its own list in the pack that describes it.
|
|
757
|
+
*/
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Sourced from each platform's own documentation:
|
|
761
|
+
*
|
|
762
|
+
* Lambda: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
|
|
763
|
+
* "Reserved environment variables"
|
|
764
|
+
* ECS: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_metadata.html
|
|
765
|
+
* plus the AWS_DEFAULT_REGION the Fargate runtime sets.
|
|
766
|
+
*/
|
|
767
|
+
declare const PLATFORM_INJECTED_ENV_VARS: Record<DeployableUnit["deploymentTarget"], ReadonlyArray<string>>;
|
|
768
|
+
|
|
732
769
|
/**
|
|
733
770
|
* What a unit does at a boundary, in the words `suss ask` asks with.
|
|
734
771
|
*
|
|
@@ -1013,15 +1050,19 @@ declare function graphqlOperationBinding(opts: {
|
|
|
1013
1050
|
*/
|
|
1014
1051
|
declare function isGraphqlOperationBinding(binding: BoundaryBinding | null | undefined): boolean;
|
|
1015
1052
|
/**
|
|
1016
|
-
* Build a runtime-config binding
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
*
|
|
1053
|
+
* Build a runtime-config binding for a runtime configuration channel
|
|
1054
|
+
* (env vars on a Lambda, ECS task, container, or k8s pod). Transport is
|
|
1055
|
+
* `"os"` because the OS hands env vars to the process at startup no
|
|
1056
|
+
* matter what the deployment medium is.
|
|
1057
|
+
*
|
|
1058
|
+
* A provider says which deployment it is. A recognizer standing at a
|
|
1059
|
+
* read in the code leaves both off, since nothing in the code says
|
|
1060
|
+
* which deployment will run it.
|
|
1020
1061
|
*/
|
|
1021
1062
|
declare function runtimeConfigBinding(opts: {
|
|
1022
1063
|
recognition: string;
|
|
1023
|
-
deploymentTarget
|
|
1024
|
-
instanceName
|
|
1064
|
+
deploymentTarget?: DeployableUnit["deploymentTarget"];
|
|
1065
|
+
instanceName?: string;
|
|
1025
1066
|
}): BoundaryBinding;
|
|
1026
1067
|
/**
|
|
1027
1068
|
* Build a unit-invocation binding, the boundary between a deployed unit
|
|
@@ -1039,12 +1080,13 @@ declare function unitInvocationBinding(opts: {
|
|
|
1039
1080
|
* Build a storage binding, the side of a store that both a schema
|
|
1040
1081
|
* reader and a call site can spell. `transport` defaults to the store's
|
|
1041
1082
|
* own name, which is right for a database whose product and wire
|
|
1042
|
-
* protocol are the same word
|
|
1043
|
-
*
|
|
1083
|
+
* protocol are the same word; a store reached over an SDK passes its
|
|
1084
|
+
* wire instead, and one whose engine nobody settled has none to pass.
|
|
1044
1085
|
*/
|
|
1045
1086
|
declare function storageBinding(opts: {
|
|
1046
1087
|
recognition: string;
|
|
1047
|
-
|
|
1088
|
+
/** Null when the source states an engine this reader could not settle. */
|
|
1089
|
+
storageSystem: string | null;
|
|
1048
1090
|
transport?: string;
|
|
1049
1091
|
scope: string;
|
|
1050
1092
|
/** Null when the source gives a container this reader could not settle. */
|
|
@@ -1073,4 +1115,4 @@ declare function metricBinding(opts: {
|
|
|
1073
1115
|
metricType: string | null;
|
|
1074
1116
|
}): BoundaryBinding;
|
|
1075
1117
|
|
|
1076
|
-
export { type BoundaryBehavior, type BoundaryBinding, BoundaryBindingSchema, type BoundaryName, type BoundarySemanticsDefinition, type BusIdentityKey, type Channel, type ConfidenceInfo, ConfidenceInfoSchema, type ConfidenceLevel, ConfidenceLevelSchema, type ConfidenceSource, ConfidenceSourceSchema, type Corroboration, CorroborationSchema, DeployableUnit, type Deployment, type DispatchTable, type Ecosystem, type EffectRelation, EffectRelationSchema, type FindingSuppression, type FnIdentityKey, type GqlIdentityKey, type HoleRange, type MatchResult, MessageBusSemantics, MessageBusTechnology, type MetricIdentityKey, type MetricSemantics, MetricSemanticsSchema, NOTHING_DEPLOYED, type NamePart, type PackConfiguration, type PackDeclaration, type ParsedChannel, type Reference, type Relation, RelationSchema, Semantics, type SemconvAttribute, type SemconvMapping, type SourceLocation, SourceLocationSchema, type SuppressableSeverity, type SuppressibleFinding, type SuppressionFile, SuppressionFileSchema, type SuppressionRule, SuppressionRuleSchema, TypeShape, type UnitIdentityKey, type UnitInvocationSemantics, UnitInvocationSemanticsSchema, applySuppressionsToFindings, bindingIs, bindingTokens, bodyShapesMatch, boundaryKey, boundaryLabel, boundaryNameString, bucketRank, bucketsMeet, busIdentityKey, busesAgree, canPair, channelsPair, codeScopePath, compareRanks, countsForThreshold, dispatchByType, displayLabel, exchangesHttpResponses, fileInCodeScope, fixedTextLength, fnIdentityKey, formatChannel, functionCallBinding, gqlIdentityKey, graphqlOperationBinding, graphqlResolverBinding, groundBinding, groundedPairingKey, hasNameHole, isGraphqlOperationBinding, leavesTheProcess, messageBusBinding, metricBinding, metricIdentityKey, namePatternFromSub, namePatternKey, nameReference, namesAgree, namesBoundary, namesBoundaryExactly, namesNothing, normalizeRuleBoundary, packageExportBinding, pairingKey, parseBoundaryName, parseChannel, pathAfterOrigin, patternHole, rangedHole, referenceFromName, referenceName, referenceOf, reportsUnpairedItself, resourceNameIn, restBinding, ruleBoundaryMatchesKey, runtimeConfigBinding, semanticsAgree, semconvAttributes, servesRequest, setPiece, spansBuckets, spellingTokens, statesAnOrigin, storageBinding, unitIdentityKey, unitInvocationBinding, validateRule, withRewrittenPaths, withinScope };
|
|
1118
|
+
export { type BoundaryBehavior, type BoundaryBinding, BoundaryBindingSchema, type BoundaryName, type BoundarySemanticsDefinition, type BusIdentityKey, type Channel, type ConfidenceInfo, ConfidenceInfoSchema, type ConfidenceLevel, ConfidenceLevelSchema, type ConfidenceSource, ConfidenceSourceSchema, type Corroboration, CorroborationSchema, DeployableUnit, type Deployment, type DispatchTable, type Ecosystem, type EffectRelation, EffectRelationSchema, type FindingSuppression, type FnIdentityKey, type GqlIdentityKey, type HoleRange, type MatchResult, MessageBusSemantics, MessageBusTechnology, type MetricIdentityKey, type MetricSemantics, MetricSemanticsSchema, NOTHING_DEPLOYED, type NamePart, PLATFORM_INJECTED_ENV_VARS, type PackConfiguration, type PackDeclaration, type ParsedChannel, type ParsedHandler, type Reference, type Relation, RelationSchema, Semantics, type SemconvAttribute, type SemconvMapping, type SourceLocation, SourceLocationSchema, type SuppressableSeverity, type SuppressibleFinding, type SuppressionFile, SuppressionFileSchema, type SuppressionRule, SuppressionRuleSchema, TypeShape, type UnitIdentityKey, type UnitInvocationSemantics, UnitInvocationSemanticsSchema, applySuppressionsToFindings, bindingIs, bindingTokens, bodyShapesMatch, boundaryKey, boundaryLabel, boundaryNameString, bucketRank, bucketsMeet, busIdentityKey, busesAgree, canPair, channelsPair, codeScopePath, compareRanks, countsForThreshold, dispatchByType, displayLabel, exchangesHttpResponses, fileInCodeScope, fixedTextLength, fnIdentityKey, formatChannel, functionCallBinding, gqlIdentityKey, graphqlOperationBinding, graphqlResolverBinding, groundBinding, groundedPairingKey, hasNameHole, isGraphqlOperationBinding, leavesTheProcess, messageBusBinding, metricBinding, metricIdentityKey, namePatternFromSub, namePatternKey, nameReference, namesAgree, namesBoundary, namesBoundaryExactly, namesNothing, normalizeRuleBoundary, packageExportBinding, pairingKey, parseBoundaryName, parseChannel, parseHandler, pathAfterOrigin, patternHole, rangedHole, referenceFromName, referenceName, referenceOf, reportsUnpairedItself, resourceNameIn, restBinding, ruleBoundaryMatchesKey, runtimeConfigBinding, semanticsAgree, semconvAttributes, servesRequest, setPiece, spansBuckets, spellingTokens, statesAnOrigin, storageBinding, unitIdentityKey, unitInvocationBinding, validateRule, withRewrittenPaths, withinScope };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { T as TypeShape, M as MessageBusSemantics, D as DeployableUnit, S as Semantics, B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, d as SourceLocationSchema, e as MessageBusTechnology } from './schemas-
|
|
3
|
-
export { f as DeployableUnitSchema, E as EVERY_FIELD, F as FunctionCallSemantics, g as FunctionCallSemanticsSchema, G as GraphqlOperationSemantics, h as GraphqlOperationSemanticsSchema, i as GraphqlResolverSemantics, j as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, R as RestSemantics, l as RestSemanticsSchema, m as RuntimeConfigSemantics, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, p as StorageSemantics, q as StorageSemanticsSchema, r as TypeShapeSchema, s as ecsContainerInstanceName, t as methodsAgree, u as normalizePath, v as pathShape, w as routePathAdmits, x as routePathsMeet, y as storageContainerLabel, z as storageLabel, A as
|
|
2
|
+
import { T as TypeShape, M as MessageBusSemantics, D as DeployableUnit, S as Semantics, B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, d as SourceLocationSchema, e as MessageBusTechnology } from './schemas-CIns0fqF.js';
|
|
3
|
+
export { f as DeployableUnitSchema, E as EVERY_FIELD, F as FunctionCallSemantics, g as FunctionCallSemanticsSchema, G as GraphqlOperationSemantics, h as GraphqlOperationSemanticsSchema, i as GraphqlResolverSemantics, j as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, R as RestSemantics, l as RestSemanticsSchema, m as RuntimeConfigSemantics, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, p as StorageSemantics, q as StorageSemanticsSchema, r as TypeShapeSchema, s as ecsContainerInstanceName, t as methodsAgree, u as normalizePath, v as pathShape, w as routePathAdmits, x as routePathsMeet, y as storageContainerLabel, z as storageLabel, A as storageSystemLabel, H as typeDefinitionKey, I as withDefinitionsInlined } from './schemas-CIns0fqF.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The boundary-name syntax, parsed and printed in one place.
|
|
@@ -683,15 +683,17 @@ declare function channelsPair(a: string, b: string): boolean;
|
|
|
683
683
|
|
|
684
684
|
/**
|
|
685
685
|
* One convention for the source directory a deployable unit is built
|
|
686
|
-
* from,
|
|
686
|
+
* from, one test for whether a file is inside it, and one reading of
|
|
687
|
+
* the handler string that says which code the platform calls.
|
|
687
688
|
*
|
|
688
689
|
* A deploy template gives a directory per unit, and a summary stores it
|
|
689
690
|
* as `metadata.codeScope.path`. Producers write that path and the
|
|
690
691
|
* checker reads it back as a prefix test, so the two sides have to
|
|
691
|
-
* agree on whether it ends in a slash.
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
*
|
|
692
|
+
* agree on whether it ends in a slash. The test also has to stop at a
|
|
693
|
+
* segment boundary, or `src/foo` would cover `src/foobar` and a handler
|
|
694
|
+
* would pair with the wrong function. A CloudFormation template and a
|
|
695
|
+
* Terraform configuration spell a handler the same way, so they read it
|
|
696
|
+
* through the same function rather than through two of them.
|
|
695
697
|
*/
|
|
696
698
|
/**
|
|
697
699
|
* The canonical form of a code-scope directory: no leading `./`, no
|
|
@@ -708,11 +710,22 @@ declare function codeScopePath(raw: string): string;
|
|
|
708
710
|
* trailing slash and one stored without it are read the same way.
|
|
709
711
|
*/
|
|
710
712
|
declare function fileInCodeScope(file: string, scope: string): boolean;
|
|
713
|
+
interface ParsedHandler {
|
|
714
|
+
modulePath: string;
|
|
715
|
+
exportName: string;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Split a handler string into its module path and exported symbol.
|
|
719
|
+
* The final dot separates them: `"src/handlers/confirmToken.handler"` →
|
|
720
|
+
* `{ modulePath: "src/handlers/confirmToken", exportName: "handler" }`.
|
|
721
|
+
* Returns null when there's no dot, since there's no export to bind to.
|
|
722
|
+
*/
|
|
723
|
+
declare function parseHandler(handler: string): ParsedHandler | null;
|
|
711
724
|
|
|
712
725
|
/**
|
|
713
726
|
* The DispatchTable idiom: dispatch on a discriminated union through a
|
|
714
727
|
* mapped-type Record, so a missing variant is a type error rather than a
|
|
715
|
-
* runtime fall-through. It is decision #8 in docs
|
|
728
|
+
* runtime fall-through. It is decision #8 in design/docs-internal/style.md.
|
|
716
729
|
*
|
|
717
730
|
* It is here rather than in one package because the decision applies
|
|
718
731
|
* repo-wide, and every package that walks an IR union needs it. Three
|
|
@@ -729,6 +742,30 @@ declare function dispatchByType<T extends {
|
|
|
729
742
|
type: string;
|
|
730
743
|
}, R>(table: DispatchTable<T, R>, value: T): R;
|
|
731
744
|
|
|
745
|
+
/**
|
|
746
|
+
* The variables a deployment medium puts in a process's environment
|
|
747
|
+
* whatever its configuration says.
|
|
748
|
+
*
|
|
749
|
+
* Code reads them and nothing declares them, so a reader that left them
|
|
750
|
+
* out would accuse every deployment of failing to supply `AWS_REGION`.
|
|
751
|
+
* Two readers describe the same Lambda, a CloudFormation template and a
|
|
752
|
+
* Terraform configuration, and a variable one of them knew about and
|
|
753
|
+
* the other did not would be an error in one and not the other, so the
|
|
754
|
+
* list is stated once here. A medium whose vendor documents a different
|
|
755
|
+
* set per product, Cloud Run's `K_SERVICE` against a plain container's
|
|
756
|
+
* nothing, states its own list in the pack that describes it.
|
|
757
|
+
*/
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Sourced from each platform's own documentation:
|
|
761
|
+
*
|
|
762
|
+
* Lambda: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
|
|
763
|
+
* "Reserved environment variables"
|
|
764
|
+
* ECS: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_metadata.html
|
|
765
|
+
* plus the AWS_DEFAULT_REGION the Fargate runtime sets.
|
|
766
|
+
*/
|
|
767
|
+
declare const PLATFORM_INJECTED_ENV_VARS: Record<DeployableUnit["deploymentTarget"], ReadonlyArray<string>>;
|
|
768
|
+
|
|
732
769
|
/**
|
|
733
770
|
* What a unit does at a boundary, in the words `suss ask` asks with.
|
|
734
771
|
*
|
|
@@ -1013,15 +1050,19 @@ declare function graphqlOperationBinding(opts: {
|
|
|
1013
1050
|
*/
|
|
1014
1051
|
declare function isGraphqlOperationBinding(binding: BoundaryBinding | null | undefined): boolean;
|
|
1015
1052
|
/**
|
|
1016
|
-
* Build a runtime-config binding
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
*
|
|
1053
|
+
* Build a runtime-config binding for a runtime configuration channel
|
|
1054
|
+
* (env vars on a Lambda, ECS task, container, or k8s pod). Transport is
|
|
1055
|
+
* `"os"` because the OS hands env vars to the process at startup no
|
|
1056
|
+
* matter what the deployment medium is.
|
|
1057
|
+
*
|
|
1058
|
+
* A provider says which deployment it is. A recognizer standing at a
|
|
1059
|
+
* read in the code leaves both off, since nothing in the code says
|
|
1060
|
+
* which deployment will run it.
|
|
1020
1061
|
*/
|
|
1021
1062
|
declare function runtimeConfigBinding(opts: {
|
|
1022
1063
|
recognition: string;
|
|
1023
|
-
deploymentTarget
|
|
1024
|
-
instanceName
|
|
1064
|
+
deploymentTarget?: DeployableUnit["deploymentTarget"];
|
|
1065
|
+
instanceName?: string;
|
|
1025
1066
|
}): BoundaryBinding;
|
|
1026
1067
|
/**
|
|
1027
1068
|
* Build a unit-invocation binding, the boundary between a deployed unit
|
|
@@ -1039,12 +1080,13 @@ declare function unitInvocationBinding(opts: {
|
|
|
1039
1080
|
* Build a storage binding, the side of a store that both a schema
|
|
1040
1081
|
* reader and a call site can spell. `transport` defaults to the store's
|
|
1041
1082
|
* own name, which is right for a database whose product and wire
|
|
1042
|
-
* protocol are the same word
|
|
1043
|
-
*
|
|
1083
|
+
* protocol are the same word; a store reached over an SDK passes its
|
|
1084
|
+
* wire instead, and one whose engine nobody settled has none to pass.
|
|
1044
1085
|
*/
|
|
1045
1086
|
declare function storageBinding(opts: {
|
|
1046
1087
|
recognition: string;
|
|
1047
|
-
|
|
1088
|
+
/** Null when the source states an engine this reader could not settle. */
|
|
1089
|
+
storageSystem: string | null;
|
|
1048
1090
|
transport?: string;
|
|
1049
1091
|
scope: string;
|
|
1050
1092
|
/** Null when the source gives a container this reader could not settle. */
|
|
@@ -1073,4 +1115,4 @@ declare function metricBinding(opts: {
|
|
|
1073
1115
|
metricType: string | null;
|
|
1074
1116
|
}): BoundaryBinding;
|
|
1075
1117
|
|
|
1076
|
-
export { type BoundaryBehavior, type BoundaryBinding, BoundaryBindingSchema, type BoundaryName, type BoundarySemanticsDefinition, type BusIdentityKey, type Channel, type ConfidenceInfo, ConfidenceInfoSchema, type ConfidenceLevel, ConfidenceLevelSchema, type ConfidenceSource, ConfidenceSourceSchema, type Corroboration, CorroborationSchema, DeployableUnit, type Deployment, type DispatchTable, type Ecosystem, type EffectRelation, EffectRelationSchema, type FindingSuppression, type FnIdentityKey, type GqlIdentityKey, type HoleRange, type MatchResult, MessageBusSemantics, MessageBusTechnology, type MetricIdentityKey, type MetricSemantics, MetricSemanticsSchema, NOTHING_DEPLOYED, type NamePart, type PackConfiguration, type PackDeclaration, type ParsedChannel, type Reference, type Relation, RelationSchema, Semantics, type SemconvAttribute, type SemconvMapping, type SourceLocation, SourceLocationSchema, type SuppressableSeverity, type SuppressibleFinding, type SuppressionFile, SuppressionFileSchema, type SuppressionRule, SuppressionRuleSchema, TypeShape, type UnitIdentityKey, type UnitInvocationSemantics, UnitInvocationSemanticsSchema, applySuppressionsToFindings, bindingIs, bindingTokens, bodyShapesMatch, boundaryKey, boundaryLabel, boundaryNameString, bucketRank, bucketsMeet, busIdentityKey, busesAgree, canPair, channelsPair, codeScopePath, compareRanks, countsForThreshold, dispatchByType, displayLabel, exchangesHttpResponses, fileInCodeScope, fixedTextLength, fnIdentityKey, formatChannel, functionCallBinding, gqlIdentityKey, graphqlOperationBinding, graphqlResolverBinding, groundBinding, groundedPairingKey, hasNameHole, isGraphqlOperationBinding, leavesTheProcess, messageBusBinding, metricBinding, metricIdentityKey, namePatternFromSub, namePatternKey, nameReference, namesAgree, namesBoundary, namesBoundaryExactly, namesNothing, normalizeRuleBoundary, packageExportBinding, pairingKey, parseBoundaryName, parseChannel, pathAfterOrigin, patternHole, rangedHole, referenceFromName, referenceName, referenceOf, reportsUnpairedItself, resourceNameIn, restBinding, ruleBoundaryMatchesKey, runtimeConfigBinding, semanticsAgree, semconvAttributes, servesRequest, setPiece, spansBuckets, spellingTokens, statesAnOrigin, storageBinding, unitIdentityKey, unitInvocationBinding, validateRule, withRewrittenPaths, withinScope };
|
|
1118
|
+
export { type BoundaryBehavior, type BoundaryBinding, BoundaryBindingSchema, type BoundaryName, type BoundarySemanticsDefinition, type BusIdentityKey, type Channel, type ConfidenceInfo, ConfidenceInfoSchema, type ConfidenceLevel, ConfidenceLevelSchema, type ConfidenceSource, ConfidenceSourceSchema, type Corroboration, CorroborationSchema, DeployableUnit, type Deployment, type DispatchTable, type Ecosystem, type EffectRelation, EffectRelationSchema, type FindingSuppression, type FnIdentityKey, type GqlIdentityKey, type HoleRange, type MatchResult, MessageBusSemantics, MessageBusTechnology, type MetricIdentityKey, type MetricSemantics, MetricSemanticsSchema, NOTHING_DEPLOYED, type NamePart, PLATFORM_INJECTED_ENV_VARS, type PackConfiguration, type PackDeclaration, type ParsedChannel, type ParsedHandler, type Reference, type Relation, RelationSchema, Semantics, type SemconvAttribute, type SemconvMapping, type SourceLocation, SourceLocationSchema, type SuppressableSeverity, type SuppressibleFinding, type SuppressionFile, SuppressionFileSchema, type SuppressionRule, SuppressionRuleSchema, TypeShape, type UnitIdentityKey, type UnitInvocationSemantics, UnitInvocationSemanticsSchema, applySuppressionsToFindings, bindingIs, bindingTokens, bodyShapesMatch, boundaryKey, boundaryLabel, boundaryNameString, bucketRank, bucketsMeet, busIdentityKey, busesAgree, canPair, channelsPair, codeScopePath, compareRanks, countsForThreshold, dispatchByType, displayLabel, exchangesHttpResponses, fileInCodeScope, fixedTextLength, fnIdentityKey, formatChannel, functionCallBinding, gqlIdentityKey, graphqlOperationBinding, graphqlResolverBinding, groundBinding, groundedPairingKey, hasNameHole, isGraphqlOperationBinding, leavesTheProcess, messageBusBinding, metricBinding, metricIdentityKey, namePatternFromSub, namePatternKey, nameReference, namesAgree, namesBoundary, namesBoundaryExactly, namesNothing, normalizeRuleBoundary, packageExportBinding, pairingKey, parseBoundaryName, parseChannel, parseHandler, pathAfterOrigin, patternHole, rangedHole, referenceFromName, referenceName, referenceOf, reportsUnpairedItself, resourceNameIn, restBinding, ruleBoundaryMatchesKey, runtimeConfigBinding, semanticsAgree, semconvAttributes, servesRequest, setPiece, spansBuckets, spellingTokens, statesAnOrigin, storageBinding, unitIdentityKey, unitInvocationBinding, validateRule, withRewrittenPaths, withinScope };
|
package/dist/index.js
CHANGED
|
@@ -55,10 +55,11 @@ import {
|
|
|
55
55
|
statesAnOrigin,
|
|
56
56
|
storageContainerLabel,
|
|
57
57
|
storageLabel,
|
|
58
|
+
storageSystemLabel,
|
|
58
59
|
typeDefinitionKey,
|
|
59
60
|
unitIdentityKey,
|
|
60
61
|
withDefinitionsInlined
|
|
61
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-N564FH5U.js";
|
|
62
63
|
|
|
63
64
|
// src/semconv.ts
|
|
64
65
|
function semconvAttributes(binding) {
|
|
@@ -238,6 +239,17 @@ function fileInCodeScope(file, scope) {
|
|
|
238
239
|
const path = codeScopePath(file);
|
|
239
240
|
return path === prefix || path.startsWith(`${prefix}/`);
|
|
240
241
|
}
|
|
242
|
+
function parseHandler(handler) {
|
|
243
|
+
const trimmed = handler.trim();
|
|
244
|
+
const lastDot = trimmed.lastIndexOf(".");
|
|
245
|
+
if (lastDot <= 0 || lastDot === trimmed.length - 1) {
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
return {
|
|
249
|
+
modulePath: trimmed.slice(0, lastDot),
|
|
250
|
+
exportName: trimmed.slice(lastDot + 1)
|
|
251
|
+
};
|
|
252
|
+
}
|
|
241
253
|
|
|
242
254
|
// src/deployment.ts
|
|
243
255
|
var NOTHING_DEPLOYED = {
|
|
@@ -246,6 +258,49 @@ var NOTHING_DEPLOYED = {
|
|
|
246
258
|
pointsAt: () => null
|
|
247
259
|
};
|
|
248
260
|
|
|
261
|
+
// src/platformEnvVars.ts
|
|
262
|
+
var PLATFORM_INJECTED_ENV_VARS = {
|
|
263
|
+
lambda: [
|
|
264
|
+
"AWS_REGION",
|
|
265
|
+
"AWS_DEFAULT_REGION",
|
|
266
|
+
"AWS_LAMBDA_FUNCTION_NAME",
|
|
267
|
+
"AWS_LAMBDA_FUNCTION_VERSION",
|
|
268
|
+
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE",
|
|
269
|
+
"AWS_LAMBDA_LOG_GROUP_NAME",
|
|
270
|
+
"AWS_LAMBDA_LOG_STREAM_NAME",
|
|
271
|
+
"AWS_LAMBDA_RUNTIME_API",
|
|
272
|
+
"AWS_EXECUTION_ENV",
|
|
273
|
+
"AWS_ACCESS_KEY_ID",
|
|
274
|
+
"AWS_SECRET_ACCESS_KEY",
|
|
275
|
+
"AWS_SESSION_TOKEN",
|
|
276
|
+
"LAMBDA_TASK_ROOT",
|
|
277
|
+
"LAMBDA_RUNTIME_DIR",
|
|
278
|
+
"_HANDLER",
|
|
279
|
+
"_X_AMZN_TRACE_ID",
|
|
280
|
+
"TZ"
|
|
281
|
+
],
|
|
282
|
+
"ecs-task": [
|
|
283
|
+
"AWS_DEFAULT_REGION",
|
|
284
|
+
"AWS_REGION",
|
|
285
|
+
"ECS_CONTAINER_METADATA_URI",
|
|
286
|
+
"ECS_CONTAINER_METADATA_URI_V4",
|
|
287
|
+
"ECS_AGENT_URI"
|
|
288
|
+
],
|
|
289
|
+
// Which variables a container gets depends on what runs it, and the
|
|
290
|
+
// bare target says nothing about that, so the pack for the product
|
|
291
|
+
// states them.
|
|
292
|
+
container: [],
|
|
293
|
+
"k8s-deployment": [
|
|
294
|
+
"KUBERNETES_SERVICE_HOST",
|
|
295
|
+
"KUBERNETES_SERVICE_PORT",
|
|
296
|
+
"KUBERNETES_PORT",
|
|
297
|
+
"HOSTNAME"
|
|
298
|
+
],
|
|
299
|
+
// A Worker reads its configuration off the argument every trigger
|
|
300
|
+
// takes, and Cloudflare puts nothing of its own on it.
|
|
301
|
+
worker: []
|
|
302
|
+
};
|
|
303
|
+
|
|
249
304
|
// src/relation.ts
|
|
250
305
|
import { z } from "zod";
|
|
251
306
|
var RelationSchema = z.enum([
|
|
@@ -590,8 +645,8 @@ function runtimeConfigBinding(opts) {
|
|
|
590
645
|
transport: "os",
|
|
591
646
|
semantics: {
|
|
592
647
|
name: "runtime-config",
|
|
593
|
-
deploymentTarget: opts.deploymentTarget,
|
|
594
|
-
instanceName: opts.instanceName
|
|
648
|
+
...opts.deploymentTarget === void 0 ? {} : { deploymentTarget: opts.deploymentTarget },
|
|
649
|
+
...opts.instanceName === void 0 ? {} : { instanceName: opts.instanceName }
|
|
595
650
|
},
|
|
596
651
|
recognition: opts.recognition
|
|
597
652
|
};
|
|
@@ -609,7 +664,7 @@ function unitInvocationBinding(opts) {
|
|
|
609
664
|
}
|
|
610
665
|
function storageBinding(opts) {
|
|
611
666
|
return {
|
|
612
|
-
transport: opts.transport ?? opts.storageSystem,
|
|
667
|
+
transport: opts.transport ?? opts.storageSystem ?? "storage",
|
|
613
668
|
semantics: {
|
|
614
669
|
name: "storage",
|
|
615
670
|
storageSystem: opts.storageSystem,
|
|
@@ -657,6 +712,7 @@ export {
|
|
|
657
712
|
MessageBusSemanticsSchema,
|
|
658
713
|
MetricSemanticsSchema,
|
|
659
714
|
NOTHING_DEPLOYED,
|
|
715
|
+
PLATFORM_INJECTED_ENV_VARS,
|
|
660
716
|
RelationSchema,
|
|
661
717
|
RestSemanticsSchema,
|
|
662
718
|
RuntimeConfigSemanticsSchema,
|
|
@@ -717,6 +773,7 @@ export {
|
|
|
717
773
|
pairingKey,
|
|
718
774
|
parseBoundaryName,
|
|
719
775
|
parseChannel,
|
|
776
|
+
parseHandler,
|
|
720
777
|
pathAfterOrigin,
|
|
721
778
|
pathShape,
|
|
722
779
|
patternHole,
|
|
@@ -741,6 +798,7 @@ export {
|
|
|
741
798
|
storageBinding,
|
|
742
799
|
storageContainerLabel,
|
|
743
800
|
storageLabel,
|
|
801
|
+
storageSystemLabel,
|
|
744
802
|
typeDefinitionKey,
|
|
745
803
|
unitIdentityKey,
|
|
746
804
|
unitInvocationBinding,
|
|
@@ -66,6 +66,9 @@ declare const MessageBusSemanticsSchema: z.ZodObject<{
|
|
|
66
66
|
"aws.sns": "aws.sns";
|
|
67
67
|
s3: "s3";
|
|
68
68
|
eventbridge: "eventbridge";
|
|
69
|
+
aws_kinesis: "aws_kinesis";
|
|
70
|
+
aws_firehose: "aws_firehose";
|
|
71
|
+
gcp_pubsub: "gcp_pubsub";
|
|
69
72
|
bullmq: "bullmq";
|
|
70
73
|
kafka: "kafka";
|
|
71
74
|
nats: "nats";
|
|
@@ -121,18 +124,18 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
121
124
|
subscription: "subscription";
|
|
122
125
|
}>;
|
|
123
126
|
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
-
deploymentTarget: z.ZodEnum<{
|
|
127
|
+
deploymentTarget: z.ZodOptional<z.ZodEnum<{
|
|
125
128
|
lambda: "lambda";
|
|
126
129
|
"ecs-task": "ecs-task";
|
|
127
130
|
container: "container";
|
|
128
131
|
"k8s-deployment": "k8s-deployment";
|
|
129
132
|
worker: "worker";
|
|
130
|
-
}
|
|
131
|
-
instanceName: z.ZodString
|
|
133
|
+
}>>;
|
|
134
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
132
135
|
name: z.ZodLiteral<"runtime-config">;
|
|
133
136
|
}, z.core.$strip>, z.ZodObject<{
|
|
134
137
|
name: z.ZodLiteral<"storage">;
|
|
135
|
-
storageSystem: z.ZodString
|
|
138
|
+
storageSystem: z.ZodNullable<z.ZodString>;
|
|
136
139
|
scope: z.ZodString;
|
|
137
140
|
container: z.ZodNullable<z.ZodString>;
|
|
138
141
|
accessPath: z.ZodNullable<z.ZodString>;
|
|
@@ -143,6 +146,9 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
143
146
|
"aws.sns": "aws.sns";
|
|
144
147
|
s3: "s3";
|
|
145
148
|
eventbridge: "eventbridge";
|
|
149
|
+
aws_kinesis: "aws_kinesis";
|
|
150
|
+
aws_firehose: "aws_firehose";
|
|
151
|
+
gcp_pubsub: "gcp_pubsub";
|
|
146
152
|
bullmq: "bullmq";
|
|
147
153
|
kafka: "kafka";
|
|
148
154
|
nats: "nats";
|
|
@@ -218,23 +224,28 @@ declare function routePathsMeet(a: string, b: string): boolean;
|
|
|
218
224
|
* The pairing key is `(deploymentTarget, instanceName)`, which is
|
|
219
225
|
* exactly a deployable unit, so the two fields come from
|
|
220
226
|
* `DeployableUnitSchema` instead of being written out a second time.
|
|
227
|
+
*
|
|
228
|
+
* A provider states both. The reading side is the code, which knows it
|
|
229
|
+
* reads its configuration and not which deployment will run it, so a
|
|
230
|
+
* recognizer standing at a read leaves both off rather than guessing.
|
|
231
|
+
* The pairing pass takes the deployment from the provider anyway.
|
|
221
232
|
*/
|
|
222
233
|
declare const RuntimeConfigSemanticsSchema: z.ZodObject<{
|
|
223
|
-
deploymentTarget: z.ZodEnum<{
|
|
234
|
+
deploymentTarget: z.ZodOptional<z.ZodEnum<{
|
|
224
235
|
lambda: "lambda";
|
|
225
236
|
"ecs-task": "ecs-task";
|
|
226
237
|
container: "container";
|
|
227
238
|
"k8s-deployment": "k8s-deployment";
|
|
228
239
|
worker: "worker";
|
|
229
|
-
}
|
|
230
|
-
instanceName: z.ZodString
|
|
240
|
+
}>>;
|
|
241
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
231
242
|
name: z.ZodLiteral<"runtime-config">;
|
|
232
243
|
}, z.core.$strip>;
|
|
233
244
|
type RuntimeConfigSemantics = z.infer<typeof RuntimeConfigSemanticsSchema>;
|
|
234
245
|
|
|
235
246
|
declare const StorageSemanticsSchema: z.ZodObject<{
|
|
236
247
|
name: z.ZodLiteral<"storage">;
|
|
237
|
-
storageSystem: z.ZodString
|
|
248
|
+
storageSystem: z.ZodNullable<z.ZodString>;
|
|
238
249
|
scope: z.ZodString;
|
|
239
250
|
container: z.ZodNullable<z.ZodString>;
|
|
240
251
|
accessPath: z.ZodNullable<z.ZodString>;
|
|
@@ -247,6 +258,8 @@ type StorageSemantics = z.infer<typeof StorageSemanticsSchema>;
|
|
|
247
258
|
* intent doc that says which store a write reaches all read this one.
|
|
248
259
|
*/
|
|
249
260
|
declare function storageLabel(semantics: StorageSemantics): string;
|
|
261
|
+
/** The engine, or the words a report writes where nobody settled one. */
|
|
262
|
+
declare function storageSystemLabel(semantics: StorageSemantics): string;
|
|
250
263
|
/**
|
|
251
264
|
* What an access writes for its columns when it asked for all of them,
|
|
252
265
|
* which is a query with no explicit projection. It covers every column
|
|
@@ -368,18 +381,18 @@ declare const BoundaryBindingSchema: z.ZodObject<{
|
|
|
368
381
|
subscription: "subscription";
|
|
369
382
|
}>;
|
|
370
383
|
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
-
deploymentTarget: z.ZodEnum<{
|
|
384
|
+
deploymentTarget: z.ZodOptional<z.ZodEnum<{
|
|
372
385
|
lambda: "lambda";
|
|
373
386
|
"ecs-task": "ecs-task";
|
|
374
387
|
container: "container";
|
|
375
388
|
"k8s-deployment": "k8s-deployment";
|
|
376
389
|
worker: "worker";
|
|
377
|
-
}
|
|
378
|
-
instanceName: z.ZodString
|
|
390
|
+
}>>;
|
|
391
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
379
392
|
name: z.ZodLiteral<"runtime-config">;
|
|
380
393
|
}, z.core.$strip>, z.ZodObject<{
|
|
381
394
|
name: z.ZodLiteral<"storage">;
|
|
382
|
-
storageSystem: z.ZodString
|
|
395
|
+
storageSystem: z.ZodNullable<z.ZodString>;
|
|
383
396
|
scope: z.ZodString;
|
|
384
397
|
container: z.ZodNullable<z.ZodString>;
|
|
385
398
|
accessPath: z.ZodNullable<z.ZodString>;
|
|
@@ -390,6 +403,9 @@ declare const BoundaryBindingSchema: z.ZodObject<{
|
|
|
390
403
|
"aws.sns": "aws.sns";
|
|
391
404
|
s3: "s3";
|
|
392
405
|
eventbridge: "eventbridge";
|
|
406
|
+
aws_kinesis: "aws_kinesis";
|
|
407
|
+
aws_firehose: "aws_firehose";
|
|
408
|
+
gcp_pubsub: "gcp_pubsub";
|
|
393
409
|
bullmq: "bullmq";
|
|
394
410
|
kafka: "kafka";
|
|
395
411
|
nats: "nats";
|
|
@@ -501,4 +517,4 @@ declare const TypeShapeSchema: z.ZodType<TypeShape>;
|
|
|
501
517
|
*/
|
|
502
518
|
declare function withDefinitionsInlined(shape: TypeShape, definitions: Record<string, TypeShape> | undefined, depth?: number, inProgress?: ReadonlySet<string>): TypeShape;
|
|
503
519
|
|
|
504
|
-
export {
|
|
520
|
+
export { storageSystemLabel as A, BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, EVERY_FIELD as E, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, typeDefinitionKey as H, withDefinitionsInlined as I, 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, routePathsMeet as x, storageContainerLabel as y, storageLabel as z };
|
|
@@ -66,6 +66,9 @@ declare const MessageBusSemanticsSchema: z.ZodObject<{
|
|
|
66
66
|
"aws.sns": "aws.sns";
|
|
67
67
|
s3: "s3";
|
|
68
68
|
eventbridge: "eventbridge";
|
|
69
|
+
aws_kinesis: "aws_kinesis";
|
|
70
|
+
aws_firehose: "aws_firehose";
|
|
71
|
+
gcp_pubsub: "gcp_pubsub";
|
|
69
72
|
bullmq: "bullmq";
|
|
70
73
|
kafka: "kafka";
|
|
71
74
|
nats: "nats";
|
|
@@ -121,18 +124,18 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
121
124
|
subscription: "subscription";
|
|
122
125
|
}>;
|
|
123
126
|
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
-
deploymentTarget: z.ZodEnum<{
|
|
127
|
+
deploymentTarget: z.ZodOptional<z.ZodEnum<{
|
|
125
128
|
lambda: "lambda";
|
|
126
129
|
"ecs-task": "ecs-task";
|
|
127
130
|
container: "container";
|
|
128
131
|
"k8s-deployment": "k8s-deployment";
|
|
129
132
|
worker: "worker";
|
|
130
|
-
}
|
|
131
|
-
instanceName: z.ZodString
|
|
133
|
+
}>>;
|
|
134
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
132
135
|
name: z.ZodLiteral<"runtime-config">;
|
|
133
136
|
}, z.core.$strip>, z.ZodObject<{
|
|
134
137
|
name: z.ZodLiteral<"storage">;
|
|
135
|
-
storageSystem: z.ZodString
|
|
138
|
+
storageSystem: z.ZodNullable<z.ZodString>;
|
|
136
139
|
scope: z.ZodString;
|
|
137
140
|
container: z.ZodNullable<z.ZodString>;
|
|
138
141
|
accessPath: z.ZodNullable<z.ZodString>;
|
|
@@ -143,6 +146,9 @@ declare const SemanticsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
143
146
|
"aws.sns": "aws.sns";
|
|
144
147
|
s3: "s3";
|
|
145
148
|
eventbridge: "eventbridge";
|
|
149
|
+
aws_kinesis: "aws_kinesis";
|
|
150
|
+
aws_firehose: "aws_firehose";
|
|
151
|
+
gcp_pubsub: "gcp_pubsub";
|
|
146
152
|
bullmq: "bullmq";
|
|
147
153
|
kafka: "kafka";
|
|
148
154
|
nats: "nats";
|
|
@@ -218,23 +224,28 @@ declare function routePathsMeet(a: string, b: string): boolean;
|
|
|
218
224
|
* The pairing key is `(deploymentTarget, instanceName)`, which is
|
|
219
225
|
* exactly a deployable unit, so the two fields come from
|
|
220
226
|
* `DeployableUnitSchema` instead of being written out a second time.
|
|
227
|
+
*
|
|
228
|
+
* A provider states both. The reading side is the code, which knows it
|
|
229
|
+
* reads its configuration and not which deployment will run it, so a
|
|
230
|
+
* recognizer standing at a read leaves both off rather than guessing.
|
|
231
|
+
* The pairing pass takes the deployment from the provider anyway.
|
|
221
232
|
*/
|
|
222
233
|
declare const RuntimeConfigSemanticsSchema: z.ZodObject<{
|
|
223
|
-
deploymentTarget: z.ZodEnum<{
|
|
234
|
+
deploymentTarget: z.ZodOptional<z.ZodEnum<{
|
|
224
235
|
lambda: "lambda";
|
|
225
236
|
"ecs-task": "ecs-task";
|
|
226
237
|
container: "container";
|
|
227
238
|
"k8s-deployment": "k8s-deployment";
|
|
228
239
|
worker: "worker";
|
|
229
|
-
}
|
|
230
|
-
instanceName: z.ZodString
|
|
240
|
+
}>>;
|
|
241
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
231
242
|
name: z.ZodLiteral<"runtime-config">;
|
|
232
243
|
}, z.core.$strip>;
|
|
233
244
|
type RuntimeConfigSemantics = z.infer<typeof RuntimeConfigSemanticsSchema>;
|
|
234
245
|
|
|
235
246
|
declare const StorageSemanticsSchema: z.ZodObject<{
|
|
236
247
|
name: z.ZodLiteral<"storage">;
|
|
237
|
-
storageSystem: z.ZodString
|
|
248
|
+
storageSystem: z.ZodNullable<z.ZodString>;
|
|
238
249
|
scope: z.ZodString;
|
|
239
250
|
container: z.ZodNullable<z.ZodString>;
|
|
240
251
|
accessPath: z.ZodNullable<z.ZodString>;
|
|
@@ -247,6 +258,8 @@ type StorageSemantics = z.infer<typeof StorageSemanticsSchema>;
|
|
|
247
258
|
* intent doc that says which store a write reaches all read this one.
|
|
248
259
|
*/
|
|
249
260
|
declare function storageLabel(semantics: StorageSemantics): string;
|
|
261
|
+
/** The engine, or the words a report writes where nobody settled one. */
|
|
262
|
+
declare function storageSystemLabel(semantics: StorageSemantics): string;
|
|
250
263
|
/**
|
|
251
264
|
* What an access writes for its columns when it asked for all of them,
|
|
252
265
|
* which is a query with no explicit projection. It covers every column
|
|
@@ -368,18 +381,18 @@ declare const BoundaryBindingSchema: z.ZodObject<{
|
|
|
368
381
|
subscription: "subscription";
|
|
369
382
|
}>;
|
|
370
383
|
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
-
deploymentTarget: z.ZodEnum<{
|
|
384
|
+
deploymentTarget: z.ZodOptional<z.ZodEnum<{
|
|
372
385
|
lambda: "lambda";
|
|
373
386
|
"ecs-task": "ecs-task";
|
|
374
387
|
container: "container";
|
|
375
388
|
"k8s-deployment": "k8s-deployment";
|
|
376
389
|
worker: "worker";
|
|
377
|
-
}
|
|
378
|
-
instanceName: z.ZodString
|
|
390
|
+
}>>;
|
|
391
|
+
instanceName: z.ZodOptional<z.ZodString>;
|
|
379
392
|
name: z.ZodLiteral<"runtime-config">;
|
|
380
393
|
}, z.core.$strip>, z.ZodObject<{
|
|
381
394
|
name: z.ZodLiteral<"storage">;
|
|
382
|
-
storageSystem: z.ZodString
|
|
395
|
+
storageSystem: z.ZodNullable<z.ZodString>;
|
|
383
396
|
scope: z.ZodString;
|
|
384
397
|
container: z.ZodNullable<z.ZodString>;
|
|
385
398
|
accessPath: z.ZodNullable<z.ZodString>;
|
|
@@ -390,6 +403,9 @@ declare const BoundaryBindingSchema: z.ZodObject<{
|
|
|
390
403
|
"aws.sns": "aws.sns";
|
|
391
404
|
s3: "s3";
|
|
392
405
|
eventbridge: "eventbridge";
|
|
406
|
+
aws_kinesis: "aws_kinesis";
|
|
407
|
+
aws_firehose: "aws_firehose";
|
|
408
|
+
gcp_pubsub: "gcp_pubsub";
|
|
393
409
|
bullmq: "bullmq";
|
|
394
410
|
kafka: "kafka";
|
|
395
411
|
nats: "nats";
|
|
@@ -501,4 +517,4 @@ declare const TypeShapeSchema: z.ZodType<TypeShape>;
|
|
|
501
517
|
*/
|
|
502
518
|
declare function withDefinitionsInlined(shape: TypeShape, definitions: Record<string, TypeShape> | undefined, depth?: number, inProgress?: ReadonlySet<string>): TypeShape;
|
|
503
519
|
|
|
504
|
-
export {
|
|
520
|
+
export { storageSystemLabel as A, BoundaryBindingSchema as B, ConfidenceInfoSchema as C, type DeployableUnit as D, EVERY_FIELD as E, type FunctionCallSemantics as F, type GraphqlOperationSemantics as G, typeDefinitionKey as H, withDefinitionsInlined as I, 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, routePathsMeet as x, storageContainerLabel as y, storageLabel as z };
|
package/dist/schemas.cjs
CHANGED
|
@@ -247,6 +247,12 @@ var MessageBusSemanticsSchema = import_zod4.z.object({
|
|
|
247
247
|
"aws.sns",
|
|
248
248
|
"s3",
|
|
249
249
|
"eventbridge",
|
|
250
|
+
// A Kinesis stream and a Firehose delivery stream are different
|
|
251
|
+
// APIs with different destinations, so a stream named `orders` and
|
|
252
|
+
// a delivery stream named `orders` are not the same channel.
|
|
253
|
+
"aws_kinesis",
|
|
254
|
+
"aws_firehose",
|
|
255
|
+
"gcp_pubsub",
|
|
250
256
|
"bullmq",
|
|
251
257
|
"kafka",
|
|
252
258
|
"nats",
|
|
@@ -796,7 +802,10 @@ var DeployableUnitSchema = import_zod7.z.object({
|
|
|
796
802
|
});
|
|
797
803
|
|
|
798
804
|
// src/semantics/runtimeConfig.ts
|
|
799
|
-
var RuntimeConfigSemanticsSchema = DeployableUnitSchema.
|
|
805
|
+
var RuntimeConfigSemanticsSchema = DeployableUnitSchema.partial({
|
|
806
|
+
deploymentTarget: true,
|
|
807
|
+
instanceName: true
|
|
808
|
+
}).extend({
|
|
800
809
|
name: import_zod8.z.literal("runtime-config")
|
|
801
810
|
});
|
|
802
811
|
var runtimeConfigSemantics = defineBoundarySemantics({
|
|
@@ -823,10 +832,13 @@ var StorageSemanticsSchema = import_zod9.z.object({
|
|
|
823
832
|
name: import_zod9.z.literal("storage"),
|
|
824
833
|
/**
|
|
825
834
|
* Which store this is: postgresql, mysql, aws.dynamodb, or our own
|
|
826
|
-
* word for one OpenTelemetry never named, such as s3
|
|
827
|
-
*
|
|
835
|
+
* word for one OpenTelemetry never named, such as s3, or null when
|
|
836
|
+
* the source states one this reader could not settle. Two products'
|
|
837
|
+
* containers can share a name, so this keeps them apart. A null
|
|
838
|
+
* keeps none of them apart, and the pairing pass says what it does
|
|
839
|
+
* with one.
|
|
828
840
|
*/
|
|
829
|
-
storageSystem: import_zod9.z.string(),
|
|
841
|
+
storageSystem: import_zod9.z.string().nullable(),
|
|
830
842
|
/**
|
|
831
843
|
* The ORM, schema, or deployment scope. A single-database setup uses
|
|
832
844
|
* `"default"`, and a monorepo with several schemas gives each one its
|
|
@@ -889,8 +901,12 @@ var storageSemantics = defineBoundarySemantics({
|
|
|
889
901
|
}
|
|
890
902
|
});
|
|
891
903
|
function storageLabel(semantics) {
|
|
892
|
-
return `${semantics
|
|
904
|
+
return `${storageSystemLabel(semantics)}:${storageContainerLabel(semantics)}`;
|
|
893
905
|
}
|
|
906
|
+
function storageSystemLabel(semantics) {
|
|
907
|
+
return semantics.storageSystem ?? UNKNOWN_ENGINE;
|
|
908
|
+
}
|
|
909
|
+
var UNKNOWN_ENGINE = "<unknown engine>";
|
|
894
910
|
function storageContainerLabel(semantics) {
|
|
895
911
|
const container = semantics.container ?? "<unnamed container>";
|
|
896
912
|
const addressed = semantics.accessPath === null ? container : `${container}#${semantics.accessPath}`;
|
package/dist/schemas.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'zod';
|
|
2
|
-
export { B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, f as DeployableUnitSchema, g as FunctionCallSemanticsSchema, h as GraphqlOperationSemanticsSchema, j as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, l as RestSemanticsSchema, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, d as SourceLocationSchema, q as StorageSemanticsSchema, T as TypeShape, r as TypeShapeSchema,
|
|
2
|
+
export { B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, f as DeployableUnitSchema, g as FunctionCallSemanticsSchema, h as GraphqlOperationSemanticsSchema, j as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, l as RestSemanticsSchema, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, d as SourceLocationSchema, q as StorageSemanticsSchema, T as TypeShape, r as TypeShapeSchema, H as typeDefinitionKey, I as withDefinitionsInlined } from './schemas-CIns0fqF.cjs';
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'zod';
|
|
2
|
-
export { B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, f as DeployableUnitSchema, g as FunctionCallSemanticsSchema, h as GraphqlOperationSemanticsSchema, j as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, l as RestSemanticsSchema, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, d as SourceLocationSchema, q as StorageSemanticsSchema, T as TypeShape, r as TypeShapeSchema,
|
|
2
|
+
export { B as BoundaryBindingSchema, C as ConfidenceInfoSchema, a as ConfidenceLevelSchema, b as ConfidenceSourceSchema, c as CorroborationSchema, f as DeployableUnitSchema, g as FunctionCallSemanticsSchema, h as GraphqlOperationSemanticsSchema, j as GraphqlResolverSemanticsSchema, k as MessageBusSemanticsSchema, l as RestSemanticsSchema, n as RuntimeConfigSemanticsSchema, o as SemanticsSchema, d as SourceLocationSchema, q as StorageSemanticsSchema, T as TypeShape, r as TypeShapeSchema, H as typeDefinitionKey, I as withDefinitionsInlined } from './schemas-CIns0fqF.js';
|
package/dist/schemas.js
CHANGED
package/package.json
CHANGED