bc-data 102.0.0 → 102.0.1

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/index.d.ts CHANGED
@@ -1,9 +1,24 @@
1
- import * as data from "./assetVersion.json";
1
+ import * as versions from "./assetVersion.json";
2
+ import * as ids from "./assetID.json";
3
+
4
+ type AssetName = string;
2
5
 
3
6
  /**
4
7
  * A record containing the BC version (starting from >R98) in which each asset was added.
5
8
  *
6
9
  * The record consists of asset group names, mapped to asset names, which in turn are mapped to their respective BC version.
7
10
  */
8
- declare const assetVersion: { readonly [k in keyof typeof data]: Readonly<Record<string, `R${number}`>> };
9
- export { assetVersion };
11
+ declare const assetVersion: { readonly [k in keyof typeof versions]: Readonly<Record<AssetName, `R${number}`>> };
12
+
13
+ /**
14
+ * A record containing group & asset IDs.
15
+ *
16
+ * IDs are integers within the `[0, 2**16)` interval; the combination of group- and asset-ID forming a unique identifier.
17
+ *
18
+ * For a particular group- or asset-name an ID is guaranteed to *never* change. This has the following implications:
19
+ * * The renaming of a group or asset will yield a new ID
20
+ * * The removal of a group or asset will preserve the ID; it may never be reused by another group/asset
21
+ */
22
+ declare const assetID: { readonly [k in keyof typeof ids]: { readonly id: number, readonly assets: Readonly<Record<AssetName, number>> } };
23
+
24
+ export { assetVersion, assetID };
package/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  import * as assetVersion from "./assetVersion.json";
2
- export { assetVersion };
2
+ import * as assetID from "./assetID.json";
3
+ export { assetVersion, assetID };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bc-data",
3
- "version": "102.0.0",
3
+ "version": "102.0.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/bananarama92/BC-stubs.git"
@@ -11,7 +11,8 @@
11
11
  "files": [
12
12
  "index.js",
13
13
  "index.d.ts",
14
- "assetVersion.json"
14
+ "assetVersion.json",
15
+ "assetID.json"
15
16
  ],
16
17
  "description": "Miscellaneous data extracted from BC",
17
18
  "bugs": {
@@ -19,8 +20,8 @@
19
20
  },
20
21
  "homepage": "https://github.com/bananarama92/BC-stubs/tree/main/bc_data#readme",
21
22
  "devDependencies": {
22
- "typescript": "^5.2.2",
23
- "@types/node": "^20.11.2",
23
+ "typescript": "^5.4.4",
24
+ "@types/node": "^20.12.4",
24
25
  "minimist": "^1.2.8",
25
26
  "@types/minimist": "^1.2.5"
26
27
  }