@jskit-ai/create-app 0.1.63 → 0.1.64
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/package.json
CHANGED
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@local/main": "file:packages/main",
|
|
32
32
|
"@fastify/static": "^9.1.1",
|
|
33
|
-
"@fastify/type-provider-typebox": "^6.1.0",
|
|
34
33
|
"@jskit-ai/kernel": "0.x",
|
|
35
34
|
"fastify": "^5.7.4",
|
|
35
|
+
"json-rest-schema": "^1.0.13",
|
|
36
36
|
"pinia": "^3.0.4",
|
|
37
37
|
"vue": "^3.5.13",
|
|
38
38
|
"vue-router": "^5.0.4",
|
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
* Shared transport validators/resources live here.
|
|
3
3
|
*
|
|
4
4
|
* Example:
|
|
5
|
-
* import {
|
|
5
|
+
* import { createSchema } from "json-rest-schema";
|
|
6
6
|
*
|
|
7
|
-
* export const
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
7
|
+
* export const helloQuerySchema = createSchema({
|
|
8
|
+
* name: { type: "string", minLength: 1, maxLength: 80 }
|
|
9
|
+
* });
|
|
10
|
+
*
|
|
11
|
+
* export const helloResponseSchema = {
|
|
12
|
+
* type: "object",
|
|
13
|
+
* additionalProperties: false,
|
|
14
|
+
* required: ["ok", "message"],
|
|
15
|
+
* properties: {
|
|
16
|
+
* ok: { type: "boolean" },
|
|
17
|
+
* message: { type: "string", minLength: 1 }
|
|
17
18
|
* }
|
|
18
19
|
* };
|
|
19
20
|
*/
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Fastify from "fastify";
|
|
2
2
|
import fastifyStatic from "@fastify/static";
|
|
3
|
-
import { TypeBoxValidatorCompiler } from "@fastify/type-provider-typebox";
|
|
4
|
-
import { registerTypeBoxFormats } from "@jskit-ai/http-runtime/shared/validators/typeboxFormats";
|
|
5
3
|
import { resolveRuntimeEnv } from "./server/lib/runtimeEnv.js";
|
|
6
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
5
|
import path from "node:path";
|
|
@@ -86,8 +84,6 @@ function canServeStaticFile(distRoot, relativePath) {
|
|
|
86
84
|
|
|
87
85
|
async function createServer() {
|
|
88
86
|
const app = Fastify({ logger: true });
|
|
89
|
-
registerTypeBoxFormats();
|
|
90
|
-
app.setValidatorCompiler(TypeBoxValidatorCompiler);
|
|
91
87
|
|
|
92
88
|
app.get("/api/health", async () => {
|
|
93
89
|
return {
|
|
@@ -101,7 +101,7 @@ test("latest JSKIT scaffold files are present at the app root", async () => {
|
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
-
test("
|
|
104
|
+
test("starter shell does not include the app.manifest scaffold", async () => {
|
|
105
105
|
await assert.rejects(access(path.join(APP_ROOT, "framework/app.manifest.mjs")), /ENOENT/);
|
|
106
106
|
});
|
|
107
107
|
|