@servicenow/sdk-build-plugins 3.0.2 → 4.0.0

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 (359) hide show
  1. package/dist/acl-plugin.d.ts +19 -0
  2. package/dist/acl-plugin.js +210 -0
  3. package/dist/acl-plugin.js.map +1 -0
  4. package/dist/application-menu-plugin.d.ts +18 -0
  5. package/dist/application-menu-plugin.js +104 -0
  6. package/dist/application-menu-plugin.js.map +1 -0
  7. package/dist/arrow-function-plugin.d.ts +16 -0
  8. package/dist/arrow-function-plugin.js +107 -0
  9. package/dist/arrow-function-plugin.js.map +1 -0
  10. package/dist/atf/step-configs.d.ts +37 -0
  11. package/dist/atf/step-configs.js +2236 -0
  12. package/dist/atf/step-configs.js.map +1 -0
  13. package/dist/atf/test-plugin.d.ts +4 -0
  14. package/dist/atf/test-plugin.js +591 -0
  15. package/dist/atf/test-plugin.js.map +1 -0
  16. package/dist/basic-syntax-plugin.d.ts +2 -0
  17. package/dist/basic-syntax-plugin.js +636 -0
  18. package/dist/basic-syntax-plugin.js.map +1 -0
  19. package/dist/business-rule-plugin.d.ts +3 -0
  20. package/dist/business-rule-plugin.js +205 -0
  21. package/dist/business-rule-plugin.js.map +1 -0
  22. package/dist/call-expression-plugin.d.ts +2 -0
  23. package/dist/call-expression-plugin.js +175 -0
  24. package/dist/call-expression-plugin.js.map +1 -0
  25. package/dist/client-script-plugin.d.ts +29 -0
  26. package/dist/client-script-plugin.js +157 -0
  27. package/dist/client-script-plugin.js.map +1 -0
  28. package/dist/column/column-helper.d.ts +12 -0
  29. package/dist/column/column-helper.js +84 -0
  30. package/dist/column/column-helper.js.map +1 -0
  31. package/dist/column/column-to-record.d.ts +3 -0
  32. package/dist/column/column-to-record.js +105 -0
  33. package/dist/column/column-to-record.js.map +1 -0
  34. package/dist/column-plugin.d.ts +8 -0
  35. package/dist/column-plugin.js +453 -0
  36. package/dist/column-plugin.js.map +1 -0
  37. package/dist/cross-scope-privilege-plugin.d.ts +15 -0
  38. package/dist/cross-scope-privilege-plugin.js +82 -0
  39. package/dist/cross-scope-privilege-plugin.js.map +1 -0
  40. package/dist/html-import-plugin.d.ts +2 -0
  41. package/dist/html-import-plugin.js +72 -0
  42. package/dist/html-import-plugin.js.map +1 -0
  43. package/dist/index.d.ts +37 -21
  44. package/dist/index.js +40 -45
  45. package/dist/index.js.map +1 -1
  46. package/dist/json-plugin.d.ts +15 -0
  47. package/dist/json-plugin.js +104 -0
  48. package/dist/json-plugin.js.map +1 -0
  49. package/dist/list-plugin.d.ts +2 -0
  50. package/dist/list-plugin.js +191 -0
  51. package/dist/list-plugin.js.map +1 -0
  52. package/dist/now-config-plugin.d.ts +4 -0
  53. package/dist/now-config-plugin.js +154 -0
  54. package/dist/now-config-plugin.js.map +1 -0
  55. package/dist/now-id-plugin.d.ts +11 -0
  56. package/dist/now-id-plugin.js +71 -0
  57. package/dist/now-id-plugin.js.map +1 -0
  58. package/dist/now-include-plugin.d.ts +16 -0
  59. package/dist/now-include-plugin.js +118 -0
  60. package/dist/now-include-plugin.js.map +1 -0
  61. package/dist/now-ref-plugin.d.ts +2 -0
  62. package/dist/now-ref-plugin.js +43 -0
  63. package/dist/now-ref-plugin.js.map +1 -0
  64. package/dist/now-unresolved-plugin.d.ts +2 -0
  65. package/dist/now-unresolved-plugin.js +32 -0
  66. package/dist/now-unresolved-plugin.js.map +1 -0
  67. package/dist/package-json-plugin.d.ts +2 -0
  68. package/dist/package-json-plugin.js +70 -0
  69. package/dist/package-json-plugin.js.map +1 -0
  70. package/dist/property-plugin.d.ts +2 -0
  71. package/dist/property-plugin.js +105 -0
  72. package/dist/property-plugin.js.map +1 -0
  73. package/dist/record-plugin.d.ts +43 -0
  74. package/dist/record-plugin.js +147 -0
  75. package/dist/record-plugin.js.map +1 -0
  76. package/dist/repack/index.d.ts +1 -0
  77. package/dist/repack/index.js +10 -2
  78. package/dist/repack/index.js.map +1 -1
  79. package/dist/repack/lint/Rules.d.ts +1 -1
  80. package/dist/repack/lint/Rules.js +7 -3
  81. package/dist/repack/lint/Rules.js.map +1 -1
  82. package/dist/repack/lint/index.js +1 -1
  83. package/dist/rest-api-plugin.d.ts +2 -0
  84. package/dist/rest-api-plugin.js +469 -0
  85. package/dist/rest-api-plugin.js.map +1 -0
  86. package/dist/role-plugin.d.ts +2 -0
  87. package/dist/role-plugin.js +117 -0
  88. package/dist/role-plugin.js.map +1 -0
  89. package/dist/script-action-plugin.d.ts +2 -0
  90. package/dist/script-action-plugin.js +62 -0
  91. package/dist/script-action-plugin.js.map +1 -0
  92. package/dist/script-include-plugin.d.ts +2 -0
  93. package/dist/script-include-plugin.js +102 -0
  94. package/dist/script-include-plugin.js.map +1 -0
  95. package/dist/server-module-plugin/index.d.ts +14 -0
  96. package/dist/server-module-plugin/index.js +378 -0
  97. package/dist/server-module-plugin/index.js.map +1 -0
  98. package/dist/server-module-plugin/sbom-builder.d.ts +45 -0
  99. package/dist/server-module-plugin/sbom-builder.js +179 -0
  100. package/dist/server-module-plugin/sbom-builder.js.map +1 -0
  101. package/dist/service-portal/angular-provider-plugin.d.ts +2 -0
  102. package/dist/service-portal/angular-provider-plugin.js +78 -0
  103. package/dist/service-portal/angular-provider-plugin.js.map +1 -0
  104. package/dist/service-portal/dependency-plugin.d.ts +2 -0
  105. package/dist/service-portal/dependency-plugin.js +235 -0
  106. package/dist/service-portal/dependency-plugin.js.map +1 -0
  107. package/dist/service-portal/widget-plugin.d.ts +6 -0
  108. package/dist/service-portal/widget-plugin.js +230 -0
  109. package/dist/service-portal/widget-plugin.js.map +1 -0
  110. package/dist/static-content-plugin.d.ts +2 -0
  111. package/dist/static-content-plugin.js +272 -0
  112. package/dist/static-content-plugin.js.map +1 -0
  113. package/dist/table-plugin.d.ts +3 -0
  114. package/dist/table-plugin.js +1324 -0
  115. package/dist/table-plugin.js.map +1 -0
  116. package/dist/ui-action-plugin.d.ts +2 -0
  117. package/dist/ui-action-plugin.js +291 -0
  118. package/dist/ui-action-plugin.js.map +1 -0
  119. package/dist/ui-page-plugin.d.ts +2 -0
  120. package/dist/ui-page-plugin.js +165 -0
  121. package/dist/ui-page-plugin.js.map +1 -0
  122. package/dist/user-preference-plugin.d.ts +15 -0
  123. package/dist/user-preference-plugin.js +63 -0
  124. package/dist/user-preference-plugin.js.map +1 -0
  125. package/dist/utils.d.ts +17 -0
  126. package/dist/utils.js +72 -0
  127. package/dist/utils.js.map +1 -0
  128. package/dist/view-plugin.d.ts +2 -0
  129. package/dist/view-plugin.js +45 -0
  130. package/dist/view-plugin.js.map +1 -0
  131. package/package.json +17 -13
  132. package/src/acl-plugin.ts +256 -0
  133. package/src/application-menu-plugin.ts +109 -0
  134. package/src/arrow-function-plugin.ts +127 -0
  135. package/src/atf/step-configs.ts +2284 -0
  136. package/src/atf/test-plugin.ts +728 -0
  137. package/src/basic-syntax-plugin.ts +729 -0
  138. package/src/business-rule-plugin.ts +266 -0
  139. package/src/call-expression-plugin.ts +202 -0
  140. package/src/client-script-plugin.ts +170 -0
  141. package/src/column/column-helper.ts +119 -0
  142. package/src/column/column-to-record.ts +131 -0
  143. package/src/column-plugin.ts +506 -0
  144. package/src/cross-scope-privilege-plugin.ts +82 -0
  145. package/src/html-import-plugin.ts +79 -0
  146. package/src/index.ts +39 -21
  147. package/src/json-plugin.ts +128 -0
  148. package/src/list-plugin.ts +222 -0
  149. package/src/now-config-plugin.ts +194 -0
  150. package/src/now-id-plugin.ts +78 -0
  151. package/src/now-include-plugin.ts +140 -0
  152. package/src/now-ref-plugin.ts +48 -0
  153. package/src/now-unresolved-plugin.ts +30 -0
  154. package/src/package-json-plugin.ts +87 -0
  155. package/src/property-plugin.ts +118 -0
  156. package/src/record-plugin.ts +171 -0
  157. package/src/repack/index.ts +10 -1
  158. package/src/repack/lint/Rules.ts +5 -4
  159. package/src/repack/lint/index.ts +1 -1
  160. package/src/rest-api-plugin.ts +651 -0
  161. package/src/role-plugin.ts +128 -0
  162. package/src/script-action-plugin.ts +63 -0
  163. package/src/script-include-plugin.ts +110 -0
  164. package/src/server-module-plugin/index.ts +470 -0
  165. package/src/server-module-plugin/sbom-builder.ts +183 -0
  166. package/src/service-portal/angular-provider-plugin.ts +83 -0
  167. package/src/service-portal/dependency-plugin.ts +284 -0
  168. package/src/service-portal/widget-plugin.ts +263 -0
  169. package/src/static-content-plugin.ts +254 -0
  170. package/src/table-plugin.ts +1698 -0
  171. package/src/ui-action-plugin.ts +324 -0
  172. package/src/ui-page-plugin.ts +168 -0
  173. package/src/user-preference-plugin.ts +62 -0
  174. package/src/utils.ts +69 -0
  175. package/src/view-plugin.ts +46 -0
  176. package/dist/AttachmentPlugin.d.ts +0 -254
  177. package/dist/AttachmentPlugin.js +0 -220
  178. package/dist/AttachmentPlugin.js.map +0 -1
  179. package/dist/BusinessRulePlugin.d.ts +0 -30
  180. package/dist/BusinessRulePlugin.js +0 -149
  181. package/dist/BusinessRulePlugin.js.map +0 -1
  182. package/dist/CrossScopePrivilegePlugin.d.ts +0 -35
  183. package/dist/CrossScopePrivilegePlugin.js +0 -80
  184. package/dist/CrossScopePrivilegePlugin.js.map +0 -1
  185. package/dist/DefaultPlugin.d.ts +0 -86
  186. package/dist/DefaultPlugin.js +0 -226
  187. package/dist/DefaultPlugin.js.map +0 -1
  188. package/dist/HtmlTemplatePlugin.d.ts +0 -21
  189. package/dist/HtmlTemplatePlugin.js +0 -29
  190. package/dist/HtmlTemplatePlugin.js.map +0 -1
  191. package/dist/IdPlugin.d.ts +0 -28
  192. package/dist/IdPlugin.js +0 -68
  193. package/dist/IdPlugin.js.map +0 -1
  194. package/dist/IncludePlugin.d.ts +0 -34
  195. package/dist/IncludePlugin.js +0 -155
  196. package/dist/IncludePlugin.js.map +0 -1
  197. package/dist/JsonPlugin.d.ts +0 -28
  198. package/dist/JsonPlugin.js +0 -69
  199. package/dist/JsonPlugin.js.map +0 -1
  200. package/dist/ListPlugin.d.ts +0 -93
  201. package/dist/ListPlugin.js +0 -456
  202. package/dist/ListPlugin.js.map +0 -1
  203. package/dist/NowConfigPlugin.d.ts +0 -45
  204. package/dist/NowConfigPlugin.js +0 -64
  205. package/dist/NowConfigPlugin.js.map +0 -1
  206. package/dist/PackageJsonPlugin.d.ts +0 -34
  207. package/dist/PackageJsonPlugin.js +0 -63
  208. package/dist/PackageJsonPlugin.js.map +0 -1
  209. package/dist/PropertyPlugin.d.ts +0 -51
  210. package/dist/PropertyPlugin.js +0 -181
  211. package/dist/PropertyPlugin.js.map +0 -1
  212. package/dist/ScriptTemplatePlugin.d.ts +0 -13
  213. package/dist/ScriptTemplatePlugin.js +0 -55
  214. package/dist/ScriptTemplatePlugin.js.map +0 -1
  215. package/dist/ServerModulePlugin.d.ts +0 -75
  216. package/dist/ServerModulePlugin.js +0 -368
  217. package/dist/ServerModulePlugin.js.map +0 -1
  218. package/dist/UserPreferencePlugin.d.ts +0 -19
  219. package/dist/UserPreferencePlugin.js +0 -32
  220. package/dist/UserPreferencePlugin.js.map +0 -1
  221. package/dist/aclAndRole/AclPlugin.d.ts +0 -82
  222. package/dist/aclAndRole/AclPlugin.js +0 -262
  223. package/dist/aclAndRole/AclPlugin.js.map +0 -1
  224. package/dist/aclAndRole/RolePlugin.d.ts +0 -66
  225. package/dist/aclAndRole/RolePlugin.js +0 -179
  226. package/dist/aclAndRole/RolePlugin.js.map +0 -1
  227. package/dist/aclAndRole/Util.d.ts +0 -3
  228. package/dist/aclAndRole/Util.js +0 -90
  229. package/dist/aclAndRole/Util.js.map +0 -1
  230. package/dist/app/ApplicationMenuPlugin.d.ts +0 -34
  231. package/dist/app/ApplicationMenuPlugin.js +0 -112
  232. package/dist/app/ApplicationMenuPlugin.js.map +0 -1
  233. package/dist/db/ColumnPlugins.d.ts +0 -750
  234. package/dist/db/ColumnPlugins.js +0 -114
  235. package/dist/db/ColumnPlugins.js.map +0 -1
  236. package/dist/db/DBUtils.d.ts +0 -2
  237. package/dist/db/DBUtils.js +0 -27
  238. package/dist/db/DBUtils.js.map +0 -1
  239. package/dist/db/DocumentationPlugin.d.ts +0 -67
  240. package/dist/db/DocumentationPlugin.js +0 -258
  241. package/dist/db/DocumentationPlugin.js.map +0 -1
  242. package/dist/db/LicensingPlugin.d.ts +0 -60
  243. package/dist/db/LicensingPlugin.js +0 -117
  244. package/dist/db/LicensingPlugin.js.map +0 -1
  245. package/dist/db/RecordPlugin.d.ts +0 -133
  246. package/dist/db/RecordPlugin.js +0 -337
  247. package/dist/db/RecordPlugin.js.map +0 -1
  248. package/dist/db/TablePlugin.d.ts +0 -231
  249. package/dist/db/TablePlugin.js +0 -1628
  250. package/dist/db/TablePlugin.js.map +0 -1
  251. package/dist/db/index.d.ts +0 -6
  252. package/dist/db/index.js +0 -32
  253. package/dist/db/index.js.map +0 -1
  254. package/dist/scriptedRESTAPI/RESTDeserializationUtils.d.ts +0 -10
  255. package/dist/scriptedRESTAPI/RESTDeserializationUtils.js +0 -373
  256. package/dist/scriptedRESTAPI/RESTDeserializationUtils.js.map +0 -1
  257. package/dist/scriptedRESTAPI/RESTSerializationUtils.d.ts +0 -13
  258. package/dist/scriptedRESTAPI/RESTSerializationUtils.js +0 -177
  259. package/dist/scriptedRESTAPI/RESTSerializationUtils.js.map +0 -1
  260. package/dist/scriptedRESTAPI/RestApiPlugin.d.ts +0 -81
  261. package/dist/scriptedRESTAPI/RestApiPlugin.js +0 -345
  262. package/dist/scriptedRESTAPI/RestApiPlugin.js.map +0 -1
  263. package/dist/scriptedRESTAPI/RestSchemaUtils.d.ts +0 -190
  264. package/dist/scriptedRESTAPI/RestSchemaUtils.js +0 -53
  265. package/dist/scriptedRESTAPI/RestSchemaUtils.js.map +0 -1
  266. package/dist/scriptedRESTAPI/RestUtils.d.ts +0 -69
  267. package/dist/scriptedRESTAPI/RestUtils.js +0 -497
  268. package/dist/scriptedRESTAPI/RestUtils.js.map +0 -1
  269. package/dist/scripts/ClientScriptPlugin.d.ts +0 -64
  270. package/dist/scripts/ClientScriptPlugin.js +0 -170
  271. package/dist/scripts/ClientScriptPlugin.js.map +0 -1
  272. package/dist/scripts/scriptUtils.d.ts +0 -1
  273. package/dist/scripts/scriptUtils.js +0 -9
  274. package/dist/scripts/scriptUtils.js.map +0 -1
  275. package/dist/uxf/ExperiencePlugin.d.ts +0 -45
  276. package/dist/uxf/ExperiencePlugin.js +0 -61
  277. package/dist/uxf/ExperiencePlugin.js.map +0 -1
  278. package/dist/uxf/RoutesPlugin.d.ts +0 -29
  279. package/dist/uxf/RoutesPlugin.js +0 -181
  280. package/dist/uxf/RoutesPlugin.js.map +0 -1
  281. package/dist/uxf/UxfFormulaParser/cleanUxValue.d.ts +0 -4
  282. package/dist/uxf/UxfFormulaParser/cleanUxValue.js +0 -65
  283. package/dist/uxf/UxfFormulaParser/cleanUxValue.js.map +0 -1
  284. package/dist/uxf/UxfFormulaParser/grammerParser/api.d.ts +0 -189
  285. package/dist/uxf/UxfFormulaParser/grammerParser/api.js +0 -158
  286. package/dist/uxf/UxfFormulaParser/grammerParser/api.js.map +0 -1
  287. package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.d.ts +0 -13
  288. package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js +0 -604
  289. package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js.map +0 -1
  290. package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.d.ts +0 -12
  291. package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.js +0 -551
  292. package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.js.map +0 -1
  293. package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.d.ts +0 -31
  294. package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.js +0 -64
  295. package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.js.map +0 -1
  296. package/dist/uxf/UxfFormulaParser/index.d.ts +0 -3
  297. package/dist/uxf/UxfFormulaParser/index.js +0 -11
  298. package/dist/uxf/UxfFormulaParser/index.js.map +0 -1
  299. package/dist/uxf/UxfFormulaParser/parser.d.ts +0 -8
  300. package/dist/uxf/UxfFormulaParser/parser.js +0 -87
  301. package/dist/uxf/UxfFormulaParser/parser.js.map +0 -1
  302. package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.d.ts +0 -8
  303. package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.js +0 -17
  304. package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.js.map +0 -1
  305. package/dist/uxf/constants.d.ts +0 -2
  306. package/dist/uxf/constants.js +0 -8
  307. package/dist/uxf/constants.js.map +0 -1
  308. package/dist/uxf/index.d.ts +0 -2
  309. package/dist/uxf/index.js +0 -11
  310. package/dist/uxf/index.js.map +0 -1
  311. package/dist/uxf/tectonicIdGenerator.d.ts +0 -12
  312. package/dist/uxf/tectonicIdGenerator.js +0 -79
  313. package/dist/uxf/tectonicIdGenerator.js.map +0 -1
  314. package/src/AttachmentPlugin.ts +0 -268
  315. package/src/BusinessRulePlugin.ts +0 -238
  316. package/src/CrossScopePrivilegePlugin.ts +0 -115
  317. package/src/DefaultPlugin.ts +0 -288
  318. package/src/HtmlTemplatePlugin.ts +0 -31
  319. package/src/IdPlugin.ts +0 -74
  320. package/src/IncludePlugin.ts +0 -206
  321. package/src/JsonPlugin.ts +0 -76
  322. package/src/ListPlugin.ts +0 -570
  323. package/src/NowConfigPlugin.ts +0 -69
  324. package/src/PackageJsonPlugin.ts +0 -68
  325. package/src/PropertyPlugin.ts +0 -237
  326. package/src/ScriptTemplatePlugin.ts +0 -53
  327. package/src/ServerModulePlugin.ts +0 -480
  328. package/src/UserPreferencePlugin.ts +0 -45
  329. package/src/aclAndRole/AclPlugin.ts +0 -420
  330. package/src/aclAndRole/RolePlugin.ts +0 -254
  331. package/src/aclAndRole/Util.ts +0 -113
  332. package/src/app/ApplicationMenuPlugin.ts +0 -165
  333. package/src/db/ColumnPlugins.ts +0 -114
  334. package/src/db/DBUtils.ts +0 -36
  335. package/src/db/DocumentationPlugin.ts +0 -316
  336. package/src/db/LicensingPlugin.ts +0 -138
  337. package/src/db/RecordPlugin.ts +0 -459
  338. package/src/db/TablePlugin.ts +0 -2070
  339. package/src/db/index.ts +0 -6
  340. package/src/scriptedRESTAPI/RESTDeserializationUtils.ts +0 -419
  341. package/src/scriptedRESTAPI/RESTSerializationUtils.ts +0 -228
  342. package/src/scriptedRESTAPI/RestApiPlugin.ts +0 -469
  343. package/src/scriptedRESTAPI/RestSchemaUtils.ts +0 -72
  344. package/src/scriptedRESTAPI/RestUtils.ts +0 -569
  345. package/src/scripts/ClientScriptPlugin.ts +0 -257
  346. package/src/scripts/scriptUtils.ts +0 -5
  347. package/src/uxf/ExperiencePlugin.ts +0 -67
  348. package/src/uxf/RoutesPlugin.ts +0 -211
  349. package/src/uxf/UxfFormulaParser/cleanUxValue.ts +0 -73
  350. package/src/uxf/UxfFormulaParser/grammerParser/api.js +0 -166
  351. package/src/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js +0 -606
  352. package/src/uxf/UxfFormulaParser/grammerParser/grammarParser.js +0 -551
  353. package/src/uxf/UxfFormulaParser/grammerParser/spanHelpers.js +0 -65
  354. package/src/uxf/UxfFormulaParser/index.ts +0 -4
  355. package/src/uxf/UxfFormulaParser/parser.ts +0 -64
  356. package/src/uxf/UxfFormulaParser/utils/getErrorMsg.ts +0 -13
  357. package/src/uxf/constants.ts +0 -4
  358. package/src/uxf/index.ts +0 -2
  359. package/src/uxf/tectonicIdGenerator.ts +0 -78
@@ -1,189 +0,0 @@
1
- export namespace api {
2
- function binding(bindingType: any, address: any, token: any, category?: null): {
3
- type: any;
4
- binding: {
5
- address: any;
6
- category: never;
7
- };
8
- _span: {
9
- start: {
10
- line: any;
11
- col: any;
12
- };
13
- end: {
14
- line: any;
15
- col: any;
16
- };
17
- };
18
- } | {
19
- type: any;
20
- binding: {
21
- address: any;
22
- category?: never;
23
- };
24
- _span: {
25
- start: {
26
- line: any;
27
- col: any;
28
- };
29
- end: {
30
- line: any;
31
- col: any;
32
- };
33
- };
34
- };
35
- function unknownBinding(context: any, path: any, token: any): {
36
- type: any;
37
- binding: {
38
- category: any;
39
- address: any[];
40
- };
41
- _span: {
42
- start: {
43
- line: any;
44
- col: any;
45
- };
46
- end: {
47
- line: any;
48
- col: any;
49
- };
50
- };
51
- };
52
- function completeParse(uxValue: any): {
53
- uxValue: any;
54
- errors: never[];
55
- };
56
- function translationLiteral(operands: any, functionToken: any, endToken: any): {
57
- type: string;
58
- value: {
59
- message: any;
60
- comment: string;
61
- };
62
- _span: {
63
- start: {
64
- line: any;
65
- col: any;
66
- };
67
- end: {
68
- line: any;
69
- col: any;
70
- };
71
- };
72
- };
73
- function binaryOperator(operator: any, left: any, right: any): {
74
- type: string;
75
- operation: {
76
- operator: any;
77
- left: any;
78
- right: any;
79
- };
80
- _span: {
81
- start: any;
82
- end: any;
83
- };
84
- };
85
- function unaryOperator(operator: any, operand: any, startToken: any): {
86
- type: string;
87
- operation: {
88
- operator: any;
89
- operand: any;
90
- };
91
- _span: {
92
- start: {
93
- line: any;
94
- col: any;
95
- };
96
- end: any;
97
- };
98
- };
99
- function listContainer(items: any, startToken: any, endToken: any): {
100
- type: string;
101
- container: any;
102
- _span: {
103
- start: {
104
- line: any;
105
- col: any;
106
- };
107
- end: {
108
- line: any;
109
- col: any;
110
- };
111
- } | null;
112
- };
113
- function mapContainer(params: any, startToken: any, endToken: any): {
114
- type: string;
115
- container: {};
116
- _span: {
117
- start: {
118
- line: any;
119
- col: any;
120
- };
121
- end: {
122
- line: any;
123
- col: any;
124
- };
125
- };
126
- };
127
- function transformFunc(functionToken: any, operands: any, endToken: any): {
128
- type: string;
129
- value: {
130
- message: any;
131
- comment: string;
132
- };
133
- _span: {
134
- start: {
135
- line: any;
136
- col: any;
137
- };
138
- end: {
139
- line: any;
140
- col: any;
141
- };
142
- };
143
- } | {
144
- type: any;
145
- transform: {
146
- operator: string;
147
- operands: any;
148
- };
149
- _span: {
150
- start: {
151
- line: any;
152
- col: any;
153
- };
154
- end: {
155
- line: any;
156
- col: any;
157
- };
158
- };
159
- };
160
- function literal(literalToken: any): {
161
- type: string;
162
- value: any;
163
- _span: {
164
- start: {
165
- line: any;
166
- col: any;
167
- };
168
- end: {
169
- line: any;
170
- col: any;
171
- };
172
- };
173
- };
174
- function boolean(token: any): {
175
- type: string;
176
- value: any;
177
- _span: {
178
- start: {
179
- line: any;
180
- col: any;
181
- };
182
- end: {
183
- line: any;
184
- col: any;
185
- };
186
- };
187
- };
188
- }
189
- export function setContextMetadata(cm: any): void;
@@ -1,158 +0,0 @@
1
- "use strict";
2
- // Copied from sn-uxf-formula-parser-library - https://code.devsnc.com/dev/uxf-formula-parser
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.setContextMetadata = exports.api = void 0;
8
- /**
9
- * https://code.devsnc.com/dev/uxf-formula-parser/blob/ci/master/src/uxf-formula-parser/grammar-parser/api.js
10
- */
11
- const spanHelpers_1 = require("./spanHelpers");
12
- const getErrorMsg_1 = require("../utils/getErrorMsg");
13
- const clientTransformMap_1 = __importDefault(require("./clientTransformMap"));
14
- let contextMetadata = null;
15
- const setContextMetadata = (cm) => {
16
- contextMetadata = cm;
17
- };
18
- exports.setContextMetadata = setContextMetadata;
19
- const api = {
20
- binding: (bindingType, address, token, category = null) => {
21
- if (category) {
22
- return {
23
- type: bindingType,
24
- binding: {
25
- address,
26
- category,
27
- },
28
- _span: (0, spanHelpers_1.getBindingSpan)(token, address),
29
- };
30
- }
31
- else {
32
- return {
33
- type: bindingType,
34
- binding: {
35
- address,
36
- },
37
- _span: (0, spanHelpers_1.getBindingSpan)(token, address),
38
- };
39
- }
40
- },
41
- unknownBinding: (context, path, token) => {
42
- // Compare
43
- const metadata = contextMetadata?.find((cm) => cm.bindingLabel === context);
44
- if (!metadata) {
45
- throw new Error(`Unknown binding type '${context}'`);
46
- }
47
- const address = [...(metadata.source.binding.address ?? []), ...path];
48
- return {
49
- type: metadata.source.type,
50
- binding: {
51
- category: metadata.source.binding.category,
52
- address,
53
- },
54
- _span: (0, spanHelpers_1.getBindingSpan)(token, address),
55
- };
56
- },
57
- completeParse: function (uxValue) {
58
- const returnVal = {
59
- uxValue,
60
- errors: [],
61
- };
62
- return returnVal;
63
- },
64
- translationLiteral: function (operands, functionToken, endToken) {
65
- return {
66
- type: 'TRANSLATION_LITERAL',
67
- value: {
68
- message: operands.container[0].value,
69
- comment: '',
70
- },
71
- _span: (0, spanHelpers_1.tokenSpan)(functionToken, endToken),
72
- };
73
- },
74
- binaryOperator: function (operator, left, right) {
75
- return {
76
- type: 'BINARY',
77
- operation: {
78
- operator,
79
- left,
80
- right,
81
- },
82
- _span: (0, spanHelpers_1.getBinarySpan)(left, right),
83
- };
84
- },
85
- unaryOperator: (operator, operand, startToken) => {
86
- return {
87
- type: 'UNARY',
88
- operation: {
89
- operator,
90
- operand,
91
- },
92
- _span: (0, spanHelpers_1.getUnarySpan)(startToken, operand),
93
- };
94
- },
95
- listContainer: (items, startToken, endToken) => {
96
- return {
97
- type: 'LIST_CONTAINER',
98
- container: items,
99
- _span: startToken ? (0, spanHelpers_1.tokenSpan)(startToken, endToken) : null,
100
- };
101
- },
102
- mapContainer: (params, startToken, endToken) => {
103
- // TODO: Error handling for duplicate keys?
104
- const mapContainer = {};
105
- params.forEach((param) => (mapContainer[param.name] = param.value));
106
- return {
107
- type: 'MAP_CONTAINER',
108
- container: mapContainer,
109
- _span: (0, spanHelpers_1.tokenSpan)(startToken, endToken),
110
- };
111
- },
112
- transformFunc: function (functionToken, operands, endToken) {
113
- const funcName = functionToken.value;
114
- if (funcName === 'TRANSLATE') {
115
- if (operands.container.length !== 1) {
116
- throw (0, getErrorMsg_1.getErrorMsg)(`Error: TRANSLATE expects exactly 1 argument; given ${operands.container.length}.`, (0, spanHelpers_1.tokenSpan)(functionToken, endToken));
117
- }
118
- else if (operands.container[0].type !== 'JSON_LITERAL') {
119
- throw (0, getErrorMsg_1.getErrorMsg)('Error: TRANSLATE expects a string to be passed in.', (0, spanHelpers_1.tokenSpan)(functionToken, endToken));
120
- }
121
- else {
122
- return this.translationLiteral(operands, functionToken, endToken);
123
- }
124
- }
125
- const mappedFunctionDef = clientTransformMap_1.default[funcName];
126
- if (!mappedFunctionDef) {
127
- throw (0, getErrorMsg_1.getErrorMsg)(`Error: ${funcName} is not a supported function.`, (0, spanHelpers_1.tokenSpan)(functionToken, endToken));
128
- }
129
- return {
130
- type: mappedFunctionDef.type || 'CLIENT_TRANSFORM',
131
- transform: {
132
- operator: mappedFunctionDef.name,
133
- operands,
134
- },
135
- _span: (0, spanHelpers_1.tokenSpan)(functionToken, endToken),
136
- };
137
- },
138
- literal: function (literalToken) {
139
- const val = literalToken.value;
140
- const _span = (0, spanHelpers_1.tokenSpan)(literalToken);
141
- return {
142
- type: 'JSON_LITERAL',
143
- value: val,
144
- _span,
145
- };
146
- },
147
- boolean: function (token) {
148
- const val = JSON.parse(token.value);
149
- const _span = (0, spanHelpers_1.tokenSpan)(token);
150
- return {
151
- type: 'JSON_LITERAL',
152
- value: val,
153
- _span,
154
- };
155
- },
156
- };
157
- exports.api = api;
158
- //# sourceMappingURL=api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/uxf/UxfFormulaParser/grammerParser/api.js"],"names":[],"mappings":";AAAA,6FAA6F;;;;;;AAE7F;;GAEG;AAEH,+CAAsF;AACtF,sDAAkD;AAClD,8EAAuD;AAEvD,IAAI,eAAe,GAAG,IAAI,CAAA;AAE1B,MAAM,kBAAkB,GAAG,CAAC,EAAE,EAAE,EAAE;IAC9B,eAAe,GAAG,EAAE,CAAA;AACxB,CAAC,CAAA;AAuJa,gDAAkB;AArJhC,MAAM,GAAG,GAAG;IACR,OAAO,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,EAAE;QACtD,IAAI,QAAQ,EAAE,CAAC;YACX,O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Aa,EAAE,QAAQ,CAAC;SAC5C,CAAA;IACL,CAAC;IAED,OAAO,EAAE,UAAU,YAAY;QAC3B,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,CAAA;QAC9B,MAAM,KAAK,GAAG,IAAA,uBAAS,EAAC,YAAY,CAAC,CAAA;QAErC,OAAO;YACH,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,GAAG;YACV,KAAK;SACR,CAAA;IACL,CAAC;IAED,OAAO,EAAE,UAAU,KAAK;QACpB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACnC,MAAM,KAAK,GAAG,IAAA,uBAAS,EAAC,KAAK,CAAC,CAAA;QAE9B,OAAO;YACH,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,GAAG;YACV,KAAK;SACR,CAAA;IACL,CAAC;CACJ,CAAA;AAEQ,kBAAG"}
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- [x: string]: ClientTransformDefinition;
3
- };
4
- export default _default;
5
- export type ClientTransformDefinition = {
6
- name: string;
7
- Type: string;
8
- argCount: number;
9
- documentation: string;
10
- args: Array<string>;
11
- insertText: string;
12
- returnType: string | Function;
13
- };