fundamentum-cli 0.1.0 → 0.1.2
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 +2 -4
- package/install.js +12 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
**One command to make your GitHub repo look (and behave) like a pro open-source project.**
|
|
4
4
|
|
|
5
|
-
[
|
|
5
|
+
[GitHub](https://github.com/jpvelasco/fundamentum)
|
|
6
6
|
|
|
7
7
|
Fundamentum bootstraps and hardens GitHub repos for OSS collaboration — community health files, branch protection, secret scanning, and starter CI workflows. You bring the code, it brings the polish.
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://github.com/jpvelasco/fundamentum/actions/workflows/ci.yml"><img src="https://github.com/jpvelasco/fundamentum/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
11
11
|
<a href="https://github.com/jpvelasco/fundamentum/releases/latest"><img src="https://img.shields.io/github/v/release/jpvelasco/fundamentum" alt="Release"></a>
|
|
12
|
-
<a href="https://www.npmjs.com/package/fundamentum-cli"><img src="https://img.shields.io/npm/v/fundamentum-cli" alt="npm"></a>
|
|
13
|
-
<a href="https://www.npmjs.com/package/fundamentum-cli"><img src="https://img.shields.io/npm/dm/fundamentum-cli" alt="npm downloads"></a>
|
|
14
12
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License"></a>
|
|
15
13
|
</p>
|
|
16
14
|
|
|
@@ -27,7 +25,7 @@ npx fundamentum-cli --version
|
|
|
27
25
|
npx fundamentum-cli apply OWNER/REPO
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
Works on **macOS
|
|
28
|
+
Works on **macOS** and **Linux** (`x64` and `arm64`) and **Windows** (`x64`). Postinstall downloads the matching prebuilt binary from GitHub Releases with embedded SHA-256 verification.
|
|
31
29
|
|
|
32
30
|
> **npm 9+ / Ubuntu 26+ note:** npm's `allow-scripts` security policy may block the postinstall
|
|
33
31
|
> script, so the binary won't be downloaded at install time. No worries — if `fundamentum` is invoked
|
package/install.js
CHANGED
|
@@ -29,6 +29,17 @@ const ARCH_MAP = {
|
|
|
29
29
|
arm64: "arm64",
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
function getPackageVersion(pkg) {
|
|
33
|
+
const version = pkg.version;
|
|
34
|
+
|
|
35
|
+
// Validate semver format to prevent URL injection
|
|
36
|
+
if (!/^\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?(\+[a-zA-Z0-9.]+)?$/.test(version)) {
|
|
37
|
+
throw new Error(`Invalid version format: ${version}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return version;
|
|
41
|
+
}
|
|
42
|
+
|
|
32
43
|
function getArchiveName(version, platform, arch) {
|
|
33
44
|
const os = PLATFORM_MAP[platform];
|
|
34
45
|
const cpu = ARCH_MAP[arch];
|
|
@@ -178,7 +189,7 @@ async function main() {
|
|
|
178
189
|
const pkg = JSON.parse(
|
|
179
190
|
fs.readFileSync(path.join(__dirname, "package.json"), "utf8")
|
|
180
191
|
);
|
|
181
|
-
const version = pkg
|
|
192
|
+
const version = getPackageVersion(pkg);
|
|
182
193
|
if (version === "0.0.0") {
|
|
183
194
|
console.error("fundamentum: skipping binary download for development version");
|
|
184
195
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fundamentum-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Bootstrap and harden GitHub repos for OSS collaboration — community files, branch protection, security features, and starter workflows in one command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"bin/"
|
|
58
58
|
],
|
|
59
59
|
"binaryChecksums": {
|
|
60
|
-
"fundamentum_0.1.
|
|
61
|
-
"fundamentum_0.1.
|
|
62
|
-
"fundamentum_0.1.
|
|
63
|
-
"fundamentum_0.1.
|
|
64
|
-
"fundamentum_0.1.
|
|
60
|
+
"fundamentum_0.1.2_darwin_amd64.tar.gz": "3a80afe84553b993fed503fcceee2d206c57dc023ad93c719f37837903bc53e4",
|
|
61
|
+
"fundamentum_0.1.2_darwin_arm64.tar.gz": "6554bb025c3d166c12fe50dde2209546b23c42822ffebfaf34c14528ecd335a2",
|
|
62
|
+
"fundamentum_0.1.2_linux_amd64.tar.gz": "3e827ed72c7ff851fa01f7b834dbaf1962bece2caf862154c3f62cf27bc66262",
|
|
63
|
+
"fundamentum_0.1.2_linux_arm64.tar.gz": "0c5dd67a622553124bbfe6d480e691d895dab1fddf0461e9f42f81db87e9d0d4",
|
|
64
|
+
"fundamentum_0.1.2_windows_amd64.zip": "5c0867554b208e6bf502eee9fb5897a67ae94d88ab41031a5f70169fabe9de08"
|
|
65
65
|
}
|
|
66
66
|
}
|