@azure-tools/typespec-azure-resource-manager 0.74.0-dev.6 → 0.74.0-dev.8
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 -0
- package/dist/src/codefixes/delete-property.d.ts +4 -0
- package/dist/src/codefixes/delete-property.d.ts.map +1 -0
- package/dist/src/codefixes/delete-property.js +17 -0
- package/dist/src/codefixes/delete-property.js.map +1 -0
- package/dist/src/lib.d.ts +167 -2
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +66 -0
- package/dist/src/lib.js.map +1 -1
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +2 -0
- package/dist/src/linter.js.map +1 -1
- package/dist/src/operations.d.ts +1 -2
- package/dist/src/operations.d.ts.map +1 -1
- package/dist/src/operations.js +19 -43
- package/dist/src/operations.js.map +1 -1
- package/dist/src/private.decorators.d.ts +2 -1
- package/dist/src/private.decorators.d.ts.map +1 -1
- package/dist/src/private.decorators.js +40 -10
- package/dist/src/private.decorators.js.map +1 -1
- package/dist/src/resource-name.d.ts +27 -0
- package/dist/src/resource-name.d.ts.map +1 -0
- package/dist/src/resource-name.js +82 -0
- package/dist/src/resource-name.js.map +1 -0
- package/dist/src/resource.d.ts +128 -11
- package/dist/src/resource.d.ts.map +1 -1
- package/dist/src/resource.js +378 -31
- package/dist/src/resource.js.map +1 -1
- package/dist/src/rules/model-utils.d.ts +4 -0
- package/dist/src/rules/model-utils.d.ts.map +1 -0
- package/dist/src/rules/model-utils.js +18 -0
- package/dist/src/rules/model-utils.js.map +1 -0
- package/dist/src/rules/no-tags-on-proxy-resource.d.ts +4 -0
- package/dist/src/rules/no-tags-on-proxy-resource.d.ts.map +1 -0
- package/dist/src/rules/no-tags-on-proxy-resource.js +58 -0
- package/dist/src/rules/no-tags-on-proxy-resource.js.map +1 -0
- package/dist/src/state.d.ts +1 -0
- package/dist/src/state.d.ts.map +1 -1
- package/dist/src/state.js +1 -0
- package/dist/src/state.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ Available ruleSets:
|
|
|
82
82
|
| [`@azure-tools/typespec-azure-resource-manager/secret-prop`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/secret-prop) | RPC-v1-13: Check that property with names indicating sensitive information(e.g. contains auth, password, token, secret, etc.) are marked with @secret decorator. |
|
|
83
83
|
| [`@azure-tools/typespec-azure-resource-manager/no-empty-model`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-empty-model) | ARM Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience. |
|
|
84
84
|
| [`@azure-tools/typespec-azure-resource-manager/no-reserved-resource-property`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-reserved-resource-property) | Reserved property names (for example 'billingData') must not be present in a resource's property bag. The property name is matched case-insensitively. |
|
|
85
|
+
| [`@azure-tools/typespec-azure-resource-manager/no-tags-on-proxy-resource`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-tags-on-proxy-resource) | Non-tracked ARM resources must not declare a tags property on the resource envelope. |
|
|
85
86
|
| [`@azure-tools/typespec-azure-resource-manager/no-tenant-level-apis`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-tenant-level-apis) | ARM PUT operations whose resolved paths begin with '/providers' are not allowed, except paths ending in '/operations'. |
|
|
86
87
|
| [`@azure-tools/typespec-azure-resource-manager/no-query-in-point-op`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-query-in-point-op) | Point operations must not declare query parameters beyond api-version. |
|
|
87
88
|
| [`@azure-tools/typespec-azure-resource-manager/use-resource-path-for-put`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/use-resource-path-for-put) | ARM PUT paths must end in resource type and resource name pairs. |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-property.d.ts","sourceRoot":"","sources":["../../../src/codefixes/delete-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAiB5E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineCodeFix, getSourceLocation } from "@typespec/compiler";
|
|
2
|
+
import { skipTrivia } from "@typespec/compiler/ast";
|
|
3
|
+
export function createDeletePropertyCodeFix(node) {
|
|
4
|
+
return defineCodeFix({
|
|
5
|
+
id: "delete-property",
|
|
6
|
+
label: `Delete property '${node.id.sv}'`,
|
|
7
|
+
fix(context) {
|
|
8
|
+
const location = getSourceLocation(node);
|
|
9
|
+
const text = location.file.text;
|
|
10
|
+
const limit = node.parent?.end ?? text.length;
|
|
11
|
+
const cursor = skipTrivia(text, location.end, limit);
|
|
12
|
+
const hasSeparator = cursor < limit && (text[cursor] === ";" || text[cursor] === ",");
|
|
13
|
+
return context.replaceText({ ...location, end: hasSeparator ? cursor + 1 : location.end }, "");
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=delete-property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-property.js","sourceRoot":"","sources":["../../../src/codefixes/delete-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,UAAU,EAA0B,MAAM,wBAAwB,CAAC;AAE5E,MAAM,UAAU,2BAA2B,CAAC,IAAuB;IACjE,OAAO,aAAa,CAAC;QACnB,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,oBAAoB,IAAI,CAAC,EAAE,CAAC,EAAE,GAAG;QACxC,GAAG,CAAC,OAAO;YACT,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAChC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC;YAC9C,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAErD,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;YACtF,OAAO,OAAO,CAAC,WAAW,CACxB,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,EAC9D,EAAE,CACH,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/src/lib.d.ts
CHANGED
|
@@ -28,6 +28,39 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
|
|
|
28
28
|
"arm-resource-missing": {
|
|
29
29
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
30
30
|
};
|
|
31
|
+
"arm-resource-version-not-found": {
|
|
32
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
|
|
33
|
+
};
|
|
34
|
+
"arm-resource-version-not-supported": {
|
|
35
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
36
|
+
};
|
|
37
|
+
"arm-resource-version-transient": {
|
|
38
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
39
|
+
};
|
|
40
|
+
"arm-resource-version-projection-failed": {
|
|
41
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
42
|
+
};
|
|
43
|
+
"arm-resource-service-versions-empty": {
|
|
44
|
+
readonly default: "At least one ARM service version must be selected.";
|
|
45
|
+
};
|
|
46
|
+
"arm-resource-service-options-conflict": {
|
|
47
|
+
readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
|
|
48
|
+
};
|
|
49
|
+
"arm-resource-service-duplicate": {
|
|
50
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
51
|
+
};
|
|
52
|
+
"arm-resource-service-not-arm": {
|
|
53
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
54
|
+
};
|
|
55
|
+
"arm-resource-service-version-mismatch": {
|
|
56
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
|
|
57
|
+
};
|
|
58
|
+
"arm-resource-service-version-invalid": {
|
|
59
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
|
|
60
|
+
};
|
|
61
|
+
"arm-resource-invalid-metadata-name": {
|
|
62
|
+
readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
|
|
63
|
+
};
|
|
31
64
|
"arm-common-types-incompatible-version": {
|
|
32
65
|
readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
|
|
33
66
|
};
|
|
@@ -67,7 +100,7 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
|
|
|
67
100
|
readonly default: "Azure Resource Manager BaseTypes are experimental and may be subject to breaking changes.";
|
|
68
101
|
};
|
|
69
102
|
}, Record<string, any>, never>;
|
|
70
|
-
export declare const reportDiagnostic: <C extends "arm-common-types-incompatible-version" | "arm-common-types-invalid-version" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-base-type" | "arm-resource-missing" | "arm-resource-missing-arm-namespace" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-property" | "arm-resource-missing-name-segment-decorator" | "basetypes-experimental" | "decorator-in-namespace" | "decorator-param-wrong-type" | "invalid-feature-file-version" | "invalid-parameter-rename" | "invalid-version-for-common-type" | "legacy-type-usage" | "parent-type" | "resource-without-path-and-segment" | "resource-without-provider-namespace" | "template-type-constraint-no-met", M extends keyof {
|
|
103
|
+
export declare const reportDiagnostic: <C extends "arm-common-types-incompatible-version" | "arm-common-types-invalid-version" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-base-type" | "arm-resource-invalid-metadata-name" | "arm-resource-missing" | "arm-resource-missing-arm-namespace" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-property" | "arm-resource-missing-name-segment-decorator" | "arm-resource-service-duplicate" | "arm-resource-service-not-arm" | "arm-resource-service-options-conflict" | "arm-resource-service-version-invalid" | "arm-resource-service-version-mismatch" | "arm-resource-service-versions-empty" | "arm-resource-version-not-found" | "arm-resource-version-not-supported" | "arm-resource-version-projection-failed" | "arm-resource-version-transient" | "basetypes-experimental" | "decorator-in-namespace" | "decorator-param-wrong-type" | "invalid-feature-file-version" | "invalid-parameter-rename" | "invalid-version-for-common-type" | "legacy-type-usage" | "parent-type" | "resource-without-path-and-segment" | "resource-without-provider-namespace" | "template-type-constraint-no-met", M extends keyof {
|
|
71
104
|
"decorator-param-wrong-type": {
|
|
72
105
|
readonly armUpdateProviderNamespace: "The parameter to @armUpdateProviderNamespace must be an operation with a 'provider' parameter.";
|
|
73
106
|
readonly armIdentifiersIncorrectEntity: "The @identifiers decorator must be applied to a property that is an array of objects";
|
|
@@ -97,6 +130,39 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
|
|
|
97
130
|
"arm-resource-missing": {
|
|
98
131
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
99
132
|
};
|
|
133
|
+
"arm-resource-version-not-found": {
|
|
134
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
|
|
135
|
+
};
|
|
136
|
+
"arm-resource-version-not-supported": {
|
|
137
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
138
|
+
};
|
|
139
|
+
"arm-resource-version-transient": {
|
|
140
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
141
|
+
};
|
|
142
|
+
"arm-resource-version-projection-failed": {
|
|
143
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
144
|
+
};
|
|
145
|
+
"arm-resource-service-versions-empty": {
|
|
146
|
+
readonly default: "At least one ARM service version must be selected.";
|
|
147
|
+
};
|
|
148
|
+
"arm-resource-service-options-conflict": {
|
|
149
|
+
readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
|
|
150
|
+
};
|
|
151
|
+
"arm-resource-service-duplicate": {
|
|
152
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
153
|
+
};
|
|
154
|
+
"arm-resource-service-not-arm": {
|
|
155
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
156
|
+
};
|
|
157
|
+
"arm-resource-service-version-mismatch": {
|
|
158
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
|
|
159
|
+
};
|
|
160
|
+
"arm-resource-service-version-invalid": {
|
|
161
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
|
|
162
|
+
};
|
|
163
|
+
"arm-resource-invalid-metadata-name": {
|
|
164
|
+
readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
|
|
165
|
+
};
|
|
100
166
|
"arm-common-types-incompatible-version": {
|
|
101
167
|
readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
|
|
102
168
|
};
|
|
@@ -165,6 +231,39 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
|
|
|
165
231
|
"arm-resource-missing": {
|
|
166
232
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
167
233
|
};
|
|
234
|
+
"arm-resource-version-not-found": {
|
|
235
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
|
|
236
|
+
};
|
|
237
|
+
"arm-resource-version-not-supported": {
|
|
238
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
239
|
+
};
|
|
240
|
+
"arm-resource-version-transient": {
|
|
241
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
242
|
+
};
|
|
243
|
+
"arm-resource-version-projection-failed": {
|
|
244
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
245
|
+
};
|
|
246
|
+
"arm-resource-service-versions-empty": {
|
|
247
|
+
readonly default: "At least one ARM service version must be selected.";
|
|
248
|
+
};
|
|
249
|
+
"arm-resource-service-options-conflict": {
|
|
250
|
+
readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
|
|
251
|
+
};
|
|
252
|
+
"arm-resource-service-duplicate": {
|
|
253
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
254
|
+
};
|
|
255
|
+
"arm-resource-service-not-arm": {
|
|
256
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
257
|
+
};
|
|
258
|
+
"arm-resource-service-version-mismatch": {
|
|
259
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
|
|
260
|
+
};
|
|
261
|
+
"arm-resource-service-version-invalid": {
|
|
262
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
|
|
263
|
+
};
|
|
264
|
+
"arm-resource-invalid-metadata-name": {
|
|
265
|
+
readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
|
|
266
|
+
};
|
|
168
267
|
"arm-common-types-incompatible-version": {
|
|
169
268
|
readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
|
|
170
269
|
};
|
|
@@ -203,7 +302,7 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
|
|
|
203
302
|
"basetypes-experimental": {
|
|
204
303
|
readonly default: "Azure Resource Manager BaseTypes are experimental and may be subject to breaking changes.";
|
|
205
304
|
};
|
|
206
|
-
}, C, M>) => void, createDiagnostic: <C extends "arm-common-types-incompatible-version" | "arm-common-types-invalid-version" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-base-type" | "arm-resource-missing" | "arm-resource-missing-arm-namespace" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-property" | "arm-resource-missing-name-segment-decorator" | "basetypes-experimental" | "decorator-in-namespace" | "decorator-param-wrong-type" | "invalid-feature-file-version" | "invalid-parameter-rename" | "invalid-version-for-common-type" | "legacy-type-usage" | "parent-type" | "resource-without-path-and-segment" | "resource-without-provider-namespace" | "template-type-constraint-no-met", M extends keyof {
|
|
305
|
+
}, C, M>) => void, createDiagnostic: <C extends "arm-common-types-incompatible-version" | "arm-common-types-invalid-version" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-base-type" | "arm-resource-invalid-metadata-name" | "arm-resource-missing" | "arm-resource-missing-arm-namespace" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-property" | "arm-resource-missing-name-segment-decorator" | "arm-resource-service-duplicate" | "arm-resource-service-not-arm" | "arm-resource-service-options-conflict" | "arm-resource-service-version-invalid" | "arm-resource-service-version-mismatch" | "arm-resource-service-versions-empty" | "arm-resource-version-not-found" | "arm-resource-version-not-supported" | "arm-resource-version-projection-failed" | "arm-resource-version-transient" | "basetypes-experimental" | "decorator-in-namespace" | "decorator-param-wrong-type" | "invalid-feature-file-version" | "invalid-parameter-rename" | "invalid-version-for-common-type" | "legacy-type-usage" | "parent-type" | "resource-without-path-and-segment" | "resource-without-provider-namespace" | "template-type-constraint-no-met", M extends keyof {
|
|
207
306
|
"decorator-param-wrong-type": {
|
|
208
307
|
readonly armUpdateProviderNamespace: "The parameter to @armUpdateProviderNamespace must be an operation with a 'provider' parameter.";
|
|
209
308
|
readonly armIdentifiersIncorrectEntity: "The @identifiers decorator must be applied to a property that is an array of objects";
|
|
@@ -233,6 +332,39 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
|
|
|
233
332
|
"arm-resource-missing": {
|
|
234
333
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
235
334
|
};
|
|
335
|
+
"arm-resource-version-not-found": {
|
|
336
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
|
|
337
|
+
};
|
|
338
|
+
"arm-resource-version-not-supported": {
|
|
339
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
340
|
+
};
|
|
341
|
+
"arm-resource-version-transient": {
|
|
342
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
343
|
+
};
|
|
344
|
+
"arm-resource-version-projection-failed": {
|
|
345
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
346
|
+
};
|
|
347
|
+
"arm-resource-service-versions-empty": {
|
|
348
|
+
readonly default: "At least one ARM service version must be selected.";
|
|
349
|
+
};
|
|
350
|
+
"arm-resource-service-options-conflict": {
|
|
351
|
+
readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
|
|
352
|
+
};
|
|
353
|
+
"arm-resource-service-duplicate": {
|
|
354
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
355
|
+
};
|
|
356
|
+
"arm-resource-service-not-arm": {
|
|
357
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
358
|
+
};
|
|
359
|
+
"arm-resource-service-version-mismatch": {
|
|
360
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
|
|
361
|
+
};
|
|
362
|
+
"arm-resource-service-version-invalid": {
|
|
363
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
|
|
364
|
+
};
|
|
365
|
+
"arm-resource-invalid-metadata-name": {
|
|
366
|
+
readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
|
|
367
|
+
};
|
|
236
368
|
"arm-common-types-incompatible-version": {
|
|
237
369
|
readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
|
|
238
370
|
};
|
|
@@ -301,6 +433,39 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
|
|
|
301
433
|
"arm-resource-missing": {
|
|
302
434
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
303
435
|
};
|
|
436
|
+
"arm-resource-version-not-found": {
|
|
437
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
|
|
438
|
+
};
|
|
439
|
+
"arm-resource-version-not-supported": {
|
|
440
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
441
|
+
};
|
|
442
|
+
"arm-resource-version-transient": {
|
|
443
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
444
|
+
};
|
|
445
|
+
"arm-resource-version-projection-failed": {
|
|
446
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
|
|
447
|
+
};
|
|
448
|
+
"arm-resource-service-versions-empty": {
|
|
449
|
+
readonly default: "At least one ARM service version must be selected.";
|
|
450
|
+
};
|
|
451
|
+
"arm-resource-service-options-conflict": {
|
|
452
|
+
readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
|
|
453
|
+
};
|
|
454
|
+
"arm-resource-service-duplicate": {
|
|
455
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
456
|
+
};
|
|
457
|
+
"arm-resource-service-not-arm": {
|
|
458
|
+
readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
|
|
459
|
+
};
|
|
460
|
+
"arm-resource-service-version-mismatch": {
|
|
461
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
|
|
462
|
+
};
|
|
463
|
+
"arm-resource-service-version-invalid": {
|
|
464
|
+
readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
|
|
465
|
+
};
|
|
466
|
+
"arm-resource-invalid-metadata-name": {
|
|
467
|
+
readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
|
|
468
|
+
};
|
|
304
469
|
"arm-common-types-incompatible-version": {
|
|
305
470
|
readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
|
|
306
471
|
};
|
package/dist/src/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAmNf,CAAC;AAEH,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAS,CAAC"}
|
package/dist/src/lib.js
CHANGED
|
@@ -58,6 +58,72 @@ export const $lib = createTypeSpecLibrary({
|
|
|
58
58
|
default: paramMessage `No @armResource registration found for type ${"type"}`,
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
|
+
"arm-resource-version-not-found": {
|
|
62
|
+
severity: "error",
|
|
63
|
+
messages: {
|
|
64
|
+
default: paramMessage `API version '${"version"}' was not found. Available versions: ${"availableVersions"}.`,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
"arm-resource-version-not-supported": {
|
|
68
|
+
severity: "error",
|
|
69
|
+
messages: {
|
|
70
|
+
default: paramMessage `API version '${"version"}' cannot be selected because the ARM service is not versioned.`,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
"arm-resource-version-transient": {
|
|
74
|
+
severity: "error",
|
|
75
|
+
messages: {
|
|
76
|
+
default: paramMessage `API version '${"version"}' cannot be selected because the ARM service uses transient versioning.`,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
"arm-resource-version-projection-failed": {
|
|
80
|
+
severity: "error",
|
|
81
|
+
messages: {
|
|
82
|
+
default: paramMessage `API version '${"version"}' could not be projected.`,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
"arm-resource-service-versions-empty": {
|
|
86
|
+
severity: "error",
|
|
87
|
+
messages: {
|
|
88
|
+
default: "At least one ARM service version must be selected.",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
"arm-resource-service-options-conflict": {
|
|
92
|
+
severity: "error",
|
|
93
|
+
messages: {
|
|
94
|
+
default: "The 'version' and 'serviceVersions' options cannot be used together.",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
"arm-resource-service-duplicate": {
|
|
98
|
+
severity: "error",
|
|
99
|
+
messages: {
|
|
100
|
+
default: paramMessage `ARM service namespace '${"namespace"}' was selected more than once.`,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
"arm-resource-service-not-arm": {
|
|
104
|
+
severity: "error",
|
|
105
|
+
messages: {
|
|
106
|
+
default: paramMessage `Namespace '${"namespace"}' is not an ARM provider service.`,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
"arm-resource-service-version-mismatch": {
|
|
110
|
+
severity: "error",
|
|
111
|
+
messages: {
|
|
112
|
+
default: paramMessage `API version '${"version"}' belongs to namespace '${"versionNamespace"}', not selected namespace '${"selectedNamespace"}'.`,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
"arm-resource-service-version-invalid": {
|
|
116
|
+
severity: "error",
|
|
117
|
+
messages: {
|
|
118
|
+
default: paramMessage `API version '${"version"}' is not registered for ARM service namespace '${"namespace"}'.`,
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
"arm-resource-invalid-metadata-name": {
|
|
122
|
+
severity: "error",
|
|
123
|
+
messages: {
|
|
124
|
+
default: paramMessage `The metadata name resolver returned an empty ${"kind"} name for '${"name"}'.`,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
61
127
|
"arm-common-types-incompatible-version": {
|
|
62
128
|
severity: "warning",
|
|
63
129
|
messages: {
|
package/dist/src/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEzE,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;IACxC,IAAI,EAAE,8CAA8C;IACpD,WAAW,EAAE;QACX,4BAA4B,EAAE;YAC5B,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,0BAA0B,EACxB,gGAAgG;gBAClG,6BAA6B,EAC3B,sFAAsF;gBACxF,wBAAwB,EACtB,+FAA+F;aAClG;SACF;QACD,gCAAgC,EAAE;YAChC,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,oLAAoL;aACvL;SACF;QACD,uCAAuC,EAAE;YACvC,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,E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AAwB,SAAS,oBAAoB;gBAC3I,OAAO,EAAE,YAAY,CAAA,kBAAkB,SAAS,4CAA4C;gBAC5F,OAAO,EAAE,YAAY,CAAA,kBAAkB,SAAS,qDAAqD;aACtG;SACF;QACD,mBAAmB,EAAE;YACnB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,8GAA8G;aACjH;SACF;QACD,iCAAiC,EAAE;YACjC,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,uCAAuC,SAAS,uBAAuB,cAAc,kCAAkC,iBAAiB,4BAA4B;aAC1L;SACF;QACD,8BAA8B,EAAE;YAC9B,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,kFAAkF;aAC5F;SACF;QACD,wBAAwB,EAAE;YACxB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,2FAA2F;aAC9F;SACF;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC"}
|
package/dist/src/linter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AA2HA,eAAO,MAAM,OAAO,+CAYlB,CAAC"}
|
package/dist/src/linter.js
CHANGED
|
@@ -38,6 +38,7 @@ import { noQueryInPostRule } from "./rules/no-query-in-post.js";
|
|
|
38
38
|
import { noReservedResourcePropertyRule } from "./rules/no-reserved-resource-property.js";
|
|
39
39
|
import { deleteOperationMissingRule } from "./rules/no-resource-delete-operation.js";
|
|
40
40
|
import { noResponseBodyRule } from "./rules/no-response-body.js";
|
|
41
|
+
import { noTagsOnProxyResourceRule } from "./rules/no-tags-on-proxy-resource.js";
|
|
41
42
|
import { noTenantLevelApisRule } from "./rules/no-tenant-level-apis.js";
|
|
42
43
|
import { operationsInterfaceMissingRule } from "./rules/operations-interface-missing.js";
|
|
43
44
|
import { patchEnvelopePropertiesRules } from "./rules/patch-envelope-properties.js";
|
|
@@ -112,6 +113,7 @@ const rules = [
|
|
|
112
113
|
secretProprule,
|
|
113
114
|
noEmptyModel,
|
|
114
115
|
noReservedResourcePropertyRule,
|
|
116
|
+
noTagsOnProxyResourceRule,
|
|
115
117
|
noTenantLevelApisRule,
|
|
116
118
|
noQueryInPointOpRule,
|
|
117
119
|
useResourcePathForPutRule,
|
package/dist/src/linter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.js","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACpG,OAAO,EAAE,uCAAuC,EAAE,MAAM,qDAAqD,CAAC;AAC9G,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,kCAAk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uCAAuC;IACvC,qCAAqC;IACrC,eAAe;IACf,4BAA4B;IAC5B,0BAA0B;IAC1B,mBAAmB;IACnB,yBAAyB;IACzB,0BAA0B;IAC1B,uBAAuB;IACvB,wBAAwB;IACxB,uBAAuB;IACvB,8BAA8B;IAC9B,kCAAkC;IAClC,6BAA6B;IAC7B,mCAAmC;IACnC,8BAA8B;IAC9B,0BAA0B;IAC1B,yBAAyB;IACzB,iBAAiB;IACjB,iCAAiC;IACjC,yBAAyB;IACzB,+BAA+B;IAC/B,gCAAgC;IAChC,sBAAsB;IACtB,sBAAsB;IACtB,gCAAgC;IAChC,6BAA6B;IAC7B,iBAAiB;IACjB,wBAAwB;IACxB,uBAAuB;IACvB,gBAAgB;IAChB,0BAA0B;IAC1B,uBAAuB;IACvB,cAAc;IACd,gCAAgC;IAChC,qCAAqC;IACrC,qBAAqB;IACrB,gCAAgC;IAChC,yBAAyB;IACzB,kBAAkB;IAClB,iBAAiB;IACjB,8BAA8B;IAC9B,4BAA4B;IAC5B,mBAAmB;IACnB,gBAAgB;IAChB,uBAAuB;IACvB,cAAc;IACd,mBAAmB;IACnB,uBAAuB;IACvB,4BAA4B;IAC5B,cAAc;IACd,YAAY;IACZ,8BAA8B;IAC9B,qBAAqB;IACrB,oBAAoB;IACpB,yBAAyB;IACzB,+BAA+B;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAClC,KAAK;IACL,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,MAAM,EAAE,MAAM,CAAC,WAAW,CACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBAClB,gDAAgD,IAAI,CAAC,IAAI,EAAE;gBAC3D,IAAI,KAAK,+BAA+B;aACzC,CAAC,CACH;SACF;KACF;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"linter.js","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EA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;IACd,gCAAgC;IAChC,qCAAqC;IACrC,qBAAqB;IACrB,gCAAgC;IAChC,yBAAyB;IACzB,kBAAkB;IAClB,iBAAiB;IACjB,8BAA8B;IAC9B,4BAA4B;IAC5B,mBAAmB;IACnB,gBAAgB;IAChB,uBAAuB;IACvB,cAAc;IACd,mBAAmB;IACnB,uBAAuB;IACvB,4BAA4B;IAC5B,cAAc;IACd,YAAY;IACZ,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,oBAAoB;IACpB,yBAAyB;IACzB,+BAA+B;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAClC,KAAK;IACL,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,MAAM,EAAE,MAAM,CAAC,WAAW,CACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBAClB,gDAAgD,IAAI,CAAC,IAAI,EAAE;gBAC3D,IAAI,KAAK,+BAA+B;aACzC,CAAC,CACH;SACF;KACF;CACF,CAAC,CAAC"}
|
package/dist/src/operations.d.ts
CHANGED
|
@@ -99,7 +99,6 @@ export declare function getRouteOptions(program: Program, target: Operation): Ar
|
|
|
99
99
|
* @returns
|
|
100
100
|
*/
|
|
101
101
|
export declare const $renamePathParameter: RenamePathParameterDecorator;
|
|
102
|
-
export
|
|
102
|
+
export { getDefaultLegacyExtensionResourceName } from "./resource-name.js";
|
|
103
103
|
export declare function getResourceNameForOperation(program: Program, operation: ArmResourceOperationData, operationPath: string): string | undefined;
|
|
104
|
-
export {};
|
|
105
104
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAGrB,KAAK,KAAK,EAEV,KAAK,SAAS,EACd,KAAK,OAAO,EACb,MAAM,oBAAoB,CAAC;AAO5B,OAAO,E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EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,YAAY,EAAE,KAAK,EACnB,cAAc,CAAC,EAAE,MAAM,EACvB,sBAAsB,CAAC,EAAE,MAAM,EAC/B,oBAAoB,CAAC,EAAE,OAAO,QAuD/B;AA6BD,eAAO,MAAM,kBAAkB,EAAE,0BAwDhC,CAAC;AASF,eAAO,MAAM,4BAA4B,EAAE,oCAK1C,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAElF;AAED,eAAO,MAAM,kBAAkB,EAAE,0BAchC,CAAC;AAEF,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,mBAAmB,CAuBxF;AA8BD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,4BAkDlC,CAAC;AAiCF,OAAO,EAAE,qCAAqC,EAAE,MAAM,oBAAoB,CAAC;AAE3E,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,wBAAwB,EACnC,aAAa,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAepB"}
|
package/dist/src/operations.js
CHANGED
|
@@ -3,10 +3,10 @@ import { unsafe_mutateSubgraph as mutateSubgraph, unsafe_MutatorFlow as MutatorF
|
|
|
3
3
|
import { useStateMap } from "@typespec/compiler/utils";
|
|
4
4
|
import { $route, getHttpOperation, isPathParam } from "@typespec/http";
|
|
5
5
|
import { $actionSegment, $autoRoute, $createsOrReplacesResource, $deletesResource, $readsResource, $updatesResource, getActionSegment, getParentResource, getSegment, } from "@typespec/rest";
|
|
6
|
-
import { pascalCase } from "change-case";
|
|
7
6
|
import { reportDiagnostic } from "./lib.js";
|
|
8
7
|
import { isArmLibraryNamespace } from "./namespace.js";
|
|
9
|
-
import {
|
|
8
|
+
import { evaluateResourceNameExpression, getDefaultLegacyExtensionResourceName, getDefaultLegacyResourceName, getResourceNameExpression, getStandardResourceNameExpression, setResourceNameExpression, } from "./resource-name.js";
|
|
9
|
+
import { getArmResourceInfo, getResourceBaseType, isArmVirtualResource, isCustomAzureResource, ResourceBaseType, } from "./resource.js";
|
|
10
10
|
import { ArmStateKeys } from "./state.js";
|
|
11
11
|
export function getArmResourceOperations(program, resourceType) {
|
|
12
12
|
let operations = program.stateMap(ArmStateKeys.armResourceOperations).get(resourceType);
|
|
@@ -48,7 +48,8 @@ function setResourceLifecycleOperation(context, target, resourceType, kind, reso
|
|
|
48
48
|
// We can't resolve the operation path yet so treat the operation as a partial
|
|
49
49
|
// type so that we can fill in the missing details later
|
|
50
50
|
const operations = getArmResourceOperations(context.program, resourceType);
|
|
51
|
-
const
|
|
51
|
+
const resourceNameExpression = getStandardResourceNameExpression(resourceType, resourceName);
|
|
52
|
+
const resolvedResourceName = resourceName !== undefined && resourceName.length > 0 ? resourceName : resourceType.name;
|
|
52
53
|
const operation = {
|
|
53
54
|
name: target.name,
|
|
54
55
|
kind,
|
|
@@ -74,6 +75,7 @@ function setResourceLifecycleOperation(context, target, resourceType, kind, reso
|
|
|
74
75
|
resourceName: resolvedResourceName,
|
|
75
76
|
};
|
|
76
77
|
addArmResourceOperation(context.program, resourceType, operationId);
|
|
78
|
+
setResourceNameExpression(context.program, target, resourceNameExpression);
|
|
77
79
|
}
|
|
78
80
|
export const [getArmOperationList, setArmOperationList] = useStateMap(ArmStateKeys.resourceOperationList);
|
|
79
81
|
export function getArmResourceOperationList(program, resourceType) {
|
|
@@ -125,7 +127,8 @@ export const $armResourceList = (context, target, resourceType, resourceName) =>
|
|
|
125
127
|
// We can't resolve the operation path yet so treat the operation as a partial
|
|
126
128
|
// type so that we can fill in the missing details later
|
|
127
129
|
const operations = getArmResourceOperations(context.program, resourceType);
|
|
128
|
-
const
|
|
130
|
+
const resourceNameExpression = getStandardResourceNameExpression(resourceType, resourceName);
|
|
131
|
+
const resolvedResourceName = resourceName !== undefined && resourceName.length > 0 ? resourceName : resourceType.name;
|
|
129
132
|
const operation = {
|
|
130
133
|
name: target.name,
|
|
131
134
|
kind: "list",
|
|
@@ -151,6 +154,7 @@ export const $armResourceList = (context, target, resourceType, resourceName) =>
|
|
|
151
154
|
resourceModelName: resourceType.name,
|
|
152
155
|
resourceName: resolvedResourceName,
|
|
153
156
|
});
|
|
157
|
+
setResourceNameExpression(context.program, target, resourceNameExpression);
|
|
154
158
|
};
|
|
155
159
|
export function armRenameListByOperationInternal(context, entity, resourceType, parentTypeName, parentFriendlyTypeName, applyOperationRename) {
|
|
156
160
|
const { program } = context;
|
|
@@ -228,7 +232,8 @@ export const $armResourceAction = (context, target, resourceType, resourceName)
|
|
|
228
232
|
// We can't resolve the operation path yet so treat the operation as a partial
|
|
229
233
|
// type so that we can fill in the missing details later
|
|
230
234
|
const operations = getArmResourceOperations(program, resourceType);
|
|
231
|
-
const
|
|
235
|
+
const resourceNameExpression = getStandardResourceNameExpression(resourceType, resourceName);
|
|
236
|
+
const resolvedResourceName = resourceName !== undefined && resourceName.length > 0 ? resourceName : resourceType.name;
|
|
232
237
|
const operation = {
|
|
233
238
|
name: target.name,
|
|
234
239
|
kind: "action",
|
|
@@ -254,6 +259,7 @@ export const $armResourceAction = (context, target, resourceType, resourceName)
|
|
|
254
259
|
resourceModelName: resourceType.name,
|
|
255
260
|
resourceName: resolvedResourceName,
|
|
256
261
|
});
|
|
262
|
+
setResourceNameExpression(program, target, resourceNameExpression);
|
|
257
263
|
const segment = getSegment(program, target) ?? getActionSegment(program, target);
|
|
258
264
|
if (!segment) {
|
|
259
265
|
// Also apply the @actionSegment decorator to the operation
|
|
@@ -400,50 +406,20 @@ function createParamMutator(sourceParameterName, targetParameterName) {
|
|
|
400
406
|
},
|
|
401
407
|
};
|
|
402
408
|
}
|
|
403
|
-
export
|
|
404
|
-
const providerIndex = path.lastIndexOf("/providers");
|
|
405
|
-
if (providerIndex > -1 && providerIndex < path.length - 1) {
|
|
406
|
-
const targetPath = path.slice(0, providerIndex);
|
|
407
|
-
const extensionPath = path.slice(providerIndex);
|
|
408
|
-
const extensionInfo = parseArmResourceInstancePath(extensionPath);
|
|
409
|
-
if (!extensionInfo)
|
|
410
|
-
return resourceName;
|
|
411
|
-
const extensionName = extensionInfo.resourceType.types.flatMap((t) => pascalCase(t)).join("");
|
|
412
|
-
if (targetPath.length === 0) {
|
|
413
|
-
return extensionName;
|
|
414
|
-
}
|
|
415
|
-
if (targetPath.length === 1) {
|
|
416
|
-
return `${pascalCase(targetPath[0].replaceAll("{", "").replaceAll("}", ""))}${extensionName}`;
|
|
417
|
-
}
|
|
418
|
-
const targetInfo = parseArmResourceInstancePath(targetPath);
|
|
419
|
-
if (!targetInfo || targetInfo.resourceType.types.length === 0)
|
|
420
|
-
return resourceName;
|
|
421
|
-
const types = targetInfo.resourceType.types;
|
|
422
|
-
return `${pascalCase(types[types.length - 1])}${extensionName}`;
|
|
423
|
-
}
|
|
424
|
-
return resourceName;
|
|
425
|
-
}
|
|
426
|
-
function getDefaultLegacyResourceName(operation, httpOp) {
|
|
427
|
-
const pathInfo = parseArmResourceInstancePath(httpOp);
|
|
428
|
-
if (pathInfo !== undefined) {
|
|
429
|
-
let types = pathInfo.resourceType.types;
|
|
430
|
-
if (types.length > 1) {
|
|
431
|
-
types = types.slice(types.length - 2);
|
|
432
|
-
}
|
|
433
|
-
return types.flatMap((t) => pascalCase(t)).join("");
|
|
434
|
-
}
|
|
435
|
-
else {
|
|
436
|
-
return operation.resourceModelName;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
409
|
+
export { getDefaultLegacyExtensionResourceName } from "./resource-name.js";
|
|
439
410
|
export function getResourceNameForOperation(program, operation, operationPath) {
|
|
440
|
-
|
|
411
|
+
const expression = getResourceNameExpression(program, operation.operation);
|
|
412
|
+
if (expression !== undefined) {
|
|
413
|
+
return evaluateResourceNameExpression(expression, operationPath);
|
|
414
|
+
}
|
|
415
|
+
if (operation.resourceName !== undefined && operation.resourceName.length > 0) {
|
|
441
416
|
return operation.resourceName;
|
|
417
|
+
}
|
|
442
418
|
if (operation.resourceKind === "legacy-extension") {
|
|
443
419
|
return getDefaultLegacyExtensionResourceName(operationPath, operation.resourceModelName);
|
|
444
420
|
}
|
|
445
421
|
if (operation.resourceKind === "legacy") {
|
|
446
|
-
return getDefaultLegacyResourceName(operation, operationPath);
|
|
422
|
+
return getDefaultLegacyResourceName(operation.resourceModelName, operationPath);
|
|
447
423
|
}
|
|
448
424
|
return undefined;
|
|
449
425
|
}
|