@litevar/vitul-cli 0.0.0-stage → 2.12.0
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 +2216 -0
- package/LICENSE-APACHE-2.0 +177 -0
- package/LICENSE-MIT +21 -0
- package/README-zh_CN.md +19 -0
- package/README.md +28 -2
- package/append-headers.js +15 -0
- package/config.schema.json +4089 -0
- package/index.d.ts +11 -0
- package/index.js +709 -0
- package/main.d.ts +13 -0
- package/main.js +22 -0
- package/package.json +70 -3
- package/vitul.js +14 -0
package/main.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
|
|
8
|
+
export function run(
|
|
9
|
+
args: Array<string>,
|
|
10
|
+
binName?: string | undefined | null
|
|
11
|
+
): Promise<void>
|
|
12
|
+
|
|
13
|
+
export function runVitul(args: Array<string>): Promise<void>
|
package/main.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
const { run, runVitul, logError } = require('./index')
|
|
6
|
+
|
|
7
|
+
function runWith(runFn, args, ...nativeArgs) {
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
const callback = (error, res) => {
|
|
10
|
+
if (error) {
|
|
11
|
+
reject(error)
|
|
12
|
+
} else {
|
|
13
|
+
resolve(res)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
runFn(args, ...nativeArgs, callback)
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports.run = (args, binName) => runWith(run, args, binName ?? null)
|
|
21
|
+
module.exports.runVitul = (args) => runWith(runVitul, args)
|
|
22
|
+
module.exports.logError = logError
|
package/package.json
CHANGED
|
@@ -1,6 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litevar/vitul-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "2.12.0",
|
|
4
|
+
"description": "Vitul CLI for OpenTool-first apps, derived from Tauri 2 tooling",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/agentos-org/vitul.git",
|
|
8
|
+
"directory": "packages/cli"
|
|
9
|
+
},
|
|
10
|
+
"type": "commonjs",
|
|
11
|
+
"contributors": [
|
|
12
|
+
"Tauri Programme within The Commons Conservancy"
|
|
13
|
+
],
|
|
14
|
+
"license": "Apache-2.0 OR MIT",
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"main": "main.js",
|
|
19
|
+
"types": "main.d.ts",
|
|
20
|
+
"napi": {
|
|
21
|
+
"binaryName": "cli",
|
|
22
|
+
"targets": [
|
|
23
|
+
"x86_64-unknown-linux-gnu",
|
|
24
|
+
"x86_64-pc-windows-msvc",
|
|
25
|
+
"x86_64-apple-darwin",
|
|
26
|
+
"aarch64-apple-darwin",
|
|
27
|
+
"aarch64-unknown-linux-gnu",
|
|
28
|
+
"aarch64-unknown-linux-musl",
|
|
29
|
+
"armv7-unknown-linux-gnueabihf",
|
|
30
|
+
"x86_64-unknown-linux-musl",
|
|
31
|
+
"riscv64gc-unknown-linux-gnu",
|
|
32
|
+
"i686-pc-windows-msvc",
|
|
33
|
+
"aarch64-pc-windows-msvc"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@napi-rs/cli": "3.9.0",
|
|
38
|
+
"@types/node": "^24.11.0",
|
|
39
|
+
"cross-env": "10.1.0",
|
|
40
|
+
"vitest": "^5.0.0"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">= 10"
|
|
44
|
+
},
|
|
45
|
+
"bin": {
|
|
46
|
+
"vitul": "./vitul.js"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"artifacts": "napi artifacts",
|
|
50
|
+
"build": "cross-env TARGET=node napi build --platform --profile release-size-optimized",
|
|
51
|
+
"postbuild": "node append-headers.js",
|
|
52
|
+
"build:debug": "cross-env TARGET=node napi build --platform",
|
|
53
|
+
"postbuild:debug": "node append-headers.js",
|
|
54
|
+
"prepublishOnly": "napi prepublish -t npm --gh-release-id $RELEASE_ID",
|
|
55
|
+
"prepack": "cp ../../crates/tauri-schema-generator/schemas/config.schema.json .",
|
|
56
|
+
"version": "napi version",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"vitul": "node ./vitul.js"
|
|
59
|
+
},
|
|
60
|
+
"optionalDependencies": {
|
|
61
|
+
"@litevar/vitul-cli-linux-x64-gnu": "2.12.0",
|
|
62
|
+
"@litevar/vitul-cli-win32-x64-msvc": "2.12.0",
|
|
63
|
+
"@litevar/vitul-cli-darwin-x64": "2.12.0",
|
|
64
|
+
"@litevar/vitul-cli-darwin-arm64": "2.12.0",
|
|
65
|
+
"@litevar/vitul-cli-linux-arm64-gnu": "2.12.0",
|
|
66
|
+
"@litevar/vitul-cli-linux-arm64-musl": "2.12.0",
|
|
67
|
+
"@litevar/vitul-cli-linux-arm-gnueabihf": "2.12.0",
|
|
68
|
+
"@litevar/vitul-cli-linux-x64-musl": "2.12.0",
|
|
69
|
+
"@litevar/vitul-cli-linux-riscv64-gnu": "2.12.0",
|
|
70
|
+
"@litevar/vitul-cli-win32-ia32-msvc": "2.12.0",
|
|
71
|
+
"@litevar/vitul-cli-win32-arm64-msvc": "2.12.0"
|
|
72
|
+
}
|
|
6
73
|
}
|
package/vitul.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
// SPDX-License-Identifier: MIT
|
|
6
|
+
|
|
7
|
+
const cli = require('./main')
|
|
8
|
+
|
|
9
|
+
const [, , ...args] = process.argv
|
|
10
|
+
|
|
11
|
+
cli.runVitul(args).catch((err) => {
|
|
12
|
+
cli.logError(err.message)
|
|
13
|
+
process.exit(1)
|
|
14
|
+
})
|