@cosmicdrift/kumiko-feature-ast 0.417.0 → 0.418.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.
|
@@ -104,15 +104,18 @@ export function extractMultiStreamProjection(call, sourceFile) {
|
|
|
104
104
|
const delivery = deliveryLit
|
|
105
105
|
? deliveryLit.getLiteralValue()
|
|
106
106
|
: undefined;
|
|
107
|
-
const
|
|
108
|
-
|
|
107
|
+
const irreversibleProperty = arg.getProperty("irreversibleWithoutEntryHandler");
|
|
108
|
+
const irreversibleValue = irreversibleProperty
|
|
109
109
|
?.asKind(SyntaxKind.PropertyAssignment)
|
|
110
110
|
?.getInitializer()
|
|
111
|
-
?.asKind(SyntaxKind.StringLiteral)
|
|
112
|
-
|
|
111
|
+
?.asKind(SyntaxKind.StringLiteral)
|
|
112
|
+
?.getLiteralValue();
|
|
113
113
|
const irreversibleWithoutEntryHandler = isOneOf(IRREVERSIBLE_WITHOUT_ENTRY_HANDLER_CASES, irreversibleValue)
|
|
114
114
|
? irreversibleValue
|
|
115
115
|
: undefined;
|
|
116
|
+
if (irreversibleProperty !== undefined && irreversibleWithoutEntryHandler === undefined) {
|
|
117
|
+
return fail("multiStreamProjection", sourceLocationFromNode(call, sourceFile), `irreversibleWithoutEntryHandler must be one of ${IRREVERSIBLE_WITHOUT_ENTRY_HANDLER_CASES.join(", ")}`);
|
|
118
|
+
}
|
|
116
119
|
return ok({
|
|
117
120
|
kind: "multiStreamProjection",
|
|
118
121
|
source: sourceLocationFromNode(call, sourceFile),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-feature-ast",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.418.0",
|
|
4
4
|
"description": "Feature-file AST for Kumiko: parse, patch and render feature definitions, the pattern library, and the codemods kumiko-upgrade runs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
26
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
25
|
+
"@cosmicdrift/kumiko-framework": "0.418.0",
|
|
26
|
+
"@cosmicdrift/kumiko-types": "0.418.0",
|
|
27
27
|
"ts-morph": "^28.0.0",
|
|
28
28
|
"zod": "^4.6.7"
|
|
29
29
|
},
|
|
@@ -143,17 +143,28 @@ function transformCli(source: string, filePath: string, result: SiteLists): stri
|
|
|
143
143
|
slotsOfImported &&
|
|
144
144
|
!hasImportBinding(sourceFile, "kmsEnvSchema");
|
|
145
145
|
if (!isScaffoldShape) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
146
|
+
if (!hasImportBinding(sourceFile, "kmsEnvSchema")) {
|
|
147
|
+
const slotCalls = sourceFile
|
|
148
|
+
.getDescendantsOfKind(SyntaxKind.CallExpression)
|
|
149
|
+
.filter((call) => ["runSchemaCli", "kmsSlotsOf"].includes(call.getExpression().getText()));
|
|
150
|
+
const reportable =
|
|
151
|
+
slotCalls.find((call) => call.getExpression().getText() === "kmsSlotsOf") ??
|
|
152
|
+
slotCalls.find((call) => {
|
|
153
|
+
const [options] = call.getArguments();
|
|
154
|
+
return (
|
|
155
|
+
options?.isKind(SyntaxKind.ObjectLiteralExpression) === true &&
|
|
156
|
+
options.getProperty("kmsSlots") !== undefined
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
if (reportable !== undefined) {
|
|
160
|
+
result.manual.push(
|
|
161
|
+
site(
|
|
162
|
+
filePath,
|
|
163
|
+
reportable,
|
|
164
|
+
`kmsSlots does not match the scaffold: add kmsSlotsOf(kmsEnvSchema) from ${KMS_ENV_SPECIFIER}`,
|
|
165
|
+
),
|
|
166
|
+
);
|
|
167
|
+
}
|
|
157
168
|
}
|
|
158
169
|
return source;
|
|
159
170
|
}
|