Skip to content

Commit 1aa153d

Browse files
committed
fix: do not support legacy
1 parent ce246ca commit 1aa153d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/openapi-ts/src/generate/client.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,12 @@ const infixDotGenToFiles = (outputPath: string) => {
142142
* Creates a `client` folder containing the same modules as the client package.
143143
*/
144144
export const generateClientBundle = ({
145+
legacy,
145146
outputPath,
146147
plugin,
147148
tsConfig,
148149
}: {
150+
legacy?: boolean;
149151
outputPath: string;
150152
plugin: DefinePlugin<Client.Config & { name: string }>['Config'];
151153
tsConfig: ts.ParsedCommandLine | null;
@@ -162,7 +164,9 @@ export const generateClientBundle = ({
162164
const coreDistPath = path.resolve(packageRoot, 'dist', 'clients', 'core');
163165
copyRecursivePnP(coreDistPath, coreOutputPath);
164166

165-
infixDotGenToFiles(coreOutputPath);
167+
if (legacy !== true) {
168+
infixDotGenToFiles(coreOutputPath);
169+
}
166170

167171
if (shouldAppendJs) {
168172
const coreFiles = fs.readdirSync(coreOutputPath);
@@ -182,7 +186,9 @@ export const generateClientBundle = ({
182186
);
183187
copyRecursivePnP(clientDistPath, clientOutputPath);
184188

185-
infixDotGenToFiles(clientOutputPath);
189+
if (legacy !== true) {
190+
infixDotGenToFiles(clientOutputPath);
191+
}
186192

187193
if (shouldAppendJs) {
188194
const clientFiles = fs.readdirSync(clientOutputPath);

packages/openapi-ts/src/generate/legacy/output.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const generateLegacyOutput = async ({
6868
clientPlugin.config.bundle
6969
) {
7070
generateClientBundle({
71+
legacy: false,
7172
outputPath,
7273
// @ts-expect-error
7374
plugin: clientPlugin,

0 commit comments

Comments
 (0)