nid2-cli 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/LICENSE +21 -0
- package/README.md +198 -0
- package/lib/npm-increaser-downloads.config.d.ts +4 -0
- package/lib/npm-increaser-downloads.config.d.ts.map +1 -0
- package/lib/npm-increaser-downloads.config.js +16 -0
- package/lib/npm-increaser-downloads.config.js.map +1 -0
- package/lib/src/cli/logger.d.ts +9 -0
- package/lib/src/cli/logger.d.ts.map +1 -0
- package/lib/src/cli/logger.js +55 -0
- package/lib/src/cli/logger.js.map +1 -0
- package/lib/src/cli/prompts.d.ts +8 -0
- package/lib/src/cli/prompts.d.ts.map +1 -0
- package/lib/src/cli/prompts.js +66 -0
- package/lib/src/cli/prompts.js.map +1 -0
- package/lib/src/cli/validators.d.ts +3 -0
- package/lib/src/cli/validators.d.ts.map +1 -0
- package/lib/src/cli/validators.js +18 -0
- package/lib/src/cli/validators.js.map +1 -0
- package/lib/src/cli.d.ts +3 -0
- package/lib/src/cli.d.ts.map +1 -0
- package/lib/src/cli.js +79 -0
- package/lib/src/cli.js.map +1 -0
- package/lib/src/config.d.ts +4 -0
- package/lib/src/config.d.ts.map +1 -0
- package/lib/src/config.js +17 -0
- package/lib/src/config.js.map +1 -0
- package/lib/src/index.d.ts +2 -0
- package/lib/src/index.d.ts.map +1 -0
- package/lib/src/index.js +5 -0
- package/lib/src/index.js.map +1 -0
- package/lib/src/models/config.model.d.ts +8 -0
- package/lib/src/models/config.model.d.ts.map +1 -0
- package/lib/src/models/config.model.js +3 -0
- package/lib/src/models/config.model.js.map +1 -0
- package/lib/src/models/npmjs-response.model.d.ts +91 -0
- package/lib/src/models/npmjs-response.model.d.ts.map +1 -0
- package/lib/src/models/npmjs-response.model.js +3 -0
- package/lib/src/models/npmjs-response.model.js.map +1 -0
- package/lib/src/models/npmsio-response.model.d.ts +20 -0
- package/lib/src/models/npmsio-response.model.d.ts.map +1 -0
- package/lib/src/models/npmsio-response.model.js +3 -0
- package/lib/src/models/npmsio-response.model.js.map +1 -0
- package/lib/src/models/stats.model.d.ts +9 -0
- package/lib/src/models/stats.model.d.ts.map +1 -0
- package/lib/src/models/stats.model.js +38 -0
- package/lib/src/models/stats.model.js.map +1 -0
- package/lib/src/spammer/spammer.d.ts +14 -0
- package/lib/src/spammer/spammer.d.ts.map +1 -0
- package/lib/src/spammer/spammer.js +137 -0
- package/lib/src/spammer/spammer.js.map +1 -0
- package/lib/src/spammer/utils.d.ts +3 -0
- package/lib/src/spammer/utils.d.ts.map +1 -0
- package/lib/src/spammer/utils.js +16 -0
- package/lib/src/spammer/utils.js.map +1 -0
- package/package.json +85 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 [otoneko.]
|
|
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
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# 📊 nid2-cli
|
|
2
|
+
|
|
3
|
+
A powerful tool for simulating npm package downloads and analyzing their impact on package popularity and ranking. This tool allows developers to test how download counts affect package visibility within the npm ecosystem.
|
|
4
|
+
|
|
5
|
+
> **Fork Note**: This project is forked from and inspired by [npm-increaser-downloads](https://github.com/MinhOmega/npm-increaser-downloads). We've enhanced it with additional features including package version specification and version verification capabilities.
|
|
6
|
+
|
|
7
|
+
## ✨ Features
|
|
8
|
+
|
|
9
|
+
- 🚀 Simulate package downloads from the npm registry
|
|
10
|
+
- 📦 Support for specific package versions or latest version
|
|
11
|
+
- ✅ Version existence verification
|
|
12
|
+
- 🔧 Configurable download count, concurrency, and timeout settings
|
|
13
|
+
- 💻 Both CLI and programmatic usage support
|
|
14
|
+
- 📊 Real-time progress tracking and statistics
|
|
15
|
+
- 🎯 Support for scoped packages
|
|
16
|
+
- ⚡ Optimized for various network conditions
|
|
17
|
+
|
|
18
|
+
## ⚠️ Disclaimer
|
|
19
|
+
|
|
20
|
+
This tool is intended for **educational and testing purposes only**. Artificially inflating download counts may violate npm's terms of service. Use responsibly and at your own risk.
|
|
21
|
+
|
|
22
|
+
## 🖥️ Command Line Usage
|
|
23
|
+
|
|
24
|
+
### 📥 Installation
|
|
25
|
+
|
|
26
|
+
Install `nid2-cli` globally using npm:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g nid2-cli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or use with `npx`:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx nid2
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 🚀 Running
|
|
39
|
+
|
|
40
|
+
You can run nid2-cli in two ways:
|
|
41
|
+
|
|
42
|
+
#### 1. Interactive mode (Recommended)
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
nid2
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This will prompt you interactively for all configuration options.
|
|
49
|
+
|
|
50
|
+
#### 2. Command-line arguments
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
nid2 [options]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 📋 Available Options
|
|
57
|
+
|
|
58
|
+
| Option | Short | Type | Description |
|
|
59
|
+
|--------|-------|------|-------------|
|
|
60
|
+
| `--package-name` | `-p` | `string` | NPM package name to simulate downloads for |
|
|
61
|
+
| `--package-version` | `-v` | `string` | Package version (defaults to latest if not specified) |
|
|
62
|
+
| `--num-downloads` | `-n` | `number` | Total number of downloads to simulate |
|
|
63
|
+
| `--max-concurrent-downloads` | `-m` | `number` | Maximum concurrent downloads at once |
|
|
64
|
+
| `--download-timeout` | `-t` | `number` | Download timeout in milliseconds |
|
|
65
|
+
|
|
66
|
+
### 📝 Usage Examples
|
|
67
|
+
|
|
68
|
+
**Interactive mode:**
|
|
69
|
+
```bash
|
|
70
|
+
nid2
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Simulate downloads for latest version:**
|
|
74
|
+
```bash
|
|
75
|
+
nid2 -p lodash -n 1000 -m 300 -t 3000
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Simulate downloads for specific version:**
|
|
79
|
+
```bash
|
|
80
|
+
nid2 -p lodash -v 4.17.21 -n 1000 -m 300 -t 3000
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Using long option names:**
|
|
84
|
+
```bash
|
|
85
|
+
nid2 --package-name lodash --package-version 4.17.21 --num-downloads 1000 --max-concurrent-downloads 300 --download-timeout 3000
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Get help:**
|
|
89
|
+
```bash
|
|
90
|
+
nid2 help
|
|
91
|
+
nid2 -h
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 🛠️ Development Setup
|
|
95
|
+
|
|
96
|
+
### 📥 Clone Repository
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
git clone <repository-url>
|
|
100
|
+
cd nid2-cli
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 📦 Install Dependencies
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm install
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 🧪 Available Scripts
|
|
110
|
+
|
|
111
|
+
| Script | Description |
|
|
112
|
+
|--------|-------------|
|
|
113
|
+
| `npm run dev` | Run in development mode with file watching |
|
|
114
|
+
| `npm run dev:cli` | Run CLI in development mode with file watching |
|
|
115
|
+
| `npm run build` | Compile TypeScript to JavaScript |
|
|
116
|
+
| `npm start` | Run compiled JavaScript |
|
|
117
|
+
| `npm test` | Run test suite with coverage |
|
|
118
|
+
| `npm run format` | Format code and fix linting issues |
|
|
119
|
+
|
|
120
|
+
## ⚙️ Configuration
|
|
121
|
+
|
|
122
|
+
### Default Configuration
|
|
123
|
+
|
|
124
|
+
You can set default configuration in `npm-increaser-downloads.config.ts`:
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
const config: Config = {
|
|
128
|
+
packageName: "my-package",
|
|
129
|
+
packageVersion: "1.0.0", // Optional - omit for latest
|
|
130
|
+
numDownloads: 1000,
|
|
131
|
+
maxConcurrentDownloads: 300,
|
|
132
|
+
downloadTimeout: 3000,
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export default config;
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Configuration Options
|
|
139
|
+
|
|
140
|
+
| Property | Type | Description | Example |
|
|
141
|
+
|----------|------|-------------|---------|
|
|
142
|
+
| `packageName` | `string` | NPM package to simulate downloads for | `"lodash"` |
|
|
143
|
+
| `packageVersion` | `string` (optional) | Specific package version | `"4.17.21"` |
|
|
144
|
+
| `numDownloads` | `number` | Total downloads to simulate | `1000` |
|
|
145
|
+
| `maxConcurrentDownloads` | `number` | Parallel downloads at once | `300` |
|
|
146
|
+
| `downloadTimeout` | `number` | Timeout per download (ms) | `3000` |
|
|
147
|
+
|
|
148
|
+
### ⚡ Performance Tuning
|
|
149
|
+
|
|
150
|
+
For optimal performance:
|
|
151
|
+
|
|
152
|
+
- **Slower networks**: Lower `maxConcurrentDownloads` (100-200), higher `downloadTimeout` (5000-10000)
|
|
153
|
+
- **Fast networks**: Higher `maxConcurrentDownloads` (300-500), lower `downloadTimeout` (2000-3000)
|
|
154
|
+
- **Maximum throughput**: Adjust based on your bandwidth and CPU capacity
|
|
155
|
+
|
|
156
|
+
## 🎯 How It Works
|
|
157
|
+
|
|
158
|
+
1. **Package Validation**: Verifies the package exists on npm registry
|
|
159
|
+
2. **Version Verification**: (If specified) Confirms the requested version exists
|
|
160
|
+
3. **Download Simulation**: Simulates package downloads in configurable batches
|
|
161
|
+
4. **Progress Tracking**: Shows real-time download statistics
|
|
162
|
+
5. **Error Handling**: Gracefully handles failed downloads and network errors
|
|
163
|
+
|
|
164
|
+
## 📊 Output Example
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
⠙ Verifying version 4.17.21...
|
|
168
|
+
✔ Package version specified: 4.17.21
|
|
169
|
+
⠏ Downloaded: 245 | Failed: 0 | Remaining: 755
|
|
170
|
+
⠏ Downloaded: 490 | Failed: 0 | Remaining: 510
|
|
171
|
+
✔ Complete! Downloaded 1000 packages in 42.5 seconds
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## 🔄 How npm Updates Downloads
|
|
175
|
+
|
|
176
|
+
- **Update Frequency**: Weekly (typically every Monday)
|
|
177
|
+
- **Visibility**: Changes may take up to 24 hours to appear on npmjs.com
|
|
178
|
+
- **Metrics Affected**: Trending, Popular, and Search Rankings
|
|
179
|
+
|
|
180
|
+
## 📄 License
|
|
181
|
+
|
|
182
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
183
|
+
|
|
184
|
+
## 🤝 Contributing
|
|
185
|
+
|
|
186
|
+
Contributions are welcome! Please feel free to submit Pull Requests or open Issues.
|
|
187
|
+
|
|
188
|
+
1. Fork the repository
|
|
189
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
190
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
191
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
192
|
+
5. Open a Pull Request
|
|
193
|
+
|
|
194
|
+
## 📚 See Also
|
|
195
|
+
|
|
196
|
+
- [npmjs Registry](https://www.npmjs.com)
|
|
197
|
+
- [npm Documentation](https://docs.npmjs.com)
|
|
198
|
+
- [npm Trends](https://www.npmtrends.com)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-increaser-downloads.config.d.ts","sourceRoot":"","sources":["../npm-increaser-downloads.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,MAcb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config = {
|
|
4
|
+
// NPM package to increase the download count for
|
|
5
|
+
packageName: "",
|
|
6
|
+
// Number of downloads to add to the package
|
|
7
|
+
numDownloads: 1000,
|
|
8
|
+
// Amount of downloads you can run in parallel at once.
|
|
9
|
+
// Slower networks may perform better with a lower maxConcurrentDownloads
|
|
10
|
+
maxConcurrentDownloads: 300,
|
|
11
|
+
// Max time to wait for for a download to complete
|
|
12
|
+
// Slower networks may perform better with a higher downloadTimeout
|
|
13
|
+
downloadTimeout: 3000,
|
|
14
|
+
};
|
|
15
|
+
exports.default = config;
|
|
16
|
+
//# sourceMappingURL=npm-increaser-downloads.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-increaser-downloads.config.js","sourceRoot":"","sources":["../npm-increaser-downloads.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAW;IACrB,iDAAiD;IACjD,WAAW,EAAE,EAAE;IAEf,4CAA4C;IAC5C,YAAY,EAAE,IAAI;IAElB,uDAAuD;IACvD,yEAAyE;IACzE,sBAAsB,EAAE,GAAG;IAE3B,kDAAkD;IAClD,mEAAmE;IACnE,eAAe,EAAE,IAAI;CACtB,CAAC;AAEF,kBAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Ora } from "ora";
|
|
2
|
+
import { Stats } from "../models/stats.model";
|
|
3
|
+
export declare const terminalSpinner: Ora;
|
|
4
|
+
export declare const mapToString: (num: number) => string;
|
|
5
|
+
export declare const mapToDate: (seconds: number | null) => string;
|
|
6
|
+
export declare const logDownload: (stats: Stats) => void;
|
|
7
|
+
export declare const logComplete: () => void;
|
|
8
|
+
export declare const logError: (error: Error) => void;
|
|
9
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/cli/logger.ts"],"names":[],"mappings":"AACA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG/B,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAG9C,eAAO,MAAM,eAAe,EAAE,GAG5B,CAAC;AAEH,eAAO,MAAM,WAAW,QAAS,MAAM,KAAG,MAMzC,CAAC;AAEF,eAAO,MAAM,SAAS,YAAa,MAAM,GAAG,IAAI,KAAG,MAYlD,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,KAAK,KAAG,IAS1C,CAAC;AAEF,eAAO,MAAM,WAAW,QAAO,IAE9B,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,KAAK,KAAG,IAGvC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.logError = exports.logComplete = exports.logDownload = exports.mapToDate = exports.mapToString = exports.terminalSpinner = void 0;
|
|
7
|
+
const date_fns_1 = require("date-fns");
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
const config_1 = require("../config");
|
|
10
|
+
// Disable the spinner during tests to avoid keeping a TTY handle open
|
|
11
|
+
exports.terminalSpinner = (0, ora_1.default)({
|
|
12
|
+
isEnabled: process.env.NODE_ENV !== "test",
|
|
13
|
+
discardStdin: true,
|
|
14
|
+
});
|
|
15
|
+
const mapToString = (num) => {
|
|
16
|
+
if (Number.isInteger(num)) {
|
|
17
|
+
return num.toString();
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return num.toFixed(2);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.mapToString = mapToString;
|
|
24
|
+
const mapToDate = (seconds) => {
|
|
25
|
+
if (seconds === null || seconds < 0) {
|
|
26
|
+
return "--:--:--";
|
|
27
|
+
}
|
|
28
|
+
const milliseconds = 1000 * seconds;
|
|
29
|
+
const date = new Date(milliseconds);
|
|
30
|
+
const hours = (0, date_fns_1.secondsToHours)(seconds);
|
|
31
|
+
const hoursString = hours.toString().padStart(2, "0");
|
|
32
|
+
const minutesSecondsString = (0, date_fns_1.format)(date, "mm:ss");
|
|
33
|
+
return `${hoursString}:${minutesSecondsString}`;
|
|
34
|
+
};
|
|
35
|
+
exports.mapToDate = mapToDate;
|
|
36
|
+
const logDownload = (stats) => {
|
|
37
|
+
if (!exports.terminalSpinner.isSpinning) {
|
|
38
|
+
exports.terminalSpinner.start();
|
|
39
|
+
}
|
|
40
|
+
exports.terminalSpinner.text = `\n`;
|
|
41
|
+
exports.terminalSpinner.text += `Download count: ${(0, exports.mapToString)(stats.successfulDownloads)}/${(0, config_1.getConfig)().numDownloads}\n`;
|
|
42
|
+
exports.terminalSpinner.text += `Download speed: ${(0, exports.mapToString)(stats.getDownloadSpeed())} dl/s\n`;
|
|
43
|
+
exports.terminalSpinner.text += `Estimated time remaining: ${(0, exports.mapToDate)(stats.getTimeRemaining())}\n`;
|
|
44
|
+
};
|
|
45
|
+
exports.logDownload = logDownload;
|
|
46
|
+
const logComplete = () => {
|
|
47
|
+
exports.terminalSpinner.succeed(`Completed ${(0, config_1.getConfig)().numDownloads} downloads for ${(0, config_1.getConfig)().packageName}`);
|
|
48
|
+
};
|
|
49
|
+
exports.logComplete = logComplete;
|
|
50
|
+
const logError = (error) => {
|
|
51
|
+
exports.terminalSpinner.stopAndPersist();
|
|
52
|
+
exports.terminalSpinner.fail(error.toString());
|
|
53
|
+
};
|
|
54
|
+
exports.logError = logError;
|
|
55
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/cli/logger.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAkD;AAClD,8CAA+B;AAE/B,sCAAsC;AAGtC,sEAAsE;AACzD,QAAA,eAAe,GAAQ,IAAA,aAAG,EAAC;IACtC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM;IAC1C,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC;AAEI,MAAM,WAAW,GAAG,CAAC,GAAW,EAAU,EAAE;IACjD,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;QACzB,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;KACvB;SAAM;QACL,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KACvB;AACH,CAAC,CAAC;AANW,QAAA,WAAW,eAMtB;AAEK,MAAM,SAAS,GAAG,CAAC,OAAsB,EAAU,EAAE;IAC1D,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,GAAG,CAAC,EAAE;QACnC,OA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B;AAEK,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAQ,EAAE;IAC7C,uBAAe,CAAC,cAAc,EAAE,CAAC;IACjC,uBAAe,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;AACzC,CAAC,CAAC;AAHW,QAAA,QAAQ,YAGnB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Config } from "../models/config.model";
|
|
2
|
+
export declare const getPackageName: () => Promise<string>;
|
|
3
|
+
export declare const getPackageVersion: () => Promise<string | undefined>;
|
|
4
|
+
export declare const getNumberOfDownloads: () => Promise<number>;
|
|
5
|
+
export declare const getMaxConcurrentDownloads: () => Promise<number>;
|
|
6
|
+
export declare const getDownloadTimeout: () => Promise<number>;
|
|
7
|
+
export declare const getConfigFromCli: () => Promise<Config>;
|
|
8
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/cli/prompts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,eAAO,MAAM,cAAc,QAAa,QAAQ,MAAM,CAKrD,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAa,QAAQ,MAAM,GAAG,SAAS,CAMpE,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAa,QAAQ,MAAM,CAO3D,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAa,QAAQ,MAAM,CAOhE,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAAa,QAAQ,MAAM,CAOzD,CAAC;AAWF,eAAO,MAAM,gBAAgB,QAAa,QAAQ,MAAM,CAUvD,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConfigFromCli = exports.getDownloadTimeout = exports.getMaxConcurrentDownloads = exports.getNumberOfDownloads = exports.getPackageVersion = exports.getPackageName = void 0;
|
|
4
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
5
|
+
const validators_1 = require("./validators");
|
|
6
|
+
const getPackageName = async () => {
|
|
7
|
+
return (0, prompts_1.input)({
|
|
8
|
+
message: "Package name: ",
|
|
9
|
+
validate: (name) => (0, validators_1.validatePackageName)(name),
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.getPackageName = getPackageName;
|
|
13
|
+
const getPackageVersion = async () => {
|
|
14
|
+
const version = await (0, prompts_1.input)({
|
|
15
|
+
message: "Package version: ",
|
|
16
|
+
default: "latest",
|
|
17
|
+
});
|
|
18
|
+
return version === "latest" ? undefined : version;
|
|
19
|
+
};
|
|
20
|
+
exports.getPackageVersion = getPackageVersion;
|
|
21
|
+
const getNumberOfDownloads = async () => {
|
|
22
|
+
const result = await (0, prompts_1.number)({
|
|
23
|
+
message: "Number of downloads: ",
|
|
24
|
+
default: 1000,
|
|
25
|
+
validate: (downloads) => (0, validators_1.validateNumbers)(downloads),
|
|
26
|
+
});
|
|
27
|
+
return result ?? 1000;
|
|
28
|
+
};
|
|
29
|
+
exports.getNumberOfDownloads = getNumberOfDownloads;
|
|
30
|
+
const getMaxConcurrentDownloads = async () => {
|
|
31
|
+
const result = await (0, prompts_1.number)({
|
|
32
|
+
message: "Number of concurrent downloads: ",
|
|
33
|
+
default: 300,
|
|
34
|
+
validate: (downloads) => (0, validators_1.validateNumbers)(downloads),
|
|
35
|
+
});
|
|
36
|
+
return result ?? 300;
|
|
37
|
+
};
|
|
38
|
+
exports.getMaxConcurrentDownloads = getMaxConcurrentDownloads;
|
|
39
|
+
const getDownloadTimeout = async () => {
|
|
40
|
+
const result = await (0, prompts_1.number)({
|
|
41
|
+
message: "Time to wait for a download to complete (in ms): ",
|
|
42
|
+
default: 3000,
|
|
43
|
+
validate: (downloads) => (0, validators_1.validateNumbers)(downloads),
|
|
44
|
+
});
|
|
45
|
+
return result ?? 3000;
|
|
46
|
+
};
|
|
47
|
+
exports.getDownloadTimeout = getDownloadTimeout;
|
|
48
|
+
const getEmptyConfig = () => {
|
|
49
|
+
return {
|
|
50
|
+
packageName: "",
|
|
51
|
+
numDownloads: 0,
|
|
52
|
+
maxConcurrentDownloads: 0,
|
|
53
|
+
downloadTimeout: 0,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const getConfigFromCli = async () => {
|
|
57
|
+
const config = getEmptyConfig();
|
|
58
|
+
config.packageName = await (0, exports.getPackageName)();
|
|
59
|
+
config.packageVersion = await (0, exports.getPackageVersion)();
|
|
60
|
+
config.numDownloads = await (0, exports.getNumberOfDownloads)();
|
|
61
|
+
config.maxConcurrentDownloads = await (0, exports.getMaxConcurrentDownloads)();
|
|
62
|
+
config.downloadTimeout = await (0, exports.getDownloadTimeout)();
|
|
63
|
+
return config;
|
|
64
|
+
};
|
|
65
|
+
exports.getConfigFromCli = getConfigFromCli;
|
|
66
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/cli/prompts.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAElD,6CAAoE;AAE7D,MAAM,cAAc,GAAG,KAAK,IAAqB,EAAE;IACxD,OAAO,IAAA,eAAK,EAAC;QACX,OAAO,EAAE,gBAAgB;QACzB,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAA,gCAAmB,EAAC,IAAI,CAAC;KACtD,CAAC,CAAC;AACL,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB;AAEK,MAAM,iBAAiB,GAAG,KAAK,IAAiC,EAAE;IACvE,MAAM,OAAO,GAAG,MAAM,IAAA,eAAK,EAAC;QAC1B,OAAO,EAAE,mBAAmB;QAC5B,OAAO,EAAE,QAAQ;KAClB,CAAC,CAAC;IACH,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,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BAAgB,GAAG,KAAK,IAAqB,EAAE;IAC1D,MAAM,MAAM,GAAW,cAAc,EAAE,CAAC;IAExC,MAAM,CAAC,WAAW,GAAG,MAAM,IAAA,sBAAc,GAAE,CAAC;IAC5C,MAAM,CAAC,cAAc,GAAG,MAAM,IAAA,yBAAiB,GAAE,CAAC;IAClD,MAAM,CAAC,YAAY,GAAG,MAAM,IAAA,4BAAoB,GAAE,CAAC;IACnD,MAAM,CAAC,sBAAsB,GAAG,MAAM,IAAA,iCAAyB,GAAE,CAAC;IAClE,MAAM,CAAC,eAAe,GAAG,MAAM,IAAA,0BAAkB,GAAE,CAAC;IAEpD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/cli/validators.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,gBAAiB,MAAM,KAAG,MAAM,GAAG,OAMlE,CAAC;AAEF,eAAO,MAAM,eAAe,QAAS,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,OAMlE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateNumbers = exports.validatePackageName = void 0;
|
|
4
|
+
const validatePackageName = (packageName) => {
|
|
5
|
+
if (packageName.length === 0) {
|
|
6
|
+
return "Must enter a package name";
|
|
7
|
+
}
|
|
8
|
+
return true;
|
|
9
|
+
};
|
|
10
|
+
exports.validatePackageName = validatePackageName;
|
|
11
|
+
const validateNumbers = (num) => {
|
|
12
|
+
if (typeof num === "number" && num <= 0) {
|
|
13
|
+
return "Must be greater than 0";
|
|
14
|
+
}
|
|
15
|
+
return true;
|
|
16
|
+
};
|
|
17
|
+
exports.validateNumbers = validateNumbers;
|
|
18
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/cli/validators.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,CAAC,WAAmB,EAAoB,EAAE;IAC3E,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,OAAO,2BAA2B,CAAC;KACpC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AANW,QAAA,mBAAmB,uBAM9B;AAEK,MAAM,eAAe,GAAG,CAAC,GAAuB,EAAoB,EAAE;IAC3E,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,CAAC,EAAE;QACvC,OAAO,wBAAwB,CAAC;KACjC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B"}
|
package/lib/src/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":""}
|
package/lib/src/cli.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
8
|
+
const helpers_1 = require("yargs/helpers");
|
|
9
|
+
const prompts_1 = require("./cli/prompts");
|
|
10
|
+
const config_1 = require("./config");
|
|
11
|
+
const spammer_1 = require("./spammer/spammer");
|
|
12
|
+
const argv = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
13
|
+
.usage("Usage: nid [options]\n\n" +
|
|
14
|
+
"Note: if no options are provided, nid will prompt for input interactively.\n\n" +
|
|
15
|
+
"For advanced configuration, use npm-increaser-downloads.config.ts in the root directory.\n" +
|
|
16
|
+
"See also the sample: https://github.com/MinhOmega/npm-increaser-downloads#readme\n\n" +
|
|
17
|
+
"Examples:\n\n" +
|
|
18
|
+
" $ nid\n" +
|
|
19
|
+
" $ nid -p my-package -n 1000 -m 300 -t 3000\n" +
|
|
20
|
+
" $ nid -p my-package -v 1.0.0 -n 1000 -m 300 -t 3000\n" +
|
|
21
|
+
" $ nid --package-name my-package --num-downloads 1000 --max-concurrent-downloads 300 --download-timeout 3000\n\n" +
|
|
22
|
+
"All options are documented under: nid help")
|
|
23
|
+
.option("package-name", {
|
|
24
|
+
alias: "p",
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "NPM package to increase the downloads of",
|
|
27
|
+
})
|
|
28
|
+
.option("package-version", {
|
|
29
|
+
alias: "v",
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Version to increase the downloads of"
|
|
32
|
+
})
|
|
33
|
+
.option("num-downloads", {
|
|
34
|
+
alias: "n",
|
|
35
|
+
type: "number",
|
|
36
|
+
description: "Number of times to download the package",
|
|
37
|
+
})
|
|
38
|
+
.option("max-concurrent-downloads", {
|
|
39
|
+
alias: "m",
|
|
40
|
+
type: "number",
|
|
41
|
+
description: "Amount of downloads to run in parallel at once",
|
|
42
|
+
})
|
|
43
|
+
.option("download-timeout", {
|
|
44
|
+
alias: "t",
|
|
45
|
+
type: "number",
|
|
46
|
+
description: "Max time (in ms) to wait for a download to complete",
|
|
47
|
+
})
|
|
48
|
+
.help()
|
|
49
|
+
.alias("help", "h")
|
|
50
|
+
.epilogue("For more information, visit https://github.com/MinhOmega/npm-increaser-downloads").argv;
|
|
51
|
+
const runWithArgs = (args) => {
|
|
52
|
+
// Check if any relevant argument was provided
|
|
53
|
+
const hasAnyArg = ["package-name", "package-version", "num-downloads", "max-concurrent-downloads", "download-timeout"].some((arg) => args[arg] !== undefined);
|
|
54
|
+
if (!hasAnyArg) {
|
|
55
|
+
// If no relevant arguments were provided, fall back to CLI prompts
|
|
56
|
+
(0, prompts_1.getConfigFromCli)().then(config_1.setConfig).then(spammer_1.run);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const config = {
|
|
60
|
+
packageName: args["package-name"],
|
|
61
|
+
packageVersion: args["package-version"],
|
|
62
|
+
numDownloads: args["num-downloads"],
|
|
63
|
+
maxConcurrentDownloads: args["max-concurrent-downloads"],
|
|
64
|
+
downloadTimeout: args["download-timeout"],
|
|
65
|
+
};
|
|
66
|
+
const isConfigComplete = Object.values(config).every((value) => value !== undefined);
|
|
67
|
+
if (isConfigComplete) {
|
|
68
|
+
(0, config_1.setConfig)(config);
|
|
69
|
+
(0, spammer_1.run)();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
// If any argument was provided but config is incomplete, show help and exit
|
|
73
|
+
console.log("Incomplete configuration. Please provide all required options or run without arguments for interactive mode.");
|
|
74
|
+
yargs_1.default.showHelp();
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
runWithArgs(argv);
|
|
79
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,kDAAyC;AACzC,2CAAwC;AACxC,2CAAiD;AACjD,qCAAqC;AAErC,+CAAwC;AAExC,MAAM,IAAI,GAAG,IAAA,eAAK,EAAC,IAAA,iBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACtC,KAAK,CACJ,0BAA0B;IACxB,gFAAgF;IAChF,4FAA4F;IAC5F,sFAAsF;IACtF,eAAe;IACf,WAAW;IACX,gDAAgD;IAChD,yDAAyD;IACzD,mHAAmH;IACnH,4CAA4C,CAC/C;KACA,MAAM,CAAC,cAAc,EAAE;IACtB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,0CAA0C;CACxD,CAAC;KACD,MAAM,CAAC,iBAAiB,EAAE;I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GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;IAErF,IAAI,gBAAgB,EAAE;QACpB,IAAA,kBAAS,EAAC,MAAgB,CAAC,CAAC;QAC5B,IAAA,aAAG,GAAE,CAAC;KACP;SAAM;QACL,4EAA4E;QAC5E,OAAO,CAAC,GAAG,CAAC,8GAA8G,CAAC,CAAC;QAC5H,eAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAC;AAEF,WAAW,CACT,IAME,CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAI/C,eAAO,MAAM,SAAS,QAAO,MAE5B,CAAC;AAEF,eAAO,MAAM,SAAS,cAAe,MAAM,KAAG,IAE7C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.setConfig = exports.getConfig = void 0;
|
|
7
|
+
const npm_increaser_downloads_config_1 = __importDefault(require("../npm-increaser-downloads.config"));
|
|
8
|
+
let selectedConfig = npm_increaser_downloads_config_1.default;
|
|
9
|
+
const getConfig = () => {
|
|
10
|
+
return selectedConfig;
|
|
11
|
+
};
|
|
12
|
+
exports.getConfig = getConfig;
|
|
13
|
+
const setConfig = (newConfig) => {
|
|
14
|
+
selectedConfig = newConfig;
|
|
15
|
+
};
|
|
16
|
+
exports.setConfig = setConfig;
|
|
17
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":";;;;;;AAAA,uGAA8D;AAI9D,IAAI,cAAc,GAAW,wCAAa,CAAC;AAEpC,MAAM,SAAS,GAAG,GAAW,EAAE;IACpC,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEK,MAAM,SAAS,GAAG,CAAC,SAAiB,EAAQ,EAAE;IACnD,cAAc,GAAG,SAAS,CAAC;AAC7B,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
|
package/lib/src/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,+CAAwC;AAExC,IAAA,aAAG,GAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.model.d.ts","sourceRoot":"","sources":["../../../src/models/config.model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,YAAY,EAAE,MAAM,CAAC;IAErB,WAAW,EAAE,MAAM,CAAC;IAEpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,sBAAsB,EAAE,MAAM,CAAC;IAE/B,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.model.js","sourceRoot":"","sources":["../../../src/models/config.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
interface NpmjsAuthor {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
interface NpmjsBugs {
|
|
5
|
+
url: string;
|
|
6
|
+
}
|
|
7
|
+
interface NpmjsScripts {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}
|
|
10
|
+
interface NpmjsDependencies {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
}
|
|
13
|
+
interface NpmjsDevDependencies {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
}
|
|
16
|
+
interface NpmjsPeerDependencies {
|
|
17
|
+
[key: string]: string;
|
|
18
|
+
}
|
|
19
|
+
interface NpmjsEngines {
|
|
20
|
+
node: string;
|
|
21
|
+
}
|
|
22
|
+
interface NpmjsPublishConfig {
|
|
23
|
+
access: string;
|
|
24
|
+
registry: string;
|
|
25
|
+
}
|
|
26
|
+
interface NpmjsReleaseIt {
|
|
27
|
+
git: {
|
|
28
|
+
commitMessage: string;
|
|
29
|
+
tagName: string;
|
|
30
|
+
};
|
|
31
|
+
npm: {
|
|
32
|
+
publish: boolean;
|
|
33
|
+
};
|
|
34
|
+
github: {
|
|
35
|
+
release: boolean;
|
|
36
|
+
};
|
|
37
|
+
plugins: {
|
|
38
|
+
[key: string]: {
|
|
39
|
+
preset: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
interface NpmjsDist {
|
|
44
|
+
integrity: string;
|
|
45
|
+
shasum: string;
|
|
46
|
+
tarball: string;
|
|
47
|
+
fileCount: number;
|
|
48
|
+
unpackedSize: number;
|
|
49
|
+
signatures: Array<{
|
|
50
|
+
keyid: string;
|
|
51
|
+
sig: string;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
interface NpmjsUser {
|
|
55
|
+
name: string;
|
|
56
|
+
email: string;
|
|
57
|
+
}
|
|
58
|
+
export interface NpmjsResponse {
|
|
59
|
+
"name": string;
|
|
60
|
+
"version": string;
|
|
61
|
+
"description": string;
|
|
62
|
+
"keywords": string[];
|
|
63
|
+
"homepage": string;
|
|
64
|
+
"bugs": NpmjsBugs;
|
|
65
|
+
"license": string;
|
|
66
|
+
"author": NpmjsAuthor;
|
|
67
|
+
"main": string;
|
|
68
|
+
"typings": string;
|
|
69
|
+
"scripts": NpmjsScripts;
|
|
70
|
+
"dependencies": NpmjsDependencies;
|
|
71
|
+
"devDependencies": NpmjsDevDependencies;
|
|
72
|
+
"peerDependencies": NpmjsPeerDependencies;
|
|
73
|
+
"engines": NpmjsEngines;
|
|
74
|
+
"publishConfig": NpmjsPublishConfig;
|
|
75
|
+
"release-it": NpmjsReleaseIt;
|
|
76
|
+
"_id": string;
|
|
77
|
+
"gitHead": string;
|
|
78
|
+
"_nodeVersion": string;
|
|
79
|
+
"_npmVersion": string;
|
|
80
|
+
"dist": NpmjsDist;
|
|
81
|
+
"_npmUser": NpmjsUser;
|
|
82
|
+
"directories": Record<string, unknown>;
|
|
83
|
+
"maintainers": NpmjsUser[];
|
|
84
|
+
"_npmOperationalInternal": {
|
|
85
|
+
host: string;
|
|
86
|
+
tmp: string;
|
|
87
|
+
};
|
|
88
|
+
"_hasShrinkwrap": boolean;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
91
|
+
//# sourceMappingURL=npmjs-response.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmjs-response.model.d.ts","sourceRoot":"","sources":["../../../src/models/npmjs-response.model.ts"],"names":[],"mappings":"AAAA,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,SAAS;IACjB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,UAAU,iBAAiB;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,UAAU,oBAAoB;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,UAAU,qBAAqB;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UA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C1C,SAAS,EAAE,YAAY,CAAC;IACxB,eAAe,EAAE,kBAAkB,CAAC;IACpC,YAAY,EAAE,cAAc,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,aAAa,EAAE,SAAS,EAAE,CAAC;IAC3B,yBAAyB,EAAE;QACzB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,gBAAgB,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmjs-response.model.js","sourceRoot":"","sources":["../../../src/models/npmjs-response.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface NpmsioMetadata {
|
|
2
|
+
version: string;
|
|
3
|
+
}
|
|
4
|
+
interface NpmsioCollected {
|
|
5
|
+
metadata: NpmsioMetadata;
|
|
6
|
+
}
|
|
7
|
+
interface NpmsioDetail {
|
|
8
|
+
popularity: number;
|
|
9
|
+
}
|
|
10
|
+
interface NpmsioScore {
|
|
11
|
+
final: number;
|
|
12
|
+
detail: NpmsioDetail;
|
|
13
|
+
}
|
|
14
|
+
export interface NpmsioResponse {
|
|
15
|
+
analyzedAt: string;
|
|
16
|
+
collected: NpmsioCollected;
|
|
17
|
+
score: NpmsioScore;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=npmsio-response.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmsio-response.model.d.ts","sourceRoot":"","sources":["../../../src/models/npmsio-response.model.ts"],"names":[],"mappings":"AAAA,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,eAAe,CAAC;IAC3B,KAAK,EAAE,WAAW,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmsio-response.model.js","sourceRoot":"","sources":["../../../src/models/npmsio-response.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class Stats {
|
|
2
|
+
successfulDownloads: number;
|
|
3
|
+
failedDownloads: number;
|
|
4
|
+
private startTime;
|
|
5
|
+
constructor(startTime: number, successfulDownloads?: number, failedDownloads?: number);
|
|
6
|
+
getDownloadSpeed(): number;
|
|
7
|
+
getTimeRemaining(): number | null;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=stats.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.model.d.ts","sourceRoot":"","sources":["../../../src/models/stats.model.ts"],"names":[],"mappings":"AAEA,qBAAa,KAAK;IACT,mBAAmB,SAAK;IAExB,eAAe,SAAK;IAE3B,OAAO,CAAC,SAAS,CAAS;gBAEP,SAAS,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM;IAMrF,gBAAgB,IAAI,MAAM;IAa1B,gBAAgB,IAAI,MAAM,GAAG,IAAI;CAWzC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Stats = void 0;
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
class Stats {
|
|
6
|
+
constructor(startTime, successfulDownloads, failedDownloads) {
|
|
7
|
+
this.successfulDownloads = 0;
|
|
8
|
+
this.failedDownloads = 0;
|
|
9
|
+
this.startTime = startTime;
|
|
10
|
+
this.successfulDownloads = successfulDownloads ?? this.successfulDownloads;
|
|
11
|
+
this.failedDownloads = failedDownloads ?? this.failedDownloads;
|
|
12
|
+
}
|
|
13
|
+
getDownloadSpeed() {
|
|
14
|
+
const currentTime = Date.now();
|
|
15
|
+
const timeElapsed = currentTime - this.startTime;
|
|
16
|
+
const downloadsPerMillisecond = this.successfulDownloads / timeElapsed;
|
|
17
|
+
const downloadsPerSecond = downloadsPerMillisecond * 1000;
|
|
18
|
+
if (downloadsPerSecond > 0 && isFinite(downloadsPerSecond)) {
|
|
19
|
+
return downloadsPerSecond;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
getTimeRemaining() {
|
|
26
|
+
const downloadsRemaining = (0, config_1.getConfig)().numDownloads - this.successfulDownloads;
|
|
27
|
+
const downloadsPerSecond = this.getDownloadSpeed();
|
|
28
|
+
if (downloadsPerSecond <= 0) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const secondsRemaining = downloadsRemaining / downloadsPerSecond;
|
|
33
|
+
return secondsRemaining;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.Stats = Stats;
|
|
38
|
+
//# sourceMappingURL=stats.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.model.js","sourceRoot":"","sources":["../../../src/models/stats.model.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AAEtC,MAAa,KAAK;IAOhB,YAAmB,SAAiB,EAAE,mBAA4B,EAAE,eAAwB;QANrF,wBAAmB,GAAG,CAAC,CAAC;QAExB,oBAAe,GAAG,CAAC,CAAC;QAKzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,IAAI,IAAI,CAAC,mBAAmB,CAAC;QAC3E,IAAI,CAAC,eAAe,GAAG,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC;IACjE,CAAC;IAEM,gBAAgB;QACrB,MAAM,WAAW,GAAW,IAAI,CAAC,GAAG,EAAE,CAAC;QACvC,MAAM,WAAW,GAAW,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC;QACzD,MAAM,uBAAuB,GAAW,IAAI,CAAC,mBAAmB,GAAG,WAAW,CAAC;QAC/E,MAAM,kBAAkB,GAAW,uBAAuB,GAAG,IAAI,CAAC;QAElE,IAAI,kBAAkB,GAAG,CAAC,IAAI,QAAQ,CAAC,kBAAkB,CAAC,EAAE;YAC1D,OAAO,kBAAkB,CAAC;SAC3B;aAAM;YACL,OAAO,CAAC,CAAC;SACV;IACH,CAAC;IAEM,gBAAgB;QACrB,MAAM,kBAAkB,GAAW,IAAA,kBAAS,GAAE,CAAC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACvF,MAAM,kBAAkB,GAAW,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE3D,IAAI,kBAAkB,IAAI,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC;SACb;aAAM;YACL,MAAM,gBAAgB,GAAW,kBAAkB,GAAG,kBAAkB,CAAC;YACzE,OAAO,gBAAgB,CAAC;SACzB;IACH,CAAC;CACF;AArCD,sBAqCC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NpmjsResponse } from "../models/npmjs-response.model";
|
|
2
|
+
import { NpmsioResponse } from "../models/npmsio-response.model";
|
|
3
|
+
import { Stats } from "../models/stats.model";
|
|
4
|
+
export declare const getNpmsioResponse: () => Promise<NpmsioResponse>;
|
|
5
|
+
export declare const getNpmjsResponse: () => Promise<NpmjsResponse>;
|
|
6
|
+
export declare const getVersionPackage: () => Promise<string>;
|
|
7
|
+
export declare const verifyVersionExists: (version: string) => Promise<boolean>;
|
|
8
|
+
export declare const downloadPackage: (version: string, stats: Stats) => Promise<unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* Runs the download spammer.
|
|
11
|
+
* @returns A Promise that resolves when the spamming is complete.
|
|
12
|
+
*/
|
|
13
|
+
export declare const run: () => Promise<void>;
|
|
14
|
+
//# sourceMappingURL=spammer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spammer.d.ts","sourceRoot":"","sources":["../../../src/spammer/spammer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAI9C,eAAO,MAAM,iBAAiB,+BAY7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,QAAQ,aAAa,CAY9D,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAa,QAAQ,MAAM,CAiBxD,CAAA;AAED,eAAO,MAAM,mBAAmB,YAAmB,MAAM,KAAG,QAAQ,OAAO,CAa1E,CAAC;AAEF,eAAO,MAAM,eAAe,YAAmB,MAAM,SAAS,KAAK,KAAG,QAAQ,OAAO,CAkBpF,CAAC;AAqBF;;;GAGG;AACH,eAAO,MAAM,GAAG,QAAa,QAAQ,IAAI,CA4BxC,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.run = exports.downloadPackage = exports.verifyVersionExists = exports.getVersionPackage = exports.getNpmjsResponse = exports.getNpmsioResponse = void 0;
|
|
4
|
+
const gaxios_1 = require("gaxios");
|
|
5
|
+
const logger_1 = require("../cli/logger");
|
|
6
|
+
const config_1 = require("../config");
|
|
7
|
+
const stats_model_1 = require("../models/stats.model");
|
|
8
|
+
const utils_1 = require("./utils");
|
|
9
|
+
const logger_2 = require("../cli/logger");
|
|
10
|
+
const getNpmsioResponse = async () => {
|
|
11
|
+
const encodedPackageName = (0, utils_1.getEncodedPackageName)((0, config_1.getConfig)().packageName);
|
|
12
|
+
const npmsioResponse = await (0, gaxios_1.request)({
|
|
13
|
+
baseUrl: "https://api.npms.io",
|
|
14
|
+
url: `/v2/package/${encodedPackageName}`,
|
|
15
|
+
method: "GET",
|
|
16
|
+
}).catch((response) => {
|
|
17
|
+
throw Error(`Failed to download ${response.config.url}\n${response.message}`);
|
|
18
|
+
});
|
|
19
|
+
return npmsioResponse.data;
|
|
20
|
+
};
|
|
21
|
+
exports.getNpmsioResponse = getNpmsioResponse;
|
|
22
|
+
const getNpmjsResponse = async () => {
|
|
23
|
+
const encodedPackageName = (0, utils_1.getEncodedPackageName)((0, config_1.getConfig)().packageName);
|
|
24
|
+
const npmsResponse = await (0, gaxios_1.request)({
|
|
25
|
+
baseUrl: "https://registry.npmjs.org",
|
|
26
|
+
url: `/${encodedPackageName}/latest`,
|
|
27
|
+
method: "GET",
|
|
28
|
+
}).catch((response) => {
|
|
29
|
+
throw Error(`Failed to download ${response.config.url}\n${response.message}`);
|
|
30
|
+
});
|
|
31
|
+
return npmsResponse.data;
|
|
32
|
+
};
|
|
33
|
+
exports.getNpmjsResponse = getNpmjsResponse;
|
|
34
|
+
const getVersionPackage = async () => {
|
|
35
|
+
try {
|
|
36
|
+
logger_2.terminalSpinner.start();
|
|
37
|
+
const npmioResponse = await (0, exports.getNpmsioResponse)();
|
|
38
|
+
logger_2.terminalSpinner.succeed(`Package version found on npms.io with version ${npmioResponse.collected.metadata.version}`);
|
|
39
|
+
return npmioResponse.collected.metadata.version;
|
|
40
|
+
}
|
|
41
|
+
catch (npmioError) {
|
|
42
|
+
logger_2.terminalSpinner.text = "Package not found in npms.io, trying npmjs.com...";
|
|
43
|
+
try {
|
|
44
|
+
const npmjsResponse = await (0, exports.getNpmjsResponse)();
|
|
45
|
+
logger_2.terminalSpinner.succeed(`Package found on npmjs.com with version ${npmjsResponse.version}`);
|
|
46
|
+
return npmjsResponse.version;
|
|
47
|
+
}
|
|
48
|
+
catch (npmjsError) {
|
|
49
|
+
logger_2.terminalSpinner.fail("Failed to get package version");
|
|
50
|
+
throw new Error(`Failed to get package version: ${npmioError.message}, ${npmjsError.message}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.getVersionPackage = getVersionPackage;
|
|
55
|
+
const verifyVersionExists = async (version) => {
|
|
56
|
+
const encodedPackageName = (0, utils_1.getEncodedPackageName)((0, config_1.getConfig)().packageName);
|
|
57
|
+
try {
|
|
58
|
+
await (0, gaxios_1.request)({
|
|
59
|
+
baseUrl: "https://registry.npmjs.org",
|
|
60
|
+
url: `/${encodedPackageName}/${version}`,
|
|
61
|
+
method: "GET",
|
|
62
|
+
});
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.verifyVersionExists = verifyVersionExists;
|
|
70
|
+
const downloadPackage = async (version, stats) => {
|
|
71
|
+
const packageName = (0, config_1.getConfig)().packageName;
|
|
72
|
+
const unscopedPackageName = (0, utils_1.stripOrganisationFromPackageName)(packageName);
|
|
73
|
+
return (0, gaxios_1.request)({
|
|
74
|
+
baseUrl: "https://registry.yarnpkg.com",
|
|
75
|
+
url: `/${packageName}/-/${unscopedPackageName}-${version}.tgz`,
|
|
76
|
+
method: "GET",
|
|
77
|
+
timeout: (0, config_1.getConfig)().downloadTimeout,
|
|
78
|
+
responseType: "stream",
|
|
79
|
+
})
|
|
80
|
+
.then(() => {
|
|
81
|
+
stats.successfulDownloads++;
|
|
82
|
+
})
|
|
83
|
+
.catch((error) => {
|
|
84
|
+
stats.failedDownloads++;
|
|
85
|
+
console.error("Download failed:", error.message);
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
exports.downloadPackage = downloadPackage;
|
|
89
|
+
const spamDownloads = async (version, stats) => {
|
|
90
|
+
const batchSize = Math.min((0, config_1.getConfig)().maxConcurrentDownloads, 50); // Limit to 50 concurrent downloads
|
|
91
|
+
const totalDownloads = (0, config_1.getConfig)().numDownloads;
|
|
92
|
+
for (let i = 0; i < totalDownloads; i += batchSize) {
|
|
93
|
+
const batch = Math.min(batchSize, totalDownloads - i);
|
|
94
|
+
const requests = [];
|
|
95
|
+
for (let j = 0; j < batch; j++) {
|
|
96
|
+
requests.push((0, exports.downloadPackage)(version, stats));
|
|
97
|
+
}
|
|
98
|
+
await Promise.all(requests);
|
|
99
|
+
// Add a small delay between batches to allow for connection cleanup
|
|
100
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Runs the download spammer.
|
|
105
|
+
* @returns A Promise that resolves when the spamming is complete.
|
|
106
|
+
*/
|
|
107
|
+
const run = async () => {
|
|
108
|
+
try {
|
|
109
|
+
let version;
|
|
110
|
+
const pkgVersion = (0, config_1.getConfig)().packageVersion;
|
|
111
|
+
if (pkgVersion) {
|
|
112
|
+
logger_2.terminalSpinner.start();
|
|
113
|
+
logger_2.terminalSpinner.text = `Verifying version ${pkgVersion}...`;
|
|
114
|
+
const versionExists = await (0, exports.verifyVersionExists)(pkgVersion);
|
|
115
|
+
if (!versionExists) {
|
|
116
|
+
logger_2.terminalSpinner.fail(`Version ${pkgVersion} not found`);
|
|
117
|
+
throw new Error(`Package version ${pkgVersion} does not exist on npm registry`);
|
|
118
|
+
}
|
|
119
|
+
version = pkgVersion;
|
|
120
|
+
logger_2.terminalSpinner.succeed(`Package version specified: ${version}`);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
version = await (0, exports.getVersionPackage)();
|
|
124
|
+
}
|
|
125
|
+
const startTime = Date.now();
|
|
126
|
+
const stats = new stats_model_1.Stats(startTime);
|
|
127
|
+
const loggingInterval = setInterval(() => (0, logger_1.logDownload)(stats), 1000);
|
|
128
|
+
await spamDownloads(version, stats);
|
|
129
|
+
clearInterval(loggingInterval);
|
|
130
|
+
(0, logger_1.logComplete)();
|
|
131
|
+
}
|
|
132
|
+
catch (e) {
|
|
133
|
+
(0, logger_1.logError)(e);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
exports.run = run;
|
|
137
|
+
//# sourceMappingURL=spammer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spammer.js","sourceRoot":"","sources":["../../../src/spammer/spammer.ts"],"names":[],"mappings":";;;AAAA,mCAA8D;AAC9D,0CAAmE;AACnE,sCAAsC;AAGtC,uDAA8C;AAC9C,mCAAkF;AAClF,0CAAgD;AAEzC,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;IAC1C,MAAM,kBAAkB,GAAW,IAAA,6BAAqB,EAAC,IAAA,kBAAS,GAAE,CAAC,WAAW,CAAC,CAAC;IAElF,MAAM,cAAc,GAAmC,MAAM,IAAA,gBAAO,EAAiB;QACnF,OAAO,EAAE,qBAAqB;QAC9B,GAAG,EAAE,eAAe,kBAAkB,EAAE;QACxC,MAAM,EAAE,KAAK;KACd,CAAC,CAAC,KAAK,CAAC,CAAC,QAAqC,EAAE,EAAE;QACjD,MAAM,KAAK,CAAC,sBAAsB,QAAQ,CAAC,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC,IAAI,CAAC;AAC7B,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEK,MAAM,gBAAgB,GAAG,KAAK,IAA4B,EAAE;IACjE,MAAM,kBAAkB,GAAW,IAAA,6BAAqB,EAAC,IAAA,kBAAS,GAAE,CAAC,WAAW,CAAC,CAAC;IAElF,MAAM,YAAY,GAAkC,MAAM,IAAA,gBAAO,EAAgB;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O,GAAG,UAAU,CAAC;YACrB,wBAAe,CAAC,OAAO,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC;SAClE;aAAM;YACL,OAAO,GAAG,MAAM,IAAA,yBAAiB,GAAE,CAAC;SACrC;QACD,MAAM,SAAS,GAAW,IAAI,CAAC,GAAG,EAAE,CAAC;QACrC,MAAM,KAAK,GAAU,IAAI,mBAAK,CAAC,SAAS,CAAC,CAAC;QAE1C,MAAM,eAAe,GAAmB,WAAW,CAAC,GAAG,EAAE,CAAC,IAAA,oBAAW,EAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;QACpF,MAAM,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAEpC,aAAa,CAAC,eAAe,CAAC,CAAC;QAC/B,IAAA,oBAAW,GAAE,CAAC;KACf;IAAC,OAAO,CAAU,EAAE;QACnB,IAAA,iBAAQ,EAAC,CAAU,CAAC,CAAC;KACtB;AACH,CAAC,CAAC;AA5BW,QAAA,GAAG,OA4Bd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/spammer/utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gCAAgC,gBAAiB,MAAM,KAAG,MAGtE,CAAC;AAEF,eAAO,MAAM,qBAAqB,gBAAiB,MAAM,KAAG,MAE3D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEncodedPackageName = exports.stripOrganisationFromPackageName = void 0;
|
|
4
|
+
// If package name is scoped, return the package name without the scope
|
|
5
|
+
// e.g. package-name url -> /package-name/-/package-name-1.0.0.tgz
|
|
6
|
+
// e.g. @scope/package-name url -> /@scope/package-name/-/package-name-1.0.0.tgz
|
|
7
|
+
const stripOrganisationFromPackageName = (packageName) => {
|
|
8
|
+
const packageNameWithScope = packageName.split("/");
|
|
9
|
+
return packageNameWithScope.pop() ?? packageName;
|
|
10
|
+
};
|
|
11
|
+
exports.stripOrganisationFromPackageName = stripOrganisationFromPackageName;
|
|
12
|
+
const getEncodedPackageName = (packageName) => {
|
|
13
|
+
return encodeURIComponent(packageName);
|
|
14
|
+
};
|
|
15
|
+
exports.getEncodedPackageName = getEncodedPackageName;
|
|
16
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/spammer/utils.ts"],"names":[],"mappings":";;;AAAA,uEAAuE;AACvE,kEAAkE;AAClE,gFAAgF;AACzE,MAAM,gCAAgC,GAAG,CAAC,WAAmB,EAAU,EAAE;IAC9E,MAAM,oBAAoB,GAAa,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9D,OAAO,oBAAoB,CAAC,GAAG,EAAE,IAAI,WAAW,CAAC;AACnD,CAAC,CAAC;AAHW,QAAA,gCAAgC,oCAG3C;AAEK,MAAM,qBAAqB,GAAG,CAAC,WAAmB,EAAU,EAAE;IACnE,OAAO,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACzC,CAAC,CAAC;AAFW,QAAA,qBAAqB,yBAEhC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nid2-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Raises the popularity score on your package through nefarious means.",
|
|
5
|
+
"author": "otoneko.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./lib/src/index.js",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@inquirer/prompts": "^5.5.0",
|
|
10
|
+
"date-fns": "2.28.0",
|
|
11
|
+
"gaxios": "5.0.0",
|
|
12
|
+
"ora": "5.4.1",
|
|
13
|
+
"yargs": "^17.7.2"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@types/jest": "^29.5.0",
|
|
17
|
+
"@types/node": "^18.15.0",
|
|
18
|
+
"@types/yargs": "^17.0.33",
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "5.22.0",
|
|
20
|
+
"@typescript-eslint/parser": "5.22.0",
|
|
21
|
+
"eslint": "8.14.0",
|
|
22
|
+
"jest": "^29.7.0",
|
|
23
|
+
"jest-mock-console": "1.2.3",
|
|
24
|
+
"nock": "13.2.4",
|
|
25
|
+
"nodemon": "^3.1.4",
|
|
26
|
+
"prettier": "^3.0.0",
|
|
27
|
+
"ts-jest": "^29.4.6",
|
|
28
|
+
"ts-node": "^10.9.2",
|
|
29
|
+
"typescript": "^4.9.5"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc",
|
|
33
|
+
"start": "ts-node .",
|
|
34
|
+
"test": "jest --coverage --detectOpenHandles",
|
|
35
|
+
"format": "prettier . --write & eslint . --fix",
|
|
36
|
+
"dev": "nodemon --watch 'src/**/*.ts' --exec ts-node src/index.ts",
|
|
37
|
+
"dev:cli": "nodemon --watch 'src/**/*.ts' --exec ts-node src/cli.ts"
|
|
38
|
+
},
|
|
39
|
+
"jest": {
|
|
40
|
+
"preset": "ts-jest",
|
|
41
|
+
"testPathIgnorePatterns": [
|
|
42
|
+
"<rootDir>/(coverage|lib).*/"
|
|
43
|
+
],
|
|
44
|
+
"coverageReporters": [
|
|
45
|
+
"json-summary",
|
|
46
|
+
"text",
|
|
47
|
+
"lcov"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"bin": {
|
|
51
|
+
"nid2": "lib/src/cli.js"
|
|
52
|
+
},
|
|
53
|
+
"directories": {
|
|
54
|
+
"lib": "lib"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"lib/**"
|
|
58
|
+
],
|
|
59
|
+
"keywords": [
|
|
60
|
+
"npm",
|
|
61
|
+
"npmjs",
|
|
62
|
+
"npms",
|
|
63
|
+
"popularity",
|
|
64
|
+
"increaser",
|
|
65
|
+
"spammer",
|
|
66
|
+
"download-simulator",
|
|
67
|
+
"package-stats",
|
|
68
|
+
"cli-tool",
|
|
69
|
+
"typescript",
|
|
70
|
+
"nid",
|
|
71
|
+
"nid2",
|
|
72
|
+
"npm-increaser-downloads"
|
|
73
|
+
],
|
|
74
|
+
"repository": {
|
|
75
|
+
"type": "git",
|
|
76
|
+
"url": "git+https://github.com/otoneko1102/nid2-cli.git"
|
|
77
|
+
},
|
|
78
|
+
"bugs": {
|
|
79
|
+
"url": "https://github.com/otoneko1102/nid2-cli/issues"
|
|
80
|
+
},
|
|
81
|
+
"homepage": "https://github.com/otoneko1102/nid2-cli#readme",
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"registry": "https://registry.npmjs.org/"
|
|
84
|
+
}
|
|
85
|
+
}
|