superprint 1.0.0 → 1.0.2

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/cli.mjs +16 -5
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -18,7 +18,7 @@ const isWin = process.platform === 'win32';
18
18
 
19
19
  // ── URLs & chemins ────────────────────────────────────────────
20
20
  const APP_VERSION_URL = 'https://superprint.cc/version.txt';
21
- const APP_ZIP_URL = 'https://superprint.cc/sp213-local.zip';
21
+ const APP_ZIP_URL = 'https://app.zigmoon.com/sp213-local.zip';
22
22
  const APP_DIR = path.join(os.homedir(), '.superprint', 'app');
23
23
  const ZIP_PATH = path.join(os.homedir(), '.superprint', 'sp213-local.zip');
24
24
  const VERSION_FILE = path.join(APP_DIR, 'version.txt');
@@ -59,7 +59,7 @@ function fail(m) {
59
59
  console.log('');
60
60
  console.log(C.bgRed + C.white + ' ERREUR ' + C.reset);
61
61
  console.log(C.red + ' ' + m + C.reset);
62
- console.log(C.dim + ' Téléchargez manuellement : https://superprint.cc/sp213-local.zip' + C.reset);
62
+ console.log(C.dim + ' Téléchargez manuellement : https://app.zigmoon.com/sp213-local.zip' + C.reset);
63
63
  }
64
64
 
65
65
  // ── Helpers réseau ────────────────────────────────────────────
@@ -191,11 +191,22 @@ async function main() {
191
191
  if (!existsSync(path.join(APP_DIR, 'node_modules'))) {
192
192
  step(4, 'Installation des dépendances (npm install)');
193
193
  info('Première installation : quelques minutes. Les suivantes seront instantanées.');
194
- const npmCmd = isWin ? 'npm.cmd' : 'npm';
195
- const r = spawnSync(npmCmd, ['install', '--no-audit', '--no-fund'], {
196
- stdio: 'inherit', cwd: APP_DIR
194
+ // shell:true nécessaire sur Windows pour lancer npm (les wrappers .cmd
195
+ // échouent avec EINVAL via spawnSync sans shell).
196
+ const r = spawnSync('npm', ['install', '--no-audit', '--no-fund'], {
197
+ stdio: 'inherit', cwd: APP_DIR, shell: true
197
198
  });
198
199
  if (r.status !== 0) { fail('Échec de npm install.'); process.exit(1); }
200
+ // npm 12+ bloque les scripts d'installation (ex: esbuild a besoin de son
201
+ // postinstall pour placer son binaire natif). On approuve tout : c'est notre
202
+ // propre application, elle est de confiance.
203
+ const appr = spawnSync('npm', ['install-scripts', 'approve', '--all'], {
204
+ stdio: 'inherit', cwd: APP_DIR, shell: true
205
+ });
206
+ if (appr.status !== 0) {
207
+ // Commande absente (npm < 12) : sans importance, les scripts tournent par défaut.
208
+ warn('Approbation des scripts d’installation non disponible — ignoré.');
209
+ }
199
210
  ok('Dépendances installées.');
200
211
  } else {
201
212
  info('Dépendances déjà installées.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superprint",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "SuperPrint — logiciel de PAO (mise en page) gratuit + studio SP213 de maquettes par IA. 100% local, aucun CDN, aucune donnée ne quitte votre machine.",
5
5
  "keywords": [
6
6
  "superprint",