@lvce-editor/output-view 2.7.0 → 2.8.0

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.
@@ -54,49 +54,6 @@ class VError extends Error {
54
54
  }
55
55
  }
56
56
 
57
- class AssertionError extends Error {
58
- constructor(message) {
59
- super(message);
60
- this.name = 'AssertionError';
61
- }
62
- }
63
- const Object$1 = 1;
64
- const Number$1 = 2;
65
- const Array$1 = 3;
66
- const String$1 = 4;
67
- const Boolean$1 = 5;
68
- const Function = 6;
69
- const Null = 7;
70
- const Unknown = 8;
71
- const getType = value => {
72
- switch (typeof value) {
73
- case 'number':
74
- return Number$1;
75
- case 'function':
76
- return Function;
77
- case 'string':
78
- return String$1;
79
- case 'object':
80
- if (value === null) {
81
- return Null;
82
- }
83
- if (Array.isArray(value)) {
84
- return Array$1;
85
- }
86
- return Object$1;
87
- case 'boolean':
88
- return Boolean$1;
89
- default:
90
- return Unknown;
91
- }
92
- };
93
- const number = value => {
94
- const type = getType(value);
95
- if (type !== Number$1) {
96
- throw new AssertionError('expected value to be of type number');
97
- }
98
- };
99
-
100
57
  const isMessagePort = value => {
101
58
  return value && value instanceof MessagePort;
102
59
  };
@@ -1130,6 +1087,49 @@ const unwatchFile = async watchId => {
1130
1087
  await invoke$2('FileSystem.unwatchFile', watchId);
1131
1088
  };
1132
1089
 
1090
+ class AssertionError extends Error {
1091
+ constructor(message) {
1092
+ super(message);
1093
+ this.name = 'AssertionError';
1094
+ }
1095
+ }
1096
+ const Object$1 = 1;
1097
+ const Number$1 = 2;
1098
+ const Array$1 = 3;
1099
+ const String$1 = 4;
1100
+ const Boolean$1 = 5;
1101
+ const Function = 6;
1102
+ const Null = 7;
1103
+ const Unknown = 8;
1104
+ const getType = value => {
1105
+ switch (typeof value) {
1106
+ case 'number':
1107
+ return Number$1;
1108
+ case 'function':
1109
+ return Function;
1110
+ case 'string':
1111
+ return String$1;
1112
+ case 'object':
1113
+ if (value === null) {
1114
+ return Null;
1115
+ }
1116
+ if (Array.isArray(value)) {
1117
+ return Array$1;
1118
+ }
1119
+ return Object$1;
1120
+ case 'boolean':
1121
+ return Boolean$1;
1122
+ default:
1123
+ return Unknown;
1124
+ }
1125
+ };
1126
+ const number = value => {
1127
+ const type = getType(value);
1128
+ if (type !== Number$1) {
1129
+ throw new AssertionError('expected value to be of type number');
1130
+ }
1131
+ };
1132
+
1133
1133
  const {
1134
1134
  invoke: invoke$1,
1135
1135
  invokeAndTransfer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/output-view",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Output View Worker",
5
5
  "repository": {
6
6
  "type": "git",