chore: bump up all non-major dependencies (#11215)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [@aws-sdk/client-s3](https://redirect.github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://redirect.github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.775.0` -> `3.777.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.775.0/3.777.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@graphql-codegen/typescript](https://redirect.github.com/dotansimha/graphql-code-generator) ([source](https://redirect.github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/typescript)) | [`4.1.5` -> `4.1.6`](https://renovatebot.com/diffs/npm/@graphql-codegen%2ftypescript/4.1.5/4.1.6) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@graphql-codegen/typescript-operations](https://redirect.github.com/dotansimha/graphql-code-generator) ([source](https://redirect.github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations)) | [`4.5.1` -> `4.6.0`](https://renovatebot.com/diffs/npm/@graphql-codegen%2ftypescript-operations/4.5.1/4.6.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@sentry/esbuild-plugin](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/esbuild-plugin) ([source](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins)) | [`3.2.2` -> `3.2.4`](https://renovatebot.com/diffs/npm/@sentry%2fesbuild-plugin/3.2.2/3.2.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@sentry/react](https://redirect.github.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](https://redirect.github.com/getsentry/sentry-javascript)) | [`9.9.0` -> `9.10.0`](https://renovatebot.com/diffs/npm/@sentry%2freact/9.9.0/9.10.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [@sentry/react](https://redirect.github.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](https://redirect.github.com/getsentry/sentry-javascript)) | [`9.9.0` -> `9.10.0`](https://renovatebot.com/diffs/npm/@sentry%2freact/9.9.0/9.10.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@sentry/webpack-plugin](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/webpack-plugin) ([source](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins)) | [`3.2.2` -> `3.2.4`](https://renovatebot.com/diffs/npm/@sentry%2fwebpack-plugin/3.2.2/3.2.4) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@slack/web-api](https://tools.slack.dev/node-slack-sdk/web-api) ([source](https://redirect.github.com/slackapi/node-slack-sdk)) | [`7.9.0` -> `7.9.1`](https://renovatebot.com/diffs/npm/@slack%2fweb-api/7.9.0/7.9.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@storybook/addon-essentials](https://redirect.github.com/storybookjs/storybook/tree/next/code/addons/essentials) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/addons/essentials)) | [`8.6.9` -> `8.6.11`](https://renovatebot.com/diffs/npm/@storybook%2faddon-essentials/8.6.9/8.6.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@storybook/addon-interactions](https://redirect.github.com/storybookjs/storybook/tree/next/code/addons/interactions) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/addons/interactions)) | [`8.6.9` -> `8.6.11`](https://renovatebot.com/diffs/npm/@storybook%2faddon-interactions/8.6.9/8.6.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@storybook/addon-links](https://redirect.github.com/storybookjs/storybook/tree/next/code/addons/links) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/addons/links)) | [`8.6.9` -> `8.6.11`](https://renovatebot.com/diffs/npm/@storybook%2faddon-links/8.6.9/8.6.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@storybook/addon-mdx-gfm](https://redirect.github.com/storybookjs/storybook/tree/next/code/addons/gfm) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/addons/gfm)) | [`8.6.9` -> `8.6.11`](https://renovatebot.com/diffs/npm/@storybook%2faddon-mdx-gfm/8.6.9/8.6.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@storybook/react](https://redirect.github.com/storybookjs/storybook/tree/next/code/renderers/react) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/renderers/react)) | [`8.6.9` -> `8.6.11`](https://renovatebot.com/diffs/npm/@storybook%2freact/8.6.9/8.6.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@storybook/react-vite](https://redirect.github.com/storybookjs/storybook/tree/next/code/frameworks/react-vite) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite)) | [`8.6.9` -> `8.6.11`](https://renovatebot.com/diffs/npm/@storybook%2freact-vite/8.6.9/8.6.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@types/mixpanel-browser](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mixpanel-browser) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mixpanel-browser)) | [`2.51.0` -> `2.54.0`](https://renovatebot.com/diffs/npm/@types%2fmixpanel-browser/2.51.0/2.54.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [@types/node](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | [`22.13.13` -> `22.13.14`](https://renovatebot.com/diffs/npm/@types%2fnode/22.13.13/22.13.14) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [@types/node](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | [`22.13.13` -> `22.13.14`](https://renovatebot.com/diffs/npm/@types%2fnode/22.13.13/22.13.14) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [@types/semver](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver)) | [`7.5.8` -> `7.7.0`](https://renovatebot.com/diffs/npm/@types%2fsemver/7.5.8/7.7.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | | [ai](https://sdk.vercel.ai/docs) ([source](https://redirect.github.com/vercel/ai)) | [`4.2.5` -> `4.2.8`](https://renovatebot.com/diffs/npm/ai/4.2.5/4.2.8) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [apollographql/apollo-ios](https://redirect.github.com/apollographql/apollo-ios) | `from: "1.18.0"` -> `from: "1.19.0"` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [apollographql/apollo-ios](https://redirect.github.com/apollographql/apollo-ios) | `1.18.0` -> `1.19.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [bullmq](https://bullmq.io/) ([source](https://redirect.github.com/taskforcesh/bullmq)) | [`5.44.4` -> `5.45.0`](https://renovatebot.com/diffs/npm/bullmq/5.44.4/5.45.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [electron](https://redirect.github.com/electron/electron) | [`35.1.0` -> `35.1.2`](https://renovatebot.com/diffs/npm/electron/35.1.0/35.1.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [electron-log](https://redirect.github.com/megahertz/electron-log) | [`5.3.2` -> `5.3.3`](https://renovatebot.com/diffs/npm/electron-log/5.3.2/5.3.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [eventsource-parser](https://redirect.github.com/rexxars/eventsource-parser) | [`3.0.0` -> `3.0.1`](https://renovatebot.com/diffs/npm/eventsource-parser/3.0.0/3.0.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [mixpanel-browser](https://redirect.github.com/mixpanel/mixpanel-js) | [`2.61.2` -> `2.62.0`](https://renovatebot.com/diffs/npm/mixpanel-browser/2.61.2/2.62.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [nestjs-cls](https://papooch.github.io/nestjs-cls/) ([source](https://redirect.github.com/Papooch/nestjs-cls)) | [`5.4.1` -> `5.4.2`](https://renovatebot.com/diffs/npm/nestjs-cls/5.4.1/5.4.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [once_cell](https://redirect.github.com/matklad/once_cell) | `1.21.1` -> `1.21.2` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | workspace.dependencies | patch | | [openai](https://redirect.github.com/openai/openai-node) | [`4.89.0` -> `4.90.0`](https://renovatebot.com/diffs/npm/openai/4.89.0/4.90.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [sonner](https://sonner.emilkowal.ski/) ([source](https://redirect.github.com/emilkowalski/sonner)) | [`2.0.1` -> `2.0.2`](https://renovatebot.com/diffs/npm/sonner/2.0.1/2.0.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [storybook](https://redirect.github.com/storybookjs/storybook/tree/next/code/lib/cli) ([source](https://redirect.github.com/storybookjs/storybook/tree/HEAD/code/lib/cli)) | [`8.6.9` -> `8.6.11`](https://renovatebot.com/diffs/npm/storybook/8.6.9/8.6.11) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | [swiftlang/swift-cmark](https://redirect.github.com/swiftlang/swift-cmark) | `from: "0.4.0"` -> `from: "0.5.0"` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | minor | | [undici](https://undici.nodejs.org) ([source](https://redirect.github.com/nodejs/undici)) | [`7.5.0` -> `7.6.0`](https://renovatebot.com/diffs/npm/undici/7.5.0/7.6.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor | | [webm-muxer](https://redirect.github.com/Vanilagy/webm-muxer) | [`5.1.0` -> `5.1.1`](https://renovatebot.com/diffs/npm/webm-muxer/5.1.0/5.1.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [webpack-dev-server](https://redirect.github.com/webpack/webpack-dev-server) | [`5.2.0` -> `5.2.1`](https://renovatebot.com/diffs/npm/webpack-dev-server/5.2.0/5.2.1) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | [yarn](https://redirect.github.com/yarnpkg/berry) ([source](https://redirect.github.com/yarnpkg/berry/tree/HEAD/packages/yarnpkg-cli)) | [`4.7.0` -> `4.8.0`](https://renovatebot.com/diffs/npm/yarn/4.7.0/4.8.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | packageManager | minor | --- ### Release Notes <details> <summary>aws/aws-sdk-js-v3 (@​aws-sdk/client-s3)</summary> ### [`v3.777.0`](https://redirect.github.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#37770-2025-03-27) [Compare Source](https://redirect.github.com/aws/aws-sdk-js-v3/compare/v3.775.0...v3.777.0) **Note:** Version bump only for package [@​aws-sdk/client-s3](https://redirect.github.com/aws-sdk/client-s3) </details> <details> <summary>dotansimha/graphql-code-generator (@​graphql-codegen/typescript)</summary> ### [`v4.1.6`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/plugins/typescript/typescript/CHANGELOG.md#416) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/typescript@4.1.5...@graphql-codegen/typescript@4.1.6) ##### Patch Changes - Updated dependencies \[[`f6909d1`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/f6909d1797c15b79a0afb7ec089471763a485bfc)]: - [@​graphql-codegen/visitor-plugin-common](https://redirect.github.com/graphql-codegen/visitor-plugin-common)[@​5](https://redirect.github.com/5).8.0 </details> <details> <summary>dotansimha/graphql-code-generator (@​graphql-codegen/typescript-operations)</summary> ### [`v4.6.0`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/plugins/typescript/operations/CHANGELOG.md#460) [Compare Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/typescript-operations@4.5.1...@graphql-codegen/typescript-operations@4.6.0) ##### Minor Changes - [#​10323](https://redirect.github.com/dotansimha/graphql-code-generator/pull/10323) [`f3cf4df`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/f3cf4df358a896c5df0a7d8909c2fbf192e10c01) Thanks [@​eddeee888](https://redirect.github.com/eddeee888)! - Add support for `nullability.errorHandlingClient`. This allows clients to get stronger types with [semantic nullability](https://redirect.github.com/graphql/graphql-wg/blob/main/rfcs/SemanticNullability.md)-enabled schemas. ##### Patch Changes - Updated dependencies \[[`f6909d1`](https://redirect.github.com/dotansimha/graphql-code-generator/commit/f6909d1797c15b79a0afb7ec089471763a485bfc)]: - [@​graphql-codegen/visitor-plugin-common](https://redirect.github.com/graphql-codegen/visitor-plugin-common)[@​5](https://redirect.github.com/5).8.0 - [@​graphql-codegen/typescript](https://redirect.github.com/graphql-codegen/typescript)[@​4](https://redirect.github.com/4).1.6 </details> <details> <summary>getsentry/sentry-javascript-bundler-plugins (@​sentry/esbuild-plugin)</summary> ### [`v3.2.4`](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#324) [Compare Source](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.2.3...3.2.4) - Revert "feat(core): Use path instead of debug IDs as artifact names for debug ID upload ([#​700](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/700))" ([#​709](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/709)) - ref: Remove deprecated use of `useArtifacBundles` ([#​707](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/707)) ### [`v3.2.3`](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#323) [Compare Source](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.2.2...3.2.3) - feat(core): Use path instead of debug IDs as artifact names for debug ID upload ([#​700](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/700)) - feat(webpack): Primarily use `contentHash` for debug ID hash ([#​702](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/702)) - feat: Detect Vercel commits and env ([#​694](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/694)) - feat: Default to automatically setting commits on release ([#​692](https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/692)) </details> <details> <summary>getsentry/sentry-javascript (@​sentry/react)</summary> ### [`v9.10.0`](https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.10.0) [Compare Source](https://redirect.github.com/getsentry/sentry-javascript/compare/9.9.0...9.10.0) ##### Important Changes - **feat: Add support for logs** - feat(node): Add logging public APIs to Node SDKs ([#​15764](https://redirect.github.com/getsentry/sentry-javascript/pull/15764)) - feat(core): Add support for `beforeSendLog` ([#​15814](https://redirect.github.com/getsentry/sentry-javascript/pull/15814)) - feat(core): Add support for parameterizing logs ([#​15812](https://redirect.github.com/getsentry/sentry-javascript/pull/15812)) - fix: Remove critical log severity level ([#​15824](https://redirect.github.com/getsentry/sentry-javascript/pull/15824)) All JavaScript SDKs other than `@sentry/cloudflare` and `@sentry/deno` now support sending logs via dedicated methods as part of Sentry's [upcoming logging product](https://redirect.github.com/getsentry/sentry/discussions/86804). Logging is gated by an experimental option, `_experiments.enableLogs`. ```js Sentry.init({ dsn: 'PUBLIC_DSN', // `enableLogs` must be set to true to use the logging features _experiments: { enableLogs: true }, }); const { trace, debug, info, warn, error, fatal, fmt } = Sentry.logger; trace('Starting database connection', { database: 'users' }); debug('Cache miss for user', { userId: 123 }); error('Failed to process payment', { orderId: 'order_123', amount: 99.99 }); fatal('Database connection pool exhausted', { database: 'users', activeConnections: 100 }); // Structured logging via the `fmt` helper function. When you use `fmt`, the string template and parameters are sent separately so they can be queried independently in Sentry. info(fmt(`Updated profile for user ${userId}`)); warn(fmt(`Rate limit approaching for endpoint ${endpoint}. Requests: ${requests}, Limit: ${limit}`)); ``` With server-side SDKs like `@sentry/node`, `@sentry/bun` or server-side of `@sentry/nextjs` or `@sentry/sveltekit`, you can do structured logging without needing the `fmt` helper function. ```js const { info, warn } = Sentry.logger; info('User %s logged in successfully', [123]); warn('Failed to load user %s data', [123], { errorCode: 404 }); ``` To filter logs, or update them before they are sent to Sentry, you can use the `_experiments.beforeSendLog` option. - **feat(browser): Add `diagnoseSdkConnectivity()` function to programmatically detect possible connectivity issues ([#​15821](https://redirect.github.com/getsentry/sentry-javascript/pull/15821))** The `diagnoseSdkConnectivity()` function can be used to programmatically detect possible connectivity issues with the Sentry SDK. ```js const result = await Sentry.diagnoseSdkConnectivity(); ``` The result will be an object with the following properties: - `"no-client-active"`: There was no active client when the function was called. This possibly means that the SDK was not initialized yet. - `"sentry-unreachable"`: The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues. - `undefined`: The SDK is working as expected. - **SDK Tracing Performance Improvements for Node SDKs** - feat: Stop using `dropUndefinedKeys` ([#​15796](https://redirect.github.com/getsentry/sentry-javascript/pull/15796)) - feat(node): Only add span listeners for instrumentation when used ([#​15802](https://redirect.github.com/getsentry/sentry-javascript/pull/15802)) - ref: Avoid `dropUndefinedKeys` for `spanToJSON` calls ([#​15792](https://redirect.github.com/getsentry/sentry-javascript/pull/15792)) - ref: Avoid using `SentryError` for PromiseBuffer control flow ([#​15822](https://redirect.github.com/getsentry/sentry-javascript/pull/15822)) - ref: Stop using `dropUndefinedKeys` in SpanExporter ([#​15794](https://redirect.github.com/getsentry/sentry-javascript/pull/15794)) - ref(core): Avoid using `SentryError` for event processing control flow ([#​15823](https://redirect.github.com/getsentry/sentry-javascript/pull/15823)) - ref(node): Avoid `dropUndefinedKeys` in Node SDK init ([#​15797](https://redirect.github.com/getsentry/sentry-javascript/pull/15797)) - ref(opentelemetry): Avoid sampling work for non-root spans ([#​15820](https://redirect.github.com/getsentry/sentry-javascript/pull/15820)) We've been hard at work making performance improvements to the Sentry Node SDKs (`@sentry/node`, `@sentry/aws-serverless`, `@sentry/nestjs`, etc.). We've seen that upgrading from `9.7.0` to `9.10.0` leads to 30-40% improvement in request latency for HTTP web-server applications that use tracing with high sample rates. Non web-server applications and non-tracing applications will see smaller improvements. ##### Other Changes - chore(deps): Bump `rrweb` to `2.35.0` ([#​15825](https://redirect.github.com/getsentry/sentry-javascript/pull/15825)) - deps: Bump bundler plugins to `3.2.3` ([#​15829](https://redirect.github.com/getsentry/sentry-javascript/pull/15829)) - feat: Always truncate stored breadcrumb messages to 2kb ([#​15819](https://redirect.github.com/getsentry/sentry-javascript/pull/15819)) - feat(nextjs): Disable server webpack-handling for static builds ([#​15751](https://redirect.github.com/getsentry/sentry-javascript/pull/15751)) - fix(nuxt): Don't override Nuxt options if undefined ([#​15795](https://redirect.github.com/getsentry/sentry-javascript/pull/15795)) #### Bundle size 📦 | Path | Size | | ---------------------------------------------------------------- | ----------------- | | [@​sentry/browser](https://redirect.github.com/sentry/browser) | 23.08 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) - with treeshaking flags | 22.88 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing) | 36.49 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing, Replay) | 73.65 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 67 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing, Replay with Canvas) | 78.3 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing, Replay, Feedback) | 90.87 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) (incl. Feedback) | 40.21 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) (incl. sendFeedback) | 27.71 KB | | [@​sentry/browser](https://redirect.github.com/sentry/browser) (incl. FeedbackAsync) | 32.5 KB | | [@​sentry/react](https://redirect.github.com/sentry/react) | 24.86 KB | | [@​sentry/react](https://redirect.github.com/sentry/react) (incl. Tracing) | 38.39 KB | | [@​sentry/vue](https://redirect.github.com/sentry/vue) | 27.3 KB | | [@​sentry/vue](https://redirect.github.com/sentry/vue) (incl. Tracing) | 38.18 KB | | [@​sentry/svelte](https://redirect.github.com/sentry/svelte) | 23.12 KB | | CDN Bundle | 24.33 KB | | CDN Bundle (incl. Tracing) | 36.51 KB | | CDN Bundle (incl. Tracing, Replay) | 71.53 KB | | CDN Bundle (incl. Tracing, Replay, Feedback) | 76.71 KB | | CDN Bundle - uncompressed | 70.93 KB | | CDN Bundle (incl. Tracing) - uncompressed | 108.11 KB | | CDN Bundle (incl. Tracing, Replay) - uncompressed | 219.4 KB | | CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 231.97 KB | | [@​sentry/nextjs](https://redirect.github.com/sentry/nextjs) (client) | 39.68 KB | | [@​sentry/sveltekit](https://redirect.github.com/sentry/sveltekit) (client) | 36.92 KB | | [@​sentry/node](https://redirect.github.com/sentry/node) | 142.91 KB | | [@​sentry/node](https://redirect.github.com/sentry/node) - without tracing | 96.12 KB | | [@​sentry/aws-serverless](https://redirect.github.com/sentry/aws-serverless) | 120.46 KB | </details> <details> <summary>slackapi/node-slack-sdk (@​slack/web-api)</summary> ### [`v7.9.1`](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.9.0...@slack/web-api@7.9.1) [Compare Source](https://redirect.github.com/slackapi/node-slack-sdk/compare/@slack/web-api@7.9.0...@slack/web-api@7.9.1) </details> <details> <summary>storybookjs/storybook (@​storybook/addon-essentials)</summary> ### [`v8.6.11`](https://redirect.github.com/storybookjs/storybook/compare/v8.6.10...2afd30d75089f27a8029a1ac320d7698873b163f) [Compare Source](https://redirect.github.com/storybookjs/storybook/compare/v8.6.10...v8.6.11) ### [`v8.6.10`](https://redirect.github.com/storybookjs/storybook/blob/HEAD/CHANGELOG.md#8610) [Compare Source](https://redirect.github.com/storybookjs/storybook/compare/v8.6.9...v8.6.10) - Addon-docs: Fix non-string handling in Stories block - [#​30913](https://redirect.github.com/storybookjs/storybook/pull/30913), thanks [@​JamesIves](https://redirect.github.com/JamesIves)! - Nextjs: Fix styled-jsx optimize vite warnings - [#​30932](https://redirect.github.com/storybookjs/storybook/pull/30932), thanks [@​kasperpeulen](https://redirect.github.com/kasperpeulen)! - React: Fix actImplementation is not a function - [#​30929](https://redirect.github.com/storybookjs/storybook/pull/30929), thanks [@​kasperpeulen](https://redirect.github.com/kasperpeulen)! </details> <details> <summary>storybookjs/storybook (@​storybook/addon-interactions)</summary> ### [`v8.6.11`](https://redirect.github.com/storybookjs/storybook/blob/HEAD/CHANGELOG.md#8611) [Compare Source](https://redirect.github.com/storybookjs/storybook/compare/v8.6.10...v8.6.11) - Angular: Fix zone.js support for Angular libraries - [#​30941](https://redirect.github.com/storybookjs/storybook/pull/30941), thanks [@​valentinpalkovic](https://redirect.github.com/valentinpalkovic)! ### [`v8.6.10`](https://redirect.github.com/storybookjs/storybook/blob/HEAD/CHANGELOG.md#8610) [Compare Source](https://redirect.github.com/storybookjs/storybook/compare/v8.6.9...v8.6.10) - Addon-docs: Fix non-string handling in Stories block - [#​30913](https://redirect.github.com/storybookjs/storybook/pull/30913), thanks [@​JamesIves](https://redirect.github.com/JamesIves)! - Nextjs: Fix styled-jsx optimize vite warnings - [#​30932](https://redirect.github.com/storybookjs/storybook/pull/30932), thanks [@​kasperpeulen](https://redirect.github.com/kasperpeulen)! - React: Fix actImplementation is not a function - [#​30929](https://redirect.github.com/storybookjs/storybook/pull/30929), thanks [@​kasperpeulen](https://redirect.github.com/kasperpeulen)! </details> <details> <summary>vercel/ai (ai)</summary> ### [`v4.2.8`](https://redirect.github.com/vercel/ai/releases/tag/ai%404.2.8) [Compare Source](https://redirect.github.com/vercel/ai/compare/ai@4.2.7...ai@4.2.8) ##### Patch Changes - [`65243ce`](https://redirect.github.com/vercel/ai/commit/65243ce): fix (ui): introduce step start parts - Updated dependencies \[[`65243ce`](https://redirect.github.com/vercel/ai/commit/65243ce)] - [@​ai-sdk/ui-utils](https://redirect.github.com/ai-sdk/ui-utils)[@​1](https://redirect.github.com/1).2.2 - [@​ai-sdk/react](https://redirect.github.com/ai-sdk/react)[@​1](https://redirect.github.com/1).2.3 ### [`v4.2.7`](https://redirect.github.com/vercel/ai/releases/tag/ai%404.2.7) [Compare Source](https://redirect.github.com/vercel/ai/compare/ai@4.2.6...ai@4.2.7) ##### Patch Changes - [`e14c066`](https://redirect.github.com/vercel/ai/commit/e14c066): fix (ai/core): convert user ui messages with only parts (no content) to core messages ### [`v4.2.6`](https://redirect.github.com/vercel/ai/releases/tag/ai%404.2.6) [Compare Source](https://redirect.github.com/vercel/ai/compare/ai@4.2.5...ai@4.2.6) ##### Patch Changes - [`625591b`](https://redirect.github.com/vercel/ai/commit/625591b): feat (ai/core): auto-complete for provider registry - [`6a1506f`](https://redirect.github.com/vercel/ai/commit/6a1506f): feat (ai/core): custom separator support for provider registry - [`ea3d998`](https://redirect.github.com/vercel/ai/commit/ea3d998): chore (ai/core): move provider registry to stable </details> <details> <summary>apollographql/apollo-ios (apollographql/apollo-ios)</summary> ### [`v1.19.0`](https://redirect.github.com/apollographql/apollo-ios/blob/HEAD/CHANGELOG.md#v1190) [Compare Source](https://redirect.github.com/apollographql/apollo-ios/compare/1.18.0...1.19.0) ##### New - **New function to mutate the properties of a local cache mutation fragment. ([#​3433](https://redirect.github.com/apollographql/apollo-ios/issues/3443)):** Removal of the setter for type conditions made it difficult to work with the properties on those types. A new `mutateIfFulfilled` function was added to facilitate that workflow while still preventing a fragment from being added or removed from an existing model. See PR [#​608](https://redirect.github.com/apollographql/apollo-ios-dev/pull/608). - **Configure `URLRequest` timeout interval ([#​3522](https://redirect.github.com/apollographql/apollo-ios/issues/3522)):** Added a request context specialization protocol (`RequestContextTimeoutConfigurable`) that specifies options for configuring the timeout interval of a `URLRequest`. See PR [#​618](https://redirect.github.com/apollographql/apollo-ios-dev/pull/618). </details> <details> <summary>taskforcesh/bullmq (bullmq)</summary> ### [`v5.45.0`](https://redirect.github.com/taskforcesh/bullmq/releases/tag/v5.45.0) [Compare Source](https://redirect.github.com/taskforcesh/bullmq/compare/v5.44.4...v5.45.0) ##### Features - add deduplicated job id to the deduplicated event ([0f21c10](https://redirect.github.com/taskforcesh/bullmq/commit/0f21c10bc9fd9a2290e8dde3c9b43bc366fcb15a)) </details> <details> <summary>electron/electron (electron)</summary> ### [`v35.1.2`](https://redirect.github.com/electron/electron/releases/tag/v35.1.2): electron v35.1.2 [Compare Source](https://redirect.github.com/electron/electron/compare/v35.1.1...v35.1.2) ### Release Notes for v35.1.2 #### Fixes - Fixed an issue where `navigationHistory.restore()` failed to restore the `userAgent` if it was overridden. [#​46300](https://redirect.github.com/electron/electron/pull/46300) <span style="font-size:small;">(Also in [34](https://redirect.github.com/electron/electron/pull/46298), [36](https://redirect.github.com/electron/electron/pull/46299))</span> #### Other Changes - Security: backported fix for CVE-2025-2783. [#​46303](https://redirect.github.com/electron/electron/pull/46303) - Updated Chromium to 134.0.6998.178. [#​46287](https://redirect.github.com/electron/electron/pull/46287) ### [`v35.1.1`](https://redirect.github.com/electron/electron/releases/tag/v35.1.1): electron v35.1.1 [Compare Source](https://redirect.github.com/electron/electron/compare/v35.1.0...v35.1.1) ### Release Notes for v35.1.1 #### Fixes - Fixed build failure when building with printing disabled. [#​46285](https://redirect.github.com/electron/electron/pull/46285) <span style="font-size:small;">(Also in [34](https://redirect.github.com/electron/electron/pull/46286), [36](https://redirect.github.com/electron/electron/pull/46284))</span> </details> <details> <summary>megahertz/electron-log (electron-log)</summary> ### [`v5.3.3`](https://redirect.github.com/megahertz/electron-log/compare/v5.3.2...v5.3.3) [Compare Source](https://redirect.github.com/megahertz/electron-log/compare/v5.3.2...v5.3.3) </details> <details> <summary>rexxars/eventsource-parser (eventsource-parser)</summary> ### [`v3.0.1`](https://redirect.github.com/rexxars/eventsource-parser/blob/HEAD/CHANGELOG.md#301-2025-03-27) [Compare Source](https://redirect.github.com/rexxars/eventsource-parser/compare/v3.0.0...v3.0.1) ##### Bug Fixes - optimize `splitLines` function ([8952917](https://redirect.github.com/rexxars/eventsource-parser/commit/8952917a6f5b3d8c97175d00980538edc96b611d)) - throw helpful error if passing function to `createParser()` ([4cd3a44](https://redirect.github.com/rexxars/eventsource-parser/commit/4cd3a443f21c441be29e524637a3a603d4425a12)) </details> <details> <summary>mixpanel/mixpanel-js (mixpanel-browser)</summary> ### [`v2.62.0`](https://redirect.github.com/mixpanel/mixpanel-js/compare/v2.61.2...3e3d5731642dd3e3ac543521155d3c51c8a37261) [Compare Source](https://redirect.github.com/mixpanel/mixpanel-js/compare/v2.61.2...v2.62.0) </details> <details> <summary>Papooch/nestjs-cls (nestjs-cls)</summary> ### [`v5.4.2`](https://redirect.github.com/Papooch/nestjs-cls/releases/tag/nestjs-cls%405.4.2) [Compare Source](https://redirect.github.com/Papooch/nestjs-cls/compare/nestjs-cls@5.4.1...nestjs-cls@5.4.2) ##### Bug Fixes - **core**: un-deprecate wrongly deprecated parts of the plugin API ([#​228](https://redirect.github.com/Papooch/nestjs-cls/issues/228)) ([11ca429](https://redirect.github.com/Papooch/nestjs-cls/commits/11ca429)) </details> <details> <summary>matklad/once_cell (once_cell)</summary> ### [`v1.21.2`](https://redirect.github.com/matklad/once_cell/blob/HEAD/CHANGELOG.md#1212) [Compare Source](https://redirect.github.com/matklad/once_cell/compare/v1.21.1...v1.21.2) - Relax success ordering from AcqRel to Release in `race`: [#​278](https://redirect.github.com/matklad/once_cell/pull/278). </details> <details> <summary>openai/openai-node (openai)</summary> ### [`v4.90.0`](https://redirect.github.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4900-2025-03-27) [Compare Source](https://redirect.github.com/openai/openai-node/compare/v4.89.1...v4.90.0) Full Changelog: [v4.89.1...v4.90.0](https://redirect.github.com/openai/openai-node/compare/v4.89.1...v4.90.0) ##### Features - **api:** add `get /chat/completions` endpoint ([2d6710a](https://redirect.github.com/openai/openai-node/commit/2d6710a1f9dd4f768d9c73e9c9f5f93c737cdc66)) ##### Bug Fixes - **audio:** correctly handle transcription streaming ([2a9b603](https://redirect.github.com/openai/openai-node/commit/2a9b60336cd40a4d4fb9b898ece49170ad648fd0)) - **internal:** work around [https://github.com/vercel/next.js/issues/76881](https://redirect.github.com/vercel/next.js/issues/76881) ([#​1427](https://redirect.github.com/openai/openai-node/issues/1427)) ([b467e94](https://redirect.github.com/openai/openai-node/commit/b467e949476621e8e92587a83c9de6fab35b2b9d)) ##### Chores - add hash of OpenAPI spec/config inputs to .stats.yml ([45db35e](https://redirect.github.com/openai/openai-node/commit/45db35e34be560c75bf36224cc153c6d0e6e2a88)) - **api:** updates to supported Voice IDs ([#​1424](https://redirect.github.com/openai/openai-node/issues/1424)) ([404f4db](https://redirect.github.com/openai/openai-node/commit/404f4db41a2ee651f5bfdaa7b8881e1bf015f058)) - **client:** expose headers on some streaming errors ([#​1423](https://redirect.github.com/openai/openai-node/issues/1423)) ([b0783cc](https://redirect.github.com/openai/openai-node/commit/b0783cc6221b68f1738e759b393756a7d0e540a3)) ### [`v4.89.1`](https://redirect.github.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4891-2025-03-26) [Compare Source](https://redirect.github.com/openai/openai-node/compare/v4.89.0...v4.89.1) Full Changelog: [v4.89.0...v4.89.1](https://redirect.github.com/openai/openai-node/compare/v4.89.0...v4.89.1) ##### Bug Fixes - avoid type error in certain environments ([#​1413](https://redirect.github.com/openai/openai-node/issues/1413)) ([d3f6f8f](https://redirect.github.com/openai/openai-node/commit/d3f6f8f9c7511a98cc5795756fee49a30e44d485)) - **client:** remove duplicate types ([#​1410](https://redirect.github.com/openai/openai-node/issues/1410)) ([338878b](https://redirect.github.com/openai/openai-node/commit/338878bf484dac5a4fadf50592b1f8d1045cd4b6)) - **exports:** add missing type exports ([#​1417](https://redirect.github.com/openai/openai-node/issues/1417)) ([2d15ada](https://redirect.github.com/openai/openai-node/commit/2d15ada0e0d81a4e0d097dddbe99be2222c4c0ef)) ##### Chores - **internal:** version bump ([#​1408](https://redirect.github.com/openai/openai-node/issues/1408)) ([9c0949a](https://redirect.github.com/openai/openai-node/commit/9c0949a93c3e181d327f820dbc2a4b0ad77258e9)) </details> <details> <summary>emilkowalski/sonner (sonner)</summary> ### [`v2.0.2`](https://redirect.github.com/emilkowalski/sonner/releases/tag/v2.0.2) [Compare Source](https://redirect.github.com/emilkowalski/sonner/compare/v2.0.1...v2.0.2) #### What's Changed - fix: isExtendedResult. Check if promiseData is an object and not a valid React Element by [@​diegotraid](https://redirect.github.com/diegotraid) in [https://github.com/emilkowalski/sonner/pull/595](https://redirect.github.com/emilkowalski/sonner/pull/595) - fix: toast.dismiss without an id doesn't dismiss by [@​emilkowalski](https://redirect.github.com/emilkowalski) in [https://github.com/emilkowalski/sonner/pull/609](https://redirect.github.com/emilkowalski/sonner/pull/609) - f </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
This commit is contained in:
1 parent
64c7fb1d66
commit
efab5d4270
8 files changed
+690
-668
No files matched your search
+330
-330
@@ -1,101 +1,101 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
//prettier-ignore
|
//prettier-ignore
|
||||||
(()=>{var j3e=Object.create;var gT=Object.defineProperty;var G3e=Object.getOwnPropertyDescriptor;var W3e=Object.getOwnPropertyNames;var Y3e=Object.getPrototypeOf,V3e=Object.prototype.hasOwnProperty;var ve=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var It=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vt=(t,e)=>{for(var r in e)gT(t,r,{get:e[r],enumerable:!0})},K3e=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of W3e(e))!V3e.call(t,a)&&a!==r&&gT(t,a,{get:()=>e[a],enumerable:!(o=G3e(e,a))||o.enumerable});return t};var et=(t,e,r)=>(r=t!=null?j3e(Y3e(t)):{},K3e(e||!t||!t.__esModule?gT(r,"default",{value:t,enumerable:!0}):r,t));var Si={};Vt(Si,{SAFE_TIME:()=>cW,S_IFDIR:()=>KD,S_IFLNK:()=>JD,S_IFMT:()=>Hu,S_IFREG:()=>ow});var Hu,KD,ow,JD,cW,uW=It(()=>{Hu=61440,KD=16384,ow=32768,JD=40960,cW=456789e3});var sr={};Vt(sr,{EBADF:()=>ho,EBUSY:()=>J3e,EEXIST:()=>t_e,EINVAL:()=>X3e,EISDIR:()=>e_e,ENOENT:()=>Z3e,ENOSYS:()=>z3e,ENOTDIR:()=>$3e,ENOTEMPTY:()=>n_e,EOPNOTSUPP:()=>i_e,EROFS:()=>r_e,ERR_DIR_CLOSED:()=>dT});function Nl(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function J3e(t){return Nl("EBUSY",t)}function z3e(t,e){return Nl("ENOSYS",`${t}, ${e}`)}function X3e(t){return Nl("EINVAL",`invalid argument, ${t}`)}function ho(t){return Nl("EBADF",`bad file descriptor, ${t}`)}function Z3e(t){return Nl("ENOENT",`no such file or directory, ${t}`)}function $3e(t){return Nl("ENOTDIR",`not a directory, ${t}`)}function e_e(t){return Nl("EISDIR",`illegal operation on a directory, ${t}`)}function t_e(t){return Nl("EEXIST",`file already exists, ${t}`)}function r_e(t){return Nl("EROFS",`read-only filesystem, ${t}`)}function n_e(t){return Nl("ENOTEMPTY",`directory not empty, ${t}`)}function i_e(t){return Nl("EOPNOTSUPP",`operation not supported, ${t}`)}function dT(){return Nl("ERR_DIR_CLOSED","Directory handle was closed")}var zD=It(()=>{});var wa={};Vt(wa,{BigIntStatsEntry:()=>cm,DEFAULT_MODE:()=>ET,DirEntry:()=>mT,StatEntry:()=>lm,areStatsEqual:()=>CT,clearStats:()=>XD,convertToBigIntStats:()=>o_e,makeDefaultStats:()=>AW,makeEmptyStats:()=>s_e});function AW(){return new lm}function s_e(){return XD(AW())}function XD(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):yT.types.isDate(r)&&(t[e]=new Date(0))}return t}function o_e(t){let e=new cm;for(let r in t)if(Object.hasOwn(t,r)){let o=t[r];typeof o=="number"?e[r]=BigInt(o):yT.types.isDate(o)&&(e[r]=new Date(o))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function CT(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var yT,ET,mT,lm,cm,IT=It(()=>{yT=et(ve("util")),ET=33188,mT=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},lm=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=ET;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},cm=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(ET);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){reLine truncated
|
(()=>{var W3e=Object.create;var dT=Object.defineProperty;var Y3e=Object.getOwnPropertyDescriptor;var K3e=Object.getOwnPropertyNames;var V3e=Object.getPrototypeOf,z3e=Object.prototype.hasOwnProperty;var De=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var It=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Kt=(t,e)=>{for(var r in e)dT(t,r,{get:e[r],enumerable:!0})},J3e=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of K3e(e))!z3e.call(t,a)&&a!==r&&dT(t,a,{get:()=>e[a],enumerable:!(o=Y3e(e,a))||o.enumerable});return t};var et=(t,e,r)=>(r=t!=null?W3e(V3e(t)):{},J3e(e||!t||!t.__esModule?dT(r,"default",{value:t,enumerable:!0}):r,t));var Pi={};Kt(Pi,{SAFE_TIME:()=>AW,S_IFDIR:()=>VD,S_IFLNK:()=>zD,S_IFMT:()=>Hu,S_IFREG:()=>lw});var Hu,VD,lw,zD,AW,fW=It(()=>{Hu=61440,VD=16384,lw=32768,zD=40960,AW=456789e3});var sr={};Kt(sr,{EBADF:()=>ho,EBUSY:()=>X3e,EEXIST:()=>n_e,EINVAL:()=>$3e,EISDIR:()=>r_e,ENOENT:()=>e_e,ENOSYS:()=>Z3e,ENOTDIR:()=>t_e,ENOTEMPTY:()=>s_e,EOPNOTSUPP:()=>o_e,EROFS:()=>i_e,ERR_DIR_CLOSED:()=>mT});function Ll(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function X3e(t){return Ll("EBUSY",t)}function Z3e(t,e){return Ll("ENOSYS",`${t}, ${e}`)}function $3e(t){return Ll("EINVAL",`invalid argument, ${t}`)}function ho(t){return Ll("EBADF",`bad file descriptor, ${t}`)}function e_e(t){return Ll("ENOENT",`no such file or directory, ${t}`)}function t_e(t){return Ll("ENOTDIR",`not a directory, ${t}`)}function r_e(t){return Ll("EISDIR",`illegal operation on a directory, ${t}`)}function n_e(t){return Ll("EEXIST",`file already exists, ${t}`)}function i_e(t){return Ll("EROFS",`read-only filesystem, ${t}`)}function s_e(t){return Ll("ENOTEMPTY",`directory not empty, ${t}`)}function o_e(t){return Ll("EOPNOTSUPP",`operation not supported, ${t}`)}function mT(){return Ll("ERR_DIR_CLOSED","Directory handle was closed")}var JD=It(()=>{});var wa={};Kt(wa,{BigIntStatsEntry:()=>Am,DEFAULT_MODE:()=>CT,DirEntry:()=>yT,StatEntry:()=>um,areStatsEqual:()=>IT,clearStats:()=>XD,convertToBigIntStats:()=>l_e,makeDefaultStats:()=>pW,makeEmptyStats:()=>a_e});function pW(){return new um}function a_e(){return XD(pW())}function XD(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):ET.types.isDate(r)&&(t[e]=new Date(0))}return t}function l_e(t){let e=new Am;for(let r in t)if(Object.hasOwn(t,r)){let o=t[r];typeof o=="number"?e[r]=BigInt(o):ET.types.isDate(o)&&(e[r]=new Date(o))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function IT(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var ET,CT,yT,um,Am,wT=It(()=>{ET=et(De("util")),CT=33188,yT=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},um=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=CT;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},Am=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(CT);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){reLine truncated
|
||||||
`).length,o=e.length-r;return r>o?`\r
|
`).length,o=e.length-r;return r>o?`\r
|
||||||
`:`
|
`:`
|
||||||
`}function G0(t,e){return e.replace(/\r?\n/g,E_e(t))}var CW,IW,hf,qu,W0=It(()=>{CW=ve("crypto"),IW=ve("os");vT();Ba();hf=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let o=[e];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let o=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,CW.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(e,{recursive:r=!0,maxRetries:o=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(u=>this.removePromise(this.pathUtils.resolve(e,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(e);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;n<o&&await new Promise(A=>setTimeout(A,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let o;try{o=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await hW(this,e,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(e,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(e);let p=o.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(e);let p=o.readlinkSync(r);this.symlinkSync(ZD(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(e,A)}async changeFilePromise(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,o):this.changeFileTextPromise(e,r,o)}async changeFileBufferPromise(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:o})}async changeFileTextPromise(e,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let u=o?G0(n,r):r;n!==u&&await this.writeFilePromise(e,u,{mode:a})}changeFileSync(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,o):this.changeFileTextSync(e,r,o)}changeFileBufferSync(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:o})}changeFileTextSync(e,r,{automaticNewlines:o=!1,mode:a}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch{}let u=o?G0(n,r):r;n!==u&&this.writeFileSync(e,u,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(o){if(o.code==="EXDEV")await this.copyPromise(r,e),await this.removePromise(e);else throw o}}moveSync(e,r){try{this.renameSync(e,r)}catch(o){if(o.code==="EXDEV")this.copySync(r,e),this.removeSync(e);else throw o}}async lockPromise(e,r){let o=`${e}.flock`,a=1e3/60,n=Date.now(),u=null,A=async()=>{let p;try{[p]=await this.readJsonPromise(o)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;u===null;)try{u=await this.openPromise(o,"wx")}catch(p){if(p.code==="EEXIST"){if(!await A())try{await this.unlinkPromise(o);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${o})`)}else throw
Line truncated
|
`}function Y0(t,e){return e.replace(/\r?\n/g,I_e(t))}var wW,BW,hf,qu,K0=It(()=>{wW=De("crypto"),BW=De("os");DT();Ba();hf=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let o=[e];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let o=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,wW.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(e,{recursive:r=!0,maxRetries:o=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(u=>this.removePromise(this.pathUtils.resolve(e,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(e);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;n<o&&await new Promise(A=>setTimeout(A,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let o;try{o=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await dW(this,e,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(e,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(e);let p=o.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(e);let p=o.readlinkSync(r);this.symlinkSync(ZD(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(e,A)}async changeFilePromise(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,o):this.changeFileTextPromise(e,r,o)}async changeFileBufferPromise(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:o})}async changeFileTextPromise(e,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let u=o?Y0(n,r):r;n!==u&&await this.writeFilePromise(e,u,{mode:a})}changeFileSync(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,o):this.changeFileTextSync(e,r,o)}changeFileBufferSync(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:o})}changeFileTextSync(e,r,{automaticNewlines:o=!1,mode:a}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch{}let u=o?Y0(n,r):r;n!==u&&this.writeFileSync(e,u,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(o){if(o.code==="EXDEV")await this.copyPromise(r,e),await this.removePromise(e);else throw o}}moveSync(e,r){try{this.renameSync(e,r)}catch(o){if(o.code==="EXDEV")this.copySync(r,e),this.removeSync(e);else throw o}}async lockPromise(e,r){let o=`${e}.flock`,a=1e3/60,n=Date.now(),u=null,A=async()=>{let p;try{[p]=await this.readJsonPromise(o)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;u===null;)try{u=await this.openPromise(o,"wx")}catch(p){if(p.code==="EEXIST"){if(!await A())try{await this.unlinkPromise(o);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${o})`)}else throw
Line truncated
|
||||||
`)}writeJsonSync(e,r,{compact:o=!1}={}){let a=o?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)}
|
`)}writeJsonSync(e,r,{compact:o=!1}={}){let a=o?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)}
|
||||||
`)}async preserveTimePromise(e,r){let o=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,o.atime,o.mtime)}async preserveTimeSync(e,r){let o=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,o.atime,o.mtime)}},qu=class extends hf{constructor(){super(V)}}});var ws,gf=It(()=>{W0();ws=class extends hf{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,o){return this.baseFs.openPromise(this.mapToBase(e),r,o)}openSync(e,r,o){return this.baseFs.openSync(this.mapToBase(e),r,o)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,o,a,n){return await this.baseFs.readPromise(e,r,o,a,n)}readSync(e,r,o,a,n){return this.baseFs.readSync(e,r,o,a,n)}async writePromise(e,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,o):await this.baseFs.writePromise(e,r,o,a,n)}writeSync(e,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,o):this.baseFs.writeSync(e,r,o,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,o){return this.baseFs.fchownPromise(e,r,o)}fchownSync(e,r,o){return this.baseFs.fchownSync(e,r,o)}async chownPromise(e,r,o){return this.baseFs.chownPromise(this.mapToBase(e),r,o)}chownSync(e,r,o){return this.baseFs.chownSync(this.mapToBase(e),r,o)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,o=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),o)}copyFileSync(e,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),o)}async appendFilePromise(e,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,o)}appendFileSync(e,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,o)}async writeFilePromise(e,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,o)}writeFileSync(e,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,o)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,o){return this.baseFs.utimesPromise(this.mapToBase(e),r,o)}utimesSync(e,r,o){return this.baseFs.utimesSync(this.mapToBase(e),r,o)}async lutimesPromise(e,r,o){return this.baseFs.lutimesPromise(this.mapToBase(e),r,o)}lutimesSync(e,r,o){return this.baseFs.lutimesSync(this.mapToBase(e),r,o)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkP
Line truncated
|
`)}async preserveTimePromise(e,r){let o=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,o.atime,o.mtime)}async preserveTimeSync(e,r){let o=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,o.atime,o.mtime)}},qu=class extends hf{constructor(){super(K)}}});var ws,gf=It(()=>{K0();ws=class extends hf{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,o){return this.baseFs.openPromise(this.mapToBase(e),r,o)}openSync(e,r,o){return this.baseFs.openSync(this.mapToBase(e),r,o)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,o,a,n){return await this.baseFs.readPromise(e,r,o,a,n)}readSync(e,r,o,a,n){return this.baseFs.readSync(e,r,o,a,n)}async writePromise(e,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,o):await this.baseFs.writePromise(e,r,o,a,n)}writeSync(e,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,o):this.baseFs.writeSync(e,r,o,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,o){return this.baseFs.fchownPromise(e,r,o)}fchownSync(e,r,o){return this.baseFs.fchownSync(e,r,o)}async chownPromise(e,r,o){return this.baseFs.chownPromise(this.mapToBase(e),r,o)}chownSync(e,r,o){return this.baseFs.chownSync(this.mapToBase(e),r,o)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,o=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),o)}copyFileSync(e,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),o)}async appendFilePromise(e,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,o)}appendFileSync(e,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,o)}async writeFilePromise(e,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,o)}writeFileSync(e,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,o)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,o){return this.baseFs.utimesPromise(this.mapToBase(e),r,o)}utimesSync(e,r,o){return this.baseFs.utimesSync(this.mapToBase(e),r,o)}async lutimesPromise(e,r,o){return this.baseFs.lutimesPromise(this.mapToBase(e),r,o)}lutimesSync(e,r,o){return this.baseFs.lutimesSync(this.mapToBase(e),r,o)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkP
Line truncated
|
||||||
`,xA=cr(`\\
|
`,xA=cr(`\\
|
||||||
`,!1),bA=function(){return""},Ro="\\",To=cr("\\",!1),kA=/^[\\$"`]/,pr=Ni(["\\","$",'"',"`"],!1,!1),Me=function(L){return L},ia="\\a",dc=cr("\\a",!1),Er=function(){return"a"},du="\\b",QA=cr("\\b",!1),FA=function(){return"\b"},mc=/^[Ee]/,yc=Ni(["E","e"],!1,!1),Il=function(){return"\x1B"},we="\\f",Tt=cr("\\f",!1),wl=function(){return"\f"},Bi="\\n",Ls=cr("\\n",!1),Ft=function(){return`
|
`,!1),bA=function(){return""},Ro="\\",To=cr("\\",!1),QA=/^[\\$"`]/,pr=Li(["\\","$",'"',"`"],!1,!1),Me=function(N){return N},ia="\\a",dc=cr("\\a",!1),Er=function(){return"a"},du="\\b",kA=cr("\\b",!1),FA=function(){return"\b"},mc=/^[Ee]/,yc=Li(["E","e"],!1,!1),Il=function(){return"\x1B"},we="\\f",Tt=cr("\\f",!1),wl=function(){return"\f"},Bi="\\n",Ns=cr("\\n",!1),Ft=function(){return`
|
||||||
`},Bn="\\r",Lo=cr("\\r",!1),ki=function(){return"\r"},vi="\\t",sa=cr("\\t",!1),un=function(){return" "},qn="\\v",Ec=cr("\\v",!1),lp=function(){return"\v"},oa=/^[\\'"?]/,aa=Ni(["\\","'",'"',"?"],!1,!1),la=function(L){return String.fromCharCode(parseInt(L,16))},Ze="\\x",ca=cr("\\x",!1),mu="\\u",Bl=cr("\\u",!1),dn="\\U",No=cr("\\U",!1),RA=function(L){return String.fromCodePoint(parseInt(L,16))},TA=/^[0-7]/,Oo=Ni([["0","7"]],!1,!1),qa=/^[0-9a-fA-f]/,Ot=Ni([["0","9"],["a","f"],["A","f"]],!1,!1),vn=Iu(),Mo="{}",ua=cr("{}",!1),qi=function(){return"{}"},vl="-",Cc=cr("-",!1),Dl="+",Aa=cr("+",!1),Di=".",rs=cr(".",!1),ja=function(L,K,re){return{type:"number",value:(L==="-"?-1:1)*parseFloat(K.join("")+"."+re.join(""))}},yu=function(L,K){return{type:"number",value:(L==="-"?-1:1)*parseInt(K.join(""))}},Sl=function(L){return{type:"variable",...L}},pi=function(L){return{type:"variable",name:L}},Dn=function(L){return L},Pl="*",Je=cr("*",!1),st="/",vt=cr("/",!1),ar=function(L,K,re){return{type:K==="*"?"multiplication":"division",right:re}},ee=function(L,K){return K.reduce((re,ge)=>({left:re,...ge}),L)},ye=function(L,K,re){return{type:K==="+"?"addition":"subtraction",right:re}},Ne="$((",gt=cr("$((",!1),mt="))",Dt=cr("))",!1),er=function(L){return L},sn="$(",ei=cr("$(",!1),Qi=function(L){return L},Sn="${",fa=cr("${",!1),wd=":-",BI=cr(":-",!1),eo=function(L,K){return{name:L,defaultValue:K}},Bd=":-}",cp=cr(":-}",!1),vI=function(L){return{name:L,defaultValue:[]}},to=":+",up=cr(":+",!1),Ap=function(L,K){return{name:L,alternativeValue:K}},Ic=":+}",fp=cr(":+}",!1),s0=function(L){return{name:L,alternativeValue:[]}},o0=function(L){return{name:L}},a0="$",vd=cr("$",!1),Eu=function(L){return e.isGlobPattern(L)},ro=function(L){return L},Ga=/^[a-zA-Z0-9_]/,pp=Ni([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),l0=function(){return xd()},Wa=/^[$@*?#a-zA-Z0-9_\-]/,Ya=Ni(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),Dd=/^[()}<>$|&; \t"']/,LA=Ni(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Sd=/^[<>&; \t"']/,Pd=Ni(["<",">","&",";"," "," ",'"',"'"],!1,!1),NA=/^[ \t]/,OA=Ni([" "," "],!1,!1),W=0,xt=0,MA=[{line:1,column:1}],no=0,Cu=[],dt=0,wc;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function xd(){return t.substring(xt,W)}function c0(){return wu(xt,W)}function DI(L,K){throw K=K!==void 0?K:wu(xt,W),UA([u0(L)],t.substring(xt,W),K)}function hp(L,K){throw K=K!==void 0?K:wu(xt,W),oi(L,K)}function cr(L,K){return{type:"literal",text:L,ignoreCase:K}}function Ni(L,K,re){return{type:"class",parts:L,inverted:K,ignoreCase:re}}function Iu(){return{type:"any"}}function pa(){return{type:"end"}}function u0(L){return{type:"other",description:L}}function Bc(L){var K=MA[L],re;if(K)return K;for(re=L-1;!MA[re];)re--;for(K=MA[re],K={line:K.line,column:K.column};re<L;)t.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return MA[L]=K,K}function wu(L,K){var re=Bc(L),ge=Bc(K);return{start:{offset:L,line:re.line,column:re.column},end:{offset:K,line:ge.line,column:ge.column}}}function wt(L){W<no||(W>no&&(no=W,Cu=[]),Cu.push(L))}function oi(L,K){return new K0(L,null,null,K)}function UA(L,K,re){return new K0(K0.buildMessage(L,K),L,K,re)}function ha(){var L,K,re;for(L=W,K=[],re=bt();re!==r;)K.push(re),re=bt();return K!==r?(re=Uo(),re===r&&(re=null),re!==r?(xt=L,K=n(re),L=K):(W=L,L=r)):(W=L,L=r),L}function Uo(){var L,K,re,ge,Ye;if(L=W,K=gp(),K!==r){for(re=[],ge=bt();ge!==r;)re.push(ge),ge=bt();re!==r?(ge=A0(),ge!==r?(Ye=ga(),Ye===r&&(Ye=null),Ye!==r?(xt=L,K=u(K,ge,Ye),L=K):(W=L,L=r)):(W=L,L=r)):(W=L,L=r)}else W=L,L=r;if(L===r)if(L=W,K=gp(),K!==r){for(re=[],ge=bt();ge!==r;)re.push(ge),ge=bt();re!==r?(ge=A0(),ge===r&&(ge=null),ge!==r?(xt=L,K=A(K,ge),L=K):(W=L,L=r)):(W=L,L=r)}else W=L,L=r;return L}function ga(){var L,K,re,ge,Ye;for(L=W,K=[],re=bt();re!==r;)K.push(re),re=bt();if(K!==r)if(re=Uo(),re!==r){for(ge=[],Ye=bt();Ye!==r;)ge.push(Ye),Ye=bt();ge!==r?(xt=L,K=p(re),L=K):(W=L,L=r)}else W=L,L=r;else W=L,L=r;return L}function A0(){var L;return t.charCodeAt(W)===59?(L=h,W++):(L=r,dt===0&&wt(E)),L===r&&(t.charCodeAt(W)===38?(L=w,W++):(L=r,dt===0&&wt(D))),L}function gp(){var L,K,re;return L=W,K=_A(),K!==r?(re=f0(),re===r&&(re=null),re!==r?(xt=L,K=b(K,re),L=K):(W=L,L=r)):(W=L,L=r),L}function f0(){var L,K,re,ge,Ye,At,hr;for(L=W,K=[],re=bt();re!==r;)K.push(re),re=bt();if(K!==r)if(re=bd(),re!==r){for(ge=[],Ye=bt();Ye!==r;)ge.push(Ye),Ye=bt();if(ge!==r)if(Ye=gp(),Ye!==r){for(At=[],hr=bt();hr!==r;)At.push(hr),hr=bt();At!==r?(xt=L,K=C(re,Ye),L=K):(W=L,L=r)}else W=L,L=r;else W=L,L=r}else W=L,L=r;else W=L,L=r;return L}function bd(){var L;return t.substr(W,2)===T?(L=T,W+=2):(L=r,dt===0&&wt(N)),L===r&&(t.substr(W,2)===U?(L=U,W+=2):(L=r,dt===0&&wt(J))),L}function _A(){var L,K,re;return L=W,K=Bu(),K!==r?(re=p0(),re===r&&(re=null),re!==r?(xt=L,K=te(K,re),L=K):(W=L,L=r)):(W=L,L=r),L}function p0(){var L,K,re,ge,Ye,At,hr;for(L=W,K=[],re=bt();re!==r;)K.push(re),re=bt();if(K!==r)Line truncated
|
`},Bn="\\r",No=cr("\\r",!1),Qi=function(){return"\r"},vi="\\t",sa=cr("\\t",!1),un=function(){return" "},qn="\\v",Ec=cr("\\v",!1),cp=function(){return"\v"},oa=/^[\\'"?]/,aa=Li(["\\","'",'"',"?"],!1,!1),la=function(N){return String.fromCharCode(parseInt(N,16))},Ze="\\x",ca=cr("\\x",!1),mu="\\u",Bl=cr("\\u",!1),dn="\\U",Lo=cr("\\U",!1),RA=function(N){return String.fromCodePoint(parseInt(N,16))},TA=/^[0-7]/,Oo=Li([["0","7"]],!1,!1),qa=/^[0-9a-fA-f]/,Ot=Li([["0","9"],["a","f"],["A","f"]],!1,!1),vn=Iu(),Mo="{}",ua=cr("{}",!1),qi=function(){return"{}"},vl="-",Cc=cr("-",!1),Dl="+",Aa=cr("+",!1),Di=".",rs=cr(".",!1),ja=function(N,V,re){return{type:"number",value:(N==="-"?-1:1)*parseFloat(V.join("")+"."+re.join(""))}},yu=function(N,V){return{type:"number",value:(N==="-"?-1:1)*parseInt(V.join(""))}},Pl=function(N){return{type:"variable",...N}},pi=function(N){return{type:"variable",name:N}},Dn=function(N){return N},Sl="*",ze=cr("*",!1),st="/",vt=cr("/",!1),ar=function(N,V,re){return{type:V==="*"?"multiplication":"division",right:re}},ee=function(N,V){return V.reduce((re,he)=>({left:re,...he}),N)},Ee=function(N,V,re){return{type:V==="+"?"addition":"subtraction",right:re}},Le="$((",ht=cr("$((",!1),mt="))",Dt=cr("))",!1),er=function(N){return N},sn="$(",ei=cr("$(",!1),ki=function(N){return N},Pn="${",fa=cr("${",!1),vd=":-",DI=cr(":-",!1),eo=function(N,V){return{name:N,defaultValue:V}},Dd=":-}",up=cr(":-}",!1),PI=function(N){return{name:N,defaultValue:[]}},to=":+",Ap=cr(":+",!1),fp=function(N,V){return{name:N,alternativeValue:V}},Ic=":+}",pp=cr(":+}",!1),a0=function(N){return{name:N,alternativeValue:[]}},l0=function(N){return{name:N}},c0="$",Pd=cr("$",!1),Eu=function(N){return e.isGlobPattern(N)},ro=function(N){return N},Ga=/^[a-zA-Z0-9_]/,hp=Li([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),u0=function(){return Qd()},Wa=/^[$@*?#a-zA-Z0-9_\-]/,Ya=Li(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),Sd=/^[()}<>$|&; \t"']/,NA=Li(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),xd=/^[<>&; \t"']/,bd=Li(["<",">","&",";"," "," ",'"',"'"],!1,!1),LA=/^[ \t]/,OA=Li([" "," "],!1,!1),W=0,xt=0,MA=[{line:1,column:1}],no=0,Cu=[],dt=0,wc;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function Qd(){return t.substring(xt,W)}function A0(){return wu(xt,W)}function SI(N,V){throw V=V!==void 0?V:wu(xt,W),UA([f0(N)],t.substring(xt,W),V)}function gp(N,V){throw V=V!==void 0?V:wu(xt,W),oi(N,V)}function cr(N,V){return{type:"literal",text:N,ignoreCase:V}}function Li(N,V,re){return{type:"class",parts:N,inverted:V,ignoreCase:re}}function Iu(){return{type:"any"}}function pa(){return{type:"end"}}function f0(N){return{type:"other",description:N}}function Bc(N){var V=MA[N],re;if(V)return V;for(re=N-1;!MA[re];)re--;for(V=MA[re],V={line:V.line,column:V.column};re<N;)t.charCodeAt(re)===10?(V.line++,V.column=1):V.column++,re++;return MA[N]=V,V}function wu(N,V){var re=Bc(N),he=Bc(V);return{start:{offset:N,line:re.line,column:re.column},end:{offset:V,line:he.line,column:he.column}}}function wt(N){W<no||(W>no&&(no=W,Cu=[]),Cu.push(N))}function oi(N,V){return new J0(N,null,null,V)}function UA(N,V,re){return new J0(J0.buildMessage(N,V),N,V,re)}function ha(){var N,V,re;for(N=W,V=[],re=bt();re!==r;)V.push(re),re=bt();return V!==r?(re=Uo(),re===r&&(re=null),re!==r?(xt=N,V=n(re),N=V):(W=N,N=r)):(W=N,N=r),N}function Uo(){var N,V,re,he,Ke;if(N=W,V=dp(),V!==r){for(re=[],he=bt();he!==r;)re.push(he),he=bt();re!==r?(he=p0(),he!==r?(Ke=ga(),Ke===r&&(Ke=null),Ke!==r?(xt=N,V=u(V,he,Ke),N=V):(W=N,N=r)):(W=N,N=r)):(W=N,N=r)}else W=N,N=r;if(N===r)if(N=W,V=dp(),V!==r){for(re=[],he=bt();he!==r;)re.push(he),he=bt();re!==r?(he=p0(),he===r&&(he=null),he!==r?(xt=N,V=A(V,he),N=V):(W=N,N=r)):(W=N,N=r)}else W=N,N=r;return N}function ga(){var N,V,re,he,Ke;for(N=W,V=[],re=bt();re!==r;)V.push(re),re=bt();if(V!==r)if(re=Uo(),re!==r){for(he=[],Ke=bt();Ke!==r;)he.push(Ke),Ke=bt();he!==r?(xt=N,V=p(re),N=V):(W=N,N=r)}else W=N,N=r;else W=N,N=r;return N}function p0(){var N;return t.charCodeAt(W)===59?(N=h,W++):(N=r,dt===0&&wt(E)),N===r&&(t.charCodeAt(W)===38?(N=w,W++):(N=r,dt===0&&wt(D))),N}function dp(){var N,V,re;return N=W,V=_A(),V!==r?(re=h0(),re===r&&(re=null),re!==r?(xt=N,V=b(V,re),N=V):(W=N,N=r)):(W=N,N=r),N}function h0(){var N,V,re,he,Ke,At,hr;for(N=W,V=[],re=bt();re!==r;)V.push(re),re=bt();if(V!==r)if(re=kd(),re!==r){for(he=[],Ke=bt();Ke!==r;)he.push(Ke),Ke=bt();if(he!==r)if(Ke=dp(),Ke!==r){for(At=[],hr=bt();hr!==r;)At.push(hr),hr=bt();At!==r?(xt=N,V=C(re,Ke),N=V):(W=N,N=r)}else W=N,N=r;else W=N,N=r}else W=N,N=r;else W=N,N=r;return N}function kd(){var N;return t.substr(W,2)===T?(N=T,W+=2):(N=r,dt===0&&wt(L)),N===r&&(t.substr(W,2)===U?(N=U,W+=2):(N=r,dt===0&&wt(z))),N}function _A(){var N,V,re;return N=W,V=Bu(),V!==r?(re=g0(),re===r&&(re=null),re!==r?(xt=N,V=te(V,re),N=V):(W=N,N=r)):(W=N,N=r),N}function g0(){var N,V,re,he,Ke,At,hr;for(N=W,V=[],re=bt();re!==r;)V.push(re),re=bt();if(V!==r)Line truncated
|
||||||
`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),Z_e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(MY,([t,e])=>[t,`"$'${e}'"`])]),UY=t=>MY.get(t)??`\\x${t.charCodeAt(0).toString(16).padStart(2,"0")}`,$_e=t=>Z_e.get(t)??`"$'${UY(t)}'"`});var qY=_((dxt,HY)=>{"use strict";function e8e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function z0(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,z0)}e8e(z0,Error);z0.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",w;for(w=0;w<h.parts.length;w++)E+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function u(h){return r[h.type](h)}function A(h){var E=new Array(h.length),w,D;for(w=0;w<h.length;w++)E[w]=u(h[w]);if(E.sort(),E.length>0){for(w=1,D=1;w<E.length;w++)E[w-1]!==E[w]&&(E[D]=E[w],D++);E.length=D}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function t8e(t,e){e=e!==void 0?e:{};var r={},o={resolution:Te},a=Te,n="/",u=Ce("/",!1),A=function(He,x){return{from:He,descriptor:x}},p=function(He){return{descriptor:He}},h="@",E=Ce("@",!1),w=function(He,x){return{fullName:He,description:x}},D=function(He){return{fullName:He}},b=function(){return De()},C=/^[^\/@]/,T=fe(["/","@"],!0,!1),N=/^[^\/]/,U=fe(["/"],!0,!1),J=0,te=0,le=[{line:1,column:1}],ce=0,ue=[],Ie=0,he;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function De(){return t.substring(te,J)}function Ee(){return ht(te,J)}function g(He,x){throw x=x!==void 0?x:ht(te,J),Le([Se(He)],t.substring(te,J),x)}function me(He,x){throw x=x!==void 0?x:ht(te,J),nt(He,x)}function Ce(He,x){return{type:"literal",text:He,ignoreCase:x}}function fe(He,x,I){return{type:"class",parts:He,inverted:x,ignoreCase:I}}function ie(){return{type:"any"}}function Z(){return{type:"end"}}function Se(He){return{type:"other",description:He}}function Re(He){var x=le[He],I;if(x)return x;for(I=He-1;!le[I];)I--;for(x=le[I],x={line:x.line,column:x.column};I<He;)t.charCodeAt(I)===10?(x.line++,x.column=1):x.column++,I++;return le[He]=x,x}function ht(He,x){var I=Re(He),P=Re(x);return{start:{offset:He,line:I.line,column:I.column},end:{offset:x,line:P.line,column:P.column}}}function q(He){J<ce||(J>ce&&(ce=J,ue=[]),ue.push(He))}function nt(He,x){return new z0(He,null,null,x)}function Le(He,x,I){return new z0(z0.buildMessage(He,x),He,x,I)}function Te(){var He,x,I,P;return He=J,x=ke(),x!==r?(t.charCodeAt(J)===47?(I=n,J++):(I=r,Ie===0&&q(u)),I!==r?(P=ke(),P!==r?(te=He,x=A(x,P),He=x):(J=He,He=r)):(J=He,He=r)):(J=He,He=r),He===r&&(He=J,x=ke(),x!==r&&(te=He,x=p(x)),He=x),He}function ke(){var He,x,I,P;return He=J,x=Ke(),x!==r?(t.charCodeAt(J)===64?(I=h,J++):(I=r,Ie===0&&q(E)),I!==r?(P=tt(),P!==r?(te=He,x=w(x,P),He=x):(J=He,He=r)):(J=He,He=r)):(J=He,He=r),He===r&&(He=J,x=Ke(),x!==r&&(te=He,x=D(x)),He=x),He}function Ke(){var He,x,I,P,y;return He=J,t.charCodeAt(J)===64?(x=h,J++):(x=r,Ie===0&&q(E)),x!==r?(I=xe(),I!==r?(t.charCodeAt(J)===47?(P=n,J++):(P=r,Ie===0&&q(u)),P!==r?(y=xe(),y!==r?(te=He,x=b(),He=x):(J=He,He=r)):(J=He,He=r)):(J=He,He=r)):(J=He,He=r),He===r&&(He=J,x=xe(),x!==r&&(te=He,x=b()),He=x),He}function xe(){var He,x,I;if(He=J,x=[],C.test(t.charAt(J))?(I=t.charAt(J),J++):(I=r,Ie===0&&q(T)),I!==r)for(;I!==r;)x.push(I),C.test(t.charAt(J))?(I=t.charAt(J),J++):(I=r,Ie===0&&q(T));else x=r;return x!==r&&(te=He,x=b()),He=x,He}function tt(){var He,x,I;if(He=J,x=[],N.test(t.charAt(J))?(I=t.charAt(J),J++):(I=r,Ie===0&&q(U)),I!==r)for(;I!==r;)x.push(I),N.test(t.charAt(J))?(I=t.charAt(J),J++):(I=r,Ie===0&&q(U));else x=r;return x!==r&&(te=He,x=b()),He=x,He}if(he=a(),he!==r&&J===t.length)return he;throw he!==r&&J<t.length&&q(Z()),Le(ue,ce<t.length?t.charAt(ce):null,ce<t.length?ht(ce,ce+1):ht(ce,ce))}HY.exports={SyntaxError:z0,parse:t8e}});function pS(t){let e=t.match(/^\*{1,2}\/(.*Line truncated
|
`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),e8e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(_Y,([t,e])=>[t,`"$'${e}'"`])]),HY=t=>_Y.get(t)??`\\x${t.charCodeAt(0).toString(16).padStart(2,"0")}`,t8e=t=>e8e.get(t)??`"$'${HY(t)}'"`});var GY=_((Ext,jY)=>{"use strict";function r8e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Z0(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Z0)}r8e(Z0,Error);Z0.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",w;for(w=0;w<h.parts.length;w++)E+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function u(h){return r[h.type](h)}function A(h){var E=new Array(h.length),w,D;for(w=0;w<h.length;w++)E[w]=u(h[w]);if(E.sort(),E.length>0){for(w=1,D=1;w<E.length;w++)E[w-1]!==E[w]&&(E[D]=E[w],D++);E.length=D}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function n8e(t,e){e=e!==void 0?e:{};var r={},o={resolution:Ne},a=Ne,n="/",u=ye("/",!1),A=function(Ue,x){return{from:Ue,descriptor:x}},p=function(Ue){return{descriptor:Ue}},h="@",E=ye("@",!1),w=function(Ue,x){return{fullName:Ue,description:x}},D=function(Ue){return{fullName:Ue}},b=function(){return ve()},C=/^[^\/@]/,T=Ae(["/","@"],!0,!1),L=/^[^\/]/,U=Ae(["/"],!0,!1),z=0,te=0,le=[{line:1,column:1}],de=0,ce=[],me=0,pe;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function ve(){return t.substring(te,z)}function Ie(){return gt(te,z)}function g(Ue,x){throw x=x!==void 0?x:gt(te,z),Te([Pe(Ue)],t.substring(te,z),x)}function Ce(Ue,x){throw x=x!==void 0?x:gt(te,z),rt(Ue,x)}function ye(Ue,x){return{type:"literal",text:Ue,ignoreCase:x}}function Ae(Ue,x,I){return{type:"class",parts:Ue,inverted:x,ignoreCase:I}}function ie(){return{type:"any"}}function Z(){return{type:"end"}}function Pe(Ue){return{type:"other",description:Ue}}function Re(Ue){var x=le[Ue],I;if(x)return x;for(I=Ue-1;!le[I];)I--;for(x=le[I],x={line:x.line,column:x.column};I<Ue;)t.charCodeAt(I)===10?(x.line++,x.column=1):x.column++,I++;return le[Ue]=x,x}function gt(Ue,x){var I=Re(Ue),S=Re(x);return{start:{offset:Ue,line:I.line,column:I.column},end:{offset:x,line:S.line,column:S.column}}}function q(Ue){z<de||(z>de&&(de=z,ce=[]),ce.push(Ue))}function rt(Ue,x){return new Z0(Ue,null,null,x)}function Te(Ue,x,I){return new Z0(Z0.buildMessage(Ue,x),Ue,x,I)}function Ne(){var Ue,x,I,S;return Ue=z,x=xe(),x!==r?(t.charCodeAt(z)===47?(I=n,z++):(I=r,me===0&&q(u)),I!==r?(S=xe(),S!==r?(te=Ue,x=A(x,S),Ue=x):(z=Ue,Ue=r)):(z=Ue,Ue=r)):(z=Ue,Ue=r),Ue===r&&(Ue=z,x=xe(),x!==r&&(te=Ue,x=p(x)),Ue=x),Ue}function xe(){var Ue,x,I,S;return Ue=z,x=Ye(),x!==r?(t.charCodeAt(z)===64?(I=h,z++):(I=r,me===0&&q(E)),I!==r?(S=it(),S!==r?(te=Ue,x=w(x,S),Ue=x):(z=Ue,Ue=r)):(z=Ue,Ue=r)):(z=Ue,Ue=r),Ue===r&&(Ue=z,x=Ye(),x!==r&&(te=Ue,x=D(x)),Ue=x),Ue}function Ye(){var Ue,x,I,S,y;return Ue=z,t.charCodeAt(z)===64?(x=h,z++):(x=r,me===0&&q(E)),x!==r?(I=Qe(),I!==r?(t.charCodeAt(z)===47?(S=n,z++):(S=r,me===0&&q(u)),S!==r?(y=Qe(),y!==r?(te=Ue,x=b(),Ue=x):(z=Ue,Ue=r)):(z=Ue,Ue=r)):(z=Ue,Ue=r)):(z=Ue,Ue=r),Ue===r&&(Ue=z,x=Qe(),x!==r&&(te=Ue,x=b()),Ue=x),Ue}function Qe(){var Ue,x,I;if(Ue=z,x=[],C.test(t.charAt(z))?(I=t.charAt(z),z++):(I=r,me===0&&q(T)),I!==r)for(;I!==r;)x.push(I),C.test(t.charAt(z))?(I=t.charAt(z),z++):(I=r,me===0&&q(T));else x=r;return x!==r&&(te=Ue,x=b()),Ue=x,Ue}function it(){var Ue,x,I;if(Ue=z,x=[],L.test(t.charAt(z))?(I=t.charAt(z),z++):(I=r,me===0&&q(U)),I!==r)for(;I!==r;)x.push(I),L.test(t.charAt(z))?(I=t.charAt(z),z++):(I=r,me===0&&q(U));else x=r;return x!==r&&(te=Ue,x=b()),Ue=x,Ue}if(pe=a(),pe!==r&&z===t.length)return pe;throw pe!==r&&z<t.length&&q(Z()),Te(ce,de<t.length?t.charAt(de):null,de<t.length?gt(de,de+1):gt(de,de))}jY.exports={SyntaxError:Z0,parse:n8e}});function pP(t){let e=t.match(/^\*{1,2}\/(.*Line truncated
|
||||||
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;u<this.buffer.length&&`\0\r
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;u<this.buffer.length&&`\0\r
|
||||||
\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>r/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),VY.repeat(" ",e)+o+A+n+`
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>r/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),zY.repeat(" ",e)+o+A+n+`
|
||||||
`+VY.repeat(" ",e+this.position-a+o.length)+"^"};GT.prototype.toString=function(e){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(o+=`:
|
`+zY.repeat(" ",e+this.position-a+o.length)+"^"};WT.prototype.toString=function(e){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(o+=`:
|
||||||
`+r)),o};KY.exports=GT});var as=_((Ixt,XY)=>{"use strict";var zY=ym(),a8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],l8e=["scalar","sequence","mapping"];function c8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function u8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(a8e.indexOf(r)===-1)throw new zY('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=c8e(e.styleAliases||null),l8e.indexOf(this.kind)===-1)throw new zY('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}XY.exports=u8e});var $0=_((wxt,$Y)=>{"use strict";var ZY=Z0(),gS=ym(),A8e=as();function WT(t,e,r){var o=[];return t.include.forEach(function(a){r=WT(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function f8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function o(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(o);return t}function Em(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new gS("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=WT(this,"implicit",[]),this.compiledExplicit=WT(this,"explicit",[]),this.compiledTypeMap=f8e(this.compiledImplicit,this.compiledExplicit)}Em.DEFAULT=null;Em.create=function(){var e,r;switch(arguments.length){case 1:e=Em.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new gS("Wrong number of arguments for Schema.create function")}if(e=ZY.toArray(e),r=ZY.toArray(r),!e.every(function(o){return o instanceof Em}))throw new gS("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof A8e}))throw new gS("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Em({include:e,explicit:r})};$Y.exports=Em});var tV=_((Bxt,eV)=>{"use strict";var p8e=as();eV.exports=new p8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var nV=_((vxt,rV)=>{"use strict";var h8e=as();rV.exports=new h8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var sV=_((Dxt,iV)=>{"use strict";var g8e=as();iV.exports=new g8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var dS=_((Sxt,oV)=>{"use strict";var d8e=$0();oV.exports=new d8e({explicit:[tV(),nV(),sV()]})});var lV=_((Pxt,aV)=>{"use strict";var m8e=as();function y8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function E8e(){return null}function C8e(t){return t===null}aV.exports=new m8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:y8e,construct:E8e,predicate:C8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var uV=_((xxt,cV)=>{"use strict";var I8e=as();function w8e(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function B8e(t){return t==="true"||t==="True"||t==="TRUE"}function v8e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}cV.exports=new I8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:w8e,construct:B8e,predicate:v8e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var fV=_((bxt,AV)=>{"use strict";var D8e=Z0(),S8e=as();function P8e(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function x8e(t){return 48<=t&&t<=55}function b8e(t){return 48<=t&&t<=57}function k8e(t){if(t===null)return!1;var e=t.length,r=0,o=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;o=!0}return o&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!P8e(t.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}for(;r<e;r++)if(a=t[r],a!=="_"){if(!x8e(t.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}if(a==="_")return!1;for(;r<e;r++)if(a=t[r],a!=="_"){if(a===":")break;if(!b8e(t.charCodeAt(r)))return!1;o=!0}return!o||a==="_"?!1:a!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))
Line truncated
|
`+r)),o};JY.exports=WT});var as=_((vxt,$Y)=>{"use strict";var ZY=Cm(),c8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],u8e=["scalar","sequence","mapping"];function A8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function f8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(c8e.indexOf(r)===-1)throw new ZY('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=A8e(e.styleAliases||null),u8e.indexOf(this.kind)===-1)throw new ZY('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}$Y.exports=f8e});var tg=_((Dxt,tK)=>{"use strict";var eK=eg(),gP=Cm(),p8e=as();function YT(t,e,r){var o=[];return t.include.forEach(function(a){r=YT(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function h8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function o(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(o);return t}function Im(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new gP("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=YT(this,"implicit",[]),this.compiledExplicit=YT(this,"explicit",[]),this.compiledTypeMap=h8e(this.compiledImplicit,this.compiledExplicit)}Im.DEFAULT=null;Im.create=function(){var e,r;switch(arguments.length){case 1:e=Im.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new gP("Wrong number of arguments for Schema.create function")}if(e=eK.toArray(e),r=eK.toArray(r),!e.every(function(o){return o instanceof Im}))throw new gP("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof p8e}))throw new gP("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Im({include:e,explicit:r})};tK.exports=Im});var nK=_((Pxt,rK)=>{"use strict";var g8e=as();rK.exports=new g8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var sK=_((Sxt,iK)=>{"use strict";var d8e=as();iK.exports=new d8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var aK=_((xxt,oK)=>{"use strict";var m8e=as();oK.exports=new m8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var dP=_((bxt,lK)=>{"use strict";var y8e=tg();lK.exports=new y8e({explicit:[nK(),sK(),aK()]})});var uK=_((Qxt,cK)=>{"use strict";var E8e=as();function C8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function I8e(){return null}function w8e(t){return t===null}cK.exports=new E8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:C8e,construct:I8e,predicate:w8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var fK=_((kxt,AK)=>{"use strict";var B8e=as();function v8e(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function D8e(t){return t==="true"||t==="True"||t==="TRUE"}function P8e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}AK.exports=new B8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:v8e,construct:D8e,predicate:P8e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var hK=_((Fxt,pK)=>{"use strict";var S8e=eg(),x8e=as();function b8e(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Q8e(t){return 48<=t&&t<=55}function k8e(t){return 48<=t&&t<=57}function F8e(t){if(t===null)return!1;var e=t.length,r=0,o=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;o=!0}return o&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!b8e(t.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}for(;r<e;r++)if(a=t[r],a!=="_"){if(!Q8e(t.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}if(a==="_")return!1;for(;r<e;r++)if(a=t[r],a!=="_"){if(a===":")break;if(!k8e(t.charCodeAt(r)))return!1;o=!0}return!o||a==="_"?!1:a!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))
Line truncated
|
||||||
\r`;function J8e(t){if(t===null)return!1;var e,r,o=0,a=t.length,n=KT;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;o+=6}return o%8===0}function z8e(t){var e,r,o=t.replace(/[\r\n=]/g,""),a=o.length,n=KT,u=0,A=[];for(e=0;e<a;e++)e%4===0&&e&&(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(e));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),eg?eg.from?eg.from(A):new eg(A):A}function X8e(t){var e="",r=0,o,a,n=t.length,u=KT;for(o=0;o<n;o++)o%3===0&&o&&(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]),r=(r<<8)+t[o];return a=n%3,a===0?(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]):a===2?(e+=u[r>>10&63],e+=u[r>>4&63],e+=u[r<<2&63],e+=u[64]):a===1&&(e+=u[r>>2&63],e+=u[r<<4&63],e+=u[64],e+=u[64]),e}function Z8e(t){return eg&&eg.isBuffer(t)}DV.exports=new K8e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:J8e,construct:z8e,predicate:Z8e,represent:X8e})});var xV=_((Oxt,PV)=>{"use strict";var $8e=as(),eHe=Object.prototype.hasOwnProperty,tHe=Object.prototype.toString;function rHe(t){if(t===null)return!0;var e=[],r,o,a,n,u,A=t;for(r=0,o=A.length;r<o;r+=1){if(a=A[r],u=!1,tHe.call(a)!=="[object Object]")return!1;for(n in a)if(eHe.call(a,n))if(!u)u=!0;else return!1;if(!u)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function nHe(t){return t!==null?t:[]}PV.exports=new $8e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:rHe,construct:nHe})});var kV=_((Mxt,bV)=>{"use strict";var iHe=as(),sHe=Object.prototype.toString;function oHe(t){if(t===null)return!0;var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1){if(o=u[e],sHe.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;n[e]=[a[0],o[a[0]]]}return!0}function aHe(t){if(t===null)return[];var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1)o=u[e],a=Object.keys(o),n[e]=[a[0],o[a[0]]];return n}bV.exports=new iHe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:oHe,construct:aHe})});var FV=_((Uxt,QV)=>{"use strict";var lHe=as(),cHe=Object.prototype.hasOwnProperty;function uHe(t){if(t===null)return!0;var e,r=t;for(e in r)if(cHe.call(r,e)&&r[e]!==null)return!1;return!0}function AHe(t){return t!==null?t:{}}QV.exports=new lHe("tag:yaml.org,2002:set",{kind:"mapping",resolve:uHe,construct:AHe})});var Cm=_((_xt,RV)=>{"use strict";var fHe=$0();RV.exports=new fHe({include:[VT()],implicit:[IV(),BV()],explicit:[SV(),xV(),kV(),FV()]})});var LV=_((Hxt,TV)=>{"use strict";var pHe=as();function hHe(){return!0}function gHe(){}function dHe(){return""}function mHe(t){return typeof t>"u"}TV.exports=new pHe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:hHe,construct:gHe,predicate:mHe,represent:dHe})});var OV=_((qxt,NV)=>{"use strict";var yHe=as();function EHe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),o="";return!(e[0]==="/"&&(r&&(o=r[1]),o.length>3||e[e.length-o.length-1]!=="/"))}function CHe(t){var e=t,r=/\/([gim]*)$/.exec(t),o="";return e[0]==="/"&&(r&&(o=r[1]),e=e.slice(1,e.length-o.length-1)),new RegExp(e,o)}function IHe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function wHe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}NV.exports=new yHe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:EHe,construct:CHe,predicate:wHe,represent:IHe})});var _V=_((jxt,UV)=>{"use strict";var mS;try{MV=ve,mS=MV("esprima")}catch{typeof window<"u"&&(mS=window.esprima)}var MV,BHe=as();function vHe(t){if(t===null)return!1;try{var e="("+t+")",r=mS.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function DHe(t){var e="("+t+")",r=mS.parse(e,{range:!0}),o=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){o.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(o,e.slice(a[0]+1,a[1]-1)):new Function(o,"return "+e.slice(a[0],a[1]))}function SHe(t){return t.toString()}function PHe(t){return Object.prototype.toString.call(t)==="[object Function]"}UV.exports=new BHe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:vHe,construct:DHe,predicate:PHe,represent:SHe})});var hw=_((Wxt,qV)=>{"use strict";var HV=$0();qV.exports=HV.DEFAULT=new HV({include:[Cm()],explicit:[LV(),OV(),_V()]})});var aK=_((Yxt,gw)=>{"use strict";var mf=Z0(),JV=ym(),xHe=JY(),zV=Cm(),bHe=hw(),Kp=Object.prototype.hasOwnProperty,yS=1,XV=2,ZV=3,ES=4,JT=1,kHe=2,jV=3,QHe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uD
Line truncated
|
\r`;function X8e(t){if(t===null)return!1;var e,r,o=0,a=t.length,n=zT;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;o+=6}return o%8===0}function Z8e(t){var e,r,o=t.replace(/[\r\n=]/g,""),a=o.length,n=zT,u=0,A=[];for(e=0;e<a;e++)e%4===0&&e&&(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(e));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),rg?rg.from?rg.from(A):new rg(A):A}function $8e(t){var e="",r=0,o,a,n=t.length,u=zT;for(o=0;o<n;o++)o%3===0&&o&&(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]),r=(r<<8)+t[o];return a=n%3,a===0?(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]):a===2?(e+=u[r>>10&63],e+=u[r>>4&63],e+=u[r<<2&63],e+=u[64]):a===1&&(e+=u[r>>2&63],e+=u[r<<4&63],e+=u[64],e+=u[64]),e}function eHe(t){return rg&&rg.isBuffer(t)}SK.exports=new J8e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:X8e,construct:Z8e,predicate:eHe,represent:$8e})});var QK=_((_xt,bK)=>{"use strict";var tHe=as(),rHe=Object.prototype.hasOwnProperty,nHe=Object.prototype.toString;function iHe(t){if(t===null)return!0;var e=[],r,o,a,n,u,A=t;for(r=0,o=A.length;r<o;r+=1){if(a=A[r],u=!1,nHe.call(a)!=="[object Object]")return!1;for(n in a)if(rHe.call(a,n))if(!u)u=!0;else return!1;if(!u)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function sHe(t){return t!==null?t:[]}bK.exports=new tHe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:iHe,construct:sHe})});var FK=_((Hxt,kK)=>{"use strict";var oHe=as(),aHe=Object.prototype.toString;function lHe(t){if(t===null)return!0;var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1){if(o=u[e],aHe.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;n[e]=[a[0],o[a[0]]]}return!0}function cHe(t){if(t===null)return[];var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1)o=u[e],a=Object.keys(o),n[e]=[a[0],o[a[0]]];return n}kK.exports=new oHe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:lHe,construct:cHe})});var TK=_((qxt,RK)=>{"use strict";var uHe=as(),AHe=Object.prototype.hasOwnProperty;function fHe(t){if(t===null)return!0;var e,r=t;for(e in r)if(AHe.call(r,e)&&r[e]!==null)return!1;return!0}function pHe(t){return t!==null?t:{}}RK.exports=new uHe("tag:yaml.org,2002:set",{kind:"mapping",resolve:fHe,construct:pHe})});var wm=_((jxt,NK)=>{"use strict";var hHe=tg();NK.exports=new hHe({include:[VT()],implicit:[BK(),DK()],explicit:[xK(),QK(),FK(),TK()]})});var OK=_((Gxt,LK)=>{"use strict";var gHe=as();function dHe(){return!0}function mHe(){}function yHe(){return""}function EHe(t){return typeof t>"u"}LK.exports=new gHe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:dHe,construct:mHe,predicate:EHe,represent:yHe})});var UK=_((Wxt,MK)=>{"use strict";var CHe=as();function IHe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),o="";return!(e[0]==="/"&&(r&&(o=r[1]),o.length>3||e[e.length-o.length-1]!=="/"))}function wHe(t){var e=t,r=/\/([gim]*)$/.exec(t),o="";return e[0]==="/"&&(r&&(o=r[1]),e=e.slice(1,e.length-o.length-1)),new RegExp(e,o)}function BHe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function vHe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}MK.exports=new CHe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:IHe,construct:wHe,predicate:vHe,represent:BHe})});var qK=_((Yxt,HK)=>{"use strict";var mP;try{_K=De,mP=_K("esprima")}catch{typeof window<"u"&&(mP=window.esprima)}var _K,DHe=as();function PHe(t){if(t===null)return!1;try{var e="("+t+")",r=mP.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function SHe(t){var e="("+t+")",r=mP.parse(e,{range:!0}),o=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){o.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(o,e.slice(a[0]+1,a[1]-1)):new Function(o,"return "+e.slice(a[0],a[1]))}function xHe(t){return t.toString()}function bHe(t){return Object.prototype.toString.call(t)==="[object Function]"}HK.exports=new DHe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:PHe,construct:SHe,predicate:bHe,represent:xHe})});var dw=_((Vxt,GK)=>{"use strict";var jK=tg();GK.exports=jK.DEFAULT=new jK({include:[wm()],explicit:[OK(),UK(),qK()]})});var cV=_((zxt,mw)=>{"use strict";var mf=eg(),XK=Cm(),QHe=XY(),ZK=wm(),kHe=dw(),zp=Object.prototype.hasOwnProperty,yP=1,$K=2,eV=3,EP=4,JT=1,FHe=2,WK=3,RHe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uD
Line truncated
|
||||||
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function OHe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var tK=new Array(256),rK=new Array(256);for(tg=0;tg<256;tg++)tK[tg]=WV(tg)?1:0,rK[tg]=WV(tg);var tg;function MHe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||bHe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function nK(t,e){return new JV(e,new xHe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Qr(t,e){throw nK(t,e)}function CS(t,e){t.onWarning&&t.onWarning.call(null,nK(t,e))}var YV={YAML:function(e,r,o){var a,n,u;e.version!==null&&Qr(e,"duplication of %YAML directive"),o.length!==1&&Qr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&Qr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&Qr(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=u<2,u!==1&&u!==2&&CS(e,"unsupported YAML version of the document")},TAG:function(e,r,o){var a,n;o.length!==2&&Qr(e,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],$V.test(a)||Qr(e,"ill-formed tag handle (first argument) of the TAG directive"),Kp.call(e.tagMap,a)&&Qr(e,'there is a previously declared suffix for "'+a+'" tag handle'),eK.test(n)||Qr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function Vp(t,e,r,o){var a,n,u,A;if(e<r){if(A=t.input.slice(e,r),o)for(a=0,n=A.length;a<n;a+=1)u=A.charCodeAt(a),u===9||32<=u&&u<=1114111||Qr(t,"expected valid JSON character");else QHe.test(A)&&Qr(t,"the stream contains non-printable characters");t.result+=A}}function VV(t,e,r,o){var a,n,u,A;for(mf.isObject(r)||Qr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),u=0,A=a.length;u<A;u+=1)n=a[u],Kp.call(e,n)||(e[n]=r[n],o[n]=!0)}function wm(t,e,r,o,a,n,u,A){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Qr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&GV(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&GV(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)VV(t,e,n[p],r);else VV(t,e,n,r);else!t.json&&!Kp.call(r,a)&&Kp.call(e,a)&&(t.line=u||t.line,t.position=A||t.position,Qr(t,"duplicated mapping key")),e[a]=n,delete r[a];return e}function zT(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Qr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Yi(t,e,r){for(var o=0,a=t.input.charCodeAt(t.position);a!==0;){for(;rg(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(Wu(a))for(zT(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&o!==0&&t.lineIndent<r&&CS(t,"deficient indentation"),o}function IS(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Da(r)))}function XT(t,e){e===1?t.result+=" ":e>1&&(t.result+=mf.repeat(`
|
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function UHe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var nV=new Array(256),iV=new Array(256);for(ng=0;ng<256;ng++)nV[ng]=KK(ng)?1:0,iV[ng]=KK(ng);var ng;function _He(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||kHe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function sV(t,e){return new XK(e,new QHe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function kr(t,e){throw sV(t,e)}function CP(t,e){t.onWarning&&t.onWarning.call(null,sV(t,e))}var VK={YAML:function(e,r,o){var a,n,u;e.version!==null&&kr(e,"duplication of %YAML directive"),o.length!==1&&kr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&kr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&kr(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=u<2,u!==1&&u!==2&&CP(e,"unsupported YAML version of the document")},TAG:function(e,r,o){var a,n;o.length!==2&&kr(e,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],tV.test(a)||kr(e,"ill-formed tag handle (first argument) of the TAG directive"),zp.call(e.tagMap,a)&&kr(e,'there is a previously declared suffix for "'+a+'" tag handle'),rV.test(n)||kr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function Vp(t,e,r,o){var a,n,u,A;if(e<r){if(A=t.input.slice(e,r),o)for(a=0,n=A.length;a<n;a+=1)u=A.charCodeAt(a),u===9||32<=u&&u<=1114111||kr(t,"expected valid JSON character");else RHe.test(A)&&kr(t,"the stream contains non-printable characters");t.result+=A}}function zK(t,e,r,o){var a,n,u,A;for(mf.isObject(r)||kr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),u=0,A=a.length;u<A;u+=1)n=a[u],zp.call(e,n)||(e[n]=r[n],o[n]=!0)}function vm(t,e,r,o,a,n,u,A){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&kr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&YK(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&YK(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)zK(t,e,n[p],r);else zK(t,e,n,r);else!t.json&&!zp.call(r,a)&&zp.call(e,a)&&(t.line=u||t.line,t.position=A||t.position,kr(t,"duplicated mapping key")),e[a]=n,delete r[a];return e}function XT(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):kr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Yi(t,e,r){for(var o=0,a=t.input.charCodeAt(t.position);a!==0;){for(;ig(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(Wu(a))for(XT(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&o!==0&&t.lineIndent<r&&CP(t,"deficient indentation"),o}function IP(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Da(r)))}function ZT(t,e){e===1?t.result+=" ":e>1&&(t.result+=mf.repeat(`
|
||||||
`,e-1))}function UHe(t,e,r){var o,a,n,u,A,p,h,E,w=t.kind,D=t.result,b;if(b=t.input.charCodeAt(t.position),Da(b)||Im(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96||(b===63||b===45)&&(a=t.input.charCodeAt(t.position+1),Da(a)||r&&Im(a)))return!1;for(t.kind="scalar",t.result="",n=u=t.position,A=!1;b!==0;){if(b===58){if(a=t.input.charCodeAt(t.position+1),Da(a)||r&&Im(a))break}else if(b===35){if(o=t.input.charCodeAt(t.position-1),Da(o))break}else{if(t.position===t.lineStart&&IS(t)||r&&Im(b))break;if(Wu(b))if(p=t.line,h=t.lineStart,E=t.lineIndent,Yi(t,!1,-1),t.lineIndent>=e){A=!0,b=t.input.charCodeAt(t.position);continue}else{t.position=u,t.line=p,t.lineStart=h,t.lineIndent=E;break}}A&&(Vp(t,n,u,!1),XT(t,t.line-p),n=u=t.position,A=!1),rg(b)||(u=t.position+1),b=t.input.charCodeAt(++t.position)}return Vp(t,n,u,!1),t.result?!0:(t.kind=w,t.result=D,!1)}function _He(t,e){var r,o,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Vp(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,a=t.position;else return!0;else Wu(r)?(Vp(t,o,a,!0),XT(t,Yi(t,!1,e)),o=a=t.position):t.position===t.lineStart&&IS(t)?Qr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Qr(t,"unexpected end of the stream within a single quoted scalar")}function HHe(t,e){var r,o,a,n,u,A;if(A=t.input.charCodeAt(t.position),A!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(A=t.input.charCodeAt(t.position))!==0;){if(A===34)return Vp(t,r,t.position,!0),t.position++,!0;if(A===92){if(Vp(t,r,t.position,!0),A=t.input.charCodeAt(++t.position),Wu(A))Yi(t,!1,e);else if(A<256&&tK[A])t.result+=rK[A],t.position++;else if((u=LHe(A))>0){for(a=u,n=0;a>0;a--)A=t.input.charCodeAt(++t.position),(u=THe(A))>=0?n=(n<<4)+u:Qr(t,"expected hexadecimal character");t.result+=OHe(n),t.position++}else Qr(t,"unknown escape sequence");r=o=t.position}else Wu(A)?(Vp(t,r,o,!0),XT(t,Yi(t,!1,e)),r=o=t.position):t.position===t.lineStart&&IS(t)?Qr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}Qr(t,"unexpected end of the stream within a double quoted scalar")}function qHe(t,e){var r=!0,o,a=t.tag,n,u=t.anchor,A,p,h,E,w,D={},b,C,T,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,w=!1,n=[];else if(N===123)p=125,w=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(Yi(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=u,t.kind=w?"mapping":"sequence",t.result=n,!0;r||Qr(t,"missed comma between flow collection entries"),C=b=T=null,h=E=!1,N===63&&(A=t.input.charCodeAt(t.position+1),Da(A)&&(h=E=!0,t.position++,Yi(t,!0,e))),o=t.line,Bm(t,e,yS,!1,!0),C=t.tag,b=t.result,Yi(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===o)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),Yi(t,!0,e),Bm(t,e,yS,!1,!0),T=t.result),w?wm(t,n,D,C,b,T):h?n.push(wm(t,null,D,C,b,T)):n.push(b),Yi(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Qr(t,"unexpected end of the stream within a flow collection")}function jHe(t,e){var r,o,a=JT,n=!1,u=!1,A=e,p=0,h=!1,E,w;if(w=t.input.charCodeAt(t.position),w===124)o=!1;else if(w===62)o=!0;else return!1;for(t.kind="scalar",t.result="";w!==0;)if(w=t.input.charCodeAt(++t.position),w===43||w===45)JT===a?a=w===43?jV:kHe:Qr(t,"repeat of a chomping mode identifier");else if((E=NHe(w))>=0)E===0?Qr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?Qr(t,"repeat of an indentation width identifier"):(A=e+E-1,u=!0);else break;if(rg(w)){do w=t.input.charCodeAt(++t.position);while(rg(w));if(w===35)do w=t.input.charCodeAt(++t.position);while(!Wu(w)&&w!==0)}for(;w!==0;){for(zT(t),t.lineIndent=0,w=t.input.charCodeAt(t.position);(!u||t.lineIndent<A)&&w===32;)t.lineIndent++,w=t.input.charCodeAt(++t.position);if(!u&&t.lineIndent>A&&(A=t.lineIndent),Wu(w)){p++;continue}if(t.lineIndent<A){a===jV?t.result+=mf.repeat(`
|
`,e-1))}function HHe(t,e,r){var o,a,n,u,A,p,h,E,w=t.kind,D=t.result,b;if(b=t.input.charCodeAt(t.position),Da(b)||Bm(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96||(b===63||b===45)&&(a=t.input.charCodeAt(t.position+1),Da(a)||r&&Bm(a)))return!1;for(t.kind="scalar",t.result="",n=u=t.position,A=!1;b!==0;){if(b===58){if(a=t.input.charCodeAt(t.position+1),Da(a)||r&&Bm(a))break}else if(b===35){if(o=t.input.charCodeAt(t.position-1),Da(o))break}else{if(t.position===t.lineStart&&IP(t)||r&&Bm(b))break;if(Wu(b))if(p=t.line,h=t.lineStart,E=t.lineIndent,Yi(t,!1,-1),t.lineIndent>=e){A=!0,b=t.input.charCodeAt(t.position);continue}else{t.position=u,t.line=p,t.lineStart=h,t.lineIndent=E;break}}A&&(Vp(t,n,u,!1),ZT(t,t.line-p),n=u=t.position,A=!1),ig(b)||(u=t.position+1),b=t.input.charCodeAt(++t.position)}return Vp(t,n,u,!1),t.result?!0:(t.kind=w,t.result=D,!1)}function qHe(t,e){var r,o,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Vp(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,a=t.position;else return!0;else Wu(r)?(Vp(t,o,a,!0),ZT(t,Yi(t,!1,e)),o=a=t.position):t.position===t.lineStart&&IP(t)?kr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);kr(t,"unexpected end of the stream within a single quoted scalar")}function jHe(t,e){var r,o,a,n,u,A;if(A=t.input.charCodeAt(t.position),A!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(A=t.input.charCodeAt(t.position))!==0;){if(A===34)return Vp(t,r,t.position,!0),t.position++,!0;if(A===92){if(Vp(t,r,t.position,!0),A=t.input.charCodeAt(++t.position),Wu(A))Yi(t,!1,e);else if(A<256&&nV[A])t.result+=iV[A],t.position++;else if((u=OHe(A))>0){for(a=u,n=0;a>0;a--)A=t.input.charCodeAt(++t.position),(u=LHe(A))>=0?n=(n<<4)+u:kr(t,"expected hexadecimal character");t.result+=UHe(n),t.position++}else kr(t,"unknown escape sequence");r=o=t.position}else Wu(A)?(Vp(t,r,o,!0),ZT(t,Yi(t,!1,e)),r=o=t.position):t.position===t.lineStart&&IP(t)?kr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}kr(t,"unexpected end of the stream within a double quoted scalar")}function GHe(t,e){var r=!0,o,a=t.tag,n,u=t.anchor,A,p,h,E,w,D={},b,C,T,L;if(L=t.input.charCodeAt(t.position),L===91)p=93,w=!1,n=[];else if(L===123)p=125,w=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),L=t.input.charCodeAt(++t.position);L!==0;){if(Yi(t,!0,e),L=t.input.charCodeAt(t.position),L===p)return t.position++,t.tag=a,t.anchor=u,t.kind=w?"mapping":"sequence",t.result=n,!0;r||kr(t,"missed comma between flow collection entries"),C=b=T=null,h=E=!1,L===63&&(A=t.input.charCodeAt(t.position+1),Da(A)&&(h=E=!0,t.position++,Yi(t,!0,e))),o=t.line,Dm(t,e,yP,!1,!0),C=t.tag,b=t.result,Yi(t,!0,e),L=t.input.charCodeAt(t.position),(E||t.line===o)&&L===58&&(h=!0,L=t.input.charCodeAt(++t.position),Yi(t,!0,e),Dm(t,e,yP,!1,!0),T=t.result),w?vm(t,n,D,C,b,T):h?n.push(vm(t,null,D,C,b,T)):n.push(b),Yi(t,!0,e),L=t.input.charCodeAt(t.position),L===44?(r=!0,L=t.input.charCodeAt(++t.position)):r=!1}kr(t,"unexpected end of the stream within a flow collection")}function WHe(t,e){var r,o,a=JT,n=!1,u=!1,A=e,p=0,h=!1,E,w;if(w=t.input.charCodeAt(t.position),w===124)o=!1;else if(w===62)o=!0;else return!1;for(t.kind="scalar",t.result="";w!==0;)if(w=t.input.charCodeAt(++t.position),w===43||w===45)JT===a?a=w===43?WK:FHe:kr(t,"repeat of a chomping mode identifier");else if((E=MHe(w))>=0)E===0?kr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?kr(t,"repeat of an indentation width identifier"):(A=e+E-1,u=!0);else break;if(ig(w)){do w=t.input.charCodeAt(++t.position);while(ig(w));if(w===35)do w=t.input.charCodeAt(++t.position);while(!Wu(w)&&w!==0)}for(;w!==0;){for(XT(t),t.lineIndent=0,w=t.input.charCodeAt(t.position);(!u||t.lineIndent<A)&&w===32;)t.lineIndent++,w=t.input.charCodeAt(++t.position);if(!u&&t.lineIndent>A&&(A=t.lineIndent),Wu(w)){p++;continue}if(t.lineIndent<A){a===WK?t.result+=mf.repeat(`
|
||||||
`,n?1+p:p):a===JT&&n&&(t.result+=`
|
`,n?1+p:p):a===JT&&n&&(t.result+=`
|
||||||
`);break}for(o?rg(w)?(h=!0,t.result+=mf.repeat(`
|
`);break}for(o?ig(w)?(h=!0,t.result+=mf.repeat(`
|
||||||
`,n?1+p:p)):h?(h=!1,t.result+=mf.repeat(`
|
`,n?1+p:p)):h?(h=!1,t.result+=mf.repeat(`
|
||||||
`,p+1)):p===0?n&&(t.result+=" "):t.result+=mf.repeat(`
|
`,p+1)):p===0?n&&(t.result+=" "):t.result+=mf.repeat(`
|
||||||
`,p):t.result+=mf.repeat(`
|
`,p):t.result+=mf.repeat(`
|
||||||
`,n?1+p:p),n=!0,u=!0,p=0,r=t.position;!Wu(w)&&w!==0;)w=t.input.charCodeAt(++t.position);Vp(t,r,t.position,!1)}return!0}function KV(t,e){var r,o=t.tag,a=t.anchor,n=[],u,A=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(u=t.input.charCodeAt(t.position+1),!Da(u)));){if(A=!0,t.position++,Yi(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,Bm(t,e,ZV,!1,!0),n.push(t.result),Yi(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)Qr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return A?(t.tag=o,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}function GHe(t,e,r){var o,a,n,u,A=t.tag,p=t.anchor,h={},E={},w=null,D=null,b=null,C=!1,T=!1,N;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),N=t.input.charCodeAt(t.position);N!==0;){if(o=t.input.charCodeAt(t.position+1),n=t.line,u=t.position,(N===63||N===58)&&Da(o))N===63?(C&&(wm(t,h,E,w,D,null),w=D=b=null),T=!0,C=!0,a=!0):C?(C=!1,a=!0):Qr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,N=o;else if(Bm(t,r,XV,!1,!0))if(t.line===n){for(N=t.input.charCodeAt(t.position);rg(N);)N=t.input.charCodeAt(++t.position);if(N===58)N=t.input.charCodeAt(++t.position),Da(N)||Qr(t,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(wm(t,h,E,w,D,null),w=D=b=null),T=!0,C=!1,a=!1,w=t.tag,D=t.result;else if(T)Qr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=A,t.anchor=p,!0}else if(T)Qr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=A,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(Bm(t,e,ES,!0,a)&&(C?D=t.result:b=t.result),C||(wm(t,h,E,w,D,b,n,u),w=D=b=null),Yi(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Qr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return C&&wm(t,h,E,w,D,null),T&&(t.tag=A,t.anchor=p,t.kind="mapping",t.result=h),T}function WHe(t){var e,r=!1,o=!1,a,n,u;if(u=t.input.charCodeAt(t.position),u!==33)return!1;if(t.tag!==null&&Qr(t,"duplication of a tag property"),u=t.input.charCodeAt(++t.position),u===60?(r=!0,u=t.input.charCodeAt(++t.position)):u===33?(o=!0,a="!!",u=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do u=t.input.charCodeAt(++t.position);while(u!==0&&u!==62);t.position<t.length?(n=t.input.slice(e,t.position),u=t.input.charCodeAt(++t.position)):Qr(t,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!Da(u);)u===33&&(o?Qr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),$V.test(a)||Qr(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),u=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),RHe.test(n)&&Qr(t,"tag suffix cannot contain flow indicator characters")}return n&&!eK.test(n)&&Qr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:Kp.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:Qr(t,'undeclared tag handle "'+a+'"'),!0}function YHe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Qr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Da(r)&&!Im(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Qr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function VHe(t){var e,r,o;if(o=t.input.charCodeAt(t.position),o!==42)return!1;for(o=t.input.charCodeAt(++t.position),e=t.position;o!==0&&!Da(o)&&!Im(o);)o=t.input.charCodeAt(++t.position);return t.position===e&&Qr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Kp.call(t.anchorMap,r)||Qr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Yi(t,!0,-1),!0}function Bm(t,e,r,o,a){var n,u,A,p=1,h=!1,E=!1,w,D,b,C,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=u=A=ES===r||ZV===r,o&&Yi(t,!0,-1)&&(h=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),p===1)for(;WHe(t)||YHe(t);)Yi(t,!0,-1)?(h=!0,A=n,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):A=!1;if(A&&(A=h||a),(p===1||ES===r)&&(yS===r||XV===r?C=e:C=e+1,T=t.position-t.lineStart,p===1?A&&(KV(t,T)||GHe(t,T,C))||qHe(t,C)?E=!0:(u&&jHe(t,C)||_He(t,C)||HHe(t,C)?E=!0:VHe(t)?(E=!0,(t.tag!==null||t.anchor!==null)&&Qr(t,"alias node should not have any properties")):UHe(t,C,yS===r)&&(E=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(E=A&&KV(t,T))),t.tag!==null&&t.tag!=="!")if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Qr(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),w=0,D=t.implicitTypes.length;w<D;w+=1)if(b=t.implicitTypes[w],b.resolve(t.result)){t.result=b.construct(t.result),t.tag=b.tag
Line truncated
|
`,n?1+p:p),n=!0,u=!0,p=0,r=t.position;!Wu(w)&&w!==0;)w=t.input.charCodeAt(++t.position);Vp(t,r,t.position,!1)}return!0}function JK(t,e){var r,o=t.tag,a=t.anchor,n=[],u,A=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(u=t.input.charCodeAt(t.position+1),!Da(u)));){if(A=!0,t.position++,Yi(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,Dm(t,e,eV,!1,!0),n.push(t.result),Yi(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)kr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return A?(t.tag=o,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}function YHe(t,e,r){var o,a,n,u,A=t.tag,p=t.anchor,h={},E={},w=null,D=null,b=null,C=!1,T=!1,L;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),L=t.input.charCodeAt(t.position);L!==0;){if(o=t.input.charCodeAt(t.position+1),n=t.line,u=t.position,(L===63||L===58)&&Da(o))L===63?(C&&(vm(t,h,E,w,D,null),w=D=b=null),T=!0,C=!0,a=!0):C?(C=!1,a=!0):kr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,L=o;else if(Dm(t,r,$K,!1,!0))if(t.line===n){for(L=t.input.charCodeAt(t.position);ig(L);)L=t.input.charCodeAt(++t.position);if(L===58)L=t.input.charCodeAt(++t.position),Da(L)||kr(t,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(vm(t,h,E,w,D,null),w=D=b=null),T=!0,C=!1,a=!1,w=t.tag,D=t.result;else if(T)kr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=A,t.anchor=p,!0}else if(T)kr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=A,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(Dm(t,e,EP,!0,a)&&(C?D=t.result:b=t.result),C||(vm(t,h,E,w,D,b,n,u),w=D=b=null),Yi(t,!0,-1),L=t.input.charCodeAt(t.position)),t.lineIndent>e&&L!==0)kr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return C&&vm(t,h,E,w,D,null),T&&(t.tag=A,t.anchor=p,t.kind="mapping",t.result=h),T}function KHe(t){var e,r=!1,o=!1,a,n,u;if(u=t.input.charCodeAt(t.position),u!==33)return!1;if(t.tag!==null&&kr(t,"duplication of a tag property"),u=t.input.charCodeAt(++t.position),u===60?(r=!0,u=t.input.charCodeAt(++t.position)):u===33?(o=!0,a="!!",u=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do u=t.input.charCodeAt(++t.position);while(u!==0&&u!==62);t.position<t.length?(n=t.input.slice(e,t.position),u=t.input.charCodeAt(++t.position)):kr(t,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!Da(u);)u===33&&(o?kr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),tV.test(a)||kr(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),u=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),NHe.test(n)&&kr(t,"tag suffix cannot contain flow indicator characters")}return n&&!rV.test(n)&&kr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:zp.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:kr(t,'undeclared tag handle "'+a+'"'),!0}function VHe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&kr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Da(r)&&!Bm(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&kr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function zHe(t){var e,r,o;if(o=t.input.charCodeAt(t.position),o!==42)return!1;for(o=t.input.charCodeAt(++t.position),e=t.position;o!==0&&!Da(o)&&!Bm(o);)o=t.input.charCodeAt(++t.position);return t.position===e&&kr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),zp.call(t.anchorMap,r)||kr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Yi(t,!0,-1),!0}function Dm(t,e,r,o,a){var n,u,A,p=1,h=!1,E=!1,w,D,b,C,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=u=A=EP===r||eV===r,o&&Yi(t,!0,-1)&&(h=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),p===1)for(;KHe(t)||VHe(t);)Yi(t,!0,-1)?(h=!0,A=n,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):A=!1;if(A&&(A=h||a),(p===1||EP===r)&&(yP===r||$K===r?C=e:C=e+1,T=t.position-t.lineStart,p===1?A&&(JK(t,T)||YHe(t,T,C))||GHe(t,C)?E=!0:(u&&WHe(t,C)||qHe(t,C)||jHe(t,C)?E=!0:zHe(t)?(E=!0,(t.tag!==null||t.anchor!==null)&&kr(t,"alias node should not have any properties")):HHe(t,C,yP===r)&&(E=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(E=A&&JK(t,T))),t.tag!==null&&t.tag!=="!")if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&kr(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),w=0,D=t.implicitTypes.length;w<D;w+=1)if(b=t.implicitTypes[w],b.resolve(t.result)){t.result=b.construct(t.result),t.tag=b.tag
Line truncated
|
||||||
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new MHe(t,e),o=t.indexOf("\0");for(o!==-1&&(r.position=o,Qr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)KHe(r);return r.documents}function sK(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var o=iK(t,r);if(typeof e!="function")return o;for(var a=0,n=o.length;a<n;a+=1)e(o[a])}function oK(t,e){var r=iK(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new JV("expected a single document in the stream, but found more")}}function JHe(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),sK(t,e,mf.extend({schema:zV},r))}function zHe(t,e){return oK(t,mf.extend({schema:zV},e))}gw.exports.loadAll=sK;gw.exports.load=oK;gw.exports.safeLoadAll=JHe;gw.exports.safeLoad=zHe});var kK=_((Vxt,tL)=>{"use strict";var mw=Z0(),yw=ym(),XHe=hw(),ZHe=Cm(),gK=Object.prototype.toString,dK=Object.prototype.hasOwnProperty,$He=9,dw=10,e6e=13,t6e=32,r6e=33,n6e=34,mK=35,i6e=37,s6e=38,o6e=39,a6e=42,yK=44,l6e=45,EK=58,c6e=61,u6e=62,A6e=63,f6e=64,CK=91,IK=93,p6e=96,wK=123,h6e=124,BK=125,mo={};mo[0]="\\0";mo[7]="\\a";mo[8]="\\b";mo[9]="\\t";mo[10]="\\n";mo[11]="\\v";mo[12]="\\f";mo[13]="\\r";mo[27]="\\e";mo[34]='\\"';mo[92]="\\\\";mo[133]="\\N";mo[160]="\\_";mo[8232]="\\L";mo[8233]="\\P";var g6e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function d6e(t,e){var r,o,a,n,u,A,p;if(e===null)return{};for(r={},o=Object.keys(e),a=0,n=o.length;a<n;a+=1)u=o[a],A=String(e[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),p=t.compiledTypeMap.fallback[u],p&&dK.call(p.styleAliases,A)&&(A=p.styleAliases[A]),r[u]=A;return r}function lK(t){var e,r,o;if(e=t.toString(16).toUpperCase(),t<=255)r="x",o=2;else if(t<=65535)r="u",o=4;else if(t<=4294967295)r="U",o=8;else throw new yw("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+mw.repeat("0",o-e.length)+e}function m6e(t){this.schema=t.schema||XHe,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=mw.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=d6e(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cK(t,e){for(var r=mw.repeat(" ",e),o=0,a=-1,n="",u,A=t.length;o<A;)a=t.indexOf(`
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new _He(t,e),o=t.indexOf("\0");for(o!==-1&&(r.position=o,kr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)JHe(r);return r.documents}function aV(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var o=oV(t,r);if(typeof e!="function")return o;for(var a=0,n=o.length;a<n;a+=1)e(o[a])}function lV(t,e){var r=oV(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new XK("expected a single document in the stream, but found more")}}function XHe(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),aV(t,e,mf.extend({schema:ZK},r))}function ZHe(t,e){return lV(t,mf.extend({schema:ZK},e))}mw.exports.loadAll=aV;mw.exports.load=lV;mw.exports.safeLoadAll=XHe;mw.exports.safeLoad=ZHe});var FV=_((Jxt,rN)=>{"use strict";var Ew=eg(),Cw=Cm(),$He=dw(),e6e=wm(),mV=Object.prototype.toString,yV=Object.prototype.hasOwnProperty,t6e=9,yw=10,r6e=13,n6e=32,i6e=33,s6e=34,EV=35,o6e=37,a6e=38,l6e=39,c6e=42,CV=44,u6e=45,IV=58,A6e=61,f6e=62,p6e=63,h6e=64,wV=91,BV=93,g6e=96,vV=123,d6e=124,DV=125,mo={};mo[0]="\\0";mo[7]="\\a";mo[8]="\\b";mo[9]="\\t";mo[10]="\\n";mo[11]="\\v";mo[12]="\\f";mo[13]="\\r";mo[27]="\\e";mo[34]='\\"';mo[92]="\\\\";mo[133]="\\N";mo[160]="\\_";mo[8232]="\\L";mo[8233]="\\P";var m6e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function y6e(t,e){var r,o,a,n,u,A,p;if(e===null)return{};for(r={},o=Object.keys(e),a=0,n=o.length;a<n;a+=1)u=o[a],A=String(e[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),p=t.compiledTypeMap.fallback[u],p&&yV.call(p.styleAliases,A)&&(A=p.styleAliases[A]),r[u]=A;return r}function uV(t){var e,r,o;if(e=t.toString(16).toUpperCase(),t<=255)r="x",o=2;else if(t<=65535)r="u",o=4;else if(t<=4294967295)r="U",o=8;else throw new Cw("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ew.repeat("0",o-e.length)+e}function E6e(t){this.schema=t.schema||$He,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Ew.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=y6e(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function AV(t,e){for(var r=Ew.repeat(" ",e),o=0,a=-1,n="",u,A=t.length;o<A;)a=t.indexOf(`
|
||||||
`,o),a===-1?(u=t.slice(o),o=A):(u=t.slice(o,a+1),o=a+1),u.length&&u!==`
|
`,o),a===-1?(u=t.slice(o),o=A):(u=t.slice(o,a+1),o=a+1),u.length&&u!==`
|
||||||
`&&(n+=r),n+=u;return n}function ZT(t,e){return`
|
`&&(n+=r),n+=u;return n}function $T(t,e){return`
|
||||||
`+mw.repeat(" ",t.indent*e)}function y6e(t,e){var r,o,a;for(r=0,o=t.implicitTypes.length;r<o;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function eL(t){return t===t6e||t===$He}function vm(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function E6e(t){return vm(t)&&!eL(t)&&t!==65279&&t!==e6e&&t!==dw}function uK(t,e){return vm(t)&&t!==65279&&t!==yK&&t!==CK&&t!==IK&&t!==wK&&t!==BK&&t!==EK&&(t!==mK||e&&E6e(e))}function C6e(t){return vm(t)&&t!==65279&&!eL(t)&&t!==l6e&&t!==A6e&&t!==EK&&t!==yK&&t!==CK&&t!==IK&&t!==wK&&t!==BK&&t!==mK&&t!==s6e&&t!==a6e&&t!==r6e&&t!==h6e&&t!==c6e&&t!==u6e&&t!==o6e&&t!==n6e&&t!==i6e&&t!==f6e&&t!==p6e}function vK(t){var e=/^\n* /;return e.test(t)}var DK=1,SK=2,PK=3,xK=4,wS=5;function I6e(t,e,r,o,a){var n,u,A,p=!1,h=!1,E=o!==-1,w=-1,D=C6e(t.charCodeAt(0))&&!eL(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),!vm(u))return wS;A=n>0?t.charCodeAt(n-1):null,D=D&&uK(u,A)}else{for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),u===dw)p=!0,E&&(h=h||n-w-1>o&&t[w+1]!==" ",w=n);else if(!vm(u))return wS;A=n>0?t.charCodeAt(n-1):null,D=D&&uK(u,A)}h=h||E&&n-w-1>o&&t[w+1]!==" "}return!p&&!h?D&&!a(t)?DK:SK:r>9&&vK(t)?wS:h?xK:PK}function w6e(t,e,r,o){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&g6e.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),u=o||t.flowLevel>-1&&r>=t.flowLevel;function A(p){return y6e(t,p)}switch(I6e(e,u,t.indent,n,A)){case DK:return e;case SK:return"'"+e.replace(/'/g,"''")+"'";case PK:return"|"+AK(e,t.indent)+fK(cK(e,a));case xK:return">"+AK(e,t.indent)+fK(cK(B6e(e,n),a));case wS:return'"'+v6e(e,n)+'"';default:throw new yw("impossible error: invalid scalar style")}}()}function AK(t,e){var r=vK(t)?String(e):"",o=t[t.length-1]===`
|
`+Ew.repeat(" ",t.indent*e)}function C6e(t,e){var r,o,a;for(r=0,o=t.implicitTypes.length;r<o;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function tN(t){return t===n6e||t===t6e}function Pm(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function I6e(t){return Pm(t)&&!tN(t)&&t!==65279&&t!==r6e&&t!==yw}function fV(t,e){return Pm(t)&&t!==65279&&t!==CV&&t!==wV&&t!==BV&&t!==vV&&t!==DV&&t!==IV&&(t!==EV||e&&I6e(e))}function w6e(t){return Pm(t)&&t!==65279&&!tN(t)&&t!==u6e&&t!==p6e&&t!==IV&&t!==CV&&t!==wV&&t!==BV&&t!==vV&&t!==DV&&t!==EV&&t!==a6e&&t!==c6e&&t!==i6e&&t!==d6e&&t!==A6e&&t!==f6e&&t!==l6e&&t!==s6e&&t!==o6e&&t!==h6e&&t!==g6e}function PV(t){var e=/^\n* /;return e.test(t)}var SV=1,xV=2,bV=3,QV=4,wP=5;function B6e(t,e,r,o,a){var n,u,A,p=!1,h=!1,E=o!==-1,w=-1,D=w6e(t.charCodeAt(0))&&!tN(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),!Pm(u))return wP;A=n>0?t.charCodeAt(n-1):null,D=D&&fV(u,A)}else{for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),u===yw)p=!0,E&&(h=h||n-w-1>o&&t[w+1]!==" ",w=n);else if(!Pm(u))return wP;A=n>0?t.charCodeAt(n-1):null,D=D&&fV(u,A)}h=h||E&&n-w-1>o&&t[w+1]!==" "}return!p&&!h?D&&!a(t)?SV:xV:r>9&&PV(t)?wP:h?QV:bV}function v6e(t,e,r,o){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&m6e.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),u=o||t.flowLevel>-1&&r>=t.flowLevel;function A(p){return C6e(t,p)}switch(B6e(e,u,t.indent,n,A)){case SV:return e;case xV:return"'"+e.replace(/'/g,"''")+"'";case bV:return"|"+pV(e,t.indent)+hV(AV(e,a));case QV:return">"+pV(e,t.indent)+hV(AV(D6e(e,n),a));case wP:return'"'+P6e(e,n)+'"';default:throw new Cw("impossible error: invalid scalar style")}}()}function pV(t,e){var r=PV(t)?String(e):"",o=t[t.length-1]===`
|
||||||
`,a=o&&(t[t.length-2]===`
|
`,a=o&&(t[t.length-2]===`
|
||||||
`||t===`
|
`||t===`
|
||||||
`),n=a?"+":o?"":"-";return r+n+`
|
`),n=a?"+":o?"":"-";return r+n+`
|
||||||
`}function fK(t){return t[t.length-1]===`
|
`}function hV(t){return t[t.length-1]===`
|
||||||
`?t.slice(0,-1):t}function B6e(t,e){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=t.indexOf(`
|
`?t.slice(0,-1):t}function D6e(t,e){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=t.indexOf(`
|
||||||
`);return h=h!==-1?h:t.length,r.lastIndex=h,pK(t.slice(0,h),e)}(),a=t[0]===`
|
`);return h=h!==-1?h:t.length,r.lastIndex=h,gV(t.slice(0,h),e)}(),a=t[0]===`
|
||||||
`||t[0]===" ",n,u;u=r.exec(t);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?`
|
`||t[0]===" ",n,u;u=r.exec(t);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?`
|
||||||
`:"")+pK(p,e),a=n}return o}function pK(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(t);)A=o.index,A-a>e&&(n=u>a?u:A,p+=`
|
`:"")+gV(p,e),a=n}return o}function gV(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(t);)A=o.index,A-a>e&&(n=u>a?u:A,p+=`
|
||||||
`+t.slice(a,n),a=n+1),u=A;return p+=`
|
`+t.slice(a,n),a=n+1),u=A;return p+=`
|
||||||
`,t.length-a>e&&u>a?p+=t.slice(a,u)+`
|
`,t.length-a>e&&u>a?p+=t.slice(a,u)+`
|
||||||
`+t.slice(u+1):p+=t.slice(a),p.slice(1)}function v6e(t){for(var e="",r,o,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)){e+=lK((r-55296)*1024+o-56320+65536),n++;continue}a=mo[r],e+=!a&&vm(r)?t[n]:a||lK(r)}return e}function D6e(t,e,r){var o="",a=t.tag,n,u;for(n=0,u=r.length;n<u;n+=1)ng(t,e,r[n],!1,!1)&&(n!==0&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function S6e(t,e,r,o){var a="",n=t.tag,u,A;for(u=0,A=r.length;u<A;u+=1)ng(t,e+1,r[u],!0,!0)&&((!o||u!==0)&&(a+=ZT(t,e)),t.dump&&dw===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}function P6e(t,e,r){var o="",a=t.tag,n=Object.keys(r),u,A,p,h,E;for(u=0,A=n.length;u<A;u+=1)E="",u!==0&&(E+=", "),t.condenseFlow&&(E+='"'),p=n[u],h=r[p],ng(t,e,p,!1,!1)&&(t.dump.length>1024&&(E+="? "),E+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),ng(t,e,h,!1,!1)&&(E+=t.dump,o+=E));t.tag=a,t.dump="{"+o+"}"}function x6e(t,e,r,o){var a="",n=t.tag,u=Object.keys(r),A,p,h,E,w,D;if(t.sortKeys===!0)u.sort();else if(typeof t.sortKeys=="function")u.sort(t.sortKeys);else if(t.sortKeys)throw new yw("sortKeys must be a boolean or a function");for(A=0,p=u.length;A<p;A+=1)D="",(!o||A!==0)&&(D+=ZT(t,e)),h=u[A],E=r[h],ng(t,e+1,h,!0,!0,!0)&&(w=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,w&&(t.dump&&dw===t.dump.charCodeAt(0)?D+="?":D+="? "),D+=t.dump,w&&(D+=ZT(t,e)),ng(t,e+1,E,!0,w)&&(t.dump&&dw===t.dump.charCodeAt(0)?D+=":":D+=": ",D+=t.dump,a+=D));t.tag=n,t.dump=a||"{}"}function hK(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof e=="object"&&e instanceof A.instanceOf)&&(!A.predicate||A.predicate(e))){if(t.tag=r?A.tag:"?",A.represent){if(p=t.styleMap[A.tag]||A.defaultStyle,gK.call(A.represent)==="[object Function]")o=A.represent(e,p);else if(dK.call(A.represent,p))o=A.represent[p](e,p);else throw new yw("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function ng(t,e,r,o,a,n){t.tag=null,t.dump=r,hK(t,r,!1)||hK(t,r,!0);var u=gK.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(x6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(P6e(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(S6e(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(D6e(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&w6e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new yw("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function b6e(t,e){var r=[],o=[],a,n;for($T(t,r,o),a=0,n=o.length;a<n;a+=1)e.duplicates.push(r[o[a]]);e.usedDuplicates=new Array(n)}function $T(t,e,r){var o,a,n;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)$T(t[a],e,r);else for(o=Object.keys(t),a=0,n=o.length;a<n;a+=1)$T(t[o[a]],e,r)}function bK(t,e){e=e||{};var r=new m6e(e);return r.noRefs||b6e(t,r),ng(r,0,t,!0,!0)?r.dump+`
|
`+t.slice(u+1):p+=t.slice(a),p.slice(1)}function P6e(t){for(var e="",r,o,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)){e+=uV((r-55296)*1024+o-56320+65536),n++;continue}a=mo[r],e+=!a&&Pm(r)?t[n]:a||uV(r)}return e}function S6e(t,e,r){var o="",a=t.tag,n,u;for(n=0,u=r.length;n<u;n+=1)sg(t,e,r[n],!1,!1)&&(n!==0&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function x6e(t,e,r,o){var a="",n=t.tag,u,A;for(u=0,A=r.length;u<A;u+=1)sg(t,e+1,r[u],!0,!0)&&((!o||u!==0)&&(a+=$T(t,e)),t.dump&&yw===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}function b6e(t,e,r){var o="",a=t.tag,n=Object.keys(r),u,A,p,h,E;for(u=0,A=n.length;u<A;u+=1)E="",u!==0&&(E+=", "),t.condenseFlow&&(E+='"'),p=n[u],h=r[p],sg(t,e,p,!1,!1)&&(t.dump.length>1024&&(E+="? "),E+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),sg(t,e,h,!1,!1)&&(E+=t.dump,o+=E));t.tag=a,t.dump="{"+o+"}"}function Q6e(t,e,r,o){var a="",n=t.tag,u=Object.keys(r),A,p,h,E,w,D;if(t.sortKeys===!0)u.sort();else if(typeof t.sortKeys=="function")u.sort(t.sortKeys);else if(t.sortKeys)throw new Cw("sortKeys must be a boolean or a function");for(A=0,p=u.length;A<p;A+=1)D="",(!o||A!==0)&&(D+=$T(t,e)),h=u[A],E=r[h],sg(t,e+1,h,!0,!0,!0)&&(w=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,w&&(t.dump&&yw===t.dump.charCodeAt(0)?D+="?":D+="? "),D+=t.dump,w&&(D+=$T(t,e)),sg(t,e+1,E,!0,w)&&(t.dump&&yw===t.dump.charCodeAt(0)?D+=":":D+=": ",D+=t.dump,a+=D));t.tag=n,t.dump=a||"{}"}function dV(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof e=="object"&&e instanceof A.instanceOf)&&(!A.predicate||A.predicate(e))){if(t.tag=r?A.tag:"?",A.represent){if(p=t.styleMap[A.tag]||A.defaultStyle,mV.call(A.represent)==="[object Function]")o=A.represent(e,p);else if(yV.call(A.represent,p))o=A.represent[p](e,p);else throw new Cw("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function sg(t,e,r,o,a,n){t.tag=null,t.dump=r,dV(t,r,!1)||dV(t,r,!0);var u=mV.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(Q6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(b6e(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(x6e(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(S6e(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&v6e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new Cw("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function k6e(t,e){var r=[],o=[],a,n;for(eN(t,r,o),a=0,n=o.length;a<n;a+=1)e.duplicates.push(r[o[a]]);e.usedDuplicates=new Array(n)}function eN(t,e,r){var o,a,n;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)eN(t[a],e,r);else for(o=Object.keys(t),a=0,n=o.length;a<n;a+=1)eN(t[o[a]],e,r)}function kV(t,e){e=e||{};var r=new E6e(e);return r.noRefs||k6e(t,r),sg(r,0,t,!0,!0)?r.dump+`
|
||||||
`:""}function k6e(t,e){return bK(t,mw.extend({schema:ZHe},e))}tL.exports.dump=bK;tL.exports.safeDump=k6e});var FK=_((Kxt,Fi)=>{"use strict";var BS=aK(),QK=kK();function vS(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Fi.exports.Type=as();Fi.exports.Schema=$0();Fi.exports.FAILSAFE_SCHEMA=dS();Fi.exports.JSON_SCHEMA=YT();Fi.exports.CORE_SCHEMA=VT();Fi.exports.DEFAULT_SAFE_SCHEMA=Cm();Fi.exports.DEFAULT_FULL_SCHEMA=hw();Fi.exports.load=BS.load;Fi.exports.loadAll=BS.loadAll;Fi.exports.safeLoad=BS.safeLoad;Fi.exports.safeLoadAll=BS.safeLoadAll;Fi.exports.dump=QK.dump;Fi.exports.safeDump=QK.safeDump;Fi.exports.YAMLException=ym();Fi.exports.MINIMAL_SCHEMA=dS();Fi.exports.SAFE_SCHEMA=Cm();Fi.exports.DEFAULT_SCHEMA=hw();Fi.exports.scan=vS("scan");Fi.exports.parse=vS("parse");Fi.exports.compose=vS("compose");Fi.exports.addConstructor=vS("addConstructor")});var TK=_((Jxt,RK)=>{"use strict";var Q6e=FK();RK.exports=Q6e});var NK=_((zxt,LK)=>{"use strict";function F6e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function ig(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ig)}F6e(ig,Error);ig.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",w;for(w=0;w<h.parts.length;w++)E+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function u(h){return r[h.type](h)}function A(h){var E=new Array(h.length),w,D;for(w=0;w<h.length;w++)E[w]=u(h[w]);if(E.sort(),E.length>0){for(w=1,D=1;w<E.length;w++)E[w-1]!==E[w]&&(E[D]=E[w],D++);E.length=D}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function R6e(t,e){e=e!==void 0?e:{};var r={},o={Start:Bl},a=Bl,n=function(ee){return[].concat(...ee)},u="-",A=un("-",!1),p=function(ee){return ee},h=function(ee){return Object.assign({},...ee)},E="#",w=un("#",!1),D=Ec(),b=function(){return{}},C=":",T=un(":",!1),N=function(ee,ye){return{[ee]:ye}},U=",",J=un(",",!1),te=function(ee,ye){return ye},le=function(ee,ye,Ne){return Object.assign({},...[ee].concat(ye).map(gt=>({[gt]:Ne})))},ce=function(ee){return ee},ue=function(ee){return ee},Ie=oa("correct indentation"),he=" ",De=un(" ",!1),Ee=function(ee){return ee.length===ar*vt},g=function(ee){return ee.length===(ar+1)*vt},me=function(){return ar++,!0},Ce=function(){return ar--,!0},fe=function(){return Lo()},ie=oa("pseudostring"),Z=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,Se=qn(["\r",`
|
`:""}function F6e(t,e){return kV(t,Ew.extend({schema:e6e},e))}rN.exports.dump=kV;rN.exports.safeDump=F6e});var TV=_((Xxt,Fi)=>{"use strict";var BP=cV(),RV=FV();function vP(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Fi.exports.Type=as();Fi.exports.Schema=tg();Fi.exports.FAILSAFE_SCHEMA=dP();Fi.exports.JSON_SCHEMA=KT();Fi.exports.CORE_SCHEMA=VT();Fi.exports.DEFAULT_SAFE_SCHEMA=wm();Fi.exports.DEFAULT_FULL_SCHEMA=dw();Fi.exports.load=BP.load;Fi.exports.loadAll=BP.loadAll;Fi.exports.safeLoad=BP.safeLoad;Fi.exports.safeLoadAll=BP.safeLoadAll;Fi.exports.dump=RV.dump;Fi.exports.safeDump=RV.safeDump;Fi.exports.YAMLException=Cm();Fi.exports.MINIMAL_SCHEMA=dP();Fi.exports.SAFE_SCHEMA=wm();Fi.exports.DEFAULT_SCHEMA=dw();Fi.exports.scan=vP("scan");Fi.exports.parse=vP("parse");Fi.exports.compose=vP("compose");Fi.exports.addConstructor=vP("addConstructor")});var LV=_((Zxt,NV)=>{"use strict";var R6e=TV();NV.exports=R6e});var MV=_(($xt,OV)=>{"use strict";function T6e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function og(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,og)}T6e(og,Error);og.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",w;for(w=0;w<h.parts.length;w++)E+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(E){return"\\x0"+o(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+o(E)})}function u(h){return r[h.type](h)}function A(h){var E=new Array(h.length),w,D;for(w=0;w<h.length;w++)E[w]=u(h[w]);if(E.sort(),E.length>0){for(w=1,D=1;w<E.length;w++)E[w-1]!==E[w]&&(E[D]=E[w],D++);E.length=D}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function N6e(t,e){e=e!==void 0?e:{};var r={},o={Start:Bl},a=Bl,n=function(ee){return[].concat(...ee)},u="-",A=un("-",!1),p=function(ee){return ee},h=function(ee){return Object.assign({},...ee)},E="#",w=un("#",!1),D=Ec(),b=function(){return{}},C=":",T=un(":",!1),L=function(ee,Ee){return{[ee]:Ee}},U=",",z=un(",",!1),te=function(ee,Ee){return Ee},le=function(ee,Ee,Le){return Object.assign({},...[ee].concat(Ee).map(ht=>({[ht]:Le})))},de=function(ee){return ee},ce=function(ee){return ee},me=oa("correct indentation"),pe=" ",ve=un(" ",!1),Ie=function(ee){return ee.length===ar*vt},g=function(ee){return ee.length===(ar+1)*vt},Ce=function(){return ar++,!0},ye=function(){return ar--,!0},Ae=function(){return No()},ie=oa("pseudostring"),Z=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,Pe=qn(["\r",`
|
||||||
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Re=/^[^\r\n\t ,\][{}:#"']/,ht=qn(["\r",`
|
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Re=/^[^\r\n\t ,\][{}:#"']/,gt=qn(["\r",`
|
||||||
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),q=function(){return Lo().replace(/^ *| *$/g,"")},nt="--",Le=un("--",!1),Te=/^[a-zA-Z\/0-9]/,ke=qn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ke=/^[^\r\n\t :,]/,xe=qn(["\r",`
|
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),q=function(){return No().replace(/^ *| *$/g,"")},rt="--",Te=un("--",!1),Ne=/^[a-zA-Z\/0-9]/,xe=qn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ye=/^[^\r\n\t :,]/,Qe=qn(["\r",`
|
||||||
`," "," ",":",","],!0,!1),tt="null",He=un("null",!1),x=function(){return null},I="true",P=un("true",!1),y=function(){return!0},R="false",z=un("false",!1),X=function(){return!1},$=oa("string"),se='"',be=un('"',!1),Fe=function(){return""},lt=function(ee){return ee},Et=function(ee){return ee.join("")},qt=/^[^"\\\0-\x1F\x7F]/,nr=qn(['"',"\\",["\0",""],"\x7F"],!0,!1),Pt='\\"',cn=un('\\"',!1),Sr=function(){return'"'},yr="\\\\",Rr=un("\\\\",!1),Xr=function(){return"\\"},$n="\\/",Xs=un("\\/",!1),Hi=function(){return"/"},Qs="\\b",Zs=un("\\b",!1),bi=function(){return"\b"},Fs="\\f",$s=un("\\f",!1),PA=function(){return"\f"},gu="\\n",op=un("\\n",!1),ap=function(){return`
|
`," "," ",":",","],!0,!1),it="null",Ue=un("null",!1),x=function(){return null},I="true",S=un("true",!1),y=function(){return!0},R="false",J=un("false",!1),X=function(){return!1},$=oa("string"),se='"',be=un('"',!1),Fe=function(){return""},lt=function(ee){return ee},Et=function(ee){return ee.join("")},qt=/^[^"\\\0-\x1F\x7F]/,nr=qn(['"',"\\",["\0",""],"\x7F"],!0,!1),St='\\"',cn=un('\\"',!1),Pr=function(){return'"'},yr="\\\\",Rr=un("\\\\",!1),Xr=function(){return"\\"},$n="\\/",Xs=un("\\/",!1),Hi=function(){return"/"},ks="\\b",Zs=un("\\b",!1),bi=function(){return"\b"},Fs="\\f",$s=un("\\f",!1),SA=function(){return"\f"},gu="\\n",ap=un("\\n",!1),lp=function(){return`
|
||||||
`},Rs="\\r",Nn=un("\\r",!1),hs=function(){return"\r"},Ts="\\t",pc=un("\\t",!1),hc=function(){return" "},gc="\\u",xA=un("\\u",!1),bA=function(ee,ye,Ne,gt){return String.fromCharCode(parseInt(`0x${ee}${ye}${Ne}${gt}`))},Ro=/^[0-9a-fA-F]/,To=qn([["0","9"],["a","f"],["A","F"]],!1,!1),kA=oa("blank space"),pr=/^[ \t]/,Me=qn([" "," "],!1,!1),ia=oa("white space"),dc=/^[ \t\n\r]/,Er=qn([" "," ",`
|
`},Rs="\\r",Ln=un("\\r",!1),hs=function(){return"\r"},Ts="\\t",pc=un("\\t",!1),hc=function(){return" "},gc="\\u",xA=un("\\u",!1),bA=function(ee,Ee,Le,ht){return String.fromCharCode(parseInt(`0x${ee}${Ee}${Le}${ht}`))},Ro=/^[0-9a-fA-F]/,To=qn([["0","9"],["a","f"],["A","F"]],!1,!1),QA=oa("blank space"),pr=/^[ \t]/,Me=qn([" "," "],!1,!1),ia=oa("white space"),dc=/^[ \t\n\r]/,Er=qn([" "," ",`
|
||||||
`,"\r"],!1,!1),du=`\r
|
`,"\r"],!1,!1),du=`\r
|
||||||
`,QA=un(`\r
|
`,kA=un(`\r
|
||||||
`,!1),FA=`
|
`,!1),FA=`
|
||||||
`,mc=un(`
|
`,mc=un(`
|
||||||
`,!1),yc="\r",Il=un("\r",!1),we=0,Tt=0,wl=[{line:1,column:1}],Bi=0,Ls=[],Ft=0,Bn;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function Lo(){return t.substring(Tt,we)}function ki(){return la(Tt,we)}function vi(ee,ye){throw ye=ye!==void 0?ye:la(Tt,we),mu([oa(ee)],t.substring(Tt,we),ye)}function sa(ee,ye){throw ye=ye!==void 0?ye:la(Tt,we),ca(ee,ye)}function un(ee,ye){return{type:"literal",text:ee,ignoreCase:ye}}function qn(ee,ye,Ne){return{type:"class",parts:ee,inverted:ye,ignoreCase:Ne}}function Ec(){return{type:"any"}}function lp(){return{type:"end"}}function oa(ee){return{type:"other",description:ee}}function aa(ee){var ye=wl[ee],Ne;if(ye)return ye;for(Ne=ee-1;!wl[Ne];)Ne--;for(ye=wl[Ne],ye={line:ye.line,column:ye.column};Ne<ee;)t.charCodeAt(Ne)===10?(ye.line++,ye.column=1):ye.column++,Ne++;return wl[ee]=ye,ye}function la(ee,ye){var Ne=aa(ee),gt=aa(ye);return{start:{offset:ee,line:Ne.line,column:Ne.column},end:{offset:ye,line:gt.line,column:gt.column}}}function Ze(ee){we<Bi||(we>Bi&&(Bi=we,Ls=[]),Ls.push(ee))}function ca(ee,ye){return new ig(ee,null,null,ye)}function mu(ee,ye,Ne){return new ig(ig.buildMessage(ee,ye),ee,ye,Ne)}function Bl(){var ee;return ee=RA(),ee}function dn(){var ee,ye,Ne;for(ee=we,ye=[],Ne=No();Ne!==r;)ye.push(Ne),Ne=No();return ye!==r&&(Tt=ee,ye=n(ye)),ee=ye,ee}function No(){var ee,ye,Ne,gt,mt;return ee=we,ye=qa(),ye!==r?(t.charCodeAt(we)===45?(Ne=u,we++):(Ne=r,Ft===0&&Ze(A)),Ne!==r?(gt=Dn(),gt!==r?(mt=Oo(),mt!==r?(Tt=ee,ye=p(mt),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee}function RA(){var ee,ye,Ne;for(ee=we,ye=[],Ne=TA();Ne!==r;)ye.push(Ne),Ne=TA();return ye!==r&&(Tt=ee,ye=h(ye)),ee=ye,ee}function TA(){var ee,ye,Ne,gt,mt,Dt,er,sn,ei;if(ee=we,ye=Dn(),ye===r&&(ye=null),ye!==r){if(Ne=we,t.charCodeAt(we)===35?(gt=E,we++):(gt=r,Ft===0&&Ze(w)),gt!==r){if(mt=[],Dt=we,er=we,Ft++,sn=st(),Ft--,sn===r?er=void 0:(we=er,er=r),er!==r?(t.length>we?(sn=t.charAt(we),we++):(sn=r,Ft===0&&Ze(D)),sn!==r?(er=[er,sn],Dt=er):(we=Dt,Dt=r)):(we=Dt,Dt=r),Dt!==r)for(;Dt!==r;)mt.push(Dt),Dt=we,er=we,Ft++,sn=st(),Ft--,sn===r?er=void 0:(we=er,er=r),er!==r?(t.length>we?(sn=t.charAt(we),we++):(sn=r,Ft===0&&Ze(D)),sn!==r?(er=[er,sn],Dt=er):(we=Dt,Dt=r)):(we=Dt,Dt=r);else mt=r;mt!==r?(gt=[gt,mt],Ne=gt):(we=Ne,Ne=r)}else we=Ne,Ne=r;if(Ne===r&&(Ne=null),Ne!==r){if(gt=[],mt=Je(),mt!==r)for(;mt!==r;)gt.push(mt),mt=Je();else gt=r;gt!==r?(Tt=ee,ye=b(),ee=ye):(we=ee,ee=r)}else we=ee,ee=r}else we=ee,ee=r;if(ee===r&&(ee=we,ye=qa(),ye!==r?(Ne=ua(),Ne!==r?(gt=Dn(),gt===r&&(gt=null),gt!==r?(t.charCodeAt(we)===58?(mt=C,we++):(mt=r,Ft===0&&Ze(T)),mt!==r?(Dt=Dn(),Dt===r&&(Dt=null),Dt!==r?(er=Oo(),er!==r?(Tt=ee,ye=N(Ne,er),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r&&(ee=we,ye=qa(),ye!==r?(Ne=qi(),Ne!==r?(gt=Dn(),gt===r&&(gt=null),gt!==r?(t.charCodeAt(we)===58?(mt=C,we++):(mt=r,Ft===0&&Ze(T)),mt!==r?(Dt=Dn(),Dt===r&&(Dt=null),Dt!==r?(er=Oo(),er!==r?(Tt=ee,ye=N(Ne,er),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r))){if(ee=we,ye=qa(),ye!==r)if(Ne=qi(),Ne!==r)if(gt=Dn(),gt!==r)if(mt=Cc(),mt!==r){if(Dt=[],er=Je(),er!==r)for(;er!==r;)Dt.push(er),er=Je();else Dt=r;Dt!==r?(Tt=ee,ye=N(Ne,mt),ee=ye):(we=ee,ee=r)}else we=ee,ee=r;else we=ee,ee=r;else we=ee,ee=r;else we=ee,ee=r;if(ee===r)if(ee=we,ye=qa(),ye!==r)if(Ne=qi(),Ne!==r){if(gt=[],mt=we,Dt=Dn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(we)===44?(er=U,we++):(er=r,Ft===0&&Ze(J)),er!==r?(sn=Dn(),sn===r&&(sn=null),sn!==r?(ei=qi(),ei!==r?(Tt=mt,Dt=te(Ne,ei),mt=Dt):(we=mt,mt=r)):(we=mt,mt=r)):(we=mt,mt=r)):(we=mt,mt=r),mt!==r)for(;mt!==r;)gt.push(mt),mt=we,Dt=Dn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(we)===44?(er=U,we++):(er=r,Ft===0&&Ze(J)),er!==r?(sn=Dn(),sn===r&&(sn=null),sn!==r?(ei=qi(),ei!==r?(Tt=mt,Dt=te(Ne,ei),mt=Dt):(we=mt,mt=r)):(we=mt,mt=r)):(we=mt,mt=r)):(we=mt,mt=r);else gt=r;gt!==r?(mt=Dn(),mt===r&&(mt=null),mt!==r?(t.charCodeAt(we)===58?(Dt=C,we++):(Dt=r,Ft===0&&Ze(T)),Dt!==r?(er=Dn(),er===r&&(er=null),er!==r?(sn=Oo(),sn!==r?(Tt=ee,ye=le(Ne,gt,sn),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)}else we=ee,ee=r;else we=ee,ee=r}return ee}function Oo(){var ee,ye,Ne,gt,mt,Dt,er;if(ee=we,ye=we,Ft++,Ne=we,gt=st(),gt!==r?(mt=Ot(),mt!==r?(t.charCodeAt(we)===45?(Dt=u,we++):(Dt=r,Ft===0&&Ze(A)),Dt!==r?(er=Dn(),er!==r?(gt=[gt,mt,Dt,er],Ne=gt):(we=Ne,Ne=r)):(we=Ne,Ne=r)):(we=Ne,Ne=r)):(we=Ne,Ne=r),Ft--,Ne!==r?(we=ye,ye=void 0):ye=r,ye!==r?(Ne=Je(),Ne!==r?(gt=vn(),gt!==r?(mt=dn(),mt!==r?(Dt=Mo(),Dt!==r?(Tt=ee,ye=ce(mt),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r&&(ee=we,ye=st(),ye!==r?(Ne=vn(),Ne!==r?(gt=RA(),gt!==r?(mt=Mo(),mt!==r?(Tt=ee,ye=ce(gt),ee=ye):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r))if(ee=we,ye=vl(),ye!==r){if(Ne=[],gt=Je(),gt!==r)for(;gt!==r;)Ne.push(gt),gt=Je();else Ne=r;Ne!==r?(Tt=ee,yeLine truncated
|
`,!1),yc="\r",Il=un("\r",!1),we=0,Tt=0,wl=[{line:1,column:1}],Bi=0,Ns=[],Ft=0,Bn;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function No(){return t.substring(Tt,we)}function Qi(){return la(Tt,we)}function vi(ee,Ee){throw Ee=Ee!==void 0?Ee:la(Tt,we),mu([oa(ee)],t.substring(Tt,we),Ee)}function sa(ee,Ee){throw Ee=Ee!==void 0?Ee:la(Tt,we),ca(ee,Ee)}function un(ee,Ee){return{type:"literal",text:ee,ignoreCase:Ee}}function qn(ee,Ee,Le){return{type:"class",parts:ee,inverted:Ee,ignoreCase:Le}}function Ec(){return{type:"any"}}function cp(){return{type:"end"}}function oa(ee){return{type:"other",description:ee}}function aa(ee){var Ee=wl[ee],Le;if(Ee)return Ee;for(Le=ee-1;!wl[Le];)Le--;for(Ee=wl[Le],Ee={line:Ee.line,column:Ee.column};Le<ee;)t.charCodeAt(Le)===10?(Ee.line++,Ee.column=1):Ee.column++,Le++;return wl[ee]=Ee,Ee}function la(ee,Ee){var Le=aa(ee),ht=aa(Ee);return{start:{offset:ee,line:Le.line,column:Le.column},end:{offset:Ee,line:ht.line,column:ht.column}}}function Ze(ee){we<Bi||(we>Bi&&(Bi=we,Ns=[]),Ns.push(ee))}function ca(ee,Ee){return new og(ee,null,null,Ee)}function mu(ee,Ee,Le){return new og(og.buildMessage(ee,Ee),ee,Ee,Le)}function Bl(){var ee;return ee=RA(),ee}function dn(){var ee,Ee,Le;for(ee=we,Ee=[],Le=Lo();Le!==r;)Ee.push(Le),Le=Lo();return Ee!==r&&(Tt=ee,Ee=n(Ee)),ee=Ee,ee}function Lo(){var ee,Ee,Le,ht,mt;return ee=we,Ee=qa(),Ee!==r?(t.charCodeAt(we)===45?(Le=u,we++):(Le=r,Ft===0&&Ze(A)),Le!==r?(ht=Dn(),ht!==r?(mt=Oo(),mt!==r?(Tt=ee,Ee=p(mt),ee=Ee):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee}function RA(){var ee,Ee,Le;for(ee=we,Ee=[],Le=TA();Le!==r;)Ee.push(Le),Le=TA();return Ee!==r&&(Tt=ee,Ee=h(Ee)),ee=Ee,ee}function TA(){var ee,Ee,Le,ht,mt,Dt,er,sn,ei;if(ee=we,Ee=Dn(),Ee===r&&(Ee=null),Ee!==r){if(Le=we,t.charCodeAt(we)===35?(ht=E,we++):(ht=r,Ft===0&&Ze(w)),ht!==r){if(mt=[],Dt=we,er=we,Ft++,sn=st(),Ft--,sn===r?er=void 0:(we=er,er=r),er!==r?(t.length>we?(sn=t.charAt(we),we++):(sn=r,Ft===0&&Ze(D)),sn!==r?(er=[er,sn],Dt=er):(we=Dt,Dt=r)):(we=Dt,Dt=r),Dt!==r)for(;Dt!==r;)mt.push(Dt),Dt=we,er=we,Ft++,sn=st(),Ft--,sn===r?er=void 0:(we=er,er=r),er!==r?(t.length>we?(sn=t.charAt(we),we++):(sn=r,Ft===0&&Ze(D)),sn!==r?(er=[er,sn],Dt=er):(we=Dt,Dt=r)):(we=Dt,Dt=r);else mt=r;mt!==r?(ht=[ht,mt],Le=ht):(we=Le,Le=r)}else we=Le,Le=r;if(Le===r&&(Le=null),Le!==r){if(ht=[],mt=ze(),mt!==r)for(;mt!==r;)ht.push(mt),mt=ze();else ht=r;ht!==r?(Tt=ee,Ee=b(),ee=Ee):(we=ee,ee=r)}else we=ee,ee=r}else we=ee,ee=r;if(ee===r&&(ee=we,Ee=qa(),Ee!==r?(Le=ua(),Le!==r?(ht=Dn(),ht===r&&(ht=null),ht!==r?(t.charCodeAt(we)===58?(mt=C,we++):(mt=r,Ft===0&&Ze(T)),mt!==r?(Dt=Dn(),Dt===r&&(Dt=null),Dt!==r?(er=Oo(),er!==r?(Tt=ee,Ee=L(Le,er),ee=Ee):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r&&(ee=we,Ee=qa(),Ee!==r?(Le=qi(),Le!==r?(ht=Dn(),ht===r&&(ht=null),ht!==r?(t.charCodeAt(we)===58?(mt=C,we++):(mt=r,Ft===0&&Ze(T)),mt!==r?(Dt=Dn(),Dt===r&&(Dt=null),Dt!==r?(er=Oo(),er!==r?(Tt=ee,Ee=L(Le,er),ee=Ee):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r))){if(ee=we,Ee=qa(),Ee!==r)if(Le=qi(),Le!==r)if(ht=Dn(),ht!==r)if(mt=Cc(),mt!==r){if(Dt=[],er=ze(),er!==r)for(;er!==r;)Dt.push(er),er=ze();else Dt=r;Dt!==r?(Tt=ee,Ee=L(Le,mt),ee=Ee):(we=ee,ee=r)}else we=ee,ee=r;else we=ee,ee=r;else we=ee,ee=r;else we=ee,ee=r;if(ee===r)if(ee=we,Ee=qa(),Ee!==r)if(Le=qi(),Le!==r){if(ht=[],mt=we,Dt=Dn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(we)===44?(er=U,we++):(er=r,Ft===0&&Ze(z)),er!==r?(sn=Dn(),sn===r&&(sn=null),sn!==r?(ei=qi(),ei!==r?(Tt=mt,Dt=te(Le,ei),mt=Dt):(we=mt,mt=r)):(we=mt,mt=r)):(we=mt,mt=r)):(we=mt,mt=r),mt!==r)for(;mt!==r;)ht.push(mt),mt=we,Dt=Dn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(we)===44?(er=U,we++):(er=r,Ft===0&&Ze(z)),er!==r?(sn=Dn(),sn===r&&(sn=null),sn!==r?(ei=qi(),ei!==r?(Tt=mt,Dt=te(Le,ei),mt=Dt):(we=mt,mt=r)):(we=mt,mt=r)):(we=mt,mt=r)):(we=mt,mt=r);else ht=r;ht!==r?(mt=Dn(),mt===r&&(mt=null),mt!==r?(t.charCodeAt(we)===58?(Dt=C,we++):(Dt=r,Ft===0&&Ze(T)),Dt!==r?(er=Dn(),er===r&&(er=null),er!==r?(sn=Oo(),sn!==r?(Tt=ee,Ee=le(Le,ht,sn),ee=Ee):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)}else we=ee,ee=r;else we=ee,ee=r}return ee}function Oo(){var ee,Ee,Le,ht,mt,Dt,er;if(ee=we,Ee=we,Ft++,Le=we,ht=st(),ht!==r?(mt=Ot(),mt!==r?(t.charCodeAt(we)===45?(Dt=u,we++):(Dt=r,Ft===0&&Ze(A)),Dt!==r?(er=Dn(),er!==r?(ht=[ht,mt,Dt,er],Le=ht):(we=Le,Le=r)):(we=Le,Le=r)):(we=Le,Le=r)):(we=Le,Le=r),Ft--,Le!==r?(we=Ee,Ee=void 0):Ee=r,Ee!==r?(Le=ze(),Le!==r?(ht=vn(),ht!==r?(mt=dn(),mt!==r?(Dt=Mo(),Dt!==r?(Tt=ee,Ee=de(mt),ee=Ee):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r&&(ee=we,Ee=st(),Ee!==r?(Le=vn(),Le!==r?(ht=RA(),ht!==r?(mt=Mo(),mt!==r?(Tt=ee,Ee=de(ht),ee=Ee):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r)):(we=ee,ee=r),ee===r))if(ee=we,Ee=vl(),Ee!==r){if(Le=[],ht=ze(),ht!==r)for(;ht!==r;)Le.push(ht),ht=ze();else Le=r;Le!==r?(Tt=ee,EeLine truncated
|
||||||
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
|
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
|
||||||
`;if(typeof t=="string")return`${MK(t)}
|
`;if(typeof t=="string")return`${_V(t)}
|
||||||
`;if(Array.isArray(t)){if(t.length===0)return`[]
|
`;if(Array.isArray(t)){if(t.length===0)return`[]
|
||||||
`;let o=" ".repeat(e);return`
|
`;let o=" ".repeat(e);return`
|
||||||
${t.map(n=>`${o}- ${rL(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[o,a]=t instanceof DS?[t.data,!1]:[t,!0],n=" ".repeat(e),u=Object.keys(o);a&&u.sort((p,h)=>{let E=OK.indexOf(p),w=OK.indexOf(h);return E===-1&&w===-1?p<h?-1:p>h?1:0:E!==-1&&w===-1?-1:E===-1&&w!==-1?1:E-w});let A=u.filter(p=>!_K(o[p])).map((p,h)=>{let E=o[p],w=MK(p),D=rL(E,e+1,!0),b=h>0||r?n:"",C=w.length>1024?`? ${w}
|
${t.map(n=>`${o}- ${nN(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[o,a]=t instanceof DP?[t.data,!1]:[t,!0],n=" ".repeat(e),u=Object.keys(o);a&&u.sort((p,h)=>{let E=UV.indexOf(p),w=UV.indexOf(h);return E===-1&&w===-1?p<h?-1:p>h?1:0:E!==-1&&w===-1?-1:E===-1&&w!==-1?1:E-w});let A=u.filter(p=>!qV(o[p])).map((p,h)=>{let E=o[p],w=_V(p),D=nN(E,e+1,!0),b=h>0||r?n:"",C=w.length>1024?`? ${w}
|
||||||
${b}:`:`${w}:`,T=D.startsWith(`
|
${b}:`:`${w}:`,T=D.startsWith(`
|
||||||
`)?D:` ${D}`;return`${b}${C}${T}`}).join(e===0?`
|
`)?D:` ${D}`;return`${b}${C}${T}`}).join(e===0?`
|
||||||
`:"")||`
|
`:"")||`
|
||||||
`;return r?`
|
`;return r?`
|
||||||
${A}`:`${A}`}throw new Error(`Unsupported value type (${t})`)}function Sa(t){try{let e=rL(t,0,!1);return e!==`
|
${A}`:`${A}`}throw new Error(`Unsupported value type (${t})`)}function Pa(t){try{let e=nN(t,0,!1);return e!==`
|
||||||
`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function L6e(t){return t.endsWith(`
|
`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function O6e(t){return t.endsWith(`
|
||||||
`)||(t+=`
|
`)||(t+=`
|
||||||
`),(0,UK.parse)(t)}function O6e(t){if(N6e.test(t))return L6e(t);let e=(0,SS.safeLoad)(t,{schema:SS.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function Vi(t){return O6e(t)}var SS,UK,T6e,OK,DS,N6e,HK=It(()=>{SS=et(TK()),UK=et(NK()),T6e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,OK=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],DS=class{constructor(e){this.data=e}};Sa.PreserveOrdering=DS;N6e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var Ew={};Vt(Ew,{parseResolution:()=>pS,parseShell:()=>uS,parseSyml:()=>Vi,stringifyArgument:()=>qT,stringifyArgumentSegment:()=>jT,stringifyArithmeticExpression:()=>fS,stringifyCommand:()=>HT,stringifyCommandChain:()=>mm,stringifyCommandChainThen:()=>_T,stringifyCommandLine:()=>AS,stringifyCommandLineThen:()=>UT,stringifyEnvSegment:()=>cS,stringifyRedirectArgument:()=>fw,stringifyResolution:()=>hS,stringifyShell:()=>dm,stringifyShellLine:()=>dm,stringifySyml:()=>Sa,stringifyValueArgument:()=>J0});var Ol=It(()=>{_Y();GY();HK()});var jK=_((tbt,nL)=>{"use strict";var M6e=t=>{let e=!1,r=!1,o=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+"-"+t.slice(a),e=!1,o=r,r=!0,a++):r&&o&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+"-"+t.slice(a-1),o=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,o=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},qK=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=M6e(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};nL.exports=qK;nL.exports.default=qK});var GK=_((rbt,U6e)=>{U6e.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE
Line truncated
|
`),(0,HV.parse)(t)}function U6e(t){if(M6e.test(t))return O6e(t);let e=(0,PP.safeLoad)(t,{schema:PP.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function Ki(t){return U6e(t)}var PP,HV,L6e,UV,DP,M6e,jV=It(()=>{PP=et(LV()),HV=et(MV()),L6e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,UV=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],DP=class{constructor(e){this.data=e}};Pa.PreserveOrdering=DP;M6e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var Iw={};Kt(Iw,{parseResolution:()=>pP,parseShell:()=>uP,parseSyml:()=>Ki,stringifyArgument:()=>jT,stringifyArgumentSegment:()=>GT,stringifyArithmeticExpression:()=>fP,stringifyCommand:()=>qT,stringifyCommandChain:()=>Em,stringifyCommandChainThen:()=>HT,stringifyCommandLine:()=>AP,stringifyCommandLineThen:()=>_T,stringifyEnvSegment:()=>cP,stringifyRedirectArgument:()=>hw,stringifyResolution:()=>hP,stringifyShell:()=>ym,stringifyShellLine:()=>ym,stringifySyml:()=>Pa,stringifyValueArgument:()=>X0});var Ol=It(()=>{qY();YY();jV()});var WV=_((ibt,iN)=>{"use strict";var _6e=t=>{let e=!1,r=!1,o=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+"-"+t.slice(a),e=!1,o=r,r=!0,a++):r&&o&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+"-"+t.slice(a-1),o=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,o=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},GV=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=_6e(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};iN.exports=GV;iN.exports.default=GV});var YV=_((sbt,H6e)=>{H6e.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE
Line truncated
|
||||||
|
|
||||||
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
|
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
|
||||||
`)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean:
|
`)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean:
|
||||||
|
|
||||||
$ ${o}
|
$ ${o}
|
||||||
${aL(e)}`}else this.message=`Command not found; did you mean one of:
|
${lN(e)}`}else this.message=`Command not found; did you mean one of:
|
||||||
|
|
||||||
${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
|
${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
|
||||||
`)}
|
`)}
|
||||||
|
|
||||||
${aL(e)}`}},bS=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
|
${lN(e)}`}},bP=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
|
||||||
|
|
||||||
${this.usages.map((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
|
${this.usages.map((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
|
||||||
`)}
|
`)}
|
||||||
|
|
||||||
${aL(e)}`}},aL=t=>`While running ${t.filter(e=>e!==Vn.EndOfInput&&e!==Vn.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function _6e(t){let e=t.split(`
|
${lN(e)}`}},lN=t=>`While running ${t.filter(e=>e!==Kn.EndOfInput&&e!==Kn.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function q6e(t){let e=t.split(`
|
||||||
`),r=e.filter(a=>a.match(/\S/)),o=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(o).trimRight()).join(`
|
`),r=e.filter(a=>a.match(/\S/)),o=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(o).trimRight()).join(`
|
||||||
`)}function yo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
|
`)}function yo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
|
||||||
`),t=_6e(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
|
`),t=q6e(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
|
||||||
|
|
||||||
`),t=t.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(t=t.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(`
|
`),t=t.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(t=t.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(`
|
||||||
`);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(`
|
`);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(`
|
||||||
`)}).join(`
|
`)}).join(`
|
||||||
|
|
||||||
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>e.bold(a+n+a)),t?`${t}
|
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>e.bold(a+n+a)),t?`${t}
|
||||||
`:""}var lL,KK,JK,cL=It(()=>{lL=Array(80).fill("\u2501");for(let t=0;t<=24;++t)lL[lL.length-t]=`\x1B[38;5;${232+t}m\u2501`;KK={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<75?` ${lL.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},JK={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Wo(t){return{...t,[Cw]:!0}}function Yu(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function QS(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,o,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=o!=="."||!e?`${o.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function Iw(t,e){return e.length===1?new it(`${t}${QS(e[0],{mergeName:!0})}`):new it(`${t}:
|
`:""}var cN,JV,XV,uN=It(()=>{cN=Array(80).fill("\u2501");for(let t=0;t<=24;++t)cN[cN.length-t]=`\x1B[38;5;${232+t}m\u2501`;JV={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<75?` ${cN.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},XV={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Wo(t){return{...t,[ww]:!0}}function Yu(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function kP(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,o,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=o!=="."||!e?`${o.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function Bw(t,e){return e.length===1?new nt(`${t}${kP(e[0],{mergeName:!0})}`):new nt(`${t}:
|
||||||
${e.map(r=>`
|
${e.map(r=>`
|
||||||
- ${QS(r)}`).join("")}`)}function ag(t,e,r){if(typeof r>"u")return e;let o=[],a=[],n=A=>{let p=e;return e=A,n.bind(null,p)};if(!r(e,{errors:o,coercions:a,coercion:n}))throw Iw(`Invalid value for ${t}`,o);for(let[,A]of a)A();return e}var Cw,yf=It(()=>{kS();Cw=Symbol("clipanion/isOption")});var Yo={};Vt(Yo,{KeyRelationship:()=>Vu,TypeAssertionError:()=>zp,applyCascade:()=>vw,as:()=>sqe,assert:()=>rqe,assertWithErrors:()=>nqe,cascade:()=>NS,fn:()=>oqe,hasAtLeastOneKey:()=>dL,hasExactLength:()=>eJ,hasForbiddenKeys:()=>Dqe,hasKeyRelationship:()=>Sw,hasMaxLength:()=>lqe,hasMinLength:()=>aqe,hasMutuallyExclusiveKeys:()=>Sqe,hasRequiredKeys:()=>vqe,hasUniqueItems:()=>cqe,isArray:()=>RS,isAtLeast:()=>hL,isAtMost:()=>fqe,isBase64:()=>Cqe,isBoolean:()=>K6e,isDate:()=>z6e,isDict:()=>$6e,isEnum:()=>js,isHexColor:()=>Eqe,isISO8601:()=>yqe,isInExclusiveRange:()=>hqe,isInInclusiveRange:()=>pqe,isInstanceOf:()=>tqe,isInteger:()=>gL,isJSON:()=>Iqe,isLiteral:()=>XK,isLowerCase:()=>gqe,isMap:()=>Z6e,isNegative:()=>uqe,isNullable:()=>Bqe,isNumber:()=>fL,isObject:()=>ZK,isOneOf:()=>pL,isOptional:()=>wqe,isPartial:()=>eqe,isPayload:()=>J6e,isPositive:()=>Aqe,isRecord:()=>LS,isSet:()=>X6e,isString:()=>Pm,isTuple:()=>TS,isUUID4:()=>mqe,isUnknown:()=>AL,isUpperCase:()=>dqe,makeTrait:()=>$K,makeValidator:()=>qr,matchesRegExp:()=>Bw,softAssert:()=>iqe});function Kn(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":typeof t=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}function Sm(t,e){if(t.length===0)return"nothing";if(t.length===1)return Kn(t[0]);let r=t.slice(0,-1),o=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>Kn(n)).join(", ")}${a}${Kn(o)}`}function Jp(t,e){var r,o,a;return typeof e=="number"?`${(r=t?.p)!==null&&r!==void 0?r:"."}[${e}]`:H6e.test(e)?`${(o=t?.p)!==null&&o!==void 0?o:""}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function uL(t,e,r){return t===1?e:r}function gr({errors:t,p:e}={},r){return t?.push(`${e??"."}: ${r}`),!1}function Y6e(t,e){return r=>{t[e]=r}}function Ku(t,e){return r=>{let o=t[e];return t[e]=r,Ku(t,e).bind(null,o)}}function ww(t,e,r){let o=()=>(t(r()),a),a=()=>(t(e),o);return o}function AL(){return qr({test:(t,e)=>!0})}function XK(t){return qr({test:(e,r)=>e!==t?gr(r,`Expected ${Kn(t)} (got ${Kn(e)})`):!0})}function Pm(){return qr({test:(t,e)=>typeof t!="string"?gr(e,`Expected a string (got ${Kn(t)})`):!0})}function js(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a=="string"||typeof a=="number"),o=new Set(e);return o.size===1?XK([...o][0]):qr({test:(a,n)=>o.has(a)?!0:r?gr(n,`Expected one of ${Sm(e,"or")} (got ${Kn(a)})`):gr(n,`Expected a valid enumeration value (got ${Kn(a)})`)})}function K6e(){return qr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return gr(e,"Unbound coercion result");let o=V6e.get(t);if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return gr(e,`Expected a boolean (got ${Kn(t)})`)}return!0}})}function fL(){return qr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return gr(e,"Unbound coercion result");let o;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)o=a;else return gr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return gr(e,`Expected a number (got ${Kn(t)})`)}return!0}})}function J6e(t){return qr({test:(e,r)=>{var o;if(typeof r?.coercions>"u")return gr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return gr(r,"Unbound coercion result");if(typeof e!="string")return gr(r,`Expected a string (got ${Kn(e)})`);let a;try{a=JSON.parse(e)}catch{return gr(r,`Expected a JSON string (got ${Kn(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Ku(n,"value")}))?(r.coercions.push([(o=r.p)!==null&&o!==void 0?o:".",r.coercion.bind(null,n.value)]),!0):!1}})}function z6e(){return qr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return gr(e,"Unbound coercion result");let o;if(typeof t=="string"&&zK.test(t))o=new Date(t);else{let a;if(typeof t=="string"){let n;try{n=JSON.parse(t)}catch{}typeof n=="number"&&(a=n)}else typeof t=="number"&&(a=t);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))o=new Date(a*1e3);else return gr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return gr(e,`Expected a date (got ${Kn(t)})`)}return!0}})}function RS(t,{delimiter:e}={}){return qr({test:(r,o)=>{var a;let n=r;if(typeof r=="string"&&typeof e<"u"&&typeof o?.coercions<"u"){if(typeoLine truncated
|
- ${kP(r)}`).join("")}`)}function cg(t,e,r){if(typeof r>"u")return e;let o=[],a=[],n=A=>{let p=e;return e=A,n.bind(null,p)};if(!r(e,{errors:o,coercions:a,coercion:n}))throw Bw(`Invalid value for ${t}`,o);for(let[,A]of a)A();return e}var ww,yf=It(()=>{QP();ww=Symbol("clipanion/isOption")});var Yo={};Kt(Yo,{KeyRelationship:()=>Ku,TypeAssertionError:()=>Xp,applyCascade:()=>Pw,as:()=>aqe,assert:()=>iqe,assertWithErrors:()=>sqe,cascade:()=>NP,fn:()=>lqe,hasAtLeastOneKey:()=>mN,hasExactLength:()=>rz,hasForbiddenKeys:()=>Sqe,hasKeyRelationship:()=>xw,hasMaxLength:()=>uqe,hasMinLength:()=>cqe,hasMutuallyExclusiveKeys:()=>xqe,hasRequiredKeys:()=>Pqe,hasUniqueItems:()=>Aqe,isArray:()=>FP,isAtLeast:()=>gN,isAtMost:()=>hqe,isBase64:()=>wqe,isBoolean:()=>J6e,isDate:()=>Z6e,isDict:()=>tqe,isEnum:()=>js,isHexColor:()=>Iqe,isISO8601:()=>Cqe,isInExclusiveRange:()=>dqe,isInInclusiveRange:()=>gqe,isInstanceOf:()=>nqe,isInteger:()=>dN,isJSON:()=>Bqe,isLiteral:()=>$V,isLowerCase:()=>mqe,isMap:()=>eqe,isNegative:()=>fqe,isNullable:()=>Dqe,isNumber:()=>pN,isObject:()=>ez,isOneOf:()=>hN,isOptional:()=>vqe,isPartial:()=>rqe,isPayload:()=>X6e,isPositive:()=>pqe,isRecord:()=>TP,isSet:()=>$6e,isString:()=>bm,isTuple:()=>RP,isUUID4:()=>Eqe,isUnknown:()=>fN,isUpperCase:()=>yqe,makeTrait:()=>tz,makeValidator:()=>qr,matchesRegExp:()=>Dw,softAssert:()=>oqe});function Vn(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":typeof t=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}function xm(t,e){if(t.length===0)return"nothing";if(t.length===1)return Vn(t[0]);let r=t.slice(0,-1),o=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>Vn(n)).join(", ")}${a}${Vn(o)}`}function Jp(t,e){var r,o,a;return typeof e=="number"?`${(r=t?.p)!==null&&r!==void 0?r:"."}[${e}]`:j6e.test(e)?`${(o=t?.p)!==null&&o!==void 0?o:""}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function AN(t,e,r){return t===1?e:r}function gr({errors:t,p:e}={},r){return t?.push(`${e??"."}: ${r}`),!1}function V6e(t,e){return r=>{t[e]=r}}function Vu(t,e){return r=>{let o=t[e];return t[e]=r,Vu(t,e).bind(null,o)}}function vw(t,e,r){let o=()=>(t(r()),a),a=()=>(t(e),o);return o}function fN(){return qr({test:(t,e)=>!0})}function $V(t){return qr({test:(e,r)=>e!==t?gr(r,`Expected ${Vn(t)} (got ${Vn(e)})`):!0})}function bm(){return qr({test:(t,e)=>typeof t!="string"?gr(e,`Expected a string (got ${Vn(t)})`):!0})}function js(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a=="string"||typeof a=="number"),o=new Set(e);return o.size===1?$V([...o][0]):qr({test:(a,n)=>o.has(a)?!0:r?gr(n,`Expected one of ${xm(e,"or")} (got ${Vn(a)})`):gr(n,`Expected a valid enumeration value (got ${Vn(a)})`)})}function J6e(){return qr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return gr(e,"Unbound coercion result");let o=z6e.get(t);if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return gr(e,`Expected a boolean (got ${Vn(t)})`)}return!0}})}function pN(){return qr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return gr(e,"Unbound coercion result");let o;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)o=a;else return gr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return gr(e,`Expected a number (got ${Vn(t)})`)}return!0}})}function X6e(t){return qr({test:(e,r)=>{var o;if(typeof r?.coercions>"u")return gr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return gr(r,"Unbound coercion result");if(typeof e!="string")return gr(r,`Expected a string (got ${Vn(e)})`);let a;try{a=JSON.parse(e)}catch{return gr(r,`Expected a JSON string (got ${Vn(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Vu(n,"value")}))?(r.coercions.push([(o=r.p)!==null&&o!==void 0?o:".",r.coercion.bind(null,n.value)]),!0):!1}})}function Z6e(){return qr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return gr(e,"Unbound coercion result");let o;if(typeof t=="string"&&ZV.test(t))o=new Date(t);else{let a;if(typeof t=="string"){let n;try{n=JSON.parse(t)}catch{}typeof n=="number"&&(a=n)}else typeof t=="number"&&(a=t);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))o=new Date(a*1e3);else return gr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return gr(e,`Expected a date (got ${Vn(t)})`)}return!0}})}function FP(t,{delimiter:e}={}){return qr({test:(r,o)=>{var a;let n=r;if(typeof r=="string"&&typeof e<"u"&&typeof o?.coercions<"u"){if(typeoLine truncated
|
||||||
`;for(let o of e)r+=`
|
`;for(let o of e)r+=`
|
||||||
- ${o}`}super(r)}};Dw={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<"u",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(Vu||(Vu={}));Pqe={[Vu.Forbids]:{expect:!1,message:"forbids using"},[Vu.Requires]:{expect:!0,message:"requires using"}}});var ot,Xp=It(()=>{yf();ot=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:u}=await Promise.resolve().then(()=>(il(),Yo)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw Iw("Invalid option schema",p);for(let[,w]of h)w()}else if(r!=null)throw new Error("Invalid command schema");let o=await this.execute();return typeof o<"u"?o:0}};ot.isOption=Cw;ot.Default=[]});function Pa(t){oL&&console.log(t)}function rJ(){let t={nodes:[]};for(let e=0;e<pn.CustomNode;++e)t.nodes.push(sl());return t}function xqe(t){let e=rJ(),r=[],o=e.nodes.length;for(let a of t){r.push(o);for(let n=0;n<a.nodes.length;++n)iJ(n)||e.nodes.push(Nqe(a.nodes[n],o));o+=a.nodes.length-pn.CustomNode+1}for(let a of r)xm(e,pn.InitialNode,a);return e}function jc(t,e){return t.nodes.push(e),t.nodes.length-1}function bqe(t){let e=new Set,r=o=>{if(e.has(o))return;e.add(o);let a=t.nodes[o];for(let u of Object.values(a.statics))for(let{to:A}of u)r(A);for(let[,{to:u}]of a.dynamics)r(u);for(let{to:u}of a.shortcuts)r(u);let n=new Set(a.shortcuts.map(({to:u})=>u));for(;a.shortcuts.length>0;){let{to:u}=a.shortcuts.shift(),A=t.nodes[u];for(let[p,h]of Object.entries(A.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let w of h)E.some(({to:D})=>w.to===D)||E.push(w)}for(let[p,h]of A.dynamics)a.dynamics.some(([E,{to:w}])=>p===E&&h.to===w)||a.dynamics.push([p,h]);for(let p of A.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(pn.InitialNode)}function kqe(t,{prefix:e=""}={}){if(oL){Pa(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)Pa(`${e} ${r}: ${JSON.stringify(t.nodes[r])}`)}}function Qqe(t,e,r=!1){Pa(`Running a vm on ${JSON.stringify(e)}`);let o=[{node:pn.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];kqe(t,{prefix:" "});let a=[Vn.StartOfInput,...e];for(let n=0;n<a.length;++n){let u=a[n],A=u===Vn.EndOfInput||u===Vn.EndOfPartialInput,p=n-1;Pa(` Processing ${JSON.stringify(u)}`);let h=[];for(let{node:E,state:w}of o){Pa(` Current node is ${E}`);let D=t.nodes[E];if(E===pn.ErrorNode){h.push({node:E,state:w});continue}console.assert(D.shortcuts.length===0,"Shortcuts should have been eliminated by now");let b=Object.prototype.hasOwnProperty.call(D.statics,u);if(!r||n<a.length-1||b)if(b){let C=D.statics[u];for(let{to:T,reducer:N}of C)h.push({node:T,state:typeof N<"u"?OS(yL,N,w,u,p):w}),Pa(` Static transition to ${T} found`)}else Pa(" No static transition found");else{let C=!1;for(let T of Object.keys(D.statics))if(T.startsWith(u)){if(u===T)for(let{to:N,reducer:U}of D.statics[T])h.push({node:N,state:typeof U<"u"?OS(yL,U,w,u,p):w}),Pa(` Static transition to ${N} found`);else for(let{to:N}of D.statics[T])h.push({node:N,state:{...w,remainder:T.slice(u.length)}}),Pa(` Static transition to ${N} found (partial match)`);C=!0}C||Pa(" No partial static transition found")}if(!A)for(let[C,{to:T,reducer:N}]of D.dynamics)OS(Oqe,C,w,u,p)&&(h.push({node:T,state:typeof N<"u"?OS(yL,N,w,u,p):w}),Pa(` Dynamic transition to ${T} found (via ${C})`))}if(h.length===0&&A&&e.length===1)return[{node:pn.InitialNode,state:tJ}];if(h.length===0)throw new Dm(e,o.filter(({node:E})=>E!==pn.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===pn.ErrorNode))throw new Dm(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));o=Rqe(h)}if(o.length>0){Pa(" Results:");for(let n of o)Pa(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else Pa(" No results");return o}function Fqe(t,e,{endToken:r=Vn.EndOfInput}={}){let o=Qqe(t,[...e,r]);return Tqe(e,o.map(({state:a})=>a))}function Rqe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function Tqe(t,e){let r=e.filter(D=>D.selectedIndex!==null),o=r.filter(D=>!D.partial);if(o.length>0&&(r=o),r.length===0)throw new Error;let a=r.filter(D=>D.selectedIndex===og||D.requiredOptions.every(b=>b.some(C=>D.options.find(T=>T.name===C))));if(a.length===0)throw new Dm(t,r.map(D=>({usage:D.candidateUsage,reason:null})));let n=0;for(let D of a)D.path.length>n&&(n=D.path.length);let u=a.filter(D=>D.path.length===n),A=D=>D.positionals.filter(({extra:b})=>!b).length+D.options.length,p=u.map(D=>({state:D,positionalCount:A(D)})),h=0;for(let{positionalCount:D}of p)D>h&&(h=D);let E=p.filter(({positionalCount:D})=>D===h).map(({state:D})=>
Line truncated
|
- ${o}`}super(r)}};Sw={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<"u",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(Ku||(Ku={}));bqe={[Ku.Forbids]:{expect:!1,message:"forbids using"},[Ku.Requires]:{expect:!0,message:"requires using"}}});var ot,Zp=It(()=>{yf();ot=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:u}=await Promise.resolve().then(()=>(il(),Yo)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw Bw("Invalid option schema",p);for(let[,w]of h)w()}else if(r!=null)throw new Error("Invalid command schema");let o=await this.execute();return typeof o<"u"?o:0}};ot.isOption=ww;ot.Default=[]});function Sa(t){aN&&console.log(t)}function iz(){let t={nodes:[]};for(let e=0;e<pn.CustomNode;++e)t.nodes.push(sl());return t}function Qqe(t){let e=iz(),r=[],o=e.nodes.length;for(let a of t){r.push(o);for(let n=0;n<a.nodes.length;++n)oz(n)||e.nodes.push(Mqe(a.nodes[n],o));o+=a.nodes.length-pn.CustomNode+1}for(let a of r)Qm(e,pn.InitialNode,a);return e}function jc(t,e){return t.nodes.push(e),t.nodes.length-1}function kqe(t){let e=new Set,r=o=>{if(e.has(o))return;e.add(o);let a=t.nodes[o];for(let u of Object.values(a.statics))for(let{to:A}of u)r(A);for(let[,{to:u}]of a.dynamics)r(u);for(let{to:u}of a.shortcuts)r(u);let n=new Set(a.shortcuts.map(({to:u})=>u));for(;a.shortcuts.length>0;){let{to:u}=a.shortcuts.shift(),A=t.nodes[u];for(let[p,h]of Object.entries(A.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let w of h)E.some(({to:D})=>w.to===D)||E.push(w)}for(let[p,h]of A.dynamics)a.dynamics.some(([E,{to:w}])=>p===E&&h.to===w)||a.dynamics.push([p,h]);for(let p of A.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(pn.InitialNode)}function Fqe(t,{prefix:e=""}={}){if(aN){Sa(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)Sa(`${e} ${r}: ${JSON.stringify(t.nodes[r])}`)}}function Rqe(t,e,r=!1){Sa(`Running a vm on ${JSON.stringify(e)}`);let o=[{node:pn.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];Fqe(t,{prefix:" "});let a=[Kn.StartOfInput,...e];for(let n=0;n<a.length;++n){let u=a[n],A=u===Kn.EndOfInput||u===Kn.EndOfPartialInput,p=n-1;Sa(` Processing ${JSON.stringify(u)}`);let h=[];for(let{node:E,state:w}of o){Sa(` Current node is ${E}`);let D=t.nodes[E];if(E===pn.ErrorNode){h.push({node:E,state:w});continue}console.assert(D.shortcuts.length===0,"Shortcuts should have been eliminated by now");let b=Object.prototype.hasOwnProperty.call(D.statics,u);if(!r||n<a.length-1||b)if(b){let C=D.statics[u];for(let{to:T,reducer:L}of C)h.push({node:T,state:typeof L<"u"?LP(EN,L,w,u,p):w}),Sa(` Static transition to ${T} found`)}else Sa(" No static transition found");else{let C=!1;for(let T of Object.keys(D.statics))if(T.startsWith(u)){if(u===T)for(let{to:L,reducer:U}of D.statics[T])h.push({node:L,state:typeof U<"u"?LP(EN,U,w,u,p):w}),Sa(` Static transition to ${L} found`);else for(let{to:L}of D.statics[T])h.push({node:L,state:{...w,remainder:T.slice(u.length)}}),Sa(` Static transition to ${L} found (partial match)`);C=!0}C||Sa(" No partial static transition found")}if(!A)for(let[C,{to:T,reducer:L}]of D.dynamics)LP(Uqe,C,w,u,p)&&(h.push({node:T,state:typeof L<"u"?LP(EN,L,w,u,p):w}),Sa(` Dynamic transition to ${T} found (via ${C})`))}if(h.length===0&&A&&e.length===1)return[{node:pn.InitialNode,state:nz}];if(h.length===0)throw new Sm(e,o.filter(({node:E})=>E!==pn.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===pn.ErrorNode))throw new Sm(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));o=Nqe(h)}if(o.length>0){Sa(" Results:");for(let n of o)Sa(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else Sa(" No results");return o}function Tqe(t,e,{endToken:r=Kn.EndOfInput}={}){let o=Rqe(t,[...e,r]);return Lqe(e,o.map(({state:a})=>a))}function Nqe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function Lqe(t,e){let r=e.filter(D=>D.selectedIndex!==null),o=r.filter(D=>!D.partial);if(o.length>0&&(r=o),r.length===0)throw new Error;let a=r.filter(D=>D.selectedIndex===lg||D.requiredOptions.every(b=>b.some(C=>D.options.find(T=>T.name===C))));if(a.length===0)throw new Sm(t,r.map(D=>({usage:D.candidateUsage,reason:null})));let n=0;for(let D of a)D.path.length>n&&(n=D.path.length);let u=a.filter(D=>D.path.length===n),A=D=>D.positionals.filter(({extra:b})=>!b).length+D.options.length,p=u.map(D=>({state:D,positionalCount:A(D)})),h=0;for(let{positionalCount:D}of p)D>h&&(h=D);let E=p.filter(({positionalCount:D})=>D===h).map(({state:D})=>
Line truncated
|
||||||
`),this.context.stdout.write(`
|
`),this.context.stdout.write(`
|
||||||
`);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
|
`);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
|
||||||
`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
|
`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
|
||||||
`)}}}});async function fJ(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=hJ(t);return Ko.from(r,e).runExit(o,a)}async function pJ(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=hJ(t);return Ko.from(r,e).run(o,a)}function hJ(t){let e,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?o=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],o=t[2]):t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],o=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],o=t[2],a=t[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function AJ(t){return t()}var uJ,Ko,gJ=It(()=>{xS();US();cL();lJ();Xp();cJ();uJ=Symbol("clipanion/errorCommand");Ko=class t{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new MS({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let o=new t(r),a=Array.isArray(e)?e:[e];for(let n of a)o.register(n);return o}register(e){var r;let o=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[ot.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(e,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:o,context:a,partial:n}=typeof e=="object"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:u,process:A}=this.builder.compile(),p=A(o,{partial:n}),h={...t.defaultContext,...a};switch(p.selectedIndex){case og:{let E=HS.from(p,u);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=u[p.selectedIndex],w=this.registrations.get(E);if(typeof w>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let D=new E;D.context=h,D.tokens=p.tokens,D.path=p.path;try{for(let[b,{transformer:C}]of w.specs.entries())D[b]=C(w.builder,b,p,h);return D}catch(b){throw b[uJ]=D,b}}break}}async run(e,r){var o,a;let n,u={...t.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,u)}catch(E){return u.stdout.write(this.error(E,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,w)=>this.error(E,w),format:E=>this.format(E),process:(E,w)=>this.process(E,{...u,...w}),run:(E,w)=>this.run(E,{...u,...w}),usage:(E,w)=>this.usage(E,w)};let p=this.enableCapture&&(a=aJ(u))!==null&&a!==void 0?a:AJ,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return u.stdout.write(this.error(E,{colored:A,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:o}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),u=typeof e.usage.category<"u"?yo(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,A=typeof e.usage.description<"u"?yo(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<"u"?yo(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<"u"?e.usage.examples.map(([E,w])=>[yo(E,{format:this.format(r),paragraphs:!1}),w.replace(/\$0/g,this.binaryName)]):void 0;return{path:o,usage:a,category:u,description:A,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let o of this.registrations.keys()){let a=this.definition(o,{colored:e});a&&r.push(a)}return r}usage(e=null,{colored:r,detailed:o=!1,prefix:a="$ "}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(b=>b.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(o=!0)}let u=e!==null&&e instanceof ot?e.constructor:e,A="";if(u)if(o){let{description:p="",details:h="",examples:E=[]}=u.usage||{};p!==""&&(A+=yo(p,{format:this.format(r),paragraphs:!1}).replace(/^./,b=>b.toUpperCase()),A+=`
|
`)}}}});async function hz(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=dz(t);return Vo.from(r,e).runExit(o,a)}async function gz(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=dz(t);return Vo.from(r,e).run(o,a)}function dz(t){let e,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?o=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],o=t[2]):t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],o=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],o=t[2],a=t[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function pz(t){return t()}var fz,Vo,mz=It(()=>{xP();MP();uN();uz();Zp();Az();fz=Symbol("clipanion/errorCommand");Vo=class t{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new OP({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let o=new t(r),a=Array.isArray(e)?e:[e];for(let n of a)o.register(n);return o}register(e){var r;let o=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[ot.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(e,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:o,context:a,partial:n}=typeof e=="object"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:u,process:A}=this.builder.compile(),p=A(o,{partial:n}),h={...t.defaultContext,...a};switch(p.selectedIndex){case lg:{let E=_P.from(p,u);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=u[p.selectedIndex],w=this.registrations.get(E);if(typeof w>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let D=new E;D.context=h,D.tokens=p.tokens,D.path=p.path;try{for(let[b,{transformer:C}]of w.specs.entries())D[b]=C(w.builder,b,p,h);return D}catch(b){throw b[fz]=D,b}}break}}async run(e,r){var o,a;let n,u={...t.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,u)}catch(E){return u.stdout.write(this.error(E,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,w)=>this.error(E,w),format:E=>this.format(E),process:(E,w)=>this.process(E,{...u,...w}),run:(E,w)=>this.run(E,{...u,...w}),usage:(E,w)=>this.usage(E,w)};let p=this.enableCapture&&(a=cz(u))!==null&&a!==void 0?a:pz,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return u.stdout.write(this.error(E,{colored:A,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:o}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),u=typeof e.usage.category<"u"?yo(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,A=typeof e.usage.description<"u"?yo(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<"u"?yo(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<"u"?e.usage.examples.map(([E,w])=>[yo(E,{format:this.format(r),paragraphs:!1}),w.replace(/\$0/g,this.binaryName)]):void 0;return{path:o,usage:a,category:u,description:A,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let o of this.registrations.keys()){let a=this.definition(o,{colored:e});a&&r.push(a)}return r}usage(e=null,{colored:r,detailed:o=!1,prefix:a="$ "}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(b=>b.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(o=!0)}let u=e!==null&&e instanceof ot?e.constructor:e,A="";if(u)if(o){let{description:p="",details:h="",examples:E=[]}=u.usage||{};p!==""&&(A+=yo(p,{format:this.format(r),paragraphs:!1}).replace(/^./,b=>b.toUpperCase()),A+=`
|
||||||
`),(h!==""||E.length>0)&&(A+=`${this.format(r).header("Usage")}
|
`),(h!==""||E.length>0)&&(A+=`${this.format(r).header("Usage")}
|
||||||
`,A+=`
|
`,A+=`
|
||||||
`);let{usage:w,options:D}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${w}
|
`);let{usage:w,options:D}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${w}
|
||||||
@@ -110,43 +110,43 @@ ${e.map(r=>`
|
|||||||
`;for(let[b,C]of E)A+=`
|
`;for(let[b,C]of E)A+=`
|
||||||
`,A+=yo(b,{format:this.format(r),paragraphs:!1}),A+=`${C.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
|
`,A+=yo(b,{format:this.format(r),paragraphs:!1}),A+=`${C.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
|
||||||
`}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p}
|
`}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p}
|
||||||
`}else{let p=new Map;for(let[D,{index:b}]of this.registrations.entries()){if(typeof D.usage>"u")continue;let C=typeof D.usage.category<"u"?yo(D.usage.category,{format:this.format(r),paragraphs:!1}):null,T=p.get(C);typeof T>"u"&&p.set(C,T=[]);let{usage:N}=this.getUsageByIndex(b);T.push({commandClass:D,usage:N})}let h=Array.from(p.keys()).sort((D,b)=>D===null?-1:b===null?1:D.localeCompare(b,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",w=typeof this.binaryVersion<"u";E||w?(E&&w?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
|
`}else{let p=new Map;for(let[D,{index:b}]of this.registrations.entries()){if(typeof D.usage>"u")continue;let C=typeof D.usage.category<"u"?yo(D.usage.category,{format:this.format(r),paragraphs:!1}):null,T=p.get(C);typeof T>"u"&&p.set(C,T=[]);let{usage:L}=this.getUsageByIndex(b);T.push({commandClass:D,usage:L})}let h=Array.from(p.keys()).sort((D,b)=>D===null?-1:b===null?1:D.localeCompare(b,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",w=typeof this.binaryVersion<"u";E||w?(E&&w?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
|
||||||
|
|
||||||
`:E?A+=`${this.format(r).header(`${this.binaryLabel}`)}
|
`:E?A+=`${this.format(r).header(`${this.binaryLabel}`)}
|
||||||
`:A+=`${this.format(r).header(`${this.binaryVersion}`)}
|
`:A+=`${this.format(r).header(`${this.binaryVersion}`)}
|
||||||
`,A+=` ${this.format(r).bold(a)}${this.binaryName} <command>
|
`,A+=` ${this.format(r).bold(a)}${this.binaryName} <command>
|
||||||
`):A+=`${this.format(r).bold(a)}${this.binaryName} <command>
|
`):A+=`${this.format(r).bold(a)}${this.binaryName} <command>
|
||||||
`;for(let D of h){let b=p.get(D).slice().sort((T,N)=>T.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),C=D!==null?D.trim():"General commands";A+=`
|
`;for(let D of h){let b=p.get(D).slice().sort((T,L)=>T.usage.localeCompare(L.usage,"en",{usage:"sort",caseFirst:"upper"})),C=D!==null?D.trim():"General commands";A+=`
|
||||||
`,A+=`${this.format(r).header(`${C}`)}
|
`,A+=`${this.format(r).header(`${C}`)}
|
||||||
`;for(let{commandClass:T,usage:N}of b){let U=T.usage.description||"undocumented";A+=`
|
`;for(let{commandClass:T,usage:L}of b){let U=T.usage.description||"undocumented";A+=`
|
||||||
`,A+=` ${this.format(r).bold(N)}
|
`,A+=` ${this.format(r).bold(L)}
|
||||||
`,A+=` ${yo(U,{format:this.format(r),paragraphs:!1})}`}}A+=`
|
`,A+=` ${yo(U,{format:this.format(r),paragraphs:!1})}`}}A+=`
|
||||||
`,A+=yo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return A}error(e,r){var o,{colored:a,command:n=(o=e[uJ])!==null&&o!==void 0?o:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let u="",A=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}: ${e.message}
|
`,A+=yo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return A}error(e,r){var o,{colored:a,command:n=(o=e[fz])!==null&&o!==void 0?o:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let u="",A=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}: ${e.message}
|
||||||
`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=`
|
`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=`
|
||||||
`,u+=this.usage(n)):e.stack&&(u+=`${e.stack.replace(/^.*\n/,"")}
|
`,u+=this.usage(n)):e.stack&&(u+=`${e.stack.replace(/^.*\n/,"")}
|
||||||
`),u}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:t.defaultContext.colorDepth>1)?KK:JK}getUsageByRegistration(e,r){let o=this.registrations.get(e);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};Ko.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:oJ()}});var Pw,dJ=It(()=>{Xp();Pw=class extends ot{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
|
`),u}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:t.defaultContext.colorDepth>1)?JV:XV}getUsageByRegistration(e,r){let o=this.registrations.get(e);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};Vo.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:lz()}});var bw,yz=It(()=>{Zp();bw=class extends ot{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
|
||||||
`)}};Pw.paths=[["--clipanion=definitions"]]});var xw,mJ=It(()=>{Xp();xw=class extends ot{async execute(){this.context.stdout.write(this.cli.usage())}};xw.paths=[["-h"],["--help"]]});function qS(t={}){return Wo({definition(e,r){var o;e.addProxy({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){return o.positionals.map(({value:a})=>a)}})}var CL=It(()=>{yf()});var bw,yJ=It(()=>{Xp();CL();bw=class extends ot{constructor(){super(...arguments),this.args=qS()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}
|
`)}};bw.paths=[["--clipanion=definitions"]]});var Qw,Ez=It(()=>{Zp();Qw=class extends ot{async execute(){this.context.stdout.write(this.cli.usage())}};Qw.paths=[["-h"],["--help"]]});function HP(t={}){return Wo({definition(e,r){var o;e.addProxy({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){return o.positionals.map(({value:a})=>a)}})}var IN=It(()=>{yf()});var kw,Cz=It(()=>{Zp();IN();kw=class extends ot{constructor(){super(...arguments),this.args=HP()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}
|
||||||
`)}};bw.paths=[["--clipanion=tokens"]]});var kw,EJ=It(()=>{Xp();kw=class extends ot{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
|
`)}};kw.paths=[["--clipanion=tokens"]]});var Fw,Iz=It(()=>{Zp();Fw=class extends ot{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
|
||||||
`)}};kw.paths=[["-v"],["--version"]]});var IL={};Vt(IL,{DefinitionsCommand:()=>Pw,HelpCommand:()=>xw,TokensCommand:()=>bw,VersionCommand:()=>kw});var CJ=It(()=>{dJ();mJ();yJ();EJ()});function IJ(t,e,r){let[o,a]=Yu(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Wo({definition(p){p.addOption({names:u,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let w,D=typeof o<"u"?[...o]:void 0;for(let{name:b,value:C}of E.options)A.has(b)&&(w=b,D=D??[],D.push(C));return typeof D<"u"?ag(w??h,D,a.validator):D}})}var wJ=It(()=>{yf()});function BJ(t,e,r){let[o,a]=Yu(e,r??{}),n=t.split(","),u=new Set(n);return Wo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let E=o;for(let{name:w,value:D}of h.options)u.has(w)&&(E=D);return E}})}var vJ=It(()=>{yf()});function DJ(t,e,r){let[o,a]=Yu(e,r??{}),n=t.split(","),u=new Set(n);return Wo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let E=o;for(let{name:w,value:D}of h.options)u.has(w)&&(E??(E=0),D?E+=1:E=0);return E}})}var SJ=It(()=>{yf()});function PJ(t={}){return Wo({definition(e,r){var o;e.addRest({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){let a=u=>{let A=o.positionals[u];return A.extra===ol||A.extra===!1&&u<e.arity.leading.length},n=0;for(;n<o.positionals.length&&a(n);)n+=1;return o.positionals.splice(0,n).map(({value:u})=>u)}})}var xJ=It(()=>{US();yf()});function Mqe(t,e,r){let[o,a]=Yu(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Wo({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,w){let D,b=o;typeof a.env<"u"&&w.env[a.env]&&(D=a.env,b=w.env[a.env]);for(let{name:C,value:T}of E.options)A.has(C)&&(D=C,b=T);return typeof b=="string"?ag(D??h,b,a.validator):b}})}function Uqe(t={}){let{required:e=!0}=t;return Wo({definition(r,o){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:o,required:t.required})},transformer(r,o,a){var n;for(let u=0;u<a.positionals.length;++u){if(a.positionals[u].extra===ol||e&&a.positionals[u].extra===!0||!e&&a.positionals[u].extra===!1)continue;let[A]=a.positionals.splice(u,1);return ag((n=t.name)!==null&&n!==void 0?n:o,A.value,t.validator)}}})}function bJ(t,...e){return typeof t=="string"?Mqe(t,...e):Uqe(t)}var kJ=It(()=>{US();yf()});var de={};Vt(de,{Array:()=>IJ,Boolean:()=>BJ,Counter:()=>DJ,Proxy:()=>qS,Rest:()=>PJ,String:()=>bJ,applyValidator:()=>ag,cleanValidationError:()=>QS,formatError:()=>Iw,isOptionSymbol:()=>Cw,makeCommandOption:()=>Wo,rerouteArguments:()=>Yu});var QJ=It(()=>{yf();CL();wJ();vJ();SJ();xJ();kJ()});var Qw={};Vt(Qw,{Builtins:()=>IL,Cli:()=>Ko,Command:()=>ot,Option:()=>de,UsageError:()=>it,formatMarkdownish:()=>yo,run:()=>pJ,runExit:()=>fJ});var Gt=It(()=>{kS();cL();Xp();gJ();CJ();QJ()});var FJ=_((ckt,_qe)=>{_qe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var NJ=_((ukt,Ef)=>{var RJ=ve("fs"),BL=ve("path"),Hqe=ve("os"),qqe=ve("crypto"),jqe=FJ(),vL=jqe.version,Gqe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Wqe(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,`
|
`)}};Fw.paths=[["-v"],["--version"]]});var wN={};Kt(wN,{DefinitionsCommand:()=>bw,HelpCommand:()=>Qw,TokensCommand:()=>kw,VersionCommand:()=>Fw});var wz=It(()=>{yz();Ez();Cz();Iz()});function Bz(t,e,r){let[o,a]=Yu(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Wo({definition(p){p.addOption({names:u,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let w,D=typeof o<"u"?[...o]:void 0;for(let{name:b,value:C}of E.options)A.has(b)&&(w=b,D=D??[],D.push(C));return typeof D<"u"?cg(w??h,D,a.validator):D}})}var vz=It(()=>{yf()});function Dz(t,e,r){let[o,a]=Yu(e,r??{}),n=t.split(","),u=new Set(n);return Wo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let E=o;for(let{name:w,value:D}of h.options)u.has(w)&&(E=D);return E}})}var Pz=It(()=>{yf()});function Sz(t,e,r){let[o,a]=Yu(e,r??{}),n=t.split(","),u=new Set(n);return Wo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let E=o;for(let{name:w,value:D}of h.options)u.has(w)&&(E??(E=0),D?E+=1:E=0);return E}})}var xz=It(()=>{yf()});function bz(t={}){return Wo({definition(e,r){var o;e.addRest({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){let a=u=>{let A=o.positionals[u];return A.extra===ol||A.extra===!1&&u<e.arity.leading.length},n=0;for(;n<o.positionals.length&&a(n);)n+=1;return o.positionals.splice(0,n).map(({value:u})=>u)}})}var Qz=It(()=>{MP();yf()});function _qe(t,e,r){let[o,a]=Yu(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Wo({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,w){let D,b=o;typeof a.env<"u"&&w.env[a.env]&&(D=a.env,b=w.env[a.env]);for(let{name:C,value:T}of E.options)A.has(C)&&(D=C,b=T);return typeof b=="string"?cg(D??h,b,a.validator):b}})}function Hqe(t={}){let{required:e=!0}=t;return Wo({definition(r,o){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:o,required:t.required})},transformer(r,o,a){var n;for(let u=0;u<a.positionals.length;++u){if(a.positionals[u].extra===ol||e&&a.positionals[u].extra===!0||!e&&a.positionals[u].extra===!1)continue;let[A]=a.positionals.splice(u,1);return cg((n=t.name)!==null&&n!==void 0?n:o,A.value,t.validator)}}})}function kz(t,...e){return typeof t=="string"?_qe(t,...e):Hqe(t)}var Fz=It(()=>{MP();yf()});var ge={};Kt(ge,{Array:()=>Bz,Boolean:()=>Dz,Counter:()=>Sz,Proxy:()=>HP,Rest:()=>bz,String:()=>kz,applyValidator:()=>cg,cleanValidationError:()=>kP,formatError:()=>Bw,isOptionSymbol:()=>ww,makeCommandOption:()=>Wo,rerouteArguments:()=>Yu});var Rz=It(()=>{yf();IN();vz();Pz();xz();Qz();Fz()});var Rw={};Kt(Rw,{Builtins:()=>wN,Cli:()=>Vo,Command:()=>ot,Option:()=>ge,UsageError:()=>nt,formatMarkdownish:()=>yo,run:()=>gz,runExit:()=>hz});var Gt=It(()=>{QP();uN();Zp();mz();wz();Rz()});var Tz=_((fQt,qqe)=>{qqe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Mz=_((pQt,Ef)=>{var Nz=De("fs"),vN=De("path"),jqe=De("os"),Gqe=De("crypto"),Wqe=Tz(),DN=Wqe.version,Yqe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Kqe(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,`
|
||||||
`);let o;for(;(o=Gqe.exec(r))!=null;){let a=o[1],n=o[2]||"";n=n.trim();let u=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),u==='"'&&(n=n.replace(/\\n/g,`
|
`);let o;for(;(o=Yqe.exec(r))!=null;){let a=o[1],n=o[2]||"";n=n.trim();let u=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),u==='"'&&(n=n.replace(/\\n/g,`
|
||||||
`),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function Yqe(t){let e=LJ(t),r=vs.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let o=TJ(t).split(","),a=o.length,n;for(let u=0;u<a;u++)try{let A=o[u].trim(),p=Jqe(r,A);n=vs.decrypt(p.ciphertext,p.key);break}catch(A){if(u+1>=a)throw A}return vs.parse(n)}function Vqe(t){console.log(`[dotenv@${vL}][INFO] ${t}`)}function Kqe(t){console.log(`[dotenv@${vL}][WARN] ${t}`)}function wL(t){console.log(`[dotenv@${vL}][DEBUG] ${t}`)}function TJ(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function Jqe(t,e){let r;try{r=new URL(e)}catch(A){throw A.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):A}let o=r.password;if(!o)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,u=t.parsed[n];if(!u)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:u,key:o}}function LJ(t){let e=BL.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function zqe(t){return t[0]==="~"?BL.join(Hqe.homedir(),t.slice(1)):t}function Xqe(t){Vqe("Loading env from encrypted .env.vault");let e=vs._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),vs.populate(r,e,t),{parsed:e}}function Zqe(t){let e=BL.resolve(process.cwd(),".env"),r="utf8",o=!!(t&&t.debug);t&&(t.path!=null&&(e=zqe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=vs.parse(RJ.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),vs.populate(n,a,t),{parsed:a}}catch(a){return o&&wL(`Failed to load ${e} ${a.message}`),{error:a}}}function $qe(t){let e=LJ(t);return TJ(t).length===0?vs.configDotenv(t):RJ.existsSync(e)?vs._configVault(t):(Kqe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),vs.configDotenv(t))}function eje(t,e){let r=Buffer.from(e.slice(-64),"hex"),o=Buffer.from(t,"base64"),a=o.slice(0,12),n=o.slice(-16);o=o.slice(12,-16);try{let u=qqe.createDecipheriv("aes-256-gcm",r,a);return u.setAuthTag(n),`${u.update(o)}${u.final()}`}catch(u){let A=u instanceof RangeError,p=u.message==="Invalid key length",h=u.message==="Unsupported state or unable to authenticate data";if(A||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",u.code),console.error("Error: ",u.message),u}}function tje(t,e,r={}){let o=!!(r&&r.debug),a=!!(r&&r.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),o&&wL(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):t[n]=e[n]}var vs={configDotenv:Zqe,_configVault:Xqe,_parseVault:Yqe,config:$qe,decrypt:eje,parse:Wqe,populate:tje};Ef.exports.configDotenv=vs.configDotenv;Ef.exports._configVault=vs._configVault;Ef.exports._parseVault=vs._parseVault;Ef.exports.config=vs.config;Ef.exports.decrypt=vs.decrypt;Ef.exports.parse=vs.parse;Ef.exports.populate=vs.populate;Ef.exports=vs});var MJ=_((Akt,OJ)=>{"use strict";OJ.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var lg=_((fkt,DL)=>{"use strict";var rje=MJ(),UJ=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,o=()=>{r--,e.length>0&&e.shift()()},a=(A,p,...h)=>{r++;let E=rje(A,...h);p(E),E.then(o,o)},n=(A,p,...h)=>{r<t?a(A,p,...h):e.push(a.bind(null,A,p,...h))},u=(A,...p)=>new Promise(h=>n(A,h,...p));return Object.defineProperties(u,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),u};DL.exports=UJ;DL.exports.default=UJ});function Ju(t){return`YN${t.toString(10).padStart(4,"0")}`}function jS(t){let e=Number(t.slice(2));if(typeof vr[e]>"u")throw new Error(`Unknown message name: "${t}"`);return e}var vr,GS=It(()=>{vr=(Me=>(Me[Me.UNNAMED=0]="UNNAMED",Me[Me.EXCEPTION=1]="EXCEPTION",Me[Me.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Me[Me.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Me[Me.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Me[Me.BUILD_DISABLED=5]="BUILD_DISABLED",Me[Me.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Me[Me.MUST_BUILD=7]="MUST_BUILD",Me[Me.MUST_REBUILD=8]="MUST_REBUILD",Me[Me.BUILD_FAILED=9]="BUILD_FAILED",Me[Me.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Me[Me.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Me[Me.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",Me[Me.FETC
Line truncated
|
`),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function Vqe(t){let e=Oz(t),r=vs.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let o=Lz(t).split(","),a=o.length,n;for(let u=0;u<a;u++)try{let A=o[u].trim(),p=Xqe(r,A);n=vs.decrypt(p.ciphertext,p.key);break}catch(A){if(u+1>=a)throw A}return vs.parse(n)}function zqe(t){console.log(`[dotenv@${DN}][INFO] ${t}`)}function Jqe(t){console.log(`[dotenv@${DN}][WARN] ${t}`)}function BN(t){console.log(`[dotenv@${DN}][DEBUG] ${t}`)}function Lz(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function Xqe(t,e){let r;try{r=new URL(e)}catch(A){throw A.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):A}let o=r.password;if(!o)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,u=t.parsed[n];if(!u)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:u,key:o}}function Oz(t){let e=vN.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function Zqe(t){return t[0]==="~"?vN.join(jqe.homedir(),t.slice(1)):t}function $qe(t){zqe("Loading env from encrypted .env.vault");let e=vs._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),vs.populate(r,e,t),{parsed:e}}function eje(t){let e=vN.resolve(process.cwd(),".env"),r="utf8",o=!!(t&&t.debug);t&&(t.path!=null&&(e=Zqe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=vs.parse(Nz.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),vs.populate(n,a,t),{parsed:a}}catch(a){return o&&BN(`Failed to load ${e} ${a.message}`),{error:a}}}function tje(t){let e=Oz(t);return Lz(t).length===0?vs.configDotenv(t):Nz.existsSync(e)?vs._configVault(t):(Jqe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),vs.configDotenv(t))}function rje(t,e){let r=Buffer.from(e.slice(-64),"hex"),o=Buffer.from(t,"base64"),a=o.slice(0,12),n=o.slice(-16);o=o.slice(12,-16);try{let u=Gqe.createDecipheriv("aes-256-gcm",r,a);return u.setAuthTag(n),`${u.update(o)}${u.final()}`}catch(u){let A=u instanceof RangeError,p=u.message==="Invalid key length",h=u.message==="Unsupported state or unable to authenticate data";if(A||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",u.code),console.error("Error: ",u.message),u}}function nje(t,e,r={}){let o=!!(r&&r.debug),a=!!(r&&r.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),o&&BN(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):t[n]=e[n]}var vs={configDotenv:eje,_configVault:$qe,_parseVault:Vqe,config:tje,decrypt:rje,parse:Kqe,populate:nje};Ef.exports.configDotenv=vs.configDotenv;Ef.exports._configVault=vs._configVault;Ef.exports._parseVault=vs._parseVault;Ef.exports.config=vs.config;Ef.exports.decrypt=vs.decrypt;Ef.exports.parse=vs.parse;Ef.exports.populate=vs.populate;Ef.exports=vs});var _z=_((hQt,Uz)=>{"use strict";Uz.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var ug=_((gQt,PN)=>{"use strict";var ije=_z(),Hz=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,o=()=>{r--,e.length>0&&e.shift()()},a=(A,p,...h)=>{r++;let E=ije(A,...h);p(E),E.then(o,o)},n=(A,p,...h)=>{r<t?a(A,p,...h):e.push(a.bind(null,A,p,...h))},u=(A,...p)=>new Promise(h=>n(A,h,...p));return Object.defineProperties(u,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),u};PN.exports=Hz;PN.exports.default=Hz});function zu(t){return`YN${t.toString(10).padStart(4,"0")}`}function qP(t){let e=Number(t.slice(2));if(typeof vr[e]>"u")throw new Error(`Unknown message name: "${t}"`);return e}var vr,jP=It(()=>{vr=(Me=>(Me[Me.UNNAMED=0]="UNNAMED",Me[Me.EXCEPTION=1]="EXCEPTION",Me[Me.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Me[Me.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Me[Me.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Me[Me.BUILD_DISABLED=5]="BUILD_DISABLED",Me[Me.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Me[Me.MUST_BUILD=7]="MUST_BUILD",Me[Me.MUST_REBUILD=8]="MUST_REBUILD",Me[Me.BUILD_FAILED=9]="BUILD_FAILED",Me[Me.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Me[Me.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Me[Me.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",Me[Me.FETC
Line truncated
|
||||||
`,"\r","(",")","!","|","&","^"],!0,!1),ue=function($){return e.queryPattern.test($)},Ie=function($){return e.checkFn($)},he=xe("whitespace"),De=/^[ \t\n\r]/,Ee=Te([" "," ",`
|
`,"\r","(",")","!","|","&","^"],!0,!1),ce=function($){return e.queryPattern.test($)},me=function($){return e.checkFn($)},pe=Qe("whitespace"),ve=/^[ \t\n\r]/,Ie=Ne([" "," ",`
|
||||||
`,"\r"],!1,!1),g=0,me=0,Ce=[{line:1,column:1}],fe=0,ie=[],Z=0,Se;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function Re(){return t.substring(me,g)}function ht(){return He(me,g)}function q($,se){throw se=se!==void 0?se:He(me,g),P([xe($)],t.substring(me,g),se)}function nt($,se){throw se=se!==void 0?se:He(me,g),I($,se)}function Le($,se){return{type:"literal",text:$,ignoreCase:se}}function Te($,se,be){return{type:"class",parts:$,inverted:se,ignoreCase:be}}function ke(){return{type:"any"}}function Ke(){return{type:"end"}}function xe($){return{type:"other",description:$}}function tt($){var se=Ce[$],be;if(se)return se;for(be=$-1;!Ce[be];)be--;for(se=Ce[be],se={line:se.line,column:se.column};be<$;)t.charCodeAt(be)===10?(se.line++,se.column=1):se.column++,be++;return Ce[$]=se,se}function He($,se){var be=tt($),Fe=tt(se);return{start:{offset:$,line:be.line,column:be.column},end:{offset:se,line:Fe.line,column:Fe.column}}}function x($){g<fe||(g>fe&&(fe=g,ie=[]),ie.push($))}function I($,se){return new pg($,null,null,se)}function P($,se,be){return new pg(pg.buildMessage($,se),$,se,be)}function y(){var $,se,be,Fe,lt,Et,qt,nr;if($=g,se=R(),se!==r){for(be=[],Fe=g,lt=X(),lt!==r?(t.charCodeAt(g)===124?(Et=n,g++):(Et=r,Z===0&&x(u)),Et===r&&(t.charCodeAt(g)===38?(Et=A,g++):(Et=r,Z===0&&x(p)),Et===r&&(t.charCodeAt(g)===94?(Et=h,g++):(Et=r,Z===0&&x(E)))),Et!==r?(qt=X(),qt!==r?(nr=R(),nr!==r?(lt=[lt,Et,qt,nr],Fe=lt):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r);Fe!==r;)be.push(Fe),Fe=g,lt=X(),lt!==r?(t.charCodeAt(g)===124?(Et=n,g++):(Et=r,Z===0&&x(u)),Et===r&&(t.charCodeAt(g)===38?(Et=A,g++):(Et=r,Z===0&&x(p)),Et===r&&(t.charCodeAt(g)===94?(Et=h,g++):(Et=r,Z===0&&x(E)))),Et!==r?(qt=X(),qt!==r?(nr=R(),nr!==r?(lt=[lt,Et,qt,nr],Fe=lt):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r);be!==r?(me=$,se=w(se,be),$=se):(g=$,$=r)}else g=$,$=r;return $}function R(){var $,se,be,Fe,lt,Et;return $=g,t.charCodeAt(g)===33?(se=D,g++):(se=r,Z===0&&x(b)),se!==r?(be=R(),be!==r?(me=$,se=C(be),$=se):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(se=T,g++):(se=r,Z===0&&x(N)),se!==r?(be=X(),be!==r?(Fe=y(),Fe!==r?(lt=X(),lt!==r?(t.charCodeAt(g)===41?(Et=U,g++):(Et=r,Z===0&&x(J)),Et!==r?(me=$,se=te(Fe),$=se):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,se,be,Fe,lt;if($=g,se=X(),se!==r){if(be=g,Fe=[],le.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,Z===0&&x(ce)),lt!==r)for(;lt!==r;)Fe.push(lt),le.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,Z===0&&x(ce));else Fe=r;Fe!==r?be=t.substring(be,g):be=Fe,be!==r?(me=g,Fe=ue(be),Fe?Fe=void 0:Fe=r,Fe!==r?(me=$,se=Ie(be),$=se):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function X(){var $,se;for(Z++,$=[],De.test(t.charAt(g))?(se=t.charAt(g),g++):(se=r,Z===0&&x(Ee));se!==r;)$.push(se),De.test(t.charAt(g))?(se=t.charAt(g),g++):(se=r,Z===0&&x(Ee));return Z--,$===r&&(se=r,Z===0&&x(he)),$}if(Se=a(),Se!==r&&g===t.length)return Se;throw Se!==r&&g<t.length&&x(Ke()),P(ie,fe<t.length?t.charAt(fe):null,fe<t.length?He(fe,fe+1):He(fe,fe))}NX.exports={SyntaxError:pg,parse:t9e}});var MX=_(nP=>{var{parse:r9e}=OX();nP.makeParser=(t=/[a-z]+/)=>(e,r)=>r9e(e,{queryPattern:t,checkFn:r});nP.parse=nP.makeParser()});var _X=_((lQt,UX)=>{"use strict";UX.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[Line truncated
|
`,"\r"],!1,!1),g=0,Ce=0,ye=[{line:1,column:1}],Ae=0,ie=[],Z=0,Pe;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function Re(){return t.substring(Ce,g)}function gt(){return Ue(Ce,g)}function q($,se){throw se=se!==void 0?se:Ue(Ce,g),S([Qe($)],t.substring(Ce,g),se)}function rt($,se){throw se=se!==void 0?se:Ue(Ce,g),I($,se)}function Te($,se){return{type:"literal",text:$,ignoreCase:se}}function Ne($,se,be){return{type:"class",parts:$,inverted:se,ignoreCase:be}}function xe(){return{type:"any"}}function Ye(){return{type:"end"}}function Qe($){return{type:"other",description:$}}function it($){var se=ye[$],be;if(se)return se;for(be=$-1;!ye[be];)be--;for(se=ye[be],se={line:se.line,column:se.column};be<$;)t.charCodeAt(be)===10?(se.line++,se.column=1):se.column++,be++;return ye[$]=se,se}function Ue($,se){var be=it($),Fe=it(se);return{start:{offset:$,line:be.line,column:be.column},end:{offset:se,line:Fe.line,column:Fe.column}}}function x($){g<Ae||(g>Ae&&(Ae=g,ie=[]),ie.push($))}function I($,se){return new gg($,null,null,se)}function S($,se,be){return new gg(gg.buildMessage($,se),$,se,be)}function y(){var $,se,be,Fe,lt,Et,qt,nr;if($=g,se=R(),se!==r){for(be=[],Fe=g,lt=X(),lt!==r?(t.charCodeAt(g)===124?(Et=n,g++):(Et=r,Z===0&&x(u)),Et===r&&(t.charCodeAt(g)===38?(Et=A,g++):(Et=r,Z===0&&x(p)),Et===r&&(t.charCodeAt(g)===94?(Et=h,g++):(Et=r,Z===0&&x(E)))),Et!==r?(qt=X(),qt!==r?(nr=R(),nr!==r?(lt=[lt,Et,qt,nr],Fe=lt):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r);Fe!==r;)be.push(Fe),Fe=g,lt=X(),lt!==r?(t.charCodeAt(g)===124?(Et=n,g++):(Et=r,Z===0&&x(u)),Et===r&&(t.charCodeAt(g)===38?(Et=A,g++):(Et=r,Z===0&&x(p)),Et===r&&(t.charCodeAt(g)===94?(Et=h,g++):(Et=r,Z===0&&x(E)))),Et!==r?(qt=X(),qt!==r?(nr=R(),nr!==r?(lt=[lt,Et,qt,nr],Fe=lt):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r)):(g=Fe,Fe=r);be!==r?(Ce=$,se=w(se,be),$=se):(g=$,$=r)}else g=$,$=r;return $}function R(){var $,se,be,Fe,lt,Et;return $=g,t.charCodeAt(g)===33?(se=D,g++):(se=r,Z===0&&x(b)),se!==r?(be=R(),be!==r?(Ce=$,se=C(be),$=se):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(se=T,g++):(se=r,Z===0&&x(L)),se!==r?(be=X(),be!==r?(Fe=y(),Fe!==r?(lt=X(),lt!==r?(t.charCodeAt(g)===41?(Et=U,g++):(Et=r,Z===0&&x(z)),Et!==r?(Ce=$,se=te(Fe),$=se):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=J())),$}function J(){var $,se,be,Fe,lt;if($=g,se=X(),se!==r){if(be=g,Fe=[],le.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,Z===0&&x(de)),lt!==r)for(;lt!==r;)Fe.push(lt),le.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,Z===0&&x(de));else Fe=r;Fe!==r?be=t.substring(be,g):be=Fe,be!==r?(Ce=g,Fe=ce(be),Fe?Fe=void 0:Fe=r,Fe!==r?(Ce=$,se=me(be),$=se):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function X(){var $,se;for(Z++,$=[],ve.test(t.charAt(g))?(se=t.charAt(g),g++):(se=r,Z===0&&x(Ie));se!==r;)$.push(se),ve.test(t.charAt(g))?(se=t.charAt(g),g++):(se=r,Z===0&&x(Ie));return Z--,$===r&&(se=r,Z===0&&x(pe)),$}if(Pe=a(),Pe!==r&&g===t.length)return Pe;throw Pe!==r&&g<t.length&&x(Ye()),S(ie,Ae<t.length?t.charAt(Ae):null,Ae<t.length?Ue(Ae,Ae+1):Ue(Ae,Ae))}MX.exports={SyntaxError:gg,parse:n9e}});var _X=_(rS=>{var{parse:i9e}=UX();rS.makeParser=(t=/[a-z]+/)=>(e,r)=>i9e(e,{queryPattern:t,checkFn:r});rS.parse=rS.makeParser()});var qX=_((Akt,HX)=>{"use strict";HX.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[Line truncated
|
||||||
`:`
|
`:`
|
||||||
`)+r,a=o+1,o=t.indexOf(`
|
`)+r,a=o+1,o=t.indexOf(`
|
||||||
`,a)}while(o!==-1);return n+=t.substr(a),n};rZ.exports={stringReplaceAll:g9e,stringEncaseCRLFWithFirstIndex:d9e}});var lZ=_((dQt,aZ)=>{"use strict";var m9e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,iZ=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,y9e=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,E9e=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,C9e=new Map([["n",`
|
`,a)}while(o!==-1);return n+=t.substr(a),n};iZ.exports={stringReplaceAll:m9e,stringEncaseCRLFWithFirstIndex:y9e}});var uZ=_((Ekt,cZ)=>{"use strict";var E9e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,oZ=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,C9e=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,I9e=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,w9e=new Map([["n",`
|
||||||
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function oZ(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):C9e.get(t)||t}function I9e(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(y9e))r.push(a[2].replace(E9e,(A,p,h)=>p?oZ(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function w9e(t){iZ.lastIndex=0;let e=[],r;for(;(r=iZ.exec(t))!==null;){let o=r[1];if(r[2]){let a=I9e(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function sZ(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}aZ.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(m9e,(n,u,A,p,h,E)=>{if(u)a.push(oZ(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:sZ(t,r)(w)),r.push({inverse:A,styles:w9e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(sZ(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var sN=_((mQt,fZ)=>{"use strict";var jw=qw(),{stdout:tN,stderr:rN}=$L(),{stringReplaceAll:B9e,stringEncaseCRLFWithFirstIndex:v9e}=nZ(),cZ=["ansi","ansi","ansi256","ansi16m"],Nm=Object.create(null),D9e=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=tN?tN.level:0;t.level=e.level===void 0?r:e.level},nN=class{constructor(e){return uZ(e)}},uZ=t=>{let e={};return D9e(e,t),e.template=(...r)=>x9e(e.template,...r),Object.setPrototypeOf(e,oP.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=nN,e.template};function oP(t){return uZ(t)}for(let[t,e]of Object.entries(jw))Nm[t]={get(){let r=aP(this,iN(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Nm.visible={get(){let t=aP(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var AZ=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of AZ)Nm[t]={get(){let{level:e}=this;return function(...r){let o=iN(jw.color[cZ[e]][t](...r),jw.color.close,this._styler);return aP(this,o,this._isEmpty)}}};for(let t of AZ){let e="bg"+t[0].toUpperCase()+t.slice(1);Nm[e]={get(){let{level:r}=this;return function(...o){let a=iN(jw.bgColor[cZ[r]][t](...o),jw.bgColor.close,this._styler);return aP(this,a,this._isEmpty)}}}}var S9e=Object.defineProperties(()=>{},{...Nm,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),iN=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},aP=(t,e,r)=>{let o=(...a)=>P9e(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=S9e,o._generator=t,o._styler=e,o._isEmpty=r,o},P9e=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=B9e(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function lZ(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):w9e.get(t)||t}function B9e(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(C9e))r.push(a[2].replace(I9e,(A,p,h)=>p?lZ(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function v9e(t){oZ.lastIndex=0;let e=[],r;for(;(r=oZ.exec(t))!==null;){let o=r[1];if(r[2]){let a=B9e(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function aZ(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}cZ.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(E9e,(n,u,A,p,h,E)=>{if(u)a.push(lZ(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:aZ(t,r)(w)),r.push({inverse:A,styles:v9e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(aZ(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var sL=_((Ckt,hZ)=>{"use strict";var Ww=Gw(),{stdout:tL,stderr:rL}=$N(),{stringReplaceAll:D9e,stringEncaseCRLFWithFirstIndex:P9e}=sZ(),AZ=["ansi","ansi","ansi256","ansi16m"],Mm=Object.create(null),S9e=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=tL?tL.level:0;t.level=e.level===void 0?r:e.level},nL=class{constructor(e){return fZ(e)}},fZ=t=>{let e={};return S9e(e,t),e.template=(...r)=>Q9e(e.template,...r),Object.setPrototypeOf(e,sS.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=nL,e.template};function sS(t){return fZ(t)}for(let[t,e]of Object.entries(Ww))Mm[t]={get(){let r=oS(this,iL(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Mm.visible={get(){let t=oS(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var pZ=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of pZ)Mm[t]={get(){let{level:e}=this;return function(...r){let o=iL(Ww.color[AZ[e]][t](...r),Ww.color.close,this._styler);return oS(this,o,this._isEmpty)}}};for(let t of pZ){let e="bg"+t[0].toUpperCase()+t.slice(1);Mm[e]={get(){let{level:r}=this;return function(...o){let a=iL(Ww.bgColor[AZ[r]][t](...o),Ww.bgColor.close,this._styler);return oS(this,a,this._isEmpty)}}}}var x9e=Object.defineProperties(()=>{},{...Mm,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),iL=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},oS=(t,e,r)=>{let o=(...a)=>b9e(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=x9e,o._generator=t,o._styler=e,o._isEmpty=r,o},b9e=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=D9e(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
||||||
`);return n!==-1&&(e=v9e(e,a,o,n)),o+e+a},eN,x9e=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return eN===void 0&&(eN=lZ()),eN(t,a.join(""))};Object.defineProperties(oP.prototype,Nm);var Gw=oP();Gw.supportsColor=tN;Gw.stderr=oP({level:rN?rN.level:0});Gw.stderr.supportsColor=rN;Gw.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};fZ.exports=Gw});var lP=_(Hl=>{"use strict";Hl.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Hl.find=(t,e)=>t.nodes.find(r=>r.type===e);Hl.exceedsLimit=(t,e,r=1,o)=>o===!1||!Hl.isInteger(t)||!Hl.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=o;Hl.escapeNode=(t,e=0,r)=>{let o=t.nodes[e];o&&(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};Hl.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);Hl.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Hl.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Hl.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Hl.flatten=(...t)=>{let e=[],r=o=>{for(let a=0;a<o.length;a++){let n=o[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var cP=_((EQt,hZ)=>{"use strict";var pZ=lP();hZ.exports=(t,e={})=>{let r=(o,a={})=>{let n=e.escapeInvalid&&pZ.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A="";if(o.value)return(n||u)&&pZ.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(t)}});var dZ=_((CQt,gZ)=>{"use strict";gZ.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var DZ=_((IQt,vZ)=>{"use strict";var mZ=dZ(),hg=(t,e,r)=>{if(mZ(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(mZ(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=t+":"+e+"="+a+n+u+A;if(hg.cache.hasOwnProperty(p))return hg.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let T=t+"|"+e;return o.capture?`(${T})`:o.wrap===!1?T:`(?:${T})`}let w=BZ(t)||BZ(e),D={min:t,max:e,a:h,b:E},b=[],C=[];if(w&&(D.isPadded=w,D.maxLen=String(D.max).length),h<0){let T=E<0?Math.abs(E):1;C=yZ(T,Math.abs(h),D,o),h=D.a=0}return E>=0&&(b=yZ(h,E,D,o)),D.negatives=C,D.positives=b,D.result=b9e(C,b,o),o.capture===!0?D.result=`(${D.result})`:o.wrap!==!1&&b.length+C.length>1&&(D.result=`(?:${D.result})`),hg.cache[p]=D,D.result};function b9e(t,e,r){let o=oN(t,e,"-",!1,r)||[],a=oN(e,t,"",!1,r)||[],n=oN(t,e,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function k9e(t,e){let r=1,o=1,a=CZ(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=CZ(t,r);for(a=IZ(e+1,o)-1;t<a&&a<=e;)n.add(a),o+=1,a=IZ(e+1,o)-1;return n=[...n],n.sort(R9e),n}function Q9e(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let o=F9e(t,e),a=o.length,n="",u=0;for(let A=0;A<a;A++){let[p,h]=o[A];p===h?n+=p:p!=="0"||h!=="9"?n+=T9e(p,h,r):u++}return u&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[u],digits:a}}function yZ(t,e,r,o){let a=k9e(t,e),n=[],u=t,A;for(let p=0;p<a.length;p++){let h=a[p],E=Q9e(String(u),String(h),o),w="";if(!r.isPadded&&A&&A.pattern===E.pattern){A.count.length>1&&A.count.pop(),A.count.push(E.count[0]),A.string=A.pattern+wZ(A.count),u=h+1;continue}r.isPadded&&(w=L9e(h,r,o)),E.string=w+E.pattern+wZ(E.count),n.push(E),u=h+1,A=E}return n}function oN(t,e,r,o,a){let n=[];for(let u of t){let{string:A}=u;!o&&!EZ(e,"string",A)&&n.push(r+A),o&&EZ(e,"string",A)&&n.push(r+A)}return n}function F9e(t,e){let r=[];for(let o=0;o<t.length;o++)r.push([t[o],e[o]]);return r}function R9e(t,e){return t>e?1:e>t?-1:0}function EZ(t,e,r){return t.some(o=>o[e]===r)}function CZ(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function IZ(t,e){return t-t%Math.pow(10,e)}function wZ(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function T9e(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function BZ(t){return/^-?(0+)\d/.test(t)}function L9e(t,e,r){if(!e.isPadded)return t;let o=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${o}}`:`0{${o}}`}}hg.cache={};hg.clearCache=()=>hg.cache={};vZ.exports=hg});var cN=_((wQt,RZ)=>{"use strict";var N9e=ve("util"),xZ=DZ(),SZ=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),O9e=t
Line truncated
|
`);return n!==-1&&(e=P9e(e,a,o,n)),o+e+a},eL,Q9e=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return eL===void 0&&(eL=uZ()),eL(t,a.join(""))};Object.defineProperties(sS.prototype,Mm);var Yw=sS();Yw.supportsColor=tL;Yw.stderr=sS({level:rL?rL.level:0});Yw.stderr.supportsColor=rL;Yw.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};hZ.exports=Yw});var aS=_(Hl=>{"use strict";Hl.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Hl.find=(t,e)=>t.nodes.find(r=>r.type===e);Hl.exceedsLimit=(t,e,r=1,o)=>o===!1||!Hl.isInteger(t)||!Hl.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=o;Hl.escapeNode=(t,e=0,r)=>{let o=t.nodes[e];o&&(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};Hl.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);Hl.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Hl.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Hl.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Hl.flatten=(...t)=>{let e=[],r=o=>{for(let a=0;a<o.length;a++){let n=o[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var lS=_((wkt,dZ)=>{"use strict";var gZ=aS();dZ.exports=(t,e={})=>{let r=(o,a={})=>{let n=e.escapeInvalid&&gZ.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A="";if(o.value)return(n||u)&&gZ.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(t)}});var yZ=_((Bkt,mZ)=>{"use strict";mZ.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var SZ=_((vkt,PZ)=>{"use strict";var EZ=yZ(),dg=(t,e,r)=>{if(EZ(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(EZ(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=t+":"+e+"="+a+n+u+A;if(dg.cache.hasOwnProperty(p))return dg.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let T=t+"|"+e;return o.capture?`(${T})`:o.wrap===!1?T:`(?:${T})`}let w=DZ(t)||DZ(e),D={min:t,max:e,a:h,b:E},b=[],C=[];if(w&&(D.isPadded=w,D.maxLen=String(D.max).length),h<0){let T=E<0?Math.abs(E):1;C=CZ(T,Math.abs(h),D,o),h=D.a=0}return E>=0&&(b=CZ(h,E,D,o)),D.negatives=C,D.positives=b,D.result=k9e(C,b,o),o.capture===!0?D.result=`(${D.result})`:o.wrap!==!1&&b.length+C.length>1&&(D.result=`(?:${D.result})`),dg.cache[p]=D,D.result};function k9e(t,e,r){let o=oL(t,e,"-",!1,r)||[],a=oL(e,t,"",!1,r)||[],n=oL(t,e,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function F9e(t,e){let r=1,o=1,a=wZ(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=wZ(t,r);for(a=BZ(e+1,o)-1;t<a&&a<=e;)n.add(a),o+=1,a=BZ(e+1,o)-1;return n=[...n],n.sort(N9e),n}function R9e(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let o=T9e(t,e),a=o.length,n="",u=0;for(let A=0;A<a;A++){let[p,h]=o[A];p===h?n+=p:p!=="0"||h!=="9"?n+=L9e(p,h,r):u++}return u&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[u],digits:a}}function CZ(t,e,r,o){let a=F9e(t,e),n=[],u=t,A;for(let p=0;p<a.length;p++){let h=a[p],E=R9e(String(u),String(h),o),w="";if(!r.isPadded&&A&&A.pattern===E.pattern){A.count.length>1&&A.count.pop(),A.count.push(E.count[0]),A.string=A.pattern+vZ(A.count),u=h+1;continue}r.isPadded&&(w=O9e(h,r,o)),E.string=w+E.pattern+vZ(E.count),n.push(E),u=h+1,A=E}return n}function oL(t,e,r,o,a){let n=[];for(let u of t){let{string:A}=u;!o&&!IZ(e,"string",A)&&n.push(r+A),o&&IZ(e,"string",A)&&n.push(r+A)}return n}function T9e(t,e){let r=[];for(let o=0;o<t.length;o++)r.push([t[o],e[o]]);return r}function N9e(t,e){return t>e?1:e>t?-1:0}function IZ(t,e,r){return t.some(o=>o[e]===r)}function wZ(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function BZ(t,e){return t-t%Math.pow(10,e)}function vZ(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function L9e(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function DZ(t){return/^-?(0+)\d/.test(t)}function O9e(t,e,r){if(!e.isPadded)return t;let o=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${o}}`:`0{${o}}`}}dg.cache={};dg.clearCache=()=>dg.cache={};PZ.exports=dg});var cL=_((Dkt,NZ)=>{"use strict";var M9e=De("util"),QZ=SZ(),xZ=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),U9e=t
Line truncated
|
||||||
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var YZ=_((SQt,WZ)=>{"use strict";var K9e=cP(),{MAX_LENGTH:qZ,CHAR_BACKSLASH:uN,CHAR_BACKTICK:J9e,CHAR_COMMA:z9e,CHAR_DOT:X9e,CHAR_LEFT_PARENTHESES:Z9e,CHAR_RIGHT_PARENTHESES:$9e,CHAR_LEFT_CURLY_BRACE:e7e,CHAR_RIGHT_CURLY_BRACE:t7e,CHAR_LEFT_SQUARE_BRACKET:jZ,CHAR_RIGHT_SQUARE_BRACKET:GZ,CHAR_DOUBLE_QUOTE:r7e,CHAR_SINGLE_QUOTE:n7e,CHAR_NO_BREAK_SPACE:i7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:s7e}=HZ(),o7e=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},o=typeof r.maxLength=="number"?Math.min(qZ,r.maxLength):qZ;if(t.length>o)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${o})`);let a={type:"root",input:t,nodes:[]},n=[a],u=a,A=a,p=0,h=t.length,E=0,w=0,D,b={},C=()=>t[E++],T=N=>{if(N.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&N.type==="text"){A.value+=N.value;return}return u.nodes.push(N),N.parent=u,N.prev=A,A=N,N};for(T({type:"bos"});E<h;)if(u=n[n.length-1],D=C(),!(D===s7e||D===i7e)){if(D===uN){T({type:"text",value:(e.keepEscaping?D:"")+C()});continue}if(D===GZ){T({type:"text",value:"\\"+D});continue}if(D===jZ){p++;let N=!0,U;for(;E<h&&(U=C());){if(D+=U,U===jZ){p++;continue}if(U===uN){D+=C();continue}if(U===GZ&&(p--,p===0))break}T({type:"text",value:D});continue}if(D===Z9e){u=T({type:"paren",nodes:[]}),n.push(u),T({type:"text",value:D});continue}if(D===$9e){if(u.type!=="paren"){T({type:"text",value:D});continue}u=n.pop(),T({type:"text",value:D}),u=n[n.length-1];continue}if(D===r7e||D===n7e||D===J9e){let N=D,U;for(e.keepQuotes!==!0&&(D="");E<h&&(U=C());){if(U===uN){D+=U+C();continue}if(U===N){e.keepQuotes===!0&&(D+=U);break}D+=U}T({type:"text",value:D});continue}if(D===e7e){w++;let U={type:"brace",open:!0,close:!1,dollar:A.value&&A.value.slice(-1)==="$"||u.dollar===!0,depth:w,commas:0,ranges:0,nodes:[]};u=T(U),n.push(u),T({type:"open",value:D});continue}if(D===t7e){if(u.type!=="brace"){T({type:"text",value:D});continue}let N="close";u=n.pop(),u.close=!0,T({type:N,value:D}),w--,u=n[n.length-1];continue}if(D===z9e&&w>0){if(u.ranges>0){u.ranges=0;let N=u.nodes.shift();u.nodes=[N,{type:"text",value:K9e(u)}]}T({type:"comma",value:D}),u.commas++;continue}if(D===X9e&&w>0&&u.commas===0){let N=u.nodes;if(w===0||N.length===0){T({type:"text",value:D});continue}if(A.type==="dot"){if(u.range=[],A.value+=D,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){N.pop();let U=N[N.length-1];U.value+=A.value+D,A=U,u.ranges--;continue}T({type:"dot",value:D});continue}T({type:"text",value:D})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(J=>{J.nodes||(J.type==="open"&&(J.isOpen=!0),J.type==="close"&&(J.isClose=!0),J.nodes||(J.type="text"),J.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(u);N.nodes.splice(U,1,...u.nodes)}while(n.length>0);return T({type:"eos"}),a};WZ.exports=o7e});var JZ=_((PQt,KZ)=>{"use strict";var VZ=cP(),a7e=NZ(),l7e=UZ(),c7e=YZ(),al=(t,e={})=>{let r=[];if(Array.isArray(t))for(let o of t){let a=al.create(o,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(al.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};al.parse=(t,e={})=>c7e(t,e);al.stringify=(t,e={})=>VZ(typeof t=="string"?al.parse(t,e):t,e);al.compile=(t,e={})=>(typeof t=="string"&&(t=al.parse(t,e)),a7e(t,e));al.expand=(t,e={})=>{typeof t=="string"&&(t=al.parse(t,e));let r=l7e(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};al.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?al.compile(t,e):al.expand(t,e);KZ.exports=al});var Yw=_((xQt,e$)=>{"use strict";var u7e=ve("path"),zu="\\\\/",zZ=`[^${zu}]`,Bf="\\.",A7e="\\+",f7e="\\?",AP="\\/",p7e="(?=.)",XZ="[^/]",AN=`(?:${AP}|$)`,ZZ=`(?:^|${AP})`,fN=`${Bf}{1,2}${AN}`,h7e=`(?!${Bf})`,g7e=`(?!${ZZ}${fN})`,d7e=`(?!${Bf}{0,1}${AN})`,m7e=`(?!${fN})`,y7e=`[^.${AP}]`,E7e=`${XZ}*?`,$Z={DOT_LITERAL:Bf,PLUS_LITERAL:A7e,QMARK_LITERAL:f7e,SLASH_LITERAL:AP,ONE_CHAR:p7e,QMARK:XZ,END_ANCHOR:AN,DOTS_SLASH:fN,NO_DOT:h7e,NO_DOTS:g7e,NO_DOT_SLASH:d7e,NO_DOTS_SLASH:m7e,QMARK_NO_DOT:y7e,STAR:E7e,START_ANCHOR:ZZ},C7e={...$Z,SLASH_LITERAL:`[${zu}]`,QMARK:zZ,STAR:`${zZ}*?`,DOTS_SLASH:`${Bf}{1,2}(?:[${zu}]|$)`,NO_DOT:`(?!${Bf})`,NO_DOTS:`(?!(?:^|[${zu}])${Bf}{1,2}(?:[${zu}]|$))`,NO_DOT_SLASH:`(?!${Bf}{0,1}(?:[${zu}]|$))`,NO_DOTS_SLASH:`(?!${Bf}{1,2}(?:[${zu}]|$))`,QMARK_NO_DOT:`[^.${zu}]`,START_ANCHOR:`(?:^|[${zu}])`,END_ANCHOR:`(?:[${zu}]|$)`},I7e={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",spacLine truncated
|
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var VZ=_((bkt,KZ)=>{"use strict";var J9e=lS(),{MAX_LENGTH:GZ,CHAR_BACKSLASH:uL,CHAR_BACKTICK:X9e,CHAR_COMMA:Z9e,CHAR_DOT:$9e,CHAR_LEFT_PARENTHESES:e7e,CHAR_RIGHT_PARENTHESES:t7e,CHAR_LEFT_CURLY_BRACE:r7e,CHAR_RIGHT_CURLY_BRACE:n7e,CHAR_LEFT_SQUARE_BRACKET:WZ,CHAR_RIGHT_SQUARE_BRACKET:YZ,CHAR_DOUBLE_QUOTE:i7e,CHAR_SINGLE_QUOTE:s7e,CHAR_NO_BREAK_SPACE:o7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:a7e}=jZ(),l7e=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},o=typeof r.maxLength=="number"?Math.min(GZ,r.maxLength):GZ;if(t.length>o)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${o})`);let a={type:"root",input:t,nodes:[]},n=[a],u=a,A=a,p=0,h=t.length,E=0,w=0,D,b={},C=()=>t[E++],T=L=>{if(L.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&L.type==="text"){A.value+=L.value;return}return u.nodes.push(L),L.parent=u,L.prev=A,A=L,L};for(T({type:"bos"});E<h;)if(u=n[n.length-1],D=C(),!(D===a7e||D===o7e)){if(D===uL){T({type:"text",value:(e.keepEscaping?D:"")+C()});continue}if(D===YZ){T({type:"text",value:"\\"+D});continue}if(D===WZ){p++;let L=!0,U;for(;E<h&&(U=C());){if(D+=U,U===WZ){p++;continue}if(U===uL){D+=C();continue}if(U===YZ&&(p--,p===0))break}T({type:"text",value:D});continue}if(D===e7e){u=T({type:"paren",nodes:[]}),n.push(u),T({type:"text",value:D});continue}if(D===t7e){if(u.type!=="paren"){T({type:"text",value:D});continue}u=n.pop(),T({type:"text",value:D}),u=n[n.length-1];continue}if(D===i7e||D===s7e||D===X9e){let L=D,U;for(e.keepQuotes!==!0&&(D="");E<h&&(U=C());){if(U===uL){D+=U+C();continue}if(U===L){e.keepQuotes===!0&&(D+=U);break}D+=U}T({type:"text",value:D});continue}if(D===r7e){w++;let U={type:"brace",open:!0,close:!1,dollar:A.value&&A.value.slice(-1)==="$"||u.dollar===!0,depth:w,commas:0,ranges:0,nodes:[]};u=T(U),n.push(u),T({type:"open",value:D});continue}if(D===n7e){if(u.type!=="brace"){T({type:"text",value:D});continue}let L="close";u=n.pop(),u.close=!0,T({type:L,value:D}),w--,u=n[n.length-1];continue}if(D===Z9e&&w>0){if(u.ranges>0){u.ranges=0;let L=u.nodes.shift();u.nodes=[L,{type:"text",value:J9e(u)}]}T({type:"comma",value:D}),u.commas++;continue}if(D===$9e&&w>0&&u.commas===0){let L=u.nodes;if(w===0||L.length===0){T({type:"text",value:D});continue}if(A.type==="dot"){if(u.range=[],A.value+=D,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){L.pop();let U=L[L.length-1];U.value+=A.value+D,A=U,u.ranges--;continue}T({type:"dot",value:D});continue}T({type:"text",value:D})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(z=>{z.nodes||(z.type==="open"&&(z.isOpen=!0),z.type==="close"&&(z.isClose=!0),z.nodes||(z.type="text"),z.invalid=!0)});let L=n[n.length-1],U=L.nodes.indexOf(u);L.nodes.splice(U,1,...u.nodes)}while(n.length>0);return T({type:"eos"}),a};KZ.exports=l7e});var XZ=_((Qkt,JZ)=>{"use strict";var zZ=lS(),c7e=MZ(),u7e=HZ(),A7e=VZ(),al=(t,e={})=>{let r=[];if(Array.isArray(t))for(let o of t){let a=al.create(o,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(al.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};al.parse=(t,e={})=>A7e(t,e);al.stringify=(t,e={})=>zZ(typeof t=="string"?al.parse(t,e):t,e);al.compile=(t,e={})=>(typeof t=="string"&&(t=al.parse(t,e)),c7e(t,e));al.expand=(t,e={})=>{typeof t=="string"&&(t=al.parse(t,e));let r=u7e(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};al.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?al.compile(t,e):al.expand(t,e);JZ.exports=al});var Vw=_((kkt,r$)=>{"use strict";var f7e=De("path"),Ju="\\\\/",ZZ=`[^${Ju}]`,Bf="\\.",p7e="\\+",h7e="\\?",uS="\\/",g7e="(?=.)",$Z="[^/]",AL=`(?:${uS}|$)`,e$=`(?:^|${uS})`,fL=`${Bf}{1,2}${AL}`,d7e=`(?!${Bf})`,m7e=`(?!${e$}${fL})`,y7e=`(?!${Bf}{0,1}${AL})`,E7e=`(?!${fL})`,C7e=`[^.${uS}]`,I7e=`${$Z}*?`,t$={DOT_LITERAL:Bf,PLUS_LITERAL:p7e,QMARK_LITERAL:h7e,SLASH_LITERAL:uS,ONE_CHAR:g7e,QMARK:$Z,END_ANCHOR:AL,DOTS_SLASH:fL,NO_DOT:d7e,NO_DOTS:m7e,NO_DOT_SLASH:y7e,NO_DOTS_SLASH:E7e,QMARK_NO_DOT:C7e,STAR:I7e,START_ANCHOR:e$},w7e={...t$,SLASH_LITERAL:`[${Ju}]`,QMARK:ZZ,STAR:`${ZZ}*?`,DOTS_SLASH:`${Bf}{1,2}(?:[${Ju}]|$)`,NO_DOT:`(?!${Bf})`,NO_DOTS:`(?!(?:^|[${Ju}])${Bf}{1,2}(?:[${Ju}]|$))`,NO_DOT_SLASH:`(?!${Bf}{0,1}(?:[${Ju}]|$))`,NO_DOTS_SLASH:`(?!${Bf}{1,2}(?:[${Ju}]|$))`,QMARK_NO_DOT:`[^.${Ju}]`,START_ANCHOR:`(?:^|[${Ju}])`,END_ANCHOR:`(?:[${Ju}]|$)`},B7e={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",spacLine truncated
|
||||||
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var py,YM=It(()=>{Kl();Io();py=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));return o||null}getFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));if(!o)throw new Jt(11,`${jr(r.project.configuration,e)} isn't supported by any available fetcher`);return o}}});var Sg,VM=It(()=>{Io();Sg=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,o){return this.getResolverByDescriptor(e,o).bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,o){return await this.getResolverByDescriptor(e,o).getCandidates(e,r,o)}async getSatisfying(e,r,o,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,o,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));return o||null}getResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!o)throw new Error(`${Jn(r.project.configuration,e)} isn't supported by any available resolver`);return o}tryResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));return o||null}getResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));if(!o)throw new Error(`${jr(r.project.configuration,e)} isn't supported by any available resolver`);return o}}});var hy,KM=It(()=>{St();Io();hy=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Ps(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Ps(e,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,u,r)}getLocatorFilename(e){return ly(e)}async ensureVirtualLink(e,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(e),A=qs.makeVirtualPath(n,u,a),p=new ju(A,{baseFs:r.packageFs,pathUtils:V});return{...r,packageFs:p}}}});var Ix,woe=It(()=>{Ix=class t{static{this.protocol="virtual:"}static isVirtualDescriptor(e){return!!e.range.startsWith(t.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(t.protocol)}supportsDescriptor(e,r){return t.isVirtualDescriptor(e)}supportsLocator(e,r){return t.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,o,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}});var gy,JM=It(()=>{St();Dg();gy=class{supports(e){return!!e.reference.startsWith(ci.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let o=this.getWorkspace(e,r).cwd;return{packageFs:new En(o),prefixPath:Bt.dot,localPath:o}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(ci.protocol.length))}}});function x1(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Boe(t){return typeof t>"u"?3:x1(t)?0:Array.isArray(t)?1:2}function ZM(t,e){return Object.hasOwn(t,e)}function mrt(t){return x1(t)&&ZM(t,"onConflict")&&typeof t.onConflict=="string"}function yrt(t){if(typeof t>"u")return{onConflict:"default",value:t};if(!mrt(t))return{onConflict:"default",value:t};if(ZM(t,"value"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function voe(t,e){let r=x1(t)&&ZM(t,e)?t[e]:void 0;return yrt(r)}function dy(t,e){return[t,e,Doe]}function $M(t){return Array.isArray(t)?t[2]===Doe:!1}function zM(t,e){if(x1(t)){let r={};for(let o of Object.keys(t))r[o]=zM(t[o],e);return dy(e,r)}return Array.isArray(t)?dy(e,t.map(r=>zM(r,e))):dy(e,t)}function XM(t,e,r,o,a){let n,u=[],A=a,p=0;for(let E=a-Line truncated
|
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var gy,VM=It(()=>{Vl();Io();gy=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));return o||null}getFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));if(!o)throw new zt(11,`${jr(r.project.configuration,e)} isn't supported by any available fetcher`);return o}}});var xg,zM=It(()=>{Io();xg=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,o){return this.getResolverByDescriptor(e,o).bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,o){return await this.getResolverByDescriptor(e,o).getCandidates(e,r,o)}async getSatisfying(e,r,o,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,o,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));return o||null}getResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!o)throw new Error(`${zn(r.project.configuration,e)} isn't supported by any available resolver`);return o}tryResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));return o||null}getResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));if(!o)throw new Error(`${jr(r.project.configuration,e)} isn't supported by any available resolver`);return o}}});var dy,JM=It(()=>{Pt();Io();dy=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Ss(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Ss(e,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,u,r)}getLocatorFilename(e){return uy(e)}async ensureVirtualLink(e,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(e),A=qs.makeVirtualPath(n,u,a),p=new ju(A,{baseFs:r.packageFs,pathUtils:K});return{...r,packageFs:p}}}});var Ix,voe=It(()=>{Ix=class t{static{this.protocol="virtual:"}static isVirtualDescriptor(e){return!!e.range.startsWith(t.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(t.protocol)}supportsDescriptor(e,r){return t.isVirtualDescriptor(e)}supportsLocator(e,r){return t.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,o,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}});var my,XM=It(()=>{Pt();Sg();my=class{supports(e){return!!e.reference.startsWith(ci.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let o=this.getWorkspace(e,r).cwd;return{packageFs:new En(o),prefixPath:Bt.dot,localPath:o}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(ci.protocol.length))}}});function x1(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Doe(t){return typeof t>"u"?3:x1(t)?0:Array.isArray(t)?1:2}function e4(t,e){return Object.hasOwn(t,e)}function Ert(t){return x1(t)&&e4(t,"onConflict")&&typeof t.onConflict=="string"}function Crt(t){if(typeof t>"u")return{onConflict:"default",value:t};if(!Ert(t))return{onConflict:"default",value:t};if(e4(t,"value"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function Poe(t,e){let r=x1(t)&&e4(t,e)?t[e]:void 0;return Crt(r)}function yy(t,e){return[t,e,Soe]}function t4(t){return Array.isArray(t)?t[2]===Soe:!1}function ZM(t,e){if(x1(t)){let r={};for(let o of Object.keys(t))r[o]=ZM(t[o],e);return yy(e,r)}return Array.isArray(t)?yy(e,t.map(r=>ZM(r,e))):yy(e,t)}function $M(t,e,r,o,a){let n,u=[],A=a,p=0;for(let E=a-Line truncated
|
||||||
`,w.message,w.stack);var D=new Error("tunneling socket could not be established, cause="+w.message);D.code="ECONNRESET",e.request.emit("error",D),o.removeSocket(a)}};kf.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function boe(t,e){var r=this;kf.prototype.createSocket.call(r,t,function(o){var a=t.request.getHeader("host"),n=s4({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):t.host}),u=Crt.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,e(u)})}function koe(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function s4(t){for(var e=1,r=arguments.length;e<r;++e){var o=arguments[e];if(typeof o=="object")for(var a=Object.keys(o),n=0,u=a.length;n<u;++n){var A=a[n];o[A]!==void 0&&(t[A]=o[A])}}return t}var ch;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ch=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:ch=function(){};yy.debug=ch});var Roe=_((jLt,Foe)=>{Foe.exports=Qoe()});var Ff=_((Qf,Dx)=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Toe=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Prt(t){return Toe.includes(t)}var xrt=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...Toe];function brt(t){return xrt.includes(t)}var krt=["null","undefined","string","number","bigint","boolean","symbol"];function Qrt(t){return krt.includes(t)}function Ey(t){return e=>typeof e===t}var{toString:Loe}=Object.prototype,k1=t=>{let e=Loe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Pe.domElement(t))return"HTMLElement";if(brt(e))return e},ii=t=>e=>k1(e)===t;function Pe(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(Pe.observable(t))return"Observable";if(Pe.array(t))return"Array";if(Pe.buffer(t))return"Buffer";let e=k1(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Pe.undefined=Ey("undefined");Pe.string=Ey("string");var Frt=Ey("number");Pe.number=t=>Frt(t)&&!Pe.nan(t);Pe.bigint=Ey("bigint");Pe.function_=Ey("function");Pe.null_=t=>t===null;Pe.class_=t=>Pe.function_(t)&&t.toString().startsWith("class ");Pe.boolean=t=>t===!0||t===!1;Pe.symbol=Ey("symbol");Pe.numericString=t=>Pe.string(t)&&!Pe.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Pe.array=(t,e)=>Array.isArray(t)?Pe.function_(e)?t.every(e):!0:!1;Pe.buffer=t=>{var e,r,o,a;return(a=(o=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,t))!==null&&a!==void 0?a:!1};Pe.blob=t=>ii("Blob")(t);Pe.nullOrUndefined=t=>Pe.null_(t)||Pe.undefined(t);Pe.object=t=>!Pe.null_(t)&&(typeof t=="object"||Pe.function_(t));Pe.iterable=t=>{var e;return Pe.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};Pe.asyncIterable=t=>{var e;return Pe.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};Pe.generator=t=>{var e,r;return Pe.iterable(t)&&Pe.function_((e=t)===null||e===void 0?void 0:e.next)&&Pe.function_((r=t)===null||r===void 0?void 0:r.throw)};Pe.asyncGenerator=t=>Pe.asyncIterable(t)&&Pe.function_(t.next)&&Pe.function_(t.throw);Pe.nativePromise=t=>ii("Promise")(t);var Rrt=t=>{var e,r;return Pe.function_((e=t)===null||e===void 0?void 0:e.then)&&Pe.function_((r=t)===null||r===void 0?void 0:r.catch)};Pe.promise=t=>Pe.nativePromise(t)||Rrt(t);Pe.generatorFunction=ii("GeneratorFunction");Pe.asyncGeneratorFunction=t=>k1(t)==="AsyncGeneratorFunction";Pe.asyncFunction=t=>k1(t)==="AsyncFunction";Pe.boundFunction=t=>Pe.function_(t)&&!t.hasOwnProperty("prototype");Pe.regExp=ii("RegExp");Pe.date=ii("Date");Pe.error=ii("Error");Pe.map=t=>ii("Map")(t);Pe.set=t=>ii("Set")(t);Pe.weakMap=t=>ii("WeakMap")(t);Pe.weakSet=t=>ii("WeakSet")(t);Pe.int8Array=ii("Int8Array");Pe.uint8Array=ii("Uint8Array");Pe.uint8ClampedArray=ii("Uint8ClampedArray");Pe.int16Array=ii("Int16Array");Pe.uint16Array=ii("Uint16Array");Pe.int32Array=ii("Int32Array");Pe.uint32Array=ii("Uint32Array");Pe.float32Array=ii("Float32Array");Pe.float64Array=ii("Float64Array");Pe.bigInt64Array=ii("BigInt64Array");Pe.bigUint64Array=ii("BigUint64Array");Pe.arrayBuffer=ii("ArrayBuffer");Pe.sharedArrayBuffer=ii("SharedArrayBuffer");P
Line truncated
|
`,w.message,w.stack);var D=new Error("tunneling socket could not be established, cause="+w.message);D.code="ECONNRESET",e.request.emit("error",D),o.removeSocket(a)}};kf.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function koe(t,e){var r=this;kf.prototype.createSocket.call(r,t,function(o){var a=t.request.getHeader("host"),n=a4({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):t.host}),u=wrt.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,e(u)})}function Foe(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function a4(t){for(var e=1,r=arguments.length;e<r;++e){var o=arguments[e];if(typeof o=="object")for(var a=Object.keys(o),n=0,u=a.length;n<u;++n){var A=a[n];o[A]!==void 0&&(t[A]=o[A])}}return t}var uh;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?uh=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:uh=function(){};Cy.debug=uh});var Noe=_((YNt,Toe)=>{Toe.exports=Roe()});var Rf=_((Ff,Dx)=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var Loe=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function brt(t){return Loe.includes(t)}var Qrt=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...Loe];function krt(t){return Qrt.includes(t)}var Frt=["null","undefined","string","number","bigint","boolean","symbol"];function Rrt(t){return Frt.includes(t)}function Iy(t){return e=>typeof e===t}var{toString:Ooe}=Object.prototype,Q1=t=>{let e=Ooe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Se.domElement(t))return"HTMLElement";if(krt(e))return e},ii=t=>e=>Q1(e)===t;function Se(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(Se.observable(t))return"Observable";if(Se.array(t))return"Array";if(Se.buffer(t))return"Buffer";let e=Q1(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Se.undefined=Iy("undefined");Se.string=Iy("string");var Trt=Iy("number");Se.number=t=>Trt(t)&&!Se.nan(t);Se.bigint=Iy("bigint");Se.function_=Iy("function");Se.null_=t=>t===null;Se.class_=t=>Se.function_(t)&&t.toString().startsWith("class ");Se.boolean=t=>t===!0||t===!1;Se.symbol=Iy("symbol");Se.numericString=t=>Se.string(t)&&!Se.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Se.array=(t,e)=>Array.isArray(t)?Se.function_(e)?t.every(e):!0:!1;Se.buffer=t=>{var e,r,o,a;return(a=(o=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,t))!==null&&a!==void 0?a:!1};Se.blob=t=>ii("Blob")(t);Se.nullOrUndefined=t=>Se.null_(t)||Se.undefined(t);Se.object=t=>!Se.null_(t)&&(typeof t=="object"||Se.function_(t));Se.iterable=t=>{var e;return Se.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};Se.asyncIterable=t=>{var e;return Se.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};Se.generator=t=>{var e,r;return Se.iterable(t)&&Se.function_((e=t)===null||e===void 0?void 0:e.next)&&Se.function_((r=t)===null||r===void 0?void 0:r.throw)};Se.asyncGenerator=t=>Se.asyncIterable(t)&&Se.function_(t.next)&&Se.function_(t.throw);Se.nativePromise=t=>ii("Promise")(t);var Nrt=t=>{var e,r;return Se.function_((e=t)===null||e===void 0?void 0:e.then)&&Se.function_((r=t)===null||r===void 0?void 0:r.catch)};Se.promise=t=>Se.nativePromise(t)||Nrt(t);Se.generatorFunction=ii("GeneratorFunction");Se.asyncGeneratorFunction=t=>Q1(t)==="AsyncGeneratorFunction";Se.asyncFunction=t=>Q1(t)==="AsyncFunction";Se.boundFunction=t=>Se.function_(t)&&!t.hasOwnProperty("prototype");Se.regExp=ii("RegExp");Se.date=ii("Date");Se.error=ii("Error");Se.map=t=>ii("Map")(t);Se.set=t=>ii("Set")(t);Se.weakMap=t=>ii("WeakMap")(t);Se.weakSet=t=>ii("WeakSet")(t);Se.int8Array=ii("Int8Array");Se.uint8Array=ii("Uint8Array");Se.uint8ClampedArray=ii("Uint8ClampedArray");Se.int16Array=ii("Int16Array");Se.uint16Array=ii("Uint16Array");Se.int32Array=ii("Int32Array");Se.uint32Array=ii("Uint32Array");Se.float32Array=ii("Float32Array");Se.float64Array=ii("Float64Array");Se.bigInt64Array=ii("BigInt64Array");Se.bigUint64Array=ii("BigUint64Array");Se.arrayBuffer=ii("ArrayBuffer");Se.sharedArrayBuffer=ii("SharedArrayBuffer");S
Line truncated
|
||||||
Please report this to https://github.com/szmarczak/http2-wrapper/`);C(T)}return}o[0].resolve(b);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let E=`${A}:${u}`,w=!1;try{let D=qnt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});D[ea]=0,D[wy]=!1;let b=()=>D[ea]<D.remoteSettings.maxConcurrentStreams,C=!0;D.socket.once("session",N=>{this.tlsSessionCache.set(E,N)}),D.once("error",N=>{for(let{reject:U}of o)U(N);this.tlsSessionCache.delete(E)}),D.setTimeout(this.timeout,()=>{D.destroy()}),D.once("close",()=>{if(w){C&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[u];N.splice(N.indexOf(D),1),N.length===0&&delete this.sessions[u]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of o)U(N);p()}this._tryToCreateNewSession(u,A)});let T=()=>{if(!(!(u in this.queue)||!b())){for(let N of D[Jl])if(N in this.queue[u]){let{listeners:U}=this.queue[u][N];for(;U.length!==0&&b();)U.shift().resolve(D);let J=this.queue[u];if(J[N].listeners.length===0&&(delete J[N],Object.keys(J).length===0)){delete this.queue[u];break}if(!b())break}}};D.on("origin",()=>{D[Jl]=D.originSet,b()&&(T(),k4(this.sessions[u],D))}),D.once("remoteSettings",()=>{if(D.ref(),D.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of o)U.reject(N);D.destroy();return}D[Jl]=D.originSet;{let N=this.sessions;if(u in N){let U=N[u];U.splice(Wnt(U,D,Ynt),0,D)}else N[u]=[D]}this._freeSessionsCount+=1,w=!0,this.emit("session",D),T(),p(),D[ea]===0&&this._freeSessionsCount>this.maxFreeSessions&&D.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),D.on("remoteSettings",()=>{T(),k4(this.sessions[u],D)})}),D[Fae]=D.request,D.request=(N,U)=>{if(D[wy])throw new Error("The session is gracefully closing. No new streams are allowed.");let J=D[Fae](N,U);return D.ref(),++D[ea],D[ea]===D.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,J.once("close",()=>{if(C=b(),--D[ea],!D.destroyed&&!D.closed&&(Vnt(this.sessions[u],D),b()&&!D.closed)){C||(this._freeSessionsCount++,C=!0);let te=D[ea]===0;te&&D.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||D[wy])?D.close():(k4(this.sessions[u],D),T())}}),J}}catch(D){for(let b of o)b.reject(D);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(e,r,o,a){return new Promise((n,u)=>{this.getSession(e,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let o=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Hnt.connect(o,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[ea]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(e);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return Rae({agent:this,isFree:!0})}get busySessions(){return Rae({agent:this,isFree:!1})}};xg.kCurrentStreamsCount=ea;xg.kGracefullyClosing=wy;Lae.exports={Agent:xg,globalAgent:new xg}});var R4=_((gNt,Nae)=>{"use strict";var{Readable:Knt}=ve("stream"),F4=class extends Knt{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Nae.exports=F4});var T4=_((dNt,Oae)=>{"use strict";Oae.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var Uae=_((mNt,Mae)=>{"use strict";Mae.exports=(t,e,r)=>{for(let o of r)t.on(o,(...a)=>e.emit(o,...a))}});var Hae=_((yNt,_ae)=>{"use strict";_ae.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var jae=_((CNt,qae)=>{"use strict";var By=(t,e,r)=>{qae.exports[e]=class extends t{constructor(...a){super(typeof r=="string"?r:
Line truncated
|
Please report this to https://github.com/szmarczak/http2-wrapper/`);C(T)}return}o[0].resolve(b);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let E=`${A}:${u}`,w=!1;try{let D=Gnt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});D[ea]=0,D[vy]=!1;let b=()=>D[ea]<D.remoteSettings.maxConcurrentStreams,C=!0;D.socket.once("session",L=>{this.tlsSessionCache.set(E,L)}),D.once("error",L=>{for(let{reject:U}of o)U(L);this.tlsSessionCache.delete(E)}),D.setTimeout(this.timeout,()=>{D.destroy()}),D.once("close",()=>{if(w){C&&this._freeSessionsCount--,this._sessionsCount--;let L=this.sessions[u];L.splice(L.indexOf(D),1),L.length===0&&delete this.sessions[u]}else{let L=new Error("Session closed without receiving a SETTINGS frame");L.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of o)U(L);p()}this._tryToCreateNewSession(u,A)});let T=()=>{if(!(!(u in this.queue)||!b())){for(let L of D[zl])if(L in this.queue[u]){let{listeners:U}=this.queue[u][L];for(;U.length!==0&&b();)U.shift().resolve(D);let z=this.queue[u];if(z[L].listeners.length===0&&(delete z[L],Object.keys(z).length===0)){delete this.queue[u];break}if(!b())break}}};D.on("origin",()=>{D[zl]=D.originSet,b()&&(T(),F4(this.sessions[u],D))}),D.once("remoteSettings",()=>{if(D.ref(),D.unref(),this._sessionsCount++,h.destroyed){let L=new Error("Agent has been destroyed");for(let U of o)U.reject(L);D.destroy();return}D[zl]=D.originSet;{let L=this.sessions;if(u in L){let U=L[u];U.splice(Knt(U,D,Vnt),0,D)}else L[u]=[D]}this._freeSessionsCount+=1,w=!0,this.emit("session",D),T(),p(),D[ea]===0&&this._freeSessionsCount>this.maxFreeSessions&&D.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),D.on("remoteSettings",()=>{T(),F4(this.sessions[u],D)})}),D[Tae]=D.request,D.request=(L,U)=>{if(D[vy])throw new Error("The session is gracefully closing. No new streams are allowed.");let z=D[Tae](L,U);return D.ref(),++D[ea],D[ea]===D.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,z.once("close",()=>{if(C=b(),--D[ea],!D.destroyed&&!D.closed&&(znt(this.sessions[u],D),b()&&!D.closed)){C||(this._freeSessionsCount++,C=!0);let te=D[ea]===0;te&&D.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||D[vy])?D.close():(F4(this.sessions[u],D),T())}}),z}}catch(D){for(let b of o)b.reject(D);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(e,r,o,a){return new Promise((n,u)=>{this.getSession(e,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let o=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),jnt.connect(o,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[ea]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(e);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return Nae({agent:this,isFree:!0})}get busySessions(){return Nae({agent:this,isFree:!1})}};Qg.kCurrentStreamsCount=ea;Qg.kGracefullyClosing=vy;Oae.exports={Agent:Qg,globalAgent:new Qg}});var N4=_((yLt,Mae)=>{"use strict";var{Readable:Jnt}=De("stream"),T4=class extends Jnt{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Mae.exports=T4});var L4=_((ELt,Uae)=>{"use strict";Uae.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var Hae=_((CLt,_ae)=>{"use strict";_ae.exports=(t,e,r)=>{for(let o of r)t.on(o,(...a)=>e.emit(o,...a))}});var jae=_((ILt,qae)=>{"use strict";qae.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var Wae=_((BLt,Gae)=>{"use strict";var Dy=(t,e,r)=>{Gae.exports[e]=class extends t{constructor(...a){super(typeof r=="string"?r:
Line truncated
|
||||||
`).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
`).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
||||||
`).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(`
|
`).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(`
|
||||||
`)}${A.reverse().join(`
|
`)}${A.reverse().join(`
|
||||||
`)}`}}};Qn.RequestError=zi;var qx=class extends zi{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};Qn.MaxRedirectsError=qx;var jx=class extends zi{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};Qn.HTTPError=jx;var Gx=class extends zi{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};Qn.CacheError=Gx;var Wx=class extends zi{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};Qn.UploadError=Wx;var Yx=class extends zi{constructor(e,r,o){super(e.message,e,o),this.name="TimeoutError",this.event=e.event,this.timings=r}};Qn.TimeoutError=Yx;var M1=class extends zi{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};Qn.ReadError=M1;var Vx=class extends zi{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};Qn.UnsupportedProtocolError=Vx;var tst=["socket","connect","continue","information","upgrade","timeout"],Kx=class extends Dle.Duplex{constructor(e,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[Dy]=0,this[Py]=0,this.requestInitialized=!1,this[Ux]=new Set,this.redirects=[],this[xy]=!1,this[_x]=!1,this[O1]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof iU.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),Qn.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,o)}catch(h){at.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof Tit.ReadStream&&await Zit(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[Ys])===null||h===void 0||h.destroy();return}for(let w of this[O1])w();this[O1].length=0,this.requestInitialized=!0}catch(E){if(E instanceof zi){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,o){var a,n,u,A,p;let h=r;if(at.default.object(e)&&!at.default.urlInstance(e))r={...o,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},e!==void 0&&(r.url=e),at.default.urlInstance(r.url)&&(r.url=new uh.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),at.assert.any([at.default.string,at.default.undefined],r.method),at.assert.any([at.default.object,at.default.undefined],r.headers),at.assert.any([at.default.string,at.default.urlInstance,at.default.undefined],r.prefixUrl),at.assert.any([at.default.object,at.default.undefined],r.cookieJar),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.searchParams),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.cache),at.assert.any([at.default.object,at.default.number,at.default.undefined],r.timeout),at.assert.any([at.default.object,at.default.undefined],r.context),at.assert.any([at.default.object,at.default.undefined],r.hooks),at.assert.any([at.default.boolean,at.default.undefined],r.decompress),at.assert.any([at.default.boolean,at.default.undefined],r.ignoreInvalidCookies),at.assert.any([at.default.boolean,at.default.undefined],r.followRedirect),at.assert.any([at.default.number,at.default.undefined],r.maxRedirects),at.assert.any([at.default.boolean,at.default.undefined],r.throwHttpErrors),at.assert.any([at.default.boolean,at.default.undefined],r.http2),at.assert.any([at.default.boolean,at.default.undefined],r.allowGetBody),at.assert.any([at.default.string,at.default.undefined],r.localAddress),at.assert.any([Qle.isDnsLookupIpVersion,at.default.undefined],r.dnsLookupIpVersion),at.assert.any([at.default.object,at.default.undefined],r.https),at.assert.any([at.default.boolean,at.default.undefined],r.rejectUnauthorized),r.https&&(at.assert.any([at.default.boolean,at.default.undefined],r.https.rejectUnauthorized),at.assert.any([at.default.function_,at.default.undefined],r.https.checkServerIdentity),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificateAuthority),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.key),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificate),at.assert.any([at.default.string,at.default.undefined],r.https.passphrase),at.assert.any([at.default.string,at.default.buffer,at.default.array,at.default.undefined],r.httpLine truncated
|
`)}`}}};kn.RequestError=Ji;var qx=class extends Ji{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};kn.MaxRedirectsError=qx;var jx=class extends Ji{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};kn.HTTPError=jx;var Gx=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};kn.CacheError=Gx;var Wx=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};kn.UploadError=Wx;var Yx=class extends Ji{constructor(e,r,o){super(e.message,e,o),this.name="TimeoutError",this.event=e.event,this.timings=r}};kn.TimeoutError=Yx;var M1=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};kn.ReadError=M1;var Kx=class extends Ji{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};kn.UnsupportedProtocolError=Kx;var nst=["socket","connect","continue","information","upgrade","timeout"],Vx=class extends Sle.Duplex{constructor(e,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[Sy]=0,this[by]=0,this.requestInitialized=!1,this[Ux]=new Set,this.redirects=[],this[Qy]=!1,this[_x]=!1,this[O1]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof oU.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),kn.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,o)}catch(h){at.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof Lit.ReadStream&&await est(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[Ys])===null||h===void 0||h.destroy();return}for(let w of this[O1])w();this[O1].length=0,this.requestInitialized=!0}catch(E){if(E instanceof Ji){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,o){var a,n,u,A,p;let h=r;if(at.default.object(e)&&!at.default.urlInstance(e))r={...o,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},e!==void 0&&(r.url=e),at.default.urlInstance(r.url)&&(r.url=new Ah.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),at.assert.any([at.default.string,at.default.undefined],r.method),at.assert.any([at.default.object,at.default.undefined],r.headers),at.assert.any([at.default.string,at.default.urlInstance,at.default.undefined],r.prefixUrl),at.assert.any([at.default.object,at.default.undefined],r.cookieJar),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.searchParams),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.cache),at.assert.any([at.default.object,at.default.number,at.default.undefined],r.timeout),at.assert.any([at.default.object,at.default.undefined],r.context),at.assert.any([at.default.object,at.default.undefined],r.hooks),at.assert.any([at.default.boolean,at.default.undefined],r.decompress),at.assert.any([at.default.boolean,at.default.undefined],r.ignoreInvalidCookies),at.assert.any([at.default.boolean,at.default.undefined],r.followRedirect),at.assert.any([at.default.number,at.default.undefined],r.maxRedirects),at.assert.any([at.default.boolean,at.default.undefined],r.throwHttpErrors),at.assert.any([at.default.boolean,at.default.undefined],r.http2),at.assert.any([at.default.boolean,at.default.undefined],r.allowGetBody),at.assert.any([at.default.string,at.default.undefined],r.localAddress),at.assert.any([Rle.isDnsLookupIpVersion,at.default.undefined],r.dnsLookupIpVersion),at.assert.any([at.default.object,at.default.undefined],r.https),at.assert.any([at.default.boolean,at.default.undefined],r.rejectUnauthorized),r.https&&(at.assert.any([at.default.boolean,at.default.undefined],r.https.rejectUnauthorized),at.assert.any([at.default.function_,at.default.undefined],r.https.checkServerIdentity),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificateAuthority),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.key),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificate),at.assert.any([at.default.string,at.default.undefined],r.https.passphrase),at.assert.any([at.default.string,at.default.buffer,at.default.array,at.default.undefined],r.httpLine truncated
|
||||||
`)[3];return _st(e)}function wU(){return typeof tb.default.availableParallelism<"u"?tb.default.availableParallelism():Math.max(1,tb.default.cpus().length)}var tb,Rst,uce,Tst,Lst,Ace,fce,Mst,Ust,rb=It(()=>{St();tb=et(ve("os"));nb();Gl();Rst=Number(process.versions.node.split(".")[0]),uce=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),Tst=typeof uce<"u"?async t=>{try{return await BU(uce,[t],{cwd:V.cwd()}),!0}catch{return!1}}:void 0,Lst="/usr/bin/ldd";Mst=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ust=/\((\S*)(?::(\d+))(?::(\d+))\)/});function xU(t,e,r,o,a){let n=b1(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>vU(t,`${e}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>vU(t,e,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return vU(t,e,r,o,a)}function vU(t,e,r,o,a){let n=b1(r);switch(o.type){case"ANY":return wx(n);case"SHAPE":return Wst(t,e,r,o,a);case"MAP":return Yst(t,e,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if(o.values?.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return f1(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let p=NP(n,{env:t.env});switch(o.type){case"ABSOLUTE_PATH":{let h=a,E=e4(r);return E&&E[0]!=="<"&&(h=V.dirname(E)),V.resolve(h,Ae.toPortablePath(p))}case"LOCATOR_LOOSE":return Pf(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return Pf(p);case"BOOLEAN":return f1(p);default:return p}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function Wst(t,e,r,o,a){let n=b1(r);if(typeof n!="object"||Array.isArray(n))throw new it(`Object configuration settings "${e}" must be an object`);let u=bU(t,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${e}.${A}`;if(!o.properties[A])throw new it(`Unrecognized configuration settings found: ${e}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,xU(t,h,p,o.properties[A],a))}return u}function Yst(t,e,r,o,a){let n=b1(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new it(`Map configuration settings "${e}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,E=`${e}['${h}']`,w=o.valueDefinition;u.set(h,xU(t,E,p,w,a))}return u}function bU(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(e.properties))o.set(a,bU(t,n));return o}case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(o=>V.normalize(o)):V.isAbsolute(e.default)?V.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(o=>V.resolve(t.projectCwd,o)):V.resolve(t.projectCwd,e.default);default:return e.default}}function sb(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return Gst;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return Ae.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let o=[];for(let a of t)o.push(sb(a,e,r));return o}if(e.type==="MAP"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=sb(n,e.valueDefinition,r);typeof u<"u"&&o.set(a,u)}return o}if(e.type==="SHAPE"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=e.properties[a],A=sb(n,u,r);typeof A<"u"&&o.set(a,A)}return o}return t}function Vst(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(ob)&&(e=(0,hce.default)(e.slice(ob.length)),t[e]=r);return t}function SU(){let t=`${ob}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return PU}async function pce(t){try{return await ae.readFilePromise(t)}catch{return Buffer.of()}}async function Kst(t,e){return Buffer.compare(...await Promise.all([pce(t),pce(e)]))===0}async function Jst(t,e){let[r,o]=await Promise.all([ae.statPromise(t),ae.statPromise(e)]);return r.dev===o.dev&&r.ino===o.ino}async function Xst({configuration:t,selfPath:e}){let r=t.get("yarnPath");return t.get("ignorePath")||r===null||r===e||await zst(r,e)?null:r}var hce,Tf,gce,dce,mce,DU,qst,j1,jst,by,ob,PU,Gst,G1,yce,ab,ib,zst,ze,W1=It(()=>{St();Ol();hce=et(jK()),Tf=et(sg());Gt();gce=et(NJ()),dce=ve("module"),mce=et(lg()),DU=ve("stream");Kse();Ay();YM();VM();KM();woe();JM();Dg();Poe();vx();Wl();ah();eb();Gl();rb();bf();Io();qst=function(){if(!Tf.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=Ae.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=ae.readJsonSync(t)}catch{ret
Line truncated
|
`)[3];return qst(e)}function vU(){return typeof tb.default.availableParallelism<"u"?tb.default.availableParallelism():Math.max(1,tb.default.cpus().length)}var tb,Nst,fce,Lst,Ost,pce,hce,_st,Hst,rb=It(()=>{Pt();tb=et(De("os"));nb();Gl();Nst=Number(process.versions.node.split(".")[0]),fce=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),Lst=typeof fce<"u"?async t=>{try{return await DU(fce,[t],{cwd:K.cwd()}),!0}catch{return!1}}:void 0,Ost="/usr/bin/ldd";_st=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Hst=/\((\S*)(?::(\d+))(?::(\d+))\)/});function QU(t,e,r,o,a){let n=b1(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>PU(t,`${e}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>PU(t,e,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return PU(t,e,r,o,a)}function PU(t,e,r,o,a){let n=b1(r);switch(o.type){case"ANY":return wx(n);case"SHAPE":return Kst(t,e,r,o,a);case"MAP":return Vst(t,e,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if(o.values?.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return p1(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let p=LS(n,{env:t.env});switch(o.type){case"ABSOLUTE_PATH":{let h=a,E=r4(r);return E&&E[0]!=="<"&&(h=K.dirname(E)),K.resolve(h,ue.toPortablePath(p))}case"LOCATOR_LOOSE":return xf(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return xf(p);case"BOOLEAN":return p1(p);default:return p}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function Kst(t,e,r,o,a){let n=b1(r);if(typeof n!="object"||Array.isArray(n))throw new nt(`Object configuration settings "${e}" must be an object`);let u=kU(t,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${e}.${A}`;if(!o.properties[A])throw new nt(`Unrecognized configuration settings found: ${e}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,QU(t,h,p,o.properties[A],a))}return u}function Vst(t,e,r,o,a){let n=b1(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new nt(`Map configuration settings "${e}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,E=`${e}['${h}']`,w=o.valueDefinition;u.set(h,QU(t,E,p,w,a))}return u}function kU(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(e.properties))o.set(a,kU(t,n));return o}case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(o=>K.normalize(o)):K.isAbsolute(e.default)?K.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(o=>K.resolve(t.projectCwd,o)):K.resolve(t.projectCwd,e.default);default:return e.default}}function sb(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return Yst;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return ue.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let o=[];for(let a of t)o.push(sb(a,e,r));return o}if(e.type==="MAP"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=sb(n,e.valueDefinition,r);typeof u<"u"&&o.set(a,u)}return o}if(e.type==="SHAPE"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=e.properties[a],A=sb(n,u,r);typeof A<"u"&&o.set(a,A)}return o}return t}function zst(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(ob)&&(e=(0,dce.default)(e.slice(ob.length)),t[e]=r);return t}function xU(){let t=`${ob}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return bU}async function gce(t){try{return await ae.readFilePromise(t)}catch{return Buffer.of()}}async function Jst(t,e){return Buffer.compare(...await Promise.all([gce(t),gce(e)]))===0}async function Xst(t,e){let[r,o]=await Promise.all([ae.statPromise(t),ae.statPromise(e)]);return r.dev===o.dev&&r.ino===o.ino}async function $st({configuration:t,selfPath:e}){let r=t.get("yarnPath");return t.get("ignorePath")||r===null||r===e||await Zst(r,e)?null:r}var dce,Nf,mce,yce,Ece,SU,Gst,j1,Wst,ky,ob,bU,Yst,G1,Cce,ab,ib,Zst,Je,W1=It(()=>{Pt();Ol();dce=et(WV()),Nf=et(ag());Gt();mce=et(Mz()),yce=De("module"),Ece=et(ug()),SU=De("stream");Jse();py();VM();zM();JM();voe();XM();Sg();boe();vx();Wl();lh();eb();Gl();rb();Qf();Io();Gst=function(){if(!Nf.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=ue.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=ae.readJsonSync(t)}catch{ret
Line truncated
|
||||||
`);return{stdout:n,stderr:u}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])e.push(new o);return new Sg([new Ix,new ci,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])e.push(new o);return new py([new hy,new gy,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let o of r.linkers||[])e.push(new o);return e}getSupportedArchitectures(){let e=q1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?e.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?e.cpu:u));let n=r.get("libc");return n!==null&&(n=ul(n,u=>u==="current"?e.libc??ul.skip:u)),{os:o,cpu:a,libc:n}}isInteractive({interactive:e,stdout:r}){return r.isTTY?e??this.get("preferInteractive"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!Fa(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new _t;u.load(a,{yamlCompatibilityMode:!0});let A=u1(e,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let E of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,w]of u.peerDependenciesMeta)for(let[D,b]of Object.entries(w))p.push({...h,type:"PeerDependencyMeta",selector:E,key:D,value:b})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(lh(o,!0),LP(a),{userProvided:!0});return e}normalizeLocator(e){return Fa(e.reference)?Ps(e,`${this.get("defaultProtocol")}${e.reference}`):by.test(e.reference)?Ps(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return Fa(e.range)?kn(e,`${this.get("defaultProtocol")}${e.range}`):by.test(e.range)?kn(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(e,{packageExtensions:r}){let o=E1(e),a=r.get(e.identHash);if(typeof a<"u"){let u=e.version;if(u!==null){for(let[A,p]of a)if(nA(u,A))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof o.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof o.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=o.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",Al(o.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:tO(h)}}}let n=u=>u.scope?`${u.scope}__${u.name}`:`${u.name}`;for(let u of o.peerDependenciesMeta.keys()){let A=Zo(u);o.peerDependencies.has(A.identHash)||o.peerDependencies.set(A.identHash,kn(A,"*"))}for(let u of o.peerDependencies.values()){if(u.scope==="types")continue;let A=n(u),p=rA("types",A),h=rn(p);o.peerDependencies.has(p.identHash)||o.peerDependenciesMeta.has(h)||(o.peerDependencies.set(p.identHash,kn(p,"*")),o.peerDependenciesMeta.set(h,{optional:!0}))}return o.dependencies=new Map(Ss(o.dependencies,([,u])=>ka(u))),o.peerDependencies=new Map(Ss(o.peerDependencies,([,u])=>ka(u))),o}getLimit(e){return Al(this.limits,e,()=>(0,mce.default)(this.get(e)))}async triggerHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);n&&await n(...r)}}async triggerMultipleHooks(e,r){for(let o of r)await this.triggerHook(e,...o)}async reduceHook(e,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=e(u);A&&(a=await A(a,...o))}return a}async firstHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);if(!n)continue;let u=await n(...r);if(typeof u<"u")return u}return null}}});var Hr={};Vt(Hr,{EndStrategy:()=>RU,ExecError:()=>lb,PipeError:()=>Y1,execvp:()=>BU,pipevp:()=>Xc});function kg(t){return t!==null&&typeof t.fd=="number"}function kU(){}function QU(){for(let t of Qg)t.kill()}async function Xc(t,e,{cwd:r,env:o=process.env,strict:a=!1,stdin:n=null,stdout:u,stderr:A,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":kg(n)&&(h[0]=n),kg(u)&&(h[1]=u),kg(A)&&(h[2]=A);let E=(0,FU.default)(t,e,{cwd:Ae.fromPortablePath(r),env:{...o,PWD:Ae.fromPortablePath(r)},stdio:h});Qg.add(E),Qg.size===1&&(process.on("SIGINT",kU),process.on("SIGTERM",QU)),!kg(n)&&n!==null&&n.pipe(E.stdin),kg(u)||E.stdout.pipe(u,{end:!1}),kg(A)||E.stderr.pipe(A,{end:!1});let w=()=>{for(let D of new Set([u,A]))kg(D)||D.end()};return new Promise((D,b)=>{E.on("error",C=>{Qg.delete(E),Qg.size===0&&(process.off("SIGINT",kU),process.off("SIGTERM",QU)),(p===2||p
Line truncated
|
`);return{stdout:n,stderr:u}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])e.push(new o);return new xg([new Ix,new ci,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])e.push(new o);return new gy([new dy,new my,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let o of r.linkers||[])e.push(new o);return e}getSupportedArchitectures(){let e=q1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?e.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?e.cpu:u));let n=r.get("libc");return n!==null&&(n=ul(n,u=>u==="current"?e.libc??ul.skip:u)),{os:o,cpu:a,libc:n}}isInteractive({interactive:e,stdout:r}){return r.isTTY?e??this.get("preferInteractive"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!Fa(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new _t;u.load(a,{yamlCompatibilityMode:!0});let A=f1(e,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let E of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,w]of u.peerDependenciesMeta)for(let[D,b]of Object.entries(w))p.push({...h,type:"PeerDependencyMeta",selector:E,key:D,value:b})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(ch(o,!0),NS(a),{userProvided:!0});return e}normalizeLocator(e){return Fa(e.reference)?Ss(e,`${this.get("defaultProtocol")}${e.reference}`):ky.test(e.reference)?Ss(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return Fa(e.range)?Qn(e,`${this.get("defaultProtocol")}${e.range}`):ky.test(e.range)?Qn(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(e,{packageExtensions:r}){let o=C1(e),a=r.get(e.identHash);if(typeof a<"u"){let u=e.version;if(u!==null){for(let[A,p]of a)if(nA(u,A))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof o.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof o.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=o.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",Al(o.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:rO(h)}}}let n=u=>u.scope?`${u.scope}__${u.name}`:`${u.name}`;for(let u of o.peerDependenciesMeta.keys()){let A=Zo(u);o.peerDependencies.has(A.identHash)||o.peerDependencies.set(A.identHash,Qn(A,"*"))}for(let u of o.peerDependencies.values()){if(u.scope==="types")continue;let A=n(u),p=rA("types",A),h=rn(p);o.peerDependencies.has(p.identHash)||o.peerDependenciesMeta.has(h)||(o.peerDependencies.set(p.identHash,Qn(p,"*")),o.peerDependenciesMeta.set(h,{optional:!0}))}return o.dependencies=new Map(Ps(o.dependencies,([,u])=>Qa(u))),o.peerDependencies=new Map(Ps(o.peerDependencies,([,u])=>Qa(u))),o}getLimit(e){return Al(this.limits,e,()=>(0,Ece.default)(this.get(e)))}async triggerHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);n&&await n(...r)}}async triggerMultipleHooks(e,r){for(let o of r)await this.triggerHook(e,...o)}async reduceHook(e,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=e(u);A&&(a=await A(a,...o))}return a}async firstHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);if(!n)continue;let u=await n(...r);if(typeof u<"u")return u}return null}}});var Hr={};Kt(Hr,{EndStrategy:()=>NU,ExecError:()=>lb,PipeError:()=>Y1,execvp:()=>DU,pipevp:()=>Xc});function Fg(t){return t!==null&&typeof t.fd=="number"}function FU(){}function RU(){for(let t of Rg)t.kill()}async function Xc(t,e,{cwd:r,env:o=process.env,strict:a=!1,stdin:n=null,stdout:u,stderr:A,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":Fg(n)&&(h[0]=n),Fg(u)&&(h[1]=u),Fg(A)&&(h[2]=A);let E=(0,TU.default)(t,e,{cwd:ue.fromPortablePath(r),env:{...o,PWD:ue.fromPortablePath(r)},stdio:h});Rg.add(E),Rg.size===1&&(process.on("SIGINT",FU),process.on("SIGTERM",RU)),!Fg(n)&&n!==null&&n.pipe(E.stdin),Fg(u)||E.stdout.pipe(u,{end:!1}),Fg(A)||E.stderr.pipe(A,{end:!1});let w=()=>{for(let D of new Set([u,A]))Fg(D)||D.end()};return new Promise((D,b)=>{E.on("error",C=>{Rg.delete(E),Rg.size===0&&(process.off("SIGINT",FU),process.off("SIGTERM",RU)),(p===2||p
Line truncated
|
||||||
This command will run a command using Yarn's portable shell.
|
This command will run a command using Yarn's portable shell.
|
||||||
|
|
||||||
Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
|
Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
|
||||||
@@ -156,124 +156,124 @@ Please report this to https://github.com/szmarczak/http2-wrapper/`);C(T)}return}
|
|||||||
Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
|
Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
|
||||||
|
|
||||||
For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
|
For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
|
||||||
`,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await ky(r,[],{cwd:Ae.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var fl,Tce=It(()=>{fl=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var gb={};Vt(gb,{fastGlobOptions:()=>Oce,isBraceExpansion:()=>jU,isGlobPattern:()=>iot,match:()=>sot,micromatchOptions:()=>hb});function iot(t){if(!pb.default.scan(t,hb).isGlob)return!1;try{pb.default.parse(t,hb)}catch{return!1}return!0}function sot(t,{cwd:e,baseFs:r}){return(0,Lce.default)(t,{...Oce,cwd:Ae.fromPortablePath(e),fs:aS(Nce.default,new Wp(r))})}function jU(t){return pb.default.scan(t,hb).isBrace}var Lce,Nce,pb,hb,Oce,Mce=It(()=>{St();Lce=et(ux()),Nce=et(ve("fs")),pb=et(Xo()),hb={strictBrackets:!0},Oce={onlyDirectories:!1,onlyFiles:!1}});function GU(){}function WU(){for(let t of Fg)t.kill()}function qce(t,e,r,o){return a=>{let n=a[0]instanceof oA.Transform?"pipe":a[0],u=a[1]instanceof oA.Transform?"pipe":a[1],A=a[2]instanceof oA.Transform?"pipe":a[2],p=(0,_ce.default)(t,e,{...o,stdio:[n,u,A]});return Fg.add(p),Fg.size===1&&(process.on("SIGINT",GU),process.on("SIGTERM",WU)),a[0]instanceof oA.Transform&&a[0].pipe(p.stdin),a[1]instanceof oA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof oA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(Fg.delete(p),Fg.size===0&&(process.off("SIGINT",GU),process.off("SIGTERM",WU)),E.code){case"ENOENT":a[2].write(`command not found: ${t}
|
`,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await Fy(r,[],{cwd:ue.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var fl,Lce=It(()=>{fl=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var gb={};Kt(gb,{fastGlobOptions:()=>Uce,isBraceExpansion:()=>WU,isGlobPattern:()=>oot,match:()=>aot,micromatchOptions:()=>hb});function oot(t){if(!pb.default.scan(t,hb).isGlob)return!1;try{pb.default.parse(t,hb)}catch{return!1}return!0}function aot(t,{cwd:e,baseFs:r}){return(0,Oce.default)(t,{...Uce,cwd:ue.fromPortablePath(e),fs:aP(Mce.default,new Yp(r))})}function WU(t){return pb.default.scan(t,hb).isBrace}var Oce,Mce,pb,hb,Uce,_ce=It(()=>{Pt();Oce=et(ux()),Mce=et(De("fs")),pb=et(Xo()),hb={strictBrackets:!0},Uce={onlyDirectories:!1,onlyFiles:!1}});function YU(){}function KU(){for(let t of Tg)t.kill()}function Gce(t,e,r,o){return a=>{let n=a[0]instanceof oA.Transform?"pipe":a[0],u=a[1]instanceof oA.Transform?"pipe":a[1],A=a[2]instanceof oA.Transform?"pipe":a[2],p=(0,qce.default)(t,e,{...o,stdio:[n,u,A]});return Tg.add(p),Tg.size===1&&(process.on("SIGINT",YU),process.on("SIGTERM",KU)),a[0]instanceof oA.Transform&&a[0].pipe(p.stdin),a[1]instanceof oA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof oA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(Tg.delete(p),Tg.size===0&&(process.off("SIGINT",YU),process.off("SIGTERM",KU)),E.code){case"ENOENT":a[2].write(`command not found: ${t}
|
||||||
`),h(127);break;case"EACCES":a[2].write(`permission denied: ${t}
|
`),h(127);break;case"EACCES":a[2].write(`permission denied: ${t}
|
||||||
`),h(128);break;default:a[2].write(`uncaught error: ${E.message}
|
`),h(128);break;default:a[2].write(`uncaught error: ${E.message}
|
||||||
`),h(1);break}}),p.on("close",E=>{Fg.delete(p),Fg.size===0&&(process.off("SIGINT",GU),process.off("SIGTERM",WU)),h(E!==null?E:129)})})}}}function jce(t){return e=>{let r=e[0]==="pipe"?new oA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function db(t,e){return VU.start(t,e)}function Uce(t,e=null){let r=new oA.PassThrough,o=new Hce.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
|
`),h(1);break}}),p.on("close",E=>{Tg.delete(p),Tg.size===0&&(process.off("SIGINT",YU),process.off("SIGTERM",KU)),h(E!==null?E:129)})})}}}function Wce(t){return e=>{let r=e[0]==="pipe"?new oA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function db(t,e){return zU.start(t,e)}function Hce(t,e=null){let r=new oA.PassThrough,o=new jce.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
|
||||||
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t(e!==null?`${e} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function Gce(t,{prefix:e}){return{stdout:Uce(r=>t.stdout.write(`${r}
|
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t(e!==null?`${e} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function Yce(t,{prefix:e}){return{stdout:Hce(r=>t.stdout.write(`${r}
|
||||||
`),t.stdout.isTTY?e:null),stderr:Uce(r=>t.stderr.write(`${r}
|
`),t.stdout.isTTY?e:null),stderr:Hce(r=>t.stderr.write(`${r}
|
||||||
`),t.stderr.isTTY?e:null)}}var _ce,oA,Hce,Fg,Zl,YU,VU,KU=It(()=>{_ce=et(MT()),oA=ve("stream"),Hce=ve("string_decoder"),Fg=new Set;Zl=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},YU=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},VU=class t{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:o,stderr:a}){let n=new t(null,e);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(e,r=1){let o=new t(this,e),a=new YU;return o.pipe=a,o.stdout=this.stdout,o.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),o}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,e[2]=o.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let e=[];for(let o=this;o;o=o.ancestor)e.push(o.exec());return(await Promise.all(e))[0]}}});var e2={};Vt(e2,{EntryCommand:()=>J1,ShellError:()=>fl,execute:()=>ky,globUtils:()=>gb});function Wce(t,e,r){let o=new pl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(o,{end:!1}),(e&2)===2&&r.stdin instanceof pl.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new fl(`Bad file descriptor: "${t}"`)}return o}function yb(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function aot(t,e,r){let o=[],a=new pl.PassThrough;return a.on("data",n=>o.push(n)),await Eb(t,e,yb(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function Yce(t,e,r){let o=t.map(async n=>{let u=await Rg(n.args,e,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function mb(t){return t.match(/[^ \r\n\t]+/g)||[]}async function Zce(t,e,r,o,a=o){switch(t.name){case"$":o(String(process.pid));break;case"#":o(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let u=mb(n);for(let A=0;A<u.length-1;++A)a(u[A]);o(u[u.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)o(n);else for(let u of mb(n))a(u)}break;case"PPID":o(String(process.ppid));break;case"RANDOM":o(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),u,A=Number.isFinite(n);if(A?n>=0&&n<e.args.length&&(u=e.args[n]):Object.hasOwn(r.variables,t.name)?u=r.variables[t.name]:Object.hasOwn(r.environment,t.name)&&(u=r.environment[t.name]),typeof u<"u"&&t.alternativeValue?u=(await Rg(t.alternativeValue,e,r)).join(" "):typeof u>"u"&&(t.defaultValue?u=(await Rg(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(u="")),typeof u>"u")throw A?new fl(`Unbound argument #${n}`):new fl(`Unbound variable "${t.name}"`);if(t.quoted)o(u);else{let p=mb(u);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<"u"&&o(h)}}break}}async function X1(t,e,r){if(t.type==="number"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: "${t.value}", only integers are allowed`)}else if(t.type==="variable"){let o=[];await Zce({...t,quoted:!0},e,r,n=>o.push(n));let a=Number(o.join(" "));return Number.isNaN(a)?X1({type:"variable",name:o.join(" ")},e,r):X1({type:"number",value:a},e,r)}else return lot[t.type](await X1(t.left,e,r),await X1(t.right,e,r))}async function Rg(t,e,r){let o=new Map,a=[],n=[],u=E=>{n.push(E)},A=()=>{n.length>0&&a.push(n.join("")),n=[]},p=E=>{u(E),A()},h=(E,w,D)=>{let b=JSON.stringify({type:E,fd:w}),C=o.get(b);typeof C>"u"&&o.set(b,C=[]),C.push(D)};for(let E of t){let w=!1;switch(E.type){case"redirection":{let D=await Rg(E.args,e,r);for(let b of D)h(E.subtype,E.fd,b)}break;case"argument":for(let D of E.segments)switch(D.type){case"text":u(D.text);break;case"glob":u(D.pattern),w=!0;break;case"shell":{let b=await aot(D.shell,e,r);if(D.quoted)u(b);else{let C=mb(b);for(let T=0;T<C.length-1;++T)p(C[T]);u(C[C.length-1])}}break;case"variable":await Zce(D,e,r,u,p);break;case"arithmetic":u(String(await X1(D.arithmetic,e,r)));break}break}if(A(),w){let D=a.pop();if(typeof D>"u")throw new Error("Assertion failed: Expected a glob pa
Line truncated
|
`),t.stderr.isTTY?e:null)}}var qce,oA,jce,Tg,Zl,VU,zU,JU=It(()=>{qce=et(UT()),oA=De("stream"),jce=De("string_decoder"),Tg=new Set;Zl=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},VU=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},zU=class t{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:o,stderr:a}){let n=new t(null,e);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(e,r=1){let o=new t(this,e),a=new VU;return o.pipe=a,o.stdout=this.stdout,o.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),o}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,e[2]=o.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let e=[];for(let o=this;o;o=o.ancestor)e.push(o.exec());return(await Promise.all(e))[0]}}});var e2={};Kt(e2,{EntryCommand:()=>z1,ShellError:()=>fl,execute:()=>Fy,globUtils:()=>gb});function Kce(t,e,r){let o=new pl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(o,{end:!1}),(e&2)===2&&r.stdin instanceof pl.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new fl(`Bad file descriptor: "${t}"`)}return o}function yb(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function cot(t,e,r){let o=[],a=new pl.PassThrough;return a.on("data",n=>o.push(n)),await Eb(t,e,yb(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function Vce(t,e,r){let o=t.map(async n=>{let u=await Ng(n.args,e,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function mb(t){return t.match(/[^ \r\n\t]+/g)||[]}async function eue(t,e,r,o,a=o){switch(t.name){case"$":o(String(process.pid));break;case"#":o(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let u=mb(n);for(let A=0;A<u.length-1;++A)a(u[A]);o(u[u.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)o(n);else for(let u of mb(n))a(u)}break;case"PPID":o(String(process.ppid));break;case"RANDOM":o(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),u,A=Number.isFinite(n);if(A?n>=0&&n<e.args.length&&(u=e.args[n]):Object.hasOwn(r.variables,t.name)?u=r.variables[t.name]:Object.hasOwn(r.environment,t.name)&&(u=r.environment[t.name]),typeof u<"u"&&t.alternativeValue?u=(await Ng(t.alternativeValue,e,r)).join(" "):typeof u>"u"&&(t.defaultValue?u=(await Ng(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(u="")),typeof u>"u")throw A?new fl(`Unbound argument #${n}`):new fl(`Unbound variable "${t.name}"`);if(t.quoted)o(u);else{let p=mb(u);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<"u"&&o(h)}}break}}async function X1(t,e,r){if(t.type==="number"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: "${t.value}", only integers are allowed`)}else if(t.type==="variable"){let o=[];await eue({...t,quoted:!0},e,r,n=>o.push(n));let a=Number(o.join(" "));return Number.isNaN(a)?X1({type:"variable",name:o.join(" ")},e,r):X1({type:"number",value:a},e,r)}else return uot[t.type](await X1(t.left,e,r),await X1(t.right,e,r))}async function Ng(t,e,r){let o=new Map,a=[],n=[],u=E=>{n.push(E)},A=()=>{n.length>0&&a.push(n.join("")),n=[]},p=E=>{u(E),A()},h=(E,w,D)=>{let b=JSON.stringify({type:E,fd:w}),C=o.get(b);typeof C>"u"&&o.set(b,C=[]),C.push(D)};for(let E of t){let w=!1;switch(E.type){case"redirection":{let D=await Ng(E.args,e,r);for(let b of D)h(E.subtype,E.fd,b)}break;case"argument":for(let D of E.segments)switch(D.type){case"text":u(D.text);break;case"glob":u(D.pattern),w=!0;break;case"shell":{let b=await cot(D.shell,e,r);if(D.quoted)u(b);else{let C=mb(b);for(let T=0;T<C.length-1;++T)p(C[T]);u(C[C.length-1])}}break;case"variable":await eue(D,e,r,u,p);break;case"arithmetic":u(String(await X1(D.arithmetic,e,r)));break}break}if(A(),w){let D=a.pop();if(typeof D>"u")throw new Error("Assertion failed: Expected a glob pa
Line truncated
|
||||||
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(mm(t))}' has ended
|
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(Em(t))}' has ended
|
||||||
`)})),0}return await Kce(t,e,r)}async function fot(t,e,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await Aot(A.chain,e,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof fl))throw p;return r.stderr.write(`${p.message}
|
`)})),0}return await Jce(t,e,r)}async function hot(t,e,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await pot(A.chain,e,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof fl))throw p;return r.stderr.write(`${p.message}
|
||||||
`),1}};for(n(await u(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await u(t.then.line));break;case"||":a!==0&&n(await u(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function Eb(t,e,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of t){if(a=await fot(n,e,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function $ce(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>$1(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>$1(e));case"arithmetic":return JU(t.arithmetic);case"shell":return zU(t.shell);default:return!1}}function $1(t){switch(t.type){case"redirection":return t.args.some(e=>$1(e));case"argument":return t.segments.some(e=>$ce(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function JU(t){switch(t.type){case"variable":return $ce(t);case"number":return!1;default:return JU(t.left)||JU(t.right)}}function zU(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let o;switch(r.type){case"subshell":o=zU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>$1(n)))||r.args.some(a=>$1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function ky(t,e=[],{baseFs:r=new _n,builtins:o={},cwd:a=Ae.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=gb}={}){let w={};for(let[C,T]of Object.entries(n))typeof T<"u"&&(w[C]=T);let D=new Map(oot);for(let[C,T]of Object.entries(o))D.set(C,T);u===null&&(u=new pl.PassThrough,u.end());let b=uS(t,E);if(!zU(b)&&b.length>0&&e.length>0){let{command:C}=b[b.length-1];for(;C.then;)C=C.then.line;let T=C.chain;for(;T.then;)T=T.then.chain;T.type==="command"&&(T.args=T.args.concat(e.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await Eb(b,{args:e,baseFs:r,builtins:D,initialStdin:u,initialStdout:A,initialStderr:p,glob:E},{cwd:a,environment:w,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{"?":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var Jce,zce,pl,Xce,oot,lot,z1=It(()=>{St();Ol();Jce=et(sN()),zce=ve("os"),pl=ve("stream"),Xce=ve("timers/promises");Rce();Tce();Mce();KU();KU();oot=new Map([["cd",async([t=(0,zce.homedir)(),...e],r,o)=>{let a=V.resolve(o.cwd,Ae.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new fl(`cd: no such file or directory: ${t}`):u})).isDirectory())throw new fl(`cd: not a directory: ${t}`);return o.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${Ae.fromPortablePath(r.cwd)}
|
`),1}};for(n(await u(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await u(t.then.line));break;case"||":a!==0&&n(await u(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function Eb(t,e,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of t){if(a=await hot(n,e,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function tue(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>$1(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>$1(e));case"arithmetic":return XU(t.arithmetic);case"shell":return ZU(t.shell);default:return!1}}function $1(t){switch(t.type){case"redirection":return t.args.some(e=>$1(e));case"argument":return t.segments.some(e=>tue(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function XU(t){switch(t.type){case"variable":return tue(t);case"number":return!1;default:return XU(t.left)||XU(t.right)}}function ZU(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let o;switch(r.type){case"subshell":o=ZU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>$1(n)))||r.args.some(a=>$1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function Fy(t,e=[],{baseFs:r=new _n,builtins:o={},cwd:a=ue.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=gb}={}){let w={};for(let[C,T]of Object.entries(n))typeof T<"u"&&(w[C]=T);let D=new Map(lot);for(let[C,T]of Object.entries(o))D.set(C,T);u===null&&(u=new pl.PassThrough,u.end());let b=uP(t,E);if(!ZU(b)&&b.length>0&&e.length>0){let{command:C}=b[b.length-1];for(;C.then;)C=C.then.line;let T=C.chain;for(;T.then;)T=T.then.chain;T.type==="command"&&(T.args=T.args.concat(e.map(L=>({type:"argument",segments:[{type:"text",text:L}]}))))}return await Eb(b,{args:e,baseFs:r,builtins:D,initialStdin:u,initialStdout:A,initialStderr:p,glob:E},{cwd:a,environment:w,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{"?":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var Xce,Zce,pl,$ce,lot,uot,J1=It(()=>{Pt();Ol();Xce=et(sL()),Zce=De("os"),pl=De("stream"),$ce=De("timers/promises");Nce();Lce();_ce();JU();JU();lot=new Map([["cd",async([t=(0,Zce.homedir)(),...e],r,o)=>{let a=K.resolve(o.cwd,ue.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new fl(`cd: no such file or directory: ${t}`):u})).isDirectory())throw new fl(`cd: not a directory: ${t}`);return o.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${ue.fromPortablePath(r.cwd)}
|
||||||
`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,o)=>o.exitCode=parseInt(t??o.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
|
`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,o)=>o.exitCode=parseInt(t??o.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
|
||||||
`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new fl("sleep: missing operand");let o=Number(t);if(Number.isNaN(o))throw new fl(`sleep: invalid time interval '${t}'`);return await(0,Xce.setTimeout)(1e3*o,0)}],["unset",async(t,e,r)=>{for(let o of t)delete r.environment[o],delete r.variables[o];return 0}],["__ysh_run_procedure",async(t,e,r)=>{let o=r.procedures[t[0]];return await db(o,{stdin:new Zl(r.stdin),stdout:new Zl(r.stdout),stderr:new Zl(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;t[h]!=="--";){let w=t[h++],{type:D,fd:b}=JSON.parse(w),C=J=>{switch(b){case null:case 0:u.push(J);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},T=J=>{switch(b){case null:case 1:A.push(J);break;case 2:p.push(J);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},N=Number(t[h++]),U=h+N;for(let J=h;J<U;++h,++J)switch(D){case"<":C(()=>e.baseFs.createReadStream(V.resolve(r.cwd,Ae.toPortablePath(t[J]))));break;case"<<<":C(()=>{let te=new pl.PassThrough;return process.nextTick(()=>{te.write(`${t[J]}
|
`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new fl("sleep: missing operand");let o=Number(t);if(Number.isNaN(o))throw new fl(`sleep: invalid time interval '${t}'`);return await(0,$ce.setTimeout)(1e3*o,0)}],["unset",async(t,e,r)=>{for(let o of t)delete r.environment[o],delete r.variables[o];return 0}],["__ysh_run_procedure",async(t,e,r)=>{let o=r.procedures[t[0]];return await db(o,{stdin:new Zl(r.stdin),stdout:new Zl(r.stdout),stderr:new Zl(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;t[h]!=="--";){let w=t[h++],{type:D,fd:b}=JSON.parse(w),C=z=>{switch(b){case null:case 0:u.push(z);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},T=z=>{switch(b){case null:case 1:A.push(z);break;case 2:p.push(z);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},L=Number(t[h++]),U=h+L;for(let z=h;z<U;++h,++z)switch(D){case"<":C(()=>e.baseFs.createReadStream(K.resolve(r.cwd,ue.toPortablePath(t[z]))));break;case"<<<":C(()=>{let te=new pl.PassThrough;return process.nextTick(()=>{te.write(`${t[z]}
|
||||||
`),te.end()}),te});break;case"<&":C(()=>Wce(Number(t[J]),1,r));break;case">":case">>":{let te=V.resolve(r.cwd,Ae.toPortablePath(t[J]));T(te==="/dev/null"?new pl.Writable({autoDestroy:!0,emitClose:!0,write(le,ce,ue){setImmediate(ue)}}):e.baseFs.createWriteStream(te,D===">>"?{flags:"a"}:void 0))}break;case">&":T(Wce(Number(t[J]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${D}"`)}}if(u.length>0){let w=new pl.PassThrough;o=w;let D=b=>{if(b===u.length)w.end();else{let C=u[b]();C.pipe(w,{end:!1}),C.on("end",()=>{D(b+1)})}};D(0)}if(A.length>0){let w=new pl.PassThrough;a=w;for(let D of A)w.pipe(D)}if(p.length>0){let w=new pl.PassThrough;n=w;for(let D of p)w.pipe(D)}let E=await db(Z1(t.slice(h+1),e,r),{stdin:new Zl(o),stdout:new Zl(a),stderr:new Zl(n)}).run();return await Promise.all(A.map(w=>new Promise((D,b)=>{w.on("error",C=>{b(C)}),w.on("close",()=>{D()}),w.end()}))),await Promise.all(p.map(w=>new Promise((D,b)=>{w.on("error",C=>{b(C)}),w.on("close",()=>{D()}),w.end()}))),E}]]);lot={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var Cb=_((MMt,eue)=>{function pot(t,e){for(var r=-1,o=t==null?0:t.length,a=Array(o);++r<o;)a[r]=e(t[r],r,t);return a}eue.exports=pot});var oue=_((UMt,sue)=>{var tue=dg(),hot=Cb(),got=jl(),dot=fy(),mot=1/0,rue=tue?tue.prototype:void 0,nue=rue?rue.toString:void 0;function iue(t){if(typeof t=="string")return t;if(got(t))return hot(t,iue)+"";if(dot(t))return nue?nue.call(t):"";var e=t+"";return e=="0"&&1/t==-mot?"-0":e}sue.exports=iue});var t2=_((_Mt,aue)=>{var yot=oue();function Eot(t){return t==null?"":yot(t)}aue.exports=Eot});var XU=_((HMt,lue)=>{function Cot(t,e,r){var o=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++o<a;)n[o]=t[o+e];return n}lue.exports=Cot});var uue=_((qMt,cue)=>{var Iot=XU();function wot(t,e,r){var o=t.length;return r=r===void 0?o:r,!e&&r>=o?t:Iot(t,e,r)}cue.exports=wot});var ZU=_((jMt,Aue)=>{var Bot="\\ud800-\\udfff",vot="\\u0300-\\u036f",Dot="\\ufe20-\\ufe2f",Sot="\\u20d0-\\u20ff",Pot=vot+Dot+Sot,xot="\\ufe0e\\ufe0f",bot="\\u200d",kot=RegExp("["+bot+Bot+Pot+xot+"]");function Qot(t){return kot.test(t)}Aue.exports=Qot});var pue=_((GMt,fue)=>{function Fot(t){return t.split("")}fue.exports=Fot});var Iue=_((WMt,Cue)=>{var hue="\\ud800-\\udfff",Rot="\\u0300-\\u036f",Tot="\\ufe20-\\ufe2f",Lot="\\u20d0-\\u20ff",Not=Rot+Tot+Lot,Oot="\\ufe0e\\ufe0f",Mot="["+hue+"]",$U="["+Not+"]",e3="\\ud83c[\\udffb-\\udfff]",Uot="(?:"+$U+"|"+e3+")",gue="[^"+hue+"]",due="(?:\\ud83c[\\udde6-\\uddff]){2}",mue="[\\ud800-\\udbff][\\udc00-\\udfff]",_ot="\\u200d",yue=Uot+"?",Eue="["+Oot+"]?",Hot="(?:"+_ot+"(?:"+[gue,due,mue].join("|")+")"+Eue+yue+")*",qot=Eue+yue+Hot,jot="(?:"+[gue+$U+"?",$U,due,mue,Mot].join("|")+")",Got=RegExp(e3+"(?="+e3+")|"+jot+qot,"g");function Wot(t){return t.match(Got)||[]}Cue.exports=Wot});var Bue=_((YMt,wue)=>{var Yot=pue(),Vot=ZU(),Kot=Iue();function Jot(t){return Vot(t)?Kot(t):Yot(t)}wue.exports=Jot});var Due=_((VMt,vue)=>{var zot=uue(),Xot=ZU(),Zot=Bue(),$ot=t2();function eat(t){return function(e){e=$ot(e);var r=Xot(e)?Zot(e):void 0,o=r?r[0]:e.charAt(0),a=r?zot(r,1).join(""):e.slice(1);return o[t]()+a}}vue.exports=eat});var Pue=_((KMt,Sue)=>{var tat=Due(),rat=tat("toUpperCase");Sue.exports=rat});var t3=_((JMt,xue)=>{var nat=t2(),iat=Pue();function sat(t){return iat(nat(t).toLowerCase())}xue.exports=sat});var bue=_((zMt,Ib)=>{function oat(){var t=0,e=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,E=10,w=11,D=12,b=13,C=14,T=15,N=16,U=17,J=0,te=1,le=2,ce=3,ue=4;function Ie(g,me){return 55296<=g.charCodeAt(me)&&g.charCodeAt(me)<=56319&&56320<=g.charCodeAt(me+1)&&g.charCodeAt(me+1)<=57343}function he(g,me){me===void 0&&(me=0);var Ce=g.charCodeAt(me);if(55296<=Ce&&Ce<=56319&&me<g.length-1){var fe=Ce,ie=g.charCodeAt(me+1);return 56320<=ie&&ie<=57343?(fe-55296)*1024+(ie-56320)+65536:fe}if(56320<=Ce&&Ce<=57343&&me>=1){var fe=g.charCodeAt(me-1),ie=Ce;return 55296<=fe&&fe<=56319?(fe-55296)*1024+(ie-56320)+65536:ie}return Ce}function De(g,me,Ce){var fe=[g].concat(me).concat([Ce]),ie=fe[fe.length-2],Z=Ce,Se=fe.lastIndexOf(C);if(Se>1&&fe.slice(1,Se).every(function(q){return q==o})&&[o,b,U].indexOf(g)==-1)return le;var Re=fe.lastIndexOf(a);if(Re>0&&fe.slice(1,Re).every(function(q){return q==a})&&[D,a].indexOf(ie)==-1)return fe.filter(function(q){return q==a}).length%2==1?ce:ue;if(ie==t&&Z==e)return J;if(ie==r||ie==t||ie==e)return Z==C&&me.every(function(q){return q==o})?le:te;if(Z==r||Z==t||Z==e)return te;if(ie==u&&(Z==u||Z==A||Z==h||Z==E))return J;if((ie==h||ie==A)&&(Z==A||Z==p))return J;if((ie==E||ie==p)&&Z==p)return J;if(Z==o||Z==T)return J;if(Z==n)return J;if(ie==D)return J;var ht=fe.indexOf(o)!=-1?fe.lastIndexOf(o)-1:fe.length-2;return[b,U].indexOf(fe[ht])!=-1&&fe.slice(ht+1,-1).every(function(q){return q==o})&&Z==C||ie==T&&[N,U].indexOf(Z)!=-1?J:me.indexOf(a)!=-1?le:ie==a&&Z==a?J:te}this.nextBreak=function(g,me){if(me===void 0&&(me=0),me<0
Line truncated
|
`),te.end()}),te});break;case"<&":C(()=>Kce(Number(t[z]),1,r));break;case">":case">>":{let te=K.resolve(r.cwd,ue.toPortablePath(t[z]));T(te==="/dev/null"?new pl.Writable({autoDestroy:!0,emitClose:!0,write(le,de,ce){setImmediate(ce)}}):e.baseFs.createWriteStream(te,D===">>"?{flags:"a"}:void 0))}break;case">&":T(Kce(Number(t[z]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${D}"`)}}if(u.length>0){let w=new pl.PassThrough;o=w;let D=b=>{if(b===u.length)w.end();else{let C=u[b]();C.pipe(w,{end:!1}),C.on("end",()=>{D(b+1)})}};D(0)}if(A.length>0){let w=new pl.PassThrough;a=w;for(let D of A)w.pipe(D)}if(p.length>0){let w=new pl.PassThrough;n=w;for(let D of p)w.pipe(D)}let E=await db(Z1(t.slice(h+1),e,r),{stdin:new Zl(o),stdout:new Zl(a),stderr:new Zl(n)}).run();return await Promise.all(A.map(w=>new Promise((D,b)=>{w.on("error",C=>{b(C)}),w.on("close",()=>{D()}),w.end()}))),await Promise.all(p.map(w=>new Promise((D,b)=>{w.on("error",C=>{b(C)}),w.on("close",()=>{D()}),w.end()}))),E}]]);uot={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var Cb=_((HMt,rue)=>{function got(t,e){for(var r=-1,o=t==null?0:t.length,a=Array(o);++r<o;)a[r]=e(t[r],r,t);return a}rue.exports=got});var lue=_((qMt,aue)=>{var nue=yg(),dot=Cb(),mot=jl(),yot=hy(),Eot=1/0,iue=nue?nue.prototype:void 0,sue=iue?iue.toString:void 0;function oue(t){if(typeof t=="string")return t;if(mot(t))return dot(t,oue)+"";if(yot(t))return sue?sue.call(t):"";var e=t+"";return e=="0"&&1/t==-Eot?"-0":e}aue.exports=oue});var t2=_((jMt,cue)=>{var Cot=lue();function Iot(t){return t==null?"":Cot(t)}cue.exports=Iot});var $U=_((GMt,uue)=>{function wot(t,e,r){var o=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++o<a;)n[o]=t[o+e];return n}uue.exports=wot});var fue=_((WMt,Aue)=>{var Bot=$U();function vot(t,e,r){var o=t.length;return r=r===void 0?o:r,!e&&r>=o?t:Bot(t,e,r)}Aue.exports=vot});var e3=_((YMt,pue)=>{var Dot="\\ud800-\\udfff",Pot="\\u0300-\\u036f",Sot="\\ufe20-\\ufe2f",xot="\\u20d0-\\u20ff",bot=Pot+Sot+xot,Qot="\\ufe0e\\ufe0f",kot="\\u200d",Fot=RegExp("["+kot+Dot+bot+Qot+"]");function Rot(t){return Fot.test(t)}pue.exports=Rot});var gue=_((KMt,hue)=>{function Tot(t){return t.split("")}hue.exports=Tot});var Bue=_((VMt,wue)=>{var due="\\ud800-\\udfff",Not="\\u0300-\\u036f",Lot="\\ufe20-\\ufe2f",Oot="\\u20d0-\\u20ff",Mot=Not+Lot+Oot,Uot="\\ufe0e\\ufe0f",_ot="["+due+"]",t3="["+Mot+"]",r3="\\ud83c[\\udffb-\\udfff]",Hot="(?:"+t3+"|"+r3+")",mue="[^"+due+"]",yue="(?:\\ud83c[\\udde6-\\uddff]){2}",Eue="[\\ud800-\\udbff][\\udc00-\\udfff]",qot="\\u200d",Cue=Hot+"?",Iue="["+Uot+"]?",jot="(?:"+qot+"(?:"+[mue,yue,Eue].join("|")+")"+Iue+Cue+")*",Got=Iue+Cue+jot,Wot="(?:"+[mue+t3+"?",t3,yue,Eue,_ot].join("|")+")",Yot=RegExp(r3+"(?="+r3+")|"+Wot+Got,"g");function Kot(t){return t.match(Yot)||[]}wue.exports=Kot});var Due=_((zMt,vue)=>{var Vot=gue(),zot=e3(),Jot=Bue();function Xot(t){return zot(t)?Jot(t):Vot(t)}vue.exports=Xot});var Sue=_((JMt,Pue)=>{var Zot=fue(),$ot=e3(),eat=Due(),tat=t2();function rat(t){return function(e){e=tat(e);var r=$ot(e)?eat(e):void 0,o=r?r[0]:e.charAt(0),a=r?Zot(r,1).join(""):e.slice(1);return o[t]()+a}}Pue.exports=rat});var bue=_((XMt,xue)=>{var nat=Sue(),iat=nat("toUpperCase");xue.exports=iat});var n3=_((ZMt,Que)=>{var sat=t2(),oat=bue();function aat(t){return oat(sat(t).toLowerCase())}Que.exports=aat});var kue=_(($Mt,Ib)=>{function lat(){var t=0,e=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,E=10,w=11,D=12,b=13,C=14,T=15,L=16,U=17,z=0,te=1,le=2,de=3,ce=4;function me(g,Ce){return 55296<=g.charCodeAt(Ce)&&g.charCodeAt(Ce)<=56319&&56320<=g.charCodeAt(Ce+1)&&g.charCodeAt(Ce+1)<=57343}function pe(g,Ce){Ce===void 0&&(Ce=0);var ye=g.charCodeAt(Ce);if(55296<=ye&&ye<=56319&&Ce<g.length-1){var Ae=ye,ie=g.charCodeAt(Ce+1);return 56320<=ie&&ie<=57343?(Ae-55296)*1024+(ie-56320)+65536:Ae}if(56320<=ye&&ye<=57343&&Ce>=1){var Ae=g.charCodeAt(Ce-1),ie=ye;return 55296<=Ae&&Ae<=56319?(Ae-55296)*1024+(ie-56320)+65536:ie}return ye}function ve(g,Ce,ye){var Ae=[g].concat(Ce).concat([ye]),ie=Ae[Ae.length-2],Z=ye,Pe=Ae.lastIndexOf(C);if(Pe>1&&Ae.slice(1,Pe).every(function(q){return q==o})&&[o,b,U].indexOf(g)==-1)return le;var Re=Ae.lastIndexOf(a);if(Re>0&&Ae.slice(1,Re).every(function(q){return q==a})&&[D,a].indexOf(ie)==-1)return Ae.filter(function(q){return q==a}).length%2==1?de:ce;if(ie==t&&Z==e)return z;if(ie==r||ie==t||ie==e)return Z==C&&Ce.every(function(q){return q==o})?le:te;if(Z==r||Z==t||Z==e)return te;if(ie==u&&(Z==u||Z==A||Z==h||Z==E))return z;if((ie==h||ie==A)&&(Z==A||Z==p))return z;if((ie==E||ie==p)&&Z==p)return z;if(Z==o||Z==T)return z;if(Z==n)return z;if(ie==D)return z;var gt=Ae.indexOf(o)!=-1?Ae.lastIndexOf(o)-1:Ae.length-2;return[b,U].indexOf(Ae[gt])!=-1&&Ae.slice(gt+1,-1).every(function(q){return q==o})&&Z==C||ie==T&&[L,U].indexOf(Z)!=-1?z:Ce.indexOf(a)!=-1?le:ie==a&&Z==a?z:te}this.nextBreak=function(g,Ce){if(Ce===void 0&&(Ce=0),Ce<0
Line truncated
|
||||||
`,end:t=>`::endgroup::
|
`,end:t=>`::endgroup::
|
||||||
`}:Bb.default.TRAVIS?{start:t=>`travis_fold:start:${t}
|
`}:Bb.default.TRAVIS?{start:t=>`travis_fold:start:${t}
|
||||||
`,end:t=>`travis_fold:end:${t}
|
`,end:t=>`travis_fold:end:${t}
|
||||||
`}:Bb.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t}
|
`}:Bb.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t}
|
||||||
`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,Nue=hh!==null,Tue=new Date,uat=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,Aat=t=>t,vb=Aat({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),fat=uat&&Object.keys(vb).find(t=>{let e=vb[t];return!(e.date&&(e.date[0]!==Tue.getDate()||e.date[1]!==Tue.getMonth()+1))})||"default";Lt=class extends Ws{constructor({configuration:r,stdout:o,json:a=!1,forceSectionAlignment:n=!1,includeNames:u=!0,includePrefix:A=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:w=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(g1(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=u,this.includePrefix=A,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=w,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let D=r.get("progressBarStyle")||fat;if(!Object.hasOwn(vb,D))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=vb[D];let b=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*b/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,Cg(r.configuration,`Yarn ${nn}`,2));try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let o=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,o-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,hh!==null&&!this.json&&this.includeInfos&&this.stdout.write(hh.start(r))},reportFooter:A=>{if(this.indent-=1,hh!==null&&!this.json&&this.includeInfos){this.stdout.write(hh.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${Ut(this.configuration,A,Ct.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(u)}reportWarning(r,o){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${o}`)}reportError(r,o){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,o)),this.reportErrorImpl(r,o)}reportErrorImpl(r,o){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(`${this.formatPrefix(n,"redBright")}${o}`,{truncate:!1})}reportFold(r,o){if(!hh)return;let a=`${hh.start(r)}${o}${hh.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)ret
Line truncated
|
`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,Mue=gh!==null,Lue=new Date,fat=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,pat=t=>t,vb=pat({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),hat=fat&&Object.keys(vb).find(t=>{let e=vb[t];return!(e.date&&(e.date[0]!==Lue.getDate()||e.date[1]!==Lue.getMonth()+1))})||"default";Nt=class extends Ws{constructor({configuration:r,stdout:o,json:a=!1,forceSectionAlignment:n=!1,includeNames:u=!0,includePrefix:A=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:w=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(d1(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=u,this.includePrefix=A,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=w,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let D=r.get("progressBarStyle")||hat;if(!Object.hasOwn(vb,D))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=vb[D];let b=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*b/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,wg(r.configuration,`Yarn ${nn}`,2));try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let o=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,o-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,gh!==null&&!this.json&&this.includeInfos&&this.stdout.write(gh.start(r))},reportFooter:A=>{if(this.indent-=1,gh!==null&&!this.json&&this.includeInfos){this.stdout.write(gh.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${Ut(this.configuration,A,Ct.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(u)}reportWarning(r,o){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${o}`)}reportError(r,o){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,o)),this.reportErrorImpl(r,o)}reportErrorImpl(r,o){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(`${this.formatPrefix(n,"redBright")}${o}`,{truncate:!1})}reportFold(r,o){if(!gh)return;let a=`${gh.start(r)}${o}${gh.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)ret
Line truncated
|
||||||
`),this.writeProgress()}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
|
`),this.writeProgress()}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
|
||||||
`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Rue&&(this.progressFrame=(this.progressFrame+1)%Fue.length,this.progressTime=r);let o=Fue[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Ut(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p}
|
`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Nue&&(this.progressFrame=(this.progressFrame+1)%Tue.length,this.progressTime=r);let o=Tue[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Ut(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p}
|
||||||
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Rue)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,Lue.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Oue(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${Ut(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?r3(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${cat} `}}});var hn={};Vt(hn,{PackageManager:()=>_ue,detectPackageManager:()=>Hue,executePackageAccessibleBinary:()=>Yue,executePackageScript:()=>Db,executePackageShellcode:()=>n3,executeWorkspaceAccessibleBinary:()=>Eat,executeWorkspaceLifecycleScript:()=>Gue,executeWorkspaceScript:()=>jue,getPackageAccessibleBinaries:()=>Sb,getWorkspaceAccessibleBinaries:()=>Wue,hasPackageScript:()=>dat,hasWorkspaceScript:()=>i3,isNodeScript:()=>s3,makeScriptEnv:()=>i2,maybeExecuteWorkspaceLifecycleScript:()=>yat,prepareExternalProject:()=>gat});async function gh(t,e,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await ae.writeFilePromise(V.format({dir:t,name:e,ext:".cmd"}),a)}await ae.writeFilePromise(V.join(t,e),`#!/bin/sh
|
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Nue)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,Oue.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Uue(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${Ut(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?i3(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${Aat} `}}});var hn={};Kt(hn,{PackageManager:()=>que,detectPackageManager:()=>jue,executePackageAccessibleBinary:()=>Vue,executePackageScript:()=>Db,executePackageShellcode:()=>s3,executeWorkspaceAccessibleBinary:()=>Iat,executeWorkspaceLifecycleScript:()=>Yue,executeWorkspaceScript:()=>Wue,getPackageAccessibleBinaries:()=>Pb,getWorkspaceAccessibleBinaries:()=>Kue,hasPackageScript:()=>yat,hasWorkspaceScript:()=>o3,isNodeScript:()=>a3,makeScriptEnv:()=>i2,maybeExecuteWorkspaceLifecycleScript:()=>Cat,prepareExternalProject:()=>mat});async function dh(t,e,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await ae.writeFilePromise(K.format({dir:t,name:e,ext:".cmd"}),a)}await ae.writeFilePromise(K.join(t,e),`#!/bin/sh
|
||||||
exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
|
exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
|
||||||
`,{mode:493})}async function Hue(t){let e=await _t.tryFind(t);if(e?.packageManager){let o=dx(e.packageManager);if(o?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=o.reference.split(".");switch(o.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await ae.readFilePromise(V.join(t,mr.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:ae.existsSync(V.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:ae.existsSync(V.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function i2({project:t,locator:e,binFolder:r,ignoreCorepack:o,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let u={};for(let[E,w]of Object.entries(n))typeof w<"u"&&(u[E.toLowerCase()!=="path"?E:"PATH"]=w);let A=Ae.fromPortablePath(r);u.BERRY_BIN_FOLDER=Ae.fromPortablePath(A);let p=process.env.COREPACK_ROOT&&!o?Ae.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([gh(r,"node",process.execPath),...nn!==null?[gh(r,"run",process.execPath,[p,"run"]),gh(r,"yarn",process.execPath,[p]),gh(r,"yarnpkg",process.execPath,[p]),gh(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(u.INIT_CWD=Ae.fromPortablePath(t.configuration.startingCwd),u.PROJECT_CWD=Ae.fromPortablePath(t.cwd)),u.PATH=u.PATH?`${A}${Ae.delimiter}${u.PATH}`:`${A}`,u.npm_execpath=`${A}${Ae.sep}yarn`,u.npm_node_execpath=`${A}${Ae.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let E=t.tryWorkspaceByLocator(e),w=E?E.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";u.npm_package_name=rn(e),u.npm_package_version=w;let D;if(E)D=E.cwd;else{let b=t.storedPackages.get(e.locatorHash);if(!b)throw new Error(`Package for ${jr(t.configuration,e)} not found in the project`);let C=t.configuration.getLinkers(),T={project:t,report:new Lt({stdout:new dh.PassThrough,configuration:t.configuration})},N=C.find(U=>U.supportsPackage(b,T));if(!N)throw new Error(`The package ${jr(t.configuration,b)} isn't supported by any of the available linkers`);D=await N.findPackageLocation(b,T)}u.npm_package_json=Ae.fromPortablePath(V.join(D,mr.manifest))}let h=nn!==null?`yarn/${nn}`:`yarn/${vf("@yarnpkg/core").version}-core`;return u.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(u.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,u,async(E,w,D)=>await gh(r,E,w,D)),u}async function gat(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await hat(async()=>{await ae.mktempPromise(async u=>{let A=V.join(u,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(A,{prefix:Ae.fromPortablePath(t),report:o}),w=n&&Jc(n)?I1(n):n,D=w?Qa(w):"an external project";h.write(`Packing ${D} from sources
|
`,{mode:493})}async function jue(t){let e=await _t.tryFind(t);if(e?.packageManager){let o=dx(e.packageManager);if(o?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=o.reference.split(".");switch(o.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await ae.readFilePromise(K.join(t,mr.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:ae.existsSync(K.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:ae.existsSync(K.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function i2({project:t,locator:e,binFolder:r,ignoreCorepack:o,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let u={};for(let[E,w]of Object.entries(n))typeof w<"u"&&(u[E.toLowerCase()!=="path"?E:"PATH"]=w);let A=ue.fromPortablePath(r);u.BERRY_BIN_FOLDER=ue.fromPortablePath(A);let p=process.env.COREPACK_ROOT&&!o?ue.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([dh(r,"node",process.execPath),...nn!==null?[dh(r,"run",process.execPath,[p,"run"]),dh(r,"yarn",process.execPath,[p]),dh(r,"yarnpkg",process.execPath,[p]),dh(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(u.INIT_CWD=ue.fromPortablePath(t.configuration.startingCwd),u.PROJECT_CWD=ue.fromPortablePath(t.cwd)),u.PATH=u.PATH?`${A}${ue.delimiter}${u.PATH}`:`${A}`,u.npm_execpath=`${A}${ue.sep}yarn`,u.npm_node_execpath=`${A}${ue.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let E=t.tryWorkspaceByLocator(e),w=E?E.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";u.npm_package_name=rn(e),u.npm_package_version=w;let D;if(E)D=E.cwd;else{let b=t.storedPackages.get(e.locatorHash);if(!b)throw new Error(`Package for ${jr(t.configuration,e)} not found in the project`);let C=t.configuration.getLinkers(),T={project:t,report:new Nt({stdout:new mh.PassThrough,configuration:t.configuration})},L=C.find(U=>U.supportsPackage(b,T));if(!L)throw new Error(`The package ${jr(t.configuration,b)} isn't supported by any of the available linkers`);D=await L.findPackageLocation(b,T)}u.npm_package_json=ue.fromPortablePath(K.join(D,mr.manifest))}let h=nn!==null?`yarn/${nn}`:`yarn/${Df("@yarnpkg/core").version}-core`;return u.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(u.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,u,async(E,w,D)=>await dh(r,E,w,D)),u}async function mat(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await dat(async()=>{await ae.mktempPromise(async u=>{let A=K.join(u,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(A,{prefix:ue.fromPortablePath(t),report:o}),w=n&&zc(n)?cy(n):n,D=w?ka(w):"an external project";h.write(`Packing ${D} from sources
|
||||||
`);let b=await Hue(t),C;b!==null?(h.write(`Using ${b.packageManager} for bootstrap. Reason: ${b.reason}
|
`);let b=await jue(t),C;b!==null?(h.write(`Using ${b.packageManager} for bootstrap. Reason: ${b.reason}
|
||||||
|
|
||||||
`),C=b.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
|
`),C=b.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
|
||||||
|
|
||||||
`),C="Yarn");let T=C==="Yarn"&&!b?.packageManagerField;await ae.mktempPromise(async N=>{let U=await i2({binFolder:N,ignoreCorepack:T,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:"0"}}),te=new Map([["Yarn Classic",async()=>{let ce=a!==null?["workspace",a]:[],ue=V.join(t,mr.manifest),Ie=await ae.readFilePromise(ue),he=await Xc(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(he.code!==0)return he.code;await ae.writeFilePromise(ue,Ie),await ae.appendFilePromise(V.join(t,".npmignore"),`/.yarn
|
`),C="Yarn");let T=C==="Yarn"&&!b?.packageManagerField;await ae.mktempPromise(async L=>{let U=await i2({binFolder:L,ignoreCorepack:T,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:"0"}}),te=new Map([["Yarn Classic",async()=>{let de=a!==null?["workspace",a]:[],ce=K.join(t,mr.manifest),me=await ae.readFilePromise(ce),pe=await Xc(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(pe.code!==0)return pe.code;await ae.writeFilePromise(ce,me),await ae.appendFilePromise(K.join(t,".npmignore"),`/.yarn
|
||||||
`),h.write(`
|
`),h.write(`
|
||||||
`),delete U.NODE_ENV;let De=await Xc("yarn",["install"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(De.code!==0)return De.code;h.write(`
|
`),delete U.NODE_ENV;let ve=await Xc("yarn",["install"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ve.code!==0)return ve.code;h.write(`
|
||||||
`);let Ee=await Xc("yarn",[...ce,"pack","--filename",Ae.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ee.code!==0?Ee.code:0}],["Yarn",async()=>{let ce=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ue=V.join(t,mr.lockfile);await ae.existsPromise(ue)||await ae.writeFilePromise(ue,"");let Ie=await Xc("yarn",[...ce,"pack","--install-if-needed","--filename",Ae.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ie.code!==0?Ie.code:0}],["npm",async()=>{if(a!==null){let me=new dh.PassThrough,Ce=Xm(me);me.pipe(h,{end:!1});let fe=await Xc("npm",["--version"],{cwd:t,env:U,stdin:p,stdout:me,stderr:E,end:0});if(me.end(),fe.code!==0)return h.end(),E.end(),fe.code;let ie=(await Ce).toString().trim();if(!nA(ie,">=7.x")){let Z=rA(null,"npm"),Se=kn(Z,ie),Re=kn(Z,">=7.x");throw new Error(`Workspaces aren't supported by ${Jn(r,Se)}; please upgrade to ${Jn(r,Re)} (npm has been detected as the primary package manager for ${Ut(r,t,Ct.PATH)})`)}}let ce=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ue=await Xc("npm",["install","--legacy-peer-deps"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ue.code!==0)return ue.code;let Ie=new dh.PassThrough,he=Xm(Ie);Ie.pipe(h);let De=await Xc("npm",["pack","--silent",...ce],{cwd:t,env:U,stdin:p,stdout:Ie,stderr:E});if(De.code!==0)return De.code;let Ee=(await he).toString().trim().replace(/^.*\n/s,""),g=V.resolve(t,Ae.toPortablePath(Ee));return await ae.renamePromise(g,e),0}]]).get(C);if(typeof te>"u")throw new Error("Assertion failed: Unsupported workflow");let le=await te();if(!(le===0||typeof le>"u"))throw ae.detachTemp(u),new Jt(58,`Packing the package failed (exit code ${le}, logs can be found here: ${Ut(r,A,Ct.PATH)})`)})})})}async function dat(t,e,{project:r}){let o=r.tryWorkspaceByLocator(t);if(o!==null)return i3(o,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${jr(r.configuration,t)} not found in the project`);return await iA.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Lt({stdout:new dh.PassThrough,configuration:u})},h=A.find(b=>b.supportsPackage(a,p));if(!h)throw new Error(`The package ${jr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),w=new En(E,{baseFs:n});return(await _t.find(Bt.dot,{baseFs:w})).scripts.has(e)})}async function Db(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await ae.mktempPromise(async p=>{let{manifest:h,env:E,cwd:w}=await que(t,{project:a,binFolder:p,cwd:o,lifecycleScript:e}),D=h.scripts.get(e);if(typeof D>"u")return 1;let b=async()=>await ky(D,r,{cwd:w,env:E,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(T=>T.wrapScriptExecution,b,a,t,e,{script:D,args:r,cwd:w,env:E,stdin:n,stdout:u,stderr:A}))()})}async function n3(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await ae.mktempPromise(async p=>{let{env:h,cwd:E}=await que(t,{project:a,binFolder:p,cwd:o});return await ky(e,r,{cwd:E,env:h,stdin:n,stdout:u,stderr:A})})}async function mat(t,{binFolder:e,cwd:r,lifecycleScript:o}){let a=await i2({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:o});return await o3(e,await Wue(t)),typeof r>"u"&&(r=V.dirname(await ae.realpathPromise(V.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function que(t,{project:e,binFolder:r,cwd:o,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return mat(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=e.storedPackages.get(t.locatorHash);if(!u)throw new Error(`Package for ${jr(e.configuration,t)} not found in the project`);return await iA.openPromise(async A=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Lt({stdout:new dh.PassThrough,configuration:p})},w=h.find(N=>N.supportsPackage(u,E));if(!w)throw new Error(`The package ${jr(e.configuration,u)} isn't supported by any of the available linkers`);let D=await i2({project:e,locator:t,binFolder:r,lifecycleScript:a});await o3(r,await Sb(t,{project:e}));let b=await w.findPackageLocation(u,E),C=new En(b,{baseFs:A}),T=await _t.find(Bt.dot,{baseFs:C});return typeof o>"u"&&(o=b),{manifest:T,binFolder:r,env:D,cwd:o}})}async function jue(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u}){return await Db(t.anchoredLocator,e,r,{cwd:o,project:t.project,stdin:a,stdout:n,stderr:u})}function i3(t,e){return t.manifest.scripts.has(e)}async function Gue(t,e,{cwd:r,report:o}){let{configuration:a}=t.project,n=null;await ae.mktempPromise(async u=>{let A=V.join(u,`${e}.log`),p=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${Ae.fromPortablePath(t.cwd)}")
|
`);let Ie=await Xc("yarn",[...de,"pack","--filename",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ie.code!==0?Ie.code:0}],["Yarn",async()=>{let de=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ce=K.join(t,mr.lockfile);await ae.existsPromise(ce)||await ae.writeFilePromise(ce,"");let me=await Xc("yarn",[...de,"pack","--install-if-needed","--filename",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return me.code!==0?me.code:0}],["npm",async()=>{if(a!==null){let Ce=new mh.PassThrough,ye=Zm(Ce);Ce.pipe(h,{end:!1});let Ae=await Xc("npm",["--version"],{cwd:t,env:U,stdin:p,stdout:Ce,stderr:E,end:0});if(Ce.end(),Ae.code!==0)return h.end(),E.end(),Ae.code;let ie=(await ye).toString().trim();if(!nA(ie,">=7.x")){let Z=rA(null,"npm"),Pe=Qn(Z,ie),Re=Qn(Z,">=7.x");throw new Error(`Workspaces aren't supported by ${zn(r,Pe)}; please upgrade to ${zn(r,Re)} (npm has been detected as the primary package manager for ${Ut(r,t,Ct.PATH)})`)}}let de=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ce=await Xc("npm",["install","--legacy-peer-deps"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ce.code!==0)return ce.code;let me=new mh.PassThrough,pe=Zm(me);me.pipe(h);let ve=await Xc("npm",["pack","--silent",...de],{cwd:t,env:U,stdin:p,stdout:me,stderr:E});if(ve.code!==0)return ve.code;let Ie=(await pe).toString().trim().replace(/^.*\n/s,""),g=K.resolve(t,ue.toPortablePath(Ie));return await ae.renamePromise(g,e),0}]]).get(C);if(typeof te>"u")throw new Error("Assertion failed: Unsupported workflow");let le=await te();if(!(le===0||typeof le>"u"))throw ae.detachTemp(u),new zt(58,`Packing the package failed (exit code ${le}, logs can be found here: ${Ut(r,A,Ct.PATH)})`)})})})}async function yat(t,e,{project:r}){let o=r.tryWorkspaceByLocator(t);if(o!==null)return o3(o,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${jr(r.configuration,t)} not found in the project`);return await iA.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Nt({stdout:new mh.PassThrough,configuration:u})},h=A.find(b=>b.supportsPackage(a,p));if(!h)throw new Error(`The package ${jr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),w=new En(E,{baseFs:n});return(await _t.find(Bt.dot,{baseFs:w})).scripts.has(e)})}async function Db(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await ae.mktempPromise(async p=>{let{manifest:h,env:E,cwd:w}=await Gue(t,{project:a,binFolder:p,cwd:o,lifecycleScript:e}),D=h.scripts.get(e);if(typeof D>"u")return 1;let b=async()=>await Fy(D,r,{cwd:w,env:E,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(T=>T.wrapScriptExecution,b,a,t,e,{script:D,args:r,cwd:w,env:E,stdin:n,stdout:u,stderr:A}))()})}async function s3(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await ae.mktempPromise(async p=>{let{env:h,cwd:E}=await Gue(t,{project:a,binFolder:p,cwd:o});return await Fy(e,r,{cwd:E,env:h,stdin:n,stdout:u,stderr:A})})}async function Eat(t,{binFolder:e,cwd:r,lifecycleScript:o}){let a=await i2({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:o});return await l3(e,await Kue(t)),typeof r>"u"&&(r=K.dirname(await ae.realpathPromise(K.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function Gue(t,{project:e,binFolder:r,cwd:o,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return Eat(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=e.storedPackages.get(t.locatorHash);if(!u)throw new Error(`Package for ${jr(e.configuration,t)} not found in the project`);return await iA.openPromise(async A=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Nt({stdout:new mh.PassThrough,configuration:p})},w=h.find(L=>L.supportsPackage(u,E));if(!w)throw new Error(`The package ${jr(e.configuration,u)} isn't supported by any of the available linkers`);let D=await i2({project:e,locator:t,binFolder:r,lifecycleScript:a});await l3(r,await Pb(t,{project:e}));let b=await w.findPackageLocation(u,E),C=new En(b,{baseFs:A}),T=await _t.find(Bt.dot,{baseFs:C});return typeof o>"u"&&(o=b),{manifest:T,binFolder:r,env:D,cwd:o}})}async function Wue(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u}){return await Db(t.anchoredLocator,e,r,{cwd:o,project:t.project,stdin:a,stdout:n,stderr:u})}function o3(t,e){return t.manifest.scripts.has(e)}async function Yue(t,e,{cwd:r,report:o}){let{configuration:a}=t.project,n=null;await ae.mktempPromise(async u=>{let A=K.join(u,`${e}.log`),p=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${ue.fromPortablePath(t.cwd)}")
|
||||||
`,{stdout:h,stderr:E}=a.getSubprocessStreams(A,{report:o,prefix:jr(a,t.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${e}" lifecycle script`);let w=await jue(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),w!==0)throw ae.detachTemp(u),new Jt(36,`${(0,Mue.default)(e)} script failed (exit code ${Ut(a,w,Ct.NUMBER)}, logs can be found here: ${Ut(a,A,Ct.PATH)}); run ${Ut(a,`yarn ${e}`,Ct.CODE)} to investigate`)})}async function yat(t,e,r){i3(t,e)&&await Gue(t,e,r)}function s3(t){let e=V.extname(t);if(e.match(/\.[cm]?[jt]sx?$/))return!0;if(e===".exe"||e===".bin")return!1;let r=Buffer.alloc(4),o;try{o=ae.openSync(t,"r")}catch{return!0}try{ae.readSync(o,r,0,r.length,0)}finally{ae.closeSync(o)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function Sb(t,{project:e}){let r=e.configuration,o=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${jr(r,t)} not found in the project`);let n=new dh.Writable,u=r.getLinkers(),A={project:e,report:new Lt({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let w=e.storedResolutions.get(E.descriptorHash);if(!w)throw new Error(`Assertion failed: The resolution (${Jn(r,E)}) should have been registered`);p.add(w)}let h=await Promise.all(Array.from(p,async E=>{let w=e.storedPackages.get(E);if(!w)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(w.bin.size===0)return ul.skip;let D=u.find(C=>C.supportsPackage(w,A));if(!D)return ul.skip;let b=null;try{b=await D.findPackageLocation(w,A)}catch(C){if(C.code==="LOCATOR_NOT_INSTALLED")return ul.skip;throw C}return{dependency:w,packageLocation:b}}));for(let E of h){if(E===ul.skip)continue;let{dependency:w,packageLocation:D}=E;for(let[b,C]of w.bin){let T=V.resolve(D,C);o.set(b,[w,Ae.fromPortablePath(T),s3(T)])}}return o}async function Wue(t){return await Sb(t.anchoredLocator,{project:t.project})}async function o3(t,e){await Promise.all(Array.from(e,([r,[,o,a]])=>a?gh(t,r,process.execPath,[o]):gh(t,r,o,[])))}async function Yue(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await Sb(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${jr(a.configuration,t)}`);return await ae.mktempPromise(async w=>{let[,D]=E,b=await i2({project:a,locator:t,binFolder:w});await o3(b.BERRY_BIN_FOLDER,h);let C=s3(Ae.toPortablePath(D))?Xc(process.execPath,[...p,D,...r],{cwd:o,env:b,stdin:n,stdout:u,stderr:A}):Xc(D,r,{cwd:o,env:b,stdin:n,stdout:u,stderr:A}),T;try{T=await C}finally{await ae.removePromise(b.BERRY_BIN_FOLDER)}return T.code})}async function Eat(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await Yue(t.anchoredLocator,e,r,{project:t.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var Mue,Uue,dh,_ue,pat,hat,a3=It(()=>{St();St();sA();z1();Mue=et(t3()),Uue=et(lg()),dh=ve("stream");Ay();Kl();n2();r2();nb();Wl();Gl();bf();Io();_ue=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(_ue||{});pat=2,hat=(0,Uue.default)(pat)});var Fy=_((y4t,Kue)=>{"use strict";var Vue=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);Kue.exports=t=>t?Object.keys(t).map(e=>[Vue.has(e)?Vue.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var Ty=_((E4t,nAe)=>{"use strict";var Jue=typeof process=="object"&&process?process:{stdout:null,stderr:null},Cat=ve("events"),zue=ve("stream"),Xue=ve("string_decoder").StringDecoder,Nf=Symbol("EOF"),Of=Symbol("maybeEmitEnd"),mh=Symbol("emittedEnd"),Pb=Symbol("emittingEnd"),s2=Symbol("emittedError"),xb=Symbol("closed"),Zue=Symbol("read"),bb=Symbol("flush"),$ue=Symbol("flushChunk"),Ra=Symbol("encoding"),Mf=Symbol("decoder"),kb=Symbol("flowing"),o2=Symbol("paused"),Ry=Symbol("resume"),xs=Symbol("bufferLength"),l3=Symbol("bufferPush"),c3=Symbol("bufferShift"),Do=Symbol("objectMode"),So=Symbol("destroyed"),u3=Symbol("emitData"),eAe=Symbol("emitEnd"),A3=Symbol("emitEnd2"),Uf=Symbol("async"),a2=t=>Promise.resolve().then(t),tAe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",Iat=tAe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),wat=tAe&&Symbol.iterator||Symbol("iterator not implemented"),Bat=t=>t==="end"||t==="finish"||t==="prefinish",vat=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Dat=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Qb=class{constructor(e,r,o){this.src=e,this.dest=r,this.opts=o,this.ondrain=()=>e[Ry](),r.on("drain",this.ondrain)}unpipe(){this.dest.remove
Line truncated
|
`,{stdout:h,stderr:E}=a.getSubprocessStreams(A,{report:o,prefix:jr(a,t.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${e}" lifecycle script`);let w=await Wue(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),w!==0)throw ae.detachTemp(u),new zt(36,`${(0,_ue.default)(e)} script failed (exit code ${Ut(a,w,Ct.NUMBER)}, logs can be found here: ${Ut(a,A,Ct.PATH)}); run ${Ut(a,`yarn ${e}`,Ct.CODE)} to investigate`)})}async function Cat(t,e,r){o3(t,e)&&await Yue(t,e,r)}function a3(t){let e=K.extname(t);if(e.match(/\.[cm]?[jt]sx?$/))return!0;if(e===".exe"||e===".bin")return!1;let r=Buffer.alloc(4),o;try{o=ae.openSync(t,"r")}catch{return!0}try{ae.readSync(o,r,0,r.length,0)}finally{ae.closeSync(o)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function Pb(t,{project:e}){let r=e.configuration,o=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${jr(r,t)} not found in the project`);let n=new mh.Writable,u=r.getLinkers(),A={project:e,report:new Nt({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let w=e.storedResolutions.get(E.descriptorHash);if(!w)throw new Error(`Assertion failed: The resolution (${zn(r,E)}) should have been registered`);p.add(w)}let h=await Promise.all(Array.from(p,async E=>{let w=e.storedPackages.get(E);if(!w)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(w.bin.size===0)return ul.skip;let D=u.find(C=>C.supportsPackage(w,A));if(!D)return ul.skip;let b=null;try{b=await D.findPackageLocation(w,A)}catch(C){if(C.code==="LOCATOR_NOT_INSTALLED")return ul.skip;throw C}return{dependency:w,packageLocation:b}}));for(let E of h){if(E===ul.skip)continue;let{dependency:w,packageLocation:D}=E;for(let[b,C]of w.bin){let T=K.resolve(D,C);o.set(b,[w,ue.fromPortablePath(T),a3(T)])}}return o}async function Kue(t){return await Pb(t.anchoredLocator,{project:t.project})}async function l3(t,e){await Promise.all(Array.from(e,([r,[,o,a]])=>a?dh(t,r,process.execPath,[o]):dh(t,r,o,[])))}async function Vue(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await Pb(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${jr(a.configuration,t)}`);return await ae.mktempPromise(async w=>{let[,D]=E,b=await i2({project:a,locator:t,binFolder:w});await l3(b.BERRY_BIN_FOLDER,h);let C=a3(ue.toPortablePath(D))?Xc(process.execPath,[...p,D,...r],{cwd:o,env:b,stdin:n,stdout:u,stderr:A}):Xc(D,r,{cwd:o,env:b,stdin:n,stdout:u,stderr:A}),T;try{T=await C}finally{await ae.removePromise(b.BERRY_BIN_FOLDER)}return T.code})}async function Iat(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await Vue(t.anchoredLocator,e,r,{project:t.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var _ue,Hue,mh,que,gat,dat,c3=It(()=>{Pt();Pt();sA();J1();_ue=et(n3()),Hue=et(ug()),mh=De("stream");py();Vl();n2();r2();nb();Wl();Gl();Qf();Io();que=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(que||{});gat=2,dat=(0,Hue.default)(gat)});var Ty=_((I4t,Jue)=>{"use strict";var zue=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);Jue.exports=t=>t?Object.keys(t).map(e=>[zue.has(e)?zue.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var Ly=_((w4t,sAe)=>{"use strict";var Xue=typeof process=="object"&&process?process:{stdout:null,stderr:null},wat=De("events"),Zue=De("stream"),$ue=De("string_decoder").StringDecoder,Of=Symbol("EOF"),Mf=Symbol("maybeEmitEnd"),yh=Symbol("emittedEnd"),Sb=Symbol("emittingEnd"),s2=Symbol("emittedError"),xb=Symbol("closed"),eAe=Symbol("read"),bb=Symbol("flush"),tAe=Symbol("flushChunk"),Ra=Symbol("encoding"),Uf=Symbol("decoder"),Qb=Symbol("flowing"),o2=Symbol("paused"),Ny=Symbol("resume"),xs=Symbol("bufferLength"),u3=Symbol("bufferPush"),A3=Symbol("bufferShift"),Do=Symbol("objectMode"),Po=Symbol("destroyed"),f3=Symbol("emitData"),rAe=Symbol("emitEnd"),p3=Symbol("emitEnd2"),_f=Symbol("async"),a2=t=>Promise.resolve().then(t),nAe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",Bat=nAe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),vat=nAe&&Symbol.iterator||Symbol("iterator not implemented"),Dat=t=>t==="end"||t==="finish"||t==="prefinish",Pat=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Sat=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),kb=class{constructor(e,r,o){this.src=e,this.dest=r,this.opts=o,this.ondrain=()=>e[Ny](),r.on("drain",this.ondrain)}unpipe(){this.dest.remove
Line truncated
|
||||||
`,a=Buffer.byteLength(o),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+o}};c2.parse=(t,e,r)=>new c2(Kat(Jat(t),e),r);var Kat=(t,e)=>e?Object.keys(t).reduce((r,o)=>(r[o]=t[o],r),e):t,Jat=t=>t.replace(/\n$/,"").split(`
|
`,a=Buffer.byteLength(o),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+o}};c2.parse=(t,e,r)=>new c2(Jat(Xat(t),e),r);var Jat=(t,e)=>e?Object.keys(t).reduce((r,o)=>(r[o]=t[o],r),e):t,Xat=t=>t.replace(/\n$/,"").split(`
|
||||||
`).reduce(zat,Object.create(null)),zat=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let o=e.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=o.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};mAe.exports=c2});var _y=_((Q4t,yAe)=>{yAe.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var Mb=_((F4t,EAe)=>{"use strict";EAe.exports=t=>class extends t{warn(e,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||e,o.tarCode=e,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),o))}}});var M3=_((T4t,CAe)=>{"use strict";var Ub=["|","<",">","?",":"],O3=Ub.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Xat=new Map(Ub.map((t,e)=>[t,O3[e]])),Zat=new Map(O3.map((t,e)=>[t,Ub[e]]));CAe.exports={encode:t=>Ub.reduce((e,r)=>e.split(r).join(Xat.get(r)),t),decode:t=>O3.reduce((e,r)=>e.split(r).join(Zat.get(r)),t)}});var U3=_((L4t,wAe)=>{var{isAbsolute:$at,parse:IAe}=ve("path").win32;wAe.exports=t=>{let e="",r=IAe(t);for(;$at(t)||r.root;){let o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(o.length),e+=o,r=IAe(t)}return[e,t]}});var vAe=_((N4t,BAe)=>{"use strict";BAe.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var J3=_((U4t,MAe)=>{"use strict";var QAe=Ty(),FAe=Ob(),RAe=Uy(),lA=ve("fs"),DAe=ve("path"),aA=Oy(),elt=_y(),TAe=(t,e)=>e?(t=aA(t).replace(/^\.(\/|$)/,""),elt(e)+"/"+t):aA(t),tlt=16*1024*1024,SAe=Symbol("process"),PAe=Symbol("file"),xAe=Symbol("directory"),H3=Symbol("symlink"),bAe=Symbol("hardlink"),u2=Symbol("header"),_b=Symbol("read"),q3=Symbol("lstat"),Hb=Symbol("onlstat"),j3=Symbol("onread"),G3=Symbol("onreadlink"),W3=Symbol("openfile"),Y3=Symbol("onopenfile"),Ih=Symbol("close"),qb=Symbol("mode"),V3=Symbol("awaitDrain"),_3=Symbol("ondrain"),cA=Symbol("prefix"),kAe=Symbol("hadError"),LAe=Mb(),rlt=M3(),NAe=U3(),OAe=vAe(),jb=LAe(class extends QAe{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=aA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||tlt,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=aA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?aA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=NAe(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=rlt.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=aA(r.absolute||DAe.resolve(this.cwd,e)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[Hb](this.statCache.get(this.absolute)):this[q3]()}emit(e,...r){return e==="error"&&(this[kAe]=!0),super.emit(e,...r)}[q3](){lA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Hb](r)})}[Hb](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=ilt(e),this.emit("stat",e),this[SAe]()}[SAe](){switch(this.type){case"File":return this[PAe]();case"Directory":return this[xAe]();case"SymbolicLink":return this[H3]();default:return this.end()}}[qb](e){return OAe(e,this.type==="Directory",this.portable)}[cA](e){return TAe(e,this.prefix)}[u2](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new RAe({path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,mode:this[qb](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new FAe({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.
Line truncated
|
`).reduce(Zat,Object.create(null)),Zat=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let o=e.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=o.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};EAe.exports=c2});var qy=_((T4t,CAe)=>{CAe.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var Mb=_((N4t,IAe)=>{"use strict";IAe.exports=t=>class extends t{warn(e,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||e,o.tarCode=e,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),o))}}});var _3=_((O4t,wAe)=>{"use strict";var Ub=["|","<",">","?",":"],U3=Ub.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),$at=new Map(Ub.map((t,e)=>[t,U3[e]])),elt=new Map(U3.map((t,e)=>[t,Ub[e]]));wAe.exports={encode:t=>Ub.reduce((e,r)=>e.split(r).join($at.get(r)),t),decode:t=>U3.reduce((e,r)=>e.split(r).join(elt.get(r)),t)}});var H3=_((M4t,vAe)=>{var{isAbsolute:tlt,parse:BAe}=De("path").win32;vAe.exports=t=>{let e="",r=BAe(t);for(;tlt(t)||r.root;){let o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(o.length),e+=o,r=BAe(t)}return[e,t]}});var PAe=_((U4t,DAe)=>{"use strict";DAe.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var X3=_((q4t,_Ae)=>{"use strict";var RAe=Ly(),TAe=Ob(),NAe=Hy(),lA=De("fs"),SAe=De("path"),aA=Uy(),rlt=qy(),LAe=(t,e)=>e?(t=aA(t).replace(/^\.(\/|$)/,""),rlt(e)+"/"+t):aA(t),nlt=16*1024*1024,xAe=Symbol("process"),bAe=Symbol("file"),QAe=Symbol("directory"),j3=Symbol("symlink"),kAe=Symbol("hardlink"),u2=Symbol("header"),_b=Symbol("read"),G3=Symbol("lstat"),Hb=Symbol("onlstat"),W3=Symbol("onread"),Y3=Symbol("onreadlink"),K3=Symbol("openfile"),V3=Symbol("onopenfile"),wh=Symbol("close"),qb=Symbol("mode"),z3=Symbol("awaitDrain"),q3=Symbol("ondrain"),cA=Symbol("prefix"),FAe=Symbol("hadError"),OAe=Mb(),ilt=_3(),MAe=H3(),UAe=PAe(),jb=OAe(class extends RAe{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=aA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||nlt,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=aA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?aA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=MAe(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=ilt.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=aA(r.absolute||SAe.resolve(this.cwd,e)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[Hb](this.statCache.get(this.absolute)):this[G3]()}emit(e,...r){return e==="error"&&(this[FAe]=!0),super.emit(e,...r)}[G3](){lA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Hb](r)})}[Hb](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=olt(e),this.emit("stat",e),this[xAe]()}[xAe](){switch(this.type){case"File":return this[bAe]();case"Directory":return this[QAe]();case"SymbolicLink":return this[j3]();default:return this.end()}}[qb](e){return UAe(e,this.type==="Directory",this.portable)}[cA](e){return LAe(e,this.prefix)}[u2](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new NAe({path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,mode:this[qb](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new TAe({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.
Line truncated
|
||||||
`}),A},o})});var As={};Vt(As,{emitList:()=>zct,emitTree:()=>Ype,treeNodeToJson:()=>Wpe,treeNodeToTreeify:()=>Gpe});function Gpe(t,{configuration:e}){let r={},o=0,a=(n,u)=>{let A=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of A){if(!h)continue;let{label:E,value:w,children:D}=h,b=[];typeof E<"u"&&b.push(Cg(e,E,2)),typeof w<"u"&&b.push(Ut(e,w[0],w[1])),b.length===0&&b.push(Cg(e,`${p}`,2));let C=b.join(": ").trim(),T=`\0${o++}\0`,N=u[`${T}${C}`]={};typeof D<"u"&&a(D,N)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return a(t.children,r),r}function Wpe(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Ig(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)u&&(a[Xct(n)]=e(u));return typeof r.value>"u"?a:{value:Ig(r.value[0],r.value[1]),children:a}};return e(t)}function zct(t,{configuration:e,stdout:r,json:o}){let a=t.map(n=>({value:n}));Ype({children:a},{configuration:e,stdout:r,json:o})}function Ype(t,{configuration:e,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let A of u)A&&r.write(`${JSON.stringify(Wpe(A))}
|
`}),A},o})});var As={};Kt(As,{emitList:()=>Zct,emitTree:()=>Vpe,treeNodeToJson:()=>Kpe,treeNodeToTreeify:()=>Ype});function Ype(t,{configuration:e}){let r={},o=0,a=(n,u)=>{let A=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of A){if(!h)continue;let{label:E,value:w,children:D}=h,b=[];typeof E<"u"&&b.push(wg(e,E,2)),typeof w<"u"&&b.push(Ut(e,w[0],w[1])),b.length===0&&b.push(wg(e,`${p}`,2));let C=b.join(": ").trim(),T=`\0${o++}\0`,L=u[`${T}${C}`]={};typeof D<"u"&&a(D,L)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return a(t.children,r),r}function Kpe(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Bg(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)u&&(a[$ct(n)]=e(u));return typeof r.value>"u"?a:{value:Bg(r.value[0],r.value[1]),children:a}};return e(t)}function Zct(t,{configuration:e,stdout:r,json:o}){let a=t.map(n=>({value:n}));Vpe({children:a},{configuration:e,stdout:r,json:o})}function Vpe(t,{configuration:e,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let A of u)A&&r.write(`${JSON.stringify(Kpe(A))}
|
||||||
`);return}let n=(0,jpe.asTree)(Gpe(t,{configuration:e}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
|
`);return}let n=(0,Wpe.asTree)(Ype(t,{configuration:e}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
|
||||||
$1`).replace(/^│\n/,"")),a>=2)for(let u=0;u<2;++u)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
|
$1`).replace(/^│\n/,"")),a>=2)for(let u=0;u<2;++u)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
|
||||||
$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function Xct(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var jpe,Vpe=It(()=>{jpe=et(qpe());Wl()});function v2(t){let e=t.match(Zct);if(!e?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var Kpe,Y_,V_,Sk,Wr,Zct,K_=It(()=>{Ve();St();St();sA();Kpe=ve("crypto"),Y_=et(ve("fs"));Kl();ah();Gl();Io();V_=Zm(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),Sk=Zm(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Wr=class t{constructor(e,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,Kpe.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=o,this.check=a;let{cacheSpec:n,cacheKey:u}=t.getCacheKey(r);this.cacheSpec=n,this.cacheKey=u}static async find(e,{immutable:r,check:o}={}){let a=new t(e.get("cacheFolder"),{configuration:e,immutable:r,check:o});return await a.setup(),a}static getCacheKey(e){let r=e.get("compressionLevel"),o=r!=="mixed"?`c${r}`:"";return{cacheKey:[Sk,o].join(""),cacheSpec:o}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${ly(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=v2(r).hash.slice(0,10);return`${ly(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:o}=v2(e);if(r===null||r<V_)return!1;let a=this.configuration.get("cacheMigrationMode");return!(r<Sk&&a==="always"||o!==this.cacheSpec&&a!=="required-only")}getLocatorPath(e,r){return this.mirrorCwd===null?V.resolve(this.cwd,this.getVersionFilename(e)):r===null?V.resolve(this.cwd,this.getVersionFilename(e)):V.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?V.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await ae.existsPromise(this.cwd))throw new Jt(56,"Cache path does not exist.")}else{await ae.mkdirPromise(this.cwd,{recursive:!0});let e=V.resolve(this.cwd,".gitignore");await ae.changeFilePromise(e,`/.gitignore
|
$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function $ct(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var Wpe,zpe=It(()=>{Wpe=et(Gpe());Wl()});var PQ,Jpe=It(()=>{PQ=class{constructor(e){this.releaseFunction=e;this.map=new Map}addOrCreate(e,r){let o=this.map.get(e);if(typeof o<"u"){if(o.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${o.refCount} for ${JSON.stringify(e)}`);return o.refCount++,{value:o.value,release:()=>this.release(e)}}else{let a=r();return this.map.set(e,{refCount:1,value:a}),{value:a,release:()=>this.release(e)}}}release(e){let r=this.map.get(e);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(e)}`);let o=r.refCount;if(o<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${o-1} of ${JSON.stringify(e)}`);o==1?(this.map.delete(e),this.releaseFunction(r.value)):r.refCount--}}});function v2(t){let e=t.match(eut);if(!e?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var Xpe,V_,z_,SQ,Wr,eut,J_=It(()=>{Ve();Pt();Pt();sA();Xpe=De("crypto"),V_=et(De("fs"));Jpe();Vl();lh();Gl();Io();z_=$m(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),SQ=$m(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Wr=class t{constructor(e,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new PQ(e=>e.discardAndClose);this.cacheId=`-${(0,Xpe.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=o,this.check=a;let{cacheSpec:n,cacheKey:u}=t.getCacheKey(r);this.cacheSpec=n,this.cacheKey=u}static async find(e,{immutable:r,check:o}={}){let a=new t(e.get("cacheFolder"),{configuration:e,immutable:r,check:o});return await a.setup(),a}static getCacheKey(e){let r=e.get("compressionLevel"),o=r!=="mixed"?`c${r}`:"";return{cacheKey:[SQ,o].join(""),cacheSpec:o}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${uy(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=v2(r).hash.slice(0,10);return`${uy(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:o}=v2(e);if(r===null||r<z_)return!1;let a=this.configuration.get("cacheMigrationMode");return!(r<SQ&&a==="always"||o!==this.cacheSpec&&a!=="required-only")}getLocatorPath(e,r){return this.mirrorCwd===null?K.resolve(this.cwd,this.getVersionFilename(e)):r===null?K.resolve(this.cwd,this.getVersionFilename(e)):K.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?K.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await ae.existsPromise(this.cwd))throw new zt(56,"Cache path does not exist.")}else{await ae.mkdirPromise(this.cwd,{recursive:!0});let e=K.resolve(this.cwd,".gitignore");await ae.changeFilePromise(e,`/.gitignore
|
||||||
*.flock
|
*.flock
|
||||||
*.tmp
|
*.tmp
|
||||||
`)}(this.mirrorCwd||!this.immutable)&&await ae.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:o,onMiss:a,loader:n,...u}){let A=this.getLocatorMirrorPath(e),p=new _n,h=()=>{let he=new Zi,De=V.join(Bt.root,_M(e));return he.mkdirSync(De,{recursive:!0}),he.writeJsonSync(V.join(De,mr.manifest),{name:rn(e),mocked:!0}),he},E=async(he,{isColdHit:De,controlPath:Ee=null})=>{if(Ee===null&&u.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!De?v2(r).cacheKey:this.cacheKey,me=!u.skipIntegrityCheck||!r?`${g}/${await fx(he)}`:r;if(Ee!==null){let fe=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await fx(Ee)}`:r;if(me!==fe)throw new Jt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let Ce=null;switch(r!==null&&me!==r&&(this.check?Ce="throw":v2(r).cacheKey!==v2(me).cacheKey?Ce="update":Ce=this.configuration.get("checksumBehavior")),Ce){case null:case"update":return{isValid:!0,hash:me};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Jt(18,"The remote archive doesn't match the expected checksum")}},w=async he=>{if(!n)throw new Error(`Cache check required but no loader configured for ${jr(this.configuration,e)}`);let De=await n(),Ee=De.getRealPath();De.saveAndClose(),await ae.chmodPromise(Ee,420);let g=await E(he,{controlPath:Ee,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},D=async()=>{if(A===null||!await ae.existsPromise(A)){let he=await n(),De=he.getRealPath();return he.saveAndClose(),{source:"loader",path:De}}return{source:"mirror",path:A}},b=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${jr(this.configuration,e)}`);if(this.immutable)throw new Jt(56,`Cache entry required but missing for ${jr(this.configuration,e)}`);let{path:he,source:De}=await D(),{hash:Ee}=await E(he,{isColdHit:!0}),g=this.getLocatorPath(e,Ee),me=[];De!=="mirror"&&A!==null&&me.push(async()=>{let fe=`${A}${this.cacheId}`;await ae.copyFilePromise(he,fe,Y_.default.constants.COPYFILE_FICLONE),await ae.chmodPromise(fe,420),await ae.renamePromise(fe,A)}),(!u.mirrorWriteOnly||A===null)&&me.push(async()=>{let fe=`${g}${this.cacheId}`;await ae.copyFilePromise(he,fe,Y_.default.constants.COPYFILE_FICLONE),await ae.chmodPromise(fe,420),await ae.renamePromise(fe,g)});let Ce=u.mirrorWriteOnly?A??g:g;return await Promise.all(me.map(fe=>fe())),[!1,Ce,Ee]},C=async()=>{let De=(async()=>{let Ee=u.unstablePackages?.has(e.locatorHash),g=Ee||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,me=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,Ce=!!u.mockedPackages?.has(e.locatorHash)&&(!this.check||!me),fe=Ce||me,ie=fe?o:a;if(ie&&ie(),fe){let Z=null,Se=g;if(!Ce)if(this.check)Z=await w(Se);else{let Re=await E(Se,{isColdHit:!1});if(Re.isValid)Z=Re.hash;else return b()}return[Ce,Se,Z]}else{if(this.immutable&&Ee)throw new Jt(56,`Cache entry required but missing for ${jr(this.configuration,e)}; consider defining ${pe.pretty(this.configuration,"supportedArchitectures",pe.Type.CODE)} to cache packages for multiple systems`);return b()}})();this.mutexes.set(e.locatorHash,De);try{return await De}finally{this.mutexes.delete(e.locatorHash)}};for(let he;he=this.mutexes.get(e.locatorHash);)await he;let[T,N,U]=await C();T||this.markedFiles.add(N);let J,te=T?()=>h():()=>new Zi(N,{baseFs:p,readOnly:!0}),le=new Am(()=>rO(()=>J=te(),he=>`Failed to open the cache entry for ${jr(this.configuration,e)}: ${he}`),V),ce=new ju(N,{baseFs:le,pathUtils:V}),ue=()=>{J?.discardAndClose()},Ie=u.unstablePackages?.has(e.locatorHash)?null:U;return[ce,ue,Ie]}},Zct=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\/)?(?<hash>.*)$/});var Pk,Jpe=It(()=>{Pk=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(Pk||{})});var $ct,tE,J_=It(()=>{St();Ol();bf();Io();$ct=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>mx({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],tE=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let o=V.join(e.cwd,mr.lockfile);if(!ae.existsSync(o))return;let a=
Line truncated
|
`)}(this.mirrorCwd||!this.immutable)&&await ae.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:o,onMiss:a,loader:n,...u}){let A=this.getLocatorMirrorPath(e),p=new _n,h=()=>{let pe=new Zi,ve=K.join(Bt.root,qM(e));return pe.mkdirSync(ve,{recursive:!0}),pe.writeJsonSync(K.join(ve,mr.manifest),{name:rn(e),mocked:!0}),pe},E=async(pe,{isColdHit:ve,controlPath:Ie=null})=>{if(Ie===null&&u.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!ve?v2(r).cacheKey:this.cacheKey,Ce=!u.skipIntegrityCheck||!r?`${g}/${await fx(pe)}`:r;if(Ie!==null){let Ae=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await fx(Ie)}`:r;if(Ce!==Ae)throw new zt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let ye=null;switch(r!==null&&Ce!==r&&(this.check?ye="throw":v2(r).cacheKey!==v2(Ce).cacheKey?ye="update":ye=this.configuration.get("checksumBehavior")),ye){case null:case"update":return{isValid:!0,hash:Ce};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new zt(18,"The remote archive doesn't match the expected checksum")}},w=async pe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${jr(this.configuration,e)}`);let ve=await n(),Ie=ve.getRealPath();ve.saveAndClose(),await ae.chmodPromise(Ie,420);let g=await E(pe,{controlPath:Ie,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},D=async()=>{if(A===null||!await ae.existsPromise(A)){let pe=await n(),ve=pe.getRealPath();return pe.saveAndClose(),{source:"loader",path:ve}}return{source:"mirror",path:A}},b=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${jr(this.configuration,e)}`);if(this.immutable)throw new zt(56,`Cache entry required but missing for ${jr(this.configuration,e)}`);let{path:pe,source:ve}=await D(),{hash:Ie}=await E(pe,{isColdHit:!0}),g=this.getLocatorPath(e,Ie),Ce=[];ve!=="mirror"&&A!==null&&Ce.push(async()=>{let Ae=`${A}${this.cacheId}`;await ae.copyFilePromise(pe,Ae,V_.default.constants.COPYFILE_FICLONE),await ae.chmodPromise(Ae,420),await ae.renamePromise(Ae,A)}),(!u.mirrorWriteOnly||A===null)&&Ce.push(async()=>{let Ae=`${g}${this.cacheId}`;await ae.copyFilePromise(pe,Ae,V_.default.constants.COPYFILE_FICLONE),await ae.chmodPromise(Ae,420),await ae.renamePromise(Ae,g)});let ye=u.mirrorWriteOnly?A??g:g;return await Promise.all(Ce.map(Ae=>Ae())),[!1,ye,Ie]},C=async()=>{let ve=(async()=>{let Ie=u.unstablePackages?.has(e.locatorHash),g=Ie||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,Ce=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,ye=!!u.mockedPackages?.has(e.locatorHash)&&(!this.check||!Ce),Ae=ye||Ce,ie=Ae?o:a;if(ie&&ie(),Ae){let Z=null,Pe=g;if(!ye)if(this.check)Z=await w(Pe);else{let Re=await E(Pe,{isColdHit:!1});if(Re.isValid)Z=Re.hash;else return b()}return[ye,Pe,Z]}else{if(this.immutable&&Ie)throw new zt(56,`Cache entry required but missing for ${jr(this.configuration,e)}; consider defining ${fe.pretty(this.configuration,"supportedArchitectures",fe.Type.CODE)} to cache packages for multiple systems`);return b()}})();this.mutexes.set(e.locatorHash,ve);try{return await ve}finally{this.mutexes.delete(e.locatorHash)}};for(let pe;pe=this.mutexes.get(e.locatorHash);)await pe;let[T,L,U]=await C();T||this.markedFiles.add(L);let z=()=>this.refCountedZipFsCache.addOrCreate(L,()=>T?h():new Zi(L,{baseFs:p,readOnly:!0})),te,le=new pm(()=>iO(()=>(te=z(),te.value),pe=>`Failed to open the cache entry for ${jr(this.configuration,e)}: ${pe}`),K),de=new ju(L,{baseFs:le,pathUtils:K}),ce=()=>{te?.release()},me=u.unstablePackages?.has(e.locatorHash)?null:U;return[de,ce,me]}},eut=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\/)?(?<hash>.*)$/});var xQ,Zpe=It(()=>{xQ=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(xQ||{})});var tut,nE,X_=It(()=>{Pt();Ol();Qf();Io();tut=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>mx({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],nE=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let o=K.join(e.cwd,mr
Line truncated
|
||||||
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,o){}async finalize(){this.errorCount>0&&(this.stdout.write(`
|
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,o){}async finalize(){this.errorCount>0&&(this.stdout.write(`
|
||||||
`),this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
|
`),this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
|
||||||
`),this.suggestInstall&&this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
|
`),this.suggestInstall&&this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
|
||||||
`))}formatNameWithHyperlink(r){return r3(r,{configuration:this.configuration,json:!1})}}});var rE,z_=It(()=>{Io();rE=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(hx(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){let a=o.project.storedResolutions.get(e.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(hx(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let o=r.project.originalPackages.get(e.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function Wf(){}function eut(t,e,r,o,a){for(var n=0,u=e.length,A=0,p=0;n<u;n++){var h=e[n];if(h.removed){if(h.value=t.join(o.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var w=e[n-1];e[n-1]=e[n],e[n]=w}}else{if(!h.added&&a){var E=r.slice(A,A+h.count);E=E.map(function(b,C){var T=o[p+C];return T.length>b.length?T:b}),h.value=t.join(E)}else h.value=t.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var D=e[u-1];return u>1&&typeof D.value=="string"&&(D.added||D.removed)&&t.equals("",D.value)&&(e[u-2].value+=D.value,e.pop()),e}function tut(t){return{newPos:t.newPos,components:t.components.slice(0)}}function rut(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function $pe(t,e,r){return r=rut(r,{ignoreWhitespace:!0}),t8.diff(t,e,r)}function nut(t,e,r){return r8.diff(t,e,r)}function xk(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xk=function(e){return typeof e}:xk=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xk(t)}function X_(t){return out(t)||aut(t)||lut(t)||cut()}function out(t){if(Array.isArray(t))return Z_(t)}function aut(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function lut(t,e){if(t){if(typeof t=="string")return Z_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z_(t,e)}}function Z_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function cut(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
`))}formatNameWithHyperlink(r){return i3(r,{configuration:this.configuration,json:!1})}}});var iE,Z_=It(()=>{Io();iE=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(hx(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){let a=o.project.storedResolutions.get(e.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(hx(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let o=r.project.originalPackages.get(e.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function Yf(){}function rut(t,e,r,o,a){for(var n=0,u=e.length,A=0,p=0;n<u;n++){var h=e[n];if(h.removed){if(h.value=t.join(o.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var w=e[n-1];e[n-1]=e[n],e[n]=w}}else{if(!h.added&&a){var E=r.slice(A,A+h.count);E=E.map(function(b,C){var T=o[p+C];return T.length>b.length?T:b}),h.value=t.join(E)}else h.value=t.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var D=e[u-1];return u>1&&typeof D.value=="string"&&(D.added||D.removed)&&t.equals("",D.value)&&(e[u-2].value+=D.value,e.pop()),e}function nut(t){return{newPos:t.newPos,components:t.components.slice(0)}}function iut(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function rhe(t,e,r){return r=iut(r,{ignoreWhitespace:!0}),n8.diff(t,e,r)}function sut(t,e,r){return i8.diff(t,e,r)}function bQ(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bQ=function(e){return typeof e}:bQ=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bQ(t)}function $_(t){return lut(t)||cut(t)||uut(t)||Aut()}function lut(t){if(Array.isArray(t))return e8(t)}function cut(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function uut(t,e){if(t){if(typeof t=="string")return e8(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e8(t,e)}}function e8(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function Aut(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $_(t,e,r,o,a){e=e||[],r=r||[],o&&(t=o(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var u;if(uut.call(t)==="[object Array]"){for(e.push(t),u=new Array(t.length),r.push(u),n=0;n<t.length;n+=1)u[n]=$_(t[n],e,r,o,a);return e.pop(),r.pop(),u}if(t&&t.toJSON&&(t=t.toJSON()),xk(t)==="object"&&t!==null){e.push(t),u={},r.push(u);var A=[],p;for(p in t)t.hasOwnProperty(p)&&A.push(p);for(A.sort(),n=0;n<A.length;n+=1)p=A[n],u[p]=$_(t[p],e,r,o,p);e.pop(),r.pop()}else u=t;return u}function ehe(t,e,r,o,a,n,u){u||(u={}),typeof u.context>"u"&&(u.context=4);var A=nut(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(U){return U.map(function(J){return" "+J})}for(var h=[],E=0,w=0,D=[],b=1,C=1,T=function(J){var te=A[J],le=te.lines||te.value.replace(/\n$/,"").split(`
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t8(t,e,r,o,a){e=e||[],r=r||[],o&&(t=o(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var u;if(fut.call(t)==="[object Array]"){for(e.push(t),u=new Array(t.length),r.push(u),n=0;n<t.length;n+=1)u[n]=t8(t[n],e,r,o,a);return e.pop(),r.pop(),u}if(t&&t.toJSON&&(t=t.toJSON()),bQ(t)==="object"&&t!==null){e.push(t),u={},r.push(u);var A=[],p;for(p in t)t.hasOwnProperty(p)&&A.push(p);for(A.sort(),n=0;n<A.length;n+=1)p=A[n],u[p]=t8(t[p],e,r,o,p);e.pop(),r.pop()}else u=t;return u}function nhe(t,e,r,o,a,n,u){u||(u={}),typeof u.context>"u"&&(u.context=4);var A=sut(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(U){return U.map(function(z){return" "+z})}for(var h=[],E=0,w=0,D=[],b=1,C=1,T=function(z){var te=A[z],le=te.lines||te.value.replace(/\n$/,"").split(`
|
||||||
`);if(te.lines=le,te.added||te.removed){var ce;if(!E){var ue=A[J-1];E=b,w=C,ue&&(D=u.context>0?p(ue.lines.slice(-u.context)):[],E-=D.length,w-=D.length)}(ce=D).push.apply(ce,X_(le.map(function(fe){return(te.added?"+":"-")+fe}))),te.added?C+=le.length:b+=le.length}else{if(E)if(le.length<=u.context*2&&J<A.length-2){var Ie;(Ie=D).push.apply(Ie,X_(p(le)))}else{var he,De=Math.min(le.length,u.context);(he=D).push.apply(he,X_(p(le.slice(0,De))));var Ee={oldStart:E,oldLines:b-E+De,newStart:w,newLines:C-w+De,lines:D};if(J>=A.length-2&&le.length<=u.context){var g=/\n$/.test(r),me=/\n$/.test(o),Ce=le.length==0&&D.length>Ee.oldLines;!g&&Ce&&r.length>0&&D.splice(Ee.oldLines,0,"\\ No newline at end of file"),(!g&&!Ce||!me)&&D.push("\\ No newline at end of file")}h.push(Ee),E=0,w=0,D=[]}b+=le.length,C+=le.length}},N=0;N<A.length;N++)T(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var UUt,Xpe,Zpe,t8,r8,iut,sut,uut,D2,e8,n8=It(()=>{Wf.prototype={diff:function(e,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(T){return a?(setTimeout(function(){a(void 0,T)},0),!0):T}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=e.length,h=1,E=A+p;o.maxEditLength&&(E=Math.min(E,o.maxEditLength));var w=[{newPos:-1,components:[]}],D=this.extractCommon(w[0],r,e,0);if(w[0].newPos+1>=A&&D+1>=p)return u([{value:this.join(r),count:r.length}]);function b(){for(var T=-1*h;T<=h;T+=2){var N=void 0,U=w[T-1],J=w[T+1],te=(J?J.newPos:0)-T;U&&(w[T-1]=void 0);var le=U&&U.newPos+1<A,ce=J&&0<=te&&te<p;if(!le&&!ce){w[T]=void 0;continue}if(!le||ce&&U.newPos<J.newPos?(N=tut(J),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),te=n.extractCommon(N,r,e,T),N.newPos+1>=A&&te+1>=p)return u(eut(n,N.components,r,e,n.useLongestToken));w[T]=N}h++}if(a)(function T(){setTimeout(function(){if(h>E)return a();b()||T()},0)})();else for(;h<=E;){var C=b();if(C)return C}},pushComponent:function(e,r,o){var a=e[e.length-1];a&&a.added===r&&a.removed===o?e[e.length-1]={count:a.count+1,added:r,removed:o}:e.push({count:1,added:r,removed:o})},extractCommon:function(e,r,o,a){for(var n=r.length,u=o.length,A=e.newPos,p=A-a,h=0;A+1<n&&p+1<u&&this.equals(r[A+1],o[p+1]);)A++,p++,h++;return h&&e.components.push({count:h}),e.newPos=A,p},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],o=0;o<e.length;o++)e[o]&&r.push(e[o]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};UUt=new Wf;Xpe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Zpe=/\S/,t8=new Wf;t8.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!Zpe.test(t)&&!Zpe.test(e)};t8.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&Xpe.test(e[r])&&Xpe.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};r8=new Wf;r8.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var a=r[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};iut=new Wf;iut.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};sut=new Wf;sut.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};uut=Object.prototype.toString,D2=new Wf;D2.useLongestToken=!0;D2.tokenize=r8.tokenize;D2.castInput=function(t){var e=this.options,r=e.undefinedReplacement,o=e.stringifyReplacer,a=o===void 0?function(n,u){return typeof u>"u"?r:u}:o;return typeof t=="string"?t:JSON.stringify($_(t,null,null,a),a," ")};D2.equals=function(t,e){return Wf.prototype.equals.call(D2,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};e8=new Wf;e8.tokenize=function(t){return t.slice()};e8.join=e8.removeEmpty=function(t){return t}});var rhe=_((HUt,the)=>{var Aut=jl(),fut=fy(),put=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hut=/^\w*$/;function gut(t,e){if(Aut(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||fut(t)?!0:hut.test(t)||!put.test(t)||e!=null&&t in Object(e)}the.exports=gut});var she=_((qUt,ihe)=>{var nhe=mP(),dut="Expected a function";function i8(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(dut);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],n=r.cache;if(n.has(a))return n.get(a);var u=t.apply(this,o);return r.cache=n.set(a,u)||n,u};return r.cache=new(i8.Cache||nhe),r}i8.Cache=nhe;ihe.exports=i8});var ahe=_((jUt,ohe)=>{var mut=she(),yut=500;function Eut(t){var e=mut(t,function(o){return r.size===yut&&r.clear(),o}),r=e.cache;return e}ohe.exports=Eut});var s8=_((GUt,lhe)=>{
Line truncated
|
`);if(te.lines=le,te.added||te.removed){var de;if(!E){var ce=A[z-1];E=b,w=C,ce&&(D=u.context>0?p(ce.lines.slice(-u.context)):[],E-=D.length,w-=D.length)}(de=D).push.apply(de,$_(le.map(function(Ae){return(te.added?"+":"-")+Ae}))),te.added?C+=le.length:b+=le.length}else{if(E)if(le.length<=u.context*2&&z<A.length-2){var me;(me=D).push.apply(me,$_(p(le)))}else{var pe,ve=Math.min(le.length,u.context);(pe=D).push.apply(pe,$_(p(le.slice(0,ve))));var Ie={oldStart:E,oldLines:b-E+ve,newStart:w,newLines:C-w+ve,lines:D};if(z>=A.length-2&&le.length<=u.context){var g=/\n$/.test(r),Ce=/\n$/.test(o),ye=le.length==0&&D.length>Ie.oldLines;!g&&ye&&r.length>0&&D.splice(Ie.oldLines,0,"\\ No newline at end of file"),(!g&&!ye||!Ce)&&D.push("\\ No newline at end of file")}h.push(Ie),E=0,w=0,D=[]}b+=le.length,C+=le.length}},L=0;L<A.length;L++)T(L);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var WUt,ehe,the,n8,i8,out,aut,fut,D2,r8,s8=It(()=>{Yf.prototype={diff:function(e,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(T){return a?(setTimeout(function(){a(void 0,T)},0),!0):T}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=e.length,h=1,E=A+p;o.maxEditLength&&(E=Math.min(E,o.maxEditLength));var w=[{newPos:-1,components:[]}],D=this.extractCommon(w[0],r,e,0);if(w[0].newPos+1>=A&&D+1>=p)return u([{value:this.join(r),count:r.length}]);function b(){for(var T=-1*h;T<=h;T+=2){var L=void 0,U=w[T-1],z=w[T+1],te=(z?z.newPos:0)-T;U&&(w[T-1]=void 0);var le=U&&U.newPos+1<A,de=z&&0<=te&&te<p;if(!le&&!de){w[T]=void 0;continue}if(!le||de&&U.newPos<z.newPos?(L=nut(z),n.pushComponent(L.components,void 0,!0)):(L=U,L.newPos++,n.pushComponent(L.components,!0,void 0)),te=n.extractCommon(L,r,e,T),L.newPos+1>=A&&te+1>=p)return u(rut(n,L.components,r,e,n.useLongestToken));w[T]=L}h++}if(a)(function T(){setTimeout(function(){if(h>E)return a();b()||T()},0)})();else for(;h<=E;){var C=b();if(C)return C}},pushComponent:function(e,r,o){var a=e[e.length-1];a&&a.added===r&&a.removed===o?e[e.length-1]={count:a.count+1,added:r,removed:o}:e.push({count:1,added:r,removed:o})},extractCommon:function(e,r,o,a){for(var n=r.length,u=o.length,A=e.newPos,p=A-a,h=0;A+1<n&&p+1<u&&this.equals(r[A+1],o[p+1]);)A++,p++,h++;return h&&e.components.push({count:h}),e.newPos=A,p},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],o=0;o<e.length;o++)e[o]&&r.push(e[o]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};WUt=new Yf;ehe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,the=/\S/,n8=new Yf;n8.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!the.test(t)&&!the.test(e)};n8.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&ehe.test(e[r])&&ehe.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};i8=new Yf;i8.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var a=r[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};out=new Yf;out.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};aut=new Yf;aut.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};fut=Object.prototype.toString,D2=new Yf;D2.useLongestToken=!0;D2.tokenize=i8.tokenize;D2.castInput=function(t){var e=this.options,r=e.undefinedReplacement,o=e.stringifyReplacer,a=o===void 0?function(n,u){return typeof u>"u"?r:u}:o;return typeof t=="string"?t:JSON.stringify(t8(t,null,null,a),a," ")};D2.equals=function(t,e){return Yf.prototype.equals.call(D2,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};r8=new Yf;r8.tokenize=function(t){return t.slice()};r8.join=r8.removeEmpty=function(t){return t}});var she=_((KUt,ihe)=>{var put=jl(),hut=hy(),gut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dut=/^\w*$/;function mut(t,e){if(put(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||hut(t)?!0:dut.test(t)||!gut.test(t)||e!=null&&t in Object(e)}ihe.exports=mut});var lhe=_((VUt,ahe)=>{var ohe=dS(),yut="Expected a function";function o8(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(yut);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],n=r.cache;if(n.has(a))return n.get(a);var u=t.apply(this,o);return r.cache=n.set(a,u)||n,u};return r.cache=new(o8.Cache||ohe),r}o8.Cache=ohe;ahe.exports=o8});var uhe=_((zUt,che)=>{var Eut=lhe(),Cut=500;function Iut(t){var e=Eut(t,function(o){return r.size===Cut&&r.clear(),o}),r=e.cache;return e}che.exports=Iut});var a8=_((JUt,Ahe)=>{
Line truncated
|
||||||
`;await ae.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function BAt({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,peerWarnings:A=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,w=[],D=new Map,b=new Map,C=new Map,T=new Map,N=new Map(t.workspaces.map(ce=>{let ue=ce.anchoredLocator.locatorHash,Ie=o.get(ue);if(typeof Ie>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[ue,E1(Ie)]})),U=()=>{let ce=ae.mktempSync(),ue=V.join(ce,"stacktrace.log"),Ie=String(w.length+1).length,he=w.map((De,Ee)=>`${`${Ee+1}.`.padStart(Ie," ")} ${Qa(De)}
|
`;await ae.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function DAt({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,peerWarnings:A=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,w=[],D=new Map,b=new Map,C=new Map,T=new Map,L=new Map,U=new Map(t.workspaces.map(ce=>{let me=ce.anchoredLocator.locatorHash,pe=o.get(me);if(typeof pe>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[me,C1(pe)]})),z=()=>{let ce=ae.mktempSync(),me=K.join(ce,"stacktrace.log"),pe=String(w.length+1).length,ve=w.map((Ie,g)=>`${`${g+1}.`.padStart(pe," ")} ${ka(Ie)}
|
||||||
`).join("");throw ae.writeFileSync(ue,he),ae.detachTemp(ce),new Jt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${Ae.fromPortablePath(ue)}`)},J=ce=>{let ue=r.get(ce.descriptorHash);if(typeof ue>"u")throw new Error("Assertion failed: The resolution should have been registered");let Ie=o.get(ue);if(!Ie)throw new Error("Assertion failed: The package could not be found");return Ie},te=(ce,ue,Ie,{top:he,optional:De})=>{w.length>1e3&&U(),w.push(ue);let Ee=le(ce,ue,Ie,{top:he,optional:De});return w.pop(),Ee},le=(ce,ue,Ie,{top:he,optional:De})=>{if(De||n.delete(ue.locatorHash),a.has(ue.locatorHash))return;a.add(ue.locatorHash);let Ee=o.get(ue.locatorHash);if(!Ee)throw new Error(`Assertion failed: The package (${jr(t.configuration,ue)}) should have been registered`);let g=[],me=new Map,Ce=[],fe=[],ie=[],Z=[];for(let Re of Array.from(Ee.dependencies.values())){if(Ee.peerDependencies.has(Re.identHash)&&Ee.locatorHash!==he)continue;if(Sf(Re))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Re.descriptorHash);let ht=De;if(!ht){let xe=Ee.dependenciesMeta.get(rn(Re));if(typeof xe<"u"){let tt=xe.get(null);typeof tt<"u"&&tt.optional&&(ht=!0)}}let q=r.get(Re.descriptorHash);if(!q)throw new Error(`Assertion failed: The resolution (${Jn(t.configuration,Re)}) should have been registered`);let nt=N.get(q)||o.get(q);if(!nt)throw new Error(`Assertion failed: The package (${q}, resolved from ${Jn(t.configuration,Re)}) should have been registered`);if(nt.peerDependencies.size===0){te(Re,nt,new Map,{top:he,optional:ht});continue}let Le,Te,ke=new Set,Ke=new Map;Ce.push(()=>{Le=MM(Re,ue.locatorHash),Te=UM(nt,ue.locatorHash),Ee.dependencies.delete(Re.identHash),Ee.dependencies.set(Le.identHash,Le),r.set(Le.descriptorHash,Te.locatorHash),e.set(Le.descriptorHash,Le),o.set(Te.locatorHash,Te),g.push([nt,Le,Te])}),fe.push(()=>{T.set(Te.locatorHash,Ke);for(let xe of Te.peerDependencies.values()){let He=Al(me,xe.identHash,()=>{let x=Ie.get(xe.identHash)??null,I=Ee.dependencies.get(xe.identHash);return!I&&w1(ue,xe)&&(ce.identHash===ue.identHash?I=ce:(I=kn(ue,ce.range),e.set(I.descriptorHash,I),r.set(I.descriptorHash,ue.locatorHash),h.delete(I.descriptorHash),x=null)),I||(I=kn(xe,"missing:")),{subject:ue,ident:xe,provided:I,root:!x,requests:new Map,hash:`p${Ji(ue.locatorHash,xe.identHash).slice(0,5)}`}}).provided;if(He.range==="missing:"&&Te.dependencies.has(xe.identHash)){Te.peerDependencies.delete(xe.identHash);continue}Ke.set(xe.identHash,{requester:Te,descriptor:xe,meta:Te.peerDependenciesMeta.get(rn(xe)),children:new Map}),Te.dependencies.set(xe.identHash,He),Sf(He)&&Jm(C,He.descriptorHash).add(Te.locatorHash),D.set(He.identHash,He),He.range==="missing:"&&ke.add(He.identHash)}Te.dependencies=new Map(Ss(Te.dependencies,([xe,tt])=>rn(tt)))}),ie.push(()=>{if(!o.has(Te.locatorHash))return;let xe=E.get(nt.locatorHash);typeof xe=="number"&&xe>=2&&U();let tt=E.get(nt.locatorHash),He=typeof tt<"u"?tt+1:1;E.set(nt.locatorHash,He),te(Le,Te,Ke,{top:he,optional:ht}),E.set(nt.locatorHash,He-1)}),Z.push(()=>{let xe=Ee.dependencies.get(Re.identHash);if(typeof xe>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let tt=r.get(xe.descriptorHash);if(typeof tt>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let He=T.get(tt);if(typeof He>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let x of me.values()){let I=He.get(x.ident.identHash);I&&(x.requests.set(xe.descriptorHash,I),p.set(x.hash,x),x.root||Ie.get(x.ident.identHash)?.children.set(xe.descriptorHash,I))}if(o.has(Te.locatorHash))for(let x of ke)Te.dependencies.delete(x)})}for(let Re of[...Ce,...fe])Re();let Se;do{Se=!0;for(let[Re,ht,q]of g){let nt=A1(b,Re.locatorHash),Le=Ji(...[...q.dependencies.values()].map(xe=>{let tt=xe.range!=="missing:"?r.get(xe.descriptorHash):"missing:";if(typeof tt>"u")throw new Error(`Assertion failed: Expected the resolution for ${Jn(t.configuration,xe)} to have been registered`);return tt===he?`${tt} (top)`:tt}),ht.identHash),Te=nt.get(Le);if(typeof Te>"u"){nt.set(Le,ht);continue}if(Te===ht)continue;o.delete(q.locatorHash),e.delete(ht.descriptorHash),r.delete(ht.descriptorHash),a.delete(q.locatorHash);let ke=C.get(ht.descriptorHash)||[],Ke=[Ee.locatorHash,...ke];C.delete(ht.descriptorHash);for(let xe of Ke){let tt=o.get(xe);typeof tt>"u"||(tt.dependencies.get(ht.identHash).descriptorHash!==Te.descriptorHash&&(Se=!1),tt.dependencies.set(ht.identHash,Te))}for(let xe of me.values())xe.provided.descriptorHash===ht.descriptorHash&&(xe.provided=Te)}}while(!Se);for(let Re of[...ie,...Z])Re()};for(let ce of t.workspaces){let ue=ce.anchoredLocator;h.delete(ce.anchoredDescriptor.descriptorHash),te(ce.anchoredDescriptor,ue,new Map,{top:ue.locatorHash,optional:!1})}for(let ce of p.values()){if(!ce.root)continue;let ue=o.get(ce.subject.locatorHash);if(typeof ue>"u")co
Line truncated
|
`).join("");throw ae.writeFileSync(me,ve),ae.detachTemp(ce),new zt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${ue.fromPortablePath(me)}`)},te=ce=>{let me=r.get(ce.descriptorHash);if(typeof me>"u")throw new Error("Assertion failed: The resolution should have been registered");let pe=o.get(me);if(!pe)throw new Error("Assertion failed: The package could not be found");return pe},le=(ce,me,pe,{top:ve,optional:Ie})=>{w.length>1e3&&z(),w.push(me);let g=de(ce,me,pe,{top:ve,optional:Ie});return w.pop(),g},de=(ce,me,pe,{top:ve,optional:Ie})=>{if(Ie||n.delete(me.locatorHash),a.has(me.locatorHash))return;a.add(me.locatorHash);let g=o.get(me.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${jr(t.configuration,me)}) should have been registered`);let Ce=new Set,ye=new Map,Ae=[],ie=[],Z=[],Pe=[];for(let Re of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Re.identHash)&&g.locatorHash!==ve)continue;if(Sf(Re))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Re.descriptorHash);let gt=Ie;if(!gt){let Qe=g.dependenciesMeta.get(rn(Re));if(typeof Qe<"u"){let it=Qe.get(null);typeof it<"u"&&it.optional&&(gt=!0)}}let q=r.get(Re.descriptorHash);if(!q)throw new Error(`Assertion failed: The resolution (${zn(t.configuration,Re)}) should have been registered`);let rt=U.get(q)||o.get(q);if(!rt)throw new Error(`Assertion failed: The package (${q}, resolved from ${zn(t.configuration,Re)}) should have been registered`);if(rt.peerDependencies.size===0){le(Re,rt,new Map,{top:ve,optional:gt});continue}let Te,Ne,xe=new Set,Ye=new Map;Ae.push(()=>{Te=_M(Re,me.locatorHash),Ne=HM(rt,me.locatorHash),g.dependencies.set(Re.identHash,Te),r.set(Te.descriptorHash,Ne.locatorHash),e.set(Te.descriptorHash,Te),o.set(Ne.locatorHash,Ne),vf(T,Ne.locatorHash).add(Te.descriptorHash),Ce.add(Ne.locatorHash)}),ie.push(()=>{L.set(Ne.locatorHash,Ye);for(let Qe of Ne.peerDependencies.values()){let Ue=Al(ye,Qe.identHash,()=>{let x=pe.get(Qe.identHash)??null,I=g.dependencies.get(Qe.identHash);return!I&&w1(me,Qe)&&(ce.identHash===me.identHash?I=ce:(I=Qn(me,ce.range),e.set(I.descriptorHash,I),r.set(I.descriptorHash,me.locatorHash),h.delete(I.descriptorHash),x=null)),I||(I=Qn(Qe,"missing:")),{subject:me,ident:Qe,provided:I,root:!x,requests:new Map,hash:`p${zi(me.locatorHash,Qe.identHash).slice(0,5)}`}}).provided;if(Ue.range==="missing:"&&Ne.dependencies.has(Qe.identHash)){Ne.peerDependencies.delete(Qe.identHash);continue}if(Ye.set(Qe.identHash,{requester:Ne,descriptor:Qe,meta:Ne.peerDependenciesMeta.get(rn(Qe)),children:new Map}),Ne.dependencies.set(Qe.identHash,Ue),Sf(Ue)){let x=r.get(Ue.descriptorHash);vf(C,x).add(Ne.locatorHash)}D.set(Ue.identHash,Ue),Ue.range==="missing:"&&xe.add(Ue.identHash)}Ne.dependencies=new Map(Ps(Ne.dependencies,([Qe,it])=>rn(it)))}),Z.push(()=>{if(!o.has(Ne.locatorHash))return;let Qe=E.get(rt.locatorHash);typeof Qe=="number"&&Qe>=2&&z();let it=E.get(rt.locatorHash),Ue=typeof it<"u"?it+1:1;E.set(rt.locatorHash,Ue),le(Te,Ne,Ye,{top:ve,optional:gt}),E.set(rt.locatorHash,Ue-1)}),Pe.push(()=>{let Qe=r.get(Te.descriptorHash);if(typeof Qe>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let it=L.get(Qe);if(typeof it>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let Ue of ye.values()){let x=it.get(Ue.ident.identHash);x&&(Ue.requests.set(Te.descriptorHash,x),p.set(Ue.hash,Ue),Ue.root||pe.get(Ue.ident.identHash)?.children.set(Te.descriptorHash,x))}if(o.has(Ne.locatorHash))for(let Ue of xe)Ne.dependencies.delete(Ue)})}for(let Re of[...Ae,...ie])Re();for(let Re of Ce){Ce.delete(Re);let gt=o.get(Re),q=zi(cy(gt).locatorHash,...Array.from(gt.dependencies.values(),xe=>{let Ye=xe.range!=="missing:"?r.get(xe.descriptorHash):"missing:";if(typeof Ye>"u")throw new Error(`Assertion failed: Expected the resolution for ${zn(t.configuration,xe)} to have been registered`);return Ye===ve?`${Ye} (top)`:Ye})),rt=b.get(q);if(typeof rt>"u"){b.set(q,gt);continue}let Te=vf(T,rt.locatorHash);for(let xe of T.get(gt.locatorHash)??[])r.set(xe,rt.locatorHash),Te.add(xe);o.delete(gt.locatorHash),a.delete(gt.locatorHash),Ce.delete(gt.locatorHash);let Ne=C.get(gt.locatorHash);if(Ne!==void 0){let xe=vf(C,rt.locatorHash);for(let Ye of Ne)xe.add(Ye),Ce.add(Ye)}}for(let Re of[...Z,...Pe])Re()};for(let ce of t.workspaces){let me=ce.anchoredLocator;h.delete(ce.anchoredDescriptor.descriptorHash),le(ce.anchoredDescriptor,me,new Map,{top:me.locatorHash,optional:!1})}for(let ce of p.values()){if(!ce.root)continue;let me=o.get(ce.subject.locatorHash);if(typeof me>"u")continue;for(let ve of ce.requests.values()){let Ie=`p${zi(ce.subject.locatorHash,rn(ce.ident),ve.requester.locatorHash).slice(0,5)}`;u.set(Ie,{subject:ce.subject.locatorHash,requested:ce.ident,rootRequester:ve.requester.locatorHash,allRequesters:Array.from(S1(ve),g=>g.requester.locatorHash)})}let pe=[...S1(ce)];if(ce.provided.rang
Line truncated
|
||||||
|
|
||||||
${[w,D,b].join(`
|
${[w,D,b].join(`
|
||||||
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=V.join(this.cwd,mr.lockfile),r=this.configuration.get("defaultLanguageName");if(ae.existsSync(e)){let o=await ae.readFilePromise(e,"utf8");this.lockFileChecksum=Ohe(o);let a=Vi(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<Tk;for(let A of Object.keys(a)){if(A==="__metadata")continue;let p=a[A];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=Pf(p.resolution,!0),E=new _t;E.load(p,{yamlCompatibilityMode:!0});let w=E.version,D=E.languageName||r,b=p.linkType.toUpperCase(),C=p.conditions??null,T=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,J=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){let ce=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,ce)}let le={...h,version:w,languageName:D,linkType:b,conditions:C,dependencies:T,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:J,bin:te};this.originalPackages.set(le.locatorHash,le);for(let ce of A.split(EAt)){let ue=lh(ce);n<=6&&(ue=this.configuration.normalizeDependency(ue),ue=kn(ue,ue.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ue.descriptorHash,ue),this.storedResolutions.set(ue.descriptorHash,h.locatorHash)}}}else o.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,Rk.default)(4),o=async(a,n)=>{if(e.has(n))return a;e.add(n);let u=new iE(n,{project:this});await r(()=>u.setup());let A=a.then(()=>{this.addWorkspace(u)});return Array.from(u.workspacesCwds).reduce(o,A)};await o(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${Ui(this.configuration,e.anchoredLocator)}: ${Ae.fromPortablePath(e.cwd)} conflicts with ${Ae.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){V.isAbsolute(e)||(e=V.resolve(this.cwd,e)),e=V.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let o of this.workspaces)V.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${Ui(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(ci.protocol)){let o=e.range.slice(ci.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!Fa(o))return this.tryWorkspaceByCwd(o)}let r=this.tryWorkspaceByIdent(e);return r===null||(Sf(e)&&(e=C1(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${Jn(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Jc(e)&&(e=I1(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${jr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if("descriptorHash"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let o=new Set(this.storedResolutions.values());typeof r<"u"&&!o.has(r)&&this.deleteLocator(r)}if("locatorHash"in e){this.deleteLocator(e.locatorHash);for(let[r,o]of this.storedResolutions)o===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[o,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(o)}for(let o of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(o,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(o.locatorHash);let n=r.get(o.locatorHash);if(n){r.delete(o.locatorHash);for(let u of n)this.deleteDescriptor(u)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,o]of e.dependencies)Sf(o)&&e.dLine truncated
|
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=K.join(this.cwd,mr.lockfile),r=this.configuration.get("defaultLanguageName");if(ae.existsSync(e)){let o=await ae.readFilePromise(e,"utf8");this.lockFileChecksum=_he(o);let a=Ki(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<NQ;for(let A of Object.keys(a)){if(A==="__metadata")continue;let p=a[A];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=xf(p.resolution,!0),E=new _t;E.load(p,{yamlCompatibilityMode:!0});let w=E.version,D=E.languageName||r,b=p.linkType.toUpperCase(),C=p.conditions??null,T=E.dependencies,L=E.peerDependencies,U=E.dependenciesMeta,z=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){let de=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,de)}let le={...h,version:w,languageName:D,linkType:b,conditions:C,dependencies:T,peerDependencies:L,dependenciesMeta:U,peerDependenciesMeta:z,bin:te};this.originalPackages.set(le.locatorHash,le);for(let de of A.split(IAt)){let ce=ch(de);n<=6&&(ce=this.configuration.normalizeDependency(ce),ce=Qn(ce,ce.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ce.descriptorHash,ce),this.storedResolutions.set(ce.descriptorHash,h.locatorHash)}}}else o.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,TQ.default)(4),o=async(a,n)=>{if(e.has(n))return a;e.add(n);let u=new oE(n,{project:this});await r(()=>u.setup());let A=a.then(()=>{this.addWorkspace(u)});return Array.from(u.workspacesCwds).reduce(o,A)};await o(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${Ui(this.configuration,e.anchoredLocator)}: ${ue.fromPortablePath(e.cwd)} conflicts with ${ue.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){K.isAbsolute(e)||(e=K.resolve(this.cwd,e)),e=K.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let o of this.workspaces)K.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${Ui(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(ci.protocol)){let o=e.range.slice(ci.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!Fa(o))return this.tryWorkspaceByCwd(o)}let r=this.tryWorkspaceByIdent(e);return r===null||(Sf(e)&&(e=I1(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${zn(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(zc(e)&&(e=cy(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${jr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if("descriptorHash"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let o=new Set(this.storedResolutions.values());typeof r<"u"&&!o.has(r)&&this.deleteLocator(r)}if("locatorHash"in e){this.deleteLocator(e.locatorHash);for(let[r,o]of this.storedResolutions)o===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[o,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(o)}for(let o of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(o,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(o.locatorHash);let n=r.get(o.locatorHash);if(n){r.delete(o.locatorHash);for(let u of n)this.deleteDescriptor(u)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,o]of e.dependencies)Sf(o)&&e.dLine truncated
|
||||||
`;switch(nt.type){case 0:Le+=`# Script name: ${nt.script}
|
`;switch(rt.type){case 0:Te+=`# Script name: ${rt.script}
|
||||||
`;break;case 1:Le+=`# Script code: ${nt.script}
|
`;break;case 1:Te+=`# Script code: ${rt.script}
|
||||||
`;break}let Te=null;if(!await ae.mktempPromise(async Ke=>{let xe=V.join(Ke,"build.log"),{stdout:tt,stderr:He}=this.configuration.getSubprocessStreams(xe,{header:Le,prefix:jr(this.configuration,Z),report:r}),x;try{switch(nt.type){case 0:x=await Db(Z,nt.script,[],{cwd:q,project:this,stdin:Te,stdout:tt,stderr:He});break;case 1:x=await n3(Z,nt.script,[],{cwd:q,project:this,stdin:Te,stdout:tt,stderr:He});break}}catch(y){He.write(y.stack),x=1}if(tt.end(),He.end(),x===0)return!0;ae.detachTemp(Ke);let I=`${jr(this.configuration,Z)} couldn't be built successfully (exit code ${Ut(this.configuration,x,Ct.NUMBER)}, logs can be found here: ${Ut(this.configuration,xe,Ct.PATH)})`,P=this.optionalBuilds.has(Z.locatorHash);return P?r.reportInfo(9,I):r.reportError(9,I),Nue&&r.reportFold(Ae.fromPortablePath(xe),ae.readFileSync(xe,"utf8")),P}))return!1}return!0});fe.push(...ht,Promise.allSettled(ht).then(q=>{le.delete(ie),q.every(nt=>nt.status==="fulfilled"&&nt.value===!0)&&Ee.set(Z.locatorHash,Re)}))}if(await Wc(fe),Ce===le.size){let ie=Array.from(le).map(Z=>{let Se=this.storedPackages.get(Z);if(!Se)throw new Error("Assertion failed: The package should have been registered");return jr(this.configuration,Se)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${ie})`);break}}this.storedBuildState=Ee,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Lt.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get("nodeLinker");ze.telemetry?.reportInstall(r);let o=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&e.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,w)=>{e.report.reportWarning(E,w)},reportError:(E,w)=>{e.report.reportError(E,w),o=!0}})}),o)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,w]of E)for(let D of w)D.status="inactive";let n=V.join(this.cwd,mr.lockfile),u=null;if(e.immutable)try{u=await ae.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Jt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{DAt(this,e.report);for(let[,E]of a)for(let[,w]of E)for(let D of w)if(D.userProvided){let b=Ut(this.configuration,D,Ct.PACKAGE_EXTENSION);switch(D.status){case"inactive":e.report.reportWarning(68,`${b}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${b}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(u!==null){let E=G0(u,this.generateLockfile());if(E!==u){let w=ehe(n,n,u,E,void 0,void 0,{maxEditLength:100});if(w){e.report.reportSeparator();for(let D of w.hunks){e.report.reportInfo(null,`@@ -${D.oldStart},${D.oldLines} +${D.newStart},${D.newLines} @@`);for(let b of D.lines)b.startsWith("+")?e.report.reportError(28,Ut(this.configuration,b,Ct.ADDED)):b.startsWith("-")?e.report.reportError(28,Ut(this.configuration,b,Ct.REMOVED)):e.report.reportInfo(null,Ut(this.configuration,b,"grey"))}e.report.reportSeparator()}throw new Jt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,w]of E)for(let D of w)D.userProvided&&D.status==="active"&&ze.telemetry?.reportPackageExtension(Ig(D,Ct.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e)});let A=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],p=await Promise.all(A.map(async E=>px(E,{cwd:this.cwd})));(typeof e.persistProject>"u"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode==="update-lockfile"){e.report.reportWarning(73,`Skipped due to ${Ut(this.configuration,"mode=update-lockfile",Ct.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(A.map(async w=>px(w,{cwd:this.cwd})));for(let w=0;w<A.length;++w)p[w]!==E[w]&&e.report.reportError(64,`The checksum for ${A[w]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let h=!1;await e.report.startTimerPromise("Post-install validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,w)=>{e.report.r
Line truncated
|
`;break}let Ne=null;if(!await ae.mktempPromise(async Ye=>{let Qe=K.join(Ye,"build.log"),{stdout:it,stderr:Ue}=this.configuration.getSubprocessStreams(Qe,{header:Te,prefix:jr(this.configuration,Z),report:r}),x;try{switch(rt.type){case 0:x=await Db(Z,rt.script,[],{cwd:q,project:this,stdin:Ne,stdout:it,stderr:Ue});break;case 1:x=await s3(Z,rt.script,[],{cwd:q,project:this,stdin:Ne,stdout:it,stderr:Ue});break}}catch(y){Ue.write(y.stack),x=1}if(it.end(),Ue.end(),x===0)return!0;ae.detachTemp(Ye);let I=`${jr(this.configuration,Z)} couldn't be built successfully (exit code ${Ut(this.configuration,x,Ct.NUMBER)}, logs can be found here: ${Ut(this.configuration,Qe,Ct.PATH)})`,S=this.optionalBuilds.has(Z.locatorHash);return S?r.reportInfo(9,I):r.reportError(9,I),Mue&&r.reportFold(ue.fromPortablePath(Qe),ae.readFileSync(Qe,"utf8")),S}))return!1}return!0});Ae.push(...gt,Promise.allSettled(gt).then(q=>{le.delete(ie),q.every(rt=>rt.status==="fulfilled"&&rt.value===!0)&&Ie.set(Z.locatorHash,Re)}))}if(await Wc(Ae),ye===le.size){let ie=Array.from(le).map(Z=>{let Pe=this.storedPackages.get(Z);if(!Pe)throw new Error("Assertion failed: The package should have been registered");return jr(this.configuration,Pe)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${ie})`);break}}this.storedBuildState=Ie,this.skippedBuilds=L}async installWithNewReport(e,r){return(await Nt.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get("nodeLinker");Je.telemetry?.reportInstall(r);let o=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&e.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,w)=>{e.report.reportWarning(E,w)},reportError:(E,w)=>{e.report.reportError(E,w),o=!0}})}),o)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,w]of E)for(let D of w)D.status="inactive";let n=K.join(this.cwd,mr.lockfile),u=null;if(e.immutable)try{u=await ae.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new zt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{SAt(this,e.report);for(let[,E]of a)for(let[,w]of E)for(let D of w)if(D.userProvided){let b=Ut(this.configuration,D,Ct.PACKAGE_EXTENSION);switch(D.status){case"inactive":e.report.reportWarning(68,`${b}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${b}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(u!==null){let E=Y0(u,this.generateLockfile());if(E!==u){let w=nhe(n,n,u,E,void 0,void 0,{maxEditLength:100});if(w){e.report.reportSeparator();for(let D of w.hunks){e.report.reportInfo(null,`@@ -${D.oldStart},${D.oldLines} +${D.newStart},${D.newLines} @@`);for(let b of D.lines)b.startsWith("+")?e.report.reportError(28,Ut(this.configuration,b,Ct.ADDED)):b.startsWith("-")?e.report.reportError(28,Ut(this.configuration,b,Ct.REMOVED)):e.report.reportInfo(null,Ut(this.configuration,b,"grey"))}e.report.reportSeparator()}throw new zt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,w]of E)for(let D of w)D.userProvided&&D.status==="active"&&Je.telemetry?.reportPackageExtension(Bg(D,Ct.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e)});let A=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],p=await Promise.all(A.map(async E=>px(E,{cwd:this.cwd})));(typeof e.persistProject>"u"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode==="update-lockfile"){e.report.reportWarning(73,`Skipped due to ${Ut(this.configuration,"mode=update-lockfile",Ct.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(A.map(async w=>px(w,{cwd:this.cwd})));for(let w=0;w<A.length;++w)p[w]!==E[w]&&e.report.reportError(64,`The checksum for ${A[w]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let h=!1;await e.report.startTimerPromise("Post-install validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,w)=>{e.report.r
Line truncated
|
||||||
`,`# Manual changes might be lost - proceed with caution!
|
`,`# Manual changes might be lost - proceed with caution!
|
||||||
`].join("")}
|
`].join("")}
|
||||||
`+Sa(r)}async persistLockfile(){let e=V.join(this.cwd,mr.lockfile),r="";try{r=await ae.readFilePromise(e,"utf8")}catch{}let o=this.generateLockfile(),a=G0(r,o);a!==r&&(await ae.writeFilePromise(e,a),this.lockFileChecksum=Ohe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let u of Object.values(f8))e.push(...u);let r=(0,Fk.default)(this,e),o=p8.default.serialize(r),a=Ji(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await ae.mkdirPromise(V.dirname(n),{recursive:!0}),await ae.writeFilePromise(n,await IAt(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await wAt(await ae.readFilePromise(a));n=p8.default.deserialize(u),this.installStateChecksum=Ji(u)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,Fk.default)(n,f8.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,Fk.default)(n,f8.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Ri}),await this.persistInstallStateFile()}async persist(){let e=(0,Rk.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let o=new Set([".gitignore"]);if(!n4(e.cwd,this.cwd)||!await ae.existsPromise(e.cwd))return null;let a=[];for(let u of await ae.readdirPromise(e.cwd)){if(o.has(u))continue;let A=V.resolve(e.cwd,u);e.markedFiles.has(A)||(e.immutable?r.reportError(56,`${Ut(this.configuration,V.basename(A),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(ae.lstatPromise(A).then(async p=>(await ae.removePromise(A),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((u,A)=>u+A,0)}}}});function SAt(t){let o=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),u=n+a,A=t.state.lastTips??o*864e5,p=A+864e5+8*36e5-t.timeZone,h=u<=t.timeNow,E=p<=t.timeNow,w=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(w={},w.lastUpdate=h?t.timeNow:n,w.lastTips=A,w.blocks=h?{}:t.state.blocks,w.displayedTips=t.state.displayedTips),{nextState:w,triggerUpdate:h,triggerTips:E,nextTips:E?o*864e5:A}}var sE,_he=It(()=>{St();r2();ah();eb();Gl();bf();sE=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let o=this.getRegistryPath();this.isNew=!ae.existsSync(o),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),o=A=>A&&nn?nA(nn,A):!1,a=e.map((A,p)=>p).filter(A=>e[A]&&o(e[A]?.selector));if(a.length===0)return null;let n=a.filter(A=>!r.has(A));if(n.length===0){let A=Math.floor(a.length*.2);this.displayedTips=A>0?this.displayedTips.slice(-A):[],n=a.filter(p=>!r.has(p))}let u=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(u),this.commitTips(),e[u]}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"<none>")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){Jm(this.values,e).add(r)}reportEnumerator(e,r){Jm(this.enumerators,e).add(Ji(r))}reportHit(e,r="*"){let o=A1(this.hits,e),a=Al(o,r,()=>0);o.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return V.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),o;try{o=ae.readJsonSync(r)}catch{o={}}let{nextState:a,triggerUpdate:n,triggerTips:u,nextTips:A}=SAt({state:o,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=A,this.displayedTips=o.displayedTips??[],a!==null)try{ae.mkdirSync(V.dirname(r),{recursive:!0}),ae.writeJsonSync(r,a)}catch{return!1}if(u&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=o.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=w=>CU(h,w,{configuration:this.configuration}).catch(()=>{});for(let[w,D]of Object.entries(o.blocks??{})){if(Object.k
Line truncated
|
`+Pa(r)}async persistLockfile(){let e=K.join(this.cwd,mr.lockfile),r="";try{r=await ae.readFilePromise(e,"utf8")}catch{}let o=this.generateLockfile(),a=Y0(r,o);a!==r&&(await ae.writeFilePromise(e,a),this.lockFileChecksum=_he(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let u of Object.values(h8))e.push(...u);let r=(0,RQ.default)(this,e),o=g8.default.serialize(r),a=zi(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await ae.mkdirPromise(K.dirname(n),{recursive:!0}),await ae.writeFilePromise(n,await BAt(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await vAt(await ae.readFilePromise(a));n=g8.default.deserialize(u),this.installStateChecksum=zi(u)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,RQ.default)(n,h8.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,RQ.default)(n,h8.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Ri}),await this.persistInstallStateFile()}async persist(){let e=(0,TQ.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let o=new Set([".gitignore"]);if(!s4(e.cwd,this.cwd)||!await ae.existsPromise(e.cwd))return null;let a=[];for(let u of await ae.readdirPromise(e.cwd)){if(o.has(u))continue;let A=K.resolve(e.cwd,u);e.markedFiles.has(A)||(e.immutable?r.reportError(56,`${Ut(this.configuration,K.basename(A),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(ae.lstatPromise(A).then(async p=>(await ae.removePromise(A),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((u,A)=>u+A,0)}}}});function xAt(t){let o=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),u=n+a,A=t.state.lastTips??o*864e5,p=A+864e5+8*36e5-t.timeZone,h=u<=t.timeNow,E=p<=t.timeNow,w=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(w={},w.lastUpdate=h?t.timeNow:n,w.lastTips=A,w.blocks=h?{}:t.state.blocks,w.displayedTips=t.state.displayedTips),{nextState:w,triggerUpdate:h,triggerTips:E,nextTips:E?o*864e5:A}}var aE,jhe=It(()=>{Pt();r2();lh();eb();Gl();Qf();aE=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let o=this.getRegistryPath();this.isNew=!ae.existsSync(o),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),o=A=>A&&nn?nA(nn,A):!1,a=e.map((A,p)=>p).filter(A=>e[A]&&o(e[A]?.selector));if(a.length===0)return null;let n=a.filter(A=>!r.has(A));if(n.length===0){let A=Math.floor(a.length*.2);this.displayedTips=A>0?this.displayedTips.slice(-A):[],n=a.filter(p=>!r.has(p))}let u=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(u),this.commitTips(),e[u]}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"<none>")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){vf(this.values,e).add(r)}reportEnumerator(e,r){vf(this.enumerators,e).add(zi(r))}reportHit(e,r="*"){let o=nO(this.hits,e),a=Al(o,r,()=>0);o.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return K.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),o;try{o=ae.readJsonSync(r)}catch{o={}}let{nextState:a,triggerUpdate:n,triggerTips:u,nextTips:A}=xAt({state:o,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=A,this.displayedTips=o.displayedTips??[],a!==null)try{ae.mkdirSync(K.dirname(r),{recursive:!0}),ae.writeJsonSync(r,a)}catch{return!1}if(u&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=o.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=w=>wU(h,w,{configuration:this.configuration}).catch(()=>{});for(let[w,D]of Object.entries(o.blocks??{})){if(Object.k
Line truncated
|
||||||
`),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(t.styles[u[h]],A,p);return A},a=(n,u,A)=>{t.styles[n]=e({name:n,codes:u}),(t.keys[A]||(t.keys[A]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>o(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=QAt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,u)=>{let A=typeof u=="string"?t[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),t.styles[n]=A,A.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},t.theme=n=>{if(!kAt(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))t.alias(u,n[u]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=Yhe(),t.define=a,t};m8.exports=Vhe();m8.exports.create=Vhe});var xo=_(an=>{"use strict";var FAt=Object.prototype.toString,ic=eu(),Khe=!1,y8=[],Jhe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};an.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);an.hasColor=t=>!!t&&ic.hasColor(t);var Ok=an.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);an.nativeType=t=>FAt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");an.isAsyncFn=t=>an.nativeType(t)==="asyncfunction";an.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";an.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;an.scrollDown=(t=[])=>[...t.slice(1),t[0]];an.scrollUp=(t=[])=>[t.pop(),...t];an.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),e};an.swap=(t,e,r)=>{let o=t.length,a=r===o?0:r<0?o-1:r,n=t[e];t[e]=t[a],t[a]=n};an.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};an.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};an.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:o=`
|
`),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(t.styles[u[h]],A,p);return A},a=(n,u,A)=>{t.styles[n]=e({name:n,codes:u}),(t.keys[A]||(t.keys[A]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>o(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=RAt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,u)=>{let A=typeof u=="string"?t[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),t.styles[n]=A,A.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},t.theme=n=>{if(!FAt(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))t.alias(u,n[u]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=zhe(),t.define=a,t};E8.exports=Jhe();E8.exports.create=Jhe});var xo=_(an=>{"use strict";var TAt=Object.prototype.toString,ic=eu(),Xhe=!1,C8=[],Zhe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};an.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);an.hasColor=t=>!!t&&ic.hasColor(t);var MQ=an.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);an.nativeType=t=>TAt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");an.isAsyncFn=t=>an.nativeType(t)==="asyncfunction";an.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";an.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;an.scrollDown=(t=[])=>[...t.slice(1),t[0]];an.scrollUp=(t=[])=>[t.pop(),...t];an.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),e};an.swap=(t,e,r)=>{let o=t.length,a=r===o?0:r<0?o-1:r,n=t[e];t[e]=t[a],t[a]=n};an.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};an.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};an.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:o=`
|
||||||
`+r,width:a=80}=e,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=t.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),e.padEnd&&(h=h.map(E=>E.padEnd(a," "))),e.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(o)};an.unmute=t=>{let e=t.stack.find(o=>ic.keys.color.includes(o));return e?ic[e]:t.stack.find(o=>o.slice(2)==="bg")?ic[e.slice(2)]:o=>o};an.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";an.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>ic.keys.color.includes(o));if(e){let o=ic["bg"+an.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?ic[r.slice(2).toLowerCase()]||t:ic.none};an.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>ic.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return ic[Jhe[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=Jhe[o];return a&&ic["bg"+an.pascal(a)]||t}return ic.none};an.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),o=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+o};an.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!an.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},t);an.get=(t={},e="",r)=>{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};an.mixin=(t,e)=>{if(!Ok(t))return e;if(!Ok(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&Ok(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);Ok(a.value)?t[r]=an.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};an.merge=(...t)=>{let e={};for(let r of t)an.mixin(e,r);return e};an.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?an.define(t,o,a.bind(e)):an.define(t,o,a)}};an.onExit=t=>{let e=(r,o)=>{Khe||(Khe=!0,y8.forEach(a=>a()),r===!0&&process.exit(128+o))};y8.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),y8.push(t)};an.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};an.defineExport=(t,e,r)=>{let o;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var zhe=_(cE=>{"use strict";cE.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};cE.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};cE.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};cE.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};cE.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var $he=_((R_t,Zhe)=>{"use strict";var Xhe=ve("readline"),RAt=zhe(),TAt=/^(?:\x1b)([a-zA-Z0-9])$/,LAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,NAt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function OAt(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function MAt(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var Mk=(t="",e={})=>{let r,o={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=o.sequence||""),o.sequence=o.sequence||t||o.name,t==="\r")o.raw=void 0,o.name="return";else if(t===`
|
`+r,width:a=80}=e,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=t.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),e.padEnd&&(h=h.map(E=>E.padEnd(a," "))),e.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(o)};an.unmute=t=>{let e=t.stack.find(o=>ic.keys.color.includes(o));return e?ic[e]:t.stack.find(o=>o.slice(2)==="bg")?ic[e.slice(2)]:o=>o};an.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";an.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>ic.keys.color.includes(o));if(e){let o=ic["bg"+an.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?ic[r.slice(2).toLowerCase()]||t:ic.none};an.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>ic.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return ic[Zhe[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=Zhe[o];return a&&ic["bg"+an.pascal(a)]||t}return ic.none};an.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),o=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+o};an.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!an.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},t);an.get=(t={},e="",r)=>{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};an.mixin=(t,e)=>{if(!MQ(t))return e;if(!MQ(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&MQ(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);MQ(a.value)?t[r]=an.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};an.merge=(...t)=>{let e={};for(let r of t)an.mixin(e,r);return e};an.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?an.define(t,o,a.bind(e)):an.define(t,o,a)}};an.onExit=t=>{let e=(r,o)=>{Xhe||(Xhe=!0,C8.forEach(a=>a()),r===!0&&process.exit(128+o))};C8.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),C8.push(t)};an.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};an.defineExport=(t,e,r)=>{let o;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var $he=_(AE=>{"use strict";AE.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};AE.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};AE.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};AE.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};AE.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var r0e=_((U_t,t0e)=>{"use strict";var e0e=De("readline"),NAt=$he(),LAt=/^(?:\x1b)([a-zA-Z0-9])$/,OAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,MAt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function UAt(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function _At(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var UQ=(t="",e={})=>{let r,o={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=o.sequence||""),o.sequence=o.sequence||t||o.name,t==="\r")o.raw=void 0,o.name="return";else if(t===`
|
||||||
`)o.name="enter";else if(t===" ")o.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")o.name="backspace",o.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")o.name="escape",o.meta=t.length===2;else if(t===" "||t==="\x1B ")o.name="space",o.meta=t.length===2;else if(t<="")o.name=String.fromCharCode(t.charCodeAt(0)+97-1),o.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")o.name="number";else if(t.length===1&&t>="a"&&t<="z")o.name=t;else if(t.length===1&&t>="A"&&t<="Z")o.name=t.toLowerCase(),o.shift=!0;else if(r=TAt.exec(t))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=LAt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=NAt[n],o.shift=OAt(n)||o.shift,o.ctrl=MAt(n)||o.ctrl}return o};Mk.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=Xhe.createInterface({terminal:!0,input:r});Xhe.emitKeypressEvents(r,o);let a=(A,p)=>e(A,Mk(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};Mk.action=(t,e,r)=>{let o={...RAt,...r};return e.ctrl?(e.action=o.ctrl[e.name],e):e.option&&o.option?(e.action=o.option[e.name],e):e.shift?(e.action=o.shift[e.name],e):(e.action=o.keys[e.name],e)};Zhe.exports=Mk});var t0e=_((T_t,e0e)=>{"use strict";e0e.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(e)for(let r of Object.keys(e)){let o=e[r];typeof o=="number"&&(o={interval:o}),UAt(t,r,o)}};function UAt(t,e,r={}){let o=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,t.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),t.once("close",()=>o.stop()),o.stop}});var n0e=_((L_t,r0e)=>{"use strict";var{define:_At,width:HAt}=xo(),E8=class{constructor(e){let r=e.options;_At(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=HAt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};r0e.exports=E8});var s0e=_((N_t,i0e)=>{"use strict";var C8=xo(),Vs=eu(),I8={default:Vs.noop,noop:Vs.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||C8.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||C8.complement(this.primary)},primary:Vs.cyan,success:Vs.green,danger:Vs.magenta,strong:Vs.bold,warning:Vs.yellow,muted:Vs.dim,disabled:Vs.gray,dark:Vs.dim.gray,underline:Vs.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};I8.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(Vs.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(Vs.visible=t.styles.visible);let e=C8.merge({},I8,t.styles);delete e.merge;for(let r of Object.keys(Vs))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Vs[r]});for(let r of Object.keys(Vs.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Vs[r]});return e};i0e.exports=I8});var a0e=_((O_t,o0e)=>{"use strict";var w8=process.platform==="win32",Yf=eu(),qAt=xo(),B8={...Yf.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",
Line truncated
|
`)o.name="enter";else if(t===" ")o.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")o.name="backspace",o.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")o.name="escape",o.meta=t.length===2;else if(t===" "||t==="\x1B ")o.name="space",o.meta=t.length===2;else if(t<="")o.name=String.fromCharCode(t.charCodeAt(0)+97-1),o.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")o.name="number";else if(t.length===1&&t>="a"&&t<="z")o.name=t;else if(t.length===1&&t>="A"&&t<="Z")o.name=t.toLowerCase(),o.shift=!0;else if(r=LAt.exec(t))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=OAt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=MAt[n],o.shift=UAt(n)||o.shift,o.ctrl=_At(n)||o.ctrl}return o};UQ.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=e0e.createInterface({terminal:!0,input:r});e0e.emitKeypressEvents(r,o);let a=(A,p)=>e(A,UQ(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};UQ.action=(t,e,r)=>{let o={...NAt,...r};return e.ctrl?(e.action=o.ctrl[e.name],e):e.option&&o.option?(e.action=o.option[e.name],e):e.shift?(e.action=o.shift[e.name],e):(e.action=o.keys[e.name],e)};t0e.exports=UQ});var i0e=_((__t,n0e)=>{"use strict";n0e.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(e)for(let r of Object.keys(e)){let o=e[r];typeof o=="number"&&(o={interval:o}),HAt(t,r,o)}};function HAt(t,e,r={}){let o=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,t.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),t.once("close",()=>o.stop()),o.stop}});var o0e=_((H_t,s0e)=>{"use strict";var{define:qAt,width:jAt}=xo(),I8=class{constructor(e){let r=e.options;qAt(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=jAt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};s0e.exports=I8});var l0e=_((q_t,a0e)=>{"use strict";var w8=xo(),Ks=eu(),B8={default:Ks.noop,noop:Ks.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||w8.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||w8.complement(this.primary)},primary:Ks.cyan,success:Ks.green,danger:Ks.magenta,strong:Ks.bold,warning:Ks.yellow,muted:Ks.dim,disabled:Ks.gray,dark:Ks.dim.gray,underline:Ks.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};B8.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(Ks.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(Ks.visible=t.styles.visible);let e=w8.merge({},B8,t.styles);delete e.merge;for(let r of Object.keys(Ks))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Ks[r]});for(let r of Object.keys(Ks.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Ks[r]});return e};a0e.exports=B8});var u0e=_((j_t,c0e)=>{"use strict";var v8=process.platform==="win32",Kf=eu(),GAt=xo(),D8={...Kf.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",
Line truncated
|
||||||
`),h=p[0],E=p[p.length-1],D=(o+(r?" "+r:"")).length,b=D<h.length?h.slice(D+1):"";return{header:u,prompt:h,after:b,rest:p.slice(1),last:E}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
|
`),h=p[0],E=p[p.length-1],D=(o+(r?" "+r:"")).length,b=D<h.length?h.slice(D+1):"";return{header:u,prompt:h,after:b,rest:p.slice(1),last:E}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
|
||||||
`+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
|
`+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
|
||||||
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(Vg.cursor.down(e.rest.length)),this.write(`
|
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(zg.cursor.down(e.rest.length)),this.write(`
|
||||||
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=P8.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:o}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>o.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[e];n.timer=p;let h=a[e]||n[e]||u[e],E=r&&r[e]!=null?r[e]:await h;if(E==="")return E;let w=await this.resolve(E,n,r,o);return!w&&r&&r[e]?this.resolve(h,n,r,o):w}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,Na.isObject(e)&&(e=e[o.status]||e.pending),Na.hasColor(e)?e:(this.styles[o.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Na.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=e[o.status]||e.pending||o.separator,n=await this.resolve(a,o);return Na.isObject(n)&&(n=n[o.status]||n.pending),Na.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let o=await this.element("pointer",e,r);if(typeof o=="string"&&Na.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=Na.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(e,r){let o=await this.element("indicator",e,r);if(typeof o=="string"&&Na.hasColor(o))return o;if(o){let a=this.styles,n=e.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return Na.hasColor(A)?A:u(A)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Na.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return Na.resolve(this,e,...r)}get base(){return t.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Na.height(this.stdout,25)}get width(){return this.options.columns||Na.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,o=[r,e].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return e=>new this(e).run()}};function XAt(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?o.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function ZAt(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?`
|
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=b8.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:o}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>o.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[e];n.timer=p;let h=a[e]||n[e]||u[e],E=r&&r[e]!=null?r[e]:await h;if(E==="")return E;let w=await this.resolve(E,n,r,o);return!w&&r&&r[e]?this.resolve(h,n,r,o):w}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,La.isObject(e)&&(e=e[o.status]||e.pending),La.hasColor(e)?e:(this.styles[o.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return La.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=e[o.status]||e.pending||o.separator,n=await this.resolve(a,o);return La.isObject(n)&&(n=n[o.status]||n.pending),La.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let o=await this.element("pointer",e,r);if(typeof o=="string"&&La.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=La.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(e,r){let o=await this.element("indicator",e,r);if(typeof o=="string"&&La.hasColor(o))return o;if(o){let a=this.styles,n=e.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return La.hasColor(A)?A:u(A)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return La.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return La.resolve(this,e,...r)}get base(){return t.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||La.height(this.stdout,25)}get width(){return this.options.columns||La.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,o=[r,e].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return e=>new this(e).run()}};function $At(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?o.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function eft(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?`
|
||||||
`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}d0e.exports=x8});var E0e=_((__t,y0e)=>{"use strict";var $At=xo(),m0e={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return m0e.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};y0e.exports=(t,e={})=>{let r=$At.merge({},m0e,e.roles);return r[t]||r.default}});var b2=_((H_t,w0e)=>{"use strict";var eft=eu(),tft=uE(),rft=E0e(),Uk=xo(),{reorder:b8,scrollUp:nft,scrollDown:ift,isObject:C0e,swap:sft}=Uk,k8=class extends tft{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:o,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");C0e(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p<u.length;p++){let h=u[p]=await this.toChoice(u[p],a++,A);o.push(h),h.choices&&await n(h.choices,h)}return o};return n(e,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(e,r,o){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=rft(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,Uk.define(e,"parent",o),e.level=o?o.level+1:1,e.indent==null&&(e.indent=o?o.indent+" ":e.indent||""),e.path=o?o.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,eft.unstyle(e.message).length));let u={...e};return e.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))e[h]=u[h];e.input=A,e.value=p},a==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,o){let a=await this.toChoice(e,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,o);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.
Line truncated
|
`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}E0e.exports=Q8});var w0e=_((Y_t,I0e)=>{"use strict";var tft=xo(),C0e={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return C0e.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};I0e.exports=(t,e={})=>{let r=tft.merge({},C0e,e.roles);return r[t]||r.default}});var b2=_((K_t,D0e)=>{"use strict";var rft=eu(),nft=fE(),ift=w0e(),_Q=xo(),{reorder:k8,scrollUp:sft,scrollDown:oft,isObject:B0e,swap:aft}=_Q,F8=class extends nft{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:o,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");B0e(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p<u.length;p++){let h=u[p]=await this.toChoice(u[p],a++,A);o.push(h),h.choices&&await n(h.choices,h)}return o};return n(e,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(e,r,o){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=ift(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,_Q.define(e,"parent",o),e.level=o?o.level+1:1,e.indent==null&&(e.indent=o?o.indent+" ":e.indent||""),e.path=o?o.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,rft.unstyle(e.message).length));let u={...e};return e.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))e[h]=u[h];e.input=A,e.value=p},a==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,o){let a=await this.toChoice(e,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,o);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.
Line truncated
|
||||||
`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,o].filter(Boolean).join(`
|
`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,o].filter(Boolean).join(`
|
||||||
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),w=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,E,w].filter(Boolean).join(`
|
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),w=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,E,w].filter(Boolean).join(`
|
||||||
`)),this.write(this.margin[2]),this.restore()}};B0e.exports=F8});var D0e=_((j_t,v0e)=>{"use strict";var aft=Qh(),lft=(t,e)=>{let r=t.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=e(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},R8=class extends aft{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:o}=this.state;return this.input=o.slice(0,r)+e+o.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let o=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=lft(this.input,e),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};v0e.exports=R8});var L8=_((G_t,S0e)=>{"use strict";var T8=xo();S0e.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=e,A=u||t.styles.placeholder,p=T8.inverse(t.styles.primary),h=T=>p(t.styles.black(T)),E=r,w=" ",D=h(w);if(t.blink&&t.blink.off===!0&&(h=T=>T,D=""),n&&a===0&&o===""&&r==="")return h(w);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=T8.isPrimitive(o)?`${o}`:"",r=T8.isPrimitive(r)?`${r}`:"";let b=o&&o.startsWith(r)&&o!==r,C=b?h(o[r.length]):D;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),C=""),n===!1&&(C=""),b){let T=t.styles.unstyle(E+C);return E+C+A(o.slice(T.length))}return E+C}});var _k=_((W_t,P0e)=>{"use strict";var cft=eu(),uft=Qh(),Aft=L8(),N8=class extends uft{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:o,input:a}=r;return r.value=r.input=a.slice(0,o)+e+a.slice(o),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:o}=e;return e.value=e.input=o.slice(0,r-1)+o.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:o}=e;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:o}=e;return r&&r.startsWith(o)&&o!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let o=await this.resolve(e.separator,this.state,e,r)||":";return o?" "+this.styles.disabled(o):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:o,styles:a}=this,{cursor:n,initial:u="",name:A,hint:p,input:h=""}=e,{muted:E,submitted:w,primary:D,danger:b}=a,C=p,T=this.index===r,N=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),J=e.message;this.align==="right"&&(J=J.padStart(this.longest+1," ")),this.align==="left"&&(J=J.padEnd(this.longest+1," "));let te=this.values[A]=h||u,le=h?"success":"dark";await N.call(e,te,thi
Line truncated
|
`)),this.write(this.margin[2]),this.restore()}};P0e.exports=T8});var x0e=_((z_t,S0e)=>{"use strict";var cft=Fh(),uft=(t,e)=>{let r=t.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=e(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},N8=class extends cft{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:o}=this.state;return this.input=o.slice(0,r)+e+o.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let o=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=uft(this.input,e),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};S0e.exports=N8});var O8=_((J_t,b0e)=>{"use strict";var L8=xo();b0e.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=e,A=u||t.styles.placeholder,p=L8.inverse(t.styles.primary),h=T=>p(t.styles.black(T)),E=r,w=" ",D=h(w);if(t.blink&&t.blink.off===!0&&(h=T=>T,D=""),n&&a===0&&o===""&&r==="")return h(w);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=L8.isPrimitive(o)?`${o}`:"",r=L8.isPrimitive(r)?`${r}`:"";let b=o&&o.startsWith(r)&&o!==r,C=b?h(o[r.length]):D;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),C=""),n===!1&&(C=""),b){let T=t.styles.unstyle(E+C);return E+C+A(o.slice(T.length))}return E+C}});var HQ=_((X_t,Q0e)=>{"use strict";var Aft=eu(),fft=Fh(),pft=O8(),M8=class extends fft{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:o,input:a}=r;return r.value=r.input=a.slice(0,o)+e+a.slice(o),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:o}=e;return e.value=e.input=o.slice(0,r-1)+o.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:o}=e;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:o}=e;return r&&r.startsWith(o)&&o!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let o=await this.resolve(e.separator,this.state,e,r)||":";return o?" "+this.styles.disabled(o):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:o,styles:a}=this,{cursor:n,initial:u="",name:A,hint:p,input:h=""}=e,{muted:E,submitted:w,primary:D,danger:b}=a,C=p,T=this.index===r,L=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),z=e.message;this.align==="right"&&(z=z.padStart(this.longest+1," ")),this.align==="left"&&(z=z.padEnd(this.longest+1," "));let te=this.values[A]=h||u,le=h?"success":"dark";await L.call(e,te,thi
Line truncated
|
||||||
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};R0e.exports=M8});var L0e=_((J_t,T0e)=>{"use strict";var Eft=Hk(),U8=class extends Eft{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};T0e.exports=U8});var O0e=_((z_t,N0e)=>{"use strict";var Cft=Qh(),Ift=_k(),AE=Ift.prototype,_8=class extends Cft{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():AE.dispatch.call(this,e,r)}append(e,r){return AE.append.call(this,e,r)}delete(e,r){return AE.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?AE.next.call(this):super.next()}prev(){return this.focused.editable?AE.prev.call(this):super.prev()}async indicator(e,r){let o=e.indicator||"",a=e.editable?o:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?AE.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),e=await r.validate(o,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};N0e.exports=_8});var Kg=_((X_t,M0e)=>{"use strict";var wft=uE(),Bft=L8(),{isPrimitive:vft}=xo(),H8=class extends wft{constructor(e){super(e),this.initial=vft(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.name!=="return")?this.append(`
|
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};L0e.exports=_8});var M0e=_((t8t,O0e)=>{"use strict";var Ift=qQ(),H8=class extends Ift{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};O0e.exports=H8});var _0e=_((r8t,U0e)=>{"use strict";var wft=Fh(),Bft=HQ(),pE=Bft.prototype,q8=class extends wft{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():pE.dispatch.call(this,e,r)}append(e,r){return pE.append.call(this,e,r)}delete(e,r){return pE.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?pE.next.call(this):super.next()}prev(){return this.focused.editable?pE.prev.call(this):super.prev()}async indicator(e,r){let o=e.indicator||"",a=e.editable?o:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?pE.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),e=await r.validate(o,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};U0e.exports=q8});var Jg=_((n8t,H0e)=>{"use strict";var vft=fE(),Dft=O8(),{isPrimitive:Pft}=xo(),j8=class extends vft{constructor(e){super(e),this.initial=Pft(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.name!=="return")?this.append(`
|
||||||
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:o}=this.state;this.input=`${o}`.slice(0,r)+e+`${o}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),o=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):Bft(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(e),this.write([u,n,h].filter(Boolean).join(`
|
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:o}=this.state;this.input=`${o}`.slice(0,r)+e+`${o}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),o=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):Dft(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(e),this.write([u,n,h].filter(Boolean).join(`
|
||||||
`)),this.restore()}};M0e.exports=H8});var _0e=_((Z_t,U0e)=>{"use strict";var Dft=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),qk=t=>Dft(t).filter(Boolean);U0e.exports=(t,e={},r="")=>{let{past:o=[],present:a=""}=e,n,u;switch(t){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:qk([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:qk([...n,r]),present:u};case"save":return{past:qk([...o,r]),present:""};case"remove":return u=qk(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var j8=_(($_t,q0e)=>{"use strict";var Sft=Kg(),H0e=_0e(),q8=class extends Sft{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=H0e(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=H0e("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};q0e.exports=q8});var G0e=_((e8t,j0e)=>{"use strict";var Pft=Kg(),G8=class extends Pft{format(){return""}};j0e.exports=G8});var Y0e=_((t8t,W0e)=>{"use strict";var xft=Kg(),W8=class extends xft{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};W0e.exports=W8});var K0e=_((r8t,V0e)=>{"use strict";var bft=Qh(),Y8=class extends bft{constructor(e){super({...e,multiple:!0})}};V0e.exports=Y8});var K8=_((n8t,J0e)=>{"use strict";var kft=Kg(),V8=class extends kft{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(e){let r=e||this.minor,o=this.toNumber(this.input);return o<this.min-r?this.alert():(this.input=`${o-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};J0e.exports=V8});var X0e=_((i8t,z0e)=>{z0e.exports=K8()});var $0e=_((s8t,Z0e)=>{"use strict";var Qft=Kg(),J8=class extends Qft{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};Z0e.exports=J8});var rge=_((o8t,tge)=>{"use strict";var Fft=eu(),Rft=b2(),ege=xo(),z8=class extends Rft{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`
|
`)),this.restore()}};H0e.exports=j8});var j0e=_((i8t,q0e)=>{"use strict";var Sft=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),jQ=t=>Sft(t).filter(Boolean);q0e.exports=(t,e={},r="")=>{let{past:o=[],present:a=""}=e,n,u;switch(t){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:jQ([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:jQ([...n,r]),present:u};case"save":return{past:jQ([...o,r]),present:""};case"remove":return u=jQ(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var W8=_((s8t,W0e)=>{"use strict";var xft=Jg(),G0e=j0e(),G8=class extends xft{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=G0e(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=G0e("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};W0e.exports=G8});var K0e=_((o8t,Y0e)=>{"use strict";var bft=Jg(),Y8=class extends bft{format(){return""}};Y0e.exports=Y8});var z0e=_((a8t,V0e)=>{"use strict";var Qft=Jg(),K8=class extends Qft{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};V0e.exports=K8});var X0e=_((l8t,J0e)=>{"use strict";var kft=Fh(),V8=class extends kft{constructor(e){super({...e,multiple:!0})}};J0e.exports=V8});var J8=_((c8t,Z0e)=>{"use strict";var Fft=Jg(),z8=class extends Fft{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(e){let r=e||this.minor,o=this.toNumber(this.input);return o<this.min-r?this.alert():(this.input=`${o-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};Z0e.exports=z8});var ege=_((u8t,$0e)=>{$0e.exports=J8()});var rge=_((A8t,tge)=>{"use strict";var Rft=Jg(),X8=class extends Rft{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};tge.exports=X8});var sge=_((f8t,ige)=>{"use strict";var Tft=eu(),Nft=b2(),nge=xo(),Z8=class extends Nft{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`
|
||||||
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((o,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let o=0;o<this.scale.length;o++)r.scale.push({index:o})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,o){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(`
|
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((o,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let o=0;o<this.scale.length;o++)r.scale.push({index:o})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,o){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(`
|
||||||
`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(e,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,o);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let o=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!ege.hasColor(n)&&(n=this.styles.muted(n));let u=C=>this.margin[3]+C.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),w=this.margin[1]+this.margin[3];this.scaleLength=Fft.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-w.length);let b=ege.wordWrap(h,{width:this.widths[0],newline:A}).split(`
|
`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(e,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,o);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let o=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!nge.hasColor(n)&&(n=this.styles.muted(n));let u=C=>this.margin[3]+C.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),w=this.margin[1]+this.margin[3];this.scaleLength=Tft.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-w.length);let b=nge.wordWrap(h,{width:this.widths[0],newline:A}).split(`
|
||||||
`).map(C=>u(C)+this.margin[1]);return o&&(E=this.styles.info(E),b=b.map(C=>this.styles.info(C))),b[0]+=E,this.linebreak&&b.push(""),[p+a,b.join(`
|
`).map(C=>u(C)+this.margin[1]);return o&&(E=this.styles.info(E),b=b.map(C=>this.styles.info(C))),b[0]+=E,this.linebreak&&b.push(""),[p+a,b.join(`
|
||||||
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(`
|
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(`
|
||||||
`)}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),w=await this.renderChoices(),D=await this.footer(),b=this.emptyError;p&&(u+=p),E&&!u.includes(E)&&(u+=" "+E),e&&!p&&!w.trim()&&this.multiple&&b!=null&&(u+=this.styles.danger(b)),this.clear(r),this.write([A,u,h,w,D].filter(Boolean).join(`
|
`)}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),w=await this.renderChoices(),D=await this.footer(),b=this.emptyError;p&&(u+=p),E&&!u.includes(E)&&(u+=" "+E),e&&!p&&!w.trim()&&this.multiple&&b!=null&&(u+=this.styles.danger(b)),this.clear(r),this.write([A,u,h,w,D].filter(Boolean).join(`
|
||||||
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};tge.exports=z8});var sge=_((a8t,ige)=>{"use strict";var nge=eu(),Tft=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",Z8=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=Tft(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},Lft=async(t={},e={},r=o=>o)=>{let o=new Set,a=t.fields||[],n=t.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,w=()=>n[++E],D=()=>n[E+1],b=C=>{C.line=h,u.push(C)};for(b({type:"bos",value:""});E<n.length-1;){let C=w();if(/^[^\S\n ]$/.test(C)){b({type:"text",value:C});continue}if(C===`
|
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};ige.exports=Z8});var lge=_((p8t,age)=>{"use strict";var oge=eu(),Lft=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",eH=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=Lft(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},Oft=async(t={},e={},r=o=>o)=>{let o=new Set,a=t.fields||[],n=t.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,w=()=>n[++E],D=()=>n[E+1],b=C=>{C.line=h,u.push(C)};for(b({type:"bos",value:""});E<n.length-1;){let C=w();if(/^[^\S\n ]$/.test(C)){b({type:"text",value:C});continue}if(C===`
|
||||||
`){b({type:"newline",value:C}),h++;continue}if(C==="\\"){C+=w(),b({type:"text",value:C});continue}if((C==="$"||C==="#"||C==="{")&&D()==="{"){let N=w();C+=N;let U={type:"template",open:C,inner:"",close:"",value:C},J;for(;J=w();){if(J==="}"){D()==="}"&&(J+=w()),U.value+=J,U.close=J;break}J===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=J),U.value+=J,U.inner+=J}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,e.hasOwnProperty(U.key)&&(U.initial=e[U.key]),U=r(U),b(U),p.push(U.key),o.add(U.key);let te=A.find(le=>le.name===U.key);U.field=a.find(le=>le.name===U.key),te||(te=new Z8(U),A.push(te)),te.lines.push(U.line-1);continue}let T=u[u.length-1];T.type==="text"&&T.line===h?T.value+=C:b({type:"text",value:C})}return b({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};ige.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),o={...e.values,...e.initial},{tabstops:a,items:n,keys:u}=await Lft(e,o),A=X8("result",t,e),p=X8("format",t,e),h=X8("validate",t,e,!0),E=t.isValue.bind(t);return async(w={},D=!1)=>{let b=0;w.required=r,w.items=n,w.keys=u,w.output="";let C=async(J,te,le,ce)=>{let ue=await h(J,te,le,ce);return ue===!1?"Invalid field "+le.name:ue};for(let J of a){let te=J.value,le=J.key;if(J.type!=="template"){te&&(w.output+=te);continue}if(J.type==="template"){let ce=n.find(Ee=>Ee.name===le);e.required===!0&&w.required.add(ce.name);let ue=[ce.input,w.values[ce.value],ce.value,te].find(E),he=(ce.field||{}).message||J.inner;if(D){let Ee=await C(w.values[le],w,ce,b);if(Ee&&typeof Ee=="string"||Ee===!1){w.invalid.set(le,Ee);continue}w.invalid.delete(le);let g=await A(w.values[le],w,ce,b);w.output+=nge.unstyle(g);continue}ce.placeholder=!1;let De=te;te=await p(te,w,ce,b),ue!==te?(w.values[le]=ue,te=t.styles.typing(ue),w.missing.delete(he)):(w.values[le]=void 0,ue=`<${he}>`,te=t.styles.primary(ue),ce.placeholder=!0,w.required.has(le)&&w.missing.add(he)),w.missing.has(he)&&w.validating&&(te=t.styles.warning(ue)),w.invalid.has(le)&&w.validating&&(te=t.styles.danger(ue)),b===w.index&&(De!==te?te=t.styles.underline(te):te=t.styles.heading(nge.unstyle(te))),b++}te&&(w.output+=te)}let T=w.output.split(`
|
`){b({type:"newline",value:C}),h++;continue}if(C==="\\"){C+=w(),b({type:"text",value:C});continue}if((C==="$"||C==="#"||C==="{")&&D()==="{"){let L=w();C+=L;let U={type:"template",open:C,inner:"",close:"",value:C},z;for(;z=w();){if(z==="}"){D()==="}"&&(z+=w()),U.value+=z,U.close=z;break}z===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=z),U.value+=z,U.inner+=z}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,e.hasOwnProperty(U.key)&&(U.initial=e[U.key]),U=r(U),b(U),p.push(U.key),o.add(U.key);let te=A.find(le=>le.name===U.key);U.field=a.find(le=>le.name===U.key),te||(te=new eH(U),A.push(te)),te.lines.push(U.line-1);continue}let T=u[u.length-1];T.type==="text"&&T.line===h?T.value+=C:b({type:"text",value:C})}return b({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};age.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),o={...e.values,...e.initial},{tabstops:a,items:n,keys:u}=await Oft(e,o),A=$8("result",t,e),p=$8("format",t,e),h=$8("validate",t,e,!0),E=t.isValue.bind(t);return async(w={},D=!1)=>{let b=0;w.required=r,w.items=n,w.keys=u,w.output="";let C=async(z,te,le,de)=>{let ce=await h(z,te,le,de);return ce===!1?"Invalid field "+le.name:ce};for(let z of a){let te=z.value,le=z.key;if(z.type!=="template"){te&&(w.output+=te);continue}if(z.type==="template"){let de=n.find(Ie=>Ie.name===le);e.required===!0&&w.required.add(de.name);let ce=[de.input,w.values[de.value],de.value,te].find(E),pe=(de.field||{}).message||z.inner;if(D){let Ie=await C(w.values[le],w,de,b);if(Ie&&typeof Ie=="string"||Ie===!1){w.invalid.set(le,Ie);continue}w.invalid.delete(le);let g=await A(w.values[le],w,de,b);w.output+=oge.unstyle(g);continue}de.placeholder=!1;let ve=te;te=await p(te,w,de,b),ce!==te?(w.values[le]=ce,te=t.styles.typing(ce),w.missing.delete(pe)):(w.values[le]=void 0,ce=`<${pe}>`,te=t.styles.primary(ce),de.placeholder=!0,w.required.has(le)&&w.missing.add(pe)),w.missing.has(pe)&&w.validating&&(te=t.styles.warning(ce)),w.invalid.has(le)&&w.validating&&(te=t.styles.danger(ce)),b===w.index&&(ve!==te?te=t.styles.underline(te):te=t.styles.heading(oge.unstyle(te))),b++}te&&(w.output+=te)}let T=w.output.split(`
|
||||||
`).map(J=>" "+J),N=n.length,U=0;for(let J of n)w.invalid.has(J.name)&&J.lines.forEach(te=>{T[te][0]===" "&&(T[te]=w.styles.danger(w.symbols.bullet)+T[te].slice(1))}),t.isValue(w.values[J.name])&&U++;return w.completed=(U/N*100).toFixed(0),w.output=T.join(`
|
`).map(z=>" "+z),L=n.length,U=0;for(let z of n)w.invalid.has(z.name)&&z.lines.forEach(te=>{T[te][0]===" "&&(T[te]=w.styles.danger(w.symbols.bullet)+T[te].slice(1))}),t.isValue(w.values[z.name])&&U++;return w.completed=(U/L*100).toFixed(0),w.output=T.join(`
|
||||||
`),w.output}};function X8(t,e,r,o){return(a,n,u,A)=>typeof u.field[t]=="function"?u.field[t].call(e,a,n,u,A):[o,a].find(p=>e.isValue(p))}});var age=_((l8t,oge)=>{"use strict";var Nft=eu(),Oft=sge(),Mft=uE(),$8=class extends Mft{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Oft(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),o=e.input.slice(0,this.cursor-1);this.input=e.input=`${o}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:o,size:a}=this.state,n=[this.options.newline,`
|
`),w.output}};function $8(t,e,r,o){return(a,n,u,A)=>typeof u.field[t]=="function"?u.field[t].call(e,a,n,u,A):[o,a].find(p=>e.isValue(p))}});var uge=_((h8t,cge)=>{"use strict";var Mft=eu(),Uft=lge(),_ft=fE(),tH=class extends _ft{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Uft(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),o=e.input.slice(0,this.cursor-1);this.input=e.input=`${o}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:o,size:a}=this.state,n=[this.options.newline,`
|
||||||
`].find(J=>J!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),w=await this.error()||"",D=await this.hint()||"",b=o?"":await this.interpolate(this.state),C=this.state.key=r[e]||"",T=await this.format(C),N=await this.footer();T&&(h+=" "+T),D&&!T&&this.state.completed===0&&(h+=" "+D),this.clear(a);let U=[E,h,b,N,w.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:o,values:a}=this.state;if(e.size){let A="";for(let[p,h]of e)A+=`Invalid ${p}: ${h}
|
`].find(z=>z!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),w=await this.error()||"",D=await this.hint()||"",b=o?"":await this.interpolate(this.state),C=this.state.key=r[e]||"",T=await this.format(C),L=await this.footer();T&&(h+=" "+T),D&&!T&&this.state.completed===0&&(h+=" "+D),this.clear(a);let U=[E,h,b,L,w.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:o,values:a}=this.state;if(e.size){let A="";for(let[p,h]of e)A+=`Invalid ${p}: ${h}
|
||||||
`;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=Nft.unstyle(o).split(`
|
`;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=Mft.unstyle(o).split(`
|
||||||
`).map(A=>A.slice(1)).join(`
|
`).map(A=>A.slice(1)).join(`
|
||||||
`);return this.value={values:a,result:u},super.submit()}};oge.exports=$8});var cge=_((c8t,lge)=>{"use strict";var Uft="(Use <shift>+<up/down> to sort)",_ft=Qh(),eH=class extends _ft{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,Uft].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let o=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};lge.exports=eH});var Age=_((u8t,uge)=>{"use strict";var Hft=b2(),tH=class extends Hft{constructor(e={}){if(super(e),this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(o=>this.styles.muted(o)),this.state.header=r.join(`
|
`);return this.value={values:a,result:u},super.submit()}};cge.exports=tH});var fge=_((g8t,Age)=>{"use strict";var Hft="(Use <shift>+<up/down> to sort)",qft=Fh(),rH=class extends qft{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,Hft].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let o=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Age.exports=rH});var hge=_((d8t,pge)=>{"use strict";var jft=b2(),nH=class extends jft{constructor(e={}){if(super(e),this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(o=>this.styles.muted(o)),this.state.header=r.join(`
|
||||||
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let o of r)o.scale=qft(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],o=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!o,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=te=>(te?this.styles.success("\u25C9"):"\u25EF")+u,E=r+1+".",w=o?this.styles.heading:this.styles.noop,D=await this.resolve(e.message,this.state,e,r),b=this.indent(e),C=b+e.scale.map((te,le)=>h(le===e.scaleIdx)).join(A),T=te=>te===e.scaleIdx?w(te):te,N=b+e.scale.map((te,le)=>T(le)).join(p),U=()=>[E,D].filter(Boolean).join(" "),J=()=>[U(),C,N," "].filter(Boolean).join(`
|
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let o of r)o.scale=Gft(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],o=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!o,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=te=>(te?this.styles.success("\u25C9"):"\u25EF")+u,E=r+1+".",w=o?this.styles.heading:this.styles.noop,D=await this.resolve(e.message,this.state,e,r),b=this.indent(e),C=b+e.scale.map((te,le)=>h(le===e.scaleIdx)).join(A),T=te=>te===e.scaleIdx?w(te):te,L=b+e.scale.map((te,le)=>T(le)).join(p),U=()=>[E,D].filter(Boolean).join(" "),z=()=>[U(),C,L," "].filter(Boolean).join(`
|
||||||
`);return o&&(C=this.styles.cyan(C),N=this.styles.cyan(N)),J()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(o,a)=>await this.renderChoice(o,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
|
`);return o&&(C=this.styles.cyan(C),L=this.styles.cyan(L)),z()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(o,a)=>await this.renderChoice(o,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
|
||||||
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),w=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),e&&!p&&!E&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,E,w].filter(Boolean).join(`
|
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),w=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),e&&!p&&!E&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,E,w].filter(Boolean).join(`
|
||||||
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function qft(t,e={}){if(Array.isArray(e.scale))return e.scale.map(o=>({...o}));let r=[];for(let o=1;o<t+1;o++)r.push({i:o,selected:!1});return r}uge.exports=tH});var pge=_((A8t,fge)=>{fge.exports=j8()});var gge=_((f8t,hge)=>{"use strict";var jft=Hk(),rH=class extends jft{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=o=>this.styles.primary.underline(o);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(e),this.write([r,h,p].filter(Boolean).join(`
|
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function Gft(t,e={}){if(Array.isArray(e.scale))return e.scale.map(o=>({...o}));let r=[];for(let o=1;o<t+1;o++)r.push({i:o,selected:!1});return r}pge.exports=nH});var dge=_((m8t,gge)=>{gge.exports=W8()});var yge=_((y8t,mge)=>{"use strict";var Wft=qQ(),iH=class extends Wft{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=o=>this.styles.primary.underline(o);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(e),this.write([r,h,p].filter(Boolean).join(`
|
||||||
`)),this.write(this.margin[2]),this.restore()}};hge.exports=rH});var mge=_((p8t,dge)=>{"use strict";var Gft=Qh(),nH=class extends Gft{constructor(e){if(super(e),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let o=await super.toChoices(e,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};dge.exports=nH});var Ege=_(iH=>{"use strict";var yge=xo(),fs=(t,e)=>{yge.defineExport(iH,t,e),yge.defineExport(iH,t.toLowerCase(),e)};fs("AutoComplete",()=>D0e());fs("BasicAuth",()=>F0e());fs("Confirm",()=>L0e());fs("Editable",()=>O0e());fs("Form",()=>_k());fs("Input",()=>j8());fs("Invisible",()=>G0e());fs("List",()=>Y0e());fs("MultiSelect",()=>K0e());fs("Numeral",()=>X0e());fs("Password",()=>$0e());fs("Scale",()=>rge());fs("Select",()=>Qh());fs("Snippet",()=>age());fs("Sort",()=>cge());fs("Survey",()=>Age());fs("Text",()=>pge());fs("Toggle",()=>gge());fs("Quiz",()=>mge())});var Ige=_((g8t,Cge)=>{Cge.exports={ArrayPrompt:b2(),AuthPrompt:O8(),BooleanPrompt:Hk(),NumberPrompt:K8(),StringPrompt:Kg()}});var Q2=_((d8t,Bge)=>{"use strict";var wge=ve("assert"),oH=ve("events"),Fh=xo(),ru=class extends oH{constructor(e,r){super(),this.options=Fh.merge({},e),this.answers={...r}}register(e,r){if(Fh.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}wge.equal(typeof r,"function","expected a function");let o=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(Fh.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=Fh.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:u}=Fh;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];wge(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",E=>{this.emit("answer",a,E,A),n(this.answers,a,E)});let h=A.emit.bind(A);return A.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||uE()}static get prompts(){return Ege()}static get types(){return Ige()}static get prompt(){let e=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(e.emit(...u),n(...u)),a.prompt(r)};return Fh.mixinEmitter(e,new oH),e}};Fh.mixinEmitter(ru,new oH);var sH=ru.prompts;for(let t of Object.keys(sH)){let e=t.toLowerCase(),r=o=>new sH[t](o).run();ru.prompt[e]=r,ru[e]=r,ru[t]||Reflect.defineProperty(ru,t,{get:()=>sH[t]})}var k2=t=>{Fh.defineExport(ru,t,()=>ru.types[t])};k2("ArrayPrompt");k2("AuthPrompt");k2("BooleanPrompt");k2("NumberPrompt");k2("StringPrompt");Bge.exports=ru});var L2=_((Z8t,kge)=>{var zft=bk();function Xft(t,e,r){var o=t==null?void 0:zft(t,e);return o===void 0?r:o}kge.exports=Xft});var Rge=_((iHt,Fge)=>{function Zft(t,e){for(var r=-1,o=t==null?0:t.length;++r<o&&e(t[r],r,t)!==!1;);return t}Fge.exports=Zft});var Lge=_((sHt,Tge)=>{var $ft=Eg(),ept=PP();function tpt(t,e){return t&&$ft(e,ept(e),t)}Tge.exports=tpt});var Oge=_((oHt,Nge)=>{var rpt=Eg(),npt=Km();function ipt(t,e){return t&&rpt(e,npt(e),t)}Nge.exports=ipt});var Uge=_((aHt,Mge)=>{var spt=Eg(),opt=IP();function apt(t,e){return spt(t,opt(t),e)}Mge.exports=apt});var fH=_((lHt,_ge)=>{var lpt=CP(),cpt=FP(),upt=IP(),Apt=bN(),fpt=Object.getOwnPropertySymbols,ppt=fpt?function(t){for(var e=[];t;)lpt(e,upt(t)),t=cpt(t);return e}:Apt;_ge.exports=ppt});var qge=_((cHt,Hge)=>{var hpt=Eg(),gpt=fH();function dpt(t,e){return hpt(t,gpt(t),e)}Hge.exports=dpt});var pH=_((uHt,jge)=>{var mpt=xN(),ypt=fH(),Ept=Km();function Cpt(t){return mpt(t,Ept,ypt)}jge.exports=Cpt});var Wge=_((AHt,Gge)=>{var Ipt=Object.prototype,wpt=Ipt.hasOwnProperty;function Bpt(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&wpt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}Gge.exports=Bpt});var Vge=_((fHt,Yge)=>{var vpt=kP();function Dpt(t,e){var r=e?vpt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}Yge.exports=Dpt});var Jge=_((pHt,Kge)=
Line truncated
|
`)),this.write(this.margin[2]),this.restore()}};mge.exports=iH});var Cge=_((E8t,Ege)=>{"use strict";var Yft=Fh(),sH=class extends Yft{constructor(e){if(super(e),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let o=await super.toChoices(e,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};Ege.exports=sH});var wge=_(oH=>{"use strict";var Ige=xo(),fs=(t,e)=>{Ige.defineExport(oH,t,e),Ige.defineExport(oH,t.toLowerCase(),e)};fs("AutoComplete",()=>x0e());fs("BasicAuth",()=>N0e());fs("Confirm",()=>M0e());fs("Editable",()=>_0e());fs("Form",()=>HQ());fs("Input",()=>W8());fs("Invisible",()=>K0e());fs("List",()=>z0e());fs("MultiSelect",()=>X0e());fs("Numeral",()=>ege());fs("Password",()=>rge());fs("Scale",()=>sge());fs("Select",()=>Fh());fs("Snippet",()=>uge());fs("Sort",()=>fge());fs("Survey",()=>hge());fs("Text",()=>dge());fs("Toggle",()=>yge());fs("Quiz",()=>Cge())});var vge=_((I8t,Bge)=>{Bge.exports={ArrayPrompt:b2(),AuthPrompt:U8(),BooleanPrompt:qQ(),NumberPrompt:J8(),StringPrompt:Jg()}});var k2=_((w8t,Pge)=>{"use strict";var Dge=De("assert"),lH=De("events"),Rh=xo(),ru=class extends lH{constructor(e,r){super(),this.options=Rh.merge({},e),this.answers={...r}}register(e,r){if(Rh.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}Dge.equal(typeof r,"function","expected a function");let o=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(Rh.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=Rh.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:u}=Rh;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];Dge(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",E=>{this.emit("answer",a,E,A),n(this.answers,a,E)});let h=A.emit.bind(A);return A.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||fE()}static get prompts(){return wge()}static get types(){return vge()}static get prompt(){let e=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(e.emit(...u),n(...u)),a.prompt(r)};return Rh.mixinEmitter(e,new lH),e}};Rh.mixinEmitter(ru,new lH);var aH=ru.prompts;for(let t of Object.keys(aH)){let e=t.toLowerCase(),r=o=>new aH[t](o).run();ru.prompt[e]=r,ru[e]=r,ru[t]||Reflect.defineProperty(ru,t,{get:()=>aH[t]})}var Q2=t=>{Rh.defineExport(ru,t,()=>ru.types[t])};Q2("ArrayPrompt");Q2("AuthPrompt");Q2("BooleanPrompt");Q2("NumberPrompt");Q2("StringPrompt");Pge.exports=ru});var N2=_((iHt,Rge)=>{var Zft=QQ();function $ft(t,e,r){var o=t==null?void 0:Zft(t,e);return o===void 0?r:o}Rge.exports=$ft});var Lge=_((uHt,Nge)=>{function ept(t,e){for(var r=-1,o=t==null?0:t.length;++r<o&&e(t[r],r,t)!==!1;);return t}Nge.exports=ept});var Mge=_((AHt,Oge)=>{var tpt=Ig(),rpt=PS();function npt(t,e){return t&&tpt(e,rpt(e),t)}Oge.exports=npt});var _ge=_((fHt,Uge)=>{var ipt=Ig(),spt=Jm();function opt(t,e){return t&&ipt(e,spt(e),t)}Uge.exports=opt});var qge=_((pHt,Hge)=>{var apt=Ig(),lpt=CS();function cpt(t,e){return apt(t,lpt(t),e)}Hge.exports=cpt});var hH=_((hHt,jge)=>{var upt=ES(),Apt=kS(),fpt=CS(),ppt=bL(),hpt=Object.getOwnPropertySymbols,gpt=hpt?function(t){for(var e=[];t;)upt(e,fpt(t)),t=Apt(t);return e}:ppt;jge.exports=gpt});var Wge=_((gHt,Gge)=>{var dpt=Ig(),mpt=hH();function ypt(t,e){return dpt(t,mpt(t),e)}Gge.exports=ypt});var gH=_((dHt,Yge)=>{var Ept=xL(),Cpt=hH(),Ipt=Jm();function wpt(t){return Ept(t,Ipt,Cpt)}Yge.exports=wpt});var Vge=_((mHt,Kge)=>{var Bpt=Object.prototype,vpt=Bpt.hasOwnProperty;function Dpt(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&vpt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}Kge.exports=Dpt});var Jge=_((yHt,zge)=>{var Ppt=bS();function Spt(t,e){var r=e?Ppt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}zge.exports=Spt});var Zge=_((EHt,Xge)=
Line truncated
|
||||||
${J} at ${te}`:`
|
${z} at ${te}`:`
|
||||||
${J}`}).join("");h.push({text:`Conflict detected in constraint targeting ${pe.pretty(t.configuration,b,pe.Type.CODE)}; conflicting values are:${T}`,fixable:!1})}else{let[[T]]=C,N=(0,Sme.default)(D,b);if(JSON.stringify(N)===JSON.stringify(T))continue;if(!o){let U=typeof N>"u"?`Missing field ${pe.pretty(t.configuration,b,pe.Type.CODE)}; expected ${pe.pretty(t.configuration,T,pe.Type.INSPECT)}`:typeof T>"u"?`Extraneous field ${pe.pretty(t.configuration,b,pe.Type.CODE)} currently set to ${pe.pretty(t.configuration,N,pe.Type.INSPECT)}`:`Invalid field ${pe.pretty(t.configuration,b,pe.Type.CODE)}; expected ${pe.pretty(t.configuration,T,pe.Type.INSPECT)}, found ${pe.pretty(t.configuration,N,pe.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof T>"u"?(0,bme.default)(D,b):(0,Pme.default)(D,b,T),E=!0}E&&a.set(w,D)}h.length>0&&n.set(w,h)}return{changedWorkspaces:a,remainingErrors:n}}function kme(t,{configuration:e}){let r={children:[]};for(let[o,a]of t){let n=[];for(let A of a){let p=A.text.split(/\n/);A.fixable&&(p[0]=`${pe.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:pe.tuple(pe.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:pe.tuple(pe.Type.NO_HINT,h)}))})}let u={value:pe.tuple(pe.Type.LOCATOR,o.anchoredLocator),children:qe.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=qe.sortMap(r.children,o=>o.value[1]),r}var Sme,Pme,xme,bme,ZE,Fgt,Rgt,Tgt,j2=It(()=>{Ve();Sme=et(L2()),Pme=et(dH()),xme=et(Dme()),bme=et(EH()),ZE=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let o=Object.hasOwn(e,r)?e[r]:void 0;if(typeof o>"u")continue;qe.getArrayWithDefault(this.indexes[r],o).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let o=[],a;for(let[u,A]of r){let p=u,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let E=new Set(h.get(A)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let w of a)E.has(w)||a.delete(w);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.hasOwn(u,A)&&u[A]===p:Object.hasOwn(u,A)===!1))return!1;return!0})),n}},Fgt=/^[0-9]+$/,Rgt=/^[a-zA-Z0-9_]+$/,Tgt=new Set(["scripts",..._t.allDependencies])});var Qme=_((L9t,GH)=>{var Ogt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("X")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("Xs")])]))],"maplist/3":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs")])]))],"maplist/4":
Line truncated
|
${z}`}).join("");h.push({text:`Conflict detected in constraint targeting ${fe.pretty(t.configuration,b,fe.Type.CODE)}; conflicting values are:${T}`,fixable:!1})}else{let[[T]]=C,L=(0,bme.default)(D,b);if(JSON.stringify(L)===JSON.stringify(T))continue;if(!o){let U=typeof L>"u"?`Missing field ${fe.pretty(t.configuration,b,fe.Type.CODE)}; expected ${fe.pretty(t.configuration,T,fe.Type.INSPECT)}`:typeof T>"u"?`Extraneous field ${fe.pretty(t.configuration,b,fe.Type.CODE)} currently set to ${fe.pretty(t.configuration,L,fe.Type.INSPECT)}`:`Invalid field ${fe.pretty(t.configuration,b,fe.Type.CODE)}; expected ${fe.pretty(t.configuration,T,fe.Type.INSPECT)}, found ${fe.pretty(t.configuration,L,fe.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof T>"u"?(0,Fme.default)(D,b):(0,Qme.default)(D,b,T),E=!0}E&&a.set(w,D)}h.length>0&&n.set(w,h)}return{changedWorkspaces:a,remainingErrors:n}}function Rme(t,{configuration:e}){let r={children:[]};for(let[o,a]of t){let n=[];for(let A of a){let p=A.text.split(/\n/);A.fixable&&(p[0]=`${fe.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:fe.tuple(fe.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:fe.tuple(fe.Type.NO_HINT,h)}))})}let u={value:fe.tuple(fe.Type.LOCATOR,o.anchoredLocator),children:qe.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=qe.sortMap(r.children,o=>o.value[1]),r}var bme,Qme,kme,Fme,eC,Tgt,Ngt,Lgt,j2=It(()=>{Ve();bme=et(N2()),Qme=et(yH()),kme=et(xme()),Fme=et(IH()),eC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let o=Object.hasOwn(e,r)?e[r]:void 0;if(typeof o>"u")continue;qe.getArrayWithDefault(this.indexes[r],o).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let o=[],a;for(let[u,A]of r){let p=u,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let E=new Set(h.get(A)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let w of a)E.has(w)||a.delete(w);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.hasOwn(u,A)&&u[A]===p:Object.hasOwn(u,A)===!1))return!1;return!0})),n}},Tgt=/^[0-9]+$/,Ngt=/^[a-zA-Z0-9_]+$/,Lgt=new Set(["scripts",..._t.allDependencies])});var Tme=_((H9t,YH)=>{var Ugt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("X")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("Xs")])]))],"maplist/3":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs")])]))],"maplist/4":
Line truncated
|
||||||
`+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),Xn.unlinkSync(h),Xn.unlinkSync(E),Xn.unlinkSync(w),Xn.unlinkSync(D),u}function Hgt(t){var e,r={},o,a={env:process.env,encoding:t.encoding};if(Th||(Xg?process.env.PSModulePath?(Th="powershell.exe",zk=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(Th="cscript.exe",zk=["//nologo",__dirname+"\\read.cs.js"]):(Th="/bin/sh",zk=[__dirname+"/read.sh"])),Xg&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),VH.execFileSync){e=Nme(t),G2&&G2("execFileSync",e);try{r.input=VH.execFileSync(Th,e,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Tme+(o?`
|
`+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),Xn.unlinkSync(h),Xn.unlinkSync(E),Xn.unlinkSync(w),Xn.unlinkSync(D),u}function jgt(t){var e,r={},o,a={env:process.env,encoding:t.encoding};if(Nh||($g?process.env.PSModulePath?(Nh="powershell.exe",XQ=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(Nh="cscript.exe",XQ=["//nologo",__dirname+"\\read.cs.js"]):(Nh="/bin/sh",XQ=[__dirname+"/read.sh"])),$g&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),zH.execFileSync){e=Ume(t),G2&&G2("execFileSync",e);try{r.input=zH.execFileSync(Nh,e,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Ome+(o?`
|
||||||
`+o:"")),r.error.method="execFileSync",r.error.program=Th,r.error.args=e,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=_gt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function zH(t){var e="",r=t.display,o=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=Hgt(t);if(n.error)throw n.error;return n.input}return JH&&JH(t),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Vf=="string")if(Vf=null,Xg){if(A=function(h){var E=h.replace(/^\D+/,"").split("."),w=0;return(E[0]=+E[0])&&(w+=E[0]*1e4),(E[1]=+E[1])&&(w+=E[1]*100),(E[2]=+E[2])&&(w+=E[2]),w}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Vf=process.stdin.fd,eC=process.stdin._handle;else try{Vf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),eC=new Fme(Vf,!0)}catch{}if(process.stdout.isTTY)iu=process.stdout.fd;else{try{iu=Xn.openSync("\\\\.\\CON","w")}catch{}if(typeof iu!="number")try{iu=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Vf=Xn.openSync("/dev/tty","r"),eC=process.stdin._handle}catch{}}else try{Vf=Xn.openSync("/dev/tty","r"),eC=new Fme(Vf,!1)}catch{}if(process.stdout.isTTY)iu=process.stdout.fd;else try{iu=Xn.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!t.hideEchoBack&&!t.keyIn,p,h,E,w,D;Xk="";function b(C){return C===Rme?!0:eC.setRawMode(C)!==0?!1:(Rme=C,!0)}if(Lme||!eC||typeof iu!="number"&&(t.display||!A)){e=a();return}if(t.display&&(Xn.writeSync(iu,t.display),t.display=""),!t.displayOnly){if(!b(!A)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(u=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){E=0;try{E=Xn.readSync(Vf,p,0,h)}catch(C){if(C.code!=="EOF"){b(!1),e+=a();return}}if(E>0?(w=p.toString(t.encoding,0,E),Xk+=w):(w=`
|
`+o:"")),r.error.method="execFileSync",r.error.program=Nh,r.error.args=e,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=qgt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function ZH(t){var e="",r=t.display,o=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=jgt(t);if(n.error)throw n.error;return n.input}return XH&&XH(t),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Vf=="string")if(Vf=null,$g){if(A=function(h){var E=h.replace(/^\D+/,"").split("."),w=0;return(E[0]=+E[0])&&(w+=E[0]*1e4),(E[1]=+E[1])&&(w+=E[1]*100),(E[2]=+E[2])&&(w+=E[2]),w}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Vf=process.stdin.fd,rC=process.stdin._handle;else try{Vf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),rC=new Nme(Vf,!0)}catch{}if(process.stdout.isTTY)iu=process.stdout.fd;else{try{iu=Xn.openSync("\\\\.\\CON","w")}catch{}if(typeof iu!="number")try{iu=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Vf=Xn.openSync("/dev/tty","r"),rC=process.stdin._handle}catch{}}else try{Vf=Xn.openSync("/dev/tty","r"),rC=new Nme(Vf,!1)}catch{}if(process.stdout.isTTY)iu=process.stdout.fd;else try{iu=Xn.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!t.hideEchoBack&&!t.keyIn,p,h,E,w,D;ZQ="";function b(C){return C===Lme?!0:rC.setRawMode(C)!==0?!1:(Lme=C,!0)}if(Mme||!rC||typeof iu!="number"&&(t.display||!A)){e=a();return}if(t.display&&(Xn.writeSync(iu,t.display),t.display=""),!t.displayOnly){if(!b(!A)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(u=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){E=0;try{E=Xn.readSync(Vf,p,0,h)}catch(C){if(C.code!=="EOF"){b(!1),e+=a();return}}if(E>0?(w=p.toString(t.encoding,0,E),ZQ+=w):(w=`
|
||||||
`,Xk+="\0"),w&&typeof(D=(w.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(w=D,n=!0),w&&(w=w.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),w&&u&&(w=w.replace(u,"")),w&&(A||(t.hideEchoBack?t.mask&&Xn.writeSync(iu,new Array(w.length+1).join(t.mask)):Xn.writeSync(iu,w)),e+=w),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!A&&!o&&Xn.writeSync(iu,`
|
`,ZQ+="\0"),w&&typeof(D=(w.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(w=D,n=!0),w&&(w=w.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),w&&u&&(w=w.replace(u,"")),w&&(A||(t.hideEchoBack?t.mask&&Xn.writeSync(iu,new Array(w.length+1).join(t.mask)):Xn.writeSync(iu,w)),e+=w),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!A&&!o&&Xn.writeSync(iu,`
|
||||||
`),b(!1)}}(),t.print&&!o&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
|
`),b(!1)}}(),t.print&&!o&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
|
||||||
`),t.encoding),t.displayOnly?"":$H=t.keepWhitespace||t.keyIn?e:e.trim()}function qgt(t,e){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!e||e(a))&&r.push(a))}return o(t),r}function e6(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function bs(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(KH),t.unshift(KH))),t.reduce(function(o,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var u;if(a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=qgt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function XH(t,e,r){return e.some(function(o){var a=typeof o;return a==="string"?r?t===o:t.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(t)===o:a==="function"?o(t):o instanceof RegExp?o.test(t):!1})}function t6(t,e){var r=Lh.normalize(Xg?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=Lh.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+e6(r)+"(?=\\/|\\\\|$)",Xg?"i":""),"~")}function tC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,E,w){var D;return A||typeof(D=e(E))!="string"?p:D?(h||"")+D+(w||""):""}return t.replace(o,n).replace(a,n)}function Ome(t,e,r){var o,a=[],n=-1,u=0,A="",p;function h(E,w){return w.length>3?(E.push(w[0]+"..."+w[w.length-1]),p=!0):w.length&&(E=E.concat(w)),E}return o=t.reduce(function(E,w){return E.concat((w+"").split(""))},[]).reduce(function(E,w){var D,b;return e||(w=w.toLowerCase()),D=/^\d$/.test(w)?1:/^[A-Z]$/.test(w)?2:/^[a-z]$/.test(w)?3:0,r&&D===0?A+=w:(b=w.charCodeAt(0),D&&D===n&&b===u+1?a.push(w):(E=h(E,a),a=[w],n=D),u=b),E},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function Mme(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function Ume(t,e){var r,o,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":o=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=Ome(o,e.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=Mme(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=$H;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=Lh.basename(r):t==="cwdHome"&&(r=t6(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=zg[zg.length-n]||"")}return r}function _me(t){var e=/^(.)-(.)$/.exec(t),r="",o,a,n,u;if(!e)return null;for(o=e[1].charCodeAt(0),a=e[2].charCodeAt(0),u=o<a?1:-1,n=o;n!==a+u;n+=u)r+=String.fromCharCode(n);return r}function ZH(t){var e=new RegExp(/(\s*)(?:("|')(.*?)(?:\2|$)|(\S+))/g),r,o="",a=[],n;for(t=t.trim();r=e.exec(t);)n=r[3]||r[4]||"",r[1]&&(a.push(o),o=""),o+=n;return o&&a.push(o),a}function Hme(t,e){return e.trueValue.length&&XH(t,e.trueValue,e.caseSensitive)?!0:e.falseValue.length&&XH(t,e.falseValue,e.caseSensitive)?!1:t}function qme(t){var e,r,o,a,n,u,A;function p(E){return Ume(E,t)}function h(E){t.display+=(/[^\r\n]$/.test(t.display)?`
|
`),t.encoding),t.displayOnly?"":t6=t.keepWhitespace||t.keyIn?e:e.trim()}function Ggt(t,e){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!e||e(a))&&r.push(a))}return o(t),r}function r6(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function bs(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(JH),t.unshift(JH))),t.reduce(function(o,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var u;if(a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=Ggt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function $H(t,e,r){return e.some(function(o){var a=typeof o;return a==="string"?r?t===o:t.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(t)===o:a==="function"?o(t):o instanceof RegExp?o.test(t):!1})}function n6(t,e){var r=Lh.normalize($g?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=Lh.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+r6(r)+"(?=\\/|\\\\|$)",$g?"i":""),"~")}function nC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,E,w){var D;return A||typeof(D=e(E))!="string"?p:D?(h||"")+D+(w||""):""}return t.replace(o,n).replace(a,n)}function _me(t,e,r){var o,a=[],n=-1,u=0,A="",p;function h(E,w){return w.length>3?(E.push(w[0]+"..."+w[w.length-1]),p=!0):w.length&&(E=E.concat(w)),E}return o=t.reduce(function(E,w){return E.concat((w+"").split(""))},[]).reduce(function(E,w){var D,b;return e||(w=w.toLowerCase()),D=/^\d$/.test(w)?1:/^[A-Z]$/.test(w)?2:/^[a-z]$/.test(w)?3:0,r&&D===0?A+=w:(b=w.charCodeAt(0),D&&D===n&&b===u+1?a.push(w):(E=h(E,a),a=[w],n=D),u=b),E},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function Hme(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function qme(t,e){var r,o,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":o=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=_me(o,e.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=Hme(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=t6;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=Lh.basename(r):t==="cwdHome"&&(r=n6(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Zg[Zg.length-n]||"")}return r}function jme(t){var e=/^(.)-(.)$/.exec(t),r="",o,a,n,u;if(!e)return null;for(o=e[1].charCodeAt(0),a=e[2].charCodeAt(0),u=o<a?1:-1,n=o;n!==a+u;n+=u)r+=String.fromCharCode(n);return r}function e6(t){var e=new RegExp(/(\s*)(?:("|')(.*?)(?:\2|$)|(\S+))/g),r,o="",a=[],n;for(t=t.trim();r=e.exec(t);)n=r[3]||r[4]||"",r[1]&&(a.push(o),o=""),o+=n;return o&&a.push(o),a}function Gme(t,e){return e.trueValue.length&&$H(t,e.trueValue,e.caseSensitive)?!0:e.falseValue.length&&$H(t,e.falseValue,e.caseSensitive)?!1:t}function Wme(t){var e,r,o,a,n,u,A;function p(E){return qme(E,t)}function h(E){t.display+=(/[^\r\n]$/.test(t.display)?`
|
||||||
`:"")+E}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=tC(t.display+"",p);;){if(e=zH(t),r=!1,o="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=zg[0]||"",a[1]?r=!0:e=n,h(n+`
|
`:"")+E}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=nC(t.display+"",p);;){if(e=ZH(t),r=!1,o="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=Zg[0]||"",a[1]?r=!0:e=n,h(n+`
|
||||||
`),r||(t.displayOnly=!0,zH(t),t.displayOnly=!1)):e&&e!==zg[zg.length-1]&&(zg=[e])),!r&&t.cd&&e)switch(u=ZH(e),u[0].toLowerCase()){case"cd":if(u[1])try{process.chdir(t6(u[1],!0))}catch(E){h(E+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(A=t.preCheck(e,t),e=A.res,A.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||XH(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(o=tC(t.limitMessage,p))}h((o?o+`
|
`),r||(t.displayOnly=!0,ZH(t),t.displayOnly=!1)):e&&e!==Zg[Zg.length-1]&&(Zg=[e])),!r&&t.cd&&e)switch(u=e6(e),u[0].toLowerCase()){case"cd":if(u[1])try{process.chdir(n6(u[1],!0))}catch(E){h(E+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(A=t.preCheck(e,t),e=A.res,A.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||$H(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(o=nC(t.limitMessage,p))}h((o?o+`
|
||||||
`:"")+tC(t.displaySrc+"",p))}return Hme(e,t)}Kr._DBG_set_useExt=function(t){Lme=t};Kr._DBG_set_checkOptions=function(t){JH=t};Kr._DBG_set_checkMethod=function(t){G2=t};Kr._DBG_clearHistory=function(){$H="",zg=[]};Kr.setDefaultOptions=function(t){return KH=bs(!0,t),bs(!0)};Kr.question=function(t,e){return qme(bs(bs(!0,e),{display:t}))};Kr.prompt=function(t){var e=bs(!0,t);return e.display=e.prompt,qme(e)};Kr.keyIn=function(t,e){var r=bs(bs(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(o){var a=typeof o;return a==="string"||a==="number"}).map(function(o){return tC(o+"",_me)}),r.limit=e6(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(o){r[o]=r[o].reduce(function(a,n){var u=typeof n;return u==="string"||u==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=tC(r.display+"",function(o){return Ume(o,r)}),Hme(zH(r),r)};Kr.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),Kr.question(t,bs({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};Kr.questionNewPassword=function(t,e){var r,o,a,n=bs({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
|
`:"")+nC(t.displaySrc+"",p))}return Gme(e,t)}Vr._DBG_set_useExt=function(t){Mme=t};Vr._DBG_set_checkOptions=function(t){XH=t};Vr._DBG_set_checkMethod=function(t){G2=t};Vr._DBG_clearHistory=function(){t6="",Zg=[]};Vr.setDefaultOptions=function(t){return JH=bs(!0,t),bs(!0)};Vr.question=function(t,e){return Wme(bs(bs(!0,e),{display:t}))};Vr.prompt=function(t){var e=bs(!0,t);return e.display=e.prompt,Wme(e)};Vr.keyIn=function(t,e){var r=bs(bs(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(o){var a=typeof o;return a==="string"||a==="number"}).map(function(o){return nC(o+"",jme)}),r.limit=r6(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(o){r[o]=r[o].reduce(function(a,n){var u=typeof n;return u==="string"||u==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=nC(r.display+"",function(o){return qme(o,r)}),Gme(ZH(r),r)};Vr.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),Vr.question(t,bs({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};Vr.questionNewPassword=function(t,e){var r,o,a,n=bs({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
|
||||||
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(b){return b==="charlist"?r.text:b==="length"?o+"..."+a:null}}),u,A,p,h,E,w,D;for(e=e||{},u=tC(e.charlist?e.charlist+"":"$<!-~>",_me),(isNaN(o=parseInt(e.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+e6(u)+"]{"+o+","+a+"}$"),r=Ome([u],n.caseSensitive,!0),r.text=Mme(r.values,r.suppressed),A=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),E=n.limitMessage;!D;)n.limit=h,n.limitMessage=E,w=Kr.question(t,n),n.limit=[w,""],n.limitMessage=p,D=Kr.question(A,n);return w};function jme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return Kr.question(t,bs({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}Kr.questionInt=function(t,e){return jme(t,e,function(r){return parseInt(r,10)})};Kr.questionFloat=function(t,e){return jme(t,e,parseFloat)};Kr.questionPath=function(t,e){var r,o="",a=bs({hideEchoBack:!1,limitMessage:`$<error(
|
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(b){return b==="charlist"?r.text:b==="length"?o+"..."+a:null}}),u,A,p,h,E,w,D;for(e=e||{},u=nC(e.charlist?e.charlist+"":"$<!-~>",jme),(isNaN(o=parseInt(e.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+r6(u)+"]{"+o+","+a+"}$"),r=_me([u],n.caseSensitive,!0),r.text=Hme(r.values,r.suppressed),A=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),E=n.limitMessage;!D;)n.limit=h,n.limitMessage=E,w=Vr.question(t,n),n.limit=[w,""],n.limitMessage=p,D=Vr.question(A,n);return w};function Yme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return Vr.question(t,bs({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}Vr.questionInt=function(t,e){return Yme(t,e,function(r){return parseInt(r,10)})};Vr.questionFloat=function(t,e){return Yme(t,e,parseFloat)};Vr.questionPath=function(t,e){var r,o="",a=bs({hideEchoBack:!1,limitMessage:`$<error(
|
||||||
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var u,A,p;n=t6(n,!0),o="";function h(E){E.split(/\/|\\/).reduce(function(w,D){var b=Lh.resolve(w+=D+Lh.sep);if(!Xn.existsSync(b))Xn.mkdirSync(b);else if(!Xn.statSync(b).isDirectory())throw new Error("Non directory already exists: "+b);return w},"")}try{if(u=Xn.existsSync(n),r=u?Xn.realpathSync(n):Lh.resolve(n),!e.hasOwnProperty("exists")&&!u||typeof e.exists=="boolean"&&e.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&e.create&&(e.isDirectory?h(r):(h(Lh.dirname(r)),Xn.closeSync(Xn.openSync(r,"w"))),r=Xn.realpathSync(r)),u&&(e.min||e.max||e.isFile||e.isDirectory)){if(A=Xn.statSync(r),e.isFile&&!A.isFile())return o="Not file: "+r,!1;if(e.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(e.min&&A.size<+e.min||e.max&&A.size>+e.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(E){return o=E+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),Kr.question(t,a),r};function Gme(t,e){var r={},o={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(o[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=ZH(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=ZH(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}Kr.promptCL=function(t,e){var r=bs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=Gme(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,Kr.prompt(r),o.args};Kr.promptLoop=function(t,e){for(var r=bs({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(Kr.prompt(r)););};Kr.promptCLLoop=function(t,e){var r=bs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=Gme(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;Kr.prompt(r),!o.hRes;);};Kr.promptSimShell=function(t){return Kr.prompt(bs({hideEchoBack:!1,history:!0},t,{prompt:function(){return Xg?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function Wme(t,e,r){var o;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=Kr.keyIn(t,bs(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}Kr.keyInYN=function(t,e){return Wme(t,e)};Kr.keyInYNStrict=function(t,e){return Wme(t,e,"yn")};Kr.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),Kr.keyIn(t,bs({limit:null},e,{hideEchoBack:!0,mask:""}))};Kr.keyInSelect=function(t,e,r){var o=bs({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},u=49,A=`
|
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var u,A,p;n=n6(n,!0),o="";function h(E){E.split(/\/|\\/).reduce(function(w,D){var b=Lh.resolve(w+=D+Lh.sep);if(!Xn.existsSync(b))Xn.mkdirSync(b);else if(!Xn.statSync(b).isDirectory())throw new Error("Non directory already exists: "+b);return w},"")}try{if(u=Xn.existsSync(n),r=u?Xn.realpathSync(n):Lh.resolve(n),!e.hasOwnProperty("exists")&&!u||typeof e.exists=="boolean"&&e.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&e.create&&(e.isDirectory?h(r):(h(Lh.dirname(r)),Xn.closeSync(Xn.openSync(r,"w"))),r=Xn.realpathSync(r)),u&&(e.min||e.max||e.isFile||e.isDirectory)){if(A=Xn.statSync(r),e.isFile&&!A.isFile())return o="Not file: "+r,!1;if(e.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(e.min&&A.size<+e.min||e.max&&A.size>+e.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(E){return o=E+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),Vr.question(t,a),r};function Kme(t,e){var r={},o={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(o[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=e6(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=e6(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}Vr.promptCL=function(t,e){var r=bs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=Kme(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,Vr.prompt(r),o.args};Vr.promptLoop=function(t,e){for(var r=bs({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(Vr.prompt(r)););};Vr.promptCLLoop=function(t,e){var r=bs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=Kme(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;Vr.prompt(r),!o.hRes;);};Vr.promptSimShell=function(t){return Vr.prompt(bs({hideEchoBack:!1,history:!0},t,{prompt:function(){return $g?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function Vme(t,e,r){var o;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=Vr.keyIn(t,bs(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}Vr.keyInYN=function(t,e){return Vme(t,e)};Vr.keyInYNStrict=function(t,e){return Vme(t,e,"yn")};Vr.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),Vr.keyIn(t,bs({limit:null},e,{hideEchoBack:!0,mask:""}))};Vr.keyInSelect=function(t,e,r){var o=bs({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},u=49,A=`
|
||||||
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var E=String.fromCharCode(u);a+=E,n[E]=h,A+="["+E+"] "+(p+"").trim()+`
|
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var E=String.fromCharCode(u);a+=E,n[E]=h,A+="["+E+"] "+(p+"").trim()+`
|
||||||
`,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
|
`,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
|
||||||
`),o.limit=a,A+=`
|
`),o.limit=a,A+=`
|
||||||
`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),A+=e),n[Kr.keyIn(A,o).toLowerCase()]};Kr.getRawInput=function(){return Xk};function W2(t,e){var r;return e.length&&(r={},r[t]=e[0]),Kr.setDefaultOptions(r)[t]}Kr.setPrint=function(){return W2("print",arguments)};Kr.setPrompt=function(){return W2("prompt",arguments)};Kr.setEncoding=function(){return W2("encoding",arguments)};Kr.setMask=function(){return W2("mask",arguments)};Kr.setBufferSize=function(){return W2("bufferSize",arguments)}});var r6=_((O9t,El)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(I,P,y){var R=tau_file_system.files[I];if(!R){if(y==="read")return null;R={path:I,text:"",type:P,get:function(z,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+z)},put:function(z,X){return X==="end_of_file"?(this.text+=z,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+z+this.text.substring(X+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var X=Math.floor(z/2);if(this.text.length<=X)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,X){var $=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<$)return null;var se=this.text.length===$?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(se=se/256>>>0,se=(se&255)<<8|z&255):(se=se&255,se=(z&255)<<8|se&255),this.text.length===$?this.text+=u(se):this.text=this.text.substring(0,$)+u(se)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[I]=R}return y==="write"&&(R.text=""),R}},tau_user_input={buffer:"",get:function(I,P){for(var y;tau_user_input.buffer.length<I;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,I),tau_user_input.buffer=tau_user_input.buffer.substr(I),y}},tau_user_output={put:function(I,P){return console.log(I),!0},flush:function(){return!0}},nodejs_file_system={open:function(I,P,y){var R=ve("fs"),z=R.openSync(I,y[0]);return y==="read"&&!R.existsSync(I)?null:{get:function(X,$){var se=new Buffer(X);return R.readSync(z,se,0,X,$),se.toString()},put:function(X,$){var se=Buffer.from(X);if($==="end_of_file")R.writeSync(z,se);else{if($==="past_end_of_file")return null;R.writeSync(z,se,0,se.length,$)}return!0},get_byte:function(X){return null},put_byte:function(X,$){return null},flush:function(){return!0},close:function(){return R.closeSync(z),!0}}}},nodejs_user_input={buffer:"",get:function(I,P){for(var y,R=Yme();nodejs_user_input.buffer.length<I;)nodejs_user_input.buffer+=R.question();return y=nodejs_user_input.buffer.substr(0,I),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(I),y}},nodejs_user_output={put:function(I,P){return process.stdout.write(I),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(I,P){return I.indexOf(P)}:e=function(I,P){for(var y=I.length,R=0;R<y;R++)if(P===I[R])return R;return-1};var r=function(I,P){if(I.length!==0){for(var y=I[0],R=I.length,z=1;z<R;z++)y=P(y,I[z]);return y}},o;Array.prototype.map?o=function(I,P){return I.map(P)}:o=function(I,P){for(var y=[],R=I.length,z=0;z<R;z++)y.push(P(I[z]));return y};var a;Array.prototype.filter?a=function(I,P){return I.filter(P)}:a=function(I,P){for(var y=[],R=I.length,z=0;z<R;z++)P(I[z])&&y.push(I[z]);return y};var n;String.prototype.codePointAt?n=function(I,P){return I.codePointAt(P)}:n=function(I,P){return I.charCodeAt(P)};var u;String.fromCodePoint?u=function(){return String.fromCodePoint.apply(null,arguments)}:u=function(){return String.fromCharCode.apply(null,arguments)};var A=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,E={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function w(I){var P=[],y=!1;return I.replace(h,function(R,z,X,$,se,be,Fe,lt,Et,qt,nr,Pt,cn,Sr,yr,Rr,Xr){switch(!0){case Et!==void 0:return P.push(parseInt(Et,16)),"";case qt!==void 0:return P.push(parseInt(qt,8)),"";case nr!==void 0:case Pt!==void 0:case cn!==void 0:case Sr!==void 0:case yr!==void 0:return P.push(n(R.substr(1),0)),"";case Xr!==void 0:return P.push(n(Xr,0)),"";case Rr!==void 0:y=!0;default:return P.push(E[R]),""}}),y?null:P}function D(I,P){var y="";if(I.length<2)return I;try{I=I.replace(/\\([0-7]+)\\/g,function($,se){return u(parseInt(se,8))}),I=I.replace(/\\x([0-9a-fA-F]+)\\/g,function($,se){return u(parseInt(se,16))})}catch{return null}for(var R=0;R<I.length;R++){var z=I.charAt(R),X=I.charAt(R+1);if(z===P&&X===P)R++,y+=P;else if(z==="\\")if(["a","b","f","n","r","t","v","'",'"',"\\","a","\b","\f",`
|
`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),A+=e),n[Vr.keyIn(A,o).toLowerCase()]};Vr.getRawInput=function(){return ZQ};function W2(t,e){var r;return e.length&&(r={},r[t]=e[0]),Vr.setDefaultOptions(r)[t]}Vr.setPrint=function(){return W2("print",arguments)};Vr.setPrompt=function(){return W2("prompt",arguments)};Vr.setEncoding=function(){return W2("encoding",arguments)};Vr.setMask=function(){return W2("mask",arguments)};Vr.setBufferSize=function(){return W2("bufferSize",arguments)}});var i6=_((j9t,El)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(I,S,y){var R=tau_file_system.files[I];if(!R){if(y==="read")return null;R={path:I,text:"",type:S,get:function(J,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+J)},put:function(J,X){return X==="end_of_file"?(this.text+=J,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+J+this.text.substring(X+J.length),!0)},get_byte:function(J){if(J==="end_of_stream")return-1;var X=Math.floor(J/2);if(this.text.length<=X)return-1;var $=n(this.text[Math.floor(J/2)],0);return J%2===0?$&255:$/256>>>0},put_byte:function(J,X){var $=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<$)return null;var se=this.text.length===$?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(se=se/256>>>0,se=(se&255)<<8|J&255):(se=se&255,se=(J&255)<<8|se&255),this.text.length===$?this.text+=u(se):this.text=this.text.substring(0,$)+u(se)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var J=tau_file_system.files[this.path];return J?!0:null}},tau_file_system.files[I]=R}return y==="write"&&(R.text=""),R}},tau_user_input={buffer:"",get:function(I,S){for(var y;tau_user_input.buffer.length<I;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,I),tau_user_input.buffer=tau_user_input.buffer.substr(I),y}},tau_user_output={put:function(I,S){return console.log(I),!0},flush:function(){return!0}},nodejs_file_system={open:function(I,S,y){var R=De("fs"),J=R.openSync(I,y[0]);return y==="read"&&!R.existsSync(I)?null:{get:function(X,$){var se=new Buffer(X);return R.readSync(J,se,0,X,$),se.toString()},put:function(X,$){var se=Buffer.from(X);if($==="end_of_file")R.writeSync(J,se);else{if($==="past_end_of_file")return null;R.writeSync(J,se,0,se.length,$)}return!0},get_byte:function(X){return null},put_byte:function(X,$){return null},flush:function(){return!0},close:function(){return R.closeSync(J),!0}}}},nodejs_user_input={buffer:"",get:function(I,S){for(var y,R=zme();nodejs_user_input.buffer.length<I;)nodejs_user_input.buffer+=R.question();return y=nodejs_user_input.buffer.substr(0,I),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(I),y}},nodejs_user_output={put:function(I,S){return process.stdout.write(I),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(I,S){return I.indexOf(S)}:e=function(I,S){for(var y=I.length,R=0;R<y;R++)if(S===I[R])return R;return-1};var r=function(I,S){if(I.length!==0){for(var y=I[0],R=I.length,J=1;J<R;J++)y=S(y,I[J]);return y}},o;Array.prototype.map?o=function(I,S){return I.map(S)}:o=function(I,S){for(var y=[],R=I.length,J=0;J<R;J++)y.push(S(I[J]));return y};var a;Array.prototype.filter?a=function(I,S){return I.filter(S)}:a=function(I,S){for(var y=[],R=I.length,J=0;J<R;J++)S(I[J])&&y.push(I[J]);return y};var n;String.prototype.codePointAt?n=function(I,S){return I.codePointAt(S)}:n=function(I,S){return I.charCodeAt(S)};var u;String.fromCodePoint?u=function(){return String.fromCodePoint.apply(null,arguments)}:u=function(){return String.fromCharCode.apply(null,arguments)};var A=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,E={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function w(I){var S=[],y=!1;return I.replace(h,function(R,J,X,$,se,be,Fe,lt,Et,qt,nr,St,cn,Pr,yr,Rr,Xr){switch(!0){case Et!==void 0:return S.push(parseInt(Et,16)),"";case qt!==void 0:return S.push(parseInt(qt,8)),"";case nr!==void 0:case St!==void 0:case cn!==void 0:case Pr!==void 0:case yr!==void 0:return S.push(n(R.substr(1),0)),"";case Xr!==void 0:return S.push(n(Xr,0)),"";case Rr!==void 0:y=!0;default:return S.push(E[R]),""}}),y?null:S}function D(I,S){var y="";if(I.length<2)return I;try{I=I.replace(/\\([0-7]+)\\/g,function($,se){return u(parseInt(se,8))}),I=I.replace(/\\x([0-9a-fA-F]+)\\/g,function($,se){return u(parseInt(se,16))})}catch{return null}for(var R=0;R<I.length;R++){var J=I.charAt(R),X=I.charAt(R+1);if(J===S&&X===S)R++,y+=S;else if(J==="\\")if(["a","b","f","n","r","t","v","'",'"',"\\","a","\b","\f",`
|
||||||
`,"\r"," ","\v"].indexOf(X)!==-1)switch(R+=1,X){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
|
`,"\r"," ","\v"].indexOf(X)!==-1)switch(R+=1,X){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
|
||||||
`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=z}return y}function b(I){for(var P="",y=0;y<I.length;y++)switch(I.charAt(y)){case"'":P+="\\'";break;case"\\":P+="\\\\";break;case"\b":P+="\\b";break;case"\f":P+="\\f";break;case`
|
`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=J}return y}function b(I){for(var S="",y=0;y<I.length;y++)switch(I.charAt(y)){case"'":S+="\\'";break;case"\\":S+="\\\\";break;case"\b":S+="\\b";break;case"\f":S+="\\f";break;case`
|
||||||
`:P+="\\n";break;case"\r":P+="\\r";break;case" ":P+="\\t";break;case"\v":P+="\\v";break;default:P+=I.charAt(y);break}return P}function C(I){var P=I.substr(2);switch(I.substr(0,2).toLowerCase()){case"0x":return parseInt(P,16);case"0b":return parseInt(P,2);case"0o":return parseInt(P,8);case"0'":return w(P)[0];default:return parseFloat(I)}}var T={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function N(I,P){return I.get_flag("char_conversion").id==="on"?P.replace(/./g,function(y){return I.get_char_conversion(y)}):P}function U(I){this.thread=I,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(I){return this.tokens=I},U.prototype.new_text=function(I){this.text=I,this.tokens=[]},U.prototype.get_tokens=function(I){var P,y=0,R=0,z=0,X=[],$=!1;if(I){var se=this.tokens[I-1];y=se.len,P=N(this.thread,this.text.substr(se.len)),R=se.line,z=se.start}else P=this.text;if(/^\s*$/.test(P))return null;for(;P!=="";){var be=[],Fe=!1;if(/^\n/.exec(P)!==null){R++,z=0,y++,P=P.replace(/\n/,""),$=!0;continue}for(var lt in T)if(T.hasOwnProperty(lt)){var Et=T[lt].exec(P);Et&&be.push({value:Et[0],name:lt,matches:Et})}if(!be.length)return this.set_last_tokens([{value:P,matches:[],name:"lexical",line:R,start:z}]);var se=r(be,function(Sr,yr){return Sr.value.length>=yr.value.length?Sr:yr});switch(se.start=z,se.line=R,P=P.replace(se.value,""),z+=se.value.length,y+=se.value.length,se.name){case"atom":se.raw=se.value,se.value.charAt(0)==="'"&&(se.value=D(se.value.substr(1,se.value.length-2),"'"),se.value===null&&(se.name="lexical",se.value="unknown escape sequence"));break;case"number":se.float=se.value.substring(0,2)!=="0x"&&se.value.match(/[.eE]/)!==null&&se.value!=="0'.",se.value=C(se.value),se.blank=Fe;break;case"string":var qt=se.value.charAt(0);se.value=D(se.value.substr(1,se.value.length-2),qt),se.value===null&&(se.name="lexical",se.value="unknown escape sequence");break;case"whitespace":var nr=X[X.length-1];nr&&(nr.space=!0),Fe=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(se=X.pop(),se.name="atom",se.value="{}",se.raw="{}",se.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(se=X.pop(),se.name="atom",se.value="[]",se.raw="[]",se.space=!1);break}se.len=y,X.push(se),Fe=!1}var Pt=this.set_last_tokens(X);return Pt.length===0?null:Pt};function J(I,P,y,R,z){if(!P[y])return{type:A,value:x.error.syntax(P[y-1],"expression expected",!0)};var X;if(R==="0"){var $=P[y];switch($.name){case"number":return{type:p,len:y+1,value:new x.type.Num($.value,$.float)};case"variable":return{type:p,len:y+1,value:new x.type.Var($.value)};case"string":var se;switch(I.get_flag("double_quotes").id){case"atom":se=new q($.value,[]);break;case"codes":se=new q("[]",[]);for(var be=$.value.length-1;be>=0;be--)se=new q(".",[new x.type.Num(n($.value,be),!1),se]);break;case"chars":se=new q("[]",[]);for(var be=$.value.length-1;be>=0;be--)se=new q(".",[new x.type.Term($.value.charAt(be),[]),se]);break}return{type:p,len:y+1,value:se};case"l_paren":var Pt=J(I,P,y+1,I.__get_max_priority(),!0);return Pt.type!==p?Pt:P[Pt.len]&&P[Pt.len].name==="r_paren"?(Pt.len++,Pt):{type:A,derived:!0,value:x.error.syntax(P[Pt.len]?P[Pt.len]:P[Pt.len-1],") or operator expected",!P[Pt.len])};case"l_bracket":var Pt=J(I,P,y+1,I.__get_max_priority(),!0);return Pt.type!==p?Pt:P[Pt.len]&&P[Pt.len].name==="r_bracket"?(Pt.len++,Pt.value=new q("{}",[Pt.value]),Pt):{type:A,derived:!0,value:x.error.syntax(P[Pt.len]?P[Pt.len]:P[Pt.len-1],"} or operator expected",!P[Pt.len])}}var Fe=te(I,P,y,z);return Fe.type===p||Fe.derived||(Fe=le(I,P,y),Fe.type===p||Fe.derived)?Fe:{type:A,derived:!1,value:x.error.syntax(P[y],"unexpected token")}}var lt=I.__get_max_priority(),Et=I.__get_next_priority(R),qt=y;if(P[y].name==="atom"&&P[y+1]&&(P[y].space||P[y+1].name!=="l_paren")){var $=P[y++],nr=I.__lookup_operator_classes(R,$.value);if(nr&&nr.indexOf("fy")>-1){var Pt=J(I,P,y,R,z);if(Pt.type!==A)return $.value==="-"&&!$.space&&x.type.is_number(Pt.value)?{value:new x.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};X=Pt}else if(nr&&nr.indexOf("fx")>-1){var Pt=J(I,P,y,Et,z);if(Pt.type!==A)return{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};X=Pt}}y=qt;var Pt=J(I,P,y,Et,z);if(Pt.type===p){y=Pt.len;var $=P[y];if(P[y]&&(P[y].name==="atom"&&I.__lookup_operator_classes(R,$.value)||P[y].name==="bar"&&I.__lookup_operator_classes(R,"|"))){var cn=Et,Sr=R,nr=I.__lookup_operator_classes(R,$.value);if(nr.indexOf("xf")>-1Line truncated
|
`:S+="\\n";break;case"\r":S+="\\r";break;case" ":S+="\\t";break;case"\v":S+="\\v";break;default:S+=I.charAt(y);break}return S}function C(I){var S=I.substr(2);switch(I.substr(0,2).toLowerCase()){case"0x":return parseInt(S,16);case"0b":return parseInt(S,2);case"0o":return parseInt(S,8);case"0'":return w(S)[0];default:return parseFloat(I)}}var T={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function L(I,S){return I.get_flag("char_conversion").id==="on"?S.replace(/./g,function(y){return I.get_char_conversion(y)}):S}function U(I){this.thread=I,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(I){return this.tokens=I},U.prototype.new_text=function(I){this.text=I,this.tokens=[]},U.prototype.get_tokens=function(I){var S,y=0,R=0,J=0,X=[],$=!1;if(I){var se=this.tokens[I-1];y=se.len,S=L(this.thread,this.text.substr(se.len)),R=se.line,J=se.start}else S=this.text;if(/^\s*$/.test(S))return null;for(;S!=="";){var be=[],Fe=!1;if(/^\n/.exec(S)!==null){R++,J=0,y++,S=S.replace(/\n/,""),$=!0;continue}for(var lt in T)if(T.hasOwnProperty(lt)){var Et=T[lt].exec(S);Et&&be.push({value:Et[0],name:lt,matches:Et})}if(!be.length)return this.set_last_tokens([{value:S,matches:[],name:"lexical",line:R,start:J}]);var se=r(be,function(Pr,yr){return Pr.value.length>=yr.value.length?Pr:yr});switch(se.start=J,se.line=R,S=S.replace(se.value,""),J+=se.value.length,y+=se.value.length,se.name){case"atom":se.raw=se.value,se.value.charAt(0)==="'"&&(se.value=D(se.value.substr(1,se.value.length-2),"'"),se.value===null&&(se.name="lexical",se.value="unknown escape sequence"));break;case"number":se.float=se.value.substring(0,2)!=="0x"&&se.value.match(/[.eE]/)!==null&&se.value!=="0'.",se.value=C(se.value),se.blank=Fe;break;case"string":var qt=se.value.charAt(0);se.value=D(se.value.substr(1,se.value.length-2),qt),se.value===null&&(se.name="lexical",se.value="unknown escape sequence");break;case"whitespace":var nr=X[X.length-1];nr&&(nr.space=!0),Fe=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(se=X.pop(),se.name="atom",se.value="{}",se.raw="{}",se.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(se=X.pop(),se.name="atom",se.value="[]",se.raw="[]",se.space=!1);break}se.len=y,X.push(se),Fe=!1}var St=this.set_last_tokens(X);return St.length===0?null:St};function z(I,S,y,R,J){if(!S[y])return{type:A,value:x.error.syntax(S[y-1],"expression expected",!0)};var X;if(R==="0"){var $=S[y];switch($.name){case"number":return{type:p,len:y+1,value:new x.type.Num($.value,$.float)};case"variable":return{type:p,len:y+1,value:new x.type.Var($.value)};case"string":var se;switch(I.get_flag("double_quotes").id){case"atom":se=new q($.value,[]);break;case"codes":se=new q("[]",[]);for(var be=$.value.length-1;be>=0;be--)se=new q(".",[new x.type.Num(n($.value,be),!1),se]);break;case"chars":se=new q("[]",[]);for(var be=$.value.length-1;be>=0;be--)se=new q(".",[new x.type.Term($.value.charAt(be),[]),se]);break}return{type:p,len:y+1,value:se};case"l_paren":var St=z(I,S,y+1,I.__get_max_priority(),!0);return St.type!==p?St:S[St.len]&&S[St.len].name==="r_paren"?(St.len++,St):{type:A,derived:!0,value:x.error.syntax(S[St.len]?S[St.len]:S[St.len-1],") or operator expected",!S[St.len])};case"l_bracket":var St=z(I,S,y+1,I.__get_max_priority(),!0);return St.type!==p?St:S[St.len]&&S[St.len].name==="r_bracket"?(St.len++,St.value=new q("{}",[St.value]),St):{type:A,derived:!0,value:x.error.syntax(S[St.len]?S[St.len]:S[St.len-1],"} or operator expected",!S[St.len])}}var Fe=te(I,S,y,J);return Fe.type===p||Fe.derived||(Fe=le(I,S,y),Fe.type===p||Fe.derived)?Fe:{type:A,derived:!1,value:x.error.syntax(S[y],"unexpected token")}}var lt=I.__get_max_priority(),Et=I.__get_next_priority(R),qt=y;if(S[y].name==="atom"&&S[y+1]&&(S[y].space||S[y+1].name!=="l_paren")){var $=S[y++],nr=I.__lookup_operator_classes(R,$.value);if(nr&&nr.indexOf("fy")>-1){var St=z(I,S,y,R,J);if(St.type!==A)return $.value==="-"&&!$.space&&x.type.is_number(St.value)?{value:new x.type.Num(-St.value.value,St.value.is_float),len:St.len,type:p}:{value:new x.type.Term($.value,[St.value]),len:St.len,type:p};X=St}else if(nr&&nr.indexOf("fx")>-1){var St=z(I,S,y,Et,J);if(St.type!==A)return{value:new x.type.Term($.value,[St.value]),len:St.len,type:p};X=St}}y=qt;var St=z(I,S,y,Et,J);if(St.type===p){y=St.len;var $=S[y];if(S[y]&&(S[y].name==="atom"&&I.__lookup_operator_classes(R,$.value)||S[y].name==="bar"&&I.__lookup_operator_classes(R,"|"))){var cn=Et,Pr=R,nr=I.__lookup_operator_classes(R,$.value);if(nr.indexOf("xf")>-1Line truncated
|
||||||
`;P+=`
|
`;S+=`
|
||||||
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)P+=this.rules[key][y].toString(I),P+=`
|
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)S+=this.rules[key][y].toString(I),S+=`
|
||||||
`;return P},Se.prototype.clone=function(){return new Se(this.id)},Re.prototype.clone=function(){return new Re(this.value,this.is_float)},q.prototype.clone=function(){return new q(this.id,o(this.args,function(I){return I.clone()}))},Le.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Te.prototype.clone=function(){var I={};for(var P in this.links)this.links.hasOwnProperty(P)&&(I[P]=this.links[P].clone());return new Te(I)},ke.prototype.clone=function(){return new ke(this.goal.clone(),this.substitution.clone(),this.parent)},Ke.prototype.clone=function(){return new Ke(this.head.clone(),this.body!==null?this.body.clone():null)},Se.prototype.equals=function(I){return x.type.is_variable(I)&&this.id===I.id},Re.prototype.equals=function(I){return x.type.is_number(I)&&this.value===I.value&&this.is_float===I.is_float},q.prototype.equals=function(I){if(!x.type.is_term(I)||this.indicator!==I.indicator)return!1;for(var P=0;P<this.args.length;P++)if(!this.args[P].equals(I.args[P]))return!1;return!0},Le.prototype.equals=function(I){return x.type.is_stream(I)&&this.id===I.id},Te.prototype.equals=function(I){var P;if(!x.type.is_substitution(I))return!1;for(P in this.links)if(this.links.hasOwnProperty(P)&&(!I.links[P]||!this.links[P].equals(I.links[P])))return!1;for(P in I.links)if(I.links.hasOwnProperty(P)&&!this.links[P])return!1;return!0},ke.prototype.equals=function(I){return x.type.is_state(I)&&this.goal.equals(I.goal)&&this.substitution.equals(I.substitution)&&this.parent===I.parent},Ke.prototype.equals=function(I){return x.type.is_rule(I)&&this.head.equals(I.head)&&(this.body===null&&I.body===null||this.body!==null&&this.body.equals(I.body))},Se.prototype.rename=function(I){return I.get_free_variable(this)},Re.prototype.rename=function(I){return this},q.prototype.rename=function(I){return new q(this.id,o(this.args,function(P){return P.rename(I)}))},Le.prototype.rename=function(I){return this},Ke.prototype.rename=function(I){return new Ke(this.head.rename(I),this.body!==null?this.body.rename(I):null)},Se.prototype.variables=function(){return[this.id]},Re.prototype.variables=function(){return[]},q.prototype.variables=function(){return[].concat.apply([],o(this.args,function(I){return I.variables()}))},Le.prototype.variables=function(){return[]},Ke.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},Se.prototype.apply=function(I){return I.lookup(this.id)?I.lookup(this.id):this},Re.prototype.apply=function(I){return this},q.prototype.apply=function(I){if(this.indicator==="./2"){for(var P=[],y=this;y.indicator==="./2";)P.push(y.args[0].apply(I)),y=y.args[1];for(var R=y.apply(I),z=P.length-1;z>=0;z--)R=new q(".",[P[z],R]);return R}return new q(this.id,o(this.args,function(X){return X.apply(I)}),this.ref)},Le.prototype.apply=function(I){return this},Ke.prototype.apply=function(I){return new Ke(this.head.apply(I),this.body!==null?this.body.apply(I):null)},Te.prototype.apply=function(I){var P,y={};for(P in this.links)this.links.hasOwnProperty(P)&&(y[P]=this.links[P].apply(I));return new Te(y)},q.prototype.select=function(){for(var I=this;I.indicator===",/2";)I=I.args[0];return I},q.prototype.replace=function(I){return this.indicator===",/2"?this.args[0].indicator===",/2"?new q(",",[this.args[0].replace(I),this.args[1]]):I===null?this.args[1]:new q(",",[I,this.args[1]]):I},q.prototype.search=function(I){if(x.type.is_term(I)&&I.ref!==void 0&&this.ref===I.ref)return!0;for(var P=0;P<this.args.length;P++)if(x.type.is_term(this.args[P])&&this.args[P].search(I))return!0;return!1},xe.prototype.get_current_input=function(){return this.current_input},tt.prototype.get_current_input=function(){return this.session.get_current_input()},xe.prototype.get_current_output=function(){return this.current_output},tt.prototype.get_current_output=function(){return this.session.get_current_output()},xe.prototype.set_current_input=function(I){this.current_input=I},tt.prototype.set_current_input=function(I){return this.session.set_current_input(I)},xe.prototype.set_current_output=function(I){this.current_input=I},tt.prototype.set_current_output=function(I){return this.session.set_current_output(I)},xe.prototype.get_stream_by_alias=function(I){return this.streams[I]},tt.prototype.get_stream_by_alias=function(I){return this.session.get_stream_by_alias(I)},xe.prototype.file_system_open=function(I,P,y){return this.file_system.open(I,P,y)},tt.prototype.file_system_open=function(I,P,y){return this.session.file_system_open(I,P,y)},xe.prototype.get_char_conversion=function(I){return this.__char_conversion[I]||I},tt.prototype.get_char_conversion=function(I){return this.session.get_char_conversion(I)},xe.prototype.parse=function(I){return this.thread.parse(I)},tt.prototype.parse=function(I){var P=new U(this);P.new_text(I);var y=P.get_tokens();if(y===null)return!1;var R=J(this,y,0,this.__get_max_priority(),!1);return R
Line truncated
|
`;return S},Pe.prototype.clone=function(){return new Pe(this.id)},Re.prototype.clone=function(){return new Re(this.value,this.is_float)},q.prototype.clone=function(){return new q(this.id,o(this.args,function(I){return I.clone()}))},Te.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Ne.prototype.clone=function(){var I={};for(var S in this.links)this.links.hasOwnProperty(S)&&(I[S]=this.links[S].clone());return new Ne(I)},xe.prototype.clone=function(){return new xe(this.goal.clone(),this.substitution.clone(),this.parent)},Ye.prototype.clone=function(){return new Ye(this.head.clone(),this.body!==null?this.body.clone():null)},Pe.prototype.equals=function(I){return x.type.is_variable(I)&&this.id===I.id},Re.prototype.equals=function(I){return x.type.is_number(I)&&this.value===I.value&&this.is_float===I.is_float},q.prototype.equals=function(I){if(!x.type.is_term(I)||this.indicator!==I.indicator)return!1;for(var S=0;S<this.args.length;S++)if(!this.args[S].equals(I.args[S]))return!1;return!0},Te.prototype.equals=function(I){return x.type.is_stream(I)&&this.id===I.id},Ne.prototype.equals=function(I){var S;if(!x.type.is_substitution(I))return!1;for(S in this.links)if(this.links.hasOwnProperty(S)&&(!I.links[S]||!this.links[S].equals(I.links[S])))return!1;for(S in I.links)if(I.links.hasOwnProperty(S)&&!this.links[S])return!1;return!0},xe.prototype.equals=function(I){return x.type.is_state(I)&&this.goal.equals(I.goal)&&this.substitution.equals(I.substitution)&&this.parent===I.parent},Ye.prototype.equals=function(I){return x.type.is_rule(I)&&this.head.equals(I.head)&&(this.body===null&&I.body===null||this.body!==null&&this.body.equals(I.body))},Pe.prototype.rename=function(I){return I.get_free_variable(this)},Re.prototype.rename=function(I){return this},q.prototype.rename=function(I){return new q(this.id,o(this.args,function(S){return S.rename(I)}))},Te.prototype.rename=function(I){return this},Ye.prototype.rename=function(I){return new Ye(this.head.rename(I),this.body!==null?this.body.rename(I):null)},Pe.prototype.variables=function(){return[this.id]},Re.prototype.variables=function(){return[]},q.prototype.variables=function(){return[].concat.apply([],o(this.args,function(I){return I.variables()}))},Te.prototype.variables=function(){return[]},Ye.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},Pe.prototype.apply=function(I){return I.lookup(this.id)?I.lookup(this.id):this},Re.prototype.apply=function(I){return this},q.prototype.apply=function(I){if(this.indicator==="./2"){for(var S=[],y=this;y.indicator==="./2";)S.push(y.args[0].apply(I)),y=y.args[1];for(var R=y.apply(I),J=S.length-1;J>=0;J--)R=new q(".",[S[J],R]);return R}return new q(this.id,o(this.args,function(X){return X.apply(I)}),this.ref)},Te.prototype.apply=function(I){return this},Ye.prototype.apply=function(I){return new Ye(this.head.apply(I),this.body!==null?this.body.apply(I):null)},Ne.prototype.apply=function(I){var S,y={};for(S in this.links)this.links.hasOwnProperty(S)&&(y[S]=this.links[S].apply(I));return new Ne(y)},q.prototype.select=function(){for(var I=this;I.indicator===",/2";)I=I.args[0];return I},q.prototype.replace=function(I){return this.indicator===",/2"?this.args[0].indicator===",/2"?new q(",",[this.args[0].replace(I),this.args[1]]):I===null?this.args[1]:new q(",",[I,this.args[1]]):I},q.prototype.search=function(I){if(x.type.is_term(I)&&I.ref!==void 0&&this.ref===I.ref)return!0;for(var S=0;S<this.args.length;S++)if(x.type.is_term(this.args[S])&&this.args[S].search(I))return!0;return!1},Qe.prototype.get_current_input=function(){return this.current_input},it.prototype.get_current_input=function(){return this.session.get_current_input()},Qe.prototype.get_current_output=function(){return this.current_output},it.prototype.get_current_output=function(){return this.session.get_current_output()},Qe.prototype.set_current_input=function(I){this.current_input=I},it.prototype.set_current_input=function(I){return this.session.set_current_input(I)},Qe.prototype.set_current_output=function(I){this.current_input=I},it.prototype.set_current_output=function(I){return this.session.set_current_output(I)},Qe.prototype.get_stream_by_alias=function(I){return this.streams[I]},it.prototype.get_stream_by_alias=function(I){return this.session.get_stream_by_alias(I)},Qe.prototype.file_system_open=function(I,S,y){return this.file_system.open(I,S,y)},it.prototype.file_system_open=function(I,S,y){return this.session.file_system_open(I,S,y)},Qe.prototype.get_char_conversion=function(I){return this.__char_conversion[I]||I},it.prototype.get_char_conversion=function(I){return this.session.get_char_conversion(I)},Qe.prototype.parse=function(I){return this.thread.parse(I)},it.prototype.parse=function(I){var S=new U(this);S.new_text(I);var y=S.get_tokens();if(y===null)return!1;var R=z(this,y,0,this.__get_max_priority(),!1);return R
Line truncated
|
||||||
`,[])])])),P.substitution,P)])},"nl/1":function(I,P,y){var R=y.args[0];I.prepend([new ke(P.goal.replace(new q("put_char",[R,new q(`
|
`,[])])])),S.substitution,S)])},"nl/1":function(I,S,y){var R=y.args[0];I.prepend([new xe(S.goal.replace(new q("put_char",[R,new q(`
|
||||||
`,[])])),P.substitution,P)])},"get_byte/1":function(I,P,y){var R=y.args[0];I.prepend([new ke(P.goal.replace(new q(",",[new q("current_input",[new Se("S")]),new q("get_byte",[new Se("S"),R])])),P.substitution,P)])},"get_byte/2":function(I,P,y){var R=y.args[0],z=y.args[1],X=x.type.is_stream(R)?R:I.get_stream_by_alias(R.id);if(x.type.is_variable(R))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))I.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(R)&&!x.type.is_atom(R))I.throw_error(x.error.domain("stream_or_alias",R,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",R,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",R,y.indicator));else if(X.type==="text")I.throw_error(x.error.permission("input","text_stream",R,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",R,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else{if($=X.stream.get_byte(X.position),$===null){I.throw_error(x.error.representation("byte",y.indicator));return}X.position++}I.prepend([new ke(P.goal.replace(new q("=",[new Re($,!1),z])),P.substitution,P)])}},"peek_byte/1":function(I,P,y){var R=y.args[0];I.prepend([new ke(P.goal.replace(new q(",",[new q("current_input",[new Se("S")]),new q("peek_byte",[new Se("S"),R])])),P.substitution,P)])},"peek_byte/2":function(I,P,y){var R=y.args[0],z=y.args[1],X=x.type.is_stream(R)?R:I.get_stream_by_alias(R.id);if(x.type.is_variable(R))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_byte(z))I.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(R)&&!x.type.is_atom(R))I.throw_error(x.error.domain("stream_or_alias",R,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",R,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",R,y.indicator));else if(X.type==="text")I.throw_error(x.error.permission("input","text_stream",R,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",R,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else if($=X.stream.get_byte(X.position),$===null){I.throw_error(x.error.representation("byte",y.indicator));return}I.prepend([new ke(P.goal.replace(new q("=",[new Re($,!1),z])),P.substitution,P)])}},"put_byte/1":function(I,P,y){var R=y.args[0];I.prepend([new ke(P.goal.replace(new q(",",[new q("current_output",[new Se("S")]),new q("put_byte",[new Se("S"),R])])),P.substitution,P)])},"put_byte/2":function(I,P,y){var R=y.args[0],z=y.args[1],X=x.type.is_stream(R)?R:I.get_stream_by_alias(R.id);x.type.is_variable(R)||x.type.is_variable(z)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(z)?!x.type.is_variable(R)&&!x.type.is_stream(R)&&!x.type.is_atom(R)?I.throw_error(x.error.domain("stream_or_alias",R,y.indicator)):!x.type.is_stream(X)||X.stream===null?I.throw_error(x.error.existence("stream",R,y.indicator)):X.input?I.throw_error(x.error.permission("output","stream",R,y.indicator)):X.type==="text"?I.throw_error(x.error.permission("output","text_stream",R,y.indicator)):X.stream.put_byte(z.value,X.position)&&(typeof X.position=="number"&&X.position++,I.success(P)):I.throw_error(x.error.type("byte",z,y.indicator))},"read/1":function(I,P,y){var R=y.args[0];I.prepend([new ke(P.goal.replace(new q(",",[new q("current_input",[new Se("S")]),new q("read_term",[new Se("S"),R,new q("[]",[])])])),P.substitution,P)])},"read/2":function(I,P,y){var R=y.args[0],z=y.args[1];I.prepend([new ke(P.goal.replace(new q("read_term",[R,z,new q("[]",[])])),P.substitution,P)])},"read_term/2":function(I,P,y){var R=y.args[0],z=y.args[1];I.prepend([new ke(P.goal.replace(new q(",",[new q("current_input",[new Se("S")]),new q("read_term",[new Se("S"),R,z])])),P.substitution,P)])},"read_term/3":function(I,P,y){var R=y.args[0],z=y.args[1],X=y.args[2],$=x.type.is_stream(R)?R:I.get_stream_by_alias(R.id);if(x.type.is_variable(R)||x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))I.throw_error(x.error.type("list",X,y.indicator));else if(!x.type.is_stream(R)&&!x.type.is_atom(R))I.throw_error(x.error.domain("stream_or_alias",R,y.indicator));else if(!x.type.is_stream($)||$.stream===null)I.throw_error(x.error.existence("stream",R,y.indicator));else if($.output)I.throw_error(x.error.permission("input","stream",R,y.indicator));else if($.type==="binary")I.throw_error(x.error.permission("input","binary_stream",R,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",R,y.indicator));else{for(var se={},be=X,Fe;
Line truncated
|
`,[])])),S.substitution,S)])},"get_byte/1":function(I,S,y){var R=y.args[0];I.prepend([new xe(S.goal.replace(new q(",",[new q("current_input",[new Pe("S")]),new q("get_byte",[new Pe("S"),R])])),S.substitution,S)])},"get_byte/2":function(I,S,y){var R=y.args[0],J=y.args[1],X=x.type.is_stream(R)?R:I.get_stream_by_alias(R.id);if(x.type.is_variable(R))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(J)&&!x.type.is_byte(J))I.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(R)&&!x.type.is_atom(R))I.throw_error(x.error.domain("stream_or_alias",R,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",R,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",R,y.indicator));else if(X.type==="text")I.throw_error(x.error.permission("input","text_stream",R,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",R,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else{if($=X.stream.get_byte(X.position),$===null){I.throw_error(x.error.representation("byte",y.indicator));return}X.position++}I.prepend([new xe(S.goal.replace(new q("=",[new Re($,!1),J])),S.substitution,S)])}},"peek_byte/1":function(I,S,y){var R=y.args[0];I.prepend([new xe(S.goal.replace(new q(",",[new q("current_input",[new Pe("S")]),new q("peek_byte",[new Pe("S"),R])])),S.substitution,S)])},"peek_byte/2":function(I,S,y){var R=y.args[0],J=y.args[1],X=x.type.is_stream(R)?R:I.get_stream_by_alias(R.id);if(x.type.is_variable(R))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(J)&&!x.type.is_byte(J))I.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(R)&&!x.type.is_atom(R))I.throw_error(x.error.domain("stream_or_alias",R,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)I.throw_error(x.error.existence("stream",R,y.indicator));else if(X.output)I.throw_error(x.error.permission("input","stream",R,y.indicator));else if(X.type==="text")I.throw_error(x.error.permission("input","text_stream",R,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",R,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else if($=X.stream.get_byte(X.position),$===null){I.throw_error(x.error.representation("byte",y.indicator));return}I.prepend([new xe(S.goal.replace(new q("=",[new Re($,!1),J])),S.substitution,S)])}},"put_byte/1":function(I,S,y){var R=y.args[0];I.prepend([new xe(S.goal.replace(new q(",",[new q("current_output",[new Pe("S")]),new q("put_byte",[new Pe("S"),R])])),S.substitution,S)])},"put_byte/2":function(I,S,y){var R=y.args[0],J=y.args[1],X=x.type.is_stream(R)?R:I.get_stream_by_alias(R.id);x.type.is_variable(R)||x.type.is_variable(J)?I.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(J)?!x.type.is_variable(R)&&!x.type.is_stream(R)&&!x.type.is_atom(R)?I.throw_error(x.error.domain("stream_or_alias",R,y.indicator)):!x.type.is_stream(X)||X.stream===null?I.throw_error(x.error.existence("stream",R,y.indicator)):X.input?I.throw_error(x.error.permission("output","stream",R,y.indicator)):X.type==="text"?I.throw_error(x.error.permission("output","text_stream",R,y.indicator)):X.stream.put_byte(J.value,X.position)&&(typeof X.position=="number"&&X.position++,I.success(S)):I.throw_error(x.error.type("byte",J,y.indicator))},"read/1":function(I,S,y){var R=y.args[0];I.prepend([new xe(S.goal.replace(new q(",",[new q("current_input",[new Pe("S")]),new q("read_term",[new Pe("S"),R,new q("[]",[])])])),S.substitution,S)])},"read/2":function(I,S,y){var R=y.args[0],J=y.args[1];I.prepend([new xe(S.goal.replace(new q("read_term",[R,J,new q("[]",[])])),S.substitution,S)])},"read_term/2":function(I,S,y){var R=y.args[0],J=y.args[1];I.prepend([new xe(S.goal.replace(new q(",",[new q("current_input",[new Pe("S")]),new q("read_term",[new Pe("S"),R,J])])),S.substitution,S)])},"read_term/3":function(I,S,y){var R=y.args[0],J=y.args[1],X=y.args[2],$=x.type.is_stream(R)?R:I.get_stream_by_alias(R.id);if(x.type.is_variable(R)||x.type.is_variable(X))I.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(X))I.throw_error(x.error.type("list",X,y.indicator));else if(!x.type.is_stream(R)&&!x.type.is_atom(R))I.throw_error(x.error.domain("stream_or_alias",R,y.indicator));else if(!x.type.is_stream($)||$.stream===null)I.throw_error(x.error.existence("stream",R,y.indicator));else if($.output)I.throw_error(x.error.permission("input","stream",R,y.indicator));else if($.type==="binary")I.throw_error(x.error.permission("input","binary_stream",R,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")I.throw_error(x.error.permission("input","past_end_of_stream",R,y.indicator));else{for(var se={},be=X,Fe;
Line truncated
|
||||||
`;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;e+=`workspace(${Oh(o)}).
|
`;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;e+=`workspace(${Mh(o)}).
|
||||||
`,e+=`workspace_ident(${Oh(o)}, ${Oh(G.stringifyIdent(r.anchoredLocator))}).
|
`,e+=`workspace_ident(${Mh(o)}, ${Mh(G.stringifyIdent(r.anchoredLocator))}).
|
||||||
`,e+=`workspace_version(${Oh(o)}, ${Oh(r.manifest.version)}).
|
`,e+=`workspace_version(${Mh(o)}, ${Mh(r.manifest.version)}).
|
||||||
`;for(let a of Zme)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${Oh(o)}, ${Oh(G.stringifyIdent(n))}, ${Oh(n.range)}, ${a}).
|
`;for(let a of tye)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${Mh(o)}, ${Mh(G.stringifyIdent(n))}, ${Mh(n.range)}, ${a}).
|
||||||
`}return e+=`workspace(_) :- false.
|
`}return e+=`workspace(_) :- false.
|
||||||
`,e+=`workspace_ident(_, _) :- false.
|
`,e+=`workspace_ident(_, _) :- false.
|
||||||
`,e+=`workspace_version(_, _) :- false.
|
`,e+=`workspace_version(_, _) :- false.
|
||||||
@@ -282,50 +282,50 @@ And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:
|
|||||||
`,e+=`gen_enforced_field(_, _, _) :- false.
|
`,e+=`gen_enforced_field(_, _, _) :- false.
|
||||||
`,e}get fullSource(){return`${this.getProjectDatabase()}
|
`,e}get fullSource(){return`${this.getProjectDatabase()}
|
||||||
${this.source}
|
${this.source}
|
||||||
${this.getDeclarations()}`}createSession(){return new s6(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of e){let p=q2([A,G.stringifyIdent(n)]),h=qe.getMapWithDefault(o,a.cwd);qe.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=q2(n),p=qe.getMapWithDefault(o,a.cwd);qe.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=V.resolve(this.project.cwd,Zg(o.links.WorkspaceCwd)),n=Zg(o.links.DependencyIdent),u=Zg(o.links.DependencyRange),A=Zg(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=G.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return qe.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>G.stringifyIdent(o.anchoredLocator),({dependencyIdent:o})=>G.stringifyIdent(o)])}async genEnforcedFields(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=V.resolve(this.project.cwd,Zg(o.links.WorkspaceCwd)),n=Zg(o.links.FieldPath),u=Ygt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return qe.sortMap(r,[({workspace:o})=>G.stringifyIdent(o.anchoredLocator),({fieldPath:o})=>o])}async*query(e){let r=this.createSession();for await(let o of r.makeQuery(e)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=Zg(u));yield a}}}});var uye=_(tQ=>{"use strict";Object.defineProperty(tQ,"__esModule",{value:!0});function lB(t){let e=[...t.caches],r=e.shift();return r===void 0?cye():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>lB({caches:e}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>lB({caches:e}).set(o,a))},delete(o){return r.delete(o).catch(()=>lB({caches:e}).delete(o))},clear(){return r.clear().catch(()=>lB({caches:e}).clear())}}}function cye(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}tQ.createFallbackableCache=lB;tQ.createNullCache=cye});var fye=_((pYt,Aye)=>{Aye.exports=uye()});var pye=_(C6=>{"use strict";Object.defineProperty(C6,"__esModule",{value:!0});function Adt(t={serializable:!0}){let e={};return{get(r,o,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}C6.createInMemoryCache=Adt});var gye=_((gYt,hye)=>{hye.exports=pye()});var mye=_(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});function fdt(t,e,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===I6.WithinHeaders?o:{}},queryParameters(){return t===I6.WithinQueryParameters?o:{}}}}function pdt(t){let e=0,r=()=>(e++,new Promise(o=>{setTimeout(()=>{o(t(r))},Math.min(100*e,1e3))}));return t(r)}function dye(t,e=(r,o)=>Promise.resolve()){return Object.assign(t,{wait(r){return dye(t.then(o=>Promise.all([e(o,r),o])).then(o=>o[1]))}})}function hdt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),o=t[e];t[e]=t[r],t[r]=o}return t}function gdt(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function ddt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var mdt="4.22.1",ydt=t=>()=>t.transporter.requester.destroy(),I6={WithinQueryParameters:0,WithinHeaders:1};su.AuthMode=I6;su.addMethods=gdt;su.createAuth=fdt;su.createRetryablePromise=pdt;su.createWaitablePromise=dye;su.destroy=ydt;su.encode=ddt;su.shuffle=hdt;su.version=mdt});var cB=_((mYt,yye)=>{yye.exports=mye()});var Eye=_(w6=>{"use strict";Object.defineProperty(w6,"__esModule",{value:!0});var Edt={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};w6.MethodEnum=Edt});var uB=_((EYt,Cye)=>{Cye.exports=Eye()});var Lye=_(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});var wye=uB();function B6(t,e){let r=t||{},o=r.data||{};return Object.keys(r).forEach(a=>{["timeout","head
Line truncated
|
${this.getDeclarations()}`}createSession(){return new a6(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of e){let p=q2([A,G.stringifyIdent(n)]),h=qe.getMapWithDefault(o,a.cwd);qe.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=q2(n),p=qe.getMapWithDefault(o,a.cwd);qe.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=K.resolve(this.project.cwd,ed(o.links.WorkspaceCwd)),n=ed(o.links.DependencyIdent),u=ed(o.links.DependencyRange),A=ed(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=G.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return qe.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>G.stringifyIdent(o.anchoredLocator),({dependencyIdent:o})=>G.stringifyIdent(o)])}async genEnforcedFields(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=K.resolve(this.project.cwd,ed(o.links.WorkspaceCwd)),n=ed(o.links.FieldPath),u=Vgt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return qe.sortMap(r,[({workspace:o})=>G.stringifyIdent(o.anchoredLocator),({fieldPath:o})=>o])}async*query(e){let r=this.createSession();for await(let o of r.makeQuery(e)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=ed(u));yield a}}}});var pye=_(rk=>{"use strict";Object.defineProperty(rk,"__esModule",{value:!0});function lB(t){let e=[...t.caches],r=e.shift();return r===void 0?fye():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>lB({caches:e}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>lB({caches:e}).set(o,a))},delete(o){return r.delete(o).catch(()=>lB({caches:e}).delete(o))},clear(){return r.clear().catch(()=>lB({caches:e}).clear())}}}function fye(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}rk.createFallbackableCache=lB;rk.createNullCache=fye});var gye=_((BYt,hye)=>{hye.exports=pye()});var dye=_(w6=>{"use strict";Object.defineProperty(w6,"__esModule",{value:!0});function pdt(t={serializable:!0}){let e={};return{get(r,o,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}w6.createInMemoryCache=pdt});var yye=_((DYt,mye)=>{mye.exports=dye()});var Cye=_(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});function hdt(t,e,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===B6.WithinHeaders?o:{}},queryParameters(){return t===B6.WithinQueryParameters?o:{}}}}function gdt(t){let e=0,r=()=>(e++,new Promise(o=>{setTimeout(()=>{o(t(r))},Math.min(100*e,1e3))}));return t(r)}function Eye(t,e=(r,o)=>Promise.resolve()){return Object.assign(t,{wait(r){return Eye(t.then(o=>Promise.all([e(o,r),o])).then(o=>o[1]))}})}function ddt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),o=t[e];t[e]=t[r],t[r]=o}return t}function mdt(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function ydt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var Edt="4.22.1",Cdt=t=>()=>t.transporter.requester.destroy(),B6={WithinQueryParameters:0,WithinHeaders:1};su.AuthMode=B6;su.addMethods=mdt;su.createAuth=hdt;su.createRetryablePromise=gdt;su.createWaitablePromise=Eye;su.destroy=Cdt;su.encode=ydt;su.shuffle=ddt;su.version=Edt});var cB=_((SYt,Iye)=>{Iye.exports=Cye()});var wye=_(v6=>{"use strict";Object.defineProperty(v6,"__esModule",{value:!0});var Idt={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};v6.MethodEnum=Idt});var uB=_((bYt,Bye)=>{Bye.exports=wye()});var Mye=_(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});var Dye=uB();function D6(t,e){let r=t||{},o=r.data||{};return Object.keys(r).forEach(a=>{["timeout","head
Line truncated
|
||||||
`;A!==o&&(o=A,t.write(ZEe.default.eraseLines(r)+A),r=A.split(`
|
`;A!==o&&(o=A,t.write(tCe.default.eraseLines(r)+A),r=A.split(`
|
||||||
`).length)};return n.clear=()=>{t.write(ZEe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,e||($Ee.default.show(),a=!1)},n};CB.default={create:Iyt}});var rCe=_((YYt,wyt)=>{wyt.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var sCe=_(Cl=>{"use strict";var iCe=rCe(),gA=process.env;Object.defineProperty(Cl,"_vendors",{value:iCe.map(function(t){return t.constant})});Cl.name=null;Cl.isPR=null;iCe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(o){return nCe(o)});if(Cl[t.constant]=r,r)switch(Cl.name=t.name,typeof t.pr){case"string":Cl.isPR=!!gA[t.pr];break;case"object":"env"in t.pr?Cl.isPR=t.pr.env in gA&&gA[t.pr.env]!==t.pr.ne:"any"in t.pr?Cl.isPR=t.pr.any.some(function(o){return!!gA[o]}):Cl.isPR=nCe(t.pr);break;default:Cl.isPR=null}});Cl.isCI=!!(gA.CI||gA.CONTINUOUS_INTEGRATION||gA.BUILD_NUMBER||gA.RUN_ID||Cl.name);function nCe(t){return typeof t=="string"?!!gA[t]:Object.keys(t).every(function(e){return gA[e]===t[e]})}});var aCe=_((KYt,oCe)=>{"use strict";oCe.exports=sCe().isCI});var cCe=_((JYt,lCe)=>{"use strict";var Byt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};lCe.exports=(t,{include:e,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of Byt(t.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(t[n]=t[n].bind(t))}return t}});var gCe=_(Hn=>{"use strict";var vC,BB,CQ,sq;typeof performance=="object"&&typeof performance.now=="function"?(uCe=performance,Hn.unstable_now=function(){return uCe.now()}):($6=Date,ACe=$6.now(),Hn.unstable_now=function(){return $6.now()-ACe});var uCe,$6,ACe;typeof window>"u"||typeof MessageChannel!="function"?(BC=null,eq=null,tq=function(){if(BC!==null)try{var t=Hn.unstable_now();BC(!0,t),BC=null}catch(e){throw setTimeout(tq,0),e}},vC=function(t){BC!==null?setTimeout(vC,0,t):(BC=t,setTimeout(tq,0))},BB=function(t,e){eq=setTimeout(t,e)},CQ=function(){clearTimeout(eq)},Hn.unstable_shouldYield=function(){return!1},sq=Hn.unstable_forceFrameRate=function(){}):(fCe=window.setTimeout,pCe=window.clearTimeout,typeof console<"u"&&(hCe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof hCe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),IB=!1,wB=null,mQ=-1,rq=5,nq=0,Hn.unstable_shouldYield=function(){return Hn.unstable_now()>=nq},sq=function(){},Hn.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):rq=0<t?Math
Line truncated
|
`).length)};return n.clear=()=>{t.write(tCe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,e||(rCe.default.show(),a=!1)},n};CB.default={create:Byt}});var sCe=_((rKt,vyt)=>{vyt.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var lCe=_(Cl=>{"use strict";var aCe=sCe(),gA=process.env;Object.defineProperty(Cl,"_vendors",{value:aCe.map(function(t){return t.constant})});Cl.name=null;Cl.isPR=null;aCe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(o){return oCe(o)});if(Cl[t.constant]=r,r)switch(Cl.name=t.name,typeof t.pr){case"string":Cl.isPR=!!gA[t.pr];break;case"object":"env"in t.pr?Cl.isPR=t.pr.env in gA&&gA[t.pr.env]!==t.pr.ne:"any"in t.pr?Cl.isPR=t.pr.any.some(function(o){return!!gA[o]}):Cl.isPR=oCe(t.pr);break;default:Cl.isPR=null}});Cl.isCI=!!(gA.CI||gA.CONTINUOUS_INTEGRATION||gA.BUILD_NUMBER||gA.RUN_ID||Cl.name);function oCe(t){return typeof t=="string"?!!gA[t]:Object.keys(t).every(function(e){return gA[e]===t[e]})}});var uCe=_((iKt,cCe)=>{"use strict";cCe.exports=lCe().isCI});var fCe=_((sKt,ACe)=>{"use strict";var Dyt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};ACe.exports=(t,{include:e,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of Dyt(t.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(t[n]=t[n].bind(t))}return t}});var yCe=_(Hn=>{"use strict";var PC,BB,Ik,aq;typeof performance=="object"&&typeof performance.now=="function"?(pCe=performance,Hn.unstable_now=function(){return pCe.now()}):(tq=Date,hCe=tq.now(),Hn.unstable_now=function(){return tq.now()-hCe});var pCe,tq,hCe;typeof window>"u"||typeof MessageChannel!="function"?(DC=null,rq=null,nq=function(){if(DC!==null)try{var t=Hn.unstable_now();DC(!0,t),DC=null}catch(e){throw setTimeout(nq,0),e}},PC=function(t){DC!==null?setTimeout(PC,0,t):(DC=t,setTimeout(nq,0))},BB=function(t,e){rq=setTimeout(t,e)},Ik=function(){clearTimeout(rq)},Hn.unstable_shouldYield=function(){return!1},aq=Hn.unstable_forceFrameRate=function(){}):(gCe=window.setTimeout,dCe=window.clearTimeout,typeof console<"u"&&(mCe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof mCe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),IB=!1,wB=null,yk=-1,iq=5,sq=0,Hn.unstable_shouldYield=function(){return Hn.unstable_now()>=sq},aq=function(){},Hn.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):iq=0<t?Math
Line truncated
|
||||||
`+yc+v}var we=!1;function Tt(v,S){if(!v||we)return"";we=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(S)if(S=function(){throw Error()},Object.defineProperty(S.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(S,[])}catch(ft){var H=ft}Reflect.construct(v,[],S)}else{try{S.call()}catch(ft){H=ft}v.call(S.prototype)}else{try{throw Error()}catch(ft){H=ft}v()}}catch(ft){if(ft&&H&&typeof ft.stack=="string"){for(var Y=ft.stack.split(`
|
`+yc+v}var we=!1;function Tt(v,P){if(!v||we)return"";we=!0;var k=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(P)if(P=function(){throw Error()},Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(ft){var H=ft}Reflect.construct(v,[],P)}else{try{P.call()}catch(ft){H=ft}v.call(P.prototype)}else{try{throw Error()}catch(ft){H=ft}v()}}catch(ft){if(ft&&H&&typeof ft.stack=="string"){for(var Y=ft.stack.split(`
|
||||||
`),ne=H.stack.split(`
|
`),ne=H.stack.split(`
|
||||||
`),Be=Y.length-1,Ue=ne.length-1;1<=Be&&0<=Ue&&Y[Be]!==ne[Ue];)Ue--;for(;1<=Be&&0<=Ue;Be--,Ue--)if(Y[Be]!==ne[Ue]){if(Be!==1||Ue!==1)do if(Be--,Ue--,0>Ue||Y[Be]!==ne[Ue])return`
|
`),Be=Y.length-1,_e=ne.length-1;1<=Be&&0<=_e&&Y[Be]!==ne[_e];)_e--;for(;1<=Be&&0<=_e;Be--,_e--)if(Y[Be]!==ne[_e]){if(Be!==1||_e!==1)do if(Be--,_e--,0>_e||Y[Be]!==ne[_e])return`
|
||||||
`+Y[Be].replace(" at new "," at ");while(1<=Be&&0<=Ue);break}}}finally{we=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:"")?Il(v):""}var wl=[],Bi=-1;function Ls(v){return{current:v}}function Ft(v){0>Bi||(v.current=wl[Bi],wl[Bi]=null,Bi--)}function Bn(v,S){Bi++,wl[Bi]=v.current,v.current=S}var Lo={},ki=Ls(Lo),vi=Ls(!1),sa=Lo;function un(v,S){var Q=v.type.contextTypes;if(!Q)return Lo;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===S)return H.__reactInternalMemoizedMaskedChildContext;var Y={},ne;for(ne in Q)Y[ne]=S[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=S,v.__reactInternalMemoizedMaskedChildContext=Y),Y}function qn(v){return v=v.childContextTypes,v!=null}function Ec(){Ft(vi),Ft(ki)}function lp(v,S,Q){if(ki.current!==Lo)throw Error(u(168));Bn(ki,S),Bn(vi,Q)}function oa(v,S,Q){var H=v.stateNode;if(v=S.childContextTypes,typeof H.getChildContext!="function")return Q;H=H.getChildContext();for(var Y in H)if(!(Y in v))throw Error(u(108,g(S)||"Unknown",Y));return o({},Q,H)}function aa(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||Lo,sa=ki.current,Bn(ki,v),Bn(vi,vi.current),!0}function la(v,S,Q){var H=v.stateNode;if(!H)throw Error(u(169));Q?(v=oa(v,S,sa),H.__reactInternalMemoizedMergedChildContext=v,Ft(vi),Ft(ki),Bn(ki,v)):Ft(vi),Bn(vi,Q)}var Ze=null,ca=null,mu=n.unstable_now;mu();var Bl=0,dn=8;function No(v){if(1&v)return dn=15,1;if(2&v)return dn=14,2;if(4&v)return dn=13,4;var S=24&v;return S!==0?(dn=12,S):v&32?(dn=11,32):(S=192&v,S!==0?(dn=10,S):v&256?(dn=9,256):(S=3584&v,S!==0?(dn=8,S):v&4096?(dn=7,4096):(S=4186112&v,S!==0?(dn=6,S):(S=62914560&v,S!==0?(dn=5,S):v&67108864?(dn=4,67108864):v&134217728?(dn=3,134217728):(S=805306368&v,S!==0?(dn=2,S):1073741824&v?(dn=1,1073741824):(dn=8,v))))))}function RA(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function TA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(u(358,v))}}function Oo(v,S){var Q=v.pendingLanes;if(Q===0)return dn=0;var H=0,Y=0,ne=v.expiredLanes,Be=v.suspendedLanes,Ue=v.pingedLanes;if(ne!==0)H=ne,Y=dn=15;else if(ne=Q&134217727,ne!==0){var ft=ne&~Be;ft!==0?(H=No(ft),Y=dn):(Ue&=ne,Ue!==0&&(H=No(Ue),Y=dn))}else ne=Q&~Be,ne!==0?(H=No(ne),Y=dn):Ue!==0&&(H=No(Ue),Y=dn);if(H===0)return 0;if(H=31-qi(H),H=Q&((0>H?0:1<<H)<<1)-1,S!==0&&S!==H&&!(S&Be)){if(No(S),Y<=dn)return S;dn=Y}if(S=v.entangledLanes,S!==0)for(v=v.entanglements,S&=H;0<S;)Q=31-qi(S),Y=1<<Q,H|=v[Q],S&=~Y;return H}function qa(v){return v=v.pendingLanes&-1073741825,v!==0?v:v&1073741824?1073741824:0}function Ot(v,S){switch(v){case 15:return 1;case 14:return 2;case 12:return v=vn(24&~S),v===0?Ot(10,S):v;case 10:return v=vn(192&~S),v===0?Ot(8,S):v;case 8:return v=vn(3584&~S),v===0&&(v=vn(4186112&~S),v===0&&(v=512)),v;case 2:return S=vn(805306368&~S),S===0&&(S=268435456),S}throw Error(u(358,v))}function vn(v){return v&-v}function Mo(v){for(var S=[],Q=0;31>Q;Q++)S.push(v);return S}function ua(v,S,Q){v.pendingLanes|=S;var H=S-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,S=31-qi(S),v[S]=Q}var qi=Math.clz32?Math.clz32:Dl,vl=Math.log,Cc=Math.LN2;function Dl(v){return v===0?32:31-(vl(v)/Cc|0)|0}var Aa=n.unstable_runWithPriority,Di=n.unstable_scheduleCallback,rs=n.unstable_cancelCallback,ja=n.unstable_shouldYield,yu=n.unstable_requestPaint,Sl=n.unstable_now,pi=n.unstable_getCurrentPriorityLevel,Dn=n.unstable_ImmediatePriority,Pl=n.unstable_UserBlockingPriority,Je=n.unstable_NormalPriority,st=n.unstable_LowPriority,vt=n.unstable_IdlePriority,ar={},ee=yu!==void 0?yu:function(){},ye=null,Ne=null,gt=!1,mt=Sl(),Dt=1e4>mt?Sl:function(){return Sl()-mt};function er(){switch(pi()){case Dn:return 99;case Pl:return 98;case Je:return 97;case st:return 96;case vt:return 95;default:throw Error(u(332))}}function sn(v){switch(v){case 99:return Dn;case 98:return Pl;case 97:return Je;case 96:return st;case 95:return vt;default:throw Error(u(332))}}function ei(v,S){return v=sn(v),Aa(v,S)}function Qi(v,S,Q){return v=sn(v),Di(v,S,Q)}function Sn(){if(Ne!==null){var v=Ne;Ne=null,rs(v)}fa()}function fa(){if(!gt&&ye!==null){gt=!0;var v=0;try{var S=ye;ei(99,function(){for(;v<S.length;v++){var Q=S[v];do Q=Q(!0);while(Q!==null)}}),ye=null}catch(Q){throw ye!==null&&(ye=ye.slice(v+1)),Di(Dn,Sn),Q}finally{gt=!1}}}var wd=A.ReactCurrentBatchConfig;function BI(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var eo=typeof Object.is=="function"?Object.is:BI,Bd=Object.prototype.hasOwnProperty;function cp(v,S){if(eo(v,S))return!0;if(typeof v!="object"||v===null||typeof S!="object"||S===null)return!1;var Q=Object.keys(v),H=Object.keys(S);if(Q.length!==H.length)return!1;for(H=0;H<Q.length;H++)if(!Bd.call(S,Q[H])||!eo(v[Q[H]],S[Q[H]]))return!1;return!0}function vI(v){switch(v.tag){case 5:return Il(v.type);case 16:return Il("Lazy"
Line truncated
|
`+Y[Be].replace(" at new "," at ");while(1<=Be&&0<=_e);break}}}finally{we=!1,Error.prepareStackTrace=k}return(v=v?v.displayName||v.name:"")?Il(v):""}var wl=[],Bi=-1;function Ns(v){return{current:v}}function Ft(v){0>Bi||(v.current=wl[Bi],wl[Bi]=null,Bi--)}function Bn(v,P){Bi++,wl[Bi]=v.current,v.current=P}var No={},Qi=Ns(No),vi=Ns(!1),sa=No;function un(v,P){var k=v.type.contextTypes;if(!k)return No;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===P)return H.__reactInternalMemoizedMaskedChildContext;var Y={},ne;for(ne in k)Y[ne]=P[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=P,v.__reactInternalMemoizedMaskedChildContext=Y),Y}function qn(v){return v=v.childContextTypes,v!=null}function Ec(){Ft(vi),Ft(Qi)}function cp(v,P,k){if(Qi.current!==No)throw Error(u(168));Bn(Qi,P),Bn(vi,k)}function oa(v,P,k){var H=v.stateNode;if(v=P.childContextTypes,typeof H.getChildContext!="function")return k;H=H.getChildContext();for(var Y in H)if(!(Y in v))throw Error(u(108,g(P)||"Unknown",Y));return o({},k,H)}function aa(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||No,sa=Qi.current,Bn(Qi,v),Bn(vi,vi.current),!0}function la(v,P,k){var H=v.stateNode;if(!H)throw Error(u(169));k?(v=oa(v,P,sa),H.__reactInternalMemoizedMergedChildContext=v,Ft(vi),Ft(Qi),Bn(Qi,v)):Ft(vi),Bn(vi,k)}var Ze=null,ca=null,mu=n.unstable_now;mu();var Bl=0,dn=8;function Lo(v){if(1&v)return dn=15,1;if(2&v)return dn=14,2;if(4&v)return dn=13,4;var P=24&v;return P!==0?(dn=12,P):v&32?(dn=11,32):(P=192&v,P!==0?(dn=10,P):v&256?(dn=9,256):(P=3584&v,P!==0?(dn=8,P):v&4096?(dn=7,4096):(P=4186112&v,P!==0?(dn=6,P):(P=62914560&v,P!==0?(dn=5,P):v&67108864?(dn=4,67108864):v&134217728?(dn=3,134217728):(P=805306368&v,P!==0?(dn=2,P):1073741824&v?(dn=1,1073741824):(dn=8,v))))))}function RA(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function TA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(u(358,v))}}function Oo(v,P){var k=v.pendingLanes;if(k===0)return dn=0;var H=0,Y=0,ne=v.expiredLanes,Be=v.suspendedLanes,_e=v.pingedLanes;if(ne!==0)H=ne,Y=dn=15;else if(ne=k&134217727,ne!==0){var ft=ne&~Be;ft!==0?(H=Lo(ft),Y=dn):(_e&=ne,_e!==0&&(H=Lo(_e),Y=dn))}else ne=k&~Be,ne!==0?(H=Lo(ne),Y=dn):_e!==0&&(H=Lo(_e),Y=dn);if(H===0)return 0;if(H=31-qi(H),H=k&((0>H?0:1<<H)<<1)-1,P!==0&&P!==H&&!(P&Be)){if(Lo(P),Y<=dn)return P;dn=Y}if(P=v.entangledLanes,P!==0)for(v=v.entanglements,P&=H;0<P;)k=31-qi(P),Y=1<<k,H|=v[k],P&=~Y;return H}function qa(v){return v=v.pendingLanes&-1073741825,v!==0?v:v&1073741824?1073741824:0}function Ot(v,P){switch(v){case 15:return 1;case 14:return 2;case 12:return v=vn(24&~P),v===0?Ot(10,P):v;case 10:return v=vn(192&~P),v===0?Ot(8,P):v;case 8:return v=vn(3584&~P),v===0&&(v=vn(4186112&~P),v===0&&(v=512)),v;case 2:return P=vn(805306368&~P),P===0&&(P=268435456),P}throw Error(u(358,v))}function vn(v){return v&-v}function Mo(v){for(var P=[],k=0;31>k;k++)P.push(v);return P}function ua(v,P,k){v.pendingLanes|=P;var H=P-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,P=31-qi(P),v[P]=k}var qi=Math.clz32?Math.clz32:Dl,vl=Math.log,Cc=Math.LN2;function Dl(v){return v===0?32:31-(vl(v)/Cc|0)|0}var Aa=n.unstable_runWithPriority,Di=n.unstable_scheduleCallback,rs=n.unstable_cancelCallback,ja=n.unstable_shouldYield,yu=n.unstable_requestPaint,Pl=n.unstable_now,pi=n.unstable_getCurrentPriorityLevel,Dn=n.unstable_ImmediatePriority,Sl=n.unstable_UserBlockingPriority,ze=n.unstable_NormalPriority,st=n.unstable_LowPriority,vt=n.unstable_IdlePriority,ar={},ee=yu!==void 0?yu:function(){},Ee=null,Le=null,ht=!1,mt=Pl(),Dt=1e4>mt?Pl:function(){return Pl()-mt};function er(){switch(pi()){case Dn:return 99;case Sl:return 98;case ze:return 97;case st:return 96;case vt:return 95;default:throw Error(u(332))}}function sn(v){switch(v){case 99:return Dn;case 98:return Sl;case 97:return ze;case 96:return st;case 95:return vt;default:throw Error(u(332))}}function ei(v,P){return v=sn(v),Aa(v,P)}function ki(v,P,k){return v=sn(v),Di(v,P,k)}function Pn(){if(Le!==null){var v=Le;Le=null,rs(v)}fa()}function fa(){if(!ht&&Ee!==null){ht=!0;var v=0;try{var P=Ee;ei(99,function(){for(;v<P.length;v++){var k=P[v];do k=k(!0);while(k!==null)}}),Ee=null}catch(k){throw Ee!==null&&(Ee=Ee.slice(v+1)),Di(Dn,Pn),k}finally{ht=!1}}}var vd=A.ReactCurrentBatchConfig;function DI(v,P){return v===P&&(v!==0||1/v===1/P)||v!==v&&P!==P}var eo=typeof Object.is=="function"?Object.is:DI,Dd=Object.prototype.hasOwnProperty;function up(v,P){if(eo(v,P))return!0;if(typeof v!="object"||v===null||typeof P!="object"||P===null)return!1;var k=Object.keys(v),H=Object.keys(P);if(k.length!==H.length)return!1;for(H=0;H<k.length;H++)if(!Dd.call(P,k[H])||!eo(v[k[H]],P[k[H]]))return!1;return!0}function PI(v){switch(v.tag){case 5:return Il(v.type);case 16:return Il("Lazy"
Line truncated
|
||||||
Error generating stack: `+ne.message+`
|
Error generating stack: `+ne.message+`
|
||||||
`+ne.stack}return{value:v,source:S,stack:Y}}function y0(v,S){try{console.error(S.value)}catch(Q){setTimeout(function(){throw Q})}}var jF=typeof WeakMap=="function"?WeakMap:Map;function bI(v,S,Q){Q=Wa(-1,Q),Q.tag=3,Q.payload={element:null};var H=S.value;return Q.callback=function(){Wd||(Wd=!0,jI=H),y0(v,S)},Q}function E0(v,S,Q){Q=Wa(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H=="function"){var Y=S.value;Q.payload=function(){return y0(v,S),H(Y)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(Q.callback=function(){typeof H!="function"&&(bl===null?bl=new Set([this]):bl.add(this),y0(v,S));var Be=S.stack;this.componentDidCatch(S.value,{componentStack:Be!==null?Be:""})}),Q}var GF=typeof WeakSet=="function"?WeakSet:Set;function kI(v){var S=v.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(Q){Fu(v,Q)}else S.current=null}function Td(v,S){switch(S.tag){case 0:case 11:case 15:case 22:return;case 1:if(S.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=S.stateNode,S=v.getSnapshotBeforeUpdate(S.elementType===S.type?Q:to(S.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=S}return;case 3:R&&S.flags&256&&hs(S.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(u(163))}function wp(v,S){if(S=S.updateQueue,S=S!==null?S.lastEffect:null,S!==null){var Q=S=S.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==S)}}function uD(v,S,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(S=Q.updateQueue,S=S!==null?S.lastEffect:null,S!==null){v=S=S.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==S)}if(S=Q.updateQueue,S=S!==null?S.lastEffect:null,S!==null){v=S=S.next;do{var Y=v;H=Y.next,Y=Y.tag,Y&4&&Y&1&&(vD(Q,v),$F(Q,v)),v=H}while(v!==S)}return;case 1:v=Q.stateNode,Q.flags&4&&(S===null?v.componentDidMount():(H=Q.elementType===Q.type?S.memoizedProps:to(Q.type,S.memoizedProps),v.componentDidUpdate(H,S.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),S=Q.updateQueue,S!==null&&Sd(Q,S,v);return;case 3:if(S=Q.updateQueue,S!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Re(Q.child.stateNode);break;case 1:v=Q.child.stateNode}Sd(Q,S,v)}return;case 5:v=Q.stateNode,S===null&&Q.flags&4&&Qs(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:X&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&mc(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(u(163))}function AD(v,S){if(R)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;S?op(H):Rs(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,S?ap(H):Nn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function Ld(v,S){if(ca&&typeof ca.onCommitFiberUnmount=="function")try{ca.onCommitFiberUnmount(Ze,S)}catch{}switch(S.tag){case 0:case 11:case 14:case 15:case 22:if(v=S.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,Y=H.destroy;if(H=H.tag,Y!==void 0)if(H&4)vD(S,Q);else{H=S;try{Y()}catch(ne){Fu(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(kI(S),v=S.stateNode,typeof v.componentWillUnmount=="function")try{v.props=S.memoizedProps,v.state=S.memoizedState,v.componentWillUnmount()}catch(ne){Fu(S,ne)}break;case 5:kI(S);break;case 4:R?gD(v,S):z&&z&&(S=S.stateNode.containerInfo,v=pc(S),xA(S,v))}}function fD(v,S){for(var Q=S;;)if(Ld(v,Q),Q.child===null||R&&Q.tag===4){if(Q===S)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===S)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function Nd(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function pD(v){return v.tag===5||v.tag===3||v.tag===4}function hD(v){if(R){e:{for(var S=v.return;S!==null;){if(pD(S))break e;S=S.return}throw Error(u(160))}var Q=S;switch(S=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:S=S.containerInfo,H=!0;break;case 4:S=S.containerInfo,H=!0;break;default:throw Error(u(161))}Q.flags&16&&(gu(S),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||pD(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?QI(v,Q,S):FI(v,Q,S)}}function QI(v,S,Q){var H=v.tag,Y=H===5||H===6;if(Y)v=Y?v.stateNode:v.stateNode.instance,S?Fs(Q,v,S):Xs(Q,v);else if(H!==4&&(v=v.child,v!==null))for(QI(v,S,Q),v=v.sibling;v!==null;)QI(v,S,Q),v=v.sibling}function FI(v,S,Q){var H=v.tag,Y=H===5||H===6;if(Y)v=Y?v.stateNode:v.stateNode.instance,S?bi(Q,v,S):$n(Q,v);els
Line truncated
|
`+ne.stack}return{value:v,source:P,stack:Y}}function C0(v,P){try{console.error(P.value)}catch(k){setTimeout(function(){throw k})}}var GF=typeof WeakMap=="function"?WeakMap:Map;function kI(v,P,k){k=Wa(-1,k),k.tag=3,k.payload={element:null};var H=P.value;return k.callback=function(){Kd||(Kd=!0,WI=H),C0(v,P)},k}function I0(v,P,k){k=Wa(-1,k),k.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H=="function"){var Y=P.value;k.payload=function(){return C0(v,P),H(Y)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(k.callback=function(){typeof H!="function"&&(bl===null?bl=new Set([this]):bl.add(this),C0(v,P));var Be=P.stack;this.componentDidCatch(P.value,{componentStack:Be!==null?Be:""})}),k}var WF=typeof WeakSet=="function"?WeakSet:Set;function FI(v){var P=v.ref;if(P!==null)if(typeof P=="function")try{P(null)}catch(k){Fu(v,k)}else P.current=null}function Ld(v,P){switch(P.tag){case 0:case 11:case 15:case 22:return;case 1:if(P.flags&256&&v!==null){var k=v.memoizedProps,H=v.memoizedState;v=P.stateNode,P=v.getSnapshotBeforeUpdate(P.elementType===P.type?k:to(P.type,k),H),v.__reactInternalSnapshotBeforeUpdate=P}return;case 3:R&&P.flags&256&&hs(P.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(u(163))}function Bp(v,P){if(P=P.updateQueue,P=P!==null?P.lastEffect:null,P!==null){var k=P=P.next;do{if((k.tag&v)===v){var H=k.destroy;k.destroy=void 0,H!==void 0&&H()}k=k.next}while(k!==P)}}function uD(v,P,k){switch(k.tag){case 0:case 11:case 15:case 22:if(P=k.updateQueue,P=P!==null?P.lastEffect:null,P!==null){v=P=P.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==P)}if(P=k.updateQueue,P=P!==null?P.lastEffect:null,P!==null){v=P=P.next;do{var Y=v;H=Y.next,Y=Y.tag,Y&4&&Y&1&&(vD(k,v),eR(k,v)),v=H}while(v!==P)}return;case 1:v=k.stateNode,k.flags&4&&(P===null?v.componentDidMount():(H=k.elementType===k.type?P.memoizedProps:to(k.type,P.memoizedProps),v.componentDidUpdate(H,P.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),P=k.updateQueue,P!==null&&xd(k,P,v);return;case 3:if(P=k.updateQueue,P!==null){if(v=null,k.child!==null)switch(k.child.tag){case 5:v=Re(k.child.stateNode);break;case 1:v=k.child.stateNode}xd(k,P,v)}return;case 5:v=k.stateNode,P===null&&k.flags&4&&ks(v,k.type,k.memoizedProps,k);return;case 6:return;case 4:return;case 12:return;case 13:X&&k.memoizedState===null&&(k=k.alternate,k!==null&&(k=k.memoizedState,k!==null&&(k=k.dehydrated,k!==null&&mc(k))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(u(163))}function AD(v,P){if(R)for(var k=v;;){if(k.tag===5){var H=k.stateNode;P?ap(H):Rs(k.stateNode,k.memoizedProps)}else if(k.tag===6)H=k.stateNode,P?lp(H):Ln(H,k.memoizedProps);else if((k.tag!==23&&k.tag!==24||k.memoizedState===null||k===v)&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===v)break;for(;k.sibling===null;){if(k.return===null||k.return===v)return;k=k.return}k.sibling.return=k.return,k=k.sibling}}function Od(v,P){if(ca&&typeof ca.onCommitFiberUnmount=="function")try{ca.onCommitFiberUnmount(Ze,P)}catch{}switch(P.tag){case 0:case 11:case 14:case 15:case 22:if(v=P.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var k=v=v.next;do{var H=k,Y=H.destroy;if(H=H.tag,Y!==void 0)if(H&4)vD(P,k);else{H=P;try{Y()}catch(ne){Fu(H,ne)}}k=k.next}while(k!==v)}break;case 1:if(FI(P),v=P.stateNode,typeof v.componentWillUnmount=="function")try{v.props=P.memoizedProps,v.state=P.memoizedState,v.componentWillUnmount()}catch(ne){Fu(P,ne)}break;case 5:FI(P);break;case 4:R?gD(v,P):J&&J&&(P=P.stateNode.containerInfo,v=pc(P),xA(P,v))}}function fD(v,P){for(var k=P;;)if(Od(v,k),k.child===null||R&&k.tag===4){if(k===P)break;for(;k.sibling===null;){if(k.return===null||k.return===P)return;k=k.return}k.sibling.return=k.return,k=k.sibling}else k.child.return=k,k=k.child}function Md(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function pD(v){return v.tag===5||v.tag===3||v.tag===4}function hD(v){if(R){e:{for(var P=v.return;P!==null;){if(pD(P))break e;P=P.return}throw Error(u(160))}var k=P;switch(P=k.stateNode,k.tag){case 5:var H=!1;break;case 3:P=P.containerInfo,H=!0;break;case 4:P=P.containerInfo,H=!0;break;default:throw Error(u(161))}k.flags&16&&(gu(P),k.flags&=-17);e:t:for(k=v;;){for(;k.sibling===null;){if(k.return===null||pD(k.return)){k=null;break e}k=k.return}for(k.sibling.return=k.return,k=k.sibling;k.tag!==5&&k.tag!==6&&k.tag!==18;){if(k.flags&2||k.child===null||k.tag===4)continue t;k.child.return=k,k=k.child}if(!(k.flags&2)){k=k.stateNode;break e}}H?RI(v,k,P):TI(v,k,P)}}function RI(v,P,k){var H=v.tag,Y=H===5||H===6;if(Y)v=Y?v.stateNode:v.stateNode.instance,P?Fs(k,v,P):Xs(k,v);else if(H!==4&&(v=v.child,v!==null))for(RI(v,P,k),v=v.sibling;v!==null;)RI(v,P,k),v=v.sibling}function TI(v,P,k){var H=v.tag,Y=H===5||H===6;if(Y)v=Y?v.stateNode:v.stateNode.instance,P?bi(k,v,P):$n(k,v);els
Line truncated
|
||||||
|
|
||||||
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}is!==5&&(is=2),ft=m0(ft,Ue),Xt=Be;do{switch(Xt.tag){case 3:ne=ft,Xt.flags|=4096,S&=-S,Xt.lanes|=S;var Wn=bI(Xt,ne,S);Dd(Xt,Wn);break e;case 1:ne=ft;var xr=Xt.type,Pn=Xt.stateNode;if(!(Xt.flags&64)&&(typeof xr.getDerivedStateFromError=="function"||Pn!==null&&typeof Pn.componentDidCatch=="function"&&(bl===null||!bl.has(Pn)))){Xt.flags|=4096,S&=-S,Xt.lanes|=S;var Tn=E0(Xt,ne,S);Dd(Xt,Tn);break e}}Xt=Xt.return}while(Xt!==null)}BD(Q)}catch(Yr){S=Yr,Oi===Q&&Q!==null&&(Oi=Q=Q.return);continue}break}while(!0)}function ID(){var v=jd.current;return jd.current=bt,v===null?bt:v}function b0(v,S){var Q=Pr;Pr|=16;var H=ID();Os===v&&ms===S||Sp(v,S);do try{JF();break}catch(Y){CD(v,Y)}while(!0);if(s0(),Pr=Q,jd.current=H,Oi!==null)throw Error(u(261));return Os=null,ms=0,is}function JF(){for(;Oi!==null;)wD(Oi)}function zF(){for(;Oi!==null&&!ja();)wD(Oi)}function wD(v){var S=PD(v.alternate,v,KA);v.memoizedProps=v.pendingProps,S===null?BD(v):Oi=S,NI.current=null}function BD(v){var S=v;do{var Q=S.alternate;if(v=S.return,S.flags&2048){if(Q=qF(S),Q!==null){Q.flags&=2047,Oi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=HF(Q,S,KA),Q!==null){Oi=Q;return}if(Q=S,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||KA&1073741824||!(Q.mode&4)){for(var H=0,Y=Q.child;Y!==null;)H|=Y.lanes|Y.childLanes,Y=Y.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=S.firstEffect),S.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=S.firstEffect),v.lastEffect=S.lastEffect),1<S.flags&&(v.lastEffect!==null?v.lastEffect.nextEffect=S:v.firstEffect=S,v.lastEffect=S))}if(S=S.sibling,S!==null){Oi=S;return}Oi=S=v}while(S!==null);is===0&&(is=5)}function JA(v){var S=er();return ei(99,XF.bind(null,v,S)),null}function XF(v,S){do Qc();while(v0!==null);if(Pr&48)throw Error(u(327));var Q=v.finishedWork;if(Q===null)return null;if(v.finishedWork=null,v.finishedLanes=0,Q===v.current)throw Error(u(177));v.callbackNode=null;var H=Q.lanes|Q.childLanes,Y=H,ne=v.pendingLanes&~Y;v.pendingLanes=Y,v.suspendedLanes=0,v.pingedLanes=0,v.expiredLanes&=Y,v.mutableReadLanes&=Y,v.entangledLanes&=Y,Y=v.entanglements;for(var Be=v.eventTimes,Ue=v.expirationTimes;0<ne;){var ft=31-qi(ne),jt=1<<ft;Y[ft]=0,Be[ft]=-1,Ue[ft]=-1,ne&=~jt}if(bc!==null&&!(H&24)&&bc.has(v)&&bc.delete(v),v===Os&&(Oi=Os=null,ms=0),1<Q.flags?Q.lastEffect!==null?(Q.lastEffect.nextEffect=Q,H=Q.firstEffect):H=Q:H=Q.firstEffect,H!==null){Y=Pr,Pr|=32,NI.current=null,P0=nt(v.containerInfo),x0=!1,ir=H;do try{ZF()}catch(je){if(ir===null)throw Error(u(330));Fu(ir,je),ir=ir.nextEffect}while(ir!==null);P0=null,ir=H;do try{for(Be=v;ir!==null;){var wr=ir.flags;if(wr&16&&R&&gu(ir.stateNode),wr&128){var Tr=ir.alternate;if(Tr!==null){var Xt=Tr.ref;Xt!==null&&(typeof Xt=="function"?Xt(null):Xt.current=null)}}switch(wr&1038){case 2:hD(ir),ir.flags&=-3;break;case 6:hD(ir),ir.flags&=-3,RI(ir.alternate,ir);break;case 1024:ir.flags&=-1025;break;case 1028:ir.flags&=-1025,RI(ir.alternate,ir);break;case 4:RI(ir.alternate,ir);break;case 8:Ue=Be,ne=ir,R?gD(Ue,ne):fD(Ue,ne);var jn=ne.alternate;Nd(ne),jn!==null&&Nd(jn)}ir=ir.nextEffect}}catch(je){if(ir===null)throw Error(u(330));Fu(ir,je),ir=ir.nextEffect}while(ir!==null);x0&<(),Le(v.containerInfo),v.current=Q,ir=H;do try{for(wr=v;ir!==null;){var li=ir.flags;if(li&36&&uD(wr,ir.alternate,ir),li&128){Tr=void 0;var Ea=ir.ref;if(Ea!==null){var $e=ir.stateNode;switch(ir.tag){case 5:Tr=Re($e);break;default:Tr=$e}typeof Ea=="function"?Ea(Tr):Ea.current=Tr}}ir=ir.nextEffect}}catch(je){if(ir===null)throw Error(u(330));Fu(ir,je),ir=ir.nextEffect}while(ir!==null);ir=null,ee(),Pr=Y}else v.current=Q;if(Qu)Qu=!1,v0=v,D0=S;else for(ir=H;ir!==null;)S=ir.nextEffect,ir.nextEffect=null,ir.flags&8&&(li=ir,li.sibling=null,li.stateNode=null),ir=S;if(H=v.pendingLanes,H===0&&(bl=null),H===1?v===YI?S0++:(S0=0,YI=v):S0=0,Q=Q.stateNode,ca&&typeof ca.onCommitFiberRoot=="function")try{ca.onCommitFiberRoot(Ze,Q,void 0,(Q.current.flags&64)===64)}catch{}if(qo(v,Dt()),Wd)throw Wd=!1,v=jI,jI=null,v;return Pr&8||Sn(),null}function ZF(){for(;ir!==null;){var v=ir.alternate;x0||P0===null||(ir.flags&8?Se(ir,P0)&&(x0=!0,Fe()):ir.tag===13&&WF(v,ir)&&Se(ir,P0)&&(x0=!0,Fe()));var S=ir.flags;S&256&&Td(v,ir),!(S&512)||Qu||(Qu=!0,Qi(97,function(){return Qc(),null})),ir=ir.nextEffect}}function Qc(){if(D0!==90){var v=97<D0?97:D0;return D0=90,ei(v,eR)}return!1}function $F(v,S){GI.push(S,v),Qu||(Qu=!0,Qi(97,function(){return Qc(),null}))}function vD(v,S){WI.push(S,v),Qu||(Qu=!0,Qi(97,function(){return Qc(),null}))}function eR(){if(v0===null)return!1;var v=v0;if(v0=null,Pr&48)throw Error(u(331));var S=Pr;Pr|=32;var Q=WI;WI=[];for(var H=0;H<Q.length;H+=2){var Y=Q[H],ne=Q[H+1],Be=Y.destroy;if(Y.destroy=void 0,typeof Be=="function")try{Be()}catch(ft){if(ne===null)throw Error(u(330));Fu(ne,ft)}}for(Q=GI,GI=[],H=0;H<Q.length;H+=2){Y=Q[H],ne=Q[H+1];try{va
Line truncated
|
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}is!==5&&(is=2),ft=E0(ft,_e),Xt=Be;do{switch(Xt.tag){case 3:ne=ft,Xt.flags|=4096,P&=-P,Xt.lanes|=P;var Wn=kI(Xt,ne,P);Sd(Xt,Wn);break e;case 1:ne=ft;var xr=Xt.type,Sn=Xt.stateNode;if(!(Xt.flags&64)&&(typeof xr.getDerivedStateFromError=="function"||Sn!==null&&typeof Sn.componentDidCatch=="function"&&(bl===null||!bl.has(Sn)))){Xt.flags|=4096,P&=-P,Xt.lanes|=P;var Tn=I0(Xt,ne,P);Sd(Xt,Tn);break e}}Xt=Xt.return}while(Xt!==null)}BD(k)}catch(Yr){P=Yr,Oi===k&&k!==null&&(Oi=k=k.return);continue}break}while(!0)}function ID(){var v=Wd.current;return Wd.current=bt,v===null?bt:v}function k0(v,P){var k=Sr;Sr|=16;var H=ID();Os===v&&ms===P||Sp(v,P);do try{JF();break}catch(Y){CD(v,Y)}while(!0);if(a0(),Sr=k,Wd.current=H,Oi!==null)throw Error(u(261));return Os=null,ms=0,is}function JF(){for(;Oi!==null;)wD(Oi)}function XF(){for(;Oi!==null&&!ja();)wD(Oi)}function wD(v){var P=SD(v.alternate,v,VA);v.memoizedProps=v.pendingProps,P===null?BD(v):Oi=P,MI.current=null}function BD(v){var P=v;do{var k=P.alternate;if(v=P.return,P.flags&2048){if(k=jF(P),k!==null){k.flags&=2047,Oi=k;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(k=qF(k,P,VA),k!==null){Oi=k;return}if(k=P,k.tag!==24&&k.tag!==23||k.memoizedState===null||VA&1073741824||!(k.mode&4)){for(var H=0,Y=k.child;Y!==null;)H|=Y.lanes|Y.childLanes,Y=Y.sibling;k.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=P.firstEffect),P.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=P.firstEffect),v.lastEffect=P.lastEffect),1<P.flags&&(v.lastEffect!==null?v.lastEffect.nextEffect=P:v.firstEffect=P,v.lastEffect=P))}if(P=P.sibling,P!==null){Oi=P;return}Oi=P=v}while(P!==null);is===0&&(is=5)}function zA(v){var P=er();return ei(99,ZF.bind(null,v,P)),null}function ZF(v,P){do kc();while(P0!==null);if(Sr&48)throw Error(u(327));var k=v.finishedWork;if(k===null)return null;if(v.finishedWork=null,v.finishedLanes=0,k===v.current)throw Error(u(177));v.callbackNode=null;var H=k.lanes|k.childLanes,Y=H,ne=v.pendingLanes&~Y;v.pendingLanes=Y,v.suspendedLanes=0,v.pingedLanes=0,v.expiredLanes&=Y,v.mutableReadLanes&=Y,v.entangledLanes&=Y,Y=v.entanglements;for(var Be=v.eventTimes,_e=v.expirationTimes;0<ne;){var ft=31-qi(ne),jt=1<<ft;Y[ft]=0,Be[ft]=-1,_e[ft]=-1,ne&=~jt}if(bc!==null&&!(H&24)&&bc.has(v)&&bc.delete(v),v===Os&&(Oi=Os=null,ms=0),1<k.flags?k.lastEffect!==null?(k.lastEffect.nextEffect=k,H=k.firstEffect):H=k:H=k.firstEffect,H!==null){Y=Sr,Sr|=32,MI.current=null,b0=rt(v.containerInfo),Q0=!1,ir=H;do try{$F()}catch(je){if(ir===null)throw Error(u(330));Fu(ir,je),ir=ir.nextEffect}while(ir!==null);b0=null,ir=H;do try{for(Be=v;ir!==null;){var wr=ir.flags;if(wr&16&&R&&gu(ir.stateNode),wr&128){var Tr=ir.alternate;if(Tr!==null){var Xt=Tr.ref;Xt!==null&&(typeof Xt=="function"?Xt(null):Xt.current=null)}}switch(wr&1038){case 2:hD(ir),ir.flags&=-3;break;case 6:hD(ir),ir.flags&=-3,NI(ir.alternate,ir);break;case 1024:ir.flags&=-1025;break;case 1028:ir.flags&=-1025,NI(ir.alternate,ir);break;case 4:NI(ir.alternate,ir);break;case 8:_e=Be,ne=ir,R?gD(_e,ne):fD(_e,ne);var jn=ne.alternate;Md(ne),jn!==null&&Md(jn)}ir=ir.nextEffect}}catch(je){if(ir===null)throw Error(u(330));Fu(ir,je),ir=ir.nextEffect}while(ir!==null);Q0&<(),Te(v.containerInfo),v.current=k,ir=H;do try{for(wr=v;ir!==null;){var li=ir.flags;if(li&36&&uD(wr,ir.alternate,ir),li&128){Tr=void 0;var Ea=ir.ref;if(Ea!==null){var $e=ir.stateNode;switch(ir.tag){case 5:Tr=Re($e);break;default:Tr=$e}typeof Ea=="function"?Ea(Tr):Ea.current=Tr}}ir=ir.nextEffect}}catch(je){if(ir===null)throw Error(u(330));Fu(ir,je),ir=ir.nextEffect}while(ir!==null);ir=null,ee(),Sr=Y}else v.current=k;if(ku)ku=!1,P0=v,S0=P;else for(ir=H;ir!==null;)P=ir.nextEffect,ir.nextEffect=null,ir.flags&8&&(li=ir,li.sibling=null,li.stateNode=null),ir=P;if(H=v.pendingLanes,H===0&&(bl=null),H===1?v===VI?x0++:(x0=0,VI=v):x0=0,k=k.stateNode,ca&&typeof ca.onCommitFiberRoot=="function")try{ca.onCommitFiberRoot(Ze,k,void 0,(k.current.flags&64)===64)}catch{}if(qo(v,Dt()),Kd)throw Kd=!1,v=WI,WI=null,v;return Sr&8||Pn(),null}function $F(){for(;ir!==null;){var v=ir.alternate;Q0||b0===null||(ir.flags&8?Pe(ir,b0)&&(Q0=!0,Fe()):ir.tag===13&&YF(v,ir)&&Pe(ir,b0)&&(Q0=!0,Fe()));var P=ir.flags;P&256&&Ld(v,ir),!(P&512)||ku||(ku=!0,ki(97,function(){return kc(),null})),ir=ir.nextEffect}}function kc(){if(S0!==90){var v=97<S0?97:S0;return S0=90,ei(v,tR)}return!1}function eR(v,P){YI.push(P,v),ku||(ku=!0,ki(97,function(){return kc(),null}))}function vD(v,P){KI.push(P,v),ku||(ku=!0,ki(97,function(){return kc(),null}))}function tR(){if(P0===null)return!1;var v=P0;if(P0=null,Sr&48)throw Error(u(331));var P=Sr;Sr|=32;var k=KI;KI=[];for(var H=0;H<k.length;H+=2){var Y=k[H],ne=k[H+1],Be=Y.destroy;if(Y.destroy=void 0,typeof Be=="function")try{Be()}catch(ft){if(ne===null)throw Error(u(330));Fu(ne,ft)}}for(k=YI,YI=[],H=0;H<k.length;H+=2){Y=k[H],ne=k[H+1];try{va
Line truncated
|
||||||
`+(H.join(" > ")+`
|
`+(H.join(" > ")+`
|
||||||
|
|
||||||
No matching component was found for:
|
No matching component was found for:
|
||||||
`)+v.join(" > ")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Re(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:sR,findFiberByHostInstance:v.findFiberByHostInstance||oR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")v=!1;else{var S=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!S.isDisabled&&S.supportsFiber)try{Ze=S.inject(v),ca=S}catch{}v=!0}return v},r.observeVisibleRects=function(v,S,Q,H){if(!qt)throw Error(u(363));v=LI(v,S);var Y=Xr(v,Q,H).disconnect;return{disconnect:function(){Y()}}},r.registerMutableSourceForHydration=function(v,S){var Q=S._getVersion;Q=Q(S._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[S,Q]:v.mutableSourceEagerHydrationData.push(S,Q)},r.runWithPriority=function(v,S){var Q=Bl;try{return Bl=v,S()}finally{Bl=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,S){var Q=Pr;Pr&=-2,Pr|=8;try{return v(S)}finally{Pr=Q,Pr===0&&(ku(),Sn())}},r.updateContainer=function(v,S,Q,H){var Y=S.current,ne=oo(),Be=ss(Y);e:if(Q){Q=Q._reactInternals;t:{if(me(Q)!==Q||Q.tag!==1)throw Error(u(170));var Ue=Q;do{switch(Ue.tag){case 3:Ue=Ue.stateNode.context;break t;case 1:if(qn(Ue.type)){Ue=Ue.stateNode.__reactInternalMemoizedMergedChildContext;break t}}Ue=Ue.return}while(Ue!==null);throw Error(u(171))}if(Q.tag===1){var ft=Q.type;if(qn(ft)){Q=oa(Q,ft,Ue);break e}}Q=Ue}else Q=Lo;return S.context===null?S.context=Q:S.pendingContext=Q,S=Wa(ne,Be),S.payload={element:v},H=H===void 0?null:H,H!==null&&(S.callback=H),Ya(Y,S),Xa(Y,Be,ne),Be},r}});var ECe=_(($Yt,yCe)=>{"use strict";yCe.exports=mCe()});var ICe=_((eVt,CCe)=>{"use strict";var Syt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};CCe.exports=Syt});var DCe=_((tVt,vCe)=>{"use strict";var Pyt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},BQ=function(){function t(e,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),e}}();function Aq(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var au=ICe(),xyt=function(){function t(e,r,o,a,n,u){fq(this,t),this.left=e,this.right=r,this.top=o,this.bottom=a,this.width=n,this.height=u}return BQ(t,[{key:"fromJS",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:"toString",value:function(){return"<Layout#"+this.left+":"+this.right+";"+this.top+":"+this.bottom+";"+this.width+":"+this.height+">"}}]),t}(),wCe=function(){BQ(t,null,[{key:"fromJS",value:function(r){var o=r.width,a=r.height;return new t(o,a)}}]);function t(e,r){fq(this,t),this.width=e,this.height=r}return BQ(t,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toStri
Line truncated
|
`)+v.join(" > ")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Re(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:oR,findFiberByHostInstance:v.findFiberByHostInstance||aR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")v=!1;else{var P=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!P.isDisabled&&P.supportsFiber)try{Ze=P.inject(v),ca=P}catch{}v=!0}return v},r.observeVisibleRects=function(v,P,k,H){if(!qt)throw Error(u(363));v=OI(v,P);var Y=Xr(v,k,H).disconnect;return{disconnect:function(){Y()}}},r.registerMutableSourceForHydration=function(v,P){var k=P._getVersion;k=k(P._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[P,k]:v.mutableSourceEagerHydrationData.push(P,k)},r.runWithPriority=function(v,P){var k=Bl;try{return Bl=v,P()}finally{Bl=k}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,P){var k=Sr;Sr&=-2,Sr|=8;try{return v(P)}finally{Sr=k,Sr===0&&(Qu(),Pn())}},r.updateContainer=function(v,P,k,H){var Y=P.current,ne=oo(),Be=ss(Y);e:if(k){k=k._reactInternals;t:{if(Ce(k)!==k||k.tag!==1)throw Error(u(170));var _e=k;do{switch(_e.tag){case 3:_e=_e.stateNode.context;break t;case 1:if(qn(_e.type)){_e=_e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}_e=_e.return}while(_e!==null);throw Error(u(171))}if(k.tag===1){var ft=k.type;if(qn(ft)){k=oa(k,ft,_e);break e}}k=_e}else k=No;return P.context===null?P.context=k:P.pendingContext=k,P=Wa(ne,Be),P.payload={element:v},H=H===void 0?null:H,H!==null&&(P.callback=H),Ya(Y,P),Xa(Y,Be,ne),Be},r}});var wCe=_((cKt,ICe)=>{"use strict";ICe.exports=CCe()});var vCe=_((uKt,BCe)=>{"use strict";var xyt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};BCe.exports=xyt});var xCe=_((AKt,SCe)=>{"use strict";var byt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},vk=function(){function t(e,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),e}}();function pq(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var au=vCe(),Qyt=function(){function t(e,r,o,a,n,u){hq(this,t),this.left=e,this.right=r,this.top=o,this.bottom=a,this.width=n,this.height=u}return vk(t,[{key:"fromJS",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:"toString",value:function(){return"<Layout#"+this.left+":"+this.right+";"+this.top+":"+this.bottom+";"+this.width+":"+this.height+">"}}]),t}(),DCe=function(){vk(t,null,[{key:"fromJS",value:function(r){var o=r.width,a=r.height;return new t(o,a)}}]);function t(e,r){hq(this,t),this.width=e,this.height=r}return vk(t,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toStri
Line truncated
|
||||||
`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var o=r>0?r:lengthBytesUTF8(t)+1,a=new Array(o),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var o=t[r];o>255&&(o&=255),e.push(String.fromCharCode(o))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var o,a;r&&(a=e+lengthBytesUTF8(t),o=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var o=0;o<t.length;++o)HEAP8[e++>>0]=t.charCodeAt(o);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var o=e>>>16,a=e&65535,n=r>>>16,u=r&65535;return a*u+(o*u+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.cei
Line truncated
|
`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var o=r>0?r:lengthBytesUTF8(t)+1,a=new Array(o),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var o=t[r];o>255&&(o&=255),e.push(String.fromCharCode(o))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var o,a;r&&(a=e+lengthBytesUTF8(t),o=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var o=0;o<t.length;++o)HEAP8[e++>>0]=t.charCodeAt(o);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var o=e>>>16,a=e&65535,n=r>>>16,u=r&65535;return a*u+(o*u+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.cei
Line truncated
|
||||||
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(o){r=o(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var id=_((nVt,PCe)=>{"use strict";var byt=DCe(),kyt=SCe(),pq=!1,hq=null;kyt({},function(t,e){if(!pq){if(pq=!0,t)throw t;hq=e}});if(!pq)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");PCe.exports=byt(hq.bind,hq.lib)});var dq=_((iVt,gq)=>{"use strict";var xCe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);gq.exports=xCe;gq.exports.default=xCe});var kCe=_((sVt,bCe)=>{"use strict";bCe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E
Line truncated
|
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(o){r=o(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var od=_((pKt,QCe)=>{"use strict";var kyt=xCe(),Fyt=bCe(),gq=!1,dq=null;Fyt({},function(t,e){if(!gq){if(gq=!0,t)throw t;dq=e}});if(!gq)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");QCe.exports=kyt(dq.bind,dq.lib)});var yq=_((hKt,mq)=>{"use strict";var kCe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);mq.exports=kCe;mq.exports.default=kCe});var RCe=_((gKt,FCe)=>{"use strict";FCe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E
Line truncated
|
||||||
`))e=Math.max(e,Tyt(r));return e};yq.exports=FCe;yq.exports.default=FCe});var RCe=_(PB=>{"use strict";var Lyt=PB&&PB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(PB,"__esModule",{value:!0});var Nyt=Lyt(Eq()),Cq={};PB.default=t=>{if(t.length===0)return{width:0,height:0};if(Cq[t])return Cq[t];let e=Nyt.default(t),r=t.split(`
|
`))e=Math.max(e,Lyt(r));return e};Cq.exports=NCe;Cq.exports.default=NCe});var LCe=_(SB=>{"use strict";var Oyt=SB&&SB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(SB,"__esModule",{value:!0});var Myt=Oyt(Iq()),wq={};SB.default=t=>{if(t.length===0)return{width:0,height:0};if(wq[t])return wq[t];let e=Myt.default(t),r=t.split(`
|
||||||
`).length;return Cq[t]={width:e,height:r},{width:e,height:r}}});var TCe=_(xB=>{"use strict";var Oyt=xB&&xB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xB,"__esModule",{value:!0});var In=Oyt(id()),Myt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?In.default.POSITION_TYPE_ABSOLUTE:In.default.POSITION_TYPE_RELATIVE)},Uyt=(t,e)=>{"marginLeft"in e&&t.setMargin(In.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(In.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(In.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(In.default.EDGE_BOTTOM,e.marginBottom||0)},_yt=(t,e)=>{"paddingLeft"in e&&t.setPadding(In.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(In.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(In.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(In.default.EDGE_BOTTOM,e.paddingBottom||0)},Hyt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(In.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(In.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(In.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(In.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(In.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(In.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(In.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(In.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(In.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(In.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(In.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(In.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(In.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(In.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(In.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(In.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(In.default.JUSTIFY_SPACE_AROUND))},qyt=(t,e)=>{var r,o;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((o=e.minHeight)!==null&&o!==void 0?o:0))},jyt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?In.default.DISPLAY_FLEX:In.default.DISPLAY_NONE)},Gyt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(In.default.EDGE_TOP,r),t.setBorder(In.default.EDGE_BOTTOM,r),t.setBorder(In.default.EDGE_LEFT,r),t.setBorder(In.default.EDGE_RIGHT,r)}};xB.default=(t,e={})=>{Myt(t,e),Uyt(t,e),_yt(t,e),Hyt(t,e),qyt(t,e),jyt(t,e),Gyt(t,e)}});var OCe=_((uVt,NCe)=>{"use strict";var bB=SB(),Wyt=hP(),Yyt=qw(),wq=new Set(["\x1B","\x9B"]),Vyt=39,LCe=t=>`${wq.values().next().value}[${t}m`,Kyt=t=>t.split(" ").map(e=>bB(e)),Iq=(t,e,r)=>{let o=[...e],a=!1,n=bB(Wyt(t[t.length-1]));for(let[u,A]of o.entries()){let p=bB(A);if(n+p<=r?t[t.length-1]+=A:(t.push(A),n=0),wq.has(A))a=!0;else if(a&&A==="m"){a=!1;continue}a||(n+=p,n===r&&u<o.length-1&&(t.push(""),n=0))}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Jyt=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(bB(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},zyt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let o="",a="",n,u=Kyt(t),A=[""];for(let[p,h]of t.split(" ").entries()){r.trim!==!1&&(A[A.length-1]=A[A.length-1].trimLeft());let E=bB(A[A.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(A.push(""),E=0),(E>0||r.trim===!1)&&(A[A.length-1]+=" ",E++)),r.hard&&u[p]>e){let w=e-E,D=1+Math.floor((u[p]-w-1)/e);Math.floor((u[p]-1)/e)<D&&A.push(""),Iq(A,h,e);continue}if(E+u[p]>e&&E>0&&u[p]>0){if(r.wordWrap===!1&&E<e){Iq(A,h,e);continue}A.push("")}if(E+u[p]>e&&r.wordWrap===!1){Iq(A,h,e);continue}A[A.
Line truncated
|
`).length;return wq[t]={width:e,height:r},{width:e,height:r}}});var OCe=_(xB=>{"use strict";var Uyt=xB&&xB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xB,"__esModule",{value:!0});var In=Uyt(od()),_yt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?In.default.POSITION_TYPE_ABSOLUTE:In.default.POSITION_TYPE_RELATIVE)},Hyt=(t,e)=>{"marginLeft"in e&&t.setMargin(In.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(In.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(In.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(In.default.EDGE_BOTTOM,e.marginBottom||0)},qyt=(t,e)=>{"paddingLeft"in e&&t.setPadding(In.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(In.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(In.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(In.default.EDGE_BOTTOM,e.paddingBottom||0)},jyt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(In.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(In.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(In.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(In.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(In.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(In.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(In.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(In.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(In.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(In.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(In.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(In.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(In.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(In.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(In.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(In.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(In.default.JUSTIFY_SPACE_AROUND))},Gyt=(t,e)=>{var r,o;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((o=e.minHeight)!==null&&o!==void 0?o:0))},Wyt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?In.default.DISPLAY_FLEX:In.default.DISPLAY_NONE)},Yyt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(In.default.EDGE_TOP,r),t.setBorder(In.default.EDGE_BOTTOM,r),t.setBorder(In.default.EDGE_LEFT,r),t.setBorder(In.default.EDGE_RIGHT,r)}};xB.default=(t,e={})=>{_yt(t,e),Hyt(t,e),qyt(t,e),jyt(t,e),Gyt(t,e),Wyt(t,e),Yyt(t,e)}});var _Ce=_((CKt,UCe)=>{"use strict";var bB=PB(),Kyt=pS(),Vyt=Gw(),vq=new Set(["\x1B","\x9B"]),zyt=39,MCe=t=>`${vq.values().next().value}[${t}m`,Jyt=t=>t.split(" ").map(e=>bB(e)),Bq=(t,e,r)=>{let o=[...e],a=!1,n=bB(Kyt(t[t.length-1]));for(let[u,A]of o.entries()){let p=bB(A);if(n+p<=r?t[t.length-1]+=A:(t.push(A),n=0),vq.has(A))a=!0;else if(a&&A==="m"){a=!1;continue}a||(n+=p,n===r&&u<o.length-1&&(t.push(""),n=0))}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Xyt=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(bB(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},Zyt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let o="",a="",n,u=Jyt(t),A=[""];for(let[p,h]of t.split(" ").entries()){r.trim!==!1&&(A[A.length-1]=A[A.length-1].trimLeft());let E=bB(A[A.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(A.push(""),E=0),(E>0||r.trim===!1)&&(A[A.length-1]+=" ",E++)),r.hard&&u[p]>e){let w=e-E,D=1+Math.floor((u[p]-w-1)/e);Math.floor((u[p]-1)/e)<D&&A.push(""),Bq(A,h,e);continue}if(E+u[p]>e&&E>0&&u[p]>0){if(r.wordWrap===!1&&E<e){Bq(A,h,e);continue}A.push("")}if(E+u[p]>e&&r.wordWrap===!1){Bq(A,h,e);continue}A[A.
Line truncated
|
||||||
`);for(let[p,h]of[...o].entries()){if(a+=h,wq.has(h)){let w=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=w===Vyt?null:w}let E=Yyt.codes.get(Number(n));n&&E&&(o[p+1]===`
|
`);for(let[p,h]of[...o].entries()){if(a+=h,vq.has(h)){let w=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=w===zyt?null:w}let E=Vyt.codes.get(Number(n));n&&E&&(o[p+1]===`
|
||||||
`?a+=LCe(E):h===`
|
`?a+=MCe(E):h===`
|
||||||
`&&(a+=LCe(n)))}return a};NCe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
`&&(a+=MCe(n)))}return a};UCe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
||||||
`).split(`
|
`).split(`
|
||||||
`).map(o=>zyt(o,e,r)).join(`
|
`).map(o=>Zyt(o,e,r)).join(`
|
||||||
`)});var _Ce=_((AVt,UCe)=>{"use strict";var MCe="[\uD800-\uDBFF][\uDC00-\uDFFF]",Xyt=t=>t&&t.exact?new RegExp(`^${MCe}$`):new RegExp(MCe,"g");UCe.exports=Xyt});var Bq=_((fVt,GCe)=>{"use strict";var Zyt=dq(),$yt=_Ce(),HCe=qw(),jCe=["\x1B","\x9B"],vQ=t=>`${jCe[0]}[${t}m`,qCe=(t,e,r)=>{let o=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=HCe.codes.get(parseInt(a,10));if(u){let A=t.indexOf(u.toString());A>=0?t.splice(A,1):o.push(vQ(e?u:n))}else if(e){o.push(vQ(0));break}else o.push(vQ(n))}if(e&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=vQ(HCe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};GCe.exports=(t,e,r)=>{let o=[...t.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,E]of o.entries()){let w=!1;if(jCe.includes(E)){let D=/\d[^m]*/.exec(t.slice(h,h+18));u=D&&D.length>0?D[0]:void 0,A<r&&(n=!0,u!==void 0&&a.push(u))}else n&&E==="m"&&(n=!1,w=!0);if(!n&&!w&&++A,!$yt({exact:!0}).test(E)&&Zyt(E.codePointAt())&&++A,A>e&&A<=r)p+=E;else if(A===e&&!n&&u!==void 0)p=qCe(a);else if(A>=r){p+=qCe(a,!0,u);break}}return p}});var YCe=_((pVt,WCe)=>{"use strict";var _h=Bq(),eEt=SB();function DQ(t,e,r){if(t.charAt(e)===" ")return e;for(let o=1;o<=3;o++)if(r){if(t.charAt(e+o)===" ")return e+o}else if(t.charAt(e-o)===" ")return e-o;return e}WCe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return u;let p=eEt(t);if(p<=e)return t;if(o==="start"){if(n){let h=DQ(t,p-e+1,!0);return u+_h(t,h,p).trim()}return a===!0&&(u+=" ",A=2),u+_h(t,p-e+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(e/2);if(n){let E=DQ(t,h),w=DQ(t,p-(e-h)+1,!0);return _h(t,0,E)+u+_h(t,w,p).trim()}return _h(t,0,h)+u+_h(t,p-(e-h)+A,p)}if(o==="end"){if(n){let h=DQ(t,e-1);return _h(t,0,h)+u}return a===!0&&(u=" "+u,A=2),_h(t,0,e-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var Dq=_(kB=>{"use strict";var VCe=kB&&kB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kB,"__esModule",{value:!0});var tEt=VCe(OCe()),rEt=VCe(YCe()),vq={};kB.default=(t,e,r)=>{let o=t+String(e)+String(r);if(vq[o])return vq[o];let a=t;if(r==="wrap"&&(a=tEt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=rEt.default(t,e,{position:n})}return vq[o]=a,a}});var Pq=_(Sq=>{"use strict";Object.defineProperty(Sq,"__esModule",{value:!0});var KCe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=KCe(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),e+=o}return e};Sq.default=KCe});var xq=_(Ei=>{"use strict";var QB=Ei&&Ei.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.setTextNodeValue=Ei.createTextNode=Ei.setStyle=Ei.setAttribute=Ei.removeChildNode=Ei.insertBeforeNode=Ei.appendChildNode=Ei.createNode=Ei.TEXT_NAME=void 0;var nEt=QB(id()),JCe=QB(RCe()),iEt=QB(TCe()),sEt=QB(Dq()),oEt=QB(Pq());Ei.TEXT_NAME="#text";Ei.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:nEt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(aEt.bind(null,r))),r};Ei.appendChildNode=(t,e)=>{var r;e.parentNode&&Ei.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&SQ(t)};Ei.insertBeforeNode=(t,e,r)=>{var o,a;e.parentNode&&Ei.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((o=t.yogaNode)===null||o===void 0||o.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&SQ(t)};Ei.removeChildNode=(t,e)=>{var r,o;e.yogaNode&&((o=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||o===void 0||o.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&SQ(t)};Ei.setAttribute=(t,e,r)=>{t.attributes[e]=r};Ei.setStyle=(t,e)=>{t.style=e,t.yogaNode&&iEt.default(t.yogaNode,e)};Ei.createTextNode=t=>{let e={nodeName:"#text",nodeValue:t,yogaLine truncated
|
`)});var jCe=_((IKt,qCe)=>{"use strict";var HCe="[\uD800-\uDBFF][\uDC00-\uDFFF]",$yt=t=>t&&t.exact?new RegExp(`^${HCe}$`):new RegExp(HCe,"g");qCe.exports=$yt});var Dq=_((wKt,KCe)=>{"use strict";var eEt=yq(),tEt=jCe(),GCe=Gw(),YCe=["\x1B","\x9B"],Dk=t=>`${YCe[0]}[${t}m`,WCe=(t,e,r)=>{let o=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=GCe.codes.get(parseInt(a,10));if(u){let A=t.indexOf(u.toString());A>=0?t.splice(A,1):o.push(Dk(e?u:n))}else if(e){o.push(Dk(0));break}else o.push(Dk(n))}if(e&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=Dk(GCe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};KCe.exports=(t,e,r)=>{let o=[...t.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,E]of o.entries()){let w=!1;if(YCe.includes(E)){let D=/\d[^m]*/.exec(t.slice(h,h+18));u=D&&D.length>0?D[0]:void 0,A<r&&(n=!0,u!==void 0&&a.push(u))}else n&&E==="m"&&(n=!1,w=!0);if(!n&&!w&&++A,!tEt({exact:!0}).test(E)&&eEt(E.codePointAt())&&++A,A>e&&A<=r)p+=E;else if(A===e&&!n&&u!==void 0)p=WCe(a);else if(A>=r){p+=WCe(a,!0,u);break}}return p}});var zCe=_((BKt,VCe)=>{"use strict";var qh=Dq(),rEt=PB();function Pk(t,e,r){if(t.charAt(e)===" ")return e;for(let o=1;o<=3;o++)if(r){if(t.charAt(e+o)===" ")return e+o}else if(t.charAt(e-o)===" ")return e-o;return e}VCe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return u;let p=rEt(t);if(p<=e)return t;if(o==="start"){if(n){let h=Pk(t,p-e+1,!0);return u+qh(t,h,p).trim()}return a===!0&&(u+=" ",A=2),u+qh(t,p-e+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(e/2);if(n){let E=Pk(t,h),w=Pk(t,p-(e-h)+1,!0);return qh(t,0,E)+u+qh(t,w,p).trim()}return qh(t,0,h)+u+qh(t,p-(e-h)+A,p)}if(o==="end"){if(n){let h=Pk(t,e-1);return qh(t,0,h)+u}return a===!0&&(u=" "+u,A=2),qh(t,0,e-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var Sq=_(QB=>{"use strict";var JCe=QB&&QB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(QB,"__esModule",{value:!0});var nEt=JCe(_Ce()),iEt=JCe(zCe()),Pq={};QB.default=(t,e,r)=>{let o=t+String(e)+String(r);if(Pq[o])return Pq[o];let a=t;if(r==="wrap"&&(a=nEt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=iEt.default(t,e,{position:n})}return Pq[o]=a,a}});var bq=_(xq=>{"use strict";Object.defineProperty(xq,"__esModule",{value:!0});var XCe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=XCe(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),e+=o}return e};xq.default=XCe});var Qq=_(Ei=>{"use strict";var kB=Ei&&Ei.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.setTextNodeValue=Ei.createTextNode=Ei.setStyle=Ei.setAttribute=Ei.removeChildNode=Ei.insertBeforeNode=Ei.appendChildNode=Ei.createNode=Ei.TEXT_NAME=void 0;var sEt=kB(od()),ZCe=kB(LCe()),oEt=kB(OCe()),aEt=kB(Sq()),lEt=kB(bq());Ei.TEXT_NAME="#text";Ei.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:sEt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(cEt.bind(null,r))),r};Ei.appendChildNode=(t,e)=>{var r;e.parentNode&&Ei.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&Sk(t)};Ei.insertBeforeNode=(t,e,r)=>{var o,a;e.parentNode&&Ei.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((o=t.yogaNode)===null||o===void 0||o.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&Sk(t)};Ei.removeChildNode=(t,e)=>{var r,o;e.yogaNode&&((o=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||o===void 0||o.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&Sk(t)};Ei.setAttribute=(t,e,r)=>{t.attributes[e]=r};Ei.setStyle=(t,e)=>{t.style=e,t.yogaNode&&oEt.default(t.yogaNode,e)};Ei.createTextNode=t=>{let e={nodeName:"#text",nodeValue:t,yogaLine truncated
|
||||||
`:`
|
`:`
|
||||||
`)+r,a=o+1,o=t.indexOf(`
|
`)+r,a=o+1,o=t.indexOf(`
|
||||||
`,a)}while(o!==-1);return n+=t.substr(a),n};lIe.exports={stringReplaceAll:AEt,stringEncaseCRLFWithFirstIndex:fEt}});var hIe=_((BVt,pIe)=>{"use strict";var pEt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,uIe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,hEt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,gEt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,dEt=new Map([["n",`
|
`,a)}while(o!==-1);return n+=t.substr(a),n};AIe.exports={stringReplaceAll:pEt,stringEncaseCRLFWithFirstIndex:hEt}});var mIe=_((RKt,dIe)=>{"use strict";var gEt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,pIe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,dEt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,mEt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,yEt=new Map([["n",`
|
||||||
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function fIe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):dEt.get(t)||t}function mEt(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(hEt))r.push(a[2].replace(gEt,(A,p,h)=>p?fIe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function yEt(t){uIe.lastIndex=0;let e=[],r;for(;(r=uIe.exec(t))!==null;){let o=r[1];if(r[2]){let a=mEt(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function AIe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}pIe.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(pEt,(n,u,A,p,h,E)=>{if(u)a.push(fIe(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:AIe(t,r)(w)),r.push({inverse:A,styles:yEt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(AIe(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var FQ=_((vVt,CIe)=>{"use strict";var TB=qw(),{stdout:Qq,stderr:Fq}=$L(),{stringReplaceAll:EEt,stringEncaseCRLFWithFirstIndex:CEt}=cIe(),{isArray:xQ}=Array,dIe=["ansi","ansi","ansi256","ansi16m"],DC=Object.create(null),IEt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Qq?Qq.level:0;t.level=e.level===void 0?r:e.level},Rq=class{constructor(e){return mIe(e)}},mIe=t=>{let e={};return IEt(e,t),e.template=(...r)=>EIe(e.template,...r),Object.setPrototypeOf(e,bQ.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Rq,e.template};function bQ(t){return mIe(t)}for(let[t,e]of Object.entries(TB))DC[t]={get(){let r=kQ(this,Tq(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};DC.visible={get(){let t=kQ(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var yIe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of yIe)DC[t]={get(){let{level:e}=this;return function(...r){let o=Tq(TB.color[dIe[e]][t](...r),TB.color.close,this._styler);return kQ(this,o,this._isEmpty)}}};for(let t of yIe){let e="bg"+t[0].toUpperCase()+t.slice(1);DC[e]={get(){let{level:r}=this;return function(...o){let a=Tq(TB.bgColor[dIe[r]][t](...o),TB.bgColor.close,this._styler);return kQ(this,a,this._isEmpty)}}}}var wEt=Object.defineProperties(()=>{},{...DC,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Tq=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},kQ=(t,e,r)=>{let o=(...a)=>xQ(a[0])&&xQ(a[0].raw)?gIe(o,EIe(o,...a)):gIe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,wEt),o._generator=t,o._styler=e,o._isEmpty=r,o},gIe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=EEt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function gIe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):yEt.get(t)||t}function EEt(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(dEt))r.push(a[2].replace(mEt,(A,p,h)=>p?gIe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function CEt(t){pIe.lastIndex=0;let e=[],r;for(;(r=pIe.exec(t))!==null;){let o=r[1];if(r[2]){let a=EEt(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function hIe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}dIe.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(gEt,(n,u,A,p,h,E)=>{if(u)a.push(gIe(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:hIe(t,r)(w)),r.push({inverse:A,styles:CEt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(hIe(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var Rk=_((TKt,BIe)=>{"use strict";var TB=Gw(),{stdout:Rq,stderr:Tq}=$N(),{stringReplaceAll:IEt,stringEncaseCRLFWithFirstIndex:wEt}=fIe(),{isArray:bk}=Array,EIe=["ansi","ansi","ansi256","ansi16m"],SC=Object.create(null),BEt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Rq?Rq.level:0;t.level=e.level===void 0?r:e.level},Nq=class{constructor(e){return CIe(e)}},CIe=t=>{let e={};return BEt(e,t),e.template=(...r)=>wIe(e.template,...r),Object.setPrototypeOf(e,Qk.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Nq,e.template};function Qk(t){return CIe(t)}for(let[t,e]of Object.entries(TB))SC[t]={get(){let r=kk(this,Lq(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};SC.visible={get(){let t=kk(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var IIe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of IIe)SC[t]={get(){let{level:e}=this;return function(...r){let o=Lq(TB.color[EIe[e]][t](...r),TB.color.close,this._styler);return kk(this,o,this._isEmpty)}}};for(let t of IIe){let e="bg"+t[0].toUpperCase()+t.slice(1);SC[e]={get(){let{level:r}=this;return function(...o){let a=Lq(TB.bgColor[EIe[r]][t](...o),TB.bgColor.close,this._styler);return kk(this,a,this._isEmpty)}}}}var vEt=Object.defineProperties(()=>{},{...SC,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Lq=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},kk=(t,e,r)=>{let o=(...a)=>bk(a[0])&&bk(a[0].raw)?yIe(o,wIe(o,...a)):yIe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,vEt),o._generator=t,o._styler=e,o._isEmpty=r,o},yIe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=IEt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
||||||
`);return n!==-1&&(e=CEt(e,a,o,n)),o+e+a},kq,EIe=(t,...e)=>{let[r]=e;if(!xQ(r)||!xQ(r.raw))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return kq===void 0&&(kq=hIe()),kq(t,a.join(""))};Object.defineProperties(bQ.prototype,DC);var QQ=bQ();QQ.supportsColor=Qq;QQ.stderr=bQ({level:Fq?Fq.level:0});QQ.stderr.supportsColor=Fq;CIe.exports=QQ});var Lq=_(NB=>{"use strict";var BEt=NB&&NB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NB,"__esModule",{value:!0});var LB=BEt(FQ()),vEt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,DEt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,RQ=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);NB.default=(t,e,r)=>{if(!e)return t;if(e in LB.default){let a=RQ(e,r);return LB.default[a](t)}if(e.startsWith("#")){let a=RQ("hex",r);return LB.default[a](e)(t)}if(e.startsWith("ansi")){let a=DEt.exec(e);if(!a)return t;let n=RQ(a[1],r),u=Number(a[2]);return LB.default[n](u)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=vEt.exec(e);if(!a)return t;let n=RQ(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return LB.default[n](u,A,p)(t)}return t}});var wIe=_(OB=>{"use strict";var IIe=OB&&OB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(OB,"__esModule",{value:!0});var SEt=IIe(aIe()),Nq=IIe(Lq());OB.default=(t,e,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=SEt.default[r.style.borderStyle],p=Nq.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=(Nq.default(A.vertical,u,"foreground")+`
|
`);return n!==-1&&(e=wEt(e,a,o,n)),o+e+a},Fq,wIe=(t,...e)=>{let[r]=e;if(!bk(r)||!bk(r.raw))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return Fq===void 0&&(Fq=mIe()),Fq(t,a.join(""))};Object.defineProperties(Qk.prototype,SC);var Fk=Qk();Fk.supportsColor=Rq;Fk.stderr=Qk({level:Tq?Tq.level:0});Fk.stderr.supportsColor=Tq;BIe.exports=Fk});var Oq=_(LB=>{"use strict";var DEt=LB&&LB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(LB,"__esModule",{value:!0});var NB=DEt(Rk()),PEt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,SEt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,Tk=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);LB.default=(t,e,r)=>{if(!e)return t;if(e in NB.default){let a=Tk(e,r);return NB.default[a](t)}if(e.startsWith("#")){let a=Tk("hex",r);return NB.default[a](e)(t)}if(e.startsWith("ansi")){let a=SEt.exec(e);if(!a)return t;let n=Tk(a[1],r),u=Number(a[2]);return NB.default[n](u)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=PEt.exec(e);if(!a)return t;let n=Tk(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return NB.default[n](u,A,p)(t)}return t}});var DIe=_(OB=>{"use strict";var vIe=OB&&OB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(OB,"__esModule",{value:!0});var xEt=vIe(uIe()),Mq=vIe(Oq());OB.default=(t,e,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=xEt.default[r.style.borderStyle],p=Mq.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=(Mq.default(A.vertical,u,"foreground")+`
|
||||||
`).repeat(n-2),E=Nq.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(t,e,p,{transformers:[]}),o.write(t,e+1,h,{transformers:[]}),o.write(t+a-1,e+1,h,{transformers:[]}),o.write(t,e+n-1,E,{transformers:[]})}}});var vIe=_(MB=>{"use strict";var sd=MB&&MB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MB,"__esModule",{value:!0});var PEt=sd(id()),xEt=sd(Eq()),bEt=sd(nIe()),kEt=sd(Dq()),QEt=sd(iIe()),FEt=sd(Pq()),REt=sd(wIe()),TEt=(t,e)=>{var r;let o=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();e=`
|
`).repeat(n-2),E=Mq.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(t,e,p,{transformers:[]}),o.write(t,e+1,h,{transformers:[]}),o.write(t+a-1,e+1,h,{transformers:[]}),o.write(t,e+n-1,E,{transformers:[]})}}});var SIe=_(MB=>{"use strict";var ad=MB&&MB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MB,"__esModule",{value:!0});var bEt=ad(od()),QEt=ad(Iq()),kEt=ad(oIe()),FEt=ad(Sq()),REt=ad(aIe()),TEt=ad(bq()),NEt=ad(DIe()),LEt=(t,e)=>{var r;let o=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();e=`
|
||||||
`.repeat(n)+bEt.default(e,a)}return e},BIe=(t,e,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===PEt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),w=u;if(typeof t.internal_transform=="function"&&(w=[t.internal_transform,...u]),t.nodeName==="ink-text"){let D=FEt.default(t);if(D.length>0){let b=xEt.default(D),C=QEt.default(p);if(b>C){let T=(o=t.style.textWrap)!==null&&o!==void 0?o:"wrap";D=kEt.default(D,C,T)}D=TEt(t,D),e.write(h,E,D,{transformers:w})}return}if(t.nodeName==="ink-box"&&REt.default(h,E,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let D of t.childNodes)BIe(D,e,{offsetX:h,offsetY:E,transformers:w,skipStaticElements:A})}};MB.default=BIe});var PIe=_(UB=>{"use strict";var SIe=UB&&UB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(UB,"__esModule",{value:!0});var DIe=SIe(Bq()),LEt=SIe(SB()),Oq=class{constructor(e){this.writes=[];let{width:r,height:o}=e;this.width=r,this.height=o}write(e,r,o,a){let{transformers:n}=a;o&&this.writes.push({x:e,y:r,text:o,transformers:n})}get(){let e=[];for(let o=0;o<this.height;o++)e.push(" ".repeat(this.width));for(let o of this.writes){let{x:a,y:n,text:u,transformers:A}=o,p=u.split(`
|
`.repeat(n)+kEt.default(e,a)}return e},PIe=(t,e,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===bEt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),w=u;if(typeof t.internal_transform=="function"&&(w=[t.internal_transform,...u]),t.nodeName==="ink-text"){let D=TEt.default(t);if(D.length>0){let b=QEt.default(D),C=REt.default(p);if(b>C){let T=(o=t.style.textWrap)!==null&&o!==void 0?o:"wrap";D=FEt.default(D,C,T)}D=LEt(t,D),e.write(h,E,D,{transformers:w})}return}if(t.nodeName==="ink-box"&&NEt.default(h,E,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let D of t.childNodes)PIe(D,e,{offsetX:h,offsetY:E,transformers:w,skipStaticElements:A})}};MB.default=PIe});var QIe=_(UB=>{"use strict";var bIe=UB&&UB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(UB,"__esModule",{value:!0});var xIe=bIe(Dq()),OEt=bIe(PB()),Uq=class{constructor(e){this.writes=[];let{width:r,height:o}=e;this.width=r,this.height=o}write(e,r,o,a){let{transformers:n}=a;o&&this.writes.push({x:e,y:r,text:o,transformers:n})}get(){let e=[];for(let o=0;o<this.height;o++)e.push(" ".repeat(this.width));for(let o of this.writes){let{x:a,y:n,text:u,transformers:A}=o,p=u.split(`
|
||||||
`),h=0;for(let E of p){let w=e[n+h];if(!w)continue;let D=LEt.default(E);for(let b of A)E=b(E);e[n+h]=DIe.default(w,0,a)+E+DIe.default(w,a+D),h++}}return{output:e.map(o=>o.trimRight()).join(`
|
`),h=0;for(let E of p){let w=e[n+h];if(!w)continue;let D=OEt.default(E);for(let b of A)E=b(E);e[n+h]=xIe.default(w,0,a)+E+xIe.default(w,a+D),h++}}return{output:e.map(o=>o.trimRight()).join(`
|
||||||
`),height:e.length}}};UB.default=Oq});var kIe=_(_B=>{"use strict";var Mq=_B&&_B.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_B,"__esModule",{value:!0});var NEt=Mq(id()),xIe=Mq(vIe()),bIe=Mq(PIe());_B.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,NEt.default.DIRECTION_LTR);let o=new bIe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});xIe.default(t,o,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new bIe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),xIe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output}
|
`),height:e.length}}};UB.default=Uq});var RIe=_(_B=>{"use strict";var _q=_B&&_B.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_B,"__esModule",{value:!0});var MEt=_q(od()),kIe=_q(SIe()),FIe=_q(QIe());_B.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,MEt.default.DIRECTION_LTR);let o=new FIe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});kIe.default(t,o,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new FIe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),kIe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output}
|
||||||
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var TIe=_((kVt,RIe)=>{"use strict";var QIe=ve("stream"),FIe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],Uq={},OEt=t=>{let e=new QIe.PassThrough,r=new QIe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let o=new console.Console(e,r);for(let a of FIe)Uq[a]=console[a],console[a]=o[a];return()=>{for(let a of FIe)console[a]=Uq[a];Uq={}}};RIe.exports=OEt});var Hq=_(_q=>{"use strict";Object.defineProperty(_q,"__esModule",{value:!0});_q.default=new WeakMap});var jq=_(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});var MEt=ln(),LIe=MEt.createContext({exit:()=>{}});LIe.displayName="InternalAppContext";qq.default=LIe});var Wq=_(Gq=>{"use strict";Object.defineProperty(Gq,"__esModule",{value:!0});var UEt=ln(),NIe=UEt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});NIe.displayName="InternalStdinContext";Gq.default=NIe});var Vq=_(Yq=>{"use strict";Object.defineProperty(Yq,"__esModule",{value:!0});var _Et=ln(),OIe=_Et.createContext({stdout:void 0,write:()=>{}});OIe.displayName="InternalStdoutContext";Yq.default=OIe});var Jq=_(Kq=>{"use strict";Object.defineProperty(Kq,"__esModule",{value:!0});var HEt=ln(),MIe=HEt.createContext({stderr:void 0,write:()=>{}});MIe.displayName="InternalStderrContext";Kq.default=MIe});var TQ=_(zq=>{"use strict";Object.defineProperty(zq,"__esModule",{value:!0});var qEt=ln(),UIe=qEt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});UIe.displayName="InternalFocusContext";zq.default=UIe});var HIe=_((OVt,_Ie)=>{"use strict";var jEt=/[|\\{}()[\]^$+*?.-]/g;_Ie.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(jEt,"\\$&")}});var WIe=_((MVt,GIe)=>{"use strict";var GEt=HIe(),WEt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",jIe=[].concat(ve("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));jIe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var Xq=class t{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=t.nodeInternals()),"cwd"in e||(e.cwd=WEt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,YEt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...jIe]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(`
|
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var OIe=_((_Kt,LIe)=>{"use strict";var TIe=De("stream"),NIe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],Hq={},UEt=t=>{let e=new TIe.PassThrough,r=new TIe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let o=new console.Console(e,r);for(let a of NIe)Hq[a]=console[a],console[a]=o[a];return()=>{for(let a of NIe)console[a]=Hq[a];Hq={}}};LIe.exports=UEt});var jq=_(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});qq.default=new WeakMap});var Wq=_(Gq=>{"use strict";Object.defineProperty(Gq,"__esModule",{value:!0});var _Et=ln(),MIe=_Et.createContext({exit:()=>{}});MIe.displayName="InternalAppContext";Gq.default=MIe});var Kq=_(Yq=>{"use strict";Object.defineProperty(Yq,"__esModule",{value:!0});var HEt=ln(),UIe=HEt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});UIe.displayName="InternalStdinContext";Yq.default=UIe});var zq=_(Vq=>{"use strict";Object.defineProperty(Vq,"__esModule",{value:!0});var qEt=ln(),_Ie=qEt.createContext({stdout:void 0,write:()=>{}});_Ie.displayName="InternalStdoutContext";Vq.default=_Ie});var Xq=_(Jq=>{"use strict";Object.defineProperty(Jq,"__esModule",{value:!0});var jEt=ln(),HIe=jEt.createContext({stderr:void 0,write:()=>{}});HIe.displayName="InternalStderrContext";Jq.default=HIe});var Nk=_(Zq=>{"use strict";Object.defineProperty(Zq,"__esModule",{value:!0});var GEt=ln(),qIe=GEt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});qIe.displayName="InternalFocusContext";Zq.default=qIe});var GIe=_((KKt,jIe)=>{"use strict";var WEt=/[|\\{}()[\]^$+*?.-]/g;jIe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(WEt,"\\$&")}});var VIe=_((VKt,KIe)=>{"use strict";var YEt=GIe(),KEt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",YIe=[].concat(De("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));YIe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var $q=class t{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=t.nodeInternals()),"cwd"in e||(e.cwd=KEt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,VEt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...YIe]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(`
|
||||||
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let o=!1,a=null,n=[];return e.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u}
|
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let o=!1,a=null,n=[];return e.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u}
|
||||||
`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:o}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};qIe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(e){let r=e&&e.match(VEt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],w=r[9],D=r[10]==="native",b=r[11]===")",C,T={};if(E&&(T.line=Number(E)),w&&(T.column=Number(w)),b&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let J=h.slice(0,U-1);h=h.slice(U+1),a+=` (${J}`;break}}if(a){let N=a.match(KEt);N&&(a=N[1],C=N[2])}return qIe(T,h,this._cwd),o&&(T.constructor=!0),n&&(T.evalOrigin=n,T.evalLine=A,T.evalColumn=p,T.evalFile=u&&u.replace(/\\/g,"/")),D&&(T.native=!0),a&&(T.function=a),C&&a!==C&&(T.method=C),T}};function qIe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function YEt(t){if(t.length===0)return[];let e=t.map(r=>GEt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var VEt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),KEt=/^(.*?) \[as (.*?)\]$/;GIe.exports=Xq});var VIe=_((UVt,YIe)=>{"use strict";YIe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var JIe=_((_Vt,KIe)=>{"use strict";var JEt=VIe(),zEt=(t,e)=>{let r=[],o=t-e,a=t+e;for(let n=o;n<=a;n++)r.push(n);return r};KIe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=JEt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},zEt(e,r.around).filter(o=>t[o-1]!==void 0).map(o=>({line:o,value:t[o-1]}))}});var LQ=_(lu=>{"use strict";var XEt=lu&&lu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),ZEt=lu&&lu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$Et=lu&&lu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&XEt(e,t,r);return ZEt(e,t),e},eCt=lu&&lu.__rest||function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(t);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(r[o[a]]=t[o[a]]);return r};Object.defineProperty(lu,"__esModule",{value:!0});var zIe=$Et(ln()),Zq=zIe.forwardRef((t,e)=>{var{children:r}=t,o=eCt(t,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||o.padding||0,paddingBottom:o.paddingBottom||o.paddingY||o.padding||0});return zIe.default.createElement("ink-box",{ref:e,style:a},r)});Zq.displayName="Box";Zq.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};lu.default=Zq});var tj=_(HB=>{"use strict";var $q=HB&&HB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(HB,"__esModule",{value:!0});var tCt=$q(ln()),SC=$q(FQ()),XIe=$q(Lq()),ej=({color:t,backgroundColor:e,dimColor:r,bold:o,italic:a,underline:n,strikethrough:u,inverse:A,wrap:p,children:h})=>{if(h==null)return null;let E=w=>(r&&(w=SC.default.dim(w)),t&&(w=XIe.default(w,t,"foreground")),e&&(w=XIe.default(w,e,"background")),o&&(w=SC.default.bold(w)),a&&(w=SC.default.italic(w)),n&&(w=SC.default.underline(w)),u&&(w=SC.default.strikethrough(w)),A&&(w=SC.default.inverse(w)),w);return tCt.default.createElement("ink-text",{style:{flexGrow:0,flexSLine truncated
|
`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:o}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};WIe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(e){let r=e&&e.match(zEt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],w=r[9],D=r[10]==="native",b=r[11]===")",C,T={};if(E&&(T.line=Number(E)),w&&(T.column=Number(w)),b&&h){let L=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")L++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(L--,L===-1&&h.charAt(U-1)===" ")){let z=h.slice(0,U-1);h=h.slice(U+1),a+=` (${z}`;break}}if(a){let L=a.match(JEt);L&&(a=L[1],C=L[2])}return WIe(T,h,this._cwd),o&&(T.constructor=!0),n&&(T.evalOrigin=n,T.evalLine=A,T.evalColumn=p,T.evalFile=u&&u.replace(/\\/g,"/")),D&&(T.native=!0),a&&(T.function=a),C&&a!==C&&(T.method=C),T}};function WIe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function VEt(t){if(t.length===0)return[];let e=t.map(r=>YEt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var zEt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),JEt=/^(.*?) \[as (.*?)\]$/;KIe.exports=$q});var JIe=_((zKt,zIe)=>{"use strict";zIe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var ZIe=_((JKt,XIe)=>{"use strict";var XEt=JIe(),ZEt=(t,e)=>{let r=[],o=t-e,a=t+e;for(let n=o;n<=a;n++)r.push(n);return r};XIe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=XEt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},ZEt(e,r.around).filter(o=>t[o-1]!==void 0).map(o=>({line:o,value:t[o-1]}))}});var Lk=_(lu=>{"use strict";var $Et=lu&&lu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),eCt=lu&&lu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tCt=lu&&lu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&$Et(e,t,r);return eCt(e,t),e},rCt=lu&&lu.__rest||function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(t);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(r[o[a]]=t[o[a]]);return r};Object.defineProperty(lu,"__esModule",{value:!0});var $Ie=tCt(ln()),ej=$Ie.forwardRef((t,e)=>{var{children:r}=t,o=rCt(t,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||o.padding||0,paddingBottom:o.paddingBottom||o.paddingY||o.padding||0});return $Ie.default.createElement("ink-box",{ref:e,style:a},r)});ej.displayName="Box";ej.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};lu.default=ej});var nj=_(HB=>{"use strict";var tj=HB&&HB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(HB,"__esModule",{value:!0});var nCt=tj(ln()),xC=tj(Rk()),ewe=tj(Oq()),rj=({color:t,backgroundColor:e,dimColor:r,bold:o,italic:a,underline:n,strikethrough:u,inverse:A,wrap:p,children:h})=>{if(h==null)return null;let E=w=>(r&&(w=xC.default.dim(w)),t&&(w=ewe.default(w,t,"foreground")),e&&(w=ewe.default(w,e,"background")),o&&(w=xC.default.bold(w)),a&&(w=xC.default.italic(w)),n&&(w=xC.default.underline(w)),u&&(w=xC.default.strikethrough(w)),A&&(w=xC.default.inverse(w)),w);return nCt.default.createElement("ink-text",{style:{flexGrow:0,flexSLine truncated
|
||||||
`).slice(1):void 0,r=e?ewe.parseLine(e[0]):void 0,o,a=0;if(r?.file&&r?.line&&ZIe.existsSync(r.file)){let n=ZIe.readFileSync(r.file,"utf8");if(o=sCt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return ps.default.createElement(Jf.default,{flexDirection:"column",padding:1},ps.default.createElement(Jf.default,null,ps.default.createElement(mA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),ps.default.createElement(mA.default,null," ",t.message)),r&&ps.default.createElement(Jf.default,{marginTop:1},ps.default.createElement(mA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&ps.default.createElement(Jf.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>ps.default.createElement(Jf.default,{key:n},ps.default.createElement(Jf.default,{width:a+1},ps.default.createElement(mA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),ps.default.createElement(mA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),t.stack&&ps.default.createElement(Jf.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
|
`).slice(1):void 0,r=e?nwe.parseLine(e[0]):void 0,o,a=0;if(r?.file&&r?.line&&twe.existsSync(r.file)){let n=twe.readFileSync(r.file,"utf8");if(o=aCt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return ps.default.createElement(Jf.default,{flexDirection:"column",padding:1},ps.default.createElement(Jf.default,null,ps.default.createElement(mA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),ps.default.createElement(mA.default,null," ",t.message)),r&&ps.default.createElement(Jf.default,{marginTop:1},ps.default.createElement(mA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&ps.default.createElement(Jf.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>ps.default.createElement(Jf.default,{key:n},ps.default.createElement(Jf.default,{width:a+1},ps.default.createElement(mA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),ps.default.createElement(mA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),t.stack&&ps.default.createElement(Jf.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
|
||||||
`).slice(1).map(n=>{let u=ewe.parseLine(n);return u?ps.default.createElement(Jf.default,{key:n},ps.default.createElement(mA.default,{dimColor:!0},"- "),ps.default.createElement(mA.default,{dimColor:!0,bold:!0},u.function),ps.default.createElement(mA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):ps.default.createElement(Jf.default,{key:n},ps.default.createElement(mA.default,{dimColor:!0},"- "),ps.default.createElement(mA.default,{dimColor:!0,bold:!0},n))})))};cu.default=oCt});var nwe=_(uu=>{"use strict";var aCt=uu&&uu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),lCt=uu&&uu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cCt=uu&&uu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&aCt(e,t,r);return lCt(e,t),e},ad=uu&&uu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uu,"__esModule",{value:!0});var od=cCt(ln()),rwe=ad(Z6()),uCt=ad(jq()),ACt=ad(Wq()),fCt=ad(Vq()),pCt=ad(Jq()),hCt=ad(TQ()),gCt=ad(twe()),dCt=" ",mCt="\x1B[Z",yCt="\x1B",NQ=class extends od.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
`).slice(1).map(n=>{let u=nwe.parseLine(n);return u?ps.default.createElement(Jf.default,{key:n},ps.default.createElement(mA.default,{dimColor:!0},"- "),ps.default.createElement(mA.default,{dimColor:!0,bold:!0},u.function),ps.default.createElement(mA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):ps.default.createElement(Jf.default,{key:n},ps.default.createElement(mA.default,{dimColor:!0},"- "),ps.default.createElement(mA.default,{dimColor:!0,bold:!0},n))})))};cu.default=lCt});var owe=_(uu=>{"use strict";var cCt=uu&&uu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),uCt=uu&&uu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ACt=uu&&uu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&cCt(e,t,r);return uCt(e,t),e},cd=uu&&uu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uu,"__esModule",{value:!0});var ld=ACt(ln()),swe=cd(eq()),fCt=cd(Wq()),pCt=cd(Kq()),hCt=cd(zq()),gCt=cd(Xq()),dCt=cd(Nk()),mCt=cd(iwe()),yCt=" ",ECt="\x1B[Z",CCt="\x1B",Ok=class extends ld.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
||||||
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
|
||||||
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===yCt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===dCt&&this.focusNext(),e===mCt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=e=>{this.setState(r=>r.focusables.some(a=>a?.id===e)?{activeFocusId:e}:r)},this.focusNext=()=>{this.setState(e=>{var r;let o=(r=e.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(e)||o}})},this.focusPrevious=()=>{this.setState(e=>{var r;let o=(r=e.focusables[e.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(e)||o}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(o=>{let a=o.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...o.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{var r;let o=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=o+1;a<e.focusables.length;a++)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id},this.findPreviousFocusable=e=>{var r;let o=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=o-1;a>=0;a--)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return od.default.createElement(uCt.default.Provider,{value:{exit:this.handleExit}},od.default.createElement(ACt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},od.default.createElement(fCt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},od.default.createElement(pCt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},od.default.createElement(hCt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?od.default.createElement(gCt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){rwe.default.hide(this.props.stdout)}componentWillUnmount(){rwe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};uu.default=NQ;NQ.displayName="InternalApp"});var owe=_(Au=>{"use strict";var ECt=Au&&Au.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),CCt=Au&&Au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ICt=Au&&Au.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&ECt(e,t,r);return CCt(e,t),e},fu=Au&&Au.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Au,"__esModule",{value:!0});var wCt=fu(ln()),iwe=WM(),BCt=fu(tCe()),vCt=fu(V6()),DCt=fu(aCe()),SCt=fu(cCe()),rj=fu(tIe()),PCt=fu(kIe()),xCt=fu(X6()),bCt=fu(TIe()),kCt=ICt(xq()),QCt=fu(Hq()),FCt=fu(nwe()),PC=process.env.CI==="false"?!1:DCt.default,swe=()=>{},nj=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:o,staticOutput:a}=PCt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===CCt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===yCt&&this.focusNext(),e===ECt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=e=>{this.setState(r=>r.focusables.some(a=>a?.id===e)?{activeFocusId:e}:r)},this.focusNext=()=>{this.setState(e=>{var r;let o=(r=e.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(e)||o}})},this.focusPrevious=()=>{this.setState(e=>{var r;let o=(r=e.focusables[e.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(e)||o}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(o=>{let a=o.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...o.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{var r;let o=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=o+1;a<e.focusables.length;a++)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id},this.findPreviousFocusable=e=>{var r;let o=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=o-1;a>=0;a--)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return ld.default.createElement(fCt.default.Provider,{value:{exit:this.handleExit}},ld.default.createElement(pCt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},ld.default.createElement(hCt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},ld.default.createElement(gCt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},ld.default.createElement(dCt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?ld.default.createElement(mCt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){swe.default.hide(this.props.stdout)}componentWillUnmount(){swe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};uu.default=Ok;Ok.displayName="InternalApp"});var cwe=_(Au=>{"use strict";var ICt=Au&&Au.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),wCt=Au&&Au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),BCt=Au&&Au.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&ICt(e,t,r);return wCt(e,t),e},fu=Au&&Au.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Au,"__esModule",{value:!0});var vCt=fu(ln()),awe=KM(),DCt=fu(iCe()),PCt=fu(z6()),SCt=fu(uCe()),xCt=fu(fCe()),ij=fu(iIe()),bCt=fu(RIe()),QCt=fu($6()),kCt=fu(OIe()),FCt=BCt(Qq()),RCt=fu(jq()),TCt=fu(owe()),bC=process.env.CI==="false"?!1:SCt.default,lwe=()=>{},sj=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:o,staticOutput:a}=bCt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`
|
||||||
`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(PC){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(vCt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},SCt.default(this),this.options=e,this.rootNode=kCt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:iwe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=BCt.default.create(e.stdout),this.throttledLog=e.debug?this.log:iwe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=rj.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=xCt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),PC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=wCt.default.createElement(FCt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);rj.default.updateContainer(r,this.container,null,swe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(PC){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(PC){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),PC?this.options.stdout.write(this.lastOutput+`
|
`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(bC){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(PCt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},xCt.default(this),this.options=e,this.rootNode=FCt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:awe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=DCt.default.create(e.stdout),this.throttledLog=e.debug?this.log:awe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=ij.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=QCt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),bC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=vCt.default.createElement(TCt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);ij.default.updateContainer(r,this.container,null,lwe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(bC){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(bC){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),bC?this.options.stdout.write(this.lastOutput+`
|
||||||
`):this.options.debug||this.log.done(),this.isUnmounted=!0,rj.default.updateContainer(null,this.container,null,swe),QCt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!PC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=bCt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};Au.default=nj});var lwe=_(jB=>{"use strict";var awe=jB&&jB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jB,"__esModule",{value:!0});var RCt=awe(owe()),OQ=awe(Hq()),TCt=ve("stream"),LCt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},NCt(e)),o=OCt(r.stdout,()=>new RCt.default(r));return o.render(t),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>OQ.default.delete(r.stdout),clear:o.clear}};jB.default=LCt;var NCt=(t={})=>t instanceof TCt.Stream?{stdout:t,stdin:process.stdin}:t,OCt=(t,e)=>{let r;return OQ.default.has(t)?r=OQ.default.get(t):(r=e(),OQ.default.set(t,r)),r}});var uwe=_(zf=>{"use strict";var MCt=zf&&zf.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),UCt=zf&&zf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_Ct=zf&&zf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&MCt(e,t,r);return UCt(e,t),e};Object.defineProperty(zf,"__esModule",{value:!0});var GB=_Ct(ln()),cwe=t=>{let{items:e,children:r,style:o}=t,[a,n]=GB.useState(0),u=GB.useMemo(()=>e.slice(a),[e,a]);GB.useLayoutEffect(()=>{n(e.length)},[e.length]);let A=u.map((h,E)=>r(h,a+E)),p=GB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return GB.default.createElement("ink-box",{internal_static:!0,style:p},A)};cwe.displayName="Static";zf.default=cwe});var fwe=_(WB=>{"use strict";var HCt=WB&&WB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(WB,"__esModule",{value:!0});var qCt=HCt(ln()),Awe=({children:t,transform:e})=>t==null?null:qCt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);Awe.displayName="Transform";WB.default=Awe});var hwe=_(YB=>{"use strict";var jCt=YB&&YB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(YB,"__esModule",{value:!0});var GCt=jCt(ln()),pwe=({count:t=1})=>GCt.default.createElement("ink-text",null,`
|
`):this.options.debug||this.log.done(),this.isUnmounted=!0,ij.default.updateContainer(null,this.container,null,lwe),RCt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!bC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=kCt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};Au.default=sj});var Awe=_(jB=>{"use strict";var uwe=jB&&jB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jB,"__esModule",{value:!0});var NCt=uwe(cwe()),Mk=uwe(jq()),LCt=De("stream"),OCt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},MCt(e)),o=UCt(r.stdout,()=>new NCt.default(r));return o.render(t),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>Mk.default.delete(r.stdout),clear:o.clear}};jB.default=OCt;var MCt=(t={})=>t instanceof LCt.Stream?{stdout:t,stdin:process.stdin}:t,UCt=(t,e)=>{let r;return Mk.default.has(t)?r=Mk.default.get(t):(r=e(),Mk.default.set(t,r)),r}});var pwe=_(Xf=>{"use strict";var _Ct=Xf&&Xf.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),HCt=Xf&&Xf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qCt=Xf&&Xf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&_Ct(e,t,r);return HCt(e,t),e};Object.defineProperty(Xf,"__esModule",{value:!0});var GB=qCt(ln()),fwe=t=>{let{items:e,children:r,style:o}=t,[a,n]=GB.useState(0),u=GB.useMemo(()=>e.slice(a),[e,a]);GB.useLayoutEffect(()=>{n(e.length)},[e.length]);let A=u.map((h,E)=>r(h,a+E)),p=GB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return GB.default.createElement("ink-box",{internal_static:!0,style:p},A)};fwe.displayName="Static";Xf.default=fwe});var gwe=_(WB=>{"use strict";var jCt=WB&&WB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(WB,"__esModule",{value:!0});var GCt=jCt(ln()),hwe=({children:t,transform:e})=>t==null?null:GCt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);hwe.displayName="Transform";WB.default=hwe});var mwe=_(YB=>{"use strict";var WCt=YB&&YB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(YB,"__esModule",{value:!0});var YCt=WCt(ln()),dwe=({count:t=1})=>YCt.default.createElement("ink-text",null,`
|
||||||
`.repeat(t));pwe.displayName="Newline";YB.default=pwe});var mwe=_(VB=>{"use strict";var gwe=VB&&VB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(VB,"__esModule",{value:!0});var WCt=gwe(ln()),YCt=gwe(LQ()),dwe=()=>WCt.default.createElement(YCt.default,{flexGrow:1});dwe.displayName="Spacer";VB.default=dwe});var MQ=_(KB=>{"use strict";var VCt=KB&&KB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(KB,"__esModule",{value:!0});var KCt=ln(),JCt=VCt(Wq()),zCt=()=>KCt.useContext(JCt.default);KB.default=zCt});var Ewe=_(JB=>{"use strict";var XCt=JB&&JB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(JB,"__esModule",{value:!0});var ywe=ln(),ZCt=XCt(MQ()),$Ct=(t,e={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=ZCt.default();ywe.useEffect(()=>{if(e.isActive!==!1)return o(!0),()=>{o(!1)}},[e.isActive,o]),ywe.useEffect(()=>{if(e.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+97-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",E=A>="\u0410"&&A<="\u042F";A.length===1&&(h||E)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&t(A,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[e.isActive,r,a,t])};JB.default=$Ct});var Cwe=_(zB=>{"use strict";var eIt=zB&&zB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zB,"__esModule",{value:!0});var tIt=ln(),rIt=eIt(jq()),nIt=()=>tIt.useContext(rIt.default);zB.default=nIt});var Iwe=_(XB=>{"use strict";var iIt=XB&&XB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(XB,"__esModule",{value:!0});var sIt=ln(),oIt=iIt(Vq()),aIt=()=>sIt.useContext(oIt.default);XB.default=aIt});var wwe=_(ZB=>{"use strict";var lIt=ZB&&ZB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ZB,"__esModule",{value:!0});var cIt=ln(),uIt=lIt(Jq()),AIt=()=>cIt.useContext(uIt.default);ZB.default=AIt});var vwe=_(ev=>{"use strict";var Bwe=ev&&ev.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ev,"__esModule",{value:!0});var $B=ln(),fIt=Bwe(TQ()),pIt=Bwe(MQ()),hIt=({isActive:t=!0,autoFocus:e=!1,id:r}={})=>{let{isRawModeSupported:o,setRawMode:a}=pIt.default(),{activeId:n,add:u,remove:A,activate:p,deactivate:h,focus:E}=$B.useContext(fIt.default),w=$B.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return $B.useEffect(()=>(u(w,{autoFocus:e}),()=>{A(w)}),[w,e]),$B.useEffect(()=>{t?p(w):h(w)},[t,w]),$B.useEffect(()=>{if(!(!o||!t))return a(!0),()=>{a(!1)}},[t]),{isFocused:!!w&&n===w,focus:E}};ev.default=hIt});var Dwe=_(tv=>{"use strict";var gIt=tv&&tv.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tv,"__esModule",{value:!0});var dIt=ln(),mIt=gIt(TQ()),yIt=()=>{let t=dIt.useContext(mIt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious,focus:t.focus}};tv.default=yIt});var Swe=_(ij=>{"use strict";Object.defineProperty(ij,"__esModule",{value:!0});ij.default=t=>{var e,r,o,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=t.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var ac=_(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var EIt=lwe();Object.defineProperty(Js,"render",{enumerable:!0,get:function(){return EIt.default}});var CIt=LQ();Object.defineProperty(Js,"Box",{enumerable:!0,get:function(){return CIt.default}});var IIt=tj();Object.defineProperty(Js,"Text",{enumerable:!0,get:function(){return IIt.default}});var wIt=uwe();Object.defineProperty(Js,"Static",{enumerable:!0,get:function(){return wIt.default}});var BIt=fwe();Object.defineProperty(Js,"Transform",{enumerable:!0,get:function(){return BIt.default}});var vIt=hwe();Object.defineProperty(Js,"Newline",{enumerable:!0,get:function(){return vIt.default}});var DIt=mwe();Object.defineProperty(Js,"Spacer",{enumerable:!0,get:function(){return DIt.default}});var SIt=Ewe();Object.defineProperty(Js,"useInput",{enumerable:!0,get:function(){return SIt.default}});var PIt=Cwe();Object.defineProperty(Js,"useApp",{enumerable:!0,get:function(){return PIt.default}});var xIt=MQ();Object.defineProperty(Js,"useStdin",{enumerable:!0,get:function(){return xIt.default}});var bIt=Iwe();Object.defineProperty(Js,"useStdout",{enumerable:!0,get:function(){return bIt.default}});var kIt=wwe();Object.defineProperty(Js,"useStderr",{enumerable:!0,get:function(){
Line truncated
|
`.repeat(t));dwe.displayName="Newline";YB.default=dwe});var Cwe=_(KB=>{"use strict";var ywe=KB&&KB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(KB,"__esModule",{value:!0});var KCt=ywe(ln()),VCt=ywe(Lk()),Ewe=()=>KCt.default.createElement(VCt.default,{flexGrow:1});Ewe.displayName="Spacer";KB.default=Ewe});var Uk=_(VB=>{"use strict";var zCt=VB&&VB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(VB,"__esModule",{value:!0});var JCt=ln(),XCt=zCt(Kq()),ZCt=()=>JCt.useContext(XCt.default);VB.default=ZCt});var wwe=_(zB=>{"use strict";var $Ct=zB&&zB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zB,"__esModule",{value:!0});var Iwe=ln(),eIt=$Ct(Uk()),tIt=(t,e={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=eIt.default();Iwe.useEffect(()=>{if(e.isActive!==!1)return o(!0),()=>{o(!1)}},[e.isActive,o]),Iwe.useEffect(()=>{if(e.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+97-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",E=A>="\u0410"&&A<="\u042F";A.length===1&&(h||E)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&t(A,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[e.isActive,r,a,t])};zB.default=tIt});var Bwe=_(JB=>{"use strict";var rIt=JB&&JB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(JB,"__esModule",{value:!0});var nIt=ln(),iIt=rIt(Wq()),sIt=()=>nIt.useContext(iIt.default);JB.default=sIt});var vwe=_(XB=>{"use strict";var oIt=XB&&XB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(XB,"__esModule",{value:!0});var aIt=ln(),lIt=oIt(zq()),cIt=()=>aIt.useContext(lIt.default);XB.default=cIt});var Dwe=_(ZB=>{"use strict";var uIt=ZB&&ZB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ZB,"__esModule",{value:!0});var AIt=ln(),fIt=uIt(Xq()),pIt=()=>AIt.useContext(fIt.default);ZB.default=pIt});var Swe=_(ev=>{"use strict";var Pwe=ev&&ev.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ev,"__esModule",{value:!0});var $B=ln(),hIt=Pwe(Nk()),gIt=Pwe(Uk()),dIt=({isActive:t=!0,autoFocus:e=!1,id:r}={})=>{let{isRawModeSupported:o,setRawMode:a}=gIt.default(),{activeId:n,add:u,remove:A,activate:p,deactivate:h,focus:E}=$B.useContext(hIt.default),w=$B.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return $B.useEffect(()=>(u(w,{autoFocus:e}),()=>{A(w)}),[w,e]),$B.useEffect(()=>{t?p(w):h(w)},[t,w]),$B.useEffect(()=>{if(!(!o||!t))return a(!0),()=>{a(!1)}},[t]),{isFocused:!!w&&n===w,focus:E}};ev.default=dIt});var xwe=_(tv=>{"use strict";var mIt=tv&&tv.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tv,"__esModule",{value:!0});var yIt=ln(),EIt=mIt(Nk()),CIt=()=>{let t=yIt.useContext(EIt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious,focus:t.focus}};tv.default=CIt});var bwe=_(oj=>{"use strict";Object.defineProperty(oj,"__esModule",{value:!0});oj.default=t=>{var e,r,o,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=t.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var ac=_(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});var IIt=Awe();Object.defineProperty(zs,"render",{enumerable:!0,get:function(){return IIt.default}});var wIt=Lk();Object.defineProperty(zs,"Box",{enumerable:!0,get:function(){return wIt.default}});var BIt=nj();Object.defineProperty(zs,"Text",{enumerable:!0,get:function(){return BIt.default}});var vIt=pwe();Object.defineProperty(zs,"Static",{enumerable:!0,get:function(){return vIt.default}});var DIt=gwe();Object.defineProperty(zs,"Transform",{enumerable:!0,get:function(){return DIt.default}});var PIt=mwe();Object.defineProperty(zs,"Newline",{enumerable:!0,get:function(){return PIt.default}});var SIt=Cwe();Object.defineProperty(zs,"Spacer",{enumerable:!0,get:function(){return SIt.default}});var xIt=wwe();Object.defineProperty(zs,"useInput",{enumerable:!0,get:function(){return xIt.default}});var bIt=Bwe();Object.defineProperty(zs,"useApp",{enumerable:!0,get:function(){return bIt.default}});var QIt=Uk();Object.defineProperty(zs,"useStdin",{enumerable:!0,get:function(){return QIt.default}});var kIt=vwe();Object.defineProperty(zs,"useStdout",{enumerable:!0,get:function(){return kIt.default}});var FIt=Dwe();Object.defineProperty(zs,"useStderr",{enumerable:!0,get:function(){
Line truncated
|
||||||
`:"";return u?w+=`@IF EXIST ${u} (\r
|
`:"";return u?w+=`@IF EXIST ${u} (\r
|
||||||
${u} ${p} ${a} ${E}%*\r
|
${u} ${p} ${a} ${E}%*\r
|
||||||
) ELSE (\r
|
) ELSE (\r
|
||||||
@@ -334,7 +334,7 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|||||||
${A} ${p} ${a} ${E}%*\r
|
${A} ${p} ${a} ${E}%*\r
|
||||||
)\r
|
)\r
|
||||||
`:w+=`@${A} ${p} ${a} ${E}%*\r
|
`:w+=`@${A} ${p} ${a} ${E}%*\r
|
||||||
`,w}function Gwt(t,e,r){let o=cc.relative(cc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=cc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=Vj(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh
|
`,w}function Ywt(t,e,r){let o=cc.relative(cc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=cc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=zj(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
|
||||||
|
|
||||||
case \`uname\` in
|
case \`uname\` in
|
||||||
@@ -349,7 +349,7 @@ else
|
|||||||
fi
|
fi
|
||||||
`:E+=`${w}${a} ${A} ${o} ${h}"$@"
|
`:E+=`${w}${a} ${A} ${o} ${h}"$@"
|
||||||
exit $?
|
exit $?
|
||||||
`,E}function Wwt(t,e,r){let o=cc.relative(cc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=cc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=Vj(r.nodePath),E=h.win32,w=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let D=r.progArgs?`${r.progArgs.join(" ")} `:"",b=`#!/usr/bin/env pwsh
|
`,E}function Kwt(t,e,r){let o=cc.relative(cc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=cc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=zj(r.nodePath),E=h.win32,w=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let D=r.progArgs?`${r.progArgs.join(" ")} `:"",b=`#!/usr/bin/env pwsh
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
$exe=""
|
$exe=""
|
||||||
@@ -391,47 +391,47 @@ if ($MyInvocation.ExpectingInput) {
|
|||||||
}
|
}
|
||||||
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
||||||
`:""}exit $LASTEXITCODE
|
`:""}exit $LASTEXITCODE
|
||||||
`,b}function Ywt(t,e){return e.fs_.chmod(t,493)}function Vj(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(cc.delimiter):Array.from(t),r={};for(let o=0;o<e.length;o++){let a=e[o].split("/").join("\\"),n=_1e()?e[o].split("\\").join("/").replace(/^([^:\\/]*):/,(u,A)=>`/mnt/${A.toLowerCase()}`):e[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}q1e.exports=Yj});var aG=_((KZt,c2e)=>{c2e.exports=ve("stream")});var p2e=_((JZt,f2e)=>{"use strict";function u2e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function E1t(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?u2e(Object(r),!0).forEach(function(o){C1t(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u2e(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function C1t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function I1t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A2e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function w1t(t,e,r){return e&&A2e(t.prototype,e),r&&A2e(t,r),t}var B1t=ve("buffer"),sF=B1t.Buffer,v1t=ve("util"),lG=v1t.inspect,D1t=lG&&lG.custom||"inspect";function S1t(t,e,r){sF.prototype.copy.call(t,e,r)}f2e.exports=function(){function t(){I1t(this,t),this.head=null,this.tail=null,this.length=0}return w1t(t,[{key:"push",value:function(r){var o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return sF.alloc(0);for(var o=sF.allocUnsafe(r>>>0),a=this.head,n=0;a;)S1t(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=o?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var o=this.head,a=1,n=o.data;for(r-=n.length;o=o.next;){var u=o.data,A=r>u.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=sF.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:D1t,value:function(r,o){return lG(this,E1t({},o,{depth:0,customInspect:!1}))}}]),t}()});var uG=_((zZt,g2e)=>{"use strict";function P1t(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(cG,this,t)):process.nextTick(cG,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(oF,r):(r._writableState.errorEmitted=!0,process.nextTick(h2e,r,n)):process.nextTick(h2e,r,n):e?(process.nextTick(oF,r),e(n)):process.nextTick(oF,r)}),this)}function h2e(t,e){cG(t,e),oF(t)}function oF(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function x1t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function cG(t,e){t.emit("error",e)}function b1t(t,e){var r=t._readableState,o=t._writableState;r&&
Line truncated
|
`,b}function Vwt(t,e){return e.fs_.chmod(t,493)}function zj(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(cc.delimiter):Array.from(t),r={};for(let o=0;o<e.length;o++){let a=e[o].split("/").join("\\"),n=j1e()?e[o].split("\\").join("/").replace(/^([^:\\/]*):/,(u,A)=>`/mnt/${A.toLowerCase()}`):e[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}W1e.exports=Vj});var cG=_((i$t,f2e)=>{f2e.exports=De("stream")});var d2e=_((s$t,g2e)=>{"use strict";function p2e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function I1t(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?p2e(Object(r),!0).forEach(function(o){w1t(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p2e(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function w1t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B1t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h2e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function v1t(t,e,r){return e&&h2e(t.prototype,e),r&&h2e(t,r),t}var D1t=De("buffer"),oF=D1t.Buffer,P1t=De("util"),uG=P1t.inspect,S1t=uG&&uG.custom||"inspect";function x1t(t,e,r){oF.prototype.copy.call(t,e,r)}g2e.exports=function(){function t(){B1t(this,t),this.head=null,this.tail=null,this.length=0}return v1t(t,[{key:"push",value:function(r){var o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return oF.alloc(0);for(var o=oF.allocUnsafe(r>>>0),a=this.head,n=0;a;)x1t(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=o?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var o=this.head,a=1,n=o.data;for(r-=n.length;o=o.next;){var u=o.data,A=r>u.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=oF.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:S1t,value:function(r,o){return uG(this,I1t({},o,{depth:0,customInspect:!1}))}}]),t}()});var fG=_((o$t,y2e)=>{"use strict";function b1t(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(AG,this,t)):process.nextTick(AG,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(aF,r):(r._writableState.errorEmitted=!0,process.nextTick(m2e,r,n)):process.nextTick(m2e,r,n):e?(process.nextTick(aF,r),e(n)):process.nextTick(aF,r)}),this)}function m2e(t,e){AG(t,e),aF(t)}function aF(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Q1t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function AG(t,e){t.emit("error",e)}function k1t(t,e){var r=t._readableState,o=t._writableState;r&&
Line truncated
|
||||||
`)),t.linkname&&(e+=MG(" linkpath="+t.linkname+`
|
`)),t.linkname&&(e+=_G(" linkpath="+t.linkname+`
|
||||||
`));var r=t.pax;if(r)for(var o in r)e+=MG(" "+o+"="+r[o]+`
|
`));var r=t.pax;if(r)for(var o in r)e+=_G(" "+o+"="+r[o]+`
|
||||||
`);return Buffer.from(e)};GC.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var o=parseInt(t.slice(0,r).toString(),10);if(!o)return e;var a=t.slice(r+1,o-1).toString(),n=a.indexOf("=");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(o)}return e};GC.encode=function(t){var e=IBt(512),r=t.name,o="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(t0(t.mode&PBt,6),100),e.write(t0(t.uid,6),108),e.write(t0(t.gid,6),116),e.write(t0(t.size,11),124),e.write(t0(t.mtime.getTime()/1e3|0,11),136),e[156]=gBe+kBt(t.type),t.linkname&&e.write(t.linkname,157),dBe.copy(e,jv),vBt.copy(e,UG),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(t0(t.devmajor||0,6),329),e.write(t0(t.devminor||0,6),337),o&&e.write(o,345),e.write(t0(yBe(e),6),148),e)};GC.decode=function(t,e,r){var o=t[156]===0?0:t[156]-gBe,a=jC(t,0,100,e),n=r0(t,100,8),u=r0(t,108,8),A=r0(t,116,8),p=r0(t,124,12),h=r0(t,136,12),E=bBt(o),w=t[157]===0?null:jC(t,157,100,e),D=jC(t,265,32),b=jC(t,297,32),C=r0(t,329,8),T=r0(t,337,8),N=yBe(t);if(N===8*32)return null;if(N!==r0(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(dBe.compare(t,jv,jv+6)===0)t[345]&&(a=jC(t,345,155,e)+"/"+a);else if(!(DBt.compare(t,jv,jv+6)===0&&SBt.compare(t,UG,UG+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:E,linkname:w,uname:D,gname:b,devmajor:C,devminor:T}}});var DBe=_((d$t,vBe)=>{var CBe=ve("util"),FBt=hBe(),Gv=_G(),IBe=qC().Writable,wBe=qC().PassThrough,BBe=function(){},EBe=function(t){return t&=511,t&&512-t},RBt=function(t,e){var r=new IF(t,e);return r.end(),r},TBt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},IF=function(t,e){this._parent=t,this.offset=e,wBe.call(this,{autoDestroy:!1})};CBe.inherits(IF,wBe);IF.prototype.destroy=function(t){this._parent.destroy(t)};var sp=function(t){if(!(this instanceof sp))return new sp(t);IBe.call(this,t),t=t||{},this._offset=0,this._buffer=FBt(),this._missing=0,this._partial=!1,this._onparse=BBe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,o=function(){e._continue()},a=function(D){if(e._locked=!1,D)return e.destroy(D);e._stream||o()},n=function(){e._stream=null;var D=EBe(e._header.size);D?e._parse(D,u):e._parse(512,w),e._locked||o()},u=function(){e._buffer.consume(EBe(e._header.size)),e._parse(512,w),o()},A=function(){var D=e._header.size;e._paxGlobal=Gv.decodePax(r.slice(0,D)),r.consume(D),n()},p=function(){var D=e._header.size;e._pax=Gv.decodePax(r.slice(0,D)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(D),n()},h=function(){var D=e._header.size;this._gnuLongPath=Gv.decodeLongPath(r.slice(0,D),t.filenameEncoding),r.consume(D),n()},E=function(){var D=e._header.size;this._gnuLongLinkPath=Gv.decodeLongPath(r.slice(0,D),t.filenameEncoding),r.consume(D),n()},w=function(){var D=e._offset,b;try{b=e._header=Gv.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(C){e.emit("error",C)}if(r.consume(512),!b){e._parse(512,w),o();return}if(b.type==="gnu-long-path"){e._parse(b.size,h),o();return}if(b.type==="gnu-long-link-path"){e._parse(b.size,E),o();return}if(b.type==="pax-global-header"){e._parse(b.size,A),o();return}if(b.type==="pax-header"){e._parse(b.size,p),o();return}if(e._gnuLongPath&&(b.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(b.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=b=TBt(b,e._pax),e._pax=null),e._locked=!0,!b.size||b.type==="directory"){e._parse(512,w),e.emit("entry",b,RBt(e,D),a);return}e._stream=new IF(e,D),e.emit("entry",b,e._stream,a),e._parse(b.size,n),o()};this._onheader=w,this._parse(512,w)};CBe.inherits(sp,IBe);sp.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};sp.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};sp.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=BBe,this._overflow?this._write(this._overflow,void 0,t):t()}};sp.prototype._write=function(t,e,r){if(!this._destroyed){var o=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.length<n)return this._missing-=t.length,this._overflow=null,o?o.write(t,r):(a.append(t),
Line truncated
|
`);return Buffer.from(e)};YC.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var o=parseInt(t.slice(0,r).toString(),10);if(!o)return e;var a=t.slice(r+1,o-1).toString(),n=a.indexOf("=");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(o)}return e};YC.encode=function(t){var e=BBt(512),r=t.name,o="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(n0(t.mode&bBt,6),100),e.write(n0(t.uid,6),108),e.write(n0(t.gid,6),116),e.write(n0(t.size,11),124),e.write(n0(t.mtime.getTime()/1e3|0,11),136),e[156]=yBe+FBt(t.type),t.linkname&&e.write(t.linkname,157),EBe.copy(e,jv),PBt.copy(e,HG),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(n0(t.devmajor||0,6),329),e.write(n0(t.devminor||0,6),337),o&&e.write(o,345),e.write(n0(IBe(e),6),148),e)};YC.decode=function(t,e,r){var o=t[156]===0?0:t[156]-yBe,a=WC(t,0,100,e),n=i0(t,100,8),u=i0(t,108,8),A=i0(t,116,8),p=i0(t,124,12),h=i0(t,136,12),E=kBt(o),w=t[157]===0?null:WC(t,157,100,e),D=WC(t,265,32),b=WC(t,297,32),C=i0(t,329,8),T=i0(t,337,8),L=IBe(t);if(L===8*32)return null;if(L!==i0(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(EBe.compare(t,jv,jv+6)===0)t[345]&&(a=WC(t,345,155,e)+"/"+a);else if(!(SBt.compare(t,jv,jv+6)===0&&xBt.compare(t,HG,HG+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:E,linkname:w,uname:D,gname:b,devmajor:C,devminor:T}}});var xBe=_((P$t,SBe)=>{var BBe=De("util"),TBt=mBe(),Gv=qG(),vBe=GC().Writable,DBe=GC().PassThrough,PBe=function(){},wBe=function(t){return t&=511,t&&512-t},NBt=function(t,e){var r=new wF(t,e);return r.end(),r},LBt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},wF=function(t,e){this._parent=t,this.offset=e,DBe.call(this,{autoDestroy:!1})};BBe.inherits(wF,DBe);wF.prototype.destroy=function(t){this._parent.destroy(t)};var op=function(t){if(!(this instanceof op))return new op(t);vBe.call(this,t),t=t||{},this._offset=0,this._buffer=TBt(),this._missing=0,this._partial=!1,this._onparse=PBe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,o=function(){e._continue()},a=function(D){if(e._locked=!1,D)return e.destroy(D);e._stream||o()},n=function(){e._stream=null;var D=wBe(e._header.size);D?e._parse(D,u):e._parse(512,w),e._locked||o()},u=function(){e._buffer.consume(wBe(e._header.size)),e._parse(512,w),o()},A=function(){var D=e._header.size;e._paxGlobal=Gv.decodePax(r.slice(0,D)),r.consume(D),n()},p=function(){var D=e._header.size;e._pax=Gv.decodePax(r.slice(0,D)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(D),n()},h=function(){var D=e._header.size;this._gnuLongPath=Gv.decodeLongPath(r.slice(0,D),t.filenameEncoding),r.consume(D),n()},E=function(){var D=e._header.size;this._gnuLongLinkPath=Gv.decodeLongPath(r.slice(0,D),t.filenameEncoding),r.consume(D),n()},w=function(){var D=e._offset,b;try{b=e._header=Gv.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(C){e.emit("error",C)}if(r.consume(512),!b){e._parse(512,w),o();return}if(b.type==="gnu-long-path"){e._parse(b.size,h),o();return}if(b.type==="gnu-long-link-path"){e._parse(b.size,E),o();return}if(b.type==="pax-global-header"){e._parse(b.size,A),o();return}if(b.type==="pax-header"){e._parse(b.size,p),o();return}if(e._gnuLongPath&&(b.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(b.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=b=LBt(b,e._pax),e._pax=null),e._locked=!0,!b.size||b.type==="directory"){e._parse(512,w),e.emit("entry",b,NBt(e,D),a);return}e._stream=new wF(e,D),e.emit("entry",b,e._stream,a),e._parse(b.size,n),o()};this._onheader=w,this._parse(512,w)};BBe.inherits(op,vBe);op.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};op.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};op.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=PBe,this._overflow?this._write(this._overflow,void 0,t):t()}};op.prototype._write=function(t,e,r){if(!this._destroyed){var o=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.length<n)return this._missing-=t.length,this._overflow=null,o?o.write(t,r):(a.append(t),
Line truncated
|
||||||
Wanted: ${r.size}
|
Wanted: ${r.size}
|
||||||
Found: ${t.length}`);throw A.code="EBADSIZE",A.found=t.length,A.expected=r.size,A.sri=e,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=e,A.algorithm=o,A.sri=e,A}}DA.exports.checkStream=Avt;function Avt(t,e,r){r=na(r);let o=r.Promise||Promise,a=XG(r.concat({integrity:e}));return new o((n,u)=>{t.pipe(a),t.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}DA.exports.integrityStream=XG;function XG(t){t=na(t);let e=t.integrity&&vA(t.integrity,t),r=e&&Object.keys(e).length,o=r&&e.pickAlgorithm(t),a=r&&e[o],n=Array.from(new Set(t.algorithms.concat(o?[o]:[]))),u=n.map(Kv.createHash),A=0,p=new rvt({transform(h,E,w){A+=h.length,u.forEach(D=>D.update(h,E)),w(null,h,E)}}).on("end",()=>{let h=t.options&&t.options.length?`?${t.options.join("?")}`:"",E=vA(u.map((D,b)=>`${n[b]}-${D.digest("base64")}${h}`).join(" "),t),w=r&&E.match(e,t);if(typeof t.size=="number"&&A!==t.size){let D=new Error(`stream size mismatch when checking ${e}.
|
Found: ${t.length}`);throw A.code="EBADSIZE",A.found=t.length,A.expected=r.size,A.sri=e,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=e,A.algorithm=o,A.sri=e,A}}DA.exports.checkStream=pvt;function pvt(t,e,r){r=na(r);let o=r.Promise||Promise,a=$G(r.concat({integrity:e}));return new o((n,u)=>{t.pipe(a),t.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}DA.exports.integrityStream=$G;function $G(t){t=na(t);let e=t.integrity&&vA(t.integrity,t),r=e&&Object.keys(e).length,o=r&&e.pickAlgorithm(t),a=r&&e[o],n=Array.from(new Set(t.algorithms.concat(o?[o]:[]))),u=n.map(Vv.createHash),A=0,p=new ivt({transform(h,E,w){A+=h.length,u.forEach(D=>D.update(h,E)),w(null,h,E)}}).on("end",()=>{let h=t.options&&t.options.length?`?${t.options.join("?")}`:"",E=vA(u.map((D,b)=>`${n[b]}-${D.digest("base64")}${h}`).join(" "),t),w=r&&E.match(e,t);if(typeof t.size=="number"&&A!==t.size){let D=new Error(`stream size mismatch when checking ${e}.
|
||||||
Wanted: ${t.size}
|
Wanted: ${t.size}
|
||||||
Found: ${A}`);D.code="EBADSIZE",D.found=A,D.expected=t.size,D.sri=e,p.emit("error",D)}else if(t.integrity&&!w){let D=new Error(`${e} integrity checksum failed when using ${o}: wanted ${a} but got ${E}. (${A} bytes)`);D.code="EINTEGRITY",D.found=E,D.expected=a,D.algorithm=o,D.sri=e,p.emit("error",D)}else p.emit("size",A),p.emit("integrity",E),w&&p.emit("verified",w)});return p}DA.exports.create=fvt;function fvt(t){t=na(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(Kv.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return e.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new n0(`${A}-${p}${r}`,t);if(h.algorithm&&h.digest){let E=h.algorithm;u[E]||(u[E]=[]),u[E].push(h)}return u},new Cd)}}}var pvt=new Set(Kv.getHashes()),VBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>pvt.has(t));function hvt(t,e){return VBe.indexOf(t.toLowerCase())>=VBe.indexOf(e.toLowerCase())?t:e}});var Bve=_((qnr,wve)=>{var hDt=WN();function gDt(t){return hDt(t)?void 0:t}wve.exports=gDt});var Dve=_((jnr,vve)=>{var dDt=Cb(),mDt=hH(),yDt=yH(),EDt=Wg(),CDt=Eg(),IDt=Bve(),wDt=l8(),BDt=pH(),vDt=1,DDt=2,SDt=4,PDt=wDt(function(t,e){var r={};if(t==null)return r;var o=!1;e=dDt(e,function(n){return n=EDt(n,t),o||(o=n.length>1),n}),CDt(t,BDt(t),r),o&&(r=mDt(r,vDt|DDt|SDt,IDt));for(var a=e.length;a--;)yDt(r,e[a]);return r});vve.exports=PDt});St();Ve();St();var kve=ve("child_process"),Qve=et(sg());Gt();var oE=new Map([]);var P2={};Vt(P2,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>or,getCli:()=>qhe,getDynamicLibs:()=>Hhe,getPluginConfiguration:()=>lE,openWorkspace:()=>aE,pluginCommands:()=>oE,runExit:()=>Nk});Gt();var ut=class extends ot{constructor(){super(...arguments);this.cwd=de.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new it("The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path");return super.validateAndExecute()}};Ve();St();Gt();var or=class extends it{constructor(e,r){let o=V.relative(e,r),a=V.join(e,_t.fileName);super(`This command can only be run from within a workspace of your project (${o} isn't a workspace of ${a}).`)}};Ve();St();sA();Ol();z1();Gt();var PAt=et(ni());il();var Hhe=()=>new Map([["@yarnpkg/cli",P2],["@yarnpkg/core",S2],["@yarnpkg/fslib",Aw],["@yarnpkg/libzip",K1],["@yarnpkg/parsers",Ew],["@yarnpkg/shell",e2],["clipanion",Qw],["semver",PAt],["typanion",Yo]]);Ve();async function aE(t,e){let{project:r,workspace:o}=await Qt.find(t,e);if(!o)throw new or(r.cwd,e);return o}Ve();St();sA();Ol();z1();Gt();var NDt=et(ni());il();var MH={};Vt(MH,{AddCommand:()=>fE,BinCommand:()=>pE,CacheCleanCommand:()=>hE,ClipanionCommand:()=>CE,ConfigCommand:()=>yE,ConfigGetCommand:()=>gE,ConfigSetCommand:()=>dE,ConfigUnsetCommand:()=>mE,DedupeCommand:()=>EE,EntryCommand:()=>wE,ExecCommand:()=>vE,ExplainCommand:()=>PE,ExplainPeerRequirementsCommand:()=>DE,HelpCommand:()=>IE,InfoCommand:()=>xE,LinkCommand:()=>kE,NodeCommand:()=>QE,PluginCheckCommand:()=>FE,PluginImportCommand:()=>LE,PluginImportSourcesCommand:()=>NE,PluginListCommand:()=>RE,PluginRemoveCommand:()=>OE,PluginRuntimeCommand:()=>ME,RebuildCommand:()=>UE,RemoveCommand:()=>_E,RunCommand:()=>qE,RunIndexCommand:()=>HE,SetResolutionCommand:()=>jE,SetVersionCommand:()=>SE,SetVersionSourcesCommand:()=>TE,UnlinkCommand:()=>GE,UpCommand:()=>WE,VersionCommand:()=>BE,WhyCommand:()=>YE,WorkspaceCommand:()=>XE,WorkspacesListCommand:()=>zE,YarnCommand:()=>bE,dedupeUtils:()=>Yk,default:()=>Igt,suggestUtils:()=>nu});var Eme=et(sg());Ve();Ve();Ve();Gt();var bge=et(Q2());il();var nu={};Vt(nu,{Modifier:()=>lH,Strategy:()=>jk,Target:()=>F2,WorkspaceModifier:()=>vge,applyModifier:()=>Vft,extractDescriptorFromPath:()=>cH,extractRangeModifier:()=>Dge,fetchDescriptorFrom:()=>uH,findProjectDescriptors:()=>xge,getModifier:()=>R2,getSuggestedDescriptors:()=>T2,makeWorkspaceDescriptor:()=>Pge,toWorkspaceModifier:()=>Sge});Ve();Ve();St();var aH=et(ni()),Wft="workspace:",F2=(o=>(o.REGULAR="dependencies",o.DEVELOPMENT="devDependencies",o.PEER="peerDependencies",o))(F2||{}),lH=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="",o))(lH||{}),vge=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="*",o))(vge||{}),jk=(n=>(n.KEEP="keep",n.REUSE="reuse",n.PROJECT="project",n.LATEST="latest",n.CACHE="cache",n))(jk||{});function R2(t,e){return t.exact?"":t.caret?"^":t.tilde?"~":e.configuration.get("defaultSemverRangePrefix")}var Yft=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function Dge(t,{project:e}){let r=t.match(Yft);return r?r[1]:e.configuration.get("defaultSemverRangePrefix")}function Vft(t,e){let{protocol:r,source:o,params:a,selector:n}=G.parseRange(t.range);return aH.default.valid(n)&&(n=`${e}${t.range}`),G.makeDescriptor(t,G.makeRange({protocol:r,source:o,params:a,selector:n}))}function Sge(t){switch(t){case"^":return"^";case"~":retur
Line truncated
|
Found: ${A}`);D.code="EBADSIZE",D.found=A,D.expected=t.size,D.sri=e,p.emit("error",D)}else if(t.integrity&&!w){let D=new Error(`${e} integrity checksum failed when using ${o}: wanted ${a} but got ${E}. (${A} bytes)`);D.code="EINTEGRITY",D.found=E,D.expected=a,D.algorithm=o,D.sri=e,p.emit("error",D)}else p.emit("size",A),p.emit("integrity",E),w&&p.emit("verified",w)});return p}DA.exports.create=hvt;function hvt(t){t=na(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(Vv.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return e.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new s0(`${A}-${p}${r}`,t);if(h.algorithm&&h.digest){let E=h.algorithm;u[E]||(u[E]=[]),u[E].push(h)}return u},new wd)}}}var gvt=new Set(Vv.getHashes()),JBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>gvt.has(t));function dvt(t,e){return JBe.indexOf(t.toLowerCase())>=JBe.indexOf(e.toLowerCase())?t:e}});var Dve=_((Znr,vve)=>{var mDt=YL();function yDt(t){return mDt(t)?void 0:t}vve.exports=yDt});var Sve=_(($nr,Pve)=>{var EDt=Cb(),CDt=dH(),IDt=CH(),wDt=Kg(),BDt=Ig(),vDt=Dve(),DDt=u8(),PDt=gH(),SDt=1,xDt=2,bDt=4,QDt=DDt(function(t,e){var r={};if(t==null)return r;var o=!1;e=EDt(e,function(n){return n=wDt(n,t),o||(o=n.length>1),n}),BDt(t,PDt(t),r),o&&(r=CDt(r,SDt|xDt|bDt,vDt));for(var a=e.length;a--;)IDt(r,e[a]);return r});Pve.exports=QDt});Pt();Ve();Pt();var Fve=De("child_process"),Rve=et(ag());Gt();var lE=new Map([]);var S2={};Kt(S2,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>or,getCli:()=>Whe,getDynamicLibs:()=>Ghe,getPluginConfiguration:()=>uE,openWorkspace:()=>cE,pluginCommands:()=>lE,runExit:()=>OQ});Gt();var ut=class extends ot{constructor(){super(...arguments);this.cwd=ge.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new nt("The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path");return super.validateAndExecute()}};Ve();Pt();Gt();var or=class extends nt{constructor(e,r){let o=K.relative(e,r),a=K.join(e,_t.fileName);super(`This command can only be run from within a workspace of your project (${o} isn't a workspace of ${a}).`)}};Ve();Pt();sA();Ol();J1();Gt();var bAt=et(ni());il();var Ghe=()=>new Map([["@yarnpkg/cli",S2],["@yarnpkg/core",P2],["@yarnpkg/fslib",pw],["@yarnpkg/libzip",V1],["@yarnpkg/parsers",Iw],["@yarnpkg/shell",e2],["clipanion",Rw],["semver",bAt],["typanion",Yo]]);Ve();async function cE(t,e){let{project:r,workspace:o}=await kt.find(t,e);if(!o)throw new or(r.cwd,e);return o}Ve();Pt();sA();Ol();J1();Gt();var UDt=et(ni());il();var _H={};Kt(_H,{AddCommand:()=>hE,BinCommand:()=>gE,CacheCleanCommand:()=>dE,ClipanionCommand:()=>wE,ConfigCommand:()=>CE,ConfigGetCommand:()=>mE,ConfigSetCommand:()=>yE,ConfigUnsetCommand:()=>EE,DedupeCommand:()=>IE,EntryCommand:()=>vE,ExecCommand:()=>PE,ExplainCommand:()=>bE,ExplainPeerRequirementsCommand:()=>SE,HelpCommand:()=>BE,InfoCommand:()=>QE,LinkCommand:()=>FE,NodeCommand:()=>RE,PluginCheckCommand:()=>TE,PluginImportCommand:()=>OE,PluginImportSourcesCommand:()=>ME,PluginListCommand:()=>NE,PluginRemoveCommand:()=>UE,PluginRuntimeCommand:()=>_E,RebuildCommand:()=>HE,RemoveCommand:()=>qE,RunCommand:()=>GE,RunIndexCommand:()=>jE,SetResolutionCommand:()=>WE,SetVersionCommand:()=>xE,SetVersionSourcesCommand:()=>LE,UnlinkCommand:()=>YE,UpCommand:()=>KE,VersionCommand:()=>DE,WhyCommand:()=>VE,WorkspaceCommand:()=>$E,WorkspacesListCommand:()=>ZE,YarnCommand:()=>kE,dedupeUtils:()=>KQ,default:()=>Bgt,suggestUtils:()=>nu});var wme=et(ag());Ve();Ve();Ve();Gt();var Fge=et(k2());il();var nu={};Kt(nu,{Modifier:()=>uH,Strategy:()=>GQ,Target:()=>F2,WorkspaceModifier:()=>Sge,applyModifier:()=>zft,extractDescriptorFromPath:()=>AH,extractRangeModifier:()=>xge,fetchDescriptorFrom:()=>fH,findProjectDescriptors:()=>kge,getModifier:()=>R2,getSuggestedDescriptors:()=>T2,makeWorkspaceDescriptor:()=>Qge,toWorkspaceModifier:()=>bge});Ve();Ve();Pt();var cH=et(ni()),Kft="workspace:",F2=(o=>(o.REGULAR="dependencies",o.DEVELOPMENT="devDependencies",o.PEER="peerDependencies",o))(F2||{}),uH=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="",o))(uH||{}),Sge=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="*",o))(Sge||{}),GQ=(n=>(n.KEEP="keep",n.REUSE="reuse",n.PROJECT="project",n.LATEST="latest",n.CACHE="cache",n))(GQ||{});function R2(t,e){return t.exact?"":t.caret?"^":t.tilde?"~":e.configuration.get("defaultSemverRangePrefix")}var Vft=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function xge(t,{project:e}){let r=t.match(Vft);return r?r[1]:e.configuration.get("defaultSemverRangePrefix")}function zft(t,e){let{protocol:r,source:o,params:a,selector:n}=G.parseRange(t.range);return cH.default.valid(n)&&(n=`${e}${t.range}`),G.makeDescriptor(t,G.makeRange({protocol:r,source:o,params:a,selector:n}))}function bge(t){switch(t){case"^":return"^";case"~":retur
Line truncated
|
||||||
Try running the command again with the package name prefixed: ${pe.pretty(r,"yarn add",pe.Type.CODE)} ${pe.pretty(r,G.makeDescriptor(G.makeIdent(null,"my-package"),`${te[0]}...`),pe.Type.DESCRIPTOR)}`);if(!J)throw new it(`The ${pe.pretty(r,U,pe.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let le=Jft(a,J,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(le.map(async ue=>{let Ie=await T2(J,{project:o,workspace:a,cache:n,fixed:u,target:ue,modifier:h,strategies:E,maxResults:w});return{request:J,suggestedDescriptors:Ie,target:ue}}))})).then(U=>U.flat()),b=await pA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async U=>{for(let{request:J,suggestedDescriptors:{suggestions:te,rejections:le}}of D)if(te.filter(ue=>ue.descriptor!==null).length===0){let[ue]=le;if(typeof ue>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?U.reportError(27,`${G.prettyDescriptor(r,J)} can't be resolved to a satisfying range`):U.reportError(27,`${G.prettyDescriptor(r,J)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),U.reportSeparator(),U.reportExceptionOnce(ue)}});if(b.hasErrors())return b.exitCode();let C=!1,T=[],N=[];for(let{suggestedDescriptors:{suggestions:U},target:J}of D){let te,le=U.filter(he=>he.descriptor!==null),ce=le[0].descriptor,ue=le.every(he=>G.areDescriptorsEqual(he.descriptor,ce));le.length===1||ue?te=ce:(C=!0,{answer:te}=await(0,bge.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:U.map(({descriptor:he,name:De,reason:Ee})=>he?{name:De,hint:Ee,descriptor:he}:{name:De,hint:Ee,disabled:!0}),onCancel:()=>process.exit(130),result(he){return this.find(he,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let Ie=a.manifest[J].get(te.identHash);(typeof Ie>"u"||Ie.descriptorHash!==te.descriptorHash)&&(a.manifest[J].set(te.identHash,te),this.optional&&(J==="dependencies"?a.manifest.ensureDependencyMeta({...te,range:"unknown"}).optional=!0:J==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...te,range:"unknown"}).optional=!0)),typeof Ie>"u"?T.push([a,J,te,E]):N.push([a,J,Ie,te]))}return await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyAddition,T),await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyReplacement,N),C&&this.context.stdout.write(`
|
Try running the command again with the package name prefixed: ${fe.pretty(r,"yarn add",fe.Type.CODE)} ${fe.pretty(r,G.makeDescriptor(G.makeIdent(null,"my-package"),`${te[0]}...`),fe.Type.DESCRIPTOR)}`);if(!z)throw new nt(`The ${fe.pretty(r,U,fe.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let le=Xft(a,z,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(le.map(async ce=>{let me=await T2(z,{project:o,workspace:a,cache:n,fixed:u,target:ce,modifier:h,strategies:E,maxResults:w});return{request:z,suggestedDescriptors:me,target:ce}}))})).then(U=>U.flat()),b=await pA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async U=>{for(let{request:z,suggestedDescriptors:{suggestions:te,rejections:le}}of D)if(te.filter(ce=>ce.descriptor!==null).length===0){let[ce]=le;if(typeof ce>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?U.reportError(27,`${G.prettyDescriptor(r,z)} can't be resolved to a satisfying range`):U.reportError(27,`${G.prettyDescriptor(r,z)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),U.reportSeparator(),U.reportExceptionOnce(ce)}});if(b.hasErrors())return b.exitCode();let C=!1,T=[],L=[];for(let{suggestedDescriptors:{suggestions:U},target:z}of D){let te,le=U.filter(pe=>pe.descriptor!==null),de=le[0].descriptor,ce=le.every(pe=>G.areDescriptorsEqual(pe.descriptor,de));le.length===1||ce?te=de:(C=!0,{answer:te}=await(0,Fge.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:U.map(({descriptor:pe,name:ve,reason:Ie})=>pe?{name:ve,hint:Ie,descriptor:pe}:{name:ve,hint:Ie,disabled:!0}),onCancel:()=>process.exit(130),result(pe){return this.find(pe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=a.manifest[z].get(te.identHash);(typeof me>"u"||me.descriptorHash!==te.descriptorHash)&&(a.manifest[z].set(te.identHash,te),this.optional&&(z==="dependencies"?a.manifest.ensureDependencyMeta({...te,range:"unknown"}).optional=!0:z==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...te,range:"unknown"}).optional=!0)),typeof me>"u"?T.push([a,z,te,E]):L.push([a,z,me,te]))}return await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyAddition,T),await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyReplacement,L),C&&this.context.stdout.write(`
|
||||||
`),await o.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function Jft(t,e,{dev:r,peer:o,preferDev:a,optional:n}){let u=t.manifest.dependencies.has(e.identHash),A=t.manifest.devDependencies.has(e.identHash),p=t.manifest.peerDependencies.has(e.identHash);if((r||o)&&u)throw new it(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!o&&p)throw new it(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&A)throw new it(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!o&&p)throw new it(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new it(`Package "${G.prettyIdent(t.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return o&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:A?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ve();Ve();Gt();var pE=class extends ut{constructor(){super(...arguments);this.verbose=de.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=de.String({required:!1})}static{this.paths=[["bin"]]}static{this.usage=ot.Usage({description:"get the path to a binary script",details:`
|
`),await o.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function Xft(t,e,{dev:r,peer:o,preferDev:a,optional:n}){let u=t.manifest.dependencies.has(e.identHash),A=t.manifest.devDependencies.has(e.identHash),p=t.manifest.peerDependencies.has(e.identHash);if((r||o)&&u)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!o&&p)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&A)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!o&&p)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return o&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:A?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ve();Ve();Gt();var gE=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=ge.String({required:!1})}static{this.paths=[["bin"]]}static{this.usage=ot.Usage({description:"get the path to a binary script",details:`
|
||||||
When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
|
When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
|
||||||
|
|
||||||
When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
|
When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
|
||||||
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await Qt.find(r,this.context.cwd);if(await o.restoreInstallState(),this.name){let A=(await hn.getPackageAccessibleBinaries(a,{project:o})).get(this.name);if(!A)throw new it(`Couldn't find a binary named "${this.name}" for package "${G.prettyLocator(r,a)}"`);let[,p]=A;return this.context.stdout.write(`${p}
|
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await kt.find(r,this.context.cwd);if(await o.restoreInstallState(),this.name){let A=(await hn.getPackageAccessibleBinaries(a,{project:o})).get(this.name);if(!A)throw new nt(`Couldn't find a binary named "${this.name}" for package "${G.prettyLocator(r,a)}"`);let[,p]=A;return this.context.stdout.write(`${p}
|
||||||
`),0}return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await hn.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((E,w)=>Math.max(E,w.length),0);for(let[E,[w,D]]of A)u.reportJson({name:E,source:G.stringifyIdent(w),path:D});if(this.verbose)for(let[E,[w]]of A)u.reportInfo(null,`${E.padEnd(h," ")} ${G.prettyLocator(r,w)}`);else for(let E of A.keys())u.reportInfo(null,E)})).exitCode()}};Ve();St();Gt();var hE=class extends ut{constructor(){super(...arguments);this.mirror=de.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=de.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}static{this.paths=[["cache","clean"],["cache","clear"]]}static{this.usage=ot.Usage({description:"remove the shared cache files",details:`
|
`),0}return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await hn.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((E,w)=>Math.max(E,w.length),0);for(let[E,[w,D]]of A)u.reportJson({name:E,source:G.stringifyIdent(w),path:D});if(this.verbose)for(let[E,[w]]of A)u.reportInfo(null,`${E.padEnd(h," ")} ${G.prettyLocator(r,w)}`);else for(let E of A.keys())u.reportInfo(null,E)})).exitCode()}};Ve();Pt();Gt();var dE=class extends ut{constructor(){super(...arguments);this.mirror=ge.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=ge.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}static{this.paths=[["cache","clean"],["cache","clear"]]}static{this.usage=ot.Usage({description:"remove the shared cache files",details:`
|
||||||
This command will remove all the files from the cache.
|
This command will remove all the files from the cache.
|
||||||
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(!r.get("enableCacheClean"))throw new it("Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.");let o=await Wr.find(r);return(await Lt.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await ae.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await ae.removePromise(o.cwd)})).exitCode()}};Ve();Gt();var Qge=et(L2()),AH=ve("util"),gE=class extends ut{constructor(){super(...arguments);this.why=de.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=de.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=de.String()}static{this.paths=[["config","get"]]}static{this.usage=ot.Usage({description:"read a configuration settings",details:`
|
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);if(!r.get("enableCacheClean"))throw new nt("Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.");let o=await Wr.find(r);return(await Nt.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await ae.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await ae.removePromise(o.cwd)})).exitCode()}};Ve();Gt();var Tge=et(N2()),pH=De("util"),mE=class extends ut{constructor(){super(...arguments);this.why=ge.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=ge.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=ge.String()}static{this.paths=[["config","get"]]}static{this.usage=ot.Usage({description:"read a configuration settings",details:`
|
||||||
This command will print a configuration setting.
|
This command will print a configuration setting.
|
||||||
|
|
||||||
Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
|
Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
|
||||||
`,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new it(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=qe.convertMapsToIndexableObjects(u),p=a?(0,Qge.default)(A,a):A,h=await Lt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
|
`,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new nt(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=qe.convertMapsToIndexableObjects(u),p=a?(0,Tge.default)(A,a):A,h=await Nt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
|
||||||
`),h.exitCode();AH.inspect.styles.name="cyan",this.context.stdout.write(`${(0,AH.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
|
`),h.exitCode();pH.inspect.styles.name="cyan",this.context.stdout.write(`${(0,pH.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
|
||||||
`)}return h.exitCode()}};Ve();Gt();var Ide=et(gH()),wde=et(L2()),Bde=et(dH()),mH=ve("util"),dE=class extends ut{constructor(){super(...arguments);this.json=de.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=de.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=de.String();this.value=de.String()}static{this.paths=[["config","set"]]}static{this.usage=ot.Usage({description:"change a configuration settings",details:`
|
`)}return h.exitCode()}};Ve();Gt();var vde=et(mH()),Dde=et(N2()),Pde=et(yH()),EH=De("util"),yE=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String();this.value=ge.String()}static{this.paths=[["config","set"]]}static{this.usage=ot.Usage({description:"change a configuration settings",details:`
|
||||||
This command will set a configuration setting.
|
This command will set a configuration setting.
|
||||||
|
|
||||||
When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
|
When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
|
||||||
|
|
||||||
When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
|
When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
|
||||||
`,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new it("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new it(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new it("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?C=>ze.updateHomeConfiguration(C):C=>ze.updateConfiguration(o(),C))(C=>{if(n){let T=(0,Ide.default)(C);return(0,Bde.default)(T,this.name,A),T}else return{...C,[a]:A}});let E=(await ze.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),w=qe.convertMapsToIndexableObjects(E),D=n?(0,wde.default)(w,n):w;return(await Lt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async C=>{mH.inspect.styles.name="cyan",C.reportInfo(0,`Successfully set ${this.name} to ${(0,mH.inspect)(D,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Ve();Gt();var Tde=et(gH()),Lde=et(Pde()),Nde=et(EH()),mE=class extends ut{constructor(){super(...arguments);this.home=de.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=de.String()}static{this.paths=[["config","unset"]]}static{this.usage=ot.Usage({description:"unset a configuration setting",details:`
|
`,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new nt("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new nt(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new nt("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?C=>Je.updateHomeConfiguration(C):C=>Je.updateConfiguration(o(),C))(C=>{if(n){let T=(0,vde.default)(C);return(0,Pde.default)(T,this.name,A),T}else return{...C,[a]:A}});let E=(await Je.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),w=qe.convertMapsToIndexableObjects(E),D=n?(0,Dde.default)(w,n):w;return(await Nt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async C=>{EH.inspect.styles.name="cyan",C.reportInfo(0,`Successfully set ${this.name} to ${(0,EH.inspect)(D,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Ve();Gt();var Ode=et(mH()),Mde=et(Qde()),Ude=et(IH()),EE=class extends ut{constructor(){super(...arguments);this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String()}static{this.paths=[["config","unset"]]}static{this.usage=ot.Usage({description:"unset a configuration setting",details:`
|
||||||
This command will unset a configuration setting.
|
This command will unset a configuration setting.
|
||||||
`,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new it("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new it(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>ze.updateHomeConfiguration(h):h=>ze.updateConfiguration(o(),h);return(await Lt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await A(w=>{if(!(0,Lde.default)(w,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,w;let D=n?(0,Tde.default)(w):{...w};return(0,Nde.default)(D,this.name),D}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ve();St();Gt();var Wk=ve("util"),yE=class extends ut{constructor(){super(...arguments);this.noDefaults=de.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=de.Boolean("-v,--verbose",{hidden:!0});this.why=de.Boolean("--why",{hidden:!0});this.names=de.Rest()}static{this.paths=[["config"]]}static{this.usage=ot.Usage({description:"display the current configuration",details:`
|
`,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new nt("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new nt(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Je.updateHomeConfiguration(h):h=>Je.updateConfiguration(o(),h);return(await Nt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await A(w=>{if(!(0,Mde.default)(w,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,w;let D=n?(0,Ode.default)(w):{...w};return(0,Ude.default)(D,this.name),D}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ve();Pt();Gt();var YQ=De("util"),CE=class extends ut{constructor(){super(...arguments);this.noDefaults=ge.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=ge.Boolean("-v,--verbose",{hidden:!0});this.why=ge.Boolean("--why",{hidden:!0});this.names=ge.Rest()}static{this.paths=[["config"]]}static{this.usage=ot.Usage({description:"display the current configuration",details:`
|
||||||
This command prints the current active configuration settings.
|
This command prints the current active configuration settings.
|
||||||
`,examples:[["Print the active configuration settings","$0 config"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins,{strict:!1}),o=await Qy({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(o!==null)return o;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,u=await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async A=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)A.reportError(34,`Invalid configuration key "${p}" in ${h}`);A.reportSeparator()}if(this.json)for(let p of a){let h=r.settings.get(p);typeof h>"u"&&A.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),w=r.sources.get(p)??"<default>",D=w&&w[0]!=="<"?Ae.fromPortablePath(w):w;A.reportJson({key:p,effective:E,source:D,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let w of a){if(this.noDefaults&&!r.sources.has(w))continue;let D=r.settings.get(w),b=r.sources.get(w)??"<default>",C=r.getSpecial(w,{hideSecrets:!0,getNativePaths:!0}),T={Description:{label:"Description",value:pe.tuple(pe.Type.MARKDOWN,{text:D.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:pe.tuple(b[0]==="<"?pe.Type.CODE:pe.Type.PATH,b)}};h[w]={value:pe.tuple(pe.Type.CODE,w),children:T};let N=(U,J)=>{for(let[te,le]of J)if(le instanceof Map){let ce={};U[te]={children:ce},N(ce,le)}else U[te]={label:te,value:pe.tuple(pe.Type.NO_HINT,(0,Wk.inspect)(le,p))}};C instanceof Map?N(T,C):T.Value={label:"Value",value:pe.tuple(pe.Type.NO_HINT,(0,Wk.inspect)(C,p))}}a.length!==1&&(n=void 0),As.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let A=a[0],p=(0,Wk.inspect)(r.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(`
|
`,examples:[["Print the active configuration settings","$0 config"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins,{strict:!1}),o=await Ry({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(o!==null)return o;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,u=await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async A=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)A.reportError(34,`Invalid configuration key "${p}" in ${h}`);A.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>"u"&&A.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),w=r.sources.get(p)??"<default>",D=w&&w[0]!=="<"?ue.fromPortablePath(w):w;A.reportJson({key:p,effective:E,source:D,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let w of a){if(this.noDefaults&&!r.sources.has(w))continue;let D=r.settings.get(w),b=r.sources.get(w)??"<default>",C=r.getSpecial(w,{hideSecrets:!0,getNativePaths:!0}),T={Description:{label:"Description",value:fe.tuple(fe.Type.MARKDOWN,{text:D.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:fe.tuple(b[0]==="<"?fe.Type.CODE:fe.Type.PATH,b)}};h[w]={value:fe.tuple(fe.Type.CODE,w),children:T};let L=(U,z)=>{for(let[te,le]of z)if(le instanceof Map){let de={};U[te]={children:de},L(de,le)}else U[te]={label:te,value:fe.tuple(fe.Type.NO_HINT,(0,YQ.inspect)(le,p))}};C instanceof Map?L(T,C):T.Value={label:"Value",value:fe.tuple(fe.Type.NO_HINT,(0,YQ.inspect)(C,p))}}a.length!==1&&(n=void 0),As.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let A=a[0],p=(0,YQ.inspect)(r.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(`
|
||||||
`),this.context.stdout.write(`${p}
|
`),this.context.stdout.write(`${p}
|
||||||
`)}return u.exitCode()}};Ve();Gt();il();var Yk={};Vt(Yk,{Strategy:()=>N2,acceptedStrategies:()=>Q0t,dedupe:()=>CH});Ve();Ve();var Ode=et(Xo()),N2=(e=>(e.HIGHEST="highest",e))(N2||{}),Q0t=new Set(Object.values(N2)),F0t={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);qe.getSetWithDefault(u,E.identHash).add(h)}let A=new Map(qe.mapAndFilter(t.storedDescriptors.values(),p=>G.isVirtualDescriptor(p)?qe.mapAndFilter.skip:[p.descriptorHash,qe.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let w=t.originalPackages.get(E);if(typeof w>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let D=r.getResolutionDependencies(p,a),b=Object.fromEntries(await qe.allSettledSafe(Object.entries(D).map(async([te,le])=>{let ce=A.get(le.descriptorHash);if(typeof ce>"u")throw new Error(`Assertion failed: The descriptor (${le.descriptorHash}) should have been registered`);let ue=await ce.promise;if(!ue)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ue.updatedPackage]})));if(e.length&&!Ode.default.isMatch(G.stringifyIdent(p),e)||!r.shouldPersistResolution(w,a))return w;let C=u.get(p.identHash);if(typeof C>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(C.size===1)return w;let T=[...C].map(te=>{let le=t.originalPackages.get(te);if(typeof le>"u")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return le}),N=await r.getSatisfying(p,b,T,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return w;let J=t.originalPackages.get(U.locatorHash);if(typeof J>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return J}).then(async D=>{let b=await t.preparePackage(D,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:w,updatedPackage:D,resolvedPackage:b})}).catch(D=>{h.reject(D)})}return[...A.values()].map(p=>p.promise)}};async function CH(t,{strategy:e,patterns:r,cache:o,report:a}){let{configuration:n}=t,u=new Ri,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:t.storedChecksums,fetcher:p,project:t,report:u,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let w=F0t[e],D=await w(t,r,{resolver:A,resolveOptions:E,fetcher:p,fetchOptions:h}),b=Ws.progressViaCounter(D.length);await a.reportProgress(b);let C=0;await Promise.all(D.map(U=>U.then(J=>{if(J===null||J.currentPackage.locatorHash===J.updatedPackage.locatorHash)return;C++;let{descriptor:te,currentPackage:le,updatedPackage:ce}=J;a.reportInfo(0,`${G.prettyDescriptor(n,te)} can be deduped from ${G.prettyLocator(n,le)} to ${G.prettyLocator(n,ce)}`),a.reportJson({descriptor:G.stringifyDescriptor(te),currentResolution:G.stringifyLocator(le),updatedResolution:G.stringifyLocator(ce)}),t.storedResolutions.set(te.descriptorHash,ce.locatorHash)}).finally(()=>b.tick())));let T;switch(C){case 0:T="No packages";break;case 1:T="One package";break;default:T=`${C} packages`}let N=pe.pretty(n,e,pe.Type.CODE);return a.reportInfo(0,`${T} can be deduped using the ${N} strategy`),C})}var EE=class extends ut{constructor(){super(...arguments);this.strategy=de.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:js(N2)});this.check=de.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=de.String("--mode",{description:"Change what artifacts installs generate",validator:js(yl)});this.patterns=de.Rest()}static{this.paths=[["dedupe"]]}static{this.usage=ot.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never dow
Line truncated
|
`)}return u.exitCode()}};Ve();Gt();il();var KQ={};Kt(KQ,{Strategy:()=>L2,acceptedStrategies:()=>R0t,dedupe:()=>wH});Ve();Ve();var _de=et(Xo()),L2=(e=>(e.HIGHEST="highest",e))(L2||{}),R0t=new Set(Object.values(L2)),T0t={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);qe.getSetWithDefault(u,E.identHash).add(h)}let A=new Map(qe.mapAndFilter(t.storedDescriptors.values(),p=>G.isVirtualDescriptor(p)?qe.mapAndFilter.skip:[p.descriptorHash,qe.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let w=t.originalPackages.get(E);if(typeof w>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let D=r.getResolutionDependencies(p,a),b=Object.fromEntries(await qe.allSettledSafe(Object.entries(D).map(async([te,le])=>{let de=A.get(le.descriptorHash);if(typeof de>"u")throw new Error(`Assertion failed: The descriptor (${le.descriptorHash}) should have been registered`);let ce=await de.promise;if(!ce)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ce.updatedPackage]})));if(e.length&&!_de.default.isMatch(G.stringifyIdent(p),e)||!r.shouldPersistResolution(w,a))return w;let C=u.get(p.identHash);if(typeof C>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(C.size===1)return w;let T=[...C].map(te=>{let le=t.originalPackages.get(te);if(typeof le>"u")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return le}),L=await r.getSatisfying(p,b,T,a),U=L.locators?.[0];if(typeof U>"u"||!L.sorted)return w;let z=t.originalPackages.get(U.locatorHash);if(typeof z>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return z}).then(async D=>{let b=await t.preparePackage(D,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:w,updatedPackage:D,resolvedPackage:b})}).catch(D=>{h.reject(D)})}return[...A.values()].map(p=>p.promise)}};async function wH(t,{strategy:e,patterns:r,cache:o,report:a}){let{configuration:n}=t,u=new Ri,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:t.storedChecksums,fetcher:p,project:t,report:u,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let w=T0t[e],D=await w(t,r,{resolver:A,resolveOptions:E,fetcher:p,fetchOptions:h}),b=Ws.progressViaCounter(D.length);await a.reportProgress(b);let C=0;await Promise.all(D.map(U=>U.then(z=>{if(z===null||z.currentPackage.locatorHash===z.updatedPackage.locatorHash)return;C++;let{descriptor:te,currentPackage:le,updatedPackage:de}=z;a.reportInfo(0,`${G.prettyDescriptor(n,te)} can be deduped from ${G.prettyLocator(n,le)} to ${G.prettyLocator(n,de)}`),a.reportJson({descriptor:G.stringifyDescriptor(te),currentResolution:G.stringifyLocator(le),updatedResolution:G.stringifyLocator(de)}),t.storedResolutions.set(te.descriptorHash,de.locatorHash)}).finally(()=>b.tick())));let T;switch(C){case 0:T="No packages";break;case 1:T="One package";break;default:T=`${C} packages`}let L=fe.pretty(n,e,fe.Type.CODE);return a.reportInfo(0,`${T} can be deduped using the ${L} strategy`),C})}var IE=class extends ut{constructor(){super(...arguments);this.strategy=ge.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:js(L2)});this.check=ge.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:js(yl)});this.patterns=ge.Rest()}static{this.paths=[["dedupe"]]}static{this.usage=ot.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never dow
Line truncated
|
||||||
`)}};var IE=class extends ut{static{this.paths=[["help"],["--help"],["-h"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ve();St();Gt();var wE=class extends ut{constructor(){super(...arguments);this.leadingArgument=de.String();this.args=de.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!G.tryParseIdent(this.leadingArgument)){let r=V.resolve(this.context.cwd,Ae.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ve();var BE=class extends ut{static{this.paths=[["-v"],["--version"]]}async execute(){this.context.stdout.write(`${nn||"<unknown>"}
|
`)}};var BE=class extends ut{static{this.paths=[["help"],["--help"],["-h"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ve();Pt();Gt();var vE=class extends ut{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!G.tryParseIdent(this.leadingArgument)){let r=K.resolve(this.context.cwd,ue.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ve();var DE=class extends ut{static{this.paths=[["-v"],["--version"]]}async execute(){this.context.stdout.write(`${nn||"<unknown>"}
|
||||||
`)}};Ve();Ve();Gt();var vE=class extends ut{constructor(){super(...arguments);this.commandName=de.String();this.args=de.Proxy()}static{this.paths=[["exec"]]}static{this.usage=ot.Usage({description:"execute a shell script",details:`
|
`)}};Ve();Ve();Gt();var PE=class extends ut{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[["exec"]]}static{this.usage=ot.Usage({description:"execute a shell script",details:`
|
||||||
This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
|
This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
|
||||||
|
|
||||||
It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
|
It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
|
||||||
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await Qt.find(r,this.context.cwd);return await o.restoreInstallState(),await hn.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};Ve();Gt();il();var DE=class extends ut{constructor(){super(...arguments);this.hash=de.String({required:!1,validator:NS(Pm(),[Bw(/^p[0-9a-f]{5}$/)])})}static{this.paths=[["explain","peer-requirements"]]}static{this.usage=ot.Usage({description:"explain a set of peer requirements",details:`
|
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await kt.find(r,this.context.cwd);return await o.restoreInstallState(),await hn.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};Ve();Gt();il();var SE=class extends ut{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:NP(bm(),[Dw(/^p[0-9a-f]{5}$/)])})}static{this.paths=[["explain","peer-requirements"]]}static{this.usage=ot.Usage({description:"explain a set of peer requirements",details:`
|
||||||
A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.
|
A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.
|
||||||
|
|
||||||
When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.
|
When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.
|
||||||
@@ -439,34 +439,34 @@ Try running the command again with the package name prefixed: ${pe.pretty(r,"yar
|
|||||||
When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.
|
When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.
|
||||||
|
|
||||||
**Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
|
**Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
|
||||||
`,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o}=await Qt.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await T0t(this.hash,o,{stdout:this.context.stdout}):await L0t(o,{stdout:this.context.stdout})}};async function T0t(t,e,r){let o=e.peerRequirementNodes.get(t);if(typeof o>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:pe.tuple(pe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:pe.tuple(pe.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:pe.tuple(pe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[G.stringifyLocator(h.requester),n(h)]))}),u=e.peerWarnings.find(p=>p.hash===t);return(await Lt.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=pe.mark(e.configuration),E=u?h.Cross:h.Check;if(p.reportInfo(0,`Package ${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)} is requested to provide ${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)),As.emitTree({children:Object.fromEntries(Array.from(o.requests.values(),w=>[G.stringifyLocator(w.requester),n(w)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),o.provided.range==="missing:"){let w=u?"":" , but all peer requests are optional";p.reportInfo(0,`${E} Package ${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)} does not provide ${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)}${w}.`)}else{let w=e.storedResolutions.get(o.provided.descriptorHash);if(!w)throw new Error("Assertion failed: Expected the descriptor to be registered");let D=e.storedPackages.get(w);if(!D)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E} Package ${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)} provides ${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)} with version ${G.prettyReference(e.configuration,D.version??"0.0.0")}, ${u?"which does not satisfy all requests.":"which satisfies all requests"}`),u?.type===3&&(u.range?p.reportInfo(0,` The combined requested range is ${pe.pretty(e.configuration,u.range,pe.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function L0t(t,e){return(await Lt.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async o=>{let a=pe.mark(t.configuration),n=qe.sortMap(t.peerRequirementNodes,[([,u])=>G.stringifyLocator(u.subject),([,u])=>G.stringifyIdent(u.ident)]);for(let[,u]of n.values()){if(!u.root)continue;let A=t.peerWarnings.find(E=>E.hash===u.hash),p=[...G.allPeerRequests(u)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=" and 1 other dependency":h="",u.provided.range!=="missing:"){let E=t.storedResolutions.get(u.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let w=t.storedPackages.get(E);if(!w)throw new Error("Assertion failed: Expected the provided package to have been registered");let D=`${pe.pretty(t.configuration,u.hash,pe.Type.CODE)} \u2192 ${A?a.Cross:a.Check} ${G.prettyLocator(t.configuration,u.subject)} provides ${G.prettyLocator(t.configuration,w)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;A?o.reportWarning(0,D):o.reportInfo(0,D)}else{let E=`${pe.pretty(t.configuration,u.hash,pe.Type.CODE)} \u2192 ${A?a.Cross:a.Check} ${G.prettyLocator(t.configuration,u.subject)} doesn't provide ${G.prettyIdent(t.configuration,u.ident)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;A?o.reportWarning(0,E):o.reportInfo(0,E)}}})).exitCode()}Ve();Gt();il();Ve();Ve();St();Gt();var Ude=et(ni()),SE=class extends ut{constructor(){super(...arguments);this.useYarnPath=de.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=de.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=de.String()}static{this.paths=[["set","version"]]}static{this.usage=ot.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set th
Line truncated
|
`,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await kt.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await L0t(this.hash,o,{stdout:this.context.stdout}):await O0t(o,{stdout:this.context.stdout})}};async function L0t(t,e,r){let o=e.peerRequirementNodes.get(t);if(typeof o>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:fe.tuple(fe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:fe.tuple(fe.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:fe.tuple(fe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[G.stringifyLocator(h.requester),n(h)]))}),u=e.peerWarnings.find(p=>p.hash===t);return(await Nt.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=fe.mark(e.configuration),E=u?h.Cross:h.Check;if(p.reportInfo(0,`Package ${fe.pretty(e.configuration,o.subject,fe.Type.LOCATOR)} is requested to provide ${fe.pretty(e.configuration,o.ident,fe.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,fe.pretty(e.configuration,o.subject,fe.Type.LOCATOR)),As.emitTree({children:Object.fromEntries(Array.from(o.requests.values(),w=>[G.stringifyLocator(w.requester),n(w)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),o.provided.range==="missing:"){let w=u?"":" , but all peer requests are optional";p.reportInfo(0,`${E} Package ${fe.pretty(e.configuration,o.subject,fe.Type.LOCATOR)} does not provide ${fe.pretty(e.configuration,o.ident,fe.Type.IDENT)}${w}.`)}else{let w=e.storedResolutions.get(o.provided.descriptorHash);if(!w)throw new Error("Assertion failed: Expected the descriptor to be registered");let D=e.storedPackages.get(w);if(!D)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E} Package ${fe.pretty(e.configuration,o.subject,fe.Type.LOCATOR)} provides ${fe.pretty(e.configuration,o.ident,fe.Type.IDENT)} with version ${G.prettyReference(e.configuration,D.version??"0.0.0")}, ${u?"which does not satisfy all requests.":"which satisfies all requests"}`),u?.type===3&&(u.range?p.reportInfo(0,` The combined requested range is ${fe.pretty(e.configuration,u.range,fe.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function O0t(t,e){return(await Nt.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async o=>{let a=fe.mark(t.configuration),n=qe.sortMap(t.peerRequirementNodes,[([,u])=>G.stringifyLocator(u.subject),([,u])=>G.stringifyIdent(u.ident)]);for(let[,u]of n.values()){if(!u.root)continue;let A=t.peerWarnings.find(E=>E.hash===u.hash),p=[...G.allPeerRequests(u)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=" and 1 other dependency":h="",u.provided.range!=="missing:"){let E=t.storedResolutions.get(u.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let w=t.storedPackages.get(E);if(!w)throw new Error("Assertion failed: Expected the provided package to have been registered");let D=`${fe.pretty(t.configuration,u.hash,fe.Type.CODE)} \u2192 ${A?a.Cross:a.Check} ${G.prettyLocator(t.configuration,u.subject)} provides ${G.prettyLocator(t.configuration,w)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;A?o.reportWarning(0,D):o.reportInfo(0,D)}else{let E=`${fe.pretty(t.configuration,u.hash,fe.Type.CODE)} \u2192 ${A?a.Cross:a.Check} ${G.prettyLocator(t.configuration,u.subject)} doesn't provide ${G.prettyIdent(t.configuration,u.ident)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;A?o.reportWarning(0,E):o.reportInfo(0,E)}}})).exitCode()}Ve();Gt();il();Ve();Ve();Pt();Gt();var qde=et(ni()),xE=class extends ut{constructor(){super(...arguments);this.useYarnPath=ge.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=ge.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=ge.String()}static{this.paths=[["set","version"]]}static{this.usage=ot.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set th
Line truncated
|
||||||
${e}`)})}let A=t.projectCwd??t.startingCwd,p=V.resolve(A,".yarn/releases"),h=V.resolve(p,`yarn-${e}.cjs`),E=V.relative(t.startingCwd,h),w=qe.isTaggedYarnVersion(e),D=t.get("yarnPath"),b=!w,C=b||!!D||!!a;if(a===!1){if(b)throw new Jt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");C=!1}else!C&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${pe.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${pe.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),C=!0);if(C){let te=await u();o.reportInfo(0,`Saving the new release in ${pe.pretty(t,E,"magenta")}`),await ae.removePromise(V.dirname(h)),await ae.mkdirPromise(V.dirname(h),{recursive:!0}),await ae.writeFilePromise(h,te,{mode:493}),await ze.updateConfiguration(A,{yarnPath:V.relative(A,h)})}else await ae.removePromise(V.dirname(h)),await ze.updateConfiguration(A,{yarnPath:ze.deleteProperty});let T=await _t.tryFind(A)||new _t;T.packageManager=`yarn@${w?e:await O2(t,"stable")}`;let N={};T.exportTo(N);let U=V.join(A,_t.fileName),J=`${JSON.stringify(N,null,T.indent)}
|
${e}`)})}let A=t.projectCwd??t.startingCwd,p=K.resolve(A,".yarn/releases"),h=K.resolve(p,`yarn-${e}.cjs`),E=K.relative(t.startingCwd,h),w=qe.isTaggedYarnVersion(e),D=t.get("yarnPath"),b=!w,C=b||!!D||!!a;if(a===!1){if(b)throw new zt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");C=!1}else!C&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${fe.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${fe.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),C=!0);if(C){let te=await u();o.reportInfo(0,`Saving the new release in ${fe.pretty(t,E,"magenta")}`),await ae.removePromise(K.dirname(h)),await ae.mkdirPromise(K.dirname(h),{recursive:!0}),await ae.writeFilePromise(h,te,{mode:493}),await Je.updateConfiguration(A,{yarnPath:K.relative(A,h)})}else await ae.removePromise(K.dirname(h)),await Je.updateConfiguration(A,{yarnPath:Je.deleteProperty});let T=await _t.tryFind(A)||new _t;T.packageManager=`yarn@${w?e:await O2(t,"stable")}`;let L={};T.exportTo(L);let U=K.join(A,_t.fileName),z=`${JSON.stringify(L,null,T.indent)}
|
||||||
`;return await ae.changeFilePromise(U,J,{automaticNewlines:!0}),{bundleVersion:e}}function _de(t){return vr[jS(t)]}var O0t=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function M0t(t){let r=`https://repo.yarnpkg.com/${qe.isTaggedYarnVersion(nn)?nn:await O2(t,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,o=await on.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(O0t),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=_de(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var PE=class extends ut{constructor(){super(...arguments);this.code=de.String({required:!1,validator:vw(Pm(),[Bw(/^YN[0-9]{4}$/)])});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["explain"]]}static{this.usage=ot.Usage({description:"explain an error code",details:`
|
`;return await ae.changeFilePromise(U,z,{automaticNewlines:!0}),{bundleVersion:e}}function jde(t){return vr[qP(t)]}var U0t=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function _0t(t){let r=`https://repo.yarnpkg.com/${qe.isTaggedYarnVersion(nn)?nn:await O2(t,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,o=await on.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(U0t),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=jde(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var bE=class extends ut{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:Pw(bm(),[Dw(/^YN[0-9]{4}$/)])});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["explain"]]}static{this.usage=ot.Usage({description:"explain an error code",details:`
|
||||||
When the code argument is specified, this command prints its name and its details.
|
When the code argument is specified, this command prints its name and its details.
|
||||||
|
|
||||||
When used without arguments, this command lists all error codes and their names.
|
When used without arguments, this command lists all error codes and their names.
|
||||||
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=_de(this.code),a=pe.pretty(r,o,pe.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await M0t(r)).get(this.code),p=typeof A<"u"?pe.jsonOrPretty(this.json,r,pe.tuple(pe.Type.MARKDOWN,{text:A,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
|
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=jde(this.code),a=fe.pretty(r,o,fe.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await _0t(r)).get(this.code),p=typeof A<"u"?fe.jsonOrPretty(this.json,r,fe.tuple(fe.Type.MARKDOWN,{text:A,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
|
||||||
|
|
||||||
You can help us by editing this page on GitHub \u{1F642}:
|
You can help us by editing this page on GitHub \u{1F642}:
|
||||||
${pe.jsonOrPretty(this.json,r,pe.tuple(pe.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))}
|
${fe.jsonOrPretty(this.json,r,fe.tuple(fe.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))}
|
||||||
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})}
|
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})}
|
||||||
`):this.context.stdout.write(`${n}
|
`):this.context.stdout.write(`${n}
|
||||||
|
|
||||||
${p}
|
${p}
|
||||||
`)}else{let o={children:qe.mapAndFilter(Object.entries(vr),([a,n])=>Number.isNaN(Number(a))?qe.mapAndFilter.skip:{label:Ju(Number(a)),value:pe.tuple(pe.Type.CODE,n)})};As.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ve();St();Gt();var Hde=et(Xo()),xE=class extends ut{constructor(){super(...arguments);this.all=de.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=de.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=de.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=de.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=de.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=de.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=de.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=de.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=de.Rest()}static{this.paths=[["info"]]}static{this.usage=ot.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd),n=await Wr.find(r);if(!a&&!this.all)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(le,{recursive:ce})=>{let ue=le.anchoredLocator.locatorHash,Ie=new Map,he=[ue];for(;he.length>0;){let De=he.shift();if(Ie.has(De))continue;let Ee=o.storedPackages.get(De);if(typeof Ee>"u")throw new Error("Assertion failed: Expected the package to be registered");if(Ie.set(De,Ee),G.isVirtualLocator(Ee)&&he.push(G.devirtualizeLocator(Ee).locatorHash),!(!ce&&De!==ue))for(let g of Ee.dependencies.values()){let me=o.storedResolutions.get(g.descriptorHash);if(typeof me>"u")throw new Error("Assertion failed: Expected the resolution to be registered");he.push(me)}}return Ie.values()},p=({recursive:le})=>{let ce=new Map;for(let ue of o.workspaces)for(let Ie of A(ue,{recursive:le}))ce.set(Ie.locatorHash,Ie);return ce.values()},h=({all:le,recursive:ce})=>le&&ce?o.storedPackages.values():le?p({recursive:ce}):A(a,{recursive:ce}),E=({all:le,recursive:ce})=>{let ue=h({all:le,recursive:ce}),Ie=this.patterns.map(Ee=>{let g=G.parseLocator(Ee),me=Hde.default.makeRe(G.stringifyIdent(g)),Ce=G.isVirtualLocator(g),fe=Ce?G.devirtualizeLocator(g):g;return ie=>{let Z=G.stringifyIdent(ie);if(!me.test(Z))return!1;if(g.reference==="unknown")return!0;let Se=G.isVirtualLocator(ie),Re=Se?G.devirtualizeLocator(ie):ie;return!(Ce&&Se&&g.reference!==ie.reference||fe.reference!==Re.reference)}}),he=qe.sortMap([...ue],Ee=>G.stringifyLocator(Ee));return{selection:he.filter(Ee=>Ie.length===0||Ie.some(g=>g(Ee))),sortedLookup:he}},{selection:w,sortedLookup:D}=E({all:this.all,recursive:this.recursive});if(w.length===0)throw new it("No package matched your request");let b=new Map;if(this.dependents)for(let le of D)for(let ce of le.dependencies.values()){let ue=o.storedResolutions.get(ce.descriptorHash);if(typeof ue>"u")throw new Error("Assertion failed: Expected the resolution to be registered");qe.getArrayWithDefault(b,ue).push(le)}let C=new Map;for(let le of D){if(!G.isVirtualLocator(le))continue;let ce=G.devirtualizeLocator(le);qe.getArrayWithDefault(C,ce.locatorHash).push(le)}let T={},N={children:T},U=r.makeFetcher(),J={project:o,fetcher:U,cache:n,checksums:o.storedChecksum
Line truncated
|
`)}else{let o={children:qe.mapAndFilter(Object.entries(vr),([a,n])=>Number.isNaN(Number(a))?qe.mapAndFilter.skip:{label:zu(Number(a)),value:fe.tuple(fe.Type.CODE,n)})};As.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ve();Pt();Gt();var Gde=et(Xo()),QE=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=ge.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=ge.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=ge.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=ge.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=ge.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=ge.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}static{this.paths=[["info"]]}static{this.usage=ot.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd),n=await Wr.find(r);if(!a&&!this.all)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(le,{recursive:de})=>{let ce=le.anchoredLocator.locatorHash,me=new Map,pe=[ce];for(;pe.length>0;){let ve=pe.shift();if(me.has(ve))continue;let Ie=o.storedPackages.get(ve);if(typeof Ie>"u")throw new Error("Assertion failed: Expected the package to be registered");if(me.set(ve,Ie),G.isVirtualLocator(Ie)&&pe.push(G.devirtualizeLocator(Ie).locatorHash),!(!de&&ve!==ce))for(let g of Ie.dependencies.values()){let Ce=o.storedResolutions.get(g.descriptorHash);if(typeof Ce>"u")throw new Error("Assertion failed: Expected the resolution to be registered");pe.push(Ce)}}return me.values()},p=({recursive:le})=>{let de=new Map;for(let ce of o.workspaces)for(let me of A(ce,{recursive:le}))de.set(me.locatorHash,me);return de.values()},h=({all:le,recursive:de})=>le&&de?o.storedPackages.values():le?p({recursive:de}):A(a,{recursive:de}),E=({all:le,recursive:de})=>{let ce=h({all:le,recursive:de}),me=this.patterns.map(Ie=>{let g=G.parseLocator(Ie),Ce=Gde.default.makeRe(G.stringifyIdent(g)),ye=G.isVirtualLocator(g),Ae=ye?G.devirtualizeLocator(g):g;return ie=>{let Z=G.stringifyIdent(ie);if(!Ce.test(Z))return!1;if(g.reference==="unknown")return!0;let Pe=G.isVirtualLocator(ie),Re=Pe?G.devirtualizeLocator(ie):ie;return!(ye&&Pe&&g.reference!==ie.reference||Ae.reference!==Re.reference)}}),pe=qe.sortMap([...ce],Ie=>G.stringifyLocator(Ie));return{selection:pe.filter(Ie=>me.length===0||me.some(g=>g(Ie))),sortedLookup:pe}},{selection:w,sortedLookup:D}=E({all:this.all,recursive:this.recursive});if(w.length===0)throw new nt("No package matched your request");let b=new Map;if(this.dependents)for(let le of D)for(let de of le.dependencies.values()){let ce=o.storedResolutions.get(de.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: Expected the resolution to be registered");qe.getArrayWithDefault(b,ce).push(le)}let C=new Map;for(let le of D){if(!G.isVirtualLocator(le))continue;let de=G.devirtualizeLocator(le);qe.getArrayWithDefault(C,de.locatorHash).push(le)}let T={},L={children:T},U=r.makeFetcher(),z={project:o,fetcher:U,cache:n,checksums:o.storedChecksum
Line truncated
|
||||||
This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
|
This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
|
||||||
|
|
||||||
The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
|
The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
|
||||||
`,examples:[["Run a Node script","$0 node ./my-script.js"]]})}async execute(){return this.cli.run(["exec","node",...this.args])}};Ve();Gt();var FE=class extends ut{constructor(){super(...arguments);this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","check"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
|
`,examples:[["Run a Node script","$0 node ./my-script.js"]]})}async execute(){return this.cli.run(["exec","node",...this.args])}};Ve();Gt();var TE=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","check"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
|
||||||
Check only the plugins from https.
|
Check only the plugins from https.
|
||||||
|
|
||||||
If this command detects any plugin differences in the CI environment, it will throw an error.
|
If this command detects any plugin differences in the CI environment, it will throw an error.
|
||||||
`,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),o=await ze.findRcFiles(this.context.cwd);return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let u of o)if(u.data?.plugins)for(let A of u.data.plugins){if(!A.checksum||!A.spec.match(/^https?:/))continue;let p=await on.get(A.spec,{configuration:r}),h=bn.makeHash(p);if(A.checksum===h)continue;let E=pe.pretty(r,A.path,pe.Type.PATH),w=pe.pretty(r,A.spec,pe.Type.URL),D=`${E} is different from the file provided by ${w}`;n.reportJson({...A,newChecksum:h}),n.reportError(0,D)}})).exitCode()}};Ve();Ve();St();Gt();var Yde=ve("os");Ve();St();Gt();var qde=ve("os");Ve();Ol();Gt();var j0t="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Jg(t,e){let r=await on.get(j0t,{configuration:t}),o=Vi(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||Ur.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var RE=class extends ut{constructor(){super(...arguments);this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","list"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Jg(r,nn);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};var G0t=/^[0-9]+$/,W0t=process.platform==="win32";function jde(t){return G0t.test(t)?`pull/${t}/head`:t}var Y0t=({repository:t,branch:e},r)=>[["git","init",Ae.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",jde(e)],["git","reset","--hard","FETCH_HEAD"]],V0t=({branch:t})=>[["git","fetch","origin","--depth=1",jde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],K0t=({plugins:t,noMinify:e},r,o)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",V.resolve(o,a)])),...e?["--no-minify"]:[],"|"],[W0t?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",Ae.fromPortablePath(r),"|"]],TE=class extends ut{constructor(){super(...arguments);this.installPath=de.String("--path",{description:"The path where the repository should be cloned to"});this.repository=de.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=de.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=de.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=de.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=de.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=de.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=de.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}static{this.paths=[["set","version","from","sources"]]}static{this.usage=ot.Usage({description:"build Yarn from master",details:`
|
`,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=await Je.findRcFiles(this.context.cwd);return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let u of o)if(u.data?.plugins)for(let A of u.data.plugins){if(!A.checksum||!A.spec.match(/^https?:/))continue;let p=await on.get(A.spec,{configuration:r}),h=bn.makeHash(p);if(A.checksum===h)continue;let E=fe.pretty(r,A.path,fe.Type.PATH),w=fe.pretty(r,A.spec,fe.Type.URL),D=`${E} is different from the file provided by ${w}`;n.reportJson({...A,newChecksum:h}),n.reportError(0,D)}})).exitCode()}};Ve();Ve();Pt();Gt();var zde=De("os");Ve();Pt();Gt();var Wde=De("os");Ve();Ol();Gt();var W0t="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Xg(t,e){let r=await on.get(W0t,{configuration:t}),o=Ki(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||Ur.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var NE=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","list"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Xg(r,nn);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};var Y0t=/^[0-9]+$/,K0t=process.platform==="win32";function Yde(t){return Y0t.test(t)?`pull/${t}/head`:t}var V0t=({repository:t,branch:e},r)=>[["git","init",ue.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",Yde(e)],["git","reset","--hard","FETCH_HEAD"]],z0t=({branch:t})=>[["git","fetch","origin","--depth=1",Yde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],J0t=({plugins:t,noMinify:e},r,o)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",K.resolve(o,a)])),...e?["--no-minify"]:[],"|"],[K0t?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",ue.fromPortablePath(r),"|"]],LE=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=ge.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=ge.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}static{this.paths=[["set","version","from","sources"]]}static{this.usage=ot.Usage({description:"build Yarn from master",details:`
|
||||||
This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
|
This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
|
||||||
|
|
||||||
By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
|
By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
|
||||||
`,examples:[["Build Yarn from master","$0 set version from sources"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o}=await Qt.find(r,this.context.cwd),a=typeof this.installPath<"u"?V.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):V.resolve(Ae.toPortablePath((0,qde.tmpdir)()),"yarnpkg-sources",bn.makeHash(this.repository).slice(0,6));return(await Lt.start({configuration:r,stdout:this.context.stdout},async u=>{await BH(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator();let A=await Hr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=V.join(a,`packages/yarnpkg-cli/bundles/yarn-${A.stdout.trim()}.js`);ae.existsSync(p)||(await M2(K0t(this,p,a),{configuration:r,context:this.context,target:a}),u.reportSeparator());let h=await ae.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await IH(r,null,async()=>h,{report:u});this.skipPlugins||await J0t(this,E,{project:o,report:u,target:a})}})).exitCode()}};async function M2(t,{configuration:e,context:r,target:o}){for(let[a,...n]of t){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Hr.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${pe.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")}
|
`,examples:[["Build Yarn from master","$0 set version from sources"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await kt.find(r,this.context.cwd),a=typeof this.installPath<"u"?K.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):K.resolve(ue.toPortablePath((0,Wde.tmpdir)()),"yarnpkg-sources",bn.makeHash(this.repository).slice(0,6));return(await Nt.start({configuration:r,stdout:this.context.stdout},async u=>{await DH(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator();let A=await Hr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=K.join(a,`packages/yarnpkg-cli/bundles/yarn-${A.stdout.trim()}.js`);ae.existsSync(p)||(await M2(J0t(this,p,a),{configuration:r,context:this.context,target:a}),u.reportSeparator());let h=await ae.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await BH(r,null,async()=>h,{report:u});this.skipPlugins||await X0t(this,E,{project:o,report:u,target:a})}})).exitCode()}};async function M2(t,{configuration:e,context:r,target:o}){for(let[a,...n]of t){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Hr.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${fe.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")}
|
||||||
`);try{await Hr.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function BH(t,{configuration:e,report:r,target:o}){let a=!1;if(!t.force&&ae.existsSync(V.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await M2(V0t(t),{configuration:e,context:t.context,target:o}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await ae.removePromise(o),await ae.mkdirPromise(o,{recursive:!0}),await M2(Y0t(t,o),{configuration:e,context:t.context,target:o}))}async function J0t(t,e,{project:r,report:o,target:a}){let n=await Jg(r.configuration,e),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())u.has(A)&&await vH(A,t,{project:r,report:o,target:a})}Ve();Ve();St();Gt();var Gde=et(ni()),Wde=ve("vm");var LE=class extends ut{constructor(){super(...arguments);this.name=de.String();this.checksum=de.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}static{this.paths=[["plugin","import"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
|
`);try{await Hr.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function DH(t,{configuration:e,report:r,target:o}){let a=!1;if(!t.force&&ae.existsSync(K.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await M2(z0t(t),{configuration:e,context:t.context,target:o}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await ae.removePromise(o),await ae.mkdirPromise(o,{recursive:!0}),await M2(V0t(t,o),{configuration:e,context:t.context,target:o}))}async function X0t(t,e,{project:r,report:o,target:a}){let n=await Xg(r.configuration,e),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())u.has(A)&&await PH(A,t,{project:r,report:o,target:a})}Ve();Ve();Pt();Gt();var Kde=et(ni()),Vde=De("vm");var OE=class extends ut{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}static{this.paths=[["plugin","import"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
|
||||||
This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
|
This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
|
||||||
|
|
||||||
Three types of plugin references are accepted:
|
Three types of plugin references are accepted:
|
||||||
@@ -478,24 +478,24 @@ ${p}
|
|||||||
If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
|
If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
|
||||||
|
|
||||||
Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
|
Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
|
||||||
`,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Lt.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Qt.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||Ae.isAbsolute(this.name)){let p=V.resolve(this.context.cwd,Ae.toPortablePath(this.name));a.reportInfo(0,`Reading ${pe.pretty(r,p,pe.Type.PATH)}`),u=V.relative(n.cwd,p),A=await ae.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Jt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=G.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!Gde.default.valid(h.reference))throw new Jt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=G.stringifyIdent(h),w=await Jg(r,nn);if(!Object.hasOwn(w,E)){let D=`Couldn't find a plugin named ${G.prettyIdent(r,h)} on the remote registry.
|
`,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await kt.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.name)){let p=K.resolve(this.context.cwd,ue.toPortablePath(this.name));a.reportInfo(0,`Reading ${fe.pretty(r,p,fe.Type.PATH)}`),u=K.relative(n.cwd,p),A=await ae.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new zt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=G.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!Kde.default.valid(h.reference))throw new zt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=G.stringifyIdent(h),w=await Xg(r,nn);if(!Object.hasOwn(w,E)){let D=`Couldn't find a plugin named ${G.prettyIdent(r,h)} on the remote registry.
|
||||||
`;throw r.plugins.has(E)?D+=`A plugin named ${G.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:D+=`Note that only the plugins referenced on our website (${pe.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",pe.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${pe.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",pe.Type.URL)}).`,new Jt(51,D)}u=E,p=w[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):nn!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${nn}/`))}a.reportInfo(0,`Downloading ${pe.pretty(r,p,"green")}`),A=await on.get(p,{configuration:r})}await DH(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function DH(t,e,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,Wde.runInNewContext)(e.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,E=V.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${pe.pretty(n,h,"magenta")}`),await ae.mkdirPromise(V.dirname(E),{recursive:!0}),await ae.writeFilePromise(E,e);let w={path:h,spec:t};r&&(w.checksum=bn.makeHash(e)),await ze.addPlugin(o.cwd,[w])}var z0t=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],NE=class extends ut{constructor(){super(...arguments);this.installPath=de.String("--path",{description:"The path where the repository should be cloned to"});this.repository=de.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=de.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=de.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=de.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=de.String()}static{this.paths=[["plugin","import","from","sources"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
|
`;throw r.plugins.has(E)?D+=`A plugin named ${G.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:D+=`Note that only the plugins referenced on our website (${fe.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",fe.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${fe.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",fe.Type.URL)}).`,new zt(51,D)}u=E,p=w[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):nn!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${nn}/`))}a.reportInfo(0,`Downloading ${fe.pretty(r,p,"green")}`),A=await on.get(p,{configuration:r})}await SH(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function SH(t,e,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,Vde.runInNewContext)(e.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,E=K.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${fe.pretty(n,h,"magenta")}`),await ae.mkdirPromise(K.dirname(E),{recursive:!0}),await ae.writeFilePromise(E,e);let w={path:h,spec:t};r&&(w.checksum=bn.makeHash(e)),await Je.addPlugin(o.cwd,[w])}var Z0t=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],ME=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=ge.String()}static{this.paths=[["plugin","import","from","sources"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
|
||||||
This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
|
This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
|
||||||
|
|
||||||
The plugins can be referenced by their short name if sourced from the official Yarn repository.
|
The plugins can be referenced by their short name if sourced from the official Yarn repository.
|
||||||
`,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?V.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):V.resolve(Ae.toPortablePath((0,Yde.tmpdir)()),"yarnpkg-sources",bn.makeHash(this.repository).slice(0,6));return(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await Qt.find(r,this.context.cwd),A=G.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=G.stringifyIdent(A),h=await Jg(r,nn);if(!Object.hasOwn(h,p))throw new Jt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await BH(this,{configuration:r,report:n,target:o}),await vH(E,this,{project:u,report:n,target:o})})).exitCode()}};async function vH(t,{context:e,noMinify:r},{project:o,report:a,target:n}){let u=t.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await M2(z0t({pluginName:u,noMinify:r},n),{configuration:A,context:e,target:n}),a.reportSeparator();let p=V.resolve(n,`packages/${u}/bundles/${t}.js`),h=await ae.readFilePromise(p);await DH(t,h,{project:o,report:a})}Ve();St();Gt();var OE=class extends ut{constructor(){super(...arguments);this.name=de.String()}static{this.paths=[["plugin","remove"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
|
`,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?K.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):K.resolve(ue.toPortablePath((0,zde.tmpdir)()),"yarnpkg-sources",bn.makeHash(this.repository).slice(0,6));return(await Nt.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await kt.find(r,this.context.cwd),A=G.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=G.stringifyIdent(A),h=await Xg(r,nn);if(!Object.hasOwn(h,p))throw new zt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await DH(this,{configuration:r,report:n,target:o}),await PH(E,this,{project:u,report:n,target:o})})).exitCode()}};async function PH(t,{context:e,noMinify:r},{project:o,report:a,target:n}){let u=t.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await M2(Z0t({pluginName:u,noMinify:r},n),{configuration:A,context:e,target:n}),a.reportSeparator();let p=K.resolve(n,`packages/${u}/bundles/${t}.js`),h=await ae.readFilePromise(p);await SH(t,h,{project:o,report:a})}Ve();Pt();Gt();var UE=class extends ut{constructor(){super(...arguments);this.name=ge.String()}static{this.paths=[["plugin","remove"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
|
||||||
This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
|
This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
|
||||||
|
|
||||||
**Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
|
**Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
|
||||||
`,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o}=await Qt.find(r,this.context.cwd);return(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=G.parseIdent(u);if(!r.plugins.has(u))throw new it(`${G.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=V.resolve(o.cwd,p);ae.existsSync(h)&&(n.reportInfo(0,`Removing ${pe.pretty(r,p,pe.Type.PATH)}...`),await ae.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await ze.updateConfiguration(o.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let w=E.filter(D=>D.path!==p);return w.length===0?ze.deleteProperty:w.length===E.length?E:w}})})).exitCode()}};Ve();Gt();var ME=class extends ut{constructor(){super(...arguments);this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","runtime"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
|
`,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await kt.find(r,this.context.cwd);return(await Nt.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=G.parseIdent(u);if(!r.plugins.has(u))throw new nt(`${G.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=K.resolve(o.cwd,p);ae.existsSync(h)&&(n.reportInfo(0,`Removing ${fe.pretty(r,p,fe.Type.PATH)}...`),await ae.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Je.updateConfiguration(o.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let w=E.filter(D=>D.path!==p);return w.length===0?Je.deleteProperty:w.length===E.length?E:w}})})).exitCode()}};Ve();Gt();var _E=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","runtime"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
|
||||||
This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
|
This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
|
||||||
`,examples:[["List the currently active plugins","$0 plugin runtime"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};Ve();Ve();Gt();var UE=class extends ut{constructor(){super(...arguments);this.idents=de.Rest()}static{this.paths=[["rebuild"]]}static{this.usage=ot.Usage({description:"rebuild the project's native packages",details:`
|
`,examples:[["List the currently active plugins","$0 plugin runtime"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins);return(await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};Ve();Ve();Gt();var HE=class extends ut{constructor(){super(...arguments);this.idents=ge.Rest()}static{this.paths=[["rebuild"]]}static{this.usage=ot.Usage({description:"rebuild the project's native packages",details:`
|
||||||
This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
|
This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
|
||||||
|
|
||||||
Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
|
Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
|
||||||
|
|
||||||
By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
|
By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
|
||||||
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd),n=await Wr.find(r);if(!a)throw new or(o.cwd,this.context.cwd);let u=new Set;for(let A of this.idents)u.add(G.parseIdent(A).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new Ri}),u.size>0)for(let A of o.storedPackages.values())u.has(A.identHash)&&(o.storedBuildState.delete(A.locatorHash),o.skippedBuilds.delete(A.locatorHash));else o.storedBuildState.clear(),o.skippedBuilds.clear();return await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Gt();var SH=et(Xo());il();var _E=class extends ut{constructor(){super(...arguments);this.all=de.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=de.String("--mode",{description:"Change what artifacts installs generate",validator:js(yl)});this.patterns=de.Rest()}static{this.paths=[["remove"]]}static{this.usage=ot.Usage({description:"remove dependencies from the project",details:`
|
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd),n=await Wr.find(r);if(!a)throw new or(o.cwd,this.context.cwd);let u=new Set;for(let A of this.idents)u.add(G.parseIdent(A).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new Ri}),u.size>0)for(let A of o.storedPackages.values())u.has(A.identHash)&&(o.storedBuildState.delete(A.locatorHash),o.skippedBuilds.delete(A.locatorHash));else o.storedBuildState.clear(),o.skippedBuilds.clear();return await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Gt();var xH=et(Xo());il();var qE=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:js(yl)});this.patterns=ge.Rest()}static{this.paths=[["remove"]]}static{this.usage=ot.Usage({description:"remove dependencies from the project",details:`
|
||||||
This command will remove the packages matching the specified patterns from the current workspace.
|
This command will remove the packages matching the specified patterns from the current workspace.
|
||||||
|
|
||||||
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
||||||
@@ -505,7 +505,7 @@ ${p}
|
|||||||
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
||||||
|
|
||||||
This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
|
This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
|
||||||
`,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd),n=await Wr.find(r);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let C of this.patterns){let T=!1,N=G.parseIdent(C);for(let U of u){let J=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,SH.default)(J,C))U.manifest.peerDependenciesMeta.delete(te),h=!0,T=!0;for(let te of A){let le=U.manifest.getForScope(te),ce=[...le.values()].map(ue=>G.stringifyIdent(ue));for(let ue of(0,SH.default)(ce,G.stringifyIdent(N))){let{identHash:Ie}=G.parseIdent(ue),he=le.get(Ie);if(typeof he>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(Ie),E.push([U,te,he]),h=!0,T=!0}}}T||p.push(C)}let w=p.length>1?"Patterns":"Pattern",D=p.length>1?"don't":"doesn't",b=this.all?"any":"this";if(p.length>0)throw new it(`${w} ${pe.prettyList(r,p,pe.Type.CODE)} ${D} match any packages referenced by ${b} workspace`);return h?(await r.triggerMultipleHooks(C=>C.afterWorkspaceDependencyRemoval,E),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ve();Ve();Gt();var Vde=ve("util"),HE=class extends ut{constructor(){super(...arguments);this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["run"]]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);return(await Lt.start({configuration:r,stdout:this.context.stdout,json:this.json},async u=>{let A=a.manifest.scripts,p=qe.sortMap(A.keys(),w=>w),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((w,D)=>Math.max(w,D.length),0);for(let[w,D]of A.entries())u.reportInfo(null,`${w.padEnd(E," ")} ${(0,Vde.inspect)(D,h)}`),u.reportJson({name:w,script:D})})).exitCode()}};Ve();Ve();Gt();var qE=class extends ut{constructor(){super(...arguments);this.inspect=de.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=de.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=de.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=de.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=de.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=de.Boolean("--silent",{hidden:!0});this.scriptName=de.String();this.args=de.Proxy()}static{this.paths=[["run"]]}static{this.usage=ot.Usage({description:"run a script defined in the package.json",details:`
|
`,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd),n=await Wr.find(r);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let C of this.patterns){let T=!1,L=G.parseIdent(C);for(let U of u){let z=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,xH.default)(z,C))U.manifest.peerDependenciesMeta.delete(te),h=!0,T=!0;for(let te of A){let le=U.manifest.getForScope(te),de=[...le.values()].map(ce=>G.stringifyIdent(ce));for(let ce of(0,xH.default)(de,G.stringifyIdent(L))){let{identHash:me}=G.parseIdent(ce),pe=le.get(me);if(typeof pe>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(me),E.push([U,te,pe]),h=!0,T=!0}}}T||p.push(C)}let w=p.length>1?"Patterns":"Pattern",D=p.length>1?"don't":"doesn't",b=this.all?"any":"this";if(p.length>0)throw new nt(`${w} ${fe.prettyList(r,p,fe.Type.CODE)} ${D} match any packages referenced by ${b} workspace`);return h?(await r.triggerMultipleHooks(C=>C.afterWorkspaceDependencyRemoval,E),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ve();Ve();Gt();var Jde=De("util"),jE=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["run"]]}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);return(await Nt.start({configuration:r,stdout:this.context.stdout,json:this.json},async u=>{let A=a.manifest.scripts,p=qe.sortMap(A.keys(),w=>w),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((w,D)=>Math.max(w,D.length),0);for(let[w,D]of A.entries())u.reportInfo(null,`${w.padEnd(E," ")} ${(0,Jde.inspect)(D,h)}`),u.reportJson({name:w,script:D})})).exitCode()}};Ve();Ve();Gt();var GE=class extends ut{constructor(){super(...arguments);this.inspect=ge.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=ge.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=ge.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=ge.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=ge.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=ge.Boolean("--silent",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}static{this.paths=[["run"]]}static{this.usage=ot.Usage({description:"run a script defined in the package.json",details:`
|
||||||
This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
|
This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
|
||||||
|
|
||||||
- If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
|
- If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
|
||||||
@@ -515,32 +515,32 @@ ${p}
|
|||||||
- Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
|
- Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
|
||||||
|
|
||||||
Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
|
Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
|
||||||
`,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await Qt.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await hn.hasPackageScript(u,this.scriptName,{project:o}))return await hn.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await hn.getPackageAccessibleBinaries(u,{project:o});if(A.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await hn.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(o.workspaces.map(async w=>w.manifest.scripts.has(this.scriptName)?w:null))).filter(w=>w!==null);if(E.length===1)return await hn.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new it("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[E,w]of oE)for(let D of w)if(h.length>=D.length&&JSON.stringify(h.slice(0,D.length))===JSON.stringify(D))throw new it(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${E} plugin. You can install it with "yarn plugin import ${E}".`);throw new it(`Couldn't find a script named "${this.scriptName}".`)}}};Ve();Ve();Gt();var jE=class extends ut{constructor(){super(...arguments);this.descriptor=de.String();this.resolution=de.String()}static{this.paths=[["set","resolution"]]}static{this.usage=ot.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd),n=await Wr.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new or(o.cwd,this.context.cwd);let u=G.parseDescriptor(this.descriptor,!0),A=G.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ve();St();Gt();var Kde=et(Xo()),GE=class extends ut{constructor(){super(...arguments);this.all=de.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=de.Rest()}static{this.paths=[["unlink"]]}static{this.usage=ot.Usage({description:"disconnect the local project from another one",details:`
|
`,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await kt.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await hn.hasPackageScript(u,this.scriptName,{project:o}))return await hn.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await hn.getPackageAccessibleBinaries(u,{project:o});if(A.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await hn.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(o.workspaces.map(async w=>w.manifest.scripts.has(this.scriptName)?w:null))).filter(w=>w!==null);if(E.length===1)return await hn.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new nt(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new nt(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new nt("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[E,w]of lE)for(let D of w)if(h.length>=D.length&&JSON.stringify(h.slice(0,D.length))===JSON.stringify(D))throw new nt(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${E} plugin. You can install it with "yarn plugin import ${E}".`);throw new nt(`Couldn't find a script named "${this.scriptName}".`)}}};Ve();Ve();Gt();var WE=class extends ut{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}static{this.paths=[["set","resolution"]]}static{this.usage=ot.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 npm:1.5.0"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd),n=await Wr.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new or(o.cwd,this.context.cwd);let u=G.parseDescriptor(this.descriptor,!0),A=G.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ve();Pt();Gt();var Xde=et(Xo()),YE=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=ge.Rest()}static{this.paths=[["unlink"]]}static{this.usage=ot.Usage({description:"disconnect the local project from another one",details:`
|
||||||
This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
|
This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
|
||||||
`,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd),n=await Wr.find(r);if(!a)throw new or(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of u.manifest.resolutions)h.startsWith("portal:")&&A.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=V.resolve(this.context.cwd,Ae.toPortablePath(p));if(qe.isPathLike(p)){let E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:w,workspace:D}=await Qt.find(E,h);if(!D)throw new or(w.cwd,h);if(this.all){for(let b of w.workspaces)b.manifest.name&&A.add(G.stringifyIdent(b.anchoredLocator));if(A.size===0)throw new it("No workspace found to be unlinked in the target project")}else{if(!D.manifest.name)throw new it("The target workspace doesn't have a name and thus cannot be unlinked");A.add(G.stringifyIdent(D.anchoredLocator))}}else{let E=[...u.manifest.resolutions.map(({pattern:w})=>w.descriptor.fullName)];for(let w of(0,Kde.default)(E,p))A.add(w)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:p})=>!A.has(p.descriptor.fullName)),await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Gt();var Jde=et(Q2()),PH=et(Xo());il();var WE=class extends ut{constructor(){super(...arguments);this.interactive=de.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=de.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=de.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=de.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=de.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=de.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=de.String("--mode",{description:"Change what artifacts installs generate",validator:js(yl)});this.patterns=de.Rest()}static{this.paths=[["up"]]}static{this.usage=ot.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up`Line truncated
|
`,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd),n=await Wr.find(r);if(!a)throw new or(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of u.manifest.resolutions)h.startsWith("portal:")&&A.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=K.resolve(this.context.cwd,ue.toPortablePath(p));if(qe.isPathLike(p)){let E=await Je.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:w,workspace:D}=await kt.find(E,h);if(!D)throw new or(w.cwd,h);if(this.all){for(let b of w.workspaces)b.manifest.name&&A.add(G.stringifyIdent(b.anchoredLocator));if(A.size===0)throw new nt("No workspace found to be unlinked in the target project")}else{if(!D.manifest.name)throw new nt("The target workspace doesn't have a name and thus cannot be unlinked");A.add(G.stringifyIdent(D.anchoredLocator))}}else{let E=[...u.manifest.resolutions.map(({pattern:w})=>w.descriptor.fullName)];for(let w of(0,Xde.default)(E,p))A.add(w)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:p})=>!A.has(p.descriptor.fullName)),await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Gt();var Zde=et(k2()),bH=et(Xo());il();var KE=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:js(yl)});this.patterns=ge.Rest()}static{this.paths=[["up"]]}static{this.usage=ot.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up`Line truncated
|
||||||
|
|
||||||
${ue}`):N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
|
${ce}`):L.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
|
||||||
|
|
||||||
${ue}`)}else le.length>1&&!A&&N.reportError(27,`${G.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(b.hasErrors())return b.exitCode();let C=!1,T=[];for(let[N,U,,{suggestions:J}]of D){let te,le=J.filter(he=>he.descriptor!==null),ce=le[0].descriptor,ue=le.every(he=>G.areDescriptorsEqual(he.descriptor,ce));le.length===1||ue?te=ce:(C=!0,{answer:te}=await(0,Jde.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${G.prettyWorkspace(r,N)} \u276F ${U}?`,choices:J.map(({descriptor:he,name:De,reason:Ee})=>he?{name:De,hint:Ee,descriptor:he}:{name:De,hint:Ee,disabled:!0}),onCancel:()=>process.exit(130),result(he){return this.find(he,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let Ie=N.manifest[U].get(te.identHash);if(typeof Ie>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(Ie.descriptorHash!==te.descriptorHash)N.manifest[U].set(te.identHash,te),T.push([N,U,Ie,te]);else{let he=r.makeResolver(),De={project:o,resolver:he},Ee=r.normalizeDependency(Ie),g=he.bindDescriptor(Ee,N.anchoredLocator,De);o.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,T),C&&this.context.stdout.write(`
|
${ce}`)}else le.length>1&&!A&&L.reportError(27,`${G.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(b.hasErrors())return b.exitCode();let C=!1,T=[];for(let[L,U,,{suggestions:z}]of D){let te,le=z.filter(pe=>pe.descriptor!==null),de=le[0].descriptor,ce=le.every(pe=>G.areDescriptorsEqual(pe.descriptor,de));le.length===1||ce?te=de:(C=!0,{answer:te}=await(0,Zde.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${G.prettyWorkspace(r,L)} \u276F ${U}?`,choices:z.map(({descriptor:pe,name:ve,reason:Ie})=>pe?{name:ve,hint:Ie,descriptor:pe}:{name:ve,hint:Ie,disabled:!0}),onCancel:()=>process.exit(130),result(pe){return this.find(pe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=L.manifest[U].get(te.identHash);if(typeof me>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(me.descriptorHash!==te.descriptorHash)L.manifest[U].set(te.identHash,te),T.push([L,U,me,te]);else{let pe=r.makeResolver(),ve={project:o,resolver:pe},Ie=r.normalizeDependency(me),g=pe.bindDescriptor(Ie,L.anchoredLocator,ve);o.forgetResolution(g)}}return await r.triggerMultipleHooks(L=>L.afterWorkspaceDependencyReplacement,T),C&&this.context.stdout.write(`
|
||||||
`),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ve();Ve();Ve();Gt();var YE=class extends ut{constructor(){super(...arguments);this.recursive=de.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=de.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=de.String()}static{this.paths=[["why"]]}static{this.usage=ot.Usage({description:"display the reason why a package is needed",details:`
|
`),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ve();Ve();Ve();Gt();var VE=class extends ut{constructor(){super(...arguments);this.recursive=ge.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=ge.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=ge.String()}static{this.paths=[["why"]]}static{this.usage=ot.Usage({description:"display the reason why a package is needed",details:`
|
||||||
This command prints the exact reasons why a package appears in the dependency tree.
|
This command prints the exact reasons why a package appears in the dependency tree.
|
||||||
|
|
||||||
If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
|
If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
|
||||||
`,examples:[["Explain why lodash is used in your project","$0 why lodash"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState();let n=G.parseIdent(this.package).identHash,u=this.recursive?Z0t(o,n,{configuration:r,peers:this.peers}):X0t(o,n,{configuration:r,peers:this.peers});As.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function X0t(t,e,{configuration:r,peers:o}){let a=qe.sortMap(t.storedPackages.values(),A=>G.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let E of A.dependencies.values()){if(!o&&A.peerDependencies.has(E.identHash))continue;let w=t.storedResolutions.get(E.descriptorHash);if(!w)throw new Error("Assertion failed: The resolution should have been registered");let D=t.storedPackages.get(w);if(!D)throw new Error("Assertion failed: The package should have been registered");if(D.identHash!==e)continue;{let C=G.stringifyLocator(A);n[C]={value:[A,pe.Type.LOCATOR],children:p}}let b=G.stringifyLocator(D);p[b]={value:[{descriptor:E,locator:D},pe.Type.DEPENDENT]}}}return u}function Z0t(t,e,{configuration:r,peers:o}){let a=qe.sortMap(t.workspaces,D=>G.stringifyLocator(D.anchoredLocator)),n=new Set,u=new Set,A=D=>{if(n.has(D.locatorHash))return u.has(D.locatorHash);if(n.add(D.locatorHash),D.identHash===e)return u.add(D.locatorHash),!0;let b=!1;D.identHash===e&&(b=!0);for(let C of D.dependencies.values()){if(!o&&D.peerDependencies.has(C.identHash))continue;let T=t.storedResolutions.get(C.descriptorHash);if(!T)throw new Error("Assertion failed: The resolution should have been registered");let N=t.storedPackages.get(T);if(!N)throw new Error("Assertion failed: The package should have been registered");A(N)&&(b=!0)}return b&&u.add(D.locatorHash),b};for(let D of a)A(D.anchoredPackage);let p=new Set,h={},E={children:h},w=(D,b,C)=>{if(!u.has(D.locatorHash))return;let T=C!==null?pe.tuple(pe.Type.DEPENDENT,{locator:D,descriptor:C}):pe.tuple(pe.Type.LOCATOR,D),N={},U={value:T,children:N},J=G.stringifyLocator(D);if(b[J]=U,!(C!==null&&t.tryWorkspaceByLocator(D))&&!p.has(D.locatorHash)){p.add(D.locatorHash);for(let te of D.dependencies.values()){if(!o&&D.peerDependencies.has(te.identHash))continue;let le=t.storedResolutions.get(te.descriptorHash);if(!le)throw new Error("Assertion failed: The resolution should have been registered");let ce=t.storedPackages.get(le);if(!ce)throw new Error("Assertion failed: The package should have been registered");w(ce,N,te)}}};for(let D of a)w(D.anchoredPackage,h,null);return E}Ve();var OH={};Vt(OH,{GitFetcher:()=>_2,GitResolver:()=>H2,default:()=>Egt,gitUtils:()=>ra});Ve();St();var ra={};Vt(ra,{TreeishProtocols:()=>U2,clone:()=>NH,fetchBase:()=>mme,fetchChangedFiles:()=>yme,fetchChangedWorkspaces:()=>mgt,fetchRoot:()=>dme,isGitUrl:()=>JE,lsRemote:()=>gme,normalizeLocator:()=>dgt,normalizeRepoUrl:()=>VE,resolveUrl:()=>LH,splitRepoUrl:()=>Rh,validateRepoUrl:()=>TH});Ve();St();Gt();var fme=et(cme()),pme=et(t3()),KE=et(ve("querystring")),FH=et(ni());function QH(t,e,r){let o=t.indexOf(r);return t.lastIndexOf(e,o>-1?o:1/0)}function ume(t){try{return new URL(t)}catch{return}}function hgt(t){let e=QH(t,"@","#"),r=QH(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),QH(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function Ame(t){return ume(t)||ume(hgt(t))}function VE(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=Ame(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function hme(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var ggt=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],U2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(U2||{});function JE(t){return t?ggt.some(e=>!!t.match(e)):!1}function Rh(t){t=VE(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),o=t.slice(e+1);if(o.match(/^[a-z]+=/)){let a=KE.default.parse(o);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(U2).find(p=>Object.hasOwn(a,p)),[u,A]=
Line truncated
|
`,examples:[["Explain why lodash is used in your project","$0 why lodash"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState();let n=G.parseIdent(this.package).identHash,u=this.recursive?egt(o,n,{configuration:r,peers:this.peers}):$0t(o,n,{configuration:r,peers:this.peers});As.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function $0t(t,e,{configuration:r,peers:o}){let a=qe.sortMap(t.storedPackages.values(),A=>G.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let E of A.dependencies.values()){if(!o&&A.peerDependencies.has(E.identHash))continue;let w=t.storedResolutions.get(E.descriptorHash);if(!w)throw new Error("Assertion failed: The resolution should have been registered");let D=t.storedPackages.get(w);if(!D)throw new Error("Assertion failed: The package should have been registered");if(D.identHash!==e)continue;{let C=G.stringifyLocator(A);n[C]={value:[A,fe.Type.LOCATOR],children:p}}let b=G.stringifyLocator(D);p[b]={value:[{descriptor:E,locator:D},fe.Type.DEPENDENT]}}}return u}function egt(t,e,{configuration:r,peers:o}){let a=qe.sortMap(t.workspaces,D=>G.stringifyLocator(D.anchoredLocator)),n=new Set,u=new Set,A=D=>{if(n.has(D.locatorHash))return u.has(D.locatorHash);if(n.add(D.locatorHash),D.identHash===e)return u.add(D.locatorHash),!0;let b=!1;D.identHash===e&&(b=!0);for(let C of D.dependencies.values()){if(!o&&D.peerDependencies.has(C.identHash))continue;let T=t.storedResolutions.get(C.descriptorHash);if(!T)throw new Error("Assertion failed: The resolution should have been registered");let L=t.storedPackages.get(T);if(!L)throw new Error("Assertion failed: The package should have been registered");A(L)&&(b=!0)}return b&&u.add(D.locatorHash),b};for(let D of a)A(D.anchoredPackage);let p=new Set,h={},E={children:h},w=(D,b,C)=>{if(!u.has(D.locatorHash))return;let T=C!==null?fe.tuple(fe.Type.DEPENDENT,{locator:D,descriptor:C}):fe.tuple(fe.Type.LOCATOR,D),L={},U={value:T,children:L},z=G.stringifyLocator(D);if(b[z]=U,!(C!==null&&t.tryWorkspaceByLocator(D))&&!p.has(D.locatorHash)){p.add(D.locatorHash);for(let te of D.dependencies.values()){if(!o&&D.peerDependencies.has(te.identHash))continue;let le=t.storedResolutions.get(te.descriptorHash);if(!le)throw new Error("Assertion failed: The resolution should have been registered");let de=t.storedPackages.get(le);if(!de)throw new Error("Assertion failed: The package should have been registered");w(de,L,te)}}};for(let D of a)w(D.anchoredPackage,h,null);return E}Ve();var UH={};Kt(UH,{GitFetcher:()=>_2,GitResolver:()=>H2,default:()=>Igt,gitUtils:()=>ra});Ve();Pt();var ra={};Kt(ra,{TreeishProtocols:()=>U2,clone:()=>MH,fetchBase:()=>Cme,fetchChangedFiles:()=>Ime,fetchChangedWorkspaces:()=>Egt,fetchRoot:()=>Eme,isGitUrl:()=>XE,lsRemote:()=>yme,normalizeLocator:()=>ygt,normalizeRepoUrl:()=>zE,resolveUrl:()=>OH,splitRepoUrl:()=>Th,validateRepoUrl:()=>LH});Ve();Pt();Gt();var gme=et(fme()),dme=et(n3()),JE=et(De("querystring")),TH=et(ni());function RH(t,e,r){let o=t.indexOf(r);return t.lastIndexOf(e,o>-1?o:1/0)}function pme(t){try{return new URL(t)}catch{return}}function dgt(t){let e=RH(t,"@","#"),r=RH(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),RH(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function hme(t){return pme(t)||pme(dgt(t))}function zE(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=hme(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function mme(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var mgt=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],U2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(U2||{});function XE(t){return t?mgt.some(e=>!!t.match(e)):!1}function Th(t){t=zE(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),o=t.slice(e+1);if(o.match(/^[a-z]+=/)){let a=JE.default.parse(o);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(U2).find(p=>Object.hasOwn(a,p)),[u,A]=
Line truncated
|
||||||
This command will run a given sub-command on a single workspace.
|
This command will run a given sub-command on a single workspace.
|
||||||
`,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);let n=o.workspaces,u=new Map(n.map(p=>[G.stringifyIdent(p.anchoredLocator),p])),A=u.get(this.workspaceName);if(A===void 0){let p=Array.from(u.keys()).sort();throw new it(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:
|
`,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);let n=o.workspaces,u=new Map(n.map(p=>[G.stringifyIdent(p.anchoredLocator),p])),A=u.get(this.workspaceName);if(A===void 0){let p=Array.from(u.keys()).sort();throw new nt(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:
|
||||||
- ${p.join(`
|
- ${p.join(`
|
||||||
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};var Cgt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:Eme.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[hE,gE,dE,mE,jE,TE,SE,zE,CE,IE,wE,BE,fE,pE,yE,EE,vE,DE,PE,xE,bE,kE,GE,QE,FE,NE,LE,OE,RE,ME,UE,_E,HE,qE,WE,YE,XE]},Igt=Cgt;var jH={};Vt(jH,{default:()=>Bgt});Ve();var kt={optional:!0},UH=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:kt,zenObservable:kt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:kt,zenObservable:kt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":kt}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":kt,"postcss-jsx":kt,"postcss-less":kt,"postcss-markdown":kt,"postcss-scss":kt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:kt}}],["snowpack@>=3.3.0",{dependencies:{"node-gyp":"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:kt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:kt,"vue-template-compiler":kt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:kt,"utf-8-validate":kt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{"babel-polyfill":"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{"cross-spawn":"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{"prop-types":"^15.7.2"}}],["@rebass/forms@*",{dependencies:{"@styled-system/should-forward-prop":"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":kt,"vuetify-loader":kt}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":kt}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{deLine truncated
|
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};var wgt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:wme.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[dE,mE,yE,EE,WE,LE,xE,ZE,wE,BE,vE,DE,hE,gE,CE,IE,PE,SE,bE,QE,kE,FE,YE,RE,TE,ME,OE,UE,NE,_E,HE,qE,jE,GE,KE,VE,$E]},Bgt=wgt;var WH={};Kt(WH,{default:()=>Dgt});Ve();var Qt={optional:!0},HH=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":Qt}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":Qt,"postcss-jsx":Qt,"postcss-less":Qt,"postcss-markdown":Qt,"postcss-scss":Qt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Qt}}],["snowpack@>=3.3.0",{dependencies:{"node-gyp":"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Qt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Qt,"vue-template-compiler":Qt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:Qt,"utf-8-validate":Qt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{"babel-polyfill":"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{"cross-spawn":"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{"prop-types":"^15.7.2"}}],["@rebass/forms@*",{dependencies:{"@styled-system/should-forward-prop":"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt,"vuetify-loader":Qt}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{deLine truncated
|
||||||
This command will output all matches to the given prolog query.
|
This command will output all matches to the given prolog query.
|
||||||
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(V2(),Y2)),o=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Qt.find(o,this.context.cwd),n=await r.find(a),u=this.query;return u.endsWith(".")||(u=`${u}.`),(await Lt.start({configuration:o,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(u)){let E=Array.from(Object.entries(h)),w=E.length,D=E.reduce((b,[C])=>Math.max(b,C.length),0);for(let b=0;b<w;b++){let[C,T]=E[b];p.reportInfo(null,`${Kgt(b,w)}${C.padEnd(D," ")} = ${Vgt(T)}`)}p.reportJson(h)}})).exitCode()}};function Vgt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function Kgt(t,e){let r=t===0,o=t===e-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}Ve();Gt();var iC=class extends ut{constructor(){super(...arguments);this.verbose=de.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}static{this.paths=[["constraints","source"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(V2(),Y2)),o=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Qt.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ve();Ve();Gt();j2();var sC=class extends ut{constructor(){super(...arguments);this.fix=de.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["constraints"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
|
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(K2(),Y2)),o=await Je.find(this.context.cwd,this.context.plugins),{project:a}=await kt.find(o,this.context.cwd),n=await r.find(a),u=this.query;return u.endsWith(".")||(u=`${u}.`),(await Nt.start({configuration:o,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(u)){let E=Array.from(Object.entries(h)),w=E.length,D=E.reduce((b,[C])=>Math.max(b,C.length),0);for(let b=0;b<w;b++){let[C,T]=E[b];p.reportInfo(null,`${Jgt(b,w)}${C.padEnd(D," ")} = ${zgt(T)}`)}p.reportJson(h)}})).exitCode()}};function zgt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function Jgt(t,e){let r=t===0,o=t===e-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}Ve();Gt();var oC=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}static{this.paths=[["constraints","source"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(K2(),Y2)),o=await Je.find(this.context.cwd,this.context.plugins),{project:a}=await kt.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ve();Ve();Gt();j2();var aC=class extends ut{constructor(){super(...arguments);this.fix=ge.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["constraints"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
|
||||||
This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
|
This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
|
||||||
|
|
||||||
If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
|
If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
|
||||||
|
|
||||||
For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
|
For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
|
||||||
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o}=await Qt.find(r,this.context.cwd);await o.restoreInstallState();let a=await o.loadUserConfig(),n;if(a?.constraints)n=new $E(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(V2(),Y2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:w,remainingErrors:D}=Kk(o,E,{fix:this.fix}),b=[];for(let[C,T]of w){let N=C.manifest.indent;C.manifest=new _t,C.manifest.indent=N,C.manifest.load(T),b.push(C.persistManifest())}if(await Promise.all(b),!(w.size>0&&h>1)){u=kme(D,{configuration:r}),A=!1,p=!0;for(let[,C]of D)for(let T of C)T.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${pe.pretty(r,"yarn constraints --fix",pe.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${pe.pretty(r,"yarn constraints --fix",pe.Type.CODE)}`;await Lt.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return u.children=qe.sortMap(u.children,h=>h.value[1]),As.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};j2();var Jgt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[nC,iC,sC],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),o;if(r?.constraints)o=new $E(t);else{let{Constraints:u}=await Promise.resolve().then(()=>(V2(),Y2));o=await u.find(t)}let a=await o.process();if(!a)return;let{remainingErrors:n}=Kk(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[u,A]of n)for(let p of A)e(84,`${pe.pretty(t.configuration,u.anchoredLocator,pe.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${pe.pretty(t.configuration,"yarn constraints",pe.Type.CODE)} for more details`)}}},zgt=Jgt;var l6={};Vt(l6,{CreateCommand:()=>oC,DlxCommand:()=>aC,default:()=>Zgt});Ve();Gt();var oC=class extends ut{constructor(){super(...arguments);this.pkg=de.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=de.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=de.String();this.args=de.Proxy()}static{this.paths=[["create"]]}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=G.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?G.makeIdent(a.scope,`create-${a.name}`):G.makeIdent(null,`create-${a.name}`),u=G.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};Ve();Ve();St();Gt();var aC=class extends ut{constructor(){super(...arguments);this.packages=de.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=de.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=de.String();this.args=de.Proxy()}static{this.paths=[["dlx"]]}static{this.usage=ot.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]})}async execute(){return ze.telemetry=null,await ae.mktempPromise(async r=>{let o=V.join(r,`dlx-${process.pid}`);await ae.mkdirPromise(o),await ae.writeFilePromise(V.join(o,"package.json"),`{}
|
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await kt.find(r,this.context.cwd);await o.restoreInstallState();let a=await o.loadUserConfig(),n;if(a?.constraints)n=new tC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(K2(),Y2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:w,remainingErrors:D}=zQ(o,E,{fix:this.fix}),b=[];for(let[C,T]of w){let L=C.manifest.indent;C.manifest=new _t,C.manifest.indent=L,C.manifest.load(T),b.push(C.persistManifest())}if(await Promise.all(b),!(w.size>0&&h>1)){u=Rme(D,{configuration:r}),A=!1,p=!0;for(let[,C]of D)for(let T of C)T.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${fe.pretty(r,"yarn constraints --fix",fe.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${fe.pretty(r,"yarn constraints --fix",fe.Type.CODE)}`;await Nt.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return u.children=qe.sortMap(u.children,h=>h.value[1]),As.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};j2();var Xgt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[sC,oC,aC],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),o;if(r?.constraints)o=new tC(t);else{let{Constraints:u}=await Promise.resolve().then(()=>(K2(),Y2));o=await u.find(t)}let a=await o.process();if(!a)return;let{remainingErrors:n}=zQ(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[u,A]of n)for(let p of A)e(84,`${fe.pretty(t.configuration,u.anchoredLocator,fe.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${fe.pretty(t.configuration,"yarn constraints",fe.Type.CODE)} for more details`)}}},Zgt=Xgt;var u6={};Kt(u6,{CreateCommand:()=>lC,DlxCommand:()=>cC,default:()=>edt});Ve();Gt();var lC=class extends ut{constructor(){super(...arguments);this.pkg=ge.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[["create"]]}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=G.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?G.makeIdent(a.scope,`create-${a.name}`):G.makeIdent(null,`create-${a.name}`),u=G.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};Ve();Ve();Pt();Gt();var cC=class extends ut{constructor(){super(...arguments);this.packages=ge.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[["dlx"]]}static{this.usage=ot.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]})}async execute(){return Je.telemetry=null,await ae.mktempPromise(async r=>{let o=K.join(r,`dlx-${process.pid}`);await ae.mkdirPromise(o),await ae.writeFilePromise(K.join(o,"package.json"),`{}
|
||||||
`),await ae.writeFilePromise(V.join(o,"yarn.lock"),"");let a=V.join(o,".yarnrc.yml"),n=await ze.findProjectCwd(this.context.cwd),A={enableGlobalCache:!(await ze.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Ju(68),level:pe.LogLevel.Discard}]},p=n!==null?V.join(n,".yarnrc.yml"):null;p!==null&&ae.existsSync(p)?(await ae.copyFilePromise(p,a),await ze.updateConfiguration(o,N=>{let U=qe.toMerged(N,A);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(J=>{let te=typeof J=="string"?J:J.path,le=Ae.isAbsolute(te)?te:Ae.resolve(Ae.fromPortablePath(n),te);return typeof J=="string"?le:{path:le,spec:J.spec}})),U})):await ae.writeJsonPromise(a,A);let h=this.packages??[this.command],E=G.parseDescriptor(this.command).name,w=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(w!==0)return w;this.quiet||this.context.stdout.write(`
|
`),await ae.writeFilePromise(K.join(o,"yarn.lock"),"");let a=K.join(o,".yarnrc.yml"),n=await Je.findProjectCwd(this.context.cwd),A={enableGlobalCache:!(await Je.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:zu(68),level:fe.LogLevel.Discard}]},p=n!==null?K.join(n,".yarnrc.yml"):null;p!==null&&ae.existsSync(p)?(await ae.copyFilePromise(p,a),await Je.updateConfiguration(o,L=>{let U=qe.toMerged(L,A);return Array.isArray(L.plugins)&&(U.plugins=L.plugins.map(z=>{let te=typeof z=="string"?z:z.path,le=ue.isAbsolute(te)?te:ue.resolve(ue.fromPortablePath(n),te);return typeof z=="string"?le:{path:le,spec:z.spec}})),U})):await ae.writeJsonPromise(a,A);let h=this.packages??[this.command],E=G.parseDescriptor(this.command).name,w=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(w!==0)return w;this.quiet||this.context.stdout.write(`
|
||||||
`);let D=await ze.find(o,this.context.plugins),{project:b,workspace:C}=await Qt.find(D,o);if(C===null)throw new or(b.cwd,o);await b.restoreInstallState();let T=await hn.getWorkspaceAccessibleBinaries(C);return T.has(E)===!1&&T.size===1&&typeof this.packages>"u"&&(E=Array.from(T)[0][0]),await hn.executeWorkspaceAccessibleBinary(C,E,this.args,{packageAccessibleBinaries:T,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var Xgt={commands:[oC,aC]},Zgt=Xgt;var A6={};Vt(A6,{ExecFetcher:()=>J2,ExecResolver:()=>z2,default:()=>tdt,execUtils:()=>Zk});Ve();Ve();St();var hA="exec:";var Zk={};Vt(Zk,{loadGeneratorFile:()=>K2,makeLocator:()=>u6,makeSpec:()=>rye,parseSpec:()=>c6});Ve();St();function c6(t){let{params:e,selector:r}=G.parseRange(t),o=Ae.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?G.parseLocator(e.locator):null,path:o}}function rye({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function u6(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return G.makeLocator(t,rye({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function K2(t,e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t,{protocol:e}),n=V.isAbsolute(a)?{packageFs:new En(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new En(Bt.root),prefixPath:V.relative(Bt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=V.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var J2=class{supports(e,r){return!!e.reference.startsWith(hA)}getLocalPath(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:hA});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){let o=await K2(e.reference,hA,r);return ae.mktempPromise(async a=>{let n=V.join(a,"generator.js");return await ae.writeFilePromise(n,o),ae.mktempPromise(async u=>{if(await this.generatePackage(u,e,n,r),!ae.existsSync(V.join(u,"build")))throw new Error("The script should have generated a build directory");return await $i.makeArchiveFromDirectory(V.join(u,"build"),{prefixPath:G.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await ae.mktempPromise(async n=>{let u=await hn.makeScriptEnv({project:a.project,binFolder:n}),A=V.join(e,"runtime.js");return await ae.mktempPromise(async p=>{let h=V.join(p,"buildfile.log"),E=V.join(e,"generator"),w=V.join(e,"build");await ae.mkdirPromise(E),await ae.mkdirPromise(w);let D={tempDir:Ae.fromPortablePath(E),buildDir:Ae.fromPortablePath(w),locator:G.stringifyLocator(r)};await ae.writeFilePromise(A,`
|
`);let D=await Je.find(o,this.context.plugins),{project:b,workspace:C}=await kt.find(D,o);if(C===null)throw new or(b.cwd,o);await b.restoreInstallState();let T=await hn.getWorkspaceAccessibleBinaries(C);return T.has(E)===!1&&T.size===1&&typeof this.packages>"u"&&(E=Array.from(T)[0][0]),await hn.executeWorkspaceAccessibleBinary(C,E,this.args,{packageAccessibleBinaries:T,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var $gt={commands:[lC,cC]},edt=$gt;var p6={};Kt(p6,{ExecFetcher:()=>z2,ExecResolver:()=>J2,default:()=>ndt,execUtils:()=>$Q});Ve();Ve();Pt();var hA="exec:";var $Q={};Kt($Q,{loadGeneratorFile:()=>V2,makeLocator:()=>f6,makeSpec:()=>sye,parseSpec:()=>A6});Ve();Pt();function A6(t){let{params:e,selector:r}=G.parseRange(t),o=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?G.parseLocator(e.locator):null,path:o}}function sye({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function f6(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return G.makeLocator(t,sye({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function V2(t,e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t,{protocol:e}),n=K.isAbsolute(a)?{packageFs:new En(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new En(Bt.root),prefixPath:K.relative(Bt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=K.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var z2=class{supports(e,r){return!!e.reference.startsWith(hA)}getLocalPath(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:hA});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){let o=await V2(e.reference,hA,r);return ae.mktempPromise(async a=>{let n=K.join(a,"generator.js");return await ae.writeFilePromise(n,o),ae.mktempPromise(async u=>{if(await this.generatePackage(u,e,n,r),!ae.existsSync(K.join(u,"build")))throw new Error("The script should have generated a build directory");return await $i.makeArchiveFromDirectory(K.join(u,"build"),{prefixPath:G.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await ae.mktempPromise(async n=>{let u=await hn.makeScriptEnv({project:a.project,binFolder:n}),A=K.join(e,"runtime.js");return await ae.mktempPromise(async p=>{let h=K.join(p,"buildfile.log"),E=K.join(e,"generator"),w=K.join(e,"build");await ae.mkdirPromise(E),await ae.mkdirPromise(w);let D={tempDir:ue.fromPortablePath(E),buildDir:ue.fromPortablePath(w),locator:G.stringifyLocator(r)};await ae.writeFilePromise(A,`
|
||||||
// Expose 'Module' as a global variable
|
// Expose 'Module' as a global variable
|
||||||
Object.defineProperty(global, 'Module', {
|
Object.defineProperty(global, 'Module', {
|
||||||
get: () => require('module'),
|
get: () => require('module'),
|
||||||
@@ -564,135 +564,135 @@ ${ue}`)}else le.length>1&&!A&&N.reportError(27,`${G.prettyDescriptor(r,U)} has m
|
|||||||
},
|
},
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
});
|
});
|
||||||
`);let b=u.NODE_OPTIONS||"",C=/\s*--require\s+\S*\.pnp\.c?js\s*/g;b=b.replace(C," ").trim(),u.NODE_OPTIONS=b;let{stdout:T,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${G.stringifyLocator(r)})
|
`);let b=u.NODE_OPTIONS||"",C=/\s*--require\s+\S*\.pnp\.c?js\s*/g;b=b.replace(C," ").trim(),u.NODE_OPTIONS=b;let{stdout:T,stderr:L}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${G.stringifyLocator(r)})
|
||||||
`,prefix:G.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Hr.pipevp(process.execPath,["--require",Ae.fromPortablePath(A),Ae.fromPortablePath(o),G.stringifyIdent(r)],{cwd:e,env:u,stdin:null,stdout:T,stderr:N});if(U!==0)throw ae.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${pe.pretty(a.project.configuration,h,pe.Type.PATH)})`)})})}};Ve();Ve();var $gt=2,z2=class{supportsDescriptor(e,r){return!!e.range.startsWith(hA)}supportsLocator(e,r){return!!e.reference.startsWith(hA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=c6(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await K2(G.makeRange({protocol:hA,source:a,selector:a,params:{locator:G.stringifyLocator(n)}}),hA,o.fetchOptions),A=bn.makeHash(`${$gt}`,u).slice(0,6);return[u6(e,{parentLocator:n,path:a,generatorHash:A,protocol:hA})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await qe.releaseAfterUseAsync(async()=>await _t.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var edt={fetchers:[J2],resolvers:[z2]},tdt=edt;var p6={};Vt(p6,{FileFetcher:()=>eB,FileResolver:()=>tB,TarballFileFetcher:()=>rB,TarballFileResolver:()=>nB,default:()=>idt,fileUtils:()=>$g});Ve();St();var lC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,X2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,_i="file:";var $g={};Vt($g,{fetchArchiveFromLocator:()=>$2,makeArchiveFromLocator:()=>$k,makeBufferFromLocator:()=>f6,makeLocator:()=>cC,makeSpec:()=>nye,parseSpec:()=>Z2});Ve();St();function Z2(t){let{params:e,selector:r}=G.parseRange(t),o=Ae.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?G.parseLocator(e.locator):null,path:o}}function nye({parentLocator:t,path:e,hash:r,protocol:o}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function cC(t,{parentLocator:e,path:r,hash:o,protocol:a}){return G.makeLocator(t,nye({parentLocator:e,path:r,hash:o,protocol:a}))}async function $2(t,e){let{parentLocator:r,path:o}=G.parseFileStyleRange(t.reference,{protocol:_i}),a=V.isAbsolute(o)?{packageFs:new En(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new En(Bt.root),prefixPath:V.relative(Bt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=V.join(n.prefixPath,o);return await qe.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function $k(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=G.parseFileStyleRange(t.reference,{protocol:e}),u=V.isAbsolute(n)?{packageFs:new En(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new En(Bt.root),prefixPath:V.relative(Bt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=V.join(A.prefixPath,n);return await qe.releaseAfterUseAsync(async()=>await $i.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:G.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function f6(t,{protocol:e,fetchOptions:r}){return(await $k(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var eB=class{supports(e,r){return!!e.reference.startsWith(_i)}getLocalPath(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:_i});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){return $k(e,{protocol:_i,fetchOptions:r})}};Ve();Ve();var rdt=2,tB=c
Line truncated
|
`,prefix:G.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Hr.pipevp(process.execPath,["--require",ue.fromPortablePath(A),ue.fromPortablePath(o),G.stringifyIdent(r)],{cwd:e,env:u,stdin:null,stdout:T,stderr:L});if(U!==0)throw ae.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${fe.pretty(a.project.configuration,h,fe.Type.PATH)})`)})})}};Ve();Ve();var tdt=2,J2=class{supportsDescriptor(e,r){return!!e.range.startsWith(hA)}supportsLocator(e,r){return!!e.reference.startsWith(hA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=A6(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await V2(G.makeRange({protocol:hA,source:a,selector:a,params:{locator:G.stringifyLocator(n)}}),hA,o.fetchOptions),A=bn.makeHash(`${tdt}`,u).slice(0,6);return[f6(e,{parentLocator:n,path:a,generatorHash:A,protocol:hA})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await qe.releaseAfterUseAsync(async()=>await _t.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var rdt={fetchers:[z2],resolvers:[J2]},ndt=rdt;var g6={};Kt(g6,{FileFetcher:()=>eB,FileResolver:()=>tB,TarballFileFetcher:()=>rB,TarballFileResolver:()=>nB,default:()=>odt,fileUtils:()=>td});Ve();Pt();var uC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,X2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,_i="file:";var td={};Kt(td,{fetchArchiveFromLocator:()=>$2,makeArchiveFromLocator:()=>ek,makeBufferFromLocator:()=>h6,makeLocator:()=>AC,makeSpec:()=>oye,parseSpec:()=>Z2});Ve();Pt();function Z2(t){let{params:e,selector:r}=G.parseRange(t),o=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?G.parseLocator(e.locator):null,path:o}}function oye({parentLocator:t,path:e,hash:r,protocol:o}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function AC(t,{parentLocator:e,path:r,hash:o,protocol:a}){return G.makeLocator(t,oye({parentLocator:e,path:r,hash:o,protocol:a}))}async function $2(t,e){let{parentLocator:r,path:o}=G.parseFileStyleRange(t.reference,{protocol:_i}),a=K.isAbsolute(o)?{packageFs:new En(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new En(Bt.root),prefixPath:K.relative(Bt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=K.join(n.prefixPath,o);return await qe.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function ek(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=G.parseFileStyleRange(t.reference,{protocol:e}),u=K.isAbsolute(n)?{packageFs:new En(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new En(Bt.root),prefixPath:K.relative(Bt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=K.join(A.prefixPath,n);return await qe.releaseAfterUseAsync(async()=>await $i.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:G.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function h6(t,{protocol:e,fetchOptions:r}){return(await ek(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var eB=class{supports(e,r){return!!e.reference.startsWith(_i)}getLocalPath(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:_i});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){return ek(e,{protocol:_i,fetchOptions:r})}};Ve();Ve();var idt=2,tB=c
Line truncated
|
||||||
`,{automaticNewlines:!0});let h=[p],E=V.join(this.context.cwd,"README.md");if(ae.existsSync(E)||(await ae.writeFilePromise(E,`# ${G.stringifyIdent(n.name)}
|
`,{automaticNewlines:!0});let h=[p],E=K.join(this.context.cwd,"README.md");if(ae.existsSync(E)||(await ae.writeFilePromise(E,`# ${G.stringifyIdent(n.name)}
|
||||||
`),h.push(E)),!o||o.cwd===this.context.cwd){let w=V.join(this.context.cwd,mr.lockfile);ae.existsSync(w)||(await ae.writeFilePromise(w,""),h.push(w));let b=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Whether you use PnP or not, the node_modules folder is often used to store","# build artifacts that should be gitignored","node_modules","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(ce=>`${ce}
|
`),h.push(E)),!o||o.cwd===this.context.cwd){let w=K.join(this.context.cwd,mr.lockfile);ae.existsSync(w)||(await ae.writeFilePromise(w,""),h.push(w));let b=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Whether you use PnP or not, the node_modules folder is often used to store","# build artifacts that should be gitignored","node_modules","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(de=>`${de}
|
||||||
`).join(""),C=V.join(this.context.cwd,".gitignore");ae.existsSync(C)||(await ae.writeFilePromise(C,b),h.push(C));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(ce=>`${ce}
|
`).join(""),C=K.join(this.context.cwd,".gitignore");ae.existsSync(C)||(await ae.writeFilePromise(C,b),h.push(C));let L=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(de=>`${de}
|
||||||
`).join(""),U=V.join(this.context.cwd,".gitattributes");ae.existsSync(U)||(await ae.writeFilePromise(U,N),h.push(U));let J={"*":{charset:"utf-8",endOfLine:"lf",indentSize:2,indentStyle:"space",insertFinalNewline:!0}};qe.mergeIntoTarget(J,r.get("initEditorConfig"));let te=`root = true
|
`).join(""),U=K.join(this.context.cwd,".gitattributes");ae.existsSync(U)||(await ae.writeFilePromise(U,L),h.push(U));let z={"*":{charset:"utf-8",endOfLine:"lf",indentSize:2,indentStyle:"space",insertFinalNewline:!0}};qe.mergeIntoTarget(z,r.get("initEditorConfig"));let te=`root = true
|
||||||
`;for(let[ce,ue]of Object.entries(J)){te+=`
|
`;for(let[de,ce]of Object.entries(z)){te+=`
|
||||||
[${ce}]
|
[${de}]
|
||||||
`;for(let[Ie,he]of Object.entries(ue)){let De=Ie.replace(/[A-Z]/g,Ee=>`_${Ee.toLowerCase()}`);te+=`${De} = ${he}
|
`;for(let[me,pe]of Object.entries(ce)){let ve=me.replace(/[A-Z]/g,Ie=>`_${Ie.toLowerCase()}`);te+=`${ve} = ${pe}
|
||||||
`}}let le=V.join(this.context.cwd,".editorconfig");ae.existsSync(le)||(await ae.writeFilePromise(le,te),h.push(le)),await this.cli.run(["install"],{quiet:!0}),this.initializer&&(this.context.stdout.write(`
|
`}}let le=K.join(this.context.cwd,".editorconfig");ae.existsSync(le)||(await ae.writeFilePromise(le,te),h.push(le)),await this.cli.run(["install"],{quiet:!0}),await this.initialize(),ae.existsSync(K.join(this.context.cwd,".git"))||(await Hr.execvp("git",["init"],{cwd:this.context.cwd}),await Hr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Hr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};var fC=class extends Uh{constructor(){super(...arguments);this.initializer=ge.String();this.argv=ge.Proxy()}static{this.paths=[["init"]]}async initialize(){this.context.stdout.write(`
|
||||||
`),await this.cli.run(["dlx",this.initializer],{quiet:!0})),ae.existsSync(V.join(this.context.cwd,".git"))||(await Hr.execvp("git",["init"],{cwd:this.context.cwd}),await Hr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Hr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};var cdt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[uC]},udt=cdt;var mj={};Vt(mj,{SearchCommand:()=>xC,UpgradeInteractiveCommand:()=>bC,default:()=>UIt});Ve();var lye=et(ve("os"));function AC({stdout:t}){if(lye.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}Gt();var CEe=et(N6()),O6={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},ayt=(0,CEe.default)(O6.appId,O6.apiKey).initIndex(O6.indexName),M6=async(t,e=0)=>await ayt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var sv=["regular","dev","peer"],xC=class extends ut{static{this.paths=[["search"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open the search interface",details:`
|
`),await this.cli.run(["dlx",this.initializer,...this.argv],{quiet:!0})}};var Adt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[Uh,fC]},fdt=Adt;var Ej={};Kt(Ej,{SearchCommand:()=>QC,UpgradeInteractiveCommand:()=>kC,default:()=>HIt});Ve();var Aye=et(De("os"));function pC({stdout:t}){if(Aye.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}Gt();var BEe=et(M6()),U6={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},cyt=(0,BEe.default)(U6.appId,U6.apiKey).initIndex(U6.indexName),_6=async(t,e=0)=>await cyt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var sv=["regular","dev","peer"],QC=class extends ut{static{this.paths=[["search"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open the search interface",details:`
|
||||||
This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
|
This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
|
||||||
`,examples:[["Open the search window","yarn search"]]})}async execute(){AC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(UQ(),oj)),{ScrollableItems:r}=await Promise.resolve().then(()=>(jQ(),qQ)),{useKeypress:o}=await Promise.resolve().then(()=>(rv(),bwe)),{useMinistore:a}=await Promise.resolve().then(()=>(fj(),Aj)),{renderForm:n}=await Promise.resolve().then(()=>(VQ(),YQ)),{default:u}=await Promise.resolve().then(()=>et(Uwe())),{Box:A,Text:p}=await Promise.resolve().then(()=>et(ac())),{default:h,useEffect:E,useState:w}=await Promise.resolve().then(()=>et(ln())),D=await ze.find(this.context.cwd,this.context.plugins),b=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),C=()=>h.createElement(h.Fragment,null,h.createElement(A,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(A,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(A,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),T=()=>h.createElement(A,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),N=({hit:he,active:De})=>{let[Ee,g]=a(he.name,null);o({active:De},(fe,ie)=>{if(ie.name!=="space")return;if(!Ee){g(sv[0]);return}let Z=sv.indexOf(Ee)+1;Z===sv.length?g(null):g(sv[Z])},[Ee,g]);let me=G.parseIdent(he.name),Ce=G.prettyIdent(D,me);return h.createElement(A,null,h.createElement(A,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},Ce)),h.createElement(A,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},he.owner.name)),h.createElement(A,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},he.version)),h.createElement(A,{width:16,marginLeft:1},h.createElement(p,null,he.humanDownloadsLast30Days)))},U=({name:he,active:De})=>{let[Ee]=a(he,null),g=G.parseIdent(he);return h.createElement(A,null,h.createElement(A,{width:47},h.createElement(p,{bold:!0}," - ",G.prettyIdent(D,g))),sv.map(me=>h.createElement(A,{key:me,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(e,{active:Ee===me})," ",h.createElement(p,{bold:!0},me)))))},J=()=>h.createElement(A,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),le=await n(({useSubmit:he})=>{let De=a();he(De);let Ee=Array.from(De.keys()).filter(q=>De.get(q)!==null),[g,me]=w(""),[Ce,fe]=w(0),[ie,Z]=w([]),Se=q=>{q.match(/\t| /)||me(q)},Re=async()=>{fe(0);let q=await M6(g);q.query===g&&Z(q.hits)},ht=async()=>{let q=await M6(g,Ce+1);q.query===g&&q.page-1===Ce&&(fe(q.page),Z([...ie,...q.hits]))};return E(()=>{g?Re():Z([])},[g]),h.createElement(A,{flexDirection:"column"},h.createElement(b,null),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(A,{width:41},h.createElement(u,{value:g,onChange:Se,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(C,null)),ie.length?h.createElement(r,{radius:2,loop:!1,children:ie.map(q=>h.createElement(N,{key:q.name,hit:q,active:!1})),willReachEnd:ht}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(A,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(T,null)),Ee.length?Ee.map(q=>h.createElement(U,{key:q,name:q,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(J,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof le>"u")return 1;let ce=Array.from(le.keys()).filter(he=>le.get(he)==="regular"),ue=Array.from(le.keys()).filter(he=>le.get(he)==="dev"),Ie=Array.from(le.keys()).filter(he=>le.get(he)==="peer");return ce.length&&await this.cli.run(["add",...ce]),ue.length&&await this.cli.run(["add","--dev",...ue]),Ie&&await this.cli.run(["add","--peer",...Ie]),0}};Ve();Gt();n8();var Ywe=et(ni()),Wwe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/;function Vwe(t,e){return t.length>0?[t.slice(0,e)].concat(Vwe(t.slice(e),e)):[]}var bC=class extends ut{static{this.paths=[["upgrade-interactive"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open
Line truncated
|
`,examples:[["Open the search window","yarn search"]]})}async execute(){pC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(_k(),lj)),{ScrollableItems:r}=await Promise.resolve().then(()=>(Gk(),jk)),{useKeypress:o}=await Promise.resolve().then(()=>(rv(),Fwe)),{useMinistore:a}=await Promise.resolve().then(()=>(hj(),pj)),{renderForm:n}=await Promise.resolve().then(()=>(Vk(),Kk)),{default:u}=await Promise.resolve().then(()=>et(qwe())),{Box:A,Text:p}=await Promise.resolve().then(()=>et(ac())),{default:h,useEffect:E,useState:w}=await Promise.resolve().then(()=>et(ln())),D=await Je.find(this.context.cwd,this.context.plugins),b=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),C=()=>h.createElement(h.Fragment,null,h.createElement(A,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(A,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(A,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),T=()=>h.createElement(A,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),L=({hit:pe,active:ve})=>{let[Ie,g]=a(pe.name,null);o({active:ve},(Ae,ie)=>{if(ie.name!=="space")return;if(!Ie){g(sv[0]);return}let Z=sv.indexOf(Ie)+1;Z===sv.length?g(null):g(sv[Z])},[Ie,g]);let Ce=G.parseIdent(pe.name),ye=G.prettyIdent(D,Ce);return h.createElement(A,null,h.createElement(A,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},ye)),h.createElement(A,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},pe.owner.name)),h.createElement(A,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},pe.version)),h.createElement(A,{width:16,marginLeft:1},h.createElement(p,null,pe.humanDownloadsLast30Days)))},U=({name:pe,active:ve})=>{let[Ie]=a(pe,null),g=G.parseIdent(pe);return h.createElement(A,null,h.createElement(A,{width:47},h.createElement(p,{bold:!0}," - ",G.prettyIdent(D,g))),sv.map(Ce=>h.createElement(A,{key:Ce,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(e,{active:Ie===Ce})," ",h.createElement(p,{bold:!0},Ce)))))},z=()=>h.createElement(A,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),le=await n(({useSubmit:pe})=>{let ve=a();pe(ve);let Ie=Array.from(ve.keys()).filter(q=>ve.get(q)!==null),[g,Ce]=w(""),[ye,Ae]=w(0),[ie,Z]=w([]),Pe=q=>{q.match(/\t| /)||Ce(q)},Re=async()=>{Ae(0);let q=await _6(g);q.query===g&&Z(q.hits)},gt=async()=>{let q=await _6(g,ye+1);q.query===g&&q.page-1===ye&&(Ae(q.page),Z([...ie,...q.hits]))};return E(()=>{g?Re():Z([])},[g]),h.createElement(A,{flexDirection:"column"},h.createElement(b,null),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(A,{width:41},h.createElement(u,{value:g,onChange:Pe,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(C,null)),ie.length?h.createElement(r,{radius:2,loop:!1,children:ie.map(q=>h.createElement(L,{key:q.name,hit:q,active:!1})),willReachEnd:gt}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(A,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(T,null)),Ie.length?Ie.map(q=>h.createElement(U,{key:q,name:q,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(z,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof le>"u")return 1;let de=Array.from(le.keys()).filter(pe=>le.get(pe)==="regular"),ce=Array.from(le.keys()).filter(pe=>le.get(pe)==="dev"),me=Array.from(le.keys()).filter(pe=>le.get(pe)==="peer");return de.length&&await this.cli.run(["add",...de]),ce.length&&await this.cli.run(["add","--dev",...ce]),me&&await this.cli.run(["add","--peer",...me]),0}};Ve();Gt();s8();var zwe=et(ni()),Vwe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/;function Jwe(t,e){return t.length>0?[t.slice(0,e)].concat(Jwe(t.slice(e),e)):[]}var kC=class extends ut{static{this.paths=[["upgrade-interactive"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open
Line truncated
|
||||||
This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.
|
This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.
|
||||||
`,examples:[["Open the upgrade window","yarn upgrade-interactive"]]})}async execute(){AC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(Gwe(),jwe)),{Pad:r}=await Promise.resolve().then(()=>(dj(),qwe)),{ScrollableItems:o}=await Promise.resolve().then(()=>(jQ(),qQ)),{useMinistore:a}=await Promise.resolve().then(()=>(fj(),Aj)),{renderForm:n}=await Promise.resolve().then(()=>(VQ(),YQ)),{Box:u,Text:A}=await Promise.resolve().then(()=>et(ac())),{default:p,useEffect:h,useRef:E,useState:w}=await Promise.resolve().then(()=>et(ln())),D=await ze.find(this.context.cwd,this.context.plugins),{project:b,workspace:C}=await Qt.find(D,this.context.cwd),T=await Wr.find(D);if(!C)throw new or(b.cwd,this.context.cwd);await b.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(me,Ce)=>{let fe=$pe(me,Ce),ie="";for(let Z of fe)Z.added?ie+=pe.pretty(D,Z.value,"green"):Z.removed||(ie+=Z.value);return ie},J=(me,Ce)=>{if(me===Ce)return Ce;let fe=G.parseRange(me),ie=G.parseRange(Ce),Z=fe.selector.match(Wwe),Se=ie.selector.match(Wwe);if(!Z||!Se)return U(me,Ce);let Re=["gray","red","yellow","green","magenta"],ht=null,q="";for(let nt=1;nt<Re.length;++nt)ht!==null||Z[nt]!==Se[nt]?(ht===null&&(ht=Re[nt-1]),q+=pe.pretty(D,Se[nt],ht)):q+=Se[nt];return q},te=async(me,Ce,fe)=>{let ie=await nu.fetchDescriptorFrom(me,fe,{project:b,cache:T,preserveModifier:Ce,workspace:C});return ie!==null?ie.range:me.range},le=async me=>{let Ce=Ywe.default.valid(me.range)?`^${me.range}`:me.range,[fe,ie]=await Promise.all([te(me,me.range,Ce).catch(()=>null),te(me,me.range,"latest").catch(()=>null)]),Z=[{value:null,label:me.range}];return fe&&fe!==me.range?Z.push({value:fe,label:J(me.range,fe)}):Z.push({value:null,label:""}),ie&&ie!==fe&&ie!==me.range?Z.push({value:ie,label:J(me.range,ie)}):Z.push({value:null,label:""}),Z},ce=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),ue=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),Ie=({active:me,descriptor:Ce,suggestions:fe})=>{let[ie,Z]=a(Ce.descriptorHash,null),Se=G.stringifyIdent(Ce),Re=Math.max(0,45-Se.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},G.prettyIdent(D,Ce)),p.createElement(r,{active:me,length:Re})),p.createElement(e,{active:me,options:fe,value:ie,skewer:!0,onChange:Z,sizes:[17,17,17]})))},he=({dependencies:me})=>{let[Ce,fe]=w(me.map(()=>null)),ie=E(!0),Z=async Se=>{let Re=await le(Se);return Re.filter(ht=>ht.label!=="").length<=1?null:{descriptor:Se,suggestions:Re}};return h(()=>()=>{ie.current=!1},[]),h(()=>{let Se=Math.trunc(N*1.75),Re=me.slice(0,Se),ht=me.slice(Se),q=Vwe(ht,N),nt=Re.map(Z).reduce(async(Le,Te)=>{await Le;let ke=await Te;ke!==null&&ie.current&&fe(Ke=>{let xe=Ke.findIndex(He=>He===null),tt=[...Ke];return tt[xe]=ke,tt})},Promise.resolve());q.reduce((Le,Te)=>Promise.all(Te.map(ke=>Promise.resolve().then(()=>Z(ke)))).then(async ke=>{ke=ke.filter(Ke=>Ke!==null),await Le,ie.current&&fe(Ke=>{let xe=Ke.findIndex(tt=>tt===null);return Ke.slice(0,xe).concat(ke).concat(Ke.slice(xe+ke.length))})}),nt).then(()=>{ie.current&&fe(Le=>Le.filter(Te=>Te!==null))})},[]),Ce.length?p.createElement(o,{radius:N>>1,children:Ce.map((Se,Re)=>Se!==null?p.createElement(Ie,{key:Re,active:!1,descriptor:Se.descriptor,suggestions:Se.suggestions}):p.createElement(A,{key:Re},"Loading..."))}):p.createElement(A,null,"No upgrades found")},Ee=await n(({useSubmit:me})=>{me(a());let Ce=new Map;for(let ie of b.workspaces)for(let Z of["dependencies","devDependencies"])for(let Se of ie.manifest[Z].values())b.tryWorkspaceByDescriptor(Se)===null&&(Se.range.startsWith("link:")||Ce.set(Se.descriptorHash,Se));let fe=qe.sortMap(Ce.values(),ie=>G.stringifyDescriptor(ie));return p.createEleme
Line truncated
|
`,examples:[["Open the upgrade window","yarn upgrade-interactive"]]})}async execute(){pC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(Kwe(),Ywe)),{Pad:r}=await Promise.resolve().then(()=>(yj(),Wwe)),{ScrollableItems:o}=await Promise.resolve().then(()=>(Gk(),jk)),{useMinistore:a}=await Promise.resolve().then(()=>(hj(),pj)),{renderForm:n}=await Promise.resolve().then(()=>(Vk(),Kk)),{Box:u,Text:A}=await Promise.resolve().then(()=>et(ac())),{default:p,useEffect:h,useRef:E,useState:w}=await Promise.resolve().then(()=>et(ln())),D=await Je.find(this.context.cwd,this.context.plugins),{project:b,workspace:C}=await kt.find(D,this.context.cwd),T=await Wr.find(D);if(!C)throw new or(b.cwd,this.context.cwd);await b.restoreInstallState({restoreResolutions:!1});let L=this.context.stdout.rows-7,U=(Ce,ye)=>{let Ae=rhe(Ce,ye),ie="";for(let Z of Ae)Z.added?ie+=fe.pretty(D,Z.value,"green"):Z.removed||(ie+=Z.value);return ie},z=(Ce,ye)=>{if(Ce===ye)return ye;let Ae=G.parseRange(Ce),ie=G.parseRange(ye),Z=Ae.selector.match(Vwe),Pe=ie.selector.match(Vwe);if(!Z||!Pe)return U(Ce,ye);let Re=["gray","red","yellow","green","magenta"],gt=null,q="";for(let rt=1;rt<Re.length;++rt)gt!==null||Z[rt]!==Pe[rt]?(gt===null&&(gt=Re[rt-1]),q+=fe.pretty(D,Pe[rt],gt)):q+=Pe[rt];return q},te=async(Ce,ye,Ae)=>{let ie=await nu.fetchDescriptorFrom(Ce,Ae,{project:b,cache:T,preserveModifier:ye,workspace:C});return ie!==null?ie.range:Ce.range},le=async Ce=>{let ye=zwe.default.valid(Ce.range)?`^${Ce.range}`:Ce.range,[Ae,ie]=await Promise.all([te(Ce,Ce.range,ye).catch(()=>null),te(Ce,Ce.range,"latest").catch(()=>null)]),Z=[{value:null,label:Ce.range}];return Ae&&Ae!==Ce.range?Z.push({value:Ae,label:z(Ce.range,Ae)}):Z.push({value:null,label:""}),ie&&ie!==Ae&&ie!==Ce.range?Z.push({value:ie,label:z(Ce.range,ie)}):Z.push({value:null,label:""}),Z},de=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),ce=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),me=({active:Ce,descriptor:ye,suggestions:Ae})=>{let[ie,Z]=a(ye.descriptorHash,null),Pe=G.stringifyIdent(ye),Re=Math.max(0,45-Pe.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},G.prettyIdent(D,ye)),p.createElement(r,{active:Ce,length:Re})),p.createElement(e,{active:Ce,options:Ae,value:ie,skewer:!0,onChange:Z,sizes:[17,17,17]})))},pe=({dependencies:Ce})=>{let[ye,Ae]=w(Ce.map(()=>null)),ie=E(!0),Z=async Pe=>{let Re=await le(Pe);return Re.filter(gt=>gt.label!=="").length<=1?null:{descriptor:Pe,suggestions:Re}};return h(()=>()=>{ie.current=!1},[]),h(()=>{let Pe=Math.trunc(L*1.75),Re=Ce.slice(0,Pe),gt=Ce.slice(Pe),q=Jwe(gt,L),rt=Re.map(Z).reduce(async(Te,Ne)=>{await Te;let xe=await Ne;xe!==null&&ie.current&&Ae(Ye=>{let Qe=Ye.findIndex(Ue=>Ue===null),it=[...Ye];return it[Qe]=xe,it})},Promise.resolve());q.reduce((Te,Ne)=>Promise.all(Ne.map(xe=>Promise.resolve().then(()=>Z(xe)))).then(async xe=>{xe=xe.filter(Ye=>Ye!==null),await Te,ie.current&&Ae(Ye=>{let Qe=Ye.findIndex(it=>it===null);return Ye.slice(0,Qe).concat(xe).concat(Ye.slice(Qe+xe.length))})}),rt).then(()=>{ie.current&&Ae(Te=>Te.filter(Ne=>Ne!==null))})},[]),ye.length?p.createElement(o,{radius:L>>1,children:ye.map((Pe,Re)=>Pe!==null?p.createElement(me,{key:Re,active:!1,descriptor:Pe.descriptor,suggestions:Pe.suggestions}):p.createElement(A,{key:Re},"Loading..."))}):p.createElement(A,null,"No upgrades found")},Ie=await n(({useSubmit:Ce})=>{Ce(a());let ye=new Map;for(let ie of b.workspaces)for(let Z of["dependencies","devDependencies"])for(let Pe of ie.manifest[Z].values())b.tryWorkspaceByDescriptor(Pe)===null&&(Pe.range.startsWith("link:")||ye.set(Pe.descriptorHash,Pe));let Ae=qe.sortMap(ye.values(),ie=>G.stringifyDescriptor(ie));return p.createEleme
Line truncated
|
||||||
${E}, next tree:
|
${E}, next tree:
|
||||||
${Av(A)}`);let D=Xwe(A);if(D)throw new Error(`${D}, after hoisting finished:
|
${Av(A)}`);let D=e1e(A);if(D)throw new Error(`${D}, after hoisting finished:
|
||||||
${Av(A)}`)}return n.debugLevel>=2&&console.log(Av(A)),JIt(A)},qIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(e),r},jIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let E;for(let w of t)E=w.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(e,a),r},Jwe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:w,hoistPriority:D,dependencyKind:b,hoistedFrom:C,hoistedTo:T}=e,N={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:w,hoistPriority:D,dependencyKind:b,hoistedFrom:new Map(C),hoistedTo:new Map(T)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},GIt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let o=Array.from(e.keys());o.sort((a,n)=>{let u=e.get(a),A=e.get(n);if(A.hoistPriority!==u.hoistPriority)return A.hoistPriority-u.hoistPriority;{let p=u.dependents.size+u.peerDependents.size;return A.dependents.size+A.peerDependents.size-p}});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!t.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},Ej=t=>{let e=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!t.peerNames.has(n)){let u=t.dependencies.get(n);u&&!e.has(u)&&r(u,a)}e.add(o)}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||r(o);return e},Ij=(t,e,r,o,a,n=new Set)=>{let u=e[e.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=zIt(u),p=GIt(u,A),h=t==u?new Map:a.fastLookupPossible?qIt(e):jIt(e),E,w=!1,D=!1,b=new Map(Array.from(p.entries()).map(([T,N])=>[T,N[0]])),C=new Map;do{let T=VIt(t,e,r,h,b,p,o,C,a);T.isGraphChanged&&(D=!0),T.anotherRoundNeeded&&(w=!0),E=!1;for(let[N,U]of p)U.length>1&&!u.dependencies.has(N)&&(b.delete(N),U.shift(),b.set(N,U[0]),E=!0)}while(E);for(let T of u.dependencies.values())if(!u.peerNames.has(T.name)&&!r.has(T.locator)){r.add(T.locator);let N=Ij(t,[...e,T],r,C,a);N.isGraphChanged&&(D=!0),N.anotherRoundNeeded&&(w=!0),r.delete(T.locator)}return{anotherRoundNeeded:w,isGraphChanged:D}},WIt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},YIt=(t,e,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let E,w=null,D=new Set;p&&(E=`${Array.from(e).map(N=>zs(N)).join("\u2192")}`);let b=r[r.length-1],T=!(o.ident===b.ident);if(p&&!T&&(w="- self-reference"),T&&(T=o.dependencyKind!==1,p&&!T&&(w="- workspace")),T&&o.dependencyKind===2&&(T=!WIt(o),p&&!T&&(w="- external soft link with unhoisted dependencies")),T&&(T=!t.peerNames.has(o.name),p&&!T&&(w=`- cannot shadow peer: ${zs(t.originalDependencies.get(o.name).locator)} at ${E}`)),T){let N=!1,U=a.get(o.name);if(N=!U||U.ident===o.ident,p&&!N&&(w=`- filled by: ${zs(U.locator)} at ${E}`),N)for(let J=r.length-1;J>=1;J--){let le=r[J].dependencies.get(o.name);if(le&&le.ident!==o.ident){N=!1;let ce=A.get(b);ce||(ce=new Set,A.set(b,ce)),ce.add(o.name),p&&(w=`- filled by ${zs(le.locator)} at ${r.slice(0,J).map(ue=>zs(ue.locator)).join("\u2192")}`);break}}T=N}if(T&&(T=n.get(o.name)===o.ident,p&&!T&&(w=`- filled by: ${zs(u.get(o.name)[0])} at ${E}`)),T){let N=!0,U=new Set(o.peerNames);for(let J=r.length-1;J>=1;J--){let te=r[J];for(let le of U){if(te.peerNames.has(le)&&te.originalDependencies.has(le))continue;let ce=te.dependencies.get(le);ce&&t.dependencies.get(le)!==ce&&(J===r.length-1?D.add(ce):(D=null,N=!1,p&&(w=`- peer dependency ${zs(ce.locator)} from parent ${zs(te.locator)} was not hoisted to ${E}`))),U.delete(le)}if(!N)break}T=N}if(T&&!h)for(let N of o.hoistedDependencies.values()){let U=a.get(N.name)||t.dependencies.get(N.name);if(!U||N.ident!==U.ident){T=!1,p&&(w=`- previously hoisted dependency mismatch, needed: ${zs(N.locator)}, available: ${zs(U?.locator)}`);break}}return D!==null&&D.size>0?{isHoistable:2,dependsOn:D,reason:w}:{isHoistable:T?0:1,reason:w}},KQ=t=>`${t.name}@${t.locator}`,VIt=(t,e,r,o,a,n,u,A,p)=>{let h=e[e.length-1],E=new Set,w=!1,D=!1,b=(U,J,te,le,ce)=>{if(E.has(le))return;let ue=[...J,KQ(le)],Ie=[...te,KQ(le)],he=new Map,De=new Map;for(let fe of Ej(le)){let ie=YIt(h,r,[h,...U,le],fe,o,a,n,A,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(De.set(fe,ie),ie.isHoistable===2)for(let Z of ie.dependsOn){let
Line truncated
|
${Av(A)}`)}return n.debugLevel>=2&&console.log(Av(A)),XIt(A)},GIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(e),r},WIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let E;for(let w of t)E=w.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(e,a),r},Zwe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:w,hoistPriority:D,dependencyKind:b,hoistedFrom:C,hoistedTo:T}=e,L={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:w,hoistPriority:D,dependencyKind:b,hoistedFrom:new Map(C),hoistedTo:new Map(T)},U=L.dependencies.get(r);return U&&U.ident==L.ident&&L.dependencies.set(r,L),t.dependencies.set(L.name,L),L},YIt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let o=Array.from(e.keys());o.sort((a,n)=>{let u=e.get(a),A=e.get(n);if(A.hoistPriority!==u.hoistPriority)return A.hoistPriority-u.hoistPriority;{let p=u.dependents.size+u.peerDependents.size;return A.dependents.size+A.peerDependents.size-p}});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!t.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},Ij=t=>{let e=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!t.peerNames.has(n)){let u=t.dependencies.get(n);u&&!e.has(u)&&r(u,a)}e.add(o)}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||r(o);return e},Bj=(t,e,r,o,a,n=new Set)=>{let u=e[e.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=ZIt(u),p=YIt(u,A),h=t==u?new Map:a.fastLookupPossible?GIt(e):WIt(e),E,w=!1,D=!1,b=new Map(Array.from(p.entries()).map(([T,L])=>[T,L[0]])),C=new Map;do{let T=zIt(t,e,r,h,b,p,o,C,a);T.isGraphChanged&&(D=!0),T.anotherRoundNeeded&&(w=!0),E=!1;for(let[L,U]of p)U.length>1&&!u.dependencies.has(L)&&(b.delete(L),U.shift(),b.set(L,U[0]),E=!0)}while(E);for(let T of u.dependencies.values())if(!u.peerNames.has(T.name)&&!r.has(T.locator)){r.add(T.locator);let L=Bj(t,[...e,T],r,C,a);L.isGraphChanged&&(D=!0),L.anotherRoundNeeded&&(w=!0),r.delete(T.locator)}return{anotherRoundNeeded:w,isGraphChanged:D}},KIt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},VIt=(t,e,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let E,w=null,D=new Set;p&&(E=`${Array.from(e).map(L=>Js(L)).join("\u2192")}`);let b=r[r.length-1],T=!(o.ident===b.ident);if(p&&!T&&(w="- self-reference"),T&&(T=o.dependencyKind!==1,p&&!T&&(w="- workspace")),T&&o.dependencyKind===2&&(T=!KIt(o),p&&!T&&(w="- external soft link with unhoisted dependencies")),T&&(T=!t.peerNames.has(o.name),p&&!T&&(w=`- cannot shadow peer: ${Js(t.originalDependencies.get(o.name).locator)} at ${E}`)),T){let L=!1,U=a.get(o.name);if(L=!U||U.ident===o.ident,p&&!L&&(w=`- filled by: ${Js(U.locator)} at ${E}`),L)for(let z=r.length-1;z>=1;z--){let le=r[z].dependencies.get(o.name);if(le&&le.ident!==o.ident){L=!1;let de=A.get(b);de||(de=new Set,A.set(b,de)),de.add(o.name),p&&(w=`- filled by ${Js(le.locator)} at ${r.slice(0,z).map(ce=>Js(ce.locator)).join("\u2192")}`);break}}T=L}if(T&&(T=n.get(o.name)===o.ident,p&&!T&&(w=`- filled by: ${Js(u.get(o.name)[0])} at ${E}`)),T){let L=!0,U=new Set(o.peerNames);for(let z=r.length-1;z>=1;z--){let te=r[z];for(let le of U){if(te.peerNames.has(le)&&te.originalDependencies.has(le))continue;let de=te.dependencies.get(le);de&&t.dependencies.get(le)!==de&&(z===r.length-1?D.add(de):(D=null,L=!1,p&&(w=`- peer dependency ${Js(de.locator)} from parent ${Js(te.locator)} was not hoisted to ${E}`))),U.delete(le)}if(!L)break}T=L}if(T&&!h)for(let L of o.hoistedDependencies.values()){let U=a.get(L.name)||t.dependencies.get(L.name);if(!U||L.ident!==U.ident){T=!1,p&&(w=`- previously hoisted dependency mismatch, needed: ${Js(L.locator)}, available: ${Js(U?.locator)}`);break}}return D!==null&&D.size>0?{isHoistable:2,dependsOn:D,reason:w}:{isHoistable:T?0:1,reason:w}},zk=t=>`${t.name}@${t.locator}`,zIt=(t,e,r,o,a,n,u,A,p)=>{let h=e[e.length-1],E=new Set,w=!1,D=!1,b=(U,z,te,le,de)=>{if(E.has(le))return;let ce=[...z,zk(le)],me=[...te,zk(le)],pe=new Map,ve=new Map;for(let Ae of Ij(le)){let ie=VIt(h,r,[h,...U,le],Ae,o,a,n,A,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(ve.set(Ae,ie),ie.isHoistable===2)for(let Z of ie.dependsOn){let
Line truncated
|
||||||
${Av(t)}`)}let Ce=Ej(le);for(let fe of Ce)if(Ee.has(fe)){let ie=De.get(fe);if((a.get(fe.name)===fe.ident||!le.reasons.has(fe.name))&&ie.isHoistable!==0&&le.reasons.set(fe.name,ie.reason),!fe.isHoistBorder&&Ie.indexOf(KQ(fe))<0){E.add(le);let Se=Jwe(le,fe);b([...U,le],ue,Ie,Se,T),E.delete(le)}}},C,T=new Set(Ej(h)),N=Array.from(e).map(U=>KQ(U));do{C=T,T=new Set;for(let U of C){if(U.locator===h.locator||U.isHoistBorder)continue;let J=Jwe(h,U);b([],Array.from(r),N,J,T)}}while(T.size>0);return{anotherRoundNeeded:w,isGraphChanged:D}},Xwe=t=>{let e=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),w=()=>`${Array.from(o).concat([n]).map(D=>zs(D.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let D=u.get(h.name);(D!==E||!D||D.ident!==h.ident)&&e.push(`${w()} - broken peer promise: expected ${h.ident} but found ${D&&D.ident}`)}else{let D=A.hoistedFrom.get(n.name),b=n.hoistedTo.get(h.name),C=`${D?` hoisted from ${D.join(", ")}`:""}`,T=`${b?` hoisted to ${b}`:""}`,N=`${w()}${C}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${T}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${T} found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(t,t.dependencies,t),e.join(`
|
${Av(t)}`)}let ye=Ij(le);for(let Ae of ye)if(Ie.has(Ae)){let ie=ve.get(Ae);if((a.get(Ae.name)===Ae.ident||!le.reasons.has(Ae.name))&&ie.isHoistable!==0&&le.reasons.set(Ae.name,ie.reason),!Ae.isHoistBorder&&me.indexOf(zk(Ae))<0){E.add(le);let Pe=Zwe(le,Ae);b([...U,le],ce,me,Pe,T),E.delete(le)}}},C,T=new Set(Ij(h)),L=Array.from(e).map(U=>zk(U));do{C=T,T=new Set;for(let U of C){if(U.locator===h.locator||U.isHoistBorder)continue;let z=Zwe(h,U);b([],Array.from(r),L,z,T)}}while(T.size>0);return{anotherRoundNeeded:w,isGraphChanged:D}},e1e=t=>{let e=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),w=()=>`${Array.from(o).concat([n]).map(D=>Js(D.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let D=u.get(h.name);(D!==E||!D||D.ident!==h.ident)&&e.push(`${w()} - broken peer promise: expected ${h.ident} but found ${D&&D.ident}`)}else{let D=A.hoistedFrom.get(n.name),b=n.hoistedTo.get(h.name),C=`${D?` hoisted from ${D.join(", ")}`:""}`,T=`${b?` hoisted to ${b}`:""}`,L=`${w()}${C}`;E?E.ident!==h.ident&&e.push(`${L} - broken require promise for ${h.name}${T}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${L} - broken require promise: no required dependency ${h.name}${T} found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(t,t.dependencies,t),e.join(`
|
||||||
`)},KIt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,u={name:o,references:new Set([a]),locator:Cj(r,a),ident:Kwe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},A=new Map([[t,u]]),p=(h,E)=>{let w=A.get(h),D=!!w;if(!w){let{name:b,identName:C,reference:T,peerNames:N,hoistPriority:U,dependencyKind:J}=h,te=e.hoistingLimits.get(E.locator);w={name:b,references:new Set([T]),locator:Cj(C,T),ident:Kwe(C,T),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(b):!1,hoistPriority:U||0,dependencyKind:J||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,w)}if(E.dependencies.set(h.name,w),E.originalDependencies.set(h.name,w),D){let b=new Set,C=T=>{if(!b.has(T)){b.add(T),T.decoupled=!1;for(let N of T.dependencies.values())T.peerNames.has(N.name)||C(N)}};C(w)}else for(let b of h.dependencies)p(b,w)};for(let h of t.dependencies)p(h,u);return u},wj=t=>t.substring(0,t.indexOf("@",1)),JIt=t=>{let e={name:t.name,identName:wj(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:E,locator:w}=a;p={name:h,identName:wj(w),references:E,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())o(a,t,e);return e},zIt=t=>{let e=new Map,r=new Set([t]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=e.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let E of A.dependencies.values()){let w=a(E);w.hoistPriority=Math.max(w.hoistPriority,E.hoistPriority),A.peerNames.has(E.name)?w.peerDependents.add(A.ident):n(A,E)}}};for(let u of t.dependencies.values())t.peerNames.has(u.name)||n(t,u);return e},zs=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=t.substring(e+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`};var Av=t=>{let e=0,r=(a,n,u="")=>{if(e>5e4||n.has(a))return"";e++;let A=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let E=A[h];if(!a.peerNames.has(E.name)&&E!==a){let w=a.reasons.get(E.name),D=wj(E.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(E)?">":"")+(D!==E.name?`a:${E.name}:`:"")+zs(E.locator)+(w?` ${w}`:"")}
|
`)},JIt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,u={name:o,references:new Set([a]),locator:wj(r,a),ident:Xwe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},A=new Map([[t,u]]),p=(h,E)=>{let w=A.get(h),D=!!w;if(!w){let{name:b,identName:C,reference:T,peerNames:L,hoistPriority:U,dependencyKind:z}=h,te=e.hoistingLimits.get(E.locator);w={name:b,references:new Set([T]),locator:wj(C,T),ident:Xwe(C,T),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(L),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(b):!1,hoistPriority:U||0,dependencyKind:z||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,w)}if(E.dependencies.set(h.name,w),E.originalDependencies.set(h.name,w),D){let b=new Set,C=T=>{if(!b.has(T)){b.add(T),T.decoupled=!1;for(let L of T.dependencies.values())T.peerNames.has(L.name)||C(L)}};C(w)}else for(let b of h.dependencies)p(b,w)};for(let h of t.dependencies)p(h,u);return u},vj=t=>t.substring(0,t.indexOf("@",1)),XIt=t=>{let e={name:t.name,identName:vj(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:E,locator:w}=a;p={name:h,identName:vj(w),references:E,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())o(a,t,e);return e},ZIt=t=>{let e=new Map,r=new Set([t]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=e.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let E of A.dependencies.values()){let w=a(E);w.hoistPriority=Math.max(w.hoistPriority,E.hoistPriority),A.peerNames.has(E.name)?w.peerDependents.add(A.ident):n(A,E)}}};for(let u of t.dependencies.values())t.peerNames.has(u.name)||n(t,u);return e},Js=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=t.substring(e+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`};var Av=t=>{let e=0,r=(a,n,u="")=>{if(e>5e4||n.has(a))return"";e++;let A=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let E=A[h];if(!a.peerNames.has(E.name)&&E!==a){let w=a.reasons.get(E.name),D=vj(E.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(E)?">":"")+(D!==E.name?`a:${E.name}:`:"")+Js(E.locator)+(w?` ${w}`:"")}
|
||||||
`,p+=r(E,n,`${u}${h<A.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(t,new Set)+(e>5e4?`
|
`,p+=r(E,n,`${u}${h<A.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(t,new Set)+(e>5e4?`
|
||||||
Tree is too large, part of the tree has been dunped
|
Tree is too large, part of the tree has been dunped
|
||||||
`:"")};var fv=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(fv||{}),Zwe="node_modules",jh="$wsroot$";var pv=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=ZIt(t,e),u=null;if(a.length===0){let A=zwe(r,{hoistingLimits:o});u=ewt(t,A,e)}return{tree:u,errors:a,preserveSymlinksRequired:n}},yA=t=>`${t.name}@${t.reference}`,vj=t=>{let e=new Map;for(let[r,o]of t.entries())if(!o.dirList){let a=e.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},e.set(o.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(V.delimiter).length,u=a.split(V.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return e},$we=(t,e)=>{let r=G.isVirtualLocator(t)?G.devirtualizeLocator(t):t,o=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e;return G.areLocatorsEqual(r,o)},Bj=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=Ae.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return V.contains(o,a)===null},XIt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let o=Ae.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=t.getDependencyTreeRoots(),A=new Map,p=new Set,h=(D,b)=>{let C=yA(D);if(p.has(C))return;p.add(C);let T=t.getPackageInformation(D);if(T){let N=b?yA(b):"";if(yA(D)!==N&&T.linkType==="SOFT"&&!D.reference.startsWith("link:")&&!Bj(T,D,t,o)){let U=e1e(T,D,t);(!A.get(U)||D.reference.startsWith("workspace:"))&&A.set(U,D)}for(let[U,J]of T.packageDependencies)J!==null&&(T.packagePeers.has(U)||h(t.getLocator(U,J),D))}};for(let D of u)h(D,null);let E=o.split(V.sep);for(let D of A.values()){let b=t.getPackageInformation(D),T=Ae.toPortablePath(b.packageLocation.slice(0,-1)).split(V.sep).slice(E.length),N=n;for(let U of T){let J=N.children.get(U);J||(J={children:new Map},N.children.set(U,J)),N=J}N.workspaceLocator=D}let w=(D,b)=>{if(D.workspaceLocator){let C=yA(b),T=a.get(C);T||(T=new Set,a.set(C,T)),T.add(D.workspaceLocator)}for(let C of D.children.values())w(C,D.workspaceLocator||b)};for(let D of n.children.values())w(D,n.workspaceLocator);return a},ZIt=(t,e)=>{let r=[],o=!1,a=new Map,n=XIt(t),u=t.getPackageInformation(t.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=t.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=Ae.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,w=(b,C)=>`${yA(C)}:${b}`,D=(b,C,T,N,U,J,te,le)=>{let ce=w(b,T),ue=E.get(ce),Ie=!!ue;!Ie&&T.name===A.name&&T.reference===A.reference&&(ue=h,E.set(ce,h));let he=Bj(C,T,t,p);if(!ue){let fe=0;he?fe=2:C.linkType==="SOFT"&&T.name.endsWith(jh)&&(fe=1),ue={name:b,identName:T.name,reference:T.reference,dependencies:new Set,peerNames:fe===1?new Set:C.packagePeers,dependencyKind:fe},E.set(ce,ue)}let De;if(he?De=2:U.linkType==="SOFT"?De=1:De=0,ue.hoistPriority=Math.max(ue.hoistPriority||0,De),le&&!he){let fe=yA({name:N.identName,reference:N.reference}),ie=a.get(fe)||new Set;a.set(fe,ie),ie.add(ue.name)}let Ee=new Map(C.packageDependencies);if(e.project){let fe=e.project.workspacesByCwd.get(Ae.toPortablePath(C.packageLocation.slice(0,-1)));if(fe){let ie=new Set([...Array.from(fe.manifest.peerDependencies.values(),Z=>G.stringifyIdent(Z)),...Array.from(fe.manifest.peerDependenciesMeta.keys())]);for(let Z of ie)Ee.has(Z)||(Ee.set(Z,J.get(Z)||null),ue.peerNames.add(Z))}}let g=yA({name:T.name.replace(jh,""),reference:T.reference}),me=n.get(g);if(me)for(let fe of me)Ee.set(`${fe.name}${jh}`,fe.reference);(C!==U||C.linkType!=="SOFT"||!he&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(te)))&&N.dependencies.add(ue);let Ce=T!==A&&C.linkType==="SOFT"&&!T.name.endsWith(jh)&&!he;if(!Ie&&!Ce){let fe=new Map;for(let[ie,Z]of Ee)if(Z!==null){let Se=t.getLocator(ie,Z),Re=t.getLocator(ie.replace(jh,""),Z),ht=t.getPackageInformation(Re);if(ht===null)throw new Error("Assertion failed: Expected the package to have been registered");let q=Bj(ht,Se,t,p);if(e.validateExternalSoftLinks&&e.project&&q){ht.packageDependencies.size>0&&(o=!0);for(let[Ke,xe]of ht.packageDependencies)if(xe!==null){let tt=G.parseLocator(Array.isArray(xe)?`${xe[0]}@${xe[1]}`:`${Ke}@${xe}`);if(yA(tt)!==yA(Se)){let He=Ee.get(Ke);if(He){let x=G.parseLocator(Array.isArray(He)?`${He[0]}@${He[1]}`:`${Ke}@${He}`);$we(x,tt)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(e.project.configuration,G.parseIdent(Se.name))} into ${G.pretLine truncated
|
`:"")};var fv=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(fv||{}),t1e="node_modules",Wh="$wsroot$";var pv=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=ewt(t,e),u=null;if(a.length===0){let A=$we(r,{hoistingLimits:o});u=rwt(t,A,e)}return{tree:u,errors:a,preserveSymlinksRequired:n}},yA=t=>`${t.name}@${t.reference}`,Pj=t=>{let e=new Map;for(let[r,o]of t.entries())if(!o.dirList){let a=e.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},e.set(o.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(K.delimiter).length,u=a.split(K.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return e},r1e=(t,e)=>{let r=G.isVirtualLocator(t)?G.devirtualizeLocator(t):t,o=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e;return G.areLocatorsEqual(r,o)},Dj=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=ue.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return K.contains(o,a)===null},$It=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let o=ue.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=t.getDependencyTreeRoots(),A=new Map,p=new Set,h=(D,b)=>{let C=yA(D);if(p.has(C))return;p.add(C);let T=t.getPackageInformation(D);if(T){let L=b?yA(b):"";if(yA(D)!==L&&T.linkType==="SOFT"&&!D.reference.startsWith("link:")&&!Dj(T,D,t,o)){let U=n1e(T,D,t);(!A.get(U)||D.reference.startsWith("workspace:"))&&A.set(U,D)}for(let[U,z]of T.packageDependencies)z!==null&&(T.packagePeers.has(U)||h(t.getLocator(U,z),D))}};for(let D of u)h(D,null);let E=o.split(K.sep);for(let D of A.values()){let b=t.getPackageInformation(D),T=ue.toPortablePath(b.packageLocation.slice(0,-1)).split(K.sep).slice(E.length),L=n;for(let U of T){let z=L.children.get(U);z||(z={children:new Map},L.children.set(U,z)),L=z}L.workspaceLocator=D}let w=(D,b)=>{if(D.workspaceLocator){let C=yA(b),T=a.get(C);T||(T=new Set,a.set(C,T)),T.add(D.workspaceLocator)}for(let C of D.children.values())w(C,D.workspaceLocator||b)};for(let D of n.children.values())w(D,n.workspaceLocator);return a},ewt=(t,e)=>{let r=[],o=!1,a=new Map,n=$It(t),u=t.getPackageInformation(t.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=t.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=ue.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,w=(b,C)=>`${yA(C)}:${b}`,D=(b,C,T,L,U,z,te,le)=>{let de=w(b,T),ce=E.get(de),me=!!ce;!me&&T.name===A.name&&T.reference===A.reference&&(ce=h,E.set(de,h));let pe=Dj(C,T,t,p);if(!ce){let Ae=0;pe?Ae=2:C.linkType==="SOFT"&&T.name.endsWith(Wh)&&(Ae=1),ce={name:b,identName:T.name,reference:T.reference,dependencies:new Set,peerNames:Ae===1?new Set:C.packagePeers,dependencyKind:Ae},E.set(de,ce)}let ve;if(pe?ve=2:U.linkType==="SOFT"?ve=1:ve=0,ce.hoistPriority=Math.max(ce.hoistPriority||0,ve),le&&!pe){let Ae=yA({name:L.identName,reference:L.reference}),ie=a.get(Ae)||new Set;a.set(Ae,ie),ie.add(ce.name)}let Ie=new Map(C.packageDependencies);if(e.project){let Ae=e.project.workspacesByCwd.get(ue.toPortablePath(C.packageLocation.slice(0,-1)));if(Ae){let ie=new Set([...Array.from(Ae.manifest.peerDependencies.values(),Z=>G.stringifyIdent(Z)),...Array.from(Ae.manifest.peerDependenciesMeta.keys())]);for(let Z of ie)Ie.has(Z)||(Ie.set(Z,z.get(Z)||null),ce.peerNames.add(Z))}}let g=yA({name:T.name.replace(Wh,""),reference:T.reference}),Ce=n.get(g);if(Ce)for(let Ae of Ce)Ie.set(`${Ae.name}${Wh}`,Ae.reference);(C!==U||C.linkType!=="SOFT"||!pe&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(te)))&&L.dependencies.add(ce);let ye=T!==A&&C.linkType==="SOFT"&&!T.name.endsWith(Wh)&&!pe;if(!me&&!ye){let Ae=new Map;for(let[ie,Z]of Ie)if(Z!==null){let Pe=t.getLocator(ie,Z),Re=t.getLocator(ie.replace(Wh,""),Z),gt=t.getPackageInformation(Re);if(gt===null)throw new Error("Assertion failed: Expected the package to have been registered");let q=Dj(gt,Pe,t,p);if(e.validateExternalSoftLinks&&e.project&&q){gt.packageDependencies.size>0&&(o=!0);for(let[Ye,Qe]of gt.packageDependencies)if(Qe!==null){let it=G.parseLocator(Array.isArray(Qe)?`${Qe[0]}@${Qe[1]}`:`${Ye}@${Qe}`);if(yA(it)!==yA(Pe)){let Ue=Ie.get(Ye);if(Ue){let x=G.parseLocator(Array.isArray(Ue)?`${Ue[0]}@${Ue[1]}`:`${Ye}@${Ue}`);r1e(x,it)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(e.project.configuration,G.parseIdent(Pe.name))} into ${G.pretLine truncated
|
||||||
`;for(let n=0,u=t.length;n<u;++n)a+=o+JQ(String(n),t[n],e,o).replace(/^ +/,""),n+1<u&&(a+=","),a+=`
|
`;for(let n=0,u=t.length;n<u;++n)a+=o+Jk(String(n),t[n],e,o).replace(/^ +/,""),n+1<u&&(a+=","),a+=`
|
||||||
`;return a+=r,a+="]",a}function nwt(t,e,r){let o=Object.keys(t),a="";a+="{";for(let n=0,u=o.length,A=0;n<u;++n){let p=o[n],h=t[p];typeof h>"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=JQ(p,h,e,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function iwt(t,e,r){let o=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{
|
`;return a+=r,a+="]",a}function swt(t,e,r){let o=Object.keys(t),a="";a+="{";for(let n=0,u=o.length,A=0;n<u;++n){let p=o[n],h=t[p];typeof h>"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=Jk(p,h,e,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function owt(t,e,r){let o=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{
|
||||||
`;let u=0;for(let A=0,p=o.length;A<p;++A){let h=o[A],E=t[h];typeof E>"u"||(u!==0&&(n+=",",n+=`
|
`;let u=0;for(let A=0,p=o.length;A<p;++A){let h=o[A],E=t[h];typeof E>"u"||(u!==0&&(n+=",",n+=`
|
||||||
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=JQ(h,E,e,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=`
|
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=Jk(h,E,e,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=`
|
||||||
`),n+=r,n+="}",n}function JQ(t,e,r,o){let{next:a}=t1e[r],n=a[t]||a["*"];return r1e(e,n,o)}function r1e(t,e,r){let{collapsed:o}=t1e[e];return Array.isArray(t)?o?twt(t,e,r):rwt(t,e,r):typeof t=="object"&&t!==null?o?nwt(t,e,r):iwt(t,e,r):JSON.stringify(t)}function n1e(t){return r1e(t,"TOP_LEVEL","")}function hv(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function swt(t){let e=new Map,r=hv(t.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=e.get(o);typeof n>"u"&&e.set(o,n=new Set),n.add(a)}return Array.from(e).map(([o,a])=>[o,Array.from(a)])}function owt(t){return hv(t.fallbackPool||[],([e])=>e)}function awt(t){let e=[];for(let[r,o]of hv(t.packageRegistry,([a])=>a===null?"0":`1${a}`)){let a=[];e.push([r,a]);for(let[n,{packageLocation:u,packageDependencies:A,packagePeers:p,linkType:h,discardFromLookup:E}]of hv(o,([w])=>w===null?"0":`1${w}`)){let w=[];r!==null&&n!==null&&!A.has(r)&&w.push([r,n]);for(let[C,T]of hv(A.entries(),([N])=>N))w.push([C,T]);let D=p&&p.size>0?Array.from(p):void 0,b=E||void 0;a.push([n,{packageLocation:u,packageDependencies:w,packagePeers:D,linkType:h,discardFromLookup:b}])}}return e}function gv(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:swt(t),fallbackPool:owt(t),packageRegistryData:awt(t)}}var o1e=et(s1e());function a1e(t,e){return[t?`${t}
|
`),n+=r,n+="}",n}function Jk(t,e,r,o){let{next:a}=i1e[r],n=a[t]||a["*"];return s1e(e,n,o)}function s1e(t,e,r){let{collapsed:o}=i1e[e];return Array.isArray(t)?o?nwt(t,e,r):iwt(t,e,r):typeof t=="object"&&t!==null?o?swt(t,e,r):owt(t,e,r):JSON.stringify(t)}function o1e(t){return s1e(t,"TOP_LEVEL","")}function hv(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function awt(t){let e=new Map,r=hv(t.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=e.get(o);typeof n>"u"&&e.set(o,n=new Set),n.add(a)}return Array.from(e).map(([o,a])=>[o,Array.from(a)])}function lwt(t){return hv(t.fallbackPool||[],([e])=>e)}function cwt(t){let e=[],r=t.dependencyTreeRoots.find(o=>t.packageRegistry.get(o.name)?.get(o.reference)?.packageLocation==="./");for(let[o,a]of hv(t.packageRegistry,([n])=>n===null?"0":`1${n}`)){if(o===null)continue;let n=[];e.push([o,n]);for(let[u,{packageLocation:A,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:w}]of hv(a,([D])=>D===null?"0":`1${D}`)){if(u===null)continue;let D=[];o!==null&&u!==null&&!p.has(o)&&D.push([o,u]);for(let[U,z]of p)D.push([U,z]);let b=hv(D,([U])=>U),C=h&&h.size>0?Array.from(h):void 0,L={packageLocation:A,packageDependencies:b,packagePeers:C,linkType:E,discardFromLookup:w||void 0};n.push([u,L]),r&&o===r.name&&u===r.reference&&e.unshift([null,[[null,L]]])}}return e}function gv(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:awt(t),fallbackPool:lwt(t),packageRegistryData:cwt(t)}}var c1e=et(l1e());function u1e(t,e){return[t?`${t}
|
||||||
`:"",`/* eslint-disable */
|
`:"",`/* eslint-disable */
|
||||||
`,`// @ts-nocheck
|
`,`// @ts-nocheck
|
||||||
`,`"use strict";
|
`,`"use strict";
|
||||||
`,`
|
`,`
|
||||||
`,e,`
|
`,e,`
|
||||||
`,(0,o1e.default)()].join("")}function lwt(t){return JSON.stringify(t,null,2)}function cwt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
|
`,(0,c1e.default)()].join("")}function uwt(t){return JSON.stringify(t,null,2)}function Awt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
|
||||||
`)}'`}function uwt(t){return[`const RAW_RUNTIME_STATE =
|
`)}'`}function fwt(t){return[`const RAW_RUNTIME_STATE =
|
||||||
`,`${cwt(n1e(t))};
|
`,`${Awt(o1e(t))};
|
||||||
|
|
||||||
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
|
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
|
||||||
`,`}
|
`,`}
|
||||||
`].join("")}function Awt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
`].join("")}function pwt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
`,` const fs = require('fs');
|
`,` const fs = require('fs');
|
||||||
`,` const path = require('path');
|
`,` const path = require('path');
|
||||||
`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(mr.pnpData)});
|
`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(mr.pnpData)});
|
||||||
`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});
|
`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});
|
||||||
`,`}
|
`,`}
|
||||||
`].join("")}function l1e(t){let e=gv(t),r=uwt(e);return a1e(t.shebang,r)}function c1e(t){let e=gv(t),r=Awt(),o=a1e(t.shebang,r);return{dataFile:lwt(e),loaderFile:o}}St();function Sj(t,{basePath:e}){let r=Ae.toPortablePath(e),o=V.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,u=new Map(t.packageRegistryData.map(([w,D])=>[w,new Map(D.map(([b,C])=>{if(w===null!=(b===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let T=C.discardFromLookup??!1,N={name:w,reference:b},U=n.get(C.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&T,T||(U.locator=N)):n.set(C.packageLocation,{locator:N,discardFromLookup:T});let J=null;return[b,{packageDependencies:new Map(C.packageDependencies),packagePeers:new Set(C.packagePeers),linkType:C.linkType,discardFromLookup:T,get packageLocation(){return J||(J=V.join(o,C.packageLocation))}}]}))])),A=new Map(t.fallbackExclusionList.map(([w,D])=>[w,new Set(D)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}St();St();var tp=ve("module"),fd=ve("url"),Nj=ve("util");var Qo=ve("url");var p1e=et(ve("assert"));var Pj=Array.isArray,dv=JSON.stringify,mv=Object.getOwnPropertyNames,Ad=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),xj=(t,e)=>RegExp.prototype.exec.call(t,e),bj=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),Gh=(t,...e)=>String.prototype.endsWith.apply(t,e),kj=(t,...e)=>String.prototype.includes.apply(t,e),Qj=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),yv=(t,...e)=>String.prototype.indexOf.apply(t,e),u1e=(t,...e)=>String.prototype.replace.apply(t,e),Wh=(t,...e)=>String.prototype.slice.apply(t,e),EA=(t,...e)=>String.prototype.startsWith.apply(t,e),A1e=Map,f1e=JSON.parse;function Ev(t,e,r){return class extends r{constructor(...o){super(e(...o)),this.code=t,this.name=`${r.name} [${t}]`}}}var h1e=Ev("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),Fj=Ev("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),g1e=Ev("ERR_INVALID_PACKAGE_TARGET",(t,e,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!EA(r,"./");return e==="."?((0,p1e.default)(o===!1),`Invalid "exports" main target ${dv(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${dv(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),Cv=Ev("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),d1e=Ev("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var XQ=ve("url");function m1e(t,e){let r=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o];Ad(t,a)&&(r[a]=t[a])}return r}var zQ=new A1e;function fwt(t,e,r,o){let a=zQ.get(t);if(a!==void 0)return a;let n=o(t);if(n===void 0){let b={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return zQ.set(t,b),b}let u;try{u=f1e(n)}catch(b){throw new Cv(t,(r?`"${e}" from `:"")+(0,XQ.fileURLToPath)(r||e),b.message)}let{imports:A,main:p,name:h,type:E}=m1e(u,["imports","main","name","type"]),w=Ad(u,"exports")?u.exports:void 0;(typeof A!="object"||A===null)&&(A=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),E!=="module"&&E!=="commonjs"&&(E="none");let D={pjsonPath:t,exists:!0,main:p,name:h,type:E,exports:w,imports:A};return zQ.set(t,D),D}function y1e(t,e){let r=new URL("./package.json",t);for(;;){let n=r.pathname;if(Gh(n,"node_modules/package.json"))break;let u=fwt((0,XQ.fileURLToPath)(r),t,void 0,e);if(u.exists)return u;let A=r;if(r=new URL("../package.json",r),r.pathname===A.pathname)break}let o=(0,XQ.fileURLToPath)(r),a={pjsonPath:o,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return zQ.set(o,a),a}function pwt(t,e,r){throw new h1e(t,e&&(0,Qo.fileURLToPath)(new URL(".",e)),(0,Qo.fileURLToPath)(r))}function hwt(t,e,r,o){let a=`request is not a valid subpath for the "${r?"imports":"exports"}" resolution of ${(0,Qo.fileURLToPath)(e)}`;throw new Fj(t,a,o&&(0,Qo.fileURLToPath)(o))}function Iv(t,e,r,o,a){throw typeof e=="object"&&e!==null?e=dv(e,null,""):e=`${e}`,new g1e((0,Qo.fileURLToPath)(new URL(".",r)),t,e,o,a&&(0,Qo.fileURLToPath)(a))}var E1e=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|
Line truncated
|
`].join("")}function A1e(t){let e=gv(t),r=fwt(e);return u1e(t.shebang,r)}function f1e(t){let e=gv(t),r=pwt(),o=u1e(t.shebang,r);return{dataFile:uwt(e),loaderFile:o}}Pt();function xj(t,{basePath:e}){let r=ue.toPortablePath(e),o=K.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,u=new Map(t.packageRegistryData.map(([w,D])=>[w,new Map(D.map(([b,C])=>{if(w===null!=(b===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let T=C.discardFromLookup??!1,L={name:w,reference:b},U=n.get(C.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&T,T||(U.locator=L)):n.set(C.packageLocation,{locator:L,discardFromLookup:T});let z=null;return[b,{packageDependencies:new Map(C.packageDependencies),packagePeers:new Set(C.packagePeers),linkType:C.linkType,discardFromLookup:T,get packageLocation(){return z||(z=K.join(o,C.packageLocation))}}]}))])),A=new Map(t.fallbackExclusionList.map(([w,D])=>[w,new Set(D)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}Pt();Pt();var rp=De("module"),hd=De("url"),Mj=De("util");var ko=De("url");var d1e=et(De("assert"));var bj=Array.isArray,dv=JSON.stringify,mv=Object.getOwnPropertyNames,pd=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Qj=(t,e)=>RegExp.prototype.exec.call(t,e),kj=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),Yh=(t,...e)=>String.prototype.endsWith.apply(t,e),Fj=(t,...e)=>String.prototype.includes.apply(t,e),Rj=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),yv=(t,...e)=>String.prototype.indexOf.apply(t,e),p1e=(t,...e)=>String.prototype.replace.apply(t,e),Kh=(t,...e)=>String.prototype.slice.apply(t,e),EA=(t,...e)=>String.prototype.startsWith.apply(t,e),h1e=Map,g1e=JSON.parse;function Ev(t,e,r){return class extends r{constructor(...o){super(e(...o)),this.code=t,this.name=`${r.name} [${t}]`}}}var m1e=Ev("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),Tj=Ev("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),y1e=Ev("ERR_INVALID_PACKAGE_TARGET",(t,e,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!EA(r,"./");return e==="."?((0,d1e.default)(o===!1),`Invalid "exports" main target ${dv(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${dv(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),Cv=Ev("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),E1e=Ev("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var Zk=De("url");function C1e(t,e){let r=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o];pd(t,a)&&(r[a]=t[a])}return r}var Xk=new h1e;function hwt(t,e,r,o){let a=Xk.get(t);if(a!==void 0)return a;let n=o(t);if(n===void 0){let b={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return Xk.set(t,b),b}let u;try{u=g1e(n)}catch(b){throw new Cv(t,(r?`"${e}" from `:"")+(0,Zk.fileURLToPath)(r||e),b.message)}let{imports:A,main:p,name:h,type:E}=C1e(u,["imports","main","name","type"]),w=pd(u,"exports")?u.exports:void 0;(typeof A!="object"||A===null)&&(A=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),E!=="module"&&E!=="commonjs"&&(E="none");let D={pjsonPath:t,exists:!0,main:p,name:h,type:E,exports:w,imports:A};return Xk.set(t,D),D}function I1e(t,e){let r=new URL("./package.json",t);for(;;){let n=r.pathname;if(Yh(n,"node_modules/package.json"))break;let u=hwt((0,Zk.fileURLToPath)(r),t,void 0,e);if(u.exists)return u;let A=r;if(r=new URL("../package.json",r),r.pathname===A.pathname)break}let o=(0,Zk.fileURLToPath)(r),a={pjsonPath:o,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return Xk.set(o,a),a}function gwt(t,e,r){throw new m1e(t,e&&(0,ko.fileURLToPath)(new URL(".",e)),(0,ko.fileURLToPath)(r))}function dwt(t,e,r,o){let a=`request is not a valid subpath for the "${r?"imports":"exports"}" resolution of ${(0,ko.fileURLToPath)(e)}`;throw new Tj(t,a,o&&(0,ko.fileURLToPath)(o))}function Iv(t,e,r,o,a){throw typeof e=="object"&&e!==null?e=dv(e,null,""):e=`${e}`,new y1e((0,ko.fileURLToPath)(new URL(".",r)),t,e,o,a&&(0,ko.fileURLToPath)(a))}var w1e=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|
Line truncated
|
||||||
`),r;u=t[++n]}else if(u===" "&&!o){a=!0;continue}else if(u==='"'){o=!o;continue}a?(r.push(u),a=!1):r[r.length-1]+=u}return o&&e.push(`invalid value for NODE_OPTIONS (unterminated string)
|
`),r;u=t[++n]}else if(u===" "&&!o){a=!0;continue}else if(u==='"'){o=!o;continue}a?(r.push(u),a=!1):r[r.length-1]+=u}return o&&e.push(`invalid value for NODE_OPTIONS (unterminated string)
|
||||||
`),r}St();var[Ha,ep]=process.versions.node.split(".").map(t=>parseInt(t,10)),k1e=Ha>19||Ha===19&&ep>=2||Ha===18&&ep>=13,tzt=Ha===20&&ep<6||Ha===19&&ep>=3,rzt=Ha>19||Ha===19&&ep>=6,nzt=Ha>=21||Ha===20&&ep>=10||Ha===18&&ep>=19,izt=Ha>=21||Ha===20&&ep>=10||Ha===18&&ep>=20,szt=Ha>=22;function Q1e(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>Ae.fromPortablePath(qs.resolveVirtual(Ae.toPortablePath(e)))),k1e)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function Oj(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Le of["react-scripts","gatsby"]){let Te=t.packageRegistry.get(Le);if(Te)for(let ke of Te.keys()){if(ke===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Le,reference:ke})}}let{ignorePattern:w,packageRegistry:D,packageLocatorsByLocations:b}=t;function C(Le,Te){return{fn:Le,args:Te,error:null,result:null}}function T(Le){let Te=process.stderr?.hasColors?.()??process.stdout.isTTY,ke=(tt,He)=>`\x1B[${tt}m${He}\x1B[0m`,Ke=Le.error;console.error(Ke?ke("31;1",`\u2716 ${Le.error?.message.replace(/\n.*/s,"")}`):ke("33;1","\u203C Resolution")),Le.args.length>0&&console.error();for(let tt of Le.args)console.error(` ${ke("37;1","In \u2190")} ${(0,Nj.inspect)(tt,{colors:Te,compact:!0})}`);Le.result&&(console.error(),console.error(` ${ke("37;1","Out \u2192")} ${(0,Nj.inspect)(Le.result,{colors:Te,compact:!0})}`));let xe=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(xe.length>0){console.error();for(let tt of xe)console.error(` ${ke("38;5;244",tt)}`)}console.error()}function N(Le,Te){if(e.allowDebug===!1)return Te;if(Number.isFinite(o)){if(o>=2)return(...ke)=>{let Ke=C(Le,ke);try{return Ke.result=Te(...ke)}catch(xe){throw Ke.error=xe}finally{T(Ke)}};if(o>=1)return(...ke)=>{try{return Te(...ke)}catch(Ke){let xe=C(Le,ke);throw xe.error=Ke,T(xe),Ke}}}return Te}function U(Le){let Te=g(Le);if(!Te)throw ts("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Te}function J(Le){if(Le.name===null)return!0;for(let Te of t.dependencyTreeRoots)if(Te.name===Le.name&&Te.reference===Le.reference)return!0;return!1}let te=new Set(["node","require",...b1e("--conditions")]);function le(Le,Te=te,ke){let Ke=fe(V.join(Le,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ke===null)throw ts("INTERNAL",`The locator that owns the "${Le}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:xe}=U(Ke),tt=V.join(xe,mr.manifest);if(!e.fakeFs.existsSync(tt))return null;let He=JSON.parse(e.fakeFs.readFileSync(tt,"utf8"));if(He.exports==null)return null;let x=V.contains(xe,Le);if(x===null)throw ts("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");x!=="."&&!A.test(x)&&(x=`./${x}`);try{let I=B1e({packageJSONUrl:(0,fd.pathToFileURL)(Ae.fromPortablePath(tt)),packageSubpath:x,exports:He.exports,base:ke?(0,fd.pathToFileURL)(Ae.fromPortablePath(ke)):null,conditions:Te});return Ae.toPortablePath((0,fd.fileURLToPath)(I))}catch(I){throw ts("EXPORTS_RESOLUTION_FAILED",I.message,{unqualifiedPath:pu(Le),locator:Ke,pkgJson:He,subpath:pu(x),conditions:Te},I.code)}}function ce(Le,Te,{extensions:ke}){let Ke;try{Te.push(Le),Ke=e.fakeFs.statSync(Le)}catch{}if(Ke&&!Ke.isDirectory())return e.fakeFs.realpathSync(Le);if(Ke&&Ke.isDirectory()){let xe;try{xe=JSON.parse(e.fakeFs.readFileSync(V.join(Le,mr.manifest),"utf8"))}catch{}let tt;if(xe&&xe.main&&(tt=V.resolve(Le,xe.main)),tt&&tt!==Le){let He=ce(tt,Te,{extensions:ke});if(He!==null)return He}}for(let xe=0,tt=ke.length;xe<tt;xe++){let He=`${Le}${ke[xe]}`;if(Te.push(He),e.fakeFs.existsSync(He))return He}if(Ke&&Ke.isDirectory())for(let xe=0,tt=ke.length;xe<tt;xe++){let He=V.format({dir:Le,name:"index",ext:ke[xe]});if(Te.push(He),e.fakeFs.existsSync(He))return He}return null}function ue(Le){let Te=new tp.Module(Le,null);return Te.filename=Le,Te.paths=tp.Module._nodeModulePaths(Le),Te}function Ie(Le,Te){return Te.endsWith("/")&&(Te=V.join(Te,"internal.js")),tp.Module._resolveFilename(Ae.fromPortablePath(Le),ue(Ae.fromPortablePath(Te)),!1,{plugnplay:!1})}function he(Le){if(w===null)return!1;let Te=V.contains(t.basePath,Le);return Te===null?!1:!!w.test(Te.replace(/\/$/,""))}let De={std:3,resolveVirtual:1,getAllLocators:1},Ee=p;function g({name:Le,reference:Te}){let ke=D.get(Le);if(!ke)return null;let Ke=ke.get(Te);return Ke||null}function me({name:Le,reference:Te}){let ke=[];for(let[Ke,xe]of D)if(Ke!==null)for(let[tt,He]of xe)tt===null||He.packageDependencies.get(Le)!==Te||Ke===Le&&tt===Te||ke.push({name:Ke,reLine truncated
|
`),r}Pt();var[Ha,tp]=process.versions.node.split(".").map(t=>parseInt(t,10)),R1e=Ha>19||Ha===19&&tp>=2||Ha===18&&tp>=13,AJt=Ha===20&&tp<6||Ha===19&&tp>=3,fJt=Ha>19||Ha===19&&tp>=6,pJt=Ha>=21||Ha===20&&tp>=10||Ha===18&&tp>=19,hJt=Ha>=21||Ha===20&&tp>=10||Ha===18&&tp>=20,gJt=Ha>=22;function T1e(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>ue.fromPortablePath(qs.resolveVirtual(ue.toPortablePath(e)))),R1e)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function Uj(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Te of["react-scripts","gatsby"]){let Ne=t.packageRegistry.get(Te);if(Ne)for(let xe of Ne.keys()){if(xe===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Te,reference:xe})}}let{ignorePattern:w,packageRegistry:D,packageLocatorsByLocations:b}=t;function C(Te,Ne){return{fn:Te,args:Ne,error:null,result:null}}function T(Te){let Ne=process.stderr?.hasColors?.()??process.stdout.isTTY,xe=(it,Ue)=>`\x1B[${it}m${Ue}\x1B[0m`,Ye=Te.error;console.error(Ye?xe("31;1",`\u2716 ${Te.error?.message.replace(/\n.*/s,"")}`):xe("33;1","\u203C Resolution")),Te.args.length>0&&console.error();for(let it of Te.args)console.error(` ${xe("37;1","In \u2190")} ${(0,Mj.inspect)(it,{colors:Ne,compact:!0})}`);Te.result&&(console.error(),console.error(` ${xe("37;1","Out \u2192")} ${(0,Mj.inspect)(Te.result,{colors:Ne,compact:!0})}`));let Qe=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(Qe.length>0){console.error();for(let it of Qe)console.error(` ${xe("38;5;244",it)}`)}console.error()}function L(Te,Ne){if(e.allowDebug===!1)return Ne;if(Number.isFinite(o)){if(o>=2)return(...xe)=>{let Ye=C(Te,xe);try{return Ye.result=Ne(...xe)}catch(Qe){throw Ye.error=Qe}finally{T(Ye)}};if(o>=1)return(...xe)=>{try{return Ne(...xe)}catch(Ye){let Qe=C(Te,xe);throw Qe.error=Ye,T(Qe),Ye}}}return Ne}function U(Te){let Ne=g(Te);if(!Ne)throw ts("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Ne}function z(Te){if(Te.name===null)return!0;for(let Ne of t.dependencyTreeRoots)if(Ne.name===Te.name&&Ne.reference===Te.reference)return!0;return!1}let te=new Set(["node","require",...F1e("--conditions")]);function le(Te,Ne=te,xe){let Ye=Ae(K.join(Te,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ye===null)throw ts("INTERNAL",`The locator that owns the "${Te}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Qe}=U(Ye),it=K.join(Qe,mr.manifest);if(!e.fakeFs.existsSync(it))return null;let Ue=JSON.parse(e.fakeFs.readFileSync(it,"utf8"));if(Ue.exports==null)return null;let x=K.contains(Qe,Te);if(x===null)throw ts("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");x!=="."&&!A.test(x)&&(x=`./${x}`);try{let I=P1e({packageJSONUrl:(0,hd.pathToFileURL)(ue.fromPortablePath(it)),packageSubpath:x,exports:Ue.exports,base:xe?(0,hd.pathToFileURL)(ue.fromPortablePath(xe)):null,conditions:Ne});return ue.toPortablePath((0,hd.fileURLToPath)(I))}catch(I){throw ts("EXPORTS_RESOLUTION_FAILED",I.message,{unqualifiedPath:pu(Te),locator:Ye,pkgJson:Ue,subpath:pu(x),conditions:Ne},I.code)}}function de(Te,Ne,{extensions:xe}){let Ye;try{Ne.push(Te),Ye=e.fakeFs.statSync(Te)}catch{}if(Ye&&!Ye.isDirectory())return e.fakeFs.realpathSync(Te);if(Ye&&Ye.isDirectory()){let Qe;try{Qe=JSON.parse(e.fakeFs.readFileSync(K.join(Te,mr.manifest),"utf8"))}catch{}let it;if(Qe&&Qe.main&&(it=K.resolve(Te,Qe.main)),it&&it!==Te){let Ue=de(it,Ne,{extensions:xe});if(Ue!==null)return Ue}}for(let Qe=0,it=xe.length;Qe<it;Qe++){let Ue=`${Te}${xe[Qe]}`;if(Ne.push(Ue),e.fakeFs.existsSync(Ue))return Ue}if(Ye&&Ye.isDirectory())for(let Qe=0,it=xe.length;Qe<it;Qe++){let Ue=K.format({dir:Te,name:"index",ext:xe[Qe]});if(Ne.push(Ue),e.fakeFs.existsSync(Ue))return Ue}return null}function ce(Te){let Ne=new rp.Module(Te,null);return Ne.filename=Te,Ne.paths=rp.Module._nodeModulePaths(Te),Ne}function me(Te,Ne){return Ne.endsWith("/")&&(Ne=K.join(Ne,"internal.js")),rp.Module._resolveFilename(ue.fromPortablePath(Te),ce(ue.fromPortablePath(Ne)),!1,{plugnplay:!1})}function pe(Te){if(w===null)return!1;let Ne=K.contains(t.basePath,Te);return Ne===null?!1:!!w.test(Ne.replace(/\/$/,""))}let ve={std:3,resolveVirtual:1,getAllLocators:1},Ie=p;function g({name:Te,reference:Ne}){let xe=D.get(Te);if(!xe)return null;let Ye=xe.get(Ne);return Ye||null}function Ce({name:Te,reference:Ne}){let xe=[];for(let[Ye,Qe]of D)if(Ye!==null)for(let[it,Ue]of Qe)it===null||Ue.packageDependencies.get(Te)!==Ne||Ye===Te&&it===Ne||xe.push({name:Ye,reLine truncated
|
||||||
|
|
||||||
Require request: "${Ke}"
|
Require request: "${Ye}"
|
||||||
Required by: ${xe}
|
Required by: ${Qe}
|
||||||
`,{request:Ke,issuer:xe});return Ae.toPortablePath(x)}let tt,He=Le.match(a);if(He){if(!Te)throw ts("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ke,issuer:xe});let[,x,I]=He,P=fe(Te);if(!P){let Fe=Ie(Le,Te);if(Fe===!1)throw ts("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
|
`,{request:Ye,issuer:Qe});return ue.toPortablePath(x)}let it,Ue=Te.match(a);if(Ue){if(!Ne)throw ts("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:Qe});let[,x,I]=Ue,S=Ae(Ne);if(!S){let Fe=me(Te,Ne);if(Fe===!1)throw ts("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
|
||||||
|
|
||||||
Require path: "${Ke}"
|
Require path: "${Ye}"
|
||||||
Required by: ${xe}
|
Required by: ${Qe}
|
||||||
`,{request:Ke,issuer:xe});return Ae.toPortablePath(Fe)}let R=U(P).packageDependencies.get(x),z=null;if(R==null&&P.name!==null){let Fe=t.fallbackExclusionList.get(P.name);if(!Fe||!Fe.has(P.reference)){for(let Et=0,qt=h.length;Et<qt;++Et){let Pt=U(h[Et]).packageDependencies.get(x);if(Pt!=null){r?z=Pt:R=Pt;break}}if(t.enableTopLevelFallback&&R==null&&z===null){let Et=t.fallbackPool.get(x);Et!=null&&(z=Et)}}}let X=null;if(R===null)if(J(P))X=ts("MISSING_PEER_DEPENDENCY",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
|
`,{request:Ye,issuer:Qe});return ue.toPortablePath(Fe)}let R=U(S).packageDependencies.get(x),J=null;if(R==null&&S.name!==null){let Fe=t.fallbackExclusionList.get(S.name);if(!Fe||!Fe.has(S.reference)){for(let Et=0,qt=h.length;Et<qt;++Et){let St=U(h[Et]).packageDependencies.get(x);if(St!=null){r?J=St:R=St;break}}if(t.enableTopLevelFallback&&R==null&&J===null){let Et=t.fallbackPool.get(x);Et!=null&&(J=Et)}}}let X=null;if(R===null)if(z(S))X=ts("MISSING_PEER_DEPENDENCY",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
|
||||||
|
|
||||||
Required package: ${x}${x!==Ke?` (via "${Ke}")`:""}
|
Required package: ${x}${x!==Ye?` (via "${Ye}")`:""}
|
||||||
Required by: ${xe}
|
Required by: ${Qe}
|
||||||
`,{request:Ke,issuer:xe,dependencyName:x});else{let Fe=Ce(x,P);Fe.every(lt=>J(lt))?X=ts("MISSING_PEER_DEPENDENCY",`${P.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
|
`,{request:Ye,issuer:Qe,dependencyName:x});else{let Fe=ye(x,S);Fe.every(lt=>z(lt))?X=ts("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
|
||||||
|
|
||||||
Required package: ${x}${x!==Ke?` (via "${Ke}")`:""}
|
Required package: ${x}${x!==Ye?` (via "${Ye}")`:""}
|
||||||
Required by: ${P.name}@${P.reference} (via ${xe})
|
Required by: ${S.name}@${S.reference} (via ${Qe})
|
||||||
${Fe.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}
|
${Fe.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}
|
||||||
`).join("")}
|
`).join("")}
|
||||||
`,{request:Ke,issuer:xe,issuerLocator:Object.assign({},P),dependencyName:x,brokenAncestors:Fe}):X=ts("MISSING_PEER_DEPENDENCY",`${P.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
|
`,{request:Ye,issuer:Qe,issuerLocator:Object.assign({},S),dependencyName:x,brokenAncestors:Fe}):X=ts("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
|
||||||
|
|
||||||
Required package: ${x}${x!==Ke?` (via "${Ke}")`:""}
|
Required package: ${x}${x!==Ye?` (via "${Ye}")`:""}
|
||||||
Required by: ${P.name}@${P.reference} (via ${xe})
|
Required by: ${S.name}@${S.reference} (via ${Qe})
|
||||||
|
|
||||||
${Fe.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}
|
${Fe.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}
|
||||||
`).join("")}
|
`).join("")}
|
||||||
`,{request:Ke,issuer:xe,issuerLocator:Object.assign({},P),dependencyName:x,brokenAncestors:Fe})}else R===void 0&&(!ke&&(0,tp.isBuiltin)(Le)?J(P)?X=ts("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
|
`,{request:Ye,issuer:Qe,issuerLocator:Object.assign({},S),dependencyName:x,brokenAncestors:Fe})}else R===void 0&&(!xe&&(0,rp.isBuiltin)(Te)?z(S)?X=ts("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
|
||||||
|
|
||||||
Required package: ${x}${x!==Ke?` (via "${Ke}")`:""}
|
Required package: ${x}${x!==Ye?` (via "${Ye}")`:""}
|
||||||
Required by: ${xe}
|
Required by: ${Qe}
|
||||||
`,{request:Ke,issuer:xe,dependencyName:x}):X=ts("UNDECLARED_DEPENDENCY",`${P.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${P.name}'s dependencies, this makes the require call ambiguous and unsound.
|
`,{request:Ye,issuer:Qe,dependencyName:x}):X=ts("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${S.name}'s dependencies, this makes the require call ambiguous and unsound.
|
||||||
|
|
||||||
Required package: ${x}${x!==Ke?` (via "${Ke}")`:""}
|
Required package: ${x}${x!==Ye?` (via "${Ye}")`:""}
|
||||||
Required by: ${xe}
|
Required by: ${Qe}
|
||||||
`,{request:Ke,issuer:xe,issuerLocator:Object.assign({},P),dependencyName:x}):J(P)?X=ts("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
|
`,{request:Ye,issuer:Qe,issuerLocator:Object.assign({},S),dependencyName:x}):z(S)?X=ts("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
|
||||||
|
|
||||||
Required package: ${x}${x!==Ke?` (via "${Ke}")`:""}
|
Required package: ${x}${x!==Ye?` (via "${Ye}")`:""}
|
||||||
Required by: ${xe}
|
Required by: ${Qe}
|
||||||
`,{request:Ke,issuer:xe,dependencyName:x}):X=ts("UNDECLARED_DEPENDENCY",`${P.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
|
`,{request:Ye,issuer:Qe,dependencyName:x}):X=ts("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
|
||||||
|
|
||||||
Required package: ${x}${x!==Ke?` (via "${Ke}")`:""}
|
Required package: ${x}${x!==Ye?` (via "${Ye}")`:""}
|
||||||
Required by: ${P.name}@${P.reference} (via ${xe})
|
Required by: ${S.name}@${S.reference} (via ${Qe})
|
||||||
`,{request:Ke,issuer:xe,issuerLocator:Object.assign({},P),dependencyName:x}));if(R==null){if(z===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");R=z;let Fe=X.message.replace(/\n.*/g,"");X.message=Fe,!E.has(Fe)&&o!==0&&(E.add(Fe),process.emitWarning(X))}let $=Array.isArray(R)?{name:R[0],reference:R[1]}:{name:x,reference:R},se=U($);if(!se.packageLocation)throw ts("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
|
`,{request:Ye,issuer:Qe,issuerLocator:Object.assign({},S),dependencyName:x}));if(R==null){if(J===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");R=J;let Fe=X.message.replace(/\n.*/g,"");X.message=Fe,!E.has(Fe)&&o!==0&&(E.add(Fe),process.emitWarning(X))}let $=Array.isArray(R)?{name:R[0],reference:R[1]}:{name:x,reference:R},se=U($);if(!se.packageLocation)throw ts("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
|
||||||
|
|
||||||
Required package: ${$.name}@${$.reference}${$.name!==Ke?` (via "${Ke}")`:""}
|
Required package: ${$.name}@${$.reference}${$.name!==Ye?` (via "${Ye}")`:""}
|
||||||
Required by: ${P.name}@${P.reference} (via ${xe})
|
Required by: ${S.name}@${S.reference} (via ${Qe})
|
||||||
`,{request:Ke,issuer:xe,dependencyLocator:Object.assign({},$)});let be=se.packageLocation;I?tt=V.join(be,I):tt=be}else if(V.isAbsolute(Le))tt=V.normalize(Le);else{if(!Te)throw ts("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ke,issuer:xe});let x=V.resolve(Te);Te.match(u)?tt=V.normalize(V.join(x,Le)):tt=V.normalize(V.join(V.dirname(x),Le))}return V.normalize(tt)}function Se(Le,Te,ke=te,Ke){if(n.test(Le))return Te;let xe=le(Te,ke,Ke);return xe?V.normalize(xe):Te}function Re(Le,{extensions:Te=Object.keys(tp.Module._extensions)}={}){let ke=[],Ke=ce(Le,ke,{extensions:Te});if(Ke)return V.normalize(Ke);{Q1e(ke.map(He=>Ae.fromPortablePath(He)));let xe=pu(Le),tt=fe(Le);if(tt){let{packageLocation:He}=U(tt),x=!0;try{e.fakeFs.accessSync(He)}catch(I){if(I?.code==="ENOENT")x=!1;else{let P=(I?.message??I??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw ts("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${P}).
|
`,{request:Ye,issuer:Qe,dependencyLocator:Object.assign({},$)});let be=se.packageLocation;I?it=K.join(be,I):it=be}else if(K.isAbsolute(Te))it=K.normalize(Te);else{if(!Ne)throw ts("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:Qe});let x=K.resolve(Ne);Ne.match(u)?it=K.normalize(K.join(x,Te)):it=K.normalize(K.join(K.dirname(x),Te))}return K.normalize(it)}function Pe(Te,Ne,xe=te,Ye){if(n.test(Te))return Ne;let Qe=le(Ne,xe,Ye);return Qe?K.normalize(Qe):Ne}function Re(Te,{extensions:Ne=Object.keys(rp.Module._extensions)}={}){let xe=[],Ye=de(Te,xe,{extensions:Ne});if(Ye)return K.normalize(Ye);{T1e(xe.map(Ue=>ue.fromPortablePath(Ue)));let Qe=pu(Te),it=Ae(Te);if(it){let{packageLocation:Ue}=U(it),x=!0;try{e.fakeFs.accessSync(Ue)}catch(I){if(I?.code==="ENOENT")x=!1;else{let S=(I?.message??I??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw ts("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${S}).
|
||||||
|
|
||||||
Missing package: ${tt.name}@${tt.reference}
|
Missing package: ${it.name}@${it.reference}
|
||||||
Expected package location: ${pu(He)}
|
Expected package location: ${pu(Ue)}
|
||||||
`,{unqualifiedPath:xe,extensions:Te})}}if(!x){let I=He.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw ts("QUALIFIED_PATH_RESOLUTION_FAILED",`${I}
|
`,{unqualifiedPath:Qe,extensions:Ne})}}if(!x){let I=Ue.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw ts("QUALIFIED_PATH_RESOLUTION_FAILED",`${I}
|
||||||
|
|
||||||
Missing package: ${tt.name}@${tt.reference}
|
Missing package: ${it.name}@${it.reference}
|
||||||
Expected package location: ${pu(He)}
|
Expected package location: ${pu(Ue)}
|
||||||
`,{unqualifiedPath:xe,extensions:Te})}}throw ts("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
|
`,{unqualifiedPath:Qe,extensions:Ne})}}throw ts("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
|
||||||
|
|
||||||
Source path: ${xe}
|
Source path: ${Qe}
|
||||||
${ke.map(He=>`Not found: ${pu(He)}
|
${xe.map(Ue=>`Not found: ${pu(Ue)}
|
||||||
`).join("")}`,{unqualifiedPath:xe,extensions:Te})}}function ht(Le,Te,ke){if(!Te)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let Ke=v1e({name:Le,base:(0,fd.pathToFileURL)(Ae.fromPortablePath(Te)),conditions:ke.conditions??te,readFileSyncFn:ie});if(Ke instanceof URL)return Re(Ae.toPortablePath((0,fd.fileURLToPath)(Ke)),{extensions:ke.extensions});if(Ke.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return q(Ke,Te,ke)}function q(Le,Te,ke={}){try{if(Le.startsWith("#"))return ht(Le,Te,ke);let{considerBuiltins:Ke,extensions:xe,conditions:tt}=ke,He=Z(Le,Te,{considerBuiltins:Ke});if(Le==="pnpapi")return He;if(He===null)return null;let x=()=>Te!==null?he(Te):!1,I=(!Ke||!(0,tp.isBuiltin)(Le))&&!x()?Se(Le,He,tt,Te):He;return Re(I,{extensions:xe})}catch(Ke){throw Object.hasOwn(Ke,"pnpCode")&&Object.assign(Ke.data,{request:pu(Le),issuer:Te&&pu(Te)}),Ke}}function nt(Le){let Te=V.normalize(Le),ke=qs.resolveVirtual(Te);return ke!==Te?ke:null}return{VERSIONS:De,topLevel:Ee,getLocator:(Le,Te)=>Array.isArray(Te)?{name:Te[0],reference:Te[1]}:{name:Le,reference:Te},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Le=[];for(let[Te,ke]of D)for(let Ke of ke.keys())Te!==null&&Ke!==null&&Le.push({name:Te,reference:Ke});return Le},getPackageInformation:Le=>{let Te=g(Le);if(Te===null)return null;let ke=Ae.fromPortablePath(Te.packageLocation);return{...Te,packageLocation:ke}},findPackageLocator:Le=>fe(Ae.toPortablePath(Le)),resolveToUnqualified:N("resolveToUnqualified",(Le,Te,ke)=>{let Ke=Te!==null?Ae.toPortablePath(Te):null,xe=Z(Ae.toPortablePath(Le),Ke,ke);return xe===null?null:Ae.fromPortablePath(xe)}),resolveUnqualified:N("resolveUnqualified",(Le,Te)=>Ae.fromPortablePath(Re(Ae.toPortablePath(Le),Te))),resolveRequest:N("resolveRequest",(Le,Te,ke)=>{let Ke=Te!==null?Ae.toPortablePath(Te):null,xe=q(Ae.toPortablePath(Le),Ke,ke);return xe===null?null:Ae.fromPortablePath(xe)}),resolveVirtual:N("resolveVirtual",Le=>{let Te=nt(Ae.toPortablePath(Le));return Te!==null?Ae.fromPortablePath(Te):null})}}St();var F1e=(t,e,r)=>{let o=gv(t),a=Sj(o,{basePath:e}),n=Ae.join(e,mr.pnpCjs);return Oj(a,{fakeFs:r,pnpapiResolution:n})};var Uj=et(T1e());Gt();var CA={};Vt(CA,{checkManifestCompatibility:()=>L1e,extractBuildRequest:()=>ZQ,getExtractHint:()=>_j,hasBindingGyp:()=>Hj});Ve();St();function L1e(t){return G.isPackageCompatible(t,Xi.getArchitectureSet())}function ZQ(t,e,r,{configuration:o}){let a=[];for(let n of["preinstall","install","postinstall"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:t.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${G.prettyLocator(o,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${G.prettyLocator(o,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!o.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${G.prettyLocator(o,t)} lists build scripts, but all build scripts have been disabled.`)}:L1e(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${G.prettyLocator(o,t)} The ${Xi.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var vwt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function _j(t){return t.packageFs.getExtractHint({relevantExtensions:vwt})}function Hj(t){let e=V.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var vv={};Vt(vv,{getUnpluggedPath:()=>Bv});Ve();St();function Bv(t,{configuration:e}){return V.resolve(e.get("pnpUnpluggedFolder"),G.slugifyLocator(t))}var Dwt=new Set([G.makeIdent(null,"open").identHash,G.makeIdent(null,"opn").identHash]),Yh=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let o=Vh(r.project).cjs;if(!ae.existsSync(o))throw new it(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=qe.getFactoryWithDefault(this.pnpCache,o,()=>qe.dynamicRequire(o,{cachingStrategy:qe.CachingStrategy.FsTime})),n={name:G.stringifyIdent(e),reference:e.reference},u=a.getPackageInformation(n);if(!u)throw new it(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return Ae.toPortablePath(u.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return nullLine truncated
|
`).join("")}`,{unqualifiedPath:Qe,extensions:Ne})}}function gt(Te,Ne,xe){if(!Ne)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let Ye=S1e({name:Te,base:(0,hd.pathToFileURL)(ue.fromPortablePath(Ne)),conditions:xe.conditions??te,readFileSyncFn:ie});if(Ye instanceof URL)return Re(ue.toPortablePath((0,hd.fileURLToPath)(Ye)),{extensions:xe.extensions});if(Ye.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return q(Ye,Ne,xe)}function q(Te,Ne,xe={}){try{if(Te.startsWith("#"))return gt(Te,Ne,xe);let{considerBuiltins:Ye,extensions:Qe,conditions:it}=xe,Ue=Z(Te,Ne,{considerBuiltins:Ye});if(Te==="pnpapi")return Ue;if(Ue===null)return null;let x=()=>Ne!==null?pe(Ne):!1,I=(!Ye||!(0,rp.isBuiltin)(Te))&&!x()?Pe(Te,Ue,it,Ne):Ue;return Re(I,{extensions:Qe})}catch(Ye){throw Object.hasOwn(Ye,"pnpCode")&&Object.assign(Ye.data,{request:pu(Te),issuer:Ne&&pu(Ne)}),Ye}}function rt(Te){let Ne=K.normalize(Te),xe=qs.resolveVirtual(Ne);return xe!==Ne?xe:null}return{VERSIONS:ve,topLevel:Ie,getLocator:(Te,Ne)=>Array.isArray(Ne)?{name:Ne[0],reference:Ne[1]}:{name:Te,reference:Ne},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Te=[];for(let[Ne,xe]of D)for(let Ye of xe.keys())Ne!==null&&Ye!==null&&Te.push({name:Ne,reference:Ye});return Te},getPackageInformation:Te=>{let Ne=g(Te);if(Ne===null)return null;let xe=ue.fromPortablePath(Ne.packageLocation);return{...Ne,packageLocation:xe}},findPackageLocator:Te=>Ae(ue.toPortablePath(Te)),resolveToUnqualified:L("resolveToUnqualified",(Te,Ne,xe)=>{let Ye=Ne!==null?ue.toPortablePath(Ne):null,Qe=Z(ue.toPortablePath(Te),Ye,xe);return Qe===null?null:ue.fromPortablePath(Qe)}),resolveUnqualified:L("resolveUnqualified",(Te,Ne)=>ue.fromPortablePath(Re(ue.toPortablePath(Te),Ne))),resolveRequest:L("resolveRequest",(Te,Ne,xe)=>{let Ye=Ne!==null?ue.toPortablePath(Ne):null,Qe=q(ue.toPortablePath(Te),Ye,xe);return Qe===null?null:ue.fromPortablePath(Qe)}),resolveVirtual:L("resolveVirtual",Te=>{let Ne=rt(ue.toPortablePath(Te));return Ne!==null?ue.fromPortablePath(Ne):null})}}Pt();var N1e=(t,e,r)=>{let o=gv(t),a=xj(o,{basePath:e}),n=ue.join(e,mr.pnpCjs);return Uj(a,{fakeFs:r,pnpapiResolution:n})};var Hj=et(O1e());Gt();var CA={};Kt(CA,{checkManifestCompatibility:()=>M1e,extractBuildRequest:()=>$k,getExtractHint:()=>qj,hasBindingGyp:()=>jj});Ve();Pt();function M1e(t){return G.isPackageCompatible(t,Xi.getArchitectureSet())}function $k(t,e,r,{configuration:o}){let a=[];for(let n of["preinstall","install","postinstall"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:t.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${G.prettyLocator(o,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${G.prettyLocator(o,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!o.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${G.prettyLocator(o,t)} lists build scripts, but all build scripts have been disabled.`)}:M1e(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${G.prettyLocator(o,t)} The ${Xi.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var Pwt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function qj(t){return t.packageFs.getExtractHint({relevantExtensions:Pwt})}function jj(t){let e=K.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var vv={};Kt(vv,{getUnpluggedPath:()=>Bv});Ve();Pt();function Bv(t,{configuration:e}){return K.resolve(e.get("pnpUnpluggedFolder"),G.slugifyLocator(t))}var Swt=new Set([G.makeIdent(null,"open").identHash,G.makeIdent(null,"opn").identHash]),Vh=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let o=zh(r.project).cjs;if(!ae.existsSync(o))throw new nt(`The project in ${fe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,fe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=qe.getFactoryWithDefault(this.pnpCache,o,()=>qe.dynamicRequire(o,{cachingStrategy:qe.CachingStrategy.FsTime})),n={name:G.stringifyIdent(e),reference:e.reference},u=a.getPackageInformation(n);if(!u)throw new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return ue.toPortablePath(u.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return nullLine truncated
|
||||||
`,n+=`# cause your node_modules installation to become invalidated.
|
`,n+=`# cause your node_modules installation to become invalidated.
|
||||||
`,n+=`
|
`,n+=`
|
||||||
`,n+=`__metadata:
|
`,n+=`__metadata:
|
||||||
`,n+=` version: ${K1e}
|
`,n+=` version: ${X1e}
|
||||||
`,n+=` nmMode: ${o.value}
|
`,n+=` nmMode: ${o.value}
|
||||||
`;let u=Array.from(e.keys()).sort(),A=G.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of u){let w=e.get(E);n+=`
|
`;let u=Array.from(e.keys()).sort(),A=G.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of u){let w=e.get(E);n+=`
|
||||||
`,n+=`${JSON.stringify(E)}:
|
`,n+=`${JSON.stringify(E)}:
|
||||||
`,n+=` locations:
|
`,n+=` locations:
|
||||||
`;for(let D of w.locations){let b=V.contains(t.cwd,D);if(b===null)throw new Error(`Assertion failed: Expected the path to be within the project (${D})`);n+=` - ${JSON.stringify(b)}
|
`;for(let D of w.locations){let b=K.contains(t.cwd,D);if(b===null)throw new Error(`Assertion failed: Expected the path to be within the project (${D})`);n+=` - ${JSON.stringify(b)}
|
||||||
`}if(w.aliases.length>0){n+=` aliases:
|
`}if(w.aliases.length>0){n+=` aliases:
|
||||||
`;for(let D of w.aliases)n+=` - ${JSON.stringify(D)}
|
`;for(let D of w.aliases)n+=` - ${JSON.stringify(D)}
|
||||||
`}if(E===A&&r.size>0){n+=` bin:
|
`}if(E===A&&r.size>0){n+=` bin:
|
||||||
`;for(let[D,b]of r){let C=V.contains(t.cwd,D);if(C===null)throw new Error(`Assertion failed: Expected the path to be within the project (${D})`);n+=` ${JSON.stringify(C)}:
|
`;for(let[D,b]of r){let C=K.contains(t.cwd,D);if(C===null)throw new Error(`Assertion failed: Expected the path to be within the project (${D})`);n+=` ${JSON.stringify(C)}:
|
||||||
`;for(let[T,N]of b){let U=V.relative(V.join(D,xi),N);n+=` ${JSON.stringify(T)}: ${JSON.stringify(U)}
|
`;for(let[T,L]of b){let U=K.relative(K.join(D,xi),L);n+=` ${JSON.stringify(T)}: ${JSON.stringify(U)}
|
||||||
`}}}}let p=t.cwd,h=V.join(p,xi,J1e);a&&await ae.removePromise(h),await ae.changeFilePromise(h,n,{automaticNewlines:!0})}async function Jj(t,{unrollAliases:e=!1}={}){let r=t.cwd,o=V.join(r,xi,J1e),a;try{a=await ae.statPromise(o)}catch{}if(!a)return null;let n=Vi(await ae.readFilePromise(o,"utf8"));if(n.__metadata.version>K1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let w=E.locations.map(b=>V.join(r,b)),D=E.bin;if(D)for(let[b,C]of Object.entries(D)){let T=V.join(r,Ae.toPortablePath(b)),N=qe.getMapWithDefault(p,T);for(let[U,J]of Object.entries(C))N.set(U,Ae.toPortablePath([T,xi,J].join(V.sep)))}if(A.set(h,{target:Bt.dot,linkType:"HARD",locations:w,aliases:E.aliases||[]}),e&&E.aliases)for(let b of E.aliases){let{scope:C,name:T}=G.parseLocator(h),N=G.makeLocator(G.makeIdent(C,T),b),U=G.stringifyLocator(N);A.set(U,{target:Bt.dot,linkType:"HARD",locations:w,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:z1e(A,{skipPrefix:t.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var RC=async(t,e)=>{if(t.split(V.sep).indexOf(xi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{let r;if(!e.innerLoop&&(r=await ae.lstatPromise(t),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!e.isWorkspaceDir)){await ae.unlinkPromise(t);return}let o=await ae.readdirPromise(t,{withFileTypes:!0});for(let n of o){let u=V.join(t,n.name);n.isDirectory()?(n.name!==xi||e&&e.innerLoop)&&await RC(u,{innerLoop:!0,contentsOnly:!1}):await ae.unlinkPromise(u)}let a=!e.innerLoop&&e.isWorkspaceDir&&r?.isSymbolicLink();!e.contentsOnly&&!a&&await ae.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},G1e=4,eF=(t,{skipPrefix:e})=>{let r=V.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let o=r.split(V.sep).filter(p=>p!==""),a=o.indexOf(xi),n=o.slice(0,a).join(V.sep),u=V.join(e,n),A=o.slice(a);return{locationRoot:u,segments:A}},z1e=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&V.contains(e,n.target)!==null){let A=qe.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=eF(u,{skipPrefix:e}),h=qe.getFactoryWithDefault(r,A,o);for(let E=0;E<p.length;++E){let w=p[E];if(w!=="."){let D=qe.getFactoryWithDefault(h.children,w,o);h.children.set(w,D),h=D}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},Zj=async(t,e,r)=>{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await ae.lstatPromise(t)}catch{}if(!o||o.isDirectory()){await ae.symlinkPromise(t,e,"junction");return}}await ae.symlinkPromise(V.relative(V.dirname(e),t),e)};async function X1e(t,e,r){let o=V.join(t,`${zj.default.randomBytes(16).toString("hex")}.tmp`);try{await ae.writeFilePromise(o,r);try{await ae.linkPromise(o,e)}catch{}}finally{await ae.unlinkPromise(o)}}async function zwt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind==="file"){if(n.value==="hardlinks-global"&&o&&r.digest){let A=V.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await ae.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-Vwt))if(await bn.checksumFile(A,{baseFs:ae,algorithm:"sha1"})!==r.digest){let w=V.join(o,`${zj.default.randomBytes(16).toString("hex")}.tmp`);await ae.renamePromise(A,w);let D=await a.readFilePromise(t);await ae.writeFilePromise(w,D);try{await ae.linkPromise(w,A),r.mtimeMs=new Date().getTime(),await ae.unlinkPromise(w)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await ae.linkPromise(A,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await X1e(o,A,h),r.mtimeMs=new Date().getTime();try{await ae.linkPromise(A,e)}catch(E){E&&E.code&&E.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let u=r.mode&511;u!==420&&await ae.chmodPromise(e,u)}}var Xwt=async(t,e,{baseFs:r,globalHardlinksStore:o,nmMode:a,windowsLinkType:n,packageChecksum:u})=>{await ae.mkdirPromise(t,{recursive:!0});let A=async(E=Bt.dot)=>{let w=V.join(e,E),D=await r.readdirPromise(w,{withFileTypes:!0}),b=new Map;for(let C of D){let T=V.join(E,C.name),N,U=V.join(w,C.name);if(C.isFile()){if(N={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let J=await bn.checksumFile(U,{baseFs:r,algorithm:"sha1"});N.digest=J}}else if(C.isDirectory())N={kind:"directory"};else if(C.isSymbolicLink())N={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(b.set(T,N),C.isDirectory()&&T!==xi){let J=await A(T);for(let[te,le]of J)b.set(te,le)}}return b},p;if(a.value==="hardlinks-global"&&o&&u){let E=V.join(o,u.sub
Line truncated
|
`}}}}let p=t.cwd,h=K.join(p,xi,Z1e);a&&await ae.removePromise(h),await ae.changeFilePromise(h,n,{automaticNewlines:!0})}async function Xj(t,{unrollAliases:e=!1}={}){let r=t.cwd,o=K.join(r,xi,Z1e),a;try{a=await ae.statPromise(o)}catch{}if(!a)return null;let n=Ki(await ae.readFilePromise(o,"utf8"));if(n.__metadata.version>X1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let w=E.locations.map(b=>K.join(r,b)),D=E.bin;if(D)for(let[b,C]of Object.entries(D)){let T=K.join(r,ue.toPortablePath(b)),L=qe.getMapWithDefault(p,T);for(let[U,z]of Object.entries(C))L.set(U,ue.toPortablePath([T,xi,z].join(K.sep)))}if(A.set(h,{target:Bt.dot,linkType:"HARD",locations:w,aliases:E.aliases||[]}),e&&E.aliases)for(let b of E.aliases){let{scope:C,name:T}=G.parseLocator(h),L=G.makeLocator(G.makeIdent(C,T),b),U=G.stringifyLocator(L);A.set(U,{target:Bt.dot,linkType:"HARD",locations:w,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:$1e(A,{skipPrefix:t.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var NC=async(t,e)=>{if(t.split(K.sep).indexOf(xi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{let r;if(!e.innerLoop&&(r=await ae.lstatPromise(t),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!e.isWorkspaceDir)){await ae.unlinkPromise(t);return}let o=await ae.readdirPromise(t,{withFileTypes:!0});for(let n of o){let u=K.join(t,n.name);n.isDirectory()?(n.name!==xi||e&&e.innerLoop)&&await NC(u,{innerLoop:!0,contentsOnly:!1}):await ae.unlinkPromise(u)}let a=!e.innerLoop&&e.isWorkspaceDir&&r?.isSymbolicLink();!e.contentsOnly&&!a&&await ae.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},K1e=4,tF=(t,{skipPrefix:e})=>{let r=K.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let o=r.split(K.sep).filter(p=>p!==""),a=o.indexOf(xi),n=o.slice(0,a).join(K.sep),u=K.join(e,n),A=o.slice(a);return{locationRoot:u,segments:A}},$1e=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&K.contains(e,n.target)!==null){let A=qe.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=tF(u,{skipPrefix:e}),h=qe.getFactoryWithDefault(r,A,o);for(let E=0;E<p.length;++E){let w=p[E];if(w!=="."){let D=qe.getFactoryWithDefault(h.children,w,o);h.children.set(w,D),h=D}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},eG=async(t,e,r)=>{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await ae.lstatPromise(t)}catch{}if(!o||o.isDirectory()){await ae.symlinkPromise(t,e,"junction");return}}await ae.symlinkPromise(K.relative(K.dirname(e),t),e)};async function e2e(t,e,r){let o=K.join(t,`${Zj.default.randomBytes(16).toString("hex")}.tmp`);try{await ae.writeFilePromise(o,r);try{await ae.linkPromise(o,e)}catch{}}finally{await ae.unlinkPromise(o)}}async function Zwt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind==="file"){if(n.value==="hardlinks-global"&&o&&r.digest){let A=K.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await ae.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-zwt))if(await bn.checksumFile(A,{baseFs:ae,algorithm:"sha1"})!==r.digest){let w=K.join(o,`${Zj.default.randomBytes(16).toString("hex")}.tmp`);await ae.renamePromise(A,w);let D=await a.readFilePromise(t);await ae.writeFilePromise(w,D);try{await ae.linkPromise(w,A),r.mtimeMs=new Date().getTime(),await ae.unlinkPromise(w)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await ae.linkPromise(A,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await e2e(o,A,h),r.mtimeMs=new Date().getTime();try{await ae.linkPromise(A,e)}catch(E){E&&E.code&&E.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let u=r.mode&511;u!==420&&await ae.chmodPromise(e,u)}}var $wt=async(t,e,{baseFs:r,globalHardlinksStore:o,nmMode:a,windowsLinkType:n,packageChecksum:u})=>{await ae.mkdirPromise(t,{recursive:!0});let A=async(E=Bt.dot)=>{let w=K.join(e,E),D=await r.readdirPromise(w,{withFileTypes:!0}),b=new Map;for(let C of D){let T=K.join(E,C.name),L,U=K.join(w,C.name);if(C.isFile()){if(L={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let z=await bn.checksumFile(U,{baseFs:r,algorithm:"sha1"});L.digest=z}}else if(C.isDirectory())L={kind:"directory"};else if(C.isSymbolicLink())L={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(b.set(T,L),C.isDirectory()&&T!==xi){let z=await A(T);for(let[te,le]of z)b.set(te,le)}}return b},p;if(a.value==="hardlinks-global"&&o&&u){let E=K.join(o,u.sub
Line truncated
|
||||||
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,iG.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
|
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,oG.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
|
||||||
`),o}function nF(t){if(t.originalError?.name!=="HTTPError")return!1;try{return(t.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function LC(t){return{"npm-otp":t}}var bv=class{supports(e,r){if(!e.reference.startsWith(Zn))return!1;let{selector:o,params:a}=G.parseRange(e.reference);return!(!o2e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let{params:o}=G.parseRange(e.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await gd(o.__archiveUrl,{customErrorMessage:hd,configuration:r.project.configuration,ident:e});return await $i.convertToZip(a,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ve();var kv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(Zn)||!G.tryParseDescriptor(e.range.slice(Zn.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){let o=r.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(Zn.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(e,r,o){let a=o.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(Zn.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(e,r,o,a){let n=a.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(Zn.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(e,r){throw new Error("Unreachable")}};Ve();Ve();var a2e=et(ni());var rp=class t{supports(e,r){if(!e.reference.startsWith(Zn))return!1;let o=new URL(e.reference);return!(!a2e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o;try{o=await gd(t.getLocatorUrl(e),{customErrorMessage:hd,configuration:r.project.configuration,ident:e})}catch{o=await gd(t.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:hd,configuration:r.project.configuration,ident:e})}return await $i.convertToZip(o,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:o}){let a=TC(e.scope,{configuration:o}),n=t.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=Ur.clean(e.reference.slice(Zn.length));if(r===null)throw new Jt(10,"The npm semver resolver got selected, but the version isn't semver");return`${tF(e)}/-/${e.name}-${r}.tgz`}};Ve();Ve();Ve();var oG=et(ni());var iF=G.makeIdent(null,"node-gyp"),y1t=/\b(node-gyp|prebuild-install)\b/,Qv=class{supportsDescriptor(e,r){return e.range.startsWith(Zn)?!!Ur.validRange(e.range.slice(Zn.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(Zn))return!1;let{selector:o}=G.parseRange(e.reference);return!!oG.default.valid(o)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=Ur.validRange(e.range.slice(Zn.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(Zn.length)}`);let n=await NC(e,{cache:o.fetchOptions?.cache,project:o.project,version:oG.default.valid(a.raw)?a.raw:void 0}),u=qe.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new Ur.SemVer(h);if(a.test(E))return E}catch{}return qe.mapAndFilter.skip}),A=u.filter(h=>!n.versions[h.raw].deprecated),p=A.length>0?A:u;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=G.makeLocator(e,`${Zn}${h.raw}`),w=n.versions[h.raw].dist.tarball;return rp.isConventionalTarballUrl(E,w,{configuration:o.project.configuration})?E:G.bindLocator(E,{__archiveUrl:w})})}async getSatisfying(e,r,oLine truncated
|
`),o}function iF(t){if(t.originalError?.name!=="HTTPError")return!1;try{return(t.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function OC(t){return{"npm-otp":t}}var bv=class{supports(e,r){if(!e.reference.startsWith(Zn))return!1;let{selector:o,params:a}=G.parseRange(e.reference);return!(!c2e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let{params:o}=G.parseRange(e.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await md(o.__archiveUrl,{customErrorMessage:dd,configuration:r.project.configuration,ident:e});return await $i.convertToZip(a,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ve();var Qv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(Zn)||!G.tryParseDescriptor(e.range.slice(Zn.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){let o=r.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(Zn.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(e,r,o){let a=o.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(Zn.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(e,r,o,a){let n=a.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(Zn.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(e,r){throw new Error("Unreachable")}};Ve();Ve();var u2e=et(ni());var np=class t{supports(e,r){if(!e.reference.startsWith(Zn))return!1;let o=new URL(e.reference);return!(!u2e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o;try{o=await md(t.getLocatorUrl(e),{customErrorMessage:dd,configuration:r.project.configuration,ident:e})}catch{o=await md(t.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:dd,configuration:r.project.configuration,ident:e})}return await $i.convertToZip(o,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:o}){let a=LC(e.scope,{configuration:o}),n=t.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=Ur.clean(e.reference.slice(Zn.length));if(r===null)throw new zt(10,"The npm semver resolver got selected, but the version isn't semver");return`${rF(e)}/-/${e.name}-${r}.tgz`}};Ve();Ve();Ve();var lG=et(ni());var sF=G.makeIdent(null,"node-gyp"),C1t=/\b(node-gyp|prebuild-install)\b/,kv=class{supportsDescriptor(e,r){return e.range.startsWith(Zn)?!!Ur.validRange(e.range.slice(Zn.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(Zn))return!1;let{selector:o}=G.parseRange(e.reference);return!!lG.default.valid(o)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=Ur.validRange(e.range.slice(Zn.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(Zn.length)}`);let n=await MC(e,{cache:o.fetchOptions?.cache,project:o.project,version:lG.default.valid(a.raw)?a.raw:void 0}),u=qe.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new Ur.SemVer(h);if(a.test(E))return E}catch{}return qe.mapAndFilter.skip}),A=u.filter(h=>!n.versions[h.raw].deprecated),p=A.length>0?A:u;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=G.makeLocator(e,`${Zn}${h.raw}`),w=n.versions[h.raw].dist.tarball;return np.isConventionalTarballUrl(E,w,{configuration:o.project.configuration})?E:G.bindLocator(E,{__archiveUrl:w})})}async getSatisfying(e,r,oLine truncated
|
||||||
`;try{a=await ae.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var ZG={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},$Be={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},mvt={configuration:{...ZG,...$Be,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...ZG,...$Be}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:uc,valueDefinition:{description:"",type:"SHAPE",properties:{...ZG}}}},fetchers:[bv,rp],resolvers:[kv,Qv,Fv]},yvt=mvt;var l5={};Vt(l5,{NpmAuditCommand:()=>zC,NpmInfoCommand:()=>XC,NpmLoginCommand:()=>ZC,NpmLogoutCommand:()=>eI,NpmPublishCommand:()=>tI,NpmTagAddCommand:()=>nI,NpmTagListCommand:()=>rI,NpmTagRemoveCommand:()=>iI,NpmWhoamiCommand:()=>sI,default:()=>Dvt,npmAuditTypes:()=>Xv,npmAuditUtils:()=>xF});Ve();Ve();Gt();var i5=et(Xo());il();var Xv={};Vt(Xv,{Environment:()=>Jv,Severity:()=>zv});var Jv=(o=>(o.All="all",o.Production="production",o.Development="development",o))(Jv||{}),zv=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(zv||{});var xF={};Vt(xF,{allSeverities:()=>JC,getPackages:()=>n5,getReportTree:()=>t5,getSeverityInclusions:()=>e5,getTopLevelDependencies:()=>r5});Ve();var eve=et(ni());var JC=["info","low","moderate","high","critical"];function e5(t){if(typeof t>"u")return new Set(JC);let e=JC.indexOf(t),r=JC.slice(e);return new Set(r)}function t5(t){let e={},r={children:e};for(let[o,a]of qe.sortMap(Object.entries(t),n=>n[0]))for(let n of qe.sortMap(a,u=>`${u.id}`))e[`${o}/${n.id}`]={value:pe.tuple(pe.Type.IDENT,G.parseIdent(o)),children:{ID:typeof n.id<"u"&&{label:"ID",value:pe.tuple(pe.Type.ID,n.id)},Issue:{label:"Issue",value:pe.tuple(pe.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:pe.tuple(pe.Type.URL,n.url)},Severity:{label:"Severity",value:pe.tuple(pe.Type.NO_HINT,n.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:pe.tuple(pe.Type.RANGE,n.vulnerable_versions)},"Tree Versions":{label:"Tree Versions",children:[...n.versions].sort(eve.default.compare).map(u=>({value:pe.tuple(pe.Type.REFERENCE,u)}))},Dependents:{label:"Dependents",children:qe.sortMap(n.dependents,u=>G.stringifyLocator(u)).map(u=>({value:pe.tuple(pe.Type.LOCATOR,u)}))}}};return r}function r5(t,e,{all:r,environment:o}){let a=[],n=r?t.workspaces:[e],u=["all","production"].includes(o),A=["all","development"].includes(o);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!A:!u)||a.push({workspace:p,dependency:h});return a}function n5(t,e,{recursive:r}){let o=new Map,a=new Set,n=[],u=(A,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");if(G.ensureDevirtualizedLocator(E).reference.startsWith("npm:")&&E.version!==null){let D=G.stringifyIdent(E),b=qe.getMapWithDefault(o,D);qe.getArrayWithDefault(b,E.version).push(A)}if(r)for(let D of E.dependencies.values())n.push([E,D])};for(let{workspace:A,dependency:p}of e)n.push([A.anchoredLocator,p]);for(;n.length>0;){let[A,p]=n.shift();u(A,p)}return o}var zC=class extends ut{constructor(){super(...arguments);this.all=de.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=de.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=de.String("--environment","all",{description:"Which environments to cover",validator:js(Jv)});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.noDeprecations=de.Boolean("--no-deprecations",!1,{description:"Don't warn about deprecated packages"});this.severity=de.String("--severity","info",{description:"Minimal severity requested for packages to be displayed",validator:js(zv)});this.excludes=de.Array("--exclude",[],{description:"Array of glob patterns of packages to exclude from audit"});this.ignores=de.Array("--ignore",[],{description:"Array of glob patterns of advisory ID's to ignore in the audit report"})}static{this.paths=[["npm","audit"]]}static{this.usage=ot.Usage({descript
Line truncated
|
`;try{a=await ae.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var e5={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},rve={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},Evt={configuration:{...e5,...rve,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...e5,...rve}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:uc,valueDefinition:{description:"",type:"SHAPE",properties:{...e5}}}},fetchers:[bv,np],resolvers:[Qv,kv,Fv]},Cvt=Evt;var u5={};Kt(u5,{NpmAuditCommand:()=>ZC,NpmInfoCommand:()=>$C,NpmLoginCommand:()=>eI,NpmLogoutCommand:()=>rI,NpmPublishCommand:()=>nI,NpmTagAddCommand:()=>sI,NpmTagListCommand:()=>iI,NpmTagRemoveCommand:()=>oI,NpmWhoamiCommand:()=>aI,default:()=>Svt,npmAuditTypes:()=>Xv,npmAuditUtils:()=>bF});Ve();Ve();Gt();var o5=et(Xo());il();var Xv={};Kt(Xv,{Environment:()=>zv,Severity:()=>Jv});var zv=(o=>(o.All="all",o.Production="production",o.Development="development",o))(zv||{}),Jv=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Jv||{});var bF={};Kt(bF,{allSeverities:()=>XC,getPackages:()=>s5,getReportTree:()=>n5,getSeverityInclusions:()=>r5,getTopLevelDependencies:()=>i5});Ve();var nve=et(ni());var XC=["info","low","moderate","high","critical"];function r5(t){if(typeof t>"u")return new Set(XC);let e=XC.indexOf(t),r=XC.slice(e);return new Set(r)}function n5(t){let e={},r={children:e};for(let[o,a]of qe.sortMap(Object.entries(t),n=>n[0]))for(let n of qe.sortMap(a,u=>`${u.id}`))e[`${o}/${n.id}`]={value:fe.tuple(fe.Type.IDENT,G.parseIdent(o)),children:{ID:typeof n.id<"u"&&{label:"ID",value:fe.tuple(fe.Type.ID,n.id)},Issue:{label:"Issue",value:fe.tuple(fe.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:fe.tuple(fe.Type.URL,n.url)},Severity:{label:"Severity",value:fe.tuple(fe.Type.NO_HINT,n.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:fe.tuple(fe.Type.RANGE,n.vulnerable_versions)},"Tree Versions":{label:"Tree Versions",children:[...n.versions].sort(nve.default.compare).map(u=>({value:fe.tuple(fe.Type.REFERENCE,u)}))},Dependents:{label:"Dependents",children:qe.sortMap(n.dependents,u=>G.stringifyLocator(u)).map(u=>({value:fe.tuple(fe.Type.LOCATOR,u)}))}}};return r}function i5(t,e,{all:r,environment:o}){let a=[],n=r?t.workspaces:[e],u=["all","production"].includes(o),A=["all","development"].includes(o);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!A:!u)||a.push({workspace:p,dependency:h});return a}function s5(t,e,{recursive:r}){let o=new Map,a=new Set,n=[],u=(A,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");if(G.ensureDevirtualizedLocator(E).reference.startsWith("npm:")&&E.version!==null){let D=G.stringifyIdent(E),b=qe.getMapWithDefault(o,D);qe.getArrayWithDefault(b,E.version).push(A)}if(r)for(let D of E.dependencies.values())n.push([E,D])};for(let{workspace:A,dependency:p}of e)n.push([A.anchoredLocator,p]);for(;n.length>0;){let[A,p]=n.shift();u(A,p)}return o}var ZC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=ge.String("--environment","all",{description:"Which environments to cover",validator:js(zv)});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.noDeprecations=ge.Boolean("--no-deprecations",!1,{description:"Don't warn about deprecated packages"});this.severity=ge.String("--severity","info",{description:"Minimal severity requested for packages to be displayed",validator:js(Jv)});this.excludes=ge.Array("--exclude",[],{description:"Array of glob patterns of packages to exclude from audit"});this.ignores=ge.Array("--ignore",[],{description:"Array of glob patterns of advisory ID's to ignore in the audit report"})}static{this.paths=[["npm","audit"]]}static{this.usage=ot.Usage({descript
Line truncated
|
||||||
This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
|
This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
|
||||||
|
|
||||||
For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
|
For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
|
||||||
|
|
||||||
Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${JC.map(r=>`\`${r}\``).join(", ")}.
|
Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${XC.map(r=>`\`${r}\``).join(", ")}.
|
||||||
|
|
||||||
If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
|
If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
|
||||||
|
|
||||||
@@ -701,32 +701,32 @@ ${ke.map(He=>`Not found: ${pu(He)}
|
|||||||
If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
|
If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
|
||||||
|
|
||||||
To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why package\` to get more information as to who depends on them.
|
To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why package\` to get more information as to who depends on them.
|
||||||
`,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState();let n=r5(o,a,{all:this.all,environment:this.environment}),u=n5(o,n,{recursive:this.recursive}),A=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[N,U]of u)A.some(J=>i5.default.isMatch(N,J))||(p[N]=[...U.keys()]);let h=si.getAuditRegistry({configuration:r}),E,w=await pA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=en.post("/-/npm/v1/security/advisories/bulk",p,{authType:en.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([te,le])=>{let ce=await en.getPackageMetadata(G.parseIdent(te),{project:o});return qe.mapAndFilter(le,ue=>{let{deprecated:Ie}=ce.versions[ue];return Ie?[te,ue,Ie]:qe.mapAndFilter.skip})})),J=await N;for(let[te,le,ce]of U.flat(1))Object.hasOwn(J,te)&&J[te].some(ue=>Ur.satisfiesWithPrereleases(le,ue.vulnerable_versions))||(J[te]??=[],J[te].push({id:`${te} (deprecation)`,title:ce.trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:le}));E=J});if(w.hasErrors())return w.exitCode();let D=e5(this.severity),b=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),C=Object.create(null);for(let[N,U]of Object.entries(E)){let J=U.filter(te=>!i5.default.isMatch(`${te.id}`,b)&&D.has(te.severity));J.length>0&&(C[N]=J.map(te=>{let le=u.get(N);if(typeof le>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let ce=[...le.keys()].filter(Ie=>Ur.satisfiesWithPrereleases(Ie,te.vulnerable_versions)),ue=new Map;for(let Ie of ce)for(let he of le.get(Ie))ue.set(he.locatorHash,he);return{...te,versions:ce,dependents:[...ue.values()]}}))}let T=Object.keys(C).length>0;return T?(As.emitTree(t5(C),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Lt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportInfo(1,"No audit suggestions")}),T?1:0)}};Ve();Ve();St();Gt();var s5=et(ni()),o5=ve("util"),XC=class extends ut{constructor(){super(...arguments);this.fields=de.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=de.Rest()}static{this.paths=[["npm","info"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Sh
Line truncated
|
`,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState();let n=i5(o,a,{all:this.all,environment:this.environment}),u=s5(o,n,{recursive:this.recursive}),A=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[L,U]of u)A.some(z=>o5.default.isMatch(L,z))||(p[L]=[...U.keys()]);let h=si.getAuditRegistry({configuration:r}),E,w=await pA.start({configuration:r,stdout:this.context.stdout},async()=>{let L=en.post("/-/npm/v1/security/advisories/bulk",p,{authType:en.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([te,le])=>{let de=await en.getPackageMetadata(G.parseIdent(te),{project:o});return qe.mapAndFilter(le,ce=>{let{deprecated:me}=de.versions[ce];return me?[te,ce,me]:qe.mapAndFilter.skip})})),z=await L;for(let[te,le,de]of U.flat(1))Object.hasOwn(z,te)&&z[te].some(ce=>Ur.satisfiesWithPrereleases(le,ce.vulnerable_versions))||(z[te]??=[],z[te].push({id:`${te} (deprecation)`,title:(typeof de=="string"?de:"").trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:le}));E=z});if(w.hasErrors())return w.exitCode();let D=r5(this.severity),b=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),C=Object.create(null);for(let[L,U]of Object.entries(E)){let z=U.filter(te=>!o5.default.isMatch(`${te.id}`,b)&&D.has(te.severity));z.length>0&&(C[L]=z.map(te=>{let le=u.get(L);if(typeof le>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let de=[...le.keys()].filter(me=>Ur.satisfiesWithPrereleases(me,te.vulnerable_versions)),ce=new Map;for(let me of de)for(let pe of le.get(me))ce.set(pe.locatorHash,pe);return{...te,versions:de,dependents:[...ce.values()]}}))}let T=Object.keys(C).length>0;return T?(As.emitTree(n5(C),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Nt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async L=>{L.reportInfo(1,"No audit suggestions")}),T?1:0)}};Ve();Ve();Pt();Gt();var a5=et(ni()),l5=De("util"),$C=class extends ut{constructor(){super(...arguments);this.fields=ge.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=ge.Rest()}static{this.paths=[["npm","info"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react
Line truncated
|
||||||
`),this.context.stdout.write(`${(0,o5.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
|
`),this.context.stdout.write(`${(0,l5.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
|
||||||
`);return A.exitCode()}};function a5(t){if(Array.isArray(t)){let e=[];for(let r of t)r=a5(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let o=a5(t[r]);o&&(e[r]=o)}return e}else return t||null}Ve();Ve();Gt();var tve=et(Q2()),ZC=class extends ut{constructor(){super(...arguments);this.scope=de.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=de.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=de.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}static{this.paths=[["npm","login"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),o=await bF({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Lt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await Ivt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=await Evt(o,u,r);return await Cvt(o,A,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};async function bF({scope:t,publish:e,configuration:r,cwd:o}){return t&&e?si.getScopeRegistry(t,{configuration:r,type:si.RegistryType.PUBLISH_REGISTRY}):t?si.getScopeRegistry(t,{configuration:r}):e?si.getPublishRegistry((await aE(r,o)).manifest,{configuration:r}):si.getDefaultRegistry({configuration:r})}async function Evt(t,e,r){let o=`/-/user/org.couchdb.user:${encodeURIComponent(e.name)}`,a={_id:`org.couchdb.user:${e.name}`,name:e.name,password:e.password,type:"user",roles:[],date:new Date().toISOString()},n={attemptedAs:e.name,configuration:r,registry:t,jsonResponse:!0,authType:en.AuthType.NO_AUTH};try{return(await en.put(o,a,n)).token}catch(E){if(!(E.originalError?.name==="HTTPError"&&E.originalError?.response.statusCode===409))throw E}let u={...n,authType:en.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${e.name}:${e.password}`).toString("base64")}`}},A=await en.get(o,u);for(let[E,w]of Object.entries(A))(!a[E]||E==="roles")&&(a[E]=w);let p=`${o}/-rev/${a._rev}`;return(await en.put(p,a,u)).token}async function Cvt(t,e,{alwaysAuth:r,scope:o}){let a=u=>A=>{let p=qe.isIndexableObject(A)?A:{},h=p[u],E=qe.isIndexableObject(h)?h:{};return{...p,[u]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=o?{npmScopes:a(o)}:{npmRegistries:a(t)};return await ze.updateHomeConfiguration(n)}async function Ivt({configuration:t,registry:e,report:r,stdin:o,stdout:a}){r.reportInfo(0,`Logging in to ${pe.pretty(t,e,pe.Type.URL)}`);let n=!1;if(e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(0,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||"",password:t.env.YARN_INJECT_NPM_PASSWORD||""};let u=await(0,tve.prompt)([{type:"input",name:"name",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a}]);return r.reportSeparator(),u}Ve();Ve();Gt();var $C=new Set(["npmAuthIdent","npmAuthToken"]),eI=class extends ut{constructor(){super(...arguments);this.scope=de.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=de.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=de.Boolean("-A,--all",!1,{description:"Logout of all registries"})}static{this.paths=[["npm","logout"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\Line truncated
|
`);return A.exitCode()}};function c5(t){if(Array.isArray(t)){let e=[];for(let r of t)r=c5(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let o=c5(t[r]);o&&(e[r]=o)}return e}else return t||null}Ve();Ve();Gt();var ive=et(k2()),eI=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=ge.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}static{this.paths=[["npm","login"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o=await QF({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Nt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await Bvt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=await Ivt(o,u,r);return await wvt(o,A,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};async function QF({scope:t,publish:e,configuration:r,cwd:o}){return t&&e?si.getScopeRegistry(t,{configuration:r,type:si.RegistryType.PUBLISH_REGISTRY}):t?si.getScopeRegistry(t,{configuration:r}):e?si.getPublishRegistry((await cE(r,o)).manifest,{configuration:r}):si.getDefaultRegistry({configuration:r})}async function Ivt(t,e,r){let o=`/-/user/org.couchdb.user:${encodeURIComponent(e.name)}`,a={_id:`org.couchdb.user:${e.name}`,name:e.name,password:e.password,type:"user",roles:[],date:new Date().toISOString()},n={attemptedAs:e.name,configuration:r,registry:t,jsonResponse:!0,authType:en.AuthType.NO_AUTH};try{return(await en.put(o,a,n)).token}catch(E){if(!(E.originalError?.name==="HTTPError"&&E.originalError?.response.statusCode===409))throw E}let u={...n,authType:en.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${e.name}:${e.password}`).toString("base64")}`}},A=await en.get(o,u);for(let[E,w]of Object.entries(A))(!a[E]||E==="roles")&&(a[E]=w);let p=`${o}/-rev/${a._rev}`;return(await en.put(p,a,u)).token}async function wvt(t,e,{alwaysAuth:r,scope:o}){let a=u=>A=>{let p=qe.isIndexableObject(A)?A:{},h=p[u],E=qe.isIndexableObject(h)?h:{};return{...p,[u]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=o?{npmScopes:a(o)}:{npmRegistries:a(t)};return await Je.updateHomeConfiguration(n)}async function Bvt({configuration:t,registry:e,report:r,stdin:o,stdout:a}){r.reportInfo(0,`Logging in to ${fe.pretty(t,e,fe.Type.URL)}`);let n=!1;if(e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(0,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||"",password:t.env.YARN_INJECT_NPM_PASSWORD||""};let u=await(0,ive.prompt)([{type:"input",name:"name",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a}]);return r.reportSeparator(),u}Ve();Ve();Gt();var tI=new Set(["npmAuthIdent","npmAuthToken"]),rI=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=ge.Boolean("-A,--all",!1,{description:"Logout of all registries"})}static{this.paths=[["npm","logout"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\Line truncated
|
||||||
This command will list all tags of a package from the npm registry.
|
This command will list all tags of a package from the npm registry.
|
||||||
|
|
||||||
If the package is not specified, Yarn will default to the current workspace.
|
If the package is not specified, Yarn will default to the current workspace.
|
||||||
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=G.parseIdent(this.package);else{if(!a)throw new or(o.cwd,this.context.cwd);if(!a.manifest.name)throw new it(`Missing 'name' field in ${Ae.fromPortablePath(V.join(a.cwd,mr.manifest))}`);n=a.manifest.name}let u=await Zv(n,r),p={children:qe.sortMap(Object.entries(u),([h])=>h).map(([h,E])=>({value:pe.tuple(pe.Type.RESOLUTION,{descriptor:G.makeDescriptor(n,h),locator:G.makeLocator(n,E)})}))};return As.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function Zv(t,e){let r=`/-/package${en.getIdentUrl(t)}/dist-tags`;return en.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:en.customPackageError})}var nI=class extends ut{constructor(){super(...arguments);this.package=de.String();this.tag=de.String()}static{this.paths=[["npm","tag","add"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
|
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=G.parseIdent(this.package);else{if(!a)throw new or(o.cwd,this.context.cwd);if(!a.manifest.name)throw new nt(`Missing 'name' field in ${ue.fromPortablePath(K.join(a.cwd,mr.manifest))}`);n=a.manifest.name}let u=await Zv(n,r),p={children:qe.sortMap(Object.entries(u),([h])=>h).map(([h,E])=>({value:fe.tuple(fe.Type.RESOLUTION,{descriptor:G.makeDescriptor(n,h),locator:G.makeLocator(n,E)})}))};return As.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function Zv(t,e){let r=`/-/package${en.getIdentUrl(t)}/dist-tags`;return en.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:en.customPackageError})}var sI=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[["npm","tag","add"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
|
||||||
This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
|
This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
|
||||||
`,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);let n=G.parseDescriptor(this.package,!0),u=n.range;if(!nve.default.valid(u))throw new it(`The range ${pe.pretty(r,n.range,pe.Type.RANGE)} must be a valid semver version`);let A=si.getPublishRegistry(a.manifest,{configuration:r}),p=pe.pretty(r,n,pe.Type.IDENT),h=pe.pretty(r,u,pe.Type.RANGE),E=pe.pretty(r,this.tag,pe.Type.CODE);return(await Lt.start({configuration:r,stdout:this.context.stdout},async D=>{let b=await Zv(n,r);Object.hasOwn(b,this.tag)&&b[this.tag]===u&&D.reportWarning(0,`Tag ${E} is already set to version ${h}`);let C=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.put(C,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),D.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ve();Gt();var iI=class extends ut{constructor(){super(...arguments);this.package=de.String();this.tag=de.String()}static{this.paths=[["npm","tag","remove"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
|
`,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);let n=G.parseDescriptor(this.package,!0),u=n.range;if(!ove.default.valid(u))throw new nt(`The range ${fe.pretty(r,n.range,fe.Type.RANGE)} must be a valid semver version`);let A=si.getPublishRegistry(a.manifest,{configuration:r}),p=fe.pretty(r,n,fe.Type.IDENT),h=fe.pretty(r,u,fe.Type.RANGE),E=fe.pretty(r,this.tag,fe.Type.CODE);return(await Nt.start({configuration:r,stdout:this.context.stdout},async D=>{let b=await Zv(n,r);Object.hasOwn(b,this.tag)&&b[this.tag]===u&&D.reportWarning(0,`Tag ${E} is already set to version ${h}`);let C=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.put(C,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),D.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ve();Gt();var oI=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[["npm","tag","remove"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
|
||||||
This command will remove a tag from a package from the npm registry.
|
This command will remove a tag from a package from the npm registry.
|
||||||
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]})}async execute(){if(this.tag==="latest")throw new it("The 'latest' tag cannot be removed.");let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);let n=G.parseIdent(this.package),u=si.getPublishRegistry(a.manifest,{configuration:r}),A=pe.pretty(r,this.tag,pe.Type.CODE),p=pe.pretty(r,n,pe.Type.IDENT),h=await Zv(n,r);if(!Object.hasOwn(h,this.tag))throw new it(`${A} is not a tag of package ${p}`);return(await Lt.start({configuration:r,stdout:this.context.stdout},async w=>{let D=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.del(D,{configuration:r,registry:u,ident:n,jsonResponse:!0}),w.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};Ve();Ve();Gt();var sI=class extends ut{constructor(){super(...arguments);this.scope=de.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=de.Boolean("--publish",!1,{description:"Print username for the publish registry"})}static{this.paths=[["npm","whoami"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=si.getScopeRegistry(this.scope,{configuration:r,type:si.RegistryType.PUBLISH_REGISTRY}):this.scope?o=si.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=si.getPublishRegistry((await aE(r,this.context.cwd)).manifest,{configuration:r}):o=si.getDefaultRegistry({configuration:r}),(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let u;try{u=await en.get("/-/whoami",{configuration:r,registry:o,authType:en.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?G.makeIdent(this.scope,""):void 0})}catch(A){if(A.response?.statusCode===401||A.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw A}n.reportInfo(0,u.username)})).exitCode()}};var vvt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[zC,XC,ZC,eI,tI,nI,rI,iI,sI]},Dvt=vvt;var g5={};Vt(g5,{PatchCommand:()=>AI,PatchCommitCommand:()=>uI,PatchFetcher:()=>nD,PatchResolver:()=>iD,default:()=>jvt,patchUtils:()=>Id});Ve();Ve();St();sA();var Id={};Vt(Id,{applyPatchFile:()=>QF,diffFolders:()=>p5,ensureUnpatchedDescriptor:()=>c5,ensureUnpatchedLocator:()=>RF,extractPackageToDisk:()=>f5,extractPatchFlags:()=>uve,isParentRequired:()=>A5,isPatchDescriptor:()=>FF,isPatchLocator:()=>i0,loadPatchFiles:()=>rD,makeDescriptor:()=>TF,makeLocator:()=>u5,makePatchHash:()=>h5,parseDescriptor:()=>eD,parseLocator:()=>tD,parsePatchFile:()=>$v,unpatchDescriptor:()=>_vt,unpatchLocator:()=>Hvt});Ve();St();Ve();St();var Svt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function oI(t){return V.relative(Bt.root,V.resolve(Bt.root,Ae.toPortablePath(t)))}function Pvt(t){let e=t.trim().match(Svt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var xvt=420,bvt=493;var ive=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),kvt=t=>({header:Pvt(t),parts:[]}),Qvt={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function Fvt(t){let e=[],r=ive(),o="parsing header",a=null,n=null;function u(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function A(){Line truncated
|
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]})}async execute(){if(this.tag==="latest")throw new nt("The 'latest' tag cannot be removed.");let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);let n=G.parseIdent(this.package),u=si.getPublishRegistry(a.manifest,{configuration:r}),A=fe.pretty(r,this.tag,fe.Type.CODE),p=fe.pretty(r,n,fe.Type.IDENT),h=await Zv(n,r);if(!Object.hasOwn(h,this.tag))throw new nt(`${A} is not a tag of package ${p}`);return(await Nt.start({configuration:r,stdout:this.context.stdout},async w=>{let D=`/-/package${en.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await en.del(D,{configuration:r,registry:u,ident:n,jsonResponse:!0}),w.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};Ve();Ve();Gt();var aI=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Print username for the publish registry"})}static{this.paths=[["npm","whoami"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=si.getScopeRegistry(this.scope,{configuration:r,type:si.RegistryType.PUBLISH_REGISTRY}):this.scope?o=si.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=si.getPublishRegistry((await cE(r,this.context.cwd)).manifest,{configuration:r}):o=si.getDefaultRegistry({configuration:r}),(await Nt.start({configuration:r,stdout:this.context.stdout},async n=>{let u;try{u=await en.get("/-/whoami",{configuration:r,registry:o,authType:en.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?G.makeIdent(this.scope,""):void 0})}catch(A){if(A.response?.statusCode===401||A.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw A}n.reportInfo(0,u.username)})).exitCode()}};var Pvt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[ZC,$C,eI,rI,nI,sI,iI,oI,aI]},Svt=Pvt;var m5={};Kt(m5,{PatchCommand:()=>pI,PatchCommitCommand:()=>fI,PatchFetcher:()=>nD,PatchResolver:()=>iD,default:()=>Wvt,patchUtils:()=>Bd});Ve();Ve();Pt();sA();var Bd={};Kt(Bd,{applyPatchFile:()=>FF,diffFolders:()=>g5,ensureUnpatchedDescriptor:()=>A5,ensureUnpatchedLocator:()=>TF,extractPackageToDisk:()=>h5,extractPatchFlags:()=>pve,isParentRequired:()=>p5,isPatchDescriptor:()=>RF,isPatchLocator:()=>o0,loadPatchFiles:()=>rD,makeDescriptor:()=>NF,makeLocator:()=>f5,makePatchHash:()=>d5,parseDescriptor:()=>eD,parseLocator:()=>tD,parsePatchFile:()=>$v,unpatchDescriptor:()=>qvt,unpatchLocator:()=>jvt});Ve();Pt();Ve();Pt();var xvt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function lI(t){return K.relative(Bt.root,K.resolve(Bt.root,ue.toPortablePath(t)))}function bvt(t){let e=t.trim().match(xvt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var Qvt=420,kvt=493;var ave=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),Fvt=t=>({header:bvt(t),parts:[]}),Rvt={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function Tvt(t){let e=[],r=ave(),o="parsing header",a=null,n=null;function u(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function A(){Line truncated
|
||||||
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
|
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
|
||||||
`):"";await e.mkdirpPromise(V.dirname(a.path),{chmod:493,utimes:[Si.SAFE_TIME,Si.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,Si.SAFE_TIME,Si.SAFE_TIME)}break;case"patch":await lI(e,a.path,async()=>{await Ovt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let u=(await e.statPromise(a.path)).mode;if(sve(a.newMode)!==sve(u))continue;await lI(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:qe.assertNever(a);break}}function sve(t){return(t&64)>0}function ove(t){return t.replace(/\s+$/,"")}function Nvt(t,e){return ove(t)===ove(e)}async function Ovt({hunks:t,path:e},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(e).mode,u=(await r.readFileSync(e,"utf8")).split(/\n/),A=[],p=0,h=0;for(let w of t){let D=Math.max(h,w.header.patched.start+p),b=Math.max(0,D-h),C=Math.max(0,u.length-D-w.header.original.length),T=Math.max(b,C),N=0,U=0,J=null;for(;N<=T;){if(N<=b&&(U=D-N,J=ave(w,u,U),J!==null)){N=-N;break}if(N<=C&&(U=D+N,J=ave(w,u,U),J!==null))break;N+=1}if(J===null)throw new aI(t.indexOf(w),w);A.push(J),p+=N,h=U+w.header.original.length}if(o)return;let E=0;for(let w of A)for(let D of w)switch(D.type){case"splice":{let b=D.index+E;u.splice(b,D.numToDelete,...D.linesToInsert),E+=D.linesToInsert.length-D.numToDelete}break;case"pop":u.pop();break;case"push":u.push(D.line);break;default:qe.assertNever(D);break}await r.writeFilePromise(e,u.join(`
|
`):"";await e.mkdirpPromise(K.dirname(a.path),{chmod:493,utimes:[Pi.SAFE_TIME,Pi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,Pi.SAFE_TIME,Pi.SAFE_TIME)}break;case"patch":await uI(e,a.path,async()=>{await Uvt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let u=(await e.statPromise(a.path)).mode;if(lve(a.newMode)!==lve(u))continue;await uI(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:qe.assertNever(a);break}}function lve(t){return(t&64)>0}function cve(t){return t.replace(/\s+$/,"")}function Mvt(t,e){return cve(t)===cve(e)}async function Uvt({hunks:t,path:e},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(e).mode,u=(await r.readFileSync(e,"utf8")).split(/\n/),A=[],p=0,h=0;for(let w of t){let D=Math.max(h,w.header.patched.start+p),b=Math.max(0,D-h),C=Math.max(0,u.length-D-w.header.original.length),T=Math.max(b,C),L=0,U=0,z=null;for(;L<=T;){if(L<=b&&(U=D-L,z=uve(w,u,U),z!==null)){L=-L;break}if(L<=C&&(U=D+L,z=uve(w,u,U),z!==null))break;L+=1}if(z===null)throw new cI(t.indexOf(w),w);A.push(z),p+=L,h=U+w.header.original.length}if(o)return;let E=0;for(let w of A)for(let D of w)switch(D.type){case"splice":{let b=D.index+E;u.splice(b,D.numToDelete,...D.linesToInsert),E+=D.linesToInsert.length-D.numToDelete}break;case"pop":u.pop();break;case"push":u.push(D.line);break;default:qe.assertNever(D);break}await r.writeFilePromise(e,u.join(`
|
||||||
`),{mode:a})}function ave(t,e,r){let o=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=e[r];if(u==null||!Nvt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:qe.assertNever(a.type);break}return o}var Uvt=/^builtin<([^>]+)>$/;function cI(t,e){let{protocol:r,source:o,selector:a,params:n}=G.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(E=>Ae.toPortablePath(E)):[],A=n&&typeof n.locator=="string"?G.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function FF(t){return t.range.startsWith("patch:")}function i0(t){return t.reference.startsWith("patch:")}function eD(t){let{sourceItem:e,...r}=cI(t.range,G.parseDescriptor);return{...r,sourceDescriptor:e}}function tD(t){let{sourceItem:e,...r}=cI(t.reference,G.parseLocator);return{...r,sourceLocator:e}}function _vt(t){let{sourceItem:e}=cI(t.range,G.parseDescriptor);return e}function Hvt(t){let{sourceItem:e}=cI(t.reference,G.parseLocator);return e}function c5(t){if(!FF(t))return t;let{sourceItem:e}=cI(t.range,G.parseDescriptor);return e}function RF(t){if(!i0(t))return t;let{sourceItem:e}=cI(t.reference,G.parseLocator);return e}function lve({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=t!==null?{locator:G.stringifyLocator(t)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return G.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...A,...p,...u}})}function TF(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return G.makeDescriptor(t,lve({parentLocator:e,sourceItem:r,patchPaths:o},G.stringifyDescriptor))}function u5(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return G.makeLocator(t,lve({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},G.stringifyLocator))}function cve({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(Uvt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):V.isAbsolute(a)?t(a):e(a)}function uve(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function A5(t){return cve({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function rD(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new En(Bt.root),prefixPath:V.relative(Bt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await qe.releaseAfterUseAsync(async()=>await Promise.all(e.map(async u=>{let A=uve(u),p=await cve({onAbsolute:async h=>await ae.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(V.join(a.prefixPath,h),"utf8")},onProject:async h=>await ae.readFilePromise(V.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,`
|
`),{mode:a})}function uve(t,e,r){let o=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=e[r];if(u==null||!Mvt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:qe.assertNever(a.type);break}return o}var Hvt=/^builtin<([^>]+)>$/;function AI(t,e){let{protocol:r,source:o,selector:a,params:n}=G.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(E=>ue.toPortablePath(E)):[],A=n&&typeof n.locator=="string"?G.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function RF(t){return t.range.startsWith("patch:")}function o0(t){return t.reference.startsWith("patch:")}function eD(t){let{sourceItem:e,...r}=AI(t.range,G.parseDescriptor);return{...r,sourceDescriptor:e}}function tD(t){let{sourceItem:e,...r}=AI(t.reference,G.parseLocator);return{...r,sourceLocator:e}}function qvt(t){let{sourceItem:e}=AI(t.range,G.parseDescriptor);return e}function jvt(t){let{sourceItem:e}=AI(t.reference,G.parseLocator);return e}function A5(t){if(!RF(t))return t;let{sourceItem:e}=AI(t.range,G.parseDescriptor);return e}function TF(t){if(!o0(t))return t;let{sourceItem:e}=AI(t.reference,G.parseLocator);return e}function Ave({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=t!==null?{locator:G.stringifyLocator(t)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return G.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...A,...p,...u}})}function NF(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return G.makeDescriptor(t,Ave({parentLocator:e,sourceItem:r,patchPaths:o},G.stringifyDescriptor))}function f5(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return G.makeLocator(t,Ave({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},G.stringifyLocator))}function fve({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(Hvt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):K.isAbsolute(a)?t(a):e(a)}function pve(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function p5(t){return fve({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function rD(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new En(Bt.root),prefixPath:K.relative(Bt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await qe.releaseAfterUseAsync(async()=>await Promise.all(e.map(async u=>{let A=pve(u),p=await fve({onAbsolute:async h=>await ae.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(K.join(a.prefixPath,h),"utf8")},onProject:async h=>await ae.readFilePromise(K.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,`
|
||||||
`));return n}async function f5(t,{cache:e,project:r}){let o=r.storedPackages.get(t.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=RF(t),n=r.storedChecksums,u=new Ri,A=await ae.mktempPromise(),p=V.join(A,"source"),h=V.join(A,"user"),E=V.join(A,".yarn-patch.json"),w=r.configuration.makeFetcher(),D=[];try{let b,C;if(t.locatorHash===a.locatorHash){let T=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u});D.push(()=>T.releaseFs?.()),b=T,C=T}else b=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u}),D.push(()=>b.releaseFs?.()),C=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u}),D.push(()=>C.releaseFs?.());await Promise.all([ae.copyPromise(p,b.prefixPath,{baseFs:b.packageFs}),ae.copyPromise(h,C.prefixPath,{baseFs:C.packageFs}),ae.writeJsonPromise(E,{locator:G.stringifyLocator(t),version:o.version})])}finally{for(let b of D)b()}return ae.detachTemp(A),h}async function p5(t,e){let r=Ae.fromPortablePath(t).replace(/\\/g,"/"),o=Ae.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Hr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,o],{cwd:Ae.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
|
`));return n}async function h5(t,{cache:e,project:r}){let o=r.storedPackages.get(t.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=TF(t),n=r.storedChecksums,u=new Ri,A=await ae.mktempPromise(),p=K.join(A,"source"),h=K.join(A,"user"),E=K.join(A,".yarn-patch.json"),w=r.configuration.makeFetcher(),D=[];try{let b,C;if(t.locatorHash===a.locatorHash){let T=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u});D.push(()=>T.releaseFs?.()),b=T,C=T}else b=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u}),D.push(()=>b.releaseFs?.()),C=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u}),D.push(()=>C.releaseFs?.());await Promise.all([ae.copyPromise(p,b.prefixPath,{baseFs:b.packageFs}),ae.copyPromise(h,C.prefixPath,{baseFs:C.packageFs}),ae.writeJsonPromise(E,{locator:G.stringifyLocator(t),version:o.version})])}finally{for(let b of D)b()}return ae.detachTemp(A),h}async function g5(t,e){let r=ue.fromPortablePath(t).replace(/\\/g,"/"),o=ue.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Hr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,o],{cwd:ue.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
|
||||||
The following error was reported by 'git':
|
The following error was reported by 'git':
|
||||||
${n}`);let u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${qe.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${qe.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(qe.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(qe.escapeRegExp(`${o}/`),"g"),"")}function h5(t,e){let r=[];for(let{source:o}of t){if(o===null)continue;let a=$v(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&e!==null&&!Ur.satisfiesWithPrereleases(e,u)||r.push(JSON.stringify(A))}}return bn.makeHash(`${3}`,...r).slice(0,6)}Ve();function Ave(t,{configuration:e,report:r}){for(let o of t.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,` ${pe.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${pe.pretty(e,a,pe.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${pe.pretty(e,a,pe.Type.ADDED)}`);break;default:qe.assertNever(o.type)}}var nD=class{supports(e,r){return!!i0(e)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=tD(e),A=await rD(o,u,r),p=await ae.mktempPromise(),h=V.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),w=G.getIdentVendorPath(e),D=new Zi(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await qe.releaseAfterUseAsync(async()=>{await D.copyPromise(w,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),D.saveAndClose();for(let{source:b,optional:C}of A){if(b===null)continue;let T=new Zi(h,{level:r.project.configuration.get("compressionLevel")}),N=new En(V.resolve(Bt.root,w),{baseFs:T});try{await QF($v(b),{baseFs:N,version:n})}catch(U){if(!(U instanceof aI))throw U;let J=r.project.configuration.get("enableInlineHunks"),te=!J&&!C?" (set enableInlineHunks for details)":"",le=`${G.prettyLocator(r.project.configuration,e)}: ${U.message}${te}`,ce=ue=>{J&&Ave(U.hunk,{configuration:r.project.configuration,report:ue})};if(T.discardAndClose(),C){r.report.reportWarningOnce(66,le,{reportExtra:ce});continue}else throw new Jt(66,le,ce)}T.saveAndClose()}return new Zi(h,{level:r.project.configuration.get("compressionLevel")})}};Ve();var iD=class{supportsDescriptor(e,r){return!!FF(e)}supportsLocator(e,r){return!!i0(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=eD(e);return a.every(n=>!A5(n))?e:G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=eD(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=eD(e),u=await rD(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=h5(u,A.version);return[u5(e,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:o}=tD(e);return{...await r.resolver.resolve(o,r),...e}}};Ve();St();Gt();var uI=class extends ut{constructor(){super(...arguments);this.save=de.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=de.String()}static{this.paths=[["patch-commit"]]}static{this.usage=ot.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState();let n=V.resolve(this.context.cwd,Ae.toPortablePath(this.patchFolder)),u=V.join(n,"../source"),A=V.join(n,"../.yarn-patch.json");if(!ae.existsSLine truncated
|
${n}`);let u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${qe.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${qe.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(qe.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(qe.escapeRegExp(`${o}/`),"g"),"")}function d5(t,e){let r=[];for(let{source:o}of t){if(o===null)continue;let a=$v(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&e!==null&&!Ur.satisfiesWithPrereleases(e,u)||r.push(JSON.stringify(A))}}return bn.makeHash(`${3}`,...r).slice(0,6)}Ve();function hve(t,{configuration:e,report:r}){for(let o of t.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,` ${fe.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${fe.pretty(e,a,fe.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${fe.pretty(e,a,fe.Type.ADDED)}`);break;default:qe.assertNever(o.type)}}var nD=class{supports(e,r){return!!o0(e)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=tD(e),A=await rD(o,u,r),p=await ae.mktempPromise(),h=K.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),w=G.getIdentVendorPath(e),D=new Zi(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await qe.releaseAfterUseAsync(async()=>{await D.copyPromise(w,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),D.saveAndClose();for(let{source:b,optional:C}of A){if(b===null)continue;let T=new Zi(h,{level:r.project.configuration.get("compressionLevel")}),L=new En(K.resolve(Bt.root,w),{baseFs:T});try{await FF($v(b),{baseFs:L,version:n})}catch(U){if(!(U instanceof cI))throw U;let z=r.project.configuration.get("enableInlineHunks"),te=!z&&!C?" (set enableInlineHunks for details)":"",le=`${G.prettyLocator(r.project.configuration,e)}: ${U.message}${te}`,de=ce=>{z&&hve(U.hunk,{configuration:r.project.configuration,report:ce})};if(T.discardAndClose(),C){r.report.reportWarningOnce(66,le,{reportExtra:de});continue}else throw new zt(66,le,de)}T.saveAndClose()}return new Zi(h,{level:r.project.configuration.get("compressionLevel")})}};Ve();var iD=class{supportsDescriptor(e,r){return!!RF(e)}supportsLocator(e,r){return!!o0(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=eD(e);return a.every(n=>!p5(n))?e:G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=eD(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=eD(e),u=await rD(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=d5(u,A.version);return[f5(e,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:o}=tD(e);return{...await r.resolver.resolve(o,r),...e}}};Ve();Pt();Gt();var fI=class extends ut{constructor(){super(...arguments);this.save=ge.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=ge.String()}static{this.paths=[["patch-commit"]]}static{this.usage=ot.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState();let n=K.resolve(this.context.cwd,ue.toPortablePath(this.patchFolder)),u=K.join(n,"../source"),A=K.join(n,"../.yarn-patch.json");if(!ae.existsSLine truncated
|
||||||
${A.map(p=>`
|
${A.map(p=>`
|
||||||
- ${G.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new it("No package found in the project for the given locator");await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=RF(u),h=await f5(u,{cache:n,project:o});A.reportJson({locator:G.stringifyLocator(p),path:Ae.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${G.prettyLocator(r,p)} got extracted with success${E}!`),A.reportInfo(0,`You can now edit the following folder: ${pe.pretty(r,Ae.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${pe.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${Ae.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};var qvt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[uI,AI],fetchers:[nD],resolvers:[iD]},jvt=qvt;var y5={};Vt(y5,{PnpmLinker:()=>sD,default:()=>Kvt});Ve();St();Gt();var sD=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new it(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new it(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new it(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let u=e,A=e;do{A=u,u=V.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(e){return new d5(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},d5=class{constructor(e){this.opts=e;this.asyncActions=new qe.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=$D(ae,{indexPath:V.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,o){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,o);case"HARD":return this.installPackageHard(e,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,o){let a=V.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?V.join(a,mr.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,o){let a=Gvt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,G.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),o.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await ae.mkdirPromise(n,{recursive:!0}),await ae.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let A=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e,p={manifest:await _t.tryFind(r.prefixPath,{baseFs:r.packageFs})??new _t,misc:{hasBindingGyp:CA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(A,e.version),E=CA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!fve(e,{project:this.opts.project}))return;let o=this.customData.pathsByLocator.get(e.locatorHash);if(typeof o>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(e)})`);let{dependenciesLocation:a}=o;a&&this.asyncActions.reduce(e.locatorHash,async n=>{await ae.mkdirPromise(a,{recursive:!0});let u=await Wvt(a),A=new Map(u),p=[n],h=(w,D)=>{let b=D;fve(D,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),b=G.devirtualizeLocator(D));let C=this.customData.pathsByLocator.get(b.locatorHash);if(typeof C>"Line truncated
|
- ${G.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new nt("No package found in the project for the given locator");await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=TF(u),h=await h5(u,{cache:n,project:o});A.reportJson({locator:G.stringifyLocator(p),path:ue.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${G.prettyLocator(r,p)} got extracted with success${E}!`),A.reportInfo(0,`You can now edit the following folder: ${fe.pretty(r,ue.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${fe.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${ue.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};var Gvt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[fI,pI],fetchers:[nD],resolvers:[iD]},Wvt=Gvt;var C5={};Kt(C5,{PnpmLinker:()=>sD,default:()=>Xvt});Ve();Pt();Gt();var sD=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new nt(`The project in ${fe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,fe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new nt(`The project in ${fe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,fe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let u=e,A=e;do{A=u,u=K.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(e){return new y5(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},y5=class{constructor(e){this.opts=e;this.asyncActions=new qe.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=$D(ae,{indexPath:K.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,o){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,o);case"HARD":return this.installPackageHard(e,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,o){let a=K.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?K.join(a,mr.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,o){let a=Kvt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,G.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),o.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await ae.mkdirPromise(n,{recursive:!0}),await ae.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let A=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e,p={manifest:await _t.tryFind(r.prefixPath,{baseFs:r.packageFs})??new _t,misc:{hasBindingGyp:CA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(A,e.version),E=CA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!gve(e,{project:this.opts.project}))return;let o=this.customData.pathsByLocator.get(e.locatorHash);if(typeof o>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(e)})`);let{dependenciesLocation:a}=o;a&&this.asyncActions.reduce(e.locatorHash,async n=>{await ae.mkdirPromise(a,{recursive:!0});let u=await Vvt(a),A=new Map(u),p=[n],h=(w,D)=>{let b=D;gve(D,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),b=G.devirtualizeLocator(D));let C=this.customData.pathsByLocator.get(b.locatorHash);if(typeof C>"Line truncated
|
||||||
|
|
||||||
${zvt}
|
${$vt}
|
||||||
`,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>Ae.fromPortablePath(o.path));await Hr.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var tDt=[mve],fI=class extends ut{constructor(){super(...arguments);this.commit=de.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=de.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=de.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=de.Boolean("-u,--update",!1,{hidden:!0})}static{this.paths=[["stage"]]}static{this.usage=ot.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o}=await Qt.find(r,this.context.cwd),{driver:a,root:n}=await rDt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(w=>w.populateYarnPaths,o,w=>{u.push(w)});let A=new Set;for(let w of u)for(let D of nDt(n,w))A.add(D);let p=new Set([r.get("rcFilename"),mr.lockfile,mr.manifest]),h=await a.filterChanges(n,A,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}
|
`,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>ue.fromPortablePath(o.path));await Hr.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var iDt=[Eve],hI=class extends ut{constructor(){super(...arguments);this.commit=ge.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=ge.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=ge.Boolean("-u,--update",!1,{hidden:!0})}static{this.paths=[["stage"]]}static{this.usage=ot.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o}=await kt.find(r,this.context.cwd),{driver:a,root:n}=await sDt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(w=>w.populateYarnPaths,o,w=>{u.push(w)});let A=new Set;for(let w of u)for(let D of oDt(n,w))A.add(D);let p=new Set([r.get("rcFilename"),mr.lockfile,mr.manifest]),h=await a.filterChanges(n,A,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}
|
||||||
`);else for(let w of h)this.context.stdout.write(`${Ae.fromPortablePath(w.path)}
|
`);else for(let w of h)this.context.stdout.write(`${ue.fromPortablePath(w.path)}
|
||||||
`);else if(this.reset){let w=await a.filterChanges(n,A,p,{staged:!0});w.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,w)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function rDt(t){let e=null,r=null;for(let o of tDt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new it("No stage driver has been found for your current project");return{driver:e,root:r}}function nDt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let o;try{o=ae.statSync(e)}catch{break}if(o.isSymbolicLink())e=V.resolve(V.dirname(e),ae.readlinkSync(e));else break}return r}var iDt={commands:[fI]},sDt=iDt;var S5={};Vt(S5,{default:()=>pDt});Ve();Ve();St();var Cve=et(ni());Ve();var yve=et(N6()),oDt="e8e1bd300d860104bb8c58453ffa1eb4",aDt="OFCNCOG2CU",Eve=async(t,e)=>{let r=G.stringifyIdent(t),a=lDt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},lDt=t=>(0,yve.default)(aDt,oDt,{requester:{async send(r){try{let o=await on.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var Ive=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,cDt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(ae.existsSync(V.join(t.cwd,"tsconfig.json"))||ae.existsSync(V.join(a.cwd,"tsconfig.json")))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new Ri};if(!await Eve(r,n))return;let E=Ive(r),w=G.parseRange(r.range).selector;if(!Ur.validRange(w)){let N=n.normalizeDependency(r),U=await A.getCandidates(N,{},p);w=G.parseRange(U[0].reference).selector}let D=Cve.default.coerce(w);if(D===null)return;let b=`${nu.Modifier.CARET}${D.major}`,C=G.makeDescriptor(G.makeIdent("types",E),b),T=qe.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,J=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&J!==r.descriptorHash)return qe.mapAndFind.skip;let te=[];for(let le of _t.allDependencies){let ce=N.manifest[le].get(C.identHash);typeof ce>"u"||te.push([le,ce])}return te.length===0?qe.mapAndFind.skip:te});if(typeof T<"u")for(let[N,U]of T)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(C);if((await A.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[nu.Target.DEVELOPMENT].set(C.identHash,C)}},uDt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??(ae.existsSync(V.join(t.cwd,"tsconfig.json"))||ae.existsSync(V.join(o.cwd,"tsconfig.json")))))return;let u=Ive(r),A=G.makeIdent("types",u);for(let p of _t.allDependencies)typeof t.manifest[p].get(A.identHash)>"u"||t.manifest[p].delete(A.identHash)},ADt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},fDt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:cDt,afterWorkspaceDependencyRemoval:uDt,beforeWorkspacePacking:ADt}},pDt=fDt;var Q5={};Vt(Q5,{VersionApplyCommand:()=>mI,VersionCheckCommand:()=>yI,VersionCommand:()=>EI,default:()=>FDt,versionUtils:()=>dI});Ve();Ve();Gt();var dI={};Vt(dI,{Decision:()=>hI,applyPrerelease:()=>Pve,applyReleases:()=>k5,applyStrategy:()=>MF,clearVersionFiles:()=>P5,getUndecidedDependentWorkspaces:()=>aD,getUndecidedWorkspaces:()=>OF,openVersionFile:()=>gI,requireMoreDecisions:()=>bDt,resolveVersionFiles:()=>oD,suggestStrategy:()=>b5,updateVersionFiles:()=>x5,validateReleaseDecision:()=>pI});Ve();St();Ol();Gt();var Sve=et(Dve()),SA=et(ni()),xDt=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,hI=(u=>(u.UNDECIDED="undecided",u.DECLINE="decline",u.MAJOR="major",u.MINOR="minor",u.PATCH="patch",u.PRERELEASE="prerelease",u))(hI||{});function pI(t){let e=SA.default.valid(t);return e||qe.validateEnum((0,Sve.default)(hI,"UNDECIDED"),t)}async function oD(t,{prerelease:e=null}={}){let r=new Map,o=t.configuration.get("deferredVersionFolder");if(!ae.existsSync(o))return r;let a=await ae.readdirPromise(o);for(let n of a){if(!n.endsWith(".yml"))continue;let u=V.join(o,n),A=await ae.readFilePromise(u,"utf8"),p=Vi(A);for(let[h,E]of Object.entries(p.releases||{})){if(E==="decline")continue;let w=G.parseIdent(h),D=t.tryWorkspaceByIdent(w);if(D===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspacesLine truncated
|
`);else if(this.reset){let w=await a.filterChanges(n,A,p,{staged:!0});w.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,w)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function sDt(t){let e=null,r=null;for(let o of iDt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new nt("No stage driver has been found for your current project");return{driver:e,root:r}}function oDt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let o;try{o=ae.statSync(e)}catch{break}if(o.isSymbolicLink())e=K.resolve(K.dirname(e),ae.readlinkSync(e));else break}return r}var aDt={commands:[hI]},lDt=aDt;var x5={};Kt(x5,{default:()=>dDt});Ve();Ve();Pt();var wve=et(ni());Ve();var Cve=et(M6()),cDt="e8e1bd300d860104bb8c58453ffa1eb4",uDt="OFCNCOG2CU",Ive=async(t,e)=>{let r=G.stringifyIdent(t),a=ADt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},ADt=t=>(0,Cve.default)(uDt,cDt,{requester:{async send(r){try{let o=await on.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var Bve=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,fDt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(ae.existsSync(K.join(t.cwd,"tsconfig.json"))||ae.existsSync(K.join(a.cwd,"tsconfig.json")))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new Ri};if(!await Ive(r,n))return;let E=Bve(r),w=G.parseRange(r.range).selector;if(!Ur.validRange(w)){let L=n.normalizeDependency(r),U=await A.getCandidates(L,{},p);w=G.parseRange(U[0].reference).selector}let D=wve.default.coerce(w);if(D===null)return;let b=`${nu.Modifier.CARET}${D.major}`,C=G.makeDescriptor(G.makeIdent("types",E),b),T=qe.mapAndFind(a.workspaces,L=>{let U=L.manifest.dependencies.get(r.identHash)?.descriptorHash,z=L.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&z!==r.descriptorHash)return qe.mapAndFind.skip;let te=[];for(let le of _t.allDependencies){let de=L.manifest[le].get(C.identHash);typeof de>"u"||te.push([le,de])}return te.length===0?qe.mapAndFind.skip:te});if(typeof T<"u")for(let[L,U]of T)t.manifest[L].set(U.identHash,U);else{try{let L=n.normalizeDependency(C);if((await A.getCandidates(L,{},p)).length===0)return}catch{return}t.manifest[nu.Target.DEVELOPMENT].set(C.identHash,C)}},pDt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??(ae.existsSync(K.join(t.cwd,"tsconfig.json"))||ae.existsSync(K.join(o.cwd,"tsconfig.json")))))return;let u=Bve(r),A=G.makeIdent("types",u);for(let p of _t.allDependencies)typeof t.manifest[p].get(A.identHash)>"u"||t.manifest[p].delete(A.identHash)},hDt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},gDt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:fDt,afterWorkspaceDependencyRemoval:pDt,beforeWorkspacePacking:hDt}},dDt=gDt;var R5={};Kt(R5,{VersionApplyCommand:()=>EI,VersionCheckCommand:()=>CI,VersionCommand:()=>II,default:()=>NDt,versionUtils:()=>yI});Ve();Ve();Gt();var yI={};Kt(yI,{Decision:()=>dI,applyPrerelease:()=>bve,applyReleases:()=>F5,applyStrategy:()=>UF,clearVersionFiles:()=>b5,getUndecidedDependentWorkspaces:()=>aD,getUndecidedWorkspaces:()=>MF,openVersionFile:()=>mI,requireMoreDecisions:()=>FDt,resolveVersionFiles:()=>oD,suggestStrategy:()=>k5,updateVersionFiles:()=>Q5,validateReleaseDecision:()=>gI});Ve();Pt();Ol();Gt();var xve=et(Sve()),PA=et(ni()),kDt=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,dI=(u=>(u.UNDECIDED="undecided",u.DECLINE="decline",u.MAJOR="major",u.MINOR="minor",u.PATCH="patch",u.PRERELEASE="prerelease",u))(dI||{});function gI(t){let e=PA.default.valid(t);return e||qe.validateEnum((0,xve.default)(dI,"UNDECIDED"),t)}async function oD(t,{prerelease:e=null}={}){let r=new Map,o=t.configuration.get("deferredVersionFolder");if(!ae.existsSync(o))return r;let a=await ae.readdirPromise(o);for(let n of a){if(!n.endsWith(".yml"))continue;let u=K.join(o,n),A=await ae.readFilePromise(u,"utf8"),p=Ki(A);for(let[h,E]of Object.entries(p.releases||{})){if(E==="decline")continue;let w=G.parseIdent(h),D=t.tryWorkspaceByIdent(w);if(D===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspacesLine truncated
|
||||||
- ${A.map(b=>Ae.fromPortablePath(b)).join(`
|
- ${A.map(b=>ue.fromPortablePath(b)).join(`
|
||||||
- `)}`);let p=new Set(qe.mapAndFilter(n,b=>{let C=t.tryWorkspaceByFilePath(b);return C===null?qe.mapAndFilter.skip:C}));if(A.length===0&&p.size===0&&!e)return null;let h=A.length===1?A[0]:V.join(u,`${bn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=ae.existsSync(h)?await ae.readFilePromise(h,"utf8"):"{}",w=Vi(E),D=new Map;for(let b of w.declined||[]){let C=G.parseIdent(b),T=t.getWorkspaceByIdent(C);D.set(T,"decline")}for(let[b,C]of Object.entries(w.releases||{})){let T=G.parseIdent(b),N=t.getWorkspaceByIdent(T);D.set(N,pI(C))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(b=>b.manifest.version!==null)),releases:D,async saveAll(){let b={},C=[],T=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=G.stringifyIdent(N.anchoredLocator),J=D.get(N);J==="decline"?C.push(U):typeof J<"u"?b[U]=pI(J):p.has(N)&&T.push(U)}await ae.mkdirPromise(V.dirname(h),{recursive:!0}),await ae.changeFilePromise(h,Sa(new Sa.PreserveOrdering({releases:Object.keys(b).length>0?b:void 0,declined:C.length>0?C:void 0,undecided:T.length>0?T:void 0})))}}}function bDt(t){return OF(t).size>0||aD(t).length>0}function OF(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function aD(t,{include:e=new Set}={}){let r=[],o=new Map(qe.mapAndFilter([...t.releases],([n,u])=>u==="decline"?qe.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(qe.mapAndFilter([...t.releases],([n,u])=>u!=="decline"?qe.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of _t.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=t.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function b5(t,e){let r=SA.default.clean(e);for(let o of Object.values(hI))if(o!=="undecided"&&o!=="decline"&&SA.default.inc(t,o)===r)return o;return null}function MF(t,e){if(SA.default.valid(e))return e;if(t===null)throw new it(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!SA.default.valid(t))throw new it(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=SA.default.inc(t,e);if(r===null)throw new it(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function k5(t,e,{report:r}){let o=new Map;for(let a of t.workspaces)for(let n of _t.allDependencies)for(let u of a.manifest[n].values()){let A=t.tryWorkspaceByDescriptor(u);if(A===null||!e.has(A))continue;qe.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]of e){let u=a.manifest.version;a.manifest.version=n,SA.default.prerelease(n)===null?delete a.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);let A=a.manifest.name!==null?G.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${G.prettyLocator(t.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:Ae.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});let p=o.get(a);if(!(typeof p>"u"))for(let[h,E,w]of p){let D=h.manifest[E].get(w);if(typeof D>"u")throw new Error("Assertion failed: The dependency should have existed");let b=D.range,C=!1;if(b.startsWith(ci.protocol)&&(b=b.slice(ci.protocol.length),C=!0,b===a.relativeCwd))continue;let T=b.match(xDt);if(!T){r.reportWarning(0,`Couldn't auto-upgrade range ${b} (in ${G.prettyLocator(t.configuration,h.anchoredLocator)})`);continue}let N=`${T[1]}${n}`;C&&(N=`${ci.protocol}${N}`);let U=G.makeDescriptor(D,N);h.manifest[E].set(w,U)}}}var kDt=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function Pve(t,{current:e,prerelease:r}){let o=new SA.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=kDt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():u=!1;else{let E=u?h.extract(a):null;E!==null&&typeof E[0]=="number"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),u=!1)}}return o.prerelease&&(o.prerelease=[]),`${t}-${n.join(".")}`}var mI=class extends ut{constructor(){super(...arguments);this.all=de.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=de.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=de.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.recursive=de.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=de.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["version","apply"]]}static{this.usage=ot.Usage({catLine truncated
|
- `)}`);let p=new Set(qe.mapAndFilter(n,b=>{let C=t.tryWorkspaceByFilePath(b);return C===null?qe.mapAndFilter.skip:C}));if(A.length===0&&p.size===0&&!e)return null;let h=A.length===1?A[0]:K.join(u,`${bn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=ae.existsSync(h)?await ae.readFilePromise(h,"utf8"):"{}",w=Ki(E),D=new Map;for(let b of w.declined||[]){let C=G.parseIdent(b),T=t.getWorkspaceByIdent(C);D.set(T,"decline")}for(let[b,C]of Object.entries(w.releases||{})){let T=G.parseIdent(b),L=t.getWorkspaceByIdent(T);D.set(L,gI(C))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(b=>b.manifest.version!==null)),releases:D,async saveAll(){let b={},C=[],T=[];for(let L of t.workspaces){if(L.manifest.version===null)continue;let U=G.stringifyIdent(L.anchoredLocator),z=D.get(L);z==="decline"?C.push(U):typeof z<"u"?b[U]=gI(z):p.has(L)&&T.push(U)}await ae.mkdirPromise(K.dirname(h),{recursive:!0}),await ae.changeFilePromise(h,Pa(new Pa.PreserveOrdering({releases:Object.keys(b).length>0?b:void 0,declined:C.length>0?C:void 0,undecided:T.length>0?T:void 0})))}}}function FDt(t){return MF(t).size>0||aD(t).length>0}function MF(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function aD(t,{include:e=new Set}={}){let r=[],o=new Map(qe.mapAndFilter([...t.releases],([n,u])=>u==="decline"?qe.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(qe.mapAndFilter([...t.releases],([n,u])=>u!=="decline"?qe.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of _t.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=t.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function k5(t,e){let r=PA.default.clean(e);for(let o of Object.values(dI))if(o!=="undecided"&&o!=="decline"&&PA.default.inc(t,o)===r)return o;return null}function UF(t,e){if(PA.default.valid(e))return e;if(t===null)throw new nt(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!PA.default.valid(t))throw new nt(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=PA.default.inc(t,e);if(r===null)throw new nt(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function F5(t,e,{report:r,exact:o}){let a=new Map;for(let n of t.workspaces)for(let u of _t.allDependencies)for(let A of n.manifest[u].values()){let p=t.tryWorkspaceByDescriptor(A);if(p===null||!e.has(p))continue;qe.getArrayWithDefault(a,p).push([n,u,A.identHash])}for(let[n,u]of e){let A=n.manifest.version;n.manifest.version=u,PA.default.prerelease(u)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=A);let p=n.manifest.name!==null?G.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${G.prettyLocator(t.configuration,n.anchoredLocator)}: Bumped to ${u}`),r.reportJson({cwd:ue.fromPortablePath(n.cwd),ident:p,oldVersion:A,newVersion:u});let h=a.get(n);if(!(typeof h>"u"))for(let[E,w,D]of h){let b=E.manifest[w].get(D);if(typeof b>"u")throw new Error("Assertion failed: The dependency should have existed");let C=b.range,T=!1;if(C.startsWith(ci.protocol)&&(C=C.slice(ci.protocol.length),T=!0,C===n.relativeCwd))continue;let L=C.match(kDt);if(!L){r.reportWarning(0,`Couldn't auto-upgrade range ${C} (in ${G.prettyLocator(t.configuration,E.anchoredLocator)})`);continue}let U=o?`${u}`:`${L[1]}${u}`;T&&(U=`${ci.protocol}${U}`);let z=G.makeDescriptor(b,U);E.manifest[w].set(D,z)}}}var RDt=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function bve(t,{current:e,prerelease:r}){let o=new PA.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=RDt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():u=!1;else{let E=u?h.extract(a):null;E!==null&&typeof E[0]=="number"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),u=!1)}}return o.prerelease&&(o.prerelease=[]),`${t}-${n.join(".")}`}var EI=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=ge.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=ge.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.exact=ge.Boolean("--exact",!1,{description:"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version."});this.recursive=ge.Boolean("-R,--recursive",{description:"ReleLine truncated
|
||||||
This command will apply the deferred version changes and remove their definitions from the repository.
|
This command will apply the deferred version changes and remove their definitions from the repository.
|
||||||
|
|
||||||
Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is.
|
Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is.
|
||||||
@@ -737,13 +737,13 @@ ${zvt}
|
|||||||
- \`--all\` to apply the version bump on all packages in the repository
|
- \`--all\` to apply the version bump on all packages in the repository
|
||||||
|
|
||||||
Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
|
Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
|
||||||
`,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await Qt.find(r,this.context.cwd),n=await Wr.find(r);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await oD(o,{prerelease:p}),E=new Map;if(this.all)E=h;else{let w=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let D of w){let b=h.get(D);typeof b<"u"&&E.set(D,b)}}if(E.size===0){let w=h.size>0?" Did you want to add --all?":"";A.reportWarning(0,`The current workspace doesn't seem to require a version bump.${w}`);return}k5(o,E,{report:A}),this.dryRun||(p||(this.all?await P5(o):await x5(o,[...E.keys()])),A.reportSeparator())});return this.dryRun||u.hasErrors()?u.exitCode():await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ve();St();Gt();var UF=et(ni());var yI=class extends ut{constructor(){super(...arguments);this.interactive=de.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}static{this.paths=[["version","check"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){AC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(UQ(),oj)),{ScrollableItems:o}=await Promise.resolve().then(()=>(jQ(),qQ)),{FocusRequest:a}=await Promise.resolve().then(()=>(lj(),Qwe)),{useListInput:n}=await Promise.resolve().then(()=>(HQ(),Fwe)),{renderForm:u}=await Promise.resolve().then(()=>(VQ(),YQ)),{Box:A,Text:p}=await Promise.resolve().then(()=>et(ac())),{default:h,useCallback:E,useState:w}=await Promise.resolve().then(()=>et(ln())),D=await ze.find(this.context.cwd,this.context.plugins),{project:b,workspace:C}=await Qt.find(D,this.context.cwd);if(!C)throw new or(b.cwd,this.context.cwd);await b.restoreInstallState();let T=await gI(b);if(T===null||T.releaseRoots.size===0)return 0;if(T.root===null)throw new it("This command can only be run on Git repositories");let N=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:Ie,active:he,decision:De,setDecision:Ee})=>{let g=Ie.manifest.raw.stableVersion??Ie.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${G.prettyLocator(D,Ie.anchoredLocator)})`);if(UF.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let me=["undecided","decline","patch","minor","major"];n(De,me,{active:he,minus:"left",plus:"right",set:Ee});let Ce=De==="undecided"?h.createElement(p,{color:"yellow"},g):De==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},UF.default.valid(De)?De:UF.default.inc(g,De)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,G.prettyLocator(D,Ie.anchoredLocator)," - ",Ce)),h.createElement(A,null,me.map(fe=>h.createElementLine truncated
|
`,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]})}async execute(){let r=await Je.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await kt.find(r,this.context.cwd),n=await Wr.find(r);if(!a)throw new or(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=await Nt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await oD(o,{prerelease:p}),E=new Map;if(this.all)E=h;else{let w=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let D of w){let b=h.get(D);typeof b<"u"&&E.set(D,b)}}if(E.size===0){let w=h.size>0?" Did you want to add --all?":"";A.reportWarning(0,`The current workspace doesn't seem to require a version bump.${w}`);return}F5(o,E,{report:A,exact:this.exact}),this.dryRun||(p||(this.all?await b5(o):await Q5(o,[...E.keys()])),A.reportSeparator())});return this.dryRun||u.hasErrors()?u.exitCode():await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ve();Pt();Gt();var _F=et(ni());var CI=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}static{this.paths=[["version","check"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){pC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(_k(),lj)),{ScrollableItems:o}=await Promise.resolve().then(()=>(Gk(),jk)),{FocusRequest:a}=await Promise.resolve().then(()=>(uj(),Twe)),{useListInput:n}=await Promise.resolve().then(()=>(qk(),Nwe)),{renderForm:u}=await Promise.resolve().then(()=>(Vk(),Kk)),{Box:A,Text:p}=await Promise.resolve().then(()=>et(ac())),{default:h,useCallback:E,useState:w}=await Promise.resolve().then(()=>et(ln())),D=await Je.find(this.context.cwd,this.context.plugins),{project:b,workspace:C}=await kt.find(D,this.context.cwd);if(!C)throw new or(b.cwd,this.context.cwd);await b.restoreInstallState();let T=await mI(b);if(T===null||T.releaseRoots.size===0)return 0;if(T.root===null)throw new nt("This command can only be run on Git repositories");let L=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:me,active:pe,decision:ve,setDecision:Ie})=>{let g=me.manifest.raw.stableVersion??me.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${G.prettyLocator(D,me.anchoredLocator)})`);if(_F.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let Ce=["undecided","decline","patch","minor","major"];n(ve,Ce,{active:pe,minus:"left",plus:"right",set:Ie});let ye=ve==="undecided"?h.createElement(p,{color:"yellow"},g):ve==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},_F.default.valid(ve)?ve:_F.default.inc(g,ve)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,G.prettyLocator(D,me.anchoredLocator)," - ",ye)),h.createElement(A,null,Ce.map(AeLine truncated
|
||||||
`)},p=()=>{let Ee=this.from.map(g=>II.default.matcher(g));return o.workspaces.filter(g=>{let me=G.stringifyIdent(g.anchoredLocator),Ce=g.relativeCwd;return Ee.some(fe=>fe(me)||fe(Ce))})},h=[];if(this.since?(A("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await ra.fetchChangedWorkspaces({ref:this.since,project:o}))):this.from?(A("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(A("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(A("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(A("Option --all is set; selecting all workspaces"),h=[...o.workspaces]),this.dryRun&&!this.all){for(let Ee of h)A(`
|
`)},p=()=>{let Ie=this.from.map(g=>BI.default.matcher(g));return o.workspaces.filter(g=>{let Ce=G.stringifyIdent(g.anchoredLocator),ye=g.relativeCwd;return Ie.some(Ae=>Ae(Ce)||Ae(ye))})},h=[];if(this.since?(A("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await ra.fetchChangedWorkspaces({ref:this.since,project:o}))):this.from?(A("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(A("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(A("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(A("Option --all is set; selecting all workspaces"),h=[...o.workspaces]),this.dryRun&&!this.all){for(let Ie of h)A(`
|
||||||
- ${Ee.relativeCwd}
|
- ${Ie.relativeCwd}
|
||||||
${G.prettyLocator(r,Ee.anchoredLocator)}`);h.length>0&&A("")}let E;if(this.recursive?this.since?(A("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependents()]).flat())):(A("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(A("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ee of E)A(`
|
${G.prettyLocator(r,Ie.anchoredLocator)}`);h.length>0&&A("")}let E;if(this.recursive?this.since?(A("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ie=>[...Ie.getRecursiveWorkspaceDependents()]).flat())):(A("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ie=>[...Ie.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(A("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ie=>[...Ie.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ie of E)A(`
|
||||||
- ${Ee.relativeCwd}
|
- ${Ie.relativeCwd}
|
||||||
${G.prettyLocator(r,Ee.anchoredLocator)}`);let w=[],D=!1;if(u?.includes(":")){for(let Ee of o.workspaces)if(Ee.manifest.scripts.has(u)&&(D=!D,D===!1))break}for(let Ee of h){if(u&&!Ee.manifest.scripts.has(u)&&!D&&!(await hn.getWorkspaceAccessibleBinaries(Ee)).has(u)){A(`Excluding ${Ee.relativeCwd} because it doesn't have a "${u}" script`);continue}if(!(u===r.env.npm_lifecycle_event&&Ee.cwd===a.cwd)){if(this.include.length>0&&!II.default.isMatch(G.stringifyIdent(Ee.anchoredLocator),this.include)&&!II.default.isMatch(Ee.relativeCwd,this.include)){A(`Excluding ${Ee.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(II.default.isMatch(G.stringifyIdent(Ee.anchoredLocator),this.exclude)||II.default.isMatch(Ee.relativeCwd,this.exclude))){A(`Excluding ${Ee.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ee.manifest.private===!0){A(`Excluding ${Ee.relativeCwd} because it's a private workspace and --no-private was set`);continue}w.push(Ee)}}if(this.dryRun)return 0;let b=this.verbose??(this.context.stdout.isTTY?1/0:0),C=b>0,T=b>1,N=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(Xi.availableParallelism()/2):1,U=N===1?!1:this.parallel,J=U?this.interlaced:!0,te=(0,bve.default)(N),le=new Map,ce=new Set,ue=0,Ie=null,he=!1,De=await Lt.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ee=>{let g=async(me,{commandIndex:Ce})=>{if(he)return-1;!U&&T&&Ce>1&&Ee.reportSeparator();let fe=RDt(me,{configuration:r,label:C,commandIndex:Ce}),[ie,Z]=xve(Ee,{prefix:fe,interlaced:J}),[Se,Re]=xve(Ee,{prefix:fe,interlaced:J});try{T&&Ee.reportInfo(null,`${fe?`${fe} `:""}Process started`);let ht=Date.now(),q=await this.cli.run([this.commandName,...this.args],{cwd:me.cwd,stdout:ie,stderr:Se})||0;ie.end(),Se.end(),await Z,await Re;let nt=Date.now();if(T){let Le=r.get("enableTimers")?`, completed in ${pe.pretty(r,nt-ht,pe.Type.DURATION)}`:"";Ee.reportInfo(null,`${fe?`${fe} `:""}Process exited (exit code ${q})${Le}`)}return q===130&&(he=!0,Ie=q),q}catch(ht){throw ie.end(),Se.end(),await Z,await Re,ht}};for(let me of w)le.set(me.anchoredLocator.locatorHash,me);for(;le.size>0&&!Ee.hasErrors();){let me=[];for(let[Z,Se]of le){if(ce.has(Se.anchoredDescriptor.descriptorHash))continue;let Re=!0;if(this.topological||this.topologicalDev){let ht=this.topologicalDev?new Map([...Se.manifest.dependencies,...Se.manifest.devDependencies]):Se.manifest.dependencies;for(let q of ht.values()){let nt=o.tryWorkspaceByDescriptor(q);if(Re=nt===null||!le.has(nt.anchoredLocator.locatorHash),!Re)break}}if(Re&&(ce.add(Se.anchoredDescriptor.descriptorHash),me.push(te(async()=>{let ht=await g(Se,{commandIndex:++ue});return le.delete(Z),ce.delete(Se.anchoredDescriptor.descriptorHash),{workspace:Se,exitCode:ht}})),!U))break}if(me.length===0){let Z=Array.from(le.values()).map(Se=>G.prettyLocator(r,Se.anchoredLocator)).join(", ");Ee.reportError(3,`Dependency cycle detected (${Z})`);return}let Ce=await Promise.all(me);Ce.forEach(({workspace:Z,exitCode:Se})=>{Se!==0&&Ee.reportError(0,`The command failed in workspace ${G.prettyLocator(r,Z.anchoredLocator)} with exit code ${Se}`)});let ie=Ce.map(Z=>Z.exitCode).find(Z=>Z!==0);(this.topological||this.topologicalDev)&&typeof ie<"u"&&Ee.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return Ie!==null?Ie:De.exitCode()}};function xve(t,{prefix:e,interlaced:r}){let o=t.createStreamReporter(e),a=new qe.DefaultStream;a.pipe(o,{end:!1}),a.on("finish",()=>{o.end()});let n=new Promise(A=>{o.on("finish",()=>{A(a.active)})});if(r)return[a,n];let u=new qe.BufferStream;return u.pipe(a,{end:!1}),u.on("finish",()=>{a.end()}),[u,n]}function RDt(t,{configuration:e,commandIndex:r,label:o}){if(!o)return null;let n=`[${G.stringifyIdent(t.anchoredLocator)}]:`,u=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],A=u[r%u.length];return pe.pretty(e,n,A)}var TDt={commands:[CI,wI]},LDt=TDt;var lE=()=>({modules:new Map([["@yarnpkg/cli",P2],["@yarnpkg/core",S2],["@yarnpkg/fslib",Aw],["@yarnpkg/libzip",K1],["@yarnpkg/parsers",Ew],["@yarnpkg/shell",e2],["clipanion",Qw],["semver",NDt],["typanion",Yo],["@yarnpkg/plugin-essentials",MH],["@yarnpkg/plugin-compat",jH],["@yarnpkg/plugin-constraints",a6],["@yarnpkg/plugin-dlx",l6],["@yarnpkg/plugin-exec",A6],["@yarnpkg/plugin-file",p6],["@yarnpkg/plugin-git",OH],["@yarnpkg/plugin-github",d6],["@yarnpkg/plugin-http",m6],["@yarnpkg/plugin-init",y6],["@yarnpkg/plugin-interactive-tools",mj],["@yarnpkg/plugin-link",yj],["@yarnpkg/plugin-nm",tG],["@yarnpkg/plugin-npm",$G],["@yarnpkg/plugin-npm-cli",l5],["@yarnpkg/plugin-pack",KG],["@yarnpkg/plugin-patch",g5],["@yarnpkg/plugin-pnp",jj],["@yarnpkg/plugin-pnpm",y5],["@yarnpkg/plugin-stage",D5],["@yarnpkg/plugin-typescript",S5],["@yarnpkg/plugin-version",Q5],["@yarnpkg/plugin-workspace-tools",F5]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@Line truncated
|
${G.prettyLocator(r,Ie.anchoredLocator)}`);let w=[],D=!1;if(u?.includes(":")){for(let Ie of o.workspaces)if(Ie.manifest.scripts.has(u)&&(D=!D,D===!1))break}for(let Ie of h){if(u&&!Ie.manifest.scripts.has(u)&&!D&&!(await hn.getWorkspaceAccessibleBinaries(Ie)).has(u)){A(`Excluding ${Ie.relativeCwd} because it doesn't have a "${u}" script`);continue}if(!(u===r.env.npm_lifecycle_event&&Ie.cwd===a.cwd)){if(this.include.length>0&&!BI.default.isMatch(G.stringifyIdent(Ie.anchoredLocator),this.include)&&!BI.default.isMatch(Ie.relativeCwd,this.include)){A(`Excluding ${Ie.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(BI.default.isMatch(G.stringifyIdent(Ie.anchoredLocator),this.exclude)||BI.default.isMatch(Ie.relativeCwd,this.exclude))){A(`Excluding ${Ie.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ie.manifest.private===!0){A(`Excluding ${Ie.relativeCwd} because it's a private workspace and --no-private was set`);continue}w.push(Ie)}}if(this.dryRun)return 0;let b=this.verbose??(this.context.stdout.isTTY?1/0:0),C=b>0,T=b>1,L=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(Xi.availableParallelism()/2):1,U=L===1?!1:this.parallel,z=U?this.interlaced:!0,te=(0,kve.default)(L),le=new Map,de=new Set,ce=0,me=null,pe=!1,ve=await Nt.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ie=>{let g=async(Ce,{commandIndex:ye})=>{if(pe)return-1;!U&&T&&ye>1&&Ie.reportSeparator();let Ae=LDt(Ce,{configuration:r,label:C,commandIndex:ye}),[ie,Z]=Qve(Ie,{prefix:Ae,interlaced:z}),[Pe,Re]=Qve(Ie,{prefix:Ae,interlaced:z});try{T&&Ie.reportInfo(null,`${Ae?`${Ae} `:""}Process started`);let gt=Date.now(),q=await this.cli.run([this.commandName,...this.args],{cwd:Ce.cwd,stdout:ie,stderr:Pe})||0;ie.end(),Pe.end(),await Z,await Re;let rt=Date.now();if(T){let Te=r.get("enableTimers")?`, completed in ${fe.pretty(r,rt-gt,fe.Type.DURATION)}`:"";Ie.reportInfo(null,`${Ae?`${Ae} `:""}Process exited (exit code ${q})${Te}`)}return q===130&&(pe=!0,me=q),q}catch(gt){throw ie.end(),Pe.end(),await Z,await Re,gt}};for(let Ce of w)le.set(Ce.anchoredLocator.locatorHash,Ce);for(;le.size>0&&!Ie.hasErrors();){let Ce=[];for(let[Z,Pe]of le){if(de.has(Pe.anchoredDescriptor.descriptorHash))continue;let Re=!0;if(this.topological||this.topologicalDev){let gt=this.topologicalDev?new Map([...Pe.manifest.dependencies,...Pe.manifest.devDependencies]):Pe.manifest.dependencies;for(let q of gt.values()){let rt=o.tryWorkspaceByDescriptor(q);if(Re=rt===null||!le.has(rt.anchoredLocator.locatorHash),!Re)break}}if(Re&&(de.add(Pe.anchoredDescriptor.descriptorHash),Ce.push(te(async()=>{let gt=await g(Pe,{commandIndex:++ce});return le.delete(Z),de.delete(Pe.anchoredDescriptor.descriptorHash),{workspace:Pe,exitCode:gt}})),!U))break}if(Ce.length===0){let Z=Array.from(le.values()).map(Pe=>G.prettyLocator(r,Pe.anchoredLocator)).join(", ");Ie.reportError(3,`Dependency cycle detected (${Z})`);return}let ye=await Promise.all(Ce);ye.forEach(({workspace:Z,exitCode:Pe})=>{Pe!==0&&Ie.reportError(0,`The command failed in workspace ${G.prettyLocator(r,Z.anchoredLocator)} with exit code ${Pe}`)});let ie=ye.map(Z=>Z.exitCode).find(Z=>Z!==0);(this.topological||this.topologicalDev)&&typeof ie<"u"&&Ie.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return me!==null?me:ve.exitCode()}};function Qve(t,{prefix:e,interlaced:r}){let o=t.createStreamReporter(e),a=new qe.DefaultStream;a.pipe(o,{end:!1}),a.on("finish",()=>{o.end()});let n=new Promise(A=>{o.on("finish",()=>{A(a.active)})});if(r)return[a,n];let u=new qe.BufferStream;return u.pipe(a,{end:!1}),u.on("finish",()=>{a.end()}),[u,n]}function LDt(t,{configuration:e,commandIndex:r,label:o}){if(!o)return null;let n=`[${G.stringifyIdent(t.anchoredLocator)}]:`,u=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],A=u[r%u.length];return fe.pretty(e,n,A)}var ODt={commands:[wI,vI]},MDt=ODt;var uE=()=>({modules:new Map([["@yarnpkg/cli",S2],["@yarnpkg/core",P2],["@yarnpkg/fslib",pw],["@yarnpkg/libzip",V1],["@yarnpkg/parsers",Iw],["@yarnpkg/shell",e2],["clipanion",Rw],["semver",UDt],["typanion",Yo],["@yarnpkg/plugin-essentials",_H],["@yarnpkg/plugin-compat",WH],["@yarnpkg/plugin-constraints",c6],["@yarnpkg/plugin-dlx",u6],["@yarnpkg/plugin-exec",p6],["@yarnpkg/plugin-file",g6],["@yarnpkg/plugin-git",UH],["@yarnpkg/plugin-github",y6],["@yarnpkg/plugin-http",E6],["@yarnpkg/plugin-init",C6],["@yarnpkg/plugin-interactive-tools",Ej],["@yarnpkg/plugin-link",Cj],["@yarnpkg/plugin-nm",nG],["@yarnpkg/plugin-npm",t5],["@yarnpkg/plugin-npm-cli",u5],["@yarnpkg/plugin-pack",JG],["@yarnpkg/plugin-patch",m5],["@yarnpkg/plugin-pnp",Wj],["@yarnpkg/plugin-pnpm",C5],["@yarnpkg/plugin-stage",S5],["@yarnpkg/plugin-typescript",x5],["@yarnpkg/plugin-version",R5],["@yarnpkg/plugin-workspace-tools",T5]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@Line truncated
|
||||||
Please report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once("beforeExit",n);try{process.exitCode=42,process.exitCode=await HDt(a,t,{selfPath:r,pluginConfiguration:o})}catch(u){Ko.defaultContext.stdout.write(a.error(u)),process.exitCode=1}finally{process.off("beforeExit",n),await ae.rmtempPromise()}}Nk(process.argv.slice(2),{cwd:V.cwd(),selfPath:Ae.toPortablePath(Ae.resolve(process.argv[1])),pluginConfiguration:lE()});})();
|
Please report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once("beforeExit",n);try{process.exitCode=42,process.exitCode=await GDt(a,t,{selfPath:r,pluginConfiguration:o})}catch(u){Vo.defaultContext.stdout.write(a.error(u)),process.exitCode=1}finally{process.off("beforeExit",n),await ae.rmtempPromise()}}OQ(process.argv.slice(2),{cwd:K.cwd(),selfPath:ue.toPortablePath(ue.resolve(process.argv[1])),pluginConfiguration:uE()});})();
|
||||||
/**
|
/**
|
||||||
@license
|
@license
|
||||||
Copyright (c) 2015, Rebecca Turner
|
Copyright (c) 2015, Rebecca Turner
|
||||||
+1
-1
@@ -12,4 +12,4 @@ npmPublishAccess: public
|
|||||||
|
|
||||||
npmPublishRegistry: "https://registry.npmjs.org"
|
npmPublishRegistry: "https://registry.npmjs.org"
|
||||||
|
|
||||||
yarnPath: .yarn/releases/yarn-4.7.0.cjs
|
yarnPath: .yarn/releases/yarn-4.8.0.cjs
|
||||||
Generated
+2
-2
@@ -2501,9 +2501,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "once_cell"
|
name = "once_cell"
|
||||||
version = "1.21.1"
|
version = "1.21.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
|
checksum = "c2806eaa3524762875e21c3dcd057bc4b7bfa01ce4da8d46be1cd43649e1cc6b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "oorandom"
|
name = "oorandom"
|
||||||
|
|||||||
+1
-1
@@ -92,7 +92,7 @@
|
|||||||
"vite": "^6.0.3",
|
"vite": "^6.0.3",
|
||||||
"vitest": "3.0.9"
|
"vitest": "3.0.9"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@4.7.0",
|
"packageManager": "yarn@4.8.0",
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@^1",
|
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@^1",
|
||||||
"array-includes": "npm:@nolyfill/array-includes@^1",
|
"array-includes": "npm:@nolyfill/array-includes@^1",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ let package = Package(
|
|||||||
.library(name: "AffineGraphQL", targets: ["AffineGraphQL"]),
|
.library(name: "AffineGraphQL", targets: ["AffineGraphQL"]),
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(url: "https://github.com/apollographql/apollo-ios", exact: "1.18.0"),
|
.package(url: "https://github.com/apollographql/apollo-ios", exact: "1.19.0"),
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
.target(
|
.target(
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ let package = Package(
|
|||||||
dependencies: [
|
dependencies: [
|
||||||
.package(path: "../AffineGraphQL"),
|
.package(path: "../AffineGraphQL"),
|
||||||
.package(path: "../MarkdownView"),
|
.package(path: "../MarkdownView"),
|
||||||
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.18.0"),
|
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.19.0"),
|
||||||
.package(url: "https://github.com/LaunchDarkly/swift-eventsource.git", from: "3.3.0"),
|
.package(url: "https://github.com/LaunchDarkly/swift-eventsource.git", from: "3.3.0"),
|
||||||
.package(url: "https://github.com/apple/swift-collections", from: "1.1.4"),
|
.package(url: "https://github.com/apple/swift-collections", from: "1.1.4"),
|
||||||
.package(url: "https://github.com/Lakr233/ChidoriMenu", from: "2.4.3"),
|
.package(url: "https://github.com/Lakr233/ChidoriMenu", from: "2.4.3"),
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ let package = Package(
|
|||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(url: "https://github.com/JohnSundell/Splash", from: "0.16.0"),
|
.package(url: "https://github.com/JohnSundell/Splash", from: "0.16.0"),
|
||||||
.package(url: "https://github.com/swiftlang/swift-cmark", from: "0.4.0"),
|
.package(url: "https://github.com/swiftlang/swift-cmark", from: "0.5.0"),
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
.target(name: "MarkdownView", dependencies: [
|
.target(name: "MarkdownView", dependencies: [
|
||||||
|
|||||||
Reference in new issue
Block a user