()
| 49 | } |
| 50 | |
| 51 | export function resolveStudioBundle(): StudioBundleResolution { |
| 52 | const builtPath = resolve(__dirname, "studio"); |
| 53 | const builtIndex = resolve(builtPath, "index.html"); |
| 54 | if (existsSync(builtIndex)) { |
| 55 | return { dir: builtPath, indexPath: builtIndex, available: true, checkedPaths: [builtIndex] }; |
| 56 | } |
| 57 | const devPath = resolve(__dirname, "..", "..", "..", "studio", "dist"); |
| 58 | const devIndex = resolve(devPath, "index.html"); |
| 59 | if (existsSync(devIndex)) { |
| 60 | return { |
| 61 | dir: devPath, |
| 62 | indexPath: devIndex, |
| 63 | available: true, |
| 64 | checkedPaths: [builtIndex, devIndex], |
| 65 | }; |
| 66 | } |
| 67 | return { |
| 68 | dir: builtPath, |
| 69 | indexPath: builtIndex, |
| 70 | available: false, |
| 71 | checkedPaths: [builtIndex, devIndex], |
| 72 | }; |
| 73 | } |
| 74 | |
| 75 | function resolveRuntimePath(): string { |
| 76 | const builtPath = resolve(__dirname, "hyperframe-runtime.js"); |
no test coverage detected