@openworkflow/cli 0.1.0
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 +8 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +32 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.test.d.ts +2 -0
- package/dist/cli.test.d.ts.map +1 -0
- package/dist/cli.test.js +7 -0
- package/dist/cli.test.js.map +1 -0
- package/dist/commands.d.ts +33 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +718 -0
- package/dist/commands.js.map +1 -0
- package/dist/commands.test.d.ts +2 -0
- package/dist/commands.test.d.ts.map +1 -0
- package/dist/commands.test.js +35 -0
- package/dist/commands.test.js.map +1 -0
- package/dist/config.d.ts +34 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +51 -0
- package/dist/config.js.map +1 -0
- package/dist/config.test.d.ts +2 -0
- package/dist/config.test.d.ts.map +1 -0
- package/dist/config.test.js +89 -0
- package/dist/config.test.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +43 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/index.test.js +11 -0
- package/dist/index.test.js.map +1 -0
- package/dist/init.test.d.ts +2 -0
- package/dist/init.test.d.ts.map +1 -0
- package/dist/init.test.js +148 -0
- package/dist/init.test.js.map +1 -0
- package/dist/templates.d.ts +5 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +55 -0
- package/dist/templates.js.map +1 -0
- package/dist/templates.test.d.ts +2 -0
- package/dist/templates.test.d.ts.map +1 -0
- package/dist/templates.test.js +20 -0
- package/dist/templates.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +38 -0
package/README.md
ADDED
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* v8 ignore file -- @preserve */
|
|
3
|
+
import { doctor, getVersion, init, workerStart } from "./commands.js";
|
|
4
|
+
import { withErrorHandling } from "./errors.js";
|
|
5
|
+
import { Command } from "commander";
|
|
6
|
+
// openworkflow | ow
|
|
7
|
+
const program = new Command();
|
|
8
|
+
program
|
|
9
|
+
.name("openworkflow")
|
|
10
|
+
.alias("ow")
|
|
11
|
+
.description("OpenWorkflow CLI - learn more at https://openworkflow.dev")
|
|
12
|
+
.version(getVersion());
|
|
13
|
+
// init
|
|
14
|
+
program
|
|
15
|
+
.command("init")
|
|
16
|
+
.description("initialize OpenWorkflow")
|
|
17
|
+
.action(withErrorHandling(init));
|
|
18
|
+
// doctor
|
|
19
|
+
program
|
|
20
|
+
.command("doctor")
|
|
21
|
+
.description("check configuration and list available workflows")
|
|
22
|
+
.action(withErrorHandling(doctor));
|
|
23
|
+
// worker
|
|
24
|
+
const workerCmd = program.command("worker").description("manage workers");
|
|
25
|
+
// worker start
|
|
26
|
+
workerCmd
|
|
27
|
+
.command("start")
|
|
28
|
+
.description("start a worker to process workflows")
|
|
29
|
+
.option("-c, --concurrency <number>", "number of concurrent workflows to process", Number.parseInt)
|
|
30
|
+
.action(withErrorHandling(workerStart));
|
|
31
|
+
await program.parseAsync(process.argv);
|
|
32
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AACA,iCAAiC;AACjC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,oBAAoB;AACpB,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,OAAO;KACJ,IAAI,CAAC,cAAc,CAAC;KACpB,KAAK,CAAC,IAAI,CAAC;KACX,WAAW,CAAC,2DAA2D,CAAC;KACxE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AAEzB,OAAO;AACP,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,yBAAyB,CAAC;KACtC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;AAEnC,SAAS;AACT,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,kDAAkD,CAAC;KAC/D,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAErC,SAAS;AACT,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAE1E,eAAe;AACf,SAAS;KACN,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,qCAAqC,CAAC;KAClD,MAAM,CACL,4BAA4B,EAC5B,2CAA2C,EAC3C,MAAM,CAAC,QAAQ,CAChB;KACA,MAAM,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;AAE1C,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.test.d.ts","sourceRoot":"","sources":["../cli.test.ts"],"names":[],"mappings":""}
|
package/dist/cli.test.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
describe("@openworkflow/cli program entrypoint", () => {
|
|
3
|
+
test("does not execute when imported", async () => {
|
|
4
|
+
await expect(import("./cli.js")).resolves.toBeDefined();
|
|
5
|
+
});
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=cli.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.test.js","sourceRoot":"","sources":["../cli.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEhD,QAAQ,CAAC,sCAAsC,EAAE,GAAG,EAAE;IACpD,IAAI,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC1D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { WorkerConfig } from "./config.js";
|
|
2
|
+
/**
|
|
3
|
+
* openworkflow -V | --version
|
|
4
|
+
* @returns the version string, or "-" if it cannot be determined
|
|
5
|
+
*/
|
|
6
|
+
export declare function getVersion(): string;
|
|
7
|
+
/** openworkflow init */
|
|
8
|
+
export declare function init(): Promise<void>;
|
|
9
|
+
/** openworkflow doctor */
|
|
10
|
+
export declare function doctor(): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* openworkflow worker start
|
|
13
|
+
* @param cliOptions - Worker config overrides
|
|
14
|
+
*/
|
|
15
|
+
export declare function workerStart(cliOptions: WorkerConfig): Promise<void>;
|
|
16
|
+
interface PackageJsonForDoctor {
|
|
17
|
+
dependencies?: Record<string, string>;
|
|
18
|
+
devDependencies?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Determine the config filename to write during init.
|
|
22
|
+
* @param packageJson - Parsed package.json (or null if missing)
|
|
23
|
+
* @returns The config file name to create
|
|
24
|
+
*/
|
|
25
|
+
export declare function getConfigFileName(packageJson: Readonly<PackageJsonForDoctor> | null): string;
|
|
26
|
+
/**
|
|
27
|
+
* Determine the example workflow filename to write during init.
|
|
28
|
+
* @param packageJson - Parsed package.json (or null if missing)
|
|
29
|
+
* @returns The example workflow file name to create
|
|
30
|
+
*/
|
|
31
|
+
export declare function getExampleWorkflowFileName(packageJson: Readonly<PackageJsonForDoctor> | null): string;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AA8BvD;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAoBnC;AAED,wBAAwB;AACxB,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAqH1C;AAED,0BAA0B;AAC1B,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAiD5C;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,UAAU,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAqEzE;AA0dD,UAAU,oBAAoB;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAsBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,IAAI,GACjD,MAAM,CAMR;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,IAAI,GACjD,MAAM,CAKR"}
|