@ekanos/cli 0.33.2 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/agents-api.d.ts +0 -24
- package/dist/agents-api.js.map +1 -1
- package/dist/apps-api.d.ts +0 -14
- package/dist/apps-api.js.map +1 -1
- package/dist/auth/credential-store.d.ts +0 -60
- package/dist/auth/credential-store.js +2 -72
- package/dist/auth/credential-store.js.map +1 -1
- package/dist/auth/device-flow.d.ts +0 -35
- package/dist/auth/device-flow.js +0 -45
- package/dist/auth/device-flow.js.map +1 -1
- package/dist/auth/ekanos-api.d.ts +0 -54
- package/dist/auth/ekanos-api.js +2 -174
- package/dist/auth/ekanos-api.js.map +1 -1
- package/dist/auth/host-trust.d.ts +0 -35
- package/dist/auth/host-trust.js +2 -34
- package/dist/auth/host-trust.js.map +1 -1
- package/dist/auth/session.d.ts +0 -63
- package/dist/auth/session.js +0 -68
- package/dist/auth/session.js.map +1 -1
- package/dist/banner.d.ts +0 -22
- package/dist/banner.js +0 -25
- package/dist/banner.js.map +1 -1
- package/dist/bin.js +0 -15
- package/dist/bin.js.map +1 -1
- package/dist/catalog-api.d.ts +0 -23
- package/dist/catalog-api.js +0 -6
- package/dist/catalog-api.js.map +1 -1
- package/dist/claude-docs.d.ts +1 -23
- package/dist/claude-docs.js +0 -8
- package/dist/claude-docs.js.map +1 -1
- package/dist/commands/add.js +0 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/agents-edit.d.ts +1 -19
- package/dist/commands/agents-edit.js +2 -10
- package/dist/commands/agents-edit.js.map +1 -1
- package/dist/commands/agents-init.d.ts +0 -21
- package/dist/commands/agents-init.js +3 -16
- package/dist/commands/agents-init.js.map +1 -1
- package/dist/commands/agents.d.ts +0 -40
- package/dist/commands/agents.js +3 -50
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/apps.d.ts +0 -43
- package/dist/commands/apps.js +4 -59
- package/dist/commands/apps.js.map +1 -1
- package/dist/commands/audiences.d.ts +0 -21
- package/dist/commands/audiences.js +0 -21
- package/dist/commands/audiences.js.map +1 -1
- package/dist/commands/catalog.d.ts +0 -15
- package/dist/commands/catalog.js +0 -34
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/contract.d.ts +0 -16
- package/dist/commands/contract.js +1 -9
- package/dist/commands/contract.js.map +1 -1
- package/dist/commands/dev.d.ts +0 -36
- package/dist/commands/dev.js +1 -95
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.d.ts +0 -18
- package/dist/commands/doctor.js +0 -20
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/feedback.d.ts +0 -17
- package/dist/commands/feedback.js +0 -22
- package/dist/commands/feedback.js.map +1 -1
- package/dist/commands/index-experience.d.ts +2 -13
- package/dist/commands/index-experience.js +2 -4
- package/dist/commands/index-experience.js.map +1 -1
- package/dist/commands/init.d.ts +0 -85
- package/dist/commands/init.js +1 -124
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/knowledge.d.ts +0 -37
- package/dist/commands/knowledge.js +4 -42
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/login.d.ts +0 -31
- package/dist/commands/login.js +1 -49
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts +0 -21
- package/dist/commands/logout.js +0 -40
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/migrate.d.ts +2 -0
- package/dist/commands/migrate.js +180 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/names.d.ts +0 -8
- package/dist/commands/names.js +1 -7
- package/dist/commands/names.js.map +1 -1
- package/dist/commands/publish.d.ts +1 -130
- package/dist/commands/publish.js +2 -187
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/reviewers.d.ts +0 -10
- package/dist/commands/reviewers.js +1 -8
- package/dist/commands/reviewers.js.map +1 -1
- package/dist/commands/routes.d.ts +0 -12
- package/dist/commands/routes.js +1 -11
- package/dist/commands/routes.js.map +1 -1
- package/dist/commands/runs.d.ts +0 -30
- package/dist/commands/runs.js +2 -46
- package/dist/commands/runs.js.map +1 -1
- package/dist/commands/scope-notice.d.ts +0 -16
- package/dist/commands/scope-notice.js +0 -18
- package/dist/commands/scope-notice.js.map +1 -1
- package/dist/commands/skills.d.ts +0 -22
- package/dist/commands/skills.js +3 -28
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/sources-roles.js +0 -17
- package/dist/commands/sources-roles.js.map +1 -1
- package/dist/commands/sources.d.ts +0 -19
- package/dist/commands/sources.js +0 -38
- package/dist/commands/sources.js.map +1 -1
- package/dist/commands/status.d.ts +2 -102
- package/dist/commands/status.js +68 -173
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.js +0 -10
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/team-agent-access.d.ts +0 -26
- package/dist/commands/team-agent-access.js +1 -26
- package/dist/commands/team-agent-access.js.map +1 -1
- package/dist/commands/team-agent-readiness.d.ts +2 -38
- package/dist/commands/team-agent-readiness.js +0 -26
- package/dist/commands/team-agent-readiness.js.map +1 -1
- package/dist/commands/team-agents-agents.d.ts +0 -29
- package/dist/commands/team-agents-agents.js +3 -68
- package/dist/commands/team-agents-agents.js.map +1 -1
- package/dist/commands/team-agents-define.d.ts +0 -27
- package/dist/commands/team-agents-define.js +1 -29
- package/dist/commands/team-agents-define.js.map +1 -1
- package/dist/commands/team-agents-mcp.js +0 -26
- package/dist/commands/team-agents-mcp.js.map +1 -1
- package/dist/commands/team-agents-triggers.d.ts +0 -7
- package/dist/commands/team-agents-triggers.js +0 -45
- package/dist/commands/team-agents-triggers.js.map +1 -1
- package/dist/commands/team-agents.d.ts +1 -18
- package/dist/commands/team-agents.js +6 -16
- package/dist/commands/team-agents.js.map +1 -1
- package/dist/commands/team-api-keys.d.ts +4 -0
- package/dist/commands/team-api-keys.js +277 -0
- package/dist/commands/team-api-keys.js.map +1 -0
- package/dist/commands/team-llm-key.d.ts +0 -10
- package/dist/commands/team-llm-key.js +0 -12
- package/dist/commands/team-llm-key.js.map +1 -1
- package/dist/commands/teams-audience.d.ts +0 -17
- package/dist/commands/teams-audience.js +1 -22
- package/dist/commands/teams-audience.js.map +1 -1
- package/dist/commands/teams-channel-install.d.ts +0 -13
- package/dist/commands/teams-channel-install.js +0 -13
- package/dist/commands/teams-channel-install.js.map +1 -1
- package/dist/commands/teams-connect.d.ts +0 -60
- package/dist/commands/teams-connect.js +1 -86
- package/dist/commands/teams-connect.js.map +1 -1
- package/dist/commands/teams-events.d.ts +0 -7
- package/dist/commands/teams-events.js +0 -8
- package/dist/commands/teams-events.js.map +1 -1
- package/dist/commands/teams-lifecycle.d.ts +0 -25
- package/dist/commands/teams-lifecycle.js +1 -24
- package/dist/commands/teams-lifecycle.js.map +1 -1
- package/dist/commands/teams-onboard.d.ts +0 -10
- package/dist/commands/teams-onboard.js +0 -7
- package/dist/commands/teams-onboard.js.map +1 -1
- package/dist/commands/teams-overview.d.ts +0 -7
- package/dist/commands/teams-overview.js +0 -15
- package/dist/commands/teams-overview.js.map +1 -1
- package/dist/commands/teams-scope.d.ts +0 -6
- package/dist/commands/teams-scope.js +0 -6
- package/dist/commands/teams-scope.js.map +1 -1
- package/dist/commands/teams.d.ts +0 -49
- package/dist/commands/teams.js +4 -49
- package/dist/commands/teams.js.map +1 -1
- package/dist/commands/test.d.ts +0 -29
- package/dist/commands/test.js +1 -41
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/upgrade.d.ts +0 -17
- package/dist/commands/upgrade.js +3 -142
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/use.d.ts +0 -12
- package/dist/commands/use.js +0 -12
- package/dist/commands/use.js.map +1 -1
- package/dist/commands/validate.d.ts +0 -15
- package/dist/commands/validate.js +0 -41
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/whoami.d.ts +0 -18
- package/dist/commands/whoami.js +0 -17
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflows.d.ts +0 -11
- package/dist/commands/workflows.js +2 -14
- package/dist/commands/workflows.js.map +1 -1
- package/dist/compatibility.d.ts +0 -108
- package/dist/compatibility.js +0 -109
- package/dist/compatibility.js.map +1 -1
- package/dist/connect-fields.d.ts +0 -19
- package/dist/connect-fields.js +0 -21
- package/dist/connect-fields.js.map +1 -1
- package/dist/connections-api.d.ts +4 -7
- package/dist/connections-api.js +1 -14
- package/dist/connections-api.js.map +1 -1
- package/dist/context.d.ts +0 -80
- package/dist/context.js +0 -71
- package/dist/context.js.map +1 -1
- package/dist/contract-verification.d.ts +0 -10
- package/dist/contract-verification.js +0 -10
- package/dist/contract-verification.js.map +1 -1
- package/dist/contracts-api.d.ts +0 -16
- package/dist/contracts-api.js.map +1 -1
- package/dist/copy-tree.d.ts +0 -38
- package/dist/copy-tree.js +0 -17
- package/dist/copy-tree.js.map +1 -1
- package/dist/delegate.d.ts +0 -18
- package/dist/delegate.js +0 -59
- package/dist/delegate.js.map +1 -1
- package/dist/design-findings.d.ts +0 -20
- package/dist/design-findings.js +0 -20
- package/dist/design-findings.js.map +1 -1
- package/dist/dev-experience.d.ts +0 -36
- package/dist/dev-experience.js +1 -30
- package/dist/dev-experience.js.map +1 -1
- package/dist/did-you-mean.d.ts +0 -32
- package/dist/did-you-mean.js +1 -53
- package/dist/did-you-mean.js.map +1 -1
- package/dist/docs-links.d.ts +0 -15
- package/dist/docs-links.js +0 -15
- package/dist/docs-links.js.map +1 -1
- package/dist/doctor-api.d.ts +0 -22
- package/dist/doctor-api.js +0 -2
- package/dist/doctor-api.js.map +1 -1
- package/dist/errors.d.ts +0 -23
- package/dist/errors.js +0 -22
- package/dist/errors.js.map +1 -1
- package/dist/exit-codes.d.ts +0 -12
- package/dist/exit-codes.js +0 -12
- package/dist/exit-codes.js.map +1 -1
- package/dist/experience/boundary.d.ts +0 -9
- package/dist/experience/boundary.js +4 -15
- package/dist/experience/boundary.js.map +1 -1
- package/dist/experience/build.d.ts +0 -9
- package/dist/experience/build.js +5 -14
- package/dist/experience/build.js.map +1 -1
- package/dist/experience/checks.d.ts +0 -11
- package/dist/experience/checks.js +3 -9
- package/dist/experience/checks.js.map +1 -1
- package/dist/experience/clean-room.d.ts +5 -29
- package/dist/experience/clean-room.js +19 -45
- package/dist/experience/clean-room.js.map +1 -1
- package/dist/experience/contract-sources.d.ts +1 -23
- package/dist/experience/contract-sources.js +5 -15
- package/dist/experience/contract-sources.js.map +1 -1
- package/dist/experience/definition-checks.d.ts +0 -22
- package/dist/experience/definition-checks.js +2 -27
- package/dist/experience/definition-checks.js.map +1 -1
- package/dist/experience/definition-shape.d.ts +3 -11
- package/dist/experience/definition-shape.js.map +1 -1
- package/dist/experience/host-contract-source.d.ts +0 -17
- package/dist/experience/host-contract-source.js +0 -16
- package/dist/experience/host-contract-source.js.map +1 -1
- package/dist/experience/host-npm.d.ts +12 -0
- package/dist/experience/host-npm.js +40 -0
- package/dist/experience/host-npm.js.map +1 -0
- package/dist/experience/init.d.ts +0 -1
- package/dist/experience/init.js +0 -3
- package/dist/experience/init.js.map +1 -1
- package/dist/experience/integrations-codegen.d.ts +0 -8
- package/dist/experience/integrations-codegen.js +1 -7
- package/dist/experience/integrations-codegen.js.map +1 -1
- package/dist/experience/json-schema-to-ts.js.map +1 -1
- package/dist/experience/load-experience.d.ts +0 -11
- package/dist/experience/load-experience.js +0 -22
- package/dist/experience/load-experience.js.map +1 -1
- package/dist/experience/overrides.d.ts +0 -6
- package/dist/experience/overrides.js +0 -6
- package/dist/experience/overrides.js.map +1 -1
- package/dist/experience/pin-integration.d.ts +0 -2
- package/dist/experience/pin-integration.js +0 -3
- package/dist/experience/pin-integration.js.map +1 -1
- package/dist/experience/pin-ops.d.ts +1 -9
- package/dist/experience/pin-ops.js +0 -7
- package/dist/experience/pin-ops.js.map +1 -1
- package/dist/experience/pins.d.ts +0 -23
- package/dist/experience/pins.js +2 -18
- package/dist/experience/pins.js.map +1 -1
- package/dist/experience/project.d.ts +0 -30
- package/dist/experience/project.js +4 -33
- package/dist/experience/project.js.map +1 -1
- package/dist/experience/publish.d.ts +0 -47
- package/dist/experience/publish.js +20 -61
- package/dist/experience/publish.js.map +1 -1
- package/dist/experience/regenerate.d.ts +0 -3
- package/dist/experience/regenerate.js +1 -5
- package/dist/experience/regenerate.js.map +1 -1
- package/dist/experience/report.d.ts +0 -5
- package/dist/experience/report.js +0 -5
- package/dist/experience/report.js.map +1 -1
- package/dist/feedback-api.d.ts +0 -20
- package/dist/feedback-api.js +0 -5
- package/dist/feedback-api.js.map +1 -1
- package/dist/feedback-context.d.ts +0 -19
- package/dist/feedback-context.js +2 -37
- package/dist/feedback-context.js.map +1 -1
- package/dist/feedback-updates.d.ts +0 -4
- package/dist/feedback-updates.js +5 -34
- package/dist/feedback-updates.js.map +1 -1
- package/dist/findings-renderer.d.ts +0 -37
- package/dist/findings-renderer.js +0 -49
- package/dist/findings-renderer.js.map +1 -1
- package/dist/harness-scaffold.d.ts +3 -212
- package/dist/harness-scaffold.js +11 -230
- package/dist/harness-scaffold.js.map +1 -1
- package/dist/host-load.d.ts +8 -0
- package/dist/host-load.js +115 -0
- package/dist/host-load.js.map +1 -0
- package/dist/host-snapshots.d.ts +0 -36
- package/dist/host-snapshots.js +1 -41
- package/dist/host-snapshots.js.map +1 -1
- package/dist/http-trace.d.ts +0 -10
- package/dist/http-trace.js +0 -11
- package/dist/http-trace.js.map +1 -1
- package/dist/icon-findings.d.ts +0 -16
- package/dist/icon-findings.js +0 -28
- package/dist/icon-findings.js.map +1 -1
- package/dist/index.d.ts +0 -46
- package/dist/index.js +33 -149
- package/dist/index.js.map +1 -1
- package/dist/invocation.d.ts +0 -26
- package/dist/invocation.js +0 -27
- package/dist/invocation.js.map +1 -1
- package/dist/knowledge-api.d.ts +0 -29
- package/dist/knowledge-api.js +0 -30
- package/dist/knowledge-api.js.map +1 -1
- package/dist/last-error.d.ts +0 -3
- package/dist/last-error.js +1 -16
- package/dist/last-error.js.map +1 -1
- package/dist/load-definition.d.ts +0 -10
- package/dist/load-definition.js +0 -29
- package/dist/load-definition.js.map +1 -1
- package/dist/lockfile-instances.d.ts +6 -41
- package/dist/lockfile-instances.js +3 -32
- package/dist/lockfile-instances.js.map +1 -1
- package/dist/merge-manifest.d.ts +0 -27
- package/dist/merge-manifest.js +0 -47
- package/dist/merge-manifest.js.map +1 -1
- package/dist/migrate-connection.d.ts +29 -0
- package/dist/migrate-connection.js +569 -0
- package/dist/migrate-connection.js.map +1 -0
- package/dist/names-api.d.ts +4 -30
- package/dist/names-api.js +3 -3
- package/dist/names-api.js.map +1 -1
- package/dist/open-url.d.ts +0 -12
- package/dist/open-url.js +1 -27
- package/dist/open-url.js.map +1 -1
- package/dist/pack-hygiene.d.ts +0 -6
- package/dist/pack-hygiene.js +0 -8
- package/dist/pack-hygiene.js.map +1 -1
- package/dist/pack.d.ts +0 -7
- package/dist/pack.js +6 -79
- package/dist/pack.js.map +1 -1
- package/dist/package-manager.d.ts +2 -50
- package/dist/package-manager.js +0 -48
- package/dist/package-manager.js.map +1 -1
- package/dist/parse-argv.d.ts +2 -21
- package/dist/parse-argv.js +0 -7
- package/dist/parse-argv.js.map +1 -1
- package/dist/pnpm-builds.d.ts +0 -32
- package/dist/pnpm-builds.js +0 -45
- package/dist/pnpm-builds.js.map +1 -1
- package/dist/product-kinds.d.ts +0 -7
- package/dist/product-kinds.js +0 -7
- package/dist/product-kinds.js.map +1 -1
- package/dist/product-slug.d.ts +0 -6
- package/dist/product-slug.js +0 -6
- package/dist/product-slug.js.map +1 -1
- package/dist/project-checks.d.ts +0 -80
- package/dist/project-checks.js +2 -104
- package/dist/project-checks.js.map +1 -1
- package/dist/project.d.ts +1 -46
- package/dist/project.js +1 -122
- package/dist/project.js.map +1 -1
- package/dist/publish-api.d.ts +2 -120
- package/dist/publish-api.js +1 -95
- package/dist/publish-api.js.map +1 -1
- package/dist/pull-write.d.ts +0 -15
- package/dist/pull-write.js +0 -5
- package/dist/pull-write.js.map +1 -1
- package/dist/repo/publish.d.ts +0 -34
- package/dist/repo/publish.js +1 -18
- package/dist/repo/publish.js.map +1 -1
- package/dist/repo/scaffold.d.ts +0 -9
- package/dist/repo/scaffold.js +2 -14
- package/dist/repo/scaffold.js.map +1 -1
- package/dist/reviewers-api.d.ts +0 -16
- package/dist/reviewers-api.js.map +1 -1
- package/dist/routes-api.d.ts +0 -10
- package/dist/routes-api.js +0 -24
- package/dist/routes-api.js.map +1 -1
- package/dist/runs-api.d.ts +0 -11
- package/dist/runs-api.js.map +1 -1
- package/dist/safe-fs.d.ts +0 -57
- package/dist/safe-fs.js +0 -61
- package/dist/safe-fs.js.map +1 -1
- package/dist/schema-skew.d.ts +0 -68
- package/dist/schema-skew.js +2 -75
- package/dist/schema-skew.js.map +1 -1
- package/dist/seats.d.ts +1 -11
- package/dist/seats.js.map +1 -1
- package/dist/secret-file.d.ts +0 -8
- package/dist/secret-file.js +1 -17
- package/dist/secret-file.js.map +1 -1
- package/dist/secret-form.d.ts +0 -43
- package/dist/secret-form.js +3 -9
- package/dist/secret-form.js.map +1 -1
- package/dist/secret-input.d.ts +0 -59
- package/dist/secret-input.js +0 -22
- package/dist/secret-input.js.map +1 -1
- package/dist/setup-api.d.ts +8 -0
- package/dist/setup-api.js +25 -0
- package/dist/setup-api.js.map +1 -0
- package/dist/skills-api.d.ts +0 -21
- package/dist/skills-api.js +0 -1
- package/dist/skills-api.js.map +1 -1
- package/dist/source-locator.d.ts +0 -50
- package/dist/source-locator.js +0 -77
- package/dist/source-locator.js.map +1 -1
- package/dist/source-products-api.d.ts +2 -1
- package/dist/source-products-api.js +1 -25
- package/dist/source-products-api.js.map +1 -1
- package/dist/source-target.d.ts +0 -6
- package/dist/source-target.js +0 -6
- package/dist/source-target.js.map +1 -1
- package/dist/sources-api.d.ts +1 -31
- package/dist/sources-api.js +0 -6
- package/dist/sources-api.js.map +1 -1
- package/dist/team-connect-api.d.ts +1 -20
- package/dist/team-connect-api.js +1 -32
- package/dist/team-connect-api.js.map +1 -1
- package/dist/team-lifecycle-api.d.ts +3 -4
- package/dist/team-lifecycle-api.js +3 -26
- package/dist/team-lifecycle-api.js.map +1 -1
- package/dist/teams-api.d.ts +0 -50
- package/dist/teams-api.js +6 -11
- package/dist/teams-api.js.map +1 -1
- package/dist/templates.d.ts +0 -18
- package/dist/templates.js +0 -18
- package/dist/templates.js.map +1 -1
- package/dist/test-report.d.ts +2 -18
- package/dist/test-report.js +1 -85
- package/dist/test-report.js.map +1 -1
- package/dist/toolchain-api.d.ts +4 -60
- package/dist/toolchain-api.js +5 -6
- package/dist/toolchain-api.js.map +1 -1
- package/dist/toolchain-resolve.d.ts +0 -3
- package/dist/toolchain-resolve.js +0 -27
- package/dist/toolchain-resolve.js.map +1 -1
- package/dist/toolchain-snapshot.d.ts +0 -16
- package/dist/toolchain-snapshot.js +0 -20
- package/dist/toolchain-snapshot.js.map +1 -1
- package/dist/toolchain.d.ts +0 -9
- package/dist/toolchain.js +0 -16
- package/dist/toolchain.js.map +1 -1
- package/dist/ui.d.ts +6 -62
- package/dist/ui.js +0 -23
- package/dist/ui.js.map +1 -1
- package/dist/unknown-command.d.ts +0 -13
- package/dist/unknown-command.js +0 -14
- package/dist/unknown-command.js.map +1 -1
- package/dist/update-notice.d.ts +0 -26
- package/dist/update-notice.js +1 -74
- package/dist/update-notice.js.map +1 -1
- package/dist/validate-findings.d.ts +0 -39
- package/dist/validate-findings.js +5 -57
- package/dist/validate-findings.js.map +1 -1
- package/dist/wizard.d.ts +2 -63
- package/dist/wizard.js +0 -38
- package/dist/wizard.js.map +1 -1
- package/dist/workflows-api.d.ts +1 -19
- package/dist/workflows-api.js.map +1 -1
- package/dist/workspace-root.d.ts +0 -15
- package/dist/workspace-root.js +1 -17
- package/dist/workspace-root.js.map +1 -1
- package/loader/declaration-loader.hooks.mjs +187 -0
- package/loader/host-load-probe.mjs +20 -0
- package/loader/register-declaration-loader.mjs +3 -0
- package/node_modules/@gar/promise-retry/LICENSE +20 -0
- package/node_modules/@gar/promise-retry/lib/index.js +62 -0
- package/node_modules/@gar/promise-retry/lib/retry.js +109 -0
- package/node_modules/@gar/promise-retry/package.json +45 -0
- package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/package.json +72 -0
- package/node_modules/@isaacs/string-locale-compare/LICENSE +15 -0
- package/node_modules/@isaacs/string-locale-compare/index.js +42 -0
- package/node_modules/@isaacs/string-locale-compare/package.json +28 -0
- package/node_modules/@npmcli/agent/lib/agents.js +258 -0
- package/node_modules/@npmcli/agent/lib/dns.js +53 -0
- package/node_modules/@npmcli/agent/lib/errors.js +61 -0
- package/node_modules/@npmcli/agent/lib/index.js +56 -0
- package/node_modules/@npmcli/agent/lib/options.js +90 -0
- package/node_modules/@npmcli/agent/lib/proxy.js +88 -0
- package/node_modules/@npmcli/agent/package.json +62 -0
- package/node_modules/@npmcli/arborist/LICENSE.md +20 -0
- package/node_modules/@npmcli/arborist/README.md +315 -0
- package/node_modules/@npmcli/arborist/bin/actual.js +19 -0
- package/node_modules/@npmcli/arborist/bin/audit.js +51 -0
- package/node_modules/@npmcli/arborist/bin/funding.js +38 -0
- package/node_modules/@npmcli/arborist/bin/ideal.js +14 -0
- package/node_modules/@npmcli/arborist/bin/index.js +112 -0
- package/node_modules/@npmcli/arborist/bin/lib/logging.js +77 -0
- package/node_modules/@npmcli/arborist/bin/lib/options.js +123 -0
- package/node_modules/@npmcli/arborist/bin/lib/print-tree.js +4 -0
- package/node_modules/@npmcli/arborist/bin/lib/timers.js +33 -0
- package/node_modules/@npmcli/arborist/bin/license.js +48 -0
- package/node_modules/@npmcli/arborist/bin/prune.js +48 -0
- package/node_modules/@npmcli/arborist/bin/reify.js +48 -0
- package/node_modules/@npmcli/arborist/bin/shrinkwrap.js +7 -0
- package/node_modules/@npmcli/arborist/bin/virtual.js +14 -0
- package/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js +143 -0
- package/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +1706 -0
- package/node_modules/@npmcli/arborist/lib/arborist/index.js +322 -0
- package/node_modules/@npmcli/arborist/lib/arborist/isolated-reifier.js +513 -0
- package/node_modules/@npmcli/arborist/lib/arborist/load-actual.js +491 -0
- package/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js +311 -0
- package/node_modules/@npmcli/arborist/lib/arborist/rebuild.js +426 -0
- package/node_modules/@npmcli/arborist/lib/arborist/reify.js +2023 -0
- package/node_modules/@npmcli/arborist/lib/audit-report.js +389 -0
- package/node_modules/@npmcli/arborist/lib/calc-dep-flags.js +123 -0
- package/node_modules/@npmcli/arborist/lib/can-place-dep.js +449 -0
- package/node_modules/@npmcli/arborist/lib/case-insensitive-map.js +50 -0
- package/node_modules/@npmcli/arborist/lib/consistent-resolve.js +44 -0
- package/node_modules/@npmcli/arborist/lib/debug.js +32 -0
- package/node_modules/@npmcli/arborist/lib/deepest-nesting-target.js +18 -0
- package/node_modules/@npmcli/arborist/lib/dep-valid.js +179 -0
- package/node_modules/@npmcli/arborist/lib/diff.js +330 -0
- package/node_modules/@npmcli/arborist/lib/edge.js +364 -0
- package/node_modules/@npmcli/arborist/lib/from-path.js +30 -0
- package/node_modules/@npmcli/arborist/lib/gather-dep-set.js +43 -0
- package/node_modules/@npmcli/arborist/lib/index.js +6 -0
- package/node_modules/@npmcli/arborist/lib/install-scripts.js +114 -0
- package/node_modules/@npmcli/arborist/lib/inventory.js +137 -0
- package/node_modules/@npmcli/arborist/lib/isolated-classes.js +148 -0
- package/node_modules/@npmcli/arborist/lib/link.js +162 -0
- package/node_modules/@npmcli/arborist/lib/node.js +1632 -0
- package/node_modules/@npmcli/arborist/lib/optional-set.js +32 -0
- package/node_modules/@npmcli/arborist/lib/override-resolves.js +11 -0
- package/node_modules/@npmcli/arborist/lib/override-set.js +304 -0
- package/node_modules/@npmcli/arborist/lib/packument-cache.js +77 -0
- package/node_modules/@npmcli/arborist/lib/peer-entry-sets.js +77 -0
- package/node_modules/@npmcli/arborist/lib/place-dep.js +570 -0
- package/node_modules/@npmcli/arborist/lib/printable.js +198 -0
- package/node_modules/@npmcli/arborist/lib/query-selector-all.js +961 -0
- package/node_modules/@npmcli/arborist/lib/realpath.js +95 -0
- package/node_modules/@npmcli/arborist/lib/release-age-exclude.js +45 -0
- package/node_modules/@npmcli/arborist/lib/relpath.js +3 -0
- package/node_modules/@npmcli/arborist/lib/reset-dep-flags.js +11 -0
- package/node_modules/@npmcli/arborist/lib/retire-path.js +19 -0
- package/node_modules/@npmcli/arborist/lib/script-allowed.js +384 -0
- package/node_modules/@npmcli/arborist/lib/shrinkwrap.js +1231 -0
- package/node_modules/@npmcli/arborist/lib/signal-handling.js +74 -0
- package/node_modules/@npmcli/arborist/lib/signals.js +58 -0
- package/node_modules/@npmcli/arborist/lib/spec-from-lock.js +34 -0
- package/node_modules/@npmcli/arborist/lib/tracker.js +86 -0
- package/node_modules/@npmcli/arborist/lib/tree-check.js +155 -0
- package/node_modules/@npmcli/arborist/lib/unreviewed-scripts.js +101 -0
- package/node_modules/@npmcli/arborist/lib/version-from-tgz.js +47 -0
- package/node_modules/@npmcli/arborist/lib/vuln.js +218 -0
- package/node_modules/@npmcli/arborist/lib/yarn-lock.js +377 -0
- package/node_modules/@npmcli/arborist/package.json +99 -0
- package/node_modules/@npmcli/config/LICENSE +15 -0
- package/node_modules/@npmcli/config/README.md +226 -0
- package/node_modules/@npmcli/config/lib/definitions/definition.js +255 -0
- package/node_modules/@npmcli/config/lib/definitions/definitions.js +2711 -0
- package/node_modules/@npmcli/config/lib/definitions/index.js +88 -0
- package/node_modules/@npmcli/config/lib/env-replace.js +16 -0
- package/node_modules/@npmcli/config/lib/errors.js +23 -0
- package/node_modules/@npmcli/config/lib/index.js +1034 -0
- package/node_modules/@npmcli/config/lib/nerf-dart.js +18 -0
- package/node_modules/@npmcli/config/lib/parse-allow-scripts-list.js +23 -0
- package/node_modules/@npmcli/config/lib/parse-field.js +86 -0
- package/node_modules/@npmcli/config/lib/set-envs.js +113 -0
- package/node_modules/@npmcli/config/lib/type-defs.js +61 -0
- package/node_modules/@npmcli/config/lib/type-description.js +21 -0
- package/node_modules/@npmcli/config/lib/umask.js +35 -0
- package/node_modules/@npmcli/config/package.json +57 -0
- package/node_modules/@npmcli/fs/LICENSE.md +20 -0
- package/node_modules/@npmcli/fs/lib/common/get-options.js +20 -0
- package/node_modules/@npmcli/fs/lib/common/node.js +9 -0
- package/node_modules/@npmcli/fs/lib/cp/LICENSE +15 -0
- package/node_modules/@npmcli/fs/lib/cp/errors.js +129 -0
- package/node_modules/@npmcli/fs/lib/cp/index.js +22 -0
- package/node_modules/@npmcli/fs/lib/cp/polyfill.js +428 -0
- package/node_modules/@npmcli/fs/lib/index.js +13 -0
- package/node_modules/@npmcli/fs/lib/move-file.js +78 -0
- package/node_modules/@npmcli/fs/lib/readdir-scoped.js +20 -0
- package/node_modules/@npmcli/fs/lib/with-temp-dir.js +39 -0
- package/node_modules/@npmcli/fs/package.json +54 -0
- package/node_modules/@npmcli/git/LICENSE +15 -0
- package/node_modules/@npmcli/git/lib/clone.js +172 -0
- package/node_modules/@npmcli/git/lib/errors.js +36 -0
- package/node_modules/@npmcli/git/lib/find.js +15 -0
- package/node_modules/@npmcli/git/lib/index.js +9 -0
- package/node_modules/@npmcli/git/lib/is-clean.js +6 -0
- package/node_modules/@npmcli/git/lib/is.js +4 -0
- package/node_modules/@npmcli/git/lib/lines-to-revs.js +147 -0
- package/node_modules/@npmcli/git/lib/make-error.js +33 -0
- package/node_modules/@npmcli/git/lib/opts.js +57 -0
- package/node_modules/@npmcli/git/lib/revs.js +22 -0
- package/node_modules/@npmcli/git/lib/spawn.js +44 -0
- package/node_modules/@npmcli/git/lib/utils.js +3 -0
- package/node_modules/@npmcli/git/lib/which.js +18 -0
- package/node_modules/@npmcli/git/package.json +58 -0
- package/node_modules/@npmcli/installed-package-contents/LICENSE +15 -0
- package/node_modules/@npmcli/installed-package-contents/README.md +109 -0
- package/node_modules/@npmcli/installed-package-contents/bin/index.js +44 -0
- package/node_modules/@npmcli/installed-package-contents/lib/index.js +181 -0
- package/node_modules/@npmcli/installed-package-contents/package.json +52 -0
- package/node_modules/@npmcli/map-workspaces/LICENSE.md +20 -0
- package/node_modules/@npmcli/map-workspaces/lib/index.js +226 -0
- package/node_modules/@npmcli/map-workspaces/package.json +61 -0
- package/node_modules/@npmcli/metavuln-calculator/LICENSE +15 -0
- package/node_modules/@npmcli/metavuln-calculator/lib/advisory.js +435 -0
- package/node_modules/@npmcli/metavuln-calculator/lib/get-dep-spec.js +15 -0
- package/node_modules/@npmcli/metavuln-calculator/lib/hash.js +5 -0
- package/node_modules/@npmcli/metavuln-calculator/lib/index.js +128 -0
- package/node_modules/@npmcli/metavuln-calculator/package.json +62 -0
- package/node_modules/@npmcli/name-from-folder/LICENSE +15 -0
- package/node_modules/@npmcli/name-from-folder/lib/index.js +7 -0
- package/node_modules/@npmcli/name-from-folder/package.json +45 -0
- package/node_modules/@npmcli/node-gyp/LICENSE +7 -0
- package/node_modules/@npmcli/node-gyp/lib/index.js +14 -0
- package/node_modules/@npmcli/node-gyp/package.json +50 -0
- package/node_modules/@npmcli/package-json/LICENSE +18 -0
- package/node_modules/@npmcli/package-json/lib/index.js +296 -0
- package/node_modules/@npmcli/package-json/lib/license.js +27 -0
- package/node_modules/@npmcli/package-json/lib/normalize-data.js +254 -0
- package/node_modules/@npmcli/package-json/lib/normalize.js +614 -0
- package/node_modules/@npmcli/package-json/lib/read-package.js +39 -0
- package/node_modules/@npmcli/package-json/lib/sort.js +101 -0
- package/node_modules/@npmcli/package-json/lib/update-dependencies.js +75 -0
- package/node_modules/@npmcli/package-json/lib/update-scripts.js +29 -0
- package/node_modules/@npmcli/package-json/lib/update-workspaces.js +26 -0
- package/node_modules/@npmcli/package-json/package.json +59 -0
- package/node_modules/@npmcli/promise-spawn/LICENSE +15 -0
- package/node_modules/@npmcli/promise-spawn/lib/escape.js +67 -0
- package/node_modules/@npmcli/promise-spawn/lib/index.js +218 -0
- package/node_modules/@npmcli/promise-spawn/package.json +51 -0
- package/node_modules/@npmcli/query/LICENSE +20 -0
- package/node_modules/@npmcli/query/lib/index.js +255 -0
- package/node_modules/@npmcli/query/package.json +64 -0
- package/node_modules/@npmcli/redact/LICENSE +21 -0
- package/node_modules/@npmcli/redact/lib/deep-map.js +71 -0
- package/node_modules/@npmcli/redact/lib/error.js +28 -0
- package/node_modules/@npmcli/redact/lib/index.js +44 -0
- package/node_modules/@npmcli/redact/lib/matchers.js +88 -0
- package/node_modules/@npmcli/redact/lib/server.js +59 -0
- package/node_modules/@npmcli/redact/lib/utils.js +202 -0
- package/node_modules/@npmcli/redact/package.json +52 -0
- package/node_modules/@npmcli/run-script/LICENSE +15 -0
- package/node_modules/@npmcli/run-script/lib/is-server-package.js +11 -0
- package/node_modules/@npmcli/run-script/lib/make-spawn-args.js +53 -0
- package/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp +2 -0
- package/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp.cmd +1 -0
- package/node_modules/@npmcli/run-script/lib/package-envs.js +29 -0
- package/node_modules/@npmcli/run-script/lib/run-script-pkg.js +114 -0
- package/node_modules/@npmcli/run-script/lib/run-script.js +15 -0
- package/node_modules/@npmcli/run-script/lib/set-path.js +53 -0
- package/node_modules/@npmcli/run-script/lib/signal-manager.js +50 -0
- package/node_modules/@npmcli/run-script/lib/validate-options.js +39 -0
- package/node_modules/@npmcli/run-script/package.json +53 -0
- package/node_modules/@sigstore/bundle/LICENSE +202 -0
- package/node_modules/@sigstore/bundle/dist/build.js +100 -0
- package/node_modules/@sigstore/bundle/dist/bundle.js +24 -0
- package/node_modules/@sigstore/bundle/dist/error.js +25 -0
- package/node_modules/@sigstore/bundle/dist/index.js +43 -0
- package/node_modules/@sigstore/bundle/dist/serialized.js +49 -0
- package/node_modules/@sigstore/bundle/dist/utility.js +2 -0
- package/node_modules/@sigstore/bundle/dist/validate.js +199 -0
- package/node_modules/@sigstore/bundle/package.json +35 -0
- package/node_modules/@sigstore/core/LICENSE +202 -0
- package/node_modules/@sigstore/core/dist/asn1/error.js +24 -0
- package/node_modules/@sigstore/core/dist/asn1/index.js +20 -0
- package/node_modules/@sigstore/core/dist/asn1/length.js +62 -0
- package/node_modules/@sigstore/core/dist/asn1/obj.js +155 -0
- package/node_modules/@sigstore/core/dist/asn1/parse.js +124 -0
- package/node_modules/@sigstore/core/dist/asn1/tag.js +89 -0
- package/node_modules/@sigstore/core/dist/crypto.js +69 -0
- package/node_modules/@sigstore/core/dist/dsse.js +29 -0
- package/node_modules/@sigstore/core/dist/encoding.js +27 -0
- package/node_modules/@sigstore/core/dist/index.js +66 -0
- package/node_modules/@sigstore/core/dist/json.js +60 -0
- package/node_modules/@sigstore/core/dist/oid.js +20 -0
- package/node_modules/@sigstore/core/dist/pem.js +43 -0
- package/node_modules/@sigstore/core/dist/rfc3161/error.js +21 -0
- package/node_modules/@sigstore/core/dist/rfc3161/index.js +20 -0
- package/node_modules/@sigstore/core/dist/rfc3161/timestamp.js +212 -0
- package/node_modules/@sigstore/core/dist/rfc3161/tstinfo.js +72 -0
- package/node_modules/@sigstore/core/dist/stream.js +117 -0
- package/node_modules/@sigstore/core/dist/x509/cert.js +245 -0
- package/node_modules/@sigstore/core/dist/x509/ext.js +146 -0
- package/node_modules/@sigstore/core/dist/x509/index.js +23 -0
- package/node_modules/@sigstore/core/dist/x509/sct.js +158 -0
- package/node_modules/@sigstore/core/package.json +31 -0
- package/node_modules/@sigstore/protobuf-specs/LICENSE +202 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js +59 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js +174 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js +141 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js +35 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js +2179 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js +29 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/dsse.js +55 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/entry.js +81 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/hashedrekord.js +56 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/verifier.js +74 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js +103 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js +612 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js +137 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js +284 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js +281 -0
- package/node_modules/@sigstore/protobuf-specs/dist/index.js +37 -0
- package/node_modules/@sigstore/protobuf-specs/dist/rekor/v2/index.js +35 -0
- package/node_modules/@sigstore/protobuf-specs/package.json +35 -0
- package/node_modules/@sigstore/sign/LICENSE +202 -0
- package/node_modules/@sigstore/sign/dist/bundler/base.js +52 -0
- package/node_modules/@sigstore/sign/dist/bundler/bundle.js +81 -0
- package/node_modules/@sigstore/sign/dist/bundler/dsse.js +47 -0
- package/node_modules/@sigstore/sign/dist/bundler/index.js +7 -0
- package/node_modules/@sigstore/sign/dist/bundler/message.js +30 -0
- package/node_modules/@sigstore/sign/dist/config.js +143 -0
- package/node_modules/@sigstore/sign/dist/error.js +41 -0
- package/node_modules/@sigstore/sign/dist/external/error.js +28 -0
- package/node_modules/@sigstore/sign/dist/external/fetch.js +98 -0
- package/node_modules/@sigstore/sign/dist/external/fulcio.js +42 -0
- package/node_modules/@sigstore/sign/dist/external/rekor-v2.js +45 -0
- package/node_modules/@sigstore/sign/dist/external/rekor.js +81 -0
- package/node_modules/@sigstore/sign/dist/external/tsa.js +44 -0
- package/node_modules/@sigstore/sign/dist/identity/ci.js +74 -0
- package/node_modules/@sigstore/sign/dist/identity/index.js +20 -0
- package/node_modules/@sigstore/sign/dist/identity/provider.js +2 -0
- package/node_modules/@sigstore/sign/dist/index.js +19 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/ca.js +60 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js +43 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/index.js +90 -0
- package/node_modules/@sigstore/sign/dist/signer/index.js +22 -0
- package/node_modules/@sigstore/sign/dist/signer/signer.js +17 -0
- package/node_modules/@sigstore/sign/dist/types/fetch.js +2 -0
- package/node_modules/@sigstore/sign/dist/util/index.js +59 -0
- package/node_modules/@sigstore/sign/dist/util/oidc.js +35 -0
- package/node_modules/@sigstore/sign/dist/util/ua.js +32 -0
- package/node_modules/@sigstore/sign/dist/witness/index.js +24 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/client.js +92 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/entry.js +197 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/index.js +97 -0
- package/node_modules/@sigstore/sign/dist/witness/tsa/client.js +47 -0
- package/node_modules/@sigstore/sign/dist/witness/tsa/index.js +45 -0
- package/node_modules/@sigstore/sign/dist/witness/witness.js +2 -0
- package/node_modules/@sigstore/sign/package.json +45 -0
- package/node_modules/@sigstore/tuf/LICENSE +202 -0
- package/node_modules/@sigstore/tuf/dist/appdata.js +43 -0
- package/node_modules/@sigstore/tuf/dist/client.js +116 -0
- package/node_modules/@sigstore/tuf/dist/error.js +14 -0
- package/node_modules/@sigstore/tuf/dist/index.js +56 -0
- package/node_modules/@sigstore/tuf/dist/target.js +79 -0
- package/node_modules/@sigstore/tuf/package.json +41 -0
- package/node_modules/@sigstore/tuf/seeds.json +1 -0
- package/node_modules/@sigstore/verify/dist/bundle/dsse.js +44 -0
- package/node_modules/@sigstore/verify/dist/bundle/index.js +59 -0
- package/node_modules/@sigstore/verify/dist/bundle/message.js +54 -0
- package/node_modules/@sigstore/verify/dist/error.js +34 -0
- package/node_modules/@sigstore/verify/dist/index.js +28 -0
- package/node_modules/@sigstore/verify/dist/key/certificate.js +216 -0
- package/node_modules/@sigstore/verify/dist/key/index.js +75 -0
- package/node_modules/@sigstore/verify/dist/key/sct.js +78 -0
- package/node_modules/@sigstore/verify/dist/policy.js +50 -0
- package/node_modules/@sigstore/verify/dist/shared.types.js +2 -0
- package/node_modules/@sigstore/verify/dist/timestamp/index.js +24 -0
- package/node_modules/@sigstore/verify/dist/timestamp/tsa.js +63 -0
- package/node_modules/@sigstore/verify/dist/tlog/checkpoint.js +154 -0
- package/node_modules/@sigstore/verify/dist/tlog/dsse.js +106 -0
- package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.js +94 -0
- package/node_modules/@sigstore/verify/dist/tlog/index.js +92 -0
- package/node_modules/@sigstore/verify/dist/tlog/intoto.js +62 -0
- package/node_modules/@sigstore/verify/dist/tlog/merkle.js +104 -0
- package/node_modules/@sigstore/verify/dist/tlog/set.js +60 -0
- package/node_modules/@sigstore/verify/dist/trust/filter.js +23 -0
- package/node_modules/@sigstore/verify/dist/trust/index.js +90 -0
- package/node_modules/@sigstore/verify/dist/trust/trust.types.js +2 -0
- package/node_modules/@sigstore/verify/dist/verifier.js +160 -0
- package/node_modules/@sigstore/verify/package.json +36 -0
- package/node_modules/@tufjs/canonical-json/LICENSE +21 -0
- package/node_modules/@tufjs/canonical-json/lib/index.js +64 -0
- package/node_modules/@tufjs/canonical-json/package.json +35 -0
- package/node_modules/@tufjs/models/LICENSE +21 -0
- package/node_modules/@tufjs/models/dist/base.js +96 -0
- package/node_modules/@tufjs/models/dist/delegations.js +119 -0
- package/node_modules/@tufjs/models/dist/error.js +27 -0
- package/node_modules/@tufjs/models/dist/file.js +191 -0
- package/node_modules/@tufjs/models/dist/index.js +24 -0
- package/node_modules/@tufjs/models/dist/key.js +90 -0
- package/node_modules/@tufjs/models/dist/metadata.js +165 -0
- package/node_modules/@tufjs/models/dist/role.js +310 -0
- package/node_modules/@tufjs/models/dist/root.js +119 -0
- package/node_modules/@tufjs/models/dist/signature.js +40 -0
- package/node_modules/@tufjs/models/dist/snapshot.js +72 -0
- package/node_modules/@tufjs/models/dist/targets.js +94 -0
- package/node_modules/@tufjs/models/dist/timestamp.js +59 -0
- package/node_modules/@tufjs/models/dist/utils/guard.js +32 -0
- package/node_modules/@tufjs/models/dist/utils/index.js +38 -0
- package/node_modules/@tufjs/models/dist/utils/key.js +142 -0
- package/node_modules/@tufjs/models/dist/utils/oid.js +26 -0
- package/node_modules/@tufjs/models/dist/utils/types.js +2 -0
- package/node_modules/@tufjs/models/dist/utils/verify.js +13 -0
- package/node_modules/@tufjs/models/package.json +37 -0
- package/node_modules/abbrev/LICENSE +46 -0
- package/node_modules/abbrev/lib/index.js +53 -0
- package/node_modules/abbrev/package.json +41 -0
- package/node_modules/agent-base/LICENSE +22 -0
- package/node_modules/agent-base/dist/helpers.js +66 -0
- package/node_modules/agent-base/dist/index.js +178 -0
- package/node_modules/agent-base/package.json +46 -0
- package/node_modules/aproba/LICENSE +14 -0
- package/node_modules/aproba/index.js +105 -0
- package/node_modules/aproba/package.json +35 -0
- package/node_modules/archy/LICENSE +18 -0
- package/node_modules/archy/examples/beep.js +24 -0
- package/node_modules/archy/examples/multi_line.js +25 -0
- package/node_modules/archy/index.js +35 -0
- package/node_modules/archy/package.json +40 -0
- package/node_modules/archy/test/beep.js +40 -0
- package/node_modules/archy/test/multi_line.js +45 -0
- package/node_modules/archy/test/non_unicode.js +40 -0
- package/node_modules/balanced-match/LICENSE.md +23 -0
- package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/node_modules/balanced-match/package.json +68 -0
- package/node_modules/bin-links/LICENSE +15 -0
- package/node_modules/bin-links/lib/bin-target.js +9 -0
- package/node_modules/bin-links/lib/check-bin.js +78 -0
- package/node_modules/bin-links/lib/check-bins.js +18 -0
- package/node_modules/bin-links/lib/fix-bin.js +42 -0
- package/node_modules/bin-links/lib/get-node-modules.js +19 -0
- package/node_modules/bin-links/lib/get-paths.js +42 -0
- package/node_modules/bin-links/lib/get-prefix.js +3 -0
- package/node_modules/bin-links/lib/index.js +44 -0
- package/node_modules/bin-links/lib/is-windows.js +2 -0
- package/node_modules/bin-links/lib/link-bin.js +9 -0
- package/node_modules/bin-links/lib/link-bins.js +23 -0
- package/node_modules/bin-links/lib/link-gently.js +96 -0
- package/node_modules/bin-links/lib/link-mans.js +53 -0
- package/node_modules/bin-links/lib/man-target.js +6 -0
- package/node_modules/bin-links/lib/shim-bin.js +87 -0
- package/node_modules/bin-links/package.json +63 -0
- package/node_modules/binary-extensions/binary-extensions.json +264 -0
- package/node_modules/binary-extensions/index.js +3 -0
- package/node_modules/binary-extensions/license +10 -0
- package/node_modules/binary-extensions/package.json +45 -0
- package/node_modules/brace-expansion/LICENSE +23 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +289 -0
- package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/brace-expansion/dist/esm/index.js +285 -0
- package/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/brace-expansion/package.json +64 -0
- package/node_modules/cacache/LICENSE.md +16 -0
- package/node_modules/cacache/lib/content/path.js +29 -0
- package/node_modules/cacache/lib/content/read.js +165 -0
- package/node_modules/cacache/lib/content/rm.js +18 -0
- package/node_modules/cacache/lib/content/write.js +206 -0
- package/node_modules/cacache/lib/entry-index.js +336 -0
- package/node_modules/cacache/lib/get.js +170 -0
- package/node_modules/cacache/lib/index.js +42 -0
- package/node_modules/cacache/lib/memoization.js +72 -0
- package/node_modules/cacache/lib/put.js +80 -0
- package/node_modules/cacache/lib/rm.js +31 -0
- package/node_modules/cacache/lib/util/glob.js +7 -0
- package/node_modules/cacache/lib/util/hash-to-segments.js +7 -0
- package/node_modules/cacache/lib/util/tmp.js +32 -0
- package/node_modules/cacache/lib/verify.js +258 -0
- package/node_modules/cacache/package.json +81 -0
- package/node_modules/chalk/license +9 -0
- package/node_modules/chalk/package.json +83 -0
- package/node_modules/chalk/source/index.js +225 -0
- package/node_modules/chalk/source/utilities.js +33 -0
- package/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/node_modules/chownr/LICENSE.md +63 -0
- package/node_modules/chownr/dist/commonjs/index.js +93 -0
- package/node_modules/chownr/dist/commonjs/package.json +3 -0
- package/node_modules/chownr/dist/esm/index.js +85 -0
- package/node_modules/chownr/dist/esm/package.json +3 -0
- package/node_modules/chownr/package.json +69 -0
- package/node_modules/ci-info/LICENSE +21 -0
- package/node_modules/ci-info/index.js +104 -0
- package/node_modules/ci-info/package.json +54 -0
- package/node_modules/ci-info/vendors.json +363 -0
- package/node_modules/cidr-regex/LICENSE +22 -0
- package/node_modules/cidr-regex/dist/index.js +21 -0
- package/node_modules/cidr-regex/package.json +51 -0
- package/node_modules/cmd-shim/LICENSE +15 -0
- package/node_modules/cmd-shim/lib/index.js +247 -0
- package/node_modules/cmd-shim/lib/to-batch-syntax.js +49 -0
- package/node_modules/cmd-shim/package.json +48 -0
- package/node_modules/common-ancestor-path/LICENSE.md +55 -0
- package/node_modules/common-ancestor-path/dist/commonjs/index.js +20 -0
- package/node_modules/common-ancestor-path/dist/commonjs/package.json +3 -0
- package/node_modules/common-ancestor-path/dist/esm/index.js +16 -0
- package/node_modules/common-ancestor-path/dist/esm/package.json +3 -0
- package/node_modules/common-ancestor-path/package.json +60 -0
- package/node_modules/cssesc/LICENSE-MIT.txt +20 -0
- package/node_modules/cssesc/README.md +201 -0
- package/node_modules/cssesc/bin/cssesc +116 -0
- package/node_modules/cssesc/cssesc.js +110 -0
- package/node_modules/cssesc/man/cssesc.1 +70 -0
- package/node_modules/cssesc/package.json +51 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/diff/CONTRIBUTING.md +28 -0
- package/node_modules/diff/LICENSE +29 -0
- package/node_modules/diff/dist/diff.js +1782 -0
- package/node_modules/diff/dist/diff.min.js +1 -0
- package/node_modules/diff/eslint.config.mjs +182 -0
- package/node_modules/diff/libcjs/convert/dmp.js +24 -0
- package/node_modules/diff/libcjs/convert/xml.js +34 -0
- package/node_modules/diff/libcjs/diff/array.js +40 -0
- package/node_modules/diff/libcjs/diff/base.js +265 -0
- package/node_modules/diff/libcjs/diff/character.js +31 -0
- package/node_modules/diff/libcjs/diff/css.js +34 -0
- package/node_modules/diff/libcjs/diff/json.js +105 -0
- package/node_modules/diff/libcjs/diff/line.js +89 -0
- package/node_modules/diff/libcjs/diff/sentence.js +67 -0
- package/node_modules/diff/libcjs/diff/word.js +312 -0
- package/node_modules/diff/libcjs/index.js +64 -0
- package/node_modules/diff/libcjs/package.json +1 -0
- package/node_modules/diff/libcjs/patch/apply.js +267 -0
- package/node_modules/diff/libcjs/patch/create.js +251 -0
- package/node_modules/diff/libcjs/patch/line-endings.js +61 -0
- package/node_modules/diff/libcjs/patch/parse.js +150 -0
- package/node_modules/diff/libcjs/patch/reverse.js +37 -0
- package/node_modules/diff/libcjs/types.js +2 -0
- package/node_modules/diff/libcjs/util/array.js +21 -0
- package/node_modules/diff/libcjs/util/distance-iterator.js +40 -0
- package/node_modules/diff/libcjs/util/params.js +17 -0
- package/node_modules/diff/libcjs/util/string.js +200 -0
- package/node_modules/diff/libesm/convert/dmp.js +21 -0
- package/node_modules/diff/libesm/convert/xml.js +31 -0
- package/node_modules/diff/libesm/diff/array.js +16 -0
- package/node_modules/diff/libesm/diff/base.js +253 -0
- package/node_modules/diff/libesm/diff/character.js +7 -0
- package/node_modules/diff/libesm/diff/css.js +10 -0
- package/node_modules/diff/libesm/diff/json.js +78 -0
- package/node_modules/diff/libesm/diff/line.js +65 -0
- package/node_modules/diff/libesm/diff/sentence.js +43 -0
- package/node_modules/diff/libesm/diff/word.js +281 -0
- package/node_modules/diff/libesm/index.js +30 -0
- package/node_modules/diff/libesm/package.json +1 -0
- package/node_modules/diff/libesm/patch/apply.js +257 -0
- package/node_modules/diff/libesm/patch/create.js +228 -0
- package/node_modules/diff/libesm/patch/line-endings.js +44 -0
- package/node_modules/diff/libesm/patch/parse.js +147 -0
- package/node_modules/diff/libesm/patch/reverse.js +23 -0
- package/node_modules/diff/libesm/types.js +1 -0
- package/node_modules/diff/libesm/util/array.js +17 -0
- package/node_modules/diff/libesm/util/distance-iterator.js +37 -0
- package/node_modules/diff/libesm/util/params.js +14 -0
- package/node_modules/diff/libesm/util/string.js +184 -0
- package/node_modules/diff/package.json +130 -0
- package/node_modules/diff/release-notes.md +432 -0
- package/node_modules/env-paths/index.js +74 -0
- package/node_modules/env-paths/license +9 -0
- package/node_modules/env-paths/package.json +45 -0
- package/node_modules/exponential-backoff/LICENSE +202 -0
- package/node_modules/exponential-backoff/dist/backoff.js +124 -0
- package/node_modules/exponential-backoff/dist/delay/always/always.delay.js +25 -0
- package/node_modules/exponential-backoff/dist/delay/delay.base.js +45 -0
- package/node_modules/exponential-backoff/dist/delay/delay.factory.js +17 -0
- package/node_modules/exponential-backoff/dist/delay/delay.interface.js +3 -0
- package/node_modules/exponential-backoff/dist/delay/skip-first/skip-first.delay.js +82 -0
- package/node_modules/exponential-backoff/dist/jitter/full/full.jitter.js +8 -0
- package/node_modules/exponential-backoff/dist/jitter/jitter.factory.js +15 -0
- package/node_modules/exponential-backoff/dist/jitter/no/no.jitter.js +7 -0
- package/node_modules/exponential-backoff/dist/options.js +31 -0
- package/node_modules/exponential-backoff/package.json +62 -0
- package/node_modules/fastest-levenshtein/LICENSE.md +21 -0
- package/node_modules/fastest-levenshtein/bench.js +96 -0
- package/node_modules/fastest-levenshtein/esm/mod.js +138 -0
- package/node_modules/fastest-levenshtein/mod.js +142 -0
- package/node_modules/fastest-levenshtein/package.json +72 -0
- package/node_modules/fastest-levenshtein/test.js +55 -0
- package/node_modules/fdir/LICENSE +7 -0
- package/node_modules/fdir/dist/index.cjs +588 -0
- package/node_modules/fdir/dist/index.d.cts +155 -0
- package/node_modules/fdir/dist/index.d.mts +155 -0
- package/node_modules/fdir/dist/index.mjs +570 -0
- package/node_modules/fdir/package.json +103 -0
- package/node_modules/fs-minipass/LICENSE +15 -0
- package/node_modules/fs-minipass/lib/index.js +443 -0
- package/node_modules/fs-minipass/package.json +54 -0
- package/node_modules/glob/LICENSE.md +63 -0
- package/node_modules/glob/dist/commonjs/glob.js +248 -0
- package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/node_modules/glob/dist/commonjs/index.js +68 -0
- package/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/node_modules/glob/dist/commonjs/package.json +3 -0
- package/node_modules/glob/dist/commonjs/pattern.js +223 -0
- package/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/node_modules/glob/dist/esm/glob.js +244 -0
- package/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/node_modules/glob/dist/esm/ignore.js +115 -0
- package/node_modules/glob/dist/esm/index.js +55 -0
- package/node_modules/glob/dist/esm/index.min.js +4 -0
- package/node_modules/glob/dist/esm/package.json +3 -0
- package/node_modules/glob/dist/esm/pattern.js +219 -0
- package/node_modules/glob/dist/esm/processor.js +294 -0
- package/node_modules/glob/dist/esm/walker.js +381 -0
- package/node_modules/glob/package.json +98 -0
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/clone.js +23 -0
- package/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/graceful-fs/package.json +53 -0
- package/node_modules/graceful-fs/polyfills.js +355 -0
- package/node_modules/hosted-git-info/LICENSE +13 -0
- package/node_modules/hosted-git-info/lib/from-url.js +122 -0
- package/node_modules/hosted-git-info/lib/hosts.js +229 -0
- package/node_modules/hosted-git-info/lib/index.js +227 -0
- package/node_modules/hosted-git-info/lib/parse-url.js +81 -0
- package/node_modules/hosted-git-info/package.json +57 -0
- package/node_modules/http-cache-semantics/LICENSE +9 -0
- package/node_modules/http-cache-semantics/index.js +928 -0
- package/node_modules/http-cache-semantics/package.json +22 -0
- package/node_modules/http-proxy-agent/LICENSE +22 -0
- package/node_modules/http-proxy-agent/dist/index.js +148 -0
- package/node_modules/http-proxy-agent/package.json +47 -0
- package/node_modules/https-proxy-agent/LICENSE +22 -0
- package/node_modules/https-proxy-agent/dist/index.js +180 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +101 -0
- package/node_modules/https-proxy-agent/package.json +50 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/node_modules/iconv-lite/encodings/utf32.js +307 -0
- package/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/node_modules/iconv-lite/lib/index.js +182 -0
- package/node_modules/iconv-lite/lib/streams.js +105 -0
- package/node_modules/iconv-lite/package.json +70 -0
- package/node_modules/ignore-walk/LICENSE +15 -0
- package/node_modules/ignore-walk/lib/index.js +310 -0
- package/node_modules/ignore-walk/package.json +64 -0
- package/node_modules/ini/LICENSE +15 -0
- package/node_modules/ini/lib/ini.js +280 -0
- package/node_modules/ini/package.json +45 -0
- package/node_modules/init-package-json/LICENSE.md +18 -0
- package/node_modules/init-package-json/lib/default-input.js +286 -0
- package/node_modules/init-package-json/lib/init-package-json.js +147 -0
- package/node_modules/init-package-json/package.json +66 -0
- package/node_modules/ip-address/LICENSE +19 -0
- package/node_modules/ip-address/dist/address-error.js +12 -0
- package/node_modules/ip-address/dist/common.js +106 -0
- package/node_modules/ip-address/dist/ip-address.js +35 -0
- package/node_modules/ip-address/dist/ipv4.js +505 -0
- package/node_modules/ip-address/dist/ipv6.js +1353 -0
- package/node_modules/ip-address/dist/v4/constants.js +12 -0
- package/node_modules/ip-address/dist/v6/constants.js +82 -0
- package/node_modules/ip-address/dist/v6/helpers.js +54 -0
- package/node_modules/ip-address/dist/v6/regular-expressions.js +95 -0
- package/node_modules/ip-address/package.json +90 -0
- package/node_modules/is-cidr/LICENSE +22 -0
- package/node_modules/is-cidr/dist/index.js +11 -0
- package/node_modules/is-cidr/package.json +41 -0
- package/node_modules/isexe/LICENSE.md +55 -0
- package/node_modules/isexe/dist/commonjs/index.js +56 -0
- package/node_modules/isexe/dist/commonjs/index.min.js +2 -0
- package/node_modules/isexe/dist/commonjs/options.js +3 -0
- package/node_modules/isexe/dist/commonjs/package.json +3 -0
- package/node_modules/isexe/dist/commonjs/posix.js +67 -0
- package/node_modules/isexe/dist/commonjs/win32.js +63 -0
- package/node_modules/isexe/dist/esm/index.js +16 -0
- package/node_modules/isexe/dist/esm/index.min.js +2 -0
- package/node_modules/isexe/dist/esm/options.js +2 -0
- package/node_modules/isexe/dist/esm/package.json +3 -0
- package/node_modules/isexe/dist/esm/posix.js +62 -0
- package/node_modules/isexe/dist/esm/win32.js +58 -0
- package/node_modules/isexe/package.json +78 -0
- package/node_modules/json-parse-even-better-errors/LICENSE.md +25 -0
- package/node_modules/json-parse-even-better-errors/lib/index.js +137 -0
- package/node_modules/json-parse-even-better-errors/package.json +50 -0
- package/node_modules/json-stringify-nice/LICENSE +15 -0
- package/node_modules/json-stringify-nice/index.js +38 -0
- package/node_modules/json-stringify-nice/package.json +40 -0
- package/node_modules/jsonparse/LICENSE +24 -0
- package/node_modules/jsonparse/bench.js +26 -0
- package/node_modules/jsonparse/examples/twitterfeed.js +30 -0
- package/node_modules/jsonparse/jsonparse.js +413 -0
- package/node_modules/jsonparse/package.json +22 -0
- package/node_modules/jsonparse/samplejson/basic.json +167 -0
- package/node_modules/jsonparse/samplejson/basic2.json +180 -0
- package/node_modules/jsonparse/test/big-token.js +24 -0
- package/node_modules/jsonparse/test/boundary.js +110 -0
- package/node_modules/jsonparse/test/offset.js +67 -0
- package/node_modules/jsonparse/test/primitives.js +57 -0
- package/node_modules/jsonparse/test/surrogate.js +26 -0
- package/node_modules/jsonparse/test/unvalid.js +15 -0
- package/node_modules/jsonparse/test/utf8.js +38 -0
- package/node_modules/just-diff/LICENSE +21 -0
- package/node_modules/just-diff/index.cjs +230 -0
- package/node_modules/just-diff/index.mjs +227 -0
- package/node_modules/just-diff/package.json +33 -0
- package/node_modules/just-diff/rollup.config.js +3 -0
- package/node_modules/just-diff-apply/LICENSE +21 -0
- package/node_modules/just-diff-apply/index.cjs +161 -0
- package/node_modules/just-diff-apply/index.mjs +158 -0
- package/node_modules/just-diff-apply/package.json +34 -0
- package/node_modules/just-diff-apply/rollup.config.js +3 -0
- package/node_modules/libnpmaccess/LICENSE +13 -0
- package/node_modules/libnpmaccess/README.md +93 -0
- package/node_modules/libnpmaccess/lib/index.js +140 -0
- package/node_modules/libnpmaccess/package.json +53 -0
- package/node_modules/libnpmdiff/LICENSE +15 -0
- package/node_modules/libnpmdiff/README.md +103 -0
- package/node_modules/libnpmdiff/lib/format-diff.js +118 -0
- package/node_modules/libnpmdiff/lib/index.js +65 -0
- package/node_modules/libnpmdiff/lib/should-print-patch.js +22 -0
- package/node_modules/libnpmdiff/lib/tarball.js +38 -0
- package/node_modules/libnpmdiff/lib/untar.js +96 -0
- package/node_modules/libnpmdiff/package.json +70 -0
- package/node_modules/libnpmexec/LICENSE +15 -0
- package/node_modules/libnpmexec/README.md +47 -0
- package/node_modules/libnpmexec/lib/file-exists.js +33 -0
- package/node_modules/libnpmexec/lib/get-bin-from-manifest.js +22 -0
- package/node_modules/libnpmexec/lib/index.js +332 -0
- package/node_modules/libnpmexec/lib/is-windows.js +1 -0
- package/node_modules/libnpmexec/lib/no-tty.js +1 -0
- package/node_modules/libnpmexec/lib/run-script.js +75 -0
- package/node_modules/libnpmexec/lib/strict-allow-scripts-preflight.js +40 -0
- package/node_modules/libnpmexec/lib/with-lock.js +177 -0
- package/node_modules/libnpmexec/package.json +81 -0
- package/node_modules/libnpmfund/LICENSE +15 -0
- package/node_modules/libnpmfund/README.md +131 -0
- package/node_modules/libnpmfund/lib/index.js +210 -0
- package/node_modules/libnpmfund/package.json +65 -0
- package/node_modules/libnpmorg/LICENSE +13 -0
- package/node_modules/libnpmorg/README.md +148 -0
- package/node_modules/libnpmorg/lib/index.js +64 -0
- package/node_modules/libnpmorg/package.json +62 -0
- package/node_modules/libnpmpack/LICENSE +13 -0
- package/node_modules/libnpmpack/README.md +55 -0
- package/node_modules/libnpmpack/lib/index.js +67 -0
- package/node_modules/libnpmpack/package.json +59 -0
- package/node_modules/libnpmpublish/LICENSE +13 -0
- package/node_modules/libnpmpublish/README.md +127 -0
- package/node_modules/libnpmpublish/lib/index.js +4 -0
- package/node_modules/libnpmpublish/lib/provenance.js +245 -0
- package/node_modules/libnpmpublish/lib/publish.js +231 -0
- package/node_modules/libnpmpublish/lib/unpublish.js +119 -0
- package/node_modules/libnpmpublish/package.json +64 -0
- package/node_modules/libnpmsearch/LICENSE +13 -0
- package/node_modules/libnpmsearch/README.md +173 -0
- package/node_modules/libnpmsearch/lib/index.js +71 -0
- package/node_modules/libnpmsearch/package.json +58 -0
- package/node_modules/libnpmteam/LICENSE +13 -0
- package/node_modules/libnpmteam/README.md +172 -0
- package/node_modules/libnpmteam/lib/index.js +92 -0
- package/node_modules/libnpmteam/package.json +52 -0
- package/node_modules/libnpmversion/LICENSE +15 -0
- package/node_modules/libnpmversion/README.md +166 -0
- package/node_modules/libnpmversion/lib/commit.js +17 -0
- package/node_modules/libnpmversion/lib/enforce-clean.js +32 -0
- package/node_modules/libnpmversion/lib/index.js +38 -0
- package/node_modules/libnpmversion/lib/read-json.js +6 -0
- package/node_modules/libnpmversion/lib/retrieve-tag.js +13 -0
- package/node_modules/libnpmversion/lib/tag.js +30 -0
- package/node_modules/libnpmversion/lib/version.js +136 -0
- package/node_modules/libnpmversion/lib/write-json.js +15 -0
- package/node_modules/libnpmversion/package.json +55 -0
- package/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.js +1726 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/index.js +1726 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.js +1726 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/lru-cache/dist/esm/browser/index.js +1722 -0
- package/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/lru-cache/dist/esm/index.js +1722 -0
- package/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/lru-cache/dist/esm/node/index.js +1722 -0
- package/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/lru-cache/package.json +154 -0
- package/node_modules/make-fetch-happen/LICENSE +16 -0
- package/node_modules/make-fetch-happen/lib/cache/entry.js +471 -0
- package/node_modules/make-fetch-happen/lib/cache/errors.js +11 -0
- package/node_modules/make-fetch-happen/lib/cache/index.js +49 -0
- package/node_modules/make-fetch-happen/lib/cache/key.js +17 -0
- package/node_modules/make-fetch-happen/lib/cache/policy.js +161 -0
- package/node_modules/make-fetch-happen/lib/fetch.js +118 -0
- package/node_modules/make-fetch-happen/lib/index.js +41 -0
- package/node_modules/make-fetch-happen/lib/options.js +59 -0
- package/node_modules/make-fetch-happen/lib/pipeline.js +41 -0
- package/node_modules/make-fetch-happen/lib/remote.js +134 -0
- package/node_modules/make-fetch-happen/package.json +75 -0
- package/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/ast.js +841 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/node_modules/minimatch/dist/esm/index.js +1114 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/node_modules/minimatch/package.json +73 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/minipass-collect/LICENSE +15 -0
- package/node_modules/minipass-collect/index.js +71 -0
- package/node_modules/minipass-collect/package.json +30 -0
- package/node_modules/minipass-fetch/LICENSE +28 -0
- package/node_modules/minipass-fetch/lib/abort-error.js +17 -0
- package/node_modules/minipass-fetch/lib/blob.js +97 -0
- package/node_modules/minipass-fetch/lib/body.js +360 -0
- package/node_modules/minipass-fetch/lib/fetch-error.js +32 -0
- package/node_modules/minipass-fetch/lib/headers.js +267 -0
- package/node_modules/minipass-fetch/lib/index.js +376 -0
- package/node_modules/minipass-fetch/lib/request.js +282 -0
- package/node_modules/minipass-fetch/lib/response.js +90 -0
- package/node_modules/minipass-fetch/package.json +70 -0
- package/node_modules/minipass-flush/LICENSE.md +55 -0
- package/node_modules/minipass-flush/index.js +39 -0
- package/node_modules/minipass-flush/package.json +39 -0
- package/node_modules/minipass-pipeline/LICENSE +15 -0
- package/node_modules/minipass-pipeline/index.js +128 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +15 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/index.js +649 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/node_modules/yallist/LICENSE +15 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/node_modules/yallist/iterator.js +8 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/node_modules/yallist/package.json +29 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/node_modules/yallist/yallist.js +426 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/package.json +56 -0
- package/node_modules/minipass-pipeline/package.json +29 -0
- package/node_modules/minipass-sized/LICENSE +15 -0
- package/node_modules/minipass-sized/dist/commonjs/index.js +69 -0
- package/node_modules/minipass-sized/dist/commonjs/package.json +3 -0
- package/node_modules/minipass-sized/dist/esm/index.js +64 -0
- package/node_modules/minipass-sized/dist/esm/package.json +3 -0
- package/node_modules/minipass-sized/package.json +69 -0
- package/node_modules/minizlib/LICENSE +26 -0
- package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/node_modules/minizlib/dist/esm/index.js +363 -0
- package/node_modules/minizlib/dist/esm/package.json +3 -0
- package/node_modules/minizlib/package.json +80 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/mute-stream/LICENSE +15 -0
- package/node_modules/mute-stream/lib/index.js +142 -0
- package/node_modules/mute-stream/package.json +54 -0
- package/node_modules/negotiator/HISTORY.md +114 -0
- package/node_modules/negotiator/LICENSE +24 -0
- package/node_modules/negotiator/index.js +83 -0
- package/node_modules/negotiator/lib/charset.js +169 -0
- package/node_modules/negotiator/lib/encoding.js +205 -0
- package/node_modules/negotiator/lib/language.js +179 -0
- package/node_modules/negotiator/lib/mediaType.js +294 -0
- package/node_modules/negotiator/package.json +43 -0
- package/node_modules/node-gyp/.release-please-manifest.json +3 -0
- package/node_modules/node-gyp/CHANGELOG.md +1240 -0
- package/node_modules/node-gyp/CODE_OF_CONDUCT.md +4 -0
- package/node_modules/node-gyp/CONTRIBUTING.md +44 -0
- package/node_modules/node-gyp/LICENSE +24 -0
- package/node_modules/node-gyp/README.md +290 -0
- package/node_modules/node-gyp/SECURITY.md +2 -0
- package/node_modules/node-gyp/addon.gypi +204 -0
- package/node_modules/node-gyp/bin/node-gyp.js +145 -0
- package/node_modules/node-gyp/eslint.config.js +3 -0
- package/node_modules/node-gyp/gyp/.release-please-manifest.json +3 -0
- package/node_modules/node-gyp/gyp/LICENSE +28 -0
- package/node_modules/node-gyp/gyp/data/ninja/build.ninja +4 -0
- package/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +12 -0
- package/node_modules/node-gyp/gyp/docs/GypVsCMake.md +116 -0
- package/node_modules/node-gyp/gyp/docs/Hacking.md +46 -0
- package/node_modules/node-gyp/gyp/docs/InputFormatReference.md +1083 -0
- package/node_modules/node-gyp/gyp/docs/LanguageSpecification.md +430 -0
- package/node_modules/node-gyp/gyp/docs/README.md +27 -0
- package/node_modules/node-gyp/gyp/docs/Testing.md +450 -0
- package/node_modules/node-gyp/gyp/docs/UserDocumentation.md +965 -0
- package/node_modules/node-gyp/gyp/gyp +8 -0
- package/node_modules/node-gyp/gyp/gyp.bat +5 -0
- package/node_modules/node-gyp/gyp/gyp_main.py +45 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +365 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +206 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +1283 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +1545 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +59 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +152 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +270 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +607 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +706 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/common.py +725 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +186 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +170 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +113 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +55 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +805 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +1169 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +1316 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +128 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +104 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +461 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +88 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +55 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +2755 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +3970 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +44 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2957 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +77 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +1389 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +26 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/input.py +3097 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +99 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +765 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +1255 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +174 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +61 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +371 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +1936 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +54 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +301 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +3180 -0
- package/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +64 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +3 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +177 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +23 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +15 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +107 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +252 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +83 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +359 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +61 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +192 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/markers.py +251 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +807 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +90 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +1030 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/tags.py +541 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/utils.py +172 -0
- package/node_modules/node-gyp/gyp/pylib/packaging/version.py +563 -0
- package/node_modules/node-gyp/gyp/pyproject.toml +116 -0
- package/node_modules/node-gyp/gyp/release-please-config.json +11 -0
- package/node_modules/node-gyp/gyp/test_gyp.py +260 -0
- package/node_modules/node-gyp/lib/Find-VisualStudio.cs +250 -0
- package/node_modules/node-gyp/lib/build.js +230 -0
- package/node_modules/node-gyp/lib/clean.js +15 -0
- package/node_modules/node-gyp/lib/configure.js +328 -0
- package/node_modules/node-gyp/lib/create-config-gypi.js +153 -0
- package/node_modules/node-gyp/lib/download.js +86 -0
- package/node_modules/node-gyp/lib/find-node-directory.js +63 -0
- package/node_modules/node-gyp/lib/find-python.js +304 -0
- package/node_modules/node-gyp/lib/find-visualstudio.js +606 -0
- package/node_modules/node-gyp/lib/install.js +411 -0
- package/node_modules/node-gyp/lib/list.js +26 -0
- package/node_modules/node-gyp/lib/log.js +168 -0
- package/node_modules/node-gyp/lib/node-gyp.js +199 -0
- package/node_modules/node-gyp/lib/process-release.js +144 -0
- package/node_modules/node-gyp/lib/rebuild.js +12 -0
- package/node_modules/node-gyp/lib/remove.js +43 -0
- package/node_modules/node-gyp/lib/util.js +81 -0
- package/node_modules/node-gyp/macOS_Catalina_acid_test.sh +21 -0
- package/node_modules/node-gyp/package.json +52 -0
- package/node_modules/node-gyp/release-please-config.json +40 -0
- package/node_modules/node-gyp/src/win_delay_load_hook.cc +41 -0
- package/node_modules/nopt/LICENSE +15 -0
- package/node_modules/nopt/README.md +214 -0
- package/node_modules/nopt/bin/nopt.js +29 -0
- package/node_modules/nopt/lib/debug.js +5 -0
- package/node_modules/nopt/lib/nopt-lib.js +514 -0
- package/node_modules/nopt/lib/nopt.js +34 -0
- package/node_modules/nopt/lib/type-defs.js +91 -0
- package/node_modules/nopt/package.json +52 -0
- package/node_modules/npm/LICENSE +235 -0
- package/node_modules/npm/README.md +53 -0
- package/node_modules/npm/bin/node-gyp-bin/node-gyp +6 -0
- package/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd +5 -0
- package/node_modules/npm/bin/npm +65 -0
- package/node_modules/npm/bin/npm-cli.js +2 -0
- package/node_modules/npm/bin/npm-prefix.js +30 -0
- package/node_modules/npm/bin/npm.cmd +20 -0
- package/node_modules/npm/bin/npm.ps1 +50 -0
- package/node_modules/npm/bin/npx +65 -0
- package/node_modules/npm/bin/npx-cli.js +130 -0
- package/node_modules/npm/bin/npx.cmd +20 -0
- package/node_modules/npm/bin/npx.ps1 +50 -0
- package/node_modules/npm/docs/content/commands/npm-access.md +95 -0
- package/node_modules/npm/docs/content/commands/npm-adduser.md +87 -0
- package/node_modules/npm/docs/content/commands/npm-approve-scripts.md +142 -0
- package/node_modules/npm/docs/content/commands/npm-audit.md +449 -0
- package/node_modules/npm/docs/content/commands/npm-bugs.md +106 -0
- package/node_modules/npm/docs/content/commands/npm-cache.md +100 -0
- package/node_modules/npm/docs/content/commands/npm-ci.md +446 -0
- package/node_modules/npm/docs/content/commands/npm-completion.md +36 -0
- package/node_modules/npm/docs/content/commands/npm-config.md +176 -0
- package/node_modules/npm/docs/content/commands/npm-dedupe.md +389 -0
- package/node_modules/npm/docs/content/commands/npm-deny-scripts.md +110 -0
- package/node_modules/npm/docs/content/commands/npm-deprecate.md +85 -0
- package/node_modules/npm/docs/content/commands/npm-diff.md +282 -0
- package/node_modules/npm/docs/content/commands/npm-dist-tag.md +138 -0
- package/node_modules/npm/docs/content/commands/npm-docs.md +106 -0
- package/node_modules/npm/docs/content/commands/npm-doctor.md +98 -0
- package/node_modules/npm/docs/content/commands/npm-edit.md +41 -0
- package/node_modules/npm/docs/content/commands/npm-exec.md +368 -0
- package/node_modules/npm/docs/content/commands/npm-explain.md +101 -0
- package/node_modules/npm/docs/content/commands/npm-explore.md +46 -0
- package/node_modules/npm/docs/content/commands/npm-find-dupes.md +253 -0
- package/node_modules/npm/docs/content/commands/npm-fund.md +136 -0
- package/node_modules/npm/docs/content/commands/npm-get.md +32 -0
- package/node_modules/npm/docs/content/commands/npm-help-search.md +38 -0
- package/node_modules/npm/docs/content/commands/npm-help.md +44 -0
- package/node_modules/npm/docs/content/commands/npm-init.md +348 -0
- package/node_modules/npm/docs/content/commands/npm-install-ci-test.md +400 -0
- package/node_modules/npm/docs/content/commands/npm-install-scripts.md +166 -0
- package/node_modules/npm/docs/content/commands/npm-install-test.md +593 -0
- package/node_modules/npm/docs/content/commands/npm-install.md +976 -0
- package/node_modules/npm/docs/content/commands/npm-link.md +456 -0
- package/node_modules/npm/docs/content/commands/npm-ll.md +230 -0
- package/node_modules/npm/docs/content/commands/npm-login.md +93 -0
- package/node_modules/npm/docs/content/commands/npm-logout.md +72 -0
- package/node_modules/npm/docs/content/commands/npm-ls.md +260 -0
- package/node_modules/npm/docs/content/commands/npm-org.md +113 -0
- package/node_modules/npm/docs/content/commands/npm-outdated.md +247 -0
- package/node_modules/npm/docs/content/commands/npm-owner.md +104 -0
- package/node_modules/npm/docs/content/commands/npm-pack.md +135 -0
- package/node_modules/npm/docs/content/commands/npm-ping.md +46 -0
- package/node_modules/npm/docs/content/commands/npm-pkg.md +244 -0
- package/node_modules/npm/docs/content/commands/npm-prefix.md +58 -0
- package/node_modules/npm/docs/content/commands/npm-profile.md +115 -0
- package/node_modules/npm/docs/content/commands/npm-prune.md +191 -0
- package/node_modules/npm/docs/content/commands/npm-publish.md +247 -0
- package/node_modules/npm/docs/content/commands/npm-query.md +354 -0
- package/node_modules/npm/docs/content/commands/npm-rebuild.md +224 -0
- package/node_modules/npm/docs/content/commands/npm-repo.md +99 -0
- package/node_modules/npm/docs/content/commands/npm-restart.md +68 -0
- package/node_modules/npm/docs/content/commands/npm-root.md +51 -0
- package/node_modules/npm/docs/content/commands/npm-run.md +231 -0
- package/node_modules/npm/docs/content/commands/npm-sbom.md +317 -0
- package/node_modules/npm/docs/content/commands/npm-search.md +154 -0
- package/node_modules/npm/docs/content/commands/npm-set.md +58 -0
- package/node_modules/npm/docs/content/commands/npm-shrinkwrap.md +29 -0
- package/node_modules/npm/docs/content/commands/npm-stage.md +253 -0
- package/node_modules/npm/docs/content/commands/npm-star.md +79 -0
- package/node_modules/npm/docs/content/commands/npm-stars.md +38 -0
- package/node_modules/npm/docs/content/commands/npm-start.md +76 -0
- package/node_modules/npm/docs/content/commands/npm-stop.md +71 -0
- package/node_modules/npm/docs/content/commands/npm-team.md +144 -0
- package/node_modules/npm/docs/content/commands/npm-test.md +69 -0
- package/node_modules/npm/docs/content/commands/npm-token.md +203 -0
- package/node_modules/npm/docs/content/commands/npm-trust.md +176 -0
- package/node_modules/npm/docs/content/commands/npm-undeprecate.md +61 -0
- package/node_modules/npm/docs/content/commands/npm-uninstall.md +151 -0
- package/node_modules/npm/docs/content/commands/npm-unpublish.md +126 -0
- package/node_modules/npm/docs/content/commands/npm-unstar.md +73 -0
- package/node_modules/npm/docs/content/commands/npm-update.md +576 -0
- package/node_modules/npm/docs/content/commands/npm-version.md +256 -0
- package/node_modules/npm/docs/content/commands/npm-view.md +258 -0
- package/node_modules/npm/docs/content/commands/npm-whoami.md +38 -0
- package/node_modules/npm/docs/content/commands/npm.md +148 -0
- package/node_modules/npm/docs/content/commands/npx.md +139 -0
- package/node_modules/npm/docs/content/configuring-npm/folders.md +172 -0
- package/node_modules/npm/docs/content/configuring-npm/install.md +53 -0
- package/node_modules/npm/docs/content/configuring-npm/npm-shrinkwrap-json.md +25 -0
- package/node_modules/npm/docs/content/configuring-npm/npmrc.md +193 -0
- package/node_modules/npm/docs/content/configuring-npm/package-json.md +1210 -0
- package/node_modules/npm/docs/content/configuring-npm/package-lock-json.md +182 -0
- package/node_modules/npm/docs/content/using-npm/config.md +2411 -0
- package/node_modules/npm/docs/content/using-npm/dependency-selectors.md +247 -0
- package/node_modules/npm/docs/content/using-npm/developers.md +233 -0
- package/node_modules/npm/docs/content/using-npm/logging.md +99 -0
- package/node_modules/npm/docs/content/using-npm/orgs.md +98 -0
- package/node_modules/npm/docs/content/using-npm/package-spec.md +92 -0
- package/node_modules/npm/docs/content/using-npm/registry.md +61 -0
- package/node_modules/npm/docs/content/using-npm/removal.md +55 -0
- package/node_modules/npm/docs/content/using-npm/scope.md +123 -0
- package/node_modules/npm/docs/content/using-npm/scripts.md +373 -0
- package/node_modules/npm/docs/content/using-npm/workspaces.md +219 -0
- package/node_modules/npm/docs/output/commands/npm-access.html +280 -0
- package/node_modules/npm/docs/output/commands/npm-adduser.html +271 -0
- package/node_modules/npm/docs/output/commands/npm-approve-scripts.html +319 -0
- package/node_modules/npm/docs/output/commands/npm-audit.html +528 -0
- package/node_modules/npm/docs/output/commands/npm-bugs.html +293 -0
- package/node_modules/npm/docs/output/commands/npm-cache.html +300 -0
- package/node_modules/npm/docs/output/commands/npm-ci.html +549 -0
- package/node_modules/npm/docs/output/commands/npm-completion.html +234 -0
- package/node_modules/npm/docs/output/commands/npm-config.html +331 -0
- package/node_modules/npm/docs/output/commands/npm-dedupe.html +500 -0
- package/node_modules/npm/docs/output/commands/npm-deny-scripts.html +291 -0
- package/node_modules/npm/docs/output/commands/npm-deprecate.html +267 -0
- package/node_modules/npm/docs/output/commands/npm-diff.html +415 -0
- package/node_modules/npm/docs/output/commands/npm-dist-tag.html +318 -0
- package/node_modules/npm/docs/output/commands/npm-docs.html +293 -0
- package/node_modules/npm/docs/output/commands/npm-doctor.html +282 -0
- package/node_modules/npm/docs/output/commands/npm-edit.html +238 -0
- package/node_modules/npm/docs/output/commands/npm-exec.html +477 -0
- package/node_modules/npm/docs/output/commands/npm-explain.html +291 -0
- package/node_modules/npm/docs/output/commands/npm-explore.html +240 -0
- package/node_modules/npm/docs/output/commands/npm-find-dupes.html +400 -0
- package/node_modules/npm/docs/output/commands/npm-fund.html +311 -0
- package/node_modules/npm/docs/output/commands/npm-get.html +231 -0
- package/node_modules/npm/docs/output/commands/npm-help-search.html +235 -0
- package/node_modules/npm/docs/output/commands/npm-help.html +241 -0
- package/node_modules/npm/docs/output/commands/npm-init.html +467 -0
- package/node_modules/npm/docs/output/commands/npm-install-ci-test.html +514 -0
- package/node_modules/npm/docs/output/commands/npm-install-scripts.html +341 -0
- package/node_modules/npm/docs/output/commands/npm-install-test.html +657 -0
- package/node_modules/npm/docs/output/commands/npm-install.html +963 -0
- package/node_modules/npm/docs/output/commands/npm-link.html +546 -0
- package/node_modules/npm/docs/output/commands/npm-ll.html +382 -0
- package/node_modules/npm/docs/output/commands/npm-login.html +274 -0
- package/node_modules/npm/docs/output/commands/npm-logout.html +259 -0
- package/node_modules/npm/docs/output/commands/npm-ls.html +404 -0
- package/node_modules/npm/docs/output/commands/npm-org.html +283 -0
- package/node_modules/npm/docs/output/commands/npm-outdated.html +407 -0
- package/node_modules/npm/docs/output/commands/npm-owner.html +294 -0
- package/node_modules/npm/docs/output/commands/npm-pack.html +314 -0
- package/node_modules/npm/docs/output/commands/npm-ping.html +242 -0
- package/node_modules/npm/docs/output/commands/npm-pkg.html +389 -0
- package/node_modules/npm/docs/output/commands/npm-prefix.html +252 -0
- package/node_modules/npm/docs/output/commands/npm-profile.html +309 -0
- package/node_modules/npm/docs/output/commands/npm-prune.html +352 -0
- package/node_modules/npm/docs/output/commands/npm-publish.html +397 -0
- package/node_modules/npm/docs/output/commands/npm-query.html +500 -0
- package/node_modules/npm/docs/output/commands/npm-rebuild.html +384 -0
- package/node_modules/npm/docs/output/commands/npm-repo.html +286 -0
- package/node_modules/npm/docs/output/commands/npm-restart.html +263 -0
- package/node_modules/npm/docs/output/commands/npm-root.html +248 -0
- package/node_modules/npm/docs/output/commands/npm-run.html +376 -0
- package/node_modules/npm/docs/output/commands/npm-sbom.html +490 -0
- package/node_modules/npm/docs/output/commands/npm-search.html +320 -0
- package/node_modules/npm/docs/output/commands/npm-set.html +255 -0
- package/node_modules/npm/docs/output/commands/npm-shrinkwrap.html +232 -0
- package/node_modules/npm/docs/output/commands/npm-stage.html +609 -0
- package/node_modules/npm/docs/output/commands/npm-star.html +263 -0
- package/node_modules/npm/docs/output/commands/npm-stars.html +236 -0
- package/node_modules/npm/docs/output/commands/npm-start.html +263 -0
- package/node_modules/npm/docs/output/commands/npm-stop.html +260 -0
- package/node_modules/npm/docs/output/commands/npm-team.html +314 -0
- package/node_modules/npm/docs/output/commands/npm-test.html +259 -0
- package/node_modules/npm/docs/output/commands/npm-token.html +351 -0
- package/node_modules/npm/docs/output/commands/npm-trust.html +552 -0
- package/node_modules/npm/docs/output/commands/npm-undeprecate.html +252 -0
- package/node_modules/npm/docs/output/commands/npm-uninstall.html +323 -0
- package/node_modules/npm/docs/output/commands/npm-unpublish.html +310 -0
- package/node_modules/npm/docs/output/commands/npm-unstar.html +258 -0
- package/node_modules/npm/docs/output/commands/npm-update.html +635 -0
- package/node_modules/npm/docs/output/commands/npm-version.html +404 -0
- package/node_modules/npm/docs/output/commands/npm-view.html +383 -0
- package/node_modules/npm/docs/output/commands/npm-whoami.html +235 -0
- package/node_modules/npm/docs/output/commands/npm.html +323 -0
- package/node_modules/npm/docs/output/commands/npx.html +308 -0
- package/node_modules/npm/docs/output/configuring-npm/folders.html +331 -0
- package/node_modules/npm/docs/output/configuring-npm/install.html +249 -0
- package/node_modules/npm/docs/output/configuring-npm/npm-global.html +331 -0
- package/node_modules/npm/docs/output/configuring-npm/npm-json.html +1097 -0
- package/node_modules/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html +229 -0
- package/node_modules/npm/docs/output/configuring-npm/npmrc.html +347 -0
- package/node_modules/npm/docs/output/configuring-npm/package-json.html +1097 -0
- package/node_modules/npm/docs/output/configuring-npm/package-lock-json.html +391 -0
- package/node_modules/npm/docs/output/using-npm/config.html +1956 -0
- package/node_modules/npm/docs/output/using-npm/dependency-selectors.html +425 -0
- package/node_modules/npm/docs/output/using-npm/developers.html +389 -0
- package/node_modules/npm/docs/output/using-npm/logging.html +284 -0
- package/node_modules/npm/docs/output/using-npm/orgs.html +294 -0
- package/node_modules/npm/docs/output/using-npm/package-spec.html +295 -0
- package/node_modules/npm/docs/output/using-npm/registry.html +255 -0
- package/node_modules/npm/docs/output/using-npm/removal.html +245 -0
- package/node_modules/npm/docs/output/using-npm/scope.html +290 -0
- package/node_modules/npm/docs/output/using-npm/scripts.html +539 -0
- package/node_modules/npm/docs/output/using-npm/workspaces.html +352 -0
- package/node_modules/npm/index.js +5 -0
- package/node_modules/npm/lib/arborist-cmd.js +49 -0
- package/node_modules/npm/lib/base-cmd.js +437 -0
- package/node_modules/npm/lib/cli/entry.js +72 -0
- package/node_modules/npm/lib/cli/exit-handler.js +168 -0
- package/node_modules/npm/lib/cli/update-notifier.js +115 -0
- package/node_modules/npm/lib/cli/validate-engines.js +43 -0
- package/node_modules/npm/lib/cli.js +12 -0
- package/node_modules/npm/lib/commands/access.js +226 -0
- package/node_modules/npm/lib/commands/adduser.js +50 -0
- package/node_modules/npm/lib/commands/approve-scripts.js +10 -0
- package/node_modules/npm/lib/commands/audit.js +138 -0
- package/node_modules/npm/lib/commands/bugs.js +34 -0
- package/node_modules/npm/lib/commands/cache.js +363 -0
- package/node_modules/npm/lib/commands/ci.js +138 -0
- package/node_modules/npm/lib/commands/completion.js +329 -0
- package/node_modules/npm/lib/commands/config.js +414 -0
- package/node_modules/npm/lib/commands/dedupe.js +57 -0
- package/node_modules/npm/lib/commands/deny-scripts.js +10 -0
- package/node_modules/npm/lib/commands/deprecate.js +86 -0
- package/node_modules/npm/lib/commands/diff.js +280 -0
- package/node_modules/npm/lib/commands/dist-tag.js +207 -0
- package/node_modules/npm/lib/commands/docs.js +21 -0
- package/node_modules/npm/lib/commands/doctor.js +343 -0
- package/node_modules/npm/lib/commands/edit.js +64 -0
- package/node_modules/npm/lib/commands/exec.js +119 -0
- package/node_modules/npm/lib/commands/explain.js +128 -0
- package/node_modules/npm/lib/commands/explore.js +70 -0
- package/node_modules/npm/lib/commands/find-dupes.js +27 -0
- package/node_modules/npm/lib/commands/fund.js +215 -0
- package/node_modules/npm/lib/commands/get.js +21 -0
- package/node_modules/npm/lib/commands/help-search.js +194 -0
- package/node_modules/npm/lib/commands/help.js +113 -0
- package/node_modules/npm/lib/commands/init.js +240 -0
- package/node_modules/npm/lib/commands/install-ci-test.js +13 -0
- package/node_modules/npm/lib/commands/install-scripts.js +53 -0
- package/node_modules/npm/lib/commands/install-test.js +13 -0
- package/node_modules/npm/lib/commands/install.js +184 -0
- package/node_modules/npm/lib/commands/link.js +205 -0
- package/node_modules/npm/lib/commands/ll.js +13 -0
- package/node_modules/npm/lib/commands/login.js +50 -0
- package/node_modules/npm/lib/commands/logout.js +50 -0
- package/node_modules/npm/lib/commands/ls.js +572 -0
- package/node_modules/npm/lib/commands/org.js +148 -0
- package/node_modules/npm/lib/commands/outdated.js +294 -0
- package/node_modules/npm/lib/commands/owner.js +244 -0
- package/node_modules/npm/lib/commands/pack.js +98 -0
- package/node_modules/npm/lib/commands/ping.js +30 -0
- package/node_modules/npm/lib/commands/pkg.js +127 -0
- package/node_modules/npm/lib/commands/prefix.js +14 -0
- package/node_modules/npm/lib/commands/profile.js +366 -0
- package/node_modules/npm/lib/commands/prune.js +36 -0
- package/node_modules/npm/lib/commands/publish.js +314 -0
- package/node_modules/npm/lib/commands/query.js +164 -0
- package/node_modules/npm/lib/commands/rebuild.js +123 -0
- package/node_modules/npm/lib/commands/repo.js +55 -0
- package/node_modules/npm/lib/commands/restart.js +13 -0
- package/node_modules/npm/lib/commands/root.js +14 -0
- package/node_modules/npm/lib/commands/run.js +222 -0
- package/node_modules/npm/lib/commands/sbom.js +130 -0
- package/node_modules/npm/lib/commands/search.js +70 -0
- package/node_modules/npm/lib/commands/set.js +24 -0
- package/node_modules/npm/lib/commands/shrinkwrap.js +70 -0
- package/node_modules/npm/lib/commands/stage/approve.js +35 -0
- package/node_modules/npm/lib/commands/stage/download.js +70 -0
- package/node_modules/npm/lib/commands/stage/index.js +25 -0
- package/node_modules/npm/lib/commands/stage/list.js +72 -0
- package/node_modules/npm/lib/commands/stage/publish.js +13 -0
- package/node_modules/npm/lib/commands/stage/reject.js +37 -0
- package/node_modules/npm/lib/commands/stage/view.js +34 -0
- package/node_modules/npm/lib/commands/star.js +72 -0
- package/node_modules/npm/lib/commands/stars.js +39 -0
- package/node_modules/npm/lib/commands/start.js +13 -0
- package/node_modules/npm/lib/commands/stop.js +13 -0
- package/node_modules/npm/lib/commands/team.js +158 -0
- package/node_modules/npm/lib/commands/test.js +13 -0
- package/node_modules/npm/lib/commands/token.js +285 -0
- package/node_modules/npm/lib/commands/trust/circleci.js +178 -0
- package/node_modules/npm/lib/commands/trust/github.js +107 -0
- package/node_modules/npm/lib/commands/trust/gitlab.js +108 -0
- package/node_modules/npm/lib/commands/trust/index.js +25 -0
- package/node_modules/npm/lib/commands/trust/list.js +50 -0
- package/node_modules/npm/lib/commands/trust/revoke.js +52 -0
- package/node_modules/npm/lib/commands/undeprecate.js +13 -0
- package/node_modules/npm/lib/commands/uninstall.js +57 -0
- package/node_modules/npm/lib/commands/unpublish.js +163 -0
- package/node_modules/npm/lib/commands/unstar.js +8 -0
- package/node_modules/npm/lib/commands/update.js +77 -0
- package/node_modules/npm/lib/commands/version.js +152 -0
- package/node_modules/npm/lib/commands/view.js +488 -0
- package/node_modules/npm/lib/commands/whoami.js +20 -0
- package/node_modules/npm/lib/lifecycle-cmd.js +20 -0
- package/node_modules/npm/lib/npm.js +526 -0
- package/node_modules/npm/lib/package-url-cmd.js +63 -0
- package/node_modules/npm/lib/trust-cmd.js +345 -0
- package/node_modules/npm/lib/utils/allow-scripts-cmd.js +403 -0
- package/node_modules/npm/lib/utils/allow-scripts-prune.js +47 -0
- package/node_modules/npm/lib/utils/allow-scripts-remediation.js +9 -0
- package/node_modules/npm/lib/utils/allow-scripts-writer.js +362 -0
- package/node_modules/npm/lib/utils/audit-error.js +40 -0
- package/node_modules/npm/lib/utils/auth.js +108 -0
- package/node_modules/npm/lib/utils/check-allow-scripts.js +27 -0
- package/node_modules/npm/lib/utils/cmd-list.js +183 -0
- package/node_modules/npm/lib/utils/completion.fish +40 -0
- package/node_modules/npm/lib/utils/completion.sh +70 -0
- package/node_modules/npm/lib/utils/did-you-mean.js +33 -0
- package/node_modules/npm/lib/utils/display.js +558 -0
- package/node_modules/npm/lib/utils/error-message.js +453 -0
- package/node_modules/npm/lib/utils/explain-dep.js +116 -0
- package/node_modules/npm/lib/utils/explain-eresolve.js +64 -0
- package/node_modules/npm/lib/utils/format-bytes.js +29 -0
- package/node_modules/npm/lib/utils/format-search-stream.js +175 -0
- package/node_modules/npm/lib/utils/format.js +56 -0
- package/node_modules/npm/lib/utils/get-identity.js +25 -0
- package/node_modules/npm/lib/utils/get-workspaces.js +54 -0
- package/node_modules/npm/lib/utils/installed-deep.js +45 -0
- package/node_modules/npm/lib/utils/installed-shallow.js +19 -0
- package/node_modules/npm/lib/utils/is-windows.js +4 -0
- package/node_modules/npm/lib/utils/key-values.js +42 -0
- package/node_modules/npm/lib/utils/log-file.js +247 -0
- package/node_modules/npm/lib/utils/npm-usage.js +74 -0
- package/node_modules/npm/lib/utils/oidc.js +177 -0
- package/node_modules/npm/lib/utils/open-url.js +97 -0
- package/node_modules/npm/lib/utils/output-error.js +30 -0
- package/node_modules/npm/lib/utils/ping.js +6 -0
- package/node_modules/npm/lib/utils/queryable.js +292 -0
- package/node_modules/npm/lib/utils/read-user-info.js +69 -0
- package/node_modules/npm/lib/utils/reify-finish.js +25 -0
- package/node_modules/npm/lib/utils/reify-output.js +291 -0
- package/node_modules/npm/lib/utils/resolve-allow-scripts.js +181 -0
- package/node_modules/npm/lib/utils/sbom-cyclonedx.js +210 -0
- package/node_modules/npm/lib/utils/sbom-spdx.js +211 -0
- package/node_modules/npm/lib/utils/strict-allow-scripts-preflight.js +76 -0
- package/node_modules/npm/lib/utils/tar.js +110 -0
- package/node_modules/npm/lib/utils/timers.js +89 -0
- package/node_modules/npm/lib/utils/update-workspaces.js +37 -0
- package/node_modules/npm/lib/utils/validate-lockfile.js +29 -0
- package/node_modules/npm/lib/utils/validate-uuid.js +10 -0
- package/node_modules/npm/lib/utils/verify-signatures.js +397 -0
- package/node_modules/npm/lib/utils/warn-workspace-allow-scripts.js +40 -0
- package/node_modules/npm/man/man1/npm-access.1 +105 -0
- package/node_modules/npm/man/man1/npm-adduser.1 +93 -0
- package/node_modules/npm/man/man1/npm-approve-scripts.1 +117 -0
- package/node_modules/npm/man/man1/npm-audit.1 +466 -0
- package/node_modules/npm/man/man1/npm-bugs.1 +115 -0
- package/node_modules/npm/man/man1/npm-cache.1 +95 -0
- package/node_modules/npm/man/man1/npm-ci.1 +377 -0
- package/node_modules/npm/man/man1/npm-completion.1 +35 -0
- package/node_modules/npm/man/man1/npm-config.1 +186 -0
- package/node_modules/npm/man/man1/npm-dedupe.1 +340 -0
- package/node_modules/npm/man/man1/npm-deny-scripts.1 +99 -0
- package/node_modules/npm/man/man1/npm-deprecate.1 +85 -0
- package/node_modules/npm/man/man1/npm-diff.1 +310 -0
- package/node_modules/npm/man/man1/npm-dist-tag.1 +144 -0
- package/node_modules/npm/man/man1/npm-docs.1 +113 -0
- package/node_modules/npm/man/man1/npm-doctor.1 +82 -0
- package/node_modules/npm/man/man1/npm-edit.1 +43 -0
- package/node_modules/npm/man/man1/npm-exec.1 +388 -0
- package/node_modules/npm/man/man1/npm-explain.1 +118 -0
- package/node_modules/npm/man/man1/npm-explore.1 +49 -0
- package/node_modules/npm/man/man1/npm-find-dupes.1 +227 -0
- package/node_modules/npm/man/man1/npm-fund.1 +142 -0
- package/node_modules/npm/man/man1/npm-get.1 +31 -0
- package/node_modules/npm/man/man1/npm-help-search.1 +37 -0
- package/node_modules/npm/man/man1/npm-help.1 +47 -0
- package/node_modules/npm/man/man1/npm-init.1 +393 -0
- package/node_modules/npm/man/man1/npm-install-ci-test.1 +327 -0
- package/node_modules/npm/man/man1/npm-install-scripts.1 +133 -0
- package/node_modules/npm/man/man1/npm-install-test.1 +497 -0
- package/node_modules/npm/man/man1/npm-install.1 +941 -0
- package/node_modules/npm/man/man1/npm-link.1 +405 -0
- package/node_modules/npm/man/man1/npm-ll.1 +231 -0
- package/node_modules/npm/man/man1/npm-login.1 +97 -0
- package/node_modules/npm/man/man1/npm-logout.1 +75 -0
- package/node_modules/npm/man/man1/npm-ls.1 +271 -0
- package/node_modules/npm/man/man1/npm-org.1 +125 -0
- package/node_modules/npm/man/man1/npm-outdated.1 +247 -0
- package/node_modules/npm/man/man1/npm-owner.1 +110 -0
- package/node_modules/npm/man/man1/npm-pack.1 +142 -0
- package/node_modules/npm/man/man1/npm-ping.1 +52 -0
- package/node_modules/npm/man/man1/npm-pkg.1 +286 -0
- package/node_modules/npm/man/man1/npm-prefix.1 +63 -0
- package/node_modules/npm/man/man1/npm-profile.1 +126 -0
- package/node_modules/npm/man/man1/npm-prune.1 +184 -0
- package/node_modules/npm/man/man1/npm-publish.1 +263 -0
- package/node_modules/npm/man/man1/npm-query.1 +344 -0
- package/node_modules/npm/man/man1/npm-rebuild.1 +216 -0
- package/node_modules/npm/man/man1/npm-repo.1 +103 -0
- package/node_modules/npm/man/man1/npm-restart.1 +84 -0
- package/node_modules/npm/man/man1/npm-root.1 +56 -0
- package/node_modules/npm/man/man1/npm-run.1 +234 -0
- package/node_modules/npm/man/man1/npm-sbom.1 +314 -0
- package/node_modules/npm/man/man1/npm-search.1 +156 -0
- package/node_modules/npm/man/man1/npm-set.1 +61 -0
- package/node_modules/npm/man/man1/npm-shrinkwrap.1 +32 -0
- package/node_modules/npm/man/man1/npm-stage.1 +178 -0
- package/node_modules/npm/man/man1/npm-star.1 +76 -0
- package/node_modules/npm/man/man1/npm-stars.1 +41 -0
- package/node_modules/npm/man/man1/npm-start.1 +79 -0
- package/node_modules/npm/man/man1/npm-stop.1 +75 -0
- package/node_modules/npm/man/man1/npm-team.1 +148 -0
- package/node_modules/npm/man/man1/npm-test.1 +73 -0
- package/node_modules/npm/man/man1/npm-token.1 +200 -0
- package/node_modules/npm/man/man1/npm-trust.1 +143 -0
- package/node_modules/npm/man/man1/npm-undeprecate.1 +57 -0
- package/node_modules/npm/man/man1/npm-uninstall.1 +159 -0
- package/node_modules/npm/man/man1/npm-unpublish.1 +137 -0
- package/node_modules/npm/man/man1/npm-unstar.1 +70 -0
- package/node_modules/npm/man/man1/npm-update.1 +509 -0
- package/node_modules/npm/man/man1/npm-version.1 +259 -0
- package/node_modules/npm/man/man1/npm-view.1 +284 -0
- package/node_modules/npm/man/man1/npm-whoami.1 +39 -0
- package/node_modules/npm/man/man1/npm.1 +131 -0
- package/node_modules/npm/man/man1/npx.1 +158 -0
- package/node_modules/npm/man/man5/folders.5 +147 -0
- package/node_modules/npm/man/man5/install.5 +54 -0
- package/node_modules/npm/man/man5/npm-global.5 +147 -0
- package/node_modules/npm/man/man5/npm-json.5 +1269 -0
- package/node_modules/npm/man/man5/npm-shrinkwrap-json.5 +23 -0
- package/node_modules/npm/man/man5/npmrc.5 +195 -0
- package/node_modules/npm/man/man5/package-json.5 +1269 -0
- package/node_modules/npm/man/man5/package-lock-json.5 +166 -0
- package/node_modules/npm/man/man7/config.7 +2379 -0
- package/node_modules/npm/man/man7/dependency-selectors.7 +331 -0
- package/node_modules/npm/man/man7/developers.7 +251 -0
- package/node_modules/npm/man/man7/logging.7 +108 -0
- package/node_modules/npm/man/man7/orgs.7 +145 -0
- package/node_modules/npm/man/man7/package-spec.7 +126 -0
- package/node_modules/npm/man/man7/registry.7 +49 -0
- package/node_modules/npm/man/man7/removal.7 +54 -0
- package/node_modules/npm/man/man7/scope.7 +113 -0
- package/node_modules/npm/man/man7/scripts.7 +467 -0
- package/node_modules/npm/man/man7/workspaces.7 +236 -0
- package/node_modules/npm/package.json +259 -0
- package/node_modules/npm-audit-report/LICENSE +16 -0
- package/node_modules/npm-audit-report/lib/colors.js +22 -0
- package/node_modules/npm-audit-report/lib/exit-code.js +14 -0
- package/node_modules/npm-audit-report/lib/index.js +41 -0
- package/node_modules/npm-audit-report/lib/reporters/detail.js +86 -0
- package/node_modules/npm-audit-report/lib/reporters/install.js +75 -0
- package/node_modules/npm-audit-report/lib/reporters/json.js +1 -0
- package/node_modules/npm-audit-report/lib/reporters/quiet.js +1 -0
- package/node_modules/npm-audit-report/package.json +62 -0
- package/node_modules/npm-bundled/LICENSE +15 -0
- package/node_modules/npm-bundled/lib/index.js +254 -0
- package/node_modules/npm-bundled/package.json +49 -0
- package/node_modules/npm-install-checks/LICENSE +27 -0
- package/node_modules/npm-install-checks/lib/current-env.js +91 -0
- package/node_modules/npm-install-checks/lib/dev-engines.js +145 -0
- package/node_modules/npm-install-checks/lib/index.js +90 -0
- package/node_modules/npm-install-checks/package.json +52 -0
- package/node_modules/npm-normalize-package-bin/LICENSE +15 -0
- package/node_modules/npm-normalize-package-bin/lib/index.js +64 -0
- package/node_modules/npm-normalize-package-bin/package.json +45 -0
- package/node_modules/npm-package-arg/LICENSE +15 -0
- package/node_modules/npm-package-arg/lib/npa.js +479 -0
- package/node_modules/npm-package-arg/package.json +60 -0
- package/node_modules/npm-packlist/LICENSE +15 -0
- package/node_modules/npm-packlist/lib/index.js +464 -0
- package/node_modules/npm-packlist/package.json +62 -0
- package/node_modules/npm-pick-manifest/LICENSE.md +16 -0
- package/node_modules/npm-pick-manifest/lib/index.js +219 -0
- package/node_modules/npm-pick-manifest/package.json +58 -0
- package/node_modules/npm-profile/LICENSE.md +20 -0
- package/node_modules/npm-profile/lib/index.js +305 -0
- package/node_modules/npm-profile/package.json +52 -0
- package/node_modules/npm-registry-fetch/LICENSE.md +20 -0
- package/node_modules/npm-registry-fetch/lib/auth.js +181 -0
- package/node_modules/npm-registry-fetch/lib/check-response.js +108 -0
- package/node_modules/npm-registry-fetch/lib/default-opts.js +19 -0
- package/node_modules/npm-registry-fetch/lib/errors.js +80 -0
- package/node_modules/npm-registry-fetch/lib/index.js +248 -0
- package/node_modules/npm-registry-fetch/lib/json-stream.js +223 -0
- package/node_modules/npm-registry-fetch/package.json +68 -0
- package/node_modules/npm-user-validate/LICENSE +27 -0
- package/node_modules/npm-user-validate/lib/index.js +61 -0
- package/node_modules/npm-user-validate/package.json +50 -0
- package/node_modules/p-map/index.js +283 -0
- package/node_modules/p-map/license +9 -0
- package/node_modules/p-map/package.json +57 -0
- package/node_modules/pacote/LICENSE +15 -0
- package/node_modules/pacote/README.md +251 -0
- package/node_modules/pacote/bin/index.js +158 -0
- package/node_modules/pacote/lib/dir.js +105 -0
- package/node_modules/pacote/lib/fetcher.js +519 -0
- package/node_modules/pacote/lib/file.js +94 -0
- package/node_modules/pacote/lib/git.js +329 -0
- package/node_modules/pacote/lib/index.js +23 -0
- package/node_modules/pacote/lib/registry.js +373 -0
- package/node_modules/pacote/lib/remote.js +89 -0
- package/node_modules/pacote/lib/util/add-git-sha.js +18 -0
- package/node_modules/pacote/lib/util/cache-dir.js +15 -0
- package/node_modules/pacote/lib/util/is-package-bin.js +25 -0
- package/node_modules/pacote/lib/util/npm.js +14 -0
- package/node_modules/pacote/lib/util/protected.js +5 -0
- package/node_modules/pacote/lib/util/tar-create-options.js +31 -0
- package/node_modules/pacote/lib/util/trailing-slashes.js +10 -0
- package/node_modules/pacote/package.json +80 -0
- package/node_modules/parse-conflict-json/LICENSE.md +20 -0
- package/node_modules/parse-conflict-json/lib/index.js +104 -0
- package/node_modules/parse-conflict-json/package.json +51 -0
- package/node_modules/path-scurry/LICENSE.md +55 -0
- package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
- package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/dist/esm/index.js +1983 -0
- package/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/package.json +72 -0
- package/node_modules/picomatch/LICENSE +21 -0
- package/node_modules/picomatch/index.js +17 -0
- package/node_modules/picomatch/lib/constants.js +184 -0
- package/node_modules/picomatch/lib/parse.js +1386 -0
- package/node_modules/picomatch/lib/picomatch.js +349 -0
- package/node_modules/picomatch/lib/scan.js +391 -0
- package/node_modules/picomatch/lib/utils.js +72 -0
- package/node_modules/picomatch/package.json +82 -0
- package/node_modules/picomatch/posix.js +3 -0
- package/node_modules/postcss-selector-parser/API.md +874 -0
- package/node_modules/postcss-selector-parser/LICENSE-MIT +22 -0
- package/node_modules/postcss-selector-parser/dist/index.js +44 -0
- package/node_modules/postcss-selector-parser/dist/parser.js +1105 -0
- package/node_modules/postcss-selector-parser/dist/processor.js +153 -0
- package/node_modules/postcss-selector-parser/dist/selectors/attribute.js +440 -0
- package/node_modules/postcss-selector-parser/dist/selectors/className.js +59 -0
- package/node_modules/postcss-selector-parser/dist/selectors/combinator.js +33 -0
- package/node_modules/postcss-selector-parser/dist/selectors/comment.js +33 -0
- package/node_modules/postcss-selector-parser/dist/selectors/constructors.js +43 -0
- package/node_modules/postcss-selector-parser/dist/selectors/container.js +433 -0
- package/node_modules/postcss-selector-parser/dist/selectors/guards.js +61 -0
- package/node_modules/postcss-selector-parser/dist/selectors/id.js +36 -0
- package/node_modules/postcss-selector-parser/dist/selectors/index.js +20 -0
- package/node_modules/postcss-selector-parser/dist/selectors/namespace.js +96 -0
- package/node_modules/postcss-selector-parser/dist/selectors/nesting.js +34 -0
- package/node_modules/postcss-selector-parser/dist/selectors/node.js +195 -0
- package/node_modules/postcss-selector-parser/dist/selectors/pseudo.js +45 -0
- package/node_modules/postcss-selector-parser/dist/selectors/root.js +56 -0
- package/node_modules/postcss-selector-parser/dist/selectors/selector.js +33 -0
- package/node_modules/postcss-selector-parser/dist/selectors/string.js +33 -0
- package/node_modules/postcss-selector-parser/dist/selectors/tag.js +33 -0
- package/node_modules/postcss-selector-parser/dist/selectors/types.js +16 -0
- package/node_modules/postcss-selector-parser/dist/selectors/universal.js +34 -0
- package/node_modules/postcss-selector-parser/dist/sortAscending.js +7 -0
- package/node_modules/postcss-selector-parser/dist/tokenTypes.js +37 -0
- package/node_modules/postcss-selector-parser/dist/tokenize.js +301 -0
- package/node_modules/postcss-selector-parser/dist/util/ensureObject.js +17 -0
- package/node_modules/postcss-selector-parser/dist/util/getProp.js +18 -0
- package/node_modules/postcss-selector-parser/dist/util/index.js +18 -0
- package/node_modules/postcss-selector-parser/dist/util/maxNestingDepth.js +25 -0
- package/node_modules/postcss-selector-parser/dist/util/stripComments.js +20 -0
- package/node_modules/postcss-selector-parser/dist/util/unesc.js +72 -0
- package/node_modules/postcss-selector-parser/package.json +63 -0
- package/node_modules/proc-log/LICENSE +15 -0
- package/node_modules/proc-log/lib/index.js +158 -0
- package/node_modules/proc-log/package.json +46 -0
- package/node_modules/proggy/LICENSE +15 -0
- package/node_modules/proggy/lib/client.js +114 -0
- package/node_modules/proggy/lib/index.js +15 -0
- package/node_modules/proggy/lib/tracker.js +68 -0
- package/node_modules/proggy/package.json +50 -0
- package/node_modules/promise-all-reject-late/LICENSE +15 -0
- package/node_modules/promise-all-reject-late/index.js +27 -0
- package/node_modules/promise-all-reject-late/package.json +22 -0
- package/node_modules/promise-all-reject-late/test/index.js +88 -0
- package/node_modules/promise-call-limit/LICENSE +15 -0
- package/node_modules/promise-call-limit/dist/commonjs/index.js +87 -0
- package/node_modules/promise-call-limit/dist/commonjs/package.json +3 -0
- package/node_modules/promise-call-limit/dist/esm/index.js +60 -0
- package/node_modules/promise-call-limit/dist/esm/package.json +3 -0
- package/node_modules/promise-call-limit/package.json +68 -0
- package/node_modules/promzard/LICENSE +15 -0
- package/node_modules/promzard/lib/index.js +176 -0
- package/node_modules/promzard/package.json +50 -0
- package/node_modules/qrcode-terminal/.travis.yml +3 -0
- package/node_modules/qrcode-terminal/LICENSE +222 -0
- package/node_modules/qrcode-terminal/README.md +82 -0
- package/node_modules/qrcode-terminal/bin/qrcode-terminal.js +101 -0
- package/node_modules/qrcode-terminal/example/basic.js +2 -0
- package/node_modules/qrcode-terminal/example/basic.png +0 -0
- package/node_modules/qrcode-terminal/example/callback.js +4 -0
- package/node_modules/qrcode-terminal/example/small-qrcode.js +6 -0
- package/node_modules/qrcode-terminal/lib/main.js +100 -0
- package/node_modules/qrcode-terminal/package.json +37 -0
- package/node_modules/qrcode-terminal/test/main.js +63 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js +22 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js +38 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js +7 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js +10 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js +44 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js +6 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js +66 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js +298 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js +272 -0
- package/node_modules/qrcode-terminal/vendor/QRCode/index.js +462 -0
- package/node_modules/read/LICENSE +15 -0
- package/node_modules/read/dist/commonjs/package.json +3 -0
- package/node_modules/read/dist/commonjs/read.js +94 -0
- package/node_modules/read/dist/esm/package.json +3 -0
- package/node_modules/read/dist/esm/read.js +88 -0
- package/node_modules/read/package.json +88 -0
- package/node_modules/read-cmd-shim/LICENSE +14 -0
- package/node_modules/read-cmd-shim/lib/index.js +75 -0
- package/node_modules/read-cmd-shim/package.json +48 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- package/node_modules/signal-exit/dist/cjs/index.js +279 -0
- package/node_modules/signal-exit/dist/cjs/package.json +3 -0
- package/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- package/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- package/node_modules/signal-exit/dist/mjs/index.js +275 -0
- package/node_modules/signal-exit/dist/mjs/package.json +3 -0
- package/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- package/node_modules/signal-exit/package.json +106 -0
- package/node_modules/sigstore/LICENSE +202 -0
- package/node_modules/sigstore/dist/config.js +126 -0
- package/node_modules/sigstore/dist/index.js +34 -0
- package/node_modules/sigstore/dist/sigstore.js +112 -0
- package/node_modules/sigstore/package.json +47 -0
- package/node_modules/smart-buffer/LICENSE +20 -0
- package/node_modules/smart-buffer/build/smartbuffer.js +1233 -0
- package/node_modules/smart-buffer/build/utils.js +108 -0
- package/node_modules/smart-buffer/docs/ROADMAP.md +0 -0
- package/node_modules/smart-buffer/package.json +79 -0
- package/node_modules/socks/LICENSE +20 -0
- package/node_modules/socks/build/client/socksclient.js +793 -0
- package/node_modules/socks/build/common/constants.js +108 -0
- package/node_modules/socks/build/common/helpers.js +167 -0
- package/node_modules/socks/build/common/receivebuffer.js +43 -0
- package/node_modules/socks/build/common/util.js +25 -0
- package/node_modules/socks/build/index.js +18 -0
- package/node_modules/socks/docs/examples/index.md +17 -0
- package/node_modules/socks/docs/examples/javascript/associateExample.md +90 -0
- package/node_modules/socks/docs/examples/javascript/bindExample.md +83 -0
- package/node_modules/socks/docs/examples/javascript/connectExample.md +258 -0
- package/node_modules/socks/docs/examples/typescript/associateExample.md +93 -0
- package/node_modules/socks/docs/examples/typescript/bindExample.md +86 -0
- package/node_modules/socks/docs/examples/typescript/connectExample.md +265 -0
- package/node_modules/socks/docs/index.md +5 -0
- package/node_modules/socks/docs/migratingFromV1.md +86 -0
- package/node_modules/socks/package.json +58 -0
- package/node_modules/socks-proxy-agent/LICENSE +22 -0
- package/node_modules/socks-proxy-agent/dist/index.js +195 -0
- package/node_modules/socks-proxy-agent/package.json +142 -0
- package/node_modules/spdx-exceptions/deprecated.json +3 -0
- package/node_modules/spdx-exceptions/index.json +68 -0
- package/node_modules/spdx-exceptions/package.json +19 -0
- package/node_modules/spdx-expression-parse/AUTHORS +4 -0
- package/node_modules/spdx-expression-parse/LICENSE +22 -0
- package/node_modules/spdx-expression-parse/index.js +8 -0
- package/node_modules/spdx-expression-parse/package.json +39 -0
- package/node_modules/spdx-expression-parse/parse.js +138 -0
- package/node_modules/spdx-expression-parse/scan.js +131 -0
- package/node_modules/spdx-license-ids/deprecated.json +28 -0
- package/node_modules/spdx-license-ids/index.json +697 -0
- package/node_modules/spdx-license-ids/package.json +29 -0
- package/node_modules/ssri/LICENSE.md +16 -0
- package/node_modules/ssri/lib/index.js +550 -0
- package/node_modules/ssri/package.json +66 -0
- package/node_modules/supports-color/browser.js +35 -0
- package/node_modules/supports-color/index.js +202 -0
- package/node_modules/supports-color/license +9 -0
- package/node_modules/supports-color/package.json +64 -0
- package/node_modules/tar/LICENSE.md +55 -0
- package/node_modules/tar/dist/commonjs/create.js +82 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
- package/node_modules/tar/dist/commonjs/extract.js +88 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
- package/node_modules/tar/dist/commonjs/header.js +348 -0
- package/node_modules/tar/dist/commonjs/index.js +64 -0
- package/node_modules/tar/dist/commonjs/index.min.js +4 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
- package/node_modules/tar/dist/commonjs/list.js +153 -0
- package/node_modules/tar/dist/commonjs/make-command.js +52 -0
- package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
- package/node_modules/tar/dist/commonjs/options.js +66 -0
- package/node_modules/tar/dist/commonjs/pack.js +544 -0
- package/node_modules/tar/dist/commonjs/package.json +3 -0
- package/node_modules/tar/dist/commonjs/parse.js +655 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
- package/node_modules/tar/dist/commonjs/pax.js +182 -0
- package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
- package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
- package/node_modules/tar/dist/commonjs/replace.js +227 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
- package/node_modules/tar/dist/commonjs/types.js +70 -0
- package/node_modules/tar/dist/commonjs/unpack.js +932 -0
- package/node_modules/tar/dist/commonjs/update.js +33 -0
- package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
- package/node_modules/tar/dist/commonjs/winchars.js +14 -0
- package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
- package/node_modules/tar/dist/esm/create.js +76 -0
- package/node_modules/tar/dist/esm/cwd-error.js +14 -0
- package/node_modules/tar/dist/esm/extract.js +49 -0
- package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
- package/node_modules/tar/dist/esm/header.js +311 -0
- package/node_modules/tar/dist/esm/index.js +20 -0
- package/node_modules/tar/dist/esm/index.min.js +4 -0
- package/node_modules/tar/dist/esm/large-numbers.js +94 -0
- package/node_modules/tar/dist/esm/list.js +113 -0
- package/node_modules/tar/dist/esm/make-command.js +48 -0
- package/node_modules/tar/dist/esm/mkdir.js +179 -0
- package/node_modules/tar/dist/esm/mode-fix.js +25 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- package/node_modules/tar/dist/esm/options.js +54 -0
- package/node_modules/tar/dist/esm/pack.js +502 -0
- package/node_modules/tar/dist/esm/package.json +3 -0
- package/node_modules/tar/dist/esm/parse.js +651 -0
- package/node_modules/tar/dist/esm/path-reservations.js +166 -0
- package/node_modules/tar/dist/esm/pax.js +178 -0
- package/node_modules/tar/dist/esm/process-umask.js +3 -0
- package/node_modules/tar/dist/esm/read-entry.js +132 -0
- package/node_modules/tar/dist/esm/replace.js +221 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
- package/node_modules/tar/dist/esm/symlink-error.js +15 -0
- package/node_modules/tar/dist/esm/types.js +65 -0
- package/node_modules/tar/dist/esm/unpack.js +891 -0
- package/node_modules/tar/dist/esm/update.js +30 -0
- package/node_modules/tar/dist/esm/warn-method.js +27 -0
- package/node_modules/tar/dist/esm/winchars.js +9 -0
- package/node_modules/tar/dist/esm/write-entry.js +656 -0
- package/node_modules/tar/package.json +298 -0
- package/node_modules/text-table/LICENSE +18 -0
- package/node_modules/text-table/example/align.js +8 -0
- package/node_modules/text-table/example/center.js +8 -0
- package/node_modules/text-table/example/dotalign.js +9 -0
- package/node_modules/text-table/example/doubledot.js +11 -0
- package/node_modules/text-table/example/table.js +6 -0
- package/node_modules/text-table/index.js +86 -0
- package/node_modules/text-table/package.json +44 -0
- package/node_modules/text-table/test/align.js +18 -0
- package/node_modules/text-table/test/ansi-colors.js +32 -0
- package/node_modules/text-table/test/center.js +18 -0
- package/node_modules/text-table/test/dotalign.js +20 -0
- package/node_modules/text-table/test/doubledot.js +24 -0
- package/node_modules/text-table/test/table.js +14 -0
- package/node_modules/tiny-relative-date/LICENSE.md +21 -0
- package/node_modules/tiny-relative-date/lib/factory.js +100 -0
- package/node_modules/tiny-relative-date/lib/index.js +18 -0
- package/node_modules/tiny-relative-date/package.json +39 -0
- package/node_modules/tiny-relative-date/src/factory.js +112 -0
- package/node_modules/tiny-relative-date/src/index.js +4 -0
- package/node_modules/tiny-relative-date/translations/da.js +31 -0
- package/node_modules/tiny-relative-date/translations/de.js +31 -0
- package/node_modules/tiny-relative-date/translations/en-short.js +31 -0
- package/node_modules/tiny-relative-date/translations/en.js +31 -0
- package/node_modules/tiny-relative-date/translations/es.js +31 -0
- package/node_modules/tiny-relative-date/translations/fa.js +31 -0
- package/node_modules/tiny-relative-date/translations/ne.js +31 -0
- package/node_modules/tinyglobby/LICENSE +21 -0
- package/node_modules/tinyglobby/dist/index.cjs +335 -0
- package/node_modules/tinyglobby/dist/index.d.cts +148 -0
- package/node_modules/tinyglobby/dist/index.d.mts +148 -0
- package/node_modules/tinyglobby/dist/index.mjs +307 -0
- package/node_modules/tinyglobby/package.json +70 -0
- package/node_modules/treeverse/LICENSE +15 -0
- package/node_modules/treeverse/lib/breadth.js +67 -0
- package/node_modules/treeverse/lib/depth-descent.js +88 -0
- package/node_modules/treeverse/lib/depth.js +76 -0
- package/node_modules/treeverse/lib/index.js +4 -0
- package/node_modules/treeverse/package.json +51 -0
- package/node_modules/tuf-js/LICENSE +21 -0
- package/node_modules/tuf-js/dist/config.js +16 -0
- package/node_modules/tuf-js/dist/error.js +49 -0
- package/node_modules/tuf-js/dist/fetcher.js +92 -0
- package/node_modules/tuf-js/dist/index.js +9 -0
- package/node_modules/tuf-js/dist/store.js +219 -0
- package/node_modules/tuf-js/dist/updater.js +373 -0
- package/node_modules/tuf-js/dist/utils/tmpfile.js +25 -0
- package/node_modules/tuf-js/dist/utils/url.js +13 -0
- package/node_modules/tuf-js/package.json +43 -0
- package/node_modules/undici/LICENSE +21 -0
- package/node_modules/undici/docs/docs/api/Agent.md +80 -0
- package/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/undici/docs/docs/api/Client.md +277 -0
- package/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +101 -0
- package/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +204 -0
- package/node_modules/undici/docs/docs/api/DispatchInterceptor.md +60 -0
- package/node_modules/undici/docs/docs/api/Dispatcher.md +1347 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +162 -0
- package/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +52 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +540 -0
- package/node_modules/undici/docs/docs/api/MockClient.md +77 -0
- package/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/undici/docs/docs/api/MockPool.md +547 -0
- package/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +131 -0
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +96 -0
- package/node_modules/undici/docs/docs/api/RetryAgent.md +45 -0
- package/node_modules/undici/docs/docs/api/RetryHandler.md +117 -0
- package/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/undici/docs/docs/api/WebSocket.md +51 -0
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +136 -0
- package/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +20 -0
- package/node_modules/undici/index-fetch.js +35 -0
- package/node_modules/undici/index.js +169 -0
- package/node_modules/undici/lib/api/abort-signal.js +57 -0
- package/node_modules/undici/lib/api/api-connect.js +108 -0
- package/node_modules/undici/lib/api/api-pipeline.js +251 -0
- package/node_modules/undici/lib/api/api-request.js +214 -0
- package/node_modules/undici/lib/api/api-stream.js +220 -0
- package/node_modules/undici/lib/api/api-upgrade.js +108 -0
- package/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/undici/lib/api/readable.js +385 -0
- package/node_modules/undici/lib/api/util.js +93 -0
- package/node_modules/undici/lib/core/connect.js +240 -0
- package/node_modules/undici/lib/core/constants.js +118 -0
- package/node_modules/undici/lib/core/diagnostics.js +202 -0
- package/node_modules/undici/lib/core/errors.js +425 -0
- package/node_modules/undici/lib/core/request.js +416 -0
- package/node_modules/undici/lib/core/symbols.js +67 -0
- package/node_modules/undici/lib/core/tree.js +152 -0
- package/node_modules/undici/lib/core/util.js +719 -0
- package/node_modules/undici/lib/dispatcher/agent.js +129 -0
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +209 -0
- package/node_modules/undici/lib/dispatcher/client-h1.js +1496 -0
- package/node_modules/undici/lib/dispatcher/client-h2.js +744 -0
- package/node_modules/undici/lib/dispatcher/client.js +623 -0
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +199 -0
- package/node_modules/undici/lib/dispatcher/dispatcher.js +65 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +160 -0
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +117 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +194 -0
- package/node_modules/undici/lib/dispatcher/pool-stats.js +34 -0
- package/node_modules/undici/lib/dispatcher/pool.js +107 -0
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +274 -0
- package/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/undici/lib/global.js +32 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +44 -0
- package/node_modules/undici/lib/handler/redirect-handler.js +232 -0
- package/node_modules/undici/lib/handler/retry-handler.js +408 -0
- package/node_modules/undici/lib/interceptor/dns.js +375 -0
- package/node_modules/undici/lib/interceptor/dump.js +123 -0
- package/node_modules/undici/lib/interceptor/redirect-interceptor.js +21 -0
- package/node_modules/undici/lib/interceptor/redirect.js +24 -0
- package/node_modules/undici/lib/interceptor/response-error.js +86 -0
- package/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/undici/lib/llhttp/constants.js +278 -0
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +5 -0
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +5 -0
- package/node_modules/undici/lib/llhttp/utils.js +15 -0
- package/node_modules/undici/lib/mock/mock-agent.js +160 -0
- package/node_modules/undici/lib/mock/mock-client.js +59 -0
- package/node_modules/undici/lib/mock/mock-errors.js +28 -0
- package/node_modules/undici/lib/mock/mock-interceptor.js +207 -0
- package/node_modules/undici/lib/mock/mock-pool.js +59 -0
- package/node_modules/undici/lib/mock/mock-symbols.js +23 -0
- package/node_modules/undici/lib/mock/mock-utils.js +367 -0
- package/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/undici/lib/mock/pluralizer.js +29 -0
- package/node_modules/undici/lib/util/timers.js +423 -0
- package/node_modules/undici/lib/web/cache/cache.js +859 -0
- package/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/undici/lib/web/cache/symbols.js +5 -0
- package/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/undici/lib/web/cookies/index.js +184 -0
- package/node_modules/undici/lib/web/cookies/parse.js +310 -0
- package/node_modules/undici/lib/web/cookies/util.js +352 -0
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +398 -0
- package/node_modules/undici/lib/web/eventsource/eventsource.js +480 -0
- package/node_modules/undici/lib/web/eventsource/util.js +37 -0
- package/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/undici/lib/web/fetch/body.js +529 -0
- package/node_modules/undici/lib/web/fetch/constants.js +124 -0
- package/node_modules/undici/lib/web/fetch/data-url.js +744 -0
- package/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +46 -0
- package/node_modules/undici/lib/web/fetch/file.js +126 -0
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +474 -0
- package/node_modules/undici/lib/web/fetch/formdata.js +252 -0
- package/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/undici/lib/web/fetch/headers.js +687 -0
- package/node_modules/undici/lib/web/fetch/index.js +2272 -0
- package/node_modules/undici/lib/web/fetch/request.js +1037 -0
- package/node_modules/undici/lib/web/fetch/response.js +610 -0
- package/node_modules/undici/lib/web/fetch/symbols.js +9 -0
- package/node_modules/undici/lib/web/fetch/util.js +1632 -0
- package/node_modules/undici/lib/web/fetch/webidl.js +695 -0
- package/node_modules/undici/lib/web/fileapi/encoding.js +290 -0
- package/node_modules/undici/lib/web/fileapi/filereader.js +344 -0
- package/node_modules/undici/lib/web/fileapi/progressevent.js +78 -0
- package/node_modules/undici/lib/web/fileapi/symbols.js +10 -0
- package/node_modules/undici/lib/web/fileapi/util.js +391 -0
- package/node_modules/undici/lib/web/websocket/connection.js +371 -0
- package/node_modules/undici/lib/web/websocket/constants.js +66 -0
- package/node_modules/undici/lib/web/websocket/events.js +329 -0
- package/node_modules/undici/lib/web/websocket/frame.js +96 -0
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +100 -0
- package/node_modules/undici/lib/web/websocket/receiver.js +513 -0
- package/node_modules/undici/lib/web/websocket/sender.js +104 -0
- package/node_modules/undici/lib/web/websocket/symbols.js +12 -0
- package/node_modules/undici/lib/web/websocket/util.js +322 -0
- package/node_modules/undici/lib/web/websocket/websocket.js +595 -0
- package/node_modules/undici/package.json +160 -0
- package/node_modules/undici/scripts/strip-comments.js +8 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/validate-npm-package-name/LICENSE +6 -0
- package/node_modules/validate-npm-package-name/lib/builtin-modules.json +1 -0
- package/node_modules/validate-npm-package-name/lib/index.js +114 -0
- package/node_modules/validate-npm-package-name/package.json +59 -0
- package/node_modules/walk-up-path/LICENSE +15 -0
- package/node_modules/walk-up-path/dist/commonjs/index.js +18 -0
- package/node_modules/walk-up-path/dist/commonjs/package.json +3 -0
- package/node_modules/walk-up-path/dist/esm/index.js +14 -0
- package/node_modules/walk-up-path/dist/esm/package.json +3 -0
- package/node_modules/walk-up-path/package.json +71 -0
- package/node_modules/which/LICENSE +15 -0
- package/node_modules/which/README.md +51 -0
- package/node_modules/which/bin/which.js +52 -0
- package/node_modules/which/lib/index.js +111 -0
- package/node_modules/which/package.json +52 -0
- package/node_modules/write-file-atomic/LICENSE.md +6 -0
- package/node_modules/write-file-atomic/lib/index.js +269 -0
- package/node_modules/write-file-atomic/package.json +57 -0
- package/node_modules/yallist/LICENSE.md +63 -0
- package/node_modules/yallist/dist/commonjs/index.js +384 -0
- package/node_modules/yallist/dist/commonjs/package.json +3 -0
- package/node_modules/yallist/dist/esm/index.js +379 -0
- package/node_modules/yallist/dist/esm/package.json +3 -0
- package/node_modules/yallist/package.json +68 -0
- package/package.json +9 -4
- package/templates/AGENTS.md.tmpl +17 -3
- package/templates/experience/package.json.tmpl +4 -4
- package/templates/package.json.tmpl +4 -4
- package/templates/skills/build-agent/SKILL.md +1 -1
- package/templates/skills/build-integration/references/oauth-setup.md +3 -3
- package/templates/skills/ekanos-platform/SKILL.md +1 -1
|
@@ -0,0 +1,2023 @@
|
|
|
1
|
+
// mixin implementing the reify method
|
|
2
|
+
const PackageJson = require('@npmcli/package-json')
|
|
3
|
+
const hgi = require('hosted-git-info')
|
|
4
|
+
const npa = require('npm-package-arg')
|
|
5
|
+
const packageContents = require('@npmcli/installed-package-contents')
|
|
6
|
+
const pacote = require('pacote')
|
|
7
|
+
const { pickRegistry } = require('npm-registry-fetch')
|
|
8
|
+
const promiseAllRejectLate = require('promise-all-reject-late')
|
|
9
|
+
const runScript = require('@npmcli/run-script')
|
|
10
|
+
const { callLimit: promiseCallLimit } = require('promise-call-limit')
|
|
11
|
+
const { depth: dfwalk } = require('treeverse')
|
|
12
|
+
const { dirname, resolve, relative, join, sep } = require('node:path')
|
|
13
|
+
const { log, time } = require('proc-log')
|
|
14
|
+
const { existsSync, realpathSync } = require('node:fs')
|
|
15
|
+
const { lstat, mkdir, readdir, readlink, rm, symlink } = require('node:fs/promises')
|
|
16
|
+
const { moveFile } = require('@npmcli/fs')
|
|
17
|
+
const { subset, intersects } = require('semver')
|
|
18
|
+
const { walkUp } = require('walk-up-path')
|
|
19
|
+
|
|
20
|
+
const AuditReport = require('../audit-report.js')
|
|
21
|
+
const Diff = require('../diff.js')
|
|
22
|
+
const calcDepFlags = require('../calc-dep-flags.js')
|
|
23
|
+
const debug = require('../debug.js')
|
|
24
|
+
const onExit = require('../signal-handling.js')
|
|
25
|
+
const optionalSet = require('../optional-set.js')
|
|
26
|
+
const relpath = require('../relpath.js')
|
|
27
|
+
const retirePath = require('../retire-path.js')
|
|
28
|
+
const treeCheck = require('../tree-check.js')
|
|
29
|
+
const Shrinkwrap = require('../shrinkwrap.js')
|
|
30
|
+
const { defaultLockfileVersion } = Shrinkwrap
|
|
31
|
+
const { saveTypeMap, hasSubKey } = require('../add-rm-pkg-deps.js')
|
|
32
|
+
const { IsolatedNode, IsolatedLink } = require('../isolated-classes.js')
|
|
33
|
+
|
|
34
|
+
// Part of steps (steps need refactoring before we can do anything about these)
|
|
35
|
+
const _retireShallowNodes = Symbol.for('retireShallowNodes')
|
|
36
|
+
const _loadBundlesAndUpdateTrees = Symbol.for('loadBundlesAndUpdateTrees')
|
|
37
|
+
const _submitQuickAudit = Symbol('submitQuickAudit')
|
|
38
|
+
const _unpackNewModules = Symbol.for('unpackNewModules')
|
|
39
|
+
const _build = Symbol.for('build')
|
|
40
|
+
|
|
41
|
+
// shared by rebuild mixin
|
|
42
|
+
const _trashList = Symbol.for('trashList')
|
|
43
|
+
const _handleOptionalFailure = Symbol.for('handleOptionalFailure')
|
|
44
|
+
const _loadTrees = Symbol.for('loadTrees')
|
|
45
|
+
// defined by rebuild mixin
|
|
46
|
+
const _checkBins = Symbol.for('checkBins')
|
|
47
|
+
|
|
48
|
+
// shared symbols for swapping out when testing
|
|
49
|
+
// TODO tests should not be this deep into internals
|
|
50
|
+
const _diffTrees = Symbol.for('diffTrees')
|
|
51
|
+
const _createSparseTree = Symbol.for('createSparseTree')
|
|
52
|
+
const _loadShrinkwrapsAndUpdateTrees = Symbol.for('loadShrinkwrapsAndUpdateTrees')
|
|
53
|
+
const _reifyNode = Symbol.for('reifyNode')
|
|
54
|
+
const _updateAll = Symbol.for('updateAll')
|
|
55
|
+
const _updateNames = Symbol.for('updateNames')
|
|
56
|
+
const _moveContents = Symbol.for('moveContents')
|
|
57
|
+
const _moveBackRetiredUnchanged = Symbol.for('moveBackRetiredUnchanged')
|
|
58
|
+
const _removeTrash = Symbol.for('removeTrash')
|
|
59
|
+
const _renamePath = Symbol.for('renamePath')
|
|
60
|
+
const _rollbackRetireShallowNodes = Symbol.for('rollbackRetireShallowNodes')
|
|
61
|
+
const _rollbackCreateSparseTree = Symbol.for('rollbackCreateSparseTree')
|
|
62
|
+
const _rollbackMoveBackRetiredUnchanged = Symbol.for('rollbackMoveBackRetiredUnchanged')
|
|
63
|
+
const _saveIdealTree = Symbol.for('saveIdealTree')
|
|
64
|
+
|
|
65
|
+
// defined by build-ideal-tree mixin
|
|
66
|
+
const _resolvedAdd = Symbol.for('resolvedAdd')
|
|
67
|
+
// used by build-ideal-tree mixin
|
|
68
|
+
const _addNodeToTrashList = Symbol.for('addNodeToTrashList')
|
|
69
|
+
|
|
70
|
+
module.exports = cls => class Reifier extends cls {
|
|
71
|
+
#bundleMissing = new Set() // child nodes we'd EXPECT to be included in a bundle, but aren't
|
|
72
|
+
#bundleUnpacked = new Set() // the nodes we unpack to read their bundles
|
|
73
|
+
#nmValidated = new Set()
|
|
74
|
+
#omit
|
|
75
|
+
#retiredPaths = {}
|
|
76
|
+
#retiredUnchanged = {}
|
|
77
|
+
#shrinkwrapInflated = new Set()
|
|
78
|
+
#sparseTreeDirs = new Set()
|
|
79
|
+
#sparseTreeRoots = new Set()
|
|
80
|
+
#linkedActualForDiff = null
|
|
81
|
+
// Under the linked strategy the audit runs against this non-isolated ideal tree.
|
|
82
|
+
// The isolated tree's inventory has no queryable indexes and its edges route through symlinks, so auditing it reports no vulnerabilities.
|
|
83
|
+
#linkedIdealForAudit = null
|
|
84
|
+
|
|
85
|
+
constructor (options) {
|
|
86
|
+
super(options)
|
|
87
|
+
|
|
88
|
+
this[_trashList] = new Set()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// public method
|
|
92
|
+
async reify (options = {}) {
|
|
93
|
+
// Global installs are normalized to the shallow strategy in the constructor; honor that here so a per-call installStrategy:'linked' can't re-engage the unsupported linked path.
|
|
94
|
+
const linked = !this.options.global &&
|
|
95
|
+
(options.installStrategy || this.options.installStrategy) === 'linked'
|
|
96
|
+
|
|
97
|
+
if (this.options.packageLockOnly && this.options.global) {
|
|
98
|
+
const er = new Error('cannot generate lockfile for global packages')
|
|
99
|
+
er.code = 'ESHRINKWRAPGLOBAL'
|
|
100
|
+
throw er
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
this.#omit = new Set(options.omit)
|
|
104
|
+
|
|
105
|
+
// start tracker block
|
|
106
|
+
this.addTracker('reify')
|
|
107
|
+
const timeEnd = time.start('reify')
|
|
108
|
+
// don't create missing dirs on dry runs
|
|
109
|
+
if (!this.options.packageLockOnly && !this.options.dryRun) {
|
|
110
|
+
// we do NOT want to set ownership on this folder, especially
|
|
111
|
+
// recursively, because it can have other side effects to do that
|
|
112
|
+
// in a project directory. We just want to make it if it's missing.
|
|
113
|
+
await mkdir(resolve(this.path), { recursive: true })
|
|
114
|
+
|
|
115
|
+
// do not allow the top-level node_modules to be a symlink
|
|
116
|
+
await this.#validateNodeModules(resolve(this.path, 'node_modules'))
|
|
117
|
+
}
|
|
118
|
+
await this[_loadTrees](options)
|
|
119
|
+
|
|
120
|
+
const oldTree = this.idealTree
|
|
121
|
+
// Kept to serialize the hidden lockfile from the on-disk .store/symlink layout.
|
|
122
|
+
let isolatedTree = null
|
|
123
|
+
if (linked) {
|
|
124
|
+
// swap out the tree with the isolated tree
|
|
125
|
+
// this is currently technical debt which will be resolved in a refactor
|
|
126
|
+
// of Node/Link trees
|
|
127
|
+
this.idealTree = await this.createIsolatedTree()
|
|
128
|
+
isolatedTree = this.idealTree
|
|
129
|
+
if (this.actualTree) {
|
|
130
|
+
this.#linkedActualForDiff = this.#buildLinkedActualForDiff(
|
|
131
|
+
this.idealTree, this.actualTree
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
// Keep the non-isolated tree so the quick audit can run against it.
|
|
135
|
+
this.#linkedIdealForAudit = oldTree
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
await this[_diffTrees]()
|
|
139
|
+
await this.#reifyPackages()
|
|
140
|
+
if (linked) {
|
|
141
|
+
// The sweep mutates node_modules on disk, so skip it for dry runs and lockfile-only installs (those modes also short-circuit #reifyPackages).
|
|
142
|
+
// The sweep itself scopes to in-filter workspaces when a filter is active, so it's safe to run for filtered installs too.
|
|
143
|
+
if (!this.options.dryRun && !this.options.packageLockOnly) {
|
|
144
|
+
await this.#cleanOrphanedStoreEntries()
|
|
145
|
+
}
|
|
146
|
+
} else if (!this.options.dryRun && !this.options.packageLockOnly) {
|
|
147
|
+
// The .store directory is exclusively a linked-strategy artifact, and load-actual ignores dot-directories, so the diff never sees it.
|
|
148
|
+
// Remove it here when switching away from linked so it does not linger under hoisted/nested.
|
|
149
|
+
// Only do this for a full-project install: a workspace-filtered or --workspaces=false install may leave out-of-scope workspaces with links still pointing into the store.
|
|
150
|
+
const filtered = this.options.workspaces.length > 0 || !this.options.workspacesEnabled
|
|
151
|
+
if (!filtered) {
|
|
152
|
+
await this.#removeStaleStoreDir()
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
} finally {
|
|
156
|
+
// Restore the non-isolated tree so the lockfile is preserved and a reused Arborist never sees the isolated tree, even if reify throws.
|
|
157
|
+
if (linked) {
|
|
158
|
+
this.idealTree = oldTree
|
|
159
|
+
}
|
|
160
|
+
// The quick audit has captured its tree synchronously by now, so drop the stashed references even on throw.
|
|
161
|
+
this.#linkedIdealForAudit = null
|
|
162
|
+
this.#linkedActualForDiff = null
|
|
163
|
+
}
|
|
164
|
+
await this[_saveIdealTree](options)
|
|
165
|
+
// clean inert
|
|
166
|
+
for (const node of this.idealTree.inventory.values()) {
|
|
167
|
+
if (node.inert) {
|
|
168
|
+
node.parent = null
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// clean up any trash that is still in the tree
|
|
172
|
+
for (const path of this[_trashList]) {
|
|
173
|
+
const loc = relpath(this.idealTree.realpath, path)
|
|
174
|
+
const node = this.idealTree.inventory.get(loc)
|
|
175
|
+
if (node && node.root === this.idealTree) {
|
|
176
|
+
node.parent = null
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// if we filtered to only certain nodes, then anything ELSE needs
|
|
181
|
+
// to be untouched in the resulting actual tree, even if it differs
|
|
182
|
+
// in the idealTree. Copy over anything that was in the actual and
|
|
183
|
+
// was not changed, delete anything in the ideal and not actual.
|
|
184
|
+
// Then we move the entire idealTree over to this.actualTree, and
|
|
185
|
+
// save the hidden lockfile.
|
|
186
|
+
if (this.diff && this.diff.filterSet.size && !linked) {
|
|
187
|
+
const reroot = new Set()
|
|
188
|
+
|
|
189
|
+
const { filterSet } = this.diff
|
|
190
|
+
const seen = new Set()
|
|
191
|
+
for (const [loc, ideal] of this.idealTree.inventory.entries()) {
|
|
192
|
+
seen.add(loc)
|
|
193
|
+
|
|
194
|
+
// if it's an ideal node from the filter set, then skip it
|
|
195
|
+
// because we already made whatever changes were necessary
|
|
196
|
+
if (filterSet.has(ideal)) {
|
|
197
|
+
continue
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// otherwise, if it's not in the actualTree, then it's not a thing
|
|
201
|
+
// that we actually added. And if it IS in the actualTree, then
|
|
202
|
+
// it's something that we left untouched, so we need to record
|
|
203
|
+
// that.
|
|
204
|
+
const actual = this.actualTree.inventory.get(loc)
|
|
205
|
+
if (!actual) {
|
|
206
|
+
ideal.root = null
|
|
207
|
+
} else {
|
|
208
|
+
if ([...actual.linksIn].some(link => filterSet.has(link))) {
|
|
209
|
+
seen.add(actual.location)
|
|
210
|
+
continue
|
|
211
|
+
}
|
|
212
|
+
const { realpath, isLink } = actual
|
|
213
|
+
if (isLink && ideal.isLink && ideal.realpath === realpath) {
|
|
214
|
+
continue
|
|
215
|
+
} else {
|
|
216
|
+
reroot.add(actual)
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// now find any actual nodes that may not be present in the ideal
|
|
222
|
+
// tree, but were left behind by virtue of not being in the filter
|
|
223
|
+
for (const [loc, actual] of this.actualTree.inventory.entries()) {
|
|
224
|
+
if (seen.has(loc)) {
|
|
225
|
+
continue
|
|
226
|
+
}
|
|
227
|
+
seen.add(loc)
|
|
228
|
+
|
|
229
|
+
// we know that this is something that ISN'T in the idealTree,
|
|
230
|
+
// or else we will have addressed it in the previous loop.
|
|
231
|
+
// If it's in the filterSet, that means we intentionally removed
|
|
232
|
+
// it, so nothing to do here.
|
|
233
|
+
if (filterSet.has(actual)) {
|
|
234
|
+
continue
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
reroot.add(actual)
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// go through the rerooted actual nodes, and move them over.
|
|
241
|
+
for (const actual of reroot) {
|
|
242
|
+
actual.root = this.idealTree
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// prune out any tops that lack a linkIn, they are no longer relevant.
|
|
246
|
+
for (const top of this.idealTree.tops) {
|
|
247
|
+
if (top.linksIn.size === 0) {
|
|
248
|
+
top.root = null
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// need to calculate dep flags, since nodes may have been marked
|
|
253
|
+
// as extraneous or otherwise incorrect during transit.
|
|
254
|
+
calcDepFlags(this.idealTree)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// save the ideal's meta as a hidden lockfile after we actualize it.
|
|
258
|
+
// Under linked the logical tree is the hoisted layout, so the hidden lockfile is serialized from the isolated tree instead.
|
|
259
|
+
if (!linked) {
|
|
260
|
+
this.idealTree.meta.filename =
|
|
261
|
+
this.idealTree.realpath + '/node_modules/.package-lock.json'
|
|
262
|
+
this.idealTree.meta.hiddenLockfile = true
|
|
263
|
+
this.idealTree.meta.lockfileVersion = defaultLockfileVersion
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
this.actualTree = this.idealTree
|
|
267
|
+
this.idealTree = null
|
|
268
|
+
|
|
269
|
+
if (!this.options.global && !this.options.dryRun) {
|
|
270
|
+
if (linked) {
|
|
271
|
+
await this.#saveLinkedHiddenLockfile(isolatedTree)
|
|
272
|
+
} else {
|
|
273
|
+
await this.actualTree.meta.save()
|
|
274
|
+
}
|
|
275
|
+
const ignoreScripts = !!this.options.ignoreScripts
|
|
276
|
+
// if we aren't doing a dry run or ignoring scripts and we actually made changes to the dep
|
|
277
|
+
// tree, then run the dependencies scripts
|
|
278
|
+
if (!this.options.dryRun && !ignoreScripts && this.diff && this.diff.children.length) {
|
|
279
|
+
const { path, package: pkg } = this.actualTree.target
|
|
280
|
+
const stdio = this.options.foregroundScripts ? 'inherit' : 'pipe'
|
|
281
|
+
const { scripts = {} } = pkg
|
|
282
|
+
for (const event of ['predependencies', 'dependencies', 'postdependencies']) {
|
|
283
|
+
if (Object.prototype.hasOwnProperty.call(scripts, event)) {
|
|
284
|
+
log.info('run', pkg._id, event, scripts[event])
|
|
285
|
+
await time.start(`reify:run:${event}`, () => runScript({
|
|
286
|
+
event,
|
|
287
|
+
path,
|
|
288
|
+
pkg,
|
|
289
|
+
stdio,
|
|
290
|
+
scriptShell: this.options.scriptShell,
|
|
291
|
+
}))
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// This is a very bad pattern and I can't wait to stop doing it
|
|
297
|
+
this.auditReport = await this.auditReport
|
|
298
|
+
|
|
299
|
+
this.finishTracker('reify')
|
|
300
|
+
timeEnd()
|
|
301
|
+
return treeCheck(this.actualTree)
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
async #reifyPackages () {
|
|
305
|
+
// we don't submit the audit report or write to disk on dry runs
|
|
306
|
+
if (this.options.dryRun) {
|
|
307
|
+
return
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (this.options.packageLockOnly) {
|
|
311
|
+
// we already have the complete tree, so just audit it now,
|
|
312
|
+
// and that's all we have to do here.
|
|
313
|
+
return this[_submitQuickAudit]()
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// ok, we're about to start touching the fs. need to roll back
|
|
317
|
+
// if we get an early termination.
|
|
318
|
+
let reifyTerminated = null
|
|
319
|
+
const removeHandler = onExit(({ signal }) => {
|
|
320
|
+
// only call once. if signal hits twice, we just terminate
|
|
321
|
+
removeHandler()
|
|
322
|
+
reifyTerminated = Object.assign(new Error('process terminated'), {
|
|
323
|
+
signal,
|
|
324
|
+
})
|
|
325
|
+
return false
|
|
326
|
+
})
|
|
327
|
+
|
|
328
|
+
// [rollbackfn, [...actions]]
|
|
329
|
+
// after each step, if the process was terminated, execute the rollback
|
|
330
|
+
// note that each rollback *also* calls the previous one when it's
|
|
331
|
+
// finished, and then the first one throws the error, so we only need
|
|
332
|
+
// a new rollback step when we have a new thing that must be done to
|
|
333
|
+
// revert the install.
|
|
334
|
+
const steps = [
|
|
335
|
+
[_rollbackRetireShallowNodes, [
|
|
336
|
+
_retireShallowNodes,
|
|
337
|
+
]],
|
|
338
|
+
[_rollbackCreateSparseTree, [
|
|
339
|
+
_createSparseTree,
|
|
340
|
+
_loadShrinkwrapsAndUpdateTrees,
|
|
341
|
+
_loadBundlesAndUpdateTrees,
|
|
342
|
+
_submitQuickAudit,
|
|
343
|
+
_unpackNewModules,
|
|
344
|
+
]],
|
|
345
|
+
[_rollbackMoveBackRetiredUnchanged, [
|
|
346
|
+
_moveBackRetiredUnchanged,
|
|
347
|
+
_build,
|
|
348
|
+
]],
|
|
349
|
+
]
|
|
350
|
+
for (const [rollback, actions] of steps) {
|
|
351
|
+
for (const action of actions) {
|
|
352
|
+
try {
|
|
353
|
+
await this[action]()
|
|
354
|
+
if (reifyTerminated) {
|
|
355
|
+
throw reifyTerminated
|
|
356
|
+
}
|
|
357
|
+
} catch (er) {
|
|
358
|
+
// TODO rollbacks shouldn't be relied on to throw err
|
|
359
|
+
await this[rollback](er)
|
|
360
|
+
/* istanbul ignore next - rollback throws, should never hit this */
|
|
361
|
+
throw er
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// no rollback for this one, just exit with the error, since the
|
|
367
|
+
// install completed and can't be safely recovered at this point.
|
|
368
|
+
await this[_removeTrash]()
|
|
369
|
+
if (reifyTerminated) {
|
|
370
|
+
throw reifyTerminated
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// done modifying the file system, no need to keep listening for sigs
|
|
374
|
+
removeHandler()
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// when doing a local install, we load everything and figure it all out.
|
|
378
|
+
// when doing a global install, we *only* care about the explicit requests.
|
|
379
|
+
[_loadTrees] (options) {
|
|
380
|
+
const timeEnd = time.start('reify:loadTrees')
|
|
381
|
+
const bitOpt = {
|
|
382
|
+
...options,
|
|
383
|
+
complete: this.options.packageLockOnly || this.options.dryRun,
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// if we're only writing a package lock, then it doesn't matter what's here
|
|
387
|
+
if (this.options.packageLockOnly) {
|
|
388
|
+
return this.buildIdealTree(bitOpt).then(timeEnd)
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const actualOpt = this.options.global ? {
|
|
392
|
+
ignoreMissing: true,
|
|
393
|
+
global: true,
|
|
394
|
+
filter: (node, kid) => {
|
|
395
|
+
// if it's not the project root, and we have no explicit requests,
|
|
396
|
+
// then we're already into a nested dep, so we keep it
|
|
397
|
+
if (this.explicitRequests.size === 0 || !node.isProjectRoot) {
|
|
398
|
+
return true
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// if we added it as an edgeOut, then we want it
|
|
402
|
+
if (this.idealTree.edgesOut.has(kid)) {
|
|
403
|
+
return true
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// if it's an explicit request, then we want it
|
|
407
|
+
const hasExplicit = [...this.explicitRequests]
|
|
408
|
+
.some(edge => edge.name === kid)
|
|
409
|
+
if (hasExplicit) {
|
|
410
|
+
return true
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// ignore the rest of the global install folder
|
|
414
|
+
return false
|
|
415
|
+
},
|
|
416
|
+
} : { ignoreMissing: true }
|
|
417
|
+
|
|
418
|
+
if (!this.options.global) {
|
|
419
|
+
return Promise.all([
|
|
420
|
+
this.loadActual(actualOpt),
|
|
421
|
+
this.buildIdealTree(bitOpt),
|
|
422
|
+
]).then(timeEnd)
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// the global install space tends to have a lot of stuff in it. don't
|
|
426
|
+
// load all of it, just what we care about. we won't be saving a
|
|
427
|
+
// hidden lockfile in there anyway. Note that we have to load ideal
|
|
428
|
+
// BEFORE loading actual, so that the actualOpt can use the
|
|
429
|
+
// explicitRequests which is set during buildIdealTree
|
|
430
|
+
return this.buildIdealTree(bitOpt)
|
|
431
|
+
.then(() => this.loadActual(actualOpt))
|
|
432
|
+
.then(timeEnd)
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
[_diffTrees] () {
|
|
436
|
+
if (this.options.packageLockOnly) {
|
|
437
|
+
return
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
const timeEnd = time.start('reify:diffTrees')
|
|
441
|
+
// XXX if we have an existing diff already, there should be a way
|
|
442
|
+
// to just invalidate the parts that changed, but avoid walking the
|
|
443
|
+
// whole tree again.
|
|
444
|
+
|
|
445
|
+
const includeWorkspaces = this.options.workspacesEnabled
|
|
446
|
+
const includeRootDeps = !includeWorkspaces
|
|
447
|
+
|| this.options.includeWorkspaceRoot && this.options.workspaces.length > 0
|
|
448
|
+
|
|
449
|
+
const filterNodes = []
|
|
450
|
+
if (this.options.global && this.explicitRequests.size) {
|
|
451
|
+
const idealTree = this.idealTree.target
|
|
452
|
+
const actualTree = this.actualTree.target
|
|
453
|
+
// we ONLY are allowed to make changes in the global top-level
|
|
454
|
+
// children where there's an explicit request.
|
|
455
|
+
for (const { name } of this.explicitRequests) {
|
|
456
|
+
const ideal = idealTree.children.get(name)
|
|
457
|
+
if (ideal) {
|
|
458
|
+
filterNodes.push(ideal)
|
|
459
|
+
}
|
|
460
|
+
const actual = actualTree.children.get(name)
|
|
461
|
+
if (actual) {
|
|
462
|
+
filterNodes.push(actual)
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
} else {
|
|
466
|
+
if (includeWorkspaces) {
|
|
467
|
+
// add all ws nodes to filterNodes
|
|
468
|
+
for (const ws of this.options.workspaces) {
|
|
469
|
+
const ideal = this.idealTree.children.get(ws)
|
|
470
|
+
if (ideal) {
|
|
471
|
+
filterNodes.push(ideal)
|
|
472
|
+
}
|
|
473
|
+
// Skip actual-side filterNodes when using the linked diff wrapper.
|
|
474
|
+
// Those nodes have root===actualTree, not root===linkedActualForDiff, and Diff.calculate requires filterNode.root to match actual.
|
|
475
|
+
// The ideal filterNode alone is sufficient to scope the workspace diff.
|
|
476
|
+
if (!this.#linkedActualForDiff) {
|
|
477
|
+
const actual = this.actualTree.children.get(ws)
|
|
478
|
+
if (actual) {
|
|
479
|
+
filterNodes.push(actual)
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (includeRootDeps) {
|
|
485
|
+
// add all non-workspace nodes to filterNodes
|
|
486
|
+
// Skip the actual tree under the linked diff wrapper: its edge targets have root===actualTree, not the wrapper, which trips Diff.calculate's filterNode guard.
|
|
487
|
+
// The ideal-side targets alone scope the diff.
|
|
488
|
+
const trees = this.#linkedActualForDiff ? [this.idealTree] : [this.idealTree, this.actualTree]
|
|
489
|
+
for (const tree of trees) {
|
|
490
|
+
for (const { type, to } of tree.edgesOut.values()) {
|
|
491
|
+
if (type !== 'workspace' && to) {
|
|
492
|
+
filterNodes.push(to)
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// find all the nodes that need to change between the actual
|
|
500
|
+
// and ideal trees.
|
|
501
|
+
this.diff = Diff.calculate({
|
|
502
|
+
omit: this.#omit,
|
|
503
|
+
shrinkwrapInflated: this.#shrinkwrapInflated,
|
|
504
|
+
filterNodes,
|
|
505
|
+
actual: this.#linkedActualForDiff || this.actualTree,
|
|
506
|
+
ideal: this.idealTree,
|
|
507
|
+
})
|
|
508
|
+
|
|
509
|
+
// we don't have to add 'removed' folders to the trashlist, because
|
|
510
|
+
// they'll be moved aside to a retirement folder, and then the retired
|
|
511
|
+
// folder will be deleted at the end. This is important when we have
|
|
512
|
+
// a folder like FOO being "removed" in favor of a folder like "foo",
|
|
513
|
+
// because if we remove node_modules/FOO on case-insensitive systems,
|
|
514
|
+
// it will remove the dep that we *want* at node_modules/foo.
|
|
515
|
+
|
|
516
|
+
timeEnd()
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// add the node and all its bins to the list of things to be
|
|
520
|
+
// removed later on in the process. optionally, also mark them
|
|
521
|
+
// as a retired paths, so that we move them out of the way and
|
|
522
|
+
// replace them when rolling back on failure.
|
|
523
|
+
[_addNodeToTrashList] (node, retire = false) {
|
|
524
|
+
const paths = [node.path, ...node.binPaths]
|
|
525
|
+
const moves = this.#retiredPaths
|
|
526
|
+
log.silly('reify', 'mark', retire ? 'retired' : 'deleted', paths)
|
|
527
|
+
for (const path of paths) {
|
|
528
|
+
if (retire) {
|
|
529
|
+
const retired = retirePath(path)
|
|
530
|
+
moves[path] = retired
|
|
531
|
+
this[_trashList].add(retired)
|
|
532
|
+
} else {
|
|
533
|
+
this[_trashList].add(path)
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// move aside the shallowest nodes in the tree that have to be
|
|
539
|
+
// changed or removed, so that we can rollback if necessary.
|
|
540
|
+
[_retireShallowNodes] () {
|
|
541
|
+
const timeEnd = time.start('reify:retireShallow')
|
|
542
|
+
const moves = this.#retiredPaths = {}
|
|
543
|
+
for (const diff of this.diff.children) {
|
|
544
|
+
if (diff.action === 'CHANGE' || diff.action === 'REMOVE') {
|
|
545
|
+
// we'll have to clean these up at the end, so add them to the list
|
|
546
|
+
this[_addNodeToTrashList](diff.actual, true)
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
log.silly('reify', 'moves', moves)
|
|
550
|
+
const movePromises = Object.entries(moves)
|
|
551
|
+
.map(([from, to]) => this[_renamePath](from, to))
|
|
552
|
+
return promiseAllRejectLate(movePromises).then(timeEnd)
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
[_renamePath] (from, to, didMkdirp = false) {
|
|
556
|
+
return moveFile(from, to)
|
|
557
|
+
.catch(er => {
|
|
558
|
+
// Occasionally an expected bin file might not exist in the package,
|
|
559
|
+
// or a shim/symlink might have been moved aside. If we've already
|
|
560
|
+
// handled the most common cause of ENOENT (dir doesn't exist yet),
|
|
561
|
+
// then just ignore any ENOENT.
|
|
562
|
+
if (er.code === 'ENOENT') {
|
|
563
|
+
return didMkdirp ? null : mkdir(dirname(to), { recursive: true }).then(() =>
|
|
564
|
+
this[_renamePath](from, to, true))
|
|
565
|
+
} else if (er.code === 'EEXIST' || er.code === 'ENOTEMPTY') {
|
|
566
|
+
return rm(to, { recursive: true, force: true }).then(() => moveFile(from, to))
|
|
567
|
+
} else {
|
|
568
|
+
throw er
|
|
569
|
+
}
|
|
570
|
+
})
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
[_rollbackRetireShallowNodes] (er) {
|
|
574
|
+
const timeEnd = time.start('reify:rollback:retireShallow')
|
|
575
|
+
const moves = this.#retiredPaths
|
|
576
|
+
const movePromises = Object.entries(moves)
|
|
577
|
+
.map(([from, to]) => this[_renamePath](to, from))
|
|
578
|
+
return promiseAllRejectLate(movePromises)
|
|
579
|
+
// ignore subsequent rollback errors
|
|
580
|
+
.catch(() => {})
|
|
581
|
+
.then(timeEnd)
|
|
582
|
+
.then(() => {
|
|
583
|
+
throw er
|
|
584
|
+
})
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
[_createSparseTree] () {
|
|
588
|
+
const timeEnd = time.start('reify:createSparse')
|
|
589
|
+
// if we call this fn again, we look for the previous list
|
|
590
|
+
// so that we can avoid making the same directory multiple times
|
|
591
|
+
const leaves = this.diff.leaves
|
|
592
|
+
.filter(diff => {
|
|
593
|
+
return (diff.action === 'ADD' || diff.action === 'CHANGE') &&
|
|
594
|
+
!this.#sparseTreeDirs.has(diff.ideal.path) &&
|
|
595
|
+
!diff.ideal.isLink
|
|
596
|
+
})
|
|
597
|
+
.map(diff => diff.ideal)
|
|
598
|
+
|
|
599
|
+
// we check this in parallel, so guard against multiple attempts to
|
|
600
|
+
// retire the same path at the same time.
|
|
601
|
+
const dirsChecked = new Set()
|
|
602
|
+
return promiseAllRejectLate(leaves.map(async node => {
|
|
603
|
+
for (const d of walkUp(node.path)) {
|
|
604
|
+
if (d === node.top.path) {
|
|
605
|
+
break
|
|
606
|
+
}
|
|
607
|
+
if (dirsChecked.has(d)) {
|
|
608
|
+
continue
|
|
609
|
+
}
|
|
610
|
+
dirsChecked.add(d)
|
|
611
|
+
const st = await lstat(d).catch(() => null)
|
|
612
|
+
// this can happen if we have a link to a package with a name
|
|
613
|
+
// that the filesystem treats as if it is the same thing.
|
|
614
|
+
// would be nice to have conditional istanbul ignores here...
|
|
615
|
+
/* istanbul ignore next - defense in depth */
|
|
616
|
+
if (st && !st.isDirectory()) {
|
|
617
|
+
const retired = retirePath(d)
|
|
618
|
+
this.#retiredPaths[d] = retired
|
|
619
|
+
this[_trashList].add(retired)
|
|
620
|
+
await this[_renamePath](d, retired)
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
this.#sparseTreeDirs.add(node.path)
|
|
624
|
+
const made = await mkdir(node.path, { recursive: true })
|
|
625
|
+
// if the directory already exists, made will be undefined. if that's the case
|
|
626
|
+
// we don't want to remove it because we aren't the ones who created it so we
|
|
627
|
+
// omit it from the #sparseTreeRoots
|
|
628
|
+
/* istanbul ignore next -- pre-existing: mkdir returns undefined when dir exists, covered in reify tests but lost in aggregate coverage merge */
|
|
629
|
+
if (made) {
|
|
630
|
+
this.#sparseTreeRoots.add(made)
|
|
631
|
+
}
|
|
632
|
+
})).then(timeEnd)
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
[_rollbackCreateSparseTree] (er) {
|
|
636
|
+
const timeEnd = time.start('reify:rollback:createSparse')
|
|
637
|
+
// cut the roots of the sparse tree that were created, not the leaves
|
|
638
|
+
const roots = this.#sparseTreeRoots
|
|
639
|
+
// also delete the moves that we retired, so that we can move them back
|
|
640
|
+
const failures = []
|
|
641
|
+
const targets = [...roots, ...Object.keys(this.#retiredPaths)]
|
|
642
|
+
const unlinks = targets
|
|
643
|
+
.map(path => rm(path, { recursive: true, force: true }).catch(er => failures.push([path, er])))
|
|
644
|
+
return promiseAllRejectLate(unlinks).then(() => {
|
|
645
|
+
// eslint-disable-next-line promise/always-return
|
|
646
|
+
if (failures.length) {
|
|
647
|
+
log.warn('cleanup', 'Failed to remove some directories', failures)
|
|
648
|
+
}
|
|
649
|
+
})
|
|
650
|
+
.then(timeEnd)
|
|
651
|
+
.then(() => this[_rollbackRetireShallowNodes](er))
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
// shrinkwrap nodes define their dependency branches with a file, so
|
|
655
|
+
// we need to unpack them, read that shrinkwrap file, and then update
|
|
656
|
+
// the tree by calling loadVirtual with the node as the root.
|
|
657
|
+
[_loadShrinkwrapsAndUpdateTrees] () {
|
|
658
|
+
const seen = this.#shrinkwrapInflated
|
|
659
|
+
const shrinkwraps = this.diff.leaves
|
|
660
|
+
.filter(d => (d.action === 'CHANGE' || d.action === 'ADD' || !d.action) &&
|
|
661
|
+
d.ideal.hasShrinkwrap && !seen.has(d.ideal) &&
|
|
662
|
+
!this[_trashList].has(d.ideal.path))
|
|
663
|
+
|
|
664
|
+
if (!shrinkwraps.length) {
|
|
665
|
+
return
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
const timeEnd = time.start('reify:loadShrinkwraps')
|
|
669
|
+
|
|
670
|
+
const Arborist = this.constructor
|
|
671
|
+
return promiseAllRejectLate(shrinkwraps.map(diff => {
|
|
672
|
+
const node = diff.ideal
|
|
673
|
+
seen.add(node)
|
|
674
|
+
return diff.action ? this[_reifyNode](node) : node
|
|
675
|
+
}))
|
|
676
|
+
.then(nodes => promiseAllRejectLate(nodes.map(node => new Arborist({
|
|
677
|
+
...this.options,
|
|
678
|
+
path: node.path,
|
|
679
|
+
}).loadVirtual({ root: node, subtreeOnly: true }))))
|
|
680
|
+
// reload the diff and sparse tree because the ideal tree changed
|
|
681
|
+
.then(() => this[_diffTrees]())
|
|
682
|
+
.then(() => this[_createSparseTree]())
|
|
683
|
+
.then(() => this[_loadShrinkwrapsAndUpdateTrees]())
|
|
684
|
+
.then(timeEnd)
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
// create a symlink for Links, extract for Nodes
|
|
688
|
+
// return the node object, since we usually want that
|
|
689
|
+
// handle optional dep failures here
|
|
690
|
+
// If reifying fails, and the node is optional, add it and its optionalSet
|
|
691
|
+
// to the trash list
|
|
692
|
+
// Always return the node.
|
|
693
|
+
[_reifyNode] (node) {
|
|
694
|
+
const timeEnd = time.start(`reifyNode:${node.location}`)
|
|
695
|
+
this.addTracker('reify', node.name, node.location)
|
|
696
|
+
|
|
697
|
+
const p = Promise.resolve().then(async () => {
|
|
698
|
+
await this[_checkBins](node)
|
|
699
|
+
await this.#extractOrLink(node)
|
|
700
|
+
const { _id, deprecated } = node.package
|
|
701
|
+
// The .catch is in _handleOptionalFailure. Not ideal, this should be cleaned up.
|
|
702
|
+
// eslint-disable-next-line promise/always-return
|
|
703
|
+
if (deprecated) {
|
|
704
|
+
log.warn('deprecated', `${_id}: ${deprecated}`)
|
|
705
|
+
}
|
|
706
|
+
})
|
|
707
|
+
|
|
708
|
+
return this[_handleOptionalFailure](node, p)
|
|
709
|
+
.then(() => {
|
|
710
|
+
this.finishTracker('reify', node.name, node.location)
|
|
711
|
+
timeEnd()
|
|
712
|
+
return node
|
|
713
|
+
})
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// do not allow node_modules to be a symlink
|
|
717
|
+
async #validateNodeModules (nm) {
|
|
718
|
+
if (this.options.force || this.#nmValidated.has(nm)) {
|
|
719
|
+
return
|
|
720
|
+
}
|
|
721
|
+
const st = await lstat(nm).catch(() => null)
|
|
722
|
+
if (!st || st.isDirectory()) {
|
|
723
|
+
this.#nmValidated.add(nm)
|
|
724
|
+
return
|
|
725
|
+
}
|
|
726
|
+
log.warn('reify', 'Removing non-directory', nm)
|
|
727
|
+
await rm(nm, { recursive: true, force: true })
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
async #extractOrLink (node) {
|
|
731
|
+
const nm = resolve(node.parent.path, 'node_modules')
|
|
732
|
+
await this.#validateNodeModules(nm)
|
|
733
|
+
|
|
734
|
+
if (!node.isLink) {
|
|
735
|
+
// in normal cases, node.resolved should *always* be set by now.
|
|
736
|
+
// however, it is possible when a lockfile is damaged, or very old,
|
|
737
|
+
// or in some other race condition bugs in npm v6, that a previously
|
|
738
|
+
// bundled dependency will have just a version, but no resolved value,
|
|
739
|
+
// and no 'bundled: true' setting.
|
|
740
|
+
// Do the best with what we have, or else remove it from the tree
|
|
741
|
+
// entirely, since we can't possibly reify it.
|
|
742
|
+
let res = null
|
|
743
|
+
if (node.resolved) {
|
|
744
|
+
const registryResolved = this.#registryResolved(node.resolved)
|
|
745
|
+
if (registryResolved) {
|
|
746
|
+
res = `${node.name}@${registryResolved}`
|
|
747
|
+
}
|
|
748
|
+
} else if (node.package.name && node.version) {
|
|
749
|
+
res = `${node.package.name}@${node.version}`
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
// no idea what this thing is. remove it from the tree.
|
|
753
|
+
if (!res) {
|
|
754
|
+
const warning = 'invalid or damaged lockfile detected\n' +
|
|
755
|
+
'please re-try this operation once it completes\n' +
|
|
756
|
+
'so that the damage can be corrected, or perform\n' +
|
|
757
|
+
'a fresh install with no lockfile if the problem persists.'
|
|
758
|
+
log.warn('reify', warning)
|
|
759
|
+
log.verbose('reify', 'unrecognized node in tree', node.path)
|
|
760
|
+
node.parent = null
|
|
761
|
+
node.fsParent = null
|
|
762
|
+
this[_addNodeToTrashList](node)
|
|
763
|
+
return
|
|
764
|
+
}
|
|
765
|
+
await debug(async () => {
|
|
766
|
+
const st = await lstat(node.path).catch(() => null)
|
|
767
|
+
if (st && !st.isDirectory()) {
|
|
768
|
+
debug.log('unpacking into a non-directory', node)
|
|
769
|
+
throw Object.assign(new Error('ENOTDIR: not a directory'), {
|
|
770
|
+
code: 'ENOTDIR',
|
|
771
|
+
path: node.path,
|
|
772
|
+
})
|
|
773
|
+
}
|
|
774
|
+
})
|
|
775
|
+
await pacote.extract(res, node.path, {
|
|
776
|
+
...this.options,
|
|
777
|
+
resolved: node.resolved,
|
|
778
|
+
integrity: node.integrity,
|
|
779
|
+
// A node counts as "root" for allow-* enforcement if it satisfies at least one valid dependency edge declared by the project root or a workspace.
|
|
780
|
+
// node.parent is unsafe here: after hoisting, transitive packages can have the project root as their tree parent.
|
|
781
|
+
// In the linked strategy the store node has no edgesIn, so isolated-reifier precomputes isRootDependency from the source node's edges.
|
|
782
|
+
_isRoot: node.isRootDependency || [...node.edgesIn].some(e =>
|
|
783
|
+
e.valid && (e.from?.isProjectRoot || e.from?.isWorkspace)
|
|
784
|
+
),
|
|
785
|
+
// pacote's npa re-parses our `name@URL` spec as type=remote, so allowRemote would mis-fire on registry tarballs.
|
|
786
|
+
// Override only when we can prove the URL is registry-mediated; see #isRegistryResolvedTarball.
|
|
787
|
+
...(this.#isRegistryResolvedTarball(node) ? { allowRemote: 'all' } : {}),
|
|
788
|
+
})
|
|
789
|
+
// store nodes don't use Node class so node.package doesn't get updated
|
|
790
|
+
if (node.isInStore) {
|
|
791
|
+
const { content: pkg } = await PackageJson.normalize(node.path)
|
|
792
|
+
node.package.scripts = pkg.scripts
|
|
793
|
+
}
|
|
794
|
+
return
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
// node.isLink
|
|
798
|
+
|
|
799
|
+
// Tree-only Link: present in the tree for diff/filter participation, never materialized on disk.
|
|
800
|
+
if (node.isUndeclaredWorkspaceLink) {
|
|
801
|
+
return
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
await rm(node.path, { recursive: true, force: true })
|
|
805
|
+
|
|
806
|
+
// symlink
|
|
807
|
+
const dir = dirname(node.path)
|
|
808
|
+
const target = node.realpath
|
|
809
|
+
|
|
810
|
+
let rel
|
|
811
|
+
if (node.resolved?.startsWith('file:')) {
|
|
812
|
+
rel = this.#calculateRelativePath(node, dir, target, nm)
|
|
813
|
+
} else {
|
|
814
|
+
rel = relative(dir, target)
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
await mkdir(dir, { recursive: true })
|
|
818
|
+
return symlink(rel, node.path, 'junction')
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// if the node is optional, then the failure of the promise is nonfatal
|
|
822
|
+
// just add it and its optional set to the trash list.
|
|
823
|
+
[_handleOptionalFailure] (node, p) {
|
|
824
|
+
return (node.optional ? p.catch(() => {
|
|
825
|
+
const set = optionalSet(node)
|
|
826
|
+
for (const node of set) {
|
|
827
|
+
log.verbose('reify', 'failed optional dependency', node.path)
|
|
828
|
+
node.inert = true
|
|
829
|
+
this[_addNodeToTrashList](node)
|
|
830
|
+
}
|
|
831
|
+
}) : p).then(() => node)
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
#calculateRelativePath (node, dir, target) {
|
|
835
|
+
// Check if the node is affected by a root override
|
|
836
|
+
let hasRootOverride = [...node.edgesIn].some(edge => edge.from.isRoot && edge.overrides)
|
|
837
|
+
// If not set via edges, see if the root package.json explicitly lists an override
|
|
838
|
+
if (!hasRootOverride && node.root) {
|
|
839
|
+
const rootPackage = node.root.target
|
|
840
|
+
hasRootOverride = !!(rootPackage &&
|
|
841
|
+
rootPackage.package.overrides &&
|
|
842
|
+
rootPackage.package.overrides[node.name])
|
|
843
|
+
}
|
|
844
|
+
if (!hasRootOverride) {
|
|
845
|
+
return relative(dir, target)
|
|
846
|
+
}
|
|
847
|
+
// If an override is detected, attempt to retrieve the override spec from the root package.json
|
|
848
|
+
const overrideSpec = node.root?.target?.package?.overrides?.[node.name]
|
|
849
|
+
if (typeof overrideSpec === 'string' && overrideSpec.startsWith('file:')) {
|
|
850
|
+
const overridePath = overrideSpec.replace(/^file:/, '')
|
|
851
|
+
const rootDir = node.root.target.path
|
|
852
|
+
return relative(dir, resolve(rootDir, overridePath))
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
// Fallback: derive the file path from node.resolved in a platform-agnostic way
|
|
856
|
+
const filePath = node.resolved.replace(/^file:/, '')
|
|
857
|
+
return join(filePath)
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
// Serialize the hidden lockfile from the isolated tree, which mirrors the on-disk .store/symlink layout.
|
|
861
|
+
// Its children are every materialized node_modules entry: store package dirs and all symlinks.
|
|
862
|
+
async #saveLinkedHiddenLockfile (isolatedTree) {
|
|
863
|
+
const path = isolatedTree.realpath
|
|
864
|
+
const meta = new Shrinkwrap({
|
|
865
|
+
path,
|
|
866
|
+
hiddenLockfile: true,
|
|
867
|
+
lockfileVersion: defaultLockfileVersion,
|
|
868
|
+
resolveOptions: this.options,
|
|
869
|
+
})
|
|
870
|
+
meta.reset()
|
|
871
|
+
meta.filename = resolve(path, 'node_modules/.package-lock.json')
|
|
872
|
+
const storeRe = /^(.*\/\.store\/.+?)\/node_modules\//
|
|
873
|
+
const containers = new Set()
|
|
874
|
+
const nodes = new Set()
|
|
875
|
+
for (const node of isolatedTree.children.values()) {
|
|
876
|
+
// Tree-only undeclared workspace self-links aren't on disk.
|
|
877
|
+
if (node.isUndeclaredWorkspaceLink) {
|
|
878
|
+
continue
|
|
879
|
+
}
|
|
880
|
+
nodes.add(node)
|
|
881
|
+
// Record the enclosing .store/<key> dir so loadVirtual can resolve a store package's sibling deps.
|
|
882
|
+
// node.location uses the platform separator; lockfile keys are posix.
|
|
883
|
+
const m = node.location.replace(/\\/g, '/').match(storeRe)
|
|
884
|
+
if (m) {
|
|
885
|
+
containers.add(m[1])
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
// Workspace dirs hold their own dep symlinks; record them so the cache can validate those subtrees.
|
|
889
|
+
for (const ws of isolatedTree.fsChildren) {
|
|
890
|
+
nodes.add(ws)
|
|
891
|
+
}
|
|
892
|
+
for (const node of nodes) {
|
|
893
|
+
meta.add(node)
|
|
894
|
+
}
|
|
895
|
+
for (const loc of containers) {
|
|
896
|
+
meta.data.packages[loc] = {}
|
|
897
|
+
}
|
|
898
|
+
await meta.save()
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
// Build a flat actual tree wrapper for linked installs so the diff can correctly match store entries that already exist on disk.
|
|
902
|
+
// The proxy tree from createIsolatedTree() is flat (all children on root), but loadActual() produces a nested tree where store entries are deep link targets.
|
|
903
|
+
// This wrapper surfaces them at the root level for comparison.
|
|
904
|
+
#buildLinkedActualForDiff (idealTree, actualTree) {
|
|
905
|
+
// Combined Map keyed by path (how allChildren() in diff.js keys)
|
|
906
|
+
const combined = new Map()
|
|
907
|
+
|
|
908
|
+
// Create synthetic actual entries for ALL ideal children that exist on disk.
|
|
909
|
+
// The isolated ideal tree is flat (all entries as root children), but loadActual() produces a nested tree where workspace deps are under fsChildren and store entries are deep link targets.
|
|
910
|
+
// Synthetic entries ensure the diff compares matching resolved/integrity values (e.g. workspace links have resolved=undefined in the ideal tree but resolved="file:../packages/..." in the actual tree).
|
|
911
|
+
for (const child of idealTree.children.values()) {
|
|
912
|
+
if (combined.has(child.path) || !existsSync(child.path)) {
|
|
913
|
+
continue
|
|
914
|
+
}
|
|
915
|
+
// Skip store links whose ideal realpath doesn't exist on disk yet — the store hash changed and the symlink needs recreating via ADD.
|
|
916
|
+
if (child.isLink && child.resolved?.startsWith('file:.store/') && !existsSync(child.realpath)) {
|
|
917
|
+
continue
|
|
918
|
+
}
|
|
919
|
+
// Skip a link whose on-disk target is a valid-but-wrong store key (e.g. an interrupted update), so the diff repoints it via ADD.
|
|
920
|
+
if (child.isLink && this.#linkTargetMismatch(child)) {
|
|
921
|
+
continue
|
|
922
|
+
}
|
|
923
|
+
let entry
|
|
924
|
+
if (child.isLink) {
|
|
925
|
+
entry = new IsolatedLink(child)
|
|
926
|
+
} else {
|
|
927
|
+
entry = new IsolatedNode(child)
|
|
928
|
+
}
|
|
929
|
+
if (child.isLink && combined.has(child.realpath)) {
|
|
930
|
+
entry.target = combined.get(child.realpath)
|
|
931
|
+
}
|
|
932
|
+
combined.set(child.path, entry)
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
// Proxy .get(name) to original actual tree for filterNodes compatibility
|
|
936
|
+
// (scoped workspace installs use .get(name), allChildren uses .values())
|
|
937
|
+
const origGet = actualTree.children.get.bind(actualTree.children)
|
|
938
|
+
const combinedGet = combined.get.bind(combined)
|
|
939
|
+
/* istanbul ignore next -- only reached during scoped workspace installs */
|
|
940
|
+
combined.get = (key) => combinedGet(key) || origGet(key)
|
|
941
|
+
|
|
942
|
+
let wrapper
|
|
943
|
+
/* istanbul ignore next - untested! */
|
|
944
|
+
if (actualTree.isLink) {
|
|
945
|
+
wrapper = new IsolatedLink(actualTree)
|
|
946
|
+
} else {
|
|
947
|
+
wrapper = new IsolatedNode(actualTree)
|
|
948
|
+
}
|
|
949
|
+
wrapper.root = wrapper
|
|
950
|
+
wrapper.binPaths = actualTree.binPaths
|
|
951
|
+
wrapper.children = combined
|
|
952
|
+
wrapper.edgesOut = actualTree.edgesOut
|
|
953
|
+
// Use empty fsChildren so that allChildren() only picks up entries from the combined map.
|
|
954
|
+
// The actual fsChildren have real children with different resolved values (e.g. file:../../../node_modules/.store/... vs file:.store/...) that would overwrite our synthetic entries in allChildren().
|
|
955
|
+
wrapper.fsChildren = new Set()
|
|
956
|
+
wrapper.integrity = actualTree.integrity
|
|
957
|
+
wrapper.inventory = actualTree.inventory
|
|
958
|
+
|
|
959
|
+
return wrapper
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
// True when the link's on-disk target resolves to a different path than its ideal target.
|
|
963
|
+
// The caller only invokes this once both paths exist, so realpathSync won't throw.
|
|
964
|
+
#linkTargetMismatch (child) {
|
|
965
|
+
return realpathSync(child.path) !== realpathSync(child.realpath)
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
// When extracting a registry-resolved package, the spec we hand to pacote is name@URL.
|
|
969
|
+
// pacote re-parses that with npa and gets spec.type === 'remote', so without an override the allow-remote gate would fire on every registry tarball (both =none and =root mis-fire).
|
|
970
|
+
// Returns true only when we are confident this is a registry-mediated install.
|
|
971
|
+
#isRegistryResolvedTarball (node) {
|
|
972
|
+
if (!node.resolved || !node.isRegistryDependency) {
|
|
973
|
+
return false
|
|
974
|
+
}
|
|
975
|
+
try {
|
|
976
|
+
// Match the effective fetch URL, not the raw lockfile value.
|
|
977
|
+
// #registryResolved applies replace-registry-host, rewriting a public-registry pin to the configured proxy/mirror so it matches.
|
|
978
|
+
const resolvedURL = new URL(this.#registryResolved(node.resolved))
|
|
979
|
+
// pickRegistry only consults spec.scope, so a bare-name (tag) parse is sufficient and avoids a node.version dependency.
|
|
980
|
+
const registry = new URL(pickRegistry(npa(node.name), this.options))
|
|
981
|
+
const registryPath = registry.pathname.replace(/\/?$/, '/')
|
|
982
|
+
return resolvedURL.origin === registry.origin &&
|
|
983
|
+
(registryPath === '/' || resolvedURL.pathname.startsWith(registryPath))
|
|
984
|
+
} catch {
|
|
985
|
+
return false
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
#registryResolved (resolved) {
|
|
990
|
+
// the default registry url is a magic value meaning "the currently
|
|
991
|
+
// configured registry".
|
|
992
|
+
// `resolved` must never be falsey.
|
|
993
|
+
//
|
|
994
|
+
// XXX: use a magic string that isn't also a valid value, like
|
|
995
|
+
// ${REGISTRY} or something. This has to be threaded through the
|
|
996
|
+
// Shrinkwrap and Node classes carefully, so for now, just treat
|
|
997
|
+
// the default reg as the magical animal that it has been.
|
|
998
|
+
try {
|
|
999
|
+
const resolvedURL = hgi.parseUrl(resolved)
|
|
1000
|
+
const registryURL = new URL(this.registry)
|
|
1001
|
+
const registryPath = registryURL.pathname.replace(/\/$/, '')
|
|
1002
|
+
|
|
1003
|
+
let matchURL = null
|
|
1004
|
+
try {
|
|
1005
|
+
matchURL = new URL(this.options.replaceRegistryHost)
|
|
1006
|
+
} catch {
|
|
1007
|
+
// keep matchURL null
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
const matchHost = matchURL?.hostname ?? this.options.replaceRegistryHost
|
|
1011
|
+
const matchPath = matchURL?.pathname.replace(/\/$/, '') ?? null
|
|
1012
|
+
const hasPathPrefix = (pathname, prefix) =>
|
|
1013
|
+
pathname === prefix || pathname.startsWith(`${prefix}/`)
|
|
1014
|
+
|
|
1015
|
+
const hostMatches = this.options.replaceRegistryHost === 'always' || matchHost === resolvedURL.hostname
|
|
1016
|
+
const pathMatches = !matchPath || hasPathPrefix(resolvedURL.pathname, matchPath)
|
|
1017
|
+
|
|
1018
|
+
if (!hostMatches || !pathMatches) {
|
|
1019
|
+
return resolved
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
resolvedURL.protocol = registryURL.protocol
|
|
1023
|
+
resolvedURL.hostname = registryURL.hostname
|
|
1024
|
+
resolvedURL.port = registryURL.port
|
|
1025
|
+
|
|
1026
|
+
if (matchPath) {
|
|
1027
|
+
// full-URL prefix: swap old path prefix for the registry path
|
|
1028
|
+
resolvedURL.pathname = registryPath + resolvedURL.pathname.slice(matchPath.length)
|
|
1029
|
+
} else if (registryPath && !hasPathPrefix(resolvedURL.pathname, registryPath)) {
|
|
1030
|
+
// host-only: prepend registry path if not already present
|
|
1031
|
+
resolvedURL.pathname = registryPath + resolvedURL.pathname
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
return resolvedURL.toString()
|
|
1035
|
+
} catch {
|
|
1036
|
+
// if we could not parse the url at all then returning nothing
|
|
1037
|
+
// here means it will get removed from the tree in the next step
|
|
1038
|
+
return undefined
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
// bundles are *sort of* like shrinkwraps, in that the branch is defined
|
|
1043
|
+
// by the contents of the package. however, in their case, rather than
|
|
1044
|
+
// shipping a virtual tree that must be reified, they ship an entire
|
|
1045
|
+
// reified actual tree that must be unpacked and not modified.
|
|
1046
|
+
[_loadBundlesAndUpdateTrees] (depth = 0, bundlesByDepth) {
|
|
1047
|
+
let maxBundleDepth
|
|
1048
|
+
if (!bundlesByDepth) {
|
|
1049
|
+
bundlesByDepth = new Map()
|
|
1050
|
+
maxBundleDepth = -1
|
|
1051
|
+
dfwalk({
|
|
1052
|
+
tree: this.diff,
|
|
1053
|
+
visit: diff => {
|
|
1054
|
+
const node = diff.ideal
|
|
1055
|
+
if (!node) {
|
|
1056
|
+
return
|
|
1057
|
+
}
|
|
1058
|
+
if (node.isProjectRoot) {
|
|
1059
|
+
return
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
const { bundleDependencies } = node.package
|
|
1063
|
+
if (bundleDependencies && bundleDependencies.length) {
|
|
1064
|
+
maxBundleDepth = Math.max(maxBundleDepth, node.depth)
|
|
1065
|
+
if (!bundlesByDepth.has(node.depth)) {
|
|
1066
|
+
bundlesByDepth.set(node.depth, [node])
|
|
1067
|
+
} else {
|
|
1068
|
+
bundlesByDepth.get(node.depth).push(node)
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
getChildren: diff => diff.children,
|
|
1073
|
+
})
|
|
1074
|
+
|
|
1075
|
+
bundlesByDepth.set('maxBundleDepth', maxBundleDepth)
|
|
1076
|
+
} else {
|
|
1077
|
+
maxBundleDepth = bundlesByDepth.get('maxBundleDepth')
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
if (depth === 0) {
|
|
1081
|
+
time.start('reify:loadBundles')
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
if (depth > maxBundleDepth) {
|
|
1085
|
+
// if we did something, then prune the tree and update the diffs
|
|
1086
|
+
if (maxBundleDepth !== -1) {
|
|
1087
|
+
this.#pruneBundledMetadeps(bundlesByDepth)
|
|
1088
|
+
this[_diffTrees]()
|
|
1089
|
+
}
|
|
1090
|
+
time.end('reify:loadBundles')
|
|
1091
|
+
return
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
// skip any that have since been removed from the tree, eg by a
|
|
1095
|
+
// shallower bundle overwriting them with a bundled meta-dep.
|
|
1096
|
+
const set = (bundlesByDepth.get(depth) || [])
|
|
1097
|
+
.filter(node => node.root === this.idealTree &&
|
|
1098
|
+
node.target !== node.root &&
|
|
1099
|
+
!this[_trashList].has(node.path))
|
|
1100
|
+
|
|
1101
|
+
if (!set.length) {
|
|
1102
|
+
return this[_loadBundlesAndUpdateTrees](depth + 1, bundlesByDepth)
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
// extract all the nodes with bundles
|
|
1106
|
+
return promiseCallLimit(set.map(node => {
|
|
1107
|
+
return () => {
|
|
1108
|
+
this.#bundleUnpacked.add(node)
|
|
1109
|
+
return this[_reifyNode](node)
|
|
1110
|
+
}
|
|
1111
|
+
}), { rejectLate: true })
|
|
1112
|
+
// then load their unpacked children and move into the ideal tree
|
|
1113
|
+
.then(nodes =>
|
|
1114
|
+
promiseAllRejectLate(nodes.map(async node => {
|
|
1115
|
+
const arb = new this.constructor({
|
|
1116
|
+
...this.options,
|
|
1117
|
+
path: node.path,
|
|
1118
|
+
})
|
|
1119
|
+
const notTransplanted = new Set(node.children.keys())
|
|
1120
|
+
await arb.loadActual({
|
|
1121
|
+
root: node,
|
|
1122
|
+
// don't transplant any sparse folders we created
|
|
1123
|
+
// loadActual will set node.package to {} for empty directories
|
|
1124
|
+
// if by chance there are some empty folders in the node_modules
|
|
1125
|
+
// tree for some other reason, then ok, ignore those too.
|
|
1126
|
+
transplantFilter: node => {
|
|
1127
|
+
if (node.package._id) {
|
|
1128
|
+
// it's actually in the bundle if it gets transplanted
|
|
1129
|
+
notTransplanted.delete(node.name)
|
|
1130
|
+
return true
|
|
1131
|
+
} else {
|
|
1132
|
+
return false
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
})
|
|
1136
|
+
for (const name of notTransplanted) {
|
|
1137
|
+
this.#bundleMissing.add(node.children.get(name))
|
|
1138
|
+
}
|
|
1139
|
+
})))
|
|
1140
|
+
// move onto the next level of bundled items
|
|
1141
|
+
.then(() => this[_loadBundlesAndUpdateTrees](depth + 1, bundlesByDepth))
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
// https://github.com/npm/cli/issues/1597#issuecomment-667639545
|
|
1145
|
+
#pruneBundledMetadeps (bundlesByDepth) {
|
|
1146
|
+
const bundleShadowed = new Set()
|
|
1147
|
+
|
|
1148
|
+
// Example dep graph:
|
|
1149
|
+
// root -> (a, c)
|
|
1150
|
+
// a -> BUNDLE(b)
|
|
1151
|
+
// b -> c
|
|
1152
|
+
// c -> b
|
|
1153
|
+
//
|
|
1154
|
+
// package tree:
|
|
1155
|
+
// root
|
|
1156
|
+
// +-- a
|
|
1157
|
+
// | +-- b(1)
|
|
1158
|
+
// | +-- c(1)
|
|
1159
|
+
// +-- b(2)
|
|
1160
|
+
// +-- c(2)
|
|
1161
|
+
// 1. mark everything that's shadowed by anything in the bundle. This
|
|
1162
|
+
// marks b(2) and c(2).
|
|
1163
|
+
// 2. anything with edgesIn from outside the set, mark not-extraneous,
|
|
1164
|
+
// remove from set. This unmarks c(2).
|
|
1165
|
+
// 3. continue until no change
|
|
1166
|
+
// 4. remove everything in the set from the tree. b(2) is pruned
|
|
1167
|
+
|
|
1168
|
+
// create the list of nodes shadowed by children of bundlers
|
|
1169
|
+
for (const bundles of bundlesByDepth.values()) {
|
|
1170
|
+
// skip the 'maxBundleDepth' item
|
|
1171
|
+
if (!Array.isArray(bundles)) {
|
|
1172
|
+
continue
|
|
1173
|
+
}
|
|
1174
|
+
for (const node of bundles) {
|
|
1175
|
+
for (const name of node.children.keys()) {
|
|
1176
|
+
const shadow = node.parent.resolve(name)
|
|
1177
|
+
if (!shadow) {
|
|
1178
|
+
continue
|
|
1179
|
+
}
|
|
1180
|
+
bundleShadowed.add(shadow)
|
|
1181
|
+
shadow.extraneous = true
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
// lib -> (a@1.x) BUNDLE(a@1.2.3 (b@1.2.3))
|
|
1187
|
+
// a@1.2.3 -> (b@1.2.3)
|
|
1188
|
+
// a@1.3.0 -> (b@2)
|
|
1189
|
+
// b@1.2.3 -> ()
|
|
1190
|
+
// b@2 -> (c@2)
|
|
1191
|
+
//
|
|
1192
|
+
// root
|
|
1193
|
+
// +-- lib
|
|
1194
|
+
// | +-- a@1.2.3
|
|
1195
|
+
// | +-- b@1.2.3
|
|
1196
|
+
// +-- b@2 <-- shadowed, now extraneous
|
|
1197
|
+
// +-- c@2 <-- also shadowed, because only dependent is shadowed
|
|
1198
|
+
for (const shadow of bundleShadowed) {
|
|
1199
|
+
for (const shadDep of shadow.edgesOut.values()) {
|
|
1200
|
+
/* istanbul ignore else - pretty unusual situation, just being
|
|
1201
|
+
* defensive here. Would mean that a bundled dep has a dependency
|
|
1202
|
+
* that is unmet. which, weird, but if you bundle it, we take
|
|
1203
|
+
* whatever you put there and assume the publisher knows best. */
|
|
1204
|
+
if (shadDep.to) {
|
|
1205
|
+
bundleShadowed.add(shadDep.to)
|
|
1206
|
+
shadDep.to.extraneous = true
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
let changed
|
|
1212
|
+
do {
|
|
1213
|
+
changed = false
|
|
1214
|
+
for (const shadow of bundleShadowed) {
|
|
1215
|
+
for (const edge of shadow.edgesIn) {
|
|
1216
|
+
if (!bundleShadowed.has(edge.from)) {
|
|
1217
|
+
shadow.extraneous = false
|
|
1218
|
+
bundleShadowed.delete(shadow)
|
|
1219
|
+
changed = true
|
|
1220
|
+
break
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
} while (changed)
|
|
1225
|
+
|
|
1226
|
+
for (const shadow of bundleShadowed) {
|
|
1227
|
+
this[_addNodeToTrashList](shadow)
|
|
1228
|
+
shadow.root = null
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
async [_submitQuickAudit] () {
|
|
1233
|
+
if (this.options.audit === false) {
|
|
1234
|
+
this.auditReport = null
|
|
1235
|
+
return
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
// we submit the quick audit at this point in the process, as soon as
|
|
1239
|
+
// we have all the deps resolved, so that it can overlap with the other
|
|
1240
|
+
// actions as much as possible. Stash the promise, which we resolve
|
|
1241
|
+
// before finishing the reify() and returning the tree. Thus, we do
|
|
1242
|
+
// NOT return the promise, as the intent is for this to run in parallel
|
|
1243
|
+
// with the reification, and be resolved at a later time.
|
|
1244
|
+
const timeEnd = time.start('reify:audit')
|
|
1245
|
+
const options = { ...this.options }
|
|
1246
|
+
// Under the linked strategy idealTree is the isolated tree, which the audit cannot traverse; audit the non-isolated tree instead.
|
|
1247
|
+
const tree = this.#linkedIdealForAudit || this.idealTree
|
|
1248
|
+
|
|
1249
|
+
// if we're operating on a workspace, only audit the workspace deps
|
|
1250
|
+
if (this.options.workspaces.length) {
|
|
1251
|
+
options.filterSet = this.workspaceDependencySet(
|
|
1252
|
+
tree,
|
|
1253
|
+
this.options.workspaces,
|
|
1254
|
+
this.options.includeWorkspaceRoot
|
|
1255
|
+
)
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
this.auditReport = AuditReport.load(tree, options).then(res => {
|
|
1259
|
+
timeEnd()
|
|
1260
|
+
return res
|
|
1261
|
+
})
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
// ok! actually unpack stuff into their target locations!
|
|
1265
|
+
// The sparse tree has already been created, so we walk the diff
|
|
1266
|
+
// kicking off each unpack job. If any fail, we rm the sparse
|
|
1267
|
+
// tree entirely and try to put everything back where it was.
|
|
1268
|
+
[_unpackNewModules] () {
|
|
1269
|
+
const timeEnd = time.start('reify:unpack')
|
|
1270
|
+
const unpacks = []
|
|
1271
|
+
dfwalk({
|
|
1272
|
+
tree: this.diff,
|
|
1273
|
+
visit: diff => {
|
|
1274
|
+
// no unpacking if we don't want to change this thing
|
|
1275
|
+
if (diff.action !== 'CHANGE' && diff.action !== 'ADD') {
|
|
1276
|
+
return
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
const node = diff.ideal
|
|
1280
|
+
const bd = this.#bundleUnpacked.has(node)
|
|
1281
|
+
const sw = this.#shrinkwrapInflated.has(node)
|
|
1282
|
+
const bundleMissing = this.#bundleMissing.has(node)
|
|
1283
|
+
|
|
1284
|
+
// check whether we still need to unpack this one.
|
|
1285
|
+
// test the inDepBundle last, since that's potentially a tree walk.
|
|
1286
|
+
const doUnpack = node && // can't unpack if removed!
|
|
1287
|
+
// root node already exists
|
|
1288
|
+
!node.isRoot &&
|
|
1289
|
+
// already unpacked to read bundle
|
|
1290
|
+
!bd &&
|
|
1291
|
+
// already unpacked to read sw
|
|
1292
|
+
!sw &&
|
|
1293
|
+
// already unpacked by another dep's bundle
|
|
1294
|
+
(bundleMissing || !node.inDepBundle)
|
|
1295
|
+
|
|
1296
|
+
if (doUnpack) {
|
|
1297
|
+
unpacks.push(this[_reifyNode](node))
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
getChildren: diff => diff.children,
|
|
1301
|
+
})
|
|
1302
|
+
return promiseAllRejectLate(unpacks).then(timeEnd)
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
// This is the part where we move back the unchanging nodes that were
|
|
1306
|
+
// the children of a node that did change. If this fails, the rollback
|
|
1307
|
+
// is a three-step process. First, we try to move the retired unchanged
|
|
1308
|
+
// nodes BACK to their retirement folders, then delete the sparse tree,
|
|
1309
|
+
// then move everything out of retirement.
|
|
1310
|
+
[_moveBackRetiredUnchanged] () {
|
|
1311
|
+
// get a list of all unchanging children of any shallow retired nodes
|
|
1312
|
+
// if they are not the ancestor of any node in the diff set, then the
|
|
1313
|
+
// directory won't already exist, so just rename it over.
|
|
1314
|
+
// This is sort of an inverse diff tree, of all the nodes where
|
|
1315
|
+
// the actualTree and idealTree _don't_ differ, starting from the
|
|
1316
|
+
// shallowest nodes that we moved aside in the first place.
|
|
1317
|
+
const timeEnd = time.start('reify:unretire')
|
|
1318
|
+
const moves = this.#retiredPaths
|
|
1319
|
+
this.#retiredUnchanged = {}
|
|
1320
|
+
return promiseAllRejectLate(this.diff.children.map(diff => {
|
|
1321
|
+
// skip if nothing was retired
|
|
1322
|
+
if (diff.action !== 'CHANGE' && diff.action !== 'REMOVE') {
|
|
1323
|
+
return
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
const { path: realFolder } = diff.actual
|
|
1327
|
+
const retireFolder = moves[realFolder]
|
|
1328
|
+
/* istanbul ignore next - should be impossible */
|
|
1329
|
+
debug(() => {
|
|
1330
|
+
if (!retireFolder) {
|
|
1331
|
+
const er = new Error('trying to un-retire but not retired')
|
|
1332
|
+
throw Object.assign(er, {
|
|
1333
|
+
realFolder,
|
|
1334
|
+
retireFolder,
|
|
1335
|
+
actual: diff.actual,
|
|
1336
|
+
ideal: diff.ideal,
|
|
1337
|
+
action: diff.action,
|
|
1338
|
+
})
|
|
1339
|
+
}
|
|
1340
|
+
})
|
|
1341
|
+
|
|
1342
|
+
this.#retiredUnchanged[retireFolder] = []
|
|
1343
|
+
return promiseAllRejectLate(diff.unchanged.map(node => {
|
|
1344
|
+
// no need to roll back links, since we'll just delete them anyway
|
|
1345
|
+
if (node.isLink) {
|
|
1346
|
+
return mkdir(dirname(node.path), { recursive: true, force: true })
|
|
1347
|
+
.then(() => this[_reifyNode](node))
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
// will have been moved/unpacked along with bundler
|
|
1351
|
+
if (node.inDepBundle && !this.#bundleMissing.has(node)) {
|
|
1352
|
+
return
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
this.#retiredUnchanged[retireFolder].push(node)
|
|
1356
|
+
|
|
1357
|
+
const rel = relative(realFolder, node.path)
|
|
1358
|
+
const fromPath = resolve(retireFolder, rel)
|
|
1359
|
+
// if it has bundleDependencies, then make node_modules. otherwise
|
|
1360
|
+
// skip it.
|
|
1361
|
+
const bd = node.package.bundleDependencies
|
|
1362
|
+
const dir = bd && bd.length ? node.path + '/node_modules' : node.path
|
|
1363
|
+
return mkdir(dir, { recursive: true }).then(() => this[_moveContents](node, fromPath))
|
|
1364
|
+
}))
|
|
1365
|
+
})).then(timeEnd)
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
// move the contents from the fromPath to the node.path
|
|
1369
|
+
[_moveContents] (node, fromPath) {
|
|
1370
|
+
return packageContents({
|
|
1371
|
+
path: fromPath,
|
|
1372
|
+
depth: 1,
|
|
1373
|
+
packageJsonCache: new Map([[fromPath + '/package.json', node.package]]),
|
|
1374
|
+
}).then(res => promiseAllRejectLate(res.map(path => {
|
|
1375
|
+
const rel = relative(fromPath, path)
|
|
1376
|
+
const to = resolve(node.path, rel)
|
|
1377
|
+
return this[_renamePath](path, to)
|
|
1378
|
+
})))
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
[_rollbackMoveBackRetiredUnchanged] (er) {
|
|
1382
|
+
const moves = this.#retiredPaths
|
|
1383
|
+
// flip the mapping around to go back
|
|
1384
|
+
const realFolders = new Map(Object.entries(moves).map(([k, v]) => [v, k]))
|
|
1385
|
+
const promises = Object.entries(this.#retiredUnchanged)
|
|
1386
|
+
.map(([retireFolder, nodes]) => promiseAllRejectLate(nodes.map(node => {
|
|
1387
|
+
const realFolder = realFolders.get(retireFolder)
|
|
1388
|
+
const rel = relative(realFolder, node.path)
|
|
1389
|
+
const fromPath = resolve(retireFolder, rel)
|
|
1390
|
+
return this[_moveContents]({ ...node, path: fromPath }, node.path)
|
|
1391
|
+
})))
|
|
1392
|
+
return promiseAllRejectLate(promises)
|
|
1393
|
+
.then(() => this[_rollbackCreateSparseTree](er))
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
[_build] () {
|
|
1397
|
+
const timeEnd = time.start('reify:build')
|
|
1398
|
+
|
|
1399
|
+
// for all the things being installed, run their appropriate scripts
|
|
1400
|
+
// run in tip->root order, so as to be more likely to build a node's
|
|
1401
|
+
// deps before attempting to build it itself
|
|
1402
|
+
const nodes = []
|
|
1403
|
+
dfwalk({
|
|
1404
|
+
tree: this.diff,
|
|
1405
|
+
leave: diff => {
|
|
1406
|
+
if (!diff.ideal.isProjectRoot) {
|
|
1407
|
+
nodes.push(diff.ideal)
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
// process adds before changes, ignore removals
|
|
1411
|
+
getChildren: diff => diff && diff.children,
|
|
1412
|
+
filter: diff => diff.action === 'ADD' || diff.action === 'CHANGE',
|
|
1413
|
+
})
|
|
1414
|
+
|
|
1415
|
+
// pick up link nodes from the unchanged list as we want to run their
|
|
1416
|
+
// scripts in every install despite of having a diff status change
|
|
1417
|
+
for (const node of this.diff.unchanged) {
|
|
1418
|
+
const tree = node.root.target
|
|
1419
|
+
|
|
1420
|
+
// skip links that only live within node_modules as they are most
|
|
1421
|
+
// likely managed by packages we installed, we only want to rebuild
|
|
1422
|
+
// unchanged links we directly manage
|
|
1423
|
+
const linkedFromRoot = (node.parent === tree && !node.inert) || node.target.fsTop === tree
|
|
1424
|
+
if (node.isLink && linkedFromRoot) {
|
|
1425
|
+
nodes.push(node)
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
return this.rebuild({ nodes, handleOptionalFailure: true }).then(timeEnd)
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
// the tree is pretty much built now, so it's cleanup time.
|
|
1433
|
+
// remove the retired folders, and any deleted nodes
|
|
1434
|
+
// If this fails, there isn't much we can do but tell the user about it.
|
|
1435
|
+
// Thankfully, it's pretty unlikely that it'll fail, since rm is a node builtin.
|
|
1436
|
+
async [_removeTrash] () {
|
|
1437
|
+
const timeEnd = time.start('reify:trash')
|
|
1438
|
+
const promises = []
|
|
1439
|
+
const failures = []
|
|
1440
|
+
const _rm = path => rm(path, { recursive: true, force: true }).catch(er => failures.push([path, er]))
|
|
1441
|
+
|
|
1442
|
+
for (const path of this[_trashList]) {
|
|
1443
|
+
promises.push(_rm(path))
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
await promiseAllRejectLate(promises)
|
|
1447
|
+
if (failures.length) {
|
|
1448
|
+
log.warn('cleanup', 'Failed to remove some directories', failures)
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
timeEnd()
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
// Remove the root .store left behind by a previous linked install when reifying under a non-linked strategy.
|
|
1455
|
+
async #removeStaleStoreDir () {
|
|
1456
|
+
const storeDir = resolve(this.path, 'node_modules', '.store')
|
|
1457
|
+
if (!existsSync(storeDir)) {
|
|
1458
|
+
return
|
|
1459
|
+
}
|
|
1460
|
+
log.silly('reify', 'removing stale .store from a previous linked install')
|
|
1461
|
+
await rm(storeDir, { recursive: true, force: true })
|
|
1462
|
+
.catch(/* istanbul ignore next -- rm with force rarely fails */
|
|
1463
|
+
er => log.warn('cleanup', 'Failed to remove stale .store directory', er))
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
// After a linked install, scan node_modules/.store/ and remove any directories that are not referenced by the current ideal tree.
|
|
1467
|
+
// Store entries become orphaned when dependencies are updated or removed, because the diff never sees the old store keys.
|
|
1468
|
+
// Then sweep the top-level node_modules/ for orphaned symlinks (e.g. an uninstalled dep whose store entry was just removed) so we don't leave dangling links.
|
|
1469
|
+
async #cleanOrphanedStoreEntries () {
|
|
1470
|
+
const nmDir = resolve(this.path, 'node_modules')
|
|
1471
|
+
const storeDir = resolve(nmDir, '.store')
|
|
1472
|
+
|
|
1473
|
+
// Enumerate on-disk store entries as full keys, descending one level into each @scope directory because scoped keys nest as .store/@scope/pkg@version-hash.
|
|
1474
|
+
let entries
|
|
1475
|
+
try {
|
|
1476
|
+
const topLevel = await readdir(storeDir, { withFileTypes: true })
|
|
1477
|
+
entries = []
|
|
1478
|
+
for (const ent of topLevel) {
|
|
1479
|
+
if (ent.name.startsWith('@')) {
|
|
1480
|
+
let scoped
|
|
1481
|
+
try {
|
|
1482
|
+
scoped = await readdir(resolve(storeDir, ent.name))
|
|
1483
|
+
} catch {
|
|
1484
|
+
/* istanbul ignore next -- readdir of an entry we just listed should not fail */
|
|
1485
|
+
continue
|
|
1486
|
+
}
|
|
1487
|
+
for (const name of scoped) {
|
|
1488
|
+
entries.push(`${ent.name}/${name}`)
|
|
1489
|
+
}
|
|
1490
|
+
} else {
|
|
1491
|
+
entries.push(ent.name)
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
} catch {
|
|
1495
|
+
entries = null
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
// Collect valid store keys and valid top-level links per node_modules directory.
|
|
1499
|
+
// Store entries have location node_modules/.store/{key}/node_modules/{pkg}.
|
|
1500
|
+
// Top-level links have location {prefix}/node_modules/{pkg} or {prefix}/node_modules/@scope/{pkg}, where {prefix} is empty for the root project and the workspace's localLocation for workspace deps.
|
|
1501
|
+
// Locations are normalized to forward slashes here because IsolatedNode/IsolatedLink locations are built with path.join, which uses backslashes on Windows.
|
|
1502
|
+
const validKeys = new Set()
|
|
1503
|
+
const nmDirs = new Map()
|
|
1504
|
+
// Valid bin shim names per node_modules dir, collected from each top-level entry's package.bin so the .bin sweep keeps only shims a still-installed package provides.
|
|
1505
|
+
const binsByDir = new Map()
|
|
1506
|
+
const NM_PREFIX = 'node_modules/'
|
|
1507
|
+
const STORE_MARKER = '/.store/'
|
|
1508
|
+
for (const child of this.idealTree.children.values()) {
|
|
1509
|
+
const loc = child.location.replace(/\\/g, '/')
|
|
1510
|
+
if (child.isInStore) {
|
|
1511
|
+
// Store location is node_modules/.store/{key}/node_modules/{pkg}.
|
|
1512
|
+
// For a scoped package the key is @scope/pkg@version-hash, which spans two path segments, so reconstruct both instead of taking only the scope.
|
|
1513
|
+
const parts = loc.split('/')
|
|
1514
|
+
const key = parts[2].startsWith('@') ? `${parts[2]}/${parts[3]}` : parts[2]
|
|
1515
|
+
validKeys.add(key)
|
|
1516
|
+
continue
|
|
1517
|
+
}
|
|
1518
|
+
// Tree-only Links never exist on disk; skipping them lets the sweep remove any stale self-link left by an older npm version.
|
|
1519
|
+
if (child.isLink && child.isUndeclaredWorkspaceLink) {
|
|
1520
|
+
continue
|
|
1521
|
+
}
|
|
1522
|
+
// Real top-level Nodes (e.g. the root's bundled deps) fall through here too, so they are recorded as valid and never swept as stale.
|
|
1523
|
+
const nmIdx = loc.lastIndexOf(NM_PREFIX)
|
|
1524
|
+
if (nmIdx === -1 || loc.includes(STORE_MARKER)) {
|
|
1525
|
+
continue
|
|
1526
|
+
}
|
|
1527
|
+
const prefix = loc.slice(0, nmIdx)
|
|
1528
|
+
const dir = resolve(this.path, prefix, 'node_modules')
|
|
1529
|
+
const rest = loc.slice(nmIdx + NM_PREFIX.length)
|
|
1530
|
+
let entry
|
|
1531
|
+
if (rest.startsWith('@')) {
|
|
1532
|
+
const [scope, name] = rest.split('/')
|
|
1533
|
+
entry = `${scope}${sep}${name}`
|
|
1534
|
+
} else {
|
|
1535
|
+
entry = rest.split('/')[0]
|
|
1536
|
+
}
|
|
1537
|
+
let set = nmDirs.get(dir)
|
|
1538
|
+
if (!set) {
|
|
1539
|
+
set = new Set()
|
|
1540
|
+
nmDirs.set(dir, set)
|
|
1541
|
+
}
|
|
1542
|
+
set.add(entry)
|
|
1543
|
+
|
|
1544
|
+
// package.bin is normalized to an object keyed by bin name; shim names are unscoped even for scoped packages.
|
|
1545
|
+
const bin = child.package?.bin
|
|
1546
|
+
if (bin && typeof bin === 'object') {
|
|
1547
|
+
let binSet = binsByDir.get(dir)
|
|
1548
|
+
if (!binSet) {
|
|
1549
|
+
binSet = new Set()
|
|
1550
|
+
binsByDir.set(dir, binSet)
|
|
1551
|
+
}
|
|
1552
|
+
for (const bn of Object.keys(bin)) {
|
|
1553
|
+
binSet.add(bn)
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
// Determine which node_modules directories to sweep.
|
|
1559
|
+
// For an unfiltered install, sweep the project root and every workspace's node_modules even if no top-level links remain (e.g. last dep was just uninstalled).
|
|
1560
|
+
// For a filtered install (npm install -w <ws>), restrict the sweep to the in-scope workspaces so out-of-scope workspaces are left untouched, mirroring what the diff would do.
|
|
1561
|
+
// When --include-workspace-root is set, the filter scope pulls in root deps too, so the root node_modules is included in the sweep.
|
|
1562
|
+
const filteredNames = this.options.workspaces
|
|
1563
|
+
const isFiltered = Array.isArray(filteredNames) && filteredNames.length > 0
|
|
1564
|
+
if (isFiltered) {
|
|
1565
|
+
const allowedDirs = new Set()
|
|
1566
|
+
for (const ws of this.idealTree.fsChildren) {
|
|
1567
|
+
if (filteredNames.includes(ws.packageName) || filteredNames.includes(ws.name)) {
|
|
1568
|
+
allowedDirs.add(resolve(ws.path, 'node_modules'))
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
if (this.options.includeWorkspaceRoot) {
|
|
1572
|
+
allowedDirs.add(nmDir)
|
|
1573
|
+
}
|
|
1574
|
+
for (const dir of [...nmDirs.keys()]) {
|
|
1575
|
+
if (!allowedDirs.has(dir)) {
|
|
1576
|
+
nmDirs.delete(dir)
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
for (const dir of allowedDirs) {
|
|
1580
|
+
if (!nmDirs.has(dir)) {
|
|
1581
|
+
nmDirs.set(dir, new Set())
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
} else {
|
|
1585
|
+
if (!nmDirs.has(nmDir)) {
|
|
1586
|
+
nmDirs.set(nmDir, new Set())
|
|
1587
|
+
}
|
|
1588
|
+
for (const ws of this.idealTree.fsChildren) {
|
|
1589
|
+
const wsNmDir = resolve(ws.path, 'node_modules')
|
|
1590
|
+
if (!nmDirs.has(wsNmDir)) {
|
|
1591
|
+
nmDirs.set(wsNmDir, new Set())
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
if (entries) {
|
|
1597
|
+
const orphaned = entries.filter(e => !validKeys.has(e))
|
|
1598
|
+
if (orphaned.length) {
|
|
1599
|
+
log.silly('reify', 'cleaning orphaned store entries', orphaned)
|
|
1600
|
+
await promiseAllRejectLate(
|
|
1601
|
+
orphaned.map(e =>
|
|
1602
|
+
rm(resolve(storeDir, e), { recursive: true, force: true })
|
|
1603
|
+
.catch(/* istanbul ignore next -- rm with force rarely fails */
|
|
1604
|
+
er => log.warn('cleanup', `Failed to remove orphaned store entry ${e}`, er))
|
|
1605
|
+
)
|
|
1606
|
+
)
|
|
1607
|
+
// Removing the last scoped orphan under a scope leaves an empty @scope directory behind, so prune any scope directory that is now empty.
|
|
1608
|
+
const scopes = new Set(
|
|
1609
|
+
orphaned.filter(e => e.startsWith('@')).map(e => e.split('/')[0])
|
|
1610
|
+
)
|
|
1611
|
+
await promiseAllRejectLate(
|
|
1612
|
+
[...scopes].map(async scope => {
|
|
1613
|
+
const scopeDir = resolve(storeDir, scope)
|
|
1614
|
+
try {
|
|
1615
|
+
const remaining = await readdir(scopeDir)
|
|
1616
|
+
if (!remaining.length) {
|
|
1617
|
+
await rm(scopeDir, { recursive: true, force: true })
|
|
1618
|
+
}
|
|
1619
|
+
} catch {
|
|
1620
|
+
/* istanbul ignore next -- readdir of a scope dir we just listed should not fail */
|
|
1621
|
+
}
|
|
1622
|
+
})
|
|
1623
|
+
)
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
for (const [dir, valid] of nmDirs) {
|
|
1628
|
+
await this.#cleanOrphanedTopLevelLinks(dir, valid)
|
|
1629
|
+
await this.#cleanStaleBinLinks(dir, binsByDir.get(dir))
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
// Remove stale bin shims left in node_modules/.bin after an uninstall under linked, where the diff never emits an action to drop them.
|
|
1634
|
+
// A shim is stale when no still-linked package provides its name, or when it is a dangling symlink; matching by name handles both POSIX symlinks and Windows .cmd/.ps1 shims.
|
|
1635
|
+
async #cleanStaleBinLinks (nmDir, validBins = new Set()) {
|
|
1636
|
+
const binDir = resolve(nmDir, '.bin')
|
|
1637
|
+
let names
|
|
1638
|
+
try {
|
|
1639
|
+
names = await readdir(binDir)
|
|
1640
|
+
} catch {
|
|
1641
|
+
return
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
const stale = names.filter(name => {
|
|
1645
|
+
const base = name.replace(/\.(cmd|ps1)$/, '')
|
|
1646
|
+
return !validBins.has(base) || !existsSync(resolve(binDir, name))
|
|
1647
|
+
})
|
|
1648
|
+
|
|
1649
|
+
if (!stale.length) {
|
|
1650
|
+
return
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
log.silly('reify', 'cleaning stale bin links', stale)
|
|
1654
|
+
await promiseAllRejectLate(
|
|
1655
|
+
stale.map(name =>
|
|
1656
|
+
rm(resolve(binDir, name), { force: true })
|
|
1657
|
+
.catch(/* istanbul ignore next -- rm with force rarely fails */
|
|
1658
|
+
er => log.warn('cleanup', `Failed to remove stale bin link ${name}`, er))
|
|
1659
|
+
)
|
|
1660
|
+
)
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
// Remove node_modules/ entries that aren't represented in the ideal tree.
|
|
1664
|
+
// Run for the project root and each workspace's node_modules.
|
|
1665
|
+
// The linked diff path can't see these because #buildLinkedActualForDiff derives the actual tree from the ideal, so removed deps are never compared.
|
|
1666
|
+
// Two kinds of stale entry are removed:
|
|
1667
|
+
// - symlinks whose target resolves inside the project root — store links (node_modules/.store/...) and workspace self-links (e.g. node_modules/<ws> -> ../packages/<ws>) that npm itself created.
|
|
1668
|
+
// - real package directories — hoisted-layout deps left behind when switching from the hoisted strategy to linked, where every valid top-level entry is a symlink.
|
|
1669
|
+
// Symlinks pointing outside the project (e.g. `npm link foo` without --save targeting the global prefix, or hand-made `ln -s` to an external path) and non-package real directories are preserved.
|
|
1670
|
+
async #cleanOrphanedTopLevelLinks (nmDir, validTopLevel) {
|
|
1671
|
+
const projectPrefix = resolve(this.path) + sep
|
|
1672
|
+
let dirents
|
|
1673
|
+
try {
|
|
1674
|
+
dirents = await readdir(nmDir, { withFileTypes: true })
|
|
1675
|
+
} catch {
|
|
1676
|
+
return
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
const isOurOrphan = async (linkPath) => {
|
|
1680
|
+
let target
|
|
1681
|
+
try {
|
|
1682
|
+
target = await readlink(linkPath)
|
|
1683
|
+
} catch {
|
|
1684
|
+
/* istanbul ignore next -- readlink of an entry we just listed as a symlink should not fail */
|
|
1685
|
+
return false
|
|
1686
|
+
}
|
|
1687
|
+
return resolve(dirname(linkPath), target).startsWith(projectPrefix)
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
// A real directory is stale only when it is an actual package (has a package.json), so unrelated user directories are never touched.
|
|
1691
|
+
const isStaleRealPkg = (dirent, entPath) =>
|
|
1692
|
+
dirent.isDirectory() && existsSync(resolve(entPath, 'package.json'))
|
|
1693
|
+
|
|
1694
|
+
const isOrphan = async (dirent, entPath) =>
|
|
1695
|
+
(dirent.isSymbolicLink() && await isOurOrphan(entPath)) || isStaleRealPkg(dirent, entPath)
|
|
1696
|
+
|
|
1697
|
+
const orphaned = []
|
|
1698
|
+
const scopes = new Set()
|
|
1699
|
+
for (const ent of dirents) {
|
|
1700
|
+
// skip npm-managed entries (.bin, .store, .package-lock.json, etc)
|
|
1701
|
+
if (ent.name.startsWith('.')) {
|
|
1702
|
+
continue
|
|
1703
|
+
}
|
|
1704
|
+
if (ent.name.startsWith('@')) {
|
|
1705
|
+
let scoped
|
|
1706
|
+
try {
|
|
1707
|
+
scoped = await readdir(resolve(nmDir, ent.name), { withFileTypes: true })
|
|
1708
|
+
} catch {
|
|
1709
|
+
/* istanbul ignore next -- readdir of an entry we just listed should not fail */
|
|
1710
|
+
continue
|
|
1711
|
+
}
|
|
1712
|
+
for (const pkgEnt of scoped) {
|
|
1713
|
+
const key = `${ent.name}${sep}${pkgEnt.name}`
|
|
1714
|
+
if (!validTopLevel.has(key) && await isOrphan(pkgEnt, resolve(nmDir, key))) {
|
|
1715
|
+
orphaned.push(key)
|
|
1716
|
+
scopes.add(ent.name)
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
} else if (!validTopLevel.has(ent.name) && await isOrphan(ent, resolve(nmDir, ent.name))) {
|
|
1720
|
+
orphaned.push(ent.name)
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
if (!orphaned.length) {
|
|
1725
|
+
return
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
log.silly('reify', 'cleaning orphaned top-level entries', orphaned)
|
|
1729
|
+
await promiseAllRejectLate(
|
|
1730
|
+
orphaned.map(name =>
|
|
1731
|
+
rm(resolve(nmDir, name), { recursive: true, force: true })
|
|
1732
|
+
.catch(/* istanbul ignore next -- rm with force rarely fails */
|
|
1733
|
+
er => log.warn('cleanup', `Failed to remove orphaned entry ${name}`, er))
|
|
1734
|
+
)
|
|
1735
|
+
)
|
|
1736
|
+
|
|
1737
|
+
// Removing the last package under a scope leaves an empty @scope directory behind, so prune any scope directory that is now empty.
|
|
1738
|
+
await promiseAllRejectLate(
|
|
1739
|
+
[...scopes].map(async scope => {
|
|
1740
|
+
const scopeDir = resolve(nmDir, scope)
|
|
1741
|
+
try {
|
|
1742
|
+
const remaining = await readdir(scopeDir)
|
|
1743
|
+
if (!remaining.length) {
|
|
1744
|
+
await rm(scopeDir, { recursive: true, force: true })
|
|
1745
|
+
}
|
|
1746
|
+
} catch {
|
|
1747
|
+
/* istanbul ignore next -- readdir of a scope dir we just listed should not fail */
|
|
1748
|
+
}
|
|
1749
|
+
})
|
|
1750
|
+
)
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
// last but not least, we save the ideal tree metadata to the package-lock
|
|
1754
|
+
// or shrinkwrap file, and any additions or removals to package.json
|
|
1755
|
+
async [_saveIdealTree] (options) {
|
|
1756
|
+
// the ideal tree is actualized now, hooray!
|
|
1757
|
+
// it still contains all the references to optional nodes that were removed
|
|
1758
|
+
// for install failures. Those still end up in the shrinkwrap, so we
|
|
1759
|
+
// save it first, then prune out the optional trash, and then return it.
|
|
1760
|
+
|
|
1761
|
+
const save = !(options.save === false)
|
|
1762
|
+
|
|
1763
|
+
// we check for updates in order to make sure we run save ideal tree
|
|
1764
|
+
// even though save=false since we want `npm update` to be able to
|
|
1765
|
+
// write to package-lock files by default
|
|
1766
|
+
const hasUpdates = this[_updateAll] || this[_updateNames].length
|
|
1767
|
+
|
|
1768
|
+
// we're going to completely skip save ideal tree in case of a global or
|
|
1769
|
+
// dry-run install and also if the save option is set to false, EXCEPT for
|
|
1770
|
+
// update since the expected behavior for npm7+ is for update to
|
|
1771
|
+
// NOT save to package.json, we make that exception since we still want
|
|
1772
|
+
// saveIdealTree to be able to write the lockfile by default.
|
|
1773
|
+
const saveIdealTree = !(
|
|
1774
|
+
(!save && !hasUpdates)
|
|
1775
|
+
|| this.options.global
|
|
1776
|
+
|| this.options.dryRun
|
|
1777
|
+
)
|
|
1778
|
+
|
|
1779
|
+
if (!saveIdealTree) {
|
|
1780
|
+
return false
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
const timeEnd = time.start('reify:save')
|
|
1784
|
+
|
|
1785
|
+
const updatedTrees = new Set()
|
|
1786
|
+
const updateNodes = nodes => {
|
|
1787
|
+
for (const { name, tree: addTree } of nodes) {
|
|
1788
|
+
// addTree either the root, or a workspace
|
|
1789
|
+
const edge = addTree.edgesOut.get(name)
|
|
1790
|
+
const pkg = addTree.package
|
|
1791
|
+
const req = npa.resolve(name, edge.spec, addTree.realpath)
|
|
1792
|
+
const { rawSpec, subSpec } = req
|
|
1793
|
+
|
|
1794
|
+
const spec = subSpec ? subSpec.rawSpec : rawSpec
|
|
1795
|
+
const child = edge.to
|
|
1796
|
+
|
|
1797
|
+
// if we tried to install an optional dep, but it was a version
|
|
1798
|
+
// that we couldn't resolve, this MAY be missing. if we haven't
|
|
1799
|
+
// blown up by now, it's because it was not a problem, though, so
|
|
1800
|
+
// just move on.
|
|
1801
|
+
if (!child || !addTree.isTop) {
|
|
1802
|
+
continue
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
let newSpec
|
|
1806
|
+
// True if the dependency is getting installed from a local file path
|
|
1807
|
+
// In this case it is not possible to do the normal version comparisons
|
|
1808
|
+
// as the new version will be a file path
|
|
1809
|
+
const isLocalDep = req.type === 'directory' || req.type === 'file'
|
|
1810
|
+
if (req.registry) {
|
|
1811
|
+
const version = child.version
|
|
1812
|
+
const prefixRange = version ? this.options.savePrefix + version : '*'
|
|
1813
|
+
// if we installed a range, then we save the range specified
|
|
1814
|
+
// if it is not a subset of the ^x.y.z. eg, installing a range
|
|
1815
|
+
// of `1.x <1.2.3` will not be saved as `^1.2.0`, because that
|
|
1816
|
+
// would allow versions outside the requested range. Tags and
|
|
1817
|
+
// specific versions save with the save-prefix.
|
|
1818
|
+
const isRange = (subSpec || req).type === 'range'
|
|
1819
|
+
|
|
1820
|
+
let range = spec
|
|
1821
|
+
if (
|
|
1822
|
+
!isRange ||
|
|
1823
|
+
spec === '*' ||
|
|
1824
|
+
subset(prefixRange, spec, { loose: true })
|
|
1825
|
+
) {
|
|
1826
|
+
range = prefixRange
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
const pname = child.packageName
|
|
1830
|
+
const alias = name !== pname
|
|
1831
|
+
newSpec = alias ? `npm:${pname}@${range}` : range
|
|
1832
|
+
} else if (req.hosted) {
|
|
1833
|
+
// save the git+https url if it has auth; otherwise, shortcut
|
|
1834
|
+
const h = req.hosted
|
|
1835
|
+
const opt = { noCommittish: false }
|
|
1836
|
+
if (h.https && h.auth) {
|
|
1837
|
+
newSpec = `git+${h.https(opt)}`
|
|
1838
|
+
} else {
|
|
1839
|
+
newSpec = h.shortcut(opt)
|
|
1840
|
+
}
|
|
1841
|
+
} else if (isLocalDep) {
|
|
1842
|
+
// when finding workspace nodes, make sure that
|
|
1843
|
+
// we save them using their version instead of
|
|
1844
|
+
// using their relative path
|
|
1845
|
+
if (edge.type === 'workspace') {
|
|
1846
|
+
const { version } = edge.to.target
|
|
1847
|
+
const prefixRange = version ? this.options.savePrefix + version : '*'
|
|
1848
|
+
newSpec = prefixRange
|
|
1849
|
+
} else {
|
|
1850
|
+
// save the relative path in package.json
|
|
1851
|
+
// Normally saveSpec is updated with the proper relative
|
|
1852
|
+
// path already, but it's possible to specify a full absolute
|
|
1853
|
+
// path initially, in which case we can end up with the wrong
|
|
1854
|
+
// thing, so just get the ultimate fetchSpec and relativize it.
|
|
1855
|
+
const p = req.fetchSpec.replace(/^file:/, '')
|
|
1856
|
+
const rel = relpath(addTree.realpath, p)
|
|
1857
|
+
newSpec = `file:${rel}`
|
|
1858
|
+
}
|
|
1859
|
+
} else {
|
|
1860
|
+
newSpec = req.saveSpec
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
if (options.saveType) {
|
|
1864
|
+
const depType = saveTypeMap.get(options.saveType)
|
|
1865
|
+
pkg[depType][name] = newSpec
|
|
1866
|
+
// PackageJson.normalize will have moved it here if it was in both, if it is empty it will be deleted later
|
|
1867
|
+
if (options.saveType === 'prod' && pkg.optionalDependencies) {
|
|
1868
|
+
delete pkg.optionalDependencies[name]
|
|
1869
|
+
}
|
|
1870
|
+
} else {
|
|
1871
|
+
if (hasSubKey(pkg, 'dependencies', name)) {
|
|
1872
|
+
pkg.dependencies[name] = newSpec
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
if (hasSubKey(pkg, 'devDependencies', name)) {
|
|
1876
|
+
pkg.devDependencies[name] = newSpec
|
|
1877
|
+
// don't update peer or optional if we don't have to
|
|
1878
|
+
if (hasSubKey(pkg, 'peerDependencies', name) && (isLocalDep || !intersects(newSpec, pkg.peerDependencies[name]))) {
|
|
1879
|
+
pkg.peerDependencies[name] = newSpec
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
if (hasSubKey(pkg, 'optionalDependencies', name) && (isLocalDep || !intersects(newSpec, pkg.optionalDependencies[name]))) {
|
|
1883
|
+
pkg.optionalDependencies[name] = newSpec
|
|
1884
|
+
}
|
|
1885
|
+
} else {
|
|
1886
|
+
if (hasSubKey(pkg, 'peerDependencies', name)) {
|
|
1887
|
+
pkg.peerDependencies[name] = newSpec
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
if (hasSubKey(pkg, 'optionalDependencies', name)) {
|
|
1891
|
+
pkg.optionalDependencies[name] = newSpec
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
updatedTrees.add(addTree)
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
// Returns true if any of the edges from this node has a semver
|
|
1901
|
+
// range definition that is an exact match to the version installed
|
|
1902
|
+
// e.g: should return true if for a given and installed version 1.0.0,
|
|
1903
|
+
// range is either =1.0.0 or 1.0.0
|
|
1904
|
+
const exactVersion = node => {
|
|
1905
|
+
for (const edge of node.edgesIn) {
|
|
1906
|
+
try {
|
|
1907
|
+
if (subset(edge.spec, node.version)) {
|
|
1908
|
+
return false
|
|
1909
|
+
}
|
|
1910
|
+
} catch {
|
|
1911
|
+
// ignore errors
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
return true
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
// helper that retrieves an array of nodes that were
|
|
1918
|
+
// potentially updated during the reify process, in order
|
|
1919
|
+
// to limit the number of nodes to check and update, only
|
|
1920
|
+
// select nodes from the inventory that are direct deps
|
|
1921
|
+
// of a given package.json (project root or a workspace)
|
|
1922
|
+
// and in ase of using a list of `names`, restrict nodes
|
|
1923
|
+
// to only names that are found in this list
|
|
1924
|
+
const retrieveUpdatedNodes = names => {
|
|
1925
|
+
const filterDirectDependencies = node =>
|
|
1926
|
+
!node.isRoot && node.resolveParent && node.resolveParent.isRoot
|
|
1927
|
+
&& (!names || names.includes(node.name))
|
|
1928
|
+
&& exactVersion(node) // skip update for exact ranges
|
|
1929
|
+
|
|
1930
|
+
const directDeps = this.idealTree.inventory
|
|
1931
|
+
.filter(filterDirectDependencies)
|
|
1932
|
+
|
|
1933
|
+
// traverses the list of direct dependencies and collect all nodes
|
|
1934
|
+
// to be updated, since any of them might have changed during reify
|
|
1935
|
+
const nodes = []
|
|
1936
|
+
for (const node of directDeps) {
|
|
1937
|
+
for (const edgeIn of node.edgesIn) {
|
|
1938
|
+
nodes.push({
|
|
1939
|
+
name: node.name,
|
|
1940
|
+
tree: edgeIn.from.target,
|
|
1941
|
+
})
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
return nodes
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
if (save) {
|
|
1948
|
+
// when using update all alongside with save, we'll make
|
|
1949
|
+
// sure to refresh every dependency of the root idealTree
|
|
1950
|
+
if (this[_updateAll]) {
|
|
1951
|
+
const nodes = retrieveUpdatedNodes()
|
|
1952
|
+
updateNodes(nodes)
|
|
1953
|
+
} else {
|
|
1954
|
+
// resolvedAdd is the list of user add requests, but with names added
|
|
1955
|
+
// to things like git repos and tarball file/urls. However, if the
|
|
1956
|
+
// user requested 'foo@', and we have a foo@file:../foo, then we should
|
|
1957
|
+
// end up saving the spec we actually used, not whatever they gave us.
|
|
1958
|
+
if (this[_resolvedAdd].length) {
|
|
1959
|
+
updateNodes(this[_resolvedAdd])
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
// if updating given dependencies by name, restrict the list of
|
|
1963
|
+
// nodes to check to only those currently in _updateNames
|
|
1964
|
+
if (this[_updateNames].length) {
|
|
1965
|
+
const nodes = retrieveUpdatedNodes(this[_updateNames])
|
|
1966
|
+
updateNodes(nodes)
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
// grab any from explicitRequests that had deps removed
|
|
1970
|
+
for (const { from: tree } of this.explicitRequests) {
|
|
1971
|
+
updatedTrees.add(tree)
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
if (save) {
|
|
1977
|
+
for (const tree of updatedTrees) {
|
|
1978
|
+
// refresh the edges so they have the correct specs
|
|
1979
|
+
tree.package = tree.package
|
|
1980
|
+
const pkgJson = await PackageJson.load(tree.path, { create: true })
|
|
1981
|
+
const {
|
|
1982
|
+
dependencies = {},
|
|
1983
|
+
devDependencies = {},
|
|
1984
|
+
optionalDependencies = {},
|
|
1985
|
+
peerDependencies = {},
|
|
1986
|
+
// bundleDependencies is not required by PackageJson like the other
|
|
1987
|
+
// fields here PackageJson also doesn't omit an empty array for this
|
|
1988
|
+
// field so defaulting this to an empty array would add that field to
|
|
1989
|
+
// every package.json file.
|
|
1990
|
+
bundleDependencies,
|
|
1991
|
+
} = tree.package
|
|
1992
|
+
|
|
1993
|
+
pkgJson.update({
|
|
1994
|
+
dependencies,
|
|
1995
|
+
devDependencies,
|
|
1996
|
+
optionalDependencies,
|
|
1997
|
+
peerDependencies,
|
|
1998
|
+
bundleDependencies,
|
|
1999
|
+
})
|
|
2000
|
+
await pkgJson.save()
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
// before now edge specs could be changing, affecting the `requires` field
|
|
2005
|
+
// in the package lock, so we hold off saving to the very last action
|
|
2006
|
+
if (this.options.usePackageLock) {
|
|
2007
|
+
// preserve indentation, if possible
|
|
2008
|
+
let format = this.idealTree.package[Symbol.for('indent')]
|
|
2009
|
+
if (format === undefined) {
|
|
2010
|
+
format = ' '
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
// TODO this ignores options.save
|
|
2014
|
+
await this.idealTree.meta.save({
|
|
2015
|
+
format: (this.options.formatPackageLock && format) ? format
|
|
2016
|
+
: this.options.formatPackageLock,
|
|
2017
|
+
})
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
timeEnd()
|
|
2021
|
+
return true
|
|
2022
|
+
}
|
|
2023
|
+
}
|