@beseif-solutions/prow-core 0.3.7 → 0.3.8

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.
@@ -74,6 +74,17 @@ export type ImmediateTrigger<Config extends SetupEventConfig> = CommonEvents<Con
74
74
  setup?: Config[`setup`];
75
75
  };
76
76
  }>;
77
+ check?: CoreFunction<{
78
+ credentials: Config[`credentials`];
79
+ inputs: {
80
+ fields: Config[`fields`];
81
+ link: string;
82
+ setup?: Config[`setup`];
83
+ };
84
+ outputs: {
85
+ done: boolean;
86
+ };
87
+ }>;
77
88
  unmount?: CoreFunction<{
78
89
  credentials: Config[`credentials`];
79
90
  inputs: {
@@ -184,28 +195,6 @@ export type AsyncAction<Config extends SetupEventConfig & MemoryEventConfig> = C
184
195
  outputs: [DefaultConnectableEvent<Config[`flags`][`outputs`][number]>, ...(AdditionalConnectableEvent<Config[`flags`][`outputs`][number]> | ErrorConnectableEvent<Config[`flags`][`outputs`][number]>)[]];
185
196
  async: true;
186
197
  functions: {
187
- mount?: CoreFunction<{
188
- credentials: Config[`credentials`];
189
- inputs: {
190
- fields: Config[`fields`];
191
- link: string;
192
- };
193
- outputs: {
194
- done: boolean;
195
- setup?: Config[`setup`];
196
- };
197
- }>;
198
- unmount?: CoreFunction<{
199
- credentials: Config[`credentials`];
200
- inputs: {
201
- fields: Config[`fields`];
202
- link: string;
203
- setup?: Config[`setup`];
204
- };
205
- outputs: {
206
- done: boolean;
207
- };
208
- }>;
209
198
  execute: CoreFunction<{
210
199
  credentials: Config[`credentials`];
211
200
  inputs: {
@@ -67,6 +67,7 @@ const immediateTriggerSchema = () => joi_1.default.object({
67
67
  .required(),
68
68
  functions: joi_1.default.object({
69
69
  mount: joi_1.default.function(),
70
+ check: joi_1.default.function(),
70
71
  unmount: joi_1.default.function(),
71
72
  challenge: joi_1.default.function(),
72
73
  handle: joi_1.default.function().required(),
@@ -108,8 +109,6 @@ const asyncActionSchema = () => joi_1.default.object({
108
109
  .min(1)
109
110
  .required(),
110
111
  functions: joi_1.default.object({
111
- mount: joi_1.default.function(),
112
- unmount: joi_1.default.function(),
113
112
  execute: joi_1.default.function().required(),
114
113
  handle: joi_1.default.function().required(),
115
114
  fire: joi_1.default.function(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beseif-solutions/prow-core",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Prow core functionalities and classes",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -80,6 +80,11 @@ export type ImmediateTrigger<Config extends SetupEventConfig> = CommonEvents<Con
80
80
  inputs: { fields: Config[`fields`], link: string },
81
81
  outputs: { done: boolean, setup?: Config[`setup`] },
82
82
  }>,
83
+ check?: CoreFunction<{
84
+ credentials: Config[`credentials`],
85
+ inputs: { fields: Config[`fields`], link: string, setup?: Config[`setup`] },
86
+ outputs: { done: boolean },
87
+ }>,
83
88
  unmount?: CoreFunction<{
84
89
  credentials: Config[`credentials`],
85
90
  inputs: { fields: Config[`fields`], link: string, setup?: Config[`setup`] },
@@ -151,16 +156,16 @@ export type AsyncAction<Config extends SetupEventConfig & MemoryEventConfig> = C
151
156
  outputs: [DefaultConnectableEvent<Config[`flags`][`outputs`][number]>, ...(AdditionalConnectableEvent<Config[`flags`][`outputs`][number]> | ErrorConnectableEvent<Config[`flags`][`outputs`][number]>)[]],
152
157
  async: true,
153
158
  functions: {
154
- mount?: CoreFunction<{
155
- credentials: Config[`credentials`],
156
- inputs: { fields: Config[`fields`], link: string },
157
- outputs: { done: boolean, setup?: Config[`setup`] },
158
- }>,
159
- unmount?: CoreFunction<{
160
- credentials: Config[`credentials`],
161
- inputs: { fields: Config[`fields`], link: string, setup?: Config[`setup`] },
162
- outputs: { done: boolean },
163
- }>,
159
+ // mount?: CoreFunction<{
160
+ // credentials: Config[`credentials`],
161
+ // inputs: { fields: Config[`fields`], link: string },
162
+ // outputs: { done: boolean, setup?: Config[`setup`] },
163
+ // }>,
164
+ // unmount?: CoreFunction<{
165
+ // credentials: Config[`credentials`],
166
+ // inputs: { fields: Config[`fields`], link: string, setup?: Config[`setup`] },
167
+ // outputs: { done: boolean },
168
+ // }>,
164
169
  execute: CoreFunction<{
165
170
  credentials: Config[`credentials`],
166
171
  inputs: { fields: Config[`fields`], flags: Partial<Record<Config[`flags`][`inputs`][number], true>>, link: string, setup?: Config[`setup`], memory?: Config[`memory`] },
@@ -260,6 +265,7 @@ export const immediateTriggerSchema = () =>
260
265
  .required(),
261
266
  functions: Joi.object({
262
267
  mount: Joi.function(),
268
+ check: Joi.function(),
263
269
  unmount: Joi.function(),
264
270
  challenge: Joi.function(),
265
271
  handle: Joi.function().required(),
@@ -318,8 +324,8 @@ export const asyncActionSchema = () =>
318
324
  .min(1)
319
325
  .required(),
320
326
  functions: Joi.object({
321
- mount: Joi.function(),
322
- unmount: Joi.function(),
327
+ // mount: Joi.function(),
328
+ // unmount: Joi.function(),
323
329
  execute: Joi.function().required(),
324
330
  handle: Joi.function().required(),
325
331
  fire: Joi.function(),