prismarine-schematic 1.2.2 → 1.3.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/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/commands.yml +22 -0
- package/.github/workflows/publish.yml +19 -10
- package/HISTORY.md +14 -0
- package/index.d.ts +33 -0
- package/package.json +5 -5
package/.github/workflows/ci.yml
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Repo Commands
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issue_comment: # Handle comment commands
|
|
5
|
+
types: [created]
|
|
6
|
+
pull_request: # Handle renamed PRs
|
|
7
|
+
types: [edited]
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
comment-trigger:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Check out repository
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
|
+
- name: Run command handlers
|
|
18
|
+
uses: PrismarineJS/prismarine-repo-actions@master
|
|
19
|
+
with:
|
|
20
|
+
token: ${{ secrets.PAT_PASSWORD }}
|
|
21
|
+
install-command: npm install
|
|
22
|
+
/fixlint.fix-command: npm run fix
|
|
@@ -3,6 +3,9 @@ on:
|
|
|
3
3
|
push:
|
|
4
4
|
branches:
|
|
5
5
|
- master # Change this to your default branch
|
|
6
|
+
permissions:
|
|
7
|
+
id-token: write
|
|
8
|
+
contents: write
|
|
6
9
|
jobs:
|
|
7
10
|
npm-publish:
|
|
8
11
|
name: npm-publish
|
|
@@ -13,13 +16,19 @@ jobs:
|
|
|
13
16
|
- name: Set up Node.js
|
|
14
17
|
uses: actions/setup-node@master
|
|
15
18
|
with:
|
|
16
|
-
node-version:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
node-version: 24
|
|
20
|
+
registry-url: 'https://registry.npmjs.org'
|
|
21
|
+
- id: publish
|
|
22
|
+
uses: JS-DevTools/npm-publish@v4
|
|
23
|
+
- name: Create Release
|
|
24
|
+
if: ${{ steps.publish.outputs.type }}
|
|
25
|
+
id: create_release
|
|
26
|
+
uses: actions/create-release@v1
|
|
27
|
+
env:
|
|
28
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
+
with:
|
|
30
|
+
tag_name: ${{ steps.publish.outputs.version }}
|
|
31
|
+
release_name: Release ${{ steps.publish.outputs.version }}
|
|
32
|
+
body: ${{ steps.publish.outputs.version }}
|
|
33
|
+
draft: false
|
|
34
|
+
prerelease: false
|
package/HISTORY.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
## History
|
|
2
2
|
|
|
3
|
+
### 1.3.0
|
|
4
|
+
* [Add repo commands workflow (#79)](https://github.com/PrismarineJS/prismarine-schematic/commit/52daaa652d2847e1d594847321038f4db286560b) (thanks @rom1504)
|
|
5
|
+
* [Update CI to Node 24 (#78)](https://github.com/PrismarineJS/prismarine-schematic/commit/ac22acbb0df7d7569126818014ae08daec8b72de) (thanks @rom1504)
|
|
6
|
+
* [Fix publish workflow for trusted publishing (#76)](https://github.com/PrismarineJS/prismarine-schematic/commit/9e76020a4447e2a6679a8ea4d28618a520cc51ae) (thanks @rom1504)
|
|
7
|
+
* [Switch to trusted publishing via OIDC (#75)](https://github.com/PrismarineJS/prismarine-schematic/commit/ad846374ffdbaa03f655c6646cafea971d8ef4d5) (thanks @rom1504)
|
|
8
|
+
* [Update bug_report.md (#59)](https://github.com/PrismarineJS/prismarine-schematic/commit/dda10052ee063c048e64e1ee460109a4554ed324) (thanks @IceTank)
|
|
9
|
+
* [Bump jest from 28.1.3 to 29.1.1 (#57)](https://github.com/PrismarineJS/prismarine-schematic/commit/5dd8a672762d2ff7f44c3514026947f23622e38d) (thanks @dependabot[bot])
|
|
10
|
+
* [added types for typescript (#51)](https://github.com/PrismarineJS/prismarine-schematic/commit/3833d9fa317fa4f61947360d30f414f1663b5de2) (thanks @sertonix)
|
|
11
|
+
* [Bump standard from 16.0.4 to 17.0.0 (#44)](https://github.com/PrismarineJS/prismarine-schematic/commit/1aa3f506694171dee70bd7a188380089486a1666) (thanks @dependabot[bot])
|
|
12
|
+
* [Bump jest from 27.5.1 to 28.1.0 (#49)](https://github.com/PrismarineJS/prismarine-schematic/commit/3803445d202543b3edfc8ae03bddacade4e0db77) (thanks @dependabot[bot])
|
|
13
|
+
|
|
14
|
+
## 1.2.3
|
|
15
|
+
* Update mcdata
|
|
16
|
+
|
|
3
17
|
## 1.2.2
|
|
4
18
|
* Add setBlock function to Schematic (#35)
|
|
5
19
|
* Add to/from - JSON (#36)
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Vec3 } from "vec3";
|
|
2
|
+
import type { Block } from "prismarine-block";
|
|
3
|
+
|
|
4
|
+
export class Schematic {
|
|
5
|
+
public readonly version: string;
|
|
6
|
+
public readonly size: Vec3;
|
|
7
|
+
public readonly offset: Vec3;
|
|
8
|
+
public palette: number[];
|
|
9
|
+
public blocks: number[];
|
|
10
|
+
public readonly Block: typeof Block;
|
|
11
|
+
|
|
12
|
+
constructor ( version: string, size: Vec3, offset: Vec3, palette: number[], blocks: number[] );
|
|
13
|
+
|
|
14
|
+
start(): Vec3;
|
|
15
|
+
end(): Vec3;
|
|
16
|
+
|
|
17
|
+
getBlockStateId( pos: Vec3 ): number;
|
|
18
|
+
|
|
19
|
+
getBlock( pos: Vec3 ): Block;
|
|
20
|
+
setBlock( pos: Vec3, block?: Block ): void;
|
|
21
|
+
|
|
22
|
+
paste( world: any, at: Vec3 ): Promise<void>;
|
|
23
|
+
write(): Promise<Buffer>;
|
|
24
|
+
forEach( cb: ( block: number, pos: Vec3 ) => PromiseLike<void> | void ): Promise<void>;
|
|
25
|
+
map<Ret>( cb: ( block: number, pos: Vec3 ) => PromiseLike<Ret> | Ret ): Promise<Ret[]>;
|
|
26
|
+
makeWithCommands( offset: Vec3, platform?: "pc" | "pe" ): Promise<string[]>;
|
|
27
|
+
|
|
28
|
+
toJSON( space?: string ): string;
|
|
29
|
+
|
|
30
|
+
static copy( world: any, start: Vec3, end: Vec3, offset: Vec3, version: string ): Promise<Schematic>;
|
|
31
|
+
static read( buffer: Buffer, version?: string ): Promise<Schematic>;
|
|
32
|
+
static fromJSON( string: string ): Schematic;
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prismarine-schematic",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Read, write and manipulate minecraft schematics",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/PrismarineJS/prismarine-schematic#readme",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"jest": "^
|
|
27
|
+
"jest": "^29.1.1",
|
|
28
28
|
"prismarine-schematic": "file:.",
|
|
29
29
|
"prismarine-chunk": "^1.22.0",
|
|
30
|
-
"standard": "^
|
|
30
|
+
"standard": "^17.0.0",
|
|
31
31
|
"process": "^0.11.10"
|
|
32
32
|
},
|
|
33
33
|
"standard": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"minecraft-data": "^
|
|
39
|
+
"minecraft-data": "^3.0.0",
|
|
40
40
|
"prismarine-block": "^1.7.2",
|
|
41
|
-
"prismarine-nbt": "^
|
|
41
|
+
"prismarine-nbt": "^2.0.0",
|
|
42
42
|
"prismarine-world": "^3.1.1",
|
|
43
43
|
"vec3": "^0.1.7"
|
|
44
44
|
}
|