start-slicemachine 0.12.62-beta.5 → 0.12.62-beta.7
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/StartSliceMachineProcess.cjs +1 -4
- package/dist/StartSliceMachineProcess.cjs.map +1 -1
- package/dist/StartSliceMachineProcess.js +1 -4
- package/dist/StartSliceMachineProcess.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/api.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/api.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/baseclient.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.cjs +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/checkin.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/envelope.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs +7 -13
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js +8 -14
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integration.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integration.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/functiontostring.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/functiontostring.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/inboundfilters.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/inboundfilters.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/linkederrors.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/linkederrors.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/integrations/requestdata.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/aggregator.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/aggregator.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.cjs +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/envelope.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/instance.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/metric-summary.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/metric-summary.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/utils.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/metrics/utils.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sdk.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/server-runtime-client.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/server-runtime-client.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs +1 -3
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js +1 -3
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sessionflusher.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/sessionflusher.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/errors.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/errors.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/hubextensions.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/hubextensions.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/sampling.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/sampling.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/span.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/spanstatus.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/spanstatus.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/trace.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/trace.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/transaction.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.cjs +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/utils.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.js +2 -2
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/transports/base.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/hasTracingEnabled.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/hasTracingEnabled.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/isSentryRequestUrl.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js +2 -2
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/sdkMetadata.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/aggregate-errors.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/baggage.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/baggage.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/browser.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/browser.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/cookie.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/cookie.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/dsn.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/dsn.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/envelope.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/envelope.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/error.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/error.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.cjs +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/eventbuilder.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/_handlers.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/_handlers.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/console.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/console.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalError.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalError.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/lru.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/lru.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/memo.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/memo.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs +3 -3
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js +3 -3
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/node-stack-trace.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/node-stack-trace.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/normalize.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/normalize.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/path.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/path.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/promisebuffer.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/ratelimit.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/ratelimit.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/requestdata.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/requestdata.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/stacktrace.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/stacktrace.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/string.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/string.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/tracing.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/tracing.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/url.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/url.js.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js +1 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/async/domain.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/async/domain.js +1 -1
- package/dist/_node_modules/@sentry/node/esm/async/domain.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/async/hooks.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/async/hooks.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/async/index.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/async/index.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/client.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/client.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/console.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/console.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/context.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/context.js +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/context.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.cjs +3 -5
- package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.js +3 -5
- package/dist/_node_modules/@sentry/node/esm/integrations/contextlines.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/http.cjs +3 -3
- package/dist/_node_modules/@sentry/node/esm/integrations/http.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/http.js +3 -3
- package/dist/_node_modules/@sentry/node/esm/integrations/http.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/common.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/common.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.cjs +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/modules.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/modules.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/onuncaughtexception.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/onuncaughtexception.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/onunhandledrejection.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/onunhandledrejection.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/spotlight.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/spotlight.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.cjs +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.js +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/undici/index.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/utils/errorhandling.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/utils/errorhandling.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/utils/http.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/integrations/utils/http.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/module.cjs +4 -4
- package/dist/_node_modules/@sentry/node/esm/module.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/module.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/nodeVersion.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/base.cjs +1 -2
- package/dist/_node_modules/@sentry/node/esm/proxy/base.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/base.js +1 -2
- package/dist/_node_modules/@sentry/node/esm/proxy/base.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/index.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/index.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.cjs +3 -6
- package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.js +3 -6
- package/dist/_node_modules/@sentry/node/esm/proxy/parse-proxy-response.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/sdk.cjs +16 -16
- package/dist/_node_modules/@sentry/node/esm/sdk.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/sdk.js +6 -6
- package/dist/_node_modules/@sentry/node/esm/sdk.js.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/transports/http.cjs.map +1 -1
- package/dist/_node_modules/@sentry/node/esm/transports/http.js.map +1 -1
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -1
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -1
- package/dist/_node_modules/fetch-blob/file.cjs +9 -21
- package/dist/_node_modules/fetch-blob/file.cjs.map +1 -1
- package/dist/_node_modules/fetch-blob/file.js +8 -20
- package/dist/_node_modules/fetch-blob/file.js.map +1 -1
- package/dist/_node_modules/fetch-blob/from.cjs +9 -0
- package/dist/_node_modules/fetch-blob/from.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/from.js +9 -0
- package/dist/_node_modules/fetch-blob/from.js.map +1 -0
- package/dist/_node_modules/fetch-blob/index.cjs +8 -21
- package/dist/_node_modules/fetch-blob/index.cjs.map +1 -1
- package/dist/_node_modules/fetch-blob/index.js +8 -21
- package/dist/_node_modules/fetch-blob/index.js.map +1 -1
- package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -1
- package/dist/_node_modules/fetch-blob/streams.js.map +1 -1
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs +12 -29
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -1
- package/dist/_node_modules/formdata-polyfill/esm.min.js +12 -29
- package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -1
- package/dist/_node_modules/lru-cache/index.cjs +1 -2
- package/dist/_node_modules/lru-cache/index.cjs.map +1 -1
- package/dist/_node_modules/lru-cache/index.js +1 -2
- package/dist/_node_modules/lru-cache/index.js.map +1 -1
- package/dist/_node_modules/node-domexception/index.cjs.map +1 -1
- package/dist/_node_modules/node-domexception/index.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/body.cjs +4 -7
- package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/body.js +5 -8
- package/dist/_node_modules/node-fetch/src/body.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/errors/base.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/headers.cjs +1 -2
- package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/headers.js +1 -2
- package/dist/_node_modules/node-fetch/src/headers.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/index.cjs +2 -4
- package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/index.js +3 -5
- package/dist/_node_modules/node-fetch/src/index.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/request.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/response.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/response.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +2 -5
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +2 -5
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -1
- package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -1
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +5 -10
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -1
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +5 -10
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -1
- package/dist/_node_modules/yallist/iterator.cjs +1 -2
- package/dist/_node_modules/yallist/iterator.cjs.map +1 -1
- package/dist/_node_modules/yallist/iterator.js +1 -2
- package/dist/_node_modules/yallist/iterator.js.map +1 -1
- package/dist/_node_modules/yallist/yallist.cjs.map +1 -1
- package/dist/_node_modules/yallist/yallist.js.map +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/legacyMigrations/detectFramework.cjs.map +1 -1
- package/dist/legacyMigrations/detectFramework.js.map +1 -1
- package/dist/legacyMigrations/migrateAssets.cjs.map +1 -1
- package/dist/legacyMigrations/migrateAssets.js.map +1 -1
- package/dist/legacyMigrations/migrateSMJSON.cjs.map +1 -1
- package/dist/legacyMigrations/migrateSMJSON.js.map +1 -1
- package/dist/lib/castArray.cjs.map +1 -1
- package/dist/lib/castArray.js.map +1 -1
- package/dist/lib/createSliceMachineExpressApp.cjs +1 -2
- package/dist/lib/createSliceMachineExpressApp.cjs.map +1 -1
- package/dist/lib/createSliceMachineExpressApp.js +1 -2
- package/dist/lib/createSliceMachineExpressApp.js.map +1 -1
- package/dist/lib/locateFileUpward.cjs.map +1 -1
- package/dist/lib/locateFileUpward.js.map +1 -1
- package/dist/lib/safelyExecute.cjs.map +1 -1
- package/dist/lib/safelyExecute.js.map +1 -1
- package/dist/lib/sentryErrorHandlers.cjs +2 -4
- package/dist/lib/sentryErrorHandlers.cjs.map +1 -1
- package/dist/lib/sentryErrorHandlers.js +2 -4
- package/dist/lib/sentryErrorHandlers.js.map +1 -1
- package/dist/lib/sentryFrontendTunnel.cjs.map +1 -1
- package/dist/lib/sentryFrontendTunnel.js.map +1 -1
- package/dist/lib/setupSentry.cjs +0 -4
- package/dist/lib/setupSentry.cjs.map +1 -1
- package/dist/lib/setupSentry.js +0 -4
- package/dist/lib/setupSentry.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.cjs +1 -2
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.js +1 -2
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/comparator.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.cjs +1 -2
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.js +1 -2
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/range.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/semver.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/classes/semver.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/clean.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/cmp.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/cmp.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/coerce.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/coerce.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare-build.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare-loose.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/compare.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/diff.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/diff.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/eq.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/gt.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/gte.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/inc.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/inc.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/lt.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/lte.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/major.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/minor.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/neq.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/parse.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/parse.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/patch.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/prerelease.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/rcompare.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/rsort.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/satisfies.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/satisfies.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/sort.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/functions/valid.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/index.cjs +4 -4
- package/dist/packages/start-slicemachine/_node_modules/semver/index.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/index.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/debug.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/debug.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/identifiers.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/identifiers.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/parse-options.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/parse-options.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/re.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/internal/re.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/gtr.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/intersects.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/intersects.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/ltr.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/max-satisfying.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/max-satisfying.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-satisfying.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-satisfying.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-version.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/min-version.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/outside.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/outside.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/simplify.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/simplify.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.cjs +10 -11
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.js +10 -11
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/subset.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/to-comparators.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/to-comparators.js.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/valid.cjs.map +1 -1
- package/dist/packages/start-slicemachine/_node_modules/semver/ranges/valid.js.map +1 -1
- package/dist/packages/start-slicemachine/package.json.cjs +1 -1
- package/dist/packages/start-slicemachine/package.json.js +1 -1
- package/package.json +3 -3
- package/dist/lib/checkIsSentryEnabled.cjs +0 -5
- package/dist/lib/checkIsSentryEnabled.cjs.map +0 -1
- package/dist/lib/checkIsSentryEnabled.js +0 -5
- package/dist/lib/checkIsSentryEnabled.js.map +0 -1
|
@@ -7,7 +7,6 @@ import cors from "cors";
|
|
|
7
7
|
import { createSliceMachineManagerMiddleware, createPrismicAuthManagerMiddleware } from "@slicemachine/manager";
|
|
8
8
|
import { rpc, server } from "./sentryErrorHandlers.js";
|
|
9
9
|
import { sentryFrontendTunnel } from "./sentryFrontendTunnel.js";
|
|
10
|
-
import { checkIsSentryEnabled } from "./checkIsSentryEnabled.js";
|
|
11
10
|
import { setUser } from './../_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js';
|
|
12
11
|
const createSliceMachineExpressApp = async (args) => {
|
|
13
12
|
const isTelemetryEnabled = await args.sliceMachineManager.telemetry.checkIsTelemetryEnabled();
|
|
@@ -25,7 +24,7 @@ const createSliceMachineExpressApp = async (args) => {
|
|
|
25
24
|
userID: profile.shortId,
|
|
26
25
|
intercomHash: profile.intercomHash
|
|
27
26
|
});
|
|
28
|
-
|
|
27
|
+
{
|
|
29
28
|
setUser({ id: profile.shortId });
|
|
30
29
|
}
|
|
31
30
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSliceMachineExpressApp.js","sources":["../../../src/lib/createSliceMachineExpressApp.ts"],"sourcesContent":["import * as path from \"node:path\";\n\nimport * as Sentry from \"@sentry/node\";\nimport express, { Express } from \"express\";\nimport bodyParser from \"body-parser\";\nimport { createProxyMiddleware } from \"http-proxy-middleware\";\nimport serveStatic from \"serve-static\";\nimport cors from \"cors\";\n\nimport {\n\tSliceMachineManager,\n\tcreatePrismicAuthManagerMiddleware,\n\tcreateSliceMachineManagerMiddleware,\n} from \"@slicemachine/manager\";\n\nimport * as sentryErrorHandlers from \"./sentryErrorHandlers\";\nimport { sentryFrontendTunnel } from \"./sentryFrontendTunnel\";\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\ntype CreateSliceMachineExpressAppArgs = {\n\tsliceMachineManager: SliceMachineManager;\n};\n\n/**\n * Creates an Express app to handle the following:\n *\n * - Serve the Slice Machine app.\n * - Expose a given Slice Machine manager to non-Node.js environments, like the\n * browser.\n *\n * The Slice Machine app is served from the project's Slice Machine module\n * installation.\n *\n * If `NODE_ENV` is `development`, the Slice Machine app is served via a proxy\n * to Next.js's development server. Slice Machine must be running on port 3000.\n *\n * @param args - Configuration for the server.\n *\n * @returns A standard Express app.\n */\nexport const createSliceMachineExpressApp = async (\n\targs: CreateSliceMachineExpressAppArgs,\n): Promise<Express> => {\n\tconst isTelemetryEnabled =\n\t\tawait args.sliceMachineManager.telemetry.checkIsTelemetryEnabled();\n\n\tconst app = express();\n\n\tapp.use(cors());\n\n\tapp.use(\n\t\t\"/_manager\",\n\t\tcreateSliceMachineManagerMiddleware({\n\t\t\tsliceMachineManager: args.sliceMachineManager,\n\t\t\tonError: isTelemetryEnabled ? sentryErrorHandlers.rpc : undefined,\n\t\t}),\n\t);\n\n\tapp.use(\n\t\t\"/api/auth\",\n\t\tcreatePrismicAuthManagerMiddleware({\n\t\t\tprismicAuthManager: args.sliceMachineManager.getPrismicAuthManager(),\n\t\t\tonLoginCallback: async () => {\n\t\t\t\tconst profile = await args.sliceMachineManager.user.getProfile();\n\t\t\t\tawait args.sliceMachineManager.telemetry.identify({\n\t\t\t\t\tuserID: profile.shortId,\n\t\t\t\t\tintercomHash: profile.intercomHash,\n\t\t\t\t});\n\t\t\t\tif (checkIsSentryEnabled()) {\n\t\t\t\t\tSentry.setUser({ id: profile.shortId });\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tawait args.sliceMachineManager.screenshots.initS3ACL();\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// noop - We'll try again before uploading a screenshot.\n\t\t\t\t}\n\t\t\t},\n\t\t}),\n\t);\n\n\tapp.use(\"/api/t\", bodyParser.text({ type: \"*/*\" }), sentryFrontendTunnel);\n\n\tif (import.meta.env.DEV) {\n\t\tapp.use(\n\t\t\t\"/\",\n\t\t\tcreateProxyMiddleware({\n\t\t\t\ttarget: \"http://localhost:3000\",\n\t\t\t\tchangeOrigin: true,\n\t\t\t\tws: true,\n\t\t\t}),\n\t\t);\n\t} else {\n\t\tconst sliceMachineDir =\n\t\t\tawait args.sliceMachineManager.project.locateSliceMachineUIDir();\n\t\tconst sliceMachineOutDir = path.resolve(sliceMachineDir, \"out\");\n\n\t\tapp.use(serveStatic(sliceMachineOutDir));\n\n\t\tapp.get(\"/changelog\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"changelog.html\"));\n\t\t});\n\n\t\tapp.get(\"/labs\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"labs.html\"));\n\t\t});\n\n\t\tapp.get(\"/slices\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"slices.html\"));\n\t\t});\n\n\t\tapp.get(\"/changes\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"changes.html\"));\n\t\t});\n\n\t\tapp.get(\"/page-types/:id\", (_req, res) => {\n\t\t\tres.sendFile(\n\t\t\t\tpath.join(sliceMachineOutDir, \"page-types/[pageTypeId].html\"),\n\t\t\t);\n\t\t});\n\n\t\tapp.get(\"/custom-types\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"custom-types.html\"));\n\t\t});\n\n\t\tapp.get(\"/custom-types/:id\", (_req, res) => {\n\t\t\tres.sendFile(\n\t\t\t\tpath.join(sliceMachineOutDir, \"custom-types/[customTypeId].html\"),\n\t\t\t);\n\t\t});\n\n\t\tapp.get(\"/slices/:lib/:sliceID/:variation\", (_req, res) => {\n\t\t\tres.sendFile(\n\t\t\t\tpath.join(\n\t\t\t\t\tsliceMachineOutDir,\n\t\t\t\t\t\"slices/[lib]/[sliceName]/[variation].html\",\n\t\t\t\t),\n\t\t\t);\n\t\t});\n\n\t\tapp.get(\"/slices/:lib/:sliceID/:variation/simulator\", (_req, res) => {\n\t\t\tres.sendFile(\n\t\t\t\tpath.join(\n\t\t\t\t\tsliceMachineOutDir,\n\t\t\t\t\t\"slices/[lib]/[sliceName]/[variation]/simulator.html\",\n\t\t\t\t),\n\t\t\t);\n\t\t});\n\t}\n\n\tif (isTelemetryEnabled) {\n\t\tapp.use(sentryErrorHandlers.server);\n\t}\n\n\treturn app;\n};\n"],"names":["sentryErrorHandlers.rpc","Sentry.setUser","sentryErrorHandlers.server"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createSliceMachineExpressApp.js","sources":["../../../src/lib/createSliceMachineExpressApp.ts"],"sourcesContent":["import * as path from \"node:path\";\n\nimport * as Sentry from \"@sentry/node\";\nimport express, { Express } from \"express\";\nimport bodyParser from \"body-parser\";\nimport { createProxyMiddleware } from \"http-proxy-middleware\";\nimport serveStatic from \"serve-static\";\nimport cors from \"cors\";\n\nimport {\n\tSliceMachineManager,\n\tcreatePrismicAuthManagerMiddleware,\n\tcreateSliceMachineManagerMiddleware,\n} from \"@slicemachine/manager\";\n\nimport * as sentryErrorHandlers from \"./sentryErrorHandlers\";\nimport { sentryFrontendTunnel } from \"./sentryFrontendTunnel\";\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\ntype CreateSliceMachineExpressAppArgs = {\n\tsliceMachineManager: SliceMachineManager;\n};\n\n/**\n * Creates an Express app to handle the following:\n *\n * - Serve the Slice Machine app.\n * - Expose a given Slice Machine manager to non-Node.js environments, like the\n * browser.\n *\n * The Slice Machine app is served from the project's Slice Machine module\n * installation.\n *\n * If `NODE_ENV` is `development`, the Slice Machine app is served via a proxy\n * to Next.js's development server. Slice Machine must be running on port 3000.\n *\n * @param args - Configuration for the server.\n *\n * @returns A standard Express app.\n */\nexport const createSliceMachineExpressApp = async (\n\targs: CreateSliceMachineExpressAppArgs,\n): Promise<Express> => {\n\tconst isTelemetryEnabled =\n\t\tawait args.sliceMachineManager.telemetry.checkIsTelemetryEnabled();\n\n\tconst app = express();\n\n\tapp.use(cors());\n\n\tapp.use(\n\t\t\"/_manager\",\n\t\tcreateSliceMachineManagerMiddleware({\n\t\t\tsliceMachineManager: args.sliceMachineManager,\n\t\t\tonError: isTelemetryEnabled ? sentryErrorHandlers.rpc : undefined,\n\t\t}),\n\t);\n\n\tapp.use(\n\t\t\"/api/auth\",\n\t\tcreatePrismicAuthManagerMiddleware({\n\t\t\tprismicAuthManager: args.sliceMachineManager.getPrismicAuthManager(),\n\t\t\tonLoginCallback: async () => {\n\t\t\t\tconst profile = await args.sliceMachineManager.user.getProfile();\n\t\t\t\tawait args.sliceMachineManager.telemetry.identify({\n\t\t\t\t\tuserID: profile.shortId,\n\t\t\t\t\tintercomHash: profile.intercomHash,\n\t\t\t\t});\n\t\t\t\tif (checkIsSentryEnabled()) {\n\t\t\t\t\tSentry.setUser({ id: profile.shortId });\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tawait args.sliceMachineManager.screenshots.initS3ACL();\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// noop - We'll try again before uploading a screenshot.\n\t\t\t\t}\n\t\t\t},\n\t\t}),\n\t);\n\n\tapp.use(\"/api/t\", bodyParser.text({ type: \"*/*\" }), sentryFrontendTunnel);\n\n\tif (import.meta.env.DEV) {\n\t\tapp.use(\n\t\t\t\"/\",\n\t\t\tcreateProxyMiddleware({\n\t\t\t\ttarget: \"http://localhost:3000\",\n\t\t\t\tchangeOrigin: true,\n\t\t\t\tws: true,\n\t\t\t}),\n\t\t);\n\t} else {\n\t\tconst sliceMachineDir =\n\t\t\tawait args.sliceMachineManager.project.locateSliceMachineUIDir();\n\t\tconst sliceMachineOutDir = path.resolve(sliceMachineDir, \"out\");\n\n\t\tapp.use(serveStatic(sliceMachineOutDir));\n\n\t\tapp.get(\"/changelog\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"changelog.html\"));\n\t\t});\n\n\t\tapp.get(\"/labs\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"labs.html\"));\n\t\t});\n\n\t\tapp.get(\"/slices\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"slices.html\"));\n\t\t});\n\n\t\tapp.get(\"/changes\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"changes.html\"));\n\t\t});\n\n\t\tapp.get(\"/page-types/:id\", (_req, res) => {\n\t\t\tres.sendFile(\n\t\t\t\tpath.join(sliceMachineOutDir, \"page-types/[pageTypeId].html\"),\n\t\t\t);\n\t\t});\n\n\t\tapp.get(\"/custom-types\", (_req, res) => {\n\t\t\tres.sendFile(path.join(sliceMachineOutDir, \"custom-types.html\"));\n\t\t});\n\n\t\tapp.get(\"/custom-types/:id\", (_req, res) => {\n\t\t\tres.sendFile(\n\t\t\t\tpath.join(sliceMachineOutDir, \"custom-types/[customTypeId].html\"),\n\t\t\t);\n\t\t});\n\n\t\tapp.get(\"/slices/:lib/:sliceID/:variation\", (_req, res) => {\n\t\t\tres.sendFile(\n\t\t\t\tpath.join(\n\t\t\t\t\tsliceMachineOutDir,\n\t\t\t\t\t\"slices/[lib]/[sliceName]/[variation].html\",\n\t\t\t\t),\n\t\t\t);\n\t\t});\n\n\t\tapp.get(\"/slices/:lib/:sliceID/:variation/simulator\", (_req, res) => {\n\t\t\tres.sendFile(\n\t\t\t\tpath.join(\n\t\t\t\t\tsliceMachineOutDir,\n\t\t\t\t\t\"slices/[lib]/[sliceName]/[variation]/simulator.html\",\n\t\t\t\t),\n\t\t\t);\n\t\t});\n\t}\n\n\tif (isTelemetryEnabled) {\n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W,CAAC;AAAA,IACxD,CAAC;AAED,QAAI,IAAI,WAAW,CAAC,MAAM,QAAO;AAChC,UAAI,SAAS,KAAK,KAAK,oBAAoB,aAAa,CAAC;AAAA,IAC1D,CAAC;AAED,QAAI,IAAI,YAAY,CAAC,MAAM,QAAO;AACjC,UAAI,SAAS,KAAK,KAAK,oBAAoB,cAAc,CAAC;AAAA,IAC3D,CAAC;AAED,QAAI,IAAI,mBAAmB,CAAC,MAAM,QAAO;AACxC,UAAI,SACH,KAAK,KAAK,oBAAoB,8BAA8B,CAAC;AAAA,IAE/D,CAAC;AAED,QAAI,IAAI,iBAAiB,CAAC,MAAM,QAAO;AACtC,UAAI,SAAS,KAAK,KAAK,oBAAoB,mBAAmB,CAAC;AAAA,IAChE,CAAC;AAED,QAAI,IAAI,qBAAqB,CAAC,MAAM,QAAO;AAC1C,UAAI,SACH,KAAK,KAAK,oBAAoB,kCAAkC,CAAC;AAAA,IAEnE,CAAC;AAED,QAAI,IAAI,oCAAoC,CAAC,MAAM,QAAO;AACzD,UAAI,SACH,KAAK,KACJ,oBACA,2CAA2C,CAC3C;AAAA,IAEH,CAAC;AAED,QAAI,IAAI,8CAA8C,CAAC,MAAM,QAAO;AACnE,UAAI,SACH,KAAK,KACJ,oBACA,qDAAqD,CACrD;AAAA,IAEH,CAAC;AAAA,EACF;AAEA,MAAI,oBAAoB;AACvB,QAAI,IAAIC,MAA0B;AAAA,EACnC;AAEA,SAAO;AACR;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locateFileUpward.cjs","sources":["../../../src/lib/locateFileUpward.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as fs from \"node:fs/promises\";\n\nimport { castArray } from \"./castArray\";\n\ntype LocateFileUpwardConfig = {\n\tstartDir?: string;\n\tstopDir?: string;\n\t/**\n\t * @internal\n\t */\n\t_originalStartDir?: string;\n};\n\n// TODO: MIGRATION - Remove this after migration the Migration Manager if still not used elsewhere\nexport const locateFileUpward = async (\n\tfilePathOrPaths: string | readonly string[],\n\t{\n\t\tstartDir = process.cwd(),\n\t\tstopDir = path.resolve(startDir, \"/\"),\n\t\t_originalStartDir,\n\t}: LocateFileUpwardConfig = {},\n): Promise<string> => {\n\tconst originalStartDir = _originalStartDir ?? startDir;\n\n\tconst filePaths = castArray(filePathOrPaths);\n\n\tfor (const filePath of filePaths) {\n\t\tconst resolvedFilePath = path.resolve(startDir, filePath);\n\t\ttry {\n\t\t\tawait fs.access(resolvedFilePath);\n\n\t\t\treturn resolvedFilePath;\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\t}\n\n\tif (startDir === stopDir) {\n\t\tconst formattedFilePaths = filePaths\n\t\t\t.map((filePath) => \"`\" + filePath + \"`\")\n\t\t\t.join(\" or \");\n\n\t\tthrow new Error(\n\t\t\t`Could not locate ${formattedFilePaths} between \\`${originalStartDir}\\` and \\`${stopDir}\\`.`,\n\t\t);\n\t}\n\n\treturn locateFileUpward(filePathOrPaths, {\n\t\tstartDir: path.resolve(startDir, \"..\"),\n\t\tstopDir,\n\t\t_originalStartDir: originalStartDir,\n\t});\n};\n"],"names":["path","castArray","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,mBAAmB,OAC/B,iBACA,EACC,WAAW,QAAQ,
|
|
1
|
+
{"version":3,"file":"locateFileUpward.cjs","sources":["../../../src/lib/locateFileUpward.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as fs from \"node:fs/promises\";\n\nimport { castArray } from \"./castArray\";\n\ntype LocateFileUpwardConfig = {\n\tstartDir?: string;\n\tstopDir?: string;\n\t/**\n\t * @internal\n\t */\n\t_originalStartDir?: string;\n};\n\n// TODO: MIGRATION - Remove this after migration the Migration Manager if still not used elsewhere\nexport const locateFileUpward = async (\n\tfilePathOrPaths: string | readonly string[],\n\t{\n\t\tstartDir = process.cwd(),\n\t\tstopDir = path.resolve(startDir, \"/\"),\n\t\t_originalStartDir,\n\t}: LocateFileUpwardConfig = {},\n): Promise<string> => {\n\tconst originalStartDir = _originalStartDir ?? startDir;\n\n\tconst filePaths = castArray(filePathOrPaths);\n\n\tfor (const filePath of filePaths) {\n\t\tconst resolvedFilePath = path.resolve(startDir, filePath);\n\t\ttry {\n\t\t\tawait fs.access(resolvedFilePath);\n\n\t\t\treturn resolvedFilePath;\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\t}\n\n\tif (startDir === stopDir) {\n\t\tconst formattedFilePaths = filePaths\n\t\t\t.map((filePath) => \"`\" + filePath + \"`\")\n\t\t\t.join(\" or \");\n\n\t\tthrow new Error(\n\t\t\t`Could not locate ${formattedFilePaths} between \\`${originalStartDir}\\` and \\`${stopDir}\\`.`,\n\t\t);\n\t}\n\n\treturn locateFileUpward(filePathOrPaths, {\n\t\tstartDir: path.resolve(startDir, \"..\"),\n\t\tstopDir,\n\t\t_originalStartDir: originalStartDir,\n\t});\n};\n"],"names":["path","castArray","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,mBAAmB,OAC/B,iBACA,EACC,WAAW,QAAQ,IAAA,GACnB,UAAUA,gBAAK,QAAQ,UAAU,GAAG,GACpC,kBAAA,IAC2B,CAAA,MACR;AACpB,QAAM,mBAAmB,qBAAqB;AAE9C,QAAM,YAAYC,UAAAA,UAAU,eAAe;AAE3C,aAAW,YAAY,WAAW;AACjC,UAAM,mBAAmBD,gBAAK,QAAQ,UAAU,QAAQ;AACxD,QAAI;AACH,YAAME,cAAG,OAAO,gBAAgB;AAEhC,aAAO;AAAA,IACR,QAAQ;AACP;AAAA,IACD;AAAA,EACD;AAEA,MAAI,aAAa,SAAS;AACzB,UAAM,qBAAqB,UACzB,IAAI,CAAC,aAAa,MAAM,WAAW,GAAG,EACtC,KAAK,MAAM;AAEb,UAAM,IAAI,MACT,oBAAoB,kBAAkB,cAAc,gBAAgB,YAAY,OAAO,KAAK;AAAA,EAE9F;AAEA,SAAO,iBAAiB,iBAAiB;AAAA,IACxC,UAAUF,gBAAK,QAAQ,UAAU,IAAI;AAAA,IACrC;AAAA,IACA,mBAAmB;AAAA,EAAA,CACnB;AACF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locateFileUpward.js","sources":["../../../src/lib/locateFileUpward.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as fs from \"node:fs/promises\";\n\nimport { castArray } from \"./castArray\";\n\ntype LocateFileUpwardConfig = {\n\tstartDir?: string;\n\tstopDir?: string;\n\t/**\n\t * @internal\n\t */\n\t_originalStartDir?: string;\n};\n\n// TODO: MIGRATION - Remove this after migration the Migration Manager if still not used elsewhere\nexport const locateFileUpward = async (\n\tfilePathOrPaths: string | readonly string[],\n\t{\n\t\tstartDir = process.cwd(),\n\t\tstopDir = path.resolve(startDir, \"/\"),\n\t\t_originalStartDir,\n\t}: LocateFileUpwardConfig = {},\n): Promise<string> => {\n\tconst originalStartDir = _originalStartDir ?? startDir;\n\n\tconst filePaths = castArray(filePathOrPaths);\n\n\tfor (const filePath of filePaths) {\n\t\tconst resolvedFilePath = path.resolve(startDir, filePath);\n\t\ttry {\n\t\t\tawait fs.access(resolvedFilePath);\n\n\t\t\treturn resolvedFilePath;\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\t}\n\n\tif (startDir === stopDir) {\n\t\tconst formattedFilePaths = filePaths\n\t\t\t.map((filePath) => \"`\" + filePath + \"`\")\n\t\t\t.join(\" or \");\n\n\t\tthrow new Error(\n\t\t\t`Could not locate ${formattedFilePaths} between \\`${originalStartDir}\\` and \\`${stopDir}\\`.`,\n\t\t);\n\t}\n\n\treturn locateFileUpward(filePathOrPaths, {\n\t\tstartDir: path.resolve(startDir, \"..\"),\n\t\tstopDir,\n\t\t_originalStartDir: originalStartDir,\n\t});\n};\n"],"names":[],"mappings":";;;AAeO,MAAM,mBAAmB,OAC/B,iBACA,EACC,WAAW,QAAQ,
|
|
1
|
+
{"version":3,"file":"locateFileUpward.js","sources":["../../../src/lib/locateFileUpward.ts"],"sourcesContent":["import * as path from \"node:path\";\nimport * as fs from \"node:fs/promises\";\n\nimport { castArray } from \"./castArray\";\n\ntype LocateFileUpwardConfig = {\n\tstartDir?: string;\n\tstopDir?: string;\n\t/**\n\t * @internal\n\t */\n\t_originalStartDir?: string;\n};\n\n// TODO: MIGRATION - Remove this after migration the Migration Manager if still not used elsewhere\nexport const locateFileUpward = async (\n\tfilePathOrPaths: string | readonly string[],\n\t{\n\t\tstartDir = process.cwd(),\n\t\tstopDir = path.resolve(startDir, \"/\"),\n\t\t_originalStartDir,\n\t}: LocateFileUpwardConfig = {},\n): Promise<string> => {\n\tconst originalStartDir = _originalStartDir ?? startDir;\n\n\tconst filePaths = castArray(filePathOrPaths);\n\n\tfor (const filePath of filePaths) {\n\t\tconst resolvedFilePath = path.resolve(startDir, filePath);\n\t\ttry {\n\t\t\tawait fs.access(resolvedFilePath);\n\n\t\t\treturn resolvedFilePath;\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\t}\n\n\tif (startDir === stopDir) {\n\t\tconst formattedFilePaths = filePaths\n\t\t\t.map((filePath) => \"`\" + filePath + \"`\")\n\t\t\t.join(\" or \");\n\n\t\tthrow new Error(\n\t\t\t`Could not locate ${formattedFilePaths} between \\`${originalStartDir}\\` and \\`${stopDir}\\`.`,\n\t\t);\n\t}\n\n\treturn locateFileUpward(filePathOrPaths, {\n\t\tstartDir: path.resolve(startDir, \"..\"),\n\t\tstopDir,\n\t\t_originalStartDir: originalStartDir,\n\t});\n};\n"],"names":[],"mappings":";;;AAeO,MAAM,mBAAmB,OAC/B,iBACA,EACC,WAAW,QAAQ,IAAA,GACnB,UAAU,KAAK,QAAQ,UAAU,GAAG,GACpC,kBAAA,IAC2B,CAAA,MACR;AACpB,QAAM,mBAAmB,qBAAqB;AAE9C,QAAM,YAAY,UAAU,eAAe;AAE3C,aAAW,YAAY,WAAW;AACjC,UAAM,mBAAmB,KAAK,QAAQ,UAAU,QAAQ;AACxD,QAAI;AACH,YAAM,GAAG,OAAO,gBAAgB;AAEhC,aAAO;AAAA,IACR,QAAQ;AACP;AAAA,IACD;AAAA,EACD;AAEA,MAAI,aAAa,SAAS;AACzB,UAAM,qBAAqB,UACzB,IAAI,CAAC,aAAa,MAAM,WAAW,GAAG,EACtC,KAAK,MAAM;AAEb,UAAM,IAAI,MACT,oBAAoB,kBAAkB,cAAc,gBAAgB,YAAY,OAAO,KAAK;AAAA,EAE9F;AAEA,SAAO,iBAAiB,iBAAiB;AAAA,IACxC,UAAU,KAAK,QAAQ,UAAU,IAAI;AAAA,IACrC;AAAA,IACA,mBAAmB;AAAA,EAAA,CACnB;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safelyExecute.cjs","sources":["../../../src/lib/safelyExecute.ts"],"sourcesContent":["export async function safelyExecute<T>(\n\toperation: () => Promise<T>,\n): Promise<T | undefined> {\n\ttry {\n\t\treturn await operation();\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"names":[],"mappings":";;AAAA,eAAsB,cACrB,WAA2B;
|
|
1
|
+
{"version":3,"file":"safelyExecute.cjs","sources":["../../../src/lib/safelyExecute.ts"],"sourcesContent":["export async function safelyExecute<T>(\n\toperation: () => Promise<T>,\n): Promise<T | undefined> {\n\ttry {\n\t\treturn await operation();\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"names":[],"mappings":";;AAAA,eAAsB,cACrB,WAA2B;AAE3B,MAAI;AACH,WAAO,MAAM,UAAA;AAAA,EACd,QAAQ;AACP,WAAO;AAAA,EACR;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safelyExecute.js","sources":["../../../src/lib/safelyExecute.ts"],"sourcesContent":["export async function safelyExecute<T>(\n\toperation: () => Promise<T>,\n): Promise<T | undefined> {\n\ttry {\n\t\treturn await operation();\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"names":[],"mappings":"AAAA,eAAsB,cACrB,WAA2B;
|
|
1
|
+
{"version":3,"file":"safelyExecute.js","sources":["../../../src/lib/safelyExecute.ts"],"sourcesContent":["export async function safelyExecute<T>(\n\toperation: () => Promise<T>,\n): Promise<T | undefined> {\n\ttry {\n\t\treturn await operation();\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"names":[],"mappings":"AAAA,eAAsB,cACrB,WAA2B;AAE3B,MAAI;AACH,WAAO,MAAM,UAAA;AAAA,EACd,QAAQ;AACP,WAAO;AAAA,EACR;AACD;"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const manager = require("@slicemachine/manager");
|
|
4
|
-
const checkIsSentryEnabled = require("./checkIsSentryEnabled.cjs");
|
|
5
4
|
const exports$1 = require('./../_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs');
|
|
6
5
|
const node = (name, error) => {
|
|
7
|
-
|
|
8
|
-
if (error instanceof manager.UnauthenticatedError || error instanceof manager.UnauthorizedError)
|
|
9
|
-
;
|
|
6
|
+
{
|
|
7
|
+
if (error instanceof manager.UnauthenticatedError || error instanceof manager.UnauthorizedError) ;
|
|
10
8
|
else {
|
|
11
9
|
exports$1.withScope(function(scope) {
|
|
12
10
|
scope.setTransactionName(name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentryErrorHandlers.cjs","sources":["../../../src/lib/sentryErrorHandlers.ts"],"sourcesContent":["import type { ErrorRequestHandler } from \"express\";\nimport * as Sentry from \"@sentry/node\";\n\nimport {\n\tCreateSliceMachineManagerMiddlewareArgs,\n\tUnauthenticatedError,\n\tUnauthorizedError,\n} from \"@slicemachine/manager\";\n\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\nexport const node = (name: string, error: unknown): void => {\n\tif (checkIsSentryEnabled()) {\n\t\tif (\n\t\t\terror instanceof UnauthenticatedError ||\n\t\t\terror instanceof UnauthorizedError\n\t\t) {\n\t\t\t// noop - User is not logged in or does not have access to the repository, no need to track this error in Sentry.\n\t\t} else {\n\t\t\tSentry.withScope(function (scope) {\n\t\t\t\tscope.setTransactionName(name);\n\t\t\t\tSentry.captureException(error, {\n\t\t\t\t\t...(error instanceof Error ? { extra: { cause: error.cause } } : {}),\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n};\n\nexport const server: ErrorRequestHandler = (error, req, _res, next): void => {\n\tnode(req.path, error);\n\tnext();\n};\n\nexport const rpc: CreateSliceMachineManagerMiddlewareArgs[\"onError\"] = (\n\targs,\n) => {\n\tnode(args.procedurePath.join(\".\"), args.error);\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"sentryErrorHandlers.cjs","sources":["../../../src/lib/sentryErrorHandlers.ts"],"sourcesContent":["import type { ErrorRequestHandler } from \"express\";\nimport * as Sentry from \"@sentry/node\";\n\nimport {\n\tCreateSliceMachineManagerMiddlewareArgs,\n\tUnauthenticatedError,\n\tUnauthorizedError,\n} from \"@slicemachine/manager\";\n\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\nexport const node = (name: string, error: unknown): void => {\n\tif (checkIsSentryEnabled()) {\n\t\tif (\n\t\t\terror instanceof UnauthenticatedError ||\n\t\t\terror instanceof UnauthorizedError\n\t\t) {\n\t\t\t// noop - User is not logged in or does not have access to the repository, no need to track this error in Sentry.\n\t\t} else {\n\t\t\tSentry.withScope(function (scope) {\n\t\t\t\tscope.setTransactionName(name);\n\t\t\t\tSentry.captureException(error, {\n\t\t\t\t\t...(error instanceof Error ? { extra: { cause: error.cause } } : {}),\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n};\n\nexport const server: ErrorRequestHandler = (error, req, _res, next): void => {\n\tnode(req.path, error);\n\tnext();\n};\n\nexport const rpc: CreateSliceMachineManagerMiddlewareArgs[\"onError\"] = (\n\targs,\n) => {\n\tnode(args.procedurePath.join(\".\"), args.error);\n};\n"],"names":["UnauthenticatedError","UnauthorizedError","Sentry.withScope","Sentry.captureException"],"mappings":";;;;AAWO,MAAM,OAAO,CAAC,MAAc,UAAwB;AAC9B;AAC3B,QACC,iBAAiBA,QAAAA,wBACjB,iBAAiBC,QAAAA,kBAChB;AAAA,SAEK;AACNC,gBAAAA,UAAiB,SAAU,OAAK;AAC/B,cAAM,mBAAmB,IAAI;AAC7BC,kBAAAA,iBAAwB,OAAO;AAAA,UAC9B,GAAI,iBAAiB,QAAQ,EAAE,OAAO,EAAE,OAAO,MAAM,MAAA,MAAY,CAAA;AAAA,QAAA,CACjE;AAAA,MACF,CAAC;AAAA,IACF;AAAA,EACD;AACD;AAEO,MAAM,SAA8B,CAAC,OAAO,KAAK,MAAM,SAAc;AAC3E,OAAK,IAAI,MAAM,KAAK;AACpB,OAAA;AACD;AAEO,MAAM,MAA0D,CACtE,SACG;AACH,OAAK,KAAK,cAAc,KAAK,GAAG,GAAG,KAAK,KAAK;AAC9C;;;;"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { UnauthenticatedError, UnauthorizedError } from "@slicemachine/manager";
|
|
2
|
-
import { checkIsSentryEnabled } from "./checkIsSentryEnabled.js";
|
|
3
2
|
import { withScope, captureException } from './../_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js';
|
|
4
3
|
const node = (name, error) => {
|
|
5
|
-
|
|
6
|
-
if (error instanceof UnauthenticatedError || error instanceof UnauthorizedError)
|
|
7
|
-
;
|
|
4
|
+
{
|
|
5
|
+
if (error instanceof UnauthenticatedError || error instanceof UnauthorizedError) ;
|
|
8
6
|
else {
|
|
9
7
|
withScope(function(scope) {
|
|
10
8
|
scope.setTransactionName(name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentryErrorHandlers.js","sources":["../../../src/lib/sentryErrorHandlers.ts"],"sourcesContent":["import type { ErrorRequestHandler } from \"express\";\nimport * as Sentry from \"@sentry/node\";\n\nimport {\n\tCreateSliceMachineManagerMiddlewareArgs,\n\tUnauthenticatedError,\n\tUnauthorizedError,\n} from \"@slicemachine/manager\";\n\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\nexport const node = (name: string, error: unknown): void => {\n\tif (checkIsSentryEnabled()) {\n\t\tif (\n\t\t\terror instanceof UnauthenticatedError ||\n\t\t\terror instanceof UnauthorizedError\n\t\t) {\n\t\t\t// noop - User is not logged in or does not have access to the repository, no need to track this error in Sentry.\n\t\t} else {\n\t\t\tSentry.withScope(function (scope) {\n\t\t\t\tscope.setTransactionName(name);\n\t\t\t\tSentry.captureException(error, {\n\t\t\t\t\t...(error instanceof Error ? { extra: { cause: error.cause } } : {}),\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n};\n\nexport const server: ErrorRequestHandler = (error, req, _res, next): void => {\n\tnode(req.path, error);\n\tnext();\n};\n\nexport const rpc: CreateSliceMachineManagerMiddlewareArgs[\"onError\"] = (\n\targs,\n) => {\n\tnode(args.procedurePath.join(\".\"), args.error);\n};\n"],"names":["Sentry.withScope","Sentry.captureException"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sentryErrorHandlers.js","sources":["../../../src/lib/sentryErrorHandlers.ts"],"sourcesContent":["import type { ErrorRequestHandler } from \"express\";\nimport * as Sentry from \"@sentry/node\";\n\nimport {\n\tCreateSliceMachineManagerMiddlewareArgs,\n\tUnauthenticatedError,\n\tUnauthorizedError,\n} from \"@slicemachine/manager\";\n\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\nexport const node = (name: string, error: unknown): void => {\n\tif (checkIsSentryEnabled()) {\n\t\tif (\n\t\t\terror instanceof UnauthenticatedError ||\n\t\t\terror instanceof UnauthorizedError\n\t\t) {\n\t\t\t// noop - User is not logged in or does not have access to the repository, no need to track this error in Sentry.\n\t\t} else {\n\t\t\tSentry.withScope(function (scope) {\n\t\t\t\tscope.setTransactionName(name);\n\t\t\t\tSentry.captureException(error, {\n\t\t\t\t\t...(error instanceof Error ? { extra: { cause: error.cause } } : {}),\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n};\n\nexport const server: ErrorRequestHandler = (error, req, _res, next): void => {\n\tnode(req.path, error);\n\tnext();\n};\n\nexport const rpc: CreateSliceMachineManagerMiddlewareArgs[\"onError\"] = (\n\targs,\n) => {\n\tnode(args.procedurePath.join(\".\"), args.error);\n};\n"],"names":["Sentry.withScope","Sentry.captureException"],"mappings":";;AAWO,MAAM,OAAO,CAAC,MAAc,UAAwB;AAC9B;AAC3B,QACC,iBAAiB,wBACjB,iBAAiB,kBAChB;AAAA,SAEK;AACNA,gBAAiB,SAAU,OAAK;AAC/B,cAAM,mBAAmB,IAAI;AAC7BC,yBAAwB,OAAO;AAAA,UAC9B,GAAI,iBAAiB,QAAQ,EAAE,OAAO,EAAE,OAAO,MAAM,MAAA,MAAY,CAAA;AAAA,QAAA,CACjE;AAAA,MACF,CAAC;AAAA,IACF;AAAA,EACD;AACD;AAEO,MAAM,SAA8B,CAAC,OAAO,KAAK,MAAM,SAAc;AAC3E,OAAK,IAAI,MAAM,KAAK;AACpB,OAAA;AACD;AAEO,MAAM,MAA0D,CACtE,SACG;AACH,OAAK,KAAK,cAAc,KAAK,GAAG,GAAG,KAAK,KAAK;AAC9C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentryFrontendTunnel.cjs","sources":["../../../src/lib/sentryFrontendTunnel.ts"],"sourcesContent":["// We tunnel the Sentry calls via the Express server to avoid ad blockers\n// adapted from https://github.com/getsentry/examples/blob/0e2f17c5914f28ccae931e51801b7d9760d34cbe/tunneling/nextjs/pages/api/tunnel.js\n\nimport type { RequestHandler } from \"express\";\nimport * as Sentry from \"@sentry/node\";\nimport fetch from \"node-fetch\";\n\nexport const sentryFrontendTunnel: RequestHandler = async (req, res) => {\n\ttry {\n\t\tconst envelope = req.body;\n\n\t\tif (envelope) {\n\t\t\tconst pieces = envelope.split(\"\\n\");\n\t\t\tconst header = JSON.parse(pieces[0]);\n\t\t\tconst { host, pathname } = new URL(header.dsn);\n\n\t\t\t// Remove start or end slashes from the pathname\n\t\t\tconst projectId = pathname?.replace(/^\\/|\\/$/g, \"\") ?? \"\";\n\n\t\t\tconst sentryUrl = `https://${host}/api/${projectId}/envelope/`;\n\n\t\t\tconst response = await fetch(sentryUrl, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: envelope,\n\t\t\t});\n\n\t\t\tif (!response.ok) {\n\t\t\t\tconst errorMessage = await response.text();\n\t\t\t\tthrow new Error(errorMessage);\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tSentry.captureException(e);\n\t} finally {\n\t\treturn res.status(202).send();\n\t}\n};\n"],"names":["fetch","Sentry.captureException"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"sentryFrontendTunnel.cjs","sources":["../../../src/lib/sentryFrontendTunnel.ts"],"sourcesContent":["// We tunnel the Sentry calls via the Express server to avoid ad blockers\n// adapted from https://github.com/getsentry/examples/blob/0e2f17c5914f28ccae931e51801b7d9760d34cbe/tunneling/nextjs/pages/api/tunnel.js\n\nimport type { RequestHandler } from \"express\";\nimport * as Sentry from \"@sentry/node\";\nimport fetch from \"node-fetch\";\n\nexport const sentryFrontendTunnel: RequestHandler = async (req, res) => {\n\ttry {\n\t\tconst envelope = req.body;\n\n\t\tif (envelope) {\n\t\t\tconst pieces = envelope.split(\"\\n\");\n\t\t\tconst header = JSON.parse(pieces[0]);\n\t\t\tconst { host, pathname } = new URL(header.dsn);\n\n\t\t\t// Remove start or end slashes from the pathname\n\t\t\tconst projectId = pathname?.replace(/^\\/|\\/$/g, \"\") ?? \"\";\n\n\t\t\tconst sentryUrl = `https://${host}/api/${projectId}/envelope/`;\n\n\t\t\tconst response = await fetch(sentryUrl, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: envelope,\n\t\t\t});\n\n\t\t\tif (!response.ok) {\n\t\t\t\tconst errorMessage = await response.text();\n\t\t\t\tthrow new Error(errorMessage);\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tSentry.captureException(e);\n\t} finally {\n\t\treturn res.status(202).send();\n\t}\n};\n"],"names":["fetch","Sentry.captureException"],"mappings":";;;;AAOO,MAAM,uBAAuC,OAAO,KAAK,QAAO;AACtE,MAAI;AACH,UAAM,WAAW,IAAI;AAErB,QAAI,UAAU;AACb,YAAM,SAAS,SAAS,MAAM,IAAI;AAClC,YAAM,SAAS,KAAK,MAAM,OAAO,CAAC,CAAC;AACnC,YAAM,EAAE,MAAM,SAAA,IAAa,IAAI,IAAI,OAAO,GAAG;AAG7C,YAAM,aAAY,qCAAU,QAAQ,YAAY,QAAO;AAEvD,YAAM,YAAY,WAAW,IAAI,QAAQ,SAAS;AAElD,YAAM,WAAW,MAAMA,MAAAA,QAAM,WAAW;AAAA,QACvC,QAAQ;AAAA,QACR,MAAM;AAAA,MAAA,CACN;AAED,UAAI,CAAC,SAAS,IAAI;AACjB,cAAM,eAAe,MAAM,SAAS,KAAA;AACpC,cAAM,IAAI,MAAM,YAAY;AAAA,MAC7B;AAAA,IACD;AAAA,EACD,SAAS,GAAG;AACXC,cAAAA,iBAAwB,CAAC;AAAA,EAC1B,UAAA;AACC,WAAO,IAAI,OAAO,GAAG,EAAE,KAAA;AAAA,EACxB;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentryFrontendTunnel.js","sources":["../../../src/lib/sentryFrontendTunnel.ts"],"sourcesContent":["// We tunnel the Sentry calls via the Express server to avoid ad blockers\n// adapted from https://github.com/getsentry/examples/blob/0e2f17c5914f28ccae931e51801b7d9760d34cbe/tunneling/nextjs/pages/api/tunnel.js\n\nimport type { RequestHandler } from \"express\";\nimport * as Sentry from \"@sentry/node\";\nimport fetch from \"node-fetch\";\n\nexport const sentryFrontendTunnel: RequestHandler = async (req, res) => {\n\ttry {\n\t\tconst envelope = req.body;\n\n\t\tif (envelope) {\n\t\t\tconst pieces = envelope.split(\"\\n\");\n\t\t\tconst header = JSON.parse(pieces[0]);\n\t\t\tconst { host, pathname } = new URL(header.dsn);\n\n\t\t\t// Remove start or end slashes from the pathname\n\t\t\tconst projectId = pathname?.replace(/^\\/|\\/$/g, \"\") ?? \"\";\n\n\t\t\tconst sentryUrl = `https://${host}/api/${projectId}/envelope/`;\n\n\t\t\tconst response = await fetch(sentryUrl, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: envelope,\n\t\t\t});\n\n\t\t\tif (!response.ok) {\n\t\t\t\tconst errorMessage = await response.text();\n\t\t\t\tthrow new Error(errorMessage);\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tSentry.captureException(e);\n\t} finally {\n\t\treturn res.status(202).send();\n\t}\n};\n"],"names":["Sentry.captureException"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sentryFrontendTunnel.js","sources":["../../../src/lib/sentryFrontendTunnel.ts"],"sourcesContent":["// We tunnel the Sentry calls via the Express server to avoid ad blockers\n// adapted from https://github.com/getsentry/examples/blob/0e2f17c5914f28ccae931e51801b7d9760d34cbe/tunneling/nextjs/pages/api/tunnel.js\n\nimport type { RequestHandler } from \"express\";\nimport * as Sentry from \"@sentry/node\";\nimport fetch from \"node-fetch\";\n\nexport const sentryFrontendTunnel: RequestHandler = async (req, res) => {\n\ttry {\n\t\tconst envelope = req.body;\n\n\t\tif (envelope) {\n\t\t\tconst pieces = envelope.split(\"\\n\");\n\t\t\tconst header = JSON.parse(pieces[0]);\n\t\t\tconst { host, pathname } = new URL(header.dsn);\n\n\t\t\t// Remove start or end slashes from the pathname\n\t\t\tconst projectId = pathname?.replace(/^\\/|\\/$/g, \"\") ?? \"\";\n\n\t\t\tconst sentryUrl = `https://${host}/api/${projectId}/envelope/`;\n\n\t\t\tconst response = await fetch(sentryUrl, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: envelope,\n\t\t\t});\n\n\t\t\tif (!response.ok) {\n\t\t\t\tconst errorMessage = await response.text();\n\t\t\t\tthrow new Error(errorMessage);\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tSentry.captureException(e);\n\t} finally {\n\t\treturn res.status(202).send();\n\t}\n};\n"],"names":["Sentry.captureException"],"mappings":";;AAOO,MAAM,uBAAuC,OAAO,KAAK,QAAO;AACtE,MAAI;AACH,UAAM,WAAW,IAAI;AAErB,QAAI,UAAU;AACb,YAAM,SAAS,SAAS,MAAM,IAAI;AAClC,YAAM,SAAS,KAAK,MAAM,OAAO,CAAC,CAAC;AACnC,YAAM,EAAE,MAAM,SAAA,IAAa,IAAI,IAAI,OAAO,GAAG;AAG7C,YAAM,aAAY,qCAAU,QAAQ,YAAY,QAAO;AAEvD,YAAM,YAAY,WAAW,IAAI,QAAQ,SAAS;AAElD,YAAM,WAAW,MAAM,MAAM,WAAW;AAAA,QACvC,QAAQ;AAAA,QACR,MAAM;AAAA,MAAA,CACN;AAED,UAAI,CAAC,SAAS,IAAI;AACjB,cAAM,eAAe,MAAM,SAAS,KAAA;AACpC,cAAM,IAAI,MAAM,YAAY;AAAA,MAC7B;AAAA,IACD;AAAA,EACD,SAAS,GAAG;AACXA,qBAAwB,CAAC;AAAA,EAC1B,UAAA;AACC,WAAO,IAAI,OAAO,GAAG,EAAE,KAAA;AAAA,EACxB;AACD;"}
|
package/dist/lib/setupSentry.cjs
CHANGED
|
@@ -2,13 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const manager = require("@slicemachine/manager");
|
|
4
4
|
const constants = require("../constants.cjs");
|
|
5
|
-
const checkIsSentryEnabled = require("./checkIsSentryEnabled.cjs");
|
|
6
5
|
const sdk = require('./../_node_modules/@sentry/node/esm/sdk.cjs');
|
|
7
6
|
const exports$1 = require('./../_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs');
|
|
8
7
|
const setupSentry = async (manager$1) => {
|
|
9
|
-
if (!checkIsSentryEnabled.checkIsSentryEnabled()) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
8
|
const sliceMachineVersion = await manager$1.versions.getRunningSliceMachineVersion();
|
|
13
9
|
const sliceMachineConfig = await manager$1.project.getSliceMachineConfig();
|
|
14
10
|
let userProfile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupSentry.cjs","sources":["../../../src/lib/setupSentry.ts"],"sourcesContent":["import * as Sentry from \"@sentry/node\";\nimport {\n\tPrismicUserProfile,\n\tSliceMachineManager,\n\tgetEnvironmentInfo,\n} from \"@slicemachine/manager\";\n\nimport { SENTRY_EXPRESS_DSN } from \"../constants\";\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\nexport const setupSentry = async (\n\tmanager: SliceMachineManager,\n): Promise<void> => {\n\tif (!checkIsSentryEnabled()) {\n\t\treturn;\n\t}\n\n\tconst sliceMachineVersion =\n\t\tawait manager.versions.getRunningSliceMachineVersion();\n\n\tconst sliceMachineConfig = await manager.project.getSliceMachineConfig();\n\n\tlet userProfile: PrismicUserProfile | undefined;\n\ttry {\n\t\tuserProfile = await manager.user.getProfile();\n\t} catch {\n\t\t// User is not logged in, it doesn't matter\n\t}\n\n\tconst { environment, release } = getEnvironmentInfo({\n\t\tname: \"slice-machine-ui\",\n\t\tversion: sliceMachineVersion,\n\t});\n\n\tSentry.init({\n\t\tdsn: SENTRY_EXPRESS_DSN,\n\t\trelease,\n\t\tenvironment,\n\t\t// Increase the default truncation length of 250 to 2500 (x10)\n\t\t// to have enough details in Sentry\n\t\tmaxValueLength: 2_500,\n\t});\n\tif (userProfile) {\n\t\tSentry.setUser({ id: userProfile.shortId });\n\t}\n\tSentry.setTag(\"repository\", sliceMachineConfig.repositoryName);\n\tSentry.setContext(\"Repository Data\", {\n\t\tname: sliceMachineConfig.repositoryName,\n\t});\n};\n"],"names":["manager","
|
|
1
|
+
{"version":3,"file":"setupSentry.cjs","sources":["../../../src/lib/setupSentry.ts"],"sourcesContent":["import * as Sentry from \"@sentry/node\";\nimport {\n\tPrismicUserProfile,\n\tSliceMachineManager,\n\tgetEnvironmentInfo,\n} from \"@slicemachine/manager\";\n\nimport { SENTRY_EXPRESS_DSN } from \"../constants\";\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\nexport const setupSentry = async (\n\tmanager: SliceMachineManager,\n): Promise<void> => {\n\tif (!checkIsSentryEnabled()) {\n\t\treturn;\n\t}\n\n\tconst sliceMachineVersion =\n\t\tawait manager.versions.getRunningSliceMachineVersion();\n\n\tconst sliceMachineConfig = await manager.project.getSliceMachineConfig();\n\n\tlet userProfile: PrismicUserProfile | undefined;\n\ttry {\n\t\tuserProfile = await manager.user.getProfile();\n\t} catch {\n\t\t// User is not logged in, it doesn't matter\n\t}\n\n\tconst { environment, release } = getEnvironmentInfo({\n\t\tname: \"slice-machine-ui\",\n\t\tversion: sliceMachineVersion,\n\t});\n\n\tSentry.init({\n\t\tdsn: SENTRY_EXPRESS_DSN,\n\t\trelease,\n\t\tenvironment,\n\t\t// Increase the default truncation length of 250 to 2500 (x10)\n\t\t// to have enough details in Sentry\n\t\tmaxValueLength: 2_500,\n\t});\n\tif (userProfile) {\n\t\tSentry.setUser({ id: userProfile.shortId });\n\t}\n\tSentry.setTag(\"repository\", sliceMachineConfig.repositoryName);\n\tSentry.setContext(\"Repository Data\", {\n\t\tname: sliceMachineConfig.repositoryName,\n\t});\n};\n"],"names":["manager","getEnvironmentInfo","Sentry.init","SENTRY_EXPRESS_DSN","Sentry.setUser","Sentry.setTag","Sentry.setContext"],"mappings":";;;;;;AAUO,MAAM,cAAc,OAC1BA,cACkB;AAKlB,QAAM,sBACL,MAAMA,UAAQ,SAAS,8BAAA;AAExB,QAAM,qBAAqB,MAAMA,UAAQ,QAAQ,sBAAA;AAEjD,MAAI;AACJ,MAAI;AACH,kBAAc,MAAMA,UAAQ,KAAK,WAAA;AAAA,EAClC,QAAQ;AAAA,EAER;AAEA,QAAM,EAAE,aAAa,QAAA,IAAYC,2BAAmB;AAAA,IACnD,MAAM;AAAA,IACN,SAAS;AAAA,EAAA,CACT;AAEDC,WAAY;AAAA,IACX,KAAKC,UAAAA;AAAAA,IACL;AAAA,IACA;AAAA;AAAA;AAAA,IAGA,gBAAgB;AAAA,EAAA,CAChB;AACD,MAAI,aAAa;AAChBC,cAAAA,QAAe,EAAE,IAAI,YAAY,SAAS;AAAA,EAC3C;AACAC,mBAAc,cAAc,mBAAmB,cAAc;AAC7DC,YAAAA,WAAkB,mBAAmB;AAAA,IACpC,MAAM,mBAAmB;AAAA,EAAA,CACzB;AACF;;"}
|
package/dist/lib/setupSentry.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { getEnvironmentInfo } from "@slicemachine/manager";
|
|
2
2
|
import { SENTRY_EXPRESS_DSN } from "../constants.js";
|
|
3
|
-
import { checkIsSentryEnabled } from "./checkIsSentryEnabled.js";
|
|
4
3
|
import { init } from './../_node_modules/@sentry/node/esm/sdk.js';
|
|
5
4
|
import { setUser, setTag, setContext } from './../_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js';
|
|
6
5
|
const setupSentry = async (manager) => {
|
|
7
|
-
if (!checkIsSentryEnabled()) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
6
|
const sliceMachineVersion = await manager.versions.getRunningSliceMachineVersion();
|
|
11
7
|
const sliceMachineConfig = await manager.project.getSliceMachineConfig();
|
|
12
8
|
let userProfile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupSentry.js","sources":["../../../src/lib/setupSentry.ts"],"sourcesContent":["import * as Sentry from \"@sentry/node\";\nimport {\n\tPrismicUserProfile,\n\tSliceMachineManager,\n\tgetEnvironmentInfo,\n} from \"@slicemachine/manager\";\n\nimport { SENTRY_EXPRESS_DSN } from \"../constants\";\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\nexport const setupSentry = async (\n\tmanager: SliceMachineManager,\n): Promise<void> => {\n\tif (!checkIsSentryEnabled()) {\n\t\treturn;\n\t}\n\n\tconst sliceMachineVersion =\n\t\tawait manager.versions.getRunningSliceMachineVersion();\n\n\tconst sliceMachineConfig = await manager.project.getSliceMachineConfig();\n\n\tlet userProfile: PrismicUserProfile | undefined;\n\ttry {\n\t\tuserProfile = await manager.user.getProfile();\n\t} catch {\n\t\t// User is not logged in, it doesn't matter\n\t}\n\n\tconst { environment, release } = getEnvironmentInfo({\n\t\tname: \"slice-machine-ui\",\n\t\tversion: sliceMachineVersion,\n\t});\n\n\tSentry.init({\n\t\tdsn: SENTRY_EXPRESS_DSN,\n\t\trelease,\n\t\tenvironment,\n\t\t// Increase the default truncation length of 250 to 2500 (x10)\n\t\t// to have enough details in Sentry\n\t\tmaxValueLength: 2_500,\n\t});\n\tif (userProfile) {\n\t\tSentry.setUser({ id: userProfile.shortId });\n\t}\n\tSentry.setTag(\"repository\", sliceMachineConfig.repositoryName);\n\tSentry.setContext(\"Repository Data\", {\n\t\tname: sliceMachineConfig.repositoryName,\n\t});\n};\n"],"names":["Sentry.init","Sentry.setUser","Sentry.setTag","Sentry.setContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"setupSentry.js","sources":["../../../src/lib/setupSentry.ts"],"sourcesContent":["import * as Sentry from \"@sentry/node\";\nimport {\n\tPrismicUserProfile,\n\tSliceMachineManager,\n\tgetEnvironmentInfo,\n} from \"@slicemachine/manager\";\n\nimport { SENTRY_EXPRESS_DSN } from \"../constants\";\nimport { checkIsSentryEnabled } from \"./checkIsSentryEnabled\";\n\nexport const setupSentry = async (\n\tmanager: SliceMachineManager,\n): Promise<void> => {\n\tif (!checkIsSentryEnabled()) {\n\t\treturn;\n\t}\n\n\tconst sliceMachineVersion =\n\t\tawait manager.versions.getRunningSliceMachineVersion();\n\n\tconst sliceMachineConfig = await manager.project.getSliceMachineConfig();\n\n\tlet userProfile: PrismicUserProfile | undefined;\n\ttry {\n\t\tuserProfile = await manager.user.getProfile();\n\t} catch {\n\t\t// User is not logged in, it doesn't matter\n\t}\n\n\tconst { environment, release } = getEnvironmentInfo({\n\t\tname: \"slice-machine-ui\",\n\t\tversion: sliceMachineVersion,\n\t});\n\n\tSentry.init({\n\t\tdsn: SENTRY_EXPRESS_DSN,\n\t\trelease,\n\t\tenvironment,\n\t\t// Increase the default truncation length of 250 to 2500 (x10)\n\t\t// to have enough details in Sentry\n\t\tmaxValueLength: 2_500,\n\t});\n\tif (userProfile) {\n\t\tSentry.setUser({ id: userProfile.shortId });\n\t}\n\tSentry.setTag(\"repository\", sliceMachineConfig.repositoryName);\n\tSentry.setContext(\"Repository Data\", {\n\t\tname: sliceMachineConfig.repositoryName,\n\t});\n};\n"],"names":["Sentry.init","Sentry.setUser","Sentry.setTag","Sentry.setContext"],"mappings":";;;;AAUO,MAAM,cAAc,OAC1B,YACkB;AAKlB,QAAM,sBACL,MAAM,QAAQ,SAAS,8BAAA;AAExB,QAAM,qBAAqB,MAAM,QAAQ,QAAQ,sBAAA;AAEjD,MAAI;AACJ,MAAI;AACH,kBAAc,MAAM,QAAQ,KAAK,WAAA;AAAA,EAClC,QAAQ;AAAA,EAER;AAEA,QAAM,EAAE,aAAa,QAAA,IAAY,mBAAmB;AAAA,IACnD,MAAM;AAAA,IACN,SAAS;AAAA,EAAA,CACT;AAEDA,OAAY;AAAA,IACX,KAAK;AAAA,IACL;AAAA,IACA;AAAA;AAAA;AAAA,IAGA,gBAAgB;AAAA,EAAA,CAChB;AACD,MAAI,aAAa;AAChBC,YAAe,EAAE,IAAI,YAAY,SAAS;AAAA,EAC3C;AACAC,SAAc,cAAc,mBAAmB,cAAc;AAC7DC,aAAkB,mBAAmB;AAAA,IACpC,MAAM,mBAAmB;AAAA,EAAA,CACzB;AACF;"}
|
|
@@ -9,8 +9,7 @@ const range = require("./range.cjs");
|
|
|
9
9
|
var comparator;
|
|
10
10
|
var hasRequiredComparator;
|
|
11
11
|
function requireComparator() {
|
|
12
|
-
if (hasRequiredComparator)
|
|
13
|
-
return comparator;
|
|
12
|
+
if (hasRequiredComparator) return comparator;
|
|
14
13
|
hasRequiredComparator = 1;
|
|
15
14
|
const ANY = Symbol("SemVer ANY");
|
|
16
15
|
class Comparator {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparator.cjs","sources":["../../../../../../node_modules/semver/classes/comparator.js"],"sourcesContent":["const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n"],"names":["parseOptions","debug","re","cmp","require$$0","require$$1","require$$2","require$$3","require$$4","require$$5"],"mappings":"
|
|
1
|
+
{"version":3,"file":"comparator.cjs","sources":["../../../../../../node_modules/semver/classes/comparator.js"],"sourcesContent":["const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n"],"names":["parseOptions","debug","re","cmp","require$$0","require$$1","require$$2","require$$3","require$$4","require$$5"],"mappings":";;;;;;;;;;;;;AAAA,QAAM,MAAM,OAAO,YAAY;AAAA,EAE/B,MAAM,WAAW;AAAA,IACf,WAAW,MAAO;AAChB,aAAO;AAAA,IACX;AAAA,IAEE,YAAa,MAAM,SAAS;AAC1B,gBAAUA,eAAa,OAAO;AAE9B,UAAI,gBAAgB,YAAY;AAC9B,YAAI,KAAK,UAAU,CAAC,CAAC,QAAQ,OAAO;AAClC,iBAAO;AAAA,QACf,OAAa;AACL,iBAAO,KAAK;AAAA,QACpB;AAAA,MACA;AAEIC,cAAM,cAAc,MAAM,OAAO;AACjC,WAAK,UAAU;AACf,WAAK,QAAQ,CAAC,CAAC,QAAQ;AACvB,WAAK,MAAM,IAAI;AAEf,UAAI,KAAK,WAAW,KAAK;AACvB,aAAK,QAAQ;AAAA,MACnB,OAAW;AACL,aAAK,QAAQ,KAAK,WAAW,KAAK,OAAO;AAAA,MAC/C;AAEIA,cAAM,QAAQ,IAAI;AAAA,IACtB;AAAA,IAEE,MAAO,MAAM;AACX,YAAM,IAAI,KAAK,QAAQ,QAAQC,KAAG,EAAE,eAAe,IAAIA,KAAG,EAAE,UAAU;AACtE,YAAM,IAAI,KAAK,MAAM,CAAC;AAEtB,UAAI,CAAC,GAAG;AACN,cAAM,IAAI,UAAU,uBAAuB,IAAI,EAAE;AAAA,MACvD;AAEI,WAAK,WAAW,EAAE,CAAC,MAAM,SAAY,EAAE,CAAC,IAAI;AAC5C,UAAI,KAAK,aAAa,KAAK;AACzB,aAAK,WAAW;AAAA,MACtB;AAGI,UAAI,CAAC,EAAE,CAAC,GAAG;AACT,aAAK,SAAS;AAAA,MACpB,OAAW;AACL,aAAK,SAAS,IAAI,OAAO,EAAE,CAAC,GAAG,KAAK,QAAQ,KAAK;AAAA,MACvD;AAAA,IACA;AAAA,IAEE,WAAY;AACV,aAAO,KAAK;AAAA,IAChB;AAAA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AAO,WACrC,KAAK,SAAS,SAAS,GAAG,KAAK,KAAK,SAAS,SAAS,GAAG,GAAG;AAC5D,eAAO;AAAA,MACb;AAEI,UAAIG,MAAI,KAAK,QAAQ,KAAK,KAAK,QAAQ,OAAO,KAC5C,KAAK,SAAS,WAAW,GAAG,KAAK,KAAK,SAAS,WAAW,GAAG,GAAG;AAChE,eAAO;AAAA,MACb;AAEI,UAAIA,MAAI,KAAK,QAAQ,KAAK,KAAK,QAAQ,OAAO,KAC5C,KAAK,SAAS,WAAW,GAAG,KAAK,KAAK,SAAS,WAAW,GAAG,GAAG;AAChE,eAAO;AAAA,MACb;AACI,aAAO;AAAA,IACX;AAAA;AAGA,eAAiB;AAEjB,QAAMH,iBAAeI,aAAAA;AACrB,QAAM,EAAA,IAAEF,MAAI,MAAMG,GAAAA;AAClB,QAAMF,QAAMG,IAAAA;AACZ,QAAML,UAAQM,MAAAA;AACd,QAAM,SAASC,OAAAA;AACf,QAAM,QAAQC,MAAAA,UAAA;;;;","x_google_ignoreList":[0]}
|
|
@@ -7,8 +7,7 @@ import { __require as requireRange } from "./range.js";
|
|
|
7
7
|
var comparator;
|
|
8
8
|
var hasRequiredComparator;
|
|
9
9
|
function requireComparator() {
|
|
10
|
-
if (hasRequiredComparator)
|
|
11
|
-
return comparator;
|
|
10
|
+
if (hasRequiredComparator) return comparator;
|
|
12
11
|
hasRequiredComparator = 1;
|
|
13
12
|
const ANY = Symbol("SemVer ANY");
|
|
14
13
|
class Comparator {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparator.js","sources":["../../../../../../node_modules/semver/classes/comparator.js"],"sourcesContent":["const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5"],"mappings":"
|
|
1
|
+
{"version":3,"file":"comparator.js","sources":["../../../../../../node_modules/semver/classes/comparator.js"],"sourcesContent":["const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5"],"mappings":";;;;;;;;;;;AAAA,QAAM,MAAM,OAAO,YAAY;AAAA,EAE/B,MAAM,WAAW;AAAA,IACf,WAAW,MAAO;AAChB,aAAO;AAAA,IACX;AAAA,IAEE,YAAa,MAAM,SAAS;AAC1B,gBAAU,aAAa,OAAO;AAE9B,UAAI,gBAAgB,YAAY;AAC9B,YAAI,KAAK,UAAU,CAAC,CAAC,QAAQ,OAAO;AAClC,iBAAO;AAAA,Q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AG;AAChE,eAAO;AAAA,MACb;AACI,aAAO;AAAA,IACX;AAAA;AAGA,eAAiB;AAEjB,QAAM,eAAeA;AACrB,QAAM,EAAE,IAAI,MAAMC;AAClB,QAAM,MAAMC;AACZ,QAAM,QAAQC;AACd,QAAM,SAASC;AACf,QAAM,QAAQC,aAAA;;;","x_google_ignoreList":[0]}
|
|
@@ -10,8 +10,7 @@ const constants = require("../internal/constants.cjs");
|
|
|
10
10
|
var range;
|
|
11
11
|
var hasRequiredRange;
|
|
12
12
|
function requireRange() {
|
|
13
|
-
if (hasRequiredRange)
|
|
14
|
-
return range;
|
|
13
|
+
if (hasRequiredRange) return range;
|
|
15
14
|
hasRequiredRange = 1;
|
|
16
15
|
class Range {
|
|
17
16
|
constructor(range2, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range.cjs","sources":["../../../../../../node_modules/semver/classes/range.js"],"sourcesContent":["// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceTilde(c, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceCaret(c, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((c) => {\n return replaceXRange(c, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n"],"names":["range","parseOptions","re","debug","require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6"],"mappings":";;;;;;;;;;;;;;;EACA,MAAM,MAAM;AAAA,IACV,YAAaA,QAAO,SAAS;AAC3B,gBAAUC,eAAa,OAAO;AAE9B,UAAID,kBAAiB,OAAO;AAC1B,YACEA,OAAM,UAAU,CAAC,CAAC,QAAQ,SAC1BA,OAAM,sBAAsB,CAAC,CAAC,QAAQ,mBACtC;AACA,iBAAOA;AAAA,QACf,OAAa;AACL,iBAAO,IAAI,MAAMA,OAAM,KAAK,OAAO;AAAA,QACpC;AAAA,MACF;AAED,UAAIA,kBAAiB,YAAY;AAE/B,aAAK,MAAMA,OAAM;AACjB,aAAK,MAAM,CAAC,CAACA,MAAK,CAAC;AACnB,aAAK,OAAQ;AACb,eAAO;AAAA,MACR;AAED,WAAK,UAAU;AACf,WAAK,QAAQ,CAAC,CAAC,QAAQ;AACvB,WAAK,oBAAoB,CAAC,CAAC,QAAQ;AAGnC,WAAK,MAAMA;AACX,WAAK,MAAMA,OACR,MAAM,IAAI,EAEV,IAAI,OAAK,KAAK,WAAW,EAAE,KAAI,CAAE,CAAC,EAIlC,OAAO,OAAK,EAAE,MAAM;AAEvB,UAAI,CAAC,KAAK,IAAI,QAAQ;AACpB,cAAM,IAAI,UAAU,yBAAyBA,MAAK,EAAE;AAAA,MACrD;AAGD,UAAI,KAAK,IAAI,SAAS,GAAG;AAEvB,cAAM,QAAQ,KAAK,IAAI,CAAC;AACxB,aAAK,MAAM,KAAK,IAAI,OAAO,OAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAChD,YAAI,KAAK,IAAI,WAAW,GAAG;AACzB,eAAK,MAAM,CAAC,KAAK;AAAA,QAClB,WAAU,KAAK,IAAI,SAAS,GAAG;AAE9B,qBAAW,KAAK,KAAK,KAAK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C,gBAAM,IAAI,CAAC,EAAE,MAAM;AACnB,YAAI,IAAI,CAAC,EAAE,WAAW,WAAW,KAAK;AACpC;AAAA,QACD;AAED,YAAI,IAAI,CAAC,EAAE,OAAO,WAAW,SAAS,GAAG;AACvC,gBAAM,UAAU,IAAI,CAAC,EAAE;AACvB,cAAI,QAAQ,UAAU,QAAQ,SAC1B,QAAQ,UAAU,QAAQ,SAC1B,QAAQ,UAAU,QAAQ,OAAO;AACnC,mBAAO;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAGD,aAAO;AAAA,IACR;AAED,WAAO;AAAA,EACT;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"range.cjs","sources":["../../../../../../node_modules/semver/classes/range.js"],"sourcesContent":["// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceTilde(c, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((c) => {\n return replaceCaret(c, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((c) => {\n return replaceXRange(c, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n"],"names":["range","parse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AAEM,YAAI,IAAI,CAAC,EAAE,OAAO,WAAW,SAAS,GAAG;AACvC,gBAAM,UAAU,IAAI,CAAC,EAAE;AACvB,cAAI,QAAQ,UAAU,QAAQ,SAC1B,QAAQ,UAAU,QAAQ,SAC1B,QAAQ,UAAU,QAAQ,OAAO;AACnC,mBAAO;AAAA,UACjB;AAAA,QACA;AAAA,MACA;AAGI,aAAO;AAAA,IACX;AAEE,WAAO;AAAA,EACT;;;;","x_google_ignoreList":[0]}
|
|
@@ -8,8 +8,7 @@ import { c as constants } from "../internal/constants.js";
|
|
|
8
8
|
var range;
|
|
9
9
|
var hasRequiredRange;
|
|
10
10
|
function requireRange() {
|
|
11
|
-
if (hasRequiredRange)
|
|
12
|
-
return range;
|
|
11
|
+
if (hasRequiredRange) return range;
|
|
13
12
|
hasRequiredRange = 1;
|
|
14
13
|
class Range {
|
|
15
14
|
constructor(range2, options) {
|