titanpl-sdk 0.1.3 → 0.1.6
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 +1 -2
- package/assets/titanpl-sdk.png +0 -0
- package/package.json +1 -1
- package/templates/Dockerfile +17 -4
- package/templates/server/src/extensions.rs +423 -218
- package/templates/server/src/main.rs +134 -68
- package/assets/titan-logo.png +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
<div align="center">
|
|
3
|
-
<img src="./assets/
|
|
3
|
+
<img src="./assets/titanpl-sdk.png" alt="Titan SDK Logo" width="120" />
|
|
4
4
|
<h1>Titan SDK</h1>
|
|
5
5
|
<p>
|
|
6
6
|
<b>The Developer Toolkit for Titan Planet. Type safety, IntelliSense, and Extension Testing.</b>
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
[](https://www.npmjs.com/package/titanpl-sdk)
|
|
13
13
|
[](https://opensource.org/licenses/ISC)
|
|
14
|
-
[](https://github.com/ezet-galaxy/titanpl)
|
|
15
14
|
|
|
16
15
|
</div>
|
|
17
16
|
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "titanpl-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
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",
|
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"]
|