electrobun 0.0.19-beta.37 → 0.0.19-beta.47

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 +32 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrobun",
3
- "version": "0.0.19-beta.37",
3
+ "version": "0.0.19-beta.47",
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
@@ -162,17 +162,21 @@ async function ensureCoreDependencies() {
162
162
  const distPath = join(ELECTROBUN_DEP_PATH, 'dist');
163
163
  mkdirSync(distPath, { recursive: true });
164
164
 
165
- await tar.x({
166
- file: tempFile,
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
- }),
175
- });
165
+ // Use Windows native tar.exe on Windows due to npm tar library issues
166
+ if (OS === 'win') {
167
+ console.log('Using Windows native tar.exe for reliable extraction...');
168
+ execSync(`tar -xf "${tempFile}" -C "${distPath}"`, {
169
+ stdio: 'inherit',
170
+ cwd: distPath
171
+ });
172
+ } else {
173
+ await tar.x({
174
+ file: tempFile,
175
+ cwd: distPath,
176
+ preservePaths: false,
177
+ strip: 0,
178
+ });
179
+ }
176
180
 
177
181
  // Clean up temp file
178
182
  unlinkSync(tempFile);
@@ -264,17 +268,23 @@ async function ensureCEFDependencies() {
264
268
 
265
269
  // Extract to dist directory
266
270
  console.log('Extracting CEF dependencies...');
267
- await tar.x({
268
- file: tempFile,
269
- cwd: join(ELECTROBUN_DEP_PATH, 'dist'),
270
- preservePaths: false,
271
- strip: 0,
272
- // Add Windows-specific options for more robust extraction
273
- ...(OS === 'win' && {
274
- noMtime: true,
275
- preserveOwner: false,
276
- }),
277
- });
271
+ const cefDistPath = join(ELECTROBUN_DEP_PATH, 'dist');
272
+
273
+ // Use Windows native tar.exe on Windows due to npm tar library issues
274
+ if (OS === 'win') {
275
+ console.log('Using Windows native tar.exe for reliable extraction...');
276
+ execSync(`tar -xf "${tempFile}" -C "${cefDistPath}"`, {
277
+ stdio: 'inherit',
278
+ cwd: cefDistPath
279
+ });
280
+ } else {
281
+ await tar.x({
282
+ file: tempFile,
283
+ cwd: cefDistPath,
284
+ preservePaths: false,
285
+ strip: 0,
286
+ });
287
+ }
278
288
 
279
289
  // Clean up temp file
280
290
  unlinkSync(tempFile);