miqro.js 0.1.6 → 0.1.9
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/cli.js +2 -6
- package/dist/types.d.ts +11 -2
- package/package.json +6 -5
package/dist/cli.js
CHANGED
|
@@ -3124,9 +3124,6 @@ export default workflow;
|
|
|
3124
3124
|
"miqro.js": "^0.1.3",
|
|
3125
3125
|
zod: "^3.24.1"
|
|
3126
3126
|
},
|
|
3127
|
-
devDependencies: {
|
|
3128
|
-
"@types/bun": "latest"
|
|
3129
|
-
},
|
|
3130
3127
|
scripts: {
|
|
3131
3128
|
dev: "miqro dev",
|
|
3132
3129
|
start: "miqro start",
|
|
@@ -3139,7 +3136,7 @@ export default workflow;
|
|
|
3139
3136
|
if (!existsSync(tsconfigPath)) {
|
|
3140
3137
|
const tsconfigContent = {
|
|
3141
3138
|
compilerOptions: {
|
|
3142
|
-
lib: ["ESNext"],
|
|
3139
|
+
lib: ["ESNext", "DOM"],
|
|
3143
3140
|
module: "esnext",
|
|
3144
3141
|
target: "esnext",
|
|
3145
3142
|
moduleResolution: "bundler",
|
|
@@ -3148,8 +3145,7 @@ export default workflow;
|
|
|
3148
3145
|
noEmit: true,
|
|
3149
3146
|
strict: true,
|
|
3150
3147
|
skipLibCheck: true,
|
|
3151
|
-
allowSyntheticDefaultImports: true
|
|
3152
|
-
types: ["bun-types"]
|
|
3148
|
+
allowSyntheticDefaultImports: true
|
|
3153
3149
|
}
|
|
3154
3150
|
};
|
|
3155
3151
|
await writeFile(tsconfigPath, JSON.stringify(tsconfigContent, null, 2));
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { MiddlewareHandler } from "hono";
|
|
2
|
-
import type { z } from "zod";
|
|
3
2
|
export type AuthConfig = {
|
|
4
3
|
type: "none";
|
|
5
4
|
} | {
|
|
@@ -22,7 +21,17 @@ export interface WorkflowConfig<T = unknown> {
|
|
|
22
21
|
description?: string;
|
|
23
22
|
auth: AuthConfig;
|
|
24
23
|
schedule?: string;
|
|
25
|
-
schema?:
|
|
24
|
+
schema?: {
|
|
25
|
+
safeParse: (data: unknown) => {
|
|
26
|
+
success: true;
|
|
27
|
+
data: T;
|
|
28
|
+
} | {
|
|
29
|
+
success: false;
|
|
30
|
+
error: {
|
|
31
|
+
format: () => any;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
26
35
|
}
|
|
27
36
|
export interface Workflow<T = unknown> {
|
|
28
37
|
config: WorkflowConfig<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miqro.js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Minimal, high-performance microservice engine.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,14 +23,15 @@
|
|
|
23
23
|
"@biomejs/biome": "^2.4.4",
|
|
24
24
|
"@types/bun": "latest",
|
|
25
25
|
"@types/node-cron": "^3.0.11",
|
|
26
|
-
"typescript": "^5"
|
|
26
|
+
"typescript": "^5",
|
|
27
|
+
"zod": "^3.24.1"
|
|
27
28
|
},
|
|
28
29
|
"peerDependencies": {
|
|
29
|
-
"hono": "^4.12.2"
|
|
30
|
+
"hono": "^4.12.2",
|
|
31
|
+
"zod": "^3.0.0"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
34
|
"hono": "^4.12.2",
|
|
33
|
-
"node-cron": "^4.2.1"
|
|
34
|
-
"zod": "^4.3.6"
|
|
35
|
+
"node-cron": "^4.2.1"
|
|
35
36
|
}
|
|
36
37
|
}
|