steamworks-ffi-node 0.6.10 → 0.7.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/README.md +157 -107
- package/dist/internal/SteamCloudManager.d.ts +86 -1
- package/dist/internal/SteamCloudManager.d.ts.map +1 -1
- package/dist/internal/SteamCloudManager.js +142 -0
- package/dist/internal/SteamCloudManager.js.map +1 -1
- package/dist/internal/SteamInputManager.d.ts +496 -0
- package/dist/internal/SteamInputManager.d.ts.map +1 -0
- package/dist/internal/SteamInputManager.js +993 -0
- package/dist/internal/SteamInputManager.js.map +1 -0
- package/dist/internal/SteamLibraryLoader.d.ts +61 -0
- package/dist/internal/SteamLibraryLoader.d.ts.map +1 -1
- package/dist/internal/SteamLibraryLoader.js +83 -0
- package/dist/internal/SteamLibraryLoader.js.map +1 -1
- package/dist/internal/SteamScreenshotManager.d.ts +327 -0
- package/dist/internal/SteamScreenshotManager.d.ts.map +1 -0
- package/dist/internal/SteamScreenshotManager.js +459 -0
- package/dist/internal/SteamScreenshotManager.js.map +1 -0
- package/dist/internal/SteamWorkshopManager.d.ts +24 -0
- package/dist/internal/SteamWorkshopManager.d.ts.map +1 -1
- package/dist/internal/SteamWorkshopManager.js +74 -0
- package/dist/internal/SteamWorkshopManager.js.map +1 -1
- package/dist/internal/callbackTypes/SteamCallbackIds.d.ts +2 -0
- package/dist/internal/callbackTypes/SteamCallbackIds.d.ts.map +1 -1
- package/dist/internal/callbackTypes/SteamCallbackIds.js +3 -1
- package/dist/internal/callbackTypes/SteamCallbackIds.js.map +1 -1
- package/dist/internal/callbackTypes/SteamCallbackTypes.d.ts +9 -0
- package/dist/internal/callbackTypes/SteamCallbackTypes.d.ts.map +1 -1
- package/dist/steam.d.ts +99 -0
- package/dist/steam.d.ts.map +1 -1
- package/dist/steam.js +9 -0
- package/dist/steam.js.map +1 -1
- package/dist/types/cloud.d.ts +11 -11
- package/dist/types/cloud.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/input.d.ts +252 -0
- package/dist/types/input.d.ts.map +1 -0
- package/dist/types/input.js +142 -0
- package/dist/types/input.js.map +1 -0
- package/dist/types/screenshots.d.ts +63 -0
- package/dist/types/screenshots.d.ts.map +1 -0
- package/dist/types/screenshots.js +44 -0
- package/dist/types/screenshots.js.map +1 -0
- package/dist/types/workshop.d.ts +8 -0
- package/dist/types/workshop.d.ts.map +1 -1
- package/dist/types/workshop.js.map +1 -1
- package/docs/README.md +49 -5
- package/package.json +10 -2
package/docs/README.md
CHANGED
|
@@ -14,16 +14,19 @@ steam.init({ appId: 480 });
|
|
|
14
14
|
|
|
15
15
|
// Access features through specialized managers
|
|
16
16
|
steam.achievements.* // Achievement operations
|
|
17
|
-
steam.stats.* // Statistics operations
|
|
17
|
+
steam.stats.* // Statistics operations
|
|
18
18
|
steam.leaderboards.* // Leaderboard operations
|
|
19
19
|
steam.friends.* // Friends and social operations
|
|
20
20
|
steam.richPresence.* // Rich Presence operations
|
|
21
21
|
steam.overlay.* // Overlay control operations
|
|
22
22
|
steam.cloud.* // Cloud storage operations
|
|
23
23
|
steam.workshop.* // Workshop/UGC operations
|
|
24
|
+
steam.input.* // Controller input operations
|
|
25
|
+
steam.screenshots.* // Screenshots operations
|
|
24
26
|
```
|
|
25
27
|
|
|
26
28
|
This design:
|
|
29
|
+
|
|
27
30
|
- ✅ **Groups related functions** - Easy to discover all achievement/stats/leaderboard methods
|
|
28
31
|
- ✅ **Clear namespacing** - No naming conflicts
|
|
29
32
|
- ✅ **Better IDE support** - Autocomplete shows relevant methods
|
|
@@ -34,6 +37,7 @@ This design:
|
|
|
34
37
|
## 📚 Available Documentation
|
|
35
38
|
|
|
36
39
|
### Core API
|
|
40
|
+
|
|
37
41
|
- **[SteamAPICore Documentation](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/STEAM_API_CORE.md)**
|
|
38
42
|
- Initialization and lifecycle management
|
|
39
43
|
- Steam callbacks and event handling
|
|
@@ -41,6 +45,7 @@ This design:
|
|
|
41
45
|
- Platform-specific library loading
|
|
42
46
|
|
|
43
47
|
### Achievement System
|
|
48
|
+
|
|
44
49
|
- **[Achievement Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/ACHIEVEMENT_MANAGER.md)**
|
|
45
50
|
- **20 Functions** - 100% Achievement API coverage
|
|
46
51
|
- Core operations (get, unlock, clear, check status)
|
|
@@ -51,6 +56,7 @@ This design:
|
|
|
51
56
|
- Testing tools (reset stats/achievements)
|
|
52
57
|
|
|
53
58
|
### Statistics System
|
|
59
|
+
|
|
54
60
|
- **[Stats Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/STATS_MANAGER.md)**
|
|
55
61
|
- **14 Functions** - 100% Stats API coverage
|
|
56
62
|
- User stats (get/set int/float, average rate tracking)
|
|
@@ -58,6 +64,7 @@ This design:
|
|
|
58
64
|
- Global statistics (worldwide aggregated data with history)
|
|
59
65
|
|
|
60
66
|
### Leaderboard System
|
|
67
|
+
|
|
61
68
|
- **[Leaderboard Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/LEADERBOARD_MANAGER.md)**
|
|
62
69
|
- **7 Functions** - 100% Leaderboard API coverage
|
|
63
70
|
- Leaderboard management (find, create, get info)
|
|
@@ -66,6 +73,7 @@ This design:
|
|
|
66
73
|
- UGC integration (attach replays/screenshots to entries)
|
|
67
74
|
|
|
68
75
|
### Friends & Social System
|
|
76
|
+
|
|
69
77
|
- **[Friends Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/FRIENDS_MANAGER.md)**
|
|
70
78
|
- **22 Functions** - Complete friends and social features
|
|
71
79
|
- Current user info (get persona name, online status)
|
|
@@ -77,6 +85,7 @@ This design:
|
|
|
77
85
|
- Coplay tracking (recently played with users)
|
|
78
86
|
|
|
79
87
|
### Rich Presence System
|
|
88
|
+
|
|
80
89
|
- **[Rich Presence Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/RICH_PRESENCE_MANAGER.md)**
|
|
81
90
|
- **6 Functions** - Complete Rich Presence support
|
|
82
91
|
- Set/clear rich presence key/value pairs
|
|
@@ -86,6 +95,7 @@ This design:
|
|
|
86
95
|
- Player groups and localization support
|
|
87
96
|
|
|
88
97
|
### Overlay System
|
|
98
|
+
|
|
89
99
|
- **[Overlay Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/OVERLAY_MANAGER.md)**
|
|
90
100
|
- **7 Functions** - Complete overlay control
|
|
91
101
|
- Open overlay to various dialogs (friends, achievements, etc.)
|
|
@@ -95,26 +105,54 @@ This design:
|
|
|
95
105
|
- Show invite dialogs for multiplayer
|
|
96
106
|
|
|
97
107
|
### Cloud Storage System
|
|
108
|
+
|
|
98
109
|
- **[Cloud Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/CLOUD_MANAGER.md)**
|
|
99
|
-
- **
|
|
110
|
+
- **17 Functions** - Complete Steam Cloud (Remote Storage) support
|
|
100
111
|
- File operations (write, read, delete, check existence)
|
|
101
112
|
- File metadata (size, timestamp, persistence status)
|
|
102
113
|
- File listing (count, iterate, get all with details)
|
|
103
114
|
- Quota management (track storage usage and limits)
|
|
104
115
|
- Cloud settings (check/toggle cloud sync for account and app)
|
|
116
|
+
- Batch writes (atomic multi-file operations)
|
|
105
117
|
|
|
106
118
|
### Workshop System
|
|
119
|
+
|
|
107
120
|
- **[Workshop Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/WORKSHOP_MANAGER.md)**
|
|
108
|
-
- **
|
|
121
|
+
- **30 Functions** - Complete Steam Workshop/UGC support
|
|
109
122
|
- Subscription management (subscribe, unsubscribe, list items)
|
|
110
123
|
- Item state & information (download progress, installation info)
|
|
111
124
|
- Query operations (text search, browse, filter Workshop content)
|
|
112
125
|
- Item creation & update (create, upload, manage your Workshop items)
|
|
113
126
|
- Voting & favorites (vote on items, manage favorites)
|
|
127
|
+
- Item deletion (permanently delete your Workshop items)
|
|
128
|
+
|
|
129
|
+
### Input System
|
|
130
|
+
|
|
131
|
+
- **[Input Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/INPUT_MANAGER.md)**
|
|
132
|
+
- **35+ Functions** - Complete Steam Input (controller) support
|
|
133
|
+
- Controller detection (Xbox, PlayStation, Switch, Steam Controller, Steam Deck)
|
|
134
|
+
- Action sets and layers (menu controls, gameplay controls, etc.)
|
|
135
|
+
- Digital actions (buttons) and analog actions (sticks/triggers)
|
|
136
|
+
- Motion data (gyro, accelerometer for supported controllers)
|
|
137
|
+
- Haptics (vibration, LED control for DualShock/DualSense)
|
|
138
|
+
- ⚠️ **Tested with virtual gamepad only** - not yet tested in production projects
|
|
139
|
+
|
|
140
|
+
### Screenshots System
|
|
141
|
+
|
|
142
|
+
- **[Screenshot Manager API](https://github.com/ArtyProf/steamworks-ffi-node/blob/main/docs/SCREENSHOT_MANAGER.md)**
|
|
143
|
+
- **9 Functions** - Complete Steam Screenshots support
|
|
144
|
+
- Screenshot capture (programmatic and user-triggered)
|
|
145
|
+
- Add existing images to Steam library (from files or raw RGB data)
|
|
146
|
+
- Location tagging (geotag screenshots with location names)
|
|
147
|
+
- User tagging (tag friends who appear in screenshots)
|
|
148
|
+
- Workshop integration (link screenshots to published items)
|
|
149
|
+
- Screenshot hooks (intercept F12 to handle screenshots yourself)
|
|
150
|
+
- VR screenshot support (side-by-side and cubemap formats)
|
|
114
151
|
|
|
115
152
|
## 🚀 Quick Links
|
|
116
153
|
|
|
117
154
|
### Getting Started
|
|
155
|
+
|
|
118
156
|
- [Installation Guide](https://github.com/ArtyProf/steamworks-ffi-node#installation)
|
|
119
157
|
- [Quick Start Examples](https://github.com/ArtyProf/steamworks-ffi-node#quick-start)
|
|
120
158
|
- [Electron Integration](https://github.com/ArtyProf/steamworks-ffi-node#electron-integration)
|
|
@@ -122,15 +160,18 @@ This design:
|
|
|
122
160
|
### Testing
|
|
123
161
|
|
|
124
162
|
**JavaScript Tests** (Production - Uses compiled dist/):
|
|
163
|
+
|
|
125
164
|
- Run Achievement Tests: `npm run test:achievements:js` - Tests all 20 achievement functions
|
|
126
165
|
- Run Stats Tests: `npm run test:stats:js` - Tests all 14 stats functions
|
|
127
166
|
- Run Leaderboard Tests: `npm run test:leaderboards:js` - Tests all 7 leaderboard functions
|
|
128
167
|
- Run Friends Tests: `npm run test:friends:js` - Tests all 22 friends functions
|
|
129
|
-
- Run Cloud Tests: `npm run test:cloud:js` - Tests all
|
|
168
|
+
- Run Cloud Tests: `npm run test:cloud:js` - Tests all 17 cloud storage functions
|
|
130
169
|
- Run Rich Presence & Overlay Tests: `npm run test:richpresence-overlay:js` - Tests 6 rich presence + 7 overlay functions
|
|
131
|
-
- Run Workshop Tests: `npm run test:workshop:js` - Tests all
|
|
170
|
+
- Run Workshop Tests: `npm run test:workshop:js` - Tests all 30 Workshop/UGC functions
|
|
171
|
+
- Run Input Tests: `npm run test:input-xbox:js` or `npm run test:input-ps4:js` - Tests 35+ input functions with virtual gamepad
|
|
132
172
|
|
|
133
173
|
**TypeScript Tests** (Development - Direct src/ imports, no rebuild needed):
|
|
174
|
+
|
|
134
175
|
- Run Achievement Tests: `npm run test:achievements:ts` - With type safety ✨
|
|
135
176
|
- Run Stats Tests: `npm run test:stats:ts` - With type safety ✨
|
|
136
177
|
- Run Leaderboard Tests: `npm run test:leaderboards:ts` - With type safety ✨
|
|
@@ -138,12 +179,14 @@ This design:
|
|
|
138
179
|
- Run Cloud Tests: `npm run test:cloud:ts` - With type safety ✨
|
|
139
180
|
- Run Rich Presence & Overlay Tests: `npm run test:richpresence-overlay:ts` - With type safety ✨
|
|
140
181
|
- Run Workshop Tests: `npm run test:workshop:ts` - With type safety ✨
|
|
182
|
+
- Run Input Tests: `npm run test:input-xbox:ts` or `npm run test:input-ps4:ts` - With type safety ✨
|
|
141
183
|
|
|
142
184
|
📁 All tests are in `tests/` folder with separate `js/` and `ts/` subfolders.
|
|
143
185
|
|
|
144
186
|
💡 **Pro tip**: TypeScript tests import directly from `src/` so you can test changes immediately without running `npm run build`!
|
|
145
187
|
|
|
146
188
|
### Additional Resources
|
|
189
|
+
|
|
147
190
|
- [GitHub Repository](https://github.com/ArtyProf/steamworks-ffi-node)
|
|
148
191
|
- [NPM Package](https://www.npmjs.com/package/steamworks-ffi-node)
|
|
149
192
|
- [Report Issues](https://github.com/ArtyProf/steamworks-ffi-node/issues)
|
|
@@ -153,6 +196,7 @@ This design:
|
|
|
153
196
|
## 📖 Documentation Structure
|
|
154
197
|
|
|
155
198
|
Each API documentation includes:
|
|
199
|
+
|
|
156
200
|
- **Overview** - Architecture and design patterns
|
|
157
201
|
- **Quick Reference** - Function categories and counts
|
|
158
202
|
- **Detailed Functions** - Parameters, returns, SDK mappings, examples
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steamworks-ffi-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Steamworks SDK wrapper using FFI for Node.js/Electron - Full Steam Integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"test:cloud:js": "node tests/js/test-complete-cloud.js",
|
|
17
17
|
"test:workshop:js": "node tests/js/test-workshop.js",
|
|
18
18
|
"test:richpresence-overlay:js": "node tests/js/test-richpresence-overlay.js",
|
|
19
|
+
"test:input:js": "node tests/js/test-input.js",
|
|
20
|
+
"test:input-xbox:js": "node tests/js/test-input.js --virtual --type=xbox",
|
|
21
|
+
"test:input-ps4:js": "node tests/js/test-input.js --virtual --type=ps4",
|
|
22
|
+
"test:screenshots:js": "node tests/js/test-screenshots.js",
|
|
19
23
|
"test:core:ts": "ts-node tests/ts/test-core-api.ts",
|
|
20
24
|
"test:achievements:ts": "ts-node tests/ts/test-complete-achievements.ts",
|
|
21
25
|
"test:stats:ts": "ts-node tests/ts/test-complete-stats.ts",
|
|
@@ -24,13 +28,17 @@
|
|
|
24
28
|
"test:cloud:ts": "ts-node tests/ts/test-complete-cloud.ts",
|
|
25
29
|
"test:workshop:ts": "ts-node tests/ts/test-workshop.ts",
|
|
26
30
|
"test:richpresence-overlay:ts": "ts-node tests/ts/test-richpresence-overlay.ts",
|
|
31
|
+
"test:input:ts": "ts-node tests/ts/test-input.ts",
|
|
32
|
+
"test:input-xbox:ts": "ts-node tests/ts/test-input.ts --virtual --type=xbox",
|
|
33
|
+
"test:input-ps4:ts": "ts-node tests/ts/test-input.ts --virtual --type=ps4",
|
|
34
|
+
"test:screenshots:ts": "ts-node tests/ts/test-screenshots.ts",
|
|
27
35
|
"prepublishOnly": "npm run build"
|
|
28
36
|
},
|
|
29
37
|
"dependencies": {
|
|
30
38
|
"koffi": "^2.8.8"
|
|
31
39
|
},
|
|
32
40
|
"devDependencies": {
|
|
33
|
-
"@types/node": "^
|
|
41
|
+
"@types/node": "^24.10.1",
|
|
34
42
|
"ts-node": "^10.9.2",
|
|
35
43
|
"typescript": "^5.0.0"
|
|
36
44
|
},
|