@clan-europe/osrs-drops-sdk 0.0.0 → 0.1.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/README.md +32 -27
- package/dist/osrs-drops-sdk.js +1 -1
- package/package.json +36 -35
package/README.md
CHANGED
|
@@ -28,43 +28,48 @@ pnpm build # bundles src/index.ts (+ the freshly generated data) into dist/
|
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
`pnpm generate` hits the network (Wise Old Man + the OSRS Wiki) and takes a
|
|
31
|
-
couple of minutes for the full set of ~70 sources.
|
|
32
|
-
`src/data/generated.json`
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
always type-checks and builds even without running `generate` first.
|
|
31
|
+
couple of minutes for the full set of ~70 sources. Unlike most generated
|
|
32
|
+
files, `src/data/generated.json` **is** committed to the repo — see
|
|
33
|
+
"Generating & publishing" below for how and when that happens in CI. If
|
|
34
|
+
you're just testing locally, feel free to regenerate freely; only commit the
|
|
35
|
+
result yourself if you specifically mean to trigger a data-refresh release.
|
|
37
36
|
|
|
38
37
|
An optional `WOM_API_KEY` environment variable raises Wise Old Man rate
|
|
39
38
|
limits; the generator works fine without it.
|
|
40
39
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
[
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
## Generating & publishing
|
|
41
|
+
|
|
42
|
+
Two separate workflows:
|
|
43
|
+
|
|
44
|
+
- **`.github/workflows/osrs-drops-sdk-generate.yml`** — runs `generate` every
|
|
45
|
+
Wednesday at 12:00 UTC (or via manual dispatch). If the result is
|
|
46
|
+
meaningfully different from what's committed (ignoring the `generatedAt`
|
|
47
|
+
timestamp, which always changes), it commits `src/data/generated.json`
|
|
48
|
+
with `feat(osrs-drops-sdk): refresh generated drop data` and pushes. No
|
|
49
|
+
meaningful change -> no commit, no downstream publish.
|
|
50
|
+
- **`.github/workflows/osrs-drops-sdk.yml`** — triggered by any push under
|
|
51
|
+
this folder (including the generate workflow's commit above) or manual
|
|
52
|
+
dispatch. Derives the next version from
|
|
53
|
+
[Conventional Commits](https://www.conventionalcommits.org) touching this
|
|
54
|
+
path since the last `vX.Y.Z-osrs-drops-sdk` tag: `feat:` bumps minor (this
|
|
55
|
+
is why the data-refresh commit uses that prefix), a `!` suffix or
|
|
56
|
+
`BREAKING CHANGE` footer bumps major, anything else (`fix:`, `chore:`, ...)
|
|
57
|
+
bumps patch. No relevant commits since the last tag -> nothing to publish.
|
|
58
|
+
Otherwise it builds whatever is currently committed and runs
|
|
59
|
+
`pnpm publish` to the public npm registry (`@clan-europe` scope), then
|
|
60
|
+
commits the bumped `package.json` back to the repo
|
|
61
|
+
(`chore(osrs-drops-sdk): release vX.Y.Z [skip ci]`) and tags it
|
|
62
|
+
`vX.Y.Z-osrs-drops-sdk`.
|
|
57
63
|
|
|
58
64
|
## Consuming inside this monorepo
|
|
59
65
|
|
|
60
66
|
`apps/website` depends on this package via `workspace:*`, so it always uses
|
|
61
|
-
whatever is currently built in `dist/` here.
|
|
67
|
+
whatever is currently built in `dist/` here. `src/data/generated.json` is
|
|
68
|
+
committed with real data (refreshed weekly by the generate workflow above),
|
|
69
|
+
so a plain `pnpm build` already produces a real package. To force a fresh
|
|
70
|
+
scrape locally instead:
|
|
62
71
|
|
|
63
72
|
```bash
|
|
64
73
|
pnpm --filter @clan-europe/osrs-drops-sdk generate
|
|
65
74
|
pnpm --filter @clan-europe/osrs-drops-sdk build
|
|
66
75
|
```
|
|
67
|
-
|
|
68
|
-
Without running `generate` first, the website will build and run fine
|
|
69
|
-
against the empty placeholder — sources/drops just render as empty/
|
|
70
|
-
unavailable, matching the UI's existing graceful-fallback states.
|
package/dist/osrs-drops-sdk.js
CHANGED
package/package.json
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
2
|
+
"name": "@clan-europe/osrs-drops-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Pre-generated SDK of OSRS boss/raid EHB rates and notable drop items with their probabilities, scraped from the Wise Old Man API and OSRS Wiki — so consumers never scrape live.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/osrs-drops-sdk.js",
|
|
8
|
+
"module": "./dist/osrs-drops-sdk.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/osrs-drops-sdk.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public",
|
|
21
|
+
"registry": "https://registry.npmjs.org/"
|
|
22
|
+
},
|
|
23
|
+
"packageManager": "pnpm@10.13.1",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"generate": "tsx src/generate.ts",
|
|
26
|
+
"build": "vite build",
|
|
27
|
+
"typecheck": "tsc --noEmit"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^22.10.2",
|
|
31
|
+
"@wise-old-man/utils": "^4.0.22",
|
|
32
|
+
"tsx": "^4.23.13",
|
|
33
|
+
"typescript": "^6.0.2",
|
|
34
|
+
"vite": "^8.0.0",
|
|
35
|
+
"vite-plugin-dts": "^4.5.4"
|
|
36
|
+
}
|
|
37
|
+
}
|