@lvce-editor/extension-management-worker 4.40.0 → 4.40.1

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,58 +1,3 @@
1
- class AssertionError extends Error {
2
- constructor(message) {
3
- super(message);
4
- this.name = 'AssertionError';
5
- }
6
- }
7
- const Object$1 = 1;
8
- const Number = 2;
9
- const Array$1 = 3;
10
- const String$1 = 4;
11
- const Boolean$1 = 5;
12
- const Function = 6;
13
- const Null = 7;
14
- const Unknown = 8;
15
- const getType = value => {
16
- switch (typeof value) {
17
- case 'number':
18
- return Number;
19
- case 'function':
20
- return Function;
21
- case 'string':
22
- return String$1;
23
- case 'object':
24
- if (value === null) {
25
- return Null;
26
- }
27
- if (Array.isArray(value)) {
28
- return Array$1;
29
- }
30
- return Object$1;
31
- case 'boolean':
32
- return Boolean$1;
33
- default:
34
- return Unknown;
35
- }
36
- };
37
- const object = value => {
38
- const type = getType(value);
39
- if (type !== Object$1) {
40
- throw new AssertionError('expected value to be of type object');
41
- }
42
- };
43
- const number = value => {
44
- const type = getType(value);
45
- if (type !== Number) {
46
- throw new AssertionError('expected value to be of type number');
47
- }
48
- };
49
- const string = value => {
50
- const type = getType(value);
51
- if (type !== String$1) {
52
- throw new AssertionError('expected value to be of type string');
53
- }
54
- };
55
-
56
1
  const normalizeLine = line => {
57
2
  if (line.startsWith('Error: ')) {
58
3
  return line.slice('Error: '.length);
@@ -109,6 +54,61 @@ class VError extends Error {
109
54
  }
110
55
  }
111
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 = 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;
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 object = value => {
94
+ const type = getType(value);
95
+ if (type !== Object$1) {
96
+ throw new AssertionError('expected value to be of type object');
97
+ }
98
+ };
99
+ const number = value => {
100
+ const type = getType(value);
101
+ if (type !== Number) {
102
+ throw new AssertionError('expected value to be of type number');
103
+ }
104
+ };
105
+ const string = value => {
106
+ const type = getType(value);
107
+ if (type !== String$1) {
108
+ throw new AssertionError('expected value to be of type string');
109
+ }
110
+ };
111
+
112
112
  const isMessagePort = value => {
113
113
  return value && value instanceof MessagePort;
114
114
  };
@@ -2289,6 +2289,7 @@ const doActivateExtension = async (extension, absolutePath, event, platform) =>
2289
2289
  try {
2290
2290
  await activateExtension3(extension, absolutePath, event, platform);
2291
2291
  runningExtensions[extensionId] = true;
2292
+ await invoke$2('Layout.handleExtensionsChanged');
2292
2293
  } finally {
2293
2294
  delete activatingExtensions[extensionId];
2294
2295
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-management-worker",
3
- "version": "4.40.0",
3
+ "version": "4.40.1",
4
4
  "description": "Webworker for the Extension Management functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"