two-stroke 7.7.0 → 7.7.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/bin/test.mjs +9 -6
- package/package.json +2 -1
package/bin/test.mjs
CHANGED
|
@@ -6,19 +6,22 @@ import consumers from "stream/consumers";
|
|
|
6
6
|
import openapiTS from "openapi-typescript";
|
|
7
7
|
import prettier from "prettier";
|
|
8
8
|
import ts from "typescript";
|
|
9
|
-
import {
|
|
9
|
+
import { Miniflare } from "miniflare";
|
|
10
10
|
|
|
11
11
|
if (fs.existsSync("wrangler.jsonc")) {
|
|
12
12
|
cmd("wrangler deploy --env= --dry-run --outdir=dist");
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const miniflare = new Miniflare({
|
|
14
|
+
modules: true,
|
|
15
|
+
scriptPath: "dist/index.js",
|
|
16
|
+
compatibilityDate: "2024-09-23",
|
|
17
|
+
compatibilityFlags: ["nodejs_compat"],
|
|
15
18
|
});
|
|
16
|
-
const request = await
|
|
17
|
-
|
|
19
|
+
const request = await fetch(
|
|
20
|
+
`${await miniflare.ready}doc`,
|
|
18
21
|
{ SENTRY_DSN: null, SENTRY_ENVIRONMENT: null },
|
|
19
22
|
null,
|
|
20
23
|
);
|
|
21
|
-
await
|
|
24
|
+
await miniflare.dispose();
|
|
22
25
|
if (request.status === 200) {
|
|
23
26
|
const types = await openapiTS(await consumers.json(request.body));
|
|
24
27
|
const printer = ts.createPrinter({});
|
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"jose": "^6.2.3",
|
|
24
24
|
"jwk-subtle": "^1.1.8",
|
|
25
25
|
"mime": "^4.1.0",
|
|
26
|
+
"miniflare": "^4.20260701.0",
|
|
26
27
|
"msw": "^2.14.6",
|
|
27
28
|
"openapi-fetch": "^0.17.0",
|
|
28
29
|
"openapi-typescript": "^7.13.0",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"url": "https://github.com/change-engine/two-stroke"
|
|
59
60
|
},
|
|
60
61
|
"type": "module",
|
|
61
|
-
"version": "7.7.
|
|
62
|
+
"version": "7.7.1",
|
|
62
63
|
"devDependencies": {
|
|
63
64
|
"@types/eslint": "^9.6.1",
|
|
64
65
|
"eslint": "^10.6.0",
|