@vannizhang/living-atlas-content-validator 1.5.21 → 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.
- package/dist/configureSettings.d.ts +0 -103
- package/dist/configureSettings.js +1 -43
- package/dist/configureSettings.js.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/accessInformation/isValidAccessInformation.d.ts +0 -8
- package/dist/lib/accessInformation/isValidAccessInformation.js +0 -12
- package/dist/lib/accessInformation/isValidAccessInformation.js.map +1 -1
- package/dist/lib/accessInformation/scoringConfig.js +0 -4
- package/dist/lib/accessInformation/scoringConfig.js.map +1 -1
- package/dist/lib/checkProfanities/checkProfanities.d.ts +0 -5
- package/dist/lib/checkProfanities/checkProfanities.js +0 -8
- package/dist/lib/checkProfanities/checkProfanities.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.d.ts +0 -28
- package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js +0 -35
- package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/config.d.ts +0 -84
- package/dist/lib/checkTitleAndSnippetSearchability/config.js +0 -17
- package/dist/lib/checkTitleAndSnippetSearchability/config.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/data.js +0 -692
- package/dist/lib/checkTitleAndSnippetSearchability/data.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.d.ts +0 -94
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.js +0 -105
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.d.ts +0 -28
- package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.js +1 -111
- package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.d.ts +0 -28
- package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.js +1 -113
- package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.d.ts +0 -28
- package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.js +0 -113
- package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.d.ts +0 -30
- package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.js +1 -115
- package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.js +0 -1
- package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.js.map +1 -1
- package/dist/lib/config.d.ts +0 -16
- package/dist/lib/config.js +0 -140
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/deleteProtection/isDeleteProtectionEnabled.d.ts +0 -8
- package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js +0 -11
- package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js.map +1 -1
- package/dist/lib/deleteProtection/scoringConfig.js +0 -1
- package/dist/lib/deleteProtection/scoringConfig.js.map +1 -1
- package/dist/lib/deprecated/isDeprecated.d.ts +0 -8
- package/dist/lib/deprecated/isDeprecated.js +0 -9
- package/dist/lib/deprecated/isDeprecated.js.map +1 -1
- package/dist/lib/deprecated/scoringConfig.js +0 -1
- package/dist/lib/deprecated/scoringConfig.js.map +1 -1
- package/dist/lib/description/findDataSource.d.ts +0 -10
- package/dist/lib/description/findDataSource.js +0 -22
- package/dist/lib/description/findDataSource.js.map +1 -1
- package/dist/lib/description/isValidDescription.d.ts +0 -17
- package/dist/lib/description/isValidDescription.js +0 -52
- package/dist/lib/description/isValidDescription.js.map +1 -1
- package/dist/lib/description/scoringConfig.js +0 -1
- package/dist/lib/description/scoringConfig.js.map +1 -1
- package/dist/lib/description/scoringRulesConfig.js +0 -47
- package/dist/lib/description/scoringRulesConfig.js.map +1 -1
- package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.d.ts +0 -8
- package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.js +0 -12
- package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.js.map +1 -1
- package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.d.ts +0 -6
- package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.js +0 -12
- package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.js.map +1 -1
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.d.ts +0 -8
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.js +0 -16
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.js.map +1 -1
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.d.ts +0 -5
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.js +0 -9
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.d.ts +0 -23
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js +0 -43
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/helpers.d.ts +0 -16
- package/dist/lib/featureServiceFieldAliases/helpers.js +5 -21
- package/dist/lib/featureServiceFieldAliases/helpers.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/scoringConfig.js +0 -1
- package/dist/lib/featureServiceFieldAliases/scoringConfig.js.map +1 -1
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.d.ts +0 -22
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js +0 -58
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js.map +1 -1
- package/dist/lib/featureServiceFieldDescriptions/helpers.d.ts +0 -17
- package/dist/lib/featureServiceFieldDescriptions/helpers.js +5 -22
- package/dist/lib/featureServiceFieldDescriptions/helpers.js.map +1 -1
- package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js +0 -1
- package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js.map +1 -1
- package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.d.ts +0 -8
- package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.js +0 -8
- package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.js.map +1 -1
- package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.d.ts +0 -5
- package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.js +0 -6
- package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.js.map +1 -1
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.d.ts +0 -19
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js +0 -40
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js.map +1 -1
- package/dist/lib/featureServiceFieldValueTypes/helpers.d.ts +0 -13
- package/dist/lib/featureServiceFieldValueTypes/helpers.js +2 -15
- package/dist/lib/featureServiceFieldValueTypes/helpers.js.map +1 -1
- package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js +0 -1
- package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js.map +1 -1
- package/dist/lib/itemExtent/checkItemExtent.d.ts +0 -25
- package/dist/lib/itemExtent/checkItemExtent.js +0 -30
- package/dist/lib/itemExtent/checkItemExtent.js.map +1 -1
- package/dist/lib/itemExtent/checkItemExtentHelpers.d.ts +0 -31
- package/dist/lib/itemExtent/checkItemExtentHelpers.js +0 -36
- package/dist/lib/itemExtent/checkItemExtentHelpers.js.map +1 -1
- package/dist/lib/licenseInfo/isValidLicenseInfo.d.ts +0 -32
- package/dist/lib/licenseInfo/isValidLicenseInfo.js +2 -49
- package/dist/lib/licenseInfo/isValidLicenseInfo.js.map +1 -1
- package/dist/lib/licenseInfo/scoringConfig.js +0 -1
- package/dist/lib/licenseInfo/scoringConfig.js.map +1 -1
- package/dist/lib/licenseInfo/scoringRulesConfig.js +0 -47
- package/dist/lib/licenseInfo/scoringRulesConfig.js.map +1 -1
- package/dist/lib/sharing/isValidAccess.d.ts +0 -20
- package/dist/lib/sharing/isValidAccess.js +2 -28
- package/dist/lib/sharing/isValidAccess.js.map +1 -1
- package/dist/lib/sharing/scoringConfig.js +0 -1
- package/dist/lib/sharing/scoringConfig.js.map +1 -1
- package/dist/lib/sharing/scoringRulesConfig.js +0 -47
- package/dist/lib/sharing/scoringRulesConfig.js.map +1 -1
- package/dist/lib/ssl/isValidSSL.d.ts +0 -12
- package/dist/lib/ssl/isValidSSL.js +6 -31
- package/dist/lib/ssl/isValidSSL.js.map +1 -1
- package/dist/lib/ssl/scoringConfig.js +0 -4
- package/dist/lib/ssl/scoringConfig.js.map +1 -1
- package/dist/lib/ssl/scoringRulesConfig.js +0 -41
- package/dist/lib/ssl/scoringRulesConfig.js.map +1 -1
- package/dist/lib/summary/isValidSummary.d.ts +0 -15
- package/dist/lib/summary/isValidSummary.js +1 -47
- package/dist/lib/summary/isValidSummary.js.map +1 -1
- package/dist/lib/summary/scoringConfig.js +0 -1
- package/dist/lib/summary/scoringConfig.js.map +1 -1
- package/dist/lib/summary/scoringRulesConfig.js +0 -53
- package/dist/lib/summary/scoringRulesConfig.js.map +1 -1
- package/dist/lib/tags/isValidTags.d.ts +0 -12
- package/dist/lib/tags/isValidTags.js +1 -20
- package/dist/lib/tags/isValidTags.js.map +1 -1
- package/dist/lib/tags/scoringConfig.js +0 -5
- package/dist/lib/tags/scoringConfig.js.map +1 -1
- package/dist/lib/tags/scoringRulesConfig.js +0 -41
- package/dist/lib/tags/scoringRulesConfig.js.map +1 -1
- package/dist/lib/thumbnail/isValidThumbnail.d.ts +0 -8
- package/dist/lib/thumbnail/isValidThumbnail.js +1 -30
- package/dist/lib/thumbnail/isValidThumbnail.js.map +1 -1
- package/dist/lib/thumbnail/scoringConfig.js +0 -9
- package/dist/lib/thumbnail/scoringConfig.js.map +1 -1
- package/dist/lib/thumbnail/scoringRulesConfig.js +0 -41
- package/dist/lib/thumbnail/scoringRulesConfig.js.map +1 -1
- package/dist/lib/title/isValidTitle.d.ts +0 -21
- package/dist/lib/title/isValidTitle.js +1 -55
- package/dist/lib/title/isValidTitle.js.map +1 -1
- package/dist/lib/title/scoringConfig.js +0 -1
- package/dist/lib/title/scoringConfig.js.map +1 -1
- package/dist/lib/title/scoringRulesConfig.js +0 -52
- package/dist/lib/title/scoringRulesConfig.js.map +1 -1
- package/dist/lib/userProfileDescription/isValidUserProfileDescription.d.ts +0 -21
- package/dist/lib/userProfileDescription/isValidUserProfileDescription.js +2 -76
- package/dist/lib/userProfileDescription/isValidUserProfileDescription.js.map +1 -1
- package/dist/lib/userProfileDescription/scoringConfig.js +0 -1
- package/dist/lib/userProfileDescription/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileDescription/scoringRulesConfig.js +0 -59
- package/dist/lib/userProfileDescription/scoringRulesConfig.js.map +1 -1
- package/dist/lib/userProfileName/isValidUserProfileName.d.ts +0 -8
- package/dist/lib/userProfileName/isValidUserProfileName.js +2 -26
- package/dist/lib/userProfileName/isValidUserProfileName.js.map +1 -1
- package/dist/lib/userProfileName/scoringConfig.js +0 -5
- package/dist/lib/userProfileName/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileName/scoringRulesConfig.js +0 -41
- package/dist/lib/userProfileName/scoringRulesConfig.js.map +1 -1
- package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.d.ts +0 -12
- package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js +3 -27
- package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js.map +1 -1
- package/dist/lib/userProfileThumbnail/scoringConfig.js +0 -4
- package/dist/lib/userProfileThumbnail/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileThumbnail/scoringRulesConfig.js +0 -35
- package/dist/lib/userProfileThumbnail/scoringRulesConfig.js.map +1 -1
- package/dist/lib/util/assertString.d.ts +0 -10
- package/dist/lib/util/assertString.js +0 -11
- package/dist/lib/util/assertString.js.map +1 -1
- package/dist/lib/util/checkIsLayer.d.ts +0 -5
- package/dist/lib/util/checkIsLayer.js +0 -5
- package/dist/lib/util/checkIsLayer.js.map +1 -1
- package/dist/lib/util/contains.d.ts +0 -6
- package/dist/lib/util/contains.js +0 -7
- package/dist/lib/util/contains.js.map +1 -1
- package/dist/lib/util/containsNonEnglishCharacters.d.ts +0 -12
- package/dist/lib/util/containsNonEnglishCharacters.js +2 -16
- package/dist/lib/util/containsNonEnglishCharacters.js.map +1 -1
- package/dist/lib/util/countSentences.d.ts +0 -22
- package/dist/lib/util/countSentences.js +4 -36
- package/dist/lib/util/countSentences.js.map +1 -1
- package/dist/lib/util/createWordBoundaryRegex.d.ts +0 -40
- package/dist/lib/util/createWordBoundaryRegex.js +0 -47
- package/dist/lib/util/createWordBoundaryRegex.js.map +1 -1
- package/dist/lib/util/escapeSpecialCharacters.d.ts +0 -6
- package/dist/lib/util/escapeSpecialCharacters.js +0 -8
- package/dist/lib/util/escapeSpecialCharacters.js.map +1 -1
- package/dist/lib/util/getAllValidationRuleIds.d.ts +0 -4
- package/dist/lib/util/getAllValidationRuleIds.js +0 -4
- package/dist/lib/util/getAllValidationRuleIds.js.map +1 -1
- package/dist/lib/util/getFeatureLayerFieldValueTypes.d.ts +0 -8
- package/dist/lib/util/getFeatureLayerFieldValueTypes.js +0 -8
- package/dist/lib/util/getFeatureLayerFieldValueTypes.js.map +1 -1
- package/dist/lib/util/getLivingAtlasSupportedItemTypes.d.ts +0 -17
- package/dist/lib/util/getLivingAtlasSupportedItemTypes.js +0 -17
- package/dist/lib/util/getLivingAtlasSupportedItemTypes.js.map +1 -1
- package/dist/lib/util/getNumberOfWords.d.ts +0 -5
- package/dist/lib/util/getNumberOfWords.js +1 -15
- package/dist/lib/util/getNumberOfWords.js.map +1 -1
- package/dist/lib/util/getRelevantFeatureLayerFields.d.ts +0 -11
- package/dist/lib/util/getRelevantFeatureLayerFields.js +0 -11
- package/dist/lib/util/getRelevantFeatureLayerFields.js.map +1 -1
- package/dist/lib/util/getScoringRules.d.ts +0 -17
- package/dist/lib/util/getScoringRules.js +0 -105
- package/dist/lib/util/getScoringRules.js.map +1 -1
- package/dist/lib/util/getThumbnailFileName.d.ts +0 -14
- package/dist/lib/util/getThumbnailFileName.js +0 -14
- package/dist/lib/util/getThumbnailFileName.js.map +1 -1
- package/dist/lib/util/isArcGISDomain.d.ts +0 -5
- package/dist/lib/util/isArcGISDomain.js +0 -5
- package/dist/lib/util/isArcGISDomain.js.map +1 -1
- package/dist/lib/util/isArcGISOnlineReservedThumbnailName.d.ts +0 -5
- package/dist/lib/util/isArcGISOnlineReservedThumbnailName.js +0 -5
- package/dist/lib/util/isArcGISOnlineReservedThumbnailName.js.map +1 -1
- package/dist/lib/util/isDefined.d.ts +0 -7
- package/dist/lib/util/isDefined.js +0 -7
- package/dist/lib/util/isDefined.js.map +1 -1
- package/dist/lib/util/isEmail.d.ts +0 -5
- package/dist/lib/util/isEmail.js +0 -5
- package/dist/lib/util/isEmail.js.map +1 -1
- package/dist/lib/util/isEmpty.d.ts +0 -5
- package/dist/lib/util/isEmpty.js +0 -5
- package/dist/lib/util/isEmpty.js.map +1 -1
- package/dist/lib/util/isFeatureCollection.d.ts +0 -5
- package/dist/lib/util/isFeatureCollection.js +0 -5
- package/dist/lib/util/isFeatureCollection.js.map +1 -1
- package/dist/lib/util/isFeatureService.d.ts +0 -11
- package/dist/lib/util/isFeatureService.js +0 -13
- package/dist/lib/util/isFeatureService.js.map +1 -1
- package/dist/lib/util/isHosted.d.ts +0 -5
- package/dist/lib/util/isHosted.js +0 -5
- package/dist/lib/util/isHosted.js.map +1 -1
- package/dist/lib/util/isLatin.d.ts +0 -5
- package/dist/lib/util/isLatin.js +0 -5
- package/dist/lib/util/isLatin.js.map +1 -1
- package/dist/lib/util/isLayer.d.ts +0 -10
- package/dist/lib/util/isLayer.js +1 -13
- package/dist/lib/util/isLayer.js.map +1 -1
- package/dist/lib/util/isSecureProtocol.d.ts +0 -5
- package/dist/lib/util/isSecureProtocol.js +0 -5
- package/dist/lib/util/isSecureProtocol.js.map +1 -1
- package/dist/lib/util/isUppercase.d.ts +0 -3
- package/dist/lib/util/isUppercase.js +0 -3
- package/dist/lib/util/isUppercase.js.map +1 -1
- package/dist/lib/util/isUrl.d.ts +0 -8
- package/dist/lib/util/isUrl.js +1 -11
- package/dist/lib/util/isUrl.js.map +1 -1
- package/dist/lib/util/isValidRegexPattern.d.ts +0 -6
- package/dist/lib/util/isValidRegexPattern.js +0 -6
- package/dist/lib/util/isValidRegexPattern.js.map +1 -1
- package/dist/lib/util/matches.d.ts +0 -11
- package/dist/lib/util/matches.js +0 -11
- package/dist/lib/util/matches.js.map +1 -1
- package/dist/lib/util/round.js +0 -4
- package/dist/lib/util/round.js.map +1 -1
- package/dist/lib/util/sanitizeTags.d.ts +0 -5
- package/dist/lib/util/sanitizeTags.js +0 -5
- package/dist/lib/util/sanitizeTags.js.map +1 -1
- package/dist/lib/util/shouldValidateByBetaRules.d.ts +0 -7
- package/dist/lib/util/shouldValidateByBetaRules.js +0 -31
- package/dist/lib/util/shouldValidateByBetaRules.js.map +1 -1
- package/dist/lib/util/stringsConfig.d.ts +0 -21
- package/dist/lib/util/stringsConfig.js +0 -38
- package/dist/lib/util/stringsConfig.js.map +1 -1
- package/dist/lib/util/toString.d.ts +0 -10
- package/dist/lib/util/toString.js +0 -10
- package/dist/lib/util/toString.js.map +1 -1
- package/dist/lib/validate/validate.d.ts +0 -64
- package/dist/lib/validate/validate.js +1 -52
- package/dist/lib/validate/validate.js.map +1 -1
- package/dist/lib/validate/validateHelpers.d.ts +0 -57
- package/dist/lib/validate/validateHelpers.js +1 -72
- package/dist/lib/validate/validateHelpers.js.map +1 -1
- package/dist/package-info.json +1 -1
- package/dist/services/content-validator-assets/config.d.ts +0 -3
- package/dist/services/content-validator-assets/config.js +0 -3
- package/dist/services/content-validator-assets/config.js.map +1 -1
- package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.d.ts +0 -93
- package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.js +0 -33
- package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.js.map +1 -1
- package/dist/services/content-validator-assets/fetchProfanitiesData.d.ts +0 -24
- package/dist/services/content-validator-assets/fetchProfanitiesData.js +0 -19
- package/dist/services/content-validator-assets/fetchProfanitiesData.js.map +1 -1
- package/dist/services/content-validator-assets/helpers.d.ts +0 -14
- package/dist/services/content-validator-assets/helpers.js +1 -15
- package/dist/services/content-validator-assets/helpers.js.map +1 -1
- package/dist/services/custom-terms/config.d.ts +0 -11
- package/dist/services/custom-terms/config.js +0 -41
- package/dist/services/custom-terms/config.js.map +1 -1
- package/dist/services/custom-terms/customTerms.d.ts +0 -170
- package/dist/services/custom-terms/customTerms.js +4 -169
- package/dist/services/custom-terms/customTerms.js.map +1 -1
- package/dist/services/custom-terms/helpers.d.ts +0 -6
- package/dist/services/custom-terms/helpers.js +0 -6
- package/dist/services/custom-terms/helpers.js.map +1 -1
- package/dist/services/custom-terms-review-results/config.d.ts +0 -16
- package/dist/services/custom-terms-review-results/config.js +0 -42
- package/dist/services/custom-terms-review-results/config.js.map +1 -1
- package/dist/services/custom-terms-review-results/customTermsReviewResults.d.ts +0 -93
- package/dist/services/custom-terms-review-results/customTermsReviewResults.js +0 -87
- package/dist/services/custom-terms-review-results/customTermsReviewResults.js.map +1 -1
- package/dist/services/custom-terms-review-results/helpers.d.ts +0 -15
- package/dist/services/custom-terms-review-results/helpers.js +0 -16
- package/dist/services/custom-terms-review-results/helpers.js.map +1 -1
- package/dist/services/feature-service/fetchFeatureServiceAdminJSON.d.ts +0 -12
- package/dist/services/feature-service/fetchFeatureServiceAdminJSON.js +3 -13
- package/dist/services/feature-service/fetchFeatureServiceAdminJSON.js.map +1 -1
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.d.ts +0 -12
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js +5 -32
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js.map +1 -1
- package/dist/services/feature-service/fetchFeatureServiceRootJSON.d.ts +0 -14
- package/dist/services/feature-service/fetchFeatureServiceRootJSON.js +5 -30
- package/dist/services/feature-service/fetchFeatureServiceRootJSON.js.map +1 -1
- package/dist/services/feature-service/getFeatureServerURL.d.ts +0 -11
- package/dist/services/feature-service/getFeatureServerURL.js +2 -14
- package/dist/services/feature-service/getFeatureServerURL.js.map +1 -1
- package/dist/services/shared/addFeatures.d.ts +0 -11
- package/dist/services/shared/addFeatures.js +0 -11
- package/dist/services/shared/addFeatures.js.map +1 -1
- package/dist/services/shared/applyEdits.d.ts +0 -11
- package/dist/services/shared/applyEdits.js +0 -11
- package/dist/services/shared/applyEdits.js.map +1 -1
- package/dist/services/shared/config.d.ts +0 -38
- package/dist/services/shared/config.js +0 -22
- package/dist/services/shared/config.js.map +1 -1
- package/dist/services/shared/getItemInfo.d.ts +0 -12
- package/dist/services/shared/getItemInfo.js +1 -16
- package/dist/services/shared/getItemInfo.js.map +1 -1
- package/dist/types/index.d.ts +1 -330
- package/dist/types/index.js +0 -19
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,121 +1,18 @@
|
|
|
1
1
|
import { ServiceTier } from './services/shared/config';
|
|
2
2
|
type ConfigureSettingsParams = {
|
|
3
|
-
/**
|
|
4
|
-
* additional patterns for title and snippet searchability
|
|
5
|
-
*/
|
|
6
3
|
additionalPatternsForTitleAndSnippetSearchability?: {
|
|
7
|
-
/**
|
|
8
|
-
* A list of additional matching patterns for location matching.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```
|
|
12
|
-
* ["New York", "Los Angeles"]
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
4
|
matchingPatternsLocation: string[];
|
|
16
|
-
/**
|
|
17
|
-
* A list of additional rejected patterns for location matching.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```
|
|
21
|
-
* ["Unknown", "Unknown Location"]
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
5
|
rejectedPatternsLocation: string[];
|
|
25
|
-
/**
|
|
26
|
-
* A list of additional matching patterns for source matching.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```
|
|
30
|
-
* ["NOAA", "Department of Energy"]
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
6
|
matchingPatternsSource: string[];
|
|
34
|
-
/**
|
|
35
|
-
* A list of additional rejected patterns for source matching.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```
|
|
39
|
-
* ["Unknown", "Unknown Source"]
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
7
|
rejectedPatternsSource: string[];
|
|
43
|
-
/**
|
|
44
|
-
* A list of additional matching patterns for topic matching.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```
|
|
48
|
-
* ["Climate Change", "Renewable Energy"]
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
8
|
matchingPatternsTopic: string[];
|
|
52
|
-
/**
|
|
53
|
-
* A list of additional rejected patterns for topic matching.
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```
|
|
57
|
-
* ["Unknown", "Unknown Topic"]
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
9
|
rejectedPatternsTopic: string[];
|
|
61
|
-
/**
|
|
62
|
-
* A list of additional matching patterns for title matching.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```
|
|
66
|
-
* ["bi-weekly", "monthly"]
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
10
|
matchingPatternsYearVintage: string[];
|
|
70
|
-
/**
|
|
71
|
-
* A list of additional rejected patterns for year vintage matching.
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* ```
|
|
75
|
-
* ["Unknown", "Unknown Year Vintage"]
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
11
|
rejectedPatternsYearVintage: string[];
|
|
79
|
-
/**
|
|
80
|
-
* A boolean value indicating whether to avoid using word boundaries in the title and snippet searchability.
|
|
81
|
-
* This is used to determine if the language is non-Latin.
|
|
82
|
-
* If the language is non-Latin, word boundaries should be avoided.
|
|
83
|
-
*/
|
|
84
12
|
shouldAvoidUsingWordBoundary: boolean;
|
|
85
13
|
};
|
|
86
|
-
/**
|
|
87
|
-
* An array of profanities to be used for validation.
|
|
88
|
-
* This is used to determine if the title or snippet contains any profanities.
|
|
89
|
-
*/
|
|
90
14
|
profanities?: string[];
|
|
91
|
-
/**
|
|
92
|
-
* Specifies the service tier of the application, either `'dev'` or `'prod'`.
|
|
93
|
-
* Some helper modules (not part of the core evaluation logic) depend on this setting.
|
|
94
|
-
* If you're only using the library to evaluate content, you can safely ignore this.
|
|
95
|
-
*
|
|
96
|
-
* - `'dev'`: Development tier; uses services hosted on `devext.arcgis.com`.
|
|
97
|
-
* - `'prod'`: Production tier; uses services hosted on `www.arcgis.com`.
|
|
98
|
-
*/
|
|
99
15
|
serviceTier?: ServiceTier;
|
|
100
16
|
};
|
|
101
|
-
/**
|
|
102
|
-
* Configures the settings for the application.
|
|
103
|
-
*
|
|
104
|
-
* @param {Object} params - The settings parameters.
|
|
105
|
-
* @param {Object} [params.additionalPatternsForTitleAndSnippetSearchability] - Optional additional patterns for title and snippet searchability.
|
|
106
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsLocation - Matching patterns for location.
|
|
107
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsLocation - Rejected patterns for location.
|
|
108
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsSource - Matching patterns for source.
|
|
109
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsSource - Rejected patterns for source.
|
|
110
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsTopic - Matching patterns for topic.
|
|
111
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsTopic - Rejected patterns for topic.
|
|
112
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsYearVintage - Matching patterns for year vintage.
|
|
113
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsYearVintage - Rejected patterns for year vintage.
|
|
114
|
-
* @param {boolean} params.additionalPatternsForTitleAndSnippetSearchability.shouldAvoidUsingWordBoundary - Flag to avoid using word boundary.
|
|
115
|
-
* @param {string[]} [params.profanities] - Optional array of profanities to be used for validation.
|
|
116
|
-
* @param {string} [params.serviceTier] - Optional service tier, must be either 'dev' or 'prod'. Defaults to 'prod'.
|
|
117
|
-
*
|
|
118
|
-
* @throws {Error} If the language is not provided or is invalid.
|
|
119
|
-
*/
|
|
120
17
|
export declare const configureSettings: ({ additionalPatternsForTitleAndSnippetSearchability, profanities, serviceTier, }: ConfigureSettingsParams) => void;
|
|
121
18
|
export {};
|
|
@@ -4,50 +4,9 @@ exports.configureSettings = void 0;
|
|
|
4
4
|
const checkProfanities_1 = require("./lib/checkProfanities/checkProfanities");
|
|
5
5
|
const config_1 = require("./lib/checkTitleAndSnippetSearchability/config");
|
|
6
6
|
const config_2 = require("./services/shared/config");
|
|
7
|
-
|
|
8
|
-
* Configures the settings for the application.
|
|
9
|
-
*
|
|
10
|
-
* @param {Object} params - The settings parameters.
|
|
11
|
-
* @param {Object} [params.additionalPatternsForTitleAndSnippetSearchability] - Optional additional patterns for title and snippet searchability.
|
|
12
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsLocation - Matching patterns for location.
|
|
13
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsLocation - Rejected patterns for location.
|
|
14
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsSource - Matching patterns for source.
|
|
15
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsSource - Rejected patterns for source.
|
|
16
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsTopic - Matching patterns for topic.
|
|
17
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsTopic - Rejected patterns for topic.
|
|
18
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsYearVintage - Matching patterns for year vintage.
|
|
19
|
-
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsYearVintage - Rejected patterns for year vintage.
|
|
20
|
-
* @param {boolean} params.additionalPatternsForTitleAndSnippetSearchability.shouldAvoidUsingWordBoundary - Flag to avoid using word boundary.
|
|
21
|
-
* @param {string[]} [params.profanities] - Optional array of profanities to be used for validation.
|
|
22
|
-
* @param {string} [params.serviceTier] - Optional service tier, must be either 'dev' or 'prod'. Defaults to 'prod'.
|
|
23
|
-
*
|
|
24
|
-
* @throws {Error} If the language is not provided or is invalid.
|
|
25
|
-
*/
|
|
26
|
-
const configureSettings = ({
|
|
27
|
-
// language = 'en',
|
|
28
|
-
additionalPatternsForTitleAndSnippetSearchability, profanities, serviceTier = 'dev', }) => {
|
|
29
|
-
// if (serviceTier !== 'dev' && serviceTier !== 'prod') {
|
|
30
|
-
// throw new Error(
|
|
31
|
-
// 'Invalid service tier. It must be either "dev" or "prod".'
|
|
32
|
-
// );
|
|
33
|
-
// }
|
|
34
|
-
// if (!language) {
|
|
35
|
-
// throw new Error('Language is required.');
|
|
36
|
-
// }
|
|
37
|
-
// const validLocales: Locale[] = ['en', 'de', 'es', 'fr', 'ja', 'pt-br'];
|
|
38
|
-
// if (!validLocales.includes(language as Locale)) {
|
|
39
|
-
// throw new Error(
|
|
40
|
-
// `Invalid language. Supported languages are: ${validLocales.join(
|
|
41
|
-
// ', '
|
|
42
|
-
// )}.`
|
|
43
|
-
// );
|
|
44
|
-
// }
|
|
45
|
-
// Set the service tier for the application
|
|
7
|
+
const configureSettings = ({ additionalPatternsForTitleAndSnippetSearchability, profanities, serviceTier = 'dev', }) => {
|
|
46
8
|
(0, config_2.setServiceTier)(serviceTier || 'dev');
|
|
47
|
-
// // Set the language for the application
|
|
48
|
-
// setStrings(language);
|
|
49
9
|
const { matchingPatternsLocation, rejectedPatternsLocation, matchingPatternsSource, rejectedPatternsSource, matchingPatternsTopic, rejectedPatternsTopic, matchingPatternsYearVintage, rejectedPatternsYearVintage, shouldAvoidUsingWordBoundary, } = additionalPatternsForTitleAndSnippetSearchability || {};
|
|
50
|
-
// Set additional patterns for title and snippet searchability
|
|
51
10
|
(0, config_1.setAdditionalPatternsForTitleAndSnippetSearchability)({
|
|
52
11
|
matchingPatternsLocation,
|
|
53
12
|
rejectedPatternsLocation,
|
|
@@ -59,7 +18,6 @@ additionalPatternsForTitleAndSnippetSearchability, profanities, serviceTier = 'd
|
|
|
59
18
|
rejectedPatternsYearVintage,
|
|
60
19
|
shouldAvoidUsingWordBoundary,
|
|
61
20
|
});
|
|
62
|
-
// Set profanities for validation
|
|
63
21
|
(0, checkProfanities_1.setProfanities)(profanities || []);
|
|
64
22
|
};
|
|
65
23
|
exports.configureSettings = configureSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureSettings.js","sourceRoot":"","sources":["../src/configureSettings.ts"],"names":[],"mappings":";;;AAAA,8EAAyE;AACzE,2EAAsH;AAEtH,qDAAuE;
|
|
1
|
+
{"version":3,"file":"configureSettings.js","sourceRoot":"","sources":["../src/configureSettings.ts"],"names":[],"mappings":";;;AAAA,8EAAyE;AACzE,2EAAsH;AAEtH,qDAAuE;AAsIhE,MAAM,iBAAiB,GAAG,CAAC,EAE9B,iDAAiD,EACjD,WAAW,EACX,WAAW,GAAG,KAAK,GACG,EAAE,EAAE;IAqB1B,IAAA,uBAAc,EAAC,WAAW,IAAI,KAAK,CAAC,CAAC;IAKrC,MAAM,EACF,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,GAC/B,GAAG,iDAAiD,IAAI,EAAE,CAAC;IAG5D,IAAA,6DAAoD,EAAC;QACjD,wBAAwB;QACxB,wBAAwB;QACxB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,qBAAqB;QACrB,2BAA2B;QAC3B,2BAA2B;QAC3B,4BAA4B;KAC/B,CAAC,CAAC;IAGH,IAAA,iCAAc,EAAC,WAAW,IAAI,EAAE,CAAC,CAAC;AACtC,CAAC,CAAC;AA1DW,QAAA,iBAAiB,qBA0D5B"}
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,6 @@ const isValidAccessInformation_1 = require("./lib/accessInformation/isValidAcces
|
|
|
8
8
|
Object.defineProperty(exports, "isValidAccessInformation", { enumerable: true, get: function () { return isValidAccessInformation_1.isValidAccessInformation; } });
|
|
9
9
|
const isValidDescription_1 = require("./lib/description/isValidDescription");
|
|
10
10
|
Object.defineProperty(exports, "isValidDescription", { enumerable: true, get: function () { return isValidDescription_1.isValidDescription; } });
|
|
11
|
-
// import { isValidLayerCount } from './lib/layers/isValidLayerCount.ts';
|
|
12
11
|
const isValidLicenseInfo_1 = require("./lib/licenseInfo/isValidLicenseInfo");
|
|
13
12
|
Object.defineProperty(exports, "isValidLicenseInfo", { enumerable: true, get: function () { return isValidLicenseInfo_1.isValidLicenseInfo; } });
|
|
14
13
|
const isValidAccess_1 = require("./lib/sharing/isValidAccess");
|
|
@@ -31,9 +30,8 @@ const isDeprecated_1 = require("./lib/deprecated/isDeprecated");
|
|
|
31
30
|
Object.defineProperty(exports, "isDeprecated", { enumerable: true, get: function () { return isDeprecated_1.isDeprecated; } });
|
|
32
31
|
const validate_1 = require("./lib/validate/validate");
|
|
33
32
|
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_1.validate; } });
|
|
34
|
-
const isDeleteProtectionEnabled_1 = require("./lib/deleteProtection/isDeleteProtectionEnabled");
|
|
33
|
+
const isDeleteProtectionEnabled_1 = require("./lib/deleteProtection/isDeleteProtectionEnabled");
|
|
35
34
|
Object.defineProperty(exports, "isDeleteProtectionEnabled", { enumerable: true, get: function () { return isDeleteProtectionEnabled_1.isDeleteProtectionEnabled; } });
|
|
36
|
-
// import { meetMinimumTotalScore } from './lib/validate/validateHelpers';
|
|
37
35
|
const checkTitleAndSnippetSearchability_1 = require("./lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability");
|
|
38
36
|
Object.defineProperty(exports, "checkTitleAndSnippetSearchability", { enumerable: true, get: function () { return checkTitleAndSnippetSearchability_1.checkTitleAndSnippetSearchability; } });
|
|
39
37
|
const matchLocationInfo_1 = require("./lib/checkTitleAndSnippetSearchability/matchLocationInfo");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAoBA,2DAAwD;AAsLpD,6FAtLK,2BAAY,OAsLL;AArLhB,+FAA4F;AAsLxF,yGAtLK,mDAAwB,OAsLL;AArL5B,6EAA0E;AAsLtE,mGAtLK,uCAAkB,OAsLL;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAoBA,2DAAwD;AAsLpD,6FAtLK,2BAAY,OAsLL;AArLhB,+FAA4F;AAsLxF,yGAtLK,mDAAwB,OAsLL;AArL5B,6EAA0E;A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CAA6B,OA4IA;AAC7B,sGA5IA,+BAAqB,OA4IA;AAzIzB,sHAAmH;AAiI/G,mHAjIK,uEAAkC,OAiIL;AA/HtC,4FAAyF;AAgIrF,8GAhIK,6DAA6B,OAgIL;AA9HjC,8FAA2F;AA+HvF,+GA/HK,+DAA8B,OA+HL;AA7HlC,sEAAmE;AA6F/D,gGA7FK,iCAAe,OA6FL;AA5FnB,oFAMiD;AA6H7C,wGAlIA,gDAAuB,OAkIA;AAIvB,mGArIA,2CAAkB,OAqIA;AAHlB,8FAjIA,sCAAa,OAiIA;AACb,uGAjIA,+CAAsB,OAiIA;AACtB,yGAjIA,iDAAwB,OAiIA;AA9H5B,gHAA6G;AAqFzG,8GArFK,6DAA6B,OAqFL;AAnFjC,6HAA0H;AAoFtH,iHApFK,mEAAgC,OAoFL;AAlFpC,sHAAmH;AAmF/G,gHAnFK,iEAA+B,OAmFL;AAjFnC,0GAAuG;AA0HnG,6GA1HK,2DAA4B,OA0HL;AAxHhC,kEAA+D;AAyH3D,iGAzHK,mCAAgB,OAyHL;AAvHpB,0HAAuH;AAwHnH,kHAxHK,qEAAiC,OAwHL;AAtHrC,wGAAqG;AAuHjG,4GAvHK,yDAA2B,OAuHL;AArH/B,uGAAoG;AA0EhG,2GA1EK,uDAA0B,OA0EL;AAxE9B,yCAAsD;AAsH7C,uGAtHA,+BAAsB,OAsHA"}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import { IItem, ValidationInfo } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validate an item's "Credits (Attribution)", which provides Information on the source of the item and its copyright status.
|
|
4
|
-
* A valid Access Information must meet these rules below:
|
|
5
|
-
*
|
|
6
|
-
* Living Atlas specific rule:
|
|
7
|
-
* - Cannot be empty
|
|
8
|
-
* - Only contains strings, no markup
|
|
9
|
-
*/
|
|
10
2
|
export declare const isValidAccessInformation: (item: IItem) => ValidationInfo;
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isValidAccessInformation = void 0;
|
|
4
|
-
// import scoringRulesConfig from './scoringRulesConfig';
|
|
5
4
|
const assertString_1 = require("../util/assertString");
|
|
6
5
|
const isEmpty_1 = require("../util/isEmpty");
|
|
7
6
|
const stringsConfig_1 = require("../util/stringsConfig");
|
|
8
7
|
const scoringConfig_1 = require("./scoringConfig");
|
|
9
|
-
/**
|
|
10
|
-
* Validate an item's "Credits (Attribution)", which provides Information on the source of the item and its copyright status.
|
|
11
|
-
* A valid Access Information must meet these rules below:
|
|
12
|
-
*
|
|
13
|
-
* Living Atlas specific rule:
|
|
14
|
-
* - Cannot be empty
|
|
15
|
-
* - Only contains strings, no markup
|
|
16
|
-
*/
|
|
17
8
|
const isValidAccessInformation = (item) => {
|
|
18
9
|
const { accessInformation } = item;
|
|
19
|
-
// scoring factors that will be used to calculate the final score
|
|
20
10
|
const scoringFactors = scoringConfig_1.scoringConfig.scoringFactors.DEFAULT;
|
|
21
11
|
const stringsConfig = (0, stringsConfig_1.getStringsConfig)();
|
|
22
12
|
const validAccessInformation = (0, assertString_1.assertString)(item.accessInformation) && !(0, isEmpty_1.isEmpty)(accessInformation);
|
|
@@ -24,7 +14,6 @@ const isValidAccessInformation = (item) => {
|
|
|
24
14
|
validationRuleId: 'item-credits-attribution-info',
|
|
25
15
|
label: stringsConfig.accessInformation.LABEL,
|
|
26
16
|
title: stringsConfig.accessInformation.TITLE,
|
|
27
|
-
// the maxScore and score will be calculated afterward using weight and weight factor
|
|
28
17
|
maxScore: 0,
|
|
29
18
|
score: 0,
|
|
30
19
|
messages: validAccessInformation
|
|
@@ -36,7 +25,6 @@ const isValidAccessInformation = (item) => {
|
|
|
36
25
|
],
|
|
37
26
|
weight: scoringConfig_1.scoringConfig.weight,
|
|
38
27
|
scoringFactor: validAccessInformation ? scoringFactors.EXIST_FACTOR : 0,
|
|
39
|
-
// critical: false,
|
|
40
28
|
status: 'unknown',
|
|
41
29
|
isBinaryCheck: false,
|
|
42
30
|
isAdvisory: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isValidAccessInformation.js","sourceRoot":"","sources":["../../../src/lib/accessInformation/isValidAccessInformation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"isValidAccessInformation.js","sourceRoot":"","sources":["../../../src/lib/accessInformation/isValidAccessInformation.ts"],"names":[],"mappings":";;;AACA,uDAAoD;AACpD,6CAA0C;AAG1C,yDAAyD;AACzD,mDAAgD;AAUzC,MAAM,wBAAwB,GAAG,CAAC,IAAW,EAAkB,EAAE;IACpE,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC;IAGnC,MAAM,cAAc,GAAG,6BAAa,CAAC,cAAc,CAAC,OAAO,CAAC;IAE5D,MAAM,aAAa,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAEzC,MAAM,sBAAsB,GACxB,IAAA,2BAAY,EAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAA,iBAAO,EAAC,iBAAiB,CAAC,CAAC;IAExE,MAAM,gBAAgB,GAAmB;QACrC,gBAAgB,EAAE,+BAA+B;QACjD,KAAK,EAAE,aAAa,CAAC,iBAAiB,CAAC,KAAK;QAC5C,KAAK,EAAE,aAAa,CAAC,iBAAiB,CAAC,KAAK;QAE5C,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,sBAAsB;YAC5B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACI;oBACI,OAAO,EACH,aAAa,CAAC,iBAAiB,CAAC,oBAAoB;iBAC3D;aACJ;QACP,MAAM,EAAE,6BAAa,CAAC,MAAM;QAC5B,aAAa,EAAE,sBAAsB,CAAC,CAAC,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAEvE,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,KAAK;KACpB,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AAnCW,QAAA,wBAAwB,4BAmCnC"}
|
|
@@ -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 = {
|
|
@@ -8,9 +7,6 @@ exports.scoringConfig = {
|
|
|
8
7
|
DEFAULT: {
|
|
9
8
|
EXIST_FACTOR: 1,
|
|
10
9
|
},
|
|
11
|
-
// INTERNATIONAL: {
|
|
12
|
-
// EXIST_FACTOR: 1,
|
|
13
|
-
// },
|
|
14
10
|
},
|
|
15
11
|
};
|
|
16
12
|
//# sourceMappingURL=scoringConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scoringConfig.js","sourceRoot":"","sources":["../../../src/lib/accessInformation/scoringConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scoringConfig.js","sourceRoot":"","sources":["../../../src/lib/accessInformation/scoringConfig.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG;IACzB,MAAM,EAAE,CAAC;IACT,cAAc,EAAE;QACZ,OAAO,EAAE;YACL,YAAY,EAAE,CAAC;SAClB;KAIJ;CACJ,CAAC"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
export declare const setProfanities: (profanities: string[]) => void;
|
|
2
|
-
/**
|
|
3
|
-
* Checks if the given text contains any profanities.
|
|
4
|
-
* @param text - The text to check for profanities.
|
|
5
|
-
* @returns boolean - True if the text contains profanities, false otherwise.
|
|
6
|
-
*/
|
|
7
2
|
export declare const containsProfanity: (text: string) => boolean;
|
|
@@ -2,19 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.containsProfanity = exports.setProfanities = void 0;
|
|
4
4
|
const createWordBoundaryRegex_1 = require("../util/createWordBoundaryRegex");
|
|
5
|
-
/**
|
|
6
|
-
* Regular expression to match profanities.
|
|
7
|
-
*/
|
|
8
5
|
let profanitiesRegExp = null;
|
|
9
6
|
const setProfanities = (profanities) => {
|
|
10
7
|
profanitiesRegExp = (0, createWordBoundaryRegex_1.createWordBoundaryRegex)(profanities);
|
|
11
8
|
};
|
|
12
9
|
exports.setProfanities = setProfanities;
|
|
13
|
-
/**
|
|
14
|
-
* Checks if the given text contains any profanities.
|
|
15
|
-
* @param text - The text to check for profanities.
|
|
16
|
-
* @returns boolean - True if the text contains profanities, false otherwise.
|
|
17
|
-
*/
|
|
18
10
|
const containsProfanity = (text) => {
|
|
19
11
|
if (!profanitiesRegExp) {
|
|
20
12
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkProfanities.js","sourceRoot":"","sources":["../../../src/lib/checkProfanities/checkProfanities.ts"],"names":[],"mappings":";;;AAAA,6EAA0E;
|
|
1
|
+
{"version":3,"file":"checkProfanities.js","sourceRoot":"","sources":["../../../src/lib/checkProfanities/checkProfanities.ts"],"names":[],"mappings":";;;AAAA,6EAA0E;AAK1E,IAAI,iBAAiB,GAAW,IAAI,CAAC;AAE9B,MAAM,cAAc,GAAG,CAAC,WAAqB,EAAE,EAAE;IACpD,iBAAiB,GAAG,IAAA,iDAAuB,EAAC,WAAW,CAAC,CAAC;AAC7D,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB;AAOK,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAW,EAAE;IACvD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAE9C,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAClD,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
|
|
@@ -1,38 +1,10 @@
|
|
|
1
1
|
import { IItem, IUser, ValidationInfo } from '../../types';
|
|
2
2
|
type Options = {
|
|
3
|
-
/**
|
|
4
|
-
* Custom patterns for location information.
|
|
5
|
-
*/
|
|
6
3
|
customPatternsForLocationInfo?: string[];
|
|
7
|
-
/**
|
|
8
|
-
* Custom patterns for data vintage information.
|
|
9
|
-
*/
|
|
10
4
|
customPatternsForDataVintageInfo?: string[];
|
|
11
|
-
/**
|
|
12
|
-
* Custom patterns for source information.
|
|
13
|
-
*/
|
|
14
5
|
customPatternsForSourceInfo?: string[];
|
|
15
|
-
/**
|
|
16
|
-
* Custom patterns for time information.
|
|
17
|
-
*/
|
|
18
6
|
customPatternsForTopicInfo?: string[];
|
|
19
|
-
/**
|
|
20
|
-
* profile of the user who owns the item
|
|
21
|
-
*/
|
|
22
7
|
itemOwnerUserProfile: IUser;
|
|
23
8
|
};
|
|
24
|
-
/**
|
|
25
|
-
* Check for required and recommended text in items' title and summary text to make sure they are search-friendly.
|
|
26
|
-
* We want Title and Summary to do a great job establishing the 4 key things: topic from a source for year and region.
|
|
27
|
-
*
|
|
28
|
-
* Title/summary text are required to state what the thing is, e.g. "Earthquakes" or "Public Health Dashboard"
|
|
29
|
-
* Title/summary text often benefit from having words like "Global" or "World" to indicate the area included.
|
|
30
|
-
* Title/summary text often benefit from having a source indicated (unless the source name is very long)
|
|
31
|
-
* Title/summary text often benefit from having a version, vintage or year indicated
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @see https://devtopia.esri.com/kenn4005/Curator_Suggestions/issues/9
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
9
|
export declare const checkTitleAndSnippetSearchability: (item: IItem, options: Options) => ValidationInfo;
|
|
38
10
|
export {};
|
|
@@ -12,29 +12,11 @@ const matchTopicInfo_1 = require("./matchTopicInfo");
|
|
|
12
12
|
const scoringConfig_1 = require("./scoringConfig");
|
|
13
13
|
const sanitize_html_1 = __importDefault(require("sanitize-html"));
|
|
14
14
|
const helpers_1 = require("./helpers");
|
|
15
|
-
/**
|
|
16
|
-
* Check for required and recommended text in items' title and summary text to make sure they are search-friendly.
|
|
17
|
-
* We want Title and Summary to do a great job establishing the 4 key things: topic from a source for year and region.
|
|
18
|
-
*
|
|
19
|
-
* Title/summary text are required to state what the thing is, e.g. "Earthquakes" or "Public Health Dashboard"
|
|
20
|
-
* Title/summary text often benefit from having words like "Global" or "World" to indicate the area included.
|
|
21
|
-
* Title/summary text often benefit from having a source indicated (unless the source name is very long)
|
|
22
|
-
* Title/summary text often benefit from having a version, vintage or year indicated
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @see https://devtopia.esri.com/kenn4005/Curator_Suggestions/issues/9
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
15
|
const checkTitleAndSnippetSearchability = (item, options) => {
|
|
29
16
|
const { customPatternsForLocationInfo, customPatternsForDataVintageInfo, customPatternsForSourceInfo, customPatternsForTopicInfo, itemOwnerUserProfile, } = options || {};
|
|
30
|
-
// const localeByCultreProperty = getScoringRulesLocale(item.culture);
|
|
31
|
-
// const localeByItemOwner = getScoringRulesLocaleByItemOwner(item.owner);
|
|
32
|
-
// const isEnglishedBased =
|
|
33
|
-
// localeByCultreProperty === 'en' && localeByItemOwner === 'en';
|
|
34
17
|
const stringsConfig = (0, stringsConfig_1.getStringsConfig)();
|
|
35
18
|
const scoringFactors = scoringConfig_1.scoringConfig.scoringFactors.DEFAULT;
|
|
36
19
|
const shouldCheckRecommendedText = (0, helpers_1.isEligibleForCheckingTitleAndSnippetSearchability)(item, itemOwnerUserProfile);
|
|
37
|
-
// isLayer(item) && isEnglishedBased && shouldValidateByBetaRules(item);
|
|
38
20
|
const validationResult = {
|
|
39
21
|
validationRuleId: 'item-title-and-summary-searchability',
|
|
40
22
|
label: stringsConfig.recommendedTextInTitleAndSummary.LABEL,
|
|
@@ -44,30 +26,13 @@ const checkTitleAndSnippetSearchability = (item, options) => {
|
|
|
44
26
|
messages: [],
|
|
45
27
|
weight: scoringConfig_1.scoringConfig.weight,
|
|
46
28
|
scoringFactor: 0,
|
|
47
|
-
// critical: true,
|
|
48
|
-
// the status will be updated afterward based on the validation result
|
|
49
29
|
status: 'unknown',
|
|
50
30
|
isBinaryCheck: false,
|
|
51
31
|
isAdvisory: false,
|
|
52
32
|
};
|
|
53
|
-
// Return the validationResult with a weight of 0 (so this rule does not contribute to the final score)
|
|
54
|
-
// if the recommended text does not need to be checked.
|
|
55
33
|
if (shouldCheckRecommendedText === false) {
|
|
56
34
|
return Object.assign(Object.assign({}, validationResult), { weight: 0 });
|
|
57
35
|
}
|
|
58
|
-
// item.title = item.title
|
|
59
|
-
// ? sanitizeHtml(item.title, {
|
|
60
|
-
// allowedTags: [],
|
|
61
|
-
// })
|
|
62
|
-
// : '';
|
|
63
|
-
// item.snippet = item.snippet
|
|
64
|
-
// ? sanitizeHtml(item.snippet, {
|
|
65
|
-
// allowedTags: [],
|
|
66
|
-
// })
|
|
67
|
-
// : '';
|
|
68
|
-
// create a copy of the item to avoid mutating the original item
|
|
69
|
-
// sanitize the title and snippet to remove any HTML tags
|
|
70
|
-
// that might impact the matching results
|
|
71
36
|
const copyOfItem = {
|
|
72
37
|
title: item.title
|
|
73
38
|
? (0, sanitize_html_1.default)(item.title, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkTitleAndSnippetSearchability.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.ts"],"names":[],"mappings":";;;;;;AAGA,yDAAyD;AAEzD,2DAAwD;AACxD,2DAAwD;AACxD,uDAAoD;AACpD,qDAAkD;AAClD,mDAAgD;AAEhD,kEAAyC;AACzC,uCAGmB;
|
|
1
|
+
{"version":3,"file":"checkTitleAndSnippetSearchability.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.ts"],"names":[],"mappings":";;;;;;AAGA,yDAAyD;AAEzD,2DAAwD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gB,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EACH,aAAa,CAAC,gCAAgC,CAAC,cAAc;SACpE,CAAC,CAAC;IACP,CAAC;SAAM,CAAC;QACJ,gBAAgB,CAAC,aAAa,IAAI,cAAc,CAAC,mBAAmB,CAAC;IACzE,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AA3IW,QAAA,iCAAiC,qCA2I5C"}
|
|
@@ -1,97 +1,13 @@
|
|
|
1
1
|
type SetAdditionalMatchingPatternsParams = {
|
|
2
|
-
/**
|
|
3
|
-
* A list of extra matching patterns for location matching.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```
|
|
7
|
-
* ["New York", "Los Angeles"]
|
|
8
|
-
* ```
|
|
9
|
-
*/
|
|
10
2
|
matchingPatternsLocation: string[];
|
|
11
|
-
/**
|
|
12
|
-
* A list of extra rejected patterns for location matching.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```
|
|
16
|
-
* ["Unknown", "Unknown Location"]
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
3
|
rejectedPatternsLocation: string[];
|
|
20
|
-
/**
|
|
21
|
-
* A list of extra matching patterns for source matching.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```
|
|
25
|
-
* ["NOAA", "Department of Energy"]
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
4
|
matchingPatternsSource: string[];
|
|
29
|
-
/**
|
|
30
|
-
* A list of extra rejected patterns for source matching.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```
|
|
34
|
-
* ["Unknown", "Unknown Source"]
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
5
|
rejectedPatternsSource: string[];
|
|
38
|
-
/**
|
|
39
|
-
* A list of extra matching patterns for topic matching.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```
|
|
43
|
-
* ["Climate Change", "Renewable Energy"]
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
6
|
matchingPatternsTopic: string[];
|
|
47
|
-
/**
|
|
48
|
-
* A list of extra rejected patterns for topic matching.
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```
|
|
52
|
-
* ["Unknown", "Unknown Topic"]
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
7
|
rejectedPatternsTopic: string[];
|
|
56
|
-
/**
|
|
57
|
-
* A list of extra matching patterns for title matching.
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```
|
|
61
|
-
* ["bi-weekly", "monthly"]
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
8
|
matchingPatternsYearVintage: string[];
|
|
65
|
-
/**
|
|
66
|
-
* A list of extra rejected patterns for year vintage matching.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```
|
|
70
|
-
* ["Unknown", "Unknown Year Vintage"]
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
9
|
rejectedPatternsYearVintage: string[];
|
|
74
|
-
/**
|
|
75
|
-
* A boolean indicating whether to avoid using word boundaries (useful for languages like Chinese and Japanese).
|
|
76
|
-
*/
|
|
77
10
|
shouldAvoidUsingWordBoundary: boolean;
|
|
78
11
|
};
|
|
79
|
-
/**
|
|
80
|
-
* Sets additional patterns for checking title and snippet searchability rules.
|
|
81
|
-
*
|
|
82
|
-
* These patterns supplement the default ones and help match titles and snippets more effectively.
|
|
83
|
-
* They may include multilingual patterns or user-suggested patterns from the nomination app.
|
|
84
|
-
*
|
|
85
|
-
* @param {SetExtraMatchingPatternsParams} params - The parameters for setting extra matching patterns.
|
|
86
|
-
* @param {string[]} params.matchingPatternsLocation - Additional matching patterns for location. (e.g. `["New York", "Los Angeles"]`)
|
|
87
|
-
* @param {string[]} params.rejectedPatternsLocation - Additional rejected patterns for location. (e.g. `["Unknown", "Unknown Location"]`)
|
|
88
|
-
* @param {string[]} params.matchingPatternsSource - Additional matching patterns for source. (e.g. `["NOAA", "Department of Energy"]`)
|
|
89
|
-
* @param {string[]} params.rejectedPatternsSource - Additional rejected patterns for source. (e.g. `["Unknown", "Unknown Source"]`)
|
|
90
|
-
* @param {string[]} params.matchingPatternsTopic - Additional matching patterns for topic. (e.g. `["Climate Change", "Renewable Energy"]`)
|
|
91
|
-
* @param {string[]} params.rejectedPatternsTopic - Additional rejected patterns for topic. (e.g. `["Unknown", "Unknown Topic"]`)
|
|
92
|
-
* @param {string[]} params.matchingPatternsYearVintage - Additional matching patterns for year vintage. (e.g. `["bi-weekly", "monthly"]`)
|
|
93
|
-
* @param {string[]} params.rejectedPatternsYearVintage - Additional rejected patterns for year vintage. (e.g. `["Unknown", "Unknown Year Vintage"]`)
|
|
94
|
-
* @param {boolean} params.shouldAvoidUsingWordBoundary - Flag to indicate whether to avoid using word boundaries.
|
|
95
|
-
*/
|
|
96
12
|
export declare const setAdditionalPatternsForTitleAndSnippetSearchability: ({ matchingPatternsLocation, rejectedPatternsLocation, matchingPatternsSource, rejectedPatternsSource, matchingPatternsTopic, rejectedPatternsTopic, matchingPatternsYearVintage, rejectedPatternsYearVintage, shouldAvoidUsingWordBoundary, }: SetAdditionalMatchingPatternsParams) => void;
|
|
97
13
|
export {};
|
|
@@ -5,23 +5,6 @@ const matchDateTimeInfo_1 = require("./matchDateTimeInfo");
|
|
|
5
5
|
const matchLocationInfo_1 = require("./matchLocationInfo");
|
|
6
6
|
const matchSourceInfo_1 = require("./matchSourceInfo");
|
|
7
7
|
const matchTopicInfo_1 = require("./matchTopicInfo");
|
|
8
|
-
/**
|
|
9
|
-
* Sets additional patterns for checking title and snippet searchability rules.
|
|
10
|
-
*
|
|
11
|
-
* These patterns supplement the default ones and help match titles and snippets more effectively.
|
|
12
|
-
* They may include multilingual patterns or user-suggested patterns from the nomination app.
|
|
13
|
-
*
|
|
14
|
-
* @param {SetExtraMatchingPatternsParams} params - The parameters for setting extra matching patterns.
|
|
15
|
-
* @param {string[]} params.matchingPatternsLocation - Additional matching patterns for location. (e.g. `["New York", "Los Angeles"]`)
|
|
16
|
-
* @param {string[]} params.rejectedPatternsLocation - Additional rejected patterns for location. (e.g. `["Unknown", "Unknown Location"]`)
|
|
17
|
-
* @param {string[]} params.matchingPatternsSource - Additional matching patterns for source. (e.g. `["NOAA", "Department of Energy"]`)
|
|
18
|
-
* @param {string[]} params.rejectedPatternsSource - Additional rejected patterns for source. (e.g. `["Unknown", "Unknown Source"]`)
|
|
19
|
-
* @param {string[]} params.matchingPatternsTopic - Additional matching patterns for topic. (e.g. `["Climate Change", "Renewable Energy"]`)
|
|
20
|
-
* @param {string[]} params.rejectedPatternsTopic - Additional rejected patterns for topic. (e.g. `["Unknown", "Unknown Topic"]`)
|
|
21
|
-
* @param {string[]} params.matchingPatternsYearVintage - Additional matching patterns for year vintage. (e.g. `["bi-weekly", "monthly"]`)
|
|
22
|
-
* @param {string[]} params.rejectedPatternsYearVintage - Additional rejected patterns for year vintage. (e.g. `["Unknown", "Unknown Year Vintage"]`)
|
|
23
|
-
* @param {boolean} params.shouldAvoidUsingWordBoundary - Flag to indicate whether to avoid using word boundaries.
|
|
24
|
-
*/
|
|
25
8
|
const setAdditionalPatternsForTitleAndSnippetSearchability = ({ matchingPatternsLocation, rejectedPatternsLocation, matchingPatternsSource, rejectedPatternsSource, matchingPatternsTopic, rejectedPatternsTopic, matchingPatternsYearVintage, rejectedPatternsYearVintage, shouldAvoidUsingWordBoundary, }) => {
|
|
26
9
|
matchingPatternsLocation = matchingPatternsLocation || [];
|
|
27
10
|
rejectedPatternsLocation = rejectedPatternsLocation || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/config.ts"],"names":[],"mappings":";;;AAAA,2DAA2E;AAC3E,2DAA2E;AAC3E,uDAAuE;AACvE,qDAAqE;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/lib/checkTitleAndSnippetSearchability/config.ts"],"names":[],"mappings":";;;AAAA,2DAA2E;AAC3E,2DAA2E;AAC3E,uDAAuE;AACvE,qDAAqE;AAkG9D,MAAM,oDAAoD,GAAG,CAAC,EACjE,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,GACM,EAAE,EAAE;IACtC,wBAAwB,GAAG,wBAAwB,IAAI,EAAE,CAAC;IAC1D,wBAAwB,GAAG,wBAAwB,IAAI,EAAE,CAAC;IAC1D,sBAAsB,GAAG,sBAAsB,IAAI,EAAE,CAAC;IACtD,sBAAsB,GAAG,sBAAsB,IAAI,EAAE,CAAC;IACtD,qBAAqB,GAAG,qBAAqB,IAAI,EAAE,CAAC;IACpD,qBAAqB,GAAG,qBAAqB,IAAI,EAAE,CAAC;IACpD,2BAA2B,GAAG,2BAA2B,IAAI,EAAE,CAAC;IAChE,2BAA2B,GAAG,2BAA2B,IAAI,EAAE,CAAC;IAChE,4BAA4B,GAAG,4BAA4B,IAAI,KAAK,CAAC;IAErE,IAAA,wDAAoC,EAChC,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,CAC/B,CAAC;IAEF,IAAA,wDAAoC,EAChC,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,CAC/B,CAAC;IAEF,IAAA,oDAAkC,EAC9B,sBAAsB,EACtB,sBAAsB,EACtB,4BAA4B,CAC/B,CAAC;IAEF,IAAA,kDAAiC,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,CAC/B,CAAC;AACN,CAAC,CAAC;AA5CW,QAAA,oDAAoD,wDA4C/D"}
|