Skip to content

Commit 66f136d

Browse files
committed
WIP
1 parent 9cb8e24 commit 66f136d

File tree

19 files changed

+519
-588
lines changed

19 files changed

+519
-588
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- AlterTable
2+
ALTER TABLE "BackgroundWorkerTask" ADD COLUMN "payloadSchema" JSONB;

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,4 +578,4 @@
578578
"main": "./dist/commonjs/index.js",
579579
"types": "./dist/commonjs/index.d.ts",
580580
"module": "./dist/esm/index.js"
581-
}
581+
}

packages/core/src/v3/types/tasks.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ type CommonTaskOptions<
345345
* JSON Schema for the task payload. This will be synced to the server during indexing.
346346
* Should be a valid JSON Schema Draft 7 object.
347347
*/
348-
payloadSchema?: JSONSchema;
348+
jsonSchema?: JSONSchema;
349349
};
350350

351351
export type TaskOptions<
@@ -360,9 +360,8 @@ export type TaskOptionsWithSchema<
360360
TIdentifier extends string,
361361
TOutput = unknown,
362362
TInitOutput extends InitOutput = any,
363-
> = Omit<CommonTaskOptions<TIdentifier, any, TOutput, TInitOutput>, "run"> & {
364-
payloadSchema: JSONSchema;
365-
run: (payload: any, params: RunFnParams<TInitOutput>) => Promise<TOutput>;
363+
> = CommonTaskOptions<TIdentifier, any, TOutput, TInitOutput> & {
364+
jsonSchema: JSONSchema;
366365
};
367366

368367
export type TaskWithSchemaOptions<

packages/schema-to-json/examples/usage.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.

packages/schema-to-json/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@
2121
"exports": {
2222
".": {
2323
"import": {
24-
"@triggerdotdev/source": "./src/index.ts",
2524
"types": "./dist/esm/index.d.ts",
2625
"default": "./dist/esm/index.js"
2726
},
2827
"require": {
29-
"@triggerdotdev/source": "./src/index.ts",
3028
"types": "./dist/commonjs/index.d.ts",
3129
"default": "./dist/commonjs/index.js"
3230
}
@@ -39,8 +37,8 @@
3937
"dev": "tshy --watch",
4038
"typecheck": "tsc -p tsconfig.src.json --noEmit",
4139
"test": "vitest",
42-
"update-version": "changeset version && node scripts/updateVersion.js",
43-
"check-exports": "tshy --check-exports"
40+
"update-version": "tsx ../../scripts/updateVersion.ts",
41+
"check-exports": "attw --pack ."
4442
},
4543
"dependencies": {
4644
"@trigger.dev/core": "workspace:*",
@@ -58,7 +56,8 @@
5856
"valibot": "^1.0.0-beta.8",
5957
"vitest": "^2.1.8",
6058
"yup": "^1.6.1",
61-
"zod": "^3.24.1 || ^4.0.0"
59+
"zod": "^3.24.1 || ^4.0.0",
60+
"rimraf": "6.0.1"
6261
},
6362
"peerDependencies": {
6463
"@effect/schema": "^0.75.5",
@@ -106,5 +105,8 @@
106105
".": "./src/index.ts"
107106
},
108107
"project": "./tsconfig.src.json"
109-
}
110-
}
108+
},
109+
"main": "./dist/commonjs/index.js",
110+
"types": "./dist/commonjs/index.d.ts",
111+
"module": "./dist/esm/index.js"
112+
}

packages/schema-to-json/scripts/updateVersion.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)