electrobun 0.0.19-beta.35 → 0.0.19-beta.36

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli/index.ts +28 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "0.0.19-beta.35",
3
+ "version": "0.0.19-beta.36",
4
4
  "description": "Build ultra fast, tiny, and cross-platform desktop apps with Typescript.",
5
5
  "license": "MIT",
6
6
  "author": "Blackboard Technologies Inc.",
package/src/cli/index.ts CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  mkdirSync,
8
8
  createWriteStream,
9
9
  unlinkSync,
10
+ readdirSync,
10
11
  } from "fs";
11
12
  import { execSync } from "child_process";
12
13
  import tar from "tar";
@@ -164,11 +165,31 @@ async function ensureCoreDependencies() {
164
165
  await tar.x({
165
166
  file: tempFile,
166
167
  cwd: distPath,
168
+ preservePaths: false,
169
+ strip: 0,
170
+ // Add Windows-specific options for more robust extraction
171
+ ...(OS === 'win' && {
172
+ noMtime: true,
173
+ preserveOwner: false,
174
+ }),
167
175
  });
168
176
 
169
177
  // Clean up temp file
170
178
  unlinkSync(tempFile);
171
179
 
180
+ // Verify extraction completed successfully
181
+ const mainJsPath = join(ELECTROBUN_DEP_PATH, 'dist', 'main.js');
182
+ if (!existsSync(mainJsPath)) {
183
+ console.error('Warning: main.js was not extracted properly');
184
+ // List what was actually extracted for debugging
185
+ try {
186
+ const extractedFiles = readdirSync(join(ELECTROBUN_DEP_PATH, 'dist'));
187
+ console.log('Extracted files:', extractedFiles);
188
+ } catch (e) {
189
+ console.error('Could not list extracted files');
190
+ }
191
+ }
192
+
172
193
  console.log('Core dependencies downloaded and cached successfully');
173
194
 
174
195
  } catch (error) {
@@ -233,6 +254,13 @@ async function ensureCEFDependencies() {
233
254
  await tar.x({
234
255
  file: tempFile,
235
256
  cwd: join(ELECTROBUN_DEP_PATH, 'dist'),
257
+ preservePaths: false,
258
+ strip: 0,
259
+ // Add Windows-specific options for more robust extraction
260
+ ...(OS === 'win' && {
261
+ noMtime: true,
262
+ preserveOwner: false,
263
+ }),
236
264
  });
237
265
 
238
266
  // Clean up temp file