titan-sdk 0.0.1 → 0.0.3
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/LICENSE +15 -0
- package/README.md +106 -0
- package/package.json +14 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Ezet Galaxy
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
# 🛠️ Titan SDK
|
|
3
|
+
|
|
4
|
+
**Empower your Titan Planet development with first-class type safety and elite developer tools.**
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/titan-sdk)
|
|
7
|
+
[](https://opensource.org/licenses/ISC)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🌌 Overview
|
|
12
|
+
|
|
13
|
+
**Titan SDK** is the official developer toolkit for [Titan Planet](https://github.com/ezetgalaxy/titan). It provides the glue between your JavaScript actions and the high-performance Rust runtime, ensuring you have full IntelliSense, type safety, and debugging capabilities.
|
|
14
|
+
|
|
15
|
+
Whether you are building standard API actions or complex extensions, Titan SDK is your essential companion.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ✨ Features
|
|
20
|
+
|
|
21
|
+
- **💎 Elite IntelliSense**: Full TypeScript definitions for the global `t` object.
|
|
22
|
+
- **🛡️ Type Safety**: Prevent runtime errors with compile-time checks for `t.log`, `t.fetch`, `t.db`, and more.
|
|
23
|
+
- **🔌 Extension Support**: Tools and types for building custom extensions that plug directly into the Titan Rust engine.
|
|
24
|
+
- **🚀 Zero Overhead**: Designed to be a development-only dependency that maximizes productivity without bloating your production binary.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 🚀 Getting Started
|
|
29
|
+
|
|
30
|
+
### Installation
|
|
31
|
+
|
|
32
|
+
Add the SDK to your Titan project:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install --save-dev titan-sdk
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Enable IntelliSense
|
|
39
|
+
|
|
40
|
+
To get full autocomplete for the Titan runtime APIs, simply create a `tsconfig.json` or `jsconfig.json` in your project root:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"compilerOptions": {
|
|
45
|
+
"types": ["titan-sdk"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Now, when you type `t.` in your actions, you'll see everything available:
|
|
51
|
+
|
|
52
|
+
```js
|
|
53
|
+
export function myAction(req) {
|
|
54
|
+
t.log.info("Request received", req.path);
|
|
55
|
+
|
|
56
|
+
// Fully typed db queries!
|
|
57
|
+
const data = t.db.query("SELECT * FROM users WHERE id = $1", [req.params.id]);
|
|
58
|
+
|
|
59
|
+
return data;
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 🔧 Core APIs Powered by SDK
|
|
66
|
+
|
|
67
|
+
The SDK provides types for the entire `t` namespace:
|
|
68
|
+
|
|
69
|
+
- **`t.log`**: Structured logging (info, warn, error).
|
|
70
|
+
- **`t.fetch`**: High-performance Rust-native fetch wrapper.
|
|
71
|
+
- **`t.db`**: Native PostgreSQL interface for extreme speed.
|
|
72
|
+
- **`t.read`**: Optimized file system access.
|
|
73
|
+
- **`t.jwt`**: Built-in JWT handling (if enabled).
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🧩 Building Extensions
|
|
78
|
+
|
|
79
|
+
Titan SDK allows you to define types for your own extensions.
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// Define your extension types
|
|
83
|
+
declare global {
|
|
84
|
+
namespace Titan {
|
|
85
|
+
interface Runtime {
|
|
86
|
+
myCustomTool: {
|
|
87
|
+
doSomething: () => void;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 🌍 Community & Documentation
|
|
97
|
+
|
|
98
|
+
- **Documentation**: [Titan Planet Docs](https://titan-docs-ez.vercel.app/docs)
|
|
99
|
+
- **Author**: [ezetgalaxy](https://github.com/ezetgalaxy)
|
|
100
|
+
- **Ecosystem**: [Titan Planet](https://github.com/ezetgalaxy/titan)
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
<p align="center">
|
|
105
|
+
Built with ❤️ for the <a href="https://github.com/ezetgalaxy/titan">Titan Planet</a> ecosystem.
|
|
106
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "titan-sdk",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "SDK for
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Developer SDK and Type Definitions for Titan Planet — the high-performance Rust-powered JavaScript backend framework. Includes IntelliSense support and extension building tools.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
9
|
"titan-sdk": "./bin/run.js"
|
|
10
10
|
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"titan",
|
|
13
|
+
"titan-planet",
|
|
14
|
+
"titan-sdk",
|
|
15
|
+
"ezetgalaxy",
|
|
16
|
+
"types",
|
|
17
|
+
"typescript",
|
|
18
|
+
"intellisense",
|
|
19
|
+
"sdk",
|
|
20
|
+
"backend-sdk",
|
|
21
|
+
"extension-development"
|
|
22
|
+
],
|
|
11
23
|
"license": "ISC"
|
|
12
24
|
}
|