@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 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. It overwrites
32
- `src/data/generated.json` in your working tree**do not commit that
33
- change**; the regenerated file only matters for the package you're about to
34
- build/publish from your current checkout. `src/data/generated.json` is
35
- tracked as an empty placeholder (`{"sources":[],"drops":{}}`) so the package
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
- ## Publishing
42
-
43
- Handled automatically by `.github/workflows/osrs-drops-sdk.yml` whenever this
44
- folder changes, every Wednesday at 12:00 UTC, or via manual dispatch.
45
-
46
- The version is derived from [Conventional Commits](https://www.conventionalcommits.org)
47
- touching this path since the last `vX.Y.Z-osrs-drops-sdk` tag: a `feat:` bumps
48
- minor, a `!` suffix or `BREAKING CHANGE` footer bumps major, anything else
49
- (`fix:`, `chore:`, ...) bumps patch. A scheduled/manual run with no new
50
- commits still ships a patch release so the weekly wiki/WOM re-scrape goes
51
- out. The workflow runs `generate` + `build` + `pnpm publish` to the public
52
- npm registry (`@clan-europe` scope), then commits the bumped
53
- `package.json` back to the repo (`chore(osrs-drops-sdk): release vX.Y.Z
54
- [skip ci]`) and tags it `vX.Y.Z-osrs-drops-sdk`. Only that commit's
55
- `package.json` and the published tarball reflect a given release — the
56
- scraped data itself is never committed.
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. To get real data locally:
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.
@@ -1,7 +1,7 @@
1
1
  //#endregion
2
2
  //#region src/index.ts
3
3
  var e = {
4
- generatedAt: "2026-09-09T12:16:55.334Z",
4
+ generatedAt: "2026-09-09T13:01:18.467Z",
5
5
  sources: [
6
6
  {
7
7
  slug: "abyssal_sire",
package/package.json CHANGED
@@ -1,36 +1,37 @@
1
1
  {
2
- "name": "@clan-europe/osrs-drops-sdk",
3
- "version": "0.0.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
- "devDependencies": {
24
- "@types/node": "^22.10.2",
25
- "@wise-old-man/utils": "^4.0.22",
26
- "tsx": "^4.23.13",
27
- "typescript": "^6.0.2",
28
- "vite": "^8.0.0",
29
- "vite-plugin-dts": "^4.5.4"
30
- },
31
- "scripts": {
32
- "generate": "tsx src/generate.ts",
33
- "build": "vite build",
34
- "typecheck": "tsc --noEmit"
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
+ }