@lowdefy/operators-mql 4.0.0-alpha.6 → 4.0.0-alpha.9

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,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -15,7 +15,23 @@
15
15
  */ import mingo from 'mingo';
16
16
  import { get, type } from '@lowdefy/helpers';
17
17
  import { runClass } from '@lowdefy/operators';
18
- import 'mingo/init/system';
18
+ // TODO: fix build to work with:
19
+ // import 'mingo/init/system';
20
+ import { useOperators, OperatorType } from 'mingo/core.js';
21
+ import * as accumulatorOperators from 'mingo/operators/accumulator/index.js';
22
+ import * as expressionOperators from 'mingo/operators/expression/index.js';
23
+ import * as pipelineOperators from 'mingo/operators/pipeline/index.js';
24
+ import * as queryOperators from 'mingo/operators/query/index.js';
25
+ import * as projectionOperators from 'mingo/operators/projection/index.js';
26
+ // "import * as" is returning different object structures when the connection is being
27
+ // imported in the build or when running the tests.
28
+ // So we check for the a default object with all the named exports, otherwise the
29
+ // returned object has all the named exports.
30
+ useOperators(OperatorType.ACCUMULATOR, accumulatorOperators.default || accumulatorOperators);
31
+ useOperators(OperatorType.EXPRESSION, expressionOperators.default || expressionOperators);
32
+ useOperators(OperatorType.PIPELINE, pipelineOperators.default || pipelineOperators);
33
+ useOperators(OperatorType.QUERY, queryOperators.default || queryOperators);
34
+ useOperators(OperatorType.PROJECTION, projectionOperators.default || projectionOperators);
19
35
  function aggregate(data, pipeline) {
20
36
  if (data === null) {
21
37
  data = [];
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@lowdefy/operators-mql",
3
- "version": "4.0.0-alpha.6",
3
+ "version": "4.0.0-alpha.9",
4
4
  "licence": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
7
7
  "keywords": [
8
8
  "lowdefy",
9
- "lowdefy operator"
9
+ "lowdefy operator",
10
+ "lowdefy plugin"
10
11
  ],
11
12
  "bugs": {
12
13
  "url": "https://github.com/lowdefy/lowdefy/issues"
@@ -42,18 +43,18 @@
42
43
  "test": "jest --coverage"
43
44
  },
44
45
  "dependencies": {
45
- "@lowdefy/helpers": "4.0.0-alpha.6",
46
- "@lowdefy/operators": "4.0.0-alpha.6",
47
- "mingo": "^4.4.1"
46
+ "@lowdefy/helpers": "4.0.0-alpha.9",
47
+ "@lowdefy/operators": "4.0.0-alpha.9",
48
+ "mingo": "6.0.4"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@swc/cli": "0.1.55",
51
- "@swc/core": "1.2.130",
52
+ "@swc/core": "1.2.135",
52
53
  "@swc/jest": "0.2.17",
53
- "jest": "27.3.1"
54
+ "jest": "27.5.1"
54
55
  },
55
56
  "publishConfig": {
56
57
  "access": "public"
57
58
  },
58
- "gitHead": "2530e31af795b6a3c75ac8f72c8dbe0ab5d1251b"
59
+ "gitHead": "98b544eca231bdcfca6c3a8601a891835d5ce571"
59
60
  }