@saasicat/cli 1.0.0-rc.3 → 1.0.0-rc.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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @saasicat/cli
2
2
 
3
+ ## What this is
4
+
3
5
  Cross-cutting helpers for consumer CLIs. Provides:
4
6
 
5
7
  - `CliContextService` — identity / MFA / production-confirm / audit-tag
@@ -12,6 +14,16 @@ Cross-cutting helpers for consumer CLIs. Provides:
12
14
 
13
15
  Spec: [`cli-conventions.md`][conventions] in `@saasicat/spec`.
14
16
 
17
+ ## What this is not
18
+
19
+ Not a CLI. There is no binary here: these are `nest-commander` flows and
20
+ services you register in **your** application's CLI, so they run with your
21
+ DI container, your database connection and your configuration.
22
+
23
+ Not the schema tooling either — `saasicat schema apply|check|migrate` and
24
+ `saasicat init` ship in the `saasicat` binary of this package's `bin`, and
25
+ are documented in the quickstart rather than here.
26
+
15
27
  ## Plugin Architecture
16
28
 
17
29
  Consumer CLIs are NestJS-Standalone applications based on
@@ -30,7 +42,17 @@ import { PrismaUserPortAdapter } from './adapters/prisma-user-port';
30
42
  @Module({
31
43
  imports: [
32
44
  PrismaModule,
33
- PlanCatalogModule.forRoot({ path: './config/plans.yaml' }),
45
+ PlanCatalogModule.forRoot({
46
+ projectKey: 'myapp',
47
+ currency: 'EUR',
48
+ vatRate: 19,
49
+ // The catalogue is read from the database, not from a file — the
50
+ // CLI's `plan-catalog import` puts it there.
51
+ sink: {
52
+ useFactory: (p) => new PrismaPlanCatalogReadSink(p),
53
+ inject: [PrismaService],
54
+ },
55
+ }),
34
56
  AdminModule.forRoot({
35
57
  mfaPort: { useFactory: (p) => new PrismaMfaAdapter(p), inject: [PrismaService] },
36
58
  auditPort: { useFactory: (p) => new PrismaAuditAdapter(p), inject: [PrismaService] },
@@ -141,3 +163,8 @@ Per [`cli-conventions.md`][conventions] §6:
141
163
  | 99 | internal |
142
164
 
143
165
  [conventions]: https://github.com/uelker70/saasicat/blob/main/packages/spec/cli-conventions.md
166
+
167
+ ## Next
168
+
169
+ - [Extend your CLI](../../docs/guides/extend-your-cli.md) — registering these flows in your app
170
+ - [Quickstart](../../docs/quickstart.md) — `saasicat init`, `schema apply`, `schema check`
package/dist/.build-stamp CHANGED
@@ -1 +1 @@
1
- 50ce8728dd7552e453dc2c893c0d307dfd0f579444dbe981751740c140d74380
1
+ 6377a594af475a22f1a83fd0c3d2c8c4a01621960510601c5fbc36fe134a49b0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasicat/cli",
3
- "version": "1.0.0-rc.3",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "CLI helpers for SaaS platform consumers. Provides CliContextService (identity, MFA, production confirm, audit tag).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "qrcode-terminal": "^0.12.0",
33
- "@saasicat/nest": "^1.0.0-rc.3",
34
- "@saasicat/spec": "^1.0.0-rc.3",
35
- "@saasicat/core": "^1.0.0-rc.3"
33
+ "@saasicat/nest": "^1.0.0-rc.4",
34
+ "@saasicat/spec": "^1.0.0-rc.4",
35
+ "@saasicat/core": "^1.0.0-rc.4"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@nestjs/common": "^11.0.0",
@@ -18,7 +18,7 @@ export const persistence = prismaPersistence({
18
18
  // If your models are called something else, map them here:
19
19
  // `adminResources: { delegates: { tenant: 'organization' },
20
20
  // fields: { tenant: { users: 'members' } } }`
21
- // — see docs/migrating-an-existing-app.md. Left out on purpose otherwise:
21
+ // — see docs/guides/integrate-into-an-existing-app.md. Left out on purpose otherwise:
22
22
  // the tenant row counter defaults to whatever the mapping says the users
23
23
  // relation is called, and naming it here would hardcode `users` past that.
24
24
  });
@@ -16,7 +16,7 @@ export const persistence = prismaPersistence({
16
16
  // If your models are called something else, map them here:
17
17
  // `adminResources: { delegates: { tenant: 'organization' },
18
18
  // fields: { tenant: { users: 'members' } } }`
19
- // — see docs/migrating-an-existing-app.md. Left out on purpose otherwise:
19
+ // — see docs/guides/integrate-into-an-existing-app.md. Left out on purpose otherwise:
20
20
  // the tenant row counter defaults to whatever the mapping says the users
21
21
  // relation is called, and naming it here would hardcode `users` past that.
22
22
  });