titanpl 1.7.0 → 2.0.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/package.json +1 -1
- package/packages/cli/package.json +5 -5
- package/packages/engine-darwin-arm64/package.json +1 -1
- package/packages/engine-linux-x64/package.json +1 -1
- package/packages/engine-win32-x64/package.json +1 -1
- package/packages/native/package.json +1 -1
- package/packages/packet/js/titan/dev.js +29 -2
- package/packages/packet/package.json +1 -1
- package/packages/packet/ts/titan/dev.js +29 -2
- package/packages/route/package.json +1 -1
- package/templates/extension/package.json +2 -2
- package/templates/js/package.json +5 -5
- package/templates/rust-js/package.json +4 -4
- package/templates/rust-ts/package.json +4 -4
- package/templates/ts/package.json +5 -5
- package/titanpl-sdk/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "titanpl",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Titan Planet is a JavaScript-first backend framework that embeds JS actions into a Rust + Axum server and ships as a single native binary. Routes are compiled to static metadata; only actions run in the embedded JS runtime. No Node.js. No event loop in production.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "ezetgalaxy",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titanpl/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "The unified CLI for Titan Planet. Use it to create, manage, build, and deploy high-performance backend projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"titanpl",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"tit": "./index.js"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@titanpl/engine-win32-x64": "
|
|
25
|
-
"@titanpl/engine-linux-x64": "
|
|
26
|
-
"@titanpl/engine-darwin-arm64": "
|
|
24
|
+
"@titanpl/engine-win32-x64": "2.0.0",
|
|
25
|
+
"@titanpl/engine-linux-x64": "2.0.0",
|
|
26
|
+
"@titanpl/engine-darwin-arm64": "2.0.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@titanpl/packet": "
|
|
29
|
+
"@titanpl/packet": "2.0.0",
|
|
30
30
|
"prompts": "^2.4.2",
|
|
31
31
|
"commander": "^11.0.0",
|
|
32
32
|
"chalk": "^4.1.2"
|
|
@@ -30,7 +30,7 @@ function getEngineBinaryPath(root) {
|
|
|
30
30
|
const binName = platform === 'win32' ? 'titan-server.exe' : 'titan-server';
|
|
31
31
|
const pkgName = `@titanpl/engine-${platform}-${arch}`;
|
|
32
32
|
|
|
33
|
-
// Monorepo search
|
|
33
|
+
// 1. Monorepo search (dev environment)
|
|
34
34
|
let current = root;
|
|
35
35
|
for (let i = 0; i < 5; i++) {
|
|
36
36
|
const potential = path.join(current, 'engine', 'target', 'release', binName);
|
|
@@ -38,7 +38,21 @@ function getEngineBinaryPath(root) {
|
|
|
38
38
|
current = path.dirname(current);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//
|
|
41
|
+
// 2. Search relative to @titanpl/cli (where optionalDependencies are installed)
|
|
42
|
+
// This is the primary path for globally-installed CLI users.
|
|
43
|
+
try {
|
|
44
|
+
const require = createRequire(import.meta.url);
|
|
45
|
+
const cliPkgPath = require.resolve('@titanpl/cli/package.json');
|
|
46
|
+
const cliDir = path.dirname(cliPkgPath);
|
|
47
|
+
// Check cli's own node_modules (global install sibling)
|
|
48
|
+
const cliNodeModulesBin = path.join(cliDir, 'node_modules', pkgName, 'bin', binName);
|
|
49
|
+
if (fs.existsSync(cliNodeModulesBin)) return cliNodeModulesBin;
|
|
50
|
+
// Check parent node_modules (hoisted global install)
|
|
51
|
+
const parentNodeModulesBin = path.join(path.dirname(cliDir), pkgName, 'bin', binName);
|
|
52
|
+
if (fs.existsSync(parentNodeModulesBin)) return parentNodeModulesBin;
|
|
53
|
+
} catch (e) { }
|
|
54
|
+
|
|
55
|
+
// 3. Search in the project's own node_modules
|
|
42
56
|
try {
|
|
43
57
|
const require = createRequire(import.meta.url);
|
|
44
58
|
const pkgPath = require.resolve(`${pkgName}/package.json`);
|
|
@@ -46,6 +60,19 @@ function getEngineBinaryPath(root) {
|
|
|
46
60
|
if (fs.existsSync(binPath)) return binPath;
|
|
47
61
|
} catch (e) { }
|
|
48
62
|
|
|
63
|
+
// 4. Fallback: check common global npm paths
|
|
64
|
+
const globalSearchRoots = [
|
|
65
|
+
process.env.npm_config_prefix,
|
|
66
|
+
path.join(os.homedir(), '.npm-global'),
|
|
67
|
+
'/usr/local/lib',
|
|
68
|
+
'/usr/lib'
|
|
69
|
+
].filter(Boolean);
|
|
70
|
+
|
|
71
|
+
for (const gRoot of globalSearchRoots) {
|
|
72
|
+
const gBin = path.join(gRoot, 'node_modules', pkgName, 'bin', binName);
|
|
73
|
+
if (fs.existsSync(gBin)) return gBin;
|
|
74
|
+
}
|
|
75
|
+
|
|
49
76
|
return null;
|
|
50
77
|
}
|
|
51
78
|
|
|
@@ -30,7 +30,7 @@ function getEngineBinaryPath(root) {
|
|
|
30
30
|
const binName = platform === 'win32' ? 'titan-server.exe' : 'titan-server';
|
|
31
31
|
const pkgName = `@titanpl/engine-${platform}-${arch}`;
|
|
32
32
|
|
|
33
|
-
// Monorepo search
|
|
33
|
+
// 1. Monorepo search (dev environment)
|
|
34
34
|
let current = root;
|
|
35
35
|
for (let i = 0; i < 5; i++) {
|
|
36
36
|
const potential = path.join(current, 'engine', 'target', 'release', binName);
|
|
@@ -38,7 +38,21 @@ function getEngineBinaryPath(root) {
|
|
|
38
38
|
current = path.dirname(current);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//
|
|
41
|
+
// 2. Search relative to @titanpl/cli (where optionalDependencies are installed)
|
|
42
|
+
// This is the primary path for globally-installed CLI users.
|
|
43
|
+
try {
|
|
44
|
+
const require = createRequire(import.meta.url);
|
|
45
|
+
const cliPkgPath = require.resolve('@titanpl/cli/package.json');
|
|
46
|
+
const cliDir = path.dirname(cliPkgPath);
|
|
47
|
+
// Check cli's own node_modules (global install sibling)
|
|
48
|
+
const cliNodeModulesBin = path.join(cliDir, 'node_modules', pkgName, 'bin', binName);
|
|
49
|
+
if (fs.existsSync(cliNodeModulesBin)) return cliNodeModulesBin;
|
|
50
|
+
// Check parent node_modules (hoisted global install)
|
|
51
|
+
const parentNodeModulesBin = path.join(path.dirname(cliDir), pkgName, 'bin', binName);
|
|
52
|
+
if (fs.existsSync(parentNodeModulesBin)) return parentNodeModulesBin;
|
|
53
|
+
} catch (e) { }
|
|
54
|
+
|
|
55
|
+
// 3. Search in the project's own node_modules
|
|
42
56
|
try {
|
|
43
57
|
const require = createRequire(import.meta.url);
|
|
44
58
|
const pkgPath = require.resolve(`${pkgName}/package.json`);
|
|
@@ -46,6 +60,19 @@ function getEngineBinaryPath(root) {
|
|
|
46
60
|
if (fs.existsSync(binPath)) return binPath;
|
|
47
61
|
} catch (e) { }
|
|
48
62
|
|
|
63
|
+
// 4. Fallback: check common global npm paths
|
|
64
|
+
const globalSearchRoots = [
|
|
65
|
+
process.env.npm_config_prefix,
|
|
66
|
+
path.join(os.homedir(), '.npm-global'),
|
|
67
|
+
'/usr/local/lib',
|
|
68
|
+
'/usr/lib'
|
|
69
|
+
].filter(Boolean);
|
|
70
|
+
|
|
71
|
+
for (const gRoot of globalSearchRoots) {
|
|
72
|
+
const gBin = path.join(gRoot, 'node_modules', pkgName, 'bin', binName);
|
|
73
|
+
if (fs.existsSync(gBin)) return gBin;
|
|
74
|
+
}
|
|
75
|
+
|
|
49
76
|
return null;
|
|
50
77
|
}
|
|
51
78
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "{{name}}",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A Titan Planet extension",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@titanpl/core": "latest",
|
|
19
19
|
"chokidar": "^5.0.0",
|
|
20
20
|
"esbuild": "^0.27.2",
|
|
21
|
-
"titanpl-sdk": "
|
|
21
|
+
"titanpl-sdk": "2.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@tgrv/microgravity": "latest"
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"template": "js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@titanpl/cli": "
|
|
10
|
-
"@titanpl/route": "
|
|
11
|
-
"@titanpl/native": "
|
|
9
|
+
"@titanpl/cli": "2.0.0",
|
|
10
|
+
"@titanpl/route": "2.0.0",
|
|
11
|
+
"@titanpl/native": "2.0.0",
|
|
12
12
|
"@titanpl/core": "latest",
|
|
13
13
|
"@titanpl/node": "latest",
|
|
14
|
-
"@titanpl/packet": "
|
|
14
|
+
"@titanpl/packet": "2.0.0"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "titan build",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"eslint": "^9.39.2",
|
|
25
25
|
"eslint-plugin-titanpl": "latest"
|
|
26
26
|
},
|
|
27
|
-
"version": "
|
|
27
|
+
"version": "2.0.0"
|
|
28
28
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "titanpl",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A Titan Planet server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"titan": {
|
|
7
7
|
"template": "rust-js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@titanpl/cli": "
|
|
11
|
-
"@titanpl/route": "
|
|
12
|
-
"@titanpl/native": "
|
|
10
|
+
"@titanpl/cli": "2.0.0",
|
|
11
|
+
"@titanpl/route": "2.0.0",
|
|
12
|
+
"@titanpl/native": "2.0.0",
|
|
13
13
|
"@titanpl/core": "latest",
|
|
14
14
|
"@titanpl/node": "latest"
|
|
15
15
|
},
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "titanpl",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A Titan Planet server (Rust + TypeScript)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"titan": {
|
|
7
7
|
"template": "rust-ts"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@titanpl/cli": "
|
|
11
|
-
"@titanpl/route": "
|
|
12
|
-
"@titanpl/native": "
|
|
10
|
+
"@titanpl/cli": "2.0.0",
|
|
11
|
+
"@titanpl/route": "2.0.0",
|
|
12
|
+
"@titanpl/native": "2.0.0",
|
|
13
13
|
"@titanpl/core": "latest",
|
|
14
14
|
"@titanpl/node": "latest",
|
|
15
15
|
"typescript": "^5.0.0"
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"template": "ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@titanpl/cli": "
|
|
10
|
-
"@titanpl/route": "
|
|
11
|
-
"@titanpl/native": "
|
|
9
|
+
"@titanpl/cli": "2.0.0",
|
|
10
|
+
"@titanpl/route": "2.0.0",
|
|
11
|
+
"@titanpl/native": "2.0.0",
|
|
12
12
|
"@titanpl/core": "latest",
|
|
13
13
|
"@titanpl/node": "latest",
|
|
14
|
-
"@titanpl/packet": "
|
|
14
|
+
"@titanpl/packet": "2.0.0",
|
|
15
15
|
"typescript": "^5.0.0"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"eslint-plugin-titanpl": "latest",
|
|
27
27
|
"@typescript-eslint/parser": "^8.54.0"
|
|
28
28
|
},
|
|
29
|
-
"version": "
|
|
29
|
+
"version": "2.0.0"
|
|
30
30
|
}
|
package/titanpl-sdk/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "titanpl-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Development SDK for Titan Planet. Provides TypeScript type definitions for the global 't' runtime object and a 'lite' test-harness runtime for building and verifying extensions.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|