@typespec/http-server-js 0.58.0-alpha.10-dev.3
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/CHANGELOG.md +69 -0
- package/LICENSE +21 -0
- package/README.md +183 -0
- package/build-helpers.ts +170 -0
- package/dist/generated-defs/helpers/header.d.ts +4 -0
- package/dist/generated-defs/helpers/header.d.ts.map +1 -0
- package/dist/generated-defs/helpers/header.js +76 -0
- package/dist/generated-defs/helpers/header.js.map +1 -0
- package/dist/generated-defs/helpers/http.d.ts +4 -0
- package/dist/generated-defs/helpers/http.d.ts.map +1 -0
- package/dist/generated-defs/helpers/http.js +134 -0
- package/dist/generated-defs/helpers/http.js.map +1 -0
- package/dist/generated-defs/helpers/index.d.ts +4 -0
- package/dist/generated-defs/helpers/index.d.ts.map +1 -0
- package/dist/generated-defs/helpers/index.js +21 -0
- package/dist/generated-defs/helpers/index.js.map +1 -0
- package/dist/generated-defs/helpers/multipart.d.ts +4 -0
- package/dist/generated-defs/helpers/multipart.d.ts.map +1 -0
- package/dist/generated-defs/helpers/multipart.js +249 -0
- package/dist/generated-defs/helpers/multipart.js.map +1 -0
- package/dist/generated-defs/helpers/router.d.ts +4 -0
- package/dist/generated-defs/helpers/router.d.ts.map +1 -0
- package/dist/generated-defs/helpers/router.js +259 -0
- package/dist/generated-defs/helpers/router.js.map +1 -0
- package/dist/src/common/declaration.d.ts +13 -0
- package/dist/src/common/declaration.d.ts.map +1 -0
- package/dist/src/common/declaration.js +45 -0
- package/dist/src/common/declaration.js.map +1 -0
- package/dist/src/common/documentation.d.ts +12 -0
- package/dist/src/common/documentation.d.ts.map +1 -0
- package/dist/src/common/documentation.js +21 -0
- package/dist/src/common/documentation.js.map +1 -0
- package/dist/src/common/enum.d.ts +10 -0
- package/dist/src/common/enum.d.ts.map +1 -0
- package/dist/src/common/enum.js +21 -0
- package/dist/src/common/enum.js.map +1 -0
- package/dist/src/common/interface.d.ts +50 -0
- package/dist/src/common/interface.d.ts.map +1 -0
- package/dist/src/common/interface.js +194 -0
- package/dist/src/common/interface.js.map +1 -0
- package/dist/src/common/model.d.ts +26 -0
- package/dist/src/common/model.d.ts.map +1 -0
- package/dist/src/common/model.js +115 -0
- package/dist/src/common/model.js.map +1 -0
- package/dist/src/common/namespace.d.ts +38 -0
- package/dist/src/common/namespace.d.ts.map +1 -0
- package/dist/src/common/namespace.js +184 -0
- package/dist/src/common/namespace.js.map +1 -0
- package/dist/src/common/reference.d.ts +46 -0
- package/dist/src/common/reference.d.ts.map +1 -0
- package/dist/src/common/reference.js +243 -0
- package/dist/src/common/reference.js.map +1 -0
- package/dist/src/common/scalar.d.ts +50 -0
- package/dist/src/common/scalar.d.ts.map +1 -0
- package/dist/src/common/scalar.js +144 -0
- package/dist/src/common/scalar.js.map +1 -0
- package/dist/src/common/serialization/index.d.ts +11 -0
- package/dist/src/common/serialization/index.d.ts.map +1 -0
- package/dist/src/common/serialization/index.js +72 -0
- package/dist/src/common/serialization/index.js.map +1 -0
- package/dist/src/common/serialization/json.d.ts +6 -0
- package/dist/src/common/serialization/json.d.ts.map +1 -0
- package/dist/src/common/serialization/json.js +341 -0
- package/dist/src/common/serialization/json.js.map +1 -0
- package/dist/src/common/union.d.ts +23 -0
- package/dist/src/common/union.d.ts.map +1 -0
- package/dist/src/common/union.js +57 -0
- package/dist/src/common/union.js.map +1 -0
- package/dist/src/ctx.d.ts +242 -0
- package/dist/src/ctx.d.ts.map +1 -0
- package/dist/src/ctx.js +211 -0
- package/dist/src/ctx.js.map +1 -0
- package/dist/src/helpers/header.d.ts +14 -0
- package/dist/src/helpers/header.d.ts.map +1 -0
- package/dist/src/helpers/header.js +38 -0
- package/dist/src/helpers/header.js.map +1 -0
- package/dist/src/helpers/http.d.ts +70 -0
- package/dist/src/helpers/http.d.ts.map +1 -0
- package/dist/src/helpers/http.js +86 -0
- package/dist/src/helpers/http.js.map +1 -0
- package/dist/src/helpers/multipart.d.ts +26 -0
- package/dist/src/helpers/multipart.d.ts.map +1 -0
- package/dist/src/helpers/multipart.js +182 -0
- package/dist/src/helpers/multipart.js.map +1 -0
- package/dist/src/helpers/router.d.ts +176 -0
- package/dist/src/helpers/router.d.ts.map +1 -0
- package/dist/src/helpers/router.js +55 -0
- package/dist/src/helpers/router.js.map +1 -0
- package/dist/src/http/index.d.ts +24 -0
- package/dist/src/http/index.d.ts.map +1 -0
- package/dist/src/http/index.js +52 -0
- package/dist/src/http/index.js.map +1 -0
- package/dist/src/http/server/index.d.ts +11 -0
- package/dist/src/http/server/index.d.ts.map +1 -0
- package/dist/src/http/server/index.js +413 -0
- package/dist/src/http/server/index.js.map +1 -0
- package/dist/src/http/server/multipart.d.ts +16 -0
- package/dist/src/http/server/multipart.d.ts.map +1 -0
- package/dist/src/http/server/multipart.js +214 -0
- package/dist/src/http/server/multipart.js.map +1 -0
- package/dist/src/http/server/router.d.ts +15 -0
- package/dist/src/http/server/router.d.ts.map +1 -0
- package/dist/src/http/server/router.js +459 -0
- package/dist/src/http/server/router.js.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +38 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib.d.ts +141 -0
- package/dist/src/lib.d.ts.map +1 -0
- package/dist/src/lib.js +116 -0
- package/dist/src/lib.js.map +1 -0
- package/dist/src/scripts/scaffold/bin.d.mts +14 -0
- package/dist/src/scripts/scaffold/bin.d.mts.map +1 -0
- package/dist/src/scripts/scaffold/bin.mjs +559 -0
- package/dist/src/scripts/scaffold/bin.mjs.map +1 -0
- package/dist/src/testing/index.d.ts +3 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js +6 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/src/util/case.d.ts +81 -0
- package/dist/src/util/case.d.ts.map +1 -0
- package/dist/src/util/case.js +111 -0
- package/dist/src/util/case.js.map +1 -0
- package/dist/src/util/differentiate.d.ts +251 -0
- package/dist/src/util/differentiate.d.ts.map +1 -0
- package/dist/src/util/differentiate.js +580 -0
- package/dist/src/util/differentiate.js.map +1 -0
- package/dist/src/util/error.d.ts +13 -0
- package/dist/src/util/error.d.ts.map +1 -0
- package/dist/src/util/error.js +25 -0
- package/dist/src/util/error.js.map +1 -0
- package/dist/src/util/extends.d.ts +10 -0
- package/dist/src/util/extends.d.ts.map +1 -0
- package/dist/src/util/extends.js +31 -0
- package/dist/src/util/extends.js.map +1 -0
- package/dist/src/util/iter.d.ts +39 -0
- package/dist/src/util/iter.d.ts.map +1 -0
- package/dist/src/util/iter.js +72 -0
- package/dist/src/util/iter.js.map +1 -0
- package/dist/src/util/keywords.d.ts +10 -0
- package/dist/src/util/keywords.d.ts.map +1 -0
- package/dist/src/util/keywords.js +85 -0
- package/dist/src/util/keywords.js.map +1 -0
- package/dist/src/util/name.d.ts +12 -0
- package/dist/src/util/name.d.ts.map +1 -0
- package/dist/src/util/name.js +26 -0
- package/dist/src/util/name.js.map +1 -0
- package/dist/src/util/once-queue.d.ts +24 -0
- package/dist/src/util/once-queue.d.ts.map +1 -0
- package/dist/src/util/once-queue.js +34 -0
- package/dist/src/util/once-queue.js.map +1 -0
- package/dist/src/util/openapi3.d.ts +23 -0
- package/dist/src/util/openapi3.d.ts.map +1 -0
- package/dist/src/util/openapi3.js +40 -0
- package/dist/src/util/openapi3.js.map +1 -0
- package/dist/src/util/pluralism.d.ts +23 -0
- package/dist/src/util/pluralism.d.ts.map +1 -0
- package/dist/src/util/pluralism.js +36 -0
- package/dist/src/util/pluralism.js.map +1 -0
- package/dist/src/util/scope.d.ts +85 -0
- package/dist/src/util/scope.d.ts.map +1 -0
- package/dist/src/util/scope.js +111 -0
- package/dist/src/util/scope.js.map +1 -0
- package/dist/src/write.d.ts +23 -0
- package/dist/src/write.d.ts.map +1 -0
- package/dist/src/write.js +62 -0
- package/dist/src/write.js.map +1 -0
- package/generated-defs/helpers/header.ts +83 -0
- package/generated-defs/helpers/http.ts +141 -0
- package/generated-defs/helpers/index.ts +27 -0
- package/generated-defs/helpers/multipart.ts +256 -0
- package/generated-defs/helpers/router.ts +266 -0
- package/package.json +71 -0
- package/src/common/declaration.ts +52 -0
- package/src/common/documentation.ts +26 -0
- package/src/common/enum.ts +28 -0
- package/src/common/interface.ts +264 -0
- package/src/common/model.ts +160 -0
- package/src/common/namespace.ts +243 -0
- package/src/common/reference.ts +319 -0
- package/src/common/scalar.ts +173 -0
- package/src/common/serialization/index.ts +124 -0
- package/src/common/serialization/json.ts +444 -0
- package/src/common/union.ts +76 -0
- package/src/ctx.ts +497 -0
- package/src/helpers/header.ts +55 -0
- package/src/helpers/http.ts +113 -0
- package/src/helpers/multipart.ts +228 -0
- package/src/helpers/router.ts +238 -0
- package/src/http/index.ts +81 -0
- package/src/http/server/index.ts +548 -0
- package/src/http/server/multipart.ts +272 -0
- package/src/http/server/router.ts +686 -0
- package/src/index.ts +56 -0
- package/src/lib.ts +130 -0
- package/src/scripts/scaffold/bin.mts +781 -0
- package/src/testing/index.ts +10 -0
- package/src/util/case.ts +182 -0
- package/src/util/differentiate.ts +957 -0
- package/src/util/error.ts +28 -0
- package/src/util/extends.ts +43 -0
- package/src/util/iter.ts +85 -0
- package/src/util/keywords.ts +90 -0
- package/src/util/name.ts +33 -0
- package/src/util/once-queue.ts +55 -0
- package/src/util/openapi3.ts +53 -0
- package/src/util/pluralism.ts +37 -0
- package/src/util/scope.ts +211 -0
- package/src/write.ts +88 -0
- package/temp/tsconfig.tsbuildinfo +1 -0
- package/test/header.test.ts +26 -0
- package/test/multipart.test.ts +169 -0
- package/tsconfig.json +10 -0
- package/vitest.config.ts +4 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if a name cannot be spoken. A name is unspeakable if:
|
|
3
|
+
*
|
|
4
|
+
* - It contains only separators and whitespace.
|
|
5
|
+
*
|
|
6
|
+
* OR
|
|
7
|
+
*
|
|
8
|
+
* - The first non-separator, non-whitespace character is a digit.
|
|
9
|
+
*
|
|
10
|
+
* @param name - a name in any case
|
|
11
|
+
* @returns true if the name is unspeakable
|
|
12
|
+
*/
|
|
13
|
+
export declare function isUnspeakable(name: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Destructures a name into its components.
|
|
16
|
+
*
|
|
17
|
+
* The following case conventions are supported:
|
|
18
|
+
* - PascalCase (["pascal", "case"])
|
|
19
|
+
* - camelCase (["camel", "case"])
|
|
20
|
+
* - snake_case (["snake", "case"])
|
|
21
|
+
* - kebab-case (["kebab", "case"])
|
|
22
|
+
* - dot.separated (["dot", "separated"])
|
|
23
|
+
* - path/separated (["path", "separated"])
|
|
24
|
+
* - double::colon::separated (["double", "colon", "separated"])
|
|
25
|
+
* - space separated (["space", "separated"])
|
|
26
|
+
*
|
|
27
|
+
* - AND any combination of the above, or any other separators or combination of separators.
|
|
28
|
+
*
|
|
29
|
+
* @param name - a name in any case
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseCase(name: string): ReCase;
|
|
32
|
+
/**
|
|
33
|
+
* An object allowing a name to be converted into various case conventions.
|
|
34
|
+
*/
|
|
35
|
+
export interface ReCase extends ReCaseUpper {
|
|
36
|
+
/**
|
|
37
|
+
* The components of the name with the first letter of each component capitalized and joined by an empty string.
|
|
38
|
+
*/
|
|
39
|
+
readonly pascalCase: string;
|
|
40
|
+
/**
|
|
41
|
+
* The components of the name with the first letter of the second and all subsequent components capitalized and joined
|
|
42
|
+
* by an empty string.
|
|
43
|
+
*/
|
|
44
|
+
readonly camelCase: string;
|
|
45
|
+
/**
|
|
46
|
+
* Convert the components of the name into all uppercase letters.
|
|
47
|
+
*/
|
|
48
|
+
readonly upper: ReCaseUpper;
|
|
49
|
+
}
|
|
50
|
+
interface ReCaseUpper {
|
|
51
|
+
/**
|
|
52
|
+
* The components of the name.
|
|
53
|
+
*/
|
|
54
|
+
readonly components: readonly string[];
|
|
55
|
+
/**
|
|
56
|
+
* The components of the name joined by underscores.
|
|
57
|
+
*/
|
|
58
|
+
readonly snakeCase: string;
|
|
59
|
+
/**
|
|
60
|
+
* The components of the name joined by hyphens.
|
|
61
|
+
*/
|
|
62
|
+
readonly kebabCase: string;
|
|
63
|
+
/**
|
|
64
|
+
* The components of the name joined by periods.
|
|
65
|
+
*/
|
|
66
|
+
readonly dotCase: string;
|
|
67
|
+
/**
|
|
68
|
+
* The components of the name joined by slashes.
|
|
69
|
+
*
|
|
70
|
+
* This uses forward slashes in the unix convention.
|
|
71
|
+
*/
|
|
72
|
+
readonly pathCase: string;
|
|
73
|
+
/**
|
|
74
|
+
* Join the components with any given string.
|
|
75
|
+
*
|
|
76
|
+
* @param separator - the separator to join the components with
|
|
77
|
+
*/
|
|
78
|
+
join(separator: string): string;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../../src/util/case.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQnD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA2C9C;AAED;;GAEG;AACH,MAAM,WAAW,MAAO,SAAQ,WAAW;IACzC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAED,UAAU,WAAW;IACnB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
/**
|
|
4
|
+
* Separators recognized by the case parser.
|
|
5
|
+
*/
|
|
6
|
+
const SEPARATORS = /[\s:_\-./\\]/;
|
|
7
|
+
/**
|
|
8
|
+
* Returns true if a name cannot be spoken. A name is unspeakable if:
|
|
9
|
+
*
|
|
10
|
+
* - It contains only separators and whitespace.
|
|
11
|
+
*
|
|
12
|
+
* OR
|
|
13
|
+
*
|
|
14
|
+
* - The first non-separator, non-whitespace character is a digit.
|
|
15
|
+
*
|
|
16
|
+
* @param name - a name in any case
|
|
17
|
+
* @returns true if the name is unspeakable
|
|
18
|
+
*/
|
|
19
|
+
export function isUnspeakable(name) {
|
|
20
|
+
for (const c of name) {
|
|
21
|
+
if (!SEPARATORS.test(c)) {
|
|
22
|
+
return /[0-9]/.test(c);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Destructures a name into its components.
|
|
29
|
+
*
|
|
30
|
+
* The following case conventions are supported:
|
|
31
|
+
* - PascalCase (["pascal", "case"])
|
|
32
|
+
* - camelCase (["camel", "case"])
|
|
33
|
+
* - snake_case (["snake", "case"])
|
|
34
|
+
* - kebab-case (["kebab", "case"])
|
|
35
|
+
* - dot.separated (["dot", "separated"])
|
|
36
|
+
* - path/separated (["path", "separated"])
|
|
37
|
+
* - double::colon::separated (["double", "colon", "separated"])
|
|
38
|
+
* - space separated (["space", "separated"])
|
|
39
|
+
*
|
|
40
|
+
* - AND any combination of the above, or any other separators or combination of separators.
|
|
41
|
+
*
|
|
42
|
+
* @param name - a name in any case
|
|
43
|
+
*/
|
|
44
|
+
export function parseCase(name) {
|
|
45
|
+
const components = [];
|
|
46
|
+
let currentComponent = "";
|
|
47
|
+
let inAcronym = false;
|
|
48
|
+
for (let i = 0; i < name.length; i++) {
|
|
49
|
+
const char = name[i];
|
|
50
|
+
// cSpell:ignore presponse
|
|
51
|
+
// Special case acronym handling. We want to treat acronyms as a single component,
|
|
52
|
+
// but we also want the last capitalized letter in an all caps sequence to start a new
|
|
53
|
+
// component if the next letter is lower case.
|
|
54
|
+
// For example : "HTTPResponse" => ["http", "response"]
|
|
55
|
+
// : "OpenAIContext" => ["open", "ai", "context"]
|
|
56
|
+
// but : "HTTPresponse" (wrong) => ["htt", "presponse"]
|
|
57
|
+
// however : "HTTP_response" (okay I guess) => ["http", "response"]
|
|
58
|
+
// If the character is a separator or an upper case character, we push the current component and start a new one.
|
|
59
|
+
if (char === char.toUpperCase() && !/[0-9]/.test(char)) {
|
|
60
|
+
// If we're in an acronym, we need to check if the next character is lower case.
|
|
61
|
+
// If it is, then this is the start of a new component.
|
|
62
|
+
const acronymRestart = inAcronym && /[A-Z]/.test(char) && i + 1 < name.length && /[^A-Z]/.test(name[i + 1]);
|
|
63
|
+
if (currentComponent.length > 0 && (acronymRestart || !inAcronym)) {
|
|
64
|
+
components.push(currentComponent.trim());
|
|
65
|
+
currentComponent = "";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (!SEPARATORS.test(char)) {
|
|
69
|
+
currentComponent += char.toLowerCase();
|
|
70
|
+
}
|
|
71
|
+
inAcronym = /[A-Z]/.test(char);
|
|
72
|
+
}
|
|
73
|
+
if (currentComponent.length > 0) {
|
|
74
|
+
components.push(currentComponent);
|
|
75
|
+
}
|
|
76
|
+
return recase(components);
|
|
77
|
+
}
|
|
78
|
+
function recase(components) {
|
|
79
|
+
return Object.freeze({
|
|
80
|
+
components,
|
|
81
|
+
get pascalCase() {
|
|
82
|
+
return components
|
|
83
|
+
.map((component) => component[0].toUpperCase() + component.slice(1))
|
|
84
|
+
.join("");
|
|
85
|
+
},
|
|
86
|
+
get camelCase() {
|
|
87
|
+
return components
|
|
88
|
+
.map((component, index) => index === 0 ? component : component[0].toUpperCase() + component.slice(1))
|
|
89
|
+
.join("");
|
|
90
|
+
},
|
|
91
|
+
get snakeCase() {
|
|
92
|
+
return components.join("_");
|
|
93
|
+
},
|
|
94
|
+
get kebabCase() {
|
|
95
|
+
return components.join("-");
|
|
96
|
+
},
|
|
97
|
+
get dotCase() {
|
|
98
|
+
return components.join(".");
|
|
99
|
+
},
|
|
100
|
+
get pathCase() {
|
|
101
|
+
return components.join("/");
|
|
102
|
+
},
|
|
103
|
+
get upper() {
|
|
104
|
+
return recase(components.map((component) => component.toUpperCase()));
|
|
105
|
+
},
|
|
106
|
+
join(separator) {
|
|
107
|
+
return components.join(separator);
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=case.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.js","sourceRoot":"","sources":["../../../src/util/case.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,kCAAkC;AAElC;;GAEG;AACH,MAAM,UAAU,GAAG,cAAc,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,IAAI,gBAAgB,GAAG,EAAE,CAAC;IAC1B,IAAI,SA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,251 @@
|
|
|
1
|
+
import { BooleanLiteral, EnumMember, Model, ModelProperty, NullType, NumericLiteral, Scalar, StringLiteral, Type, Union, UnknownType, VoidType } from "@typespec/compiler";
|
|
2
|
+
import { JsContext } from "../ctx.js";
|
|
3
|
+
/**
|
|
4
|
+
* A tree structure representing a body of TypeScript code.
|
|
5
|
+
*/
|
|
6
|
+
export type CodeTree = Result | IfChain | Switch | Verbatim;
|
|
7
|
+
export type JsLiteralType = StringLiteral | BooleanLiteral | NumericLiteral | EnumMember;
|
|
8
|
+
/**
|
|
9
|
+
* A TypeSpec type that is precise, i.e. the type of a single value.
|
|
10
|
+
*/
|
|
11
|
+
export type PreciseType = Scalar | Model | JsLiteralType | VoidType | NullType;
|
|
12
|
+
/**
|
|
13
|
+
* Determines if `t` is a precise type.
|
|
14
|
+
* @param t - the type to test
|
|
15
|
+
* @returns true if `t` is precise, false otherwise.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isPreciseType(t: Type): t is PreciseType;
|
|
18
|
+
/**
|
|
19
|
+
* An if-chain structure in the CodeTree DSL. This represents a cascading series of if-else-if statements with an optional
|
|
20
|
+
* final `else` branch.
|
|
21
|
+
*/
|
|
22
|
+
export interface IfChain {
|
|
23
|
+
kind: "if-chain";
|
|
24
|
+
branches: IfBranch[];
|
|
25
|
+
else?: CodeTree;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A branch in an if-chain.
|
|
29
|
+
*/
|
|
30
|
+
export interface IfBranch {
|
|
31
|
+
/**
|
|
32
|
+
* A condition to test for this branch.
|
|
33
|
+
*/
|
|
34
|
+
condition: Expression;
|
|
35
|
+
/**
|
|
36
|
+
* The body of this branch, to be executed if the condition is true.
|
|
37
|
+
*/
|
|
38
|
+
body: CodeTree;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A node in the code tree indicating that a precise type has been determined.
|
|
42
|
+
*/
|
|
43
|
+
export interface Result {
|
|
44
|
+
kind: "result";
|
|
45
|
+
type: PreciseType | UnknownType;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A switch structure in the CodeTree DSL.
|
|
49
|
+
*/
|
|
50
|
+
export interface Switch {
|
|
51
|
+
kind: "switch";
|
|
52
|
+
/**
|
|
53
|
+
* The expression to switch on.
|
|
54
|
+
*/
|
|
55
|
+
condition: Expression;
|
|
56
|
+
/**
|
|
57
|
+
* The cases to test for.
|
|
58
|
+
*/
|
|
59
|
+
cases: SwitchCase[];
|
|
60
|
+
/**
|
|
61
|
+
* The default case, if any.
|
|
62
|
+
*/
|
|
63
|
+
default?: CodeTree;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A verbatim code block.
|
|
67
|
+
*/
|
|
68
|
+
export interface Verbatim {
|
|
69
|
+
kind: "verbatim";
|
|
70
|
+
body: Iterable<string>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* A case in a switch statement.
|
|
74
|
+
*/
|
|
75
|
+
export interface SwitchCase {
|
|
76
|
+
/**
|
|
77
|
+
* The value to test for in this case.
|
|
78
|
+
*/
|
|
79
|
+
value: Expression;
|
|
80
|
+
/**
|
|
81
|
+
* The body of this case.
|
|
82
|
+
*/
|
|
83
|
+
body: CodeTree;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* An expression in the CodeTree DSL.
|
|
87
|
+
*/
|
|
88
|
+
export type Expression = BinaryOp | UnaryOp | TypeOf | Literal | VerbatimExpression | SubjectReference | ModelPropertyReference | InRange;
|
|
89
|
+
/**
|
|
90
|
+
* A binary operation.
|
|
91
|
+
*/
|
|
92
|
+
export interface BinaryOp {
|
|
93
|
+
kind: "binary-op";
|
|
94
|
+
/**
|
|
95
|
+
* The operator to apply. This operation may be sensitive to the order of the left and right expressions.
|
|
96
|
+
*/
|
|
97
|
+
operator: "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "&&" | "||" | "instanceof" | "in";
|
|
98
|
+
/**
|
|
99
|
+
* The left-hand-side operand.
|
|
100
|
+
*/
|
|
101
|
+
left: Expression;
|
|
102
|
+
/**
|
|
103
|
+
* The right-hand-side operand.
|
|
104
|
+
*/
|
|
105
|
+
right: Expression;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* A unary operation.
|
|
109
|
+
*/
|
|
110
|
+
export interface UnaryOp {
|
|
111
|
+
kind: "unary-op";
|
|
112
|
+
/**
|
|
113
|
+
* The operator to apply.
|
|
114
|
+
*/
|
|
115
|
+
operator: "!" | "-";
|
|
116
|
+
/**
|
|
117
|
+
* The operand to apply the operator to.
|
|
118
|
+
*/
|
|
119
|
+
operand: Expression;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* A type-of operation.
|
|
123
|
+
*/
|
|
124
|
+
export interface TypeOf {
|
|
125
|
+
kind: "typeof";
|
|
126
|
+
/**
|
|
127
|
+
* The operand to apply the `typeof` operator to.
|
|
128
|
+
*/
|
|
129
|
+
operand: Expression;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* A literal JavaScript value. The value will be converted to the text of an expression that will yield the same value.
|
|
133
|
+
*/
|
|
134
|
+
export interface Literal {
|
|
135
|
+
kind: "literal";
|
|
136
|
+
/**
|
|
137
|
+
* The value of the literal.
|
|
138
|
+
*/
|
|
139
|
+
value: LiteralValue;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* A verbatim expression, written as-is with no modification.
|
|
143
|
+
*/
|
|
144
|
+
export interface VerbatimExpression {
|
|
145
|
+
kind: "verbatim";
|
|
146
|
+
/**
|
|
147
|
+
* The exact text of the expression.
|
|
148
|
+
*/
|
|
149
|
+
text: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* A reference to the "subject" of the code tree.
|
|
153
|
+
*
|
|
154
|
+
* The "subject" is a special expression denoting an input value.
|
|
155
|
+
*/
|
|
156
|
+
export interface SubjectReference {
|
|
157
|
+
kind: "subject";
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* A reference to a model property. Model property references are rendered by the `referenceModelProperty` function in the
|
|
161
|
+
* options given to `writeCodeTree`, allowing the caller to define how model properties are stored.
|
|
162
|
+
*/
|
|
163
|
+
export interface ModelPropertyReference {
|
|
164
|
+
kind: "model-property";
|
|
165
|
+
property: ModelProperty;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* A check to see if a value is in an integer range.
|
|
169
|
+
*/
|
|
170
|
+
export interface InRange {
|
|
171
|
+
kind: "in-range";
|
|
172
|
+
/**
|
|
173
|
+
* The expression to check.
|
|
174
|
+
*/
|
|
175
|
+
expr: Expression;
|
|
176
|
+
/**
|
|
177
|
+
* The range to check against.
|
|
178
|
+
*/
|
|
179
|
+
range: IntegerRange;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* A literal value that can be used in a JavaScript expression.
|
|
183
|
+
*/
|
|
184
|
+
export type LiteralValue = string | number | boolean | bigint;
|
|
185
|
+
/**
|
|
186
|
+
* Differentiates the variants of a union type. This function returns a CodeTree that will test an input "subject" and
|
|
187
|
+
* determine which of the cases it matches.
|
|
188
|
+
*
|
|
189
|
+
* Compared to `differentiateTypes`, this function is specialized for union types, and will consider union
|
|
190
|
+
* discriminators first, then delegate to `differentiateTypes` for the remaining cases.
|
|
191
|
+
*
|
|
192
|
+
* @param ctx
|
|
193
|
+
* @param type
|
|
194
|
+
*/
|
|
195
|
+
export declare function differentiateUnion(ctx: JsContext, union: Union, renderPropertyName?: (prop: ModelProperty) => string): CodeTree;
|
|
196
|
+
/**
|
|
197
|
+
* Differentiates a set of input types. This function returns a CodeTree that will test an input "subject" and determine
|
|
198
|
+
* which of the cases it matches, executing the corresponding code block.
|
|
199
|
+
*
|
|
200
|
+
* @param ctx - The emitter context.
|
|
201
|
+
* @param cases - A map of cases to differentiate to their respective code blocks.
|
|
202
|
+
* @returns a CodeTree to use with `writeCodeTree`
|
|
203
|
+
*/
|
|
204
|
+
export declare function differentiateTypes(ctx: JsContext, cases: Set<PreciseType>, renderPropertyName?: (prop: ModelProperty) => string): CodeTree;
|
|
205
|
+
/**
|
|
206
|
+
* An integer range, inclusive.
|
|
207
|
+
*/
|
|
208
|
+
type IntegerRange = [number, number];
|
|
209
|
+
/**
|
|
210
|
+
* Differentiate a set of model types based on their properties. This function returns a CodeTree that will test an input
|
|
211
|
+
* "subject" and determine which of the cases it matches, executing the corresponding code block.
|
|
212
|
+
*
|
|
213
|
+
* @param ctx - The emitter context.
|
|
214
|
+
* @param models - A map of models to differentiate to their respective code blocks.
|
|
215
|
+
* @param renderPropertyName - A function that converts a model property reference over the subject to a string.
|
|
216
|
+
* @returns a CodeTree to use with `writeCodeTree`
|
|
217
|
+
*/
|
|
218
|
+
export declare function differentiateModelTypes(ctx: JsContext, models: Set<Model>, renderPropertyName?: (prop: ModelProperty) => string): CodeTree;
|
|
219
|
+
/**
|
|
220
|
+
* Options for the `writeCodeTree` function.
|
|
221
|
+
*/
|
|
222
|
+
export interface CodeTreeOptions {
|
|
223
|
+
/**
|
|
224
|
+
* The subject expression to use in the code tree.
|
|
225
|
+
*
|
|
226
|
+
* This text is used whenever a `SubjectReference` is encountered in the code tree, allowing the caller to specify
|
|
227
|
+
* how the subject is stored and referenced.
|
|
228
|
+
*/
|
|
229
|
+
subject: string;
|
|
230
|
+
/**
|
|
231
|
+
* A function that converts a model property to a string reference.
|
|
232
|
+
*
|
|
233
|
+
* This function is used whenever a `ModelPropertyReference` is encountered in the code tree, allowing the caller to
|
|
234
|
+
* specify how model properties are stored and referenced.
|
|
235
|
+
*/
|
|
236
|
+
referenceModelProperty: (p: ModelProperty) => string;
|
|
237
|
+
/**
|
|
238
|
+
* Renders a result when encountered in the code tree.
|
|
239
|
+
*/
|
|
240
|
+
renderResult: (type: PreciseType | UnknownType) => Iterable<string>;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Writes a code tree to text, given a set of options.
|
|
244
|
+
*
|
|
245
|
+
* @param ctx - The emitter context.
|
|
246
|
+
* @param tree - The code tree to write.
|
|
247
|
+
* @param options - The options to use when writing the code tree.
|
|
248
|
+
*/
|
|
249
|
+
export declare function writeCodeTree(ctx: JsContext, tree: CodeTree, options: CodeTreeOptions): Iterable<string>;
|
|
250
|
+
export {};
|
|
251
|
+
//# sourceMappingURL=differentiate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"differentiate.d.ts","sourceRoot":"","sources":["../../../src/util/differentiate.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,UAAU,EACV,KAAK,EACL,aAAa,EACb,QAAQ,EACR,cAAc,EACd,MAAM,EACN,aAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EAMT,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAOtC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE5D,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,cAAc,GAAG,cAAc,GAAG,UAAU,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/E;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,WAAW,CASvD;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,Q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