rura 1.1.2 → 1.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/dist/index.cjs +4 -4
- package/dist/index.d.ts +6 -2
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -122,20 +122,20 @@ async function runAsync(ctx, hooks) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// src/pipeline/create/create-pipeline.ts
|
|
125
|
-
function createPipeline(hooks = []) {
|
|
125
|
+
function createPipeline(hooks = [], options) {
|
|
126
126
|
return createPipelineBase(
|
|
127
127
|
hooks,
|
|
128
128
|
run,
|
|
129
|
-
{ mode: "sync" }
|
|
129
|
+
{ mode: "sync", ...options }
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
// src/pipeline/create/create-pipeline-async.ts
|
|
134
|
-
function createPipelineAsync(hooks = []) {
|
|
134
|
+
function createPipelineAsync(hooks = [], options) {
|
|
135
135
|
return createPipelineBase(
|
|
136
136
|
hooks,
|
|
137
137
|
runAsync,
|
|
138
|
-
{ mode: "async" }
|
|
138
|
+
{ mode: "async", ...options }
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
141
|
|
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,9 @@ export declare function createHookAsync<Ctx = unknown, Out = unknown>(name: stri
|
|
|
35
35
|
*
|
|
36
36
|
* @public
|
|
37
37
|
*/
|
|
38
|
-
export declare function createPipeline<Ctx = unknown, Out = unknown>(hooks?: RuraHookSync<Ctx, Out>[]
|
|
38
|
+
export declare function createPipeline<Ctx = unknown, Out = unknown>(hooks?: RuraHookSync<Ctx, Out>[], options?: {
|
|
39
|
+
name?: string;
|
|
40
|
+
}): {
|
|
39
41
|
use: (hook: RuraHookSync<Ctx, Out>) => /*elided*/ any;
|
|
40
42
|
getHooks: () => RuraHookSync<Ctx, Out>[];
|
|
41
43
|
logHooks: () => void;
|
|
@@ -54,7 +56,9 @@ export declare function createPipeline<Ctx = unknown, Out = unknown>(hooks?: Rur
|
|
|
54
56
|
*
|
|
55
57
|
* @public
|
|
56
58
|
*/
|
|
57
|
-
export declare function createPipelineAsync<Ctx = unknown, Out = unknown>(hooks?: RuraHook<Ctx, Out>[]
|
|
59
|
+
export declare function createPipelineAsync<Ctx = unknown, Out = unknown>(hooks?: RuraHook<Ctx, Out>[], options?: {
|
|
60
|
+
name?: string;
|
|
61
|
+
}): {
|
|
58
62
|
use: (hook: RuraHook<Ctx, Out>) => /*elided*/ any;
|
|
59
63
|
getHooks: () => RuraHook<Ctx, Out>[];
|
|
60
64
|
logHooks: () => void;
|
package/dist/index.js
CHANGED
|
@@ -120,20 +120,20 @@ async function runAsync(ctx, hooks) {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// src/pipeline/create/create-pipeline.ts
|
|
123
|
-
function createPipeline(hooks = []) {
|
|
123
|
+
function createPipeline(hooks = [], options) {
|
|
124
124
|
return createPipelineBase(
|
|
125
125
|
hooks,
|
|
126
126
|
run,
|
|
127
|
-
{ mode: "sync" }
|
|
127
|
+
{ mode: "sync", ...options }
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
// src/pipeline/create/create-pipeline-async.ts
|
|
132
|
-
function createPipelineAsync(hooks = []) {
|
|
132
|
+
function createPipelineAsync(hooks = [], options) {
|
|
133
133
|
return createPipelineBase(
|
|
134
134
|
hooks,
|
|
135
135
|
runAsync,
|
|
136
|
-
{ mode: "async" }
|
|
136
|
+
{ mode: "async", ...options }
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
139
|
|