@atom-js-org/cli 0.4.4-alpha.0 → 0.4.5-alpha.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atom-js-org/cli",
3
- "version": "0.4.4-alpha.0",
3
+ "version": "0.4.5-alpha.0",
4
4
  "description": "CLI for running and building AtomJS desktop applications.",
5
5
  "bin": {
6
6
  "atom": "bin/atom.cjs"
package/src/build.cjs CHANGED
@@ -107,7 +107,7 @@ async function localBuild(project, target, options = {}) {
107
107
  }
108
108
 
109
109
  const manifest = {
110
- atomjsVersion: '0.4.4-alpha.0',
110
+ atomjsVersion: '0.4.5-alpha.0',
111
111
  target,
112
112
  productName,
113
113
  appId: project.config.appId,
@@ -724,12 +724,36 @@ ${iconEntry}
724
724
  }
725
725
  outputs.push(zipPath);
726
726
 
727
- if (commandExists('hdiutil', ['help'])) {
727
+ if (commandExists('/usr/bin/hdiutil', ['help'])) {
728
728
  const dmgPath = path.join(buildRoot, `${productName}.dmg`);
729
- await run('hdiutil', ['create', '-volname', productName, '-srcfolder', finalAppBundle, '-ov', '-format', 'UDZO', dmgPath], {
730
- env: { ...process.env, COPYFILE_DISABLE: '1' }
731
- });
732
- outputs.push(dmgPath);
729
+ const temporaryDmgPath = path.join(bundleStageRoot, `${productName}.dmg`);
730
+
731
+ try {
732
+ // hdiutil can reject both source and output paths located on external,
733
+ // removable, network, or non-APFS volumes. Create the image entirely on
734
+ // the local temporary filesystem, then copy the finished DMG to build/.
735
+ await fse.remove(temporaryDmgPath);
736
+ await run('/usr/bin/hdiutil', [
737
+ 'create',
738
+ '-volname', productName,
739
+ '-srcfolder', appBundle,
740
+ '-ov',
741
+ '-format', 'UDZO',
742
+ temporaryDmgPath
743
+ ], {
744
+ env: { ...process.env, COPYFILE_DISABLE: '1' }
745
+ });
746
+
747
+ await fse.remove(dmgPath);
748
+ await fs.promises.copyFile(temporaryDmgPath, dmgPath);
749
+ outputs.push(dmgPath);
750
+ } catch (error) {
751
+ await fse.remove(temporaryDmgPath);
752
+ await fse.remove(dmgPath);
753
+
754
+ if (process.env.ATOM_REQUIRE_DMG === '1') throw error;
755
+ console.warn(`AtomJS could not create the optional macOS DMG; the signed .app and ZIP are still valid. ${error.message}`);
756
+ }
733
757
  }
734
758
 
735
759
  return { outputs, appBundle: finalAppBundle };
package/src/init.cjs CHANGED
@@ -30,14 +30,14 @@ async function initCommand(directory, options = {}) {
30
30
  start: 'atom run build'
31
31
  },
32
32
  dependencies: {
33
- '@atom-js-org/runtime': '0.4.4-alpha.0',
34
- electron: 'npm:@atom-js-org/electron@0.4.4-alpha.0'
33
+ '@atom-js-org/runtime': '0.4.5-alpha.0',
34
+ electron: 'npm:@atom-js-org/electron@0.4.5-alpha.0'
35
35
  },
36
36
  optionalDependencies: {
37
37
  'webview-nodejs': '0.5.0'
38
38
  },
39
39
  devDependencies: {
40
- '@atom-js-org/cli': '0.4.4-alpha.0'
40
+ '@atom-js-org/cli': '0.4.5-alpha.0'
41
41
  },
42
42
  overrides: {
43
43
  tar: '7.5.20'