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 CHANGED
@@ -1,22 +1,50 @@
1
1
  # PM-Auto
2
2
 
3
- A CLI tool for automated npm, yarn, and pnpm package installation across multiple package managers.
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
- - [Configuration File Structure](#configuration-file-structure)
15
- - [Configuration Properties](#configuration-properties)
16
- - [Setting Up Your Config](#setting-up-your-config)
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. **Create a configuration file** in any directory (e.g., `config.json` or `test.json`)
61
+ **1. Create a config file** (e.g., `pm-auto-config.json`):
34
62
 
35
- 2. **Set the config file path** using a relative path from your current working directory:
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
- ```bash
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
- # Example: If your config is in a subdirectory
42
- pm-auto config ./my-configs/config.json
106
+ ```bash
107
+ pm-auto config ./pm-auto-config.json
43
108
  ```
44
109
 
45
- 3. **Start installing packages**:
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
- # Install specific packages
52
- pm-auto install express lodash
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
- > **⚠️ Important:** If you move your config file to a different location, you must set the path again using `pm-auto config <new-path>`
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 across configured package managers.
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 a custom command to all installation commands from config file
71
- - `-D, --dry-run` - Display commands before execution without running them
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 single package
78
- pm-auto install express
160
+ # Install everything from your config
161
+ pm-auto install
79
162
 
80
- # Install multiple packages
81
- pm-auto install express lodash axios
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
- # Dry run to see what would be executed
87
- pm-auto install express --dry-run
169
+ # Preview what would be installed
170
+ pm-auto install --dry-run
88
171
 
89
- # Add custom flag to all installations
90
- pm-auto install express --add-command "--legacy-peer-deps"
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
- Uninstall packages from configured package managers.
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 a custom command to all uninstallation commands from config file
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 express axios
196
+ pm-auto uninstall lodash axios moment
114
197
 
115
- # Add custom flag to uninstallation
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 file path
135
- pm-auto config ./pm-auto.config.json
213
+ # Set config with relative path
214
+ pm-auto config ./pm-auto-config.json
136
215
 
137
- # Use absolute path
138
- pm-auto config /home/user/project/pm-auto.config.json
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
- pm-auto uses a configuration file to define project presets with specific package managers and packages.
224
+ Create a JSON config file to define your tech stack presets.
225
+
226
+ ### Config Structure
144
227
 
145
- ### Configuration File Structure
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
- Create a JSON file (e.g., `config.json`) with the following format:
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
- "vite": {
152
- "name": "vite",
257
+ "fullstack-ts": {
258
+ "name": "fullstack-ts",
153
259
  "packageManager": "npm",
154
260
  "packages": [
155
261
  {
156
- "command": "@types/three --save-dev",
262
+ "command": "typescript ts-node --save-dev",
157
263
  "interactive": false
158
264
  },
159
265
  {
160
- "command": "@react-three/fiber",
266
+ "command": "@types/node --save-dev",
161
267
  "interactive": false
162
268
  },
163
269
  {
164
- "command": "gsap",
270
+ "command": "express dotenv cors helmet",
165
271
  "interactive": false
166
272
  },
167
273
  {
168
- "command": "create-vite@latest my-app",
169
- "interactive": true
274
+ "command": "@types/express --save-dev",
275
+ "interactive": false
170
276
  }
171
277
  ]
172
- },
173
- "express-api": {
174
- "name": "express-api",
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": "express",
291
+ "command": "three @react-three/fiber @react-three/drei",
179
292
  "interactive": false
180
293
  },
181
294
  {
182
- "command": "dotenv",
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
- ### Configuration Properties
307
+ **Interactive commands:**
308
+ Set `"interactive": true` for commands that require user input during installation, such as:
191
309
 
192
- - **`name`** - Identifier for the project preset
193
- - **`packageManager`** - Package manager to use (`npm`, `yarn`, or `pnpm`)
194
- - **`packages`** - Array of package installation configurations
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
- ### Setting Up Your Config
314
+ ### Config Tips
199
315
 
200
- 1. Create your config file in any directory
201
- 2. Set the path using relative paths from your current working directory:
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
- ```bash
204
- # From C:\Users\admin\Documents
205
- C:\Users\admin\Documents> pm-auto config ./test.json
321
+ ## Global Options
206
322
 
207
- # From a project directory
208
- /home/user/projects/my-app> pm-auto config ../configs/pm-auto-config.json
209
- ```
323
+ - `-V, --version` - Show PM-Auto version
324
+ - `-h, --help` - Display help
210
325
 
211
- 3. Verify the configuration is set correctly by running a dry run:
326
+ ## Use Cases
212
327
 
213
- ```bash
214
- pm-auto install --dry-run
215
- ```
328
+ ### Quick Project Setup
216
329
 
217
- > **πŸ“ Note:** The config path is stored persistently. If you move the config file, remember to update the path using `pm-auto config <new-path>` again.
330
+ Start new projects with your preferred stack instantly, no setup scripts needed.
218
331
 
219
- ## Global Options
332
+ ### Team Consistency
220
333
 
221
- - `-V, --version` - Output the version number
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
- ## Use Cases
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
- ### Multi-Project Development
346
+ - Node.js 14.0.0 or higher
347
+ - npm, yarn, or pnpm installed
227
348
 
228
- When working on projects that use different package managers, pm-auto ensures packages are installed consistently across all of them.
349
+ ## Troubleshooting
229
350
 
230
- ### Package Testing
351
+ **Config not found:**
231
352
 
232
- Test your package installation across multiple package managers to ensure compatibility.
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 you can help:
370
+ We welcome contributions! Here's how:
237
371
 
238
- ### Getting Started
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/your-username/pm-auto.git
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
- ### Development Workflow
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
- 2. **Make your changes**
386
+ 3. **Make changes:**
259
387
  - Write clean, readable code
260
- - Follow existing code style and conventions
261
- - Add tests if applicable
388
+ - Follow existing conventions
262
389
 
263
- 3. **Test your changes:**
390
+ 4. **Commit with conventional format:**
264
391
  ```bash
265
- npm test
392
+ git commit -m "feat: add your feature"
266
393
  ```
267
394
 
268
- 4. **Commit your changes:**
269
- ```bash
270
- git add .
271
- git commit -m "feat: add your feature description"
272
- ```
273
-
274
- **Commit message format:**
275
- - `feat:` for new features
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 or have a feature request?
409
+ Found a bug? Have a suggestion?
300
410
 
301
411
  1. Check if the issue already exists
302
- 2. If not, create a new issue with:
303
- - Clear title and description
412
+ 2. Create a new issue with:
413
+ - Clear description
304
414
  - Steps to reproduce (for bugs)
305
- - Expected vs actual behavior
306
- - Environment details (OS, Node version, etc.)
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
- ### Code of Conduct
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
- - Be respectful and inclusive
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
- Thank you for contributing to pm-auto! πŸŽ‰
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,CA4ExC,CAAC"}
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"}
@@ -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 "@inquirer/prompts";
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
- default: true,
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,mBAAmB,CAAC;AAI5C;;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,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xB,OAAO,CAAC,mBAAmB,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;gBAClD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;oBAC9B,OAAO,CAAC,OAAO,GAAG,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;gBACxC,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YACH,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC;gBACxC,OAAO,EAAE,6BAA6B;gBACtC,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;YAEH,IAAI,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC;gBAClC,MAAM,CAAC,sBAAsB,CAAC,CAAC;gBAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YAED,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBACzB,OAAO,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;YAChD,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;SAAM,CAAC;QACN,mCAAmC;QACnC,MAAM,EAAE,GAAG,oBAAoB,EAAE,CAAC;QAElC,MAAM,OAAO,GAAG,EAAE,GAAG,UAAU,CAAC;QAEhC,MAAM,MAAM,GAAoB;YAC9B;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,EAAE;gBACf,cAAc,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
- * Display a message with a specified type.
3
- *
4
- * @param text - The message to display.
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
@@ -1 +1 @@
1
- {"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../src/display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,OAAO,GAClB,MAAM,MAAM,EACZ,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,EAAE,SAqBhE,CAAC"}
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"}