two-stroke 7.6.7 → 7.7.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/.dev.vars +13 -0
- package/bin/lint.mjs +1 -16
- package/bin/test.mjs +6 -9
- package/bin/type-check.mjs +1 -16
- package/package.json +11 -12
- package/worker-configuration.d.ts +13034 -11756
package/.dev.vars
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
KINESIS_STREAM_NAME_V2='stats-staging'
|
|
2
|
+
LABS_PRIVATE_KEY='-----BEGIN PRIVATE KEY-----
|
|
3
|
+
MHcCAQEEIIxvGyCDhlUPt/qtN5f/hC4E+hZwDuXYuWkuyfXvryODoAoGCCqGSM49
|
|
4
|
+
AwEHoUQDQgAEiF1qwGKkrcJqKKZfrjhNBSNGQVIirBf/EqQew3AX5CPulJ8zWCtJ
|
|
5
|
+
5j1TPJ7eYk4yggf3ev9itLQkldcN2iio9w==
|
|
6
|
+
-----END PRIVATE KEY-----'
|
|
7
|
+
SENTRY_DSN=''
|
|
8
|
+
SENTRY_ENVIRONMENT='dev'
|
|
9
|
+
SENTRY_TRACES_SAMPLE_RATE='0.0'
|
|
10
|
+
SLACK_SUPABASE_PUBLIC_KEY=''
|
|
11
|
+
TOKEN_AUDIENCE='https://app.staging.changeengine.com'
|
|
12
|
+
TOKEN_HASH='djAxK53LHnKwRRNu3XUKxhmpFwGGoP/+pPcWvtmFh11/gvE7O83xi8DXR0USwOZAtAdbIlnU'
|
|
13
|
+
TOKEN_ISSUER='https://ce-staging.us.auth0.com/'
|
package/bin/lint.mjs
CHANGED
|
@@ -4,22 +4,7 @@ import fs from "fs";
|
|
|
4
4
|
import { cmd } from "../src/cmd.mjs";
|
|
5
5
|
|
|
6
6
|
if (fs.existsSync("wrangler.jsonc")) {
|
|
7
|
-
|
|
8
|
-
const backed = [];
|
|
9
|
-
|
|
10
|
-
for (const file of devVarsFiles) {
|
|
11
|
-
const tmp = file + ".bak.bak";
|
|
12
|
-
fs.renameSync(file, tmp);
|
|
13
|
-
backed.push({ original: file, tmp });
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
try {
|
|
17
|
-
cmd("wrangler types --strict-vars false --check");
|
|
18
|
-
} finally {
|
|
19
|
-
for (const { original, tmp } of backed) {
|
|
20
|
-
fs.renameSync(tmp, original);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
7
|
+
cmd("wrangler types --env-file /dev/null --strict-vars false --check");
|
|
23
8
|
}
|
|
24
9
|
cmd("eslint --cache --max-warnings=0");
|
|
25
10
|
cmd("prettier --cache --check .");
|
package/bin/test.mjs
CHANGED
|
@@ -6,22 +6,19 @@ 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 { unstable_startWorker } from "wrangler";
|
|
10
10
|
|
|
11
11
|
if (fs.existsSync("wrangler.jsonc")) {
|
|
12
12
|
cmd("wrangler deploy --env= --dry-run --outdir=dist");
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
scriptPath: "dist/index.js",
|
|
16
|
-
compatibilityDate: "2024-09-23",
|
|
17
|
-
compatibilityFlags: ["nodejs_compat"],
|
|
13
|
+
const worker = await unstable_startWorker({
|
|
14
|
+
config: "wrangler.jsonc",
|
|
18
15
|
});
|
|
19
|
-
const request = await fetch(
|
|
20
|
-
|
|
16
|
+
const request = await worker.fetch(
|
|
17
|
+
"http://example.com/doc",
|
|
21
18
|
{ SENTRY_DSN: null, SENTRY_ENVIRONMENT: null },
|
|
22
19
|
null,
|
|
23
20
|
);
|
|
24
|
-
await
|
|
21
|
+
await worker.dispose();
|
|
25
22
|
if (request.status === 200) {
|
|
26
23
|
const types = await openapiTS(await consumers.json(request.body));
|
|
27
24
|
const printer = ts.createPrinter({});
|
package/bin/type-check.mjs
CHANGED
|
@@ -4,22 +4,7 @@ import fs from "fs";
|
|
|
4
4
|
import { cmd } from "../src/cmd.mjs";
|
|
5
5
|
|
|
6
6
|
if (fs.existsSync("wrangler.jsonc")) {
|
|
7
|
-
|
|
8
|
-
const backed = [];
|
|
9
|
-
|
|
10
|
-
for (const file of devVarsFiles) {
|
|
11
|
-
const tmp = file + ".bak.bak";
|
|
12
|
-
fs.renameSync(file, tmp);
|
|
13
|
-
backed.push({ original: file, tmp });
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
try {
|
|
17
|
-
cmd("wrangler types --strict-vars false");
|
|
18
|
-
} finally {
|
|
19
|
-
for (const { original, tmp } of backed) {
|
|
20
|
-
fs.renameSync(tmp, original);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
7
|
+
cmd("wrangler types --env-file /dev/null --strict-vars false");
|
|
23
8
|
}
|
|
24
9
|
cmd("wrangler deploy --env= --dry-run --outdir=dist");
|
|
25
10
|
cmd("tsc --noEmit");
|
package/package.json
CHANGED
|
@@ -10,24 +10,23 @@
|
|
|
10
10
|
"type-check": "./bin/type-check.mjs"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@cloudflare/vitest-pool-workers": "^0.
|
|
14
|
-
"@sentry/cli": "^3.
|
|
15
|
-
"@types/node": "^26.0
|
|
16
|
-
"@typescript-eslint/eslint-plugin": "^8.62.
|
|
17
|
-
"@typescript-eslint/parser": "^8.
|
|
13
|
+
"@cloudflare/vitest-pool-workers": "^0.18.0",
|
|
14
|
+
"@sentry/cli": "^3.6.0",
|
|
15
|
+
"@types/node": "^26.1.0",
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^8.62.1",
|
|
17
|
+
"@typescript-eslint/parser": "^8.62.1",
|
|
18
18
|
"@vitest/runner": "^4.1.8",
|
|
19
19
|
"@vitest/snapshot": "^4.1.8",
|
|
20
20
|
"eslint-config-prettier": "^10.1.8",
|
|
21
|
-
"eslint-config-two-stroke": "^1.5.
|
|
21
|
+
"eslint-config-two-stroke": "^1.5.7",
|
|
22
22
|
"eslint-config-typescript": "^3.0.0",
|
|
23
23
|
"jose": "^6.2.3",
|
|
24
|
-
"jwk-subtle": "^1.1.
|
|
24
|
+
"jwk-subtle": "^1.1.8",
|
|
25
25
|
"mime": "^4.1.0",
|
|
26
|
-
"miniflare": "^4.20260603.0",
|
|
27
26
|
"msw": "^2.14.6",
|
|
28
27
|
"openapi-fetch": "^0.17.0",
|
|
29
28
|
"openapi-typescript": "^7.13.0",
|
|
30
|
-
"pbkdf-subtle": "^1.1.
|
|
29
|
+
"pbkdf-subtle": "^1.1.8",
|
|
31
30
|
"toucan-js": "^4.1.1",
|
|
32
31
|
"zod": "^4.4.3"
|
|
33
32
|
},
|
|
@@ -59,11 +58,11 @@
|
|
|
59
58
|
"url": "https://github.com/change-engine/two-stroke"
|
|
60
59
|
},
|
|
61
60
|
"type": "module",
|
|
62
|
-
"version": "7.
|
|
61
|
+
"version": "7.7.0",
|
|
63
62
|
"devDependencies": {
|
|
64
63
|
"@types/eslint": "^9.6.1",
|
|
65
|
-
"eslint": "^10.
|
|
66
|
-
"prettier": "^3.
|
|
64
|
+
"eslint": "^10.6.0",
|
|
65
|
+
"prettier": "^3.9.4",
|
|
67
66
|
"typescript": "^6.0.3",
|
|
68
67
|
"vitest": "^4.1.8"
|
|
69
68
|
}
|