@titanpl/packet 1.0.1 → 26.16.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/README.md +11 -0
- package/js/titan/bundle.js +1 -1
- package/js/titan/error-box.js +2 -2
- package/package.json +2 -2
- package/ts/titan/dev.js +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @titanpl/packet
|
|
2
|
+
|
|
3
|
+
The internal bundler and module packer for Titan Planet.
|
|
4
|
+
|
|
5
|
+
## What it works (What it does)
|
|
6
|
+
This library parses all your app routes, components, middleware, and logic paths, then packages them into a static `build` output layer consisting of metadata files and JavaScript assets.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
This package is triggered whenever you run `titan init` or `titan build` from the `@titanpl/cli`. It hooks into tools like `esbuild` to optimize your scripts efficiently. It strips unnecessary pieces out so that only explicit route actions make their way aggressively over to the Titan runtime 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.
|
package/js/titan/bundle.js
CHANGED
|
@@ -68,7 +68,7 @@ const titanNodeCompatPlugin = {
|
|
|
68
68
|
*/
|
|
69
69
|
function getTitanVersion() {
|
|
70
70
|
try {
|
|
71
|
-
const pkgPath = require.resolve("
|
|
71
|
+
const pkgPath = require.resolve("titanpl/package.json");
|
|
72
72
|
return JSON.parse(fs.readFileSync(pkgPath, "utf-8")).version;
|
|
73
73
|
} catch (e) {
|
|
74
74
|
return "0.1.0";
|
package/js/titan/error-box.js
CHANGED
|
@@ -25,7 +25,7 @@ const red = (text) => `\x1b[31m${text}\x1b[0m`;
|
|
|
25
25
|
function getTitanVersion() {
|
|
26
26
|
try {
|
|
27
27
|
const require = createRequire(import.meta.url);
|
|
28
|
-
const pkgPath = require.resolve("
|
|
28
|
+
const pkgPath = require.resolve("titanpl/package.json");
|
|
29
29
|
return JSON.parse(fs.readFileSync(pkgPath, "utf-8")).version;
|
|
30
30
|
} catch (e) {
|
|
31
31
|
try {
|
|
@@ -34,7 +34,7 @@ function getTitanVersion() {
|
|
|
34
34
|
const pkgPath = path.join(cur, "package.json");
|
|
35
35
|
if (fs.existsSync(pkgPath)) {
|
|
36
36
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
37
|
-
if (pkg.name === "
|
|
37
|
+
if (pkg.name === "titanpl") return pkg.version;
|
|
38
38
|
}
|
|
39
39
|
cur = path.join(cur, "..");
|
|
40
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titanpl/packet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.16.2",
|
|
4
4
|
"description": "The bundler for TitanPl servers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bundler",
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
17
17
|
}
|
|
18
|
-
}
|
|
18
|
+
}
|
package/ts/titan/dev.js
CHANGED
|
@@ -22,7 +22,7 @@ const bold = (t) => `\x1b[1m${t}\x1b[0m`;
|
|
|
22
22
|
function getTitanVersion() {
|
|
23
23
|
try {
|
|
24
24
|
const require = createRequire(import.meta.url);
|
|
25
|
-
const pkgPath = require.resolve("
|
|
25
|
+
const pkgPath = require.resolve("titanpl/package.json");
|
|
26
26
|
return JSON.parse(fs.readFileSync(pkgPath, "utf-8")).version;
|
|
27
27
|
} catch (e) {
|
|
28
28
|
try {
|
|
@@ -32,7 +32,7 @@ function getTitanVersion() {
|
|
|
32
32
|
const pkgPath = path.join(cur, "package.json");
|
|
33
33
|
if (fs.existsSync(pkgPath)) {
|
|
34
34
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
35
|
-
if (pkg.name === "
|
|
35
|
+
if (pkg.name === "titanpl") return pkg.version;
|
|
36
36
|
}
|
|
37
37
|
cur = path.join(cur, "..");
|
|
38
38
|
}
|