@notask/unity-cli-tools 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.
- package/CHANGELOG.md +15 -0
- package/README.md +1 -1
- package/{dist-cjs → dist/cjs}/unityHub.js +5 -2
- package/dist/{unityHub.d.ts → esm/unityHub.d.ts} +1 -1
- package/dist/{unityHub.js → esm/unityHub.js} +5 -2
- package/dist-tar/notask-unity-cli-tools-1.0.2.tgz +0 -0
- package/package.json +7 -7
- package/.nvmrc +0 -0
- package/.prettierrc +0 -8
- package/dist-cjs.zip +0 -0
- package/dist-esm.zip +0 -0
- package/dist-tar/notask-unity-cli-tools-1.0.0.tgz +0 -0
- package/eslint.config.js +0 -60
- package/scripts/write-cjs-package.cjs +0 -9
- /package/{dist-cjs → dist/cjs}/index.js +0 -0
- /package/{dist-cjs → dist/cjs}/package.json +0 -0
- /package/{dist-cjs → dist/cjs}/types/unity.js +0 -0
- /package/{dist-cjs → dist/cjs}/utils/commandExecutor.js +0 -0
- /package/dist/{index.d.ts → esm/index.d.ts} +0 -0
- /package/dist/{index.js → esm/index.js} +0 -0
- /package/dist/{types → esm/types}/unity.d.ts +0 -0
- /package/dist/{types → esm/types}/unity.js +0 -0
- /package/dist/{utils → esm/utils}/commandExecutor.d.ts +0 -0
- /package/dist/{utils → esm/utils}/commandExecutor.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.0.2](https://github.com/NoTaskStudios/unity-cli-tools/compare/1.0.1...1.0.2) (2025-04-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **Build:** wrong modules references ([c5ec8c3](https://github.com/NoTaskStudios/unity-cli-tools/commit/c5ec8c3e295b147703bd07029d28e081daf78c86))
|
|
7
|
+
* **Hub:** way to get hub versions by filtering ([ae7b497](https://github.com/NoTaskStudios/unity-cli-tools/commit/ae7b49742c64c816b3b147ef7feeebf5386ca54c))
|
|
8
|
+
|
|
9
|
+
## [1.0.1](https://github.com/NoTaskStudios/unity-cli-tools/compare/1.0.0...1.0.1) (2025-04-23)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **Build:** outputting correct output folder ([8c20b2c](https://github.com/NoTaskStudios/unity-cli-tools/commit/8c20b2c6db2ff83fc37e88ce8e95fc3fce816418))
|
|
15
|
+
|
|
1
16
|
# 1.0.0 (2025-04-22)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -101,8 +101,11 @@ class UnityHub {
|
|
|
101
101
|
}
|
|
102
102
|
console.debug(`Install path set to: ${stdout}`);
|
|
103
103
|
}
|
|
104
|
-
static async getUnityInstallations() {
|
|
105
|
-
|
|
104
|
+
static async getUnityInstallations(filter = "i") {
|
|
105
|
+
if (!["i", "a", "r"].includes(filter)) {
|
|
106
|
+
throw new Error(`Invalid filter "${filter}". Use "i" for installed, "a" for all, or "r" for available releases.`);
|
|
107
|
+
}
|
|
108
|
+
const { stdout, stderr } = await this.execUnityHubCommand(["editors", `-${filter}`], {
|
|
106
109
|
reject: false,
|
|
107
110
|
});
|
|
108
111
|
const isSuccess = stdout.includes(", installed at");
|
|
@@ -13,7 +13,7 @@ declare class UnityHub {
|
|
|
13
13
|
static execUnityHubCommand(args: string[], options?: CommandOptions): Promise<CommandResult>;
|
|
14
14
|
static getInstallPath(): Promise<string>;
|
|
15
15
|
static setInstallPath(path: string): Promise<void>;
|
|
16
|
-
static getUnityInstallations(): Promise<UnityInstallations>;
|
|
16
|
+
static getUnityInstallations(filter?: string): Promise<UnityInstallations>;
|
|
17
17
|
static addModule(editorVersion: string, modules: ModuleId[], childModules?: boolean): Promise<void>;
|
|
18
18
|
static addEditor(version: string, changeset?: string, modules?: ModuleId[], architecture?: EditorArchitecture): Promise<void>;
|
|
19
19
|
static getProjects(): Promise<{
|
|
@@ -96,8 +96,11 @@ class UnityHub {
|
|
|
96
96
|
}
|
|
97
97
|
console.debug(`Install path set to: ${stdout}`);
|
|
98
98
|
}
|
|
99
|
-
static async getUnityInstallations() {
|
|
100
|
-
|
|
99
|
+
static async getUnityInstallations(filter = "i") {
|
|
100
|
+
if (!["i", "a", "r"].includes(filter)) {
|
|
101
|
+
throw new Error(`Invalid filter "${filter}". Use "i" for installed, "a" for all, or "r" for available releases.`);
|
|
102
|
+
}
|
|
103
|
+
const { stdout, stderr } = await this.execUnityHubCommand(["editors", `-${filter}`], {
|
|
101
104
|
reject: false,
|
|
102
105
|
});
|
|
103
106
|
const isSuccess = stdout.includes(", installed at");
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notask/unity-cli-tools",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"main": "dist
|
|
5
|
-
"module": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"main": "dist/cjs/index.js",
|
|
5
|
+
"module": "dist/esm/index.js",
|
|
6
|
+
"types": "dist/esm/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"require": "./dist
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
10
|
+
"import": "./dist/esm/index.js",
|
|
11
|
+
"require": "./dist/cjs/index.js",
|
|
12
|
+
"types": "./dist/esm/index.d.ts"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"private": false,
|
package/.nvmrc
DELETED
|
Binary file
|
package/.prettierrc
DELETED
package/dist-cjs.zip
DELETED
|
Binary file
|
package/dist-esm.zip
DELETED
|
Binary file
|
|
Binary file
|
package/eslint.config.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import js from "@eslint/js";
|
|
2
|
-
import tseslint from "typescript-eslint";
|
|
3
|
-
import { defineConfig } from "eslint/config";
|
|
4
|
-
|
|
5
|
-
export default defineConfig([
|
|
6
|
-
{
|
|
7
|
-
files: ["**/*.{js,mjs,cjs,ts}"],
|
|
8
|
-
plugins: { js },
|
|
9
|
-
extends: ["js/recommended"],
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
files: ["**/*.{js,mjs,cjs,ts}"],
|
|
13
|
-
},
|
|
14
|
-
...tseslint.configs.recommended,
|
|
15
|
-
{
|
|
16
|
-
files: ["**/*.ts"],
|
|
17
|
-
languageOptions: {
|
|
18
|
-
parser: tseslint.parser,
|
|
19
|
-
parserOptions: {
|
|
20
|
-
project: "./tsconfig.json",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
plugins: {
|
|
24
|
-
"@typescript-eslint": tseslint.plugin,
|
|
25
|
-
},
|
|
26
|
-
rules: {
|
|
27
|
-
// Disable JS rule and enable TS equivalent
|
|
28
|
-
"no-unused-vars": "off",
|
|
29
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
|
30
|
-
|
|
31
|
-
// Typed linting rules
|
|
32
|
-
"@typescript-eslint/explicit-function-return-type": "error",
|
|
33
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
34
|
-
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
35
|
-
"@typescript-eslint/no-floating-promises": "error",
|
|
36
|
-
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
37
|
-
"@typescript-eslint/prefer-optional-chain": "error",
|
|
38
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
39
|
-
"@typescript-eslint/no-unnecessary-condition": "warn",
|
|
40
|
-
"@typescript-eslint/prefer-ts-expect-error": "error",
|
|
41
|
-
"@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
|
|
42
|
-
|
|
43
|
-
// Code style
|
|
44
|
-
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
45
|
-
"@typescript-eslint/consistent-type-assertions": "error",
|
|
46
|
-
"@typescript-eslint/explicit-member-accessibility": ["error", { accessibility: "explicit" }],
|
|
47
|
-
"@typescript-eslint/no-non-null-assertion": "error",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
files: ["eslint.config.js"],
|
|
52
|
-
rules: {
|
|
53
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
54
|
-
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
ignores: ["node_modules", "dist", "dist-cjs", "**/*.cjs"],
|
|
59
|
-
},
|
|
60
|
-
]);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const fs = require("fs");
|
|
3
|
-
const path = require("path");
|
|
4
|
-
|
|
5
|
-
const outDir = path.resolve(__dirname, "..", "dist-cjs");
|
|
6
|
-
fs.mkdirSync(outDir, { recursive: true });
|
|
7
|
-
|
|
8
|
-
const pkg = { type: "commonjs" };
|
|
9
|
-
fs.writeFileSync(path.join(outDir, "package.json"), JSON.stringify(pkg, null, 2) + "\n");
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|