@nam088/zca-js 1.0.1 → 3.0.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/CODE_OF_CONDUCT.md +37 -36
- package/CONTRIBUTING.md +162 -154
- package/README.md +22 -22
- package/SECURITY.md +25 -20
- package/dist/index.cjs +3424 -3275
- package/dist/index.d.cts +1292 -1292
- package/dist/index.d.ts +1292 -1292
- package/dist/index.js +3244 -3108
- package/{eslint.config.mjs → eslint.config.js} +0 -6
- package/package.json +17 -25
- package/tsup.config.ts +11 -43
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.min.cjs +0 -5
- package/dist/index.min.cjs.map +0 -1
- package/dist/index.min.js +0 -5
- package/dist/index.min.js.map +0 -1
- package/index.d.ts +0 -2
- package/qr.png +0 -0
package/package.json
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nam088/zca-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Unofficial Zalo API for JavaScript",
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
"require": {
|
|
16
|
-
"development": "./dist/index.cjs",
|
|
17
|
-
"default": "./dist/index.min.cjs"
|
|
18
|
-
}
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"import": "./dist/index.js"
|
|
19
14
|
}
|
|
20
15
|
},
|
|
21
16
|
"scripts": {
|
|
22
|
-
"build
|
|
23
|
-
"
|
|
24
|
-
"test:feat": "node --loader ts-node/esm test/feat.ts",
|
|
17
|
+
"build": "tsup",
|
|
18
|
+
"test:feat": "bun run test/feat.ts",
|
|
25
19
|
"prettier": "prettier --write .",
|
|
26
20
|
"lint": "eslint .",
|
|
27
21
|
"lint:fix": "eslint . --fix",
|
|
@@ -29,11 +23,11 @@
|
|
|
29
23
|
},
|
|
30
24
|
"repository": {
|
|
31
25
|
"type": "git",
|
|
32
|
-
"url": "git+https://github.com/
|
|
26
|
+
"url": "git+https://github.com/RFS-ADRENO/zca-js.git"
|
|
33
27
|
},
|
|
34
|
-
"homepage": "https://github.com/
|
|
28
|
+
"homepage": "https://github.com/RFS-ADRENO/zca-js",
|
|
35
29
|
"bugs": {
|
|
36
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/RFS-ADRENO/zca-js/issues"
|
|
37
31
|
},
|
|
38
32
|
"engines": {
|
|
39
33
|
"node": ">=18.0.0"
|
|
@@ -43,9 +37,10 @@
|
|
|
43
37
|
"zalo",
|
|
44
38
|
"api"
|
|
45
39
|
],
|
|
46
|
-
"author": "
|
|
40
|
+
"author": "RFS-ADRENO, truong9c2208, JustKemForFun",
|
|
47
41
|
"license": "MIT",
|
|
48
42
|
"dependencies": {
|
|
43
|
+
"@nam088/zca-js": "^1.0.1",
|
|
49
44
|
"crypto-js": "^4.2.0",
|
|
50
45
|
"form-data": "^4.0.4",
|
|
51
46
|
"json-bigint": "^1.0.0",
|
|
@@ -57,9 +52,9 @@
|
|
|
57
52
|
},
|
|
58
53
|
"devDependencies": {
|
|
59
54
|
"@eslint/js": "^9.34.0",
|
|
55
|
+
"@types/bun": "^1.1.14",
|
|
60
56
|
"@types/crypto-js": "^4.2.2",
|
|
61
57
|
"@types/json-bigint": "^1.0.4",
|
|
62
|
-
"@types/lodash": "^4.17.20",
|
|
63
58
|
"@types/node": "^20.14.10",
|
|
64
59
|
"@types/pako": "^2.0.3",
|
|
65
60
|
"@types/semver": "^7.5.8",
|
|
@@ -69,16 +64,13 @@
|
|
|
69
64
|
"globals": "^16.3.0",
|
|
70
65
|
"husky": "^9.1.7",
|
|
71
66
|
"lint-staged": "^16.1.5",
|
|
72
|
-
"lodash": "^4.17.21",
|
|
73
67
|
"prettier": "^3.3.3",
|
|
74
68
|
"rimraf": "^5.0.10",
|
|
75
|
-
"ts-node": "^10.9.2",
|
|
76
69
|
"tsup": "^8.5.0",
|
|
77
|
-
"tsx": "^4.20.6",
|
|
78
70
|
"typescript": "^5.5.3",
|
|
79
71
|
"typescript-eslint": "^8.41.0"
|
|
80
72
|
},
|
|
81
73
|
"lint-staged": {
|
|
82
|
-
"*.{js,ts}": "
|
|
74
|
+
"*.{js,ts}": "bunx eslint"
|
|
83
75
|
}
|
|
84
76
|
}
|
package/tsup.config.ts
CHANGED
|
@@ -1,49 +1,17 @@
|
|
|
1
|
-
import { defineConfig
|
|
1
|
+
import { defineConfig } from "tsup";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const common: Options = {
|
|
3
|
+
export default defineConfig({
|
|
6
4
|
entry: ["src/index.ts"],
|
|
7
|
-
format:
|
|
8
|
-
|
|
5
|
+
format: ["cjs", "esm"],
|
|
6
|
+
dts: true,
|
|
9
7
|
splitting: false,
|
|
10
|
-
|
|
8
|
+
sourcemap: false,
|
|
9
|
+
clean: true,
|
|
11
10
|
outDir: "dist",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// Node built-ins (all)
|
|
17
|
-
"node:*",
|
|
18
|
-
// Runtime deps (match package.json)
|
|
19
|
-
"crypto-js",
|
|
20
|
-
"form-data",
|
|
21
|
-
"json-bigint",
|
|
22
|
-
"pako",
|
|
23
|
-
"semver",
|
|
24
|
-
"spark-md5",
|
|
25
|
-
"tough-cookie",
|
|
26
|
-
"ws",
|
|
27
|
-
// lodash and all subpath imports
|
|
28
|
-
"lodash",
|
|
29
|
-
"lodash/*",
|
|
30
|
-
],
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export default defineConfig([
|
|
34
|
-
{
|
|
35
|
-
...common,
|
|
36
|
-
dts: true,
|
|
37
|
-
clean: true,
|
|
38
|
-
minify: false,
|
|
39
|
-
outExtension: ({ format }) => ({ js: format === "cjs" ? ".cjs" : ".js" }),
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
...common,
|
|
43
|
-
dts: false,
|
|
44
|
-
clean: false,
|
|
45
|
-
minify: true,
|
|
46
|
-
outExtension: ({ format }) => ({ js: format === "cjs" ? ".min.cjs" : ".min.js" }),
|
|
11
|
+
outExtension({ format }) {
|
|
12
|
+
return {
|
|
13
|
+
js: format === "cjs" ? ".cjs" : ".js",
|
|
14
|
+
};
|
|
47
15
|
},
|
|
48
|
-
|
|
16
|
+
});
|
|
49
17
|
|