Skip to content

Commit a30c68b

Browse files
committed
Published version of electron detects assets
1 parent c322278 commit a30c68b

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

fission/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@xyflow/react": "^12.7.0",
4343
"async-mutex": "^0.5.0",
4444
"colord": "^2.9.3",
45+
"electron-squirrel-startup": "^1.0.1",
4546
"framer-motion": "^10.18.0",
4647
"lygia": "^1.3.3",
4748
"playwright": "^1.54.0",
@@ -52,10 +53,18 @@
5253
"react-icons": "^4.12.0",
5354
"three": "^0.178.0",
5455
"typescript-cookie": "^1.0.6",
55-
"vitest-browser-react": "^1.0.0",
56-
"electron-squirrel-startup": "^1.0.1"
56+
"vitest-browser-react": "^1.0.0"
5757
},
5858
"devDependencies": {
59+
"@electron-forge/cli": "^7.8.1",
60+
"@electron-forge/maker-deb": "^7.8.1",
61+
"@electron-forge/maker-rpm": "^7.8.1",
62+
"@electron-forge/maker-squirrel": "^7.8.1",
63+
"@electron-forge/maker-zip": "^7.8.1",
64+
"@electron-forge/plugin-auto-unpack-natives": "^7.8.1",
65+
"@electron-forge/plugin-fuses": "^7.8.1",
66+
"@electron-forge/plugin-vite": "^7.8.1",
67+
"@electron/fuses": "^1.8.0",
5968
"@emotion/react": "^11.14.0",
6069
"@emotion/styled": "^11.14.0",
6170
"@mui/material": "^5.17.1",
@@ -74,6 +83,7 @@
7483
"@vitejs/plugin-react-swc": "^3.10.2",
7584
"autoprefixer": "^10.4.21",
7685
"cssnano": "^6.1.2",
86+
"electron": "^37.2.4",
7787
"eslint-config-prettier": "^8.10.0",
7888
"eslint-import-resolver-alias": "^1.1.2",
7989
"eslint-plugin-import": "^2.31.0",
@@ -92,17 +102,7 @@
92102
"vite": "^6.3.5",
93103
"vite-plugin-glsl": "^1.5.0",
94104
"vite-plugin-singlefile": "^0.13.5",
95-
"vitest": "^3.2.4",
96-
"@electron-forge/cli": "^7.8.1",
97-
"@electron-forge/maker-deb": "^7.8.1",
98-
"@electron-forge/maker-rpm": "^7.8.1",
99-
"@electron-forge/maker-squirrel": "^7.8.1",
100-
"@electron-forge/maker-zip": "^7.8.1",
101-
"@electron-forge/plugin-auto-unpack-natives": "^7.8.1",
102-
"@electron-forge/plugin-fuses": "^7.8.1",
103-
"@electron-forge/plugin-vite": "^7.8.1",
104-
"@electron/fuses": "^1.8.0",
105-
"electron": "^37.2.4"
105+
"vitest": "^3.2.4"
106106
},
107107
"license": "Apache-2.0",
108108
"repository": {

fission/src/ui/panels/mirabuf/ImportMirabufPanel.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,18 @@ const ImportMirabufPanel: React.FC<PanelPropsImpl> = ({ panelId }) => {
177177
useEffect(() => {
178178
// To remove the prettier warning
179179
const x = async () => {
180-
fetch(`/api/mira/manifest.json`)
180+
// Detect if we're running in electron and use direct remote URL
181+
const isElectron = window.electronAPI != null
182+
const baseUrl = isElectron ? "https://synthesis.autodesk.com" : ""
183+
184+
fetch(`${baseUrl}/api/mira/manifest.json`)
181185
.then(x => x.json())
182186
.then(x => {
183187
const map = MirabufCachingService.getCacheMap(MiraType.ROBOT)
184188
const robots: MirabufRemoteInfo[] = []
185189
for (const src of x["robots"]) {
186190
if (typeof src == "string") {
187-
const str = `/api/mira/robots/${src}`
191+
const str = `${baseUrl}/api/mira/robots/${src}`
188192
if (!map[str]) robots.push({ displayName: src, src: str })
189193
} else {
190194
if (!map[src["src"]]) robots.push({ displayName: src["displayName"], src: src["src"] })
@@ -193,7 +197,7 @@ const ImportMirabufPanel: React.FC<PanelPropsImpl> = ({ panelId }) => {
193197
const fields: MirabufRemoteInfo[] = []
194198
for (const src of x["fields"]) {
195199
if (typeof src == "string") {
196-
const str = `/api/mira/fields/${src}`
200+
const str = `${baseUrl}/api/mira/fields/${src}`
197201
if (!map[str]) fields.push({ displayName: src, src: str })
198202
} else {
199203
if (!map[src["src"]]) fields.push({ displayName: src["displayName"], src: src["src"] })
@@ -204,6 +208,9 @@ const ImportMirabufPanel: React.FC<PanelPropsImpl> = ({ panelId }) => {
204208
fields,
205209
})
206210
})
211+
.catch(error => {
212+
console.error("Failed to fetch manifest:", error)
213+
})
207214
}
208215
x()
209216
}, [])

0 commit comments

Comments
 (0)