@lustre/sdk 1.4.14 → 1.5.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Context.js +5 -5
- package/dist/Provider.js +13 -13
- package/dist/actions.js +2 -2
- package/dist/api/QueryError.js +54 -54
- package/dist/api/QueryResolver.js +102 -96
- package/dist/api/QueryResolver.js.map +1 -1
- package/dist/api/WrappedQuery.js +2 -2
- package/dist/api/fast1a64utf.js +134 -134
- package/dist/api/fetchEntity.js +41 -40
- package/dist/api/fetchEntity.js.map +1 -1
- package/dist/api/fetchQuery.js +31 -30
- package/dist/api/fetchQuery.js.map +1 -1
- package/dist/api/getHash.js +26 -26
- package/dist/api/getQueryHash.js +9 -9
- package/dist/hooks/index.js +17 -17
- package/dist/hooks/useApiDispatch.js +9 -9
- package/dist/hooks/useApiSelector.js +9 -9
- package/dist/hooks/useApiStore.js +9 -9
- package/dist/hooks/useEntities.js +40 -39
- package/dist/hooks/useEntities.js.map +1 -1
- package/dist/hooks/useEntity.js +9 -10
- package/dist/hooks/useEntity.js.map +1 -1
- package/dist/hooks/useQueries.js +54 -53
- package/dist/hooks/useQueries.js.map +1 -1
- package/dist/hooks/useQuery.js +9 -10
- package/dist/hooks/useQuery.js.map +1 -1
- package/dist/index.js +49 -49
- package/dist/schema/builtins.js +433 -433
- package/dist/schema/entities/alias.js +2 -2
- package/dist/schema/entities/brand.js +2 -2
- package/dist/schema/entities/category.js +2 -2
- package/dist/schema/entities/crawl.js +2 -2
- package/dist/schema/entities/index.js +29 -29
- package/dist/schema/entities/media.js +2 -2
- package/dist/schema/entities/offer.js +2 -2
- package/dist/schema/entities/productConfiguration.js +2 -2
- package/dist/schema/entities/productFamily.js +2 -2
- package/dist/schema/entities/productGeneration.js +2 -2
- package/dist/schema/entities/productType.js +2 -2
- package/dist/schema/entities/rating.js +2 -2
- package/dist/schema/entities/source.js +2 -2
- package/dist/schema/entities/spec.js +2 -2
- package/dist/schema/entities/specType.js +2 -2
- package/dist/schema/entities/specTypeChoice.js +2 -2
- package/dist/schema/entities/storePage.js +2 -2
- package/dist/schema/entities/storePageQueueGroup.js +2 -2
- package/dist/schema/entities/user.js +2 -2
- package/dist/schema/index.js +29 -29
- package/dist/schema/mutations/createBrand.js +2 -2
- package/dist/schema/mutations/createCategory.js +2 -2
- package/dist/schema/mutations/createProductConfiguration.js +2 -2
- package/dist/schema/mutations/createProductFamily.js +2 -2
- package/dist/schema/mutations/createProductGeneration.js +2 -2
- package/dist/schema/mutations/createProductType.js +2 -2
- package/dist/schema/mutations/createUser.js +2 -2
- package/dist/schema/mutations/storePageQueueClaimById.js +2 -2
- package/dist/schema/mutations/storePageQueueClaimNext.js +2 -2
- package/dist/schema/mutations/storePageQueueHandle.js +2 -2
- package/dist/schema/mutations/storePageQueueHandleStorePageIdSet.js +2 -2
- package/dist/schema/mutations/updateAlias.js +2 -2
- package/dist/schema/mutations/updateBrand.js +2 -2
- package/dist/schema/mutations/updateCategory.js +2 -2
- package/dist/schema/mutations/updateOffer.js +2 -2
- package/dist/schema/mutations/updateProductConfiguration.js +2 -2
- package/dist/schema/mutations/updateProductConfigurationProductType.js +2 -2
- package/dist/schema/mutations/updateProductFamily.js +2 -2
- package/dist/schema/mutations/updateProductFamilyBrand.js +2 -2
- package/dist/schema/mutations/updateProductGeneration.js +2 -2
- package/dist/schema/mutations/updateProductGenerationProductFamily.js +2 -2
- package/dist/schema/mutations/updateProductType.js +2 -2
- package/dist/schema/mutations/updateProductTypeProductGeneration.js +2 -2
- package/dist/schema/mutations/updateSource.js +2 -2
- package/dist/schema/mutations/updateStorePage.js +2 -2
- package/dist/schema/queries/affiliateUrl.js +2 -2
- package/dist/schema/queries/aliasIdListBySomeId.js +2 -2
- package/dist/schema/queries/analyticsTrack.js +2 -2
- package/dist/schema/queries/appliedCategoryIdListBySomeId.js +2 -2
- package/dist/schema/queries/baseScore.js +2 -2
- package/dist/schema/queries/baseScoreRatingIdList.js +2 -2
- package/dist/schema/queries/baseScoresByCategoryId.js +2 -2
- package/dist/schema/queries/bestInClass.js +2 -2
- package/dist/schema/queries/brandIdBySomeId.js +2 -2
- package/dist/schema/queries/brandIdList.js +2 -2
- package/dist/schema/queries/brandIdListBySearch.js +2 -2
- package/dist/schema/queries/categoryDisplayMode.js +2 -2
- package/dist/schema/queries/categoryIdByUrlSlug.js +2 -2
- package/dist/schema/queries/categoryIdList.js +2 -2
- package/dist/schema/queries/categoryIdListBySomeId.js +2 -2
- package/dist/schema/queries/categoryIdListBySourceId.js +2 -2
- package/dist/schema/queries/categoryModifierSearchList.js +2 -2
- package/dist/schema/queries/categoryRankings.js +2 -2
- package/dist/schema/queries/categorySearchList.js +2 -2
- package/dist/schema/queries/categoryStatusList.js +2 -2
- package/dist/schema/queries/crawlIdList.js +2 -2
- package/dist/schema/queries/crawlIdListByUrl.js +2 -2
- package/dist/schema/queries/descriptionMarkdown.js +2 -2
- package/dist/schema/queries/entityType.js +2 -2
- package/dist/schema/queries/fallbackPriceByProductTypeId.js +2 -2
- package/dist/schema/queries/inputLayerVersion.js +2 -2
- package/dist/schema/queries/latestRatingIdList.js +2 -2
- package/dist/schema/queries/latestRatingIdListBySomeId.js +2 -2
- package/dist/schema/queries/mediaIdListBySomeId.js +2 -2
- package/dist/schema/queries/mlCategoryDisplayMode.js +2 -2
- package/dist/schema/queries/noteMarkdown.js +2 -2
- package/dist/schema/queries/offerIdListByStorePageId.js +2 -2
- package/dist/schema/queries/possibleAliasIdListBySomeId.js +2 -2
- package/dist/schema/queries/possibleStorePageIdListBySomeId.js +2 -2
- package/dist/schema/queries/preferredCategoryIdListByProductId.js +2 -2
- package/dist/schema/queries/preferredLatestRatingIdListBySomeId.js +2 -2
- package/dist/schema/queries/preferredStorePageList.js +2 -2
- package/dist/schema/queries/priceHistoryLookup.js +2 -2
- package/dist/schema/queries/pricePointCompetitors.js +2 -2
- package/dist/schema/queries/priceRangeByCategoryId.js +2 -2
- package/dist/schema/queries/productConfigurationIdListBySomeId.js +2 -2
- package/dist/schema/queries/productDealList.js +2 -2
- package/dist/schema/queries/productDocumentByStoreUrl.js +2 -2
- package/dist/schema/queries/productDocumentsByProductIds.js +2 -2
- package/dist/schema/queries/productFamilyIdBySomeId.js +2 -2
- package/dist/schema/queries/productFamilyIdListBySomeId.js +2 -2
- package/dist/schema/queries/productGenerationIdBySomeId.js +2 -2
- package/dist/schema/queries/productGenerationIdListBySomeId.js +2 -2
- package/dist/schema/queries/productListSort.js +2 -2
- package/dist/schema/queries/productPricePointList.js +2 -2
- package/dist/schema/queries/productSearchList.js +2 -2
- package/dist/schema/queries/productTypeIdBySomeId.js +2 -2
- package/dist/schema/queries/productTypeIdByStoreUrl.js +2 -2
- package/dist/schema/queries/productTypeIdListByCategoryId.js +2 -2
- package/dist/schema/queries/productTypeIdListByModifiers.js +2 -2
- package/dist/schema/queries/productTypeIdListBySomeId.js +2 -2
- package/dist/schema/queries/saleMetrics.js +2 -2
- package/dist/schema/queries/searchSuggestionList.js +2 -2
- package/dist/schema/queries/sectionDataByCrawlId.js +2 -2
- package/dist/schema/queries/sourceIdList.js +2 -2
- package/dist/schema/queries/specIdListBySomeId.js +2 -2
- package/dist/schema/queries/specTypeIdList.js +2 -2
- package/dist/schema/queries/specTypeValidValues.js +2 -2
- package/dist/schema/queries/specValueRangeListByCategoryId.js +2 -2
- package/dist/schema/queries/stablePriceByProductId.js +2 -2
- package/dist/schema/queries/stablePriceByProductIdAndStoreName.js +2 -2
- package/dist/schema/queries/stablePriceByStorePageId.js +2 -2
- package/dist/schema/queries/storePageFetchData.js +2 -2
- package/dist/schema/queries/storePageIdByUrl.js +2 -2
- package/dist/schema/queries/storePageIdListBySomeId.js +2 -2
- package/dist/schema/queries/storePageInfoBySku.js +2 -2
- package/dist/schema/queries/storePageScrapeData.js +2 -2
- package/dist/schema/queries/subCategoryIdListByCategoryId.js +2 -2
- package/dist/schema/queries/subsetModifierDataByModifiers.js +2 -2
- package/dist/schema/queries/topProductDocumentList.js +2 -2
- package/dist/schema/queries/unstableMediaIdListByCategoryId.js +2 -2
- package/dist/schema/queries/unstableSourceTrust.js +2 -2
- package/dist/schema/queries/userIdList.js +2 -2
- package/dist/schema/queries/userPermissionsByUserId.js +2 -2
- package/dist/schema/queries/userRestictedData.js +2 -2
- package/dist/schema/queries/whoAmI.js +2 -2
- package/dist/schema/queries.js +2 -2
- package/dist/schema/responses.js +2 -2
- package/dist/store/entities/index.js +25 -25
- package/dist/store/entities/makeEntityReducer.js +23 -23
- package/dist/store/errors/index.js +23 -23
- package/dist/store/errors/makeErrorReducer.js +23 -23
- package/dist/store/index.js +16 -16
- package/dist/store/responses/index.js +85 -85
- package/dist/store/responses/makeResponseReducer.js +23 -23
- package/package.json +1 -1
- package/types/Context.d.ts +4 -4
- package/types/Provider.d.ts +3 -3
- package/types/actions.d.ts +7 -7
- package/types/api/QueryError.d.ts +29 -29
- package/types/api/QueryResolver.d.ts +31 -28
- package/types/api/QueryResolver.d.ts.map +1 -1
- package/types/api/WrappedQuery.d.ts +8 -8
- package/types/api/fast1a64utf.d.ts +2 -2
- package/types/api/fetchEntity.d.ts +6 -3
- package/types/api/fetchEntity.d.ts.map +1 -1
- package/types/api/fetchQuery.d.ts +6 -3
- package/types/api/fetchQuery.d.ts.map +1 -1
- package/types/api/getHash.d.ts +6 -6
- package/types/api/getQueryHash.d.ts +2 -2
- package/types/hooks/index.d.ts +7 -7
- package/types/hooks/useApiDispatch.d.ts +3 -3
- package/types/hooks/useApiSelector.d.ts +4 -4
- package/types/hooks/useApiStore.d.ts +2 -2
- package/types/hooks/useEntities.d.ts +7 -4
- package/types/hooks/useEntities.d.ts.map +1 -1
- package/types/hooks/useEntity.d.ts +7 -4
- package/types/hooks/useEntity.d.ts.map +1 -1
- package/types/hooks/useQueries.d.ts +7 -4
- package/types/hooks/useQueries.d.ts.map +1 -1
- package/types/hooks/useQuery.d.ts +7 -4
- package/types/hooks/useQuery.d.ts.map +1 -1
- package/types/index.d.ts +11 -11
- package/types/schema/builtins.d.ts +120 -121
- package/types/schema/builtins.d.ts.map +1 -1
- package/types/schema/entities/alias.d.ts +5 -5
- package/types/schema/entities/brand.d.ts +4 -4
- package/types/schema/entities/category.d.ts +6 -6
- package/types/schema/entities/crawl.d.ts +11 -11
- package/types/schema/entities/index.d.ts +17 -17
- package/types/schema/entities/media.d.ts +5 -5
- package/types/schema/entities/offer.d.ts +10 -10
- package/types/schema/entities/productConfiguration.d.ts +4 -4
- package/types/schema/entities/productFamily.d.ts +4 -4
- package/types/schema/entities/productGeneration.d.ts +4 -4
- package/types/schema/entities/productType.d.ts +4 -4
- package/types/schema/entities/rating.d.ts +52 -52
- package/types/schema/entities/source.d.ts +7 -7
- package/types/schema/entities/spec.d.ts +21 -21
- package/types/schema/entities/specType.d.ts +5 -5
- package/types/schema/entities/specTypeChoice.d.ts +6 -6
- package/types/schema/entities/storePage.d.ts +7 -7
- package/types/schema/entities/storePageQueueGroup.d.ts +5 -5
- package/types/schema/entities/user.d.ts +4 -4
- package/types/schema/index.d.ts +247 -247
- package/types/schema/mutations/createBrand.d.ts +8 -8
- package/types/schema/mutations/createCategory.d.ts +8 -8
- package/types/schema/mutations/createProductConfiguration.d.ts +9 -9
- package/types/schema/mutations/createProductFamily.d.ts +9 -9
- package/types/schema/mutations/createProductGeneration.d.ts +9 -9
- package/types/schema/mutations/createProductType.d.ts +9 -9
- package/types/schema/mutations/createUser.d.ts +9 -9
- package/types/schema/mutations/storePageQueueClaimById.d.ts +16 -16
- package/types/schema/mutations/storePageQueueClaimNext.d.ts +14 -14
- package/types/schema/mutations/storePageQueueHandle.d.ts +14 -14
- package/types/schema/mutations/storePageQueueHandleStorePageIdSet.d.ts +14 -14
- package/types/schema/mutations/updateAlias.d.ts +7 -7
- package/types/schema/mutations/updateBrand.d.ts +7 -7
- package/types/schema/mutations/updateCategory.d.ts +9 -9
- package/types/schema/mutations/updateOffer.d.ts +7 -7
- package/types/schema/mutations/updateProductConfiguration.d.ts +7 -7
- package/types/schema/mutations/updateProductConfigurationProductType.d.ts +7 -7
- package/types/schema/mutations/updateProductFamily.d.ts +7 -7
- package/types/schema/mutations/updateProductFamilyBrand.d.ts +7 -7
- package/types/schema/mutations/updateProductGeneration.d.ts +7 -7
- package/types/schema/mutations/updateProductGenerationProductFamily.d.ts +7 -7
- package/types/schema/mutations/updateProductType.d.ts +7 -7
- package/types/schema/mutations/updateProductTypeProductGeneration.d.ts +7 -7
- package/types/schema/mutations/updateSource.d.ts +9 -9
- package/types/schema/mutations/updateStorePage.d.ts +7 -7
- package/types/schema/queries/affiliateUrl.d.ts +11 -11
- package/types/schema/queries/aliasIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/analyticsTrack.d.ts +5 -5
- package/types/schema/queries/appliedCategoryIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/baseScore.d.ts +8 -8
- package/types/schema/queries/baseScoreRatingIdList.d.ts +7 -7
- package/types/schema/queries/baseScoresByCategoryId.d.ts +11 -11
- package/types/schema/queries/bestInClass.d.ts +19 -19
- package/types/schema/queries/brandIdBySomeId.d.ts +5 -5
- package/types/schema/queries/brandIdList.d.ts +8 -8
- package/types/schema/queries/brandIdListBySearch.d.ts +6 -6
- package/types/schema/queries/categoryDisplayMode.d.ts +10 -10
- package/types/schema/queries/categoryIdByUrlSlug.d.ts +5 -5
- package/types/schema/queries/categoryIdList.d.ts +8 -8
- package/types/schema/queries/categoryIdListBySomeId.d.ts +10 -10
- package/types/schema/queries/categoryIdListBySourceId.d.ts +6 -6
- package/types/schema/queries/categoryModifierSearchList.d.ts +21 -21
- package/types/schema/queries/categoryRankings.d.ts +13 -13
- package/types/schema/queries/categorySearchList.d.ts +16 -16
- package/types/schema/queries/categoryStatusList.d.ts +9 -9
- package/types/schema/queries/crawlIdList.d.ts +11 -11
- package/types/schema/queries/crawlIdListByUrl.d.ts +6 -6
- package/types/schema/queries/descriptionMarkdown.d.ts +5 -5
- package/types/schema/queries/entityType.d.ts +54 -54
- package/types/schema/queries/fallbackPriceByProductTypeId.d.ts +6 -6
- package/types/schema/queries/inputLayerVersion.d.ts +5 -5
- package/types/schema/queries/latestRatingIdList.d.ts +6 -6
- package/types/schema/queries/latestRatingIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/mediaIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/mlCategoryDisplayMode.d.ts +8 -8
- package/types/schema/queries/noteMarkdown.d.ts +5 -5
- package/types/schema/queries/offerIdListByStorePageId.d.ts +12 -12
- package/types/schema/queries/possibleAliasIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/possibleStorePageIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/preferredCategoryIdListByProductId.d.ts +6 -6
- package/types/schema/queries/preferredLatestRatingIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/preferredStorePageList.d.ts +11 -11
- package/types/schema/queries/priceHistoryLookup.d.ts +16 -16
- package/types/schema/queries/pricePointCompetitors.d.ts +16 -16
- package/types/schema/queries/priceRangeByCategoryId.d.ts +10 -10
- package/types/schema/queries/productConfigurationIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/productDealList.d.ts +13 -13
- package/types/schema/queries/productDocumentByStoreUrl.d.ts +7 -7
- package/types/schema/queries/productDocumentsByProductIds.d.ts +6 -6
- package/types/schema/queries/productFamilyIdBySomeId.d.ts +5 -5
- package/types/schema/queries/productFamilyIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/productGenerationIdBySomeId.d.ts +5 -5
- package/types/schema/queries/productGenerationIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/productListSort.d.ts +9 -9
- package/types/schema/queries/productPricePointList.d.ts +13 -13
- package/types/schema/queries/productSearchList.d.ts +39 -39
- package/types/schema/queries/productTypeIdBySomeId.d.ts +5 -5
- package/types/schema/queries/productTypeIdByStoreUrl.d.ts +6 -6
- package/types/schema/queries/productTypeIdListByCategoryId.d.ts +10 -10
- package/types/schema/queries/productTypeIdListByModifiers.d.ts +7 -7
- package/types/schema/queries/productTypeIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/saleMetrics.d.ts +8 -8
- package/types/schema/queries/searchSuggestionList.d.ts +9 -9
- package/types/schema/queries/sectionDataByCrawlId.d.ts +19 -19
- package/types/schema/queries/sourceIdList.d.ts +4 -4
- package/types/schema/queries/specIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/specTypeIdList.d.ts +12 -12
- package/types/schema/queries/specTypeValidValues.d.ts +15 -15
- package/types/schema/queries/specValueRangeListByCategoryId.d.ts +36 -36
- package/types/schema/queries/stablePriceByProductId.d.ts +6 -6
- package/types/schema/queries/stablePriceByProductIdAndStoreName.d.ts +7 -7
- package/types/schema/queries/stablePriceByStorePageId.d.ts +6 -6
- package/types/schema/queries/storePageFetchData.d.ts +12 -12
- package/types/schema/queries/storePageIdByUrl.d.ts +6 -6
- package/types/schema/queries/storePageIdListBySomeId.d.ts +6 -6
- package/types/schema/queries/storePageInfoBySku.d.ts +19 -19
- package/types/schema/queries/storePageScrapeData.d.ts +9 -9
- package/types/schema/queries/subCategoryIdListByCategoryId.d.ts +6 -6
- package/types/schema/queries/subsetModifierDataByModifiers.d.ts +12 -12
- package/types/schema/queries/topProductDocumentList.d.ts +8 -8
- package/types/schema/queries/unstableMediaIdListByCategoryId.d.ts +6 -6
- package/types/schema/queries/unstableSourceTrust.d.ts +9 -9
- package/types/schema/queries/userIdList.d.ts +4 -4
- package/types/schema/queries/userPermissionsByUserId.d.ts +7 -7
- package/types/schema/queries/userRestictedData.d.ts +10 -10
- package/types/schema/queries/whoAmI.d.ts +5 -5
- package/types/schema/queries.d.ts +76 -76
- package/types/schema/responses.d.ts +76 -76
- package/types/store/entities/index.d.ts +23 -23
- package/types/store/entities/makeEntityReducer.d.ts +5 -5
- package/types/store/errors/index.d.ts +4 -4
- package/types/store/errors/makeErrorReducer.d.ts +5 -5
- package/types/store/index.d.ts +111 -111
- package/types/store/responses/index.d.ts +83 -83
- package/types/store/responses/makeResponseReducer.d.ts +5 -5
package/dist/api/fast1a64utf.js
CHANGED
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const hl = [];
|
|
4
|
-
for (let i = 0; i < 256; i++) {
|
|
5
|
-
hl[i] = ((i >> 4) & 15).toString(16) + (i & 15).toString(16);
|
|
6
|
-
}
|
|
7
|
-
function fast1a64utf(str) {
|
|
8
|
-
const l = str.length;
|
|
9
|
-
let c;
|
|
10
|
-
let i;
|
|
11
|
-
let t0 = 0;
|
|
12
|
-
let v0 = 0x2325;
|
|
13
|
-
let t1 = 0;
|
|
14
|
-
let v1 = 0x8422;
|
|
15
|
-
let t2 = 0;
|
|
16
|
-
let v2 = 0x9ce4;
|
|
17
|
-
let t3 = 0;
|
|
18
|
-
let v3 = 0xcbf2;
|
|
19
|
-
for (i = 0; i < l; i++) {
|
|
20
|
-
c = str.charCodeAt(i);
|
|
21
|
-
if (c < 128) {
|
|
22
|
-
v0 ^= c;
|
|
23
|
-
}
|
|
24
|
-
else if (c < 2048) {
|
|
25
|
-
v0 ^= (c >> 6) | 192;
|
|
26
|
-
t0 = v0 * 435;
|
|
27
|
-
t1 = v1 * 435;
|
|
28
|
-
t2 = v2 * 435;
|
|
29
|
-
t3 = v3 * 435;
|
|
30
|
-
t2 += v0 << 8;
|
|
31
|
-
t3 += v1 << 8;
|
|
32
|
-
t1 += t0 >>> 16;
|
|
33
|
-
v0 = t0 & 65535;
|
|
34
|
-
t2 += t1 >>> 16;
|
|
35
|
-
v1 = t1 & 65535;
|
|
36
|
-
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
37
|
-
v2 = t2 & 65535;
|
|
38
|
-
v0 ^= (c & 63) | 128;
|
|
39
|
-
}
|
|
40
|
-
else if ((c & 64512) === 55296 && i + 1 < l && (str.charCodeAt(i + 1) & 64512) === 56320) {
|
|
41
|
-
c = 65536 + ((c & 1023) << 10) + (str.charCodeAt(++i) & 1023);
|
|
42
|
-
v0 ^= (c >> 18) | 240;
|
|
43
|
-
t0 = v0 * 435;
|
|
44
|
-
t1 = v1 * 435;
|
|
45
|
-
t2 = v2 * 435;
|
|
46
|
-
t3 = v3 * 435;
|
|
47
|
-
t2 += v0 << 8;
|
|
48
|
-
t3 += v1 << 8;
|
|
49
|
-
t1 += t0 >>> 16;
|
|
50
|
-
v0 = t0 & 65535;
|
|
51
|
-
t2 += t1 >>> 16;
|
|
52
|
-
v1 = t1 & 65535;
|
|
53
|
-
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
54
|
-
v2 = t2 & 65535;
|
|
55
|
-
v0 ^= ((c >> 12) & 63) | 128;
|
|
56
|
-
t0 = v0 * 435;
|
|
57
|
-
t1 = v1 * 435;
|
|
58
|
-
t2 = v2 * 435;
|
|
59
|
-
t3 = v3 * 435;
|
|
60
|
-
t2 += v0 << 8;
|
|
61
|
-
t3 += v1 << 8;
|
|
62
|
-
t1 += t0 >>> 16;
|
|
63
|
-
v0 = t0 & 65535;
|
|
64
|
-
t2 += t1 >>> 16;
|
|
65
|
-
v1 = t1 & 65535;
|
|
66
|
-
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
67
|
-
v2 = t2 & 65535;
|
|
68
|
-
v0 ^= ((c >> 6) & 63) | 128;
|
|
69
|
-
t0 = v0 * 435;
|
|
70
|
-
t1 = v1 * 435;
|
|
71
|
-
t2 = v2 * 435;
|
|
72
|
-
t3 = v3 * 435;
|
|
73
|
-
t2 += v0 << 8;
|
|
74
|
-
t3 += v1 << 8;
|
|
75
|
-
t1 += t0 >>> 16;
|
|
76
|
-
v0 = t0 & 65535;
|
|
77
|
-
t2 += t1 >>> 16;
|
|
78
|
-
v1 = t1 & 65535;
|
|
79
|
-
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
80
|
-
v2 = t2 & 65535;
|
|
81
|
-
v0 ^= (c & 63) | 128;
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
v0 ^= (c >> 12) | 224;
|
|
85
|
-
t0 = v0 * 435;
|
|
86
|
-
t1 = v1 * 435;
|
|
87
|
-
t2 = v2 * 435;
|
|
88
|
-
t3 = v3 * 435;
|
|
89
|
-
t2 += v0 << 8;
|
|
90
|
-
t3 += v1 << 8;
|
|
91
|
-
t1 += t0 >>> 16;
|
|
92
|
-
v0 = t0 & 65535;
|
|
93
|
-
t2 += t1 >>> 16;
|
|
94
|
-
v1 = t1 & 65535;
|
|
95
|
-
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
96
|
-
v2 = t2 & 65535;
|
|
97
|
-
v0 ^= ((c >> 6) & 63) | 128;
|
|
98
|
-
t0 = v0 * 435;
|
|
99
|
-
t1 = v1 * 435;
|
|
100
|
-
t2 = v2 * 435;
|
|
101
|
-
t3 = v3 * 435;
|
|
102
|
-
t2 += v0 << 8;
|
|
103
|
-
t3 += v1 << 8;
|
|
104
|
-
t1 += t0 >>> 16;
|
|
105
|
-
v0 = t0 & 65535;
|
|
106
|
-
t2 += t1 >>> 16;
|
|
107
|
-
v1 = t1 & 65535;
|
|
108
|
-
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
109
|
-
v2 = t2 & 65535;
|
|
110
|
-
v0 ^= (c & 63) | 128;
|
|
111
|
-
}
|
|
112
|
-
t0 = v0 * 435;
|
|
113
|
-
t1 = v1 * 435;
|
|
114
|
-
t2 = v2 * 435;
|
|
115
|
-
t3 = v3 * 435;
|
|
116
|
-
t2 += v0 << 8;
|
|
117
|
-
t3 += v1 << 8;
|
|
118
|
-
t1 += t0 >>> 16;
|
|
119
|
-
v0 = t0 & 65535;
|
|
120
|
-
t2 += t1 >>> 16;
|
|
121
|
-
v1 = t1 & 65535;
|
|
122
|
-
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
123
|
-
v2 = t2 & 65535;
|
|
124
|
-
}
|
|
125
|
-
return (hl[v3 >> 8] +
|
|
126
|
-
hl[v3 & 255] +
|
|
127
|
-
hl[v2 >> 8] +
|
|
128
|
-
hl[v2 & 255] +
|
|
129
|
-
hl[v1 >> 8] +
|
|
130
|
-
hl[v1 & 255] +
|
|
131
|
-
hl[v0 >> 8] +
|
|
132
|
-
hl[v0 & 255]);
|
|
133
|
-
}
|
|
134
|
-
exports.default = fast1a64utf;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const hl = [];
|
|
4
|
+
for (let i = 0; i < 256; i++) {
|
|
5
|
+
hl[i] = ((i >> 4) & 15).toString(16) + (i & 15).toString(16);
|
|
6
|
+
}
|
|
7
|
+
function fast1a64utf(str) {
|
|
8
|
+
const l = str.length;
|
|
9
|
+
let c;
|
|
10
|
+
let i;
|
|
11
|
+
let t0 = 0;
|
|
12
|
+
let v0 = 0x2325;
|
|
13
|
+
let t1 = 0;
|
|
14
|
+
let v1 = 0x8422;
|
|
15
|
+
let t2 = 0;
|
|
16
|
+
let v2 = 0x9ce4;
|
|
17
|
+
let t3 = 0;
|
|
18
|
+
let v3 = 0xcbf2;
|
|
19
|
+
for (i = 0; i < l; i++) {
|
|
20
|
+
c = str.charCodeAt(i);
|
|
21
|
+
if (c < 128) {
|
|
22
|
+
v0 ^= c;
|
|
23
|
+
}
|
|
24
|
+
else if (c < 2048) {
|
|
25
|
+
v0 ^= (c >> 6) | 192;
|
|
26
|
+
t0 = v0 * 435;
|
|
27
|
+
t1 = v1 * 435;
|
|
28
|
+
t2 = v2 * 435;
|
|
29
|
+
t3 = v3 * 435;
|
|
30
|
+
t2 += v0 << 8;
|
|
31
|
+
t3 += v1 << 8;
|
|
32
|
+
t1 += t0 >>> 16;
|
|
33
|
+
v0 = t0 & 65535;
|
|
34
|
+
t2 += t1 >>> 16;
|
|
35
|
+
v1 = t1 & 65535;
|
|
36
|
+
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
37
|
+
v2 = t2 & 65535;
|
|
38
|
+
v0 ^= (c & 63) | 128;
|
|
39
|
+
}
|
|
40
|
+
else if ((c & 64512) === 55296 && i + 1 < l && (str.charCodeAt(i + 1) & 64512) === 56320) {
|
|
41
|
+
c = 65536 + ((c & 1023) << 10) + (str.charCodeAt(++i) & 1023);
|
|
42
|
+
v0 ^= (c >> 18) | 240;
|
|
43
|
+
t0 = v0 * 435;
|
|
44
|
+
t1 = v1 * 435;
|
|
45
|
+
t2 = v2 * 435;
|
|
46
|
+
t3 = v3 * 435;
|
|
47
|
+
t2 += v0 << 8;
|
|
48
|
+
t3 += v1 << 8;
|
|
49
|
+
t1 += t0 >>> 16;
|
|
50
|
+
v0 = t0 & 65535;
|
|
51
|
+
t2 += t1 >>> 16;
|
|
52
|
+
v1 = t1 & 65535;
|
|
53
|
+
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
54
|
+
v2 = t2 & 65535;
|
|
55
|
+
v0 ^= ((c >> 12) & 63) | 128;
|
|
56
|
+
t0 = v0 * 435;
|
|
57
|
+
t1 = v1 * 435;
|
|
58
|
+
t2 = v2 * 435;
|
|
59
|
+
t3 = v3 * 435;
|
|
60
|
+
t2 += v0 << 8;
|
|
61
|
+
t3 += v1 << 8;
|
|
62
|
+
t1 += t0 >>> 16;
|
|
63
|
+
v0 = t0 & 65535;
|
|
64
|
+
t2 += t1 >>> 16;
|
|
65
|
+
v1 = t1 & 65535;
|
|
66
|
+
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
67
|
+
v2 = t2 & 65535;
|
|
68
|
+
v0 ^= ((c >> 6) & 63) | 128;
|
|
69
|
+
t0 = v0 * 435;
|
|
70
|
+
t1 = v1 * 435;
|
|
71
|
+
t2 = v2 * 435;
|
|
72
|
+
t3 = v3 * 435;
|
|
73
|
+
t2 += v0 << 8;
|
|
74
|
+
t3 += v1 << 8;
|
|
75
|
+
t1 += t0 >>> 16;
|
|
76
|
+
v0 = t0 & 65535;
|
|
77
|
+
t2 += t1 >>> 16;
|
|
78
|
+
v1 = t1 & 65535;
|
|
79
|
+
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
80
|
+
v2 = t2 & 65535;
|
|
81
|
+
v0 ^= (c & 63) | 128;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
v0 ^= (c >> 12) | 224;
|
|
85
|
+
t0 = v0 * 435;
|
|
86
|
+
t1 = v1 * 435;
|
|
87
|
+
t2 = v2 * 435;
|
|
88
|
+
t3 = v3 * 435;
|
|
89
|
+
t2 += v0 << 8;
|
|
90
|
+
t3 += v1 << 8;
|
|
91
|
+
t1 += t0 >>> 16;
|
|
92
|
+
v0 = t0 & 65535;
|
|
93
|
+
t2 += t1 >>> 16;
|
|
94
|
+
v1 = t1 & 65535;
|
|
95
|
+
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
96
|
+
v2 = t2 & 65535;
|
|
97
|
+
v0 ^= ((c >> 6) & 63) | 128;
|
|
98
|
+
t0 = v0 * 435;
|
|
99
|
+
t1 = v1 * 435;
|
|
100
|
+
t2 = v2 * 435;
|
|
101
|
+
t3 = v3 * 435;
|
|
102
|
+
t2 += v0 << 8;
|
|
103
|
+
t3 += v1 << 8;
|
|
104
|
+
t1 += t0 >>> 16;
|
|
105
|
+
v0 = t0 & 65535;
|
|
106
|
+
t2 += t1 >>> 16;
|
|
107
|
+
v1 = t1 & 65535;
|
|
108
|
+
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
109
|
+
v2 = t2 & 65535;
|
|
110
|
+
v0 ^= (c & 63) | 128;
|
|
111
|
+
}
|
|
112
|
+
t0 = v0 * 435;
|
|
113
|
+
t1 = v1 * 435;
|
|
114
|
+
t2 = v2 * 435;
|
|
115
|
+
t3 = v3 * 435;
|
|
116
|
+
t2 += v0 << 8;
|
|
117
|
+
t3 += v1 << 8;
|
|
118
|
+
t1 += t0 >>> 16;
|
|
119
|
+
v0 = t0 & 65535;
|
|
120
|
+
t2 += t1 >>> 16;
|
|
121
|
+
v1 = t1 & 65535;
|
|
122
|
+
v3 = (t3 + (t2 >>> 16)) & 65535;
|
|
123
|
+
v2 = t2 & 65535;
|
|
124
|
+
}
|
|
125
|
+
return (hl[v3 >> 8] +
|
|
126
|
+
hl[v3 & 255] +
|
|
127
|
+
hl[v2 >> 8] +
|
|
128
|
+
hl[v2 & 255] +
|
|
129
|
+
hl[v1 >> 8] +
|
|
130
|
+
hl[v1 & 255] +
|
|
131
|
+
hl[v0 >> 8] +
|
|
132
|
+
hl[v0 & 255]);
|
|
133
|
+
}
|
|
134
|
+
exports.default = fast1a64utf;
|
|
135
135
|
//# sourceMappingURL=fast1a64utf.js.map
|
package/dist/api/fetchEntity.js
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchEntity = void 0;
|
|
4
|
-
const getQueryHash_1 = require("./getQueryHash");
|
|
5
|
-
const QueryError_1 = require("./QueryError");
|
|
6
|
-
const QueryResolver_1 = require("./QueryResolver");
|
|
7
|
-
const fetchEntity = (type, id,
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchEntity = void 0;
|
|
4
|
+
const getQueryHash_1 = require("./getQueryHash");
|
|
5
|
+
const QueryError_1 = require("./QueryError");
|
|
6
|
+
const QueryResolver_1 = require("./QueryResolver");
|
|
7
|
+
const fetchEntity = (type, id, options = {}) => {
|
|
8
|
+
const { queryResolver = QueryResolver_1._getDefaultQueryResolver(), batchKey = type } = options;
|
|
9
|
+
const name = `entity-${type}`;
|
|
10
|
+
const body = { id };
|
|
11
|
+
const query = { name, body };
|
|
12
|
+
const promise = queryResolver.addQueryToQueue(query, { batchKey }).then((response) => {
|
|
13
|
+
var _a, _b, _c, _d, _e, _f;
|
|
14
|
+
const queryHash = getQueryHash_1.getQueryHash(query);
|
|
15
|
+
const entity = (_b = (_a = response.entities) === null || _a === void 0 ? void 0 : _a[type]) === null || _b === void 0 ? void 0 : _b[id];
|
|
16
|
+
const queryResponse = (_d = (_c = response.responses) === null || _c === void 0 ? void 0 : _c[query.name]) === null || _d === void 0 ? void 0 : _d[queryHash];
|
|
17
|
+
if (queryResponse === null) {
|
|
18
|
+
const queryError = (_f = (_e = response.errors) === null || _e === void 0 ? void 0 : _e[query.name]) === null || _f === void 0 ? void 0 : _f[queryHash];
|
|
19
|
+
if (queryError) {
|
|
20
|
+
throw new QueryError_1.QueryResponseError(query, queryError);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
throw new QueryError_1.QueryReferenceError(query, "Query error is not defined");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (queryResponse === undefined) {
|
|
27
|
+
throw new QueryError_1.QueryReferenceError(query, "Query is not defined");
|
|
28
|
+
}
|
|
29
|
+
if (queryResponse !== true) {
|
|
30
|
+
throw new QueryError_1.QueryValidationError(query, "Entities query did not return true");
|
|
31
|
+
}
|
|
32
|
+
if (!entity) {
|
|
33
|
+
throw new QueryError_1.QueryReferenceError(query, "Entity is not defined");
|
|
34
|
+
}
|
|
35
|
+
return entity;
|
|
36
|
+
}, (error) => {
|
|
37
|
+
throw error;
|
|
38
|
+
});
|
|
39
|
+
return promise;
|
|
40
|
+
};
|
|
41
|
+
exports.fetchEntity = fetchEntity;
|
|
41
42
|
//# sourceMappingURL=fetchEntity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchEntity.js","sourceRoot":"","sources":["../../src/api/fetchEntity.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAC7C,6CAKqB;AAGrB,mDAAyE;AAmBlE,MAAM,WAAW,GAAG,CAKzB,IAAgB,EAChB,EAAU,EACV,
|
|
1
|
+
{"version":3,"file":"fetchEntity.js","sourceRoot":"","sources":["../../src/api/fetchEntity.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAC7C,6CAKqB;AAGrB,mDAAyE;AAmBlE,MAAM,WAAW,GAAG,CAKzB,IAAgB,EAChB,EAAU,EACV,UAGI,EAAE,EACW,EAAE;IACnB,MAAM,EAAE,aAAa,GAAG,wCAAwB,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG,OAAO,CAAA;IAC/E,MAAM,IAAI,GAAG,UAAU,IAAI,EAAE,CAAA;IAC7B,MAAM,IAAI,GAAG,EAAE,EAAE,EAAE,CAAA;IACnB,MAAM,KAAK,GAAiB,EAAE,IAAI,EAAE,IAAI,EAAkB,CAAA;IAC1D,MAAM,OAAO,GAAG,aAAa,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CACrE,CAAC,QAAa,EAAE,EAAE;;QAChB,MAAM,SAAS,GAAG,2BAAY,CAAC,KAAK,CAAC,CAAA;QACrC,MAAM,MAAM,GAAuB,MAAA,MAAA,QAAQ,CAAC,QAAQ,0CAAG,IAAI,CAAC,0CAAG,EAAY,CAAW,CAAA;QACtF,MAAM,aAAa,GAAG,MAAA,MAAA,QAAQ,CAAC,SAAS,0CAAG,KAAK,CAAC,IAAI,CAAC,0CAAG,SAAS,CAAC,CAAA;QACnE,IAAI,aAAa,KAAK,IAAI,EAAE;YAC1B,MAAM,UAAU,GAAG,MAAA,MAAA,QAAQ,CAAC,MAAM,0CAAG,KAAK,CAAC,IAAI,CAAC,0CAAG,SAAS,CAAC,CAAA;YAC7D,IAAI,UAAU,EAAE;gBACd,MAAM,IAAI,+BAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;aAChD;iBAAM;gBACL,MAAM,IAAI,gCAAmB,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAA;aACnE;SACF;QACD,IAAI,aAAa,KAAK,SAAS,EAAE;YAC/B,MAAM,IAAI,gCAAmB,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAA;SAC7D;QACD,IAAI,aAAa,KAAK,IAAI,EAAE;YAC1B,MAAM,IAAI,iCAAoB,CAAC,KAAK,EAAE,oCAAoC,CAAC,CAAA;SAC5E;QACD,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAI,gCAAmB,CAAC,KAAK,EAAE,uBAAuB,CAAC,CAAA;SAC9D;QACD,OAAO,MAAM,CAAA;IACf,CAAC,EACD,CAAC,KAAiB,EAAE,EAAE;QACpB,MAAM,KAAK,CAAA;IACb,CAAC,CACF,CAAA;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AA7CY,QAAA,WAAW,eA6CvB"}
|
package/dist/api/fetchQuery.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchQuery = void 0;
|
|
4
|
-
const getQueryHash_1 = require("./getQueryHash");
|
|
5
|
-
const QueryError_1 = require("./QueryError");
|
|
6
|
-
const QueryResolver_1 = require("./QueryResolver");
|
|
7
|
-
const fetchQuery = (name, body,
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchQuery = void 0;
|
|
4
|
+
const getQueryHash_1 = require("./getQueryHash");
|
|
5
|
+
const QueryError_1 = require("./QueryError");
|
|
6
|
+
const QueryResolver_1 = require("./QueryResolver");
|
|
7
|
+
const fetchQuery = (name, body, options = {}) => {
|
|
8
|
+
const { queryResolver = QueryResolver_1._getDefaultQueryResolver(), batchKey = name } = options;
|
|
9
|
+
const query = { name, body };
|
|
10
|
+
const promise = queryResolver.addQueryToQueue(query, { batchKey }).then((response) => {
|
|
11
|
+
var _a, _b, _c, _d;
|
|
12
|
+
const queryResponse = (_b = (_a = response.responses) === null || _a === void 0 ? void 0 : _a[query.name]) === null || _b === void 0 ? void 0 : _b[getQueryHash_1.getQueryHash(query)];
|
|
13
|
+
if (queryResponse === null) {
|
|
14
|
+
const queryError = (_d = (_c = response.errors) === null || _c === void 0 ? void 0 : _c[query.name]) === null || _d === void 0 ? void 0 : _d[getQueryHash_1.getQueryHash(query)];
|
|
15
|
+
if (queryError) {
|
|
16
|
+
throw new QueryError_1.QueryResponseError(query, queryError);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
throw new QueryError_1.QueryReferenceError(query, "Query error is not defined");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (queryResponse === undefined) {
|
|
23
|
+
throw new QueryError_1.QueryReferenceError(query, "Query is not defined");
|
|
24
|
+
}
|
|
25
|
+
return queryResponse;
|
|
26
|
+
}, (error) => {
|
|
27
|
+
throw error;
|
|
28
|
+
});
|
|
29
|
+
return promise;
|
|
30
|
+
};
|
|
31
|
+
exports.fetchQuery = fetchQuery;
|
|
31
32
|
//# sourceMappingURL=fetchQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchQuery.js","sourceRoot":"","sources":["../../src/api/fetchQuery.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAC7C,6CAAkF;AAGlF,mDAAyE;AAmBlE,MAAM,UAAU,GAAG,CAKxB,IAAe,EACf,IAAe,EACf,
|
|
1
|
+
{"version":3,"file":"fetchQuery.js","sourceRoot":"","sources":["../../src/api/fetchQuery.ts"],"names":[],"mappings":";;;AAAA,iDAA6C;AAC7C,6CAAkF;AAGlF,mDAAyE;AAmBlE,MAAM,UAAU,GAAG,CAKxB,IAAe,EACf,IAAe,EACf,UAGI,EAAE,EACgB,EAAE;IACxB,MAAM,EAAE,aAAa,GAAG,wCAAwB,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG,OAAO,CAAA;IAC/E,MAAM,KAAK,GAAiB,EAAE,IAAI,EAAE,IAAI,EAAkB,CAAA;IAC1D,MAAM,OAAO,GAAG,aAAa,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CACrE,CAAC,QAAa,EAAE,EAAE;;QAChB,MAAM,aAAa,GAA4B,MAAA,MAAA,QAAQ,CAAC,SAAS,0CAAG,KAAK,CAAC,IAAI,CAAC,0CAC7E,2BAAY,CAAC,KAAK,CAAC,CACL,CAAA;QAChB,IAAI,aAAa,KAAK,IAAI,EAAE;YAC1B,MAAM,UAAU,GAAG,MAAA,MAAA,QAAQ,CAAC,MAAM,0CAAG,KAAK,CAAC,IAAI,CAAC,0CAAG,2BAAY,CAAC,KAAK,CAAC,CAAC,CAAA;YACvE,IAAI,UAAU,EAAE;gBACd,MAAM,IAAI,+BAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;aAChD;iBAAM;gBACL,MAAM,IAAI,gCAAmB,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAA;aACnE;SACF;QACD,IAAI,aAAa,KAAK,SAAS,EAAE;YAC/B,MAAM,IAAI,gCAAmB,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAA;SAC7D;QACD,OAAO,aAAa,CAAA;IACtB,CAAC,EACD,CAAC,KAAiB,EAAE,EAAE;QACpB,MAAM,KAAK,CAAA;IACb,CAAC,CACF,CAAA;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AArCY,QAAA,UAAU,cAqCtB"}
|
package/dist/api/getHash.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.objectToString = void 0;
|
|
7
|
-
const fast1a64utf_1 = __importDefault(require("./fast1a64utf"));
|
|
8
|
-
const escape = (value) => value.replace(/\\/g, "\\\\").replace(/\"/g, '\\"');
|
|
9
|
-
const objectToString = (data) => {
|
|
10
|
-
return ("{" +
|
|
11
|
-
Object.keys(data)
|
|
12
|
-
.sort()
|
|
13
|
-
.map((key) => {
|
|
14
|
-
const value = data[key];
|
|
15
|
-
return value != null && typeof value === "object"
|
|
16
|
-
? `"${escape(key)}":${exports.objectToString(value)}`
|
|
17
|
-
: typeof value === "string"
|
|
18
|
-
? `"${escape(key)}":"${escape(value)}"`
|
|
19
|
-
: `"${escape(key)}":${value}`;
|
|
20
|
-
})
|
|
21
|
-
.join() +
|
|
22
|
-
"}");
|
|
23
|
-
};
|
|
24
|
-
exports.objectToString = objectToString;
|
|
25
|
-
const getHash = (object) => fast1a64utf_1.default(exports.objectToString(object));
|
|
26
|
-
exports.default = getHash;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.objectToString = void 0;
|
|
7
|
+
const fast1a64utf_1 = __importDefault(require("./fast1a64utf"));
|
|
8
|
+
const escape = (value) => value.replace(/\\/g, "\\\\").replace(/\"/g, '\\"');
|
|
9
|
+
const objectToString = (data) => {
|
|
10
|
+
return ("{" +
|
|
11
|
+
Object.keys(data)
|
|
12
|
+
.sort()
|
|
13
|
+
.map((key) => {
|
|
14
|
+
const value = data[key];
|
|
15
|
+
return value != null && typeof value === "object"
|
|
16
|
+
? `"${escape(key)}":${exports.objectToString(value)}`
|
|
17
|
+
: typeof value === "string"
|
|
18
|
+
? `"${escape(key)}":"${escape(value)}"`
|
|
19
|
+
: `"${escape(key)}":${value}`;
|
|
20
|
+
})
|
|
21
|
+
.join() +
|
|
22
|
+
"}");
|
|
23
|
+
};
|
|
24
|
+
exports.objectToString = objectToString;
|
|
25
|
+
const getHash = (object) => fast1a64utf_1.default(exports.objectToString(object));
|
|
26
|
+
exports.default = getHash;
|
|
27
27
|
//# sourceMappingURL=getHash.js.map
|
package/dist/api/getQueryHash.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getQueryHash = void 0;
|
|
7
|
-
const getHash_1 = __importDefault(require("./getHash"));
|
|
8
|
-
const getQueryHash = (query) => getHash_1.default(query);
|
|
9
|
-
exports.getQueryHash = getQueryHash;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getQueryHash = void 0;
|
|
7
|
+
const getHash_1 = __importDefault(require("./getHash"));
|
|
8
|
+
const getQueryHash = (query) => getHash_1.default(query);
|
|
9
|
+
exports.getQueryHash = getQueryHash;
|
|
10
10
|
//# sourceMappingURL=getQueryHash.js.map
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useQuery = exports.useQueries = exports.useEntity = exports.useEntities = exports.useApiStore = exports.useApiSelector = exports.useApiDispatch = void 0;
|
|
4
|
-
var useApiDispatch_1 = require("./useApiDispatch");
|
|
5
|
-
Object.defineProperty(exports, "useApiDispatch", { enumerable: true, get: function () { return useApiDispatch_1.useApiDispatch; } });
|
|
6
|
-
var useApiSelector_1 = require("./useApiSelector");
|
|
7
|
-
Object.defineProperty(exports, "useApiSelector", { enumerable: true, get: function () { return useApiSelector_1.useApiSelector; } });
|
|
8
|
-
var useApiStore_1 = require("./useApiStore");
|
|
9
|
-
Object.defineProperty(exports, "useApiStore", { enumerable: true, get: function () { return useApiStore_1.useApiStore; } });
|
|
10
|
-
var useEntities_1 = require("./useEntities");
|
|
11
|
-
Object.defineProperty(exports, "useEntities", { enumerable: true, get: function () { return useEntities_1.useEntities; } });
|
|
12
|
-
var useEntity_1 = require("./useEntity");
|
|
13
|
-
Object.defineProperty(exports, "useEntity", { enumerable: true, get: function () { return useEntity_1.useEntity; } });
|
|
14
|
-
var useQueries_1 = require("./useQueries");
|
|
15
|
-
Object.defineProperty(exports, "useQueries", { enumerable: true, get: function () { return useQueries_1.useQueries; } });
|
|
16
|
-
var useQuery_1 = require("./useQuery");
|
|
17
|
-
Object.defineProperty(exports, "useQuery", { enumerable: true, get: function () { return useQuery_1.useQuery; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useQuery = exports.useQueries = exports.useEntity = exports.useEntities = exports.useApiStore = exports.useApiSelector = exports.useApiDispatch = void 0;
|
|
4
|
+
var useApiDispatch_1 = require("./useApiDispatch");
|
|
5
|
+
Object.defineProperty(exports, "useApiDispatch", { enumerable: true, get: function () { return useApiDispatch_1.useApiDispatch; } });
|
|
6
|
+
var useApiSelector_1 = require("./useApiSelector");
|
|
7
|
+
Object.defineProperty(exports, "useApiSelector", { enumerable: true, get: function () { return useApiSelector_1.useApiSelector; } });
|
|
8
|
+
var useApiStore_1 = require("./useApiStore");
|
|
9
|
+
Object.defineProperty(exports, "useApiStore", { enumerable: true, get: function () { return useApiStore_1.useApiStore; } });
|
|
10
|
+
var useEntities_1 = require("./useEntities");
|
|
11
|
+
Object.defineProperty(exports, "useEntities", { enumerable: true, get: function () { return useEntities_1.useEntities; } });
|
|
12
|
+
var useEntity_1 = require("./useEntity");
|
|
13
|
+
Object.defineProperty(exports, "useEntity", { enumerable: true, get: function () { return useEntity_1.useEntity; } });
|
|
14
|
+
var useQueries_1 = require("./useQueries");
|
|
15
|
+
Object.defineProperty(exports, "useQueries", { enumerable: true, get: function () { return useQueries_1.useQueries; } });
|
|
16
|
+
var useQuery_1 = require("./useQuery");
|
|
17
|
+
Object.defineProperty(exports, "useQuery", { enumerable: true, get: function () { return useQuery_1.useQuery; } });
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useApiDispatch = void 0;
|
|
7
|
-
const react_redux_1 = require("react-redux");
|
|
8
|
-
const Context_1 = __importDefault(require("../Context"));
|
|
9
|
-
exports.useApiDispatch = react_redux_1.createDispatchHook(Context_1.default);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useApiDispatch = void 0;
|
|
7
|
+
const react_redux_1 = require("react-redux");
|
|
8
|
+
const Context_1 = __importDefault(require("../Context"));
|
|
9
|
+
exports.useApiDispatch = react_redux_1.createDispatchHook(Context_1.default);
|
|
10
10
|
//# sourceMappingURL=useApiDispatch.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useApiSelector = void 0;
|
|
7
|
-
const react_redux_1 = require("react-redux");
|
|
8
|
-
const Context_1 = __importDefault(require("../Context"));
|
|
9
|
-
exports.useApiSelector = react_redux_1.createSelectorHook(Context_1.default);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useApiSelector = void 0;
|
|
7
|
+
const react_redux_1 = require("react-redux");
|
|
8
|
+
const Context_1 = __importDefault(require("../Context"));
|
|
9
|
+
exports.useApiSelector = react_redux_1.createSelectorHook(Context_1.default);
|
|
10
10
|
//# sourceMappingURL=useApiSelector.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useApiStore = void 0;
|
|
7
|
-
const react_redux_1 = require("react-redux");
|
|
8
|
-
const Context_1 = __importDefault(require("../Context"));
|
|
9
|
-
exports.useApiStore = react_redux_1.createStoreHook(Context_1.default);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useApiStore = void 0;
|
|
7
|
+
const react_redux_1 = require("react-redux");
|
|
8
|
+
const Context_1 = __importDefault(require("../Context"));
|
|
9
|
+
exports.useApiStore = react_redux_1.createStoreHook(Context_1.default);
|
|
10
10
|
//# sourceMappingURL=useApiStore.js.map
|