coh-content-db-homecoming 2.0.0-rc.8 → 2.0.0-rc.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coh-content-db-homecoming",
3
- "version": "2.0.0-rc.8",
3
+ "version": "2.0.0-rc.9",
4
4
  "description": "City of Heroes Homecoming Content Database",
5
5
  "homepage": "https://github.com/n15g/coh-content-db-homecoming#readme",
6
6
  "bugs": {
@@ -26,6 +26,7 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@rollup/plugin-json": "^6.1.0",
29
+ "@rollup/plugin-replace": "^6.0.2",
29
30
  "@stylistic/eslint-plugin": "^3.1.0",
30
31
  "@stylistic/eslint-plugin-ts": "^3.1.0",
31
32
  "@types/jest": "^29.5.14",
@@ -48,7 +49,7 @@
48
49
  "valid-url": "^1.0.9"
49
50
  },
50
51
  "dependencies": {
51
- "coh-content-db": "^2.0.0-rc.12"
52
+ "coh-content-db": "^2.0.0-rc.13"
52
53
  },
53
54
  "engines": {
54
55
  "node": ">=22"
package/rollup.config.mjs CHANGED
@@ -3,6 +3,8 @@ import { dts } from 'rollup-plugin-dts'
3
3
  import { writeFileSync } from 'node:fs'
4
4
  import path from 'node:path'
5
5
  import json from '@rollup/plugin-json'
6
+ import replace from '@rollup/plugin-replace'
7
+ import pkg from './package.json' with { type: 'json' }
6
8
 
7
9
  const name = 'coh-content-db-homecoming'
8
10
 
@@ -10,6 +12,13 @@ const name = 'coh-content-db-homecoming'
10
12
  export default [{
11
13
  input: 'src/main/ts/index.ts',
12
14
  plugins: [
15
+ replace({
16
+ preventAssignment: true,
17
+ values: {
18
+ __BUNDLE_VERSION__: JSON.stringify(pkg.version),
19
+ __BUNDLE_UPDATE_TIME__: JSON.stringify(new Date().toISOString()),
20
+ },
21
+ }),
13
22
  esbuild(), // TypeScript
14
23
  json(), // Reading version from package.json
15
24
  exportBundleJson(), // Exporting the bundle.json
@@ -0,0 +1,11 @@
1
+ /* eslint-disable unicorn/no-typeof-undefined */
2
+ declare const __BUNDLE_VERSION__: string | undefined
3
+ declare const __BUNDLE_UPDATE_TIME__: string | undefined
4
+
5
+ export const BUNDLE_VERSION = typeof __BUNDLE_VERSION__ === 'undefined'
6
+ ? 'DEV'
7
+ : __BUNDLE_VERSION__
8
+
9
+ export const BUNDLE_UPDATE_TIME = typeof __BUNDLE_UPDATE_TIME__ === 'undefined'
10
+ ? new Date().toISOString()
11
+ : __BUNDLE_UPDATE_TIME__
@@ -3,18 +3,19 @@ import { ZONES } from './zone/_zones'
3
3
  import { BADGES } from './badge/_badges'
4
4
  import { CONTACTS } from './contact/_contacts'
5
5
  import { MISSIONS } from './mission/_missions'
6
- import { BUNDLE_VERSION } from '../lint/utils/bundle-version'
6
+ import { BUNDLE_UPDATE_TIME, BUNDLE_VERSION } from '../lint/utils/rollup-replace'
7
7
 
8
8
  export const HOMECOMING: BundleData = {
9
9
  header: {
10
10
  name: 'Homecoming',
11
+ version: BUNDLE_VERSION,
12
+ lastUpdateTime: BUNDLE_UPDATE_TIME,
11
13
  description: 'Content data for the CoH: Homecoming server.',
12
14
  repositoryUrl: 'https://github.com/n15g/coh-content-db-homecoming',
13
15
  changelogUrl: 'https://github.com/n15g/coh-content-db-homecoming/blob/master/CHANGELOG.md',
14
16
  links: [
15
17
  { title: 'Homecoming Forums', href: 'https://forums.homecomingservers.com/' },
16
18
  ],
17
- version: BUNDLE_VERSION,
18
19
  },
19
20
  servers: ['Everlasting', 'Excelsior', 'Indomitable', 'Reunion', 'Torchbearer', 'Victory'],
20
21
  archetypes: [
@@ -1,3 +0,0 @@
1
- import pkg from '../../../../package.json'
2
-
3
- export const BUNDLE_VERSION = pkg.version