@plurnk/plurnk-execs-common 1.14.2 โ†’ 1.16.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 CHANGED
@@ -25,21 +25,21 @@ 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 or working directory โ€” the `(target)` slot
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 target becomes the working
33
- directory and the body remains the inline program
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
- ```plurnk
37
- ## EXEC0 [sh] (./deploy.sh)
36
+ ```example
37
+ ### EXEC0 (./deploy.sh)
38
38
  yes
39
39
  yes
40
40
  no
41
41
 
42
- ## EXEC0 [python3] (transform.py)
42
+ ### EXEC0 [python3] (transform.py)
43
43
  3
44
44
  1
45
45
  4
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. The target is a cwd or a script, never a command: a
21
- directory target sets the working directory; a script target runs that
22
- JavaScript file and receives the body as stdin; anything else is refused before
23
- anything runs. Relative module and filesystem paths resolve against the selected
24
- working directory. The receipt always names it.
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,24 +11,24 @@ read plurnk's credentials. The project's environment passes through.
11
11
 
12
12
  ## Working directory
13
13
 
14
- With no target, the working directory is the workspace project root โ€” where
15
- file operations write โ€” or, in a workspace without one, the directory the
16
- shell would run in anyway. Any directory target overrides it for its body:
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
- ```plurnk
19
- ## EXEC0 (./dir)
18
+ ```example
19
+ ### EXEC0 {cwd=./dir}
20
20
  pwd
21
21
  ```
22
22
 
23
23
  The receipt always names the directory the command ran in.
24
24
 
25
- A script target runs that script: `## EXEC0 (greet.sh)` runs it with an empty
25
+ A script target runs that script: `### EXEC0 (greet.sh)` runs it with an empty
26
26
  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 cwd or a script โ€” never a command. A target that is neither is
31
- refused before anything runs, and the refusal names the directory it searched.
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,23 +44,25 @@ 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
- ```plurnk
48
- ## EXEC0 <1800>
47
+ ```example
48
+ ### EXEC0 <1800>
49
49
  npm run build
50
50
 
51
- ## EXEC0 <1800,300>
51
+ ### EXEC0 <1800,300>
52
52
  npm run e2e
53
53
 
54
- ## EXEC0 <-1,300>
54
+ ### EXEC0 <-1,300>
55
55
  npm run test
56
56
 
57
- ## EXEC0 <-1,0>
57
+ ### EXEC0 <-1,0>
58
58
  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 per-operation deadline; `0` keeps the process only through
63
- the current turn. Loop teardown still reaps surviving work. The optional
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.14.2",
3
+ "version": "1.16.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": "cwd or script; never a command",
47
+ "role": "script; never a command or a directory",
48
48
  "required": false,
49
- "kind": "resource",
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": "cwd or script; never a command",
66
+ "role": "script; never a command or a directory",
68
67
  "required": false,
69
- "kind": "resource",
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": "cwd or script; never a command",
83
+ "role": "script; never a command or a directory",
86
84
  "required": false,
87
- "kind": "resource",
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": "cwd or script; never a command",
100
+ "role": "script; never a command or a directory",
104
101
  "required": false,
105
- "kind": "resource",
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": "cwd or script; never a command",
117
+ "role": "script; never a command or a directory",
122
118
  "required": false,
123
- "kind": "resource",
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": "cwd or script; never a command",
134
+ "role": "script; never a command or a directory",
140
135
  "required": false,
141
- "kind": "resource",
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": "cwd or script; never a command",
151
+ "role": "script; never a command or a directory",
158
152
  "required": false,
159
- "kind": "resource",
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": "cwd or script; never a command",
168
+ "role": "script; never a command or a directory",
176
169
  "required": false,
177
- "kind": "resource",
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": "cwd or script; never a command",
185
+ "role": "script; never a command or a directory",
194
186
  "required": false,
195
- "kind": "resource",
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": "cwd or script; never a command",
202
+ "role": "script; never a command or a directory",
212
203
  "required": false,
213
- "kind": "resource",
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": "cwd or script; never a command",
219
+ "role": "script; never a command or a directory",
230
220
  "required": false,
231
- "kind": "resource",
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.14.2"
253
+ "@plurnk/plurnk-execs": "^1.16.0"
265
254
  }
266
255
  }