@vannizhang/living-atlas-content-validator 1.5.22 → 1.5.23

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 (345) hide show
  1. package/dist/configureSettings.d.ts +0 -103
  2. package/dist/configureSettings.js +1 -43
  3. package/dist/configureSettings.js.map +1 -1
  4. package/dist/index.js +1 -3
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/accessInformation/isValidAccessInformation.d.ts +0 -8
  7. package/dist/lib/accessInformation/isValidAccessInformation.js +0 -12
  8. package/dist/lib/accessInformation/isValidAccessInformation.js.map +1 -1
  9. package/dist/lib/accessInformation/scoringConfig.js +0 -4
  10. package/dist/lib/accessInformation/scoringConfig.js.map +1 -1
  11. package/dist/lib/checkProfanities/checkProfanities.d.ts +0 -5
  12. package/dist/lib/checkProfanities/checkProfanities.js +0 -8
  13. package/dist/lib/checkProfanities/checkProfanities.js.map +1 -1
  14. package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.d.ts +0 -28
  15. package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js +0 -35
  16. package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js.map +1 -1
  17. package/dist/lib/checkTitleAndSnippetSearchability/config.d.ts +0 -84
  18. package/dist/lib/checkTitleAndSnippetSearchability/config.js +0 -17
  19. package/dist/lib/checkTitleAndSnippetSearchability/config.js.map +1 -1
  20. package/dist/lib/checkTitleAndSnippetSearchability/data.js +0 -692
  21. package/dist/lib/checkTitleAndSnippetSearchability/data.js.map +1 -1
  22. package/dist/lib/checkTitleAndSnippetSearchability/helpers.d.ts +0 -94
  23. package/dist/lib/checkTitleAndSnippetSearchability/helpers.js +0 -105
  24. package/dist/lib/checkTitleAndSnippetSearchability/helpers.js.map +1 -1
  25. package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.d.ts +0 -28
  26. package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.js +1 -111
  27. package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.js.map +1 -1
  28. package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.d.ts +0 -28
  29. package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.js +1 -113
  30. package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.js.map +1 -1
  31. package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.d.ts +0 -28
  32. package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.js +0 -113
  33. package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.js.map +1 -1
  34. package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.d.ts +0 -30
  35. package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.js +1 -115
  36. package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.js.map +1 -1
  37. package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.js +0 -1
  38. package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.js.map +1 -1
  39. package/dist/lib/config.d.ts +0 -16
  40. package/dist/lib/config.js +0 -140
  41. package/dist/lib/config.js.map +1 -1
  42. package/dist/lib/deleteProtection/isDeleteProtectionEnabled.d.ts +0 -8
  43. package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js +0 -11
  44. package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js.map +1 -1
  45. package/dist/lib/deleteProtection/scoringConfig.js +0 -1
  46. package/dist/lib/deleteProtection/scoringConfig.js.map +1 -1
  47. package/dist/lib/deprecated/isDeprecated.d.ts +0 -8
  48. package/dist/lib/deprecated/isDeprecated.js +0 -9
  49. package/dist/lib/deprecated/isDeprecated.js.map +1 -1
  50. package/dist/lib/deprecated/scoringConfig.js +0 -1
  51. package/dist/lib/deprecated/scoringConfig.js.map +1 -1
  52. package/dist/lib/description/findDataSource.d.ts +0 -10
  53. package/dist/lib/description/findDataSource.js +0 -22
  54. package/dist/lib/description/findDataSource.js.map +1 -1
  55. package/dist/lib/description/isValidDescription.d.ts +0 -17
  56. package/dist/lib/description/isValidDescription.js +0 -52
  57. package/dist/lib/description/isValidDescription.js.map +1 -1
  58. package/dist/lib/description/scoringConfig.js +0 -1
  59. package/dist/lib/description/scoringConfig.js.map +1 -1
  60. package/dist/lib/description/scoringRulesConfig.js +0 -47
  61. package/dist/lib/description/scoringRulesConfig.js.map +1 -1
  62. package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.d.ts +0 -8
  63. package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.js +0 -12
  64. package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.js.map +1 -1
  65. package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.d.ts +0 -6
  66. package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.js +0 -12
  67. package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.js.map +1 -1
  68. package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.d.ts +0 -8
  69. package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.js +0 -16
  70. package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.js.map +1 -1
  71. package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.d.ts +0 -5
  72. package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.js +0 -9
  73. package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.js.map +1 -1
  74. package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.d.ts +0 -23
  75. package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js +0 -43
  76. package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js.map +1 -1
  77. package/dist/lib/featureServiceFieldAliases/helpers.d.ts +0 -16
  78. package/dist/lib/featureServiceFieldAliases/helpers.js +5 -21
  79. package/dist/lib/featureServiceFieldAliases/helpers.js.map +1 -1
  80. package/dist/lib/featureServiceFieldAliases/scoringConfig.js +0 -1
  81. package/dist/lib/featureServiceFieldAliases/scoringConfig.js.map +1 -1
  82. package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.d.ts +0 -22
  83. package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js +0 -58
  84. package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js.map +1 -1
  85. package/dist/lib/featureServiceFieldDescriptions/helpers.d.ts +0 -17
  86. package/dist/lib/featureServiceFieldDescriptions/helpers.js +5 -22
  87. package/dist/lib/featureServiceFieldDescriptions/helpers.js.map +1 -1
  88. package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js +0 -1
  89. package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js.map +1 -1
  90. package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.d.ts +0 -8
  91. package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.js +0 -8
  92. package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.js.map +1 -1
  93. package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.d.ts +0 -5
  94. package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.js +0 -6
  95. package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.js.map +1 -1
  96. package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.d.ts +0 -19
  97. package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js +0 -40
  98. package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js.map +1 -1
  99. package/dist/lib/featureServiceFieldValueTypes/helpers.d.ts +0 -13
  100. package/dist/lib/featureServiceFieldValueTypes/helpers.js +2 -15
  101. package/dist/lib/featureServiceFieldValueTypes/helpers.js.map +1 -1
  102. package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js +0 -1
  103. package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js.map +1 -1
  104. package/dist/lib/itemExtent/checkItemExtent.d.ts +0 -25
  105. package/dist/lib/itemExtent/checkItemExtent.js +0 -30
  106. package/dist/lib/itemExtent/checkItemExtent.js.map +1 -1
  107. package/dist/lib/itemExtent/checkItemExtentHelpers.d.ts +0 -31
  108. package/dist/lib/itemExtent/checkItemExtentHelpers.js +0 -36
  109. package/dist/lib/itemExtent/checkItemExtentHelpers.js.map +1 -1
  110. package/dist/lib/licenseInfo/isValidLicenseInfo.d.ts +0 -32
  111. package/dist/lib/licenseInfo/isValidLicenseInfo.js +2 -49
  112. package/dist/lib/licenseInfo/isValidLicenseInfo.js.map +1 -1
  113. package/dist/lib/licenseInfo/scoringConfig.js +0 -1
  114. package/dist/lib/licenseInfo/scoringConfig.js.map +1 -1
  115. package/dist/lib/licenseInfo/scoringRulesConfig.js +0 -47
  116. package/dist/lib/licenseInfo/scoringRulesConfig.js.map +1 -1
  117. package/dist/lib/sharing/isValidAccess.d.ts +0 -20
  118. package/dist/lib/sharing/isValidAccess.js +2 -28
  119. package/dist/lib/sharing/isValidAccess.js.map +1 -1
  120. package/dist/lib/sharing/scoringConfig.js +0 -1
  121. package/dist/lib/sharing/scoringConfig.js.map +1 -1
  122. package/dist/lib/sharing/scoringRulesConfig.js +0 -47
  123. package/dist/lib/sharing/scoringRulesConfig.js.map +1 -1
  124. package/dist/lib/ssl/isValidSSL.d.ts +0 -12
  125. package/dist/lib/ssl/isValidSSL.js +6 -31
  126. package/dist/lib/ssl/isValidSSL.js.map +1 -1
  127. package/dist/lib/ssl/scoringConfig.js +0 -4
  128. package/dist/lib/ssl/scoringConfig.js.map +1 -1
  129. package/dist/lib/ssl/scoringRulesConfig.js +0 -41
  130. package/dist/lib/ssl/scoringRulesConfig.js.map +1 -1
  131. package/dist/lib/summary/isValidSummary.d.ts +0 -15
  132. package/dist/lib/summary/isValidSummary.js +1 -47
  133. package/dist/lib/summary/isValidSummary.js.map +1 -1
  134. package/dist/lib/summary/scoringConfig.js +0 -1
  135. package/dist/lib/summary/scoringConfig.js.map +1 -1
  136. package/dist/lib/summary/scoringRulesConfig.js +0 -53
  137. package/dist/lib/summary/scoringRulesConfig.js.map +1 -1
  138. package/dist/lib/tags/isValidTags.d.ts +0 -12
  139. package/dist/lib/tags/isValidTags.js +1 -20
  140. package/dist/lib/tags/isValidTags.js.map +1 -1
  141. package/dist/lib/tags/scoringConfig.js +0 -5
  142. package/dist/lib/tags/scoringConfig.js.map +1 -1
  143. package/dist/lib/tags/scoringRulesConfig.js +0 -41
  144. package/dist/lib/tags/scoringRulesConfig.js.map +1 -1
  145. package/dist/lib/thumbnail/isValidThumbnail.d.ts +0 -8
  146. package/dist/lib/thumbnail/isValidThumbnail.js +1 -30
  147. package/dist/lib/thumbnail/isValidThumbnail.js.map +1 -1
  148. package/dist/lib/thumbnail/scoringConfig.js +0 -9
  149. package/dist/lib/thumbnail/scoringConfig.js.map +1 -1
  150. package/dist/lib/thumbnail/scoringRulesConfig.js +0 -41
  151. package/dist/lib/thumbnail/scoringRulesConfig.js.map +1 -1
  152. package/dist/lib/title/isValidTitle.d.ts +0 -21
  153. package/dist/lib/title/isValidTitle.js +1 -55
  154. package/dist/lib/title/isValidTitle.js.map +1 -1
  155. package/dist/lib/title/scoringConfig.js +0 -1
  156. package/dist/lib/title/scoringConfig.js.map +1 -1
  157. package/dist/lib/title/scoringRulesConfig.js +0 -52
  158. package/dist/lib/title/scoringRulesConfig.js.map +1 -1
  159. package/dist/lib/userProfileDescription/isValidUserProfileDescription.d.ts +0 -21
  160. package/dist/lib/userProfileDescription/isValidUserProfileDescription.js +2 -76
  161. package/dist/lib/userProfileDescription/isValidUserProfileDescription.js.map +1 -1
  162. package/dist/lib/userProfileDescription/scoringConfig.js +0 -1
  163. package/dist/lib/userProfileDescription/scoringConfig.js.map +1 -1
  164. package/dist/lib/userProfileDescription/scoringRulesConfig.js +0 -59
  165. package/dist/lib/userProfileDescription/scoringRulesConfig.js.map +1 -1
  166. package/dist/lib/userProfileName/isValidUserProfileName.d.ts +0 -8
  167. package/dist/lib/userProfileName/isValidUserProfileName.js +2 -26
  168. package/dist/lib/userProfileName/isValidUserProfileName.js.map +1 -1
  169. package/dist/lib/userProfileName/scoringConfig.js +0 -5
  170. package/dist/lib/userProfileName/scoringConfig.js.map +1 -1
  171. package/dist/lib/userProfileName/scoringRulesConfig.js +0 -41
  172. package/dist/lib/userProfileName/scoringRulesConfig.js.map +1 -1
  173. package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.d.ts +0 -12
  174. package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js +3 -27
  175. package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js.map +1 -1
  176. package/dist/lib/userProfileThumbnail/scoringConfig.js +0 -4
  177. package/dist/lib/userProfileThumbnail/scoringConfig.js.map +1 -1
  178. package/dist/lib/userProfileThumbnail/scoringRulesConfig.js +0 -35
  179. package/dist/lib/userProfileThumbnail/scoringRulesConfig.js.map +1 -1
  180. package/dist/lib/util/assertString.d.ts +0 -10
  181. package/dist/lib/util/assertString.js +0 -11
  182. package/dist/lib/util/assertString.js.map +1 -1
  183. package/dist/lib/util/checkIsLayer.d.ts +0 -5
  184. package/dist/lib/util/checkIsLayer.js +0 -5
  185. package/dist/lib/util/checkIsLayer.js.map +1 -1
  186. package/dist/lib/util/contains.d.ts +0 -6
  187. package/dist/lib/util/contains.js +0 -7
  188. package/dist/lib/util/contains.js.map +1 -1
  189. package/dist/lib/util/containsNonEnglishCharacters.d.ts +0 -12
  190. package/dist/lib/util/containsNonEnglishCharacters.js +2 -16
  191. package/dist/lib/util/containsNonEnglishCharacters.js.map +1 -1
  192. package/dist/lib/util/countSentences.d.ts +0 -22
  193. package/dist/lib/util/countSentences.js +4 -36
  194. package/dist/lib/util/countSentences.js.map +1 -1
  195. package/dist/lib/util/createWordBoundaryRegex.d.ts +0 -40
  196. package/dist/lib/util/createWordBoundaryRegex.js +0 -47
  197. package/dist/lib/util/createWordBoundaryRegex.js.map +1 -1
  198. package/dist/lib/util/escapeSpecialCharacters.d.ts +0 -6
  199. package/dist/lib/util/escapeSpecialCharacters.js +0 -8
  200. package/dist/lib/util/escapeSpecialCharacters.js.map +1 -1
  201. package/dist/lib/util/getAllValidationRuleIds.d.ts +0 -4
  202. package/dist/lib/util/getAllValidationRuleIds.js +0 -4
  203. package/dist/lib/util/getAllValidationRuleIds.js.map +1 -1
  204. package/dist/lib/util/getFeatureLayerFieldValueTypes.d.ts +0 -8
  205. package/dist/lib/util/getFeatureLayerFieldValueTypes.js +0 -8
  206. package/dist/lib/util/getFeatureLayerFieldValueTypes.js.map +1 -1
  207. package/dist/lib/util/getLivingAtlasSupportedItemTypes.d.ts +0 -17
  208. package/dist/lib/util/getLivingAtlasSupportedItemTypes.js +0 -17
  209. package/dist/lib/util/getLivingAtlasSupportedItemTypes.js.map +1 -1
  210. package/dist/lib/util/getNumberOfWords.d.ts +0 -5
  211. package/dist/lib/util/getNumberOfWords.js +1 -15
  212. package/dist/lib/util/getNumberOfWords.js.map +1 -1
  213. package/dist/lib/util/getRelevantFeatureLayerFields.d.ts +0 -11
  214. package/dist/lib/util/getRelevantFeatureLayerFields.js +0 -11
  215. package/dist/lib/util/getRelevantFeatureLayerFields.js.map +1 -1
  216. package/dist/lib/util/getScoringRules.d.ts +0 -17
  217. package/dist/lib/util/getScoringRules.js +0 -105
  218. package/dist/lib/util/getScoringRules.js.map +1 -1
  219. package/dist/lib/util/getThumbnailFileName.d.ts +0 -14
  220. package/dist/lib/util/getThumbnailFileName.js +0 -14
  221. package/dist/lib/util/getThumbnailFileName.js.map +1 -1
  222. package/dist/lib/util/isArcGISDomain.d.ts +0 -5
  223. package/dist/lib/util/isArcGISDomain.js +0 -5
  224. package/dist/lib/util/isArcGISDomain.js.map +1 -1
  225. package/dist/lib/util/isArcGISOnlineReservedThumbnailName.d.ts +0 -5
  226. package/dist/lib/util/isArcGISOnlineReservedThumbnailName.js +0 -5
  227. package/dist/lib/util/isArcGISOnlineReservedThumbnailName.js.map +1 -1
  228. package/dist/lib/util/isDefined.d.ts +0 -7
  229. package/dist/lib/util/isDefined.js +0 -7
  230. package/dist/lib/util/isDefined.js.map +1 -1
  231. package/dist/lib/util/isEmail.d.ts +0 -5
  232. package/dist/lib/util/isEmail.js +0 -5
  233. package/dist/lib/util/isEmail.js.map +1 -1
  234. package/dist/lib/util/isEmpty.d.ts +0 -5
  235. package/dist/lib/util/isEmpty.js +0 -5
  236. package/dist/lib/util/isEmpty.js.map +1 -1
  237. package/dist/lib/util/isFeatureCollection.d.ts +0 -5
  238. package/dist/lib/util/isFeatureCollection.js +0 -5
  239. package/dist/lib/util/isFeatureCollection.js.map +1 -1
  240. package/dist/lib/util/isFeatureService.d.ts +0 -11
  241. package/dist/lib/util/isFeatureService.js +0 -13
  242. package/dist/lib/util/isFeatureService.js.map +1 -1
  243. package/dist/lib/util/isHosted.d.ts +0 -5
  244. package/dist/lib/util/isHosted.js +0 -5
  245. package/dist/lib/util/isHosted.js.map +1 -1
  246. package/dist/lib/util/isLatin.d.ts +0 -5
  247. package/dist/lib/util/isLatin.js +0 -5
  248. package/dist/lib/util/isLatin.js.map +1 -1
  249. package/dist/lib/util/isLayer.d.ts +0 -10
  250. package/dist/lib/util/isLayer.js +1 -13
  251. package/dist/lib/util/isLayer.js.map +1 -1
  252. package/dist/lib/util/isSecureProtocol.d.ts +0 -5
  253. package/dist/lib/util/isSecureProtocol.js +0 -5
  254. package/dist/lib/util/isSecureProtocol.js.map +1 -1
  255. package/dist/lib/util/isUppercase.d.ts +0 -3
  256. package/dist/lib/util/isUppercase.js +0 -3
  257. package/dist/lib/util/isUppercase.js.map +1 -1
  258. package/dist/lib/util/isUrl.d.ts +0 -8
  259. package/dist/lib/util/isUrl.js +1 -11
  260. package/dist/lib/util/isUrl.js.map +1 -1
  261. package/dist/lib/util/isValidRegexPattern.d.ts +0 -6
  262. package/dist/lib/util/isValidRegexPattern.js +0 -6
  263. package/dist/lib/util/isValidRegexPattern.js.map +1 -1
  264. package/dist/lib/util/matches.d.ts +0 -11
  265. package/dist/lib/util/matches.js +0 -11
  266. package/dist/lib/util/matches.js.map +1 -1
  267. package/dist/lib/util/round.js +0 -4
  268. package/dist/lib/util/round.js.map +1 -1
  269. package/dist/lib/util/sanitizeTags.d.ts +0 -5
  270. package/dist/lib/util/sanitizeTags.js +0 -5
  271. package/dist/lib/util/sanitizeTags.js.map +1 -1
  272. package/dist/lib/util/shouldValidateByBetaRules.d.ts +0 -7
  273. package/dist/lib/util/shouldValidateByBetaRules.js +0 -31
  274. package/dist/lib/util/shouldValidateByBetaRules.js.map +1 -1
  275. package/dist/lib/util/stringsConfig.d.ts +0 -21
  276. package/dist/lib/util/stringsConfig.js +0 -38
  277. package/dist/lib/util/stringsConfig.js.map +1 -1
  278. package/dist/lib/util/toString.d.ts +0 -10
  279. package/dist/lib/util/toString.js +0 -10
  280. package/dist/lib/util/toString.js.map +1 -1
  281. package/dist/lib/validate/validate.d.ts +0 -64
  282. package/dist/lib/validate/validate.js +1 -52
  283. package/dist/lib/validate/validate.js.map +1 -1
  284. package/dist/lib/validate/validateHelpers.d.ts +0 -57
  285. package/dist/lib/validate/validateHelpers.js +1 -72
  286. package/dist/lib/validate/validateHelpers.js.map +1 -1
  287. package/dist/package-info.json +1 -1
  288. package/dist/services/content-validator-assets/config.d.ts +0 -3
  289. package/dist/services/content-validator-assets/config.js +0 -3
  290. package/dist/services/content-validator-assets/config.js.map +1 -1
  291. package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.d.ts +0 -93
  292. package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.js +0 -33
  293. package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.js.map +1 -1
  294. package/dist/services/content-validator-assets/fetchProfanitiesData.d.ts +0 -24
  295. package/dist/services/content-validator-assets/fetchProfanitiesData.js +0 -19
  296. package/dist/services/content-validator-assets/fetchProfanitiesData.js.map +1 -1
  297. package/dist/services/content-validator-assets/helpers.d.ts +0 -14
  298. package/dist/services/content-validator-assets/helpers.js +1 -15
  299. package/dist/services/content-validator-assets/helpers.js.map +1 -1
  300. package/dist/services/custom-terms/config.d.ts +0 -11
  301. package/dist/services/custom-terms/config.js +0 -41
  302. package/dist/services/custom-terms/config.js.map +1 -1
  303. package/dist/services/custom-terms/customTerms.d.ts +0 -170
  304. package/dist/services/custom-terms/customTerms.js +4 -169
  305. package/dist/services/custom-terms/customTerms.js.map +1 -1
  306. package/dist/services/custom-terms/helpers.d.ts +0 -6
  307. package/dist/services/custom-terms/helpers.js +0 -6
  308. package/dist/services/custom-terms/helpers.js.map +1 -1
  309. package/dist/services/custom-terms-review-results/config.d.ts +0 -16
  310. package/dist/services/custom-terms-review-results/config.js +0 -42
  311. package/dist/services/custom-terms-review-results/config.js.map +1 -1
  312. package/dist/services/custom-terms-review-results/customTermsReviewResults.d.ts +0 -93
  313. package/dist/services/custom-terms-review-results/customTermsReviewResults.js +0 -87
  314. package/dist/services/custom-terms-review-results/customTermsReviewResults.js.map +1 -1
  315. package/dist/services/custom-terms-review-results/helpers.d.ts +0 -15
  316. package/dist/services/custom-terms-review-results/helpers.js +0 -16
  317. package/dist/services/custom-terms-review-results/helpers.js.map +1 -1
  318. package/dist/services/feature-service/fetchFeatureServiceAdminJSON.d.ts +0 -12
  319. package/dist/services/feature-service/fetchFeatureServiceAdminJSON.js +0 -13
  320. package/dist/services/feature-service/fetchFeatureServiceAdminJSON.js.map +1 -1
  321. package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.d.ts +0 -12
  322. package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js +2 -37
  323. package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js.map +1 -1
  324. package/dist/services/feature-service/fetchFeatureServiceRootJSON.d.ts +0 -14
  325. package/dist/services/feature-service/fetchFeatureServiceRootJSON.js +1 -25
  326. package/dist/services/feature-service/fetchFeatureServiceRootJSON.js.map +1 -1
  327. package/dist/services/feature-service/getFeatureServerURL.d.ts +0 -11
  328. package/dist/services/feature-service/getFeatureServerURL.js +2 -14
  329. package/dist/services/feature-service/getFeatureServerURL.js.map +1 -1
  330. package/dist/services/shared/addFeatures.d.ts +0 -11
  331. package/dist/services/shared/addFeatures.js +0 -11
  332. package/dist/services/shared/addFeatures.js.map +1 -1
  333. package/dist/services/shared/applyEdits.d.ts +0 -11
  334. package/dist/services/shared/applyEdits.js +0 -11
  335. package/dist/services/shared/applyEdits.js.map +1 -1
  336. package/dist/services/shared/config.d.ts +0 -38
  337. package/dist/services/shared/config.js +0 -22
  338. package/dist/services/shared/config.js.map +1 -1
  339. package/dist/services/shared/getItemInfo.d.ts +0 -12
  340. package/dist/services/shared/getItemInfo.js +1 -16
  341. package/dist/services/shared/getItemInfo.js.map +1 -1
  342. package/dist/types/index.d.ts +0 -335
  343. package/dist/types/index.js +0 -19
  344. package/dist/types/index.js.map +1 -1
  345. package/package.json +1 -1
@@ -8,39 +8,9 @@ const helpers_1 = require("./helpers");
8
8
  const TitleSummaryMatchingPatterns_Locations_json_1 = __importDefault(require("../../data/TitleSummaryMatchingPatterns_Locations.json"));
9
9
  const TitleSummaryRejectedPatterns_json_1 = __importDefault(require("../../data/TitleSummaryRejectedPatterns.json"));
10
10
  const createWordBoundaryRegex_1 = require("../util/createWordBoundaryRegex");
11
- // const matchingPatternsForLocations = TitleSummaryMatchingPatterns.locations;
12
- // Combine patterns into one
13
- // const matchingPatterns = ALL_LOCATIONS.join('|');
14
11
  const regexForLocations = (0, createWordBoundaryRegex_1.createWordBoundaryRegex)(TitleSummaryMatchingPatterns_Locations_json_1.default);
15
- // const combinedRegex = new RegExp(`\\b(${matchingPatterns})\\b`, 'gi');
16
- // /**
17
- // * Set of recognized locations.
18
- // */
19
- // let locationSet: Set<string> = null;
20
- /**
21
- * Set of rejected locations.
22
- */
23
- let rejectedLocationSet = null; //new Set<string>(TitleSummaryMatchingPatterns.topics)
24
- /**
25
- * Regular expression to match additional location information.
26
- */
12
+ let rejectedLocationSet = null;
27
13
  let regexForExtraLocations = null;
28
- // /**
29
- // * Creates a set of recognized locations from predefined and extra matching patterns.
30
- // * @param extraMatchingPatternsForLocations
31
- // */
32
- // const createLocationSet = (
33
- // extraMatchingPatternsForLocations: string[] = []
34
- // ) => {
35
- // locationSet = toLowercaseSet([
36
- // ...matchingPatternsForLocations,
37
- // ...extraMatchingPatternsForLocations,
38
- // ]);
39
- // };
40
- /**
41
- * Creates a set of rejected locations from predefined and extra rejected patterns.
42
- * @param extraRejectedPatternsForLocations
43
- */
44
14
  const createRejectedLocationSet = (extraRejectedPatternsForLocations = []) => {
45
15
  rejectedLocationSet = (0, helpers_1.toLowercaseSet)([
46
16
  ...TitleSummaryRejectedPatterns_json_1.default.common,
@@ -48,73 +18,16 @@ const createRejectedLocationSet = (extraRejectedPatternsForLocations = []) => {
48
18
  ...extraRejectedPatternsForLocations,
49
19
  ]);
50
20
  };
51
- /**
52
- * Sets extra matching and rejected patterns for locations and updates the corresponding regex and sets.
53
- *
54
- * @param extraMatchingPatternsForLocations - An array of strings representing additional patterns to match locations.
55
- * @param extraRejectedPatternsForLocations - An array of strings representing additional patterns to reject locations.
56
- * @param {boolean} [shouldAvoidUsingWordBoundary=false] - A boolean indicating whether to avoid using word boundaries (useful for languages like Chinese and Japanese).
57
- *
58
- * @remarks
59
- * - For languages like Japanese that don't use spaces between words (or where word boundaries are not easily determined by spaces or punctuation),
60
- * set `shouldAvoidUsingWordBoundary` to true to remove `\b` and use lookarounds to ensure correct boundaries.
61
- */
62
21
  const setExtraMatchingPatternsForLocations = (extraMatchingPatternsForLocations = [], extraRejectedPatternsForLocations = [], shouldAvoidUsingWordBoundary = false) => {
63
22
  if (extraMatchingPatternsForLocations.length) {
64
23
  regexForExtraLocations = (0, createWordBoundaryRegex_1.createWordBoundaryRegex)(extraMatchingPatternsForLocations, {
65
24
  shouldAvoidUsingWordBoundary,
66
25
  });
67
26
  }
68
- // createLocationSet(extraMatchingPatternsForLocations);
69
27
  createRejectedLocationSet(extraRejectedPatternsForLocations);
70
28
  };
71
29
  exports.setExtraMatchingPatternsForLocations = setExtraMatchingPatternsForLocations;
72
- /**
73
- * Matches location information from an item's title and snippet using predefined or custom matching patterns.
74
- *
75
- * @param {IItem} item - The item containing title and snippet to search for location information.
76
- * @param {string[]} [customMatchingPattenrs] - Optional custom matching patterns to be included in the search.
77
- * @returns {string[]} - An array of matched results for location info after deduplication and removing overlaps.
78
- */
79
30
  const matchLocationInfo = (item, customMatchingPattenrs) => {
80
- // const title = item.title || '';
81
- // const snippet = item.snippet || '';
82
- // const matchedLocationsFromTitle: string[] =
83
- // title.match(combinedRegex) || [];
84
- // const matchedLocationsFromSnippet: string[] =
85
- // snippet.match(combinedRegex) || [];
86
- // if (
87
- // !matchedLocationsFromTitle.length &&
88
- // !matchedLocationsFromSnippet.length
89
- // ) {
90
- // return matchWithCustomPatterns(
91
- // item,
92
- // customMatchingPattenrs,
93
- // rejectedLocationSet
94
- // );
95
- // }
96
- // return cleanUpMatchedResults([
97
- // ...matchedLocationsFromTitle,
98
- // ...matchedLocationsFromSnippet,
99
- // ]);
100
- // let matched: string[] = matchPatternsInTitleAndSnippet(
101
- // item,
102
- // regexForLocations
103
- // );
104
- // if (!matched.length && regexForExtraLocations) {
105
- // matched = matchPatternsInTitleAndSnippet(item, regexForExtraLocations);
106
- // }
107
- // if (!matched.length && customMatchingPattenrs?.length) {
108
- // if (!rejectedLocationSet) {
109
- // createRejectedLocationSet();
110
- // }
111
- // matched = matchWithCustomPatterns(
112
- // item,
113
- // customMatchingPattenrs,
114
- // rejectedLocationSet
115
- // );
116
- // }
117
- // return matched;
118
31
  if (!rejectedLocationSet) {
119
32
  createRejectedLocationSet();
120
33
  }
@@ -127,21 +40,7 @@ const matchLocationInfo = (item, customMatchingPattenrs) => {
127
40
  });
128
41
  };
129
42
  exports.matchLocationInfo = matchLocationInfo;
130
- /**
131
- * Determines if a given string is a recognized location information.
132
- * @param topic - The string to check.
133
- * @returns {boolean} - True if the string is a recognized location, false otherwise.
134
- */
135
43
  const isRecognizedLocation = (str) => {
136
- // if (!locationSet) {
137
- // const sources = ALL_LOCATIONS.map((d) => d.toLowerCase());
138
- // locationSet = new Set<string>(sources);
139
- // }
140
- // locationSet = locationSet || toLowercaseSet(matchingPatternsForLocations);
141
- // if (!locationSet) {
142
- // createLocationSet();
143
- // }
144
- // return isFoundInSet(str, locationSet);
145
44
  const locationInfo = (0, exports.matchLocationInfo)({
146
45
  title: str,
147
46
  snippet: '',
@@ -149,18 +48,7 @@ const isRecognizedLocation = (str) => {
149
48
  return locationInfo.length > 0;
150
49
  };
151
50
  exports.isRecognizedLocation = isRecognizedLocation;
152
- /**
153
- * Determines if a given string is a rejected source information.
154
- * @param str - The string to check.
155
- * @returns {boolean} - True if the string is a rejected source information, false otherwise.
156
- */
157
51
  const isRejectedLocationInfo = (str) => {
158
- // if (!rejectedLocationSet) {
159
- // rejectedLocationSet = toLowercaseSet([
160
- // ...TitleSummaryRejectedPatterns.common,
161
- // ...TitleSummaryRejectedPatterns.locations,
162
- // ]);
163
- // }
164
52
  if (!rejectedLocationSet) {
165
53
  createRejectedLocationSet();
166
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"matchLocationInfo.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/matchLocationInfo.ts"],"names":[],"mappings":";;;;;;AACA,uCAUmB;AACnB,yIAAkG;AAClG,qHAAwF;AACxF,6EAA0E;AAE1E,+EAA+E;AAE/E,4BAA4B;AAC5B,oDAAoD;AAEpD,MAAM,iBAAiB,GAAG,IAAA,iDAAuB,EAAC,qDAA4B,CAAC,CAAC;AAChF,yEAAyE;AAEzE,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN,uCAAuC;AAEvC;;GAEG;AACH,IAAI,mBAAmB,GAAgB,IAAI,CAAC,CAAC,sDAAsD;AAEnG;;GAEG;AACH,IAAI,s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LocationInfo.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/matchLocationInfo.ts"],"names":[],"mappings":";;;;;;AACA,uCAUmB;AACnB,yIAAkG;AAClG,qHAAwF;AACxF,6EAA0E;AAO1E,MAAM,iBAAiB,GAAG,IAAA,iDAAuB,EAAC,qDAA4B,CAAC,CAAC;AAWhF,IAAI,mBAAmB,GAAgB,IAAI,CAAC;AAK5C,IAAI,sBAAsB,GAAW,IAAI,CAAC;AAmB1C,MAAM,yBAAyB,GAAG,CAC9B,oCAA8C,EAAE,EAClD,EAAE;IACA,mBAAmB,GAAG,IAAA,wBAAc,EAAC;QACjC,GAAG,2CAA4B,CAAC,MAAM;QACtC,GAAG,2CAA4B,CAAC,SAAS;QACzC,GAAG,iCAAiC;KACvC,CAAC,CAAC;AACP,CAAC,CAAC;AAaK,MAAM,oCAAoC,GAAG,CAChD,oCAA8C,EAAE,EAChD,oCAA8C,EAAE,EAChD,4BAA4B,GAAG,KAAK,EACtC,EAAE;IACA,IAAI,iCAAiC,CAAC,MAAM,EAAE,CAAC;QAC3C,sBAAsB,GAAG,IAAA,iDAAuB,EAC5C,iCAAiC,EACjC;YACI,4BAA4B;SAC/B,CACJ,CAAC;IACN,CAAC;IAGD,yBAAyB,CAAC,iCAAiC,CAAC,CAAC;AACjE,CAAC,CAAC;AAhBW,QAAA,oCAAoC,wCAgB/C;AASK,MAAM,iBAAiB,GAAG,CAC7B,IAAW,EACX,sBAAiC,EACpB,EAAE;IAgDf,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACvB,yBAAyB,EAAE,CAAC;IAChC,CAAC;IAED,OAAO,IAAA,oCAA0B,EAAC;QAC9B,IAAI;QACJ,kBAAkB,EAAE,iBAAiB;QACrC,aAAa,EAAE,sBAAsB;QACrC,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE,mBAAmB;KACnC,CAAC,CAAC;AACP,CAAC,CAAC;AA9DW,QAAA,iBAAiB,qBA8D5B;AAOK,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAW,EAAE;IAczD,MAAM,YAAY,GAAG,IAAA,yBAAiB,EAAC;QACnC,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,EAAE;KACL,CAAC,CAAC;IAEZ,OAAO,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;AACnC,CAAC,CAAC;AApBW,QAAA,oBAAoB,wBAoB/B;AAOK,MAAM,sBAAsB,GAAG,CAAC,GAAW,EAAW,EAAE;IAQ3D,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACvB,yBAAyB,EAAE,CAAC;IAChC,CAAC;IAED,OAAO,IAAA,sBAAY,EAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAClD,CAAC,CAAC;AAbW,QAAA,sBAAsB,0BAajC"}
@@ -1,34 +1,6 @@
1
1
  import { IItem } from '../../types';
2
2
  import { MatchResult } from './helpers';
3
- /**
4
- * Sets extra matching patterns for sources and creates corresponding regex and sets.
5
- *
6
- * @param extraMatchingPatternsForSources - An array of strings representing extra matching patterns for sources.
7
- * @param extraRejectedPatternsForSources - An array of strings representing extra rejected patterns for sources.
8
- * @param {boolean} [shouldAvoidUsingWordBoundary=false] - A boolean indicating whether to avoid using word boundaries (useful for languages like Chinese and Japanese).
9
- *
10
- * @remarks
11
- * - For languages like Japanese that don't use spaces between words (or where word boundaries are not easily determined by spaces or punctuation),
12
- * set `shouldAvoidUsingWordBoundary` to true to remove `\b` and use lookarounds to ensure correct boundaries.
13
- */
14
3
  export declare const setExtraMatchingPatternsForSources: (extraMatchingPatternsForSources: string[], extraRejectedPatternsForSources: string[], shouldAvoidUsingWordBoundary?: boolean) => void;
15
- /**
16
- * Matches source information from an item's title and snippet using predefined or custom matching patterns.
17
- *
18
- * @param {IItem} item - The item containing title and snippet to search for matching patterns.
19
- * @param {string[]} [customMatchingPattenrs] - Optional custom matching patterns to be used in addition to the predefined ones.
20
- * @returns {string[]} - An array of matched results for source info after deduplication and removal of overlaps.
21
- */
22
4
  export declare const matchSourceInfo: (item: IItem, customMatchingPattenrs?: string[]) => MatchResult[];
23
- /**
24
- * Determines if a given string is a recognized source information.
25
- * @param topic - The string to check.
26
- * @returns {boolean} - True if the string is a recognized source, false otherwise.
27
- */
28
5
  export declare const isRecognizedSource: (str: string) => boolean;
29
- /**
30
- * Determines if a given string is a rejected source information.
31
- * @param str - The string to check.
32
- * @returns {boolean} - True if the string is a rejected source information, false otherwise.
33
- */
34
6
  export declare const isRejectedSourceInfo: (str: string) => boolean;
@@ -8,43 +8,9 @@ const helpers_1 = require("./helpers");
8
8
  const TitleSummaryMatchingPatterns_Sources_json_1 = __importDefault(require("../../data/TitleSummaryMatchingPatterns_Sources.json"));
9
9
  const TitleSummaryRejectedPatterns_json_1 = __importDefault(require("../../data/TitleSummaryRejectedPatterns.json"));
10
10
  const createWordBoundaryRegex_1 = require("../util/createWordBoundaryRegex");
11
- // /**
12
- // * Pre-defined matching patterns for sources.
13
- // */
14
- // const matchingPatternsForSources = TitleSummaryMatchingPatterns.sources;
15
- /**
16
- * Regular expression to match source information in a case-insensitive manner.
17
- * The patterns in TitleSummaryMatchingPatterns is already escaped.
18
- */
19
11
  const regexForSourceInfo = (0, createWordBoundaryRegex_1.createWordBoundaryRegex)(TitleSummaryMatchingPatterns_Sources_json_1.default);
20
- // const regexForSourceInfo = new RegExp(`\\b(${matchingPatternsForSources})\\b`, 'gi');
21
- // /**
22
- // * set of matching patterns for source info
23
- // */
24
- // let sourcesSet: Set<string> = null;
25
- /**
26
- * Set of rejected sources.
27
- */
28
12
  let rejectedSourcesSet = null;
29
- /**
30
- * Regular expression to match additional source information.
31
- */
32
13
  let regexForExtraSources = null;
33
- // /**
34
- // * Create a set of recognized sources from predefined and extra matching patterns.
35
- // * @param extraMatchingPatternsForSources
36
- // */
37
- // const createSourcesSet = (extraMatchingPatternsForSources: string[] = []) => {
38
- // sourcesSet = toLowercaseSet([
39
- // ...TitleSummaryMatchingPatterns.sources,
40
- // ...extraMatchingPatternsForSources,
41
- // ]);
42
- // };
43
- /**
44
- * Creates a set of rejected sources from predefined and extra rejected patterns.
45
- *
46
- * @param {string[]} extraRejectedPatternsForSources - Additional rejected patterns to be set.
47
- */
48
14
  const createRejectedSourcesSet = (extraRejectedPatternsForSources = []) => {
49
15
  rejectedSourcesSet = (0, helpers_1.toLowercaseSet)([
50
16
  ...TitleSummaryRejectedPatterns_json_1.default.common,
@@ -52,17 +18,6 @@ const createRejectedSourcesSet = (extraRejectedPatternsForSources = []) => {
52
18
  ...extraRejectedPatternsForSources,
53
19
  ]);
54
20
  };
55
- /**
56
- * Sets extra matching patterns for sources and creates corresponding regex and sets.
57
- *
58
- * @param extraMatchingPatternsForSources - An array of strings representing extra matching patterns for sources.
59
- * @param extraRejectedPatternsForSources - An array of strings representing extra rejected patterns for sources.
60
- * @param {boolean} [shouldAvoidUsingWordBoundary=false] - A boolean indicating whether to avoid using word boundaries (useful for languages like Chinese and Japanese).
61
- *
62
- * @remarks
63
- * - For languages like Japanese that don't use spaces between words (or where word boundaries are not easily determined by spaces or punctuation),
64
- * set `shouldAvoidUsingWordBoundary` to true to remove `\b` and use lookarounds to ensure correct boundaries.
65
- */
66
21
  const setExtraMatchingPatternsForSources = (extraMatchingPatternsForSources, extraRejectedPatternsForSources, shouldAvoidUsingWordBoundary = false) => {
67
22
  if (extraMatchingPatternsForSources &&
68
23
  extraMatchingPatternsForSources.length > 0) {
@@ -70,52 +25,10 @@ const setExtraMatchingPatternsForSources = (extraMatchingPatternsForSources, ext
70
25
  shouldAvoidUsingWordBoundary,
71
26
  });
72
27
  }
73
- // createSourcesSet(extraMatchingPatternsForSources);
74
28
  createRejectedSourcesSet(extraRejectedPatternsForSources);
75
29
  };
76
30
  exports.setExtraMatchingPatternsForSources = setExtraMatchingPatternsForSources;
77
- /**
78
- * Matches source information from an item's title and snippet using predefined or custom matching patterns.
79
- *
80
- * @param {IItem} item - The item containing title and snippet to search for matching patterns.
81
- * @param {string[]} [customMatchingPattenrs] - Optional custom matching patterns to be used in addition to the predefined ones.
82
- * @returns {string[]} - An array of matched results for source info after deduplication and removal of overlaps.
83
- */
84
31
  const matchSourceInfo = (item, customMatchingPattenrs) => {
85
- // const title = item.title || '';
86
- // const snippet = item.snippet || '';
87
- // const matchedStrFromTitle: string[] = title.match(regex4SourceInfo) || [];
88
- // const matchedStrFromSnippet: string[] =
89
- // snippet.match(regex4SourceInfo) || [];
90
- // if (!matchedStrFromTitle.length && !matchedStrFromSnippet.length) {
91
- // return matchWithCustomPatterns(
92
- // item,
93
- // customMatchingPattenrs,
94
- // rejectedSourcesSet
95
- // );
96
- // }
97
- // return cleanUpMatchedResults([
98
- // ...matchedStrFromTitle,
99
- // ...matchedStrFromSnippet,
100
- // ]);
101
- // let matched: string[] = matchPatternsInTitleAndSnippet(
102
- // item,
103
- // regexForSourceInfo
104
- // );
105
- // if (!matched.length && regexForExtraSources) {
106
- // matched = matchPatternsInTitleAndSnippet(item, regexForExtraSources);
107
- // }
108
- // if (!matched.length && customMatchingPattenrs?.length) {
109
- // if (!rejectedSourcesSet) {
110
- // createRejectedSourcesSet();
111
- // }
112
- // matched = matchWithCustomPatterns(
113
- // item,
114
- // customMatchingPattenrs,
115
- // rejectedSourcesSet
116
- // );
117
- // }
118
- // return matched;
119
32
  if (!rejectedSourcesSet) {
120
33
  createRejectedSourcesSet();
121
34
  }
@@ -128,24 +41,7 @@ const matchSourceInfo = (item, customMatchingPattenrs) => {
128
41
  });
129
42
  };
130
43
  exports.matchSourceInfo = matchSourceInfo;
131
- /**
132
- * Determines if a given string is a recognized source information.
133
- * @param topic - The string to check.
134
- * @returns {boolean} - True if the string is a recognized source, false otherwise.
135
- */
136
44
  const isRecognizedSource = (str) => {
137
- // if (!sourcesSet) {
138
- // const sources = TitleSummaryMatchingPatterns.sources.map((d) =>
139
- // d.toLowerCase()
140
- // );
141
- // sourcesSet = new Set<string>(sources);
142
- // }
143
- // sourcesSet =
144
- // sourcesSet || toLowercaseSet(TitleSummaryMatchingPatterns?.sources);
145
- // if (!sourcesSet) {
146
- // createSourcesSet();
147
- // }
148
- // return isFoundInSet(str, sourcesSet);
149
45
  const sourceInfo = (0, exports.matchSourceInfo)({
150
46
  title: str,
151
47
  snippet: '',
@@ -153,17 +49,8 @@ const isRecognizedSource = (str) => {
153
49
  return sourceInfo.length > 0;
154
50
  };
155
51
  exports.isRecognizedSource = isRecognizedSource;
156
- /**
157
- * Determines if a given string is a rejected source information.
158
- * @param str - The string to check.
159
- * @returns {boolean} - True if the string is a rejected source information, false otherwise.
160
- */
161
52
  const isRejectedSourceInfo = (str) => {
162
53
  if (!rejectedSourcesSet) {
163
- // rejectedSourcesSet = toLowercaseSet([
164
- // ...TitleSummaryRejectedPatterns.common,
165
- // ...TitleSummaryRejectedPatterns.sources,
166
- // ]);
167
54
  createRejectedSourcesSet();
168
55
  }
169
56
  return (0, helpers_1.isFoundInSet)(str, rejectedSourcesSet);
@@ -1 +1 @@
1
- {"version":3,"file":"matchSourceInfo.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/matchSourceInfo.ts"],"names":[],"mappings":";;;;;;AACA,uCAUmB;AACnB,qIAA8F;AAC9F,qHAAwF;AACxF,6EAA0E;AAE1E,MAAM;AACN,gDAAgD;AAChD,MAAM;AACN,2EAA2E;AAE3E;;;GAGG;AACH,MAAM,kBAAkB,GAAG,IAAA,iDAAuB,EAAC,mDAA0B,CAAC,CAAC;AAC/E,wFAAwF;AAExF,MAAM;AACN,8CAA8C;AAC9C,MAAM;AACN,sCAAsC;AACtC;;GAEG;AACH,IAAI,kBAAkB,GAAgB,IAAI,CAAC;AAE3C;;GAEG;AACH,IAAI,oBAAoB,GAAW,IAAI,CAAC;AAExC,MAAM;AACN,qFAAqF;AACrF,4CAA4C;AAC5C,MAAM;AACN,iFAAiF;AACjF,oCAAoC;AACpC,mDAAmD;AACnD,8CAA8C;AAC9C,UAAU;AACV,KAAK;AAEL;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,CAC7B,kCAA4C,E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EAAC;QAC9B,IAAI;QACJ,kBAAkB,EAAE,kBAAkB;QACtC,aAAa,EAAE,oBAAoB;QACnC,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE,kBAAkB;KAClC,CAAC,CAAC;AACP,CAAC,CAAC;AA1DW,QAAA,eAAe,mBA0D1B;AAEF;;;;GAIG;AACI,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAAW,EAAE;IACvD,qBAAqB;IACrB,sEAAsE;IACtE,0BAA0B;IAC1B,SAAS;IACT,6CAA6C;IAC7C,IAAI;IAEJ,eAAe;IACf,2EAA2E;IAE3E,qBAAqB;IACrB,0BAA0B;IAC1B,IAAI;IAEJ,wCAAwC;IAExC,MAAM,UAAU,GAAG,IAAA,uBAAe,EAAC;QAC/B,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,EAAE;KACL,CAAC,CAAC;IAEZ,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;AACjC,CAAC,CAAC;AAvBW,QAAA,kBAAkB,sBAuB7B;AAEF;;;;GAIG;AACI,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAW,EAAE;IACzD,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACtB,wCAAwC;QACxC,8CAA8C;QAC9C,+CAA+C;QAC/C,MAAM;QACN,wBAAwB,EAAE,CAAC;IAC/B,CAAC;IAED,OAAO,IAAA,sBAAY,EAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;AACjD,CAAC,CAAC;AAVW,QAAA,oBAAoB,wBAU/B"}
1
+ {"version":3,"file":"matchSourceInfo.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/matchSourceInfo.ts"],"names":[],"mappings":";;;;;;AACA,uCAUmB;AACnB,qIAA8F;AAC9F,qHAAwF;AACxF,6EAA0E;AAW1E,MAAM,kBAAkB,GAAG,IAAA,iDAAuB,EAAC,mDAA0B,CAAC,CAAC;AAU/E,IAAI,kBAAkB,GAAgB,IAAI,CAAC;AAK3C,IAAI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AAM,oBAAoB,GAAG,CAAC,GAAW,EAAW,EAAE;IACzD,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAKtB,wBAAwB,EAAE,CAAC;IAC/B,CAAC;IAED,OAAO,IAAA,sBAAY,EAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;AACjD,CAAC,CAAC;AAVW,QAAA,oBAAoB,wBAU/B"}
@@ -1,36 +1,6 @@
1
1
  import { IItem } from '../../types';
2
2
  import { MatchResult } from './helpers';
3
- /**
4
- * Sets additional matching patterns for topics.
5
- * The additional matching patterns and rejected patterns are not included in the TitleSummaryMatchingPatterns
6
- * but fetched from the media folder from the Living Atlas server.
7
- *
8
- * @param {string[]} extraMatchingPatterns - Additional matching patterns to be set.
9
- * @param {string[]} extraRejectedPatterns - Additional rejected patterns to be set.
10
- * @param {boolean} [shouldAvoidUsingWordBoundary=false] - A boolean indicating whether to avoid using word boundaries (useful for languages like Chinese and Japanese).
11
- *
12
- * @remarks
13
- * - For languages like Japanese that don't use spaces between words (or where word boundaries are not easily determined by spaces or punctuation),
14
- * set `shouldAvoidUsingWordBoundary` to true to remove `\b` and use lookarounds to ensure correct boundaries.
15
- */
16
3
  export declare const setExtraMatchingPatternsForTopics: (extraMatchingPatterns: string[], extraRejectedPatterns: string[], shouldAvoidUsingWordBoundary?: boolean) => void;
17
- /**
18
- * Matches topic information from an item's title and snippet using predefined or custom matching patterns.
19
- *
20
- * @param {IItem} item - The item containing the title and snippet to be matched.
21
- * @param {string[]} [customMatchingPattenrs] - Optional custom matching patterns to be used in addition to the predefined ones.
22
- * @returns {MatchResult[]} - An array of matched results for topic, deduplicated and with overlaps removed.
23
- */
24
4
  export declare const matchTopicInfo: (item: IItem, customMatchingPattenrs?: string[]) => MatchResult[];
25
- /**
26
- * Determines if a given string is a recognized topic.
27
- * @param topic - The string to check.
28
- * @returns {boolean} - True if the string is a recognized topic, false otherwise.
29
- */
30
5
  export declare const isRecognizedTopic: (str: string) => boolean;
31
- /**
32
- * Determines if a given string is a rejected topic.
33
- * @param str - The string to check.
34
- * @returns {boolean} - True if the string is a rejected topic, false otherwise.
35
- */
36
6
  export declare const isRejectedTopicInfo: (str: string) => boolean;
@@ -8,50 +8,11 @@ const helpers_1 = require("./helpers");
8
8
  const TitleSummaryMatchingPatterns_Topics_json_1 = __importDefault(require("../../data/TitleSummaryMatchingPatterns_Topics.json"));
9
9
  const TitleSummaryRejectedPatterns_json_1 = __importDefault(require("../../data/TitleSummaryRejectedPatterns.json"));
10
10
  const createWordBoundaryRegex_1 = require("../util/createWordBoundaryRegex");
11
- /**
12
- * Regular expression to match topic information in a case-insensitive manner.
13
- * The pattern in TitleSummaryMatchingPatterns is already escaped.
14
- */
15
11
  const regexForTopics = (0, createWordBoundaryRegex_1.createWordBoundaryRegex)(TitleSummaryMatchingPatterns_Topics_json_1.default, {
16
12
  shouldMatchPlural: true,
17
13
  });
18
- // const regexForTopics = new RegExp(`\\b(${matchingPatternsForTopics})\\b`, 'gi');
19
- // /**
20
- // * Set of recognized topics.
21
- // */
22
- // let topicsSet: Set<string> = null; //new Set<string>(TitleSummaryMatchingPatterns.topics);
23
- /**
24
- * Set of rejected topics.
25
- */
26
- let rejectedTopicsSet = null; //new Set<string>(TitleSummaryMatchingPatterns.topics)
27
- /**
28
- * Regular expression to match additional topic information.
29
- */
14
+ let rejectedTopicsSet = null;
30
15
  let regexForExtraTopics = null;
31
- // /**
32
- // * Array of additional matching patterns for topics.
33
- // */
34
- // let extraMatchingPatternsForTopics: string[] = [];
35
- // /**
36
- // * Array of additional rejected patterns for topics.
37
- // */
38
- // let extraRejectedPatternsForTopics: string[] = [];
39
- // /**
40
- // * Creates a set of recognized topics from predefined and extra matching patterns.
41
- // *
42
- // * @param {string[]} extraMatchingPatternsForTopics - Additional matching patterns to be set.
43
- // */
44
- // const createTopicsSet = (extraMatchingPatternsForTopics: string[] = []) => {
45
- // topicsSet = toLowercaseSet([
46
- // ...TitleSummaryMatchingPatterns.topics,
47
- // ...extraMatchingPatternsForTopics,
48
- // ]);
49
- // };
50
- /**
51
- * Creates a set of rejected topics from predefined and extra rejected patterns.
52
- *
53
- * @param {string[]} extraRejectedPatternsForTopics - Additional rejected patterns to be set.
54
- */
55
16
  const createRejectedTopicsSet = (extraRejectedPatternsForTopics = []) => {
56
17
  rejectedTopicsSet = (0, helpers_1.toLowercaseSet)([
57
18
  ...TitleSummaryRejectedPatterns_json_1.default.common,
@@ -59,74 +20,17 @@ const createRejectedTopicsSet = (extraRejectedPatternsForTopics = []) => {
59
20
  ...extraRejectedPatternsForTopics,
60
21
  ]);
61
22
  };
62
- /**
63
- * Sets additional matching patterns for topics.
64
- * The additional matching patterns and rejected patterns are not included in the TitleSummaryMatchingPatterns
65
- * but fetched from the media folder from the Living Atlas server.
66
- *
67
- * @param {string[]} extraMatchingPatterns - Additional matching patterns to be set.
68
- * @param {string[]} extraRejectedPatterns - Additional rejected patterns to be set.
69
- * @param {boolean} [shouldAvoidUsingWordBoundary=false] - A boolean indicating whether to avoid using word boundaries (useful for languages like Chinese and Japanese).
70
- *
71
- * @remarks
72
- * - For languages like Japanese that don't use spaces between words (or where word boundaries are not easily determined by spaces or punctuation),
73
- * set `shouldAvoidUsingWordBoundary` to true to remove `\b` and use lookarounds to ensure correct boundaries.
74
- */
75
23
  const setExtraMatchingPatternsForTopics = (extraMatchingPatterns, extraRejectedPatterns, shouldAvoidUsingWordBoundary = false) => {
76
- // extraMatchingPatternsForTopics = matchingPatterns || [];
77
- // extraRejectedPatternsForTopics = rejectedPatterns || [];
78
24
  if (extraMatchingPatterns && extraMatchingPatterns.length) {
79
25
  regexForExtraTopics = (0, createWordBoundaryRegex_1.createWordBoundaryRegex)(extraMatchingPatterns, {
80
26
  shouldAvoidUsingWordBoundary,
81
27
  shouldMatchPlural: true,
82
28
  });
83
29
  }
84
- // createTopicsSet(extraMatchingPatterns);
85
30
  createRejectedTopicsSet(extraRejectedPatterns);
86
31
  };
87
32
  exports.setExtraMatchingPatternsForTopics = setExtraMatchingPatternsForTopics;
88
- /**
89
- * Matches topic information from an item's title and snippet using predefined or custom matching patterns.
90
- *
91
- * @param {IItem} item - The item containing the title and snippet to be matched.
92
- * @param {string[]} [customMatchingPattenrs] - Optional custom matching patterns to be used in addition to the predefined ones.
93
- * @returns {MatchResult[]} - An array of matched results for topic, deduplicated and with overlaps removed.
94
- */
95
33
  const matchTopicInfo = (item, customMatchingPattenrs) => {
96
- // const title = item.title || '';
97
- // const snippet = item.snippet || '';
98
- // const matchedStrFromTitle: string[] = title.match(regexForTopics) || [];
99
- // const matchedStrFromSnippet: string[] = snippet.match(regexForTopics) || [];
100
- // if (!matchedStrFromTitle.length && !matchedStrFromSnippet.length) {
101
- // return matchWithCustomPatterns(item, customMatchingPattenrs);
102
- // }
103
- // return cleanUpMatchedResults([
104
- // ...matchedStrFromTitle,
105
- // ...matchedStrFromSnippet,
106
- // ]);
107
- // // match topics using patterns from the TitleSummaryMatchingPatterns
108
- // let matched: string[] = matchPatternsInTitleAndSnippet(
109
- // item,
110
- // regexForTopics
111
- // );
112
- // // if no matches found, try matching with extra patterns if provided
113
- // // the extra patterns are not included in the TitleSummaryMatchingPatterns
114
- // // but fetched from the media folder from the Living Atlas server
115
- // if (!matched.length && regexForExtraTopics) {
116
- // matched = matchPatternsInTitleAndSnippet(item, regexForExtraTopics);
117
- // }
118
- // // if still no matches found, try matching with custom patterns if provided
119
- // if (!matched.length && customMatchingPattenrs?.length) {
120
- // if (!rejectedTopicsSet) {
121
- // createRejectedTopicsSet();
122
- // }
123
- // matched = matchWithCustomPatterns(
124
- // item,
125
- // customMatchingPattenrs,
126
- // rejectedTopicsSet
127
- // );
128
- // }
129
- // return matched;
130
34
  if (!rejectedTopicsSet) {
131
35
  createRejectedTopicsSet();
132
36
  }
@@ -139,20 +43,7 @@ const matchTopicInfo = (item, customMatchingPattenrs) => {
139
43
  });
140
44
  };
141
45
  exports.matchTopicInfo = matchTopicInfo;
142
- /**
143
- * Determines if a given string is a recognized topic.
144
- * @param topic - The string to check.
145
- * @returns {boolean} - True if the string is a recognized topic, false otherwise.
146
- */
147
46
  const isRecognizedTopic = (str) => {
148
- // if (!topicsSet) {
149
- // // topicsSet = toLowercaseSet([
150
- // // ...TitleSummaryMatchingPatterns.topics,
151
- // // ...extraMatchingPatternsForTopics,
152
- // // ]);
153
- // createTopicsSet();
154
- // }
155
- // return isFoundInSet(str, topicsSet);
156
47
  const topicInfo = (0, exports.matchTopicInfo)({
157
48
  title: str,
158
49
  snippet: '',
@@ -160,11 +51,6 @@ const isRecognizedTopic = (str) => {
160
51
  return topicInfo.length > 0;
161
52
  };
162
53
  exports.isRecognizedTopic = isRecognizedTopic;
163
- /**
164
- * Determines if a given string is a rejected topic.
165
- * @param str - The string to check.
166
- * @returns {boolean} - True if the string is a rejected topic, false otherwise.
167
- */
168
54
  const isRejectedTopicInfo = (str) => {
169
55
  if (!rejectedTopicsSet) {
170
56
  createRejectedTopicsSet();
@@ -1 +1 @@
1
- {"version":3,"file":"matchTopicInfo.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/matchTopicInfo.ts"],"names":[],"mappings":";;;;;;AACA,uCAUmB;AACnB,mIAA4F;AAC5F,qHAAwF;AACxF,6EAA0E;AAE1E;;;GAGG;AACH,MAAM,cAAc,GAAG,IAAA,iDAAuB,EAAC,kDAAyB,EAAE;IACtE,iBAAiB,EAAE,IAAI;CAC1B,CAAC,CAAC;AACH,mFAAmF;AAEnF,MAAM;AACN,+BAA+B;AAC/B,MAAM;AACN,6FAA6F;AAE7F;;GAEG;AACH,IAAI,iBAAiB,GAAgB,IAAI,CAAC,CAAC,sDAAsD;AAEjG;;GAEG;AACH,IAAI,mBAAmB,GAAW,IAAI,CAAC;AAEvC,MAAM;AACN,uDAAuD;AACvD,MAAM;AACN,qDAAqD;AACrD,MAAM;AACN,uDAAuD;AACvD,MAAM;AACN,qDAAqD;AAErD,MAAM;AACN,qFAAqF;AACrF,KAAK;AACL,gGAAgG;AAChG,MAAM;AACN,+EAA+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ACzC,gBAAgB;IAChB,kCAAkC;IAClC,4BAA4B;IAC5B,SAAS;IACT,IAAI;IAEJ,kBAAkB;IAElB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACrB,uBAAuB,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO,IAAA,oCAA0B,EAAC;QAC9B,IAAI;QACJ,kBAAkB,EAAE,cAAc;QAClC,aAAa,EAAE,mBAAmB;QAClC,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE,iBAAiB;KACjC,CAAC,CAAC;AACP,CAAC,CAAC;AA1DW,QAAA,cAAc,kBA0DzB;AAEF;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAW,EAAE;IACtD,oBAAoB;IACpB,sCAAsC;IACtC,qDAAqD;IACrD,gDAAgD;IAChD,aAAa;IACb,yBAAyB;IACzB,IAAI;IAEJ,uCAAuC;IAEvC,MAAM,SAAS,GAAG,IAAA,sBAAc,EAAC;QAC7B,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,EAAE;KACL,CAAC,CAAC;IAEZ,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;AAChC,CAAC,CAAC;AAjBW,QAAA,iBAAiB,qBAiB5B;AAEF;;;;GAIG;AACI,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAAW,EAAE;IACxD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACrB,uBAAuB,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO,IAAA,sBAAY,EAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;AAChD,CAAC,CAAC;AANW,QAAA,mBAAmB,uBAM9B"}
1
+ {"version":3,"file":"matchTopicInfo.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/matchTopicInfo.ts"],"names":[],"mappings":";;;;;;AACA,uCAUmB;AACnB,mIAA4F;AAC5F,qHAAwF;AACxF,6EAA0E;AAM1E,MAAM,cAAc,GAAG,IAAA,iDAAuB,EAAC,kDAAyB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L,CAAC,CAAC;IAEZ,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;AAChC,CAAC,CAAC;AAjBW,QAAA,iBAAiB,qBAiB5B;AAOK,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAAW,EAAE;IACxD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACrB,uBAAuB,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO,IAAA,sBAAY,EAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;AAChD,CAAC,CAAC;AANW,QAAA,mBAAmB,uBAM9B"}
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- // import { ScoringConfig } from '../../types';
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.scoringConfig = void 0;
5
4
  exports.scoringConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"scoringConfig.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/scoringConfig.ts"],"names":[],"mappings":";AAAA,+CAA+C;;;AAElC,QAAA,aAAa,GAAG;IACzB,MAAM,EAAE,EAAE;IACV,cAAc,EAAE;QACZ,OAAO,EAAE;YACL,sBAAsB,EAAE,IAAI;YAC5B,kBAAkB,EAAE,IAAI;YACxB,oBAAoB,EAAE,IAAI;YAC1B,mBAAmB,EAAE,IAAI;SAC5B;KACJ;CACJ,CAAC"}
1
+ {"version":3,"file":"scoringConfig.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/scoringConfig.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG;IACzB,MAAM,EAAE,EAAE;IACV,cAAc,EAAE;QACZ,OAAO,EAAE;YACL,sBAAsB,EAAE,IAAI;YAC5B,kBAAkB,EAAE,IAAI;YACxB,oBAAoB,EAAE,IAAI;YAC1B,mBAAmB,EAAE,IAAI;SAC5B;KACJ;CACJ,CAAC"}
@@ -1,21 +1,5 @@
1
- /**
2
- * Threshold of the minimum total score
3
- */
4
1
  export declare const MINIMUM_SCORE_THRESHHOLD = 80;
5
- /**
6
- * array of strings that should not be in item title or snippet
7
- */
8
2
  export declare const PROHIBITED_LIST: RegExp[];
9
- /**
10
- * array of item types that are supported by the Living Atlas
11
- */
12
3
  export declare const LIVING_ATLAS_SUPPORTED_ITEM_TYPES: readonly ["CityEngine Web Scene", "Dashboard", "Deep Learning Package", "Desktop Style", "Document Link", "Feature Collection", "Feature Service", "Image Service", "Map Service", "Project Package", "Raster function template", "Rule Package", "Scene Service", "StoryMap", "Style", "Vector Tile Service", "Web Experience", "Web Experience Template", "Web Map", "Web Mapping Application", "Web Scene", "WMS", "Group Layer", "Geoprocessing Sample"];
13
- /**
14
- * Type definition for Living Atlas supported item types.
15
- */
16
4
  export type LivingAtlasSupportedItemType = (typeof LIVING_ATLAS_SUPPORTED_ITEM_TYPES)[number];
17
- /**
18
- * Account that are recognized as official Esri accounts.
19
- * This list is used in the Living Atlas Browse page to query Esri-owned content.
20
- */
21
5
  export declare const ESRI_OFFICIAL_ACCOUNTS: string[];