@purpleproser/soundboard-downloader-cli 1.7.0 → 1.8.4

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
@@ -162,20 +162,39 @@ Contributions are welcome! Please open an issue or submit a pull request.
162
162
 
163
163
  ## Compliance with MyInstants Terms of Use
164
164
 
165
- This tool is designed to comply with [MyInstants Terms of Use](https://www.myinstants.com/en/terms_of_use.html):
165
+ This tool is designed to comply with [MyInstants Terms of Use](https://www.myinstants.com/en/terms_of_use.html).
166
166
 
167
- **Personal Use Only**: This tool is for personal, non-commercial use only
168
- ✅ **Official Functionality**: Uses MyInstants' official download buttons and links
169
- ✅ **No Circumvention**: Does not bypass any access controls or copyright protections
170
- ✅ **Rate Limiting**: Includes reasonable delays between requests to avoid server overload
167
+ ### Compliance Features
171
168
 
172
- ⚠️ **User Responsibilities**:
173
- - Do not use this tool for commercial purposes
174
- - Do not make excessive automated requests
175
- - Respect MyInstants' copyright and terms of service
176
- - MyInstants may revoke access at any time
169
+ **Personal Use Only**
170
+ This tool is for personal, non-commercial use only. Commercial use violates MyInstants' terms.
177
171
 
178
- **Important**: MyInstants grants access under a revocable license. This tool may stop working if MyInstants changes their website or terms.
172
+ **Official Functionality**
173
+ Uses MyInstants' official download buttons and links, exactly as a manual user would.
174
+
175
+ ✅ **No Circumvention**
176
+ Does not bypass any access controls, paywalls, or copyright protections.
177
+
178
+ ✅ **Rate Limiting**
179
+ Includes 1-second delays between API requests to avoid being flagged as automated scraping.
180
+
181
+ ### User Responsibilities
182
+
183
+ When using this tool, you agree to:
184
+
185
+ - **Non-commercial use only** - No business or commercial applications
186
+ - **Respect rate limits** - Do not make excessive automated requests
187
+ - **Honor copyright** - Respect MyInstants' terms and copyright protections
188
+ - **Accept revocable access** - MyInstants may change their terms or block access at any time
189
+
190
+ ### Important Notice
191
+
192
+ MyInstants grants access to their website under a revocable license. While this tool is designed to comply with their current terms, it may stop working if:
193
+ - MyInstants changes their website structure
194
+ - MyInstants updates their terms of service
195
+ - MyInstants decides to block automated tools
196
+
197
+ Always check the [current MyInstants Terms of Use](https://www.myinstants.com/en/terms_of_use.html) for the latest requirements.
179
198
 
180
199
  ## Legal Disclaimer
181
200
 
package/dist/main.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleproser/soundboard-downloader-cli",
3
- "version": "1.7.0",
3
+ "version": "1.8.4",
4
4
  "description": "Easily download sounds from myinstants.com using this interactive CLI tool (for personal, non-commercial use only)",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -12,12 +12,6 @@
12
12
  "bin": {
13
13
  "soundboard-downloader": "./dist/main.js"
14
14
  },
15
- "scripts": {
16
- "test": "vitest --coverage",
17
- "start": "ts-node ./src/main.ts",
18
- "build": "tsc -p tsconfig.build.json",
19
- "prepublishOnly": "npm run build"
20
- },
21
15
  "keywords": [
22
16
  "soundboard",
23
17
  "myinstants",
@@ -34,20 +28,33 @@
34
28
  "url": "https://github.com/blacksagres/soundboard-downloader-cli/issues"
35
29
  },
36
30
  "homepage": "https://github.com/blacksagres/soundboard-downloader-cli#readme",
31
+ "files": [
32
+ "dist",
33
+ "README.md",
34
+ "LICENCE",
35
+ "package.json"
36
+ ],
37
37
  "devDependencies": {
38
+ "@types/node": "^25.0.0",
38
39
  "@types/jsdom": "^28.0.0",
39
40
  "@types/opener": "^1.4.3",
40
41
  "@types/prompts": "^2.4.9",
41
42
  "@vitest/coverage-v8": "^4.0.18",
42
43
  "ts-node": "^10.9.2",
43
- "typescript": "^5.9.3",
44
+ "typescript": "^6.0.2",
44
45
  "vitest": "^4.0.18"
45
46
  },
46
47
  "dependencies": {
47
- "jsdom": "^28.0.0",
48
+ "jsdom": "^29.1.1",
48
49
  "opener": "^1.5.2",
49
50
  "ora": "^9.3.0",
50
51
  "prompts": "^2.4.2",
51
52
  "valibot": "^1.2.0"
53
+ },
54
+ "scripts": {
55
+ "test": "vitest run --coverage",
56
+ "test:watch": "vitest --coverage",
57
+ "start": "ts-node ./src/main.ts",
58
+ "build": "tsc -p tsconfig.build.json"
52
59
  }
53
- }
60
+ }
@@ -1,14 +0,0 @@
1
- # To get started with Dependabot version updates, you'll need to specify which
2
- # package ecosystems to update and where the package manifests are located.
3
- # Please see the documentation for all configuration options:
4
- # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
-
6
- version: 2
7
- updates:
8
- - package-ecosystem: "npm" # See documentation for possible values
9
- directory: "/" # Location of package manifests
10
- labels:
11
- - "security"
12
- schedule:
13
- interval: "daily"
14
- target-branch: "main"
@@ -1,37 +0,0 @@
1
- name: 📦️ Publish to NPM
2
-
3
- on:
4
- push:
5
- tags:
6
- - "v*"
7
-
8
- permissions:
9
- id-token: write # Required for OIDC
10
- contents: read
11
-
12
- jobs:
13
- publish:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v4
17
-
18
- - uses: actions/setup-node@v4
19
- with:
20
- node-version: "24.14.0"
21
- registry-url: "https://registry.npmjs.org"
22
- - run: npm ci
23
- - run: npm run build --if-present
24
- - name: Check if version exists
25
- id: check_version
26
- run: |
27
- VERSION=$(node -p "require('./package.json').version")
28
- if npm view @purpleproser/soundboard-downloader-cli@$VERSION >/dev/null 2>&1; then
29
- echo "version_exists=true" >> $GITHUB_OUTPUT
30
- echo "Version $VERSION already exists in npm registry"
31
- else
32
- echo "version_exists=false" >> $GITHUB_OUTPUT
33
- echo "Version $VERSION does not exist in npm registry"
34
- fi
35
- - name: Publish to npm (only if version doesn't exist)
36
- if: steps.check_version.outputs.version_exists != 'true'
37
- run: npm publish --provenance
@@ -1,25 +0,0 @@
1
- name: ➡️ Release please
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- permissions:
9
- contents: write
10
- issues: write
11
- pull-requests: write
12
-
13
- jobs:
14
- release-please:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - uses: googleapis/release-please-action@v4
18
- with:
19
- # this assumes that you have created a personal access token
20
- # (PAT) and configured it as a GitHub action secret named
21
- # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
22
- token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
23
- # this is a built-in strategy in release-please, see "Action Inputs"
24
- # for more options
25
- release-type: node
@@ -1,29 +0,0 @@
1
- name: 🧪 Run Tests
2
-
3
- permissions:
4
- contents: read
5
-
6
- on:
7
- pull_request:
8
- branches: [main]
9
-
10
- jobs:
11
- test:
12
- name: Run tests
13
- runs-on: ubuntu-latest
14
-
15
- steps:
16
- - uses: actions/checkout@v4
17
-
18
- - uses: actions/setup-node@v4
19
- with:
20
- node-version: 24.14.0
21
- cache: "npm"
22
-
23
- - name: Install dependencies
24
- run: npm install
25
-
26
- - name: Run tests
27
- run: npm test -- --reporter=verbose
28
- env:
29
- NODE_OPTIONS: --max-old-space-size=4096
package/CHANGELOG.md DELETED
@@ -1,176 +0,0 @@
1
- # Changelog
2
-
3
- This changelog is automatically generated by [release-please](https://github.com/google-github-actions/release-please-action).
4
-
5
- ## [1.7.0](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.6.3...v1.7.0) (2026-03-10)
6
-
7
-
8
- ### Features
9
-
10
- * improve MyInstants compliance with rate limiting and legal updates\n\n- Add rate limiting to API requests (1s delay between calls)\n- Update package description to specify personal, non-commercial use\n- Add comprehensive compliance section to README\n- Create rate-limiter utility for reusable compliance\n\nThis improves compliance with MyInstants Terms of Use by:\n1. Adding delays between requests to avoid scraping appearance\n2. Explicitly stating non-commercial use limitations\n3. Educating users about responsible usage\n\nSigned-off-by: Mistral Vibe <vibe@mistral.ai>\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe <vibe@mistral.ai> ([d756529](https://github.com/blacksagres/soundboard-downloader-cli/commit/d75652972ff8fb7e56a2607bc11647edba506699))
11
-
12
- ## [1.6.3](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.6.2...v1.6.3) (2026-03-10)
13
-
14
-
15
- ### Bug Fixes
16
-
17
- * replace @inquirer/prompts with prompts ([366c79b](https://github.com/blacksagres/soundboard-downloader-cli/commit/366c79b6d842ca4de5da7ea843c15b66c10bddcf))
18
- * replace open with opener ([97ec29d](https://github.com/blacksagres/soundboard-downloader-cli/commit/97ec29d3cc487abad964fea89129a82e1424a6e5))
19
-
20
- ## [1.6.2](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.6.1...v1.6.2) (2026-03-07)
21
-
22
-
23
- ### Bug Fixes
24
-
25
- * add correct parameters for dependabot workflow ([f1737c1](https://github.com/blacksagres/soundboard-downloader-cli/commit/f1737c1ec83f67b68fd182e967fa7ffceaaf0194))
26
- * explicitely add read only permission to workflow ([3f17d79](https://github.com/blacksagres/soundboard-downloader-cli/commit/3f17d798c789f5e26e74282b60f8df6e49493918))
27
-
28
- ## [1.6.1](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.6.0...v1.6.1) (2026-03-07)
29
-
30
-
31
- ### Bug Fixes
32
-
33
- * run npm audit ([7dfe691](https://github.com/blacksagres/soundboard-downloader-cli/commit/7dfe69192dfe2aac1f407b3eb731fe15531334bb))
34
-
35
- ## [1.6.0](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.5.0...v1.6.0) (2026-03-01)
36
-
37
-
38
- ### Features
39
-
40
- * data validation with valibot ([1357286](https://github.com/blacksagres/soundboard-downloader-cli/commit/1357286c9c22153fccc6571f1b7dd1f554bbb057))
41
- * paginate search list to avoid blastinhg the myinstants page with requests ([439751c](https://github.com/blacksagres/soundboard-downloader-cli/commit/439751cb70d3586aae8d026db902932d41fc2a68))
42
- * restore single selection for sounds to keep UI clean ([c21895d](https://github.com/blacksagres/soundboard-downloader-cli/commit/c21895dcf373d55b1b87659371c5550d21773355))
43
-
44
-
45
- ### Bug Fixes
46
-
47
- * use a mock api for integration tests ([9f410df](https://github.com/blacksagres/soundboard-downloader-cli/commit/9f410dfa796bafc11dc49177667388a84e638e41))
48
-
49
- ## [1.5.0](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.4.0...v1.5.0) (2026-02-26)
50
-
51
-
52
- ### Features
53
-
54
- * download multiple files ([c2e257c](https://github.com/blacksagres/soundboard-downloader-cli/commit/c2e257cc6e9916679c86c902609fb328431cebbd))
55
-
56
- ## [1.4.0](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.3.0...v1.4.0) (2026-02-20)
57
-
58
-
59
- ### Features
60
-
61
- * add music note emoji to sound list for better UX ([7d6f12a](https://github.com/blacksagres/soundboard-downloader-cli/commit/7d6f12a12a46902e1d3bb261723094e8b1b470f9))
62
-
63
- ## [1.3.0](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.2.3...v1.3.0) (2026-02-20)
64
-
65
-
66
- ### Features
67
-
68
- * show total number of sounds found ([6b661df](https://github.com/blacksagres/soundboard-downloader-cli/commit/6b661dfd96f6e7a03289f7c7b153ca3dd345d6ab))
69
-
70
- ## [1.2.3](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.2.2...v1.2.3) (2026-02-20)
71
-
72
-
73
- ### Bug Fixes
74
-
75
- * prevent republishing existing versions ([#10](https://github.com/blacksagres/soundboard-downloader-cli/issues/10)) ([cf43fa6](https://github.com/blacksagres/soundboard-downloader-cli/commit/cf43fa611b2ac3b9b7700acfb23383deb33e7296))
76
-
77
- ## 1.0.0 (2026-02-20)
78
-
79
-
80
- ### Features
81
-
82
- * add new option to display url ([2e64f55](https://github.com/blacksagres/soundboard-downloader-cli/commit/2e64f55fab67f3a26db1698be374316e9132d4b0))
83
- * add npm provenance to publishing workflow ([7b467c1](https://github.com/blacksagres/soundboard-downloader-cli/commit/7b467c1c2d092b136988e5cf61a12df73efa429a))
84
- * display all results in terminal ([b3d7e20](https://github.com/blacksagres/soundboard-downloader-cli/commit/b3d7e2026eb9cedee3ad44ef47ab081d0c1f3510))
85
- * publish dist ([602b341](https://github.com/blacksagres/soundboard-downloader-cli/commit/602b341d1566f7a464d4da53498d4b5412113232))
86
- * **ui:** add a better commander ([fd2cd3f](https://github.com/blacksagres/soundboard-downloader-cli/commit/fd2cd3f5343a14ea94012dfbb204a7ca0a5e76e0))
87
-
88
-
89
- ### Bug Fixes
90
-
91
- * add correct release type to config ([fb86613](https://github.com/blacksagres/soundboard-downloader-cli/commit/fb866133e36a22ef9de04872449d967d42f5cc35))
92
- * add preinstall and postinstall to see if it works ([06eaf63](https://github.com/blacksagres/soundboard-downloader-cli/commit/06eaf637d5aa5233d88e9e5dfd5007d8e8104560))
93
- * add the correct url to the download link ([72d510d](https://github.com/blacksagres/soundboard-downloader-cli/commit/72d510d7515472aa0e3ca4a93f7c4afaf01cb6bf))
94
- * catch exit errors ([a9503e4](https://github.com/blacksagres/soundboard-downloader-cli/commit/a9503e4d1cfc5fa7ebcef009ed299b93806c8808))
95
- * configure trusted publisher in npm and adjust the publish file ([cf33842](https://github.com/blacksagres/soundboard-downloader-cli/commit/cf33842708df2d3075c1fa5ed1da440f9931557d))
96
- * handle potential undefined from file name generation ([de8233f](https://github.com/blacksagres/soundboard-downloader-cli/commit/de8233f8df39c053ae2f2ff2ce50a03c8b5593c5))
97
- * infinite install loop ([323f9ed](https://github.com/blacksagres/soundboard-downloader-cli/commit/323f9edf5033cd75a4e2f2b419af0267ba5ba6c3))
98
- * make vitest ignore files outside src ([d43ee2c](https://github.com/blacksagres/soundboard-downloader-cli/commit/d43ee2cf0ec027ba99d2668418be8770f65add78))
99
- * my big brain sorting that broke the links ([53cbc5b](https://github.com/blacksagres/soundboard-downloader-cli/commit/53cbc5b67cea0dffaf43d7740112826be5cf659c))
100
- * prevent shipping declaration files in the package ([e7c9d68](https://github.com/blacksagres/soundboard-downloader-cli/commit/e7c9d68c4427624d71d44177db6a98e7f6b7b1e7))
101
- * prevent test files from being added to build ([ac679ff](https://github.com/blacksagres/soundboard-downloader-cli/commit/ac679ffd4e0e7bc0500d7f302ba586b9a479f9e4))
102
- * prevent tests from running until fixed ([74142b8](https://github.com/blacksagres/soundboard-downloader-cli/commit/74142b8771959faa73efdc14d8b7c49d6f80a8e5))
103
- * remove need for temp folder ([8d7e2fa](https://github.com/blacksagres/soundboard-downloader-cli/commit/8d7e2faf1aa479a048d0cd7ad0623c686e82bd23))
104
- * remove prepare script ([737d7e4](https://github.com/blacksagres/soundboard-downloader-cli/commit/737d7e4d88cf49a211ec85705b1bf11ea37f5ff1))
105
- * unblock other workflows until I know what's wrong with the test ([8cb6d59](https://github.com/blacksagres/soundboard-downloader-cli/commit/8cb6d59050da184072480efac887b52b22caaf72))
106
- * use the correct yml file for publishing to npm ([8877330](https://github.com/blacksagres/soundboard-downloader-cli/commit/88773308eed96262d6a6994809ffc87fa92b5dd5))
107
-
108
- ## [1.2.2](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.2.1...v1.2.2) (2026-02-15)
109
-
110
-
111
- ### Bug Fixes
112
-
113
- * prevent tests from running until fixed ([2da9ad1](https://github.com/blacksagres/soundboard-downloader-cli/commit/2da9ad1e3616dddb4868babde7c39a97f92a2c30))
114
- * use the correct yml file for publishing to npm ([364cbb8](https://github.com/blacksagres/soundboard-downloader-cli/commit/364cbb8fe95456fb036d90a1a8bd014bccc7cea7))
115
-
116
- ## [1.2.1](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.2.0...v1.2.1) (2026-02-15)
117
-
118
-
119
- ### Bug Fixes
120
-
121
- * configure trusted publisher in npm and adjust the publish file ([8cbddce](https://github.com/blacksagres/soundboard-downloader-cli/commit/8cbddce0b6e80ce099bd848aef855d5e27abbc18))
122
-
123
- ## [1.2.0](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.1.1...v1.2.0) (2026-02-15)
124
-
125
-
126
- ### Features
127
-
128
- * add new option to display url ([51758d3](https://github.com/blacksagres/soundboard-downloader-cli/commit/51758d3c26602a649f5172a8dcb31981f5e7bc89))
129
-
130
-
131
- ### Bug Fixes
132
-
133
- * add correct release type to config ([737d1b9](https://github.com/blacksagres/soundboard-downloader-cli/commit/737d1b925ccaae715061a2023470e0f3d7534688))
134
- * handle potential undefined from file name generation ([484129f](https://github.com/blacksagres/soundboard-downloader-cli/commit/484129f79da05d56edee650c320fcc82cf81d042))
135
- * make vitest ignore files outside src ([7313579](https://github.com/blacksagres/soundboard-downloader-cli/commit/7313579f62f482bbd069da7de539f10697e2de83))
136
- * prevent shipping declaration files in the package ([fad7dc7](https://github.com/blacksagres/soundboard-downloader-cli/commit/fad7dc76c1b916a5becfa9677a486821b75c9792))
137
- * prevent test files from being added to build ([268b43f](https://github.com/blacksagres/soundboard-downloader-cli/commit/268b43fb788d7f9438b2473c4376349aa27e446b))
138
- * remove prepare script ([362e823](https://github.com/blacksagres/soundboard-downloader-cli/commit/362e823434f368bede87541d9fef3e70ca260343))
139
- * unblock other workflows until I know what's wrong with the test ([9f8c092](https://github.com/blacksagres/soundboard-downloader-cli/commit/9f8c092c6086cbbaaec087ae1de02dc47f5c954d))
140
-
141
- ## v1.0.1 (2024-02-14)
142
-
143
- ### Features
144
-
145
- - **download**: simplify download location to use current working directory
146
-
147
- ### Bug Fixes
148
-
149
- - **publish**: fix scoped package publishing with public access config
150
- - **deps**: remove unused @types/node dependency
151
-
152
- ### Documentation
153
-
154
- - **readme**: update with clear download location examples
155
- - **readme**: add npm scope vs GitHub username explanation
156
- - **changelog**: add comprehensive change tracking
157
- - **release**: add management guide for future releases
158
-
159
- ### Chores
160
-
161
- - **ci**: set up GitHub Actions for automated releases
162
- - **config**: add release-please workflow
163
-
164
- ## v1.0.0 (2024-02-14)
165
-
166
- ### Features(v1.0.0)
167
-
168
- - **core**: initial implementation with MyInstants API integration
169
- - **cli**: interactive interface with @inquirer/prompts
170
- - **download**: sound download with progress indicators
171
- - **playback**: browser playback option using open package
172
-
173
- ### Documentation(v1.0.0)
174
-
175
- - **readme**: initial setup and usage instructions
176
- - **license**: add MIT license file
package/src/api/README.md DELETED
@@ -1,128 +0,0 @@
1
- # API Mocking System
2
-
3
- This directory contains the API mocking system for the soundboard downloader CLI.
4
-
5
- ## Overview
6
-
7
- The mocking system allows you to switch between real API calls to myinstants.com and mock data for testing purposes. This is particularly useful for:
8
-
9
- - Running tests in CI environments (GitHub Actions, etc.)
10
- - Avoiding rate limiting issues
11
- - Having predictable test data
12
- - Faster test execution
13
- - Offline development
14
-
15
- ## Files
16
-
17
- - `api-config.ts` - Configuration system for switching between real and mock API
18
- - `my-instants.api.ts` - Main API layer with conditional mock support
19
- - `my-instants.api.mock.ts` - Mock implementation with predictable test data
20
-
21
- ## Usage
22
-
23
- ### In Tests
24
-
25
- ```typescript
26
- import { setApiMode } from "./api/api-config";
27
- import { getPaginatedResults, getAllResults } from "./service/my-instants.service";
28
-
29
- // Switch to mock mode before running tests
30
- beforeAll(() => {
31
- setApiMode("mock");
32
- });
33
-
34
- // Now all API calls will use mock data
35
- test("pagination works", async () => {
36
- const results = await getPaginatedResults("test", 1);
37
- // results will contain predictable mock data
38
- });
39
- ```
40
-
41
- ### In Development
42
-
43
- ```typescript
44
- import { setApiMode, getApiMode, isMockMode } from "./api/api-config";
45
-
46
- // Check current mode
47
- console.log(`Current mode: ${getApiMode()}`); // 'real' or 'mock'
48
- console.log(`Using mock: ${isMockMode()}`); // true or false
49
-
50
- // Switch modes
51
- setApiMode("mock"); // Use mock data
52
- setApiMode("real"); // Use real API
53
- ```
54
-
55
- ## Mock Data Structure
56
-
57
- The mock API provides predictable test data:
58
-
59
- - **14 total sounds** in the mock database
60
- - **6 sounds per page** for pagination
61
- - **Valid download URLs** for all sounds
62
- - **Consistent labels** (Wilhelm Scream, THX Deep Note, Test Sound 1-12)
63
-
64
- ### Example Mock Results
65
-
66
- **Pagination (Page 1):**
67
- ```json
68
- [
69
- {"label": "Wilhelm Scream", "download_url": "https://.../test-sound.mp3"},
70
- {"label": "THX Deep Note", "download_url": "https://.../test-sound.mp3"},
71
- {"label": "Test Sound 1", "download_url": "https://.../test-sound.mp3"},
72
- {"label": "Test Sound 2", "download_url": "https://.../test-sound.mp3"},
73
- {"label": "Test Sound 3", "download_url": "https://.../test-sound.mp3"},
74
- {"label": "Test Sound 4", "download_url": "https://.../test-sound.mp3"}
75
- ]
76
- ```
77
-
78
- **Fetch All:**
79
- - Returns all 14 sounds sorted alphabetically
80
- - Same structure as pagination results
81
-
82
- ## CI Integration
83
-
84
- The mock API is automatically used in CI environments. In your GitHub Actions workflow:
85
-
86
- ```yaml
87
- - name: Run tests
88
- run: npm test
89
- env:
90
- NODE_ENV: test
91
- ```
92
-
93
- The test file automatically detects CI environments and uses mock data.
94
-
95
- ## Benefits
96
-
97
- 1. **Reliability**: Tests don't depend on external API availability
98
- 2. **Speed**: Mock responses are instantaneous
99
- 3. **Predictability**: Always get the same test data
100
- 4. **No Rate Limiting**: Avoid GitHub Actions IP blocking
101
- 5. **Offline Testing**: Can run tests without internet connection
102
-
103
- ## Implementation Details
104
-
105
- The mock system works by:
106
-
107
- 1. **Intercepting API calls**: Each function in `my-instants.api.ts` checks `isMockMode()`
108
- 2. **Returning mock data**: If in mock mode, calls the corresponding mock function
109
- 3. **Maintaining interface**: Mock functions have the same signature as real functions
110
- 4. **HTML templates**: Mock functions return HTML strings that match the real site structure
111
-
112
- The mock HTML templates include the necessary DOM structure that the service layer expects to parse.
113
-
114
- ## Adding More Mock Data
115
-
116
- To add more test sounds, edit the `mockSounds` array in `my-instants.api.mock.ts`:
117
-
118
- ```typescript
119
- const mockSounds = [
120
- ...existingSounds,
121
- {
122
- label: "New Test Sound",
123
- detail_url: "/en/instant/new-test-sound/"
124
- }
125
- ];
126
- ```
127
-
128
- The system will automatically handle pagination based on the array length.
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig",
3
- "exclude": ["**/*.test.ts", "**/*.mock.ts", "vitest.config.ts"],
4
- "compilerOptions": {
5
- "declaration": false,
6
- "declarationMap": false
7
- }
8
- }
package/tsconfig.json DELETED
@@ -1,43 +0,0 @@
1
- {
2
- // Visit https://aka.ms/tsconfig to read more about this file
3
- "compilerOptions": {
4
- // File Layout
5
- "rootDir": "./src",
6
- "outDir": "./dist",
7
-
8
- // Environment Settings
9
- // See also https://aka.ms/tsconfig/module
10
- "module": "commonjs",
11
- "target": "esnext",
12
- // For nodejs:
13
- "lib": ["esnext"],
14
- "types": ["node"],
15
-
16
- // Other Outputs
17
- "sourceMap": true,
18
- "declaration": true,
19
- "declarationMap": true,
20
-
21
- // Stricter Typechecking Options
22
- "noUncheckedIndexedAccess": true,
23
- "exactOptionalPropertyTypes": true,
24
-
25
- // Style Options
26
- // "noImplicitReturns": true,
27
- // "noImplicitOverride": true,
28
- // "noUnusedLocals": true,
29
- // "noUnusedParameters": true,
30
- // "noFallthroughCasesInSwitch": true,
31
- // "noPropertyAccessFromIndexSignature": true,
32
-
33
- // Recommended Options
34
- "strict": true,
35
- "jsx": "react-jsx",
36
- "verbatimModuleSyntax": false,
37
- "isolatedModules": true,
38
- "noUncheckedSideEffectImports": true,
39
- "moduleDetection": "force",
40
- "skipLibCheck": true,
41
- "esModuleInterop": true
42
- }
43
- }
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig",
3
- "exclude": ["**/*.test.ts", "**/*.mock.ts", "vitest.config.ts"],
4
- "compilerOptions": {
5
- "declaration": false,
6
- "declarationMap": false
7
- }
8
- }
package/vite.config.js DELETED
@@ -1,13 +0,0 @@
1
- import { defineConfig } from "vitest/config";
2
-
3
- export default defineConfig({
4
- test: {
5
- exclude: ["**/node_modules/**", "**/dist/**", "./temp/**"],
6
- // Increase timeout for network tests
7
- testTimeout: 30000,
8
- // Retry failed tests (helpful for flaky network tests)
9
- retries: 1,
10
- // Show more detailed output
11
- verbose: true,
12
- },
13
- });
@@ -1,53 +0,0 @@
1
- Score report for "pkg:npm/@purpleproser/soundboard-downloader-cli" (use --json for raw and --markdown for formatted reports):
2
- {
3
- purl: 'pkg:npm/@purpleproser/soundboard-downloader-cli',
4
- self: {
5
- purl: 'npm/@purpleproser/soundboard-downloader-cli@1.6.3',
6
- score: {
7
- license: 100,
8
- maintenance: 93,
9
- overall: 73,
10
- quality: 100,
11
- supplyChain: 73,
12
- vulnerability: 100
13
- },
14
- capabilities: [ 'fs', 'net', 'url' ],
15
- alerts: [ [Object], [Object], [Object] ]
16
- },
17
- transitively: {
18
- dependencyCount: 67,
19
- func: 'min',
20
- score: {
21
- license: 100,
22
- maintenance: 75,
23
- overall: 65,
24
- quality: 65,
25
- supplyChain: 71,
26
- vulnerability: 100
27
- },
28
- lowest: {
29
- license: 'npm/prompts@2.4.2',
30
- maintenance: 'npm/symbol-tree@3.2.4',
31
- overall: 'npm/restore-cursor@5.1.0',
32
- quality: 'npm/restore-cursor@5.1.0',
33
- supplyChain: 'npm/undici@7.22.0',
34
- vulnerability: 'npm/prompts@2.4.2'
35
- },
36
- capabilities: [
37
- 'env', 'eval',
38
- 'fs', 'net',
39
- 'shell', 'unsafe',
40
- 'url'
41
- ],
42
- alerts: [
43
- [Object], [Object],
44
- [Object], [Object],
45
- [Object], [Object],
46
- [Object], [Object],
47
- [Object], [Object],
48
- [Object], [Object],
49
- [Object], [Object]
50
- ]
51
- }
52
- }
53
-