@repogo/plugins 0.1.35 → 0.1.37
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/README.md +243 -3
- package/dist/cache.d.ts +27 -0
- package/dist/context.d.ts +67 -2
- package/dist/define.d.ts +31 -0
- package/dist/index.d.ts +9 -3
- package/dist/index.js +123 -7
- package/dist/runtime.d.ts +16 -1
- package/dist/self.d.ts +1 -0
- package/dist/testing.d.ts +4 -0
- package/dist/testing.js +1562 -49
- package/dist/tracking.d.ts +5 -0
- package/dist/uploads.d.ts +24 -0
- package/dist/workflow/attempts.d.ts +25 -0
- package/dist/workflow/availability.d.ts +8 -0
- package/dist/workflow/catalog.d.ts +21 -0
- package/dist/workflow/clock.d.ts +6 -0
- package/dist/workflow/contracts.d.ts +121 -0
- package/dist/workflow/definition.d.ts +35 -0
- package/dist/workflow/errors.d.ts +19 -0
- package/dist/workflow/events.d.ts +132 -0
- package/dist/workflow/interrupted.d.ts +3 -0
- package/dist/workflow/journal.d.ts +28 -0
- package/dist/workflow/lease.d.ts +2 -0
- package/dist/workflow/lifetime.d.ts +27 -0
- package/dist/workflow/policy.d.ts +36 -0
- package/dist/workflow/register.d.ts +11 -0
- package/dist/workflow/retry.d.ts +14 -0
- package/dist/workflow/runner.d.ts +29 -0
- package/dist/workflow/scope.d.ts +4 -0
- package/dist/workflow/service.d.ts +48 -0
- package/dist/workflow/sleep.d.ts +6 -0
- package/dist/workflow/state.d.ts +41 -0
- package/dist/workflow/storage.d.ts +22 -0
- package/dist/workflow/summary.d.ts +80 -0
- package/dist/workflow/testing.d.ts +12 -0
- package/dist/workflow-executor.js +22917 -0
- package/package.json +3 -3
- package/dist/index-83w1fk10.js +0 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repogo/plugins",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.37",
|
|
4
4
|
"description": "Write RepoGo plugins: collections and methods over SQLite that agents and cards call",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"LICENSE.md"
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "rm -rf dist && bun build src/index.ts src/testing.ts --target=bun --outdir dist --splitting --external zod && tsc -p tsconfig.build.json",
|
|
24
|
-
"build:runtime": "bun build src/run.ts src/worker.ts --target=bun --outdir ../internal/plugins/runtime",
|
|
23
|
+
"build": "rm -rf dist && bun build src/index.ts src/testing.ts --target=bun --outdir dist --splitting --external zod && tsc -p tsconfig.build.json && bun build src/workflow/executor.ts --target=bun --outfile dist/workflow-executor.js",
|
|
24
|
+
"build:runtime": "bun build src/run.ts src/worker.ts --target=bun --outdir ../internal/plugins/runtime && bun build src/workflow/executor.ts --target=bun --outfile ../internal/plugins/runtime/workflow-executor.js",
|
|
25
25
|
"prepack": "cp ../LICENSE.md LICENSE.md && bun run build",
|
|
26
26
|
"test": "bun test",
|
|
27
27
|
"typecheck": "tsc --noEmit"
|
package/dist/index-83w1fk10.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// src/errors.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
class MethodError extends Error {
|
|
5
|
-
code;
|
|
6
|
-
fieldErrors;
|
|
7
|
-
constructor(code, message, fieldErrors) {
|
|
8
|
-
super(message);
|
|
9
|
-
this.code = code;
|
|
10
|
-
this.fieldErrors = fieldErrors;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function toCallError(error) {
|
|
14
|
-
if (error instanceof MethodError) {
|
|
15
|
-
return { code: error.code, message: error.message, ...error.fieldErrors ? { fieldErrors: error.fieldErrors } : {} };
|
|
16
|
-
}
|
|
17
|
-
if (error instanceof z.ZodError) {
|
|
18
|
-
const fieldErrors = {};
|
|
19
|
-
for (const issue of error.issues)
|
|
20
|
-
fieldErrors["/" + issue.path.join("/")] ??= issue.message;
|
|
21
|
-
const messages = Object.values(fieldErrors);
|
|
22
|
-
const message = messages.length === 1 ? messages[0] : "Check the highlighted fields.";
|
|
23
|
-
return { code: "VALIDATION", message, fieldErrors };
|
|
24
|
-
}
|
|
25
|
-
return { code: "INTERNAL", message: error instanceof Error ? error.message : String(error) };
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { MethodError, toCallError };
|