@opensaas/stack-cli 0.1.0 ā 0.1.2
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +21 -0
- package/CLAUDE.md +249 -0
- package/LICENSE +21 -0
- package/README.md +65 -5
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +6 -1
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts +9 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +27 -338
- package/dist/commands/init.js.map +1 -1
- package/dist/generator/context.d.ts.map +1 -1
- package/dist/generator/context.js +78 -3
- package/dist/generator/context.js.map +1 -1
- package/dist/generator/index.d.ts +1 -0
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +1 -0
- package/dist/generator/index.js.map +1 -1
- package/dist/generator/mcp.d.ts +14 -0
- package/dist/generator/mcp.d.ts.map +1 -0
- package/dist/generator/mcp.js +193 -0
- package/dist/generator/mcp.js.map +1 -0
- package/dist/generator/types.d.ts.map +1 -1
- package/dist/generator/types.js +11 -33
- package/dist/generator/types.js.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +9 -3
- package/src/commands/__snapshots__/generate.test.ts.snap +265 -0
- package/src/commands/dev.test.ts +216 -0
- package/src/commands/generate.test.ts +272 -0
- package/src/commands/generate.ts +7 -0
- package/src/commands/init.ts +28 -361
- package/src/generator/__snapshots__/context.test.ts.snap +137 -0
- package/src/generator/__snapshots__/prisma.test.ts.snap +182 -0
- package/src/generator/__snapshots__/types.test.ts.snap +512 -0
- package/src/generator/context.test.ts +145 -0
- package/src/generator/context.ts +80 -3
- package/src/generator/index.ts +1 -0
- package/src/generator/mcp.test.ts +393 -0
- package/src/generator/mcp.ts +221 -0
- package/src/generator/prisma.test.ts +221 -0
- package/src/generator/types.test.ts +280 -0
- package/src/generator/types.ts +14 -36
- package/src/index.ts +8 -4
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vitest.config.ts +26 -0
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# @opensaas/stack-cli
|
|
2
|
+
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7bb96e6: Fix up init command to work
|
|
8
|
+
- @opensaas/stack-core@0.1.2
|
|
9
|
+
- @opensaas/stack-mcp@0.1.2
|
|
10
|
+
|
|
11
|
+
## 0.1.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- f8ebc0e: Add base mcp server
|
|
16
|
+
- 045c071: Add field and image upload
|
|
17
|
+
- Updated dependencies [9a3fda5]
|
|
18
|
+
- Updated dependencies [f8ebc0e]
|
|
19
|
+
- Updated dependencies [045c071]
|
|
20
|
+
- @opensaas/stack-core@0.1.1
|
|
21
|
+
- @opensaas/stack-mcp@0.1.1
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# @opensaas/stack-cli
|
|
2
|
+
|
|
3
|
+
Command-line tools for OpenSaas Stack providing code generation and development utilities.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Converts `opensaas.config.ts` into Prisma schema and TypeScript types. Provides watch mode for automatic regeneration during development.
|
|
8
|
+
|
|
9
|
+
## Key Files & Commands
|
|
10
|
+
|
|
11
|
+
### Binary (`bin/opensaas.js`)
|
|
12
|
+
|
|
13
|
+
Entry point exposing `opensaas` CLI command
|
|
14
|
+
|
|
15
|
+
### Commands (`src/commands/`)
|
|
16
|
+
|
|
17
|
+
- `generate.ts` - One-time generation
|
|
18
|
+
- `dev.ts` - Watch mode with automatic regeneration
|
|
19
|
+
- `init.ts` - Project scaffolding (future)
|
|
20
|
+
|
|
21
|
+
### Generators (`src/generator/`)
|
|
22
|
+
|
|
23
|
+
- `prisma.ts` - Generates `prisma/schema.prisma` from config
|
|
24
|
+
- `types.ts` - Generates `.opensaas/types.ts` TypeScript types
|
|
25
|
+
- `context.ts` - Generates `.opensaas/context.ts` context factory
|
|
26
|
+
- `mcp.ts` - Generates MCP tools metadata
|
|
27
|
+
- `type-patcher.ts` - Patches Prisma types for relationships
|
|
28
|
+
|
|
29
|
+
## Architecture
|
|
30
|
+
|
|
31
|
+
### Config Loading
|
|
32
|
+
|
|
33
|
+
Uses `jiti` to execute TypeScript config:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
const jiti = createJiti(import.meta.url)
|
|
37
|
+
const config = jiti('./opensaas.config.ts').default
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Generator Pipeline
|
|
41
|
+
|
|
42
|
+
1. Load config from `opensaas.config.ts`
|
|
43
|
+
2. Generate Prisma schema ā `prisma/schema.prisma`
|
|
44
|
+
3. Generate TypeScript types ā `.opensaas/types.ts`
|
|
45
|
+
4. Generate context factory ā `.opensaas/context.ts`
|
|
46
|
+
5. Generate MCP tools (if enabled) ā `.opensaas/mcp-tools.json`
|
|
47
|
+
|
|
48
|
+
### Watch Mode
|
|
49
|
+
|
|
50
|
+
Uses `chokidar` to watch `opensaas.config.ts`:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
const watcher = chokidar.watch('opensaas.config.ts')
|
|
54
|
+
watcher.on('change', () => runGenerator())
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## CLI Usage
|
|
58
|
+
|
|
59
|
+
### Generate Command
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
opensaas generate
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Outputs:
|
|
66
|
+
|
|
67
|
+
- `ā
Prisma schema generated`
|
|
68
|
+
- `ā
TypeScript types generated`
|
|
69
|
+
- Next steps (run `prisma generate` and `db push`)
|
|
70
|
+
|
|
71
|
+
### Dev Command
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
opensaas dev
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Outputs:
|
|
78
|
+
|
|
79
|
+
- Initial generation
|
|
80
|
+
- `š Watching opensaas.config.ts for changes...`
|
|
81
|
+
- Auto-regenerates on file changes
|
|
82
|
+
|
|
83
|
+
## Generated Files
|
|
84
|
+
|
|
85
|
+
### Prisma Schema (`prisma/schema.prisma`)
|
|
86
|
+
|
|
87
|
+
```prisma
|
|
88
|
+
datasource db {
|
|
89
|
+
provider = "sqlite"
|
|
90
|
+
url = env("DATABASE_URL")
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
generator client {
|
|
94
|
+
provider = "prisma-client-js"
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
model Post {
|
|
98
|
+
id String @id @default(cuid())
|
|
99
|
+
title String
|
|
100
|
+
createdAt DateTime @default(now())
|
|
101
|
+
updatedAt DateTime @updatedAt
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Types (`.opensaas/types.ts`)
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
export type Post = {
|
|
109
|
+
id: string
|
|
110
|
+
title: string
|
|
111
|
+
createdAt: Date
|
|
112
|
+
updatedAt: Date
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type PostCreateInput = {
|
|
116
|
+
title: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type PostUpdateInput = {
|
|
120
|
+
title?: string
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Context Factory (`.opensaas/context.ts`)
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import { createContext } from '@opensaas/stack-core'
|
|
128
|
+
import { PrismaClient } from '@prisma/client'
|
|
129
|
+
import config from '../opensaas.config'
|
|
130
|
+
|
|
131
|
+
const prisma = new PrismaClient()
|
|
132
|
+
|
|
133
|
+
export function getContext(session?: any) {
|
|
134
|
+
return createContext(config, prisma, session)
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Integration Points
|
|
139
|
+
|
|
140
|
+
### With @opensaas/stack-core
|
|
141
|
+
|
|
142
|
+
- Imports generator functions from core
|
|
143
|
+
- Delegates Prisma/TS generation to field methods via core
|
|
144
|
+
|
|
145
|
+
### With @opensaas/stack-auth
|
|
146
|
+
|
|
147
|
+
- Context factory supports custom `prismaClientConstructor` for Better-auth session provider
|
|
148
|
+
|
|
149
|
+
### With @opensaas/stack-mcp
|
|
150
|
+
|
|
151
|
+
- Generates MCP tools metadata when MCP enabled in config
|
|
152
|
+
|
|
153
|
+
### With Prisma
|
|
154
|
+
|
|
155
|
+
Workflow:
|
|
156
|
+
|
|
157
|
+
1. `opensaas generate` ā creates `prisma/schema.prisma`
|
|
158
|
+
2. `npx prisma generate` ā creates Prisma Client
|
|
159
|
+
3. `npx prisma db push` ā pushes schema to database
|
|
160
|
+
|
|
161
|
+
## Common Patterns
|
|
162
|
+
|
|
163
|
+
### Development Workflow
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Terminal 1: Watch and regenerate
|
|
167
|
+
opensaas dev
|
|
168
|
+
|
|
169
|
+
# Terminal 2: Run Next.js
|
|
170
|
+
pnpm next dev
|
|
171
|
+
|
|
172
|
+
# Edit opensaas.config.ts - auto regenerates!
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Package.json Scripts
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"scripts": {
|
|
180
|
+
"generate": "opensaas generate",
|
|
181
|
+
"db:push": "prisma db push",
|
|
182
|
+
"db:studio": "prisma studio",
|
|
183
|
+
"dev": "opensaas dev"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### CI/CD Integration
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
- run: pnpm install
|
|
192
|
+
- run: opensaas generate
|
|
193
|
+
- run: npx prisma generate
|
|
194
|
+
- run: pnpm test
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Custom Prisma Client
|
|
198
|
+
|
|
199
|
+
Config with custom constructor:
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
config({
|
|
203
|
+
db: {
|
|
204
|
+
provider: 'postgresql',
|
|
205
|
+
url: process.env.DATABASE_URL,
|
|
206
|
+
prismaClientConstructor: (PrismaClient) => {
|
|
207
|
+
// Custom adapter setup
|
|
208
|
+
return new PrismaClient({ adapter })
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
})
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Generated context uses custom constructor:
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
// .opensaas/context.ts
|
|
218
|
+
const prisma = config.db.prismaClientConstructor
|
|
219
|
+
? config.db.prismaClientConstructor(PrismaClient)
|
|
220
|
+
: new PrismaClient()
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Type Patching
|
|
224
|
+
|
|
225
|
+
CLI patches Prisma types for relationship fields to handle access control:
|
|
226
|
+
|
|
227
|
+
- Relationships can be `null` when access denied
|
|
228
|
+
- Adds `| null` to relationship field types in generated types
|
|
229
|
+
|
|
230
|
+
## Error Handling
|
|
231
|
+
|
|
232
|
+
Common errors:
|
|
233
|
+
|
|
234
|
+
- Config not found ā check file exists in CWD
|
|
235
|
+
- TypeScript errors in config ā fix syntax in `opensaas.config.ts`
|
|
236
|
+
- Permission denied ā ensure write access to `prisma/` and `.opensaas/`
|
|
237
|
+
|
|
238
|
+
## Output Styling
|
|
239
|
+
|
|
240
|
+
Uses `chalk` and `ora` for colored, animated output:
|
|
241
|
+
|
|
242
|
+
- ā
Green checkmarks for success
|
|
243
|
+
- ā Red X for errors
|
|
244
|
+
- š Emoji for branding
|
|
245
|
+
- Spinner animations during generation
|
|
246
|
+
|
|
247
|
+
## Future Commands
|
|
248
|
+
|
|
249
|
+
`opensaas init` - Project scaffolding with templates (planned)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 OpenSaas Stack Contributors
|
|
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
CHANGED
|
@@ -98,18 +98,78 @@ Config changed, regenerating...
|
|
|
98
98
|
}
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
### `opensaas init`
|
|
101
|
+
### `opensaas init`
|
|
102
102
|
|
|
103
|
-
Create a new OpenSaas project
|
|
103
|
+
Create a new OpenSaas Stack project.
|
|
104
|
+
|
|
105
|
+
**Note:** This command delegates to `create-opensaas-app` for scaffolding. It's kept for backwards compatibility.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npx @opensaas/stack-cli init my-project
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Recommended:** Use `npm create opensaas-app` instead:
|
|
104
112
|
|
|
105
113
|
```bash
|
|
106
|
-
opensaas
|
|
107
|
-
|
|
114
|
+
npm create opensaas-app@latest my-project
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Options:**
|
|
118
|
+
|
|
119
|
+
- `project-name` - Name of your project (lowercase, numbers, hyphens only)
|
|
120
|
+
- `--with-auth` - Include Better-auth integration
|
|
121
|
+
|
|
122
|
+
**Examples:**
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Basic project
|
|
126
|
+
npx @opensaas/stack-cli init my-app
|
|
127
|
+
|
|
128
|
+
# With authentication
|
|
129
|
+
npx @opensaas/stack-cli init my-app --with-auth
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**What happens:**
|
|
133
|
+
|
|
134
|
+
This command runs `npx create-opensaas-app@latest` with the provided arguments. See the [create-opensaas-app package](../create-opensaas-app) for full details.
|
|
135
|
+
|
|
136
|
+
**After init:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
cd my-project
|
|
140
|
+
pnpm install
|
|
141
|
+
pnpm generate # Generate Prisma schema and types
|
|
142
|
+
pnpm db:push # Create database
|
|
143
|
+
pnpm dev # Start dev server
|
|
108
144
|
```
|
|
109
145
|
|
|
110
146
|
## Usage in Projects
|
|
111
147
|
|
|
112
|
-
###
|
|
148
|
+
### Quick Start (New Projects)
|
|
149
|
+
|
|
150
|
+
**Recommended:** Use `create-opensaas-app`:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npm create opensaas-app@latest my-project
|
|
154
|
+
cd my-project
|
|
155
|
+
pnpm install
|
|
156
|
+
pnpm generate
|
|
157
|
+
pnpm db:push
|
|
158
|
+
pnpm dev
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Alternative:** Via CLI package:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
npx @opensaas/stack-cli init my-project
|
|
165
|
+
cd my-project
|
|
166
|
+
pnpm install
|
|
167
|
+
pnpm generate
|
|
168
|
+
pnpm db:push
|
|
169
|
+
pnpm dev
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Manual Setup (Existing Projects)
|
|
113
173
|
|
|
114
174
|
```bash
|
|
115
175
|
# Install CLI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAeA,wBAAsB,eAAe,kBA8FpC"}
|
|
@@ -4,7 +4,7 @@ import { execSync } from 'child_process';
|
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import ora from 'ora';
|
|
6
6
|
import { createJiti } from 'jiti';
|
|
7
|
-
import { writePrismaSchema, writeTypes, writeContext, patchPrismaTypes, } from '../generator/index.js';
|
|
7
|
+
import { writePrismaSchema, writeTypes, writeContext, patchPrismaTypes, writeMcp, } from '../generator/index.js';
|
|
8
8
|
export async function generateCommand() {
|
|
9
9
|
console.log(chalk.bold('\nš OpenSaas Generator\n'));
|
|
10
10
|
const cwd = process.cwd();
|
|
@@ -29,10 +29,15 @@ export async function generateCommand() {
|
|
|
29
29
|
writePrismaSchema(config, path.join(cwd, 'prisma', 'schema.prisma'));
|
|
30
30
|
writeTypes(config, path.join(cwd, '.opensaas', 'types.ts'));
|
|
31
31
|
writeContext(config, path.join(cwd, '.opensaas', 'context.ts'));
|
|
32
|
+
// Generate MCP metadata if enabled
|
|
33
|
+
const mcpGenerated = writeMcp(config, cwd);
|
|
32
34
|
generatorSpinner.succeed(chalk.green('Schema generation complete'));
|
|
33
35
|
console.log(chalk.green('ā
Prisma schema generated'));
|
|
34
36
|
console.log(chalk.green('ā
TypeScript types generated'));
|
|
35
37
|
console.log(chalk.green('ā
Context factory generated'));
|
|
38
|
+
if (mcpGenerated) {
|
|
39
|
+
console.log(chalk.green('ā
MCP metadata generated'));
|
|
40
|
+
}
|
|
36
41
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
42
|
}
|
|
38
43
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACjC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,gBAAgB,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACjC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,QAAQ,GACT,MAAM,uBAAuB,CAAA;AAG9B,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAA;IAEpD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,C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AC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;QACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAA;QACvD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC,CAAA;QACnE,8DAA8D;IAChE,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAA;QAC5C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;QACrD,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;QAC/C,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC"}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Initialize a new OpenSaas Stack project.
|
|
3
|
+
*
|
|
4
|
+
* This command delegates to create-opensaas-app for the actual scaffolding.
|
|
5
|
+
* It's kept here for backwards compatibility with `opensaas init`.
|
|
6
|
+
*
|
|
7
|
+
* @param args - Command line arguments (project name and flags)
|
|
8
|
+
*/
|
|
9
|
+
export declare function initCommand(args: string[]): Promise<void>;
|
|
2
10
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,iBAsB/C"}
|