@dronedeploy/rocos-js-sdk 3.0.12 → 3.0.14

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.
@@ -4,3 +4,4 @@ export * from './generateUUID';
4
4
  export * from './getURLSearchParams';
5
5
  export * from './websandbox';
6
6
  export * from './kscript';
7
+ export * from './splitRobotTopic';
@@ -20,3 +20,4 @@ __exportStar(require("./generateUUID"), exports);
20
20
  __exportStar(require("./getURLSearchParams"), exports);
21
21
  __exportStar(require("./websandbox"), exports);
22
22
  __exportStar(require("./kscript"), exports);
23
+ __exportStar(require("./splitRobotTopic"), exports);
@@ -56,6 +56,7 @@ exports.SAFE_GLOBALS = new Map(Object.entries({
56
56
  Number,
57
57
  Object,
58
58
  Array,
59
+ Boolean,
59
60
  Symbol,
60
61
  Error,
61
62
  JSON,
@@ -65,6 +66,57 @@ exports.SAFE_GLOBALS = new Map(Object.entries({
65
66
  }));
66
67
  exports.SAFE_PROTOTYPES = new Map([
67
68
  [Number.prototype, new Set(['toString', 'toFixed', 'toExponential', 'toPrecision'])],
69
+ [
70
+ Date.prototype,
71
+ new Set([
72
+ 'toString',
73
+ 'toDateString',
74
+ 'toTimeString',
75
+ 'toISOString',
76
+ 'toUTCString',
77
+ 'toGMTString',
78
+ 'getDate',
79
+ 'setDate',
80
+ 'getDay',
81
+ 'getFullYear',
82
+ 'setFullYear',
83
+ 'getHours',
84
+ 'setHours',
85
+ 'getMilliseconds',
86
+ 'setMilliseconds',
87
+ 'getMinutes',
88
+ 'setMinutes',
89
+ 'getMonth',
90
+ 'setMonth',
91
+ 'getSeconds',
92
+ 'setSeconds',
93
+ 'getTime',
94
+ 'setTime',
95
+ 'getTimezoneOffset',
96
+ 'getUTCDate',
97
+ 'setUTCDate',
98
+ 'getUTCDay',
99
+ 'getUTCFullYear',
100
+ 'setUTCFullYear',
101
+ 'getUTCHours',
102
+ 'setUTCHours',
103
+ 'getUTCMilliseconds',
104
+ 'setUTCMilliseconds',
105
+ 'getUTCMinutes',
106
+ 'setUTCMinutes',
107
+ 'getUTCMonth',
108
+ 'setUTCMonth',
109
+ 'getUTCSeconds',
110
+ 'setUTCSeconds',
111
+ 'valueOf',
112
+ 'getYear',
113
+ 'setYear',
114
+ 'toJSON',
115
+ 'toLocaleString',
116
+ 'toLocaleDateString',
117
+ 'toLocaleTimeString',
118
+ ]),
119
+ ],
68
120
  [
69
121
  String.prototype,
70
122
  new Set([
@@ -34,7 +34,7 @@ class BinaryExpressionNode extends Node_1.default {
34
34
  return false;
35
35
  }
36
36
  if (this.node.operator === '||' && left) {
37
- return true;
37
+ return left;
38
38
  }
39
39
  if (this.node.operator === '??' && left !== null && left !== undefined) {
40
40
  return left;
@@ -4,3 +4,4 @@ export * from './generateUUID';
4
4
  export * from './getURLSearchParams';
5
5
  export * from './websandbox';
6
6
  export * from './kscript';
7
+ export * from './splitRobotTopic';
@@ -4,3 +4,4 @@ export * from './generateUUID';
4
4
  export * from './getURLSearchParams';
5
5
  export * from './websandbox';
6
6
  export * from './kscript';
7
+ export * from './splitRobotTopic';
@@ -47,6 +47,7 @@ export const SAFE_GLOBALS = new Map(Object.entries({
47
47
  Number,
48
48
  Object,
49
49
  Array,
50
+ Boolean,
50
51
  Symbol,
51
52
  Error,
52
53
  JSON,
@@ -56,6 +57,57 @@ export const SAFE_GLOBALS = new Map(Object.entries({
56
57
  }));
57
58
  export const SAFE_PROTOTYPES = new Map([
58
59
  [Number.prototype, new Set(['toString', 'toFixed', 'toExponential', 'toPrecision'])],
60
+ [
61
+ Date.prototype,
62
+ new Set([
63
+ 'toString',
64
+ 'toDateString',
65
+ 'toTimeString',
66
+ 'toISOString',
67
+ 'toUTCString',
68
+ 'toGMTString',
69
+ 'getDate',
70
+ 'setDate',
71
+ 'getDay',
72
+ 'getFullYear',
73
+ 'setFullYear',
74
+ 'getHours',
75
+ 'setHours',
76
+ 'getMilliseconds',
77
+ 'setMilliseconds',
78
+ 'getMinutes',
79
+ 'setMinutes',
80
+ 'getMonth',
81
+ 'setMonth',
82
+ 'getSeconds',
83
+ 'setSeconds',
84
+ 'getTime',
85
+ 'setTime',
86
+ 'getTimezoneOffset',
87
+ 'getUTCDate',
88
+ 'setUTCDate',
89
+ 'getUTCDay',
90
+ 'getUTCFullYear',
91
+ 'setUTCFullYear',
92
+ 'getUTCHours',
93
+ 'setUTCHours',
94
+ 'getUTCMilliseconds',
95
+ 'setUTCMilliseconds',
96
+ 'getUTCMinutes',
97
+ 'setUTCMinutes',
98
+ 'getUTCMonth',
99
+ 'setUTCMonth',
100
+ 'getUTCSeconds',
101
+ 'setUTCSeconds',
102
+ 'valueOf',
103
+ 'getYear',
104
+ 'setYear',
105
+ 'toJSON',
106
+ 'toLocaleString',
107
+ 'toLocaleDateString',
108
+ 'toLocaleTimeString',
109
+ ]),
110
+ ],
59
111
  [
60
112
  String.prototype,
61
113
  new Set([
@@ -29,7 +29,7 @@ class BinaryExpressionNode extends Node {
29
29
  return false;
30
30
  }
31
31
  if (this.node.operator === '||' && left) {
32
- return true;
32
+ return left;
33
33
  }
34
34
  if (this.node.operator === '??' && left !== null && left !== undefined) {
35
35
  return left;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.12",
3
+ "version": "3.0.14",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",