@azure-tools/typespec-ts 0.55.0-dev.7 → 0.55.0-dev.9
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/README.md +1 -77
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -80
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +2 -12
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +0 -65
- package/dist/src/lib.js.map +1 -1
- package/dist/src/rlc-common/helpers/name-constructors.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/name-constructors.js +1 -7
- package/dist/src/rlc-common/helpers/name-constructors.js.map +1 -1
- package/dist/src/rlc-common/index.d.ts +0 -16
- package/dist/src/rlc-common/index.d.ts.map +1 -1
- package/dist/src/rlc-common/index.js +0 -16
- package/dist/src/rlc-common/index.js.map +1 -1
- package/dist/src/rlc-common/interfaces.d.ts +0 -10
- package/dist/src/rlc-common/interfaces.d.ts.map +1 -1
- package/dist/src/rlc-common/interfaces.js.map +1 -1
- package/dist/src/rlc-common/metadata/build-package-file.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/build-package-file.js +0 -12
- package/dist/src/rlc-common/metadata/build-package-file.js.map +1 -1
- package/dist/src/rlc-common/metadata/build-readme-file.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/build-readme-file.js +4 -89
- package/dist/src/rlc-common/metadata/build-readme-file.js.map +1 -1
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts +0 -1
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js +2 -2
- package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js.map +1 -1
- package/dist/src/rlc-common/metadata/package-json/package-common.d.ts +0 -1
- package/dist/src/rlc-common/metadata/package-json/package-common.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/package-json/package-common.js +1 -1
- package/dist/src/rlc-common/metadata/package-json/package-common.js.map +1 -1
- package/dist/src/rlc-common/test/build-snippets.d.ts.map +1 -1
- package/dist/src/rlc-common/test/build-snippets.js +0 -1
- package/dist/src/rlc-common/test/build-snippets.js.map +1 -1
- package/dist/src/rlc-common/test/template.d.ts +1 -1
- package/dist/src/rlc-common/test/template.d.ts.map +1 -1
- package/dist/src/rlc-common/test/template.js +0 -4
- package/dist/src/rlc-common/test/template.js.map +1 -1
- package/dist/src/transform/transform-schemas.js +1 -1
- package/dist/src/transform/transform-schemas.js.map +1 -1
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +5 -11
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/transform/transfrom-rlc-options.d.ts +2 -2
- package/dist/src/transform/transfrom-rlc-options.d.ts.map +1 -1
- package/dist/src/transform/transfrom-rlc-options.js +19 -39
- package/dist/src/transform/transfrom-rlc-options.js.map +1 -1
- package/dist/src/utils/client-utils.d.ts +1 -1
- package/dist/src/utils/client-utils.d.ts.map +1 -1
- package/dist/src/utils/client-utils.js +4 -5
- package/dist/src/utils/client-utils.js.map +1 -1
- package/dist/src/utils/emit-util.d.ts +0 -1
- package/dist/src/utils/emit-util.d.ts.map +1 -1
- package/dist/src/utils/emit-util.js +0 -13
- package/dist/src/utils/emit-util.js.map +1 -1
- package/dist/src/utils/model-utils.d.ts +1 -1
- package/dist/src/utils/model-utils.d.ts.map +1 -1
- package/dist/src/utils/model-utils.js +4 -11
- package/dist/src/utils/model-utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -15
- package/src/index.ts +27 -105
- package/src/lib.ts +1 -77
- package/src/rlc-common/helpers/name-constructors.ts +1 -8
- package/src/rlc-common/index.ts +0 -16
- package/src/rlc-common/interfaces.ts +0 -11
- package/src/rlc-common/metadata/build-package-file.ts +0 -13
- package/src/rlc-common/metadata/build-readme-file.ts +4 -99
- package/src/rlc-common/metadata/package-json/build-azure-monorepo-package.ts +2 -3
- package/src/rlc-common/metadata/package-json/package-common.ts +1 -2
- package/src/rlc-common/test/build-snippets.ts +0 -1
- package/src/rlc-common/test/template.ts +0 -4
- package/src/transform/transform-schemas.ts +1 -1
- package/src/transform/transform.ts +4 -14
- package/src/transform/transfrom-rlc-options.ts +19 -63
- package/src/utils/client-utils.ts +4 -5
- package/src/utils/emit-util.ts +1 -14
- package/src/utils/model-utils.ts +4 -17
- package/dist/src/rlc-common/build-client-definitions.d.ts +0 -6
- package/dist/src/rlc-common/build-client-definitions.d.ts.map +0 -1
- package/dist/src/rlc-common/build-client-definitions.js +0 -157
- package/dist/src/rlc-common/build-client-definitions.js.map +0 -1
- package/dist/src/rlc-common/build-client.d.ts +0 -9
- package/dist/src/rlc-common/build-client.d.ts.map +0 -1
- package/dist/src/rlc-common/build-client.js +0 -375
- package/dist/src/rlc-common/build-client.js.map +0 -1
- package/dist/src/rlc-common/build-index-file.d.ts +0 -6
- package/dist/src/rlc-common/build-index-file.d.ts.map +0 -1
- package/dist/src/rlc-common/build-index-file.js +0 -180
- package/dist/src/rlc-common/build-index-file.js.map +0 -1
- package/dist/src/rlc-common/build-is-unexpected-helper.d.ts +0 -6
- package/dist/src/rlc-common/build-is-unexpected-helper.d.ts.map +0 -1
- package/dist/src/rlc-common/build-is-unexpected-helper.js +0 -219
- package/dist/src/rlc-common/build-is-unexpected-helper.js.map +0 -1
- package/dist/src/rlc-common/build-logger.d.ts +0 -6
- package/dist/src/rlc-common/build-logger.d.ts.map +0 -1
- package/dist/src/rlc-common/build-logger.js +0 -23
- package/dist/src/rlc-common/build-logger.js.map +0 -1
- package/dist/src/rlc-common/build-method-shortcuts.d.ts +0 -5
- package/dist/src/rlc-common/build-method-shortcuts.d.ts.map +0 -1
- package/dist/src/rlc-common/build-method-shortcuts.js +0 -54
- package/dist/src/rlc-common/build-method-shortcuts.js.map +0 -1
- package/dist/src/rlc-common/build-object-types.d.ts +0 -29
- package/dist/src/rlc-common/build-object-types.d.ts.map +0 -1
- package/dist/src/rlc-common/build-object-types.js +0 -410
- package/dist/src/rlc-common/build-object-types.js.map +0 -1
- package/dist/src/rlc-common/build-paginate-helper.d.ts +0 -6
- package/dist/src/rlc-common/build-paginate-helper.d.ts.map +0 -1
- package/dist/src/rlc-common/build-paginate-helper.js +0 -27
- package/dist/src/rlc-common/build-paginate-helper.js.map +0 -1
- package/dist/src/rlc-common/build-parameter-types.d.ts +0 -14
- package/dist/src/rlc-common/build-parameter-types.d.ts.map +0 -1
- package/dist/src/rlc-common/build-parameter-types.js +0 -338
- package/dist/src/rlc-common/build-parameter-types.js.map +0 -1
- package/dist/src/rlc-common/build-polling-helper.d.ts +0 -6
- package/dist/src/rlc-common/build-polling-helper.d.ts.map +0 -1
- package/dist/src/rlc-common/build-polling-helper.js +0 -59
- package/dist/src/rlc-common/build-polling-helper.js.map +0 -1
- package/dist/src/rlc-common/build-response-types.d.ts +0 -6
- package/dist/src/rlc-common/build-response-types.d.ts.map +0 -1
- package/dist/src/rlc-common/build-response-types.js +0 -140
- package/dist/src/rlc-common/build-response-types.js.map +0 -1
- package/dist/src/rlc-common/build-samples.d.ts +0 -3
- package/dist/src/rlc-common/build-samples.d.ts.map +0 -1
- package/dist/src/rlc-common/build-samples.js +0 -30
- package/dist/src/rlc-common/build-samples.js.map +0 -1
- package/dist/src/rlc-common/build-schema-type.d.ts +0 -20
- package/dist/src/rlc-common/build-schema-type.d.ts.map +0 -1
- package/dist/src/rlc-common/build-schema-type.js +0 -64
- package/dist/src/rlc-common/build-schema-type.js.map +0 -1
- package/dist/src/rlc-common/build-serialize-helper.d.ts +0 -6
- package/dist/src/rlc-common/build-serialize-helper.d.ts.map +0 -1
- package/dist/src/rlc-common/build-serialize-helper.js +0 -36
- package/dist/src/rlc-common/build-serialize-helper.js.map +0 -1
- package/dist/src/rlc-common/build-top-level-index-file.d.ts +0 -6
- package/dist/src/rlc-common/build-top-level-index-file.d.ts.map +0 -1
- package/dist/src/rlc-common/build-top-level-index-file.js +0 -44
- package/dist/src/rlc-common/build-top-level-index-file.js.map +0 -1
- package/dist/src/rlc-common/helpers/path-utils.d.ts +0 -2
- package/dist/src/rlc-common/helpers/path-utils.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/path-utils.js +0 -9
- package/dist/src/rlc-common/helpers/path-utils.js.map +0 -1
- package/dist/src/rlc-common/helpers/shortcut-methods.d.ts +0 -4
- package/dist/src/rlc-common/helpers/shortcut-methods.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/shortcut-methods.js +0 -49
- package/dist/src/rlc-common/helpers/shortcut-methods.js.map +0 -1
- package/dist/src/rlc-common/helpers/value-generation-util.d.ts +0 -12
- package/dist/src/rlc-common/helpers/value-generation-util.d.ts.map +0 -1
- package/dist/src/rlc-common/helpers/value-generation-util.js +0 -161
- package/dist/src/rlc-common/helpers/value-generation-util.js.map +0 -1
- package/dist/src/rlc-common/transform-sample-groups.d.ts +0 -9
- package/dist/src/rlc-common/transform-sample-groups.d.ts.map +0 -1
- package/dist/src/rlc-common/transform-sample-groups.js +0 -298
- package/dist/src/rlc-common/transform-sample-groups.js.map +0 -1
- package/src/rlc-common/build-client-definitions.ts +0 -226
- package/src/rlc-common/build-client.ts +0 -463
- package/src/rlc-common/build-index-file.ts +0 -220
- package/src/rlc-common/build-is-unexpected-helper.ts +0 -241
- package/src/rlc-common/build-logger.ts +0 -29
- package/src/rlc-common/build-method-shortcuts.ts +0 -71
- package/src/rlc-common/build-object-types.ts +0 -591
- package/src/rlc-common/build-paginate-helper.ts +0 -31
- package/src/rlc-common/build-parameter-types.ts +0 -460
- package/src/rlc-common/build-polling-helper.ts +0 -80
- package/src/rlc-common/build-response-types.ts +0 -170
- package/src/rlc-common/build-samples.ts +0 -32
- package/src/rlc-common/build-schema-type.ts +0 -79
- package/src/rlc-common/build-serialize-helper.ts +0 -49
- package/src/rlc-common/build-top-level-index-file.ts +0 -51
- package/src/rlc-common/helpers/path-utils.ts +0 -8
- package/src/rlc-common/helpers/shortcut-methods.ts +0 -58
- package/src/rlc-common/helpers/value-generation-util.ts +0 -234
- package/src/rlc-common/transform-sample-groups.ts +0 -383
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { joinPaths } from "@typespec/compiler";
|
|
4
|
-
import { Project, VariableDeclarationKind, } from "ts-morph";
|
|
5
|
-
import { hasUnexpectedHelper } from "./helpers/operation-helpers.js";
|
|
6
|
-
export function buildIsUnexpectedHelper(model) {
|
|
7
|
-
if (!hasUnexpectedHelper(model)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
const project = new Project({ useInMemoryFileSystem: true });
|
|
11
|
-
const srcPath = model.srcPath;
|
|
12
|
-
const filePath = joinPaths(srcPath, `isUnexpected.ts`);
|
|
13
|
-
const isErrorHelper = project.createSourceFile(filePath, undefined, {
|
|
14
|
-
overwrite: true,
|
|
15
|
-
});
|
|
16
|
-
let map = {};
|
|
17
|
-
const allResponseTypes = new Set();
|
|
18
|
-
const allErrorTypes = new Set();
|
|
19
|
-
const overloads = [];
|
|
20
|
-
const pathDictionary = model.paths;
|
|
21
|
-
for (const [path, details] of Object.entries(pathDictionary)) {
|
|
22
|
-
for (const [methodName, methodDetails] of Object.entries(details.methods)) {
|
|
23
|
-
const originalMethod = methodName.toUpperCase();
|
|
24
|
-
const operation = `${originalMethod} ${path}`;
|
|
25
|
-
const successCodeSet = new Set(map["operation"] ?? []);
|
|
26
|
-
for (const detail of methodDetails) {
|
|
27
|
-
detail.successStatus.forEach(successCodeSet.add, successCodeSet);
|
|
28
|
-
// LROs may call the same path but with GET
|
|
29
|
-
// to get the operation status.
|
|
30
|
-
if (detail.operationHelperDetail?.lroDetails?.isLongRunning && originalMethod !== "GET") {
|
|
31
|
-
const operation = `GET ${path}`;
|
|
32
|
-
const logicalSuccessCodes = detail.operationHelperDetail?.lroDetails?.logicalResponseTypes
|
|
33
|
-
?.success
|
|
34
|
-
? ["200"]
|
|
35
|
-
: [];
|
|
36
|
-
const initialSuccessCodes = (pathDictionary[path]?.methods["get"] &&
|
|
37
|
-
pathDictionary[path]?.methods["get"]?.[0]?.successStatus) ??
|
|
38
|
-
detail.successStatus;
|
|
39
|
-
map = {
|
|
40
|
-
...map,
|
|
41
|
-
...{
|
|
42
|
-
[operation]: Array.from(new Set(logicalSuccessCodes.concat(initialSuccessCodes))),
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const successTypes = [...detail.responseTypes.success];
|
|
47
|
-
const errorTypes = [...detail.responseTypes.error];
|
|
48
|
-
if (model.helperDetails?.clientLroOverload &&
|
|
49
|
-
detail.operationHelperDetail?.lroDetails?.logicalResponseTypes?.success) {
|
|
50
|
-
successTypes.push(...(detail.operationHelperDetail.lroDetails.logicalResponseTypes.success ?? []));
|
|
51
|
-
}
|
|
52
|
-
if (!successTypes.length || !errorTypes.length || !errorTypes[0]) {
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
successTypes.forEach((t) => allResponseTypes.add(t));
|
|
56
|
-
errorTypes.forEach((t) => {
|
|
57
|
-
allResponseTypes.add(t);
|
|
58
|
-
allErrorTypes.add(t);
|
|
59
|
-
});
|
|
60
|
-
overloads.push({
|
|
61
|
-
isExported: true,
|
|
62
|
-
parameters: [
|
|
63
|
-
{
|
|
64
|
-
name: "response",
|
|
65
|
-
type: [...successTypes, ...errorTypes].join(" | "),
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
returnType: `response is ${errorTypes[0]}`,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
map = { ...map, ...{ [operation]: Array.from(successCodeSet) } };
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
isErrorHelper.addImportDeclaration({
|
|
75
|
-
isTypeOnly: true,
|
|
76
|
-
namedImports: [...allResponseTypes],
|
|
77
|
-
moduleSpecifier: `./responses.js`,
|
|
78
|
-
});
|
|
79
|
-
isErrorHelper.addVariableStatement({
|
|
80
|
-
declarations: [
|
|
81
|
-
{
|
|
82
|
-
name: "responseMap",
|
|
83
|
-
initializer: JSON.stringify(map),
|
|
84
|
-
type: "Record<string, string[]>",
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
declarationKind: VariableDeclarationKind.Const,
|
|
88
|
-
});
|
|
89
|
-
if (allErrorTypes.size) {
|
|
90
|
-
isErrorHelper.addFunction({
|
|
91
|
-
overloads,
|
|
92
|
-
isExported: true,
|
|
93
|
-
name: "isUnexpected",
|
|
94
|
-
parameters: [
|
|
95
|
-
{
|
|
96
|
-
name: "response",
|
|
97
|
-
type: [...allResponseTypes].join(" | "),
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
returnType: `response is ${[...allErrorTypes].join(" | ")}`,
|
|
101
|
-
statements: [
|
|
102
|
-
`
|
|
103
|
-
const lroOriginal = response.headers["x-ms-original-url"];
|
|
104
|
-
const url = new URL(lroOriginal ?? response.request.url);
|
|
105
|
-
const method = response.request.method;
|
|
106
|
-
let pathDetails = responseMap[\`\${method} \${url.pathname}\`];
|
|
107
|
-
if (!pathDetails) {
|
|
108
|
-
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
109
|
-
}
|
|
110
|
-
return !pathDetails.includes(response.status);
|
|
111
|
-
`,
|
|
112
|
-
],
|
|
113
|
-
});
|
|
114
|
-
isErrorHelper.addFunction({
|
|
115
|
-
isExported: false,
|
|
116
|
-
name: "getParametrizedPathSuccess",
|
|
117
|
-
parameters: [
|
|
118
|
-
{
|
|
119
|
-
name: "method",
|
|
120
|
-
type: "string",
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: "path",
|
|
124
|
-
type: "string",
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
returnType: `string[]`,
|
|
128
|
-
statements: [
|
|
129
|
-
`
|
|
130
|
-
const pathParts = path.split("/");
|
|
131
|
-
|
|
132
|
-
// Traverse list to match the longest candidate
|
|
133
|
-
// matchedLen: the length of candidate path
|
|
134
|
-
// matchedValue: the matched status code array
|
|
135
|
-
let matchedLen = -1,
|
|
136
|
-
matchedValue: string[] = [];
|
|
137
|
-
|
|
138
|
-
// Iterate the responseMap to find a match
|
|
139
|
-
for (const [key, value] of Object.entries(responseMap)) {
|
|
140
|
-
// Extracting the path from the map key which is in format
|
|
141
|
-
// GET /path/foo
|
|
142
|
-
if (!key.startsWith(method)) {
|
|
143
|
-
continue;
|
|
144
|
-
}
|
|
145
|
-
const candidatePath = getPathFromMapKey(key);
|
|
146
|
-
// Get each part of the url path
|
|
147
|
-
const candidateParts = candidatePath.split("/");
|
|
148
|
-
|
|
149
|
-
// track if we have found a match to return the values found.
|
|
150
|
-
let found = true;
|
|
151
|
-
for (
|
|
152
|
-
let i = candidateParts.length - 1, j = pathParts.length - 1;
|
|
153
|
-
i >= 1 && j >= 1;
|
|
154
|
-
i--, j--
|
|
155
|
-
) {
|
|
156
|
-
if (
|
|
157
|
-
candidateParts[i]?.startsWith("{") &&
|
|
158
|
-
candidateParts[i]?.indexOf("}") !== -1
|
|
159
|
-
) {
|
|
160
|
-
const start = candidateParts[i]!.indexOf("}") + 1,
|
|
161
|
-
end = candidateParts[i]?.length;
|
|
162
|
-
// If the current part of the candidate is a "template" part
|
|
163
|
-
// Try to use the suffix of pattern to match the path
|
|
164
|
-
// {guid} ==> $
|
|
165
|
-
// {guid}:export ==> :export$
|
|
166
|
-
const isMatched = new RegExp(
|
|
167
|
-
\`\${candidateParts[i]?.slice(start, end)}\`
|
|
168
|
-
).test(pathParts[j] || '');
|
|
169
|
-
|
|
170
|
-
if (!isMatched) {
|
|
171
|
-
found = false;
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
continue;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// If the candidate part is not a template and
|
|
178
|
-
// the parts don't match mark the candidate as not found
|
|
179
|
-
// to move on with the next candidate path.
|
|
180
|
-
if (candidateParts[i] !== pathParts[j]) {
|
|
181
|
-
found = false;
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// We finished evaluating the current candidate parts
|
|
187
|
-
// Update the matched value if and only if we found the longer pattern
|
|
188
|
-
if (found && candidatePath.length > matchedLen) {
|
|
189
|
-
matchedLen = candidatePath.length;
|
|
190
|
-
matchedValue = value;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
return matchedValue;
|
|
195
|
-
`,
|
|
196
|
-
],
|
|
197
|
-
});
|
|
198
|
-
isErrorHelper.addFunction({
|
|
199
|
-
isExported: false,
|
|
200
|
-
name: "getPathFromMapKey",
|
|
201
|
-
parameters: [
|
|
202
|
-
{
|
|
203
|
-
name: "mapKey",
|
|
204
|
-
type: "string",
|
|
205
|
-
},
|
|
206
|
-
],
|
|
207
|
-
returnType: `string`,
|
|
208
|
-
statements: [
|
|
209
|
-
`const pathStart = mapKey.indexOf("/");
|
|
210
|
-
return mapKey.slice(pathStart);`,
|
|
211
|
-
],
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
path: filePath,
|
|
216
|
-
content: isErrorHelper.getFullText(),
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=build-is-unexpected-helper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-is-unexpected-helper.js","sourceRoot":"","sources":["../../../src/rlc-common/build-is-unexpected-helper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAGL,OAAO,EACP,uBAAuB,GACxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,MAAM,UAAU,uBAAuB,CAAC,KAAe;IACrD,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAA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;YAChB,IAAI,EAAE,cAAc;YACpB,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;iBACxC;aACF;YACD,UAAU,EAAE,eAAe,CAAC,GAAG,aAAa,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC3D,UAAU,EAAE;gBACV;;;;;;;;;SASC;aACF;SACF,CAAC,CAAC;QACH,aAAa,CAAC,WAAW,CAAC;YACxB,UAAU,EAAE,KAAK;YACjB,IAAI,EAAE,4BAA4B;YAClC,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;iBACf;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,UAAU,EAAE,UAAU;YACtB,UAAU,EAAE;gBACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAkEC;aACF;SACF,CAAC,CAAC;QAEH,aAAa,CAAC,WAAW,CAAC;YACxB,UAAU,EAAE,KAAK;YACjB,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,UAAU,EAAE,QAAQ;YACpB,UAAU,EAAE;gBACV;yCACiC;aAClC;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,aAAa,CAAC,WAAW,EAAE;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-logger.d.ts","sourceRoot":"","sources":["../../../src/rlc-common/build-logger.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ;;;cAqB1C"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { joinPaths } from "@typespec/compiler";
|
|
4
|
-
import { Project } from "ts-morph";
|
|
5
|
-
export function buildLogger(model) {
|
|
6
|
-
if (!model.options) {
|
|
7
|
-
return undefined;
|
|
8
|
-
}
|
|
9
|
-
const project = new Project({ useInMemoryFileSystem: true });
|
|
10
|
-
const { rlcSourceDir } = model;
|
|
11
|
-
const { packageDetails } = model.options;
|
|
12
|
-
const filePath = joinPaths(rlcSourceDir, `logger.ts`);
|
|
13
|
-
const loggerFile = project.createSourceFile("logger.ts", undefined, {
|
|
14
|
-
overwrite: true,
|
|
15
|
-
});
|
|
16
|
-
loggerFile.addImportDeclaration({
|
|
17
|
-
namedImports: ["createClientLogger"],
|
|
18
|
-
moduleSpecifier: `@azure/logger`,
|
|
19
|
-
});
|
|
20
|
-
loggerFile.addStatements(`export const logger = createClientLogger("${packageDetails.nameWithoutScope ?? packageDetails?.name ?? ""}")`);
|
|
21
|
-
return { path: filePath, content: loggerFile.getFullText() };
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=build-logger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-logger.js","sourceRoot":"","sources":["../../../src/rlc-common/build-logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,MAAM,UAAU,WAAW,CAAC,KAAe;IACzC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC/B,MAAM,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC;IACzC,MAAM,QAAQ,GAAG,SAAS,CAAC,YAAa,EAAE,WAAW,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,EAAE;QAClE,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IACH,UAAU,CAAC,oBAAoB,CAAC;QAC9B,YAAY,EAAE,CAAC,oBAAoB,CAAC;QACpC,eAAe,EAAE,eAAe;KACjC,CAAC,CAAC;IACH,UAAU,CAAC,aAAa,CACtB,6CACE,cAAe,CAAC,gBAAgB,IAAI,cAAc,EAAE,IAAI,IAAI,EAC9D,IAAI,CACL,CAAC;IACF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ReservedName } from "./helpers/name-utils.js";
|
|
2
|
-
import { Paths } from "./interfaces.js";
|
|
3
|
-
export declare const REST_CLIENT_RESERVED: ReservedName[];
|
|
4
|
-
export declare function buildMethodShortcutImplementation(paths: Paths): Record<string, string[]>;
|
|
5
|
-
//# sourceMappingURL=build-method-shortcuts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-method-shortcuts.d.ts","sourceRoot":"","sources":["../../../src/rlc-common/build-method-shortcuts.ts"],"names":[],"mappings":"AAGA,OAAO,EAA6C,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAA+B,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErE,eAAO,MAAM,oBAAoB,EAAE,YAAY,EAU9C,CAAC;AAEF,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,KAAK,4BAsB7D"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { CasingConvention, NameType, normalizeName } from "./helpers/name-utils.js";
|
|
4
|
-
export const REST_CLIENT_RESERVED = [
|
|
5
|
-
{ name: "path", reservedFor: [NameType.Property, NameType.OperationGroup] },
|
|
6
|
-
{
|
|
7
|
-
name: "pathUnchecked",
|
|
8
|
-
reservedFor: [NameType.Property, NameType.OperationGroup],
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: "pipeline",
|
|
12
|
-
reservedFor: [NameType.Property, NameType.OperationGroup],
|
|
13
|
-
},
|
|
14
|
-
];
|
|
15
|
-
export function buildMethodShortcutImplementation(paths) {
|
|
16
|
-
const keys = {};
|
|
17
|
-
for (const path of Object.keys(paths)) {
|
|
18
|
-
const pathMetadata = paths[path];
|
|
19
|
-
if (!pathMetadata) {
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
const groupName = normalizeName(pathMetadata.operationGroupName, NameType.OperationGroup, true, REST_CLIENT_RESERVED, CasingConvention.Camel);
|
|
23
|
-
if (keys[groupName]) {
|
|
24
|
-
keys[groupName].push(...buildOperationDeclarations(path, pathMetadata));
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
keys[groupName] = buildOperationDeclarations(path, pathMetadata);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return keys;
|
|
31
|
-
}
|
|
32
|
-
function buildOperationDeclarations(path, pathMetadata) {
|
|
33
|
-
let ops = [];
|
|
34
|
-
for (const method of Object.keys(pathMetadata.methods)) {
|
|
35
|
-
const methodOps = pathMetadata.methods[method];
|
|
36
|
-
if (!methodOps) {
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
for (const op of methodOps) {
|
|
40
|
-
const pathParams = pathMetadata?.pathParameters;
|
|
41
|
-
const name = normalizeName(op.operationName, NameType.Property);
|
|
42
|
-
const methodDefinitions = generateOperationDeclaration(path, name, method, pathParams);
|
|
43
|
-
ops = [...ops, methodDefinitions];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return ops;
|
|
47
|
-
}
|
|
48
|
-
function generateOperationDeclaration(path, operationName, method, pathParams = []) {
|
|
49
|
-
const pathParamNames = `${pathParams.length > 0 ? `${pathParams.map((p) => p.name)},` : ""}`;
|
|
50
|
-
return `"${operationName}": (${pathParamNames} options) => {
|
|
51
|
-
return client.path("${path}", ${pathParamNames}).${method}(options);
|
|
52
|
-
}`;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=build-method-shortcuts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-method-shortcuts.js","sourceRoot":"","sources":["../../../src/rlc-common/build-method-shortcuts.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAgB,MAAM,yBAAyB,CAAC;AAGlG,MAAM,CAAC,MAAM,oBAAoB,GAAmB;IAClD,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,EAAE;IAC3E;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC;KAC1D;IACD;QACE,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC;KAC1D;CACF,CAAC;AAEF,MAAM,UAAU,iCAAiC,CAAC,KAAY;IAC5D,MAAM,IAAI,GAA6B,EAAE,CAAC;IAC1C,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACtC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,YAAY,EAAE,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qB,EACrB,MAAc,EACd,aAA8B,EAAE;IAEhC,MAAM,cAAc,GAAG,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7F,OAAO,IAAI,aAAa,OAAO,cAAc;4BACnB,IAAI,MAAM,cAAc,KAAK,MAAM;MACzD,CAAC;AACP,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { InterfaceDeclarationStructure, PropertySignatureStructure, TypeAliasDeclarationStructure } from "ts-morph";
|
|
2
|
-
import { ObjectSchema, Parameter, Property, RLCModel, SchemaContext } from "./interfaces.js";
|
|
3
|
-
/**
|
|
4
|
-
* Generates interfaces for ObjectSchemas
|
|
5
|
-
*/
|
|
6
|
-
export declare function buildObjectInterfaces(model: RLCModel, importedModels: Set<string>, schemaUsage: SchemaContext[]): InterfaceDeclarationStructure[];
|
|
7
|
-
export declare function buildObjectAliases(model: RLCModel, importedModels: Set<string>, schemaUsage: SchemaContext[]): TypeAliasDeclarationStructure[];
|
|
8
|
-
export declare function buildPolymorphicAliases(model: RLCModel, schemaUsage: SchemaContext[]): TypeAliasDeclarationStructure[];
|
|
9
|
-
/**
|
|
10
|
-
* Builds the interface for the current object schema. If it is a polymorphic
|
|
11
|
-
* root node it will suffix it with Base.
|
|
12
|
-
*/
|
|
13
|
-
export declare function getObjectInterfaceDeclaration(baseName: string, objectSchema: ObjectSchema, schemaUsage: SchemaContext[], importedModels: Set<string>): InterfaceDeclarationStructure;
|
|
14
|
-
/**
|
|
15
|
-
* Gets a list of types a given object may extend from
|
|
16
|
-
*/
|
|
17
|
-
export declare function getImmediateParentsNames(objectSchema: ObjectSchema, schemaUsage: SchemaContext[]): string[];
|
|
18
|
-
interface GetPropertySignatureOptions {
|
|
19
|
-
flattenBinaryArrays?: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Builds a Typescript property or parameter signature
|
|
23
|
-
* @param schema - Property or parameter to get the Typescript signature for
|
|
24
|
-
* @param importedModels - Set to track the models that need to be imported
|
|
25
|
-
* @returns a PropertySignatureStructure for the property.
|
|
26
|
-
*/
|
|
27
|
-
export declare function getPropertySignature(property: Property | Parameter, schemaUsage: SchemaContext[], importedModels: Set<string>, options?: GetPropertySignatureOptions): PropertySignatureStructure;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=build-object-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-object-types.d.ts","sourceRoot":"","sources":["../../../src/rlc-common/build-object-types.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAE7B,0BAA0B,EAE1B,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAIlB,OAAO,EAEL,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EAER,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,QAAQ,EACf,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,EAC3B,WAAW,EAAE,aAAa,EAAE,GAC3B,6BAA6B,EAAE,CA8BjC;AAyFD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,QAAQ,EACf,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,EAC3B,WAAW,EAAE,aAAa,EAAE,mCAkD7B;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,mCAepF;AAkDD;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,aAAa,EAAE,EAC5B,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,GAC1B,6BAA6B,CAyB/B;AAiID;;GAEG;AAC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