@serenityjs/plugins 0.6.0 → 0.6.1-beta-20241118221452
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 +11 -0
- package/package.json +5 -8
- package/bin/bundle.js +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @serenityjs/plugins
|
|
2
2
|
|
|
3
|
+
## 0.6.1-beta-20241118221452
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5994a69`](https://github.com/SerenityJS/serenity/commit/5994a699c705402ae044c262588c1668e876a972) Thanks [@PMK744](https://github.com/PMK744)! - init v0.6.1-beta
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`5994a69`](https://github.com/SerenityJS/serenity/commit/5994a699c705402ae044c262588c1668e876a972)]:
|
|
10
|
+
- @serenityjs/protocol@0.6.1-beta-20241118221452
|
|
11
|
+
- @serenityjs/logger@0.6.1-beta-20241118221452
|
|
12
|
+
- @serenityjs/core@0.6.1-beta-20241118221452
|
|
13
|
+
|
|
3
14
|
## 0.6.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@serenityjs/plugins",
|
|
3
3
|
"author": "Serenity",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.6.
|
|
5
|
+
"version": "0.6.1-beta-20241118221452",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -19,11 +19,8 @@
|
|
|
19
19
|
"lint": "eslint src/",
|
|
20
20
|
"typecheck": "tsc --noEmit"
|
|
21
21
|
},
|
|
22
|
-
"bin": {
|
|
23
|
-
"bundle": "./bin/bundle.js"
|
|
24
|
-
},
|
|
25
22
|
"devDependencies": {
|
|
26
|
-
"@serenityjs/internal-config": "
|
|
23
|
+
"@serenityjs/internal-config": "0.6.1-beta-20241118221452",
|
|
27
24
|
"@swc/core": "1.7.42",
|
|
28
25
|
"@types/node": "22.8.6",
|
|
29
26
|
"eslint": "9.13.0",
|
|
@@ -32,8 +29,8 @@
|
|
|
32
29
|
},
|
|
33
30
|
"dependencies": {
|
|
34
31
|
"@serenityjs/binarystream": "^2.6.6",
|
|
35
|
-
"@serenityjs/core": "
|
|
36
|
-
"@serenityjs/logger": "
|
|
37
|
-
"@serenityjs/protocol": "
|
|
32
|
+
"@serenityjs/core": "0.6.1-beta-20241118221452",
|
|
33
|
+
"@serenityjs/logger": "0.6.1-beta-20241118221452",
|
|
34
|
+
"@serenityjs/protocol": "0.6.1-beta-20241118221452"
|
|
38
35
|
}
|
|
39
36
|
}
|
package/bin/bundle.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { readFileSync, existsSync, mkdirSync, writeFileSync } = require("fs");
|
|
4
|
-
const { resolve } = require("node:path");
|
|
5
|
-
const { deflateSync } = require("node:zlib");
|
|
6
|
-
|
|
7
|
-
const { BinaryStream } = require("@serenityjs/binarystream");
|
|
8
|
-
|
|
9
|
-
// Get the input and output paths from the command line arguments
|
|
10
|
-
const inputPath = process.argv[2];
|
|
11
|
-
const outputPath = process.argv[3];
|
|
12
|
-
const fileName = process.argv[4] || "my-plugin";
|
|
13
|
-
|
|
14
|
-
// Check if the input path exists
|
|
15
|
-
if (!existsSync(inputPath)) {
|
|
16
|
-
console.error(`Input path "${inputPath}" does not exist.`);
|
|
17
|
-
process.exit(1);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Create the output directory if it does not exist
|
|
21
|
-
if (!existsSync(outputPath)) {
|
|
22
|
-
mkdirSync(outputPath, { recursive: true });
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Read the ESM and CJS index files from the input path
|
|
26
|
-
const esmIndex = readFileSync(resolve(inputPath, "index.mjs"));
|
|
27
|
-
const cjsIndex = readFileSync(resolve(inputPath, "index.js"));
|
|
28
|
-
|
|
29
|
-
// Create a new BinaryStream instance
|
|
30
|
-
const stream = new BinaryStream();
|
|
31
|
-
|
|
32
|
-
// Write the length of the ESM index file and then write the compressed ESM index file
|
|
33
|
-
stream.writeVarInt(esmIndex.length);
|
|
34
|
-
stream.writeBuffer(esmIndex);
|
|
35
|
-
|
|
36
|
-
// Write the length of the CJS index file and then write the compressed CJS index file
|
|
37
|
-
stream.writeVarInt(cjsIndex.length);
|
|
38
|
-
stream.writeBuffer(cjsIndex);
|
|
39
|
-
|
|
40
|
-
// Get the buffer from the BinaryStream
|
|
41
|
-
const buffer = stream.getBuffer();
|
|
42
|
-
|
|
43
|
-
// Write the BinaryStream to the output path
|
|
44
|
-
writeFileSync(resolve(outputPath, `${fileName}.plugin`), deflateSync(buffer));
|