titanpl 2.0.0 → 2.0.2
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/README.md +17 -17
- package/packages/cli/index.js +160 -160
- package/packages/cli/package.json +5 -5
- package/packages/cli/src/commands/build.js +5 -5
- package/packages/cli/src/commands/dev.js +12 -5
- package/packages/cli/src/commands/init.js +196 -182
- package/packages/cli/src/commands/migrate.js +124 -106
- package/packages/cli/src/commands/start.js +4 -4
- package/packages/cli/src/commands/update.js +90 -90
- package/packages/cli/src/engine.js +152 -143
- package/packages/engine-darwin-arm64/README.md +13 -13
- package/packages/engine-darwin-arm64/package.json +1 -1
- package/packages/engine-linux-x64/README.md +11 -11
- package/packages/engine-linux-x64/package.json +1 -1
- package/packages/engine-win32-x64/README.md +11 -11
- package/packages/engine-win32-x64/bin/titan-server.exe +0 -0
- package/packages/engine-win32-x64/package.json +1 -1
- package/packages/native/README.md +11 -11
- package/packages/native/index.d.ts +41 -41
- package/packages/native/index.js +39 -39
- package/packages/native/package.json +1 -1
- package/packages/packet/README.md +11 -11
- package/packages/packet/index.js +83 -83
- package/packages/packet/js/titan/builder.js +50 -50
- package/packages/packet/js/titan/bundle.js +164 -164
- package/packages/packet/js/titan/dev.js +19 -8
- package/packages/packet/js/titan/error-box.js +277 -277
- package/packages/packet/package.json +1 -1
- package/packages/packet/ts/titan/bundle.js +227 -227
- package/packages/packet/ts/titan/dev.js +19 -9
- package/packages/packet/ts/titan/error-box.js +277 -277
- package/packages/route/README.md +24 -24
- package/packages/route/index.d.ts +16 -16
- package/packages/route/index.js +52 -52
- package/packages/route/package.json +1 -1
- package/templates/common/_gitignore +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/packages/engine-win32-x64/bin/titan-engine.exe +0 -0
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const __dirname = path.dirname(__filename);
|
|
8
|
-
|
|
9
|
-
export async function updateCommand() {
|
|
10
|
-
const root = process.cwd();
|
|
11
|
-
console.log(chalk.cyan(`\n→ Updating Titan project to latest...`));
|
|
12
|
-
|
|
13
|
-
const pkgPath = path.join(root, 'package.json');
|
|
14
|
-
if (!fs.existsSync(pkgPath)) {
|
|
15
|
-
console.log(chalk.red(`✖ No package.json found. Are you in a project root ? `));
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// 1. Update package.json versions
|
|
20
|
-
try {
|
|
21
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
22
|
-
let modified = false;
|
|
23
|
-
|
|
24
|
-
const titanDeps = [
|
|
25
|
-
'titanpl',
|
|
26
|
-
'titanpl-sdk',
|
|
27
|
-
'@titanpl/cli',
|
|
28
|
-
'@titanpl/route',
|
|
29
|
-
'@titanpl/native',
|
|
30
|
-
'@titanpl/packet',
|
|
31
|
-
'@titanpl/core',
|
|
32
|
-
'@titanpl/node'
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
if (pkg.dependencies) {
|
|
36
|
-
for (const dep of titanDeps) {
|
|
37
|
-
if (pkg.dependencies[dep]) {
|
|
38
|
-
pkg.dependencies[dep] = "latest";
|
|
39
|
-
modified = true;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (pkg.devDependencies) {
|
|
45
|
-
for (const dep of titanDeps) {
|
|
46
|
-
if (pkg.devDependencies[dep]) {
|
|
47
|
-
pkg.devDependencies[dep] = "latest";
|
|
48
|
-
modified = true;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (modified) {
|
|
54
|
-
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
55
|
-
console.log(chalk.green(` ✔ Updated Titan dependencies in package.json`));
|
|
56
|
-
}
|
|
57
|
-
} catch (e) {
|
|
58
|
-
console.log(chalk.yellow(` ⚠️ Failed to update package.json: ${e.message}`));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// 2. Refresh Dockerfile and dotfiles from templates
|
|
62
|
-
const commonDir = path.resolve(__dirname, '..', '..', '..', '..', 'templates', 'common');
|
|
63
|
-
if (fs.existsSync(commonDir)) {
|
|
64
|
-
const filesToSync = [
|
|
65
|
-
['Dockerfile', 'Dockerfile'],
|
|
66
|
-
['_dockerignore', '.dockerignore'],
|
|
67
|
-
['_gitignore', '.gitignore'],
|
|
68
|
-
];
|
|
69
|
-
|
|
70
|
-
for (const [srcName, destName] of filesToSync) {
|
|
71
|
-
const src = path.join(commonDir, srcName);
|
|
72
|
-
const dest = path.join(root, destName);
|
|
73
|
-
if (fs.existsSync(src)) {
|
|
74
|
-
fs.copyFileSync(src, dest);
|
|
75
|
-
console.log(chalk.green(` ✔ Synchronized ${destName}`));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Also update app/t.native.d.ts if it exists
|
|
80
|
-
const nativeTypesSrc = path.join(commonDir, 'app', 't.native.d.ts');
|
|
81
|
-
const nativeTypesDest = path.join(root, 'app', 't.native.d.ts');
|
|
82
|
-
if (fs.existsSync(nativeTypesSrc) && fs.existsSync(path.join(root, 'app'))) {
|
|
83
|
-
fs.copyFileSync(nativeTypesSrc, nativeTypesDest);
|
|
84
|
-
console.log(chalk.green(` ✔ Updated app/t.native.d.ts`));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
console.log(chalk.green(`\n✔ Update complete!\n`));
|
|
89
|
-
console.log(chalk.yellow(` Please run 'npm install' to apply changes.\n`));
|
|
90
|
-
}
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
|
|
9
|
+
export async function updateCommand() {
|
|
10
|
+
const root = process.cwd();
|
|
11
|
+
console.log(chalk.cyan(`\n→ Updating Titan project to latest...`));
|
|
12
|
+
|
|
13
|
+
const pkgPath = path.join(root, 'package.json');
|
|
14
|
+
if (!fs.existsSync(pkgPath)) {
|
|
15
|
+
console.log(chalk.red(`✖ No package.json found. Are you in a project root ? `));
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 1. Update package.json versions
|
|
20
|
+
try {
|
|
21
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
22
|
+
let modified = false;
|
|
23
|
+
|
|
24
|
+
const titanDeps = [
|
|
25
|
+
'titanpl',
|
|
26
|
+
'titanpl-sdk',
|
|
27
|
+
'@titanpl/cli',
|
|
28
|
+
'@titanpl/route',
|
|
29
|
+
'@titanpl/native',
|
|
30
|
+
'@titanpl/packet',
|
|
31
|
+
'@titanpl/core',
|
|
32
|
+
'@titanpl/node'
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
if (pkg.dependencies) {
|
|
36
|
+
for (const dep of titanDeps) {
|
|
37
|
+
if (pkg.dependencies[dep]) {
|
|
38
|
+
pkg.dependencies[dep] = "latest";
|
|
39
|
+
modified = true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (pkg.devDependencies) {
|
|
45
|
+
for (const dep of titanDeps) {
|
|
46
|
+
if (pkg.devDependencies[dep]) {
|
|
47
|
+
pkg.devDependencies[dep] = "latest";
|
|
48
|
+
modified = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (modified) {
|
|
54
|
+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
55
|
+
console.log(chalk.green(` ✔ Updated Titan dependencies in package.json`));
|
|
56
|
+
}
|
|
57
|
+
} catch (e) {
|
|
58
|
+
console.log(chalk.yellow(` ⚠️ Failed to update package.json: ${e.message}`));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// 2. Refresh Dockerfile and dotfiles from templates
|
|
62
|
+
const commonDir = path.resolve(__dirname, '..', '..', '..', '..', 'templates', 'common');
|
|
63
|
+
if (fs.existsSync(commonDir)) {
|
|
64
|
+
const filesToSync = [
|
|
65
|
+
['Dockerfile', 'Dockerfile'],
|
|
66
|
+
['_dockerignore', '.dockerignore'],
|
|
67
|
+
['_gitignore', '.gitignore'],
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
for (const [srcName, destName] of filesToSync) {
|
|
71
|
+
const src = path.join(commonDir, srcName);
|
|
72
|
+
const dest = path.join(root, destName);
|
|
73
|
+
if (fs.existsSync(src)) {
|
|
74
|
+
fs.copyFileSync(src, dest);
|
|
75
|
+
console.log(chalk.green(` ✔ Synchronized ${destName}`));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Also update app/t.native.d.ts if it exists
|
|
80
|
+
const nativeTypesSrc = path.join(commonDir, 'app', 't.native.d.ts');
|
|
81
|
+
const nativeTypesDest = path.join(root, 'app', 't.native.d.ts');
|
|
82
|
+
if (fs.existsSync(nativeTypesSrc) && fs.existsSync(path.join(root, 'app'))) {
|
|
83
|
+
fs.copyFileSync(nativeTypesSrc, nativeTypesDest);
|
|
84
|
+
console.log(chalk.green(` ✔ Updated app/t.native.d.ts`));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
console.log(chalk.green(`\n✔ Update complete!\n`));
|
|
89
|
+
console.log(chalk.yellow(` Please run 'npm install' to apply changes.\n`));
|
|
90
|
+
}
|
|
@@ -1,143 +1,152 @@
|
|
|
1
|
-
import os from 'os';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import fs from 'fs';
|
|
4
|
-
import { createRequire } from 'module';
|
|
5
|
-
import { spawn } from 'child_process';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
7
|
-
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = path.dirname(__filename);
|
|
10
|
-
|
|
11
|
-
const require = createRequire(import.meta.url);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
console.log("");
|
|
136
|
-
|
|
137
|
-
console.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
1
|
+
import os from 'os';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import { createRequire } from 'module';
|
|
5
|
+
import { spawn } from 'child_process';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Resolves the engine binary path. Returns null if not found (non-fatal).
|
|
15
|
+
* Used by the dev command to pre-resolve and inject the path via env.
|
|
16
|
+
*/
|
|
17
|
+
export function resolveEngineBinaryPath() {
|
|
18
|
+
const platform = os.platform();
|
|
19
|
+
const arch = os.arch();
|
|
20
|
+
const pkgName = `@titanpl/engine-${platform}-${arch}`;
|
|
21
|
+
const binName = platform === 'win32' ? 'titan-server.exe' : 'titan-server';
|
|
22
|
+
|
|
23
|
+
// 1. Monorepo search (local dev)
|
|
24
|
+
const searchPaths = [
|
|
25
|
+
__dirname,
|
|
26
|
+
process.cwd(),
|
|
27
|
+
path.join(process.cwd(), '..'),
|
|
28
|
+
path.join(process.cwd(), '..', '..')
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
for (let startPath of searchPaths) {
|
|
32
|
+
let current = startPath;
|
|
33
|
+
for (let i = 0; i < 8; i++) {
|
|
34
|
+
const potential = path.join(current, 'engine', 'target', 'release', binName);
|
|
35
|
+
if (fs.existsSync(potential)) return potential;
|
|
36
|
+
const parent = path.dirname(current);
|
|
37
|
+
if (parent === current) break;
|
|
38
|
+
current = parent;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 2. Resolve from CLI's own context (correct require context for optionalDependencies)
|
|
43
|
+
try {
|
|
44
|
+
const pkgPath = require.resolve(`${pkgName}/package.json`);
|
|
45
|
+
const binaryPath = path.join(path.dirname(pkgPath), 'bin', binName);
|
|
46
|
+
if (fs.existsSync(binaryPath)) return binaryPath;
|
|
47
|
+
} catch (e) { }
|
|
48
|
+
|
|
49
|
+
// 3. Fallback: sibling in node_modules (global install layout)
|
|
50
|
+
const cliParent = path.dirname(path.dirname(__dirname)); // up from cli/src → cli → parent
|
|
51
|
+
const siblingBin = path.join(cliParent, pkgName, 'bin', binName);
|
|
52
|
+
if (fs.existsSync(siblingBin)) return siblingBin;
|
|
53
|
+
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Resolves the engine binary path. Exits with a fatal error if not found.
|
|
59
|
+
* Used by the start command.
|
|
60
|
+
*/
|
|
61
|
+
export function getEngineBinaryPath() {
|
|
62
|
+
const platform = os.platform();
|
|
63
|
+
const arch = os.arch();
|
|
64
|
+
const pkgName = `@titanpl/engine-${platform}-${arch}`;
|
|
65
|
+
|
|
66
|
+
const resolved = resolveEngineBinaryPath();
|
|
67
|
+
if (resolved) return resolved;
|
|
68
|
+
|
|
69
|
+
console.error(`\n[TITAN FATAL] Unsupported platform: ${platform} (${arch})`);
|
|
70
|
+
console.error(`Or the optional dependency '${pkgName}' failed to install.`);
|
|
71
|
+
console.error(`Try: npm install -g @titanpl/cli\n`);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function startEngine(watchMode = false) {
|
|
76
|
+
const distPath = path.resolve(process.cwd(), 'dist');
|
|
77
|
+
|
|
78
|
+
if (!fs.existsSync(distPath)) {
|
|
79
|
+
console.error("❌ 'dist/' directory not found. Please run 'titan build' first.");
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const binaryPath = getEngineBinaryPath();
|
|
84
|
+
|
|
85
|
+
// Arguments passed to Rust backend
|
|
86
|
+
const args = ['run', distPath];
|
|
87
|
+
if (watchMode) args.push('--watch');
|
|
88
|
+
|
|
89
|
+
console.log(`🚀 Starting Titan Engine...`);
|
|
90
|
+
|
|
91
|
+
const engineProcess = spawn(binaryPath, args, {
|
|
92
|
+
stdio: ['inherit', 'pipe', 'pipe'],
|
|
93
|
+
env: {
|
|
94
|
+
...process.env,
|
|
95
|
+
TITAN_ENV: watchMode ? 'development' : 'production',
|
|
96
|
+
Titan_Dev: watchMode ? '1' : '0'
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
let stderrBuffer = "";
|
|
101
|
+
|
|
102
|
+
engineProcess.stdout.pipe(process.stdout);
|
|
103
|
+
engineProcess.stderr.on('data', (data) => {
|
|
104
|
+
const chunk = data.toString();
|
|
105
|
+
stderrBuffer += chunk;
|
|
106
|
+
process.stderr.write(data);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
engineProcess.on('close', (code) => {
|
|
110
|
+
if (code !== 0 && code !== null) {
|
|
111
|
+
// Check for port binding errors
|
|
112
|
+
const isPortError = stderrBuffer.includes("Address already in use") ||
|
|
113
|
+
stderrBuffer.includes("address in use") ||
|
|
114
|
+
stderrBuffer.includes("os error 10048") || // Windows
|
|
115
|
+
stderrBuffer.includes("EADDRINUSE") ||
|
|
116
|
+
stderrBuffer.includes("AddrInUse");
|
|
117
|
+
|
|
118
|
+
if (isPortError) {
|
|
119
|
+
// Try to read intended port
|
|
120
|
+
let port = 5100;
|
|
121
|
+
try {
|
|
122
|
+
const routesPath = path.join(process.cwd(), "dist", "routes.json");
|
|
123
|
+
if (fs.existsSync(routesPath)) {
|
|
124
|
+
const routesConfig = JSON.parse(fs.readFileSync(routesPath, "utf8"));
|
|
125
|
+
if (routesConfig && routesConfig.__config && routesConfig.__config.port) {
|
|
126
|
+
port = routesConfig.__config.port;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
} catch (e) { }
|
|
130
|
+
|
|
131
|
+
const cyan = (t) => `\x1b[36m${t}\x1b[0m`;
|
|
132
|
+
const yellow = (t) => `\x1b[33m${t}\x1b[0m`;
|
|
133
|
+
const red = (t) => `\x1b[31m${t}\x1b[0m`;
|
|
134
|
+
|
|
135
|
+
console.log("");
|
|
136
|
+
console.log(red("⏣ Your application cannot enter this orbit"));
|
|
137
|
+
console.log(red(`↳ Another application is already bound to port ${port}.`));
|
|
138
|
+
console.log("");
|
|
139
|
+
|
|
140
|
+
console.log(yellow("Recommended Actions:"));
|
|
141
|
+
console.log(yellow(" 1.") + " Release the occupied orbit (stop the other service).");
|
|
142
|
+
console.log(yellow(" 2.") + " Assign your application to a new orbit in " + cyan("app/app.js"));
|
|
143
|
+
console.log(yellow(" Example: ") + cyan(`t.start(${port + 1}, "Titan Running!")`));
|
|
144
|
+
console.log("");
|
|
145
|
+
} else {
|
|
146
|
+
console.error(`\n❌ [Titan Engine died with exit code ${code}]`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
return engineProcess;
|
|
152
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# @titanpl/engine-darwin-arm64
|
|
2
|
-
|
|
3
|
-
The macOS ARM64 pre-compiled native engine binary for Titan Planet.
|
|
4
|
-
|
|
5
|
-
## What it works (What it does)
|
|
6
|
-
This package is the compiled core Rust + Axum server embedded with the Boa JavaScript runtime. It is specifically built for Apple Silicon (ARM64) macOS devices.
|
|
7
|
-
|
|
8
|
-
## How it works
|
|
9
|
-
This package is listed as an "optional dependency" in `@titanpl/cli`. During package installation, your package manager identifies the OS and automatically downloads this binary if it matches `darwin` + `arm64`. You do not need to install it directly.
|
|
10
|
-
|
|
11
|
-
When you run `titan start`, the CLI locates this binary and executes it as your web server.
|
|
12
|
-
|
|
13
|
-
**Important Note:** Currently, Titan Planet and its entire package ecosystem are only for Windows. The Linux and macOS versions are in development (dev only) for the new architecture and will be launched later.
|
|
1
|
+
# @titanpl/engine-darwin-arm64
|
|
2
|
+
|
|
3
|
+
The macOS ARM64 pre-compiled native engine binary for Titan Planet.
|
|
4
|
+
|
|
5
|
+
## What it works (What it does)
|
|
6
|
+
This package is the compiled core Rust + Axum server embedded with the Boa JavaScript runtime. It is specifically built for Apple Silicon (ARM64) macOS devices.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
This package is listed as an "optional dependency" in `@titanpl/cli`. During package installation, your package manager identifies the OS and automatically downloads this binary if it matches `darwin` + `arm64`. You do not need to install it directly.
|
|
10
|
+
|
|
11
|
+
When you run `titan start`, the CLI locates this binary and executes it as your web server.
|
|
12
|
+
|
|
13
|
+
**Important Note:** Currently, Titan Planet and its entire package ecosystem are only for Windows. The Linux and macOS versions are in development (dev only) for the new architecture and will be launched later.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @titanpl/engine-linux-x64
|
|
2
|
-
|
|
3
|
-
The Linux x64 pre-compiled native engine binary for Titan Planet.
|
|
4
|
-
|
|
5
|
-
## What it works (What it does)
|
|
6
|
-
This package holds the core Rust + Axum high-performance web server tightly coupled with the Boa JavaScript execution runtime. It is built natively for Linux x64 environments, requiring no Node.js execution layer.
|
|
7
|
-
|
|
8
|
-
## How it works
|
|
9
|
-
You don't need to manually interact with this module. It acts as an optional dependency resolved by `#titanpl/cli`. If you run TitanPlanet on a Linux x64 machine, npm/yarn automatically downloads this native binary to run your application.
|
|
10
|
-
|
|
11
|
-
**Important Note:** Currently, Titan Planet and its entire package ecosystem are only for Windows. The Linux version is in development (dev only) for the new architecture and will be launched later.
|
|
1
|
+
# @titanpl/engine-linux-x64
|
|
2
|
+
|
|
3
|
+
The Linux x64 pre-compiled native engine binary for Titan Planet.
|
|
4
|
+
|
|
5
|
+
## What it works (What it does)
|
|
6
|
+
This package holds the core Rust + Axum high-performance web server tightly coupled with the Boa JavaScript execution runtime. It is built natively for Linux x64 environments, requiring no Node.js execution layer.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
You don't need to manually interact with this module. It acts as an optional dependency resolved by `#titanpl/cli`. If you run TitanPlanet on a Linux x64 machine, npm/yarn automatically downloads this native binary to run your application.
|
|
10
|
+
|
|
11
|
+
**Important Note:** Currently, Titan Planet and its entire package ecosystem are only for Windows. The Linux version is in development (dev only) for the new architecture and will be launched later.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @titanpl/engine-win32-x64
|
|
2
|
-
|
|
3
|
-
The Windows x64 pre-compiled native engine binary for Titan Planet.
|
|
4
|
-
|
|
5
|
-
## What it works (What it does)
|
|
6
|
-
This module provides the highly concurrent Rust-based server binary (`titan.exe`) powered by Axum and Boa. It removes the necessity of a Node.js event loop by only executing static routes in Rust and specific dynamic logic in embedded JavaScript.
|
|
7
|
-
|
|
8
|
-
## How it works
|
|
9
|
-
Like the other engine packages, this works entirely behind the scenes. When `@titanpl/cli` is installed on a Windows instance, it fetches this `.exe` runtime. The CLI then maps your built assets and JS routes into the binary for deployment.
|
|
10
|
-
|
|
11
|
-
**Important Note:** Currently, Titan Planet and its entire package ecosystem are only for Windows. The Linux version is in development (dev only) for the new architecture and will be launched later.
|
|
1
|
+
# @titanpl/engine-win32-x64
|
|
2
|
+
|
|
3
|
+
The Windows x64 pre-compiled native engine binary for Titan Planet.
|
|
4
|
+
|
|
5
|
+
## What it works (What it does)
|
|
6
|
+
This module provides the highly concurrent Rust-based server binary (`titan.exe`) powered by Axum and Boa. It removes the necessity of a Node.js event loop by only executing static routes in Rust and specific dynamic logic in embedded JavaScript.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
Like the other engine packages, this works entirely behind the scenes. When `@titanpl/cli` is installed on a Windows instance, it fetches this `.exe` runtime. The CLI then maps your built assets and JS routes into the binary for deployment.
|
|
10
|
+
|
|
11
|
+
**Important Note:** Currently, Titan Planet and its entire package ecosystem are only for Windows. The Linux version is in development (dev only) for the new architecture and will be launched later.
|
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @titanpl/native
|
|
2
|
-
|
|
3
|
-
The native utility extension module for Titan Planet.
|
|
4
|
-
|
|
5
|
-
## What it works (What it does)
|
|
6
|
-
It acts as the low-level communication bridge offering type definitions and utility wrappers out-of-the-box. Rather than being dependent on heavy JavaScript libraries, this package bridges Node-style features gracefully to the Titan runtime environment.
|
|
7
|
-
|
|
8
|
-
## How it works
|
|
9
|
-
You can import tools and primitives from this package into your server-side actions alongside `@titanpl/core` when you want direct low-level interaction or need access to platform operations that interact directly with the C/Rust engine.
|
|
10
|
-
|
|
11
|
-
**Important Note:** Currently, Titan Planet and its entire package ecosystem are only for Windows. The Linux version is in development (dev only) for the new architecture and will be launched later.
|
|
1
|
+
# @titanpl/native
|
|
2
|
+
|
|
3
|
+
The native utility extension module for Titan Planet.
|
|
4
|
+
|
|
5
|
+
## What it works (What it does)
|
|
6
|
+
It acts as the low-level communication bridge offering type definitions and utility wrappers out-of-the-box. Rather than being dependent on heavy JavaScript libraries, this package bridges Node-style features gracefully to the Titan runtime environment.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
You can import tools and primitives from this package into your server-side actions alongside `@titanpl/core` when you want direct low-level interaction or need access to platform operations that interact directly with the C/Rust engine.
|
|
10
|
+
|
|
11
|
+
**Important Note:** Currently, Titan Planet and its entire package ecosystem are only for Windows. The Linux version is in development (dev only) for the new architecture and will be launched later.
|