@typespec/spector 0.1.0-alpha.22-dev.0 → 0.1.0-alpha.22-dev.2
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.
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { DecoratorContext, Interface, Model, Namespace, Operation, Type } from "@typespec/compiler";
|
|
1
|
+
import type { DecoratorContext, DecoratorValidatorCallbacks, Interface, Model, Namespace, Operation, Type } from "@typespec/compiler";
|
|
2
2
|
/**
|
|
3
3
|
* Setup the boilerplate for a scenario service(server endpoint, etc.)
|
|
4
4
|
*/
|
|
5
|
-
export type ScenarioServiceDecorator = (context: DecoratorContext, target: Namespace, route: string, options?: Type) => void;
|
|
5
|
+
export type ScenarioServiceDecorator = (context: DecoratorContext, target: Namespace, route: string, options?: Type) => DecoratorValidatorCallbacks | void;
|
|
6
6
|
/**
|
|
7
7
|
* Mark an operation, interface or namespace as a scenario. All containing operations will be part of the same scenario.
|
|
8
8
|
*/
|
|
9
|
-
export type ScenarioDecorator = (context: DecoratorContext, target: Namespace | Interface | Operation, name?: string) => void;
|
|
9
|
+
export type ScenarioDecorator = (context: DecoratorContext, target: Namespace | Interface | Operation, name?: string) => DecoratorValidatorCallbacks | void;
|
|
10
10
|
/**
|
|
11
11
|
* Specify documentation on how to implement this scenario.
|
|
12
12
|
*
|
|
13
13
|
* @param doc Documentation
|
|
14
14
|
* @param formatArgs Format arguments
|
|
15
15
|
*/
|
|
16
|
-
export type ScenarioDocDecorator = (context: DecoratorContext, target: Namespace | Interface | Operation, doc: string, formatArgs?: Model) => void;
|
|
16
|
+
export type ScenarioDocDecorator = (context: DecoratorContext, target: Namespace | Interface | Operation, doc: string, formatArgs?: Model) => DecoratorValidatorCallbacks | void;
|
|
17
17
|
export type TypeSpecSpectorDecorators = {
|
|
18
18
|
scenarioService: ScenarioServiceDecorator;
|
|
19
19
|
scenario: ScenarioDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeSpec.Spector.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Spector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,SAAS,EACT,SAAS,EACT,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,IAAI,KACX,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"TypeSpec.Spector.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Spector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,SAAS,EACT,KAAK,EACL,SAAS,EACT,SAAS,EACT,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,IAAI,KACX,2BAA2B,GAAG,IAAI,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,EACzC,IAAI,CAAC,EAAE,MAAM,KACV,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,EACzC,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,KAAK,KACf,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,yBAAyB,GAAG;IACtC,eAAe,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
DecoratorContext,
|
|
3
|
+
DecoratorValidatorCallbacks,
|
|
3
4
|
Interface,
|
|
4
5
|
Model,
|
|
5
6
|
Namespace,
|
|
@@ -15,7 +16,7 @@ export type ScenarioServiceDecorator = (
|
|
|
15
16
|
target: Namespace,
|
|
16
17
|
route: string,
|
|
17
18
|
options?: Type,
|
|
18
|
-
) => void;
|
|
19
|
+
) => DecoratorValidatorCallbacks | void;
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Mark an operation, interface or namespace as a scenario. All containing operations will be part of the same scenario.
|
|
@@ -24,7 +25,7 @@ export type ScenarioDecorator = (
|
|
|
24
25
|
context: DecoratorContext,
|
|
25
26
|
target: Namespace | Interface | Operation,
|
|
26
27
|
name?: string,
|
|
27
|
-
) => void;
|
|
28
|
+
) => DecoratorValidatorCallbacks | void;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* Specify documentation on how to implement this scenario.
|
|
@@ -37,7 +38,7 @@ export type ScenarioDocDecorator = (
|
|
|
37
38
|
target: Namespace | Interface | Operation,
|
|
38
39
|
doc: string,
|
|
39
40
|
formatArgs?: Model,
|
|
40
|
-
) => void;
|
|
41
|
+
) => DecoratorValidatorCallbacks | void;
|
|
41
42
|
|
|
42
43
|
export type TypeSpecSpectorDecorators = {
|
|
43
44
|
scenarioService: ScenarioServiceDecorator;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/spector",
|
|
3
|
-
"version": "0.1.0-alpha.22-dev.
|
|
3
|
+
"version": "0.1.0-alpha.22-dev.2",
|
|
4
4
|
"description": "Typespec Core Tool to validate, run mock api, collect coverage.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"homepage": "https://github.com/microsoft/typespec#readme",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@azure/identity": "~4.13.0",
|
|
30
|
-
"@typespec/compiler": "^1.7.
|
|
30
|
+
"@typespec/compiler": "^1.7.1",
|
|
31
31
|
"@typespec/http": "^1.7.0",
|
|
32
32
|
"@typespec/rest": "^0.77.0 || >=0.78.0-dev <0.78.0",
|
|
33
33
|
"@typespec/spec-api": "^0.1.0-alpha.11 || >=0.1.0-alpha.12-dev <0.1.0-alpha.12",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"ajv": "~8.17.1",
|
|
37
37
|
"body-parser": "^2.2.0",
|
|
38
38
|
"deep-equal": "^2.2.0",
|
|
39
|
-
"express": "^5.1
|
|
39
|
+
"express": "^5.2.1",
|
|
40
40
|
"globby": "~16.0.0",
|
|
41
41
|
"micromatch": "^4.0.8",
|
|
42
42
|
"morgan": "^1.10.0",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"picocolors": "~1.1.1",
|
|
45
45
|
"source-map-support": "~0.5.21",
|
|
46
46
|
"xml2js": "^0.6.2",
|
|
47
|
-
"yaml": "~2.8.
|
|
47
|
+
"yaml": "~2.8.2",
|
|
48
48
|
"yargs": "~18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/body-parser": "^1.19.2",
|
|
52
52
|
"@types/deep-equal": "^1.0.1",
|
|
53
|
-
"@types/express": "^5.0.
|
|
53
|
+
"@types/express": "^5.0.6",
|
|
54
54
|
"@types/micromatch": "^4.0.9",
|
|
55
55
|
"@types/morgan": "^1.9.9",
|
|
56
56
|
"@types/multer": "^2.0.0",
|
|
57
|
-
"@types/node": "~
|
|
57
|
+
"@types/node": "~25.0.2",
|
|
58
58
|
"@types/xml2js": "^0.4.11",
|
|
59
59
|
"@types/yargs": "~17.0.33",
|
|
60
60
|
"@typespec/tspd": "^0.73.2 || >=0.74.0-dev <0.74.0",
|