@varavel/veta 0.0.0-dev → 0.1.0-alpha.1
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 +40 -5
- package/bin.js +2 -0
- package/install.js +22 -8
- package/manifest.json +44 -0
- package/package.json +3 -3
- package/checksums.json +0 -2
package/README.md
CHANGED
|
@@ -1,8 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Veta static site generator
|
|
2
2
|
|
|
3
|
-
This package installs the Veta CLI
|
|
3
|
+
This package installs the Veta CLI using NPM.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Global installation:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @varavel/veta
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or as a dev dependency:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install --save-dev @varavel/veta
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
After installation, the `veta` command will be available:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
veta --help # See available commands
|
|
8
25
|
```
|
|
26
|
+
|
|
27
|
+
## Supported Platforms
|
|
28
|
+
|
|
29
|
+
- **macOS**: x64, ARM64 (Apple Silicon)
|
|
30
|
+
- **Linux**: x64, ARM64
|
|
31
|
+
- **Windows**: x64
|
|
32
|
+
|
|
33
|
+
## How It Works
|
|
34
|
+
|
|
35
|
+
This package downloads the appropriate pre-compiled Veta binary for your platform during installation. The binary is fetched from the [official GitHub releases](https://github.com/varavelio/veta/releases).
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
Visit https://github.com/varavelio/veta for full documentation.
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
MIT
|
package/bin.js
CHANGED
|
@@ -17,10 +17,12 @@ async function main() {
|
|
|
17
17
|
binaryPath = getBinaryPath();
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
// Spawn veta
|
|
20
21
|
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
21
22
|
stdio: ["inherit", "inherit", "inherit"],
|
|
22
23
|
});
|
|
23
24
|
|
|
25
|
+
// Propagate OS signals
|
|
24
26
|
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
25
27
|
process.on(signal, () => {
|
|
26
28
|
if (child.pid) child.kill(signal);
|
package/install.js
CHANGED
|
@@ -5,7 +5,7 @@ const crypto = require("node:crypto");
|
|
|
5
5
|
const fs = require("node:fs");
|
|
6
6
|
const https = require("node:https");
|
|
7
7
|
const path = require("node:path");
|
|
8
|
-
const
|
|
8
|
+
const manifest = require("./manifest.json");
|
|
9
9
|
|
|
10
10
|
const PLATFORM_MAP = {
|
|
11
11
|
darwin: "darwin",
|
|
@@ -83,17 +83,31 @@ function getDownloadURL() {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Returns the release artifact metadata for filename.
|
|
87
|
+
* @param {string} filename Expected release archive filename.
|
|
88
|
+
* @returns {{ sha256: string }} Release artifact metadata.
|
|
89
|
+
*/
|
|
90
|
+
function getManifestArtifact(filename) {
|
|
91
|
+
if (!Array.isArray(manifest.artifacts)) {
|
|
92
|
+
throw new Error("Release manifest is missing artifacts.");
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const artifact = manifest.artifacts.find((item) => item.name === filename);
|
|
96
|
+
if (!artifact || !artifact.sha256) {
|
|
97
|
+
throw new Error(`Release manifest does not include ${filename}.`);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return artifact;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Verifies an archive buffer against the checksum embedded in this npm package manifest.
|
|
87
105
|
* @param {Buffer} archiveBuffer Downloaded archive bytes.
|
|
88
|
-
* @param {string} filename Expected
|
|
106
|
+
* @param {string} filename Expected release archive filename.
|
|
89
107
|
* @returns {void}
|
|
90
108
|
*/
|
|
91
109
|
function verifyChecksum(archiveBuffer, filename) {
|
|
92
|
-
const expectedHash =
|
|
93
|
-
if (!expectedHash) {
|
|
94
|
-
throw new Error(`Checksum for ${filename} was not embedded in this npm package.`);
|
|
95
|
-
}
|
|
96
|
-
|
|
110
|
+
const expectedHash = getManifestArtifact(filename).sha256;
|
|
97
111
|
const actualHash = crypto.createHash("sha256").update(archiveBuffer).digest("hex");
|
|
98
112
|
if (expectedHash !== actualHash) {
|
|
99
113
|
throw new Error(
|
package/manifest.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"artifacts": [
|
|
3
|
+
{
|
|
4
|
+
"arch": "amd64",
|
|
5
|
+
"format": "tar.gz",
|
|
6
|
+
"name": "veta_linux_amd64.tar.gz",
|
|
7
|
+
"os": "linux",
|
|
8
|
+
"sha256": "188e23680fe76d1f17d36dcad8c71ad21aaeb72af9be1cfff3e40877edfd0920"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"arch": "arm64",
|
|
12
|
+
"format": "tar.gz",
|
|
13
|
+
"name": "veta_linux_arm64.tar.gz",
|
|
14
|
+
"os": "linux",
|
|
15
|
+
"sha256": "e72b3d8e9d4533d4b58688e7ae22ba7a2ec37dd69fd5d888f8852bacab9ea7f0"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"arch": "amd64",
|
|
19
|
+
"format": "tar.gz",
|
|
20
|
+
"name": "veta_darwin_amd64.tar.gz",
|
|
21
|
+
"os": "darwin",
|
|
22
|
+
"sha256": "c3b9e55f23fe42f672e861ec5c5c080c5c2600984e4333e0aec1d0253b854043"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"arch": "arm64",
|
|
26
|
+
"format": "tar.gz",
|
|
27
|
+
"name": "veta_darwin_arm64.tar.gz",
|
|
28
|
+
"os": "darwin",
|
|
29
|
+
"sha256": "ed6dc793396abdc8c6c1890bddcf3d4a58bbaf106dd4b52bd895f1bc9735ce37"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"arch": "amd64",
|
|
33
|
+
"format": "zip",
|
|
34
|
+
"name": "veta_windows_amd64.zip",
|
|
35
|
+
"os": "windows",
|
|
36
|
+
"sha256": "7e39e4cdb180283429bc241ce5b88844a8d4ccfff9242f2e0760fb61c677c524"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"commit": "c5e4054",
|
|
40
|
+
"date": "2026-06-28T06:28:40Z",
|
|
41
|
+
"project": "veta",
|
|
42
|
+
"repo": "varavelio/veta",
|
|
43
|
+
"version": "0.1.0-alpha.1"
|
|
44
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varavel/veta",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Veta static site generator",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "Veta is the varavel's static site generator",
|
|
5
5
|
"author": "Varavel",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/varavelio/veta",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"bin.js",
|
|
26
|
-
"checksums.json",
|
|
27
26
|
"install.js",
|
|
28
27
|
"index.js",
|
|
28
|
+
"manifest.json",
|
|
29
29
|
"package.json",
|
|
30
30
|
"README.md"
|
|
31
31
|
],
|
package/checksums.json
DELETED