@lvce-editor/test-worker 9.10.0 → 10.0.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.
@@ -1039,7 +1039,6 @@ const Directory = 3;
1039
1039
  const Script$1 = 2;
1040
1040
 
1041
1041
  const Web = 1;
1042
- const Electron = 2;
1043
1042
  const Remote = 3;
1044
1043
 
1045
1044
  const EditorWorker = 99;
@@ -1128,42 +1127,6 @@ const createUrlWithQueryParameter = url => {
1128
1127
  return string;
1129
1128
  };
1130
1129
 
1131
- // @ts-nocheck
1132
-
1133
- const getPlatform = () => {
1134
- // @ts-expect-error
1135
- if (typeof PLATFORM !== 'undefined') {
1136
- // @ts-expect-error
1137
- return PLATFORM;
1138
- }
1139
- if (typeof process !== 'undefined' && process.env.NODE_ENV === 'test') {
1140
- return 'test';
1141
- }
1142
- // Check if running in web environment
1143
- if (globalThis.window !== undefined && typeof document !== 'undefined') {
1144
- return Web;
1145
- }
1146
- // TODO find a better way to pass runtime environment
1147
- if (typeof name !== 'undefined' && name.endsWith('(Electron)')) {
1148
- return Electron;
1149
- }
1150
- return Remote;
1151
- };
1152
- const platform = getPlatform(); // TODO tree-shake this out in production
1153
-
1154
- const getAssetDir = () => {
1155
- // @ts-expect-error
1156
- if (typeof ASSET_DIR !== 'undefined') {
1157
- // @ts-expect-error
1158
- return ASSET_DIR;
1159
- }
1160
- if (platform === Electron) {
1161
- return '../../../../..';
1162
- }
1163
- return '';
1164
- };
1165
- const assetDir = getAssetDir();
1166
-
1167
1130
  class AssertionError extends Error {
1168
1131
  constructor(message) {
1169
1132
  super(message);
@@ -1673,15 +1636,6 @@ const ActivityBar = {
1673
1636
  selectCurrent
1674
1637
  };
1675
1638
 
1676
- const getBaseUrl = () => {
1677
- return `${location.origin}/${assetDir}`;
1678
- };
1679
-
1680
- const BaseUrl = {
1681
- __proto__: null,
1682
- getBaseUrl
1683
- };
1684
-
1685
1639
  const readNativeFiles = async () => {
1686
1640
  await invoke$1('ClipBoard.readNativeFiles');
1687
1641
  };
@@ -3782,14 +3736,13 @@ const Workspace = {
3782
3736
  setPath
3783
3737
  };
3784
3738
 
3785
- const createApi = (platform, assetDir$1) => {
3739
+ const createApi = (platform, assetDir) => {
3786
3740
  return {
3787
3741
  About,
3788
3742
  ActivityBar,
3789
3743
  BaseUrl: {
3790
- ...BaseUrl,
3791
3744
  getBaseUrl() {
3792
- return assetDir$1 || assetDir;
3745
+ return assetDir;
3793
3746
  }
3794
3747
  },
3795
3748
  ClipBoard,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "9.10.0",
3
+ "version": "10.0.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@
11
11
  "type": "module",
12
12
  "main": "dist/testWorkerMain.js",
13
13
  "dependencies": {
14
- "@lvce-editor/constants": "^1.30.0"
14
+ "@lvce-editor/constants": "^1.31.0"
15
15
  },
16
16
  "types": "dist/api.d.ts"
17
17
  }