yougile-cli 0.8.2 → 0.8.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/bin/yougile.js +6 -3
- package/package.json +3 -27
- package/scripts/postinstall.js +14 -12
package/bin/yougile.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
import { execFileSync } from "node:child_process";
|
|
3
|
+
import { join, dirname } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import process from "node:process";
|
|
3
6
|
|
|
4
|
-
const
|
|
5
|
-
const
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
6
9
|
|
|
7
10
|
const ext = process.platform === "win32" ? ".exe" : "";
|
|
8
11
|
const binPath = join(__dirname, "yougile" + ext);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yougile-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "CLI утилита для работы с YouGile API из командной строки",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yougile",
|
|
@@ -35,33 +35,9 @@
|
|
|
35
35
|
"scripts"
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
|
-
"
|
|
39
|
-
"build": "bun run scripts/build.ts",
|
|
40
|
-
"build:native": "bun build src/cli.ts --compile --minify --outfile=dist/yougile",
|
|
41
|
-
"typecheck": "tsc --noEmit",
|
|
42
|
-
"lint": "biome check",
|
|
43
|
-
"lint:fix": "biome check --write",
|
|
44
|
-
"format": "biome format --write",
|
|
45
|
-
"test": "bun test",
|
|
46
|
-
"postinstall": "node scripts/postinstall.js",
|
|
47
|
-
"release": "onreza-release",
|
|
48
|
-
"release:dry": "onreza-release --dry-run"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@biomejs/biome": "^2.3.13",
|
|
52
|
-
"@commitlint/cli": "^20.4.0",
|
|
53
|
-
"@commitlint/config-conventional": "^20.4.0",
|
|
54
|
-
"@commitlint/types": "^20.4.0",
|
|
55
|
-
"@types/bun": "^1.3.8",
|
|
56
|
-
"bunli": "0.5.1",
|
|
57
|
-
"onreza-release": "^2.2.0",
|
|
58
|
-
"lefthook": "^2.0.16"
|
|
59
|
-
},
|
|
60
|
-
"peerDependencies": {
|
|
61
|
-
"typescript": "^5.9.3"
|
|
38
|
+
"postinstall": "node scripts/postinstall.js"
|
|
62
39
|
},
|
|
63
40
|
"dependencies": {
|
|
64
|
-
"
|
|
65
|
-
"zod": "^4.3.6"
|
|
41
|
+
"tar": "^7.0.0"
|
|
66
42
|
}
|
|
67
43
|
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
import { platform, arch } from "node:process";
|
|
3
|
+
import https from "node:https";
|
|
4
|
+
import http from "node:http";
|
|
5
|
+
import { chmodSync, mkdirSync } from "node:fs";
|
|
6
|
+
import { join, dirname } from "node:path";
|
|
7
|
+
import { createGunzip } from "node:zlib";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import tar from "tar";
|
|
3
10
|
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const http = require("http");
|
|
7
|
-
const { createWriteStream, chmodSync, mkdirSync } = require("fs");
|
|
8
|
-
const { join } = require("path");
|
|
9
|
-
const { createGunzip } = require("zlib");
|
|
10
|
-
const tar = require("tar");
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = dirname(__filename);
|
|
11
13
|
|
|
12
14
|
const MANIFEST = {
|
|
13
15
|
"assets": {
|
|
14
|
-
"linux-x64": "https://gitverse.ru/sc/sbt/api/v1/attachments/
|
|
15
|
-
"darwin-arm64": "https://gitverse.ru/sc/sbt/api/v1/attachments/
|
|
16
|
-
"win32-x64": "https://gitverse.ru/sc/sbt/api/v1/attachments/
|
|
16
|
+
"linux-x64": "https://gitverse.ru/sc/sbt/api/v1/attachments/93ae1bfc-804b-484a-9c4e-2247ee771ca9",
|
|
17
|
+
"darwin-arm64": "https://gitverse.ru/sc/sbt/api/v1/attachments/20fa902a-0c59-449c-860f-7c454966d761",
|
|
18
|
+
"win32-x64": "https://gitverse.ru/sc/sbt/api/v1/attachments/b1edbde8-b123-44b1-89a9-f0f1796d9123"
|
|
17
19
|
},
|
|
18
20
|
"binName": "yougile",
|
|
19
|
-
"version": "0.8.
|
|
21
|
+
"version": "0.8.3"
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
const platformKey = `${platform}-${arch}`;
|