@supertst/api 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.
Files changed (3) hide show
  1. package/README.md +52 -0
  2. package/package.json +22 -0
  3. package/src/index.ts +12908 -0
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # @supertst/api
2
+
3
+ SDK client generated from the Supertest API schema.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ bun install
9
+ ```
10
+
11
+ ## Generate `src/index.ts`
12
+
13
+ Regenerate the SDK from the remote OpenAPI schema:
14
+
15
+ ```bash
16
+ bun run generate
17
+ ```
18
+
19
+ This command runs `src/generate.ts` and overwrites `src/index.ts`.
20
+
21
+ ## Publish flow
22
+
23
+ Publishing is automated with GitHub Actions on every push to `main`.
24
+
25
+ Versioning is manual. Before pushing a new release to `main`, update `version` in `package.json`.
26
+
27
+ Example:
28
+
29
+ ```json
30
+ {
31
+ "version": "0.1.1"
32
+ }
33
+ ```
34
+
35
+ Then push to `main` and GitHub Actions will run:
36
+
37
+ ```bash
38
+ bun publish --access public --tolerate-republish
39
+ ```
40
+
41
+ If that exact version already exists on npm, the workflow will not fail because it uses `--tolerate-republish`.
42
+
43
+ ## Commits
44
+
45
+ Commits no longer control versioning.
46
+
47
+ Use any clear commit message you want, for example:
48
+
49
+ ```bash
50
+ git commit -m "update sdk generation workflow"
51
+ git commit -m "fix publish action"
52
+ ```
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@supertst/api",
3
+ "version": "0.1.0",
4
+ "module": "src/index.ts",
5
+ "type": "module",
6
+ "files": [
7
+ "src/index.ts"
8
+ ],
9
+ "scripts": {
10
+ "generate": "bun run src/generate.ts"
11
+ },
12
+ "devDependencies": {
13
+ "@types/bun": "latest",
14
+ "swagger-typescript-api": "^13.6.7"
15
+ },
16
+ "peerDependencies": {
17
+ "typescript": "^5"
18
+ },
19
+ "exports": {
20
+ ".": "./src/index.ts"
21
+ }
22
+ }