@vtex/api 6.45.4
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/CHANGELOG.md +1685 -0
- package/README.md +65 -0
- package/gen/manifest.schema +189 -0
- package/lib/HttpClient/GraphQLClient.d.ts +28 -0
- package/lib/HttpClient/GraphQLClient.js +30 -0
- package/lib/HttpClient/HttpClient.d.ts +29 -0
- package/lib/HttpClient/HttpClient.js +130 -0
- package/lib/HttpClient/agents.d.ts +3 -0
- package/lib/HttpClient/agents.js +24 -0
- package/lib/HttpClient/index.d.ts +6 -0
- package/lib/HttpClient/index.js +14 -0
- package/lib/HttpClient/middlewares/cache.d.ts +35 -0
- package/lib/HttpClient/middlewares/cache.js +173 -0
- package/lib/HttpClient/middlewares/cancellationToken.d.ts +3 -0
- package/lib/HttpClient/middlewares/cancellationToken.js +72 -0
- package/lib/HttpClient/middlewares/inflight.d.ts +5 -0
- package/lib/HttpClient/middlewares/inflight.js +50 -0
- package/lib/HttpClient/middlewares/memoization.d.ts +7 -0
- package/lib/HttpClient/middlewares/memoization.js +40 -0
- package/lib/HttpClient/middlewares/metrics.d.ts +9 -0
- package/lib/HttpClient/middlewares/metrics.js +110 -0
- package/lib/HttpClient/middlewares/notFound.d.ts +7 -0
- package/lib/HttpClient/middlewares/notFound.js +20 -0
- package/lib/HttpClient/middlewares/recorder.d.ts +3 -0
- package/lib/HttpClient/middlewares/recorder.js +21 -0
- package/lib/HttpClient/middlewares/request/HttpAgentSingleton.d.ts +14 -0
- package/lib/HttpClient/middlewares/request/HttpAgentSingleton.js +37 -0
- package/lib/HttpClient/middlewares/request/index.d.ts +18 -0
- package/lib/HttpClient/middlewares/request/index.js +83 -0
- package/lib/HttpClient/middlewares/request/setupAxios/index.d.ts +1 -0
- package/lib/HttpClient/middlewares/request/setupAxios/index.js +20 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/exponentialBackoff.d.ts +2 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/exponentialBackoff.js +48 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/index.d.ts +2 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/index.js +7 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/index.d.ts +8 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/index.js +51 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/spanSetup.d.ts +4 -0
- package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/spanSetup.js +29 -0
- package/lib/HttpClient/middlewares/tracing.d.ts +15 -0
- package/lib/HttpClient/middlewares/tracing.js +54 -0
- package/lib/HttpClient/typings.d.ts +123 -0
- package/lib/HttpClient/typings.js +11 -0
- package/lib/caches/CacheLayer.d.ts +7 -0
- package/lib/caches/CacheLayer.js +2 -0
- package/lib/caches/DiskCache.d.ts +17 -0
- package/lib/caches/DiskCache.js +70 -0
- package/lib/caches/LRUCache.d.ts +16 -0
- package/lib/caches/LRUCache.js +48 -0
- package/lib/caches/LRUDiskCache.d.ts +21 -0
- package/lib/caches/LRUDiskCache.js +132 -0
- package/lib/caches/MultilayeredCache.d.ts +14 -0
- package/lib/caches/MultilayeredCache.js +68 -0
- package/lib/caches/index.d.ts +6 -0
- package/lib/caches/index.js +9 -0
- package/lib/caches/typings.d.ts +48 -0
- package/lib/caches/typings.js +2 -0
- package/lib/clients/IOClient.d.ts +13 -0
- package/lib/clients/IOClient.js +19 -0
- package/lib/clients/IOClients.d.ts +37 -0
- package/lib/clients/IOClients.js +89 -0
- package/lib/clients/IOGraphQLClient.d.ts +13 -0
- package/lib/clients/IOGraphQLClient.js +16 -0
- package/lib/clients/apps/AppClient.d.ts +9 -0
- package/lib/clients/apps/AppClient.js +34 -0
- package/lib/clients/apps/AppGraphQLClient.d.ts +9 -0
- package/lib/clients/apps/AppGraphQLClient.js +34 -0
- package/lib/clients/apps/Billing.d.ts +12 -0
- package/lib/clients/apps/Billing.js +21 -0
- package/lib/clients/apps/Builder.d.ts +45 -0
- package/lib/clients/apps/Builder.js +114 -0
- package/lib/clients/apps/MessagesGraphQL.d.ts +61 -0
- package/lib/clients/apps/MessagesGraphQL.js +121 -0
- package/lib/clients/apps/Settings.d.ts +14 -0
- package/lib/clients/apps/Settings.js +38 -0
- package/lib/clients/apps/catalogGraphQL/brand.d.ts +13 -0
- package/lib/clients/apps/catalogGraphQL/brand.js +18 -0
- package/lib/clients/apps/catalogGraphQL/category.d.ts +11 -0
- package/lib/clients/apps/catalogGraphQL/category.js +16 -0
- package/lib/clients/apps/catalogGraphQL/index.d.ts +22 -0
- package/lib/clients/apps/catalogGraphQL/index.js +88 -0
- package/lib/clients/apps/catalogGraphQL/product.d.ts +25 -0
- package/lib/clients/apps/catalogGraphQL/product.js +30 -0
- package/lib/clients/apps/catalogGraphQL/sku.d.ts +26 -0
- package/lib/clients/apps/catalogGraphQL/sku.js +30 -0
- package/lib/clients/apps/index.d.ts +7 -0
- package/lib/clients/apps/index.js +12 -0
- package/lib/clients/external/ExternalClient.d.ts +9 -0
- package/lib/clients/external/ExternalClient.js +21 -0
- package/lib/clients/external/ID.d.ts +23 -0
- package/lib/clients/external/ID.js +60 -0
- package/lib/clients/external/Masterdata.d.ts +93 -0
- package/lib/clients/external/Masterdata.js +223 -0
- package/lib/clients/external/PaymentProvider.d.ts +31 -0
- package/lib/clients/external/PaymentProvider.js +42 -0
- package/lib/clients/external/index.d.ts +4 -0
- package/lib/clients/external/index.js +9 -0
- package/lib/clients/index.d.ts +9 -0
- package/lib/clients/index.js +17 -0
- package/lib/clients/infra/Apps.d.ts +88 -0
- package/lib/clients/infra/Apps.js +508 -0
- package/lib/clients/infra/Assets.d.ts +34 -0
- package/lib/clients/infra/Assets.js +165 -0
- package/lib/clients/infra/BillingMetrics.d.ts +13 -0
- package/lib/clients/infra/BillingMetrics.js +15 -0
- package/lib/clients/infra/Events.d.ts +12 -0
- package/lib/clients/infra/Events.js +33 -0
- package/lib/clients/infra/Housekeeper.d.ts +10 -0
- package/lib/clients/infra/Housekeeper.js +30 -0
- package/lib/clients/infra/InfraClient.d.ts +9 -0
- package/lib/clients/infra/InfraClient.js +34 -0
- package/lib/clients/infra/Metadata.d.ts +26 -0
- package/lib/clients/infra/Metadata.js +83 -0
- package/lib/clients/infra/Registry.d.ts +59 -0
- package/lib/clients/infra/Registry.js +207 -0
- package/lib/clients/infra/Router.d.ts +34 -0
- package/lib/clients/infra/Router.js +81 -0
- package/lib/clients/infra/Sphinx.d.ts +13 -0
- package/lib/clients/infra/Sphinx.js +29 -0
- package/lib/clients/infra/VBase.d.ts +60 -0
- package/lib/clients/infra/VBase.js +171 -0
- package/lib/clients/infra/Workspaces.d.ts +18 -0
- package/lib/clients/infra/Workspaces.js +65 -0
- package/lib/clients/infra/index.d.ts +12 -0
- package/lib/clients/infra/index.js +17 -0
- package/lib/clients/janus/JanusClient.d.ts +21 -0
- package/lib/clients/janus/JanusClient.js +30 -0
- package/lib/clients/janus/LicenseManager.d.ts +7 -0
- package/lib/clients/janus/LicenseManager.js +58 -0
- package/lib/clients/janus/Segment.d.ts +36 -0
- package/lib/clients/janus/Segment.js +79 -0
- package/lib/clients/janus/Session.d.ts +15 -0
- package/lib/clients/janus/Session.js +75 -0
- package/lib/clients/janus/Tenant.d.ts +29 -0
- package/lib/clients/janus/Tenant.js +28 -0
- package/lib/clients/janus/index.d.ts +5 -0
- package/lib/clients/janus/index.js +10 -0
- package/lib/constants.d.ts +59 -0
- package/lib/constants.js +65 -0
- package/lib/errors/AuthenticationError.d.ts +18 -0
- package/lib/errors/AuthenticationError.js +24 -0
- package/lib/errors/ForbiddenError.d.ts +18 -0
- package/lib/errors/ForbiddenError.js +24 -0
- package/lib/errors/NotFoundError.d.ts +18 -0
- package/lib/errors/NotFoundError.js +24 -0
- package/lib/errors/RequestCancelledError.d.ts +6 -0
- package/lib/errors/RequestCancelledError.js +11 -0
- package/lib/errors/ResolverError.d.ts +29 -0
- package/lib/errors/ResolverError.js +35 -0
- package/lib/errors/ResolverWarning.d.ts +21 -0
- package/lib/errors/ResolverWarning.js +28 -0
- package/lib/errors/TooManyRequestsError.d.ts +4 -0
- package/lib/errors/TooManyRequestsError.js +9 -0
- package/lib/errors/UserInputError.d.ts +18 -0
- package/lib/errors/UserInputError.js +24 -0
- package/lib/errors/customGraphQLError.d.ts +4 -0
- package/lib/errors/customGraphQLError.js +9 -0
- package/lib/errors/index.d.ts +8 -0
- package/lib/errors/index.js +13 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.js +21 -0
- package/lib/metrics/MetricsAccumulator.d.ts +35 -0
- package/lib/metrics/MetricsAccumulator.js +125 -0
- package/lib/responses.d.ts +79 -0
- package/lib/responses.js +2 -0
- package/lib/service/index.d.ts +2 -0
- package/lib/service/index.js +30 -0
- package/lib/service/loaders.d.ts +8 -0
- package/lib/service/loaders.js +54 -0
- package/lib/service/logger/console.d.ts +10 -0
- package/lib/service/logger/console.js +36 -0
- package/lib/service/logger/index.d.ts +2 -0
- package/lib/service/logger/index.js +7 -0
- package/lib/service/logger/logger.d.ts +35 -0
- package/lib/service/logger/logger.js +73 -0
- package/lib/service/logger/metricsLogger.d.ts +40 -0
- package/lib/service/logger/metricsLogger.js +149 -0
- package/lib/service/master.d.ts +2 -0
- package/lib/service/master.js +91 -0
- package/lib/service/tracing/TracerSingleton.d.ts +7 -0
- package/lib/service/tracing/TracerSingleton.js +54 -0
- package/lib/service/tracing/metrics/MetricNames.d.ts +60 -0
- package/lib/service/tracing/metrics/MetricNames.js +44 -0
- package/lib/service/tracing/metrics/instruments.d.ts +9 -0
- package/lib/service/tracing/metrics/instruments.js +11 -0
- package/lib/service/tracing/metrics/measurers/EventLoopLagMeasurer.d.ts +9 -0
- package/lib/service/tracing/metrics/measurers/EventLoopLagMeasurer.js +25 -0
- package/lib/service/tracing/tracingMiddlewares.d.ts +5 -0
- package/lib/service/tracing/tracingMiddlewares.js +119 -0
- package/lib/service/worker/index.d.ts +11 -0
- package/lib/service/worker/index.js +193 -0
- package/lib/service/worker/listeners.d.ts +3 -0
- package/lib/service/worker/listeners.js +43 -0
- package/lib/service/worker/runtime/Service.d.ts +17 -0
- package/lib/service/worker/runtime/Service.js +23 -0
- package/lib/service/worker/runtime/builtIn/handlers.d.ts +4 -0
- package/lib/service/worker/runtime/builtIn/handlers.js +27 -0
- package/lib/service/worker/runtime/builtIn/middlewares.d.ts +4 -0
- package/lib/service/worker/runtime/builtIn/middlewares.js +40 -0
- package/lib/service/worker/runtime/events/index.d.ts +4 -0
- package/lib/service/worker/runtime/events/index.js +46 -0
- package/lib/service/worker/runtime/events/middlewares/body.d.ts +3 -0
- package/lib/service/worker/runtime/events/middlewares/body.js +22 -0
- package/lib/service/worker/runtime/events/middlewares/context.d.ts +3 -0
- package/lib/service/worker/runtime/events/middlewares/context.js +22 -0
- package/lib/service/worker/runtime/events/router.d.ts +2 -0
- package/lib/service/worker/runtime/events/router.js +27 -0
- package/lib/service/worker/runtime/graphql/index.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/index.js +27 -0
- package/lib/service/worker/runtime/graphql/middlewares/context.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/context.js +16 -0
- package/lib/service/worker/runtime/graphql/middlewares/error.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/error.js +93 -0
- package/lib/service/worker/runtime/graphql/middlewares/query.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/query.js +52 -0
- package/lib/service/worker/runtime/graphql/middlewares/response.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/response.js +38 -0
- package/lib/service/worker/runtime/graphql/middlewares/run.d.ts +2 -0
- package/lib/service/worker/runtime/graphql/middlewares/run.js +19 -0
- package/lib/service/worker/runtime/graphql/middlewares/updateSchema.d.ts +4 -0
- package/lib/service/worker/runtime/graphql/middlewares/updateSchema.js +28 -0
- package/lib/service/worker/runtime/graphql/middlewares/upload.d.ts +4 -0
- package/lib/service/worker/runtime/graphql/middlewares/upload.js +12 -0
- package/lib/service/worker/runtime/graphql/schema/index.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/index.js +31 -0
- package/lib/service/worker/runtime/graphql/schema/messagesLoaderV2.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/schema/messagesLoaderV2.js +79 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Auth.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Auth.js +73 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/CacheControl.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/CacheControl.js +37 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Deprecated.d.ts +11 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Deprecated.js +61 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Metric.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Metric.js +40 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Sanitize.d.ts +9 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Sanitize.js +35 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Settings.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Settings.js +34 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/SmartCacheDirective.d.ts +6 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/SmartCacheDirective.js +29 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.js +39 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslateTo.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslateTo.js +33 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/index.d.ts +22 -0
- package/lib/service/worker/runtime/graphql/schema/schemaDirectives/index.js +36 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/index.d.ts +7 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/index.js +12 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/ioUpload.d.ts +3 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/ioUpload.js +16 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.d.ts +10 -0
- package/lib/service/worker/runtime/graphql/schema/typeDefs/sanitizedString.js +39 -0
- package/lib/service/worker/runtime/graphql/typings.d.ts +31 -0
- package/lib/service/worker/runtime/graphql/typings.js +2 -0
- package/lib/service/worker/runtime/graphql/utils/cacheControl.d.ts +1 -0
- package/lib/service/worker/runtime/graphql/utils/cacheControl.js +32 -0
- package/lib/service/worker/runtime/graphql/utils/error.d.ts +1 -0
- package/lib/service/worker/runtime/graphql/utils/error.js +76 -0
- package/lib/service/worker/runtime/graphql/utils/pathname.d.ts +1 -0
- package/lib/service/worker/runtime/graphql/utils/pathname.js +7 -0
- package/lib/service/worker/runtime/graphql/utils/translations.d.ts +14 -0
- package/lib/service/worker/runtime/graphql/utils/translations.js +38 -0
- package/lib/service/worker/runtime/http/index.d.ts +5 -0
- package/lib/service/worker/runtime/http/index.js +58 -0
- package/lib/service/worker/runtime/http/middlewares/authTokens.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/authTokens.js +12 -0
- package/lib/service/worker/runtime/http/middlewares/cancellationToken.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/cancellationToken.js +18 -0
- package/lib/service/worker/runtime/http/middlewares/clients.d.ts +4 -0
- package/lib/service/worker/runtime/http/middlewares/clients.js +12 -0
- package/lib/service/worker/runtime/http/middlewares/context.d.ts +4 -0
- package/lib/service/worker/runtime/http/middlewares/context.js +36 -0
- package/lib/service/worker/runtime/http/middlewares/error.d.ts +2 -0
- package/lib/service/worker/runtime/http/middlewares/error.js +84 -0
- package/lib/service/worker/runtime/http/middlewares/rateLimit.d.ts +6 -0
- package/lib/service/worker/runtime/http/middlewares/rateLimit.js +42 -0
- package/lib/service/worker/runtime/http/middlewares/requestStats.d.ts +17 -0
- package/lib/service/worker/runtime/http/middlewares/requestStats.js +40 -0
- package/lib/service/worker/runtime/http/middlewares/setCookie.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/setCookie.js +52 -0
- package/lib/service/worker/runtime/http/middlewares/settings.d.ts +9 -0
- package/lib/service/worker/runtime/http/middlewares/settings.js +43 -0
- package/lib/service/worker/runtime/http/middlewares/timings.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/timings.js +45 -0
- package/lib/service/worker/runtime/http/middlewares/vary.d.ts +3 -0
- package/lib/service/worker/runtime/http/middlewares/vary.js +52 -0
- package/lib/service/worker/runtime/http/router.d.ts +2 -0
- package/lib/service/worker/runtime/http/router.js +23 -0
- package/lib/service/worker/runtime/http/routes.d.ts +19 -0
- package/lib/service/worker/runtime/http/routes.js +12 -0
- package/lib/service/worker/runtime/method.d.ts +9 -0
- package/lib/service/worker/runtime/method.js +23 -0
- package/lib/service/worker/runtime/statusTrack.d.ts +14 -0
- package/lib/service/worker/runtime/statusTrack.js +37 -0
- package/lib/service/worker/runtime/typings.d.ts +172 -0
- package/lib/service/worker/runtime/typings.js +2 -0
- package/lib/service/worker/runtime/utils/compose.d.ts +5 -0
- package/lib/service/worker/runtime/utils/compose.js +11 -0
- package/lib/service/worker/runtime/utils/context.d.ts +2 -0
- package/lib/service/worker/runtime/utils/context.js +40 -0
- package/lib/service/worker/runtime/utils/diff.d.ts +12 -0
- package/lib/service/worker/runtime/utils/diff.js +21 -0
- package/lib/service/worker/runtime/utils/recorder.d.ts +8 -0
- package/lib/service/worker/runtime/utils/recorder.js +37 -0
- package/lib/service/worker/runtime/utils/toArray.d.ts +1 -0
- package/lib/service/worker/runtime/utils/toArray.js +3 -0
- package/lib/service/worker/runtime/utils/tokenBucket.d.ts +2 -0
- package/lib/service/worker/runtime/utils/tokenBucket.js +16 -0
- package/lib/tracing/LogEvents.d.ts +31 -0
- package/lib/tracing/LogEvents.js +3 -0
- package/lib/tracing/LogFields.d.ts +61 -0
- package/lib/tracing/LogFields.js +3 -0
- package/lib/tracing/Tags.d.ts +79 -0
- package/lib/tracing/Tags.js +7 -0
- package/lib/tracing/UserLandTracer.d.ts +27 -0
- package/lib/tracing/UserLandTracer.js +55 -0
- package/lib/tracing/errorReporting/ErrorReport.d.ts +31 -0
- package/lib/tracing/errorReporting/ErrorReport.js +61 -0
- package/lib/tracing/index.d.ts +9 -0
- package/lib/tracing/index.js +19 -0
- package/lib/tracing/spanReference/SpanReferenceTypes.d.ts +4 -0
- package/lib/tracing/spanReference/SpanReferenceTypes.js +7 -0
- package/lib/tracing/spanReference/createSpanReference.d.ts +3 -0
- package/lib/tracing/spanReference/createSpanReference.js +8 -0
- package/lib/tracing/utils.d.ts +13 -0
- package/lib/tracing/utils.js +40 -0
- package/lib/utils/MineWinsConflictsResolver.d.ts +28 -0
- package/lib/utils/MineWinsConflictsResolver.js +130 -0
- package/lib/utils/app.d.ts +23 -0
- package/lib/utils/app.js +48 -0
- package/lib/utils/appsStaleIfError.d.ts +11 -0
- package/lib/utils/appsStaleIfError.js +63 -0
- package/lib/utils/billingOptions.d.ts +36 -0
- package/lib/utils/billingOptions.js +9 -0
- package/lib/utils/binding.d.ts +13 -0
- package/lib/utils/binding.js +38 -0
- package/lib/utils/cancel.d.ts +3 -0
- package/lib/utils/cancel.js +12 -0
- package/lib/utils/domain.d.ts +1 -0
- package/lib/utils/domain.js +5 -0
- package/lib/utils/error.d.ts +8 -0
- package/lib/utils/error.js +94 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.js +14 -0
- package/lib/utils/message.d.ts +25 -0
- package/lib/utils/message.js +23 -0
- package/lib/utils/renameBy.d.ts +1 -0
- package/lib/utils/renameBy.js +4 -0
- package/lib/utils/retry.d.ts +4 -0
- package/lib/utils/retry.js +32 -0
- package/lib/utils/status.d.ts +1 -0
- package/lib/utils/status.js +11 -0
- package/lib/utils/tenant.d.ts +5 -0
- package/lib/utils/tenant.js +6 -0
- package/lib/utils/throwOnGraphQLErrors.d.ts +2 -0
- package/lib/utils/throwOnGraphQLErrors.js +15 -0
- package/lib/utils/time.d.ts +31 -0
- package/lib/utils/time.js +118 -0
- package/package.json +127 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { AppMetaInfo, Apps } from '..';
|
|
3
|
+
import { CacheLayer } from '../caches';
|
|
4
|
+
import { Logger } from '../service/logger';
|
|
5
|
+
export declare const getMetaInfoKey: (account: string, workspace: string) => string;
|
|
6
|
+
export declare const updateMetaInfoCache: (cacheStorage: CacheLayer<string, AppMetaInfo[]>, account: string, workspace: string, dependencies: AppMetaInfo[], logger: Logger) => Promise<void>;
|
|
7
|
+
export declare const saveVersion: (app: string, cacheStorage: CacheLayer<string, string>) => Promise<void>;
|
|
8
|
+
export declare const getFallbackFile: (app: string, path: string, cacheStorage: CacheLayer<string, string>, apps: Apps) => Promise<{
|
|
9
|
+
data: Buffer;
|
|
10
|
+
headers: any;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
6
|
+
if (mod && mod.__esModule) return mod;
|
|
7
|
+
var result = {};
|
|
8
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
9
|
+
result["default"] = mod;
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
14
|
+
const ramda_1 = require("ramda");
|
|
15
|
+
const semver = __importStar(require("semver"));
|
|
16
|
+
exports.getMetaInfoKey = (account, workspace) => `${account}-${workspace}-meta-infos`;
|
|
17
|
+
const hashMD5 = (text) => crypto_1.default
|
|
18
|
+
.createHash('md5')
|
|
19
|
+
.update(text)
|
|
20
|
+
.digest('hex');
|
|
21
|
+
exports.updateMetaInfoCache = async (cacheStorage, account, workspace, dependencies, logger) => {
|
|
22
|
+
if (workspace !== 'master') {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const key = exports.getMetaInfoKey(account, workspace);
|
|
26
|
+
const hash = hashMD5(dependencies.toString());
|
|
27
|
+
try {
|
|
28
|
+
const storedDependencies = await cacheStorage.get(key) || '';
|
|
29
|
+
if (hash !== hashMD5(storedDependencies.toString())) {
|
|
30
|
+
await cacheStorage.set(key, dependencies);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
logger.error({ error, message: 'Apps disk cache update failed' });
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
};
|
|
38
|
+
const getFallbackKey = (appName, major) => `${appName}@${major}`;
|
|
39
|
+
exports.saveVersion = async (app, cacheStorage) => {
|
|
40
|
+
const [appName, version] = app.split('@');
|
|
41
|
+
const major = ramda_1.head(version.split('.')) || '';
|
|
42
|
+
const fallbackKey = getFallbackKey(appName, major);
|
|
43
|
+
if (cacheStorage.has(fallbackKey)) {
|
|
44
|
+
const savedVersion = await cacheStorage.get(fallbackKey);
|
|
45
|
+
if (savedVersion && (version === `${major}.x` || semver.gt(version, savedVersion))) {
|
|
46
|
+
await cacheStorage.set(fallbackKey, version);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
await cacheStorage.set(fallbackKey, version);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.getFallbackFile = async (app, path, cacheStorage, apps) => {
|
|
54
|
+
const [appName, version] = app.split('@');
|
|
55
|
+
const major = ramda_1.head(version.split('.')) || '';
|
|
56
|
+
const fallbackKey = getFallbackKey(appName, major);
|
|
57
|
+
const fallbackVersion = await cacheStorage.get(fallbackKey);
|
|
58
|
+
if (fallbackVersion) {
|
|
59
|
+
const appFallbackVersion = `${appName}@${fallbackVersion}`;
|
|
60
|
+
return apps.getAppFile(appFallbackVersion, path);
|
|
61
|
+
}
|
|
62
|
+
throw Error('Fallback version was not found');
|
|
63
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const isFreeBillingOptions: (billingOptions: BillingOptions) => boolean;
|
|
2
|
+
export interface BillingOptions {
|
|
3
|
+
type: BILLING_TYPE;
|
|
4
|
+
support: Support;
|
|
5
|
+
availableCountries: string[];
|
|
6
|
+
plans?: Plan[];
|
|
7
|
+
}
|
|
8
|
+
export declare enum BILLING_TYPE {
|
|
9
|
+
FREE = "free",
|
|
10
|
+
BILLABLE = "billable",
|
|
11
|
+
SPONSORED = "sponsored"
|
|
12
|
+
}
|
|
13
|
+
export interface PriceMetric {
|
|
14
|
+
id: string;
|
|
15
|
+
ranges: Range[];
|
|
16
|
+
customUrl: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Range {
|
|
19
|
+
exclusiveFrom: number;
|
|
20
|
+
inclusiveTo?: number;
|
|
21
|
+
multiplier: number;
|
|
22
|
+
}
|
|
23
|
+
export interface Plan {
|
|
24
|
+
id: string;
|
|
25
|
+
currency: string;
|
|
26
|
+
price: Price;
|
|
27
|
+
}
|
|
28
|
+
export interface Price {
|
|
29
|
+
subscription?: number;
|
|
30
|
+
metrics?: PriceMetric[];
|
|
31
|
+
}
|
|
32
|
+
export interface Support {
|
|
33
|
+
email: string;
|
|
34
|
+
url?: string;
|
|
35
|
+
phone?: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFreeBillingOptions = (billingOptions) => billingOptions.type === BILLING_TYPE.FREE;
|
|
4
|
+
var BILLING_TYPE;
|
|
5
|
+
(function (BILLING_TYPE) {
|
|
6
|
+
BILLING_TYPE["FREE"] = "free";
|
|
7
|
+
BILLING_TYPE["BILLABLE"] = "billable";
|
|
8
|
+
BILLING_TYPE["SPONSORED"] = "sponsored";
|
|
9
|
+
})(BILLING_TYPE = exports.BILLING_TYPE || (exports.BILLING_TYPE = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BindingHeader {
|
|
2
|
+
id?: string;
|
|
3
|
+
rootPath?: string;
|
|
4
|
+
locale: string;
|
|
5
|
+
currency?: string;
|
|
6
|
+
}
|
|
7
|
+
declare enum BindingHeaderFormat {
|
|
8
|
+
webframework0 = "v0+webframework",
|
|
9
|
+
kuberouter0 = "v0+kuberouter"
|
|
10
|
+
}
|
|
11
|
+
export declare const formatBindingHeaderValue: (binding: BindingHeader, format?: BindingHeaderFormat) => string;
|
|
12
|
+
export declare const parseBindingHeaderValue: (value: string) => BindingHeader;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var BindingHeaderFormat;
|
|
4
|
+
(function (BindingHeaderFormat) {
|
|
5
|
+
BindingHeaderFormat["webframework0"] = "v0+webframework";
|
|
6
|
+
BindingHeaderFormat["kuberouter0"] = "v0+kuberouter";
|
|
7
|
+
})(BindingHeaderFormat || (BindingHeaderFormat = {}));
|
|
8
|
+
exports.formatBindingHeaderValue = (binding, format = BindingHeaderFormat.webframework0) => {
|
|
9
|
+
if (format === BindingHeaderFormat.webframework0) {
|
|
10
|
+
const jsonString = JSON.stringify(binding);
|
|
11
|
+
return Buffer.from(jsonString, 'utf8').toString('base64');
|
|
12
|
+
}
|
|
13
|
+
if (format === BindingHeaderFormat.kuberouter0) {
|
|
14
|
+
return [
|
|
15
|
+
'0',
|
|
16
|
+
binding.id || '',
|
|
17
|
+
binding.rootPath || '',
|
|
18
|
+
binding.locale || '',
|
|
19
|
+
binding.currency || '',
|
|
20
|
+
].join(',');
|
|
21
|
+
}
|
|
22
|
+
throw new Error(`Unkown binding format: ${format}`);
|
|
23
|
+
};
|
|
24
|
+
exports.parseBindingHeaderValue = (value) => {
|
|
25
|
+
if (value[0] === '0' && value[1] === ',') {
|
|
26
|
+
// v0+kuberouter
|
|
27
|
+
const [, id, rootPath, locale, currency] = value.split(',');
|
|
28
|
+
return {
|
|
29
|
+
currency: currency || undefined,
|
|
30
|
+
id: id || undefined,
|
|
31
|
+
locale,
|
|
32
|
+
rootPath: rootPath || undefined,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
// v0+webframework
|
|
36
|
+
const jsonString = Buffer.from(value, 'base64').toString('utf8');
|
|
37
|
+
return JSON.parse(jsonString);
|
|
38
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ParamsContext, RecorderState, RouteHandler } from '../service/worker/runtime/typings';
|
|
2
|
+
import { IOClients } from './../clients/IOClients';
|
|
3
|
+
export declare function cancel<T extends IOClients, U extends RecorderState, V extends ParamsContext>(middleware: RouteHandler<T, U, V>): RouteHandler<T, U, V>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function cancel(middleware) {
|
|
4
|
+
return async (ctx, next) => {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
if ((_b = (_a = ctx.vtex) === null || _a === void 0 ? void 0 : _a.cancellation) === null || _b === void 0 ? void 0 : _b.cancelled) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
await middleware(ctx, next);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
exports.cancel = cancel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PUBLIC_DOMAINS: string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ramda_1 = require("ramda");
|
|
4
|
+
const VTEX_PUBLIC_ENDPOINT = process.env.VTEX_PUBLIC_ENDPOINT || 'myvtex.com';
|
|
5
|
+
exports.PUBLIC_DOMAINS = ramda_1.uniq([VTEX_PUBLIC_ENDPOINT, 'myvtex.com', 'mygocommerce.com', 'vtexsmb.com']);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PICKED_AXIOS_PROPS: string[];
|
|
2
|
+
export declare const SENSITIVE_EXCEPTION_FIELDS: string[];
|
|
3
|
+
/**
|
|
4
|
+
* Cleans errors by removing circular properties, truncating large strings and picking axios properties
|
|
5
|
+
*
|
|
6
|
+
* @param value an Error instance
|
|
7
|
+
*/
|
|
8
|
+
export declare const cleanError: (value: any) => any;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// Inspired by https://github.com/sindresorhus/serialize-error
|
|
4
|
+
const ramda_1 = require("ramda");
|
|
5
|
+
exports.PICKED_AXIOS_PROPS = ['baseURL', 'cacheable', 'data', 'finished', 'headers', 'method', 'timeout', 'status', 'path', 'url', 'metric', 'inflightKey', 'forceMaxAge', 'params', 'responseType'];
|
|
6
|
+
exports.SENSITIVE_EXCEPTION_FIELDS = ['config', 'request', 'stack'];
|
|
7
|
+
const MAX_ERROR_STRING_LENGTH = process.env.MAX_ERROR_STRING_LENGTH ? parseInt(process.env.MAX_ERROR_STRING_LENGTH, 10) : 8 * 1024;
|
|
8
|
+
const findCaseInsensitive = (target, set) => ramda_1.find(t => t.toLocaleLowerCase() === target, set);
|
|
9
|
+
const destroyCircular = (from, seen) => {
|
|
10
|
+
const to = Array.isArray(from) ? [] : {};
|
|
11
|
+
seen.push(from);
|
|
12
|
+
for (const [key, value] of Object.entries(from)) {
|
|
13
|
+
// Skip functions
|
|
14
|
+
if (typeof value === 'function') {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
// Skip "private" properties
|
|
18
|
+
if (key.startsWith('_')) {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
if (!value || typeof value !== 'object') {
|
|
22
|
+
// Truncate very large strings
|
|
23
|
+
if (typeof value === 'string' && value.length > MAX_ERROR_STRING_LENGTH) {
|
|
24
|
+
to[key] = value.substr(0, MAX_ERROR_STRING_LENGTH) + '[...TRUNCATED]';
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
to[key] = value;
|
|
28
|
+
}
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (!seen.includes(from[key])) {
|
|
32
|
+
to[key] = destroyCircular(from[key], seen.slice());
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
to[key] = '[Circular]';
|
|
36
|
+
}
|
|
37
|
+
const commonProperties = [
|
|
38
|
+
'name',
|
|
39
|
+
'message',
|
|
40
|
+
'stack',
|
|
41
|
+
'code',
|
|
42
|
+
];
|
|
43
|
+
for (const property of commonProperties) {
|
|
44
|
+
if (typeof from[property] === 'string') {
|
|
45
|
+
to[property] = from[property];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const axiosProperties = [
|
|
49
|
+
'config',
|
|
50
|
+
'request',
|
|
51
|
+
'response',
|
|
52
|
+
];
|
|
53
|
+
for (const property of axiosProperties) {
|
|
54
|
+
if (to[property] != null && typeof to[property] === 'object') {
|
|
55
|
+
to[property] = ramda_1.pick(exports.PICKED_AXIOS_PROPS, to[property]);
|
|
56
|
+
const headers = to[property] && to[property].headers;
|
|
57
|
+
if (headers) {
|
|
58
|
+
const headerNames = ramda_1.keys(headers);
|
|
59
|
+
const authorization = findCaseInsensitive('authorization', headerNames);
|
|
60
|
+
if (!!authorization) {
|
|
61
|
+
delete headers[authorization];
|
|
62
|
+
}
|
|
63
|
+
const proxyAuth = findCaseInsensitive('proxy-authorization', headerNames);
|
|
64
|
+
if (!!proxyAuth) {
|
|
65
|
+
delete headers[proxyAuth];
|
|
66
|
+
}
|
|
67
|
+
const vtexIdClientAutCookie = findCaseInsensitive('vtexidclientautcookie', headerNames);
|
|
68
|
+
if (!!vtexIdClientAutCookie) {
|
|
69
|
+
delete headers[vtexIdClientAutCookie];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (!to.code && to.response) {
|
|
75
|
+
to.code = to.response.status && `E_HTTP_${to.response.status}` || 'E_UNKNOWN';
|
|
76
|
+
}
|
|
77
|
+
return to;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Cleans errors by removing circular properties, truncating large strings and picking axios properties
|
|
81
|
+
*
|
|
82
|
+
* @param value an Error instance
|
|
83
|
+
*/
|
|
84
|
+
exports.cleanError = (value) => {
|
|
85
|
+
if (typeof value === 'object') {
|
|
86
|
+
return destroyCircular(value, []);
|
|
87
|
+
}
|
|
88
|
+
// People sometimes throw things besides Error objects…
|
|
89
|
+
if (typeof value === 'function') {
|
|
90
|
+
// `JSON.stringify()` discards functions. We do too, unless a function is thrown directly.
|
|
91
|
+
return `[Function: ${(value.name || 'anonymous')}]`;
|
|
92
|
+
}
|
|
93
|
+
return value;
|
|
94
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './app';
|
|
2
|
+
export * from './error';
|
|
3
|
+
export * from './retry';
|
|
4
|
+
export * from './time';
|
|
5
|
+
export * from './billingOptions';
|
|
6
|
+
export * from './domain';
|
|
7
|
+
export * from './tenant';
|
|
8
|
+
export * from './binding';
|
|
9
|
+
export * from './MineWinsConflictsResolver';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function __export(m) {
|
|
3
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
4
|
+
}
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
__export(require("./app"));
|
|
7
|
+
__export(require("./error"));
|
|
8
|
+
__export(require("./retry"));
|
|
9
|
+
__export(require("./time"));
|
|
10
|
+
__export(require("./billingOptions"));
|
|
11
|
+
__export(require("./domain"));
|
|
12
|
+
__export(require("./tenant"));
|
|
13
|
+
__export(require("./binding"));
|
|
14
|
+
__export(require("./MineWinsConflictsResolver"));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const PROVIDER_SPACER = "::";
|
|
2
|
+
export interface IOMessage {
|
|
3
|
+
id: string;
|
|
4
|
+
content?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
from?: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
behavior?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const providerFromMessage: (message: IOMessage) => string;
|
|
11
|
+
export declare const parseIOMessageId: ({ id }: IOMessage) => {
|
|
12
|
+
locator: string;
|
|
13
|
+
provider: string;
|
|
14
|
+
} | {
|
|
15
|
+
locator: string;
|
|
16
|
+
provider?: undefined;
|
|
17
|
+
};
|
|
18
|
+
export declare const removeProviderFromId: (message: IOMessage) => {
|
|
19
|
+
id: string;
|
|
20
|
+
content?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
from?: string | undefined;
|
|
23
|
+
to?: string | undefined;
|
|
24
|
+
behavior?: string | undefined;
|
|
25
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PROVIDER_SPACER = '::';
|
|
4
|
+
exports.providerFromMessage = (message) => {
|
|
5
|
+
const { provider } = exports.parseIOMessageId(message);
|
|
6
|
+
return provider || 'unknown';
|
|
7
|
+
};
|
|
8
|
+
exports.parseIOMessageId = ({ id }) => {
|
|
9
|
+
const splitted = id.split(exports.PROVIDER_SPACER);
|
|
10
|
+
if (splitted.length === 2) {
|
|
11
|
+
return {
|
|
12
|
+
locator: splitted[1],
|
|
13
|
+
provider: splitted[0],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
locator: splitted[0],
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
exports.removeProviderFromId = (message) => ({
|
|
21
|
+
...message,
|
|
22
|
+
id: exports.parseIOMessageId(message).locator,
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const renameBy: <K>(fn: (key: string) => string, obj: Record<string, K>) => Record<string, K>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const TIMEOUT_CODE = "ProxyTimeout";
|
|
2
|
+
export declare const isNetworkErrorOrRouterTimeout: (e: any) => boolean;
|
|
3
|
+
export declare const isAbortedOrNetworkErrorOrRouterTimeout: (e: any) => boolean;
|
|
4
|
+
export { isNetworkOrIdempotentRequestError, exponentialDelay } from 'axios-retry';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const axios_retry_1 = require("axios-retry");
|
|
4
|
+
exports.TIMEOUT_CODE = 'ProxyTimeout';
|
|
5
|
+
const printLabel = (e, message) => {
|
|
6
|
+
if (!e || !e.config || !e.config.label) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
console.warn(e.config.label, message);
|
|
10
|
+
};
|
|
11
|
+
exports.isNetworkErrorOrRouterTimeout = (e) => {
|
|
12
|
+
if (axios_retry_1.isNetworkOrIdempotentRequestError(e)) {
|
|
13
|
+
printLabel(e, 'Retry from network error');
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
if (e && axios_retry_1.isSafeRequestError(e) && e.response && e.response.data && e.response.data.code === exports.TIMEOUT_CODE) {
|
|
17
|
+
printLabel(e, 'Retry from timeout');
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
return false;
|
|
21
|
+
};
|
|
22
|
+
// Retry on timeout from our end
|
|
23
|
+
exports.isAbortedOrNetworkErrorOrRouterTimeout = (e) => {
|
|
24
|
+
if (e && e.code === 'ECONNABORTED') {
|
|
25
|
+
printLabel(e, 'Retry from abort');
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return exports.isNetworkErrorOrRouterTimeout(e);
|
|
29
|
+
};
|
|
30
|
+
var axios_retry_2 = require("axios-retry");
|
|
31
|
+
exports.isNetworkOrIdempotentRequestError = axios_retry_2.isNetworkOrIdempotentRequestError;
|
|
32
|
+
exports.exponentialDelay = axios_retry_2.exponentialDelay;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const statusLabel: (status: number) => string;
|