@azure-tools/typespec-autorest 0.45.0 → 0.46.0-dev.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/README.md +10 -0
- package/dist/generated-defs/Autorest.d.ts +4 -0
- package/dist/generated-defs/Autorest.d.ts.map +1 -1
- package/dist/generated-defs/Autorest.ts-test.js +2 -5
- package/dist/generated-defs/Autorest.ts-test.js.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/tsp-index.d.ts +8 -0
- package/dist/src/tsp-index.d.ts.map +1 -0
- package/dist/src/tsp-index.js +9 -0
- package/dist/src/tsp-index.js.map +1 -0
- package/lib/autorest.tsp +1 -1
- package/package.json +21 -20
package/README.md
CHANGED
|
@@ -25,6 +25,16 @@ emit:
|
|
|
25
25
|
- "@azure-tools/typespec-autorest"
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
The config can be extended with options as follows:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
emit:
|
|
32
|
+
- "@azure-tools/typespec-autorest"
|
|
33
|
+
options:
|
|
34
|
+
"@azure-tools/typespec-autorest":
|
|
35
|
+
option: value
|
|
36
|
+
```
|
|
37
|
+
|
|
28
38
|
### Emitter options
|
|
29
39
|
|
|
30
40
|
#### `output-dir`
|
|
@@ -16,4 +16,8 @@ export type ExampleDecorator = (context: DecoratorContext, target: Operation, pa
|
|
|
16
16
|
* @param jsonRef path or Uri to an OpenAPI schema.
|
|
17
17
|
*/
|
|
18
18
|
export type UseRefDecorator = (context: DecoratorContext, entity: Model | ModelProperty, jsonRef: string) => void;
|
|
19
|
+
export type AutorestDecorators = {
|
|
20
|
+
example: ExampleDecorator;
|
|
21
|
+
useRef: UseRefDecorator;
|
|
22
|
+
};
|
|
19
23
|
//# sourceMappingURL=Autorest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autorest.d.ts","sourceRoot":"","sources":["../../generated-defs/Autorest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE5F;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,KACV,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,EAC7B,OAAO,EAAE,MAAM,KACZ,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"Autorest.d.ts","sourceRoot":"","sources":["../../generated-defs/Autorest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE5F;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,KACV,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,EAC7B,OAAO,EAAE,MAAM,KACZ,IAAI,CAAC;AAEV,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/** An error here would mean that the decorator is not exported or doesn't have the right name. */
|
|
2
|
-
import { $
|
|
2
|
+
import { $decorators } from "@azure-tools/typespec-autorest";
|
|
3
3
|
/** An error here would mean that the exported decorator is not using the same signature. Make sure to have export const $decName: DecNameDecorator = (...) => ... */
|
|
4
|
-
const _ =
|
|
5
|
-
$example,
|
|
6
|
-
$useRef,
|
|
7
|
-
};
|
|
4
|
+
const _ = $decorators["Autorest"];
|
|
8
5
|
//# sourceMappingURL=Autorest.ts-test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autorest.ts-test.js","sourceRoot":"","sources":["../../generated-defs/Autorest.ts-test.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Autorest.ts-test.js","sourceRoot":"","sources":["../../generated-defs/Autorest.ts-test.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,qKAAqK;AACrK,MAAM,CAAC,GAAuB,WAAW,CAAC,UAAU,CAAC,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -2,4 +2,6 @@ export * from "./decorators.js";
|
|
|
2
2
|
export { $onEmit, getAllServicesAtAllVersions, resolveAutorestOptions } from "./emit.js";
|
|
3
3
|
export { $lib } from "./lib.js";
|
|
4
4
|
export { getOpenAPIForService, sortOpenAPIDocument, } from "./openapi.js";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export { $decorators } from "./tsp-index.js";
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,IAAI,EAA0B,MAAM,UAAU,CAAC;AACxD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GAEpB,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,IAAI,EAA0B,MAAM,UAAU,CAAC;AACxD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAItB,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { $lib } from "./lib.js";
|
|
2
|
+
export declare const $decorators: {
|
|
3
|
+
Autorest: {
|
|
4
|
+
example: import("../generated-defs/Autorest.js").ExampleDecorator;
|
|
5
|
+
useRef: import("../generated-defs/Autorest.js").UseRefDecorator;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=tsp-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsp-index.d.ts","sourceRoot":"","sources":["../../src/tsp-index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsp-index.js","sourceRoot":"","sources":["../../src/tsp-index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE;QACR,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,OAAO;KACa;CAC/B,CAAC"}
|
package/lib/autorest.tsp
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "./decorators.tsp";
|
|
2
|
-
import "../dist/src/index.js";
|
|
2
|
+
import "../dist/src/tsp-index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-autorest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0-dev.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec library for emitting openapi from the TypeSpec REST protocol binding",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -40,17 +40,27 @@
|
|
|
40
40
|
"!dist/test/**"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@azure-tools/typespec-azure-core": "~0.45.0",
|
|
44
|
-
"@azure-tools/typespec-
|
|
45
|
-
"@azure-tools/typespec-
|
|
46
|
-
"@typespec/compiler": "~0.59.0",
|
|
47
|
-
"@typespec/http": "~0.59.0",
|
|
48
|
-
"@typespec/openapi": "~0.59.0",
|
|
49
|
-
"@typespec/rest": "~0.59.0",
|
|
50
|
-
"@typespec/versioning": "~0.59.0"
|
|
43
|
+
"@azure-tools/typespec-azure-core": "~0.45.0 || >=0.46.0-dev <0.46.0",
|
|
44
|
+
"@azure-tools/typespec-azure-resource-manager": "~0.45.0 || >=0.46.0-dev <0.46.0",
|
|
45
|
+
"@azure-tools/typespec-client-generator-core": "~0.45.0 || >=0.46.0-dev <0.46.0",
|
|
46
|
+
"@typespec/compiler": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
47
|
+
"@typespec/http": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
48
|
+
"@typespec/openapi": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
49
|
+
"@typespec/rest": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
50
|
+
"@typespec/versioning": "~0.59.0 || >=0.60.0-dev <0.60.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
+
"@azure-tools/typespec-azure-core": "~0.45.0 || >=0.46.0-dev <0.46.0",
|
|
54
|
+
"@azure-tools/typespec-azure-resource-manager": "~0.45.0 || >=0.46.0-dev <0.46.0",
|
|
55
|
+
"@azure-tools/typespec-client-generator-core": "~0.45.0 || >=0.46.0-dev <0.46.0",
|
|
53
56
|
"@types/node": "~18.11.19",
|
|
57
|
+
"@typespec/compiler": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
58
|
+
"@typespec/http": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
59
|
+
"@typespec/json-schema": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
60
|
+
"@typespec/library-linter": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
61
|
+
"@typespec/openapi": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
62
|
+
"@typespec/rest": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
63
|
+
"@typespec/versioning": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
54
64
|
"@vitest/coverage-v8": "^2.0.4",
|
|
55
65
|
"@vitest/ui": "^2.0.4",
|
|
56
66
|
"c8": "^10.1.2",
|
|
@@ -58,18 +68,9 @@
|
|
|
58
68
|
"rimraf": "~6.0.1",
|
|
59
69
|
"typescript": "~5.5.4",
|
|
60
70
|
"vitest": "^2.0.4",
|
|
61
|
-
"@
|
|
62
|
-
"@azure-tools/typespec-azure-resource-manager": "~0.45.0",
|
|
63
|
-
"@azure-tools/typespec-client-generator-core": "~0.45.0",
|
|
64
|
-
"@typespec/compiler": "~0.59.0",
|
|
65
|
-
"@typespec/http": "~0.59.0",
|
|
66
|
-
"@typespec/json-schema": "~0.59.0",
|
|
67
|
-
"@typespec/library-linter": "~0.59.0",
|
|
68
|
-
"@typespec/openapi": "~0.59.0",
|
|
69
|
-
"@typespec/rest": "~0.59.0",
|
|
70
|
-
"@typespec/tspd": "~0.46.0",
|
|
71
|
-
"@typespec/versioning": "~0.59.0"
|
|
71
|
+
"@typespec/tspd": "~0.46.0"
|
|
72
72
|
},
|
|
73
|
+
"dependencies": {},
|
|
73
74
|
"scripts": {
|
|
74
75
|
"clean": "rimraf ./dist ./temp",
|
|
75
76
|
"build": "npm run gen-extern-signature && npm run regen-autorest-openapi-schema && tsc -p . && npm run lint-typespec-library",
|