prismarine-windows 2.4.3 → 2.5.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.
@@ -13,13 +13,20 @@ jobs:
13
13
  - name: Set up Node.js
14
14
  uses: actions/setup-node@master
15
15
  with:
16
- node-version: 10.0.0
17
- - name: Publish if version has been updated
18
- uses: pascalgn/npm-publish-action@4f4bf159e299f65d21cd1cbd96fc5d53228036df
19
- with: # All of theses inputs are optional
20
- tag_name: "%s"
21
- tag_message: "%s"
22
- commit_pattern: "^Release (\\S+)"
23
- env: # More info about the environment variables in the README
24
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
25
- NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
16
+ node-version: 14.0.0
17
+ - id: publish
18
+ uses: JS-DevTools/npm-publish@v1
19
+ with:
20
+ token: ${{ secrets.NPM_AUTH_TOKEN }}
21
+ - name: Create Release
22
+ if: steps.publish.outputs.type != 'none'
23
+ id: create_release
24
+ uses: actions/create-release@v1
25
+ env:
26
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
+ with:
28
+ tag_name: ${{ steps.publish.outputs.version }}
29
+ release_name: Release ${{ steps.publish.outputs.version }}
30
+ body: ${{ steps.publish.outputs.version }}
31
+ draft: false
32
+ prerelease: false
package/HISTORY.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.5.0
2
+
3
+ * Extend the events used for windows
4
+
5
+ ## 2.4.4
6
+ * update mcdata
7
+
1
8
  ## 2.4.3
2
9
  * fixed typescript typings
3
10
 
package/index.d.ts CHANGED
@@ -2,9 +2,10 @@
2
2
  /// <reference types="prismarine-item" />
3
3
 
4
4
  import {EventEmitter} from 'events';
5
+ import TypedEmitter from 'typed-emitter'
5
6
  import {Item} from 'prismarine-item';
6
7
 
7
- export class Window extends EventEmitter {
8
+ export class Window<T = unknown> extends (EventEmitter as new <T>() => TypedEmitter<T>)<T> {
8
9
  constructor (id: number, type: number | string, title: string, slotCount: number, inventorySlotsRange: { start: number, end: number }, craftingResultSlot: number, requiresConfirmation: boolean);
9
10
 
10
11
  /**
@@ -129,7 +130,7 @@ export class Window extends EventEmitter {
129
130
  * Return the id of the first empty slot in the inventory, start looking in the hotbar first if the flag is set
130
131
  * @param hotbarFirst DEFAULT: true
131
132
  */
132
- firstEmptyInventorySlot(hotbarFirst: boolean): number | null;
133
+ firstEmptyInventorySlot(hotbarFirst?: boolean): number | null;
133
134
 
134
135
  /**
135
136
  * Returns how many item you have of the given type, between slots start and end
@@ -237,4 +238,4 @@ export type WindowName =
237
238
  'minecraft:smithing' |
238
239
  'minecraft:smoker' |
239
240
  'minecraft:cartography' |
240
- 'minecraft:stonecutter'
241
+ 'minecraft:stonecutter'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prismarine-windows",
3
- "version": "2.4.3",
3
+ "version": "2.5.0",
4
4
  "description": "Represent minecraft windows",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,12 +13,13 @@
13
13
  "url": "git+ssh://git@github.com/PrismarineJS/prismarine-windows.git"
14
14
  },
15
15
  "dependencies": {
16
- "minecraft-data": "^2.74.0",
17
- "prismarine-item": "^1.5.0"
16
+ "minecraft-data": "^3.0.0",
17
+ "prismarine-item": "^1.5.0",
18
+ "typed-emitter": "^1.0.0"
18
19
  },
19
20
  "devDependencies": {
20
- "@types/node": "^16.0.0",
21
- "standard": "^16.0.3"
21
+ "@types/node": "^18.6.4",
22
+ "standard": "^17.0.0"
22
23
  },
23
24
  "keywords": [
24
25
  "minecraft",