@camera.ui/go2rtc 0.0.14 → 0.0.16
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/install.js +7 -5
- package/dist/install.js.map +1 -1
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +65 -0
- package/dist/utils.js.map +1 -0
- package/package.json +6 -6
package/dist/install.js
CHANGED
|
@@ -11,6 +11,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
11
11
|
const promises_1 = require("stream/promises");
|
|
12
12
|
const unzipper_1 = __importDefault(require("unzipper"));
|
|
13
13
|
const _1 = require(".");
|
|
14
|
+
const utils_1 = require("./utils");
|
|
14
15
|
const binaries = {
|
|
15
16
|
darwin: {
|
|
16
17
|
x64: 'go2rtc_mac_amd64.zip',
|
|
@@ -19,24 +20,25 @@ const binaries = {
|
|
|
19
20
|
linux: {
|
|
20
21
|
x64: 'go2rtc_linux_amd64',
|
|
21
22
|
arm: 'go2rtc_linux_arm',
|
|
22
|
-
|
|
23
|
+
arm6: 'go2rtc_linux_armv6',
|
|
23
24
|
arm64: 'go2rtc_linux_arm64',
|
|
24
|
-
|
|
25
|
+
ia32: 'go2rtc_linux_i386',
|
|
25
26
|
mipsel: 'go2rtc_linux_mipsel',
|
|
26
27
|
},
|
|
27
28
|
win32: {
|
|
28
29
|
x64: 'go2rtc_win64.zip',
|
|
29
30
|
arm64: 'go2rtc_win_arm64.zip',
|
|
30
|
-
|
|
31
|
+
ia32: 'go2rtc_win32.zip',
|
|
31
32
|
},
|
|
32
33
|
};
|
|
33
|
-
const GO2RTC_VERSION = 'v1.9.
|
|
34
|
-
const arch =
|
|
34
|
+
const GO2RTC_VERSION = 'v1.9.2';
|
|
35
|
+
const arch = (0, utils_1.getArmArchitecture)();
|
|
35
36
|
const platform = os_1.default.platform();
|
|
36
37
|
const filename = binaries[platform]?.[arch];
|
|
37
38
|
const releasesUrl = 'https://api.github.com/repos/AlexxIT/go2rtc/releases';
|
|
38
39
|
console.log(`Detected platform: ${platform} / ${arch}`);
|
|
39
40
|
const go2rtcBinaryPath = path_1.default.resolve(__dirname, '../binary');
|
|
41
|
+
fs_extra_1.default.ensureDirSync(go2rtcBinaryPath);
|
|
40
42
|
const go2rtcFilePath = path_1.default.resolve(go2rtcBinaryPath, filename);
|
|
41
43
|
const go2rtcExtractedFilePath = (0, _1.go2rtcPath)();
|
|
42
44
|
const isZipUrl = (url) => {
|
package/dist/install.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":";;;;;;AAEA,kDAAkD;AAClD,wDAA0B;AAC1B,4CAAoB;AACpB,gDAAwB;AACxB,8CAA2C;AAC3C,wDAAgC;AAEhC,wBAA+B;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":";;;;;;AAEA,kDAAkD;AAClD,wDAA0B;AAC1B,4CAAoB;AACpB,gDAAwB;AACxB,8CAA2C;AAC3C,wDAAgC;AAEhC,wBAA+B;AAC/B,mCAAwD;AAMxD,MAAM,QAAQ,GAAoB;IAChC,MAAM,EAAE;QACN,GAAG,EAAE,sBAAsB;QAC3B,KAAK,EAAE,sBAAsB;KAC9B;IACD,KAAK,EAAE;QACL,GAAG,EAAE,oBAAoB;QACzB,GAAG,EAAE,kBAAkB;QACvB,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE,qBAAqB;KAC9B;IACD,KAAK,EAAE;QACL,GAAG,EAAE,kBAAkB;QACvB,KAAK,EAAE,sBAAsB;QAC7B,IAAI,EAAE,kBAAkB;KACzB;CACF,CAAC;AAEF,MAAM,cAAc,GAAG,QAAQ,CAAC;AAChC,MAAM,IAAI,GAAG,IAAA,0BAAkB,GAAE,CAAC;AAClC,MAAM,QAAQ,GAAG,YAAE,CAAC,QAAQ,EAAE,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AE,CAAC;IAEtE,MAAM,YAAY,CAAC,WAAW,CAAC,CAAC;IAEhC,IAAI,QAAQ,KAAK,OAAO,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,UAAU,uBAAuB,gBAAgB,CAAC,CAAC;QAC/D,kBAAE,CAAC,SAAS,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,cAAc,EAAE,CAAC"}
|
package/dist/utils.d.ts
ADDED
package/dist/utils.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.getArmArchitecture = void 0;
|
|
27
|
+
const child_process_1 = require("child_process");
|
|
28
|
+
const os = __importStar(require("os"));
|
|
29
|
+
function getArmArchitecture() {
|
|
30
|
+
const platform = os.platform();
|
|
31
|
+
let arch = os.arch();
|
|
32
|
+
if (platform === 'win32') {
|
|
33
|
+
try {
|
|
34
|
+
const output = (0, child_process_1.execSync)('wmic cpu get architecture', { encoding: 'utf8' });
|
|
35
|
+
const architecture = output.trim().split('\n')[1].trim();
|
|
36
|
+
if (architecture === '5') {
|
|
37
|
+
arch = 'arm6';
|
|
38
|
+
}
|
|
39
|
+
else if (architecture === '7') {
|
|
40
|
+
arch = 'arm7';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
console.error('Error executing "wmic cpu get architecture":', error);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else if (platform === 'linux') {
|
|
48
|
+
try {
|
|
49
|
+
const output = (0, child_process_1.execSync)('cat /proc/cpuinfo | grep "model name"', { encoding: 'utf8' });
|
|
50
|
+
const modelName = output.trim().split(':')[1].trim();
|
|
51
|
+
if (modelName.includes('ARMv6')) {
|
|
52
|
+
arch = 'arm6';
|
|
53
|
+
}
|
|
54
|
+
else if (modelName.includes('ARMv7')) {
|
|
55
|
+
arch = 'arm7';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
console.error('Error executing "cat /proc/cpuinfo | grep "model name":', error);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return arch;
|
|
63
|
+
}
|
|
64
|
+
exports.getArmArchitecture = getArmArchitecture;
|
|
65
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;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;YAChB,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,yDAAyD,EAAE,KAAK,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IAED,OAAO,IAAY,CAAC;AACtB,CAAC;AAjCD,gDAiCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/go2rtc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "camera.ui go2rtc package",
|
|
5
5
|
"author": "seydx (https://github.com/seydx/camera.ui)",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@rushstack/eslint-patch": "^1.10.2",
|
|
30
30
|
"@types/fs-extra": "^11.0.4",
|
|
31
|
-
"@types/node": "^20.12.
|
|
31
|
+
"@types/node": "^20.12.12",
|
|
32
32
|
"@types/ws": "^8.5.10",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
34
|
-
"@typescript-eslint/parser": "^7.
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^7.9.0",
|
|
34
|
+
"@typescript-eslint/parser": "^7.9.0",
|
|
35
35
|
"@types/unzipper": "^0.10.9",
|
|
36
36
|
"concurrently": "^8.2.2",
|
|
37
|
-
"eslint": "
|
|
37
|
+
"eslint": "8.57.0",
|
|
38
38
|
"eslint-config-prettier": "^9.1.0",
|
|
39
39
|
"eslint-plugin-prettier": "^5.1.3",
|
|
40
40
|
"prettier": "^3.2.5",
|
|
41
|
-
"rimraf": "^5.0.
|
|
41
|
+
"rimraf": "^5.0.7",
|
|
42
42
|
"typescript": "^5.4.5",
|
|
43
43
|
"updates": "^16.0.1"
|
|
44
44
|
},
|