@azure-tools/rlc-common 0.27.0 → 0.28.0
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/.rush/temp/package-deps_build.json +15 -15
- package/CHANGELOG.md +11 -0
- package/dist/buildClientDefinitions.js +7 -1
- package/dist/buildClientDefinitions.js.map +1 -1
- package/dist/buildIndexFile.js +0 -19
- package/dist/buildIndexFile.js.map +1 -1
- package/dist/buildIsUnexpectedHelper.js +44 -44
- package/dist/buildIsUnexpectedHelper.js.map +1 -1
- package/dist/buildObjectTypes.js +101 -31
- package/dist/buildObjectTypes.js.map +1 -1
- package/dist/helpers/importsUtil.js +5 -1
- package/dist/helpers/importsUtil.js.map +1 -1
- package/dist/helpers/nameConstructors.js +7 -1
- package/dist/helpers/nameConstructors.js.map +1 -1
- package/dist/helpers/operationHelpers.js +1 -6
- package/dist/helpers/operationHelpers.js.map +1 -1
- package/dist/helpers/schemaHelpers.js +5 -1
- package/dist/helpers/schemaHelpers.js.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/metadata/packageJson/azurePackageCommon.js +3 -3
- package/dist/metadata/packageJson/azurePackageCommon.js.map +1 -1
- package/dist/metadata/packageJson/buildAzureMonorepoPackage.js +6 -6
- package/dist/metadata/packageJson/buildAzureMonorepoPackage.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist-esm/buildClientDefinitions.js +7 -0
- package/dist-esm/buildClientDefinitions.js.map +1 -1
- package/dist-esm/buildIndexFile.js +1 -20
- package/dist-esm/buildIndexFile.js.map +1 -1
- package/dist-esm/buildIsUnexpectedHelper.js +49 -44
- package/dist-esm/buildIsUnexpectedHelper.js.map +1 -1
- package/dist-esm/buildObjectTypes.js +107 -30
- package/dist-esm/buildObjectTypes.js.map +1 -1
- package/dist-esm/helpers/importsUtil.js +5 -1
- package/dist-esm/helpers/importsUtil.js.map +1 -1
- package/dist-esm/helpers/nameConstructors.js +5 -0
- package/dist-esm/helpers/nameConstructors.js.map +1 -1
- package/dist-esm/helpers/operationHelpers.js +0 -3
- package/dist-esm/helpers/operationHelpers.js.map +1 -1
- package/dist-esm/helpers/schemaHelpers.js +3 -0
- package/dist-esm/helpers/schemaHelpers.js.map +1 -1
- package/dist-esm/interfaces.js.map +1 -1
- package/dist-esm/metadata/packageJson/azurePackageCommon.js +3 -3
- package/dist-esm/metadata/packageJson/azurePackageCommon.js.map +1 -1
- package/dist-esm/metadata/packageJson/buildAzureMonorepoPackage.js +6 -5
- package/dist-esm/metadata/packageJson/buildAzureMonorepoPackage.js.map +1 -1
- package/dist-esm/package.json +1 -1
- package/package.json +2 -2
- package/src/buildClientDefinitions.ts +15 -0
- package/src/buildIndexFile.ts +0 -26
- package/src/buildIsUnexpectedHelper.ts +58 -58
- package/src/buildObjectTypes.ts +160 -31
- package/src/helpers/importsUtil.ts +5 -1
- package/src/helpers/nameConstructors.ts +10 -0
- package/src/helpers/operationHelpers.ts +0 -8
- package/src/helpers/schemaHelpers.ts +7 -0
- package/src/interfaces.ts +4 -6
- package/src/metadata/packageJson/azurePackageCommon.ts +4 -3
- package/src/metadata/packageJson/buildAzureMonorepoPackage.ts +7 -5
- package/test/helpers/importsUtil.spec.ts +1 -1
- package/test/integration/packageJson.spec.ts +8 -8
- package/types/buildObjectTypes.d.ts +6 -2
- package/types/helpers/nameConstructors.d.ts +1 -0
- package/types/helpers/operationHelpers.d.ts +0 -1
- package/types/helpers/schemaHelpers.d.ts +2 -1
- package/types/interfaces.d.ts +3 -7
- package/types/metadata/packageJson/azurePackageCommon.d.ts +1 -1
- package/types/metadata/packageJson/buildAzureMonorepoPackage.d.ts +8 -8
- package/.rush/temp/operation/build/all.log +0 -1
- package/.rush/temp/operation/build/state.json +0 -3
|
@@ -38,3 +38,4 @@ export interface ModuleName {
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function getImportModuleName(name: ModuleName, codeModel: RLCModel): string;
|
|
40
40
|
export declare function getClientName(model: RLCModel): string;
|
|
41
|
+
export declare function getMultipartPartTypeName(schemaName: string, partName: string): string;
|
|
@@ -12,4 +12,3 @@ export declare function hasCsvCollection(model: RLCModel): boolean;
|
|
|
12
12
|
export declare function hasUnexpectedHelper(model: RLCModel): boolean;
|
|
13
13
|
export declare function hasInputModels(model: RLCModel): boolean;
|
|
14
14
|
export declare function hasOutputModels(model: RLCModel): boolean;
|
|
15
|
-
export declare function needsFilePolyfil(model: RLCModel): boolean | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { RLCModel, Schema } from "../interfaces.js";
|
|
1
|
+
import { ArraySchema, RLCModel, Schema } from "../interfaces.js";
|
|
2
2
|
export interface IsDictionaryOptions {
|
|
3
3
|
filterEmpty?: boolean;
|
|
4
4
|
}
|
|
5
|
+
export declare function isArraySchema(schema: Schema): schema is ArraySchema;
|
|
5
6
|
export declare function isDictionarySchema(schema: Schema, options?: IsDictionaryOptions): boolean;
|
|
6
7
|
export declare function isObjectSchema(schema: Schema): boolean;
|
|
7
8
|
export declare function isConstantSchema(schema: Schema): boolean;
|
package/types/interfaces.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface ImportInfo {
|
|
|
20
20
|
export type Imports = Record<ImportType, ImportMetadata>;
|
|
21
21
|
export type ImportType =
|
|
22
22
|
/**inner models' imports for parameter and response */
|
|
23
|
-
"parameter" | "response" | "rlcIndex" | "modularModel" | "rlcClientFactory"
|
|
23
|
+
"parameter" | "response" | "rlcIndex" | "modularModel" | "rlcClientFactory" | "rlcClientDefinition"
|
|
24
24
|
/**common third party imports */
|
|
25
25
|
| "restClient" | "coreAuth" | "restPipeline" | "coreUtil" | "coreLogger" | "commonFallback"
|
|
26
26
|
/**azure specific imports */
|
|
@@ -99,7 +99,7 @@ export interface PagingDetails {
|
|
|
99
99
|
isComplexPaging: boolean;
|
|
100
100
|
}
|
|
101
101
|
export type Methods = {
|
|
102
|
-
[key: string]: [
|
|
102
|
+
[key: string]: OperationMethod[];
|
|
103
103
|
};
|
|
104
104
|
export interface ResponseTypes {
|
|
105
105
|
success: string[];
|
|
@@ -235,6 +235,7 @@ export interface ObjectSchema extends Schema {
|
|
|
235
235
|
discriminatorValue?: string;
|
|
236
236
|
discriminator?: Schema;
|
|
237
237
|
isPolyParent?: boolean;
|
|
238
|
+
isMultipartBody?: boolean;
|
|
238
239
|
children?: {
|
|
239
240
|
all?: ObjectSchema[];
|
|
240
241
|
immediate?: ObjectSchema[];
|
|
@@ -284,11 +285,6 @@ export interface ParameterBodyMetadata {
|
|
|
284
285
|
* usually false in typespec source because rlc-common doesn't have to prepare the whole part shape
|
|
285
286
|
*/
|
|
286
287
|
isPartialBody?: boolean;
|
|
287
|
-
/**
|
|
288
|
-
* The `File` type is only available in the browser and Node 20, so we need to check if the file type is included in the body
|
|
289
|
-
* If yes, we need to export the helpers for customers. This would be useful in multipart/form-data to upload files
|
|
290
|
-
*/
|
|
291
|
-
needsFilePolyfil?: boolean;
|
|
292
288
|
body?: ParameterBodySchema[];
|
|
293
289
|
}
|
|
294
290
|
export interface ParameterBodySchema extends Schema {
|
|
@@ -31,7 +31,7 @@ export declare function getAzureCommonPackageInfo(config: AzurePackageInfoConfig
|
|
|
31
31
|
/**
|
|
32
32
|
* Builds the common dependencies for an Azure package.
|
|
33
33
|
*/
|
|
34
|
-
export declare function getAzurePackageDependencies({ hasLro, hasPaging }: AzurePackageInfoConfig): Record<string, string>;
|
|
34
|
+
export declare function getAzurePackageDependencies({ hasLro, hasPaging, specSource }: AzurePackageInfoConfig): Record<string, string>;
|
|
35
35
|
export declare function getAzurePackageDevDependencies(config: AzurePackageInfoConfig): {
|
|
36
36
|
autorest?: string | undefined;
|
|
37
37
|
"@azure/core-util"?: string | undefined;
|
|
@@ -23,6 +23,7 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
23
23
|
"build:samples": string;
|
|
24
24
|
"check-format": string;
|
|
25
25
|
"execute:samples": string;
|
|
26
|
+
"extract-api": string;
|
|
26
27
|
format: string;
|
|
27
28
|
"generate:client": string;
|
|
28
29
|
"test:browser": string;
|
|
@@ -32,7 +33,6 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
32
33
|
"unit-test"?: string | undefined;
|
|
33
34
|
"integration-test"?: string | undefined;
|
|
34
35
|
clean: string;
|
|
35
|
-
"extract-api": string;
|
|
36
36
|
pack: string;
|
|
37
37
|
} | {
|
|
38
38
|
build: string;
|
|
@@ -49,6 +49,7 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
49
49
|
"build:samples": string;
|
|
50
50
|
"check-format": string;
|
|
51
51
|
"execute:samples": string;
|
|
52
|
+
"extract-api": string;
|
|
52
53
|
format: string;
|
|
53
54
|
"generate:client": string;
|
|
54
55
|
"test:browser": string;
|
|
@@ -58,7 +59,6 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
58
59
|
"unit-test"?: string | undefined;
|
|
59
60
|
"integration-test"?: string | undefined;
|
|
60
61
|
clean: string;
|
|
61
|
-
"extract-api": string;
|
|
62
62
|
pack: string;
|
|
63
63
|
} | {
|
|
64
64
|
build: string;
|
|
@@ -75,6 +75,7 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
75
75
|
"build:samples": string;
|
|
76
76
|
"check-format": string;
|
|
77
77
|
"execute:samples": string;
|
|
78
|
+
"extract-api": string;
|
|
78
79
|
format: string;
|
|
79
80
|
"generate:client": string;
|
|
80
81
|
"test:browser": string;
|
|
@@ -84,7 +85,6 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
84
85
|
"unit-test"?: string | undefined;
|
|
85
86
|
"integration-test"?: string | undefined;
|
|
86
87
|
clean: string;
|
|
87
|
-
"extract-api": string;
|
|
88
88
|
pack: string;
|
|
89
89
|
} | {
|
|
90
90
|
build: string;
|
|
@@ -101,6 +101,7 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
101
101
|
"build:samples": string;
|
|
102
102
|
"check-format": string;
|
|
103
103
|
"execute:samples": string;
|
|
104
|
+
"extract-api": string;
|
|
104
105
|
format: string;
|
|
105
106
|
"generate:client": string;
|
|
106
107
|
"test:browser": string;
|
|
@@ -110,7 +111,6 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
110
111
|
"unit-test"?: string | undefined;
|
|
111
112
|
"integration-test"?: string | undefined;
|
|
112
113
|
clean: string;
|
|
113
|
-
"extract-api": string;
|
|
114
114
|
pack: string;
|
|
115
115
|
};
|
|
116
116
|
dependencies: {
|
|
@@ -173,6 +173,7 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
173
173
|
"build:samples": string;
|
|
174
174
|
"check-format": string;
|
|
175
175
|
"execute:samples": string;
|
|
176
|
+
"extract-api": string;
|
|
176
177
|
format: string;
|
|
177
178
|
"generate:client": string;
|
|
178
179
|
"test:browser": string;
|
|
@@ -182,7 +183,6 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
182
183
|
"unit-test"?: string | undefined;
|
|
183
184
|
"integration-test"?: string | undefined;
|
|
184
185
|
clean: string;
|
|
185
|
-
"extract-api": string;
|
|
186
186
|
pack: string;
|
|
187
187
|
} | {
|
|
188
188
|
build: string;
|
|
@@ -199,6 +199,7 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
199
199
|
"build:samples": string;
|
|
200
200
|
"check-format": string;
|
|
201
201
|
"execute:samples": string;
|
|
202
|
+
"extract-api": string;
|
|
202
203
|
format: string;
|
|
203
204
|
"generate:client": string;
|
|
204
205
|
"test:browser": string;
|
|
@@ -208,7 +209,6 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
208
209
|
"unit-test"?: string | undefined;
|
|
209
210
|
"integration-test"?: string | undefined;
|
|
210
211
|
clean: string;
|
|
211
|
-
"extract-api": string;
|
|
212
212
|
pack: string;
|
|
213
213
|
} | {
|
|
214
214
|
build: string;
|
|
@@ -225,6 +225,7 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
225
225
|
"build:samples": string;
|
|
226
226
|
"check-format": string;
|
|
227
227
|
"execute:samples": string;
|
|
228
|
+
"extract-api": string;
|
|
228
229
|
format: string;
|
|
229
230
|
"generate:client": string;
|
|
230
231
|
"test:browser": string;
|
|
@@ -234,7 +235,6 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
234
235
|
"unit-test"?: string | undefined;
|
|
235
236
|
"integration-test"?: string | undefined;
|
|
236
237
|
clean: string;
|
|
237
|
-
"extract-api": string;
|
|
238
238
|
pack: string;
|
|
239
239
|
} | {
|
|
240
240
|
build: string;
|
|
@@ -251,6 +251,7 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
251
251
|
"build:samples": string;
|
|
252
252
|
"check-format": string;
|
|
253
253
|
"execute:samples": string;
|
|
254
|
+
"extract-api": string;
|
|
254
255
|
format: string;
|
|
255
256
|
"generate:client": string;
|
|
256
257
|
"test:browser": string;
|
|
@@ -260,7 +261,6 @@ export declare function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfi
|
|
|
260
261
|
"unit-test"?: string | undefined;
|
|
261
262
|
"integration-test"?: string | undefined;
|
|
262
263
|
clean: string;
|
|
263
|
-
"extract-api": string;
|
|
264
264
|
pack: string;
|
|
265
265
|
};
|
|
266
266
|
dependencies: {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Invoking: rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js
|