@plurnk/plurnk-execs-common 1.14.2 โ 1.15.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 +5 -5
- package/docs/node.md +6 -5
- package/docs/sh.md +12 -10
- package/package.json +24 -35
package/README.md
CHANGED
|
@@ -25,16 +25,16 @@ detects every other interpreter, so one executor adapts to the host.
|
|
|
25
25
|
| `bc` ๐งฎ | bc | stdin (for example, `6 * 7`) |
|
|
26
26
|
| `awk` ๐ช | awk | program arg, empty stdin (`BEGIN { โฆ }`) |
|
|
27
27
|
|
|
28
|
-
### A script
|
|
28
|
+
### A script โ the `(target)` slot
|
|
29
29
|
|
|
30
30
|
The table above is the **inline** form: the body is the program. A file in the
|
|
31
31
|
`(target)` slot is instead the script each interpreter reads directly, and the
|
|
32
|
-
body becomes that script's stdin. A directory
|
|
33
|
-
directory
|
|
32
|
+
body becomes that script's stdin. A `{cwd=<directory>}` block on the heading
|
|
33
|
+
selects the working directory; the body remains the program
|
|
34
34
|
({ยงexecutor-subprocess-routing}).
|
|
35
35
|
|
|
36
|
-
```
|
|
37
|
-
## EXEC0
|
|
36
|
+
```example
|
|
37
|
+
## EXEC0 (./deploy.sh)
|
|
38
38
|
yes
|
|
39
39
|
yes
|
|
40
40
|
no
|
package/docs/node.md
CHANGED
|
@@ -17,8 +17,9 @@ on stderr.
|
|
|
17
17
|
## Working directory
|
|
18
18
|
|
|
19
19
|
Runs in the workspace project root by default, or the daemon's own cwd in a
|
|
20
|
-
workspace without one
|
|
21
|
-
|
|
22
|
-
JavaScript file and receives the body as
|
|
23
|
-
anything runs. Relative module and
|
|
24
|
-
working directory. The receipt always
|
|
20
|
+
workspace without one; a `{cwd=<directory>}` block on the heading selects
|
|
21
|
+
another. The target is a script, never a command or a directory:
|
|
22
|
+
`## EXEC0 [node] (tool.js)` runs that JavaScript file and receives the body as
|
|
23
|
+
stdin; anything else is refused before anything runs. Relative module and
|
|
24
|
+
filesystem paths resolve against the working directory. The receipt always
|
|
25
|
+
names it.
|
package/docs/sh.md
CHANGED
|
@@ -11,12 +11,12 @@ read plurnk's credentials. The project's environment passes through.
|
|
|
11
11
|
|
|
12
12
|
## Working directory
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
The working directory is the workspace project root โ where file operations
|
|
15
|
+
write โ or, in a workspace without one, the directory the shell would run in
|
|
16
|
+
anyway. A `{cwd=<directory>}` block on the heading overrides it for its body:
|
|
17
17
|
|
|
18
|
-
```
|
|
19
|
-
## EXEC0
|
|
18
|
+
```example
|
|
19
|
+
## EXEC0 {cwd=./dir}
|
|
20
20
|
pwd
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -27,8 +27,8 @@ stdin; a nonempty body becomes its stdin. The interpreter reads the script
|
|
|
27
27
|
directly, so it needs no executable bit; a script path authored inside a shell
|
|
28
28
|
body still follows the kernel's ordinary executable-bit rules.
|
|
29
29
|
|
|
30
|
-
The target is a
|
|
31
|
-
|
|
30
|
+
The target is a program โ a script โ never a command and never a directory. A
|
|
31
|
+
target that is not a script is refused before anything runs.
|
|
32
32
|
|
|
33
33
|
## Channels
|
|
34
34
|
|
|
@@ -44,7 +44,7 @@ because either may carry the useful diagnostic.
|
|
|
44
44
|
|
|
45
45
|
For a long-running command, the `<L>` slot carries `<TIMEOUT_SECONDS, POLL_SECONDS>` (both seconds):
|
|
46
46
|
|
|
47
|
-
```
|
|
47
|
+
```example
|
|
48
48
|
## EXEC0 <1800>
|
|
49
49
|
npm run build
|
|
50
50
|
|
|
@@ -59,8 +59,10 @@ tail -f app.log
|
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
The first coordinate is the timeout: a positive value kills at that deadline;
|
|
62
|
-
`-1` declines the
|
|
63
|
-
|
|
62
|
+
`-1` declines the deadline and the process outlives the loop โ it runs until it
|
|
63
|
+
exits or you KILL it, so a server you must leave running takes `<-1>`; `0` keeps
|
|
64
|
+
the process only through the current turn. Anything without `-1` is reaped when
|
|
65
|
+
the loop ends. The optional
|
|
64
66
|
positive second coordinate fixes the poll cadence while a loop is parked on
|
|
65
67
|
the stream. With no explicit poll, the consumer uses exponential backoff so a
|
|
66
68
|
parked loop can inspect partial output and decide whether to wait or KILL. A
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-execs-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Universal subprocess executor for plurnk-service's exec scheme โ one package exposing the shell, Node.js, Python 3, and supported host interpreters.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -44,10 +44,9 @@
|
|
|
44
44
|
"required": false
|
|
45
45
|
},
|
|
46
46
|
"target": {
|
|
47
|
-
"role": "
|
|
47
|
+
"role": "script; never a command or a directory",
|
|
48
48
|
"required": false,
|
|
49
|
-
"kind": "
|
|
50
|
-
"directory": "cwd"
|
|
49
|
+
"kind": "script"
|
|
51
50
|
},
|
|
52
51
|
"example": {
|
|
53
52
|
"body": "git status --short"
|
|
@@ -64,10 +63,9 @@
|
|
|
64
63
|
"required": false
|
|
65
64
|
},
|
|
66
65
|
"target": {
|
|
67
|
-
"role": "
|
|
66
|
+
"role": "script; never a command or a directory",
|
|
68
67
|
"required": false,
|
|
69
|
-
"kind": "
|
|
70
|
-
"directory": "cwd"
|
|
68
|
+
"kind": "script"
|
|
71
69
|
},
|
|
72
70
|
"signature": "JavaScript code"
|
|
73
71
|
}
|
|
@@ -82,10 +80,9 @@
|
|
|
82
80
|
"required": false
|
|
83
81
|
},
|
|
84
82
|
"target": {
|
|
85
|
-
"role": "
|
|
83
|
+
"role": "script; never a command or a directory",
|
|
86
84
|
"required": false,
|
|
87
|
-
"kind": "
|
|
88
|
-
"directory": "cwd"
|
|
85
|
+
"kind": "script"
|
|
89
86
|
},
|
|
90
87
|
"signature": "Python code"
|
|
91
88
|
}
|
|
@@ -100,10 +97,9 @@
|
|
|
100
97
|
"required": false
|
|
101
98
|
},
|
|
102
99
|
"target": {
|
|
103
|
-
"role": "
|
|
100
|
+
"role": "script; never a command or a directory",
|
|
104
101
|
"required": false,
|
|
105
|
-
"kind": "
|
|
106
|
-
"directory": "cwd"
|
|
102
|
+
"kind": "script"
|
|
107
103
|
},
|
|
108
104
|
"signature": "Perl code"
|
|
109
105
|
}
|
|
@@ -118,10 +114,9 @@
|
|
|
118
114
|
"required": false
|
|
119
115
|
},
|
|
120
116
|
"target": {
|
|
121
|
-
"role": "
|
|
117
|
+
"role": "script; never a command or a directory",
|
|
122
118
|
"required": false,
|
|
123
|
-
"kind": "
|
|
124
|
-
"directory": "cwd"
|
|
119
|
+
"kind": "script"
|
|
125
120
|
},
|
|
126
121
|
"signature": "Ruby code"
|
|
127
122
|
}
|
|
@@ -136,10 +131,9 @@
|
|
|
136
131
|
"required": false
|
|
137
132
|
},
|
|
138
133
|
"target": {
|
|
139
|
-
"role": "
|
|
134
|
+
"role": "script; never a command or a directory",
|
|
140
135
|
"required": false,
|
|
141
|
-
"kind": "
|
|
142
|
-
"directory": "cwd"
|
|
136
|
+
"kind": "script"
|
|
143
137
|
},
|
|
144
138
|
"signature": "Lua code"
|
|
145
139
|
}
|
|
@@ -154,10 +148,9 @@
|
|
|
154
148
|
"required": false
|
|
155
149
|
},
|
|
156
150
|
"target": {
|
|
157
|
-
"role": "
|
|
151
|
+
"role": "script; never a command or a directory",
|
|
158
152
|
"required": false,
|
|
159
|
-
"kind": "
|
|
160
|
-
"directory": "cwd"
|
|
153
|
+
"kind": "script"
|
|
161
154
|
},
|
|
162
155
|
"signature": "TypeScript or JavaScript code"
|
|
163
156
|
}
|
|
@@ -172,10 +165,9 @@
|
|
|
172
165
|
"required": false
|
|
173
166
|
},
|
|
174
167
|
"target": {
|
|
175
|
-
"role": "
|
|
168
|
+
"role": "script; never a command or a directory",
|
|
176
169
|
"required": false,
|
|
177
|
-
"kind": "
|
|
178
|
-
"directory": "cwd"
|
|
170
|
+
"kind": "script"
|
|
179
171
|
},
|
|
180
172
|
"signature": "TypeScript or JavaScript code"
|
|
181
173
|
}
|
|
@@ -190,10 +182,9 @@
|
|
|
190
182
|
"required": false
|
|
191
183
|
},
|
|
192
184
|
"target": {
|
|
193
|
-
"role": "
|
|
185
|
+
"role": "script; never a command or a directory",
|
|
194
186
|
"required": false,
|
|
195
|
-
"kind": "
|
|
196
|
-
"directory": "cwd"
|
|
187
|
+
"kind": "script"
|
|
197
188
|
},
|
|
198
189
|
"signature": "Tcl code"
|
|
199
190
|
}
|
|
@@ -208,10 +199,9 @@
|
|
|
208
199
|
"required": false
|
|
209
200
|
},
|
|
210
201
|
"target": {
|
|
211
|
-
"role": "
|
|
202
|
+
"role": "script; never a command or a directory",
|
|
212
203
|
"required": false,
|
|
213
|
-
"kind": "
|
|
214
|
-
"directory": "cwd"
|
|
204
|
+
"kind": "script"
|
|
215
205
|
},
|
|
216
206
|
"signature": "bc expression or code"
|
|
217
207
|
}
|
|
@@ -226,10 +216,9 @@
|
|
|
226
216
|
"required": false
|
|
227
217
|
},
|
|
228
218
|
"target": {
|
|
229
|
-
"role": "
|
|
219
|
+
"role": "script; never a command or a directory",
|
|
230
220
|
"required": false,
|
|
231
|
-
"kind": "
|
|
232
|
-
"directory": "cwd"
|
|
221
|
+
"kind": "script"
|
|
233
222
|
},
|
|
234
223
|
"signature": "AWK code"
|
|
235
224
|
}
|
|
@@ -261,6 +250,6 @@
|
|
|
261
250
|
"prepublishOnly": "npm audit --audit-level=moderate && npm test"
|
|
262
251
|
},
|
|
263
252
|
"peerDependencies": {
|
|
264
|
-
"@plurnk/plurnk-execs": "^1.
|
|
253
|
+
"@plurnk/plurnk-execs": "^1.15.0"
|
|
265
254
|
}
|
|
266
255
|
}
|