@bella-baxter/nestjs 0.1.1-preview.15 → 0.1.1-preview.150

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +76 -0
  3. package/package.json +13 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Cosmic Chimps
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # @bella-baxter/nestjs
2
+
3
+ [![npm](https://img.shields.io/npm/v/@bella-baxter/nestjs)](https://www.npmjs.com/package/@bella-baxter/nestjs)
4
+ [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
+
6
+ [Bella Baxter](https://github.com/Cosmic-Chimps/bella-baxter) module for NestJS — registers `BellaConfigService` as a globally injectable service backed by live-reloading secrets.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @bella-baxter/nestjs @nestjs/common @nestjs/core
12
+ # or
13
+ pnpm add @bella-baxter/nestjs @nestjs/common @nestjs/core
14
+ ```
15
+
16
+ ## Setup
17
+
18
+ ```ts
19
+ // app.module.ts
20
+ import { Module } from '@nestjs/common';
21
+ import { BellaModule } from '@bella-baxter/nestjs';
22
+
23
+ @Module({
24
+ imports: [
25
+ BellaModule.register({
26
+ baxterUrl: process.env.BELLA_BAXTER_URL!,
27
+ apiKey: process.env.BELLA_BAXTER_API_KEY!,
28
+ projectSlug: 'my-app', // or BELLA_BAXTER_PROJECT env var
29
+ environmentSlug: 'production', // or BELLA_BAXTER_ENV env var
30
+ }),
31
+ ],
32
+ })
33
+ export class AppModule {}
34
+ ```
35
+
36
+ ## Inject secrets
37
+
38
+ ```ts
39
+ // your.service.ts
40
+ import { Injectable } from '@nestjs/common';
41
+ import { BellaConfigService } from '@bella-baxter/nestjs';
42
+
43
+ @Injectable()
44
+ export class YourService {
45
+ constructor(private readonly bella: BellaConfigService) {}
46
+
47
+ getDbUrl(): string {
48
+ return this.bella.getOrThrow('DATABASE_URL');
49
+ }
50
+ }
51
+ ```
52
+
53
+ ## Typed secrets
54
+
55
+ Run `bella secrets generate typescript --declaration` to generate `bella-secrets.d.ts`. The `BellaConfigService` proxy picks up the augmented `BellaSecrets` interface automatically:
56
+
57
+ ```ts
58
+ this.bella.DATABASE_URL // string — typed!
59
+ this.bella.PORT // number — after adding coercions
60
+ ```
61
+
62
+ ## Environment variables
63
+
64
+ | Variable | Description |
65
+ |----------|-------------|
66
+ | `BELLA_BAXTER_URL` | Base URL of the Bella Baxter API |
67
+ | `BELLA_BAXTER_API_KEY` | API key (`bax-...`) |
68
+ | `BELLA_BAXTER_PROJECT` | Project slug |
69
+ | `BELLA_BAXTER_ENV` | Environment slug |
70
+ | `BELLA_BAXTER_PRIVATE_KEY` | Private key for ZKE (optional) |
71
+
72
+ ## Links
73
+
74
+ - [GitHub](https://github.com/Cosmic-Chimps/bella-baxter)
75
+ - [Issues](https://github.com/Cosmic-Chimps/bella-baxter/issues)
76
+ - [Core SDK](https://www.npmjs.com/package/@bella-baxter/sdk)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bella-baxter/nestjs",
3
- "version": "0.1.1-preview.15",
3
+ "version": "0.1.1-preview.150",
4
4
  "description": "Bella Baxter NestJS module — registers BellaConfig as an injectable service",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,17 +12,18 @@
12
12
  }
13
13
  },
14
14
  "files": [
15
+ "README.md",
15
16
  "dist"
16
17
  ],
17
18
  "dependencies": {
18
- "@bella-baxter/sdk": "0.1.1-preview.15"
19
+ "@bella-baxter/sdk": "0.1.1-preview.150"
19
20
  },
20
21
  "peerDependencies": {
21
22
  "@nestjs/common": ">=10",
22
23
  "@nestjs/core": ">=10"
23
24
  },
24
25
  "devDependencies": {
25
- "typescript": "^5.9.3",
26
+ "typescript": "^6.0.2",
26
27
  "@types/node": "^25.5.0",
27
28
  "@nestjs/common": "^11.0.0",
28
29
  "@nestjs/core": "^11.0.0",
@@ -35,6 +36,15 @@
35
36
  "module"
36
37
  ],
37
38
  "license": "MIT",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/Cosmic-Chimps/bella-baxter-js.git",
42
+ "directory": "apps/sdk/js/packages/nestjs"
43
+ },
44
+ "homepage": "https://github.com/Cosmic-Chimps/bella-baxter-js/tree/main/packages/nestjs#readme",
45
+ "bugs": {
46
+ "url": "https://github.com/Cosmic-Chimps/bella-baxter-js/issues"
47
+ },
38
48
  "scripts": {
39
49
  "build": "tsc",
40
50
  "typecheck": "tsc --noEmit"