docs(encrypt): update Go implementation status to Available

Also fix shell command injection in bench.ts and simplify build script.
This commit is contained in:
Cell
2026-07-21 16:23:08 +08:00
parent 2c0b48370b
commit 15b415ff2e
4 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{{- hugo.Store.Set "version" "v1.0.0-mrti3b6h" -}}
{{- hugo.Store.Set "version" "v1.0.0-mrudz3q9" -}}
{{- .Store.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
+1 -1
View File
@@ -34,7 +34,7 @@
"dev:docs": "hugo server --source=../fixit-docs -D --disableFastRender --navigateToChanged --ignoreCache -O",
"build:demo": "pnpm -F demo build",
"build:test": "pnpm -F test build",
"build": "concurrently 'pnpm build:demo' 'pnpm build:test' && pnpm -F integration start && pnpm encrypt && pnpm encrypt --verify",
"build": "concurrently 'pnpm build:demo' 'pnpm build:test' && pnpm -F integration start && pnpm encrypt",
"encrypt": "pnpm -F encrypt start",
"clean": "rm -rf public resources/_gen apps/*/public apps/*/resources/_gen",
"preview": "serve public",
+8 -6
View File
@@ -99,12 +99,14 @@ The per-template cost is constant regardless of file count or content size, as P
The current implementation is in **Node.js (TypeScript)**. For environments where Node.js performance is a bottleneck, community-maintained implementations in other languages are welcome:
| Language | Status | Repository |
| -------- | --------- | ---------------- |
| Node.js | Available | hugo-fixit/FixIt |
| Python | Planned | — |
| Go | Planned | — |
| Rust | Planned | — |
| Language | Status | Repository |
| -------- | --------- | ------------------ |
| Node.js | Available | hugo-fixit/FixIt |
| Go | Available | [fixit-encrypt.go] |
| Python | Planned | — |
| Rust | Planned | — |
[fixit-encrypt.go]: https://github.com/hugo-fixit/fixit-encrypt.go
If you have implemented `fixit-encrypt` in another language, please open a PR to add it to this list.
+2 -2
View File
@@ -1,4 +1,4 @@
import { execSync } from 'node:child_process'
import { execFileSync, execSync } from 'node:child_process'
import { writeFileSync } from 'node:fs'
import { dirname } from 'node:path'
import { performance } from 'node:perf_hooks'
@@ -35,7 +35,7 @@ function setup(fileCount: number, templatesPerFile: number, templateSize: string
function run(): number {
const start = performance.now()
execSync(`npx tsx ${__dirname}/../index.ts --input ${BENCH_DIR}`, {
execFileSync('npx', ['tsx', `${__dirname}/../index.ts`, '--input', BENCH_DIR], {
encoding: 'utf8',
cwd: __dirname,
})