@vinikjkkj/wa-version 0.1.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/README.md +44 -0
- package/index.d.ts +4 -0
- package/index.js +9 -0
- package/package.json +49 -0
- package/version.json +3 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @vinikjkkj/wa-version
|
|
2
|
+
|
|
3
|
+
The WhatsApp Web version string the rest of `wa-spec` was extracted from,
|
|
4
|
+
shipped as a tiny standalone package so consumers can pin their handshake
|
|
5
|
+
/ WAM event-version / pairing-flow checks to the same build without having
|
|
6
|
+
to install (or load at runtime) any of the larger schema packages.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm i @vinikjkkj/wa-version
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { WA_VERSION } from '@vinikjkkj/wa-version'
|
|
14
|
+
|
|
15
|
+
console.log(WA_VERSION) // → '2.3000.1040208462'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or via CommonJS:
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
const { WA_VERSION } = require('@vinikjkkj/wa-version')
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The same value is also available as JSON if you'd rather not load JS:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
const { waWeb } = require('@vinikjkkj/wa-version/version.json')
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## How it works
|
|
31
|
+
|
|
32
|
+
`@vinikjkkj/wa-version` is generated daily by the
|
|
33
|
+
[`wa-spec`](https://github.com/vinikjkkj/wa-spec) workflow. Every WA Web
|
|
34
|
+
bundle drop bumps the version, regenerates this package, and republishes
|
|
35
|
+
to npm. The package version mirrors `2.3000.<build>-<sha>` so
|
|
36
|
+
`npm view @vinikjkkj/wa-version version` always reflects the latest WA
|
|
37
|
+
Web release wa-spec has seen.
|
|
38
|
+
|
|
39
|
+
## Generate locally
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npx wa-fetcher --out dump/ # download bundles
|
|
43
|
+
node packages/version/scripts/apply.cjs --manifest dump/manifest.json
|
|
44
|
+
```
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vinikjkkj/wa-version",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "WhatsApp Web version string — daily-extracted from the bundle manifest. Exports `WA_VERSION` so consumers can pin their handshake / WAM event-version / pairing-flow checks to the same build wa-spec was generated from.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"whatsapp",
|
|
7
|
+
"whatsapp-web",
|
|
8
|
+
"version",
|
|
9
|
+
"wa-spec"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "vinikjkkj",
|
|
14
|
+
"url": "https://github.com/vinikjkkj"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/vinikjkkj/wa-spec/tree/main/packages/version#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/vinikjkkj/wa-spec/issues"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/vinikjkkj/wa-spec.git",
|
|
23
|
+
"directory": "packages/version"
|
|
24
|
+
},
|
|
25
|
+
"funding": [
|
|
26
|
+
{
|
|
27
|
+
"type": "github",
|
|
28
|
+
"url": "https://github.com/sponsors/vinikjkkj"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"main": "index.js",
|
|
32
|
+
"types": "index.d.ts",
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"files": [
|
|
35
|
+
"index.js",
|
|
36
|
+
"index.d.ts",
|
|
37
|
+
"version.json",
|
|
38
|
+
"README.md"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"apply": "node ./scripts/apply.cjs"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=20.9.0"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
}
|
|
49
|
+
}
|
package/version.json
ADDED