@screeps-arena-community/types 1.0.0 → 1.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/CHANGELOG.md CHANGED
@@ -5,12 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.1] - 2026-02-04
9
+
10
+ ### Fixed
11
+
12
+ - Fixed module resolution - types now work immediately after installation
13
+ - Added triple-slash references to load all ambient module declarations
14
+ - Removed unnecessary `exports` from package.json
15
+
16
+ ### Changed
17
+
18
+ - Simplified installation - no additional tsconfig paths configuration needed
19
+ - Updated documentation with clearer usage examples
20
+
8
21
  ## [1.0.0] - 2026-02-04
9
22
 
10
23
  ### Added
11
24
 
12
- - Initial release of @screeps-arena-community/types
13
- - Core game API types (game/\*)
25
+ - Initial release of @screeps-arena/types
26
+ - Core game API types (game/*)
14
27
  - Constants, prototypes, utils, path-finder, visual
15
28
  - All game objects: Creep, Structure, Tower, Spawn, etc.
16
29
  - Season 1 arena types
@@ -23,4 +36,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
36
  - Package exports for tree-shaking support
24
37
  - Full documentation and usage examples
25
38
 
26
- [1.0.0]: https://github.com/screeps-arena-community/types/releases/tag/v1.0.0
39
+ [1.0.1]: https://github.com/screeps-arena/types/compare/v1.0.0...v1.0.1
40
+ [1.0.0]: https://github.com/screeps-arena/types/releases/tag/v1.0.0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @screeps-arena-community/types
2
2
 
3
- Typescript types for the game [Screeps Arena](https://store.steampowered.com/app/1137320/Screeps_Arena) based on the official [Screeps Arena Docs](https://arena.screeps.com/docs).
3
+ TypeScript type definitions for [Screeps Arena](https://store.steampowered.com/app/1137320/Screeps_Arena/).
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@screeps-arena-community/types.svg)](https://www.npmjs.com/package/@screeps-arena-community/types)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -19,26 +19,14 @@ Add the package to your `tsconfig.json`:
19
19
  {
20
20
  "compilerOptions": {
21
21
  "types": ["@screeps-arena-community/types"],
22
- "moduleResolution": "node",
22
+ "moduleResolution": "bundler",
23
23
  "module": "ESNext",
24
24
  "target": "ES2020"
25
25
  }
26
26
  }
27
27
  ```
28
28
 
29
- For custom path mappings (optional):
30
-
31
- ```json
32
- {
33
- "compilerOptions": {
34
- "types": ["@screeps-arena-community/types"],
35
- "paths": {
36
- "game/*": ["node_modules/@screeps-arena-community/types/src/game/*"],
37
- "arena/*": ["node_modules/@screeps-arena-community/types/src/arena/*"]
38
- }
39
- }
40
- }
41
- ```
29
+ **That's it!** No additional configuration needed.
42
30
 
43
31
  ## Usage
44
32
 
@@ -47,9 +35,8 @@ For custom path mappings (optional):
47
35
  The core game API is available for all arena modes:
48
36
 
49
37
  ```typescript
50
- import { Creep, Structure } from 'game/prototypes'
51
- import { getObjectsByPrototype, getRange } from 'game/utils'
52
- import { searchPath } from 'game/path-finder'
38
+ import { Creep, Spawn } from 'game/prototypes'
39
+ import { getObjectsByPrototype } from 'game/utils'
53
40
  import { ATTACK, MOVE, HEAL } from 'game/constants'
54
41
 
55
42
  export function loop() {
@@ -58,6 +45,8 @@ export function loop() {
58
45
  }
59
46
  ```
60
47
 
48
+ **Note:** Import from module paths (e.g., `"game/prototypes"`), not from the npm package directly.
49
+
61
50
  ### Season-Specific Types
62
51
 
63
52
  Import types specific to your arena mode:
@@ -118,7 +107,7 @@ export function loop() {
118
107
  ## Package Structure
119
108
 
120
109
  ```
121
- @screeps-arena/types/
110
+ @screeps-arena-community/types/
122
111
  ├── src/
123
112
  │ ├── index.d.ts # Main entry (core game types)
124
113
  │ ├── game/ # Core game API
package/package.json CHANGED
@@ -1,22 +1,9 @@
1
- {
1
+ {
2
2
  "name": "@screeps-arena-community/types",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "TypeScript type definitions for Screeps Arena",
5
5
  "main": "src/index.d.ts",
6
6
  "types": "src/index.d.ts",
7
- "exports": {
8
- ".": "./src/index.d.ts",
9
- "./game": "./src/game/index.d.ts",
10
- "./game/*": "./src/game/*.d.ts",
11
- "./arena/season_1/construct_and_control": "./src/arena/season_1/construct_and_control/index.d.ts",
12
- "./arena/season_1/construct_and_control/*": "./src/arena/season_1/construct_and_control/*.d.ts",
13
- "./arena/season_1/portal_exploration": "./src/arena/season_1/portal_exploration/index.d.ts",
14
- "./arena/season_1/portal_exploration/*": "./src/arena/season_1/portal_exploration/*.d.ts",
15
- "./arena/season_2/capture_the_flag": "./src/arena/season_2/capture_the_flag/index.d.ts",
16
- "./arena/season_2/capture_the_flag/*": "./src/arena/season_2/capture_the_flag/*.d.ts",
17
- "./arena/season_2/power_split": "./src/arena/season_2/power_split/index.d.ts",
18
- "./arena/season_2/power_split/*": "./src/arena/season_2/power_split/*.d.ts"
19
- },
20
7
  "files": [
21
8
  "src/**/*.d.ts",
22
9
  "README.md",
package/src/index.d.ts CHANGED
@@ -1,8 +1,54 @@
1
1
  /**
2
- * Screeps Arena - Core Game API Types
2
+ * Screeps Arena - TypeScript Type Definitions
3
3
  * @packageDocumentation
4
- * @version 1.0.0
4
+ * @version 1.0.1
5
5
  * @see https://docs.screeps.com/arena/
6
6
  */
7
7
 
8
- export * from 'game'
8
+ // Core game API
9
+ /// <reference path="./game/constants.d.ts" />
10
+ /// <reference path="./game/utils.d.ts" />
11
+ /// <reference path="./game/path-finder.d.ts" />
12
+ /// <reference path="./game/visual.d.ts" />
13
+
14
+ // Game prototypes
15
+ /// <reference path="./game/prototypes/game-object.d.ts" />
16
+ /// <reference path="./game/prototypes/structure.d.ts" />
17
+ /// <reference path="./game/prototypes/owned-structure.d.ts" />
18
+ /// <reference path="./game/prototypes/creep.d.ts" />
19
+ /// <reference path="./game/prototypes/spawn.d.ts" />
20
+ /// <reference path="./game/prototypes/tower.d.ts" />
21
+ /// <reference path="./game/prototypes/wall.d.ts" />
22
+ /// <reference path="./game/prototypes/rampart.d.ts" />
23
+ /// <reference path="./game/prototypes/container.d.ts" />
24
+ /// <reference path="./game/prototypes/extension.d.ts" />
25
+ /// <reference path="./game/prototypes/road.d.ts" />
26
+ /// <reference path="./game/prototypes/source.d.ts" />
27
+ /// <reference path="./game/prototypes/resource.d.ts" />
28
+ /// <reference path="./game/prototypes/construction-site.d.ts" />
29
+ /// <reference path="./game/prototypes/flag.d.ts" />
30
+ /// <reference path="./game/prototypes/store.d.ts" />
31
+ /// <reference path="./game/prototypes/index.d.ts" />
32
+ /// <reference path="./game/index.d.ts" />
33
+
34
+ // Season 1: Construct and Control
35
+ /// <reference path="./arena/season_1/construct_and_control/basic/constants.d.ts" />
36
+ /// <reference path="./arena/season_1/construct_and_control/basic/prototypes/area-effect.d.ts" />
37
+ /// <reference path="./arena/season_1/construct_and_control/basic/prototypes/construction-boost.d.ts" />
38
+ /// <reference path="./arena/season_1/construct_and_control/basic/prototypes/structure-goal.d.ts" />
39
+ /// <reference path="./arena/season_1/construct_and_control/basic/basic.d.ts" />
40
+
41
+ // Season 1: Portal Exploration
42
+ /// <reference path="./arena/season_1/portal_exploration/basic/prototypes/portal.d.ts" />
43
+ /// <reference path="./arena/season_1/portal_exploration/basic/basic.d.ts" />
44
+
45
+ // Season 2: Capture the Flag
46
+ /// <reference path="./arena/season_2/capture_the_flag/basic/prototypes/body-part.d.ts" />
47
+ /// <reference path="./arena/season_2/capture_the_flag/basic.d.ts" />
48
+
49
+ // Season 2: Power Split
50
+ /// <reference path="./arena/season_2/power_split/basic/prototypes/bonus-flag.d.ts" />
51
+ /// <reference path="./arena/season_2/power_split/basic/basic.d.ts" />
52
+
53
+ // This file loads all ambient module declarations
54
+ // Users can now import: import { Creep } from "game/prototypes";