mx-cloud 0.0.24 → 0.0.26
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/build/interpret.d.ts +68 -23
- package/build/interpret.js +1709 -1033
- package/build/selector.d.ts +1 -32
- package/build/selector.js +1 -839
- package/build/types/workflow.d.ts +1 -1
- package/build/utils/utils.d.ts +0 -4
- package/build/utils/utils.js +0 -7
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ Partial<BaseConditions>;
|
|
|
23
23
|
type MethodNames<T> = {
|
|
24
24
|
[K in keyof T]: T[K] extends Function ? K : never;
|
|
25
25
|
}[keyof T];
|
|
26
|
-
export type CustomFunctions = 'scrape' | 'scrapeSchema' | 'scroll' | 'screenshot' | 'script' | 'enqueueLinks' | 'flag' | 'scrapeList' | 'scrapeListAuto';
|
|
26
|
+
export type CustomFunctions = 'scrape' | 'scrapeSchema' | 'scroll' | 'screenshot' | 'script' | 'enqueueLinks' | 'flag' | 'scrapeList' | 'scrapeListAuto' | 'crawl' | 'search';
|
|
27
27
|
export type What = {
|
|
28
28
|
action: MethodNames<Page> | CustomFunctions;
|
|
29
29
|
args?: any[];
|
package/build/utils/utils.d.ts
CHANGED
|
@@ -3,8 +3,4 @@ import { Action } from "../types/selector";
|
|
|
3
3
|
* ESLint rule in case there is only one util function
|
|
4
4
|
* (it still does not represent the "utils" file)
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Converts an array of scalars to an object with **items** of the array **for keys**.
|
|
8
|
-
*/
|
|
9
|
-
export declare function arrayToObject(array: any[]): any;
|
|
10
6
|
export declare const getBestSelector: (action: Action) => string;
|
package/build/utils/utils.js
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBestSelector = void 0;
|
|
4
|
-
exports.arrayToObject = arrayToObject;
|
|
5
4
|
const selector_1 = require("../types/selector");
|
|
6
5
|
/**
|
|
7
6
|
* ESLint rule in case there is only one util function
|
|
8
7
|
* (it still does not represent the "utils" file)
|
|
9
8
|
*/
|
|
10
9
|
/* eslint-disable import/prefer-default-export */
|
|
11
|
-
/**
|
|
12
|
-
* Converts an array of scalars to an object with **items** of the array **for keys**.
|
|
13
|
-
*/
|
|
14
|
-
function arrayToObject(array) {
|
|
15
|
-
return array.reduce((p, x) => (Object.assign(Object.assign({}, p), { [x]: [] })), {});
|
|
16
|
-
}
|
|
17
10
|
const getBestSelector = (action) => {
|
|
18
11
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
19
12
|
const selectors = action.selectors;
|