@typespec/compiler 1.9.0-dev.4 → 1.9.0-dev.5
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/dist/manifest.js
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
import type { Program } from "../core/program.js";
|
|
2
|
-
import { type Type, type Value } from "../core/types.js";
|
|
2
|
+
import { type ScalarValue, type Type, type Value } from "../core/types.js";
|
|
3
3
|
import { type EncodeData } from "./decorators.js";
|
|
4
|
+
/**
|
|
5
|
+
* Error thrown when a scalar value cannot be serialized because it uses an unsupported constructor.
|
|
6
|
+
*/
|
|
7
|
+
export declare class UnsupportedScalarConstructorError extends Error {
|
|
8
|
+
readonly scalarName: string;
|
|
9
|
+
readonly constructorName: string;
|
|
10
|
+
readonly supportedConstructors: readonly string[];
|
|
11
|
+
constructor(scalarName: string, constructorName: string, supportedConstructors: readonly string[]);
|
|
12
|
+
}
|
|
13
|
+
export interface ValueJsonSerializers {
|
|
14
|
+
/** Custom handler to serialize a scalar value
|
|
15
|
+
* @param value The scalar value to serialize
|
|
16
|
+
* @param type The type of the scalar value in the current context
|
|
17
|
+
* @param encodeAs The encoding information for the scalar value, if any
|
|
18
|
+
* @param originalFn The original serialization function to fall back to. Throws `UnsupportedScalarConstructorError` if the scalar constructor is not supported.
|
|
19
|
+
* @returns The serialized value
|
|
20
|
+
*/
|
|
21
|
+
serializeScalarValue?: (value: ScalarValue, type: Type, encodeAs: EncodeData | undefined, originalFn: (value: ScalarValue, type: Type, encodeAs: EncodeData | undefined) => unknown) => unknown;
|
|
22
|
+
}
|
|
4
23
|
/**
|
|
5
24
|
* Serialize the given TypeSpec value as a JSON object using the given type and its encoding annotations.
|
|
6
25
|
* The Value MUST be assignable to the given type.
|
|
7
26
|
*/
|
|
8
|
-
export declare function serializeValueAsJson(program: Program, value: Value, type: Type, encodeAs?: EncodeData): unknown;
|
|
27
|
+
export declare function serializeValueAsJson(program: Program, value: Value, type: Type, encodeAs?: EncodeData, handlers?: ValueJsonSerializers): unknown;
|
|
9
28
|
//# sourceMappingURL=examples.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../../src/lib/examples.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,
|
|
1
|
+
{"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../../src/lib/examples.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,KAAK,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAiC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEjF;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,KAAK;aAExC,UAAU,EAAE,MAAM;aAClB,eAAe,EAAE,MAAM;aACvB,qBAAqB,EAAE,SAAS,MAAM,EAAE;gBAFxC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,qBAAqB,EAAE,SAAS,MAAM,EAAE;CAO3D;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,CACrB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,UAAU,GAAG,SAAS,EAChC,UAAU,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,GAAG,SAAS,KAAK,OAAO,KACtF,OAAO,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,QAAQ,CAAC,EAAE,UAAU,EACrB,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,OAAO,CAmCT"}
|
package/dist/src/lib/examples.js
CHANGED
|
@@ -3,13 +3,28 @@ import { ignoreDiagnostics } from "../core/diagnostics.js";
|
|
|
3
3
|
import { getProperty } from "../core/semantic-walker.js";
|
|
4
4
|
import { isArrayModelType, isUnknownType } from "../core/type-utils.js";
|
|
5
5
|
import { getEncode, resolveEncodedName } from "./decorators.js";
|
|
6
|
+
/**
|
|
7
|
+
* Error thrown when a scalar value cannot be serialized because it uses an unsupported constructor.
|
|
8
|
+
*/
|
|
9
|
+
export class UnsupportedScalarConstructorError extends Error {
|
|
10
|
+
scalarName;
|
|
11
|
+
constructorName;
|
|
12
|
+
supportedConstructors;
|
|
13
|
+
constructor(scalarName, constructorName, supportedConstructors) {
|
|
14
|
+
super(`Cannot serialize scalar '${scalarName}' with constructor '${constructorName}'. Supported constructors: ${supportedConstructors.join(", ")}`);
|
|
15
|
+
this.scalarName = scalarName;
|
|
16
|
+
this.constructorName = constructorName;
|
|
17
|
+
this.supportedConstructors = supportedConstructors;
|
|
18
|
+
this.name = "UnsupportedScalarConstructorError";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
6
21
|
/**
|
|
7
22
|
* Serialize the given TypeSpec value as a JSON object using the given type and its encoding annotations.
|
|
8
23
|
* The Value MUST be assignable to the given type.
|
|
9
24
|
*/
|
|
10
|
-
export function serializeValueAsJson(program, value, type, encodeAs) {
|
|
25
|
+
export function serializeValueAsJson(program, value, type, encodeAs, handlers) {
|
|
11
26
|
if (type.kind === "ModelProperty") {
|
|
12
|
-
return serializeValueAsJson(program, value, type.type, encodeAs ?? getEncode(program, type));
|
|
27
|
+
return serializeValueAsJson(program, value, type.type, encodeAs ?? getEncode(program, type), handlers);
|
|
13
28
|
}
|
|
14
29
|
switch (value.valueKind) {
|
|
15
30
|
case "NullValue":
|
|
@@ -28,7 +43,7 @@ export function serializeValueAsJson(program, value, type, encodeAs) {
|
|
|
28
43
|
case "ObjectValue":
|
|
29
44
|
return serializeObjectValueAsJson(program, value, type);
|
|
30
45
|
case "ScalarValue":
|
|
31
|
-
return serializeScalarValueAsJson(program, value, type, encodeAs);
|
|
46
|
+
return serializeScalarValueAsJson(program, value, type, encodeAs, handlers);
|
|
32
47
|
}
|
|
33
48
|
}
|
|
34
49
|
/** Try to get the property of the type */
|
|
@@ -102,7 +117,10 @@ function resolveKnownScalar(program, scalar) {
|
|
|
102
117
|
}
|
|
103
118
|
return undefined;
|
|
104
119
|
}
|
|
105
|
-
function serializeScalarValueAsJson(program, value, type, encodeAs) {
|
|
120
|
+
function serializeScalarValueAsJson(program, value, type, encodeAs, handlers) {
|
|
121
|
+
if (handlers?.serializeScalarValue) {
|
|
122
|
+
return handlers.serializeScalarValue(value, type, encodeAs, serializeScalarValueAsJson.bind(null, program, value, type, encodeAs, undefined));
|
|
123
|
+
}
|
|
106
124
|
const result = resolveKnownScalar(program, value.scalar);
|
|
107
125
|
if (result === undefined) {
|
|
108
126
|
return serializeValueAsJson(program, value.value.args[0], value.value.args[0].type);
|
|
@@ -110,15 +128,30 @@ function serializeScalarValueAsJson(program, value, type, encodeAs) {
|
|
|
110
128
|
encodeAs = encodeAs ?? result.encodeAs;
|
|
111
129
|
switch (result.scalar.name) {
|
|
112
130
|
case "utcDateTime":
|
|
113
|
-
|
|
131
|
+
if (value.value.name === "fromISO") {
|
|
132
|
+
return ScalarSerializers.utcDateTime(value.value.args[0].value, encodeAs);
|
|
133
|
+
}
|
|
134
|
+
throw new UnsupportedScalarConstructorError("utcDateTime", value.value.name, ["fromISO"]);
|
|
114
135
|
case "offsetDateTime":
|
|
115
|
-
|
|
136
|
+
if (value.value.name === "fromISO") {
|
|
137
|
+
return ScalarSerializers.offsetDateTime(value.value.args[0].value, encodeAs);
|
|
138
|
+
}
|
|
139
|
+
throw new UnsupportedScalarConstructorError("offsetDateTime", value.value.name, ["fromISO"]);
|
|
116
140
|
case "plainDate":
|
|
117
|
-
|
|
141
|
+
if (value.value.name === "fromISO") {
|
|
142
|
+
return ScalarSerializers.plainDate(value.value.args[0].value);
|
|
143
|
+
}
|
|
144
|
+
throw new UnsupportedScalarConstructorError("plainDate", value.value.name, ["fromISO"]);
|
|
118
145
|
case "plainTime":
|
|
119
|
-
|
|
146
|
+
if (value.value.name === "fromISO") {
|
|
147
|
+
return ScalarSerializers.plainTime(value.value.args[0].value);
|
|
148
|
+
}
|
|
149
|
+
throw new UnsupportedScalarConstructorError("plainTime", value.value.name, ["fromISO"]);
|
|
120
150
|
case "duration":
|
|
121
|
-
|
|
151
|
+
if (value.value.name === "fromISO") {
|
|
152
|
+
return ScalarSerializers.duration(value.value.args[0].value, encodeAs);
|
|
153
|
+
}
|
|
154
|
+
throw new UnsupportedScalarConstructorError("duration", value.value.name, ["fromISO"]);
|
|
122
155
|
}
|
|
123
156
|
}
|
|
124
157
|
const ScalarSerializers = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"examples.js","sourceRoot":"","sources":["../../../src/lib/examples.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQxE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAmB,MAAM,iBAAiB,CAAC;AAEjF;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAgB,EAChB,KAAY,EACZ,IAAU,EACV,QAAqB;
|
|
1
|
+
{"version":3,"file":"examples.js","sourceRoot":"","sources":["../../../src/lib/examples.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC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