@beseif-solutions/prow-core 1.2.4 → 1.4.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.
|
@@ -112,6 +112,18 @@ export type ImmediateTrigger<Config extends SetupEventConfig> = CommonEvents<Con
|
|
|
112
112
|
response?: any;
|
|
113
113
|
};
|
|
114
114
|
}>;
|
|
115
|
+
debounce?: CoreFunction<{
|
|
116
|
+
credentials: Config[`credentials`];
|
|
117
|
+
inputs: {
|
|
118
|
+
fields: Config[`fields`];
|
|
119
|
+
request: Request;
|
|
120
|
+
setup?: Config[`setup`];
|
|
121
|
+
};
|
|
122
|
+
outputs: {
|
|
123
|
+
done: boolean;
|
|
124
|
+
response?: any;
|
|
125
|
+
};
|
|
126
|
+
}>;
|
|
115
127
|
handle: CoreFunction<{
|
|
116
128
|
credentials: Config[`credentials`];
|
|
117
129
|
inputs: {
|
package/dist/entities/events.js
CHANGED
|
@@ -70,6 +70,7 @@ const immediateTriggerSchema = () => joi_1.default.object({
|
|
|
70
70
|
check: joi_1.default.function(),
|
|
71
71
|
unmount: joi_1.default.function(),
|
|
72
72
|
challenge: joi_1.default.function(),
|
|
73
|
+
debounce: joi_1.default.function(),
|
|
73
74
|
handle: joi_1.default.function().required(),
|
|
74
75
|
poll: joi_1.default.function(),
|
|
75
76
|
fire: joi_1.default.function(),
|
|
@@ -89,7 +89,7 @@ class Context {
|
|
|
89
89
|
if (serialized) {
|
|
90
90
|
resolved = resolved.replace(`"${expression}"`, (lodash_1.default.isObject(get) || lodash_1.default.isString(get)) ? JSON.stringify(get) : get);
|
|
91
91
|
}
|
|
92
|
-
resolved = resolved.replace(expression, lodash_1.default.toString(get));
|
|
92
|
+
resolved = resolved.replace(expression, lodash_1.default.isObject(get) ? JSON.stringify(get) : lodash_1.default.toString(get));
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
95
|
resolved = resolved.replace(expression, ``);
|
package/package.json
CHANGED
package/src/entities/events.ts
CHANGED
|
@@ -101,6 +101,11 @@ export type ImmediateTrigger<Config extends SetupEventConfig> = CommonEvents<Con
|
|
|
101
101
|
inputs: { fields: Config[`fields`], link: string, request: Request, setup?: Config[`setup`] },
|
|
102
102
|
outputs: { done: boolean, response?: any },
|
|
103
103
|
}>,
|
|
104
|
+
debounce?: CoreFunction<{
|
|
105
|
+
credentials: Config[`credentials`],
|
|
106
|
+
inputs: { fields: Config[`fields`], request: Request, setup?: Config[`setup`] },
|
|
107
|
+
outputs: { done: boolean, response?: any },
|
|
108
|
+
}>,
|
|
104
109
|
handle: CoreFunction<{
|
|
105
110
|
credentials: Config[`credentials`],
|
|
106
111
|
inputs: { fields: Config[`fields`], request: Request, setup?: Config[`setup`] } & SourcePreferences<Config>,
|
|
@@ -267,6 +272,7 @@ export const immediateTriggerSchema = () =>
|
|
|
267
272
|
check: Joi.function(),
|
|
268
273
|
unmount: Joi.function(),
|
|
269
274
|
challenge: Joi.function(),
|
|
275
|
+
debounce: Joi.function(),
|
|
270
276
|
handle: Joi.function().required(),
|
|
271
277
|
poll: Joi.function(),
|
|
272
278
|
fire: Joi.function(),
|
|
@@ -102,7 +102,7 @@ class Context {
|
|
|
102
102
|
if (_.has(clonedData, path)) {
|
|
103
103
|
const get = _.get(clonedData, path);
|
|
104
104
|
if (serialized) { resolved = resolved.replace(`"${expression}"`, (_.isObject(get) || _.isString(get)) ? JSON.stringify(get) : get); }
|
|
105
|
-
resolved = resolved.replace(expression, _.toString(get));
|
|
105
|
+
resolved = resolved.replace(expression, _.isObject(get) ? JSON.stringify(get) : _.toString(get));
|
|
106
106
|
} else { resolved = resolved.replace(expression, ``); }
|
|
107
107
|
}
|
|
108
108
|
}
|