@friggframework/devtools 2.0.0--canary.639.86e8467.0 → 2.0.0--canary.540.4653c0a.0

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.
@@ -10,65 +10,29 @@ The Frigg CLI provides tools for building, deploying, and managing serverless in
10
10
 
11
11
  ### Core Commands
12
12
 
13
- #### `frigg init [projectName] [options]`
13
+ #### `frigg init [options]`
14
14
 
15
- Scaffold a new Frigg backend application that installs and runs out of the box.
15
+ **Status:** To be documented (command may not be merged yet)
16
16
 
17
- **Usage:**
17
+ Initialize a new Frigg application with scaffolding and configuration.
18
18
 
19
+ **Usage:**
19
20
  ```bash
20
- frigg init my-app # interactive (when stdin is a TTY)
21
- frigg init my-app --yes # accept every default, no prompts
22
- frigg init my-app --yes --mode standalone --no-install --no-git
23
- frigg init my-app --mode embedded # add to an existing project (./frigg-integration)
24
- npx @friggframework/devtools init my-app --yes # without a global install
21
+ frigg init
22
+ frigg init my-app
23
+ frigg init --template typescript
25
24
  ```
26
25
 
27
26
  **What it does:**
28
-
29
- 1. Validates the project name and `--mode`, and checks that the target directory is
30
- empty (only `.git`, `.gitignore`, `README.md` and `.DS_Store` may exist) before asking anything else
31
- 2. Copies the backend template: `index.js` (app definition, named after the project),
32
- `infrastructure.js`, `README.md`, `.gitignore`, `.env.example` (also seeded into `.env`)
33
- 3. Writes `package.json` with:
34
- - scripts: `start` (`frigg start`), `build` (`frigg build`), `deploy` (`frigg deploy`),
35
- `db:setup` (`frigg db:setup`), `test` (`jest`)
36
- - dependencies: `@friggframework/core`, `@prisma/client`, `prisma`
37
- - devDependencies: `@friggframework/devtools`, `@friggframework/serverless-plugin`,
38
- `osls`, and the serverless plugins the composed definition loads
39
- - Frigg package versions match the devtools that ran `init` (a prerelease is pinned exactly)
40
- 4. Validates the generated app definition against the app-definition schema
41
- 5. Optionally initializes git and runs `npm install`
42
- 6. Prints next steps. API modules picked in the interactive prompt are not wired in
43
- automatically; the next steps list a `frigg install <module>` command for each
44
-
45
- In `embedded` mode the backend is written to `./frigg-integration` inside the target
46
- directory, which may already contain your application. Git is not initialized.
27
+ - TBD - Full documentation pending implementation merge
47
28
 
48
29
  **Options:**
30
+ - TBD
49
31
 
50
- - `-n, --name <name>` - Project name (alternative to the positional argument)
51
- - `-m, --mode <mode>` - `standalone` (default) or `embedded`
52
- - `-y, --yes` - Accept the default for every prompt. Implied when stdin is not a TTY
53
- - `--no-install` - Skip `npm install`
54
- - `--no-git` - Skip `git init` and the initial commit
55
- - `-f, --force` - Scaffold into a non-empty directory and overwrite an existing `README.md`/`.gitignore`
56
- - `-v, --verbose` - Verbose output
57
-
58
- **Next steps after `init`:**
59
-
60
- ```bash
61
- cd my-app
62
- docker run --name frigg-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:16
63
- npm run db:setup
64
- npm start
65
- ```
32
+ **Example Output:**
33
+ - TBD
66
34
 
67
- The scaffolded app deploys with no always-on AWS cost: no VPC, NAT gateway or
68
- database cluster (`vpc: { enable: false }`, `database.postgres.management: 'external'`),
69
- field-level encryption with a per-stage KMS key (about $1/month), and the app connecting
70
- to a PostgreSQL you host through `DATABASE_URL`. The generated `README.md` explains the
71
- security model and the opt-in upgrades.
35
+ > **Note**: This command may be part of an upcoming release. Documentation will be updated once the implementation is merged to the main branch.
72
36
 
73
37
  ---
74
38
 
@@ -91,16 +91,11 @@ const { ssmPushCommand } = require('./ssm-command');
91
91
  const program = new Command();
92
92
 
93
93
  program
94
- .command('init [projectName]')
94
+ .command('init [templateName]')
95
95
  .description('Initialize a new Frigg application')
96
- .option('-n, --name <name>', 'project name (alternative to the positional argument)')
97
- .option('-m, --mode <mode>', 'deployment mode: standalone or embedded')
98
- .option('-y, --yes', 'accept the default for every prompt (implied when stdin is not a TTY)')
99
- .option('--no-install', 'skip installing dependencies')
100
- .option('--no-git', 'skip initializing a git repository')
101
- .option('-f, --force', 'scaffold into a non-empty directory and overwrite README.md')
102
- .option('-v, --verbose', 'enable verbose output')
103
- .option('-t, --template <template>', 'legacy template (no longer supported)')
96
+ .option('-t, --template <template>', 'template to use', 'backend-only')
97
+ .option('-n, --name <name>', 'project name')
98
+ .option('-d, --directory <directory>', 'target directory')
104
99
  .action(initCommand);
105
100
 
106
101
  program