@orbitpanel/cli 0.4.1 → 0.4.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.
- package/dist/hooks/init.d.ts +1 -1
- package/dist/hooks/init.js +20 -2
- package/dist/hooks/init.js.map +1 -1
- package/oclif.manifest.json +71 -71
- package/package.json +4 -2
package/dist/hooks/init.d.ts
CHANGED
package/dist/hooks/init.js
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
1
2
|
/**
|
|
2
|
-
* Init hook — redirects bare `orbit`
|
|
3
|
+
* Init hook — update check + redirects bare `orbit` to interactive shell.
|
|
3
4
|
*/
|
|
4
5
|
const hook = async function (options) {
|
|
6
|
+
// Check for updates (non-blocking)
|
|
7
|
+
try {
|
|
8
|
+
const updateNotifier = (await import('update-notifier')).default;
|
|
9
|
+
const pkg = { name: '@orbitpanel/cli', version: options.config.version };
|
|
10
|
+
const notifier = updateNotifier({ pkg, updateCheckInterval: 1000 * 60 * 60 * 4 }); // every 4h
|
|
11
|
+
if (notifier.update && notifier.update.latest !== options.config.version) {
|
|
12
|
+
const latest = notifier.update.latest;
|
|
13
|
+
console.log('');
|
|
14
|
+
console.log(chalk.hex('#2563EB')(` ┌─ Aggiornamento disponibile: ${chalk.dim(options.config.version)} → ${chalk.bold(latest)}`));
|
|
15
|
+
console.log(chalk.hex('#2563EB')(` │ ${chalk.white(`npm update -g @orbitpanel/cli`)}`));
|
|
16
|
+
console.log(chalk.hex('#2563EB')(` └─`));
|
|
17
|
+
console.log('');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// Silently ignore update check failures
|
|
22
|
+
}
|
|
23
|
+
// Bare `orbit` → interactive shell
|
|
5
24
|
if (!options.id && (!options.argv || options.argv.length === 0)) {
|
|
6
25
|
const { startShell } = await import('../lib/shell.js');
|
|
7
26
|
await startShell(options.config.version);
|
|
8
|
-
// Shell has exited cleanly — stop oclif from showing help
|
|
9
27
|
process.exit(0);
|
|
10
28
|
}
|
|
11
29
|
};
|
package/dist/hooks/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/hooks/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/hooks/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,IAAI,GAAc,KAAK,WAAW,OAAO;IAC7C,mCAAmC;IACnC,IAAI,CAAC;QACH,MAAM,cAAc,GAAG,CAAC,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC;QACjE,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACzE,MAAM,QAAQ,GAAG,cAAc,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW;QAE9F,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACzE,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,mCAAmC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;YAClI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,QAAQ,KAAK,CAAC,KAAK,CAAC,+BAA+B,CAAC,EAAE,CAAC,CAAC,CAAC;YAC1F,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,wCAAwC;IAC1C,CAAC;IAED,mCAAmC;IACnC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;QAChE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACvD,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -592,6 +592,76 @@
|
|
|
592
592
|
"add.js"
|
|
593
593
|
]
|
|
594
594
|
},
|
|
595
|
+
"session:end": {
|
|
596
|
+
"aliases": [],
|
|
597
|
+
"args": {},
|
|
598
|
+
"description": "Chiude la sessione attiva, cattura il commit finale\ne mostra un riepilogo del lavoro svolto.",
|
|
599
|
+
"examples": [
|
|
600
|
+
"<%= config.bin %> session end",
|
|
601
|
+
"<%= config.bin %> session end --summary \"Completato refactor homepage\""
|
|
602
|
+
],
|
|
603
|
+
"flags": {
|
|
604
|
+
"summary": {
|
|
605
|
+
"char": "s",
|
|
606
|
+
"description": "Summary finale del lavoro svolto",
|
|
607
|
+
"name": "summary",
|
|
608
|
+
"hasDynamicHelp": false,
|
|
609
|
+
"multiple": false,
|
|
610
|
+
"type": "option"
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
"hasDynamicHelp": false,
|
|
614
|
+
"hiddenAliases": [],
|
|
615
|
+
"id": "session:end",
|
|
616
|
+
"pluginAlias": "@orbitpanel/cli",
|
|
617
|
+
"pluginName": "@orbitpanel/cli",
|
|
618
|
+
"pluginType": "core",
|
|
619
|
+
"strict": true,
|
|
620
|
+
"summary": "Chiude la sessione di lavoro corrente",
|
|
621
|
+
"enableJsonFlag": false,
|
|
622
|
+
"isESM": true,
|
|
623
|
+
"relativePath": [
|
|
624
|
+
"dist",
|
|
625
|
+
"commands",
|
|
626
|
+
"session",
|
|
627
|
+
"end.js"
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
"session:start": {
|
|
631
|
+
"aliases": [],
|
|
632
|
+
"args": {},
|
|
633
|
+
"description": "Avvia una sessione di lavoro collegata al sito Orbit.\nCattura automaticamente branch git e commit corrente.",
|
|
634
|
+
"examples": [
|
|
635
|
+
"<%= config.bin %> session start",
|
|
636
|
+
"<%= config.bin %> session start --note \"Refactor homepage\""
|
|
637
|
+
],
|
|
638
|
+
"flags": {
|
|
639
|
+
"note": {
|
|
640
|
+
"char": "n",
|
|
641
|
+
"description": "Nota iniziale sulla sessione",
|
|
642
|
+
"name": "note",
|
|
643
|
+
"hasDynamicHelp": false,
|
|
644
|
+
"multiple": false,
|
|
645
|
+
"type": "option"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"hasDynamicHelp": false,
|
|
649
|
+
"hiddenAliases": [],
|
|
650
|
+
"id": "session:start",
|
|
651
|
+
"pluginAlias": "@orbitpanel/cli",
|
|
652
|
+
"pluginName": "@orbitpanel/cli",
|
|
653
|
+
"pluginType": "core",
|
|
654
|
+
"strict": true,
|
|
655
|
+
"summary": "Inizia una sessione di lavoro locale",
|
|
656
|
+
"enableJsonFlag": false,
|
|
657
|
+
"isESM": true,
|
|
658
|
+
"relativePath": [
|
|
659
|
+
"dist",
|
|
660
|
+
"commands",
|
|
661
|
+
"session",
|
|
662
|
+
"start.js"
|
|
663
|
+
]
|
|
664
|
+
},
|
|
595
665
|
"report:send": {
|
|
596
666
|
"aliases": [],
|
|
597
667
|
"args": {},
|
|
@@ -677,77 +747,7 @@
|
|
|
677
747
|
"report",
|
|
678
748
|
"send.js"
|
|
679
749
|
]
|
|
680
|
-
},
|
|
681
|
-
"session:end": {
|
|
682
|
-
"aliases": [],
|
|
683
|
-
"args": {},
|
|
684
|
-
"description": "Chiude la sessione attiva, cattura il commit finale\ne mostra un riepilogo del lavoro svolto.",
|
|
685
|
-
"examples": [
|
|
686
|
-
"<%= config.bin %> session end",
|
|
687
|
-
"<%= config.bin %> session end --summary \"Completato refactor homepage\""
|
|
688
|
-
],
|
|
689
|
-
"flags": {
|
|
690
|
-
"summary": {
|
|
691
|
-
"char": "s",
|
|
692
|
-
"description": "Summary finale del lavoro svolto",
|
|
693
|
-
"name": "summary",
|
|
694
|
-
"hasDynamicHelp": false,
|
|
695
|
-
"multiple": false,
|
|
696
|
-
"type": "option"
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
"hasDynamicHelp": false,
|
|
700
|
-
"hiddenAliases": [],
|
|
701
|
-
"id": "session:end",
|
|
702
|
-
"pluginAlias": "@orbitpanel/cli",
|
|
703
|
-
"pluginName": "@orbitpanel/cli",
|
|
704
|
-
"pluginType": "core",
|
|
705
|
-
"strict": true,
|
|
706
|
-
"summary": "Chiude la sessione di lavoro corrente",
|
|
707
|
-
"enableJsonFlag": false,
|
|
708
|
-
"isESM": true,
|
|
709
|
-
"relativePath": [
|
|
710
|
-
"dist",
|
|
711
|
-
"commands",
|
|
712
|
-
"session",
|
|
713
|
-
"end.js"
|
|
714
|
-
]
|
|
715
|
-
},
|
|
716
|
-
"session:start": {
|
|
717
|
-
"aliases": [],
|
|
718
|
-
"args": {},
|
|
719
|
-
"description": "Avvia una sessione di lavoro collegata al sito Orbit.\nCattura automaticamente branch git e commit corrente.",
|
|
720
|
-
"examples": [
|
|
721
|
-
"<%= config.bin %> session start",
|
|
722
|
-
"<%= config.bin %> session start --note \"Refactor homepage\""
|
|
723
|
-
],
|
|
724
|
-
"flags": {
|
|
725
|
-
"note": {
|
|
726
|
-
"char": "n",
|
|
727
|
-
"description": "Nota iniziale sulla sessione",
|
|
728
|
-
"name": "note",
|
|
729
|
-
"hasDynamicHelp": false,
|
|
730
|
-
"multiple": false,
|
|
731
|
-
"type": "option"
|
|
732
|
-
}
|
|
733
|
-
},
|
|
734
|
-
"hasDynamicHelp": false,
|
|
735
|
-
"hiddenAliases": [],
|
|
736
|
-
"id": "session:start",
|
|
737
|
-
"pluginAlias": "@orbitpanel/cli",
|
|
738
|
-
"pluginName": "@orbitpanel/cli",
|
|
739
|
-
"pluginType": "core",
|
|
740
|
-
"strict": true,
|
|
741
|
-
"summary": "Inizia una sessione di lavoro locale",
|
|
742
|
-
"enableJsonFlag": false,
|
|
743
|
-
"isESM": true,
|
|
744
|
-
"relativePath": [
|
|
745
|
-
"dist",
|
|
746
|
-
"commands",
|
|
747
|
-
"session",
|
|
748
|
-
"start.js"
|
|
749
|
-
]
|
|
750
750
|
}
|
|
751
751
|
},
|
|
752
|
-
"version": "0.4.
|
|
752
|
+
"version": "0.4.2"
|
|
753
753
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbitpanel/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Orbit CLI — strumento locale per sviluppatori OrbitPanel",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,13 +46,15 @@
|
|
|
46
46
|
"ink-text-input": "^6.0.0",
|
|
47
47
|
"ora": "^9.3.0",
|
|
48
48
|
"react": "^19.2.4",
|
|
49
|
-
"terminal-link": "^5.0.0"
|
|
49
|
+
"terminal-link": "^5.0.0",
|
|
50
|
+
"update-notifier": "^7.3.1"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@oclif/test": "^4.0.0",
|
|
53
54
|
"@types/gradient-string": "^1.1.6",
|
|
54
55
|
"@types/node": "^22.0.0",
|
|
55
56
|
"@types/react": "^19.2.14",
|
|
57
|
+
"@types/update-notifier": "^6.0.8",
|
|
56
58
|
"oclif": "^4.0.0",
|
|
57
59
|
"tsx": "^4.19.0",
|
|
58
60
|
"typescript": "^5.7.0",
|