@pogodisco/task-runner 0.1.0 → 0.2.1

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 CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./main.js";
2
- export * from "./utils/index.js";
1
+ export { runSchema as runSchemaV1, defineSchema as defineSchemaV1, wrapSchema as wrapSchemaV1, } from "./v1/index.js";
2
+ export * from "./v2/index.js";
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./main.js";
2
- export * from "./utils/index.js";
1
+ export { runSchema as runSchemaV1, defineSchema as defineSchemaV1, wrapSchema as wrapSchemaV1, } from "./v1/index.js";
2
+ export * from "./v2/index.js";
@@ -0,0 +1,2 @@
1
+ export { wrapSchema } from "./utils/index.js";
2
+ export { runSchema, defineSchema } from "./main.js";
@@ -0,0 +1,2 @@
1
+ export { wrapSchema } from "./utils/index.js";
2
+ export { runSchema, defineSchema } from "./main.js";
@@ -0,0 +1 @@
1
+ export { wrapSchema } from "./wrap-schema.js";
@@ -0,0 +1 @@
1
+ export { wrapSchema } from "./wrap-schema.js";
@@ -0,0 +1,5 @@
1
+ import type { TResponse } from "@pogodisco/response";
2
+ export type CommandInputFor<R extends Record<string, any>, K extends keyof R> = R[K] extends (args: infer I) => any ? I : never;
3
+ export type CommandOutputFor<R extends Record<string, any>, K extends keyof R> = R[K] extends (args: any) => Promise<TResponse<infer O>> ? O : never;
4
+ export declare function createCommandRegistrar<R extends Record<string, (...args: any) => Promise<TResponse<any>>>>(registry: R): CommandRegistrar<R>;
5
+ export type CommandRegistrar<R extends Record<string, (...args: any) => Promise<TResponse<any>>>> = <K extends keyof R & string>(name: K, params: CommandInputFor<R, K>) => Promise<TResponse<CommandOutputFor<R, K>>>;
@@ -0,0 +1,20 @@
1
+ // -----------------------------
2
+ // Registrar creator
3
+ // -----------------------------
4
+ // export function createCommandRegistrar<
5
+ // R extends Record<string, (...args: any) => Promise<TResponse<any>>>,
6
+ // >(registry: R): CommandRegistrar<R> {
7
+ // return async function appCommand<K extends keyof R & string>(
8
+ // name: K,
9
+ // params: CommandInputFor<R, K>,
10
+ // ): Promise<TResponse<CommandOutputFor<R, K>>> {
11
+ // const fn = registry[name];
12
+ // return await fn(params);
13
+ // };
14
+ // }
15
+ export function createCommandRegistrar(registry) {
16
+ return async (name, params) => {
17
+ const fn = registry[name];
18
+ return fn(params);
19
+ };
20
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./types/index.js";
2
+ export { createGraph, runGraph } from "./main.js";
3
+ export * from "./registry.js";
@@ -0,0 +1,3 @@
1
+ export * from "./types/index.js";
2
+ export { createGraph, runGraph } from "./main.js";
3
+ export * from "./registry.js";
@@ -0,0 +1,4 @@
1
+ import { GraphBuilder, GraphEdge, GraphNode, RuntimeCtx, SchemaGraph } from "./types/index.js";
2
+ export declare function edge<K extends keyof any>(from: K, to: K, when?: (ctx: any) => boolean): GraphEdge<K>;
3
+ export declare function createGraph<Init = {}>(): GraphBuilder<{}, Init>;
4
+ export declare function runGraph<Nodes extends Record<string, GraphNode<any>>, Init>(graph: SchemaGraph<Nodes, Init>, initArgs: Init): Promise<RuntimeCtx<Nodes, Init>>;
@@ -0,0 +1,59 @@
1
+ export function edge(from, to, when) {
2
+ return { from, to, when };
3
+ }
4
+ export function createGraph() {
5
+ const nodes = {};
6
+ // const edges: GraphEdge<string>[] = [];
7
+ const edges = [];
8
+ let entry;
9
+ const builder = {
10
+ node(key, schema, mapInput) {
11
+ if (!entry)
12
+ entry = key;
13
+ nodes[key] = { schema, mapInput };
14
+ return builder;
15
+ },
16
+ edge(from, to) {
17
+ // if (!(from in nodes))
18
+ // throw new Error(`Edge 'from' node "${from}" does not exist`);
19
+ // if (!(to in nodes))
20
+ // throw new Error(`Edge 'to' node "${to}" does not exist`);
21
+ edges.push({ from, to });
22
+ return builder;
23
+ },
24
+ build() {
25
+ if (!entry)
26
+ throw new Error("Graph must have an entry node");
27
+ return {
28
+ entry,
29
+ nodes: nodes,
30
+ edges: edges,
31
+ };
32
+ },
33
+ };
34
+ return builder;
35
+ }
36
+ export async function runGraph(graph, initArgs) {
37
+ const ctx = {
38
+ _init: initArgs,
39
+ results: {},
40
+ };
41
+ const queue = [graph.entry];
42
+ const visited = new Set();
43
+ while (queue.length) {
44
+ const nodeName = queue.shift();
45
+ if (visited.has(nodeName))
46
+ continue;
47
+ const node = graph.nodes[nodeName];
48
+ const input = node.mapInput ? node.mapInput(ctx) : ctx._init;
49
+ const res = await node.schema(input);
50
+ if (!res.ok)
51
+ throw res;
52
+ ctx.results[nodeName] = res.data;
53
+ visited.add(nodeName);
54
+ const nextEdges = graph.edges.filter((e) => e.from === nodeName && (!e.when || e.when(ctx)));
55
+ for (const e of nextEdges)
56
+ queue.push(e.to);
57
+ }
58
+ return ctx;
59
+ }
@@ -0,0 +1,5 @@
1
+ import { RuntimeCtx, SchemaGraph } from "./types/index.js";
2
+ export type GraphInputFor<R extends Record<string, SchemaGraph<any, any>>, K extends keyof R> = R[K] extends SchemaGraph<any, infer I> ? I : never;
3
+ export type GraphOutputFor<R extends Record<string, SchemaGraph<any, any>>, K extends keyof R> = R[K] extends SchemaGraph<infer N, infer I> ? RuntimeCtx<N, I> : never;
4
+ export type GraphRegistrar<R extends Record<string, SchemaGraph<any, any>>> = <K extends keyof R & string>(name: K, params: GraphInputFor<R, K>) => Promise<GraphOutputFor<R, K>>;
5
+ export declare function createGraphRegistrar<R extends Record<string, SchemaGraph<any, any>>>(registry: R): GraphRegistrar<R>;
@@ -0,0 +1,10 @@
1
+ import { runGraph } from "./main.js";
2
+ // -----------------------------
3
+ // Factory
4
+ // -----------------------------
5
+ export function createGraphRegistrar(registry) {
6
+ return async (name, params) => {
7
+ const graph = registry[name];
8
+ return runGraph(graph, params);
9
+ };
10
+ }
@@ -0,0 +1,38 @@
1
+ import { TResponse } from "@pogodisco/response";
2
+ export type WrappedSchema<I, O> = (args: I) => Promise<TResponse<O>>;
3
+ export type ExtractInput<T> = T extends WrappedSchema<infer I, any> ? I : never;
4
+ export type ExtractOutput<T> = T extends WrappedSchema<any, infer O> ? O : never;
5
+ export type GraphNode<FN extends WrappedSchema<any, any>> = {
6
+ schema: FN;
7
+ mapInput?: (ctx: any) => ExtractInput<FN>;
8
+ };
9
+ export type RuntimeCtx<Nodes extends Record<string, GraphNode<any>>, Init> = {
10
+ _init: Init;
11
+ results: {
12
+ [K in keyof Nodes]: ExtractOutput<Nodes[K]["schema"]>;
13
+ };
14
+ };
15
+ export type GraphEdge<NodeKeys extends keyof any> = {
16
+ from: NodeKeys;
17
+ to: NodeKeys;
18
+ when?: (ctx: any) => boolean;
19
+ };
20
+ export type BuiltNode<FN extends WrappedSchema<any, any>, Nodes extends Record<string, GraphNode<any>>> = GraphNode<FN>;
21
+ export type SchemaGraph<Nodes extends Record<string, GraphNode<any>>, Init> = {
22
+ entry: keyof Nodes;
23
+ nodes: Nodes;
24
+ edges: GraphEdge<keyof Nodes>[];
25
+ };
26
+ export type GraphBuilder<Nodes extends Record<string, GraphNode<any>> = {}, Init = {}> = {
27
+ node<K extends string, FN extends WrappedSchema<any, any>>(key: K, schema: FN, mapInput?: (ctx: RuntimeCtx<Nodes & Record<K, GraphNode<FN>>, Init>) => ExtractInput<FN>): GraphBuilder<Nodes & Record<K, GraphNode<FN>>, Init>;
28
+ edge<From extends keyof Nodes, To extends keyof Nodes>(from: From, to: To): GraphBuilder<Nodes, Init>;
29
+ build(): SchemaGraph<Nodes, Init>;
30
+ };
31
+ export type GraphEntryInput<G extends SchemaGraph<any, any>> = G extends SchemaGraph<infer Nodes, any> ? RuntimeCtx<Nodes, any>["_init"] : never;
32
+ export type GraphNodes<G> = G extends SchemaGraph<infer Nodes, any> ? Nodes : never;
33
+ export type InferGraphNodes<G> = G extends SchemaGraph<infer N, any> ? N : never;
34
+ export type InferGraphInit<G> = G extends SchemaGraph<any, infer I> ? I : never;
35
+ export type GraphInput<K extends keyof GraphRegistry> = GraphRegistry[K] extends SchemaGraph<any, infer Init> ? Init : never;
36
+ export type GraphOutput<K extends keyof GraphRegistry> = GraphRegistry[K] extends SchemaGraph<infer Nodes, infer Init> ? RuntimeCtx<Nodes, Init> : never;
37
+ export interface GraphRegistry {
38
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export { runSchema, defineSchema } from "./main.js";
2
+ export { wrapSchema } from "./utils/index.js";
3
+ export * from "./graph/index.js";
4
+ export * from "./types/index.js";
5
+ export * from "./command/main.js";
@@ -0,0 +1,5 @@
1
+ export { runSchema, defineSchema } from "./main.js";
2
+ export { wrapSchema } from "./utils/index.js";
3
+ export * from "./graph/index.js";
4
+ export * from "./types/index.js";
5
+ export * from "./command/main.js";
@@ -0,0 +1,13 @@
1
+ import { TResponse } from "@pogodisco/response";
2
+ import { TaskMap, TaskDefinition, TaskResultsData, TaskState, TaskSchemaWithContracts, SchemaOptions, ExecutionTrace } from "./types/index.js";
3
+ export declare function defineSchema<T extends TaskMap, I extends Record<string, any>, O>(schema: {
4
+ [K in keyof T]: TaskDefinition<any, T, I>;
5
+ } & {
6
+ _output: (results: TaskResultsData<T, I>, status?: Record<keyof T, TaskState>) => O;
7
+ }): TaskSchemaWithContracts<T, I, O>;
8
+ export declare const runSchema: <T extends TaskMap, I extends Record<string, any>, O>(schema: TaskSchemaWithContracts<T, I, O>, initArgs: I, options?: SchemaOptions | undefined) => Promise<TResponse<{
9
+ _output: O;
10
+ _status: Record<keyof T, TaskState>;
11
+ _batches: (keyof T)[][];
12
+ _trace: ExecutionTrace;
13
+ }>>;
@@ -0,0 +1,264 @@
1
+ import { withResponse } from "@pogodisco/response";
2
+ // --- defineSchema ---
3
+ export function defineSchema(schema) {
4
+ preflightCheck(schema);
5
+ return schema;
6
+ }
7
+ // --- preflight check & circular detection ---
8
+ function preflightCheck(schema) {
9
+ const keys = new Set();
10
+ for (const key in schema) {
11
+ if (key === "_output" || key === "_init")
12
+ continue;
13
+ if (keys.has(key))
14
+ throw new Error(`Duplicate task key: ${key}`);
15
+ keys.add(key);
16
+ const task = schema[key];
17
+ if (!task)
18
+ continue;
19
+ if (task.abort === undefined)
20
+ task.abort = true;
21
+ if (task.bg === undefined)
22
+ task.bg = false;
23
+ if (task.runIf === undefined)
24
+ task.runIf = [];
25
+ }
26
+ const visited = new Set();
27
+ const stack = new Set();
28
+ const visit = (taskKey) => {
29
+ if (taskKey === "_output" || taskKey === "_init")
30
+ return;
31
+ if (stack.has(taskKey))
32
+ throw new Error(`Circular dependency: ${[...stack, taskKey].join(" -> ")}`);
33
+ if (visited.has(taskKey))
34
+ return;
35
+ stack.add(taskKey);
36
+ const task = schema[taskKey];
37
+ for (const dep of task?.dependencies ?? []) {
38
+ if (!(dep in schema))
39
+ throw new Error(`Task "${taskKey}" depends on unknown "${dep}"`);
40
+ visit(dep);
41
+ }
42
+ stack.delete(taskKey);
43
+ visited.add(taskKey);
44
+ };
45
+ for (const key of Object.keys(schema))
46
+ visit(key);
47
+ }
48
+ // --- mark dependents skipped ---
49
+ function markDependentsSkipped(schema, status, key) {
50
+ for (const k of Object.keys(schema)) {
51
+ const task = schema[k];
52
+ if ((task.dependencies ?? []).includes(key) &&
53
+ status[k] === "pending") {
54
+ status[k] = "skipped";
55
+ markDependentsSkipped(schema, status, k);
56
+ }
57
+ }
58
+ }
59
+ function buildTopologicalBatches(schema, keys) {
60
+ const remaining = new Set(keys);
61
+ const resolved = new Set();
62
+ const batches = [];
63
+ while (remaining.size > 0) {
64
+ const batch = [];
65
+ for (const key of remaining) {
66
+ const deps = schema[key]?.dependencies ?? [];
67
+ if (deps.every((d) => resolved.has(d))) {
68
+ batch.push(key);
69
+ }
70
+ }
71
+ if (batch.length === 0) {
72
+ throw new Error("Unable to build execution batches (circular or unresolved deps)");
73
+ }
74
+ for (const key of batch) {
75
+ remaining.delete(key);
76
+ resolved.add(key);
77
+ }
78
+ batches.push(batch);
79
+ }
80
+ return batches;
81
+ }
82
+ export const runSchema = withResponse(async (schema, initArgs, options) => {
83
+ const logger = options?.log;
84
+ const parallel = options?.parallel ?? false;
85
+ function isTResponse(x) {
86
+ return x && typeof x === "object" && "ok" in x;
87
+ }
88
+ const normalizeTaskResult = (result) => {
89
+ if (isTResponse(result)) {
90
+ if (result.ok)
91
+ return { ok: true, data: result.data };
92
+ return { ok: false, error: result };
93
+ }
94
+ // raw return = success
95
+ return { ok: true, data: result };
96
+ };
97
+ // --- result normalization ---
98
+ // --- control flags ---
99
+ let abortExecution = false;
100
+ let earlyOutput = null;
101
+ // --- extend schema with _init ---
102
+ const localSchema = {
103
+ ...schema,
104
+ _init: { fn: (x) => x, argMap: () => initArgs },
105
+ };
106
+ const taskKeys = Object.keys(localSchema).filter((k) => k !== "_output" && k !== "_init");
107
+ // add to topological batching
108
+ const batches = buildTopologicalBatches(localSchema, taskKeys);
109
+ const trace = {
110
+ batches: batches.map((b) => b.map(String)),
111
+ events: [],
112
+ };
113
+ const pushTrace = (task, type, meta) => {
114
+ trace.events.push({
115
+ task: String(task),
116
+ type,
117
+ timestamp: Date.now(),
118
+ meta,
119
+ });
120
+ };
121
+ // const results: Partial<TaskResultsData<T, I>> & { _init: I } = {
122
+ // _init: initArgs,
123
+ // }
124
+ const results = {
125
+ _init: initArgs,
126
+ };
127
+ const status = {};
128
+ for (const key of taskKeys)
129
+ status[key] = "pending";
130
+ // --- task runner ---
131
+ const runTask = async (key) => {
132
+ if (abortExecution || earlyOutput)
133
+ return;
134
+ const task = localSchema[key];
135
+ if (status[key] !== "pending")
136
+ return;
137
+ // --- dependency check ---
138
+ const deps = task.dependencies ?? [];
139
+ if (!deps.every((d) => status[d] === "success")) {
140
+ return;
141
+ }
142
+ // --- runIf ---
143
+ if (task.runIf?.length) {
144
+ const runIfResults = await Promise.all(task.runIf.map((fn) => fn(results)));
145
+ if (!runIfResults.every(Boolean)) {
146
+ status[key] = "skipped";
147
+ markDependentsSkipped(localSchema, status, key);
148
+ logger?.("skipped", String(key), {
149
+ reason: "runIf",
150
+ results: runIfResults,
151
+ });
152
+ pushTrace(key, "skipped", { reason: "runIf", results: runIfResults });
153
+ return;
154
+ }
155
+ }
156
+ const args = task.argMap?.(results);
157
+ // --- background task ---
158
+ if (task.bg) {
159
+ logger?.("background", String(key), args);
160
+ pushTrace(key, "background", { args });
161
+ Promise.resolve().then(async () => {
162
+ try {
163
+ const raw = args !== undefined ? await task.fn(args) : await task.fn();
164
+ const normalized = normalizeTaskResult(raw);
165
+ if (!normalized.ok) {
166
+ logger?.("fail", String(key), normalized.error);
167
+ pushTrace(key, "fail", { error: normalized.error });
168
+ }
169
+ else {
170
+ logger?.("success", String(key), normalized.data);
171
+ pushTrace(key, "success", { result: normalized.data });
172
+ }
173
+ }
174
+ catch (err) {
175
+ logger?.("fail", String(key), err);
176
+ pushTrace(key, "fail", { error: err });
177
+ }
178
+ });
179
+ status[key] = "success";
180
+ results[key] = undefined;
181
+ return;
182
+ }
183
+ // --- normal task ---
184
+ logger?.("start", String(key), args);
185
+ pushTrace(key, "start", { args });
186
+ try {
187
+ const raw = args !== undefined ? await task.fn(args) : await task.fn();
188
+ const normalized = normalizeTaskResult(raw);
189
+ if (!normalized.ok) {
190
+ status[key] = "failed";
191
+ logger?.("fail", String(key), normalized.error);
192
+ pushTrace(key, "fail", { error: normalized.error });
193
+ if (task.abort) {
194
+ abortExecution = true;
195
+ markDependentsSkipped(localSchema, status, key);
196
+ }
197
+ return;
198
+ }
199
+ status[key] = "success";
200
+ results[key] = normalized.data;
201
+ logger?.("success", String(key), normalized.data);
202
+ pushTrace(key, "success", { result: normalized.data });
203
+ // --- early return ---
204
+ if (task.returnImmediately) {
205
+ earlyOutput = schema._output(results, status);
206
+ logger?.("finish", "_schema (early)", {
207
+ results,
208
+ status,
209
+ output: earlyOutput,
210
+ });
211
+ }
212
+ }
213
+ catch (err) {
214
+ status[key] = "failed";
215
+ logger?.("fail", String(key), err);
216
+ pushTrace(key, "fail", { error: err });
217
+ if (task.abort) {
218
+ abortExecution = true;
219
+ markDependentsSkipped(localSchema, status, key);
220
+ }
221
+ }
222
+ };
223
+ for (const batch of batches) {
224
+ if (abortExecution || earlyOutput)
225
+ break;
226
+ if (parallel) {
227
+ await Promise.all(batch.map((k) => runTask(k)));
228
+ }
229
+ else {
230
+ for (const k of batch) {
231
+ await runTask(k);
232
+ if (abortExecution || earlyOutput)
233
+ break;
234
+ }
235
+ }
236
+ }
237
+ // --- early return output ---
238
+ if (earlyOutput) {
239
+ return {
240
+ _output: earlyOutput,
241
+ _status: status,
242
+ _batches: batches,
243
+ _trace: trace,
244
+ };
245
+ }
246
+ // --- abort ---
247
+ if (abortExecution) {
248
+ throw new Error("Schema aborted due to task failure");
249
+ }
250
+ // --- unresolved tasks ---
251
+ const pendingKeys = taskKeys.filter((k) => status[k] === "pending");
252
+ if (pendingKeys.length) {
253
+ throw new Error(`Unresolved tasks (possible circular deps): ${pendingKeys.join(", ")}`);
254
+ }
255
+ // --- normal finish ---
256
+ const output = schema._output(results, status);
257
+ logger?.("finish", "_schema", { results, status, output });
258
+ return {
259
+ _output: output,
260
+ _status: status,
261
+ _batches: batches,
262
+ _trace: trace,
263
+ };
264
+ });
@@ -0,0 +1,50 @@
1
+ export type TraceEventType = "start" | "success" | "fail" | "skipped" | "background";
2
+ export interface TraceEvent {
3
+ task: string;
4
+ type: TraceEventType;
5
+ timestamp: number;
6
+ meta?: any;
7
+ }
8
+ export interface ExecutionTrace {
9
+ batches: string[][];
10
+ events: TraceEvent[];
11
+ }
12
+ export type LogEvent = "start" | "finish" | "data" | "deferred" | "skipped" | "background" | "parallel" | "success" | "fail";
13
+ export type TaskLogger = (event: LogEvent, key: string, meta?: any) => void;
14
+ export interface SchemaOptions {
15
+ log?: TaskLogger;
16
+ parallel?: boolean;
17
+ }
18
+ export type TaskState = "pending" | "skipped" | "failed" | "success";
19
+ export type TaskDefinition<F extends (...args: any) => any, T extends TaskMap, I extends Record<string, any>> = {
20
+ fn: F;
21
+ dependencies?: string[];
22
+ abort?: boolean;
23
+ bg?: boolean;
24
+ runIf?: ((results: TaskResultsData<T, I>) => boolean | Promise<boolean>)[];
25
+ argMap?: (results: TaskResultsData<T, I>) => Parameters<F>[0];
26
+ returnImmediately?: boolean;
27
+ };
28
+ export type TaskMap = Record<string, TaskDefinition<any, any, any>>;
29
+ type SuccessData<T> = T extends {
30
+ ok: true;
31
+ data: infer D;
32
+ } ? D : never;
33
+ type TDResultData<TD extends TaskDefinition<any, any, any>> = TD extends TaskDefinition<infer F, any, any> ? SuccessData<Awaited<ReturnType<F>>> : never;
34
+ export type TaskResultsData<T extends TaskMap, I> = {
35
+ _init: I;
36
+ } & {
37
+ [K in keyof T]: TDResultData<T[K]>;
38
+ };
39
+ export type TasksFromFns<T extends Record<string, (...args: any) => any>> = {
40
+ [K in keyof T]: TaskDefinition<T[K], any, any>;
41
+ };
42
+ export type TaskSchemaWithContracts<T extends TaskMap, I extends Record<string, any>, O> = {
43
+ [K in keyof T]: T[K] extends TaskDefinition<infer F, any, any> ? TaskDefinition<F, T, I> : never;
44
+ } & {
45
+ _init?: I;
46
+ _output: (results: TaskResultsData<T, I>, status?: Record<keyof T, TaskState>) => O;
47
+ _batches?: (keyof T)[][];
48
+ _trace?: ExecutionTrace;
49
+ };
50
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { wrapSchema } from "./wrap-schema.js";
@@ -0,0 +1 @@
1
+ export { wrapSchema } from "./wrap-schema.js";
@@ -0,0 +1,2 @@
1
+ import { SchemaOptions, TaskMap, TaskSchemaWithContracts } from "../types/index.js";
2
+ export declare function wrapSchema<T extends TaskMap, I extends Record<string, any>, O>(schema: TaskSchemaWithContracts<T, I, O>, options?: SchemaOptions): (initArgs: I) => Promise<import("@pogodisco/response").TResponse<O>>;
@@ -0,0 +1,10 @@
1
+ import { withResponse } from "@pogodisco/response";
2
+ import { runSchema } from "../main.js";
3
+ export function wrapSchema(schema, options) {
4
+ return withResponse(async (initArgs) => {
5
+ const res = await runSchema(schema, initArgs, options || {});
6
+ if (!res.ok)
7
+ throw res;
8
+ return res.data._output;
9
+ });
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pogodisco/task-runner",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -27,14 +27,16 @@
27
27
  ],
28
28
  "scripts": {
29
29
  "prepublishOnly": "npm run build",
30
- "build": "tsc",
30
+ "build": "tsc -p tsconfig.build.json",
31
31
  "dev": "tsc -w -p tsconfig.json"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@pogodisco/response": "~0.0.1",
35
35
  "typescript": "^5.0.0"
36
36
  },
37
- "devDependecies": {
38
- "@pogodisco/response": "~0.0.1"
37
+ "devDependencies": {
38
+ "@pogodisco/response": "~0.0.1",
39
+ "chalk": "^5.6.2",
40
+ "pretty-format": "^30.2.0"
39
41
  }
40
42
  }
@@ -1 +0,0 @@
1
- export * from "./wrap-schema.js";
@@ -1 +0,0 @@
1
- export * from "./wrap-schema.js";
File without changes
File without changes
File without changes
File without changes