@beseif-solutions/prow-core 0.3.4 → 0.3.6

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.
@@ -125,7 +125,7 @@ export type ImmediateTrigger<Config extends SetupEventConfig> = CommonEvents<Con
125
125
  credentials: Config[`credentials`];
126
126
  inputs: {
127
127
  fields: Config[`fields`];
128
- last_schedule?: string;
128
+ last_schedule: string;
129
129
  limit?: number;
130
130
  };
131
131
  outputs: {
@@ -144,7 +144,7 @@ export type ScheduledTrigger<Config extends EventConfig> = CommonEvents<Config>
144
144
  credentials: Config[`credentials`];
145
145
  inputs: {
146
146
  fields: Config[`fields`];
147
- last_schedule?: string;
147
+ last_schedule: string;
148
148
  limit?: number;
149
149
  };
150
150
  outputs: {
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { Credentials, credentialsSchema, OAuthCredentials, oauthCredentialsSchem
4
4
  export { Action, actionOutputSchema, actionSchema, AsyncAction, Event, eventSchema, ImmediateTrigger, immediateTriggerSchema, Request, ScheduledTrigger, scheduledTriggerSchema, SyncAction, syncActionSchema, Trigger, triggerOutputSchema, triggerSchema } from './entities/events';
5
5
  export { Provider, providerSchema } from './entities/provider';
6
6
  export { Source } from './entities/source';
7
- export { alter, extract, Field, fieldSchema, fieldsSchema, File, SelectFieldChoice, validate, ValidationResult } from './minified-utils/fields';
7
+ export { alter, Condition, extract, Field, fieldSchema, fieldsSchema, File, SelectFieldChoice, validate, ValidationResult } from './minified-utils/fields';
8
8
  export { i18n, LocalizedField, LocalizedProperties, localizeFields, localizeGroup, localizeInputs, localizeOutputs, localizeProperties } from './minified-utils/locales';
9
9
  export { Properties } from './minified-utils/properties';
10
10
  export { Protocol } from './minified-utils/protocol';
@@ -558,6 +558,7 @@ const validate_internal = async (fields, data, options) => {
558
558
  };
559
559
  }
560
560
  else {
561
+ lodash_1.default.set(data, field.key, validation);
561
562
  extended = {
562
563
  valid: true,
563
564
  original: value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beseif-solutions/prow-core",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Prow core functionalities and classes",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -23,12 +23,12 @@
23
23
  "i18n": "^0.15.1",
24
24
  "joi": "^17.13.3",
25
25
  "lodash": "^4.17.21",
26
+ "@types/lodash": "^4.14.168",
26
27
  "moment-timezone": "^0.5.46",
27
28
  "ts-node": "^8.10.2"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@types/i18n": "^0.13.12",
31
- "@types/lodash": "^4.14.168",
32
32
  "@types/node": "^22.8.4",
33
33
  "@typescript-eslint/eslint-plugin": "^5.38.0",
34
34
  "@typescript-eslint/parser": "^5.38.0",
@@ -102,7 +102,7 @@ export type ImmediateTrigger<Config extends SetupEventConfig> = CommonEvents<Con
102
102
  }>,
103
103
  poll?: CoreFunction<{
104
104
  credentials: Config[`credentials`],
105
- inputs: { fields: Config[`fields`], last_schedule?: string, limit?: number },
105
+ inputs: { fields: Config[`fields`], last_schedule: string, limit?: number },
106
106
  outputs: { records: Config[`outputs`][], flags: Partial<Record<Config[`flags`][`outputs`][number], true>> },
107
107
  }>,
108
108
  },
@@ -115,7 +115,7 @@ export type ScheduledTrigger<Config extends EventConfig> = CommonEvents<Config>
115
115
  functions: {
116
116
  poll: CoreFunction<{
117
117
  credentials: Config[`credentials`],
118
- inputs: { fields: Config[`fields`], last_schedule?: string, limit?: number },
118
+ inputs: { fields: Config[`fields`], last_schedule: string, limit?: number },
119
119
  outputs: { records: Config[`outputs`][], flags: Partial<Record<Config[`flags`][`outputs`][number], true>> },
120
120
  }>,
121
121
  },
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ export { Credentials, credentialsSchema, OAuthCredentials, oauthCredentialsSchem
4
4
  export { Action, actionOutputSchema, actionSchema, AsyncAction, Event, eventSchema, ImmediateTrigger, immediateTriggerSchema, Request, ScheduledTrigger, scheduledTriggerSchema, SyncAction, syncActionSchema, Trigger, triggerOutputSchema, triggerSchema } from './entities/events';
5
5
  export { Provider, providerSchema } from './entities/provider';
6
6
  export { Source } from './entities/source';
7
- export { alter, extract, Field, fieldSchema, fieldsSchema, File, SelectFieldChoice, validate, ValidationResult } from './minified-utils/fields';
7
+ export { alter, Condition, extract, Field, fieldSchema, fieldsSchema, File, SelectFieldChoice, validate, ValidationResult } from './minified-utils/fields';
8
8
  export { i18n, LocalizedField, LocalizedProperties, localizeFields, localizeGroup, localizeInputs, localizeOutputs, localizeProperties } from './minified-utils/locales';
9
9
  export { Properties } from './minified-utils/properties';
10
10
  export { Protocol } from './minified-utils/protocol';
@@ -761,6 +761,7 @@ const validate_internal = async (fields: Field[], data: Record<string, any>, opt
761
761
  value: null,
762
762
  };
763
763
  } else {
764
+ _.set(data, field.key, validation);
764
765
  extended = {
765
766
  valid: true,
766
767
  original: value,