pm-auto 1.0.0 β 1.0.1
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 +257 -141
- package/dist/config_reader.d.ts.map +1 -1
- package/dist/config_reader.js +7 -3
- package/dist/config_reader.js.map +1 -1
- package/dist/display.d.ts +4 -7
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +18 -6
- package/dist/display.js.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +26 -8
- package/dist/install.js.map +1 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +8 -4
- package/dist/orchestrator.js.map +1 -1
- package/nodemon.json +6 -6
- package/package.json +8 -7
- package/src/build_command.ts +119 -119
- package/src/config_path.ts +54 -54
- package/src/config_reader.ts +11 -3
- package/src/display.ts +23 -19
- package/src/index.ts +20 -5
- package/src/install.ts +20 -8
- package/src/orchestrator.ts +8 -7
- package/src/types/index.ts +16 -16
- package/test.json +94 -83
package/README.md
CHANGED
|
@@ -1,22 +1,50 @@
|
|
|
1
1
|
# PM-Auto
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Stop typing the same npm install commands over and over.**
|
|
4
|
+
|
|
5
|
+
PM-Auto is a CLI tool that lets you define your tech stack presets once and install them anywhere with a single command. No more trying so hard to remember package names, no more repetitive typingβjust fast, consistent project setup.
|
|
4
6
|
|
|
5
7
|
## Table of Contents
|
|
6
8
|
|
|
9
|
+
- [Features](#features)
|
|
7
10
|
- [Installation](#installation)
|
|
8
11
|
- [Quick Start](#quick-start)
|
|
12
|
+
- [Why PM-Auto?](#why-pm-auto)
|
|
9
13
|
- [Commands](#commands)
|
|
10
|
-
- [install](#install)
|
|
11
|
-
- [uninstall](#uninstall)
|
|
12
|
-
- [config](#config)
|
|
14
|
+
- [pm-auto install](#pm-auto-install)
|
|
15
|
+
- [pm-auto uninstall](#pm-auto-uninstall)
|
|
16
|
+
- [pm-auto config](#pm-auto-config)
|
|
13
17
|
- [Configuration](#configuration)
|
|
14
|
-
- [
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
18
|
+
- [Config Structure](#config-structure)
|
|
19
|
+
- [Config Fields](#config-fields)
|
|
20
|
+
- [Real-World Examples](#real-world-examples)
|
|
21
|
+
- [Important Notes](#important-notes)
|
|
22
|
+
- [Config Tips](#config-tips)
|
|
17
23
|
- [Global Options](#global-options)
|
|
18
24
|
- [Use Cases](#use-cases)
|
|
25
|
+
- [Requirements](#requirements)
|
|
26
|
+
- [Troubleshooting](#troubleshooting)
|
|
19
27
|
- [Contributing](#contributing)
|
|
28
|
+
- [Contributors](#contributors)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Instead of this every time...
|
|
32
|
+
npm install react react-dom
|
|
33
|
+
npm install -D @types/react @types/react-dom
|
|
34
|
+
npm install vite @vitejs/plugin-react
|
|
35
|
+
npm install three @react-three/fiber gsap
|
|
36
|
+
|
|
37
|
+
# Do this once
|
|
38
|
+
pm-auto install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- π **One-command setup** - Install your entire tech stack instantly
|
|
44
|
+
- π¦ **Reusable presets** - Define stacks once, use across all projects
|
|
45
|
+
- π§ **Flexible package managers** - Works with npm, yarn, and pnpm
|
|
46
|
+
- β‘ **Save time** - No more copying package lists or checking old projects
|
|
47
|
+
- π― **Project-specific** - Different stacks for different project types
|
|
20
48
|
|
|
21
49
|
## Installation
|
|
22
50
|
|
|
@@ -30,77 +58,132 @@ yarn global add pm-auto
|
|
|
30
58
|
|
|
31
59
|
## Quick Start
|
|
32
60
|
|
|
33
|
-
1.
|
|
61
|
+
**1. Create a config file** (e.g., `pm-auto-config.json`):
|
|
34
62
|
|
|
35
|
-
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"react-stack": {
|
|
66
|
+
"name": "react-stack",
|
|
67
|
+
"packageManager": "npm",
|
|
68
|
+
"packages": [
|
|
69
|
+
{
|
|
70
|
+
"command": "react react-dom",
|
|
71
|
+
"interactive": false
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"command": "@types/react @types/react-dom --save-dev",
|
|
75
|
+
"interactive": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"command": "vite @vitejs/plugin-react --save-dev",
|
|
79
|
+
"interactive": false
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"command": "create-next-app@latest my-app",
|
|
83
|
+
"interactive": true
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"express-api": {
|
|
88
|
+
"name": "express-api",
|
|
89
|
+
"packageManager": "pnpm",
|
|
90
|
+
"packages": [
|
|
91
|
+
{
|
|
92
|
+
"command": "express dotenv cors helmet",
|
|
93
|
+
"interactive": false
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"command": "@types/express @types/node --save-dev",
|
|
97
|
+
"interactive": false
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
36
103
|
|
|
37
|
-
|
|
38
|
-
# Example: If you're in C:\Users\admin\Documents and your config is test.json
|
|
39
|
-
C:\Users\admin\Documents> pm-auto config ./test.json
|
|
104
|
+
**2. Set your config path:**
|
|
40
105
|
|
|
41
|
-
|
|
42
|
-
pm-auto config ./
|
|
106
|
+
```bash
|
|
107
|
+
pm-auto config ./pm-auto-config.json
|
|
43
108
|
```
|
|
44
109
|
|
|
45
|
-
3.
|
|
110
|
+
**3. Install your stack:**
|
|
46
111
|
|
|
47
112
|
```bash
|
|
48
|
-
# Install packages from your config
|
|
49
113
|
pm-auto install
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
That's it! All packages from your config are installed automatically.
|
|
117
|
+
|
|
118
|
+
## Why PM-Auto?
|
|
50
119
|
|
|
51
|
-
|
|
52
|
-
|
|
120
|
+
### Before PM-Auto
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Setting up a new React project
|
|
124
|
+
npm install react react-dom
|
|
125
|
+
npm install -D @types/react @types/react-dom
|
|
126
|
+
npm install vite @vitejs/plugin-react
|
|
127
|
+
npm install three @react-three/fiber
|
|
128
|
+
npm install gsap
|
|
129
|
+
npm install -D @types/three
|
|
130
|
+
# ... did I forget anything?
|
|
53
131
|
```
|
|
54
132
|
|
|
55
|
-
|
|
133
|
+
### With PM-Auto
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
pm-auto install
|
|
137
|
+
# Done. β¨
|
|
138
|
+
```
|
|
56
139
|
|
|
57
140
|
## Commands
|
|
58
141
|
|
|
59
|
-
### `install`
|
|
142
|
+
### `pm-auto install`
|
|
60
143
|
|
|
61
|
-
Install packages
|
|
144
|
+
Install packages from your configured presets.
|
|
62
145
|
|
|
63
146
|
```bash
|
|
64
|
-
pm-auto install [options] [packages...]
|
|
147
|
+
pm-auto install|i|add [options] [packages...]
|
|
65
148
|
```
|
|
66
149
|
|
|
67
150
|
**Options:**
|
|
68
151
|
|
|
69
152
|
- `-p, --pkg-json` - Install all packages from package.json
|
|
70
|
-
- `-A, --add-command <command>` - Add
|
|
71
|
-
- `-D, --dry-run` -
|
|
153
|
+
- `-A, --add-command <command>` - Add custom flags to all install commands
|
|
154
|
+
- `-D, --dry-run` - Preview commands without executing them
|
|
72
155
|
- `-h, --help` - Display help
|
|
73
156
|
|
|
74
157
|
**Examples:**
|
|
75
158
|
|
|
76
159
|
```bash
|
|
77
|
-
# Install
|
|
78
|
-
pm-auto install
|
|
160
|
+
# Install everything from your config
|
|
161
|
+
pm-auto install
|
|
79
162
|
|
|
80
|
-
# Install
|
|
81
|
-
pm-auto install
|
|
163
|
+
# Install specific packages to all presets
|
|
164
|
+
pm-auto install lodash axios
|
|
82
165
|
|
|
83
|
-
# Install from package.json
|
|
166
|
+
# Install from existing package.json
|
|
84
167
|
pm-auto install --pkg-json
|
|
85
168
|
|
|
86
|
-
#
|
|
87
|
-
pm-auto install
|
|
169
|
+
# Preview what would be installed
|
|
170
|
+
pm-auto install --dry-run
|
|
88
171
|
|
|
89
|
-
# Add custom
|
|
90
|
-
pm-auto install
|
|
172
|
+
# Add custom flags (e.g., for peer dependency issues)
|
|
173
|
+
pm-auto install --add-command "--legacy-peer-deps"
|
|
91
174
|
```
|
|
92
175
|
|
|
93
|
-
### `uninstall`
|
|
176
|
+
### `pm-auto uninstall`
|
|
94
177
|
|
|
95
|
-
|
|
178
|
+
Remove packages from configured presets.
|
|
96
179
|
|
|
97
180
|
```bash
|
|
98
|
-
pm-auto uninstall [options] <packages...>
|
|
181
|
+
pm-auto uninstall|u|remove [options] <packages...>
|
|
99
182
|
```
|
|
100
183
|
|
|
101
184
|
**Options:**
|
|
102
185
|
|
|
103
|
-
- `-A, --add-command <command>` - Add
|
|
186
|
+
- `-A, --add-command <command>` - Add custom flags to uninstall commands
|
|
104
187
|
- `-h, --help` - Display help
|
|
105
188
|
|
|
106
189
|
**Examples:**
|
|
@@ -110,13 +193,13 @@ pm-auto uninstall [options] <packages...>
|
|
|
110
193
|
pm-auto uninstall lodash
|
|
111
194
|
|
|
112
195
|
# Uninstall multiple packages
|
|
113
|
-
pm-auto uninstall lodash
|
|
196
|
+
pm-auto uninstall lodash axios moment
|
|
114
197
|
|
|
115
|
-
#
|
|
198
|
+
# Force uninstall
|
|
116
199
|
pm-auto uninstall lodash --add-command "--force"
|
|
117
200
|
```
|
|
118
201
|
|
|
119
|
-
### `config`
|
|
202
|
+
### `pm-auto config`
|
|
120
203
|
|
|
121
204
|
Set the path to your configuration file.
|
|
122
205
|
|
|
@@ -124,62 +207,96 @@ Set the path to your configuration file.
|
|
|
124
207
|
pm-auto config <path>
|
|
125
208
|
```
|
|
126
209
|
|
|
127
|
-
**Options:**
|
|
128
|
-
|
|
129
|
-
- `-h, --help` - Display help
|
|
130
|
-
|
|
131
210
|
**Examples:**
|
|
132
211
|
|
|
133
212
|
```bash
|
|
134
|
-
# Set config
|
|
135
|
-
pm-auto config ./pm-auto
|
|
213
|
+
# Set config with relative path
|
|
214
|
+
pm-auto config ./pm-auto-config.json
|
|
136
215
|
|
|
137
|
-
#
|
|
138
|
-
pm-auto config /home/user/
|
|
216
|
+
# Set config with absolute path
|
|
217
|
+
pm-auto config /home/user/configs/pm-auto-config.json
|
|
139
218
|
```
|
|
140
219
|
|
|
220
|
+
**Note:** The config path is stored persistently. If you move your config file, run `pm-auto config <new-path>` again.
|
|
221
|
+
|
|
141
222
|
## Configuration
|
|
142
223
|
|
|
143
|
-
|
|
224
|
+
Create a JSON config file to define your tech stack presets.
|
|
225
|
+
|
|
226
|
+
### Config Structure
|
|
144
227
|
|
|
145
|
-
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"preset-name": {
|
|
231
|
+
"name": "preset-name",
|
|
232
|
+
"packageManager": "npm",
|
|
233
|
+
"packages": [
|
|
234
|
+
{
|
|
235
|
+
"command": "package-name",
|
|
236
|
+
"interactive": false
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Config Fields
|
|
146
244
|
|
|
147
|
-
|
|
245
|
+
- **`name`** - Identifier for the preset (should match the key)
|
|
246
|
+
- **`packageManager`** - Package manager to use: `npm`, `yarn`, or `pnpm`
|
|
247
|
+
- **`packages`** - Array of package configurations
|
|
248
|
+
- **`command`** - Package name(s) and flags (e.g., `lodash`, `typescript --save-dev`, `react react-dom`)
|
|
249
|
+
- **`interactive`** - Set to `true` for commands requiring user input (e.g., `create-vite@latest my-app`, `create-next-app@latest`)
|
|
250
|
+
|
|
251
|
+
### Real-World Examples
|
|
252
|
+
|
|
253
|
+
**Full-Stack TypeScript Setup:**
|
|
148
254
|
|
|
149
255
|
```json
|
|
150
256
|
{
|
|
151
|
-
"
|
|
152
|
-
"name": "
|
|
257
|
+
"fullstack-ts": {
|
|
258
|
+
"name": "fullstack-ts",
|
|
153
259
|
"packageManager": "npm",
|
|
154
260
|
"packages": [
|
|
155
261
|
{
|
|
156
|
-
"command": "
|
|
262
|
+
"command": "typescript ts-node --save-dev",
|
|
157
263
|
"interactive": false
|
|
158
264
|
},
|
|
159
265
|
{
|
|
160
|
-
"command": "@
|
|
266
|
+
"command": "@types/node --save-dev",
|
|
161
267
|
"interactive": false
|
|
162
268
|
},
|
|
163
269
|
{
|
|
164
|
-
"command": "
|
|
270
|
+
"command": "express dotenv cors helmet",
|
|
165
271
|
"interactive": false
|
|
166
272
|
},
|
|
167
273
|
{
|
|
168
|
-
"command": "
|
|
169
|
-
"interactive":
|
|
274
|
+
"command": "@types/express --save-dev",
|
|
275
|
+
"interactive": false
|
|
170
276
|
}
|
|
171
277
|
]
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Three.js + React Project:**
|
|
283
|
+
|
|
284
|
+
```json
|
|
285
|
+
{
|
|
286
|
+
"threejs-react": {
|
|
287
|
+
"name": "threejs-react",
|
|
175
288
|
"packageManager": "pnpm",
|
|
176
289
|
"packages": [
|
|
177
290
|
{
|
|
178
|
-
"command": "
|
|
291
|
+
"command": "three @react-three/fiber @react-three/drei",
|
|
179
292
|
"interactive": false
|
|
180
293
|
},
|
|
181
294
|
{
|
|
182
|
-
"command": "
|
|
295
|
+
"command": "@types/three --save-dev",
|
|
296
|
+
"interactive": false
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"command": "gsap leva",
|
|
183
300
|
"interactive": false
|
|
184
301
|
}
|
|
185
302
|
]
|
|
@@ -187,128 +304,127 @@ Create a JSON file (e.g., `config.json`) with the following format:
|
|
|
187
304
|
}
|
|
188
305
|
```
|
|
189
306
|
|
|
190
|
-
|
|
307
|
+
**Interactive commands:**
|
|
308
|
+
Set `"interactive": true` for commands that require user input during installation, such as:
|
|
191
309
|
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
- **`command`** - The package name and any additional flags (e.g., `lodash`, `typescript --save-dev`)
|
|
196
|
-
- **`interactive`** - Set to `true` for commands that require user interaction (e.g., `create-vite@latest`)
|
|
310
|
+
- `create-next-app@latest my-app`
|
|
311
|
+
- `create-vite@latest my-project`
|
|
312
|
+
- `create-react-app my-app`
|
|
197
313
|
|
|
198
|
-
###
|
|
314
|
+
### Config Tips
|
|
199
315
|
|
|
200
|
-
1.
|
|
201
|
-
2.
|
|
316
|
+
1. **Group related packages** - Combine packages that are always installed together in one command (e.g., `react react-dom`)
|
|
317
|
+
2. **Use descriptive names** - Name presets by purpose: `api-starter`, `frontend-base`, `testing-setup`
|
|
318
|
+
3. **Multiple presets** - Create different presets for different project types in the same config
|
|
319
|
+
4. **Version control** - Commit your config file to share stacks across your team
|
|
202
320
|
|
|
203
|
-
|
|
204
|
-
# From C:\Users\admin\Documents
|
|
205
|
-
C:\Users\admin\Documents> pm-auto config ./test.json
|
|
321
|
+
## Global Options
|
|
206
322
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
```
|
|
323
|
+
- `-V, --version` - Show PM-Auto version
|
|
324
|
+
- `-h, --help` - Display help
|
|
210
325
|
|
|
211
|
-
|
|
326
|
+
## Use Cases
|
|
212
327
|
|
|
213
|
-
|
|
214
|
-
pm-auto install --dry-run
|
|
215
|
-
```
|
|
328
|
+
### Quick Project Setup
|
|
216
329
|
|
|
217
|
-
|
|
330
|
+
Start new projects with your preferred stack instantly, no setup scripts needed.
|
|
218
331
|
|
|
219
|
-
|
|
332
|
+
### Team Consistency
|
|
220
333
|
|
|
221
|
-
|
|
222
|
-
- `-h, --help` - Display help for command
|
|
334
|
+
Share your config file with teammates so everyone uses the same packages and versions.
|
|
223
335
|
|
|
224
|
-
|
|
336
|
+
### Testing Compatibility
|
|
337
|
+
|
|
338
|
+
Quickly test if your package works across different package managers.
|
|
339
|
+
|
|
340
|
+
### Learning & Experimentation
|
|
341
|
+
|
|
342
|
+
Save configs for different frameworks you're learningβswitch between stacks effortlessly.
|
|
343
|
+
|
|
344
|
+
## Requirements
|
|
225
345
|
|
|
226
|
-
|
|
346
|
+
- Node.js 14.0.0 or higher
|
|
347
|
+
- npm, yarn, or pnpm installed
|
|
227
348
|
|
|
228
|
-
|
|
349
|
+
## Troubleshooting
|
|
229
350
|
|
|
230
|
-
|
|
351
|
+
**Config not found:**
|
|
231
352
|
|
|
232
|
-
|
|
353
|
+
- Verify the config path is correct: `pm-auto config ./your-config.json`
|
|
354
|
+
- Use absolute paths if relative paths aren't working
|
|
355
|
+
- Ensure the config file is valid JSON
|
|
356
|
+
|
|
357
|
+
**Packages not installing:**
|
|
358
|
+
|
|
359
|
+
- Run with `--dry-run` to preview commands
|
|
360
|
+
- Check that package names are spelled correctly
|
|
361
|
+
- Verify your package manager is installed and accessible
|
|
362
|
+
|
|
363
|
+
**Interactive commands hanging:**
|
|
364
|
+
|
|
365
|
+
- Set `"interactive": true` for commands like `create-vite@latest`
|
|
366
|
+
- These commands will prompt for user input during installation
|
|
233
367
|
|
|
234
368
|
## Contributing
|
|
235
369
|
|
|
236
|
-
We welcome contributions! Here's how
|
|
370
|
+
We welcome contributions! Here's how:
|
|
237
371
|
|
|
238
|
-
|
|
372
|
+
1. **Fork & clone:**
|
|
239
373
|
|
|
240
|
-
1. **Fork the repository**
|
|
241
|
-
2. **Clone your fork:**
|
|
242
374
|
```bash
|
|
243
|
-
git clone https://github.com/
|
|
375
|
+
git clone https://github.com/Ellydev0/pm-auto.git
|
|
244
376
|
cd pm-auto
|
|
245
|
-
```
|
|
246
|
-
3. **Install dependencies:**
|
|
247
|
-
```bash
|
|
248
377
|
npm install
|
|
249
378
|
```
|
|
250
379
|
|
|
251
|
-
|
|
380
|
+
2. **Create a branch:**
|
|
252
381
|
|
|
253
|
-
1. **Create a new branch:**
|
|
254
382
|
```bash
|
|
255
383
|
git checkout -b feature/your-feature-name
|
|
256
384
|
```
|
|
257
385
|
|
|
258
|
-
|
|
386
|
+
3. **Make changes:**
|
|
259
387
|
- Write clean, readable code
|
|
260
|
-
- Follow existing
|
|
261
|
-
- Add tests if applicable
|
|
388
|
+
- Follow existing conventions
|
|
262
389
|
|
|
263
|
-
|
|
390
|
+
4. **Commit with conventional format:**
|
|
264
391
|
```bash
|
|
265
|
-
|
|
392
|
+
git commit -m "feat: add your feature"
|
|
266
393
|
```
|
|
267
394
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
- `fix:` for bug fixes
|
|
277
|
-
- `docs:` for documentation changes
|
|
278
|
-
- `refactor:` for code refactoring
|
|
279
|
-
- `test:` for adding tests
|
|
280
|
-
- `chore:` for maintenance tasks
|
|
281
|
-
|
|
282
|
-
5. **Push to your fork:**
|
|
395
|
+
- `feat:` - New features
|
|
396
|
+
- `fix:` - Bug fixes
|
|
397
|
+
- `docs:` - Documentation
|
|
398
|
+
- `refactor:` - Code refactoring
|
|
399
|
+
- `test:` - Tests
|
|
400
|
+
- `chore:` - Maintenance
|
|
401
|
+
|
|
402
|
+
5. **Push & open PR:**
|
|
283
403
|
```bash
|
|
284
404
|
git push origin feature/your-feature-name
|
|
285
405
|
```
|
|
286
406
|
|
|
287
|
-
6. **Open a Pull Request** from your fork to the main repository
|
|
288
|
-
|
|
289
|
-
### Pull Request Guidelines
|
|
290
|
-
|
|
291
|
-
- Provide a clear description of the changes
|
|
292
|
-
- Reference any related issues
|
|
293
|
-
- Ensure all tests pass
|
|
294
|
-
- Update documentation if needed
|
|
295
|
-
- Keep PRs focused on a single feature or fix
|
|
296
|
-
|
|
297
407
|
### Reporting Issues
|
|
298
408
|
|
|
299
|
-
Found a bug
|
|
409
|
+
Found a bug? Have a suggestion?
|
|
300
410
|
|
|
301
411
|
1. Check if the issue already exists
|
|
302
|
-
2.
|
|
303
|
-
- Clear
|
|
412
|
+
2. Create a new issue with:
|
|
413
|
+
- Clear description
|
|
304
414
|
- Steps to reproduce (for bugs)
|
|
305
|
-
- Expected vs actual behavior
|
|
306
|
-
- Environment
|
|
415
|
+
- Expected vs. actual behavior
|
|
416
|
+
- Environment (OS, Node version, package manager)
|
|
417
|
+
|
|
418
|
+
## Contributors
|
|
419
|
+
|
|
420
|
+
Thank you to all the contributors who have helped make PM-Auto exist! π
|
|
421
|
+
Wait I'm the only one π
π€¦
|
|
307
422
|
|
|
308
|
-
|
|
423
|
+
<!-- ALL-CONTRIBUTORS-LIST:START -->
|
|
424
|
+
<!-- This section is automatically generated. Add contributors using: -->
|
|
425
|
+
<!-- npx all-contributors add <username> <contribution-type> -->
|
|
426
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
309
427
|
|
|
310
|
-
|
|
311
|
-
- Provide constructive feedback
|
|
312
|
-
- Focus on the code, not the person
|
|
428
|
+
Want to see your name here? Check out our [Contributing](#contributing) section!
|
|
313
429
|
|
|
314
|
-
|
|
430
|
+
**Save time. Code more.** Get started with PM-Auto today! π
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config_reader.d.ts","sourceRoot":"","sources":["../src/config_reader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAIlE,KAAK,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C;;GAEG;AAEH,wBAAgB,oBAAoB,CAClC,WAAW,GAAE,MAAsB,GAClC,cAAc,GAAG,IAAI,CAgBvB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,MAAM,EAAE,EAClB,UAAU,GAAG,KACZ,OAAO,CAAC,UAAU,EAAE,GAAG,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"config_reader.d.ts","sourceRoot":"","sources":["../src/config_reader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAIlE,KAAK,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C;;GAEG;AAEH,wBAAgB,oBAAoB,CAClC,WAAW,GAAE,MAAsB,GAClC,cAAc,GAAG,IAAI,CAgBvB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,MAAM,EAAE,EAClB,UAAU,GAAG,KACZ,OAAO,CAAC,UAAU,EAAE,GAAG,aAAa,EAAE,CAoFxC,CAAC"}
|
package/dist/config_reader.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getConfigPath } from "./config_path.js";
|
|
|
3
3
|
import * as fsd from "fs";
|
|
4
4
|
import * as path from "path";
|
|
5
5
|
import { display } from "./display.js";
|
|
6
|
-
import { confirm } from "@
|
|
6
|
+
import { confirm, isCancel, cancel } from "@clack/prompts";
|
|
7
7
|
/**
|
|
8
8
|
* Detect the package manager used in the project.
|
|
9
9
|
*/
|
|
@@ -34,7 +34,7 @@ export const getConfigObject = async (packages, options) => {
|
|
|
34
34
|
configContent = await fs.readFile(configPath, "utf8");
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
|
-
display(`File not found ${error}`, "error");
|
|
37
|
+
display(`File not found ${error} Try updating the config file path`, "error");
|
|
38
38
|
}
|
|
39
39
|
const configObject = JSON.parse(configContent);
|
|
40
40
|
let result = Object.values(configObject);
|
|
@@ -71,8 +71,12 @@ export const getConfigObject = async (packages, options) => {
|
|
|
71
71
|
});
|
|
72
72
|
const continueWithInstall = await confirm({
|
|
73
73
|
message: "Continue with installation?",
|
|
74
|
-
|
|
74
|
+
initialValue: true,
|
|
75
75
|
});
|
|
76
|
+
if (isCancel(continueWithInstall)) {
|
|
77
|
+
cancel("Operation cancelled.");
|
|
78
|
+
process.exit(0);
|
|
79
|
+
}
|
|
76
80
|
if (!continueWithInstall) {
|
|
77
81
|
display("Installation cancelled ", "success");
|
|
78
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config_reader.js","sourceRoot":"","sources":["../src/config_reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,GAAG,MAAM,IAAI,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"config_reader.js","sourceRoot":"","sources":["../src/config_reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,GAAG,MAAM,IAAI,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI3D;;GAEG;AAEH,MAAM,UAAU,oBAAoB,CAClC,cAAsB,OAAO,CAAC,GAAG,EAAE;IAEnC,+CAA+C;IAC/C,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC;QAC7D,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uCAAuC;I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AAc,EAAE,CAAC,OAAO,CAAC;aAC1B;SACF,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;AACH,CAAC,CAAC"}
|
package/dist/display.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @param type - The type of message to display to determine the color.
|
|
6
|
-
*/
|
|
7
|
-
export declare const display: (text: string, type: "error" | "success" | "warning" | "info" | "loading" | "") => void;
|
|
1
|
+
type DisplayType = "error" | "success" | "warning" | "info" | "loading" | "";
|
|
2
|
+
export declare const display: (text: string, type: DisplayType) => void;
|
|
3
|
+
export declare const stopSpinner: (text: string, code?: number) => void;
|
|
4
|
+
export {};
|
|
8
5
|
//# sourceMappingURL=display.d.ts.map
|
package/dist/display.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../src/display.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../src/display.ts"],"names":[],"mappings":"AASA,KAAK,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,EAAE,CAAC;AAI7E,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,MAAM,WAAW,SAuBtD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,OAAM,MAAU,SAMzD,CAAC"}
|