@testingai/pkg-golang 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/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -0
- package/stub/README.md +11 -0
- package/stub/STUB_PROVENANCE.md +15 -0
- package/stub/cmd/hello/main.go +11 -0
- package/stub/cmd/hello/main_test.go +9 -0
- package/stub/go.mod +3 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a handle for a **fresh** Go modules preset. The fixture app is vendored under `stub/`
|
|
3
|
+
* (minimal `cmd/hello` module); see `stub/STUB_PROVENANCE.md`.
|
|
4
|
+
*/
|
|
5
|
+
export declare function golangProject(): import("@testingai/testai").TestProject;
|
|
6
|
+
export type { CreateProjectInput, CreateProjectOptions, TestProject, } from "@testingai/testai";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,aAAa,4CAE5B;AAED,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GACZ,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createPresetProject } from "@testingai/testai";
|
|
2
|
+
/**
|
|
3
|
+
* Returns a handle for a **fresh** Go modules preset. The fixture app is vendored under `stub/`
|
|
4
|
+
* (minimal `cmd/hello` module); see `stub/STUB_PROVENANCE.md`.
|
|
5
|
+
*/
|
|
6
|
+
export function golangProject() {
|
|
7
|
+
return createPresetProject({ kind: "golang" });
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,mBAAmB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACjD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@testingai/pkg-golang",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Go modules fixture preset for @testingai/testai (see `stub/` vendored cmd/hello module).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20"
|
|
9
|
+
},
|
|
10
|
+
"files": ["dist", "stub"],
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc -p tsconfig.build.json",
|
|
21
|
+
"clean": "rm -rf dist",
|
|
22
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
23
|
+
"test": "node --import tsx --test test/*.test.ts"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@testingai/testai": "0.1.0"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
}
|
|
31
|
+
}
|
package/stub/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# stub-golang
|
|
2
|
+
|
|
3
|
+
Minimal Go module fixture (`cmd/hello`) for `@testingai/pkg-golang` harness presets.
|
|
4
|
+
|
|
5
|
+
See [STUB_PROVENANCE.md](./STUB_PROVENANCE.md) for origin and version pins.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
go test ./...
|
|
9
|
+
go build -o bin/hello ./cmd/hello
|
|
10
|
+
./bin/hello
|
|
11
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Stub provenance
|
|
2
|
+
|
|
3
|
+
This directory is a **vendored application fixture** (Go modules layout for harness presets).
|
|
4
|
+
|
|
5
|
+
## Origin
|
|
6
|
+
|
|
7
|
+
- **Template:** [Create a Go module](https://go.dev/doc/tutorial/create-module) (`cmd/` + root `go.mod` layout), trimmed to a single `cmd/hello` command with one unit test.
|
|
8
|
+
- **Module path:** `github.com/testingai/stub-golang` (fixture-only; not published).
|
|
9
|
+
- **Go toolchain pin:** `go 1.22` in `go.mod` (2026-05-17).
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
- `go test ./...`
|
|
14
|
+
- `go build -o bin/hello ./cmd/hello`
|
|
15
|
+
- `./bin/hello` (prints `hello, world`)
|
package/stub/go.mod
ADDED