@pipelab/steamworks.js 0.7.3 → 0.9.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/LICENSE +1 -1
- package/README.md +18 -53
- package/callbacks.d.ts +3 -0
- package/client.d.ts +6 -1
- package/dist/linux64/steamworksjs.linux-x64-gnu.node +0 -0
- package/dist/osx/libsteam_api.dylib +0 -0
- package/dist/osx/steamworksjs.darwin-arm64.node +0 -0
- package/dist/osx/steamworksjs.darwin-x64.node +0 -0
- package/dist/win64/steam_api64.dll +0 -0
- package/dist/win64/steam_api64.lib +0 -0
- package/dist/win64/steamworksjs.win32-x64-msvc.node +0 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026-present Quentin GOINAUD
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# steamworks.js
|
|
1
|
+
# Pipelab's steamworks.js
|
|
2
2
|
|
|
3
|
-
> **Note**: This is an actively maintained community fork of [steamworks.js](https://github.com/
|
|
3
|
+
> **Note**: This is an actively maintained community fork of [steamworks.js](https://github.com/ceifa/steamworks.js).
|
|
4
4
|
> We're keeping the project active by reviewing and merging pending PRs and addressing issues.
|
|
5
5
|
|
|
6
6
|
## Why This Fork?
|
|
@@ -11,46 +11,42 @@
|
|
|
11
11
|
- ✅ NW.js support improvements
|
|
12
12
|
- ✅ Incorporating pending PRs from upstream
|
|
13
13
|
|
|
14
|
+
This fork is maintained by [Pipelab](https://pipelab.app).
|
|
15
|
+
|
|
14
16
|
## Installation
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
19
|
# npm - use our scoped package
|
|
18
|
-
npm install @
|
|
20
|
+
npm install @pipelab/steamworks.js
|
|
19
21
|
|
|
20
22
|
# Or reference directly from GitHub
|
|
21
|
-
npm install github:
|
|
23
|
+
npm install github:CynToolkit/steamworks.js
|
|
22
24
|
|
|
23
25
|
# For Electron/NW.js projects
|
|
24
|
-
npm install github:
|
|
25
|
-
npm install github:
|
|
26
|
-
|
|
26
|
+
npm install github:CynToolkit/steamworks.js --runtime=electron --target=27.0.0
|
|
27
|
+
npm install github:CynToolkit/steamworks.js --runtime=node-webkit --target=0.75.0
|
|
28
|
+
```
|
|
27
29
|
|
|
28
30
|
[](https://github.com/CynToolkit/steamworks.js/actions/workflows/publish.yml)
|
|
29
|
-
[](https://npmjs.com/package/steamworks.js)
|
|
31
|
+
[](https://npmjs.com/package/@pipelab/steamworks.js)
|
|
30
32
|
[](https://opensource.org/licenses/MIT)
|
|
31
|
-
[](https://discord.gg/H6B7UE7fMY)
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
To make the steam overlay working, call the `electronEnableSteamOverlay` on the end of your `main.js` file:
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
```js
|
|
37
|
+
require('@pipelab/steamworks.js').electronEnableSteamOverlay()
|
|
38
|
+
```
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
For the production build, copy the relevant distro files from `sdk/redistributable_bin/{YOUR_DISTRO}` into the root of your build. If you are using electron-forge, look for [#75](https://github.com/CynToolkit/steamworks.js/issues/75).
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
# Steamworks.js
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
* It's not up to date.
|
|
43
|
-
* It's not context-aware.
|
|
44
|
-
* You have to build the binaries by yourself.
|
|
45
|
-
* Don't have typescript definitions.
|
|
46
|
-
* The API it's not trustful.
|
|
47
|
-
* The API implement callbacks instead of return flags or promises.
|
|
48
|
-
* I hate C++.
|
|
44
|
+
A modern implementation of the Steamworks SDK for HTML/JS and NodeJS based applications.
|
|
49
45
|
|
|
50
46
|
## API
|
|
51
47
|
|
|
52
48
|
```js
|
|
53
|
-
const steamworks = require('steamworks.js')
|
|
49
|
+
const steamworks = require('@pipelab/steamworks.js')
|
|
54
50
|
|
|
55
51
|
// You can pass an appId, or don't pass anything and use a steam_appid.txt file
|
|
56
52
|
const client = steamworks.init(480)
|
|
@@ -66,37 +62,6 @@ if (client.achievement.activate('ACHIEVEMENT')) {
|
|
|
66
62
|
|
|
67
63
|
You can refer to the [declarations file](https://github.com/CynToolkit/steamworks.js/blob/main/client.d.ts) to check the API support and get more detailed documentation of each function.
|
|
68
64
|
|
|
69
|
-
## Installation
|
|
70
|
-
|
|
71
|
-
To use steamworks.js you don't have to build anything, just install it from npm:
|
|
72
|
-
|
|
73
|
-
```sh
|
|
74
|
-
$: npm i steamworks.js
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Electron
|
|
78
|
-
|
|
79
|
-
Steamworks.js is a native module and cannot be used by default in the renderer process. To enable the usage of native modules on the renderer process, the following configurations should be made on `main.js`:
|
|
80
|
-
|
|
81
|
-
```js
|
|
82
|
-
const mainWindow = new BrowserWindow({
|
|
83
|
-
// ...
|
|
84
|
-
webPreferences: {
|
|
85
|
-
// ...
|
|
86
|
-
contextIsolation: false,
|
|
87
|
-
nodeIntegration: true
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
To make the steam overlay working, call the `electronEnableSteamOverlay` on the end of your `main.js` file:
|
|
93
|
-
|
|
94
|
-
```js
|
|
95
|
-
require('steamworks.js').electronEnableSteamOverlay()
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
For the production build, copy the relevant distro files from `sdk/redistributable_bin/{YOUR_DISTRO}` into the root of your build. If you are using electron-forge, look for [#75](https://github.com/CynToolkit/steamworks.js/issues/75).
|
|
99
|
-
|
|
100
65
|
|
|
101
66
|
## How to build
|
|
102
67
|
|
package/callbacks.d.ts
CHANGED
package/client.d.ts
CHANGED
|
@@ -56,7 +56,8 @@ export declare namespace callback {
|
|
|
56
56
|
P2PSessionRequest = 6,
|
|
57
57
|
P2PSessionConnectFail = 7,
|
|
58
58
|
GameLobbyJoinRequested = 8,
|
|
59
|
-
MicroTxnAuthorizationResponse = 9
|
|
59
|
+
MicroTxnAuthorizationResponse = 9,
|
|
60
|
+
GameOverlayActivated = 10
|
|
60
61
|
}
|
|
61
62
|
export function register<C extends keyof import('./callbacks').CallbackReturns>(steamCallback: C, handler: (value: import('./callbacks').CallbackReturns[C]) => void): Handle
|
|
62
63
|
export class Handle {
|
|
@@ -260,6 +261,10 @@ export declare namespace overlay {
|
|
|
260
261
|
export function activateToWebPage(url: string): void
|
|
261
262
|
export function activateToStore(appId: number, flag: StoreFlag): void
|
|
262
263
|
}
|
|
264
|
+
export declare namespace screenshots {
|
|
265
|
+
/** Triggers the Steam overlay to take a screenshot. */
|
|
266
|
+
export function triggerScreenshot(): void
|
|
267
|
+
}
|
|
263
268
|
export declare namespace stats {
|
|
264
269
|
export function getInt(name: string): number | null
|
|
265
270
|
export function setInt(name: string, value: number): boolean
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelab/steamworks.js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -48,4 +48,4 @@
|
|
|
48
48
|
"type": "git",
|
|
49
49
|
"url": "https://github.com/CynToolkit/steamworks.js"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|