@jay-framework/stack-server-runtime 0.16.0 → 0.16.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/index.d.ts +2 -0
- package/dist/index.js +8 -2
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -205,6 +205,8 @@ interface RegisteredActionBase {
|
|
|
205
205
|
/** Optional metadata from .jay-action file (description, input/output schemas).
|
|
206
206
|
* Actions with metadata are exposed to AI agents; those without are not. */
|
|
207
207
|
metadata?: ActionMetadata;
|
|
208
|
+
/** Whether this action accepts file uploads (DL#131) */
|
|
209
|
+
acceptsFiles?: boolean;
|
|
208
210
|
}
|
|
209
211
|
/**
|
|
210
212
|
* Registered request-response action entry.
|
package/dist/index.js
CHANGED
|
@@ -204,6 +204,7 @@ new JayAtomicType("string");
|
|
|
204
204
|
new JayAtomicType("number");
|
|
205
205
|
new JayAtomicType("boolean");
|
|
206
206
|
new JayAtomicType("Date");
|
|
207
|
+
new JayAtomicType("file");
|
|
207
208
|
new JayAtomicType("Unknown");
|
|
208
209
|
class JayObjectType {
|
|
209
210
|
constructor(name, props) {
|
|
@@ -247,6 +248,9 @@ function jayTypeToJsonSchema(type) {
|
|
|
247
248
|
if (name === "string" || name === "number" || name === "boolean") {
|
|
248
249
|
return { type: name };
|
|
249
250
|
}
|
|
251
|
+
if (name === "file") {
|
|
252
|
+
return { type: "string", description: "Binary file upload (JayFile)" };
|
|
253
|
+
}
|
|
250
254
|
return { type: "string" };
|
|
251
255
|
}
|
|
252
256
|
if (isEnumType(type)) {
|
|
@@ -1295,7 +1299,8 @@ class ActionRegistry {
|
|
|
1295
1299
|
method: action.method,
|
|
1296
1300
|
cacheOptions: action.cacheOptions,
|
|
1297
1301
|
services: action.services,
|
|
1298
|
-
handler: action.handler
|
|
1302
|
+
handler: action.handler,
|
|
1303
|
+
...action.acceptsFiles && { acceptsFiles: true }
|
|
1299
1304
|
};
|
|
1300
1305
|
this.actions.set(action.actionName, entry);
|
|
1301
1306
|
}
|
|
@@ -1452,7 +1457,8 @@ class ActionRegistry {
|
|
|
1452
1457
|
method: "POST",
|
|
1453
1458
|
isStreaming: true,
|
|
1454
1459
|
services: action.services,
|
|
1455
|
-
handler: action.handler
|
|
1460
|
+
handler: action.handler,
|
|
1461
|
+
...action.acceptsFiles && { acceptsFiles: true }
|
|
1456
1462
|
};
|
|
1457
1463
|
this.actions.set(action.actionName, entry);
|
|
1458
1464
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/stack-server-runtime",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.mts",
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
"test:watch": "vitest"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@jay-framework/compiler-jay-html": "^0.16.
|
|
30
|
-
"@jay-framework/compiler-shared": "^0.16.
|
|
31
|
-
"@jay-framework/component": "^0.16.
|
|
32
|
-
"@jay-framework/fullstack-component": "^0.16.
|
|
33
|
-
"@jay-framework/logger": "^0.16.
|
|
34
|
-
"@jay-framework/runtime": "^0.16.
|
|
35
|
-
"@jay-framework/ssr-runtime": "^0.16.
|
|
36
|
-
"@jay-framework/stack-route-scanner": "^0.16.
|
|
37
|
-
"@jay-framework/view-state-merge": "^0.16.
|
|
29
|
+
"@jay-framework/compiler-jay-html": "^0.16.1",
|
|
30
|
+
"@jay-framework/compiler-shared": "^0.16.1",
|
|
31
|
+
"@jay-framework/component": "^0.16.1",
|
|
32
|
+
"@jay-framework/fullstack-component": "^0.16.1",
|
|
33
|
+
"@jay-framework/logger": "^0.16.1",
|
|
34
|
+
"@jay-framework/runtime": "^0.16.1",
|
|
35
|
+
"@jay-framework/ssr-runtime": "^0.16.1",
|
|
36
|
+
"@jay-framework/stack-route-scanner": "^0.16.1",
|
|
37
|
+
"@jay-framework/view-state-merge": "^0.16.1",
|
|
38
38
|
"yaml": "^2.3.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@jay-framework/dev-environment": "^0.16.
|
|
42
|
-
"@jay-framework/jay-cli": "^0.16.
|
|
43
|
-
"@jay-framework/stack-client-runtime": "^0.16.
|
|
41
|
+
"@jay-framework/dev-environment": "^0.16.1",
|
|
42
|
+
"@jay-framework/jay-cli": "^0.16.1",
|
|
43
|
+
"@jay-framework/stack-client-runtime": "^0.16.1",
|
|
44
44
|
"@types/express": "^5.0.2",
|
|
45
45
|
"@types/node": "^22.15.21",
|
|
46
46
|
"nodemon": "^3.0.3",
|