@wyxos/zephyr 0.2.10 → 0.2.12

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.
@@ -308,8 +308,38 @@ async function runBuild(skipBuild, pkg, rootDir = process.cwd()) {
308
308
  }
309
309
 
310
310
  logStep('Building project...')
311
- await runCommand('npm', ['run', 'build'], { cwd: rootDir })
312
- logSuccess('Build completed.')
311
+
312
+ let dotInterval = null
313
+ try {
314
+ // Capture output and show dots as progress
315
+ process.stdout.write(' ')
316
+ dotInterval = setInterval(() => {
317
+ process.stdout.write('.')
318
+ }, 200)
319
+
320
+ await runCommand('npm', ['run', 'build'], { capture: true, cwd: rootDir })
321
+
322
+ if (dotInterval) {
323
+ clearInterval(dotInterval)
324
+ dotInterval = null
325
+ }
326
+ process.stdout.write('\n')
327
+ logSuccess('Build completed.')
328
+ } catch (error) {
329
+ // Clear dots and show error output
330
+ if (dotInterval) {
331
+ clearInterval(dotInterval)
332
+ dotInterval = null
333
+ }
334
+ process.stdout.write('\n')
335
+ if (error.stdout) {
336
+ console.error(error.stdout)
337
+ }
338
+ if (error.stderr) {
339
+ console.error(error.stderr)
340
+ }
341
+ throw error
342
+ }
313
343
  }
314
344
 
315
345
  async function runLibBuild(skipBuild, pkg, rootDir = process.cwd()) {
@@ -324,8 +354,38 @@ async function runLibBuild(skipBuild, pkg, rootDir = process.cwd()) {
324
354
  }
325
355
 
326
356
  logStep('Building library...')
327
- await runCommand('npm', ['run', 'build:lib'], { cwd: rootDir })
328
- logSuccess('Library built.')
357
+
358
+ let dotInterval = null
359
+ try {
360
+ // Capture output and show dots as progress
361
+ process.stdout.write(' ')
362
+ dotInterval = setInterval(() => {
363
+ process.stdout.write('.')
364
+ }, 200)
365
+
366
+ await runCommand('npm', ['run', 'build:lib'], { capture: true, cwd: rootDir })
367
+
368
+ if (dotInterval) {
369
+ clearInterval(dotInterval)
370
+ dotInterval = null
371
+ }
372
+ process.stdout.write('\n')
373
+ logSuccess('Library built.')
374
+ } catch (error) {
375
+ // Clear dots and show error output
376
+ if (dotInterval) {
377
+ clearInterval(dotInterval)
378
+ dotInterval = null
379
+ }
380
+ process.stdout.write('\n')
381
+ if (error.stdout) {
382
+ console.error(error.stdout)
383
+ }
384
+ if (error.stderr) {
385
+ console.error(error.stderr)
386
+ }
387
+ throw error
388
+ }
329
389
 
330
390
  // Check for lib changes and commit them if any
331
391
  const { stdout: statusAfterBuild } = await runCommand('git', ['status', '--porcelain'], { capture: true, cwd: rootDir })
@@ -426,6 +486,15 @@ async function pushChanges(rootDir = process.cwd()) {
426
486
  }
427
487
 
428
488
  async function publishPackage(pkg, rootDir = process.cwd()) {
489
+ // Check if package is configured as private/restricted
490
+ const isPrivate = pkg.publishConfig?.access === 'restricted'
491
+
492
+ if (isPrivate) {
493
+ logWarning('Skipping npm publish (package is configured as private/restricted).')
494
+ logWarning('Private packages require npm paid plan. Publish manually or use GitHub Packages.')
495
+ return
496
+ }
497
+
429
498
  const publishArgs = ['publish', '--ignore-scripts'] // Skip prepublishOnly since we already built lib
430
499
 
431
500
  if (pkg.name.startsWith('@')) {
@@ -502,34 +571,62 @@ async function deployGHPages(skipDeploy, pkg, rootDir = process.cwd()) {
502
571
 
503
572
  const worktreeDir = path.resolve(rootDir, '.gh-pages')
504
573
 
574
+ let dotInterval = null
505
575
  try {
506
- await runCommand('git', ['worktree', 'remove', worktreeDir, '-f'], { cwd: rootDir })
507
- } catch { }
576
+ // Capture output and show dots as progress
577
+ process.stdout.write(' ')
578
+ dotInterval = setInterval(() => {
579
+ process.stdout.write('.')
580
+ }, 200)
508
581
 
509
- try {
510
- await runCommand('git', ['worktree', 'add', worktreeDir, 'gh-pages'], { cwd: rootDir })
511
- } catch {
512
- await runCommand('git', ['worktree', 'add', worktreeDir, '-b', 'gh-pages'], { cwd: rootDir })
513
- }
582
+ try {
583
+ await runCommand('git', ['worktree', 'remove', worktreeDir, '-f'], { capture: true, cwd: rootDir })
584
+ } catch { }
514
585
 
515
- await runCommand('git', ['-C', worktreeDir, 'config', 'user.name', 'wyxos'])
516
- await runCommand('git', ['-C', worktreeDir, 'config', 'user.email', 'github@wyxos.com'])
586
+ try {
587
+ await runCommand('git', ['worktree', 'add', worktreeDir, 'gh-pages'], { capture: true, cwd: rootDir })
588
+ } catch {
589
+ await runCommand('git', ['worktree', 'add', worktreeDir, '-b', 'gh-pages'], { capture: true, cwd: rootDir })
590
+ }
517
591
 
518
- // Clear worktree directory
519
- for (const entry of fs.readdirSync(worktreeDir)) {
520
- if (entry === '.git') continue
521
- const target = path.join(worktreeDir, entry)
522
- fs.rmSync(target, { recursive: true, force: true })
523
- }
592
+ await runCommand('git', ['-C', worktreeDir, 'config', 'user.name', 'wyxos'], { capture: true })
593
+ await runCommand('git', ['-C', worktreeDir, 'config', 'user.email', 'github@wyxos.com'], { capture: true })
594
+
595
+ // Clear worktree directory
596
+ for (const entry of fs.readdirSync(worktreeDir)) {
597
+ if (entry === '.git') continue
598
+ const target = path.join(worktreeDir, entry)
599
+ fs.rmSync(target, { recursive: true, force: true })
600
+ }
524
601
 
525
- // Copy dist to worktree
526
- fs.cpSync(distPath, worktreeDir, { recursive: true })
602
+ // Copy dist to worktree
603
+ fs.cpSync(distPath, worktreeDir, { recursive: true })
527
604
 
528
- await runCommand('git', ['-C', worktreeDir, 'add', '-A'])
529
- await runCommand('git', ['-C', worktreeDir, 'commit', '-m', `deploy: demo ${new Date().toISOString()}`, '--allow-empty'])
530
- await runCommand('git', ['-C', worktreeDir, 'push', '-f', 'origin', 'gh-pages'])
605
+ await runCommand('git', ['-C', worktreeDir, 'add', '-A'], { capture: true })
606
+ await runCommand('git', ['-C', worktreeDir, 'commit', '-m', `deploy: demo ${new Date().toISOString()}`, '--allow-empty'], { capture: true })
607
+ await runCommand('git', ['-C', worktreeDir, 'push', '-f', 'origin', 'gh-pages'], { capture: true })
531
608
 
532
- logSuccess('GitHub Pages deployment completed.')
609
+ if (dotInterval) {
610
+ clearInterval(dotInterval)
611
+ dotInterval = null
612
+ }
613
+ process.stdout.write('\n')
614
+ logSuccess('GitHub Pages deployment completed.')
615
+ } catch (error) {
616
+ // Clear dots and show error output
617
+ if (dotInterval) {
618
+ clearInterval(dotInterval)
619
+ dotInterval = null
620
+ }
621
+ process.stdout.write('\n')
622
+ if (error.stdout) {
623
+ console.error(error.stdout)
624
+ }
625
+ if (error.stderr) {
626
+ console.error(error.stderr)
627
+ }
628
+ throw error
629
+ }
533
630
  }
534
631
 
535
632
  export async function releaseNode() {