two-stroke 1.0.22 → 1.0.24

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 (2) hide show
  1. package/package.json +14 -14
  2. package/src/test.ts +20 -34
package/package.json CHANGED
@@ -9,21 +9,21 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@anatine/zod-openapi": "^2.2.5",
12
- "@asteasolutions/zod-to-openapi": "^7.0.0",
13
- "@cloudflare/workers-types": "^4.20240502.0",
14
- "@sentry/cli": "^2.31.2",
15
- "@typescript-eslint/eslint-plugin": "^7.8.0",
16
- "@typescript-eslint/parser": "^7.8.0",
12
+ "@asteasolutions/zod-to-openapi": "^7.1.0",
13
+ "@cloudflare/workers-types": "^4.20240614.0",
14
+ "@sentry/cli": "^2.32.1",
15
+ "@typescript-eslint/eslint-plugin": "^7.13.0",
16
+ "@typescript-eslint/parser": "^7.13.0",
17
17
  "@vitest/coverage-v8": "^1.6.0",
18
18
  "eslint-config-prettier": "^9.1.0",
19
- "eslint-config-two-stroke": "^1.0.6",
19
+ "eslint-config-two-stroke": "^1.0.7",
20
20
  "eslint-config-typescript": "^3.0.0",
21
- "jose": "^5.3.0",
21
+ "jose": "^5.4.0",
22
22
  "jwk-subtle": "^1.0.7",
23
- "miniflare": "^3.20240419.1",
24
- "openapi-fetch": "^0.9.5",
25
- "openapi-typescript": "^6.7.5",
26
- "openapi3-ts": "^4.3.1",
23
+ "miniflare": "^3.20240610.0",
24
+ "openapi-fetch": "^0.9.7",
25
+ "openapi-typescript": "^6.7.6",
26
+ "openapi3-ts": "^4.3.3",
27
27
  "pbkdf-subtle": "^1.0.0",
28
28
  "toml": "^3.0.0",
29
29
  "toucan-js": "^3.4.0",
@@ -51,12 +51,12 @@
51
51
  "name": "two-stroke",
52
52
  "packageManager": "yarn@4.1.0",
53
53
  "type": "module",
54
- "version": "1.0.22",
54
+ "version": "1.0.24",
55
55
  "devDependencies": {
56
56
  "@types/eslint": "^8.56.10",
57
- "@types/node": "^20.12.11",
57
+ "@types/node": "^20.14.2",
58
58
  "eslint": "^8.57.0",
59
- "prettier": "^3.2.5",
59
+ "prettier": "^3.3.2",
60
60
  "typescript": "^5.4.5",
61
61
  "vitest": "^1.6.0"
62
62
  }
package/src/test.ts CHANGED
@@ -14,8 +14,16 @@ export const setupTests = async <Paths extends {}>(bindings: Env) => {
14
14
  const fetchMock = createFetchMock();
15
15
  fetchMock.disableNetConnect();
16
16
 
17
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
18
- const config = toml.parse(fs.readFileSync("wrangler.toml", "utf8"));
17
+ const config = toml.parse(fs.readFileSync("wrangler.toml", "utf8")) as {
18
+ queues?: {
19
+ consumers?: { queue: string }[];
20
+ producers?: { queue: string; binding: string }[];
21
+ };
22
+ r2_buckets?: { binding: string }[];
23
+ kv_namespaces?: { binding: string }[];
24
+ d1_databases?: { binding: string }[];
25
+ services?: { binding: string; service: string }[];
26
+ };
19
27
 
20
28
  const miniflare = new Miniflare({
21
29
  modules: true,
@@ -25,39 +33,18 @@ export const setupTests = async <Paths extends {}>(bindings: Env) => {
25
33
  "djAxlhzT1IU9QIP3UKdipECQPAGGoPQK86/GnTBcbHLtPC3ni6JkTQ/iIeF0KG0y1CZ+J+9W",
26
34
  ...bindings,
27
35
  },
28
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
29
- queueConsumers: (config.queues?.consumers ?? []).map(
30
- ({ queue }: { queue: string }) => queue,
31
- ),
36
+ queueConsumers: (config.queues?.consumers ?? []).map(({ queue }) => queue),
32
37
  queueProducers: Object.fromEntries(
33
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
34
- (config.queues?.producers ?? []).map(
35
- ({ binding, queue }: { queue: string; binding: string }) => [
36
- binding,
37
- queue,
38
- ],
39
- ),
38
+ (config.queues?.producers ?? []).map(({ binding, queue }) => [
39
+ binding,
40
+ queue,
41
+ ]),
40
42
  ) as Record<string, string>,
41
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
42
- r2Buckets: (config.r2_buckets ?? []).map(
43
- ({ binding }: { binding: string }) => binding,
44
- ),
45
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
46
- kvNamespaces: (config.kv_namespaces ?? []).map(
47
- ({ binding }: { binding: string }) => binding,
48
- ),
49
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
50
- d1Databases: (config.d1_databases ?? []).map(
51
- ({ binding }: { binding: string }) => binding,
52
- ),
43
+ r2Buckets: (config.r2_buckets ?? []).map(({ binding }) => binding),
44
+ kvNamespaces: (config.kv_namespaces ?? []).map(({ binding }) => binding),
45
+ d1Databases: (config.d1_databases ?? []).map(({ binding }) => binding),
53
46
  serviceBindings: Object.fromEntries(
54
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
55
- (config.services ?? []).map(
56
- ({ binding, service }: { binding: string; service: string }) => [
57
- binding,
58
- service,
59
- ],
60
- ),
47
+ (config.services ?? []).map(({ binding, service }) => [binding, service]),
61
48
  ),
62
49
  fetchMock,
63
50
  });
@@ -115,11 +102,10 @@ export const setupTests = async <Paths extends {}>(bindings: Env) => {
115
102
  client,
116
103
  async waitForQueue(trigger: () => Promise<void>) {
117
104
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
118
- const log: any = [];
105
+ const log: any[] = [];
119
106
  const orig = console.log;
120
107
  console.log = function (message) {
121
108
  orig(message);
122
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
123
109
  log.push(message);
124
110
  };
125
111
  await trigger();