@lvce-editor/shared-process 0.44.4 → 0.44.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.44.4",
3
+ "version": "0.44.5",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.3.0",
21
- "@lvce-editor/extension-host-helper-process": "0.44.4",
21
+ "@lvce-editor/extension-host-helper-process": "0.44.5",
22
22
  "@lvce-editor/ipc": "13.7.0",
23
23
  "@lvce-editor/json-rpc": "5.4.0",
24
24
  "@lvce-editor/jsonc-parser": "1.5.0",
@@ -2,6 +2,6 @@ import { join } from 'path';
2
2
  import { fileURLToPath } from 'url';
3
3
  export const getBuiltinExtensionsPath = () => {
4
4
  const staticServerPath = fileURLToPath(import.meta.resolve('@lvce-editor/static-server'));
5
- const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'c858a2b', 'extensions');
5
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '10163fd', 'extensions');
6
6
  return builtinExtensionsPath;
7
7
  };
@@ -256,20 +256,21 @@ const addExtensionLanguages = async ({ root, extensionPath, extensionJson, commi
256
256
  await JsonFile.writeJson(Path.join(root, 'dist', commitHash, 'config', 'fileMap.json'), fileMap);
257
257
  }
258
258
  };
259
+ const updateExtensionsJson = async ({ root, commitHash, pathPrefix, extraExtensions }) => {
260
+ const dirents = await FileSystem.readDir(Path.join(root, 'dist', commitHash, 'extensions'));
261
+ const manifests = await Promise.all(dirents.map(async (dirent) => {
262
+ const json = await JsonFile.readJson(Path.join(root, 'dist', commitHash, 'extensions', dirent, 'extension.json'));
263
+ const webExtensionPath = `${pathPrefix}/${commitHash}/extensions/${dirent}`;
264
+ return {
265
+ ...json,
266
+ path: webExtensionPath,
267
+ };
268
+ }));
269
+ const newExtensions = [...manifests, ...extraExtensions];
270
+ await JsonFile.writeJson(Path.join(root, 'dist', commitHash, 'config', 'extensions.json'), newExtensions);
271
+ };
259
272
  const addExtensionWebExtension = async ({ root, extensionPath, commitHash, extensionJson, pathPrefix, useSimpleWebExtensionFile }) => {
260
- {
261
- const dirents = await FileSystem.readDir(Path.join(root, 'dist', commitHash, 'extensions'));
262
- const manifests = await Promise.all(dirents.map(async (dirent) => {
263
- const json = await JsonFile.readJson(Path.join(root, 'dist', commitHash, 'extensions', dirent, 'extension.json'));
264
- const webExtensionPath = `${pathPrefix}/${commitHash}/extensions/${dirent}`;
265
- return {
266
- ...json,
267
- path: webExtensionPath,
268
- };
269
- }));
270
- const newExtensions = [...manifests, extensionJson];
271
- await JsonFile.writeJson(Path.join(root, 'dist', commitHash, 'config', 'extensions.json'), newExtensions);
272
- }
273
+ await updateExtensionsJson({ root, commitHash, pathPrefix, extraExtensions: [extensionJson] });
273
274
  if (!extensionJson.browser) {
274
275
  return;
275
276
  }
@@ -434,6 +435,7 @@ export const exportStatic = async ({ root, pathPrefix, extensionPath, testPath,
434
435
  serverStaticPath,
435
436
  });
436
437
  console.timeEnd('applyOverrides');
438
+ await updateExtensionsJson({ root, commitHash, pathPrefix, extraExtensions: [] });
437
439
  if (extensionPath) {
438
440
  console.time('addExtension');
439
441
  await addExtension({
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
41
41
  export const getSetupName = () => {
42
42
  return 'Lvce-Setup';
43
43
  };
44
- export const version = '0.44.4';
45
- export const commit = 'c858a2b';
46
- export const date = '2025-01-09T00:47:57.000Z';
44
+ export const version = '0.44.5';
45
+ export const commit = '10163fd';
46
+ export const date = '2025-01-09T21:55:07.000Z';
47
47
  export const getVersion = () => {
48
48
  return version;
49
49
  };