@servicenow/sdk-build-plugins 4.4.1 → 4.6.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 (337) hide show
  1. package/dist/acl-plugin.js +54 -4
  2. package/dist/acl-plugin.js.map +1 -1
  3. package/dist/applicability-plugin.js +2 -0
  4. package/dist/applicability-plugin.js.map +1 -1
  5. package/dist/application-menu-plugin.js +2 -0
  6. package/dist/application-menu-plugin.js.map +1 -1
  7. package/dist/arrow-function-plugin.d.ts +6 -1
  8. package/dist/arrow-function-plugin.js +105 -12
  9. package/dist/arrow-function-plugin.js.map +1 -1
  10. package/dist/atf/test-plugin.js +2 -0
  11. package/dist/atf/test-plugin.js.map +1 -1
  12. package/dist/basic-syntax-plugin.js +20 -0
  13. package/dist/basic-syntax-plugin.js.map +1 -1
  14. package/dist/call-expression-plugin.js +1 -0
  15. package/dist/call-expression-plugin.js.map +1 -1
  16. package/dist/claims-plugin.js +1 -0
  17. package/dist/claims-plugin.js.map +1 -1
  18. package/dist/client-script-plugin.js +1 -0
  19. package/dist/client-script-plugin.js.map +1 -1
  20. package/dist/column-plugin.js +4 -7
  21. package/dist/column-plugin.js.map +1 -1
  22. package/dist/cross-scope-privilege-plugin.js +1 -0
  23. package/dist/cross-scope-privilege-plugin.js.map +1 -1
  24. package/dist/dashboard/dashboard-plugin.js +2 -0
  25. package/dist/dashboard/dashboard-plugin.js.map +1 -1
  26. package/dist/data-plugin.js +1 -0
  27. package/dist/data-plugin.js.map +1 -1
  28. package/dist/email-notification-plugin.js +9 -13
  29. package/dist/email-notification-plugin.js.map +1 -1
  30. package/dist/flow/constants/flow-plugin-constants.d.ts +1 -1
  31. package/dist/flow/constants/flow-plugin-constants.js +1 -1
  32. package/dist/flow/constants/flow-plugin-constants.js.map +1 -1
  33. package/dist/flow/flow-logic/flow-logic-diagnostics.js +5 -5
  34. package/dist/flow/flow-logic/flow-logic-diagnostics.js.map +1 -1
  35. package/dist/flow/flow-logic/flow-logic-plugin-helpers.d.ts +82 -2
  36. package/dist/flow/flow-logic/flow-logic-plugin-helpers.js +48 -40
  37. package/dist/flow/flow-logic/flow-logic-plugin-helpers.js.map +1 -1
  38. package/dist/flow/flow-logic/flow-logic-plugin.js +1 -0
  39. package/dist/flow/flow-logic/flow-logic-plugin.js.map +1 -1
  40. package/dist/flow/plugins/approval-rules-plugin.js +1 -0
  41. package/dist/flow/plugins/approval-rules-plugin.js.map +1 -1
  42. package/dist/flow/plugins/flow-action-definition-plugin.js +1232 -55
  43. package/dist/flow/plugins/flow-action-definition-plugin.js.map +1 -1
  44. package/dist/flow/plugins/flow-data-pill-plugin.js +6 -2
  45. package/dist/flow/plugins/flow-data-pill-plugin.js.map +1 -1
  46. package/dist/flow/plugins/flow-definition-plugin.js +23 -44
  47. package/dist/flow/plugins/flow-definition-plugin.js.map +1 -1
  48. package/dist/flow/plugins/flow-diagnostics-plugin.d.ts +2 -2
  49. package/dist/flow/plugins/flow-diagnostics-plugin.js +3 -2
  50. package/dist/flow/plugins/flow-diagnostics-plugin.js.map +1 -1
  51. package/dist/flow/plugins/flow-instance-plugin.js +136 -34
  52. package/dist/flow/plugins/flow-instance-plugin.js.map +1 -1
  53. package/dist/flow/plugins/flow-trigger-instance-plugin.js +1 -0
  54. package/dist/flow/plugins/flow-trigger-instance-plugin.js.map +1 -1
  55. package/dist/flow/plugins/inline-script-plugin.js +1 -0
  56. package/dist/flow/plugins/inline-script-plugin.js.map +1 -1
  57. package/dist/flow/plugins/step-definition-plugin.js +4 -2
  58. package/dist/flow/plugins/step-definition-plugin.js.map +1 -1
  59. package/dist/flow/plugins/step-instance-plugin.d.ts +9 -1
  60. package/dist/flow/plugins/step-instance-plugin.js +649 -135
  61. package/dist/flow/plugins/step-instance-plugin.js.map +1 -1
  62. package/dist/flow/plugins/trigger-plugin.js +2 -0
  63. package/dist/flow/plugins/trigger-plugin.js.map +1 -1
  64. package/dist/flow/plugins/wfa-datapill-plugin.js +21 -5
  65. package/dist/flow/plugins/wfa-datapill-plugin.js.map +1 -1
  66. package/dist/flow/post-install.d.ts +2 -0
  67. package/dist/flow/post-install.js +59 -0
  68. package/dist/flow/post-install.js.map +1 -0
  69. package/dist/flow/utils/complex-object-resolver.js +4 -1
  70. package/dist/flow/utils/complex-object-resolver.js.map +1 -1
  71. package/dist/flow/utils/complex-objects.js +5 -3
  72. package/dist/flow/utils/complex-objects.js.map +1 -1
  73. package/dist/flow/utils/flow-constants.d.ts +90 -2
  74. package/dist/flow/utils/flow-constants.js +430 -7
  75. package/dist/flow/utils/flow-constants.js.map +1 -1
  76. package/dist/flow/utils/flow-io-to-record.d.ts +1 -1
  77. package/dist/flow/utils/flow-io-to-record.js +37 -16
  78. package/dist/flow/utils/flow-io-to-record.js.map +1 -1
  79. package/dist/flow/utils/flow-shapes.js +4 -0
  80. package/dist/flow/utils/flow-shapes.js.map +1 -1
  81. package/dist/flow/utils/flow-to-xml.d.ts +3 -2
  82. package/dist/flow/utils/flow-to-xml.js +3 -4
  83. package/dist/flow/utils/flow-to-xml.js.map +1 -1
  84. package/dist/flow/utils/label-cache-parser.d.ts +9 -2
  85. package/dist/flow/utils/label-cache-parser.js +32 -4
  86. package/dist/flow/utils/label-cache-parser.js.map +1 -1
  87. package/dist/flow/utils/label-cache-processor.d.ts +5 -0
  88. package/dist/flow/utils/label-cache-processor.js +14 -2
  89. package/dist/flow/utils/label-cache-processor.js.map +1 -1
  90. package/dist/flow/utils/pill-shape-helpers.d.ts +15 -0
  91. package/dist/flow/utils/pill-shape-helpers.js +35 -0
  92. package/dist/flow/utils/pill-shape-helpers.js.map +1 -0
  93. package/dist/flow/utils/pill-string-parser.js +1 -0
  94. package/dist/flow/utils/pill-string-parser.js.map +1 -1
  95. package/dist/flow/utils/schema-to-flow-object.d.ts +6 -1
  96. package/dist/flow/utils/schema-to-flow-object.js +131 -15
  97. package/dist/flow/utils/schema-to-flow-object.js.map +1 -1
  98. package/dist/flow/utils/service-catalog.js +5 -1
  99. package/dist/flow/utils/service-catalog.js.map +1 -1
  100. package/dist/flow/utils/utils.d.ts +1 -0
  101. package/dist/flow/utils/utils.js +6 -1
  102. package/dist/flow/utils/utils.js.map +1 -1
  103. package/dist/form-plugin.d.ts +2 -0
  104. package/dist/form-plugin.js +1132 -0
  105. package/dist/form-plugin.js.map +1 -0
  106. package/dist/html-import-plugin.js +1 -0
  107. package/dist/html-import-plugin.js.map +1 -1
  108. package/dist/import-sets-plugin.js +2 -0
  109. package/dist/import-sets-plugin.js.map +1 -1
  110. package/dist/inbound-email-action-plugin.d.ts +10 -0
  111. package/dist/inbound-email-action-plugin.js +128 -0
  112. package/dist/inbound-email-action-plugin.js.map +1 -0
  113. package/dist/index.d.ts +13 -0
  114. package/dist/index.js +17 -1
  115. package/dist/index.js.map +1 -1
  116. package/dist/instance-scan-plugin.d.ts +2 -0
  117. package/dist/instance-scan-plugin.js +293 -0
  118. package/dist/instance-scan-plugin.js.map +1 -0
  119. package/dist/json-plugin.js +1 -0
  120. package/dist/json-plugin.js.map +1 -1
  121. package/dist/list-plugin.js +1 -0
  122. package/dist/list-plugin.js.map +1 -1
  123. package/dist/now-attach-plugin.js +1 -0
  124. package/dist/now-attach-plugin.js.map +1 -1
  125. package/dist/now-config-plugin.js +659 -51
  126. package/dist/now-config-plugin.js.map +1 -1
  127. package/dist/now-id-plugin.js +1 -0
  128. package/dist/now-id-plugin.js.map +1 -1
  129. package/dist/now-include-plugin.js +1 -0
  130. package/dist/now-include-plugin.js.map +1 -1
  131. package/dist/now-ref-plugin.js +1 -0
  132. package/dist/now-ref-plugin.js.map +1 -1
  133. package/dist/now-unresolved-plugin.js +1 -0
  134. package/dist/now-unresolved-plugin.js.map +1 -1
  135. package/dist/package-json-plugin.js +1 -0
  136. package/dist/package-json-plugin.js.map +1 -1
  137. package/dist/property-plugin.js +3 -1
  138. package/dist/property-plugin.js.map +1 -1
  139. package/dist/record-plugin.d.ts +37 -0
  140. package/dist/record-plugin.js +47 -3
  141. package/dist/record-plugin.js.map +1 -1
  142. package/dist/repack/lint/Rules.d.ts +11 -2
  143. package/dist/repack/lint/Rules.js +160 -16
  144. package/dist/repack/lint/Rules.js.map +1 -1
  145. package/dist/repack/lint/index.d.ts +10 -5
  146. package/dist/repack/lint/index.js +76 -50
  147. package/dist/repack/lint/index.js.map +1 -1
  148. package/dist/rest-api-plugin.js +22 -1
  149. package/dist/rest-api-plugin.js.map +1 -1
  150. package/dist/role-plugin.js +1 -0
  151. package/dist/role-plugin.js.map +1 -1
  152. package/dist/schedule-script/index.d.ts +1 -0
  153. package/dist/schedule-script/index.js +18 -0
  154. package/dist/schedule-script/index.js.map +1 -0
  155. package/dist/schedule-script/scheduled-script-plugin.d.ts +2 -0
  156. package/dist/schedule-script/scheduled-script-plugin.js +556 -0
  157. package/dist/schedule-script/scheduled-script-plugin.js.map +1 -0
  158. package/dist/schedule-script/timeZoneConverter.d.ts +61 -0
  159. package/dist/schedule-script/timeZoneConverter.js +170 -0
  160. package/dist/schedule-script/timeZoneConverter.js.map +1 -0
  161. package/dist/script-action-plugin.js +2 -0
  162. package/dist/script-action-plugin.js.map +1 -1
  163. package/dist/script-include-plugin.js +2 -0
  164. package/dist/script-include-plugin.js.map +1 -1
  165. package/dist/server-module-plugin/index.js +13 -2
  166. package/dist/server-module-plugin/index.js.map +1 -1
  167. package/dist/service-catalog/catalog-clientscript-plugin.js +2 -0
  168. package/dist/service-catalog/catalog-clientscript-plugin.js.map +1 -1
  169. package/dist/service-catalog/catalog-item-plugin.js +2 -0
  170. package/dist/service-catalog/catalog-item-plugin.js.map +1 -1
  171. package/dist/service-catalog/catalog-ui-policy-plugin.js +2 -0
  172. package/dist/service-catalog/catalog-ui-policy-plugin.js.map +1 -1
  173. package/dist/service-catalog/sc-record-producer-plugin.js +2 -0
  174. package/dist/service-catalog/sc-record-producer-plugin.js.map +1 -1
  175. package/dist/service-catalog/service-catalog-base.d.ts +18 -18
  176. package/dist/service-catalog/service-catalog-base.js +22 -22
  177. package/dist/service-catalog/service-catalog-base.js.map +1 -1
  178. package/dist/service-catalog/service-catalog-diagnostics.d.ts +6 -0
  179. package/dist/service-catalog/service-catalog-diagnostics.js +20 -0
  180. package/dist/service-catalog/service-catalog-diagnostics.js.map +1 -1
  181. package/dist/service-catalog/shape-to-record.js +7 -2
  182. package/dist/service-catalog/shape-to-record.js.map +1 -1
  183. package/dist/service-catalog/variable-set-plugin.js +2 -0
  184. package/dist/service-catalog/variable-set-plugin.js.map +1 -1
  185. package/dist/service-portal/angular-provider-plugin.js +2 -0
  186. package/dist/service-portal/angular-provider-plugin.js.map +1 -1
  187. package/dist/service-portal/dependency-plugin.js +5 -31
  188. package/dist/service-portal/dependency-plugin.js.map +1 -1
  189. package/dist/service-portal/header-footer-plugin.d.ts +2 -0
  190. package/dist/service-portal/header-footer-plugin.js +50 -0
  191. package/dist/service-portal/header-footer-plugin.js.map +1 -0
  192. package/dist/service-portal/menu-plugin.d.ts +2 -0
  193. package/dist/service-portal/menu-plugin.js +334 -0
  194. package/dist/service-portal/menu-plugin.js.map +1 -0
  195. package/dist/service-portal/page-plugin.d.ts +2 -0
  196. package/dist/service-portal/page-plugin.js +681 -0
  197. package/dist/service-portal/page-plugin.js.map +1 -0
  198. package/dist/service-portal/page-route-map-plugin.d.ts +2 -0
  199. package/dist/service-portal/page-route-map-plugin.js +114 -0
  200. package/dist/service-portal/page-route-map-plugin.js.map +1 -0
  201. package/dist/service-portal/portal-plugin.d.ts +2 -0
  202. package/dist/service-portal/portal-plugin.js +309 -0
  203. package/dist/service-portal/portal-plugin.js.map +1 -0
  204. package/dist/service-portal/theme-plugin.d.ts +2 -0
  205. package/dist/service-portal/theme-plugin.js +112 -0
  206. package/dist/service-portal/theme-plugin.js.map +1 -0
  207. package/dist/service-portal/utils.d.ts +46 -0
  208. package/dist/service-portal/utils.js +331 -0
  209. package/dist/service-portal/utils.js.map +1 -0
  210. package/dist/service-portal/widget-plugin.js +10 -182
  211. package/dist/service-portal/widget-plugin.js.map +1 -1
  212. package/dist/sla-plugin.js +2 -0
  213. package/dist/sla-plugin.js.map +1 -1
  214. package/dist/static-content-plugin.js +5 -0
  215. package/dist/static-content-plugin.js.map +1 -1
  216. package/dist/table-plugin.js +191 -26
  217. package/dist/table-plugin.js.map +1 -1
  218. package/dist/ui-action-plugin.js +3 -4
  219. package/dist/ui-action-plugin.js.map +1 -1
  220. package/dist/ui-page-plugin.js +101 -21
  221. package/dist/ui-page-plugin.js.map +1 -1
  222. package/dist/ui-policy-plugin.js +1 -0
  223. package/dist/ui-policy-plugin.js.map +1 -1
  224. package/dist/user-preference-plugin.js +2 -0
  225. package/dist/user-preference-plugin.js.map +1 -1
  226. package/dist/utils.d.ts +20 -2
  227. package/dist/utils.js +34 -3
  228. package/dist/utils.js.map +1 -1
  229. package/dist/ux-list-menu-config-plugin.js +2 -0
  230. package/dist/ux-list-menu-config-plugin.js.map +1 -1
  231. package/dist/view-plugin.js +9 -3
  232. package/dist/view-plugin.js.map +1 -1
  233. package/dist/workspace-plugin.js +41 -36
  234. package/dist/workspace-plugin.js.map +1 -1
  235. package/package.json +11 -11
  236. package/src/_types/eslint-community-eslint-utils.d.ts +15 -0
  237. package/src/acl-plugin.ts +97 -8
  238. package/src/applicability-plugin.ts +2 -0
  239. package/src/application-menu-plugin.ts +2 -0
  240. package/src/arrow-function-plugin.ts +128 -13
  241. package/src/atf/test-plugin.ts +2 -0
  242. package/src/basic-syntax-plugin.ts +21 -0
  243. package/src/call-expression-plugin.ts +1 -0
  244. package/src/claims-plugin.ts +1 -0
  245. package/src/client-script-plugin.ts +2 -1
  246. package/src/column-plugin.ts +4 -8
  247. package/src/cross-scope-privilege-plugin.ts +2 -1
  248. package/src/dashboard/dashboard-plugin.ts +2 -0
  249. package/src/data-plugin.ts +1 -0
  250. package/src/email-notification-plugin.ts +3 -23
  251. package/src/flow/constants/flow-plugin-constants.ts +1 -1
  252. package/src/flow/flow-logic/flow-logic-diagnostics.ts +5 -6
  253. package/src/flow/flow-logic/flow-logic-plugin-helpers.ts +47 -45
  254. package/src/flow/flow-logic/flow-logic-plugin.ts +1 -0
  255. package/src/flow/plugins/approval-rules-plugin.ts +1 -0
  256. package/src/flow/plugins/flow-action-definition-plugin.ts +1584 -62
  257. package/src/flow/plugins/flow-data-pill-plugin.ts +6 -2
  258. package/src/flow/plugins/flow-definition-plugin.ts +22 -51
  259. package/src/flow/plugins/flow-diagnostics-plugin.ts +3 -2
  260. package/src/flow/plugins/flow-instance-plugin.ts +201 -36
  261. package/src/flow/plugins/flow-trigger-instance-plugin.ts +1 -0
  262. package/src/flow/plugins/inline-script-plugin.ts +1 -0
  263. package/src/flow/plugins/step-definition-plugin.ts +4 -2
  264. package/src/flow/plugins/step-instance-plugin.ts +772 -155
  265. package/src/flow/plugins/trigger-plugin.ts +2 -0
  266. package/src/flow/plugins/wfa-datapill-plugin.ts +26 -5
  267. package/src/flow/post-install.ts +93 -0
  268. package/src/flow/utils/complex-object-resolver.ts +4 -1
  269. package/src/flow/utils/complex-objects.ts +11 -3
  270. package/src/flow/utils/flow-constants.ts +451 -6
  271. package/src/flow/utils/flow-io-to-record.ts +43 -17
  272. package/src/flow/utils/flow-shapes.ts +4 -0
  273. package/src/flow/utils/flow-to-xml.ts +4 -4
  274. package/src/flow/utils/label-cache-parser.ts +33 -4
  275. package/src/flow/utils/label-cache-processor.ts +14 -2
  276. package/src/flow/utils/pill-shape-helpers.ts +42 -0
  277. package/src/flow/utils/pill-string-parser.ts +1 -0
  278. package/src/flow/utils/schema-to-flow-object.ts +183 -15
  279. package/src/flow/utils/service-catalog.ts +5 -2
  280. package/src/flow/utils/utils.ts +12 -1
  281. package/src/form-plugin.ts +1409 -0
  282. package/src/html-import-plugin.ts +1 -0
  283. package/src/import-sets-plugin.ts +2 -0
  284. package/src/inbound-email-action-plugin.ts +145 -0
  285. package/src/index.ts +13 -0
  286. package/src/instance-scan-plugin.ts +313 -0
  287. package/src/json-plugin.ts +1 -0
  288. package/src/list-plugin.ts +2 -1
  289. package/src/now-attach-plugin.ts +1 -0
  290. package/src/now-config-plugin.ts +833 -53
  291. package/src/now-id-plugin.ts +1 -0
  292. package/src/now-include-plugin.ts +1 -0
  293. package/src/now-ref-plugin.ts +1 -0
  294. package/src/now-unresolved-plugin.ts +1 -0
  295. package/src/package-json-plugin.ts +1 -0
  296. package/src/property-plugin.ts +6 -1
  297. package/src/record-plugin.ts +56 -6
  298. package/src/repack/lint/Rules.ts +171 -22
  299. package/src/repack/lint/index.ts +80 -56
  300. package/src/rest-api-plugin.ts +28 -2
  301. package/src/role-plugin.ts +2 -1
  302. package/src/schedule-script/index.ts +1 -0
  303. package/src/schedule-script/scheduled-script-plugin.ts +690 -0
  304. package/src/schedule-script/timeZoneConverter.ts +188 -0
  305. package/src/script-action-plugin.ts +2 -0
  306. package/src/script-include-plugin.ts +2 -0
  307. package/src/server-module-plugin/index.ts +14 -2
  308. package/src/service-catalog/catalog-clientscript-plugin.ts +2 -0
  309. package/src/service-catalog/catalog-item-plugin.ts +2 -0
  310. package/src/service-catalog/catalog-ui-policy-plugin.ts +2 -0
  311. package/src/service-catalog/sc-record-producer-plugin.ts +2 -0
  312. package/src/service-catalog/service-catalog-base.ts +22 -22
  313. package/src/service-catalog/service-catalog-diagnostics.ts +30 -0
  314. package/src/service-catalog/shape-to-record.ts +8 -2
  315. package/src/service-catalog/variable-set-plugin.ts +2 -0
  316. package/src/service-portal/angular-provider-plugin.ts +2 -0
  317. package/src/service-portal/dependency-plugin.ts +6 -53
  318. package/src/service-portal/header-footer-plugin.ts +57 -0
  319. package/src/service-portal/menu-plugin.ts +413 -0
  320. package/src/service-portal/page-plugin.ts +805 -0
  321. package/src/service-portal/page-route-map-plugin.ts +124 -0
  322. package/src/service-portal/portal-plugin.ts +342 -0
  323. package/src/service-portal/theme-plugin.ts +135 -0
  324. package/src/service-portal/utils.ts +470 -0
  325. package/src/service-portal/widget-plugin.ts +18 -224
  326. package/src/sla-plugin.ts +2 -0
  327. package/src/static-content-plugin.ts +4 -0
  328. package/src/table-plugin.ts +228 -37
  329. package/src/ui-action-plugin.ts +3 -8
  330. package/src/ui-page-plugin.ts +110 -21
  331. package/src/ui-policy-plugin.ts +2 -1
  332. package/src/user-preference-plugin.ts +2 -0
  333. package/src/utils.ts +42 -2
  334. package/src/ux-list-menu-config-plugin.ts +2 -0
  335. package/src/view-plugin.ts +11 -4
  336. package/src/workspace-plugin.ts +45 -43
  337. package/src/_types/eslint-plugin-es-x.d.ts +0 -17
@@ -17,11 +17,13 @@ import {
17
17
  type Factory,
18
18
  type Transform,
19
19
  } from '@servicenow/sdk-build-core'
20
+ import { parseDocument, DomUtils } from 'htmlparser2'
20
21
  import { XMLParser, XMLBuilder, type X2jOptions, type XmlBuilderOptions } from 'fast-xml-parser'
21
22
  import { create } from 'xmlbuilder2'
22
23
  import { NowIdShape } from './now-id-plugin'
23
24
  import { CHUNK_SIZE, chunkData, generateId } from './static-content-plugin'
24
25
  import { sha256 } from './now-attach-plugin'
26
+ import { createSdkDocEntry } from './utils'
25
27
 
26
28
  const parserOptions: X2jOptions = {
27
29
  ignoreAttributes: false,
@@ -50,6 +52,62 @@ const builderOptions: XmlBuilderOptions = {
50
52
  ],
51
53
  }
52
54
 
55
+ const LT_PLACEHOLDER = '\0__SDK_LT__\0'
56
+ const AMP_PLACEHOLDER = '\0__SDK_AMP__\0'
57
+ const RAW_CONTENT_TAGS = ['script', 'style', 'textarea'] as const
58
+
59
+ /**
60
+ * Uses htmlparser2 to find script/style/textarea content and replaces `<` and
61
+ * `&` with placeholders. This prevents fast-xml-parser from misinterpreting
62
+ * JavaScript comparison operators (e.g. `a < b`) as XML tag openers, and
63
+ * prevents the XMLBuilder's entity escaping from converting `&` to `$[AMP]`
64
+ * inside script content.
65
+ *
66
+ * htmlparser2 is used instead of regex because it correctly handles edge cases
67
+ * like `>` inside attribute values and script tags inside HTML comments.
68
+ */
69
+ function escapeRawContent(html: string): string {
70
+ const doc = parseDocument(html, { withStartIndices: true, withEndIndices: true })
71
+
72
+ const regions: { start: number; end: number }[] = []
73
+ for (const tag of RAW_CONTENT_TAGS) {
74
+ for (const el of DomUtils.getElementsByTagName(tag, doc, true)) {
75
+ for (const child of el.children) {
76
+ if (child.type === 'text' && child.startIndex != null && child.endIndex != null) {
77
+ const text = child.data
78
+ if (text.includes('<') || text.includes('&')) {
79
+ regions.push({ start: child.startIndex, end: child.endIndex + 1 })
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+
86
+ if (regions.length === 0) {
87
+ return html
88
+ }
89
+
90
+ // Sort by position descending so replacements don't shift earlier indices
91
+ regions.sort((a, b) => b.start - a.start)
92
+
93
+ let result = html
94
+ for (const { start, end } of regions) {
95
+ const content = result.slice(start, end)
96
+ const escaped = content.replace(/&/g, AMP_PLACEHOLDER).replace(/</g, LT_PLACEHOLDER)
97
+ result = result.slice(0, start) + escaped + result.slice(end)
98
+ }
99
+
100
+ return result
101
+ }
102
+
103
+ /**
104
+ * Restores `<` and `&` characters that were replaced by `escapeRawContent`
105
+ * after fast-xml-parser has finished processing.
106
+ */
107
+ function restoreRawContent(html: string): string {
108
+ return html.replaceAll(LT_PLACEHOLDER, '<').replaceAll(AMP_PLACEHOLDER, '&')
109
+ }
110
+
53
111
  const POLARIS_APPSHELL_THEME_ID = 'c86a62e2c7022010099a308dc7c26022'
54
112
  const BYOUI_ARTIFACT_NAME_SUFFIX = 'BYOUI Files'
55
113
  // Matches the prefix HtmlImportPlugin prepends when it resolves an `import x from '*.html'`
@@ -158,10 +216,19 @@ const nodeTransformer = (nodes: any[]) => {
158
216
 
159
217
  export const UiPagePlugin = Plugin.create({
160
218
  name: 'UiPagePlugin',
219
+ docs: [createSdkDocEntry('UiPage', ['sys_ui_page'])],
161
220
  records: {
162
221
  sys_ui_page: {
163
222
  composite: true,
164
- coalesce: ['endpoint'],
223
+ coalesce: (properties) => {
224
+ // Use endpoint for scoped pages (backward compatible), fall back to name for global scope
225
+ const endpoint = properties.get('endpoint').pipe((v) => v.ifDefined()?.toString().getValue())
226
+ if (endpoint) {
227
+ return { endpoint }
228
+ }
229
+ const name = properties.get('name').pipe((v) => v.ifDefined()?.toString().getValue()) ?? 'NULL'
230
+ return { name }
231
+ },
165
232
  relationships: SOURCE_ARTIFACT_RELATIONSHIPS,
166
233
  async toShape(record, { descendants, fs, project, config, logger, diagnostics }) {
167
234
  const shapeWithSourceArtifacts = await getShapeWithSourceArtifacts(record, descendants, {
@@ -178,6 +245,11 @@ export const UiPagePlugin = Plugin.create({
178
245
  }
179
246
  }
180
247
 
248
+ // For global scope, endpoint is empty in the DB — synthesize from name
249
+ const endpointValue = record.get('endpoint').toString().getValue()
250
+ const nameValue = record.get('name').toString().getValue()
251
+ const effectiveEndpoint = endpointValue || (nameValue ? `${nameValue}.do` : '')
252
+
181
253
  return {
182
254
  success: true,
183
255
  value: new CallExpressionShape({
@@ -187,7 +259,7 @@ export const UiPagePlugin = Plugin.create({
187
259
  record.transform(({ $ }) => ({
188
260
  $id: $.val(NowIdShape.from(record)),
189
261
  category: $.def(''),
190
- endpoint: $,
262
+ endpoint: $.val(effectiveEndpoint).def(''),
191
263
  description: $.def(''),
192
264
  direct: $.toBoolean().def(false),
193
265
  html: $.def(''),
@@ -200,7 +272,7 @@ export const UiPagePlugin = Plugin.create({
200
272
  },
201
273
 
202
274
  async toFile(uiPage, { config, descendants, transform }) {
203
- if (!uiPage.has('endpoint')) {
275
+ if (!uiPage.has('endpoint') && !uiPage.has('name')) {
204
276
  return { success: false }
205
277
  }
206
278
 
@@ -324,11 +396,20 @@ export const UiPagePlugin = Plugin.create({
324
396
  const arg = callExpression.getArgument(0).asObject()
325
397
  const endpoint = arg.get('endpoint').asString()
326
398
  const scope = config.scope
327
- if (scope !== 'global' && !isSNScope(scope) && !endpoint.getValue().startsWith(`${scope}_`)) {
399
+ const isGlobalScope = scope === 'global'
400
+ if (!isGlobalScope && !isSNScope(scope) && !endpoint.getValue().startsWith(`${scope}_`)) {
328
401
  diagnostics.error(endpoint.getOriginalNode(), `endpoint must begin with '${scope}_'`)
329
402
  return { success: false }
330
403
  }
331
- const name = endpoint.asString().getValue().replace(`${scope}_`, '').replace(/\.do$/, '')
404
+ // For global scope, name is the endpoint without .do (e.g., 'my-page.do' 'my-page')
405
+ // For scoped, strip scope prefix and .do (e.g., 'x_test_boats.do' → 'boats')
406
+ const name = isGlobalScope
407
+ ? endpoint.getValue().replace(/\.do$/, '')
408
+ : endpoint.getValue().replace(`${scope}_`, '').replace(/\.do$/, '')
409
+ if (!name) {
410
+ diagnostics.error(endpoint.getOriginalNode(), 'endpoint must include a page name before .do')
411
+ return { success: false }
412
+ }
332
413
  let html = arg.get('html').toString().getValue()
333
414
  let sourceFilePaths: string[] = []
334
415
  let assetNames: string[] = []
@@ -364,9 +445,11 @@ export const UiPagePlugin = Plugin.create({
364
445
 
365
446
  if (html) {
366
447
  try {
448
+ html = escapeRawContent(html)
367
449
  const nodes = parser.parse(html)
368
450
  const transformed = nodeTransformer(nodes)
369
451
  html = new XMLBuilder(builderOptions).build(transformed)
452
+ html = restoreRawContent(html)
370
453
  } catch (error: unknown) {
371
454
  if (error instanceof Error) {
372
455
  diagnostics.error(arg.get('html'), error.message)
@@ -383,7 +466,7 @@ export const UiPagePlugin = Plugin.create({
383
466
  explicitId: arg.get('$id'),
384
467
  properties: arg.transform(({ $ }) => ({
385
468
  name: $.val(name),
386
- endpoint: $.val(endpoint),
469
+ endpoint: $.val(isGlobalScope ? '' : endpoint),
387
470
  description: $,
388
471
  direct: $.def(false),
389
472
  category: $,
@@ -461,12 +544,14 @@ const getUIPageSourceFilePaths = (
461
544
  ): { files: string[]; assetNames: string[] } => {
462
545
  const empty = { files: [], assetNames: [] }
463
546
  try {
464
- // Derive manifest path from HTML path
465
- // The manifest is in the build output directory (staticContentDir), not the source directory
466
- // e.g., src/client/index.html -> dist/static/index.ui-source-manifest.json
467
- const htmlBasename = path.basename(htmlFilePath, '.html')
547
+ // Derive manifest path from HTML path by mirroring the directory structure
548
+ // from clientDir into staticContentDir and swapping the extension.
549
+ // e.g., src/client/index.html -> dist/static/index.ui-source-manifest.json
550
+ // src/client/admin/settings.html -> dist/static/admin/settings.ui-source-manifest.json
551
+ const clientAbsDir = path.join(rootDir, config.clientDir)
468
552
  const staticContentAbsDir = path.join(rootDir, config.staticContentDir)
469
- const manifestPath = path.join(staticContentAbsDir, `${htmlBasename}.ui-source-manifest.json`)
553
+ const htmlRelPath = path.relative(clientAbsDir, htmlFilePath)
554
+ const manifestPath = path.join(staticContentAbsDir, htmlRelPath).replace(/\.html$/, '.ui-source-manifest.json')
470
555
 
471
556
  // Check if manifest file exists
472
557
  try {
@@ -486,24 +571,26 @@ const getUIPageSourceFilePaths = (
486
571
 
487
572
  // Derive the JS asset name from the manifest's entry field, matching
488
573
  // static-content-plugin's formula: path.join(scope, relativePath_without_ext).
489
- // The manifest file is named after the HTML entry (e.g. index.ui-source-manifest.json)
490
- // but the JS bundle is named after the JS entry (e.g. main.tsx -> main.jsdbx).
491
- // Using manifest.entry's basename ensures the names align.
574
+ // The entry path is relative to the client directory and preserves subdirectories.
575
+ // e.g., src/client/main.tsx -> scope/main
576
+ // src/client/admin/settings.tsx -> scope/admin/settings
492
577
  if (!manifest.entry || typeof manifest.entry !== 'string') {
493
578
  logger.warn(`No entry field in manifest at ${manifestPath}`)
494
579
  return empty
495
580
  }
496
- const entryBasename = path.basename(manifest.entry, path.extname(manifest.entry))
497
- const entryAssetName = path.join(config.scope, entryBasename).replace(/\\/g, '/')
581
+ const entryRelativePath = path.relative(config.clientDir, manifest.entry).replace(/\\/g, '/')
582
+ const entryRelativeWithoutExt = entryRelativePath.replace(/\.[^.]+$/, '')
583
+ const entryAssetName = path.join(config.scope, entryRelativeWithoutExt).replace(/\\/g, '/')
498
584
 
499
585
  // Check if a source map bundle also exists in staticContentDir.
500
586
  // static-content-plugin names source map assets as: path.join(scope, relativePath.replace('dbx', ''))
501
- // e.g. main.jsdbx.map -> main.js.map -> scope/main.js.map
587
+ // e.g. main.jsdbx.map -> scope/main.js.map
588
+ // admin/settings.jsdbx.map -> scope/admin/settings.js.map
502
589
  const assetNames = [entryAssetName]
503
- const sourceMapFilePath = path.join(staticContentAbsDir, `${entryBasename}.jsdbx.map`)
590
+ const sourceMapFilePath = path.join(staticContentAbsDir, `${entryRelativeWithoutExt}.jsdbx.map`)
504
591
  try {
505
592
  fs.accessSync(sourceMapFilePath)
506
- const sourceMapAssetName = path.join(config.scope, `${entryBasename}.js.map`).replace(/\\/g, '/')
593
+ const sourceMapAssetName = path.join(config.scope, `${entryRelativeWithoutExt}.js.map`).replace(/\\/g, '/')
507
594
  assetNames.push(sourceMapAssetName)
508
595
  } catch {
509
596
  // no source map in this build output — skip
@@ -574,6 +661,8 @@ async function getShapeWithSourceArtifacts(
574
661
 
575
662
  if (htmlFileRelativePath && !context.project.isInFluentDir(originalFilePath)) {
576
663
  const endpoint = uiPageRecord.get('endpoint').toString().getValue()
664
+ const pageName = uiPageRecord.get('name').toString().getValue()
665
+ const effectiveEndpoint = endpoint || (pageName ? `${pageName}.do` : '')
577
666
  const description = uiPageRecord.get('description').toString().getValue()
578
667
  const category = uiPageRecord.get('category').toString().getValue()
579
668
  const direct = uiPageRecord.get('direct').toString().getValue()
@@ -587,7 +676,7 @@ async function getShapeWithSourceArtifacts(
587
676
 
588
677
  UiPage({
589
678
  $id: Now.ID['${uiPageRecord.getId().getValue()}'],
590
- endpoint: ${JSON.stringify(endpoint)},
679
+ endpoint: ${JSON.stringify(effectiveEndpoint)},
591
680
  description: ${JSON.stringify(description)},
592
681
  category: ${JSON.stringify(category)},
593
682
  direct: ${direct},
@@ -596,7 +685,7 @@ async function getShapeWithSourceArtifacts(
596
685
  processingScript: ${JSON.stringify(processingScript)},
597
686
  })
598
687
  `
599
- const newFileName = endpoint.replace('.do', '.now.ts')
688
+ const newFileName = effectiveEndpoint.replace('.do', '.now.ts')
600
689
  const sourceFileShape = new SourceFileShape({
601
690
  source: uiPageRecord,
602
691
  path: `${path.join(fluentFileDirByTaxonomy, newFileName)}`,
@@ -8,7 +8,7 @@ import {
8
8
  type Record,
9
9
  type Shape,
10
10
  } from '@servicenow/sdk-build-core'
11
- import { validateClientSideScript } from './utils'
11
+ import { createSdkDocEntry, validateClientSideScript } from './utils'
12
12
  import { NowIdShape } from './now-id-plugin'
13
13
 
14
14
  // Define table names as constants since they're not exported from the core tables
@@ -93,6 +93,7 @@ const validateScriptProperty = (
93
93
 
94
94
  export const UiPolicyPlugin = Plugin.create({
95
95
  name: 'UiPolicyPlugin',
96
+ docs: [createSdkDocEntry('UiPolicy', ['sys_ui_policy'])],
96
97
  records: {
97
98
  [SYS_UI_POLICY]: {
98
99
  coalesce: ['table', 'short_description'],
@@ -1,5 +1,6 @@
1
1
  import { CallExpressionShape, Plugin } from '@servicenow/sdk-build-core'
2
2
  import { NowIdShape } from './now-id-plugin'
3
+ import { createSdkDocEntry } from './utils'
3
4
 
4
5
  /**
5
6
  * Creates a User Preference (sys_user_preference).
@@ -16,6 +17,7 @@ import { NowIdShape } from './now-id-plugin'
16
17
  */
17
18
  export const UserPreferencePlugin = Plugin.create({
18
19
  name: 'UserPreferencePlugin',
20
+ docs: [createSdkDocEntry('UserPreference', ['sys_user_preference'])],
19
21
  records: {
20
22
  sys_user_preference: {
21
23
  toShape(record) {
package/src/utils.ts CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  type Diagnostics,
6
6
  type Compiler,
7
7
  type PluginApiDoc,
8
+ type Record as FluentRecord,
8
9
  } from '@servicenow/sdk-build-core'
9
10
 
10
11
  export function toReference(shape: Shape) {
@@ -101,9 +102,36 @@ export function validateClientSideScript(script: string, compiler: Compiler): bo
101
102
  return isValid
102
103
  }
103
104
 
105
+ /**
106
+ * Shows a diagnostic error when a field expects a valid GUID but receives an invalid value.
107
+ *
108
+ * @param inputReceived - The shape containing the invalid value
109
+ * @param fieldName - Name of the field being validated (e.g., 'annotationId', 'formatterRef')
110
+ * @param tableName - ServiceNow table name for the expected reference (e.g., 'sys_ui_annotation')
111
+ * @param diagnostics - Diagnostics collection to add the error to
112
+ *
113
+ * @example
114
+ * if (!isGUID(annotationSysId)) {
115
+ * showGuidFieldDiagnostic(annotationIdField, 'annotationId', 'sys_ui_annotation', diagnostics)
116
+ * }
117
+ */
118
+ export const showGuidFieldDiagnostic = (
119
+ inputReceived: Shape | undefined,
120
+ fieldName: string,
121
+ tableName: string,
122
+ diagnostics: Diagnostics
123
+ ) => {
124
+ if (inputReceived) {
125
+ const receivedValue = inputReceived.getValue()
126
+ diagnostics.error(
127
+ inputReceived,
128
+ `'${fieldName}' must be a valid GUID or a Record<'${tableName}'>. Received: '${receivedValue}'`
129
+ )
130
+ }
131
+ }
132
+
104
133
  /**
105
134
  * Creates a documentation entry for first-party SDK plugins.
106
- * Using this helper ensures apiName and docPath are always in sync.
107
135
  *
108
136
  * @param apiName - The API name (e.g., 'BusinessRule', 'Acl')
109
137
  * @param tags - Keywords for categorization (typically includes the ServiceNow table name)
@@ -112,7 +140,19 @@ export function validateClientSideScript(script: string, compiler: Compiler): bo
112
140
  export function createSdkDocEntry(apiName: string, tags: string[]): PluginApiDoc {
113
141
  return {
114
142
  apiName,
115
- docPath: `@servicenow/sdk/docs/${apiName}/${apiName}.md`,
116
143
  tags,
117
144
  }
118
145
  }
146
+
147
+ /**
148
+ * Parses a number from a shape record field with fallback to default value.
149
+ * Returns undefined if the field doesn't exist and no default is provided.
150
+ */
151
+ export function getFieldAsNumber(shape: FluentRecord, fieldName: string, defaultValue?: number): number | undefined {
152
+ const rawValue = shape.get(fieldName)?.getValue()
153
+ if (rawValue === undefined || rawValue === null || rawValue === '') {
154
+ return defaultValue
155
+ }
156
+ const parsed = Number(rawValue)
157
+ return Number.isNaN(parsed) ? defaultValue : parsed
158
+ }
@@ -1,9 +1,11 @@
1
1
  import { Plugin, CallExpressionShape, type Record } from '@servicenow/sdk-build-core'
2
2
 
3
3
  import { NowIdShape } from './now-id-plugin'
4
+ import { createSdkDocEntry } from './utils'
4
5
 
5
6
  export const UxListMenuConfigPlugin = Plugin.create({
6
7
  name: 'UxListMenuConfigPlugin',
8
+ docs: [createSdkDocEntry('UxListMenuConfig', ['sys_ux_list_menu_config'])],
7
9
  records: {
8
10
  sys_ux_list_menu_config: {
9
11
  relationships: {
@@ -1,7 +1,8 @@
1
- import { Plugin, Record, RecordId, Shape } from '@servicenow/sdk-build-core'
1
+ import { Plugin, Record, RecordId, Shape, ts } from '@servicenow/sdk-build-core'
2
2
 
3
3
  export const ViewPlugin = Plugin.create({
4
4
  name: 'ViewPlugin',
5
+ docs: [],
5
6
  records: {
6
7
  sys_ui_view: {
7
8
  coalesce: ['name'],
@@ -10,7 +11,7 @@ export const ViewPlugin = Plugin.create({
10
11
  shapes: [
11
12
  {
12
13
  shape: Record,
13
- inspect(record, { diagnostics }) {
14
+ inspect(record, { diagnostics, logger }) {
14
15
  if (record.getTable() !== 'sys_ui_view') {
15
16
  return
16
17
  }
@@ -21,8 +22,14 @@ export const ViewPlugin = Plugin.create({
21
22
  }
22
23
 
23
24
  const viewName = record.get('name')
24
- if (!viewName.isString() || !/^[a-zA-Z0-9_]+$/.test(viewName.getValue())) {
25
- diagnostics.error(viewName, `View name can only contain alphanumeric characters`)
25
+ if (!viewName.isString() || !/^[a-zA-Z0-9_,]+$/.test(viewName.getValue())) {
26
+ if (ts.Node.isNode(viewName.getOriginalSource())) {
27
+ diagnostics.error(viewName, `View name can only contain alphanumeric characters`)
28
+ } else {
29
+ logger.warn(
30
+ `[ViewPlugin] View name '${viewName.isString() ? viewName.getValue() : ''}' in ${record.getOriginalFilePath()} can only contain alphanumeric characters`
31
+ )
32
+ }
26
33
  }
27
34
  },
28
35
  },
@@ -5,8 +5,10 @@ import {
5
5
  type Record,
6
6
  type Shape,
7
7
  type ObjectShape,
8
+ Database,
8
9
  } from '@servicenow/sdk-build-core'
9
10
  import { NowIdShape } from './now-id-plugin'
11
+ import { createSdkDocEntry } from './utils'
10
12
  import { parsePagePropChromeTabJson, createChromeTabJsonStringForPageProp } from './workspace-plugin/chrome-tab'
11
13
  import { createPage } from './workspace-plugin/page'
12
14
  import {
@@ -41,72 +43,41 @@ type InnerTransformFromObjectShape = Parameters<Parameters<ObjectShape['transfor
41
43
 
42
44
  export const WorkspacePlugin = Plugin.create({
43
45
  name: 'WorkspacePlugin',
46
+ docs: [createSdkDocEntry('Workspace', ['sys_ux_page_registry'])],
44
47
  records: {
45
48
  sys_ux_page_registry: {
46
49
  relationships: {
47
50
  sys_ux_registry_m2m_category: {
48
- via: (parent, child) =>
49
- child.getCreator()?.getName() === 'WorkspacePlugin' &&
50
- parent.getId().getValue() ===
51
- (child.get('page_registry').isRecord()
52
- ? child.get('page_registry').asRecord().getId().getValue()
53
- : child.get('page_registry').asString().getValue()),
51
+ via: 'page_registry',
54
52
  descendant: true,
55
53
  },
56
54
  sys_ux_page_property: {
57
- via: (parent, child) =>
58
- child.getCreator()?.getName() === 'WorkspacePlugin' &&
59
- parent.getId().getValue() ===
60
- (child.get('page').isRecord()
61
- ? child.get('page').asRecord().getId().getValue()
62
- : child.get('page').asString().getValue()),
55
+ via: 'page',
63
56
  descendant: true,
64
57
  },
65
58
  sys_ux_app_config: {
66
- via: (parent, child) =>
67
- child.getCreator()?.getName() === 'WorkspacePlugin' &&
68
- child.getId().getValue() ===
69
- (parent.get('admin_panel').isRecord()
70
- ? parent.get('admin_panel').asRecord().getId().getValue()
71
- : parent.get('admin_panel').asString().getValue()),
59
+ via: 'admin_panel',
60
+ inverse: true,
72
61
  descendant: true,
73
62
  relationships: {
74
63
  sys_ux_screen: {
75
- via: (parent, child) =>
76
- child.getCreator()?.getName() === 'WorkspacePlugin' &&
77
- parent.getId().getValue() ===
78
- (child.get('app_config').isRecord()
79
- ? child.get('app_config').asRecord().getId().getValue()
80
- : child.get('app_config').asString().getValue()),
64
+ via: 'app_config',
81
65
  descendant: true,
82
66
  relationships: {
83
67
  sys_ux_macroponent: {
84
- via: (parent, child) =>
85
- child.getCreator()?.getName() === 'WorkspacePlugin' &&
86
- child.getId().getValue() ===
87
- (parent.get('macroponent').isRecord()
88
- ? parent.get('macroponent').asRecord().getId().getValue()
89
- : parent.get('macroponent').asString().getValue()),
68
+ via: 'macroponent',
69
+ inverse: true,
90
70
  descendant: true,
91
71
  },
92
72
  },
93
73
  },
94
74
  sys_ux_app_route: {
95
- via: (parent, child) =>
96
- child.getCreator()?.getName() === 'WorkspacePlugin' &&
97
- parent.getId().getValue() ===
98
- (child.get('app_config').isRecord()
99
- ? child.get('app_config').asRecord().getId().getValue()
100
- : child.get('app_config').asString().getValue()),
75
+ via: 'app_config',
101
76
  descendant: true,
102
77
  relationships: {
103
78
  sys_ux_screen_type: {
104
- via: (parent, child) =>
105
- child.getCreator()?.getName() === 'WorkspacePlugin' &&
106
- child.getId().getValue() ===
107
- (parent.get('screen_type').isRecord()
108
- ? parent.get('screen_type').asRecord().getId().getValue()
109
- : parent.get('screen_type').asString().getValue()),
79
+ via: 'screen_type',
80
+ inverse: true,
110
81
  descendant: true,
111
82
  },
112
83
  },
@@ -114,10 +85,33 @@ export const WorkspacePlugin = Plugin.create({
114
85
  },
115
86
  },
116
87
  },
117
- async toShape(pageRegRecord, { factory, descendants }) {
88
+ async toShape(pageRegRecord, { factory, descendants: descendantsDB }) {
118
89
  if (pageRegRecord.getCreator()?.getName() !== 'WorkspacePlugin') {
119
90
  return { success: false }
120
91
  }
92
+
93
+ const excludedRecords: Record[] = []
94
+ const supportedRecords: Record[] = []
95
+ const partiallySupportedTables = new Set<string>([
96
+ 'sys_ux_registry_m2m_category',
97
+ 'sys_ux_page_property',
98
+ 'sys_ux_app_config',
99
+ 'sys_ux_screen',
100
+ 'sys_ux_macroponent',
101
+ 'sys_ux_app_route',
102
+ 'sys_ux_screen_type',
103
+ ])
104
+ descendantsDB.query().forEach((descendant) => {
105
+ if (
106
+ partiallySupportedTables.has(descendant.getTable()) &&
107
+ descendant.getCreator()?.getName() !== 'WorkspacePlugin'
108
+ ) {
109
+ excludedRecords.push(descendant)
110
+ } else {
111
+ supportedRecords.push(descendant)
112
+ }
113
+ })
114
+ const descendants = new Database(supportedRecords)
121
115
  // Get 'path' and 'title'
122
116
  // TODO 'active'
123
117
  const path: string = pageRegRecord.get('path').asString().getValue() ?? ''
@@ -224,6 +218,14 @@ export const WorkspacePlugin = Plugin.create({
224
218
  defaultRecordOverrides,
225
219
  })
226
220
 
221
+ if (excludedRecords.length > 0) {
222
+ return {
223
+ success: 'partial',
224
+ value: callExpressionShape,
225
+ unhandledRecords: excludedRecords,
226
+ }
227
+ }
228
+
227
229
  return {
228
230
  success: true,
229
231
  value: callExpressionShape,
@@ -1,17 +0,0 @@
1
- declare module 'eslint-plugin-es-x/lib/rules/no-dynamic-import.js' {
2
- import type { Rule } from 'eslint'
3
- const rule: Rule.RuleModule
4
- export default rule
5
- }
6
-
7
- declare module 'eslint-plugin-es-x/lib/rules/no-regexp-lookbehind-assertions.js' {
8
- import type { Rule } from 'eslint'
9
- const rule: Rule.RuleModule
10
- export default rule
11
- }
12
-
13
- declare module 'eslint-plugin-es-x/lib/rules/no-regexp-unicode-property-escapes.js' {
14
- import type { Rule } from 'eslint'
15
- const rule: Rule.RuleModule
16
- export default rule
17
- }