apify 4.0.0-rc.0 → 4.0.0-rc.2

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.
@@ -1,8 +1,41 @@
1
+ import { setTimeout as sleep } from 'node:timers/promises';
1
2
  import { EventManager, EventType } from '@crawlee/core';
2
3
  import { WebSocket } from 'ws';
3
4
  import { ACTOR_ENV_VARS, ACTOR_EVENT_NAMES } from '@apify/consts';
4
5
  import { betterClearInterval } from '@apify/utilities';
5
6
  import { Configuration } from './configuration.js';
7
+ /**
8
+ * WebSocket close codes for a permanent condition, on which the connection is not re-established.
9
+ *
10
+ * The platform sends `1008` (policy violation) for an unknown/missing run ID or an exceeded per-run connection limit.
11
+ * The rest are protocol, data, or mandatory-extension failures that reconnecting cannot resolve.
12
+ */
13
+ const NON_RETRYABLE_CLOSE_CODES = new Set([1002, 1003, 1007, 1008, 1010]);
14
+ /** Close codes of a clean close, as opposed to a lost connection. */
15
+ const CLEAN_CLOSE_CODES = new Set([1000, 1001]);
16
+ /** How long a connection must stay open to count as healthy, after which a drop reconnects without backoff. */
17
+ const HEALTHY_CONNECTION_MIN_DURATION_MILLIS = 1000;
18
+ /** Names of the platform events that are emitted to listeners. Messages with any other name are dropped. */
19
+ const PLATFORM_EVENT_NAMES = new Set([
20
+ ACTOR_EVENT_NAMES.SYSTEM_INFO,
21
+ ACTOR_EVENT_NAMES.MIGRATING,
22
+ ACTOR_EVENT_NAMES.ABORTING,
23
+ ACTOR_EVENT_NAMES.PERSIST_STATE,
24
+ ]);
25
+ /**
26
+ * Delays between reconnection attempts, mirroring the Python `websockets` library
27
+ * (see RFC 6455, section 7.2.3): a random initial delay, then exponential growth up to a cap.
28
+ */
29
+ function* backoffDelays() {
30
+ yield Math.random() * 5000;
31
+ let delay = 3100;
32
+ while (delay < 90_000) {
33
+ yield delay;
34
+ delay *= 1.618;
35
+ }
36
+ while (true)
37
+ yield 90_000;
38
+ }
6
39
  /**
7
40
  * Gets an instance of a Node.js'
8
41
  * [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter)
@@ -12,16 +45,16 @@ import { Configuration } from './configuration.js';
12
45
  * **Example usage:**
13
46
  *
14
47
  * ```javascript
15
- * Actor.on('cpuInfo', (data) => {
48
+ * Actor.on('systemInfo', (data) => {
16
49
  * if (data.isCpuOverloaded) console.log('Oh no, the CPU is overloaded!');
17
50
  * });
18
51
  * ```
19
52
  *
20
53
  * The following events are emitted:
21
54
  *
22
- * - `cpuInfo`: `{ "isCpuOverloaded": Boolean }`
23
- * The event is emitted approximately every second
24
- * and it indicates whether the Actor is using the maximum of available CPU resources.
55
+ * - `systemInfo`: `{ "cpuCurrentUsage": Number, "isCpuOverloaded": Boolean, "memCurrentBytes": Number, ... }`
56
+ * The event is emitted approximately every second and it describes the CPU and memory usage of the Actor.
57
+ * `isCpuOverloaded` indicates whether the Actor is using the maximum of available CPU resources.
25
58
  * If that's the case, the Actor should not add more workload.
26
59
  * For example, this event is used by the {@link AutoscaledPool} class.
27
60
  * - `migrating`: `void`
@@ -40,20 +73,62 @@ import { Configuration } from './configuration.js';
40
73
  * in which case the `isMigrating` flag is set to `true`. Otherwise the flag is `false`.
41
74
  * Note that the `persistState` event is provided merely for user convenience,
42
75
  * you can achieve the same effect using `setInterval()` and listening for the `migrating` event.
76
+ *
77
+ * Messages with any other name are not emitted. This includes the deprecated `cpuInfo` event, which the platform
78
+ * sends next to `systemInfo` for backward compatibility. Registering a `cpuInfo` listener logs a warning.
79
+ * Unknown names are logged at the debug level.
80
+ *
81
+ * The connection to the platform events websocket is re-established after it drops, unless it was closed
82
+ * with a code signalling a permanent condition (e.g. `1008` for an unknown run ID).
43
83
  */
44
84
  export class PlatformEventManager extends EventManager {
45
85
  configuration;
46
86
  /** Websocket connection to Actor events. */
47
87
  #eventsWs;
48
- constructor(configuration = Configuration.getGlobalConfiguration()) {
88
+ /** Aborted by `close()`, which stops any pending reconnection and marks the final close as intentional. */
89
+ #abortController = new AbortController();
90
+ /** Backoff for rapid reconnections; reset after a connection that stayed open long enough to count as healthy. */
91
+ #backoff;
92
+ #internalListeners;
93
+ /** Calls of the internal listeners that are still in progress. */
94
+ #internalListenerCalls = new Set();
95
+ /**
96
+ * @param internalListeners Listeners of the SDK itself, kept apart from the ones registered with `on()`, so that
97
+ * user code can neither remove them with `off()` nor see them in `listeners()`.
98
+ */
99
+ constructor(configuration = Configuration.getGlobalConfiguration(), internalListeners = {}) {
49
100
  super({
50
101
  persistStateIntervalMillis: configuration.persistStateIntervalMillis,
51
102
  });
52
103
  this.configuration = configuration;
104
+ this.#internalListeners = internalListeners;
105
+ }
106
+ on(event, listener) {
107
+ if (event === ACTOR_EVENT_NAMES.CPU_INFO) {
108
+ this.log.warning('The "cpuInfo" event is deprecated and never emitted. ' +
109
+ 'Listen to "systemInfo" instead, which has the same "isCpuOverloaded" field.');
110
+ }
111
+ super.on(event, listener);
112
+ }
113
+ emit(event, ...args) {
114
+ super.emit(event, ...args);
115
+ const listener = this.#internalListeners[event];
116
+ if (!listener)
117
+ return;
118
+ const call = (async () => listener(...args))()
119
+ .catch((err) => this.log.exception(err, `Internal listener of the "${event}" event failed`))
120
+ .finally(() => this.#internalListenerCalls.delete(call));
121
+ this.#internalListenerCalls.add(call);
122
+ }
123
+ async waitForAllListenersToComplete() {
124
+ const [completed] = await Promise.all([super.waitForAllListenersToComplete(), ...this.#internalListenerCalls]);
125
+ return completed;
53
126
  }
54
127
  /**
55
128
  * Initializes `Actor.events` event emitter by creating a connection to a websocket that provides them.
56
129
  * This is an internal function that is automatically called by `Actor.main()`.
130
+ *
131
+ * Rejects if the first connection cannot be established. Later drops are handled by reconnecting.
57
132
  */
58
133
  async init() {
59
134
  if (this.initialized) {
@@ -66,37 +141,16 @@ export class PlatformEventManager extends EventManager {
66
141
  this.log.debug(`Environment variable ${ACTOR_ENV_VARS.EVENTS_WEBSOCKET_URL} is not set, no events from Apify platform will be emitted.`);
67
142
  return;
68
143
  }
69
- this.createWebSocketConnection(eventsWsUrl);
70
- }
71
- createWebSocketConnection(eventsWsUrl) {
72
- this.#eventsWs = new WebSocket(eventsWsUrl);
73
- this.#eventsWs.on('message', (message) => {
74
- if (!message)
75
- return;
76
- try {
77
- const { name, data } = JSON.parse(String(message));
78
- this.events.emit(name, data);
79
- if (name === ACTOR_EVENT_NAMES.MIGRATING) {
80
- betterClearInterval(this.intervals.persistState); // Don't send any other persist state event.
81
- this.events.emit(EventType.PERSIST_STATE, {
82
- isMigrating: true,
83
- });
84
- }
85
- }
86
- catch (err) {
87
- this.log.exception(err, 'Cannot parse Actor event');
88
- }
89
- });
90
- this.#eventsWs.on('error', (err) => {
91
- // Don't print this error as this happens in the case of very short Actor.main().
92
- if (err.message === 'WebSocket was closed before the connection was established')
93
- return;
94
- this.log.exception(err, 'web socket connection failed');
95
- });
96
- this.#eventsWs.on('close', () => {
97
- this.log.debug('web socket has been closed');
98
- this.#eventsWs = undefined;
99
- });
144
+ this.#abortController = new AbortController();
145
+ this.#backoff = undefined;
146
+ try {
147
+ await this.#connect(eventsWsUrl);
148
+ }
149
+ catch (err) {
150
+ // Leave no `persistState` interval behind, so that `init()` can be retried.
151
+ await this.close();
152
+ throw new Error('Error connecting to platform events websocket!', { cause: err });
153
+ }
100
154
  }
101
155
  /**
102
156
  * Closes websocket providing events from Actor infrastructure and also stops sending internal events
@@ -108,6 +162,122 @@ export class PlatformEventManager extends EventManager {
108
162
  return;
109
163
  }
110
164
  await super.close();
165
+ this.#abortController.abort();
111
166
  this.#eventsWs?.close();
112
167
  }
168
+ /** Opens a new connection; resolves once it is established and rejects if it fails before that. */
169
+ async #connect(eventsWsUrl) {
170
+ await new Promise((resolve, reject) => {
171
+ // `ws` has no default handshake timeout, so without it a silent server would block `init()` forever.
172
+ const ws = new WebSocket(eventsWsUrl, { handshakeTimeout: 10_000 });
173
+ this.#eventsWs = ws;
174
+ let openedAt;
175
+ let lastError;
176
+ ws.on('open', () => {
177
+ openedAt = Date.now();
178
+ resolve();
179
+ });
180
+ ws.on('message', (message) => this.#handleMessage(message));
181
+ ws.on('error', (err) => {
182
+ // Before the connection is open, the error is reported through the `close` event.
183
+ lastError = err;
184
+ if (openedAt !== undefined)
185
+ this.log.exception(err, 'Platform events websocket error');
186
+ });
187
+ ws.on('close', (code, reason) => {
188
+ if (this.#eventsWs === ws)
189
+ this.#eventsWs = undefined;
190
+ if (openedAt === undefined) {
191
+ reject(lastError ??
192
+ new Error(`Web socket closed before the connection was established (code=${code})`));
193
+ return;
194
+ }
195
+ this.#handleClose(eventsWsUrl, { code, reason: reason.toString(), openedAt });
196
+ });
197
+ });
198
+ }
199
+ #handleMessage(message) {
200
+ if (!message)
201
+ return;
202
+ try {
203
+ const { name, data } = JSON.parse(String(message));
204
+ if (name === ACTOR_EVENT_NAMES.CPU_INFO)
205
+ return;
206
+ if (!PLATFORM_EVENT_NAMES.has(name)) {
207
+ this.log.debug('Unknown platform event received', { name, data });
208
+ return;
209
+ }
210
+ this.emit(name, data);
211
+ if (name === ACTOR_EVENT_NAMES.MIGRATING) {
212
+ betterClearInterval(this.intervals.persistState); // Don't send any other persist state event.
213
+ this.events.emit(EventType.PERSIST_STATE, {
214
+ isMigrating: true,
215
+ });
216
+ }
217
+ }
218
+ catch (err) {
219
+ this.log.exception(err, 'Cannot parse Actor event');
220
+ }
221
+ }
222
+ /** Logs the close of an established connection and schedules a reconnection, unless the close is final. */
223
+ #handleClose(eventsWsUrl, { code, reason, openedAt }) {
224
+ if (this.#abortController.signal.aborted) {
225
+ this.log.debug('web socket has been closed');
226
+ return;
227
+ }
228
+ const details = `code=${code}, reason=${JSON.stringify(reason)}`;
229
+ if (NON_RETRYABLE_CLOSE_CODES.has(code)) {
230
+ this.log.error(`Connection to platform events websocket was closed with a non-retryable code (${details}); not reconnecting. ` +
231
+ 'No further platform events will be received for the rest of this run, so migration and abort handling ' +
232
+ '(e.g. persisting state before a migration) is now disabled.');
233
+ return;
234
+ }
235
+ if (CLEAN_CLOSE_CODES.has(code)) {
236
+ this.log.info(`Connection to platform events websocket was closed (${details}), reconnecting...`);
237
+ }
238
+ else {
239
+ this.log.warning(`Connection to platform events websocket was lost (${details}), reconnecting...`);
240
+ }
241
+ // Reconnect a healthy connection immediately; back off only on repeated rapid drops. The first rapid drop
242
+ // retries without delay (it just primes the backoff), each consecutive one waits for the next interval.
243
+ let delay = 0;
244
+ if (Date.now() - openedAt >= HEALTHY_CONNECTION_MIN_DURATION_MILLIS) {
245
+ this.#backoff = undefined;
246
+ }
247
+ else if (this.#backoff) {
248
+ delay = this.#backoff.next().value;
249
+ }
250
+ else {
251
+ this.#backoff = backoffDelays();
252
+ }
253
+ this.#reconnect(eventsWsUrl, delay).catch((err) => {
254
+ this.log.exception(err, 'Reconnecting to platform events websocket failed');
255
+ });
256
+ }
257
+ /** Keeps trying to connect, with backoff between failed attempts, until it succeeds or `close()` is called. */
258
+ async #reconnect(eventsWsUrl, initialDelayMillis) {
259
+ const { signal } = this.#abortController;
260
+ await this.#sleep(initialDelayMillis, signal);
261
+ while (!signal.aborted) {
262
+ try {
263
+ await this.#connect(eventsWsUrl);
264
+ this.log.info('Reconnected to the platform events websocket.');
265
+ return;
266
+ }
267
+ catch (err) {
268
+ if (signal.aborted)
269
+ return;
270
+ this.log.warning(`Reconnecting to platform events websocket failed: ${err.message}`);
271
+ }
272
+ this.#backoff ??= backoffDelays();
273
+ await this.#sleep(this.#backoff.next().value, signal);
274
+ }
275
+ }
276
+ /** Sleeps for the given time, or until the signal is aborted. */
277
+ async #sleep(millis, signal) {
278
+ if (millis <= 0 || signal.aborted)
279
+ return;
280
+ // Rejects with an `AbortError` when aborted, which just means there is nothing left to wait for.
281
+ await sleep(millis, undefined, { signal }).catch(() => { });
282
+ }
113
283
  }
@@ -61,6 +61,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration {
61
61
  #hostname;
62
62
  #port;
63
63
  #usesApifyProxy;
64
+ #checkAccess;
64
65
  log = defaultLog.child({ prefix: 'ProxyConfiguration' });
65
66
  /**
66
67
  * @internal
@@ -82,6 +83,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration {
82
83
  subdivisionCode: z.string().regex(SUBDIVISION_CODE_REGEX).optional(),
83
84
  apifyProxySubdivision: z.string().regex(SUBDIVISION_CODE_REGEX).optional(),
84
85
  password: z.string().optional(),
86
+ checkAccess: z.boolean().optional(),
85
87
  })
86
88
  .strict());
87
89
  const { groups = [], apifyProxyGroups = [], countryCode, apifyProxyCountry, subdivisionCode, apifyProxySubdivision, password = configuration.proxyPassword, } = options;
@@ -106,6 +108,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration {
106
108
  this.#hostname = hostname;
107
109
  this.#port = port;
108
110
  this.#usesApifyProxy = !proxyUrls && !newUrlFunction;
111
+ this.#checkAccess = options.checkAccess;
109
112
  if (proxyUrls && proxyUrls.some((url) => url?.includes('apify.com'))) {
110
113
  this.log.warning('Some Apify proxy features may work incorrectly. Please consider setting up Apify properties instead of `proxyUrls`.\n' +
111
114
  'See https://docs.apify.com/sdk/js/docs/concepts/proxy-management#apify-proxy-configuration');
@@ -135,9 +138,10 @@ export class ProxyConfiguration extends CoreProxyConfiguration {
135
138
  `provide options.password or "${APIFY_ENV_VARS.PROXY_PASSWORD}" environment variable. ` +
136
139
  `You can also provide your Apify token via the "${APIFY_ENV_VARS.TOKEN}" environment variable, ` +
137
140
  `so that the SDK can fetch the proxy password from Apify API, when ${APIFY_ENV_VARS.PROXY_PASSWORD} is not defined`);
141
+ return false;
138
142
  }
139
143
  }
140
- if (options?.checkAccess !== false) {
144
+ if ((options?.checkAccess ?? this.#checkAccess) !== false) {
141
145
  return this.checkAccess();
142
146
  }
143
147
  }
@@ -228,7 +232,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration {
228
232
  return;
229
233
  try {
230
234
  const user = await Actor.apifyClient.user().get();
231
- this.#password = user?.proxy?.password;
235
+ this.#password = user?.proxy?.password ?? undefined;
232
236
  }
233
237
  catch (error) {
234
238
  if (Actor.isAtHome()) {
package/dist/utils.d.ts CHANGED
@@ -37,7 +37,9 @@ export declare function getSystemInfo(): {
37
37
  */
38
38
  export declare function checkCrawleeVersion(): void;
39
39
  /**
40
- * Prints a warning if this version of Apify SDK is outdated.
41
- * @ignore
40
+ * A FIFO mutex that a critical section may re-enter from a nested call without deadlocking.
42
41
  */
43
- export declare function printOutdatedSdkWarning(): void;
42
+ export declare class ReentrantAsyncLock {
43
+ #private;
44
+ runExclusive<T>(fn: () => Promise<T>): Promise<T>;
45
+ }
package/dist/utils.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { AsyncLocalStorage } from 'node:async_hooks';
1
2
  import { existsSync, readFileSync } from 'node:fs';
2
3
  import { createRequire } from 'node:module';
3
4
  import { type } from 'node:os';
@@ -7,9 +8,6 @@ import { parseValue } from '@crawlee/core';
7
8
  import crawleePkgJson from '@crawlee/core/package.json' with { type: 'json' };
8
9
  // @ts-ignore if we enable resolveJsonModule, we end up with `src` folder in `dist`
9
10
  import apifyClientPkgJson from 'apify-client/package.json' with { type: 'json' };
10
- import semver from 'semver';
11
- import { APIFY_ENV_VARS } from '@apify/consts';
12
- import log from '@apify/log';
13
11
  // @ts-ignore if we enable resolveJsonModule, we end up with `src` folder in `dist`
14
12
  import apifyPkgJson from '../package.json' with { type: 'json' };
15
13
  export { ArgumentValidationError } from '@apify/validations';
@@ -108,15 +106,18 @@ export function checkCrawleeVersion() {
108
106
  }
109
107
  }
110
108
  /**
111
- * Prints a warning if this version of Apify SDK is outdated.
112
- * @ignore
109
+ * A FIFO mutex that a critical section may re-enter from a nested call without deadlocking.
113
110
  */
114
- export function printOutdatedSdkWarning() {
115
- if (process.env[APIFY_ENV_VARS.DISABLE_OUTDATED_WARNING])
116
- return;
117
- const latestApifyVersion = process.env[APIFY_ENV_VARS.SDK_LATEST_VERSION];
118
- if (!latestApifyVersion || !semver.lt(apifyPkgJson.version, latestApifyVersion))
119
- return;
120
- log.warning(`You are using an outdated version (${apifyPkgJson.version}) of Apify SDK. We recommend you to update to the latest version (${latestApifyVersion}).
121
- Read more about Apify SDK versioning at: https://help.apify.com/en/articles/3184510-updates-and-versioning-of-apify-sdk`);
111
+ export class ReentrantAsyncLock {
112
+ #tail = Promise.resolve();
113
+ #held = new AsyncLocalStorage();
114
+ async runExclusive(fn) {
115
+ if (this.#held.getStore()) {
116
+ return await fn();
117
+ }
118
+ const run = this.#tail.then(async () => this.#held.run(true, fn));
119
+ // Keep the chain alive even when the critical section throws.
120
+ this.#tail = run.catch(() => { });
121
+ return await run;
122
+ }
122
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify",
3
- "version": "4.0.0-rc.0",
3
+ "version": "4.0.0-rc.2",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=22.13.0"
@@ -53,51 +53,49 @@
53
53
  ]
54
54
  },
55
55
  "dependencies": {
56
- "@apify/consts": "^3.0.1",
56
+ "@apify/consts": "^3.1.0",
57
57
  "@apify/datastructures": "^3.0.1",
58
- "@apify/input_secrets": "^2.0.5",
59
- "@apify/log": "^3.0.1",
60
- "@apify/pseudo_url": "^3.0.1",
61
- "@apify/timeout": "^1.0.1",
62
- "@apify/utilities": "^3.1.0",
63
- "@apify/validations": "^1.1.1",
64
- "@crawlee/core": "4.0.0-rc.1",
65
- "@crawlee/fs-storage": "4.0.0-rc.1",
66
- "@crawlee/types": "4.0.0-rc.1",
67
- "@crawlee/utils": "4.0.0-rc.1",
68
- "apify-client": "^3.0.0-rc.0",
69
- "minimatch": "^10.2.6",
70
- "semver": "^7.8.5",
71
- "tslib": "^2.8.1",
72
- "ws": "^8.22.0",
73
- "zod": "^4.6.5"
58
+ "@apify/input_secrets": "^2.0.9",
59
+ "@apify/log": "^3.0.2",
60
+ "@apify/pseudo_url": "^3.0.2",
61
+ "@apify/timeout": "^1.1.0",
62
+ "@apify/utilities": "^3.1.1",
63
+ "@apify/validations": "^1.1.4",
64
+ "@crawlee/core": "4.0.0-rc.3",
65
+ "@crawlee/fs-storage": "4.0.0-rc.3",
66
+ "@crawlee/types": "4.0.0-rc.3",
67
+ "@crawlee/utils": "4.0.0-rc.3",
68
+ "apify-client": "^3.0.0-rc.2",
69
+ "minimatch": "^11.0.9",
70
+ "tslib": "^2.9.1",
71
+ "ws": "^8.23.0",
72
+ "zod": "^4.6.7"
74
73
  },
75
74
  "devDependencies": {
76
- "@apify/oxlint-config": "^0.3.0",
75
+ "@apify/oxlint-config": "^0.4.0",
77
76
  "@apify/tsconfig": "^0.2.0",
78
- "@commitlint/config-conventional": "^21.2.3",
79
- "@playwright/browser-chromium": "^1.63.0",
80
- "@types/node": "^26.6.3",
81
- "@types/semver": "^7.8.0",
82
- "@types/ws": "^8.18.1",
83
- "commitlint": "^21.2.3",
84
- "crawlee": "4.0.0-rc.1",
77
+ "@commitlint/config-conventional": "^21.2.4",
78
+ "@playwright/browser-chromium": "^1.65.1",
79
+ "@types/node": "^26.6.6",
80
+ "@types/ws": "^8.18.2",
81
+ "commitlint": "^21.2.4",
82
+ "crawlee": "4.0.0-rc.3",
85
83
  "husky": "^9.1.7",
86
- "lint-staged": "^17.6.0",
87
- "oxfmt": "0.72.0",
88
- "oxlint": "1.87.0",
89
- "oxlint-tsgolint": "7.0.2004",
90
- "playwright": "^1.63.0",
91
- "puppeteer": "^25.12.0",
92
- "rimraf": "^6.1.3",
84
+ "lint-staged": "^17.6.1",
85
+ "oxfmt": "0.80.0",
86
+ "oxlint": "1.95.0",
87
+ "oxlint-tsgolint": "7.0.2008",
88
+ "playwright": "^1.65.1",
89
+ "puppeteer": "^25.18.1",
90
+ "rimraf": "^6.1.4",
93
91
  "tsx": "^4.23.15",
94
92
  "typescript": "~7.0.2",
95
- "vitest": "^5.0.2"
93
+ "vitest": "^5.1.1"
96
94
  },
97
95
  "devEngines": {
98
96
  "packageManager": {
99
97
  "name": "pnpm",
100
- "version": "12.11.2",
98
+ "version": "12.23.0",
101
99
  "onFail": "warn"
102
100
  }
103
101
  },