@alpic-ai/sdk 0.0.0-dev.g662e464 → 0.0.0-dev.g66be22d
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Runtime } from "@alpic-ai/api";
|
|
2
2
|
export declare function detectRuntime(): Runtime | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { mapNodeVersionToRuntime, parseNodeVersion } from "@alpic-ai/api";
|
|
2
3
|
export function detectRuntime() {
|
|
3
4
|
const has = (file) => existsSync(file);
|
|
4
5
|
const read = (file) => {
|
|
@@ -13,12 +14,20 @@ export function detectRuntime() {
|
|
|
13
14
|
return "python3.13";
|
|
14
15
|
}
|
|
15
16
|
if (has("package.json")) {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
for (const file of [".nvmrc", ".node-version"]) {
|
|
18
|
+
if (!has(file)) {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
const content = read(file).trim();
|
|
22
|
+
if (!content) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const version = parseNodeVersion(content);
|
|
26
|
+
if (version !== null) {
|
|
27
|
+
return mapNodeVersionToRuntime(version);
|
|
28
|
+
}
|
|
20
29
|
}
|
|
21
|
-
return "
|
|
30
|
+
return "node26";
|
|
22
31
|
}
|
|
23
32
|
return null;
|
|
24
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect-runtime.js","sourceRoot":"","sources":["../../src/project/detect-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"detect-runtime.js","sourceRoot":"","sources":["../../src/project/detect-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,E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
|
2
2
|
"name": "@alpic-ai/sdk",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.g66be22d",
|
|
4
4
|
"description": "Programmatic SDK for Alpic (auth, API, tunnel)",
|
|
5
5
|
"homepage": "https://alpic.ai",
|
|
6
6
|
"repository": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"author": "Alpic",
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@alpic-ai/api": "0.0.0-dev.
|
|
30
|
-
"@orpc/client": "^1.15.
|
|
31
|
-
"@orpc/contract": "^1.15.
|
|
32
|
-
"@orpc/openapi-client": "^1.15.
|
|
29
|
+
"@alpic-ai/api": "0.0.0-dev.g66be22d",
|
|
30
|
+
"@orpc/client": "^1.15.7",
|
|
31
|
+
"@orpc/contract": "^1.15.7",
|
|
32
|
+
"@orpc/openapi-client": "^1.15.7",
|
|
33
33
|
"@t3-oss/env-core": "^0.13.11",
|
|
34
34
|
"env-paths": "^4.0.0",
|
|
35
35
|
"open": "^11.0.4",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"pipenet": "1.4.2",
|
|
45
45
|
"shx": "^0.4.0",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
|
-
"vitest": "^5.0.
|
|
47
|
+
"vitest": "^5.0.5"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "shx rm -rf dist && tsc && pnpm run build:assets && node scripts/bundle-vendor.mjs",
|