@plurnk/plurnk-execs-jq 1.19.3 → 1.21.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/docs/jq.md +15 -15
- package/package.json +79 -80
package/docs/jq.md
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
The system `jq` as a runtime: the **body is the jq program**, the **`(target)` is the data source**.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```jq
|
|
6
6
|
[1,2,3] | add
|
|
7
|
-
|
|
7
|
+
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```jq (data.json)
|
|
10
10
|
.users[].name
|
|
11
|
-
|
|
11
|
+
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```jq (sqlite:///ab3d5678#results)
|
|
14
14
|
.[] | .name
|
|
15
|
-
|
|
15
|
+
```
|
|
16
16
|
|
|
17
17
|
The first form has no input and uses `-n`. The second filters a file. The third
|
|
18
18
|
filters the result stream at the emitted SQLite address.
|
|
@@ -29,24 +29,24 @@ address.
|
|
|
29
29
|
|
|
30
30
|
`jq` reads the ambient environment (`env`, `$ENV`) per its own contract — the consumer's scoped env is honored when provided.
|
|
31
31
|
|
|
32
|
+
## Errors
|
|
33
|
+
|
|
34
|
+
A failed program or spawn closes `results` as `errored` with status 500 and an
|
|
35
|
+
RFC 9457 Problem carrying jq's own stderr.
|
|
36
|
+
|
|
32
37
|
## Live input
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
```jq [{"stdin": "open"}]
|
|
35
40
|
.value * 2
|
|
36
|
-
|
|
41
|
+
```
|
|
37
42
|
|
|
38
43
|
Use the returned stream address, here `jq:///c4e56789`. A SEND body is input
|
|
39
44
|
JSON, not another jq program; this example closes stdin after sending its value:
|
|
40
45
|
|
|
41
|
-
|
|
46
|
+
```SEND (jq:///c4e56789) [{"eof": true}]
|
|
42
47
|
{"value":21}
|
|
43
|
-
|
|
48
|
+
```
|
|
44
49
|
|
|
45
50
|
Without `[{"eof": true}]`, include an actual trailing newline to delimit each JSON
|
|
46
51
|
value. Open-input output is unbuffered. READ the same address for results;
|
|
47
52
|
SEND acknowledges only input delivery. KILL remains execution cancellation.
|
|
48
|
-
|
|
49
|
-
## Errors
|
|
50
|
-
|
|
51
|
-
A failed program or spawn closes `results` as `errored` with status 500 and an
|
|
52
|
-
RFC 9457 Problem carrying jq's own stderr.
|
package/package.json
CHANGED
|
@@ -1,83 +1,82 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
"name": "@plurnk/plurnk-execs-jq",
|
|
3
|
+
"version": "1.21.0",
|
|
4
|
+
"description": "jq runtime executor for plurnk-service's exec scheme — shells the system jq binary to filter or transform JSON.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"plurnk",
|
|
7
|
+
"exec",
|
|
8
|
+
"runtime",
|
|
9
|
+
"executor",
|
|
10
|
+
"jq",
|
|
11
|
+
"json",
|
|
12
|
+
"filter"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/plurnk/plurnk-service/tree/main/plurnk-execs-jq#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://repo.possumtech.com/plurnk/plurnk-service/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/plurnk/plurnk-service.git",
|
|
21
|
+
"directory": "plurnk-execs-jq"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=26"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"author": "@wikitopian",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"plurnk": {
|
|
33
|
+
"kind": "exec",
|
|
34
|
+
"runtimes": [
|
|
35
|
+
{
|
|
36
|
+
"name": "jq",
|
|
37
|
+
"glyph": "🧰",
|
|
38
|
+
"summary": "Transform JSON with jq.",
|
|
39
|
+
"invocation": {
|
|
40
|
+
"body": {
|
|
41
|
+
"role": "jq filter",
|
|
42
|
+
"required": false
|
|
43
|
+
},
|
|
44
|
+
"target": {
|
|
45
|
+
"role": "JSON input",
|
|
46
|
+
"required": false,
|
|
47
|
+
"kind": "resource"
|
|
48
|
+
},
|
|
49
|
+
"example": {
|
|
50
|
+
"target": "package.json",
|
|
51
|
+
"body": ".name"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"exports": {
|
|
58
|
+
".": {
|
|
59
|
+
"types": "./dist/index.d.ts",
|
|
60
|
+
"default": "./dist/index.js"
|
|
17
61
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"summary": "Transform JSON with jq.",
|
|
39
|
-
"invocation": {
|
|
40
|
-
"body": {
|
|
41
|
-
"role": "jq filter",
|
|
42
|
-
"required": false
|
|
43
|
-
},
|
|
44
|
-
"target": {
|
|
45
|
-
"role": "JSON input",
|
|
46
|
-
"required": false,
|
|
47
|
-
"kind": "resource"
|
|
48
|
-
},
|
|
49
|
-
"example": {
|
|
50
|
-
"target": "package.json",
|
|
51
|
-
"body": ".name"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
"exports": {
|
|
58
|
-
".": {
|
|
59
|
-
"plurnk-dev": "./src/index.ts",
|
|
60
|
-
"types": "./dist/index.d.ts",
|
|
61
|
-
"default": "./dist/index.js"
|
|
62
|
-
},
|
|
63
|
-
"./package.json": "./package.json"
|
|
64
|
-
},
|
|
65
|
-
"files": [
|
|
66
|
-
"dist/**/*",
|
|
67
|
-
"README.md",
|
|
68
|
-
"docs/**/*"
|
|
69
|
-
],
|
|
70
|
-
"scripts": {
|
|
71
|
-
"test:lint": "tsc --noEmit",
|
|
72
|
-
"test:unit": "node --conditions=plurnk-dev --env-file-if-exists=../plurnk-execs/.env.defaults --test \"src/**/*.test.ts\"",
|
|
73
|
-
"test": "npm run test:lint && npm run test:unit",
|
|
74
|
-
"build:clean": "rm -rf dist",
|
|
75
|
-
"build:dist": "tsc -p tsconfig.build.json",
|
|
76
|
-
"build": "npm run build:clean && npm run build:dist",
|
|
77
|
-
"prepack": "npm run build",
|
|
78
|
-
"prepublishOnly": "npm audit --audit-level=moderate && npm test"
|
|
79
|
-
},
|
|
80
|
-
"peerDependencies": {
|
|
81
|
-
"@plurnk/plurnk-execs": "^1.19.3"
|
|
82
|
-
}
|
|
62
|
+
"./package.json": "./package.json"
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"dist/**/*",
|
|
66
|
+
"README.md",
|
|
67
|
+
"docs/**/*"
|
|
68
|
+
],
|
|
69
|
+
"scripts": {
|
|
70
|
+
"test:lint": "tsc --noEmit",
|
|
71
|
+
"test:unit": "node --conditions=plurnk-dev --env-file-if-exists=../plurnk-execs/.env.defaults --test \"src/**/*.test.ts\"",
|
|
72
|
+
"test": "npm run test:lint && npm run test:unit",
|
|
73
|
+
"build:clean": "rm -rf dist",
|
|
74
|
+
"build:dist": "tsc -p tsconfig.build.json",
|
|
75
|
+
"build": "npm run build:clean && npm run build:dist",
|
|
76
|
+
"prepack": "npm run build",
|
|
77
|
+
"prepublishOnly": "npm audit --audit-level=moderate && npm test"
|
|
78
|
+
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"@plurnk/plurnk-execs": "^1.21.0"
|
|
81
|
+
}
|
|
83
82
|
}
|