@stacksjs/ts-cloud 0.1.8 → 0.1.11
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 +17 -17
- package/dist/aws/setup-sms.d.ts +1 -0
- package/dist/bin/cli.js +11 -11
- package/dist/config.d.ts +1 -1
- package/dist/generators/infrastructure.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +43 -43
- package/dist/types.d.ts +1 -1
- package/dist/validation/template.d.ts +1 -1
- package/package.json +16 -15
package/README.md
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<!-- [![npm downloads][npm-downloads-src]][npm-downloads-href] -->
|
|
7
7
|
<!-- [![Codecov][codecov-src]][codecov-href] -->
|
|
8
8
|
|
|
9
|
-
#
|
|
9
|
+
# ts-cloud
|
|
10
10
|
|
|
11
11
|
> Zero-dependency AWS infrastructure as TypeScript. Deploy production-ready cloud infrastructure without AWS SDK or CLI.
|
|
12
12
|
|
|
13
13
|
## Overview
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
ts-cloud is a modern infrastructure-as-code framework that lets you define AWS infrastructure using TypeScript configuration files. Unlike AWS CDK or Terraform, ts-cloud:
|
|
16
16
|
|
|
17
17
|
- **Zero AWS Dependencies** - No AWS SDK, no AWS CLI. Direct AWS API calls only.
|
|
18
18
|
- **Type-Safe Configuration** - Full TypeScript types for all AWS resources
|
|
@@ -86,7 +86,7 @@ No SDK, no CLI - pure AWS Signature V4 API calls:
|
|
|
86
86
|
### Installation
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
bun add
|
|
89
|
+
bun add ts-cloud
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
### Your First Deployment
|
|
@@ -94,7 +94,7 @@ bun add @stacksjs/ts-cloud
|
|
|
94
94
|
Create a `cloud.config.ts`:
|
|
95
95
|
|
|
96
96
|
```typescript
|
|
97
|
-
import { createStaticSitePreset } from '
|
|
97
|
+
import { createStaticSitePreset } from 'ts-cloud/presets'
|
|
98
98
|
|
|
99
99
|
export default createStaticSitePreset({
|
|
100
100
|
name: 'My Website',
|
|
@@ -121,7 +121,7 @@ That's it! You now have:
|
|
|
121
121
|
#### Full-Stack Application
|
|
122
122
|
|
|
123
123
|
```typescript
|
|
124
|
-
import { createFullStackAppPreset } from '
|
|
124
|
+
import { createFullStackAppPreset } from 'ts-cloud/presets'
|
|
125
125
|
|
|
126
126
|
export default createFullStackAppPreset({
|
|
127
127
|
name: 'My App',
|
|
@@ -142,7 +142,7 @@ Includes:
|
|
|
142
142
|
#### Serverless API
|
|
143
143
|
|
|
144
144
|
```typescript
|
|
145
|
-
import { createApiBackendPreset } from '
|
|
145
|
+
import { createApiBackendPreset } from 'ts-cloud/presets'
|
|
146
146
|
|
|
147
147
|
export default createApiBackendPreset({
|
|
148
148
|
name: 'My API',
|
|
@@ -165,7 +165,7 @@ Includes:
|
|
|
165
165
|
You can extend any preset with custom configuration:
|
|
166
166
|
|
|
167
167
|
```typescript
|
|
168
|
-
import { createNodeJsServerPreset, extendPreset } from '
|
|
168
|
+
import { createNodeJsServerPreset, extendPreset } from 'ts-cloud/presets'
|
|
169
169
|
|
|
170
170
|
export default extendPreset(
|
|
171
171
|
createNodeJsServerPreset({
|
|
@@ -192,7 +192,7 @@ export default extendPreset(
|
|
|
192
192
|
Combine multiple presets:
|
|
193
193
|
|
|
194
194
|
```typescript
|
|
195
|
-
import { composePresets, createStaticSitePreset, createApiBackendPreset } from '
|
|
195
|
+
import { composePresets, createStaticSitePreset, createApiBackendPreset } from 'ts-cloud/presets'
|
|
196
196
|
|
|
197
197
|
export default composePresets(
|
|
198
198
|
createStaticSitePreset({ name: 'Frontend', slug: 'frontend', domain: 'example.com' }),
|
|
@@ -215,7 +215,7 @@ export default composePresets(
|
|
|
215
215
|
Generate templates programmatically:
|
|
216
216
|
|
|
217
217
|
```typescript
|
|
218
|
-
import { CloudFormationBuilder } from '
|
|
218
|
+
import { CloudFormationBuilder } from 'ts-cloud/cloudformation'
|
|
219
219
|
|
|
220
220
|
const builder = new CloudFormationBuilder(config)
|
|
221
221
|
const template = builder.build()
|
|
@@ -228,7 +228,7 @@ console.log(JSON.stringify(template, null, 2))
|
|
|
228
228
|
Use the AWS clients directly:
|
|
229
229
|
|
|
230
230
|
```typescript
|
|
231
|
-
import { CloudFormationClient, S3Client, CloudFrontClient } from '
|
|
231
|
+
import { CloudFormationClient, S3Client, CloudFrontClient } from 'ts-cloud/aws'
|
|
232
232
|
|
|
233
233
|
// CloudFormation
|
|
234
234
|
const cfn = new CloudFormationClient('us-east-1')
|
|
@@ -255,16 +255,16 @@ await cloudfront.createInvalidation({
|
|
|
255
255
|
|
|
256
256
|
## DNS Providers
|
|
257
257
|
|
|
258
|
-
|
|
258
|
+
ts-cloud supports multiple DNS providers for domain management and SSL certificate validation:
|
|
259
259
|
|
|
260
260
|
### Cloudflare
|
|
261
261
|
|
|
262
262
|
1. Log in to your [Cloudflare Dashboard](https://dash.cloudflare.com/)
|
|
263
|
-
2. Go to **My Profile** → **API Tokens** (or visit https://dash.cloudflare.com/profile/api-tokens)
|
|
263
|
+
2. Go to **My Profile** → **API Tokens** (or visit <https://dash.cloudflare.com/profile/api-tokens>)
|
|
264
264
|
3. Click **Create Token**
|
|
265
265
|
4. Use the **Edit zone DNS** template, or create a custom token with:
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
- **Permissions**: Zone → DNS → Edit
|
|
267
|
+
- **Zone Resources**: Include → All zones (or specific zones)
|
|
268
268
|
5. Copy the generated token
|
|
269
269
|
|
|
270
270
|
```bash
|
|
@@ -349,7 +349,7 @@ bun run typecheck
|
|
|
349
349
|
|
|
350
350
|
### No Dependencies
|
|
351
351
|
|
|
352
|
-
|
|
352
|
+
ts-cloud uses **zero external dependencies** for AWS operations:
|
|
353
353
|
|
|
354
354
|
- **AWS Signature V4** - Manual request signing for authentication
|
|
355
355
|
- **Direct HTTPS** - Native `fetch()` for API calls
|
|
@@ -397,8 +397,8 @@ The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.
|
|
|
397
397
|
Made with 💙
|
|
398
398
|
|
|
399
399
|
<!-- Badges -->
|
|
400
|
-
[npm-version-src]: https://img.shields.io/npm/v
|
|
401
|
-
[npm-version-href]: https://npmjs.com/package
|
|
400
|
+
[npm-version-src]: https://img.shields.io/npm/v/ts-cloud?style=flat-square
|
|
401
|
+
[npm-version-href]: https://npmjs.com/package/ts-cloud
|
|
402
402
|
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/ts-cloud/ci.yml?style=flat-square&branch=main
|
|
403
403
|
[github-actions-href]: https://github.com/stacksjs/ts-cloud/actions?query=workflow%3Aci
|
|
404
404
|
|
package/dist/aws/setup-sms.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare function setupSmsInfrastructure(config: SmsSetupConfig): Promise<
|
|
|
6
6
|
/**
|
|
7
7
|
* Get complete SMS infrastructure status
|
|
8
8
|
*/
|
|
9
|
+
// pickier-disable-next-line no-unused-vars
|
|
9
10
|
export declare function getSmsInfrastructureStatus(config: {
|
|
10
11
|
region?: string
|
|
11
12
|
accountName?: string
|