@gesslar/actioneer 0.4.0 → 1.0.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/package.json +17 -20
- package/src/lib/ActionHooks.js +2 -2
- package/src/lib/ActionRunner.js +2 -2
- package/src/lib/Piper.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gesslar/actioneer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Ready? Set?? ACTION!! pew! pew! pew!",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -19,16 +19,6 @@
|
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=22"
|
|
21
21
|
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"lint": "eslint src/",
|
|
24
|
-
"lint:fix": "eslint src/ --fix",
|
|
25
|
-
"types:build": "tsc -p tsconfig.types.json && eslint --fix \"src/types/**/*.d.ts\"",
|
|
26
|
-
"submit": "npm publish --access public --//registry.npmjs.org/:_authToken=\"${NPM_ACCESS_TOKEN}\"",
|
|
27
|
-
"update": "npx npm-check-updates -u && npm install",
|
|
28
|
-
"test": "node --test tests/unit/*.test.js",
|
|
29
|
-
"test:unit": "node --test tests/unit/*.test.js",
|
|
30
|
-
"pr": "gt submit --publish --restack --ai"
|
|
31
|
-
},
|
|
32
22
|
"repository": {
|
|
33
23
|
"type": "git",
|
|
34
24
|
"url": "git+https://github.com/gesslar/actioneer.git"
|
|
@@ -46,16 +36,23 @@
|
|
|
46
36
|
"author": "gesslar",
|
|
47
37
|
"license": "Unlicense",
|
|
48
38
|
"homepage": "https://github.com/gesslar/toolkit#readme",
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@gesslar/toolkit": "^2.8.0"
|
|
41
|
+
},
|
|
49
42
|
"devDependencies": {
|
|
50
|
-
"@stylistic/eslint-plugin": "^5.6.1",
|
|
51
|
-
"@types/node": "^25.0.3",
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
53
|
-
"@typescript-eslint/parser": "^8.50.1",
|
|
54
|
-
"eslint": "^9.39.2",
|
|
55
43
|
"eslint-plugin-jsdoc": "^61.5.0",
|
|
56
|
-
"typescript": "^5.9.3"
|
|
44
|
+
"typescript": "^5.9.3",
|
|
45
|
+
"@gesslar/uglier": "^0.0.8",
|
|
46
|
+
"eslint": "^9.39.2"
|
|
57
47
|
},
|
|
58
|
-
"
|
|
59
|
-
"
|
|
48
|
+
"scripts": {
|
|
49
|
+
"lint": "eslint src/",
|
|
50
|
+
"lint:fix": "eslint src/ --fix",
|
|
51
|
+
"types:build": "tsc -p tsconfig.types.json && eslint --fix \"src/types/**/*.d.ts\"",
|
|
52
|
+
"submit": "pnpm publish --access public --//registry.npmjs.org/:_authToken=\"${NPM_ACCESS_TOKEN}\"",
|
|
53
|
+
"update": "pnpm up -L",
|
|
54
|
+
"test": "node --test tests/unit/*.test.js",
|
|
55
|
+
"test:unit": "node --test tests/unit/*.test.js",
|
|
56
|
+
"pr": "gt submit --publish --restack --ai"
|
|
60
57
|
}
|
|
61
|
-
}
|
|
58
|
+
}
|
package/src/lib/ActionHooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {setTimeout as timeout} from "timers/promises"
|
|
2
|
-
import {Data, FileObject, Sass, Util, Valid} from "@gesslar/toolkit"
|
|
2
|
+
import {Data, FileObject, Sass, Promised, Util, Valid} from "@gesslar/toolkit"
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @typedef {(message: string, level?: number, ...args: Array<unknown>) => void} DebugFn
|
|
@@ -203,7 +203,7 @@ export default class ActionHooks {
|
|
|
203
203
|
|
|
204
204
|
try {
|
|
205
205
|
debug("Starting Promise race for hook: %o", 4, hookName)
|
|
206
|
-
await
|
|
206
|
+
await Promised.race([
|
|
207
207
|
hookFunction(),
|
|
208
208
|
expireAsync
|
|
209
209
|
])
|
package/src/lib/ActionRunner.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Data, Sass,
|
|
1
|
+
import {Promised, Data, Sass, Valid} from "@gesslar/toolkit"
|
|
2
2
|
|
|
3
3
|
import ActionBuilder from "./ActionBuilder.js"
|
|
4
4
|
import {ACTIVITY} from "./Activity.js"
|
|
@@ -143,7 +143,7 @@ export default class ActionRunner extends Piper {
|
|
|
143
143
|
settled = await runner.pipe(splitContexts)
|
|
144
144
|
} else {
|
|
145
145
|
// For plain functions, process each split context
|
|
146
|
-
settled = await
|
|
146
|
+
settled = await Promised.settle(
|
|
147
147
|
splitContexts.map(ctx => this.#execute(activity, ctx))
|
|
148
148
|
)
|
|
149
149
|
}
|
package/src/lib/Piper.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - Error handling and reporting
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import {Sass, Tantrum
|
|
12
|
+
import {Promised, Sass, Tantrum} from "@gesslar/toolkit"
|
|
13
13
|
|
|
14
14
|
export default class Piper {
|
|
15
15
|
#debug
|
|
@@ -108,7 +108,7 @@ export default class Piper {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
const setupResult = await
|
|
111
|
+
const setupResult = await Promised.settle(
|
|
112
112
|
[...this.#lifeCycle.get("setup")].map(e => e())
|
|
113
113
|
)
|
|
114
114
|
|
|
@@ -126,7 +126,7 @@ export default class Piper {
|
|
|
126
126
|
await Promise.all(workers)
|
|
127
127
|
} finally {
|
|
128
128
|
// Run cleanup hooks
|
|
129
|
-
const teardownResult = await
|
|
129
|
+
const teardownResult = await Promised.settle(
|
|
130
130
|
[...this.#lifeCycle.get("teardown")].map(e => e())
|
|
131
131
|
)
|
|
132
132
|
|