fastygo 0.1.0 → 0.1.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/LICENSE +21 -0
- package/README.md +41 -0
- package/bin/fastygo.js +38 -0
- package/binaries/fastygo-darwin-arm64 +0 -0
- package/binaries/fastygo-linux-amd64 +0 -0
- package/binaries/fastygo-windows-amd64.exe +0 -0
- package/package.json +15 -3
- package/.cursorignore +0 -2
- package/go.mod +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FastyGo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# fastygo
|
|
2
|
+
|
|
3
|
+
`fastygo` installs a site once. After that, versions live in the project's `go.mod`. There is no project YAML and no `packageManager` field.
|
|
4
|
+
|
|
5
|
+
This release installs:
|
|
6
|
+
|
|
7
|
+
- `github.com/fastygo/framework` v0.4.0
|
|
8
|
+
- `github.com/fastygo/modules/render` v0.1.0 and templ v0.3.1001 as `go tool templ`
|
|
9
|
+
- optional markdown, view, and a local Codex bbolt binary from `github.com/fastygo/backend/cmd/server` v0.1.0
|
|
10
|
+
|
|
11
|
+
Targets are `local` and `vps`. The process listens on `127.0.0.1`.
|
|
12
|
+
|
|
13
|
+
## Install the command
|
|
14
|
+
|
|
15
|
+
Any of these runs the v0.1.0 binary packed inside the npm package. The package version is 0.1.1 because 0.1.0 was published empty. The git repository is private, so the package carries the binary instead of downloading the GitHub release.
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
npx fastygo init . --module github.com/you/shop
|
|
19
|
+
pnpm dlx fastygo init . --module github.com/you/shop
|
|
20
|
+
yarn dlx fastygo init . --module github.com/you/shop
|
|
21
|
+
bunx fastygo init . --module github.com/you/shop
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
From the Go module:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
go install github.com/fastygo/cli/cmd/fastygo@v0.1.0
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Linux amd64 and macOS arm64 can also use `install.sh`. It checks `SHA256SUMS` and prints the binary path.
|
|
31
|
+
|
|
32
|
+
If Go 1.25 is missing, `init` offers to download it into the user cache before it writes the project. `--yes` accepts that download when stdin is not a terminal.
|
|
33
|
+
|
|
34
|
+
## First site
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
fastygo init . --module github.com/you/shop --target vps --with codex
|
|
38
|
+
go run ./cmd/site
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`fastygo init --help` lists the flags. A second `init` stops when `go.mod` is already there. `fastygo add markdown` updates that module.
|
package/bin/fastygo.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the fastygo binary shipped in this package.
|
|
3
|
+
// npx, pnpm dlx, yarn dlx, and bunx all use this file.
|
|
4
|
+
|
|
5
|
+
import { spawn } from "node:child_process";
|
|
6
|
+
import { chmodSync, existsSync } from "node:fs";
|
|
7
|
+
import { arch, platform } from "node:os";
|
|
8
|
+
import { dirname, join } from "node:path";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
|
|
11
|
+
const version = "0.1.0";
|
|
12
|
+
|
|
13
|
+
const packed = {
|
|
14
|
+
"win32-x64": "fastygo-windows-amd64.exe",
|
|
15
|
+
"linux-x64": "fastygo-linux-amd64",
|
|
16
|
+
"darwin-arm64": "fastygo-darwin-arm64",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const key = `${platform()}-${arch()}`;
|
|
20
|
+
const name = packed[key];
|
|
21
|
+
if (!name) {
|
|
22
|
+
console.error(`fastygo ${version} publishes binaries for windows/amd64, linux/amd64, and darwin/arm64 (this system is ${key}).`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const binary = join(dirname(fileURLToPath(import.meta.url)), "..", "binaries", name);
|
|
27
|
+
if (!existsSync(binary)) {
|
|
28
|
+
console.error(`missing ${binary}`);
|
|
29
|
+
console.error(`From a checkout of the module: go install github.com/fastygo/cli/cmd/fastygo@v${version}`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
if (platform() !== "win32") chmodSync(binary, 0o755);
|
|
33
|
+
|
|
34
|
+
const child = spawn(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
35
|
+
child.on("exit", (code, signal) => {
|
|
36
|
+
if (signal) process.kill(process.pid, signal);
|
|
37
|
+
process.exit(code ?? 1);
|
|
38
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastygo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "FastyGo",
|
|
6
|
-
"description": "FastyGo
|
|
6
|
+
"description": "Install a FastyGo site once. Versions stay in the project's go.mod.",
|
|
7
|
+
"bin": {
|
|
8
|
+
"fastygo": "bin/fastygo.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/fastygo.js",
|
|
12
|
+
"binaries",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
7
16
|
"publishConfig": {
|
|
8
17
|
"access": "public"
|
|
9
18
|
},
|
|
10
|
-
"license": "MIT"
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18"
|
|
22
|
+
}
|
|
11
23
|
}
|
package/.cursorignore
DELETED
package/go.mod
DELETED