@newhomestar/sdk 0.4.5 → 0.4.7
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 +13 -0
- package/dist/index.js +13 -10
- package/package.json +45 -45
package/dist/index.d.ts
CHANGED
|
@@ -77,3 +77,16 @@ export declare function runHttpServer<T extends WorkerDef>(def: T, opts?: {
|
|
|
77
77
|
export type { ZodTypeAny as SchemaAny, ZodTypeAny };
|
|
78
78
|
export { parseNovaSpec } from "./parseSpec.js";
|
|
79
79
|
export type { NovaSpec } from "./parseSpec.js";
|
|
80
|
+
import { parseNovaSpec as parseNovaSpecFunction } from "./parseSpec.js";
|
|
81
|
+
declare const _default: {
|
|
82
|
+
defineWorker: typeof defineWorker;
|
|
83
|
+
action: typeof action;
|
|
84
|
+
enqueue: typeof enqueue;
|
|
85
|
+
runHttpServer: typeof runHttpServer;
|
|
86
|
+
runORPCServer: typeof runORPCServer;
|
|
87
|
+
runWorker: typeof runWorker;
|
|
88
|
+
generateOpenAPISpec: typeof generateOpenAPISpec;
|
|
89
|
+
createORPCRouter: typeof createORPCRouter;
|
|
90
|
+
parseNovaSpec: typeof parseNovaSpecFunction;
|
|
91
|
+
};
|
|
92
|
+
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
// nova-sdk-esm – Modern ESM Nova SDK with full oRPC integration (v0.4.2)
|
|
2
|
-
// =====================================================
|
|
3
|
-
// 1. Public API – action(), defineWorker(), enqueue() - SAME AS BEFORE
|
|
4
|
-
// 2. Enhanced HTTP server with REST endpoints and custom routing
|
|
5
|
-
// 3. Full oRPC integration with OpenAPI spec generation
|
|
6
|
-
// 4. Runtime harness for *worker* pipelines using Supabase RPC
|
|
7
|
-
// 5. Modern ESM architecture for future compatibility
|
|
8
|
-
// -----------------------------------------------------------
|
|
9
|
-
import { z } from "zod";
|
|
10
1
|
import dotenv from "dotenv";
|
|
11
2
|
import { createClient } from "@supabase/supabase-js";
|
|
12
3
|
import { OpenFgaClient } from "@openfga/sdk";
|
|
@@ -15,7 +6,6 @@ import { createServer } from "node:http";
|
|
|
15
6
|
import { os } from "@orpc/server";
|
|
16
7
|
import { RPCHandler } from "@orpc/server/node";
|
|
17
8
|
import { CORSPlugin } from "@orpc/server/plugins";
|
|
18
|
-
import { OpenAPIHandler } from "@orpc/openapi/fetch";
|
|
19
9
|
if (!process.env.RUNTIME_SUPABASE_URL) {
|
|
20
10
|
// local dev – read .env.local
|
|
21
11
|
dotenv.config({ path: ".env.local", override: true });
|
|
@@ -304,3 +294,16 @@ export function runHttpServer(def, opts = {}) {
|
|
|
304
294
|
}
|
|
305
295
|
// YAML spec parsing utility
|
|
306
296
|
export { parseNovaSpec } from "./parseSpec.js";
|
|
297
|
+
// Default export for compatibility
|
|
298
|
+
import { parseNovaSpec as parseNovaSpecFunction } from "./parseSpec.js";
|
|
299
|
+
export default {
|
|
300
|
+
defineWorker,
|
|
301
|
+
action,
|
|
302
|
+
enqueue,
|
|
303
|
+
runHttpServer,
|
|
304
|
+
runORPCServer,
|
|
305
|
+
runWorker,
|
|
306
|
+
generateOpenAPISpec,
|
|
307
|
+
createORPCRouter,
|
|
308
|
+
parseNovaSpec: parseNovaSpecFunction
|
|
309
|
+
};
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@newhomestar/sdk",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Type-safe SDK for building Nova pipelines (workers & functions)",
|
|
5
|
-
"homepage": "https://github.com/newhomestar/nova-node-sdk#readme",
|
|
6
|
-
"bugs": {
|
|
7
|
-
"url": "https://github.com/newhomestar/nova-node-sdk/issues"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/newhomestar/nova-node-sdk.git"
|
|
12
|
-
},
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"author": "Christian Gomez",
|
|
15
|
-
"type": "module",
|
|
16
|
-
"main": "dist/index.js",
|
|
17
|
-
"types": "dist/index.d.ts",
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"import": "./dist/index.js",
|
|
21
|
-
"types": "./dist/index.d.ts"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"files": [
|
|
25
|
-
"dist"
|
|
26
|
-
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "tsc"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"@openfga/sdk": "^0.9.0",
|
|
32
|
-
"@orpc/openapi": "1.7.4",
|
|
33
|
-
"@orpc/server": "1.7.4",
|
|
34
|
-
"@supabase/supabase-js": "^2.39.0",
|
|
35
|
-
"body-parser": "^1.20.2",
|
|
36
|
-
"dotenv": "^16.4.3",
|
|
37
|
-
"express": "^4.18.2",
|
|
38
|
-
"yaml": "^2.7.1",
|
|
39
|
-
"zod": "^4.0.5"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@types/node": "^20.11.17",
|
|
43
|
-
"typescript": "^5.4.4"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@newhomestar/sdk",
|
|
3
|
+
"version": "0.4.7",
|
|
4
|
+
"description": "Type-safe SDK for building Nova pipelines (workers & functions)",
|
|
5
|
+
"homepage": "https://github.com/newhomestar/nova-node-sdk#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/newhomestar/nova-node-sdk/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/newhomestar/nova-node-sdk.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"author": "Christian Gomez",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "dist/index.js",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@openfga/sdk": "^0.9.0",
|
|
32
|
+
"@orpc/openapi": "1.7.4",
|
|
33
|
+
"@orpc/server": "1.7.4",
|
|
34
|
+
"@supabase/supabase-js": "^2.39.0",
|
|
35
|
+
"body-parser": "^1.20.2",
|
|
36
|
+
"dotenv": "^16.4.3",
|
|
37
|
+
"express": "^4.18.2",
|
|
38
|
+
"yaml": "^2.7.1",
|
|
39
|
+
"zod": "^4.0.5"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "^20.11.17",
|
|
43
|
+
"typescript": "^5.4.4"
|
|
44
|
+
}
|
|
45
|
+
}
|