@lowdefy/operators 4.0.0-alpha.16 → 4.0.0-alpha.17

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.
@@ -14,6 +14,8 @@
14
14
  limitations under the License.
15
15
  */ import { serializer, type } from '@lowdefy/helpers';
16
16
  let NodeParser = class NodeParser {
17
+ // TODO: Look at logging here
18
+ // TODO: Remove console.error = () => {}; from tests
17
19
  parse({ args , input , location , operatorPrefix ='_' }) {
18
20
  if (type.isUndefined(input)) {
19
21
  return {
@@ -46,13 +48,16 @@ let NodeParser = class NodeParser {
46
48
  operatorPrefix,
47
49
  parser: this,
48
50
  payload: this.payload,
51
+ runtime: 'node',
49
52
  secrets: this.secrets,
50
53
  user: this.user
51
54
  });
52
55
  return res;
53
56
  } catch (e) {
54
57
  errors.push(e);
55
- console.error(e);
58
+ if (this.verbose) {
59
+ console.error(e);
60
+ }
56
61
  return null;
57
62
  }
58
63
  };
@@ -63,13 +68,14 @@ let NodeParser = class NodeParser {
63
68
  errors
64
69
  };
65
70
  }
66
- constructor({ env , payload , secrets , user , operators }){
71
+ constructor({ env , payload , secrets , user , operators , verbose }){
67
72
  this.env = env;
68
73
  this.operators = operators;
69
74
  this.payload = payload;
70
75
  this.secrets = secrets;
71
76
  this.user = user;
72
77
  this.parse = this.parse.bind(this);
78
+ this.verbose;
73
79
  }
74
80
  };
75
81
  export default NodeParser;
package/dist/webParser.js CHANGED
@@ -46,6 +46,7 @@ let WebParser = class WebParser {
46
46
  basePath,
47
47
  event,
48
48
  eventLog: this.context.eventLog,
49
+ globals: _internal.globals,
49
50
  home,
50
51
  input: inputs ? inputs[this.context.id] : {},
51
52
  location: applyArrayIndices(arrayIndices, location),
@@ -58,10 +59,10 @@ let WebParser = class WebParser {
58
59
  params: value[key],
59
60
  parser: this,
60
61
  requests: this.context.requests,
62
+ runtime: 'browser',
61
63
  state: this.context.state,
62
64
  urlQuery: urlQuery ?? {},
63
- user: user ?? {},
64
- window: _internal.window
65
+ user: user ?? {}
65
66
  });
66
67
  return res;
67
68
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/operators",
3
- "version": "4.0.0-alpha.16",
3
+ "version": "4.0.0-alpha.17",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -42,7 +42,7 @@
42
42
  "test:watch": "jest --coverage --watch"
43
43
  },
44
44
  "dependencies": {
45
- "@lowdefy/helpers": "4.0.0-alpha.16"
45
+ "@lowdefy/helpers": "4.0.0-alpha.17"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@swc/cli": "0.1.57",
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "91459befdeb9b22aaba40e8c51d6a173a11ea939"
57
+ "gitHead": "9172974b2fe19c527d3f0ea66b8dbde827ac9c0e"
58
58
  }