two-stroke 8.0.8 → 8.0.10
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/package.json +2 -2
- package/pnpm-workspace.yaml +5 -12
- package/patches/openapi-typescript.patch +0 -228
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "two-stroke",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.10",
|
|
4
4
|
"description": "Simple Cloudflare Worker framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"openapi-fetch": "^0.17.0",
|
|
27
27
|
"openapi-typescript": "^7.13.0",
|
|
28
28
|
"toucan-js": "^4.1.1",
|
|
29
|
+
"typescript": "^6.0.3",
|
|
29
30
|
"zod": "^4.4.3"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
@@ -34,7 +35,6 @@
|
|
|
34
35
|
"oxfmt": "^0.59.0",
|
|
35
36
|
"oxlint": "^1.74.0",
|
|
36
37
|
"oxlint-tsgolint": "^0.25.0",
|
|
37
|
-
"typescript": "^7.0.2",
|
|
38
38
|
"vitest": "^4.1.10"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
blockExoticSubdeps: true
|
|
2
|
-
|
|
3
|
-
ignoreScripts: true
|
|
4
|
-
|
|
5
1
|
minimumReleaseAge: 4320
|
|
6
|
-
|
|
7
2
|
minimumReleaseAgeExclude:
|
|
8
|
-
- jwk-subtle
|
|
9
|
-
- pbkdf-subtle
|
|
10
|
-
- eslint-config-two-stroke
|
|
11
|
-
|
|
12
|
-
patchedDependencies:
|
|
13
|
-
openapi-typescript: patches/openapi-typescript.patch
|
|
14
|
-
|
|
3
|
+
- "jwk-subtle"
|
|
4
|
+
- "pbkdf-subtle"
|
|
5
|
+
- "eslint-config-two-stroke"
|
|
15
6
|
trustPolicy: no-downgrade
|
|
7
|
+
ignoreScripts: true
|
|
8
|
+
blockExoticSubdeps: true
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
diff --git a/package.json b/package.json
|
|
2
|
-
index 4893afdec25f506f62d44f64fe0861c411cb7fae..ff6d390d9ad20f421dfda5f45c267d4fa0f2d448 100644
|
|
3
|
-
--- a/package.json
|
|
4
|
-
+++ b/package.json
|
|
5
|
-
@@ -42,7 +42,7 @@
|
|
6
|
-
"url": "https://github.com/openapi-ts/openapi-typescript/issues"
|
|
7
|
-
},
|
|
8
|
-
"peerDependencies": {
|
|
9
|
-
- "typescript": "^5.x"
|
|
10
|
-
+ "@typescript/typescript6": "^6.x"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@redocly/openapi-core": "^1.34.6",
|
|
14
|
-
@@ -58,7 +58,7 @@
|
|
15
|
-
"degit": "2.8.4",
|
|
16
|
-
"execa": "^9.6.1",
|
|
17
|
-
"strip-ansi": "7.1.2",
|
|
18
|
-
- "typescript": "^5.9.3",
|
|
19
|
-
+ "@typescript/typescript6": "^6.0.0",
|
|
20
|
-
"vite-node": "5.3.0"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
diff --git a/src/index.ts b/src/index.ts
|
|
24
|
-
index d042b81e40cc354c1f5e16072ff5d65478d41780..6ac68a46dc9fc3b5829f7dcd69ec8ed16436e5ac 100644
|
|
25
|
-
--- a/src/index.ts
|
|
26
|
-
+++ b/src/index.ts
|
|
27
|
-
@@ -1,7 +1,7 @@
|
|
28
|
-
import { performance } from "node:perf_hooks";
|
|
29
|
-
import type { Readable } from "node:stream";
|
|
30
|
-
import { createConfig } from "@redocly/openapi-core";
|
|
31
|
-
-import type ts from "typescript";
|
|
32
|
-
+import type ts from "@typescript/typescript6";
|
|
33
|
-
import { validateAndBundle } from "./lib/redoc.js";
|
|
34
|
-
import { debug, resolveRef, scanDiscriminators } from "./lib/utils.js";
|
|
35
|
-
import transformSchema from "./transform/index.js";
|
|
36
|
-
diff --git a/src/lib/ts.ts b/src/lib/ts.ts
|
|
37
|
-
index d1f41eb8844dee5157a5b38130a2e2dbd1a34b1e..fd3b8213ebb97437c0a3363ced1e9b5ce9663896 100644
|
|
38
|
-
--- a/src/lib/ts.ts
|
|
39
|
-
+++ b/src/lib/ts.ts
|
|
40
|
-
@@ -1,6 +1,6 @@
|
|
41
|
-
import type { OasRef, Referenced } from "@redocly/openapi-core";
|
|
42
|
-
import { parseRef } from "@redocly/openapi-core/lib/ref-utils.js";
|
|
43
|
-
-import ts, { type LiteralTypeNode, type TypeLiteralNode } from "typescript";
|
|
44
|
-
+import ts, { type LiteralTypeNode, type TypeLiteralNode } from "@typescript/typescript6";
|
|
45
|
-
import type { ParameterObject } from "../types.js";
|
|
46
|
-
|
|
47
|
-
export const JS_PROPERTY_INDEX_RE = /^[A-Za-z_$][A-Za-z_$0-9]*$/;
|
|
48
|
-
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
|
|
49
|
-
index 49c19242224e6a8e12cdb65d7c07a7ddbf655ad8..4c2a54c5459d1c84b3009917b26d61a2faa0d006 100644
|
|
50
|
-
--- a/src/lib/utils.ts
|
|
51
|
-
+++ b/src/lib/utils.ts
|
|
52
|
-
@@ -1,7 +1,7 @@
|
|
53
|
-
import { escapePointer, parseRef } from "@redocly/openapi-core/lib/ref-utils.js";
|
|
54
|
-
import c from "ansi-colors";
|
|
55
|
-
import supportsColor from "supports-color";
|
|
56
|
-
-import ts from "typescript";
|
|
57
|
-
+import ts from "@typescript/typescript6";
|
|
58
|
-
import type { DiscriminatorObject, OpenAPI3, OpenAPITSOptions, ReferenceObject, SchemaObject } from "../types.js";
|
|
59
|
-
import { tsLiteral, tsModifiers, tsPropertyIndex } from "./ts.js";
|
|
60
|
-
|
|
61
|
-
diff --git a/src/transform/components-object.ts b/src/transform/components-object.ts
|
|
62
|
-
index 0a5bdecacfc6dda64e525d232ae99e8212948cda..b069a38e2f89a8a59b650020cf85e5ec2cb00db4 100644
|
|
63
|
-
--- a/src/transform/components-object.ts
|
|
64
|
-
+++ b/src/transform/components-object.ts
|
|
65
|
-
@@ -1,6 +1,6 @@
|
|
66
|
-
import { performance } from "node:perf_hooks";
|
|
67
|
-
import * as changeCase from "change-case";
|
|
68
|
-
-import ts from "typescript";
|
|
69
|
-
+import ts from "@typescript/typescript6";
|
|
70
|
-
import { addJSDocComment, NEVER, QUESTION_TOKEN, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
|
|
71
|
-
import { createRef, debug, getEntries } from "../lib/utils.js";
|
|
72
|
-
import type { ComponentsObject, GlobalContext, SchemaObject, TransformNodeOptions } from "../types.js";
|
|
73
|
-
diff --git a/src/transform/header-object.ts b/src/transform/header-object.ts
|
|
74
|
-
index cb3654e5bdc61cd430185cd0c1234ea35bdc823a..a550d68d77603ce5f09d4db252f8fa65f30a316e 100644
|
|
75
|
-
--- a/src/transform/header-object.ts
|
|
76
|
-
+++ b/src/transform/header-object.ts
|
|
77
|
-
@@ -1,5 +1,5 @@
|
|
78
|
-
import { escapePointer } from "@redocly/openapi-core/lib/ref-utils.js";
|
|
79
|
-
-import ts from "typescript";
|
|
80
|
-
+import ts from "@typescript/typescript6";
|
|
81
|
-
import { addJSDocComment, tsModifiers, tsPropertyIndex, UNKNOWN } from "../lib/ts.js";
|
|
82
|
-
import { getEntries } from "../lib/utils.js";
|
|
83
|
-
import type { HeaderObject, TransformNodeOptions } from "../types.js";
|
|
84
|
-
diff --git a/src/transform/index.ts b/src/transform/index.ts
|
|
85
|
-
index ad4af119a76b8a3c703862688ccc036f952659a2..1cb6797f236be42f16721a9cf93b316129b84b19 100644
|
|
86
|
-
--- a/src/transform/index.ts
|
|
87
|
-
+++ b/src/transform/index.ts
|
|
88
|
-
@@ -1,5 +1,5 @@
|
|
89
|
-
import { performance } from "node:perf_hooks";
|
|
90
|
-
-import ts, { type InterfaceDeclaration, type TypeLiteralNode } from "typescript";
|
|
91
|
-
+import ts, { type InterfaceDeclaration, type TypeLiteralNode } from "@typescript/typescript6";
|
|
92
|
-
import { NEVER, STRING, stringToAST, tsModifiers, tsRecord } from "../lib/ts.js";
|
|
93
|
-
import { createRef, debug } from "../lib/utils.js";
|
|
94
|
-
import type { GlobalContext, OpenAPI3 } from "../types.js";
|
|
95
|
-
diff --git a/src/transform/media-type-object.ts b/src/transform/media-type-object.ts
|
|
96
|
-
index 647febbb07033ff2a88030314de769ba9208413b..f4545c556277e66a583c8604e2efcd80acac79dd 100644
|
|
97
|
-
--- a/src/transform/media-type-object.ts
|
|
98
|
-
+++ b/src/transform/media-type-object.ts
|
|
99
|
-
@@ -1,4 +1,4 @@
|
|
100
|
-
-import type ts from "typescript";
|
|
101
|
-
+import type ts from "@typescript/typescript6";
|
|
102
|
-
import { UNKNOWN } from "../lib/ts.js";
|
|
103
|
-
import type { MediaTypeObject, TransformNodeOptions } from "../types.js";
|
|
104
|
-
import transformSchemaObject from "./schema-object.js";
|
|
105
|
-
diff --git a/src/transform/operation-object.ts b/src/transform/operation-object.ts
|
|
106
|
-
index a178be58cb86b7a9ac4ac71126cef61377dea8e1..8de36656e61121ccc2771357ab0322e857c669d1 100644
|
|
107
|
-
--- a/src/transform/operation-object.ts
|
|
108
|
-
+++ b/src/transform/operation-object.ts
|
|
109
|
-
@@ -1,4 +1,4 @@
|
|
110
|
-
-import ts from "typescript";
|
|
111
|
-
+import ts from "@typescript/typescript6";
|
|
112
|
-
import { addJSDocComment, NEVER, oapiRef, QUESTION_TOKEN, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
|
|
113
|
-
import { createRef } from "../lib/utils.js";
|
|
114
|
-
import type { OperationObject, RequestBodyObject, TransformNodeOptions } from "../types.js";
|
|
115
|
-
diff --git a/src/transform/parameter-object.ts b/src/transform/parameter-object.ts
|
|
116
|
-
index 43412e8a622ebf41da9408ea9d0671a0098da5e2..b8e0f669ed6b2f9fcec2a9798608f7bf50264c88 100644
|
|
117
|
-
--- a/src/transform/parameter-object.ts
|
|
118
|
-
+++ b/src/transform/parameter-object.ts
|
|
119
|
-
@@ -1,4 +1,4 @@
|
|
120
|
-
-import type ts from "typescript";
|
|
121
|
-
+import type ts from "@typescript/typescript6";
|
|
122
|
-
import { STRING } from "../lib/ts.js";
|
|
123
|
-
import type { ParameterObject, TransformNodeOptions } from "../types.js";
|
|
124
|
-
import transformSchemaObject from "./schema-object.js";
|
|
125
|
-
diff --git a/src/transform/parameters-array.ts b/src/transform/parameters-array.ts
|
|
126
|
-
index 78146f34e9ff4332a083b0a98220a048b22f834f..2e9aea30fbab673e7afba98264b127890cd9b448 100644
|
|
127
|
-
--- a/src/transform/parameters-array.ts
|
|
128
|
-
+++ b/src/transform/parameters-array.ts
|
|
129
|
-
@@ -1,4 +1,4 @@
|
|
130
|
-
-import ts from "typescript";
|
|
131
|
-
+import ts from "@typescript/typescript6";
|
|
132
|
-
import { addJSDocComment, NEVER, oapiRef, QUESTION_TOKEN, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
|
|
133
|
-
import { createRef } from "../lib/utils.js";
|
|
134
|
-
import type { ParameterObject, ReferenceObject, TransformNodeOptions } from "../types.js";
|
|
135
|
-
diff --git a/src/transform/path-item-object.ts b/src/transform/path-item-object.ts
|
|
136
|
-
index 87ca02d7850851074a0f89da88930252ede62714..71f6f6ebbb1d1e65b192c65d75000fe484222de5 100644
|
|
137
|
-
--- a/src/transform/path-item-object.ts
|
|
138
|
-
+++ b/src/transform/path-item-object.ts
|
|
139
|
-
@@ -1,4 +1,4 @@
|
|
140
|
-
-import ts from "typescript";
|
|
141
|
-
+import ts from "@typescript/typescript6";
|
|
142
|
-
import { addJSDocComment, NEVER, oapiRef, QUESTION_TOKEN, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
|
|
143
|
-
import { createRef } from "../lib/utils.js";
|
|
144
|
-
import type {
|
|
145
|
-
diff --git a/src/transform/paths-enum.ts b/src/transform/paths-enum.ts
|
|
146
|
-
index ea2fbdb437dfa299d638352a1d47f75cbf002ac7..e9fbb120283ddffc82a5e2f3d4d3eca1182bb5db 100644
|
|
147
|
-
--- a/src/transform/paths-enum.ts
|
|
148
|
-
+++ b/src/transform/paths-enum.ts
|
|
149
|
-
@@ -1,4 +1,4 @@
|
|
150
|
-
-import type ts from "typescript";
|
|
151
|
-
+import type ts from "@typescript/typescript6";
|
|
152
|
-
import { tsEnum } from "../lib/ts.js";
|
|
153
|
-
import { getEntries } from "../lib/utils.js";
|
|
154
|
-
import type { PathsObject } from "../types.js";
|
|
155
|
-
diff --git a/src/transform/paths-object.ts b/src/transform/paths-object.ts
|
|
156
|
-
index 83c36af1a3bd276dbfdad5fe5c10d4842660aff2..1f1a31b7e70bce33b0306e0cc1117f46ea4fdd92 100644
|
|
157
|
-
--- a/src/transform/paths-object.ts
|
|
158
|
-
+++ b/src/transform/paths-object.ts
|
|
159
|
-
@@ -1,5 +1,5 @@
|
|
160
|
-
import { performance } from "node:perf_hooks";
|
|
161
|
-
-import ts from "typescript";
|
|
162
|
-
+import ts from "@typescript/typescript6";
|
|
163
|
-
import { addJSDocComment, oapiRef, stringToAST, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
|
|
164
|
-
import { createRef, debug, getEntries } from "../lib/utils.js";
|
|
165
|
-
import type {
|
|
166
|
-
diff --git a/src/transform/request-body-object.ts b/src/transform/request-body-object.ts
|
|
167
|
-
index 3c641c4757f635dfa745c8484917afd67365748f..9bb2d37474afb11166b0ad601fe53dfacd7afefc 100644
|
|
168
|
-
--- a/src/transform/request-body-object.ts
|
|
169
|
-
+++ b/src/transform/request-body-object.ts
|
|
170
|
-
@@ -1,4 +1,4 @@
|
|
171
|
-
-import ts from "typescript";
|
|
172
|
-
+import ts from "@typescript/typescript6";
|
|
173
|
-
import { addJSDocComment, NEVER, QUESTION_TOKEN, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
|
|
174
|
-
import { createRef, getEntries } from "../lib/utils.js";
|
|
175
|
-
import type { RequestBodyObject, TransformNodeOptions } from "../types.js";
|
|
176
|
-
diff --git a/src/transform/response-object.ts b/src/transform/response-object.ts
|
|
177
|
-
index 83775cc9b91ce7de63320565287dc806b45f8c38..bce55c979b57a4f8f9a5463b08805636588ca1f9 100644
|
|
178
|
-
--- a/src/transform/response-object.ts
|
|
179
|
-
+++ b/src/transform/response-object.ts
|
|
180
|
-
@@ -1,4 +1,4 @@
|
|
181
|
-
-import ts from "typescript";
|
|
182
|
-
+import ts from "@typescript/typescript6";
|
|
183
|
-
import {
|
|
184
|
-
addJSDocComment,
|
|
185
|
-
NEVER,
|
|
186
|
-
diff --git a/src/transform/responses-object.ts b/src/transform/responses-object.ts
|
|
187
|
-
index cc8bce39798bd3204625ef149a7dd95e4f8e8fb0..5daf95f0fd4605dbfda0e80e49ef16b0e6588b4b 100644
|
|
188
|
-
--- a/src/transform/responses-object.ts
|
|
189
|
-
+++ b/src/transform/responses-object.ts
|
|
190
|
-
@@ -1,4 +1,4 @@
|
|
191
|
-
-import ts from "typescript";
|
|
192
|
-
+import ts from "@typescript/typescript6";
|
|
193
|
-
import { addJSDocComment, NEVER, oapiRef, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
|
|
194
|
-
import { createRef, getEntries } from "../lib/utils.js";
|
|
195
|
-
import type { ResponsesObject, TransformNodeOptions } from "../types.js";
|
|
196
|
-
diff --git a/src/transform/schema-object.ts b/src/transform/schema-object.ts
|
|
197
|
-
index 58745d072e4c8362a5f979c9d02fa04ecd14345a..66fbf03a189142cad35bfbcea05cd2399b2850c4 100644
|
|
198
|
-
--- a/src/transform/schema-object.ts
|
|
199
|
-
+++ b/src/transform/schema-object.ts
|
|
200
|
-
@@ -1,5 +1,5 @@
|
|
201
|
-
import { parseRef } from "@redocly/openapi-core/lib/ref-utils.js";
|
|
202
|
-
-import ts from "typescript";
|
|
203
|
-
+import ts from "@typescript/typescript6";
|
|
204
|
-
import {
|
|
205
|
-
addJSDocComment,
|
|
206
|
-
BOOLEAN,
|
|
207
|
-
diff --git a/src/transform/webhooks-object.ts b/src/transform/webhooks-object.ts
|
|
208
|
-
index 28c3df644bb41a7c8605e045d613b8581eb1a1ae..5dd2dc95efcecd9623642a7676574ca05ac7c9d5 100644
|
|
209
|
-
--- a/src/transform/webhooks-object.ts
|
|
210
|
-
+++ b/src/transform/webhooks-object.ts
|
|
211
|
-
@@ -1,4 +1,4 @@
|
|
212
|
-
-import ts from "typescript";
|
|
213
|
-
+import ts from "@typescript/typescript6";
|
|
214
|
-
import { tsModifiers, tsPropertyIndex } from "../lib/ts.js";
|
|
215
|
-
import { createRef, getEntries } from "../lib/utils.js";
|
|
216
|
-
import type { GlobalContext, WebhooksObject } from "../types.js";
|
|
217
|
-
diff --git a/src/types.ts b/src/types.ts
|
|
218
|
-
index 8a511e1e876827f1fa76316afe2fb34fe44dc653..18b8797ab7b045e01ff6189ab2bb6207a91a12ab 100644
|
|
219
|
-
--- a/src/types.ts
|
|
220
|
-
+++ b/src/types.ts
|
|
221
|
-
@@ -1,6 +1,6 @@
|
|
222
|
-
import type { PathLike } from "node:fs";
|
|
223
|
-
import type { Config as RedoclyConfig } from "@redocly/openapi-core";
|
|
224
|
-
-import type ts from "typescript";
|
|
225
|
-
+import type ts from "@typescript/typescript6";
|
|
226
|
-
|
|
227
|
-
// Many types allow for true “any” for inheritance to work
|
|
228
|
-
|