@ezetgalaxy/titan 26.7.2 → 26.7.4
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 +3 -1
- package/package.json +1 -1
- package/templates/Dockerfile +17 -4
- package/templates/server/src/extensions.rs +433 -216
- package/templates/server/src/main.rs +134 -68
- package/titanpl-sdk/README.md +14 -6
- package/titanpl-sdk/assets/titanpl-sdk.png +0 -0
- package/titanpl-sdk/package.json +2 -1
- package/titanpl-sdk/templates/Dockerfile +17 -4
- package/titanpl-sdk/templates/server/src/extensions.rs +423 -218
- package/titanpl-sdk/templates/server/src/main.rs +134 -68
package/README.md
CHANGED
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
# TITAN PLANET 🚀
|
|
19
|
+
# TITAN PLANET 🚀
|
|
20
|
+
[](https://github.com/ezet-galaxy/titanpl)
|
|
21
|
+
|
|
20
22
|
|
|
21
23
|
**JavaScript Simplicity. Rust Power. Zero Configuration.**
|
|
22
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezetgalaxy/titan",
|
|
3
|
-
"version": "26.7.
|
|
3
|
+
"version": "26.7.4",
|
|
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",
|
package/templates/Dockerfile
CHANGED
|
@@ -18,6 +18,20 @@ COPY . .
|
|
|
18
18
|
# Install JS dependencies (needed for Titan DSL + bundler)
|
|
19
19
|
RUN npm install
|
|
20
20
|
|
|
21
|
+
SHELL ["/bin/bash", "-c"]
|
|
22
|
+
|
|
23
|
+
# Extract Titan extensions into .ext
|
|
24
|
+
RUN mkdir -p /app/.ext && \
|
|
25
|
+
find /app/node_modules -maxdepth 5 -type f -name "titan.json" -print0 | \
|
|
26
|
+
while IFS= read -r -d '' file; do \
|
|
27
|
+
pkg_dir="$(dirname "$file")"; \
|
|
28
|
+
pkg_name="$(basename "$pkg_dir")"; \
|
|
29
|
+
echo "Copying Titan extension: $pkg_name from $pkg_dir"; \
|
|
30
|
+
cp -r "$pkg_dir" "/app/.ext/$pkg_name"; \
|
|
31
|
+
done && \
|
|
32
|
+
echo "Extensions in .ext:" && \
|
|
33
|
+
ls -R /app/.ext
|
|
34
|
+
|
|
21
35
|
# Build Titan metadata + bundle JS actions
|
|
22
36
|
RUN titan build
|
|
23
37
|
|
|
@@ -34,7 +48,7 @@ FROM debian:stable-slim
|
|
|
34
48
|
WORKDIR /app
|
|
35
49
|
|
|
36
50
|
# Copy Rust binary from builder stage
|
|
37
|
-
COPY --from=builder /app/server/target/release/server ./titan-server
|
|
51
|
+
COPY --from=builder /app/server/target/release/titan-server ./titan-server
|
|
38
52
|
|
|
39
53
|
# Copy Titan routing metadata
|
|
40
54
|
COPY --from=builder /app/server/routes.json ./routes.json
|
|
@@ -44,10 +58,9 @@ COPY --from=builder /app/server/action_map.json ./action_map.json
|
|
|
44
58
|
RUN mkdir -p /app/actions
|
|
45
59
|
COPY --from=builder /app/server/actions /app/actions
|
|
46
60
|
|
|
47
|
-
|
|
61
|
+
# Copy only Titan extensions
|
|
62
|
+
COPY --from=builder /app/.ext ./.ext
|
|
48
63
|
|
|
49
|
-
# Expose Titan port
|
|
50
64
|
EXPOSE 3000
|
|
51
65
|
|
|
52
|
-
# Start Titan
|
|
53
66
|
CMD ["./titan-server"]
|