dev-env-kit 0.1.3 → 1.0.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.
- package/.dev-env.example.yml +71 -71
- package/LICENSE +21 -21
- package/README.md +157 -128
- package/dist/cli/index.js +19 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/generate.js +1 -1
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +294 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +1 -3
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/share.js +1 -1
- package/dist/commands/share.js.map +1 -1
- package/dist/commands/snapshot.js +1 -1
- package/dist/commands/snapshot.js.map +1 -1
- package/dist/core/config/loader.d.ts +8 -4
- package/dist/core/config/loader.d.ts.map +1 -1
- package/dist/core/config/loader.js +37 -6
- package/dist/core/config/loader.js.map +1 -1
- package/dist/utils/load-execa.js +4 -4
- package/package.json +74 -72
- package/templates/docker-compose.hbs +31 -31
package/.dev-env.example.yml
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
# Example Dev Environment Configuration
|
|
2
|
-
# Copy this file to .dev-env.yml and customize for your project
|
|
3
|
-
|
|
4
|
-
name: my-project
|
|
5
|
-
version: "1.0.0"
|
|
6
|
-
|
|
7
|
-
dependencies:
|
|
8
|
-
- type: npm
|
|
9
|
-
command: npm install
|
|
10
|
-
path: .
|
|
11
|
-
# - type: pip
|
|
12
|
-
# command: pip install -r requirements.txt
|
|
13
|
-
# path: ./backend
|
|
14
|
-
|
|
15
|
-
databases:
|
|
16
|
-
- type: postgresql
|
|
17
|
-
name: myapp_db
|
|
18
|
-
version: "15"
|
|
19
|
-
port: 5432
|
|
20
|
-
host: localhost
|
|
21
|
-
user: ${DB_USER} # Use environment variable
|
|
22
|
-
password: ${DB_PASSWORD} # Use environment variable
|
|
23
|
-
database: myapp
|
|
24
|
-
migrations:
|
|
25
|
-
- path: ./migrations
|
|
26
|
-
command: npm run migrate
|
|
27
|
-
seed:
|
|
28
|
-
command: npm run seed
|
|
29
|
-
|
|
30
|
-
# - type: redis
|
|
31
|
-
# version: "7"
|
|
32
|
-
# port: 6379
|
|
33
|
-
# host: localhost
|
|
34
|
-
|
|
35
|
-
services:
|
|
36
|
-
# - type: rabbitmq
|
|
37
|
-
# version: "3.12"
|
|
38
|
-
# port: 5672
|
|
39
|
-
# management_port: 15672
|
|
40
|
-
|
|
41
|
-
# Environment variables (use .env file for secrets)
|
|
42
|
-
env:
|
|
43
|
-
NODE_ENV: development
|
|
44
|
-
# Use ${VAR_NAME} syntax to reference .env variables
|
|
45
|
-
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5432/myapp
|
|
46
|
-
# REDIS_URL: redis://localhost:6379
|
|
47
|
-
|
|
48
|
-
# Health checks to verify setup
|
|
49
|
-
health_checks:
|
|
50
|
-
- name: database
|
|
51
|
-
type: postgresql
|
|
52
|
-
connection_string: postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5432/myapp
|
|
53
|
-
# - name: redis
|
|
54
|
-
# type: redis
|
|
55
|
-
# url: redis://localhost:6379
|
|
56
|
-
|
|
57
|
-
# Snapshot configuration
|
|
58
|
-
snapshot:
|
|
59
|
-
include_databases: true
|
|
60
|
-
include_volumes: true
|
|
61
|
-
exclude_paths:
|
|
62
|
-
- node_modules
|
|
63
|
-
- .git
|
|
64
|
-
- dist
|
|
65
|
-
- build
|
|
66
|
-
|
|
67
|
-
# Docker Compose generation
|
|
68
|
-
docker:
|
|
69
|
-
enabled: true
|
|
70
|
-
output_file: docker-compose.yml
|
|
71
|
-
network_name: dev-network
|
|
1
|
+
# Example Dev Environment Configuration
|
|
2
|
+
# Copy this file to .dev-env.yml and customize for your project
|
|
3
|
+
|
|
4
|
+
name: my-project
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
|
|
7
|
+
dependencies:
|
|
8
|
+
- type: npm
|
|
9
|
+
command: npm install
|
|
10
|
+
path: .
|
|
11
|
+
# - type: pip
|
|
12
|
+
# command: pip install -r requirements.txt
|
|
13
|
+
# path: ./backend
|
|
14
|
+
|
|
15
|
+
databases:
|
|
16
|
+
- type: postgresql
|
|
17
|
+
name: myapp_db
|
|
18
|
+
version: "15"
|
|
19
|
+
port: 5432
|
|
20
|
+
host: localhost
|
|
21
|
+
user: ${DB_USER} # Use environment variable
|
|
22
|
+
password: ${DB_PASSWORD} # Use environment variable
|
|
23
|
+
database: myapp
|
|
24
|
+
migrations:
|
|
25
|
+
- path: ./migrations
|
|
26
|
+
command: npm run migrate
|
|
27
|
+
seed:
|
|
28
|
+
command: npm run seed
|
|
29
|
+
|
|
30
|
+
# - type: redis
|
|
31
|
+
# version: "7"
|
|
32
|
+
# port: 6379
|
|
33
|
+
# host: localhost
|
|
34
|
+
|
|
35
|
+
services:
|
|
36
|
+
# - type: rabbitmq
|
|
37
|
+
# version: "3.12"
|
|
38
|
+
# port: 5672
|
|
39
|
+
# management_port: 15672
|
|
40
|
+
|
|
41
|
+
# Environment variables (use .env file for secrets)
|
|
42
|
+
env:
|
|
43
|
+
NODE_ENV: development
|
|
44
|
+
# Use ${VAR_NAME} syntax to reference .env variables
|
|
45
|
+
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5432/myapp
|
|
46
|
+
# REDIS_URL: redis://localhost:6379
|
|
47
|
+
|
|
48
|
+
# Health checks to verify setup
|
|
49
|
+
health_checks:
|
|
50
|
+
- name: database
|
|
51
|
+
type: postgresql
|
|
52
|
+
connection_string: postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5432/myapp
|
|
53
|
+
# - name: redis
|
|
54
|
+
# type: redis
|
|
55
|
+
# url: redis://localhost:6379
|
|
56
|
+
|
|
57
|
+
# Snapshot configuration
|
|
58
|
+
snapshot:
|
|
59
|
+
include_databases: true
|
|
60
|
+
include_volumes: true
|
|
61
|
+
exclude_paths:
|
|
62
|
+
- node_modules
|
|
63
|
+
- .git
|
|
64
|
+
- dist
|
|
65
|
+
- build
|
|
66
|
+
|
|
67
|
+
# Docker Compose generation
|
|
68
|
+
docker:
|
|
69
|
+
enabled: true
|
|
70
|
+
output_file: docker-compose.yml
|
|
71
|
+
network_name: dev-network
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Shabnam
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shabnam
|
|
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
|
@@ -1,128 +1,157 @@
|
|
|
1
|
-
# envkit
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
envkit
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
Use
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
##
|
|
127
|
-
|
|
128
|
-
|
|
1
|
+
# envkit
|
|
2
|
+
|
|
3
|
+
**envkit** is a CLI that manages local development environments from a single config file. Define dependencies, databases, and services in one place; run one command to set up the project, generate Docker Compose, and optionally snapshot or share configs—without committing secrets.
|
|
4
|
+
|
|
5
|
+
**Requirements:** Node.js >= 16
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
- **Setup** — Uses your `.dev-env.yml` to install dependencies and run database migrations and seed commands in one go.
|
|
12
|
+
- **Generate** — Builds a `docker-compose.yml` from the same config (databases, services, network).
|
|
13
|
+
- **Snapshots** — Saves and restores config versions under `.devkit/snapshots/` so you can switch between setups.
|
|
14
|
+
- **Share** — Exports a sanitized config (secrets replaced with placeholders) or imports a shared config file into your project.
|
|
15
|
+
|
|
16
|
+
Configuration is a single YAML file; secrets live in `.env` and are referenced as `${VAR_NAME}`. The CLI discovers the project root from your current directory (it looks for `.dev-env.yml` or markers like `package.json`).
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g dev-env-kit
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
After installation, use the `envkit` command. To run without installing:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx dev-env-kit <command>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
### 1. Add a config file
|
|
37
|
+
|
|
38
|
+
You need a `.dev-env.yml` in your project root for **setup**, **generate**, **share export**, and **snapshot create**. If you don’t have one yet:
|
|
39
|
+
|
|
40
|
+
- **Interactive terminal:** Run `envkit init` to create `.dev-env.yml` via a short wizard. If you run a command that needs config (e.g. `envkit setup`) without a config file, the CLI will ask whether to run `envkit init` now.
|
|
41
|
+
- **Non-interactive (CI, scripts):** Create `.dev-env.yml` by hand or run `envkit init` in a terminal first; otherwise those commands exit with a message to create a config or run `envkit init`.
|
|
42
|
+
|
|
43
|
+
**If you already have an example file**, the fastest way to start is to copy it and edit it:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cp .dev-env.example.yml .dev-env.yml
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The example file documents all options (dependencies, databases, services, env vars, Docker settings). Keep sensitive values in a `.env` file and reference them in the config with `${VAR_NAME}` so they never end up in version control.
|
|
50
|
+
|
|
51
|
+
See [.dev-env.example.yml](./.dev-env.example.yml) for the full reference.
|
|
52
|
+
|
|
53
|
+
### 2. Set up the environment
|
|
54
|
+
|
|
55
|
+
From the project root (or any subdirectory):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
envkit setup
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
This installs dependencies, runs database migrations, and runs seed commands according to your config. You can narrow what runs:
|
|
62
|
+
|
|
63
|
+
| Option | Description |
|
|
64
|
+
|---------------|--------------------------------------|
|
|
65
|
+
| `--skip-deps` | Skip dependency installation |
|
|
66
|
+
| `--skip-db` | Skip database migrations and seed |
|
|
67
|
+
| `--dry-run` | Show what would run, without running |
|
|
68
|
+
|
|
69
|
+
### 3. Generate Docker Compose
|
|
70
|
+
|
|
71
|
+
When `docker.enabled` is set in your config, you can generate a Compose file from it:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
envkit generate
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Output goes to `docker-compose.yml` by default. Use `-o <file>` to write elsewhere, e.g. `envkit generate -o docker-compose.dev.yml`.
|
|
78
|
+
|
|
79
|
+
### 4. Snapshots
|
|
80
|
+
|
|
81
|
+
Save the current config as a named snapshot under `.devkit/snapshots/`:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
envkit snapshot create [name]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If you omit the name, a timestamp-based name is used. List existing snapshots:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
envkit snapshot list
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Restore a snapshot (overwrites `.dev-env.yml`):
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
envkit snapshot restore <name>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 5. Share config (export / import)
|
|
100
|
+
|
|
101
|
+
Export a safe-to-share copy of your config (passwords and secrets become placeholders like `${DB_PASSWORD}`):
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
envkit share export
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
By default this writes `dev-env.shared.yml`. Use `-o <file>` to change the path.
|
|
108
|
+
|
|
109
|
+
Import a shared config file (it is validated and then written to `.dev-env.yml` by default):
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
envkit share import path/to/dev-env.shared.yml
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Use `-o <file>` to write to a different path.
|
|
116
|
+
|
|
117
|
+
### Global options
|
|
118
|
+
|
|
119
|
+
- **`-v, --verbose`** — More detailed log output.
|
|
120
|
+
- **`-q, --quiet`** — Reduce output.
|
|
121
|
+
|
|
122
|
+
Example: `envkit -q setup`
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Command reference
|
|
127
|
+
|
|
128
|
+
| Command | Description |
|
|
129
|
+
|--------|-------------|
|
|
130
|
+
| `envkit init` | Create `.dev-env.yml` interactively (wizard) |
|
|
131
|
+
| `envkit setup` | Install deps, run migrations and seed |
|
|
132
|
+
| `envkit generate` | Generate docker-compose from config |
|
|
133
|
+
| `envkit snapshot create [name]` | Save current config as a snapshot |
|
|
134
|
+
| `envkit snapshot list` | List snapshots |
|
|
135
|
+
| `envkit snapshot restore <name>` | Restore a snapshot to `.dev-env.yml` |
|
|
136
|
+
| `envkit share export` | Export sanitized config (optional `-o` path) |
|
|
137
|
+
| `envkit share import <file>` | Import shared config (optional `-o` path) |
|
|
138
|
+
|
|
139
|
+
For more detail: `envkit --help` or `envkit <command> --help`.
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Development and testing
|
|
143
|
+
|
|
144
|
+
To work on the source or run tests:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm install
|
|
148
|
+
npm test
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Use `npm test -- --coverage` for a coverage report.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## License
|
|
156
|
+
|
|
157
|
+
MIT
|
package/dist/cli/index.js
CHANGED
|
@@ -44,8 +44,10 @@ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
|
44
44
|
const version = packageJson.version;
|
|
45
45
|
const setup_1 = require("../commands/setup");
|
|
46
46
|
const generate_1 = require("../commands/generate");
|
|
47
|
+
const init_1 = require("../commands/init");
|
|
47
48
|
const snapshot_1 = require("../commands/snapshot");
|
|
48
49
|
const share_1 = require("../commands/share");
|
|
50
|
+
const loader_1 = require("../core/config/loader");
|
|
49
51
|
const program = new commander_1.Command();
|
|
50
52
|
program
|
|
51
53
|
.name('envkit')
|
|
@@ -64,6 +66,23 @@ program
|
|
|
64
66
|
const os = (0, platform_1.detectOS)();
|
|
65
67
|
logger_1.logger.debug(`Running on ${os}`);
|
|
66
68
|
});
|
|
69
|
+
program
|
|
70
|
+
.command('init')
|
|
71
|
+
.description('Create .dev-env.yml interactively (wizard)')
|
|
72
|
+
.action(async () => {
|
|
73
|
+
try {
|
|
74
|
+
if (!(0, init_1.isInteractive)()) {
|
|
75
|
+
logger_1.logger.error('Run `envkit init` in a terminal to create a config file.');
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
const projectRoot = await (0, loader_1.findProjectRoot)();
|
|
79
|
+
await (0, init_1.runInit)(projectRoot);
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
logger_1.logger.error(err.message ?? 'Init failed');
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
67
86
|
program
|
|
68
87
|
.command('setup')
|
|
69
88
|
.description('Set up the development environment')
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAAoC;AACpC,4CAAyC;AACzC,gDAA6C;AAC7C,uCAAyB;AACzB,2CAA6B;AAE7B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AACnE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1E,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;AAEpC,6CAA6C;AAC7C,mDAAmD;AACnD,mDAA8F;AAC9F,6CAAmE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAAoC;AACpC,4CAAyC;AACzC,gDAA6C;AAC7C,uCAAyB;AACzB,2CAA6B;AAE7B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AACnE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1E,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;AAEpC,6CAA6C;AAC7C,mDAAmD;AACnD,2CAA0D;AAC1D,mDAA8F;AAC9F,6CAAmE;AACnE,kDAAwD;AAExD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,sFAAsF,CAAC;KACnG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,MAAM,CAAC,eAAe,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AC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -47,7 +47,7 @@ async function runGenerate(options = {}) {
|
|
|
47
47
|
const outputFile = options.output ?? 'docker-compose.yml';
|
|
48
48
|
const projectRoot = await (0, loader_1.findProjectRoot)(process.cwd());
|
|
49
49
|
logger_1.logger.debug(`Project root: ${projectRoot}`);
|
|
50
|
-
const config = await (0, loader_1.
|
|
50
|
+
const config = await (0, loader_1.loadConfigOrPromptInit)(projectRoot);
|
|
51
51
|
(0, validator_1.checkConfigWarnings)(config);
|
|
52
52
|
if (config.docker?.enabled === false) {
|
|
53
53
|
logger_1.logger.info('Docker generation is disabled in config (docker.enabled: false).');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,kCAoBC;AAnCD,2CAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,kCAoBC;AAnCD,2CAA6B;AAC7B,kDAAgF;AAChF,wDAA+D;AAC/D,wEAA0E;AAC1E,4CAAyC;AACzC,gDAA8C;AAM9C,SAAS,eAAe;IACtB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AACpD,CAAC;AAEM,KAAK,UAAU,WAAW,CAAC,UAA2B,EAAE;IAC7D,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,IAAI,oBAAoB,CAAC;IAE1D,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAe,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACzD,eAAM,CAAC,KAAK,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC;IAE7C,MAAM,MAAM,GAAG,MAAM,IAAA,+BAAsB,EAAC,WAAW,CAAC,CAAC;IACzD,IAAA,+BAAmB,EAAC,MAAM,CAAC,CAAC;IAE5B,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,KAAK,KAAK,EAAE,CAAC;QACrC,eAAM,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;QAChF,OAAO;IACT,CAAC;IAED,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,MAAM,OAAO,GAAG,IAAA,0CAAsB,EAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAEtD,MAAM,IAAA,oBAAS,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClC,eAAM,CAAC,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function isInteractive(): boolean;
|
|
2
|
+
export declare function getDefaultProjectName(projectRoot: string): Promise<string>;
|
|
3
|
+
/**
|
|
4
|
+
* Run the init wizard and write `.dev-env.yml` in the project root.
|
|
5
|
+
* Exported for use by the CLI and by loadConfigOrPromptInit.
|
|
6
|
+
*/
|
|
7
|
+
export declare function runInit(projectRoot: string): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AA6BA,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAahF;AA6PD;;;GAGG;AACH,wBAAsB,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBhE"}
|