@microsoft/typespec-msgraph 0.0.1-Preview.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.
Files changed (286) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/dist/src/components/acceptable-media-types-annotation.d.ts +6 -0
  4. package/dist/src/components/acceptable-media-types-annotation.d.ts.map +1 -0
  5. package/dist/src/components/acceptable-media-types-annotation.js +15 -0
  6. package/dist/src/components/acceptable-media-types-annotation.js.map +1 -0
  7. package/dist/src/components/alternate-keys-annotation.d.ts +6 -0
  8. package/dist/src/components/alternate-keys-annotation.d.ts.map +1 -0
  9. package/dist/src/components/alternate-keys-annotation.js +30 -0
  10. package/dist/src/components/alternate-keys-annotation.js.map +1 -0
  11. package/dist/src/components/common-elements.d.ts +128 -0
  12. package/dist/src/components/common-elements.d.ts.map +1 -0
  13. package/dist/src/components/common-elements.js +38 -0
  14. package/dist/src/components/common-elements.js.map +1 -0
  15. package/dist/src/components/computed-annotation.d.ts +6 -0
  16. package/dist/src/components/computed-annotation.d.ts.map +1 -0
  17. package/dist/src/components/computed-annotation.js +12 -0
  18. package/dist/src/components/computed-annotation.js.map +1 -0
  19. package/dist/src/components/count-restrictions-annotation.d.ts +6 -0
  20. package/dist/src/components/count-restrictions-annotation.d.ts.map +1 -0
  21. package/dist/src/components/count-restrictions-annotation.js +15 -0
  22. package/dist/src/components/count-restrictions-annotation.js.map +1 -0
  23. package/dist/src/components/description-annotation.d.ts +6 -0
  24. package/dist/src/components/description-annotation.d.ts.map +1 -0
  25. package/dist/src/components/description-annotation.js +13 -0
  26. package/dist/src/components/description-annotation.js.map +1 -0
  27. package/dist/src/components/expand-restrictions-annotation.d.ts +7 -0
  28. package/dist/src/components/expand-restrictions-annotation.d.ts.map +1 -0
  29. package/dist/src/components/expand-restrictions-annotation.js +31 -0
  30. package/dist/src/components/expand-restrictions-annotation.js.map +1 -0
  31. package/dist/src/components/index.d.ts +15 -0
  32. package/dist/src/components/index.d.ts.map +1 -0
  33. package/dist/src/components/index.js +15 -0
  34. package/dist/src/components/index.js.map +1 -0
  35. package/dist/src/components/permissions-annotation.d.ts +6 -0
  36. package/dist/src/components/permissions-annotation.d.ts.map +1 -0
  37. package/dist/src/components/permissions-annotation.js +20 -0
  38. package/dist/src/components/permissions-annotation.js.map +1 -0
  39. package/dist/src/components/program-context.d.ts +4 -0
  40. package/dist/src/components/program-context.d.ts.map +1 -0
  41. package/dist/src/components/program-context.js +3 -0
  42. package/dist/src/components/program-context.js.map +1 -0
  43. package/dist/src/components/property-element.d.ts +6 -0
  44. package/dist/src/components/property-element.d.ts.map +1 -0
  45. package/dist/src/components/property-element.js +41 -0
  46. package/dist/src/components/property-element.js.map +1 -0
  47. package/dist/src/components/revisions-annotation.d.ts +7 -0
  48. package/dist/src/components/revisions-annotation.d.ts.map +1 -0
  49. package/dist/src/components/revisions-annotation.js +60 -0
  50. package/dist/src/components/revisions-annotation.js.map +1 -0
  51. package/dist/src/components/search-restrictions-annotation.d.ts +6 -0
  52. package/dist/src/components/search-restrictions-annotation.d.ts.map +1 -0
  53. package/dist/src/components/search-restrictions-annotation.js +15 -0
  54. package/dist/src/components/search-restrictions-annotation.js.map +1 -0
  55. package/dist/src/components/skip-supported-annotation.d.ts +6 -0
  56. package/dist/src/components/skip-supported-annotation.d.ts.map +1 -0
  57. package/dist/src/components/skip-supported-annotation.js +13 -0
  58. package/dist/src/components/skip-supported-annotation.js.map +1 -0
  59. package/dist/src/components/sort-restrictions-annotation.d.ts +7 -0
  60. package/dist/src/components/sort-restrictions-annotation.d.ts.map +1 -0
  61. package/dist/src/components/sort-restrictions-annotation.js +31 -0
  62. package/dist/src/components/sort-restrictions-annotation.js.map +1 -0
  63. package/dist/src/components/structured-type-element.d.ts +6 -0
  64. package/dist/src/components/structured-type-element.d.ts.map +1 -0
  65. package/dist/src/components/structured-type-element.js +77 -0
  66. package/dist/src/components/structured-type-element.js.map +1 -0
  67. package/dist/src/components/top-supported-annotation.d.ts +6 -0
  68. package/dist/src/components/top-supported-annotation.d.ts.map +1 -0
  69. package/dist/src/components/top-supported-annotation.js +13 -0
  70. package/dist/src/components/top-supported-annotation.js.map +1 -0
  71. package/dist/src/csdl.d.ts +8 -0
  72. package/dist/src/csdl.d.ts.map +1 -0
  73. package/dist/src/csdl.js +298 -0
  74. package/dist/src/csdl.js.map +1 -0
  75. package/dist/src/decorators/abstract.d.ts +9 -0
  76. package/dist/src/decorators/abstract.d.ts.map +1 -0
  77. package/dist/src/decorators/abstract.js +19 -0
  78. package/dist/src/decorators/abstract.js.map +1 -0
  79. package/dist/src/decorators/alternate-key.d.ts +9 -0
  80. package/dist/src/decorators/alternate-key.d.ts.map +1 -0
  81. package/dist/src/decorators/alternate-key.js +13 -0
  82. package/dist/src/decorators/alternate-key.js.map +1 -0
  83. package/dist/src/decorators/attribute-builder.d.ts +2 -0
  84. package/dist/src/decorators/attribute-builder.d.ts.map +1 -0
  85. package/dist/src/decorators/attribute-builder.js +166 -0
  86. package/dist/src/decorators/attribute-builder.js.map +1 -0
  87. package/dist/src/decorators/attributes.d.ts +57 -0
  88. package/dist/src/decorators/attributes.d.ts.map +1 -0
  89. package/dist/src/decorators/attributes.js +50 -0
  90. package/dist/src/decorators/attributes.js.map +1 -0
  91. package/dist/src/decorators/complex.d.ts +9 -0
  92. package/dist/src/decorators/complex.d.ts.map +1 -0
  93. package/dist/src/decorators/complex.js +19 -0
  94. package/dist/src/decorators/complex.js.map +1 -0
  95. package/dist/src/decorators/computed.d.ts +9 -0
  96. package/dist/src/decorators/computed.d.ts.map +1 -0
  97. package/dist/src/decorators/computed.js +13 -0
  98. package/dist/src/decorators/computed.js.map +1 -0
  99. package/dist/src/decorators/contains.d.ts +9 -0
  100. package/dist/src/decorators/contains.d.ts.map +1 -0
  101. package/dist/src/decorators/contains.js +13 -0
  102. package/dist/src/decorators/contains.js.map +1 -0
  103. package/dist/src/decorators/count.d.ts +9 -0
  104. package/dist/src/decorators/count.d.ts.map +1 -0
  105. package/dist/src/decorators/count.js +13 -0
  106. package/dist/src/decorators/count.js.map +1 -0
  107. package/dist/src/decorators/deprecated-definition.d.ts +21 -0
  108. package/dist/src/decorators/deprecated-definition.d.ts.map +1 -0
  109. package/dist/src/decorators/deprecated-definition.js +18 -0
  110. package/dist/src/decorators/deprecated-definition.js.map +1 -0
  111. package/dist/src/decorators/entity.d.ts +10 -0
  112. package/dist/src/decorators/entity.d.ts.map +1 -0
  113. package/dist/src/decorators/entity.js +23 -0
  114. package/dist/src/decorators/entity.js.map +1 -0
  115. package/dist/src/decorators/expand.d.ts +11 -0
  116. package/dist/src/decorators/expand.d.ts.map +1 -0
  117. package/dist/src/decorators/expand.js +17 -0
  118. package/dist/src/decorators/expand.js.map +1 -0
  119. package/dist/src/decorators/handlers/custom/additional-query-parameters.d.ts +14 -0
  120. package/dist/src/decorators/handlers/custom/additional-query-parameters.d.ts.map +1 -0
  121. package/dist/src/decorators/handlers/custom/additional-query-parameters.js +36 -0
  122. package/dist/src/decorators/handlers/custom/additional-query-parameters.js.map +1 -0
  123. package/dist/src/decorators/handlers/custom/ags-attribute.d.ts +7 -0
  124. package/dist/src/decorators/handlers/custom/ags-attribute.d.ts.map +1 -0
  125. package/dist/src/decorators/handlers/custom/ags-attribute.js +36 -0
  126. package/dist/src/decorators/handlers/custom/ags-attribute.js.map +1 -0
  127. package/dist/src/decorators/handlers/custom/index.d.ts +3 -0
  128. package/dist/src/decorators/handlers/custom/index.d.ts.map +1 -0
  129. package/dist/src/decorators/handlers/custom/index.js +3 -0
  130. package/dist/src/decorators/handlers/custom/index.js.map +1 -0
  131. package/dist/src/decorators/handlers/index.d.ts +30 -0
  132. package/dist/src/decorators/handlers/index.d.ts.map +1 -0
  133. package/dist/src/decorators/handlers/index.js +121 -0
  134. package/dist/src/decorators/handlers/index.js.map +1 -0
  135. package/dist/src/decorators/has-stream.d.ts +11 -0
  136. package/dist/src/decorators/has-stream.d.ts.map +1 -0
  137. package/dist/src/decorators/has-stream.js +30 -0
  138. package/dist/src/decorators/has-stream.js.map +1 -0
  139. package/dist/src/decorators/index.d.ts +21 -0
  140. package/dist/src/decorators/index.d.ts.map +1 -0
  141. package/dist/src/decorators/index.js +21 -0
  142. package/dist/src/decorators/index.js.map +1 -0
  143. package/dist/src/decorators/open.d.ts +9 -0
  144. package/dist/src/decorators/open.d.ts.map +1 -0
  145. package/dist/src/decorators/open.js +19 -0
  146. package/dist/src/decorators/open.js.map +1 -0
  147. package/dist/src/decorators/order-by.d.ts +11 -0
  148. package/dist/src/decorators/order-by.d.ts.map +1 -0
  149. package/dist/src/decorators/order-by.js +17 -0
  150. package/dist/src/decorators/order-by.js.map +1 -0
  151. package/dist/src/decorators/private-preview-definition.d.ts +19 -0
  152. package/dist/src/decorators/private-preview-definition.d.ts.map +1 -0
  153. package/dist/src/decorators/private-preview-definition.js +15 -0
  154. package/dist/src/decorators/private-preview-definition.js.map +1 -0
  155. package/dist/src/decorators/private-preview.d.ts +9 -0
  156. package/dist/src/decorators/private-preview.d.ts.map +1 -0
  157. package/dist/src/decorators/private-preview.js +25 -0
  158. package/dist/src/decorators/private-preview.js.map +1 -0
  159. package/dist/src/decorators/read-only.d.ts +9 -0
  160. package/dist/src/decorators/read-only.d.ts.map +1 -0
  161. package/dist/src/decorators/read-only.js +13 -0
  162. package/dist/src/decorators/read-only.js.map +1 -0
  163. package/dist/src/decorators/references.d.ts +9 -0
  164. package/dist/src/decorators/references.d.ts.map +1 -0
  165. package/dist/src/decorators/references.js +13 -0
  166. package/dist/src/decorators/references.js.map +1 -0
  167. package/dist/src/decorators/routed-interfaces.d.ts +19 -0
  168. package/dist/src/decorators/routed-interfaces.d.ts.map +1 -0
  169. package/dist/src/decorators/routed-interfaces.js +43 -0
  170. package/dist/src/decorators/routed-interfaces.js.map +1 -0
  171. package/dist/src/decorators/search.d.ts +8 -0
  172. package/dist/src/decorators/search.d.ts.map +1 -0
  173. package/dist/src/decorators/search.js +12 -0
  174. package/dist/src/decorators/search.js.map +1 -0
  175. package/dist/src/decorators/skip.d.ts +8 -0
  176. package/dist/src/decorators/skip.d.ts.map +1 -0
  177. package/dist/src/decorators/skip.js +12 -0
  178. package/dist/src/decorators/skip.js.map +1 -0
  179. package/dist/src/decorators/top.d.ts +8 -0
  180. package/dist/src/decorators/top.d.ts.map +1 -0
  181. package/dist/src/decorators/top.js +12 -0
  182. package/dist/src/decorators/top.js.map +1 -0
  183. package/dist/src/decorators/write-only.d.ts +9 -0
  184. package/dist/src/decorators/write-only.d.ts.map +1 -0
  185. package/dist/src/decorators/write-only.js +13 -0
  186. package/dist/src/decorators/write-only.js.map +1 -0
  187. package/dist/src/dom/reconciler.d.ts +10 -0
  188. package/dist/src/dom/reconciler.d.ts.map +1 -0
  189. package/dist/src/dom/reconciler.js +95 -0
  190. package/dist/src/dom/reconciler.js.map +1 -0
  191. package/dist/src/dom/renderer.d.ts +6 -0
  192. package/dist/src/dom/renderer.d.ts.map +1 -0
  193. package/dist/src/dom/renderer.js +33 -0
  194. package/dist/src/dom/renderer.js.map +1 -0
  195. package/dist/src/dom/types.d.ts +33 -0
  196. package/dist/src/dom/types.d.ts.map +1 -0
  197. package/dist/src/dom/types.js +2 -0
  198. package/dist/src/dom/types.js.map +1 -0
  199. package/dist/src/emitter.d.ts +4 -0
  200. package/dist/src/emitter.d.ts.map +1 -0
  201. package/dist/src/emitter.js +11 -0
  202. package/dist/src/emitter.js.map +1 -0
  203. package/dist/src/index.d.ts +7 -0
  204. package/dist/src/index.d.ts.map +1 -0
  205. package/dist/src/index.js +7 -0
  206. package/dist/src/index.js.map +1 -0
  207. package/dist/src/lib.d.ts +138 -0
  208. package/dist/src/lib.d.ts.map +1 -0
  209. package/dist/src/lib.js +55 -0
  210. package/dist/src/lib.js.map +1 -0
  211. package/dist/src/linter.d.ts +3 -0
  212. package/dist/src/linter.d.ts.map +1 -0
  213. package/dist/src/linter.js +35 -0
  214. package/dist/src/linter.js.map +1 -0
  215. package/dist/src/rules/abstract.d.ts +5 -0
  216. package/dist/src/rules/abstract.d.ts.map +1 -0
  217. package/dist/src/rules/abstract.js +31 -0
  218. package/dist/src/rules/abstract.js.map +1 -0
  219. package/dist/src/rules/alternate-key.d.ts +4 -0
  220. package/dist/src/rules/alternate-key.d.ts.map +1 -0
  221. package/dist/src/rules/alternate-key.js +81 -0
  222. package/dist/src/rules/alternate-key.js.map +1 -0
  223. package/dist/src/rules/computed.d.ts +7 -0
  224. package/dist/src/rules/computed.d.ts.map +1 -0
  225. package/dist/src/rules/computed.js +47 -0
  226. package/dist/src/rules/computed.js.map +1 -0
  227. package/dist/src/rules/contains.d.ts +5 -0
  228. package/dist/src/rules/contains.d.ts.map +1 -0
  229. package/dist/src/rules/contains.js +32 -0
  230. package/dist/src/rules/contains.js.map +1 -0
  231. package/dist/src/rules/count.d.ts +5 -0
  232. package/dist/src/rules/count.d.ts.map +1 -0
  233. package/dist/src/rules/count.js +35 -0
  234. package/dist/src/rules/count.js.map +1 -0
  235. package/dist/src/rules/entity.d.ts +2 -0
  236. package/dist/src/rules/entity.d.ts.map +1 -0
  237. package/dist/src/rules/entity.js +31 -0
  238. package/dist/src/rules/entity.js.map +1 -0
  239. package/dist/src/rules/expand.d.ts +3 -0
  240. package/dist/src/rules/expand.d.ts.map +1 -0
  241. package/dist/src/rules/expand.js +69 -0
  242. package/dist/src/rules/expand.js.map +1 -0
  243. package/dist/src/rules/has-stream.d.ts +2 -0
  244. package/dist/src/rules/has-stream.d.ts.map +1 -0
  245. package/dist/src/rules/has-stream.js +29 -0
  246. package/dist/src/rules/has-stream.js.map +1 -0
  247. package/dist/src/rules/index.d.ts +21 -0
  248. package/dist/src/rules/index.d.ts.map +1 -0
  249. package/dist/src/rules/index.js +176 -0
  250. package/dist/src/rules/index.js.map +1 -0
  251. package/dist/src/rules/open.d.ts +5 -0
  252. package/dist/src/rules/open.d.ts.map +1 -0
  253. package/dist/src/rules/open.js +31 -0
  254. package/dist/src/rules/open.js.map +1 -0
  255. package/dist/src/rules/order-by.d.ts +3 -0
  256. package/dist/src/rules/order-by.d.ts.map +1 -0
  257. package/dist/src/rules/order-by.js +69 -0
  258. package/dist/src/rules/order-by.js.map +1 -0
  259. package/dist/src/rules/references.d.ts +5 -0
  260. package/dist/src/rules/references.d.ts.map +1 -0
  261. package/dist/src/rules/references.js +32 -0
  262. package/dist/src/rules/references.js.map +1 -0
  263. package/dist/src/rules/search.d.ts +5 -0
  264. package/dist/src/rules/search.d.ts.map +1 -0
  265. package/dist/src/rules/search.js +35 -0
  266. package/dist/src/rules/search.js.map +1 -0
  267. package/dist/src/rules/skip.d.ts +5 -0
  268. package/dist/src/rules/skip.d.ts.map +1 -0
  269. package/dist/src/rules/skip.js +35 -0
  270. package/dist/src/rules/skip.js.map +1 -0
  271. package/dist/src/rules/top.d.ts +5 -0
  272. package/dist/src/rules/top.d.ts.map +1 -0
  273. package/dist/src/rules/top.js +35 -0
  274. package/dist/src/rules/top.js.map +1 -0
  275. package/dist/src/testing/index.d.ts +3 -0
  276. package/dist/src/testing/index.d.ts.map +1 -0
  277. package/dist/src/testing/index.js +24 -0
  278. package/dist/src/testing/index.js.map +1 -0
  279. package/dist/src/utils.d.ts +27 -0
  280. package/dist/src/utils.d.ts.map +1 -0
  281. package/dist/src/utils.js +186 -0
  282. package/dist/src/utils.js.map +1 -0
  283. package/lib/decorators.tsp +164 -0
  284. package/lib/lib.tsp +35 -0
  285. package/lib/msgraph.tsp +2 -0
  286. package/package.json +68 -0
@@ -0,0 +1,25 @@
1
+ import { createDecoratorDefinition, } from "@typespec/compiler";
2
+ const privatePreviewKey = Symbol("privatePreview");
3
+ // TODO: Remove this and move to extern dec once Model type is defined in TypeSpec.Reflection https://github.com/microsoft/typespec/issues/1655
4
+ const privatePreviewDecorator = createDecoratorDefinition({
5
+ name: "@privatePreview",
6
+ target: ["Model", "ModelProperty", "Enum", "EnumMember", "Operation", "Namespace"],
7
+ args: [{ kind: "String" }],
8
+ });
9
+ /**
10
+ * `@privatePreview` - Allow us to deprecate a defined element.
11
+ * `@privatePreview` - Applies to models, model properties, enums, enum members, namespaces and operations.
12
+ */
13
+ export function $privatePreview(context, target, name) {
14
+ if (!privatePreviewDecorator.validate(context, target, [name])) {
15
+ return;
16
+ }
17
+ context.program.stateMap(privatePreviewKey).set(target, name);
18
+ }
19
+ export function getPrivatePreview(program, target) {
20
+ return program.stateMap(privatePreviewKey).get(target);
21
+ }
22
+ export function isPrivatePreview(program, target) {
23
+ return program.stateMap(privatePreviewKey).has(target);
24
+ }
25
+ //# sourceMappingURL=private-preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-preview.js","sourceRoot":"","sources":["../../../src/decorators/private-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,MAAM,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAEnD,+IAA+I;AAC/I,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;IACxD,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC;IAClF,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB,CAAC,CAAC;AACZ;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAyB,EACzB,MAAyE,EACzE,IAAY;IAEZ,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE;QAC9D,OAAO;KACR;IAED,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB,EAAE,MAAY;IAC9D,OAAO,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAgB,EAAE,MAAY;IAC7D,OAAO,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { DecoratorContext, ModelProperty, Program } from "@typespec/compiler";
2
+ /**
3
+ * `@readOnly` - mark a model property as readOnly property
4
+ *
5
+ * `@readOnly` can only be applied to model properties.
6
+ */
7
+ export declare function $readOnly(context: DecoratorContext, entity: ModelProperty): void;
8
+ export declare function isReadOnly(program: Program, property: ModelProperty): boolean;
9
+ //# sourceMappingURL=read-only.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-only.d.ts","sourceRoot":"","sources":["../../../src/decorators/read-only.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG9E;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,QAEzE;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,WAEnE"}
@@ -0,0 +1,13 @@
1
+ const readOnlyKey = Symbol("readOnly");
2
+ /**
3
+ * `@readOnly` - mark a model property as readOnly property
4
+ *
5
+ * `@readOnly` can only be applied to model properties.
6
+ */
7
+ export function $readOnly(context, entity) {
8
+ context.program.stateSet(readOnlyKey).add(entity);
9
+ }
10
+ export function isReadOnly(program, property) {
11
+ return program.stateSet(readOnlyKey).has(property);
12
+ }
13
+ //# sourceMappingURL=read-only.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-only.js","sourceRoot":"","sources":["../../../src/decorators/read-only.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACvC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,MAAqB;IACxE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,QAAuB;IAClE,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { DecoratorContext, ModelProperty, Program } from "@typespec/compiler";
2
+ /**
3
+ * `@references` - mark a model property as a contained navigation property
4
+ *
5
+ * `@references` can only be applied to navigation model properties.
6
+ */
7
+ export declare function $references(context: DecoratorContext, entity: ModelProperty): void;
8
+ export declare function isReferences(program: Program, property: ModelProperty): boolean;
9
+ //# sourceMappingURL=references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../src/decorators/references.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI9E;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,QAE3E;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,WAErE"}
@@ -0,0 +1,13 @@
1
+ const referencesKey = Symbol("references");
2
+ /**
3
+ * `@references` - mark a model property as a contained navigation property
4
+ *
5
+ * `@references` can only be applied to navigation model properties.
6
+ */
7
+ export function $references(context, entity) {
8
+ context.program.stateSet(referencesKey).add(entity);
9
+ }
10
+ export function isReferences(program, property) {
11
+ return program.stateSet(referencesKey).has(property);
12
+ }
13
+ //# sourceMappingURL=references.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"references.js","sourceRoot":"","sources":["../../../src/decorators/references.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAE3C;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,OAAyB,EAAE,MAAqB;IAC1E,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAgB,EAAE,QAAuB;IACpE,OAAO,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACvD,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { DecoratorContext, Model, Operation, Program, Type } from "@typespec/compiler";
2
+ /**
3
+ * `@function` - mark an operation as a function
4
+ *
5
+ * `@function` can only be applied to operations.
6
+ */
7
+ export declare function $function(context: DecoratorContext, target: Operation, name?: string): void;
8
+ export declare function isFunction(program: Program, target: Operation): boolean;
9
+ export declare function getFunction(program: Program, target: Operation): string | undefined;
10
+ /**
11
+ * `@operationParameters` - A model with this decorator will not be generated in the CSDL
12
+ * and can't be reused by other models through inheritance,
13
+ * or any other way except through being a parameter for an action operation.
14
+ * The purpose of this model is only to define model parameters that would be too verbose.
15
+ * This decorator will be the equivalent of inlining the properties of the model into parameters of the operation.
16
+ */
17
+ export declare function $operationParameters(context: DecoratorContext, model: Type): void;
18
+ export declare function isOperationParameters(program: Program, model: Model): boolean;
19
+ //# sourceMappingURL=routed-interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routed-interfaces.d.ts","sourceRoot":"","sources":["../../../src/decorators/routed-interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,OAAO,EACP,IAAI,EAEL,MAAM,oBAAoB,CAAC;AAS5B;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,QAMpF;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,WAE7D;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAEnF;AAGD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,QAO1E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,WAEnE"}
@@ -0,0 +1,43 @@
1
+ import { createDecoratorDefinition, validateDecoratorTarget, } from "@typespec/compiler";
2
+ const functionKey = Symbol("function");
3
+ const functionDecorator = createDecoratorDefinition({
4
+ name: "@function",
5
+ target: "Operation",
6
+ args: [{ kind: "String", optional: true }],
7
+ });
8
+ /**
9
+ * `@function` - mark an operation as a function
10
+ *
11
+ * `@function` can only be applied to operations.
12
+ */
13
+ export function $function(context, target, name) {
14
+ if (!functionDecorator.validate(context, target, [name])) {
15
+ return;
16
+ }
17
+ context.program.stateMap(functionKey).set(target, name || target.name);
18
+ }
19
+ export function isFunction(program, target) {
20
+ return program.stateMap(functionKey).has(target);
21
+ }
22
+ export function getFunction(program, target) {
23
+ return program.stateMap(functionKey).get(target);
24
+ }
25
+ const operationParametersKey = Symbol("operationParameters");
26
+ /**
27
+ * `@operationParameters` - A model with this decorator will not be generated in the CSDL
28
+ * and can't be reused by other models through inheritance,
29
+ * or any other way except through being a parameter for an action operation.
30
+ * The purpose of this model is only to define model parameters that would be too verbose.
31
+ * This decorator will be the equivalent of inlining the properties of the model into parameters of the operation.
32
+ */
33
+ export function $operationParameters(context, model) {
34
+ if (!validateDecoratorTarget(context, model, "@operationParameters", "Model")) {
35
+ return;
36
+ }
37
+ // Register the operationParameters property
38
+ context.program.stateSet(operationParametersKey).add(model);
39
+ }
40
+ export function isOperationParameters(program, model) {
41
+ return program.stateSet(operationParametersKey).has(model);
42
+ }
43
+ //# sourceMappingURL=routed-interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routed-interfaces.js","sourceRoot":"","sources":["../../../src/decorators/routed-interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EAMzB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACvC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;IAClD,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CAClC,CAAC,CAAC;AAEZ;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,MAAiB,EAAE,IAAa;IACnF,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE;QACxD,OAAO;KACR;IAED,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,MAAiB;IAC5D,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAgB,EAAE,MAAiB;IAC7D,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,sBAAsB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC7D;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAyB,EAAE,KAAW;IACzE,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE;QAC7E,OAAO;KACR;IAED,4CAA4C;IAC5C,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAgB,EAAE,KAAY;IAClE,OAAO,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DecoratorContext, Operation, Program } from "@typespec/compiler";
2
+ /**
3
+ * `@search` - Applies to: get operations that return collections.
4
+ * Indicates that the get operation supports the OData $search query parameter.
5
+ */
6
+ export declare function $search(context: DecoratorContext, target: Operation): void;
7
+ export declare function isSearch(program: Program, target: Operation): boolean;
8
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/decorators/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI1E;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,QAEnE;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,WAE3D"}
@@ -0,0 +1,12 @@
1
+ const searchKey = Symbol("search");
2
+ /**
3
+ * `@search` - Applies to: get operations that return collections.
4
+ * Indicates that the get operation supports the OData $search query parameter.
5
+ */
6
+ export function $search(context, target) {
7
+ context.program.stateSet(searchKey).add(target);
8
+ }
9
+ export function isSearch(program, target) {
10
+ return program.stateSet(searchKey).has(target);
11
+ }
12
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/decorators/search.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEnC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,OAAyB,EAAE,MAAiB;IAClE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAgB,EAAE,MAAiB;IAC1D,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DecoratorContext, Operation, Program } from "@typespec/compiler";
2
+ /**
3
+ * `@skip` - Applies to: get operations that return collections.
4
+ * Indicates that the get operation supports the OData $skip query parameter.
5
+ */
6
+ export declare function $skip(context: DecoratorContext, target: Operation): void;
7
+ export declare function isSkip(program: Program, target: Operation): boolean;
8
+ //# sourceMappingURL=skip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip.d.ts","sourceRoot":"","sources":["../../../src/decorators/skip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI1E;;;GAGG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,QAEjE;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,WAEzD"}
@@ -0,0 +1,12 @@
1
+ const skipKey = Symbol("skip");
2
+ /**
3
+ * `@skip` - Applies to: get operations that return collections.
4
+ * Indicates that the get operation supports the OData $skip query parameter.
5
+ */
6
+ export function $skip(context, target) {
7
+ context.program.stateSet(skipKey).add(target);
8
+ }
9
+ export function isSkip(program, target) {
10
+ return program.stateSet(skipKey).has(target);
11
+ }
12
+ //# sourceMappingURL=skip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../src/decorators/skip.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAE/B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,OAAyB,EAAE,MAAiB;IAChE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,OAAgB,EAAE,MAAiB;IACxD,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DecoratorContext, Operation, Program } from "@typespec/compiler";
2
+ /**
3
+ * `@top` - Applies to: get operations that return collections.
4
+ * Indicates that the get operation supports the OData $top query parameter.
5
+ */
6
+ export declare function $top(context: DecoratorContext, target: Operation): void;
7
+ export declare function isTop(program: Program, target: Operation): boolean;
8
+ //# sourceMappingURL=top.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top.d.ts","sourceRoot":"","sources":["../../../src/decorators/top.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI1E;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,QAEhE;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,WAExD"}
@@ -0,0 +1,12 @@
1
+ const topKey = Symbol("top");
2
+ /**
3
+ * `@top` - Applies to: get operations that return collections.
4
+ * Indicates that the get operation supports the OData $top query parameter.
5
+ */
6
+ export function $top(context, target) {
7
+ context.program.stateSet(topKey).add(target);
8
+ }
9
+ export function isTop(program, target) {
10
+ return program.stateSet(topKey).has(target);
11
+ }
12
+ //# sourceMappingURL=top.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top.js","sourceRoot":"","sources":["../../../src/decorators/top.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAE7B;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,OAAyB,EAAE,MAAiB;IAC/D,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,OAAgB,EAAE,MAAiB;IACvD,OAAO,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { DecoratorContext, ModelProperty, Program } from "@typespec/compiler";
2
+ /**
3
+ * `@writeOnly` - mark a model property as writeOnly property
4
+ *
5
+ * `@writeOnly` can only be applied to model properties.
6
+ */
7
+ export declare function $writeOnly(context: DecoratorContext, entity: ModelProperty): void;
8
+ export declare function isWriteOnly(program: Program, property: ModelProperty): boolean;
9
+ //# sourceMappingURL=write-only.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-only.d.ts","sourceRoot":"","sources":["../../../src/decorators/write-only.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG9E;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,QAE1E;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,WAEpE"}
@@ -0,0 +1,13 @@
1
+ const writeOnlyKey = Symbol("writeOnly");
2
+ /**
3
+ * `@writeOnly` - mark a model property as writeOnly property
4
+ *
5
+ * `@writeOnly` can only be applied to model properties.
6
+ */
7
+ export function $writeOnly(context, entity) {
8
+ context.program.stateSet(writeOnlyKey).add(entity);
9
+ }
10
+ export function isWriteOnly(program, property) {
11
+ return program.stateSet(writeOnlyKey).has(property);
12
+ }
13
+ //# sourceMappingURL=write-only.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-only.js","sourceRoot":"","sources":["../../../src/decorators/write-only.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AACzC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,OAAyB,EAAE,MAAqB;IACzE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAgB,EAAE,QAAuB;IACnE,OAAO,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import ReactReconciler from "react-reconciler";
2
+ import { Container, Instance, PublicInstance, TextInstance } from "./types.js";
3
+ /**
4
+ * `react-reconciler` - https://github.com/facebook/react/blob/main/packages/react-reconciler/README.md
5
+ *
6
+ * Custom react renderers - https://github.com/chentsulin/awesome-react-renderer#learn
7
+ */
8
+ declare const _default: ReactReconciler.Reconciler<Container, Instance, TextInstance, unknown, PublicInstance>;
9
+ export default _default;
10
+ //# sourceMappingURL=reconciler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconciler.d.ts","sourceRoot":"","sources":["../../../src/dom/reconciler.ts"],"names":[],"mappings":"AAAA,OAAO,eAA0B,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,SAAS,EAET,QAAQ,EAGR,cAAc,EACd,YAAY,EAIb,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;;AACH,wBAgJG"}
@@ -0,0 +1,95 @@
1
+ import ReactReconciler from "react-reconciler";
2
+ /**
3
+ * `react-reconciler` - https://github.com/facebook/react/blob/main/packages/react-reconciler/README.md
4
+ *
5
+ * Custom react renderers - https://github.com/chentsulin/awesome-react-renderer#learn
6
+ */
7
+ export default ReactReconciler({
8
+ supportsMutation: true,
9
+ supportsPersistence: false,
10
+ supportsHydration: false,
11
+ noTimeout: -1,
12
+ isPrimaryRenderer: false,
13
+ createInstance: function (type, props, rootContainer, hostContext, internalHandle) {
14
+ const element = rootContainer.ownerDocument.createElement(type);
15
+ for (const [key, value] of Object.entries(props)) {
16
+ if (key !== "children" && !!value) {
17
+ element.setAttribute(key, value);
18
+ }
19
+ }
20
+ return element;
21
+ },
22
+ createTextInstance: function (text, rootContainer, hostContext, internalHandle) {
23
+ return rootContainer.ownerDocument.createTextNode(text);
24
+ },
25
+ appendInitialChild: function (parentInstance, child) {
26
+ parentInstance.appendChild(child);
27
+ },
28
+ finalizeInitialChildren: function (instance, type, props, rootContainer, hostContext) {
29
+ return true;
30
+ },
31
+ prepareUpdate: function (instance, type, oldProps, newProps, rootContainer, hostContext) {
32
+ return true;
33
+ },
34
+ shouldSetTextContent: function (type, props) {
35
+ if (typeof props.children === "string") {
36
+ return true;
37
+ }
38
+ return false;
39
+ },
40
+ getRootHostContext: function (rootContainer) {
41
+ return {};
42
+ },
43
+ getChildHostContext: function (parentHostContext, type, rootContainer) {
44
+ return {};
45
+ },
46
+ getPublicInstance: function (instance) {
47
+ return instance;
48
+ },
49
+ prepareForCommit: function (containerInfo) {
50
+ return {};
51
+ },
52
+ resetAfterCommit: function (containerInfo) {
53
+ // void
54
+ },
55
+ preparePortalMount: function (containerInfo) {
56
+ // void
57
+ },
58
+ scheduleTimeout: function (fn, delay) {
59
+ return null;
60
+ },
61
+ cancelTimeout: function (id) {
62
+ // void
63
+ },
64
+ getCurrentEventPriority: function () {
65
+ return 100;
66
+ },
67
+ getInstanceFromNode: function (node) {
68
+ return null;
69
+ },
70
+ beforeActiveInstanceBlur: function () {
71
+ // void
72
+ },
73
+ afterActiveInstanceBlur: function () {
74
+ // void
75
+ },
76
+ prepareScopeUpdate: function (scopeInstance, instance) {
77
+ // void
78
+ },
79
+ getInstanceFromScope: function (scopeInstance) {
80
+ return null;
81
+ },
82
+ detachDeletedInstance: function (node) {
83
+ // void
84
+ },
85
+ clearContainer(container) {
86
+ // void
87
+ },
88
+ appendChildToContainer(container, child) {
89
+ container.appendChild(child);
90
+ },
91
+ commitMount(instance, type, props, internalInstanceHandle) {
92
+ // void
93
+ },
94
+ });
95
+ //# sourceMappingURL=reconciler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconciler.js","sourceRoot":"","sources":["../../../src/dom/reconciler.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ getXmlDocument(schemas: JSX.Element): XMLDocument;
3
+ getXmlText(schemas: JSX.Element): string;
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/dom/renderer.ts"],"names":[],"mappings":";4BAqB0B,WAAW,GAAG,WAAW;wBAwB7B,WAAW,GAAG,MAAM;;AAzB1C,wBAgCE"}
@@ -0,0 +1,33 @@
1
+ import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
2
+ import reconciler from "./reconciler.js";
3
+ function formatXml(xml, tab = " ") {
4
+ let formatted = "";
5
+ let indent = "";
6
+ xml.split(/>\s*</).forEach(function (node) {
7
+ if (node.match(/^\/\w/)) {
8
+ indent = indent.substring(tab.length); // decrease indent by one 'tab'
9
+ }
10
+ formatted += indent + "<" + node + ">\r\n";
11
+ if (node.match(/^<?\w[^>]*[^/]$/)) {
12
+ indent += tab; // increase indent
13
+ }
14
+ });
15
+ return formatted.substring(1, formatted.length - 3);
16
+ }
17
+ export default {
18
+ getXmlDocument(schemas) {
19
+ const parser = new DOMParser();
20
+ const xmldoc = parser.parseFromString(`<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"><edmx:DataServices /></edmx:Edmx>`, "text/xml");
21
+ const dataServices = xmldoc.documentElement.firstChild;
22
+ const container = reconciler.createContainer(dataServices, 0, null, false, null, "", () => { }, null);
23
+ reconciler.updateContainer(schemas, container);
24
+ return xmldoc;
25
+ },
26
+ getXmlText(schemas) {
27
+ const serializer = new XMLSerializer();
28
+ const xmldoc = this.getXmlDocument(schemas);
29
+ const xmlText = serializer.serializeToString(xmldoc);
30
+ return formatXml(xmlText);
31
+ },
32
+ };
33
+ //# sourceMappingURL=renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../src/dom/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,SAAS,SAAS,CAAC,GAAW,EAAE,MAAc,IAAI;IAChD,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAU,IAAI;QACvC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;YACvB,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,+BAA+B;SACvE;QAED,SAAS,IAAI,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,OAAO,CAAC;QAC3C,IAAI,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE;YACjC,MAAM,IAAI,GAAG,CAAC,CAAC,kBAAkB;SAClC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,eAAe;IACb,cAAc,CAAC,OAAoB;QACjC,MAAM,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;QAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CACnC,wJAAwJ,EACxJ,UAAU,CACX,CAAC;QAEF,MAAM,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC,UAAW,CAAC;QACxD,MAAM,SAAS,GAAG,UAAU,CAAC,eAAe,CAC1C,YAAY,EACZ,CAAC,EACD,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,EAAE,EACF,GAAG,EAAE,GAAE,CAAC,EACR,IAAI,CACL,CAAC;QAEF,UAAU,CAAC,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAE/C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,UAAU,CAAC,OAAoB;QAC7B,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAErD,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;CACF,CAAC"}
@@ -0,0 +1,33 @@
1
+ export interface Options {
2
+ [key: string]: any;
3
+ }
4
+ export type BundleType = 0 | 1;
5
+ export type Type = string;
6
+ export type Prop = any;
7
+ export type ContextItem = any;
8
+ export type HydratableInstance = any;
9
+ export type PublicInstance = Instance | TextInstance;
10
+ export type HostContext = Context;
11
+ export type UpdatePayload = any;
12
+ export type ChildSet = any;
13
+ export type TimeoutHandle = any;
14
+ export type NoTimeout = any;
15
+ export interface Container extends Instance {
16
+ }
17
+ export interface TextInstance extends Instance {
18
+ }
19
+ export interface DeepArray<T> extends Array<T | DeepArray<T>> {
20
+ }
21
+ export type Path = string | number | DeepArray<string | number>;
22
+ export interface Props {
23
+ [key: string]: Prop;
24
+ }
25
+ export interface Instance extends Node {
26
+ }
27
+ export interface Pkg {
28
+ [key: string]: any;
29
+ }
30
+ export interface Context {
31
+ [key: string]: ContextItem;
32
+ }
33
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dom/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;AAE/B,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAE1B,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC;AAEvB,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC;AAE9B,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAErC,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,YAAY,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAEhC,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC;AAE3B,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAEhC,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC;AAE5B,MAAM,WAAW,SAAU,SAAQ,QAAQ;CAAG;AAE9C,MAAM,WAAW,YAAa,SAAQ,QAAQ;CAAG;AAEjD,MAAM,WAAW,SAAS,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;CAAG;AAEhE,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAEhE,MAAM,WAAW,KAAK;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,QAAS,SAAQ,IAAI;CAAG;AAEzC,MAAM,WAAW,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/dom/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { EmitContext } from "@typespec/compiler";
2
+ export declare const defaultCsdlFileName = "workload.csdl";
3
+ export declare function $onEmit(context: EmitContext): Promise<void>;
4
+ //# sourceMappingURL=emitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../src/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,oBAAoB,CAAC;AAG9D,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,iBAMjD"}
@@ -0,0 +1,11 @@
1
+ import { resolvePath } from "@typespec/compiler";
2
+ import { renderCsdl } from "./csdl.js";
3
+ export const defaultCsdlFileName = "workload.csdl";
4
+ export async function $onEmit(context) {
5
+ const program = context.program;
6
+ const csdl = renderCsdl(program);
7
+ await program.host.mkdirp(program.compilerOptions.outputDir);
8
+ const csdlPath = resolvePath(program.compilerOptions.outputDir, defaultCsdlFileName);
9
+ await program.host.writeFile(csdlPath, csdl);
10
+ }
11
+ //# sourceMappingURL=emitter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../src/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,OAAoB;IAChD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,SAAU,CAAC,CAAC;IAC9D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC,SAAU,EAAE,mBAAmB,CAAC,CAAC;IACtF,MAAM,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./decorators/handlers/custom/index.js";
2
+ export * from "./decorators/handlers/index.js";
3
+ export * from "./decorators/has-stream.js";
4
+ export * from "./decorators/index.js";
5
+ export * from "./emitter.js";
6
+ export * from "./linter.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./decorators/handlers/custom/index.js";
2
+ export * from "./decorators/handlers/index.js";
3
+ export * from "./decorators/has-stream.js";
4
+ export * from "./decorators/index.js";
5
+ export * from "./emitter.js";
6
+ export * from "./linter.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}