two-stroke 1.0.1 → 1.0.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/bin/deploy.mjs +0 -0
- package/bin/test.mjs +7 -4
- package/package.json +3 -2
- package/src/test.ts +0 -19
package/bin/deploy.mjs
CHANGED
|
File without changes
|
package/bin/test.mjs
CHANGED
|
@@ -16,7 +16,10 @@ if (fs.existsSync("wrangler.toml")) {
|
|
|
16
16
|
const types = await openapiTS(await consumers.json(request.body));
|
|
17
17
|
fs.writeFileSync("test/api.d.ts", types);
|
|
18
18
|
}
|
|
19
|
-
await cmd(
|
|
20
|
-
"
|
|
21
|
-
process.argv.slice(2)
|
|
22
|
-
|
|
19
|
+
await cmd("vitest --globals --no-file-parallelism --coverage", [
|
|
20
|
+
...(!process.argv.slice(2).includes("-w") &&
|
|
21
|
+
!process.argv.slice(2).includes("--watch")
|
|
22
|
+
? ["--run"]
|
|
23
|
+
: []),
|
|
24
|
+
...process.argv.slice(2),
|
|
25
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bin": {
|
|
3
|
+
"deploy": "./bin/deploy.mjs",
|
|
3
4
|
"dev": "./bin/dev.mjs",
|
|
4
5
|
"format": "./bin/format.mjs",
|
|
5
6
|
"lint": "./bin/lint.mjs",
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
"eslint-config-typescript": "^3.0.0",
|
|
20
21
|
"jwk-subtle": "^1.0.6",
|
|
21
22
|
"miniflare": "^3.20240129.1",
|
|
22
|
-
"openapi-fetch": "^0.
|
|
23
|
+
"openapi-fetch": "^0.9.0",
|
|
23
24
|
"openapi-typescript": "^6.7.4",
|
|
24
25
|
"openapi3-ts": "^4.2.1",
|
|
25
26
|
"pbkdf-subtle": "^1.0.0",
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"name": "two-stroke",
|
|
50
51
|
"packageManager": "yarn@4.1.0",
|
|
51
52
|
"type": "module",
|
|
52
|
-
"version": "1.0.
|
|
53
|
+
"version": "1.0.2",
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@types/eslint": "^8.56.2",
|
|
55
56
|
"@types/node": "^20.11.17",
|
package/src/test.ts
CHANGED
|
@@ -53,25 +53,6 @@ export const setupTests = async <Paths extends {}>(bindings: Env) => {
|
|
|
53
53
|
miniflare,
|
|
54
54
|
fetchMock,
|
|
55
55
|
client,
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
57
|
-
testFetch(path: string, config: any) {
|
|
58
|
-
const contentType = config.body
|
|
59
|
-
? config.headers["Content-Type"] ?? "application/json"
|
|
60
|
-
: null;
|
|
61
|
-
return fetch(`${url}${path}`, {
|
|
62
|
-
...config,
|
|
63
|
-
headers: {
|
|
64
|
-
...(config.body ? { "Content-Type": contentType } : {}),
|
|
65
|
-
...(config.headers ?? {}),
|
|
66
|
-
},
|
|
67
|
-
body:
|
|
68
|
-
contentType === "application/json"
|
|
69
|
-
? JSON.stringify(config.body)
|
|
70
|
-
: contentType === "application/x-www-form-urlencoded"
|
|
71
|
-
? new URLSearchParams(config.body)
|
|
72
|
-
: null,
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
56
|
async waitForQueue(trigger: () => Promise<void>) {
|
|
76
57
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
58
|
const log: any = [];
|