@orval/angular 7.11.1 → 7.12.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/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +149 -178
- package/dist/index.js.map +1 -1
- package/package.json +19 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClientBuilder, ClientDependenciesBuilder, ClientFooterBuilder, ClientGeneratorsBuilder, ClientHeaderBuilder, ClientTitleBuilder } from "@orval/core";
|
|
2
2
|
|
|
3
|
+
//#region src/index.d.ts
|
|
3
4
|
declare const getAngularDependencies: ClientDependenciesBuilder;
|
|
4
5
|
declare const generateAngularTitle: ClientTitleBuilder;
|
|
5
6
|
declare const generateAngularHeader: ClientHeaderBuilder;
|
|
6
7
|
declare const generateAngularFooter: ClientFooterBuilder;
|
|
7
8
|
declare const generateAngular: ClientBuilder;
|
|
8
9
|
declare const builder: () => () => ClientGeneratorsBuilder;
|
|
9
|
-
|
|
10
|
+
//#endregion
|
|
10
11
|
export { builder, builder as default, generateAngular, generateAngularFooter, generateAngularHeader, generateAngularTitle, getAngularDependencies };
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;cAoDa,wBAAwB;cAGxB,sBAAsB;AAHtB,cAQA,qBARwB,EAQD,mBARC;AAGxB,cA0DA,qBA1DsB,EA0DC,mBAvDnC;AAEY,cA0LA,eAvIZ,EAuI6B,aA1LM;AAqDvB,cAoJA,OAxIZ,EAAA,GAAA,GAAA,GAZmC,GAoJhB,uBAxInB"}
|
package/dist/index.js
CHANGED
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
//#region rolldown:runtime
|
|
3
|
+
var __create = Object.create;
|
|
2
4
|
var __defProp = Object.defineProperty;
|
|
3
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
9
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
17
18
|
};
|
|
18
|
-
var
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
24
|
+
//#endregion
|
|
25
|
+
let __orval_core = require("@orval/core");
|
|
26
|
+
__orval_core = __toESM(__orval_core);
|
|
27
|
+
|
|
28
|
+
//#region src/index.ts
|
|
29
|
+
const ANGULAR_DEPENDENCIES = [
|
|
30
|
+
{
|
|
31
|
+
exports: [
|
|
32
|
+
{
|
|
33
|
+
name: "HttpClient",
|
|
34
|
+
values: true
|
|
35
|
+
},
|
|
36
|
+
{ name: "HttpHeaders" },
|
|
37
|
+
{ name: "HttpParams" },
|
|
38
|
+
{ name: "HttpContext" },
|
|
39
|
+
{
|
|
40
|
+
name: "HttpResponse",
|
|
41
|
+
alias: "AngularHttpResponse"
|
|
42
|
+
},
|
|
43
|
+
{ name: "HttpEvent" }
|
|
44
|
+
],
|
|
45
|
+
dependency: "@angular/common/http"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
exports: [{
|
|
49
|
+
name: "Injectable",
|
|
50
|
+
values: true
|
|
51
|
+
}, {
|
|
52
|
+
name: "inject",
|
|
53
|
+
values: true
|
|
54
|
+
}],
|
|
55
|
+
dependency: "@angular/core"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
exports: [{
|
|
59
|
+
name: "Observable",
|
|
60
|
+
values: true
|
|
61
|
+
}],
|
|
62
|
+
dependency: "rxjs"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
exports: [{ name: "DeepNonNullable" }],
|
|
66
|
+
dependency: "@orval/core"
|
|
67
|
+
}
|
|
61
68
|
];
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
const returnTypesToWrite = /* @__PURE__ */ new Map();
|
|
70
|
+
const getAngularDependencies = () => ANGULAR_DEPENDENCIES;
|
|
71
|
+
const generateAngularTitle = (title) => {
|
|
72
|
+
const sanTitle = (0, __orval_core.sanitize)(title);
|
|
73
|
+
return `${(0, __orval_core.pascal)(sanTitle)}Service`;
|
|
67
74
|
};
|
|
68
|
-
|
|
69
|
-
title,
|
|
70
|
-
isRequestOptions,
|
|
71
|
-
isMutator,
|
|
72
|
-
isGlobalMutator,
|
|
73
|
-
provideIn
|
|
74
|
-
}) => `
|
|
75
|
+
const generateAngularHeader = ({ title, isRequestOptions, isMutator, isGlobalMutator, provideIn }) => `
|
|
75
76
|
${isRequestOptions && !isGlobalMutator ? `interface HttpClientOptions {
|
|
76
77
|
headers?: HttpHeaders | Record<string, string | string[]>;
|
|
77
78
|
context?: HttpContext;
|
|
@@ -101,134 +102,104 @@ ${isRequestOptions && isMutator ? `// eslint-disable-next-line
|
|
|
101
102
|
? P
|
|
102
103
|
: never;` : ""}
|
|
103
104
|
|
|
104
|
-
@Injectable(${provideIn ? `{ providedIn: '${(0,
|
|
105
|
+
@Injectable(${provideIn ? `{ providedIn: '${(0, __orval_core.isBoolean)(provideIn) ? "root" : provideIn}' }` : ""})
|
|
105
106
|
export class ${title} {
|
|
106
107
|
private readonly http = inject(HttpClient);
|
|
107
108
|
`;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
operationNames.forEach((operationName) => {
|
|
113
|
-
if (returnTypesToWrite.has(operationName)) {
|
|
114
|
-
footer += returnTypesToWrite.get(operationName) + "\n";
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
return footer;
|
|
109
|
+
const generateAngularFooter = ({ operationNames }) => {
|
|
110
|
+
let footer = "};\n\n";
|
|
111
|
+
for (const operationName of operationNames) if (returnTypesToWrite.has(operationName)) footer += returnTypesToWrite.get(operationName) + "\n";
|
|
112
|
+
return footer;
|
|
118
113
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
);
|
|
150
|
-
if (mutator) {
|
|
151
|
-
const mutatorConfig = (0, import_core.generateMutatorConfig)({
|
|
152
|
-
route,
|
|
153
|
-
body,
|
|
154
|
-
headers,
|
|
155
|
-
queryParams,
|
|
156
|
-
response,
|
|
157
|
-
verb,
|
|
158
|
-
isFormData,
|
|
159
|
-
isFormUrlEncoded,
|
|
160
|
-
hasSignal: false,
|
|
161
|
-
isExactOptionalPropertyTypes
|
|
162
|
-
});
|
|
163
|
-
const requestOptions = isRequestOptions ? (0, import_core.generateMutatorRequestOptions)(
|
|
164
|
-
override == null ? void 0 : override.requestOptions,
|
|
165
|
-
mutator.hasThirdArg
|
|
166
|
-
) : "";
|
|
167
|
-
const propsImplementation = mutator.bodyTypeName && body.definition ? (0, import_core.toObjectString)(props, "implementation").replace(
|
|
168
|
-
new RegExp(`(\\w*):\\s?${body.definition}`),
|
|
169
|
-
`$1: ${mutator.bodyTypeName}<${body.definition}>`
|
|
170
|
-
) : (0, import_core.toObjectString)(props, "implementation");
|
|
171
|
-
return ` ${operationName}<TData = ${dataType}>(
|
|
172
|
-
${propsImplementation}
|
|
173
|
-
${isRequestOptions && mutator.hasThirdArg ? `options?: ThirdParameter<typeof ${mutator.name}>` : ""}) {${bodyForm}
|
|
114
|
+
const generateImplementation = ({ headers, queryParams, operationName, response, mutator, body, props, verb, override, formData, formUrlEncoded, paramsSerializer }, { route, context }) => {
|
|
115
|
+
const isRequestOptions = override?.requestOptions !== false;
|
|
116
|
+
const isFormData = !override?.formData.disabled;
|
|
117
|
+
const isFormUrlEncoded = override?.formUrlEncoded !== false;
|
|
118
|
+
const isExactOptionalPropertyTypes = !!context.output.tsconfig?.compilerOptions?.exactOptionalPropertyTypes;
|
|
119
|
+
const bodyForm = (0, __orval_core.generateFormDataAndUrlEncodedFunction)({
|
|
120
|
+
formData,
|
|
121
|
+
formUrlEncoded,
|
|
122
|
+
body,
|
|
123
|
+
isFormData,
|
|
124
|
+
isFormUrlEncoded
|
|
125
|
+
});
|
|
126
|
+
const dataType = response.definition.success || "unknown";
|
|
127
|
+
returnTypesToWrite.set(operationName, `export type ${(0, __orval_core.pascal)(operationName)}ClientResult = NonNullable<${dataType}>`);
|
|
128
|
+
if (mutator) {
|
|
129
|
+
const mutatorConfig = (0, __orval_core.generateMutatorConfig)({
|
|
130
|
+
route,
|
|
131
|
+
body,
|
|
132
|
+
headers,
|
|
133
|
+
queryParams,
|
|
134
|
+
response,
|
|
135
|
+
verb,
|
|
136
|
+
isFormData,
|
|
137
|
+
isFormUrlEncoded,
|
|
138
|
+
hasSignal: false,
|
|
139
|
+
isExactOptionalPropertyTypes
|
|
140
|
+
});
|
|
141
|
+
const requestOptions = isRequestOptions ? (0, __orval_core.generateMutatorRequestOptions)(override?.requestOptions, mutator.hasThirdArg) : "";
|
|
142
|
+
const propsImplementation = mutator.bodyTypeName && body.definition ? (0, __orval_core.toObjectString)(props, "implementation").replace(/* @__PURE__ */ new RegExp(`(\\w*):\\s?${body.definition}`), `$1: ${mutator.bodyTypeName}<${body.definition}>`) : (0, __orval_core.toObjectString)(props, "implementation");
|
|
143
|
+
return ` ${operationName}<TData = ${dataType}>(\n ${propsImplementation}\n ${isRequestOptions && mutator.hasThirdArg ? `options?: ThirdParameter<typeof ${mutator.name}>` : ""}) {${bodyForm}
|
|
174
144
|
return ${mutator.name}<TData>(
|
|
175
145
|
${mutatorConfig},
|
|
176
146
|
this.http,
|
|
177
147
|
${requestOptions});
|
|
178
148
|
}
|
|
179
149
|
`;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
${functionName}(${propsDefinition} options?: HttpClientOptions & { observe: '
|
|
203
|
-
${functionName}(${propsDefinition} options?: HttpClientOptions & { observe
|
|
204
|
-
return ` ${overloads}
|
|
150
|
+
}
|
|
151
|
+
const options = (0, __orval_core.generateOptions)({
|
|
152
|
+
route,
|
|
153
|
+
body,
|
|
154
|
+
headers,
|
|
155
|
+
queryParams,
|
|
156
|
+
response,
|
|
157
|
+
verb,
|
|
158
|
+
requestOptions: override?.requestOptions,
|
|
159
|
+
isFormData,
|
|
160
|
+
isFormUrlEncoded,
|
|
161
|
+
paramsSerializer,
|
|
162
|
+
paramsSerializerOptions: override?.paramsSerializerOptions,
|
|
163
|
+
isAngular: true,
|
|
164
|
+
isExactOptionalPropertyTypes,
|
|
165
|
+
hasSignal: false
|
|
166
|
+
});
|
|
167
|
+
const propsDefinition = (0, __orval_core.toObjectString)(props, "definition");
|
|
168
|
+
const isModelType = dataType !== "Blob" && dataType !== "string";
|
|
169
|
+
let functionName = operationName;
|
|
170
|
+
if (isModelType) functionName += `<TData = ${dataType}>`;
|
|
171
|
+
return ` ${isRequestOptions ? `${functionName}(${propsDefinition} options?: HttpClientOptions & { observe?: 'body' }): Observable<${isModelType ? "TData" : dataType}>;
|
|
172
|
+
${functionName}(${propsDefinition} options?: HttpClientOptions & { observe: 'events' }): Observable<HttpEvent<${isModelType ? "TData" : dataType}>>;
|
|
173
|
+
${functionName}(${propsDefinition} options?: HttpClientOptions & { observe: 'response' }): Observable<AngularHttpResponse<${isModelType ? "TData" : dataType}>>;` : ""}
|
|
205
174
|
${functionName}(
|
|
206
|
-
${(0,
|
|
175
|
+
${(0, __orval_core.toObjectString)(props, "implementation")} ${isRequestOptions ? `options?: HttpClientOptions & { observe?: any }` : ""}): Observable<any> {${bodyForm}
|
|
207
176
|
return this.http.${verb}${isModelType ? "<TData>" : ""}(${options});
|
|
208
177
|
}
|
|
209
178
|
`;
|
|
210
179
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
180
|
+
const generateAngular = (verbOptions, options) => {
|
|
181
|
+
const imports = (0, __orval_core.generateVerbImports)(verbOptions);
|
|
182
|
+
return {
|
|
183
|
+
implementation: generateImplementation(verbOptions, options),
|
|
184
|
+
imports
|
|
185
|
+
};
|
|
215
186
|
};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
187
|
+
const angularClientBuilder = {
|
|
188
|
+
client: generateAngular,
|
|
189
|
+
header: generateAngularHeader,
|
|
190
|
+
dependencies: getAngularDependencies,
|
|
191
|
+
footer: generateAngularFooter,
|
|
192
|
+
title: generateAngularTitle
|
|
222
193
|
};
|
|
223
|
-
|
|
224
|
-
var
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
194
|
+
const builder = () => () => angularClientBuilder;
|
|
195
|
+
var src_default = builder;
|
|
196
|
+
|
|
197
|
+
//#endregion
|
|
198
|
+
exports.builder = builder;
|
|
199
|
+
exports.default = src_default;
|
|
200
|
+
exports.generateAngular = generateAngular;
|
|
201
|
+
exports.generateAngularFooter = generateAngularFooter;
|
|
202
|
+
exports.generateAngularHeader = generateAngularHeader;
|
|
203
|
+
exports.generateAngularTitle = generateAngularTitle;
|
|
204
|
+
exports.getAngularDependencies = getAngularDependencies;
|
|
234
205
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import {\n ClientBuilder,\n ClientDependenciesBuilder,\n ClientFooterBuilder,\n ClientGeneratorsBuilder,\n ClientHeaderBuilder,\n ClientTitleBuilder,\n generateFormDataAndUrlEncodedFunction,\n generateMutatorConfig,\n generateMutatorRequestOptions,\n generateOptions,\n generateVerbImports,\n GeneratorDependency,\n GeneratorOptions,\n GeneratorVerbOptions,\n isBoolean,\n pascal,\n sanitize,\n toObjectString,\n} from '@orval/core';\n\nconst ANGULAR_DEPENDENCIES: GeneratorDependency[] = [\n {\n exports: [\n { name: 'HttpClient', values: true },\n { name: 'HttpHeaders' },\n { name: 'HttpParams' },\n { name: 'HttpContext' },\n { name: 'HttpResponse', alias: 'AngularHttpResponse' }, // alias to prevent naming conflict with msw\n { name: 'HttpEvent' },\n ],\n dependency: '@angular/common/http',\n },\n {\n exports: [\n { name: 'Injectable', values: true },\n { name: 'inject', values: true },\n ],\n dependency: '@angular/core',\n },\n {\n exports: [{ name: 'Observable', values: true }],\n dependency: 'rxjs',\n },\n {\n exports: [{ name: 'DeepNonNullable' }],\n dependency: '@orval/core/src/utils/deep-non-nullable',\n },\n];\n\nconst returnTypesToWrite: Map<string, string> = new Map();\n\nexport const getAngularDependencies: ClientDependenciesBuilder = () =>\n ANGULAR_DEPENDENCIES;\n\nexport const generateAngularTitle: ClientTitleBuilder = (title) => {\n const sanTitle = sanitize(title);\n return `${pascal(sanTitle)}Service`;\n};\n\nexport const generateAngularHeader: ClientHeaderBuilder = ({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n}) => `\n${\n isRequestOptions && !isGlobalMutator\n ? `interface HttpClientOptions {\n headers?: HttpHeaders | Record<string, string | string[]>;\n context?: HttpContext;\n params?:\n | HttpParams\n | Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>>;\n reportProgress?: boolean;\n withCredentials?: boolean;\n credentials?: RequestCredentials;\n keepalive?: boolean;\n priority?: RequestPriority;\n cache?: RequestCache;\n mode?: RequestMode;\n redirect?: RequestRedirect;\n referrer?: string;\n integrity?: string;\n transferCache?: {includeHeaders?: string[]} | boolean;\n timeout?: number;\n}`\n : ''\n}\n\n${\n isRequestOptions && isMutator\n ? `// eslint-disable-next-line\n type ThirdParameter<T extends (...args: any) => any> = T extends (\n config: any,\n httpClient: any,\n args: infer P,\n) => any\n ? P\n : never;`\n : ''\n}\n\n@Injectable(${\n provideIn\n ? `{ providedIn: '${isBoolean(provideIn) ? 'root' : provideIn}' }`\n : ''\n})\nexport class ${title} {\n private readonly http = inject(HttpClient);\n`;\n\nexport const generateAngularFooter: ClientFooterBuilder = ({\n operationNames,\n}) => {\n let footer = '};\\n\\n';\n\n operationNames.forEach((operationName) => {\n if (returnTypesToWrite.has(operationName)) {\n footer += returnTypesToWrite.get(operationName) + '\\n';\n }\n });\n\n return footer;\n};\n\nconst generateImplementation = (\n {\n headers,\n queryParams,\n operationName,\n response,\n mutator,\n body,\n props,\n verb,\n override,\n formData,\n formUrlEncoded,\n paramsSerializer,\n }: GeneratorVerbOptions,\n { route, context }: GeneratorOptions,\n) => {\n const isRequestOptions = override?.requestOptions !== false;\n const isFormData = override?.formData.disabled === false;\n const isFormUrlEncoded = override?.formUrlEncoded !== false;\n const isExactOptionalPropertyTypes =\n !!context.output.tsconfig?.compilerOptions?.exactOptionalPropertyTypes;\n const bodyForm = generateFormDataAndUrlEncodedFunction({\n formData,\n formUrlEncoded,\n body,\n isFormData,\n isFormUrlEncoded,\n });\n\n const dataType = response.definition.success || 'unknown';\n\n returnTypesToWrite.set(\n operationName,\n `export type ${pascal(operationName)}ClientResult = ${\n dataType === 'null'\n ? 'never' // NonNullable<null> is the type never\n : `NonNullable<${dataType}>`\n };`,\n );\n\n if (mutator) {\n const mutatorConfig = generateMutatorConfig({\n route,\n body,\n headers,\n queryParams,\n response,\n verb,\n isFormData,\n isFormUrlEncoded,\n hasSignal: false,\n isExactOptionalPropertyTypes,\n });\n\n const requestOptions = isRequestOptions\n ? generateMutatorRequestOptions(\n override?.requestOptions,\n mutator.hasThirdArg,\n )\n : '';\n\n const propsImplementation =\n mutator.bodyTypeName && body.definition\n ? toObjectString(props, 'implementation').replace(\n new RegExp(`(\\\\w*):\\\\s?${body.definition}`),\n `$1: ${mutator.bodyTypeName}<${body.definition}>`,\n )\n : toObjectString(props, 'implementation');\n\n return ` ${operationName}<TData = ${dataType}>(\\n ${propsImplementation}\\n ${\n isRequestOptions && mutator.hasThirdArg\n ? `options?: ThirdParameter<typeof ${mutator.name}>`\n : ''\n }) {${bodyForm}\n return ${mutator.name}<TData>(\n ${mutatorConfig},\n this.http,\n ${requestOptions});\n }\n `;\n }\n\n const options = generateOptions({\n route,\n body,\n headers,\n queryParams,\n response,\n verb,\n requestOptions: override?.requestOptions,\n isFormData,\n isFormUrlEncoded,\n paramsSerializer,\n paramsSerializerOptions: override?.paramsSerializerOptions,\n isAngular: true,\n isExactOptionalPropertyTypes,\n hasSignal: false,\n });\n\n const propsDefinition = toObjectString(props, 'definition');\n const isModelType = dataType !== 'Blob' && dataType !== 'string';\n let functionName = operationName;\n if (isModelType) functionName += `<TData = ${dataType}>`;\n\n const overloads = isRequestOptions\n ? `${functionName}(${propsDefinition} options?: HttpClientOptions & { observe: 'events' }): Observable<HttpEvent<${isModelType ? 'TData' : dataType}>>;\n ${functionName}(${propsDefinition} options?: HttpClientOptions & { observe: 'response' }): Observable<AngularHttpResponse<${isModelType ? 'TData' : dataType}>>;\n ${functionName}(${propsDefinition} options?: HttpClientOptions & { observe?: 'body' }): Observable<${isModelType ? 'TData' : dataType}>;`\n : '';\n\n return ` ${overloads}\n ${functionName}(\n ${toObjectString(props, 'implementation')} ${\n isRequestOptions ? `options?: HttpClientOptions & { observe?: any }` : ''\n }): Observable<any> {${bodyForm}\n return this.http.${verb}${isModelType ? '<TData>' : ''}(${options});\n }\n`;\n};\n\nexport const generateAngular: ClientBuilder = (verbOptions, options) => {\n const imports = generateVerbImports(verbOptions);\n const implementation = generateImplementation(verbOptions, options);\n\n return { implementation, imports };\n};\n\nconst angularClientBuilder: ClientGeneratorsBuilder = {\n client: generateAngular,\n header: generateAngularHeader,\n dependencies: getAngularDependencies,\n footer: generateAngularFooter,\n title: generateAngularTitle,\n};\n\nexport const builder = () => () => angularClientBuilder;\n\nexport default builder;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAmBO;AAEP,IAAM,uBAA8C;AAAA,EAClD;AAAA,IACE,SAAS;AAAA,MACP,EAAE,MAAM,cAAc,QAAQ,KAAK;AAAA,MACnC,EAAE,MAAM,cAAc;AAAA,MACtB,EAAE,MAAM,aAAa;AAAA,MACrB,EAAE,MAAM,cAAc;AAAA,MACtB,EAAE,MAAM,gBAAgB,OAAO,sBAAsB;AAAA;AAAA,MACrD,EAAE,MAAM,YAAY;AAAA,IACtB;AAAA,IACA,YAAY;AAAA,EACd;AAAA,EACA;AAAA,IACE,SAAS;AAAA,MACP,EAAE,MAAM,cAAc,QAAQ,KAAK;AAAA,MACnC,EAAE,MAAM,UAAU,QAAQ,KAAK;AAAA,IACjC;AAAA,IACA,YAAY;AAAA,EACd;AAAA,EACA;AAAA,IACE,SAAS,CAAC,EAAE,MAAM,cAAc,QAAQ,KAAK,CAAC;AAAA,IAC9C,YAAY;AAAA,EACd;AAAA,EACA;AAAA,IACE,SAAS,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAAA,IACrC,YAAY;AAAA,EACd;AACF;AAEA,IAAM,qBAA0C,oBAAI,IAAI;AAEjD,IAAM,yBAAoD,MAC/D;AAEK,IAAM,uBAA2C,CAAC,UAAU;AACjE,QAAM,eAAW,sBAAS,KAAK;AAC/B,SAAO,OAAG,oBAAO,QAAQ,CAAC;AAC5B;AAEO,IAAM,wBAA6C,CAAC;AAAA,EACzD;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,UAAU,QAAQ;AAAA,GAC1J,YAAY,IAAI,eAAe,oEAAoE,cAAc,UAAU,QAAQ,OAChI;AAEJ,SAAO,IAAI,SAAS;AAAA,IAClB,YAAY;AAAA,UACV,4BAAe,OAAO,gBAAgB,CAAC,IACvC,mBAAmB,oDAAoD,EACzE,uBAAuB,QAAQ;AAAA,uBACZ,IAAI,GAAG,cAAc,YAAY,EAAE,IAAI,OAAO;AAAA;AAAA;AAGrE;AAEO,IAAM,kBAAiC,CAAC,aAAa,YAAY;AACtE,QAAM,cAAU,iCAAoB,WAAW;AAC/C,QAAM,iBAAiB,uBAAuB,aAAa,OAAO;AAElE,SAAO,EAAE,gBAAgB,QAAQ;AACnC;AAEA,IAAM,uBAAgD;AAAA,EACpD,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,OAAO;AACT;AAEO,IAAM,UAAU,MAAM,MAAM;AAEnC,IAAO,gBAAQ;","names":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ANGULAR_DEPENDENCIES: GeneratorDependency[]","getAngularDependencies: ClientDependenciesBuilder","generateAngularTitle: ClientTitleBuilder","generateAngularHeader: ClientHeaderBuilder","generateAngularFooter: ClientFooterBuilder","generateAngular: ClientBuilder","angularClientBuilder: ClientGeneratorsBuilder"],"sources":["../src/index.ts"],"sourcesContent":["import {\n ClientBuilder,\n ClientDependenciesBuilder,\n ClientFooterBuilder,\n ClientGeneratorsBuilder,\n ClientHeaderBuilder,\n ClientTitleBuilder,\n generateFormDataAndUrlEncodedFunction,\n generateMutatorConfig,\n generateMutatorRequestOptions,\n generateOptions,\n generateVerbImports,\n GeneratorDependency,\n GeneratorOptions,\n GeneratorVerbOptions,\n isBoolean,\n pascal,\n sanitize,\n toObjectString,\n} from '@orval/core';\n\nconst ANGULAR_DEPENDENCIES: GeneratorDependency[] = [\n {\n exports: [\n { name: 'HttpClient', values: true },\n { name: 'HttpHeaders' },\n { name: 'HttpParams' },\n { name: 'HttpContext' },\n { name: 'HttpResponse', alias: 'AngularHttpResponse' }, // alias to prevent naming conflict with msw\n { name: 'HttpEvent' },\n ],\n dependency: '@angular/common/http',\n },\n {\n exports: [\n { name: 'Injectable', values: true },\n { name: 'inject', values: true },\n ],\n dependency: '@angular/core',\n },\n {\n exports: [{ name: 'Observable', values: true }],\n dependency: 'rxjs',\n },\n {\n exports: [{ name: 'DeepNonNullable' }],\n dependency: '@orval/core',\n },\n];\n\nconst returnTypesToWrite = new Map<string, string>();\n\nexport const getAngularDependencies: ClientDependenciesBuilder = () =>\n ANGULAR_DEPENDENCIES;\n\nexport const generateAngularTitle: ClientTitleBuilder = (title) => {\n const sanTitle = sanitize(title);\n return `${pascal(sanTitle)}Service`;\n};\n\nexport const generateAngularHeader: ClientHeaderBuilder = ({\n title,\n isRequestOptions,\n isMutator,\n isGlobalMutator,\n provideIn,\n}) => `\n${\n isRequestOptions && !isGlobalMutator\n ? `interface HttpClientOptions {\n headers?: HttpHeaders | Record<string, string | string[]>;\n context?: HttpContext;\n params?:\n | HttpParams\n | Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>>;\n reportProgress?: boolean;\n withCredentials?: boolean;\n credentials?: RequestCredentials;\n keepalive?: boolean;\n priority?: RequestPriority;\n cache?: RequestCache;\n mode?: RequestMode;\n redirect?: RequestRedirect;\n referrer?: string;\n integrity?: string;\n transferCache?: {includeHeaders?: string[]} | boolean;\n timeout?: number;\n}`\n : ''\n}\n\n${\n isRequestOptions && isMutator\n ? `// eslint-disable-next-line\n type ThirdParameter<T extends (...args: any) => any> = T extends (\n config: any,\n httpClient: any,\n args: infer P,\n) => any\n ? P\n : never;`\n : ''\n}\n\n@Injectable(${\n provideIn\n ? `{ providedIn: '${isBoolean(provideIn) ? 'root' : provideIn}' }`\n : ''\n})\nexport class ${title} {\n private readonly http = inject(HttpClient);\n`;\n\nexport const generateAngularFooter: ClientFooterBuilder = ({\n operationNames,\n}) => {\n let footer = '};\\n\\n';\n\n for (const operationName of operationNames) {\n if (returnTypesToWrite.has(operationName)) {\n footer += returnTypesToWrite.get(operationName) + '\\n';\n }\n }\n\n return footer;\n};\n\nconst generateImplementation = (\n {\n headers,\n queryParams,\n operationName,\n response,\n mutator,\n body,\n props,\n verb,\n override,\n formData,\n formUrlEncoded,\n paramsSerializer,\n }: GeneratorVerbOptions,\n { route, context }: GeneratorOptions,\n) => {\n const isRequestOptions = override?.requestOptions !== false;\n const isFormData = !override?.formData.disabled;\n const isFormUrlEncoded = override?.formUrlEncoded !== false;\n const isExactOptionalPropertyTypes =\n !!context.output.tsconfig?.compilerOptions?.exactOptionalPropertyTypes;\n const bodyForm = generateFormDataAndUrlEncodedFunction({\n formData,\n formUrlEncoded,\n body,\n isFormData,\n isFormUrlEncoded,\n });\n\n const dataType = response.definition.success || 'unknown';\n\n returnTypesToWrite.set(\n operationName,\n `export type ${pascal(\n operationName,\n )}ClientResult = NonNullable<${dataType}>`,\n );\n\n if (mutator) {\n const mutatorConfig = generateMutatorConfig({\n route,\n body,\n headers,\n queryParams,\n response,\n verb,\n isFormData,\n isFormUrlEncoded,\n hasSignal: false,\n isExactOptionalPropertyTypes,\n });\n\n const requestOptions = isRequestOptions\n ? generateMutatorRequestOptions(\n override?.requestOptions,\n mutator.hasThirdArg,\n )\n : '';\n\n const propsImplementation =\n mutator.bodyTypeName && body.definition\n ? toObjectString(props, 'implementation').replace(\n new RegExp(`(\\\\w*):\\\\s?${body.definition}`),\n `$1: ${mutator.bodyTypeName}<${body.definition}>`,\n )\n : toObjectString(props, 'implementation');\n\n return ` ${operationName}<TData = ${dataType}>(\\n ${propsImplementation}\\n ${\n isRequestOptions && mutator.hasThirdArg\n ? `options?: ThirdParameter<typeof ${mutator.name}>`\n : ''\n }) {${bodyForm}\n return ${mutator.name}<TData>(\n ${mutatorConfig},\n this.http,\n ${requestOptions});\n }\n `;\n }\n\n const options = generateOptions({\n route,\n body,\n headers,\n queryParams,\n response,\n verb,\n requestOptions: override?.requestOptions,\n isFormData,\n isFormUrlEncoded,\n paramsSerializer,\n paramsSerializerOptions: override?.paramsSerializerOptions,\n isAngular: true,\n isExactOptionalPropertyTypes,\n hasSignal: false,\n });\n\n const propsDefinition = toObjectString(props, 'definition');\n const isModelType = dataType !== 'Blob' && dataType !== 'string';\n let functionName = operationName;\n if (isModelType) functionName += `<TData = ${dataType}>`;\n\n const overloads = isRequestOptions\n ? `${functionName}(${propsDefinition} options?: HttpClientOptions & { observe?: 'body' }): Observable<${isModelType ? 'TData' : dataType}>;\n ${functionName}(${propsDefinition} options?: HttpClientOptions & { observe: 'events' }): Observable<HttpEvent<${isModelType ? 'TData' : dataType}>>;\n ${functionName}(${propsDefinition} options?: HttpClientOptions & { observe: 'response' }): Observable<AngularHttpResponse<${isModelType ? 'TData' : dataType}>>;`\n : '';\n\n return ` ${overloads}\n ${functionName}(\n ${toObjectString(props, 'implementation')} ${\n isRequestOptions ? `options?: HttpClientOptions & { observe?: any }` : ''\n }): Observable<any> {${bodyForm}\n return this.http.${verb}${isModelType ? '<TData>' : ''}(${options});\n }\n`;\n};\n\nexport const generateAngular: ClientBuilder = (verbOptions, options) => {\n const imports = generateVerbImports(verbOptions);\n const implementation = generateImplementation(verbOptions, options);\n\n return { implementation, imports };\n};\n\nconst angularClientBuilder: ClientGeneratorsBuilder = {\n client: generateAngular,\n header: generateAngularHeader,\n dependencies: getAngularDependencies,\n footer: generateAngularFooter,\n title: generateAngularTitle,\n};\n\nexport const builder = () => () => angularClientBuilder;\n\nexport default builder;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAMA,uBAA8C;CAClD;EACE,SAAS;GACP;IAAE,MAAM;IAAc,QAAQ;IAAM;GACpC,EAAE,MAAM,eAAe;GACvB,EAAE,MAAM,cAAc;GACtB,EAAE,MAAM,eAAe;GACvB;IAAE,MAAM;IAAgB,OAAO;IAAuB;GACtD,EAAE,MAAM,aAAa;GACtB;EACD,YAAY;EACb;CACD;EACE,SAAS,CACP;GAAE,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QAAQ;CACR,cAAc;CACd,QAAQ;CACR,OAAO;CACR;AAED,MAAa,sBAAsB;AAEnC,kBAAe"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orval/angular",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.12.1",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"
|
|
6
|
-
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"default": "./dist/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
7
11
|
"files": [
|
|
8
12
|
"dist"
|
|
9
13
|
],
|
|
10
14
|
"scripts": {
|
|
11
|
-
"build": "
|
|
12
|
-
"dev": "
|
|
13
|
-
"lint": "eslint
|
|
15
|
+
"build": "tsdown --config-loader unconfig",
|
|
16
|
+
"dev": "tsdown --config-loader unconfig --watch src",
|
|
17
|
+
"lint": "eslint .",
|
|
18
|
+
"clean": "rimraf .turbo dist",
|
|
19
|
+
"nuke": "rimraf .turbo dist node_modules"
|
|
14
20
|
},
|
|
15
21
|
"dependencies": {
|
|
16
|
-
"@orval/core": "
|
|
22
|
+
"@orval/core": "workspace:*"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"eslint": "^9.35.0",
|
|
26
|
+
"rimraf": "^6.0.1",
|
|
27
|
+
"tsdown": "^0.15.2",
|
|
28
|
+
"typescript": "^5.9.2"
|
|
17
29
|
}
|
|
18
30
|
}
|