uloop-cli 0.62.2 → 0.62.3
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/cli.bundle.cjs +25 -22
- package/dist/cli.bundle.cjs.map +2 -2
- package/package.json +1 -1
- package/src/cli.ts +27 -22
- package/src/default-tools.json +1 -1
- package/src/version.ts +1 -1
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -38,6 +38,8 @@ interface CliOptions extends GlobalOptions {
|
|
|
38
38
|
[key: string]: unknown;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
const LAUNCH_COMMAND = 'launch' as const;
|
|
42
|
+
|
|
41
43
|
const BUILTIN_COMMANDS = [
|
|
42
44
|
'list',
|
|
43
45
|
'sync',
|
|
@@ -45,7 +47,7 @@ const BUILTIN_COMMANDS = [
|
|
|
45
47
|
'update',
|
|
46
48
|
'fix',
|
|
47
49
|
'skills',
|
|
48
|
-
|
|
50
|
+
LAUNCH_COMMAND,
|
|
49
51
|
'focus-window',
|
|
50
52
|
] as const;
|
|
51
53
|
|
|
@@ -751,24 +753,30 @@ async function main(): Promise<void> {
|
|
|
751
753
|
return;
|
|
752
754
|
}
|
|
753
755
|
|
|
754
|
-
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
console.log(
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
console.
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
756
|
+
const args = process.argv.slice(2);
|
|
757
|
+
const cmdName = args.find((arg) => !arg.startsWith('-'));
|
|
758
|
+
|
|
759
|
+
// launch starts Unity, so it cannot connect to Unity for sync
|
|
760
|
+
if (cmdName !== LAUNCH_COMMAND) {
|
|
761
|
+
// Check if cache version is outdated and auto-sync if needed
|
|
762
|
+
const cachedVersion = loadToolsCache().version;
|
|
763
|
+
if (hasCacheFile() && cachedVersion !== VERSION) {
|
|
764
|
+
console.log(
|
|
765
|
+
`\x1b[33mCache outdated (${cachedVersion} → ${VERSION}). Syncing tools from Unity...\x1b[0m`,
|
|
766
|
+
);
|
|
767
|
+
try {
|
|
768
|
+
await syncTools({});
|
|
769
|
+
console.log('\x1b[32m✓ Tools synced successfully.\x1b[0m\n');
|
|
770
|
+
} catch (error) {
|
|
771
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
772
|
+
if (isConnectionError(message)) {
|
|
773
|
+
console.error('\x1b[33mWarning: Failed to sync tools. Using cached definitions.\x1b[0m');
|
|
774
|
+
console.error("\x1b[33mRun 'uloop sync' manually when Unity is available.\x1b[0m\n");
|
|
775
|
+
} else {
|
|
776
|
+
console.error('\x1b[33mWarning: Failed to sync tools. Using cached definitions.\x1b[0m');
|
|
777
|
+
console.error(`\x1b[33mError: ${message}\x1b[0m`);
|
|
778
|
+
console.error("\x1b[33mRun 'uloop sync' manually when Unity is available.\x1b[0m\n");
|
|
779
|
+
}
|
|
772
780
|
}
|
|
773
781
|
}
|
|
774
782
|
}
|
|
@@ -779,9 +787,6 @@ async function main(): Promise<void> {
|
|
|
779
787
|
registerToolCommand(tool);
|
|
780
788
|
}
|
|
781
789
|
|
|
782
|
-
const args = process.argv.slice(2);
|
|
783
|
-
const cmdName = args.find((arg) => !arg.startsWith('-'));
|
|
784
|
-
|
|
785
790
|
if (cmdName && !commandExists(cmdName)) {
|
|
786
791
|
console.log(`\x1b[33mUnknown command '${cmdName}'. Syncing tools from Unity...\x1b[0m`);
|
|
787
792
|
try {
|
package/src/default-tools.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* This file exists to avoid bundling the entire package.json into the CLI bundle.
|
|
5
5
|
* This version is automatically updated by release-please.
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = '0.62.
|
|
7
|
+
export const VERSION = '0.62.3'; // x-release-please-version
|