speedruncom.js 2.0.6 → 2.0.8

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.
@@ -1,30 +1,26 @@
1
- name: Publish
2
-
3
1
  on:
4
2
  push:
5
- branches:
6
- - main
7
- workflow_dispatch:
3
+ tags:
4
+ - 'v*'
8
5
 
6
+ permissions:
7
+ id-token: write
8
+ contents: read
9
+
9
10
  jobs:
10
11
  publish:
11
- name: Publish Package
12
12
  runs-on: ubuntu-latest
13
-
13
+ permissions:
14
+ contents: read
15
+ id-token: write
14
16
  steps:
15
- - name: Checkout code
16
- uses: actions/checkout@v3
17
-
18
- - name: Use Node.js
19
- uses: actions/setup-node@v4
17
+ - uses: actions/checkout@v4
18
+ - uses: oven-sh/setup-bun@v2
20
19
  with:
21
- node-version: 18
22
- registry-url: https://registry.npmjs.org/
23
-
24
- - name: Install dependencies
25
- run: npm ci
26
-
27
- - name: Publish to npm
28
- run: npm publish
29
- env:
30
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
20
+ bun-version: latest
21
+ - run: bun i --frozen-lockfile
22
+ - run: bun run build
23
+ - uses: actions/setup-node@v4
24
+ with:
25
+ node-version: latest
26
+ - uses: JS-DevTools/npm-publish@v4
package/README.md CHANGED
@@ -1,13 +1,5 @@
1
- # About
1
+ # speedruncom.js
2
2
 
3
3
  Speedrun.com has two API versions. Version 1 is officially documented, REST, public and directly exposed to users. Version 2 is a pre-production RPC API designed only for internal use of site functions, and is much more complicated and less user-friendly, especially regarding authentication and browser CORS.
4
4
 
5
- Version 1 is mainly read-only, and when it isn't read only it may just be broken. If you want to use any of the modern features of the site now, you'll use version 2. This is a NodeJS wrapper for Speedrun API version 2, with parameters and responses all documented in TypeScript and JSDoc.
6
-
7
- This module isn't intended to give any helper functions to the user; it's more of an index of the params and responses of the site endpoints, to be used for type checking on a more user-friendly module.
8
-
9
- # Usage
10
-
11
- **`npm i speedruncom.js`**
12
-
13
- `Client` is the default export, and enums and interfaces are the named exports for TypeScript users.
5
+ Version 1 is mainly read-only, and when it isn't read only it may just be broken. If you want to use any of the modern features of the site now, you'll use version 2. This package consists of types that make up this undocumented api, and a small utility for calling GET and POST.
package/bun.lock ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "configVersion": 0,
4
+ "workspaces": {
5
+ "": {
6
+ "name": "speedruncom.js",
7
+ "devDependencies": {
8
+ "@types/node": "^25.9.3",
9
+ "typescript": "^6.0.3",
10
+ },
11
+ },
12
+ },
13
+ "packages": {
14
+ "@types/node": ["@types/node@25.9.3", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg=="],
15
+
16
+ "typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="],
17
+
18
+ "undici-types": ["undici-types@7.24.6", "", {}, "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg=="],
19
+ }
20
+ }
@@ -391,6 +391,11 @@ export default interface POSTEndpoints {
391
391
  verified?: Enums.RunStatus;
392
392
  verifiedById?: string;
393
393
  videoState?: Enums.VideoState;
394
+ /**
395
+ * The maximum amount of moderation runs per page.
396
+ *
397
+ * @max 100
398
+ */
394
399
  limit: number;
395
400
  page: number;
396
401
  };
@@ -1,4 +1,3 @@
1
1
  export * from './enums.js';
2
2
  export * from './interfaces.js';
3
- import Client from './Client.js';
4
- export default Client;
3
+ export * from './requests.js';
@@ -1,4 +1,3 @@
1
1
  export * from './enums.js';
2
2
  export * from './interfaces.js';
3
- import Client from './Client.js';
4
- export default Client;
3
+ export * from './requests.js';