@rage-against-the-pixel/unity-cli 3.0.2 → 4.0.1

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 (51) hide show
  1. package/README.md +86 -224
  2. package/dist/android-sdk.js +8 -1
  3. package/dist/android-sdk.js.map +1 -1
  4. package/dist/cli.js +180 -505
  5. package/dist/cli.js.map +1 -1
  6. package/dist/failure-markers.d.ts +17 -0
  7. package/dist/failure-markers.js +46 -0
  8. package/dist/failure-markers.js.map +1 -0
  9. package/dist/github-actions-ci.d.ts +1 -0
  10. package/dist/github-actions-ci.js +17 -3
  11. package/dist/github-actions-ci.js.map +1 -1
  12. package/dist/index.d.ts +2 -2
  13. package/dist/index.js +2 -2
  14. package/dist/index.js.map +1 -1
  15. package/dist/license-client.d.ts +119 -2
  16. package/dist/license-client.js +737 -56
  17. package/dist/license-client.js.map +1 -1
  18. package/dist/logger-provider.d.ts +2 -0
  19. package/dist/logger-provider.js +3 -0
  20. package/dist/logger-provider.js.map +1 -1
  21. package/dist/logging.d.ts +5 -0
  22. package/dist/logging.js +47 -0
  23. package/dist/logging.js.map +1 -1
  24. package/dist/process-tracker.d.ts +71 -0
  25. package/dist/process-tracker.js +213 -0
  26. package/dist/process-tracker.js.map +1 -0
  27. package/dist/unity-cli.d.ts +97 -0
  28. package/dist/unity-cli.js +591 -0
  29. package/dist/unity-cli.js.map +1 -0
  30. package/dist/unity-editor.d.ts +25 -16
  31. package/dist/unity-editor.js +204 -107
  32. package/dist/unity-editor.js.map +1 -1
  33. package/dist/unity-installer.d.ts +139 -0
  34. package/dist/unity-installer.js +1018 -0
  35. package/dist/unity-installer.js.map +1 -0
  36. package/dist/unity-logging.d.ts +16 -1
  37. package/dist/unity-logging.js +55 -3
  38. package/dist/unity-logging.js.map +1 -1
  39. package/dist/unity-project.d.ts +15 -0
  40. package/dist/unity-project.js +80 -0
  41. package/dist/unity-project.js.map +1 -1
  42. package/dist/upm-cli.d.ts +8 -8
  43. package/dist/upm-cli.js +8 -8
  44. package/dist/upm-cli.js.map +1 -1
  45. package/dist/utilities.d.ts +27 -7
  46. package/dist/utilities.js +119 -63
  47. package/dist/utilities.js.map +1 -1
  48. package/package.json +10 -11
  49. package/dist/unity-hub.d.ts +0 -140
  50. package/dist/unity-hub.js +0 -1425
  51. package/dist/unity-hub.js.map +0 -1
@@ -1,140 +0,0 @@
1
- import { UnityEditor } from './unity-editor';
2
- import { UnityVersion } from './unity-version';
3
- import { ExecOptions } from './utilities';
4
- import { UnityRelease } from '@rage-against-the-pixel/unity-releases-api';
5
- /** Hub 3.20+ Electron Forge deb layout. */
6
- export declare const LINUX_HUB_EXECUTABLE_MODERN = "/usr/lib/unityhub/unityhub";
7
- /** Hub ≤3.19 fpm / electron-builder layout. */
8
- export declare const LINUX_HUB_EXECUTABLE_LEGACY = "/opt/unityhub/unityhub";
9
- /**
10
- * Resolves the Unity Hub binary on Linux.
11
- * Prefers UNITY_HUB_PATH, then the Hub 3.20+ path, then the legacy /opt path.
12
- * When neither is present (pre-install), defaults to the modern path.
13
- */
14
- export declare function resolveLinuxHubExecutable(envPath?: string | undefined, existsSync?: (p: string) => boolean): string;
15
- export declare class UnityHub {
16
- /** The path to the Unity Hub executable. */
17
- executable: string;
18
- /** The root directory of the Unity Hub installation. */
19
- rootDirectory: string;
20
- /** The file extension for the Unity editor executable. */
21
- readonly editorFileExtension: string;
22
- private readonly logger;
23
- constructor();
24
- /** Re-resolve Linux Hub executable + root after install/upgrade (Hub 3.20 moved under /usr/lib). */
25
- private refreshLinuxHubPaths;
26
- /**
27
- * Some Hub builds (notably Windows headless) occasionally exit non-zero after streaming usable
28
- * `editors --releases` / `editors -i` data. Tolerate only when the captured output parses the same
29
- * way {@link ListAvailableReleases} / {@link ListInstalledEditors} would (avoids regex false positives).
30
- */
31
- private hubListingExitTolerable;
32
- private isHubEditorListingArgs;
33
- private delayMs;
34
- /** Same parsing rules as {@link ListAvailableReleases}; must stay in sync. */
35
- private parseAvailableReleasesFromHubText;
36
- /** Same parsing rules as {@link ListInstalledEditors}; must stay in sync. */
37
- private parseInstalledEditorsFromHubText;
38
- /**
39
- * Executes the Unity Hub command with the specified arguments.
40
- * @param args Arguments to pass to the Unity Hub executable.
41
- * @param options Logging and spawn options for this invocation.
42
- * @returns The output from the command.
43
- */
44
- Exec(args: string[], options?: ExecOptions): Promise<string>;
45
- /**
46
- * @param listingRetryDepth 0 on first attempt; 1 after one listing-only retry (flaky Hub exits on Windows CI).
47
- */
48
- private execImpl;
49
- /**
50
- * Prints the installed Unity Hub version.
51
- * @returns The installed Unity Hub version.
52
- */
53
- Version(): Promise<string>;
54
- /**
55
- * Installs or updates the Unity Hub.
56
- * If the Unity Hub is already installed, it will be updated to the latest version.
57
- * @param autoUpdate If true, automatically updates the Unity Hub if it is already installed. Default is true.
58
- * @returns The path to the Unity Hub executable.
59
- */
60
- Install(autoUpdate: boolean | undefined, version: string | undefined): Promise<string>;
61
- /**
62
- * APT package spec for unityhub (e.g. `unityhub` or `unityhub=3.6.0`). Validated; passed as argv, not shell-embedded.
63
- */
64
- private unityHubAptPackageSpec;
65
- private installHub;
66
- private getInstalledHubVersion;
67
- private getLatestHubVersion;
68
- /**
69
- * Returns the path where the Unity editors will be installed.
70
- * @returns The editor install path.
71
- */
72
- GetInstallPath(): Promise<string>;
73
- /**
74
- * Sets the path where Unity editors will be installed.
75
- * @param installPath The install path to set when installing Unity editors.
76
- */
77
- SetInstallPath(installPath: string): Promise<void>;
78
- /**
79
- * Locate and associate an installed editor from a stipulated path.
80
- * @param editorPath The path to the Unity Editor installation.
81
- */
82
- AddEditor(editorPath: string): Promise<void>;
83
- /**
84
- * Attempts to find or install the specified Unity Editor version with the requested modules.
85
- * @param unityVersion The Unity version to find or install.
86
- * @param modules The modules to install alongside the editor.
87
- * @param channels The channels to consider when searching for the editor. Can be 'f' (final), 'p' (patch), 'b' (beta), 'a' (alpha), or 'x' (experimental). Default is ['f'].
88
- * @returns The path to the Unity Editor executable.
89
- */
90
- GetEditor(unityVersion: UnityVersion, modules?: string[], channels?: string[]): Promise<UnityEditor>;
91
- /**
92
- * Lists the installed Unity Editors.
93
- * @returns A list of installed Unity Editor versions and their paths.
94
- */
95
- ListInstalledEditors(): Promise<UnityEditor[]>;
96
- /**
97
- * Lists the available Unity releases.
98
- * @returns A list of available Unity release versions.
99
- */
100
- ListAvailableReleases(): Promise<UnityVersion[]>;
101
- private checkInstalledEditors;
102
- /**
103
- * Patches the Bee Backend for Unity Linux Editor.
104
- * https://discussions.unity.com/t/linux-editor-stuck-on-loading-because-of-bee-backend-w-workaround/854480
105
- * @param editorPath The path to the Unity Editor executable.
106
- */
107
- private patchBeeBackend;
108
- /**
109
- * Gets the specified Unity release info from the Unity Releases API.
110
- * Supports querying by exact version or by prefix (e.g., "2020", "2020.1", "2021.x", "2021.3.x").
111
- * @param unityVersion The Unity version to get the release info for.
112
- * @param channels Letter channels to accept (`f`, `p`, `b`, `a`, `x`). Default stable-only.
113
- * @returns The Unity release info.
114
- */
115
- GetEditorReleaseInfo(unityVersion: UnityVersion, channels?: string[]): Promise<UnityRelease>;
116
- private fallbackVersionLookup;
117
- private checkEditorModules;
118
- private getModulesContent;
119
- private installUnity;
120
- private installUnity4x;
121
- /**
122
- * Get the mapping of Unity platform targets to their corresponding module identifiers for the current OS.
123
- * @returns A map of Unity platform targets to their corresponding module identifiers for the current OS.
124
- */
125
- static GetPlatformTargetModuleMap(): {
126
- [key: string]: string;
127
- };
128
- /**
129
- * Returns the path to the Unity Hub log file.
130
- * @see https://docs.unity.com/en-us/licensing-server/troubleshooting-client#logs
131
- * @returns The Unity Hub log file path.
132
- */
133
- static LogPath(): string;
134
- /**
135
- * Returns the path to the Unity Package Manager log file.
136
- * @see https://docs.unity3d.com/Manual/LogFiles.html
137
- * @returns The Unity Package Manager log file path.
138
- */
139
- static PackageManagerLogsPath(): string;
140
- }