@plurnk/plurnk-execs-jq 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/docs/jq.md +23 -0
  2. package/package.json +4 -3
package/docs/jq.md ADDED
@@ -0,0 +1,23 @@
1
+ # jq
2
+
3
+ The system `jq` as a runtime: the **body is the jq program**, the **`(target)` is the data source**.
4
+
5
+ ```
6
+ <<EXEC[jq]:[1,2,3] | add:EXEC inline — no input (-n), the program stands alone
7
+ <<EXEC[jq](data.json):.users[].name:EXEC filter a file
8
+ <<EXEC[jq](exec://…#results):.items[]:EXEC filter a prior op's output
9
+ ```
10
+
11
+ An empty body defaults to `.` (identity). Results land on `results` as `application/jsonl` — one compact value per line.
12
+
13
+ ## Deliberate departures from the `jq` CLI (#493)
14
+
15
+ - **No stdin.** The op grammar has no pipe; `jq`'s read-stdin default maps to `-n` (null input) when no target is given, so an inline program constructs its own input. A file target matches `jq program file` exactly.
16
+ - **Compact output is forced (`-c`).** `jq`'s pretty-print default would break the channel's JSONL contract; presentation belongs to the consumer's mimetype pipeline, not the filter.
17
+ - **No flag surface.** The body is the program only — `--arg`, `-r`, `-s` and friends are not passable. What flags do is expressible in-language (`-r` → the value is unquoted when READ as text; `--arg` → bind in the program; `-s` → `[inputs]` has no stdin to slurp, pass a file). One surface, no argv parsing.
18
+
19
+ `jq` reads the ambient environment (`env`, `$ENV`) per its own contract — the consumer's scoped env is honored when provided.
20
+
21
+ ## Errors
22
+
23
+ A failed program or spawn closes `results` as `errored` with status 500 and `jq_error` / `jq_spawn_failed` telemetry carrying jq's own stderr.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-execs-jq",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "jq runtime executor for plurnk-service's exec scheme — shells the system jq binary to filter/transform JSON for EXEC[jq].",
5
5
  "keywords": [
6
6
  "plurnk",
@@ -48,7 +48,8 @@
48
48
  },
49
49
  "files": [
50
50
  "dist/**/*",
51
- "README.md"
51
+ "README.md",
52
+ "docs/**/*"
52
53
  ],
53
54
  "scripts": {
54
55
  "test:lint": "tsc --noEmit",
@@ -59,6 +60,6 @@
59
60
  "prepack": "npm run build"
60
61
  },
61
62
  "peerDependencies": {
62
- "@plurnk/plurnk-execs": "1.0.4"
63
+ "@plurnk/plurnk-execs": "1.0.6"
63
64
  }
64
65
  }