clyops-jobs 0.2.0 → 0.4.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dan VerWeire
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,9 +6,13 @@ artifacts, and each run gets a job record. A small in-memory queue runs jobs wit
6
6
  limit, for servers that hand out job ids. Built on [clyops-tools](../tools).
7
7
 
8
8
  ```sh
9
- npm install clyops-jobs
9
+ pnpm add clyops-jobs
10
10
  ```
11
11
 
12
+ **Single file.** `clyops-jobs.cjs` (in this package, and on npm) is the whole library as one dependency-free
13
+ CommonJS file: copy or link it into a project and `require()` it on Node 20+, with no build step
14
+ and no `node_modules`. It includes clyops-tools. `require('clyops-jobs')` loads it; `import` loads the ESM build. It is generated from the sources and checked in CI.
15
+
12
16
  ## Function config
13
17
 
14
18
  ```json
@@ -26,7 +30,8 @@ npm install clyops-jobs
26
30
  - `functions.NAME.script` is the tool, relative to a script root.
27
31
  - `key` names the options block (default: the function name). Options are
28
32
  `deepMerge(defaults[key], config[key])`, keyed like the tool's options (`out_dir`, `out-dir`)
29
- and mapped onto its command line through `--help-json-schema` ([spec §13](../../spec/SPEC.md#13-json-input-toargv)).
33
+ and mapped onto its command line through `--help-json-schema` ([spec §13](https://github.com/wankdanker/clyops/blob/main/spec/SPEC.md#13-json-input-toargv)).
34
+ - `positionals_order` (optional) is `first` (default) or `last`, for wrappers needing a specific order. `--` is only emitted for positional values starting with `-`.
30
35
  - `positionals` (optional) lists the tool's positional arguments explicitly; otherwise they're
31
36
  options keyed by argument name.
32
37
  - String values may use `${dot.path}` or `{{dot.path}}` templates against a context you build
@@ -84,3 +89,13 @@ queue.get(job.record.job_id)?.cancel();
84
89
  ```
85
90
 
86
91
  ESM only, Node 20+.
92
+
93
+ A missing or unreadable configured stdin file rejects `runScriptFunction()`
94
+ with its input-file error. It fails that job and stops its tool; the host worker
95
+ stays alive.
96
+
97
+ ## Documentation
98
+
99
+ Read the [Node guide](https://clyops.io/node-tools.html) and
100
+ [complete public API reference](https://clyops.io/reference/node/index.html).
101
+ Type declarations and documentation comments are included in the package.