@gesslar/actioneer 0.1.1 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gesslar/actioneer",
3
- "version": "0.1.1",
4
- "description": "Ready? Set?? ACTION!! pew!pew!pew!pew!",
3
+ "version": "0.1.3",
4
+ "description": "Ready? Set?? ACTION!! pew! pew! pew!",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
7
7
  "exports": {
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "sideEffects": false,
19
19
  "engines": {
20
- "node": ">=20"
20
+ "node": ">=22"
21
21
  },
22
22
  "scripts": {
23
23
  "lint": "eslint src/",
@@ -47,15 +47,15 @@
47
47
  "license": "Unlicense",
48
48
  "homepage": "https://github.com/gesslar/toolkit#readme",
49
49
  "devDependencies": {
50
- "@stylistic/eslint-plugin": "^5.4.0",
51
- "@types/node": "^24.6.2",
52
- "@typescript-eslint/eslint-plugin": "^8.45.0",
53
- "@typescript-eslint/parser": "^8.45.0",
54
- "eslint": "^9.36.0",
55
- "eslint-plugin-jsdoc": "^60.7.1",
50
+ "@stylistic/eslint-plugin": "^5.5.0",
51
+ "@types/node": "^24.9.1",
52
+ "@typescript-eslint/eslint-plugin": "^8.46.2",
53
+ "@typescript-eslint/parser": "^8.46.2",
54
+ "eslint": "^9.38.0",
55
+ "eslint-plugin-jsdoc": "^61.1.8",
56
56
  "typescript": "^5.9.3"
57
57
  },
58
58
  "dependencies": {
59
- "@gesslar/toolkit": "^0.6.0"
59
+ "@gesslar/toolkit": "^0.7.0"
60
60
  }
61
61
  }
@@ -93,20 +93,14 @@ export default class ActionRunner extends Piper {
93
93
  * Executes the configured action pipeline.
94
94
  *
95
95
  * @param {unknown} context - Seed value passed to the first activity.
96
- * @param {boolean} asIs - When true, do not wrap context in {value} (internal nested runners)
97
96
  * @returns {Promise<unknown>} Final value produced by the pipeline, or null when a parallel stage reports failures.
98
97
  * @throws {Sass} When no activities are registered or required parallel builders are missing.
99
98
  */
100
- async run(context, asIs=false) {
99
+ async run(context) {
101
100
  this.#debug(this.#tag.description)
102
101
  const actionWrapper = this.#actionWrapper
103
102
  const activities = actionWrapper.activities
104
103
 
105
- if(!asIs)
106
- context = {value: context}
107
-
108
- context
109
-
110
104
  for(const activity of activities) {
111
105
  activity.setActionHooks(this.#hooks)
112
106
 
@@ -137,7 +131,6 @@ export default class ActionRunner extends Piper {
137
131
  break
138
132
 
139
133
  context = await this.#executeActivity(activity,context)
140
- context
141
134
 
142
135
  if(kindUntil)
143
136
  if(!await this.#predicateCheck(activity,pred,context))
@@ -145,7 +138,6 @@ export default class ActionRunner extends Piper {
145
138
  }
146
139
  } else {
147
140
  context = await this.#executeActivity(activity, context)
148
- context
149
141
  }
150
142
  }
151
143
 
@@ -175,7 +167,7 @@ export default class ActionRunner extends Piper {
175
167
 
176
168
  return await runner.run(context, true)
177
169
  } else if(opKind === "Function") {
178
- return (await activity.run(context)).activityResult
170
+ return await activity.run(context)
179
171
  }
180
172
 
181
173
  throw Sass.new("We buy Functions and ActionWrappers. Only. Not whatever that was.")
@@ -108,7 +108,7 @@ export default class Activity {
108
108
  if(Data.typeOf(after) === "Function")
109
109
  await after.call(hooks,context)
110
110
 
111
- return {activityResult: result}
111
+ return result
112
112
  }
113
113
 
114
114
  /**
package/src/lib/Piper.js CHANGED
@@ -106,9 +106,8 @@ export default class Piper {
106
106
  }
107
107
 
108
108
  const setupResult = await Util.settleAll(
109
- [...this.#lifeCycle.get("setup")
110
-
111
- ].map(e => e()))
109
+ [...this.#lifeCycle.get("setup")].map(e => e())
110
+ )
112
111
  this.#processResult("Setting up the pipeline.", setupResult)
113
112
 
114
113
  // Start workers up to maxConcurrent limit
@@ -124,9 +123,8 @@ export default class Piper {
124
123
 
125
124
  // Run cleanup hooks
126
125
  const teardownResult = await Util.settleAll(
127
- [...this.#lifeCycle.get("teardown")
128
-
129
- ].map(e => e()))
126
+ [...this.#lifeCycle.get("teardown")].map(e => e())
127
+ )
130
128
  this.#processResult("Tearing down the pipeline.", teardownResult)
131
129
 
132
130
  return allResults
@@ -26,11 +26,10 @@ export default class ActionRunner extends Piper {
26
26
  * Executes the configured action pipeline.
27
27
  *
28
28
  * @param {unknown} context - Seed value passed to the first activity.
29
- * @param {boolean} asIs - When true, do not wrap context in {value} (internal nested runners)
30
29
  * @returns {Promise<unknown>} Final value produced by the pipeline, or null when a parallel stage reports failures.
31
30
  * @throws {Sass} When no activities are registered or required parallel builders are missing.
32
31
  */
33
- run(context: unknown, asIs?: boolean): Promise<unknown>
32
+ run(context: unknown): Promise<unknown>
34
33
  /**
35
34
  * Configure hooks to be lazily loaded when the pipeline runs.
36
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ActionRunner.d.ts","sourceRoot":"","sources":["../../lib/ActionRunner.js"],"names":[],"mappings":"AAMA,gEAAgE;AAEhE;;GAEG;AAEH;;;;GAIG;AACH;;;;;;GAMG;AACH;IAsCE;;;;;OAKG;IACH,2BAHW,OAAO,oBAAoB,EAAE,OAAO,GAAC,IAAI,qBACzC,mBAAmB,EAuB7B;IAED;;;;;;;OAOG;IACH,aALW,OAAO,SACP,OAAO,GACL,OAAO,CAAC,OAAO,CAAC,CA0D5B;IAgDD;;;;;;OAMG;IACH,oBAJW,MAAM,aACN,MAAM,GACJ,IAAI,CAShB;;CA2BF;0BA7Oa,OAAO,kBAAkB,EAAE,OAAO;sBAGnC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI;;;;;;;;;;;kBAL7D,YAAY"}
1
+ {"version":3,"file":"ActionRunner.d.ts","sourceRoot":"","sources":["../../lib/ActionRunner.js"],"names":[],"mappings":"AAMA,gEAAgE;AAEhE;;GAEG;AAEH;;;;GAIG;AACH;;;;;;GAMG;AACH;IAsCE;;;;;OAKG;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