@purpleproser/soundboard-downloader-cli 1.2.2 → 1.3.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.
@@ -21,4 +21,17 @@ jobs:
21
21
  registry-url: "https://registry.npmjs.org"
22
22
  - run: npm ci
23
23
  - run: npm run build --if-present
24
- - run: npm publish
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
@@ -14,11 +14,13 @@ jobs:
14
14
 
15
15
  - uses: actions/setup-node@v4
16
16
  with:
17
- node-version: 20
17
+ node-version: 24
18
18
  cache: "npm"
19
19
 
20
20
  - name: Install dependencies
21
21
  run: npm install
22
22
 
23
23
  - name: Run tests
24
- run: npm test
24
+ run: npm test -- --reporter=verbose
25
+ env:
26
+ NODE_OPTIONS: --max-old-space-size=4096
package/CHANGELOG.md CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
  This changelog is automatically generated by [release-please](https://github.com/google-github-actions/release-please-action).
4
4
 
5
+ ## [1.3.0](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.2.3...v1.3.0) (2026-02-20)
6
+
7
+
8
+ ### Features
9
+
10
+ * show total number of sounds found ([6b661df](https://github.com/blacksagres/soundboard-downloader-cli/commit/6b661dfd96f6e7a03289f7c7b153ca3dd345d6ab))
11
+
12
+ ## [1.2.3](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.2.2...v1.2.3) (2026-02-20)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * prevent republishing existing versions ([#10](https://github.com/blacksagres/soundboard-downloader-cli/issues/10)) ([cf43fa6](https://github.com/blacksagres/soundboard-downloader-cli/commit/cf43fa611b2ac3b9b7700acfb23383deb33e7296))
18
+
19
+ ## 1.0.0 (2026-02-20)
20
+
21
+
22
+ ### Features
23
+
24
+ * add new option to display url ([2e64f55](https://github.com/blacksagres/soundboard-downloader-cli/commit/2e64f55fab67f3a26db1698be374316e9132d4b0))
25
+ * add npm provenance to publishing workflow ([7b467c1](https://github.com/blacksagres/soundboard-downloader-cli/commit/7b467c1c2d092b136988e5cf61a12df73efa429a))
26
+ * display all results in terminal ([b3d7e20](https://github.com/blacksagres/soundboard-downloader-cli/commit/b3d7e2026eb9cedee3ad44ef47ab081d0c1f3510))
27
+ * publish dist ([602b341](https://github.com/blacksagres/soundboard-downloader-cli/commit/602b341d1566f7a464d4da53498d4b5412113232))
28
+ * **ui:** add a better commander ([fd2cd3f](https://github.com/blacksagres/soundboard-downloader-cli/commit/fd2cd3f5343a14ea94012dfbb204a7ca0a5e76e0))
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * add correct release type to config ([fb86613](https://github.com/blacksagres/soundboard-downloader-cli/commit/fb866133e36a22ef9de04872449d967d42f5cc35))
34
+ * add preinstall and postinstall to see if it works ([06eaf63](https://github.com/blacksagres/soundboard-downloader-cli/commit/06eaf637d5aa5233d88e9e5dfd5007d8e8104560))
35
+ * add the correct url to the download link ([72d510d](https://github.com/blacksagres/soundboard-downloader-cli/commit/72d510d7515472aa0e3ca4a93f7c4afaf01cb6bf))
36
+ * catch exit errors ([a9503e4](https://github.com/blacksagres/soundboard-downloader-cli/commit/a9503e4d1cfc5fa7ebcef009ed299b93806c8808))
37
+ * configure trusted publisher in npm and adjust the publish file ([cf33842](https://github.com/blacksagres/soundboard-downloader-cli/commit/cf33842708df2d3075c1fa5ed1da440f9931557d))
38
+ * handle potential undefined from file name generation ([de8233f](https://github.com/blacksagres/soundboard-downloader-cli/commit/de8233f8df39c053ae2f2ff2ce50a03c8b5593c5))
39
+ * infinite install loop ([323f9ed](https://github.com/blacksagres/soundboard-downloader-cli/commit/323f9edf5033cd75a4e2f2b419af0267ba5ba6c3))
40
+ * make vitest ignore files outside src ([d43ee2c](https://github.com/blacksagres/soundboard-downloader-cli/commit/d43ee2cf0ec027ba99d2668418be8770f65add78))
41
+ * my big brain sorting that broke the links ([53cbc5b](https://github.com/blacksagres/soundboard-downloader-cli/commit/53cbc5b67cea0dffaf43d7740112826be5cf659c))
42
+ * prevent shipping declaration files in the package ([e7c9d68](https://github.com/blacksagres/soundboard-downloader-cli/commit/e7c9d68c4427624d71d44177db6a98e7f6b7b1e7))
43
+ * prevent test files from being added to build ([ac679ff](https://github.com/blacksagres/soundboard-downloader-cli/commit/ac679ffd4e0e7bc0500d7f302ba586b9a479f9e4))
44
+ * prevent tests from running until fixed ([74142b8](https://github.com/blacksagres/soundboard-downloader-cli/commit/74142b8771959faa73efdc14d8b7c49d6f80a8e5))
45
+ * remove need for temp folder ([8d7e2fa](https://github.com/blacksagres/soundboard-downloader-cli/commit/8d7e2faf1aa479a048d0cd7ad0623c686e82bd23))
46
+ * remove prepare script ([737d7e4](https://github.com/blacksagres/soundboard-downloader-cli/commit/737d7e4d88cf49a211ec85705b1bf11ea37f5ff1))
47
+ * unblock other workflows until I know what's wrong with the test ([8cb6d59](https://github.com/blacksagres/soundboard-downloader-cli/commit/8cb6d59050da184072480efac887b52b22caaf72))
48
+ * use the correct yml file for publishing to npm ([8877330](https://github.com/blacksagres/soundboard-downloader-cli/commit/88773308eed96262d6a6994809ffc87fa92b5dd5))
49
+
5
50
  ## [1.2.2](https://github.com/blacksagres/soundboard-downloader-cli/compare/v1.2.1...v1.2.2) (2026-02-15)
6
51
 
7
52
 
package/LICENCE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Geraldo dos Santos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A Node.js command-line tool to download soundboard sounds from [MyInstants](https://myinstants.com).
4
4
 
5
- **📦️ npm package**: `@purpleproser/soundboard-downloader-cli`
5
+ **📦️ npm package**: [`@purpleproser/soundboard-downloader-cli`](https://www.npmjs.com/package/@purpleproser/soundboard-downloader-cli)
6
6
 
7
7
  **GitHub Repository**: [blacksagres/soundboard-downloader-cli](https://github.com/blacksagres/soundboard-downloader-cli)
8
8
 
@@ -123,6 +123,7 @@ $ npm start
123
123
  ? (Use arrow keys)
124
124
  > Download
125
125
  Play
126
+ Show download URL (you can pipe this to other commands)
126
127
  ```
127
128
 
128
129
  ## Development
package/dist/main.js CHANGED
@@ -8,7 +8,7 @@ const open_1 = require("open");
8
8
  const file_downloader_service_1 = require("./service/file-downloader.service");
9
9
  process.on("uncaughtException", (error) => {
10
10
  if (error instanceof Error && error.name === "ExitPromptError") {
11
- console.log("👋 until next time!");
11
+ console.log("👋 see ya!");
12
12
  }
13
13
  else {
14
14
  // Rethrow unknown errors
@@ -17,7 +17,7 @@ process.on("uncaughtException", (error) => {
17
17
  });
18
18
  (async function () {
19
19
  const answer = await (0, prompts_1.input)({
20
- message: "What sound effects are you looking for?",
20
+ message: "🔍 What sound effects are you looking for?",
21
21
  required: true,
22
22
  default: "wilhelm scream",
23
23
  });
@@ -28,8 +28,9 @@ process.on("uncaughtException", (error) => {
28
28
  }).start();
29
29
  const sounds = await (0, my_instants_service_1.getSoundNodes)(answer);
30
30
  spinner.stop();
31
+ console.log(`🎉 Found ${sounds.length} sound${sounds.length !== 1 ? 's' : ''}!`);
31
32
  const selection = await (0, prompts_1.select)({
32
- message: "Which one to download? (use the keyboard arrows to navigate, search for something directly)",
33
+ message: "🎵 Which one to download? (use the keyboard arrows to navigate, search for something directly)",
33
34
  pageSize: 30,
34
35
  choices: sounds.map((sound) => ({
35
36
  name: sound.label,
@@ -42,15 +43,15 @@ process.on("uncaughtException", (error) => {
42
43
  }
43
44
  const actions = [
44
45
  {
45
- name: "Download",
46
+ name: "💾 Download",
46
47
  value: "action:download",
47
48
  },
48
49
  {
49
- name: "Play",
50
+ name: "▶️ Play",
50
51
  value: "action:play",
51
52
  },
52
53
  {
53
- name: "Show download URL (you can pipe this to other commands)",
54
+ name: "🔗 Show download URL (you can pipe this to other commands)",
54
55
  value: "action:show-url",
55
56
  },
56
57
  ];
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;AAEA,uEAA8D;AAC9D,6BAAsB;AACtB,+CAAkD;AAClD,+BAAwB;AACxB,+EAAiE;AAEjE,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,EAAE;IACxC,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAA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AAE;YACtC,QAAQ,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleproser/soundboard-downloader-cli",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Easily download sounds from myinstants.com using this interactive CLI tool",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/vite.config.js CHANGED
@@ -3,5 +3,11 @@ import { defineConfig } from "vitest/config";
3
3
  export default defineConfig({
4
4
  test: {
5
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,
6
12
  },
7
13
  });