diff --git a/packages/schema/package.json b/packages/schema/package.json index dbe7b4134..af83d2dfc 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -78,11 +78,13 @@ "publish-dev": "pnpm publish --tag dev", "postinstall": "node bin/post-install.js" }, + "peerDependencies": { + "prisma": "^4.0.0" + }, "dependencies": { - "@prisma/generator-helper": "^4.7.1", - "@prisma/internals": "^4.7.1", + "@prisma/generator-helper": "^4.0.0", + "@prisma/internals": "^4.0.0", "@zenstackhq/language": "workspace:*", - "@zenstackhq/runtime": "workspace:*", "@zenstackhq/sdk": "workspace:*", "async-exit-hook": "^2.0.1", "change-case": "^4.1.2", @@ -95,7 +97,6 @@ "node-machine-id": "^1.1.12", "ora": "^5.4.1", "pluralize": "^8.0.0", - "prisma": "~4.7.0", "promisify": "^0.0.3", "semver": "^7.3.8", "sleep-promise": "^9.1.0", @@ -119,6 +120,7 @@ "@types/vscode": "^1.56.0", "@typescript-eslint/eslint-plugin": "^5.42.0", "@typescript-eslint/parser": "^5.42.0", + "@zenstackhq/runtime": "workspace:*", "@zenstackhq/testtools": "workspace:*", "concurrently": "^7.4.0", "copyfiles": "^2.4.1", @@ -126,8 +128,10 @@ "esbuild": "^0.15.12", "eslint": "^8.27.0", "eslint-plugin-jest": "^27.1.7", + "get-latest-version": "^5.0.1", "jest": "^29.2.1", "langium-cli": "^1.0.0", + "prisma": "^4.0.0", "renamer": "^4.0.0", "rimraf": "^3.0.2", "tmp": "^0.2.1", diff --git a/packages/schema/src/cli/cli-util.ts b/packages/schema/src/cli/cli-util.ts index 8c6d44886..fe8603357 100644 --- a/packages/schema/src/cli/cli-util.ts +++ b/packages/schema/src/cli/cli-util.ts @@ -2,14 +2,18 @@ import { isPlugin, Model } from '@zenstackhq/language/ast'; import { getLiteral, PluginError } from '@zenstackhq/sdk'; import colors from 'colors'; import fs from 'fs'; +import getLatestVersion from 'get-latest-version'; import { LangiumDocument } from 'langium'; import { NodeFileSystem } from 'langium/node'; +import ora from 'ora'; import path from 'path'; +import semver from 'semver'; import { URI } from 'vscode-uri'; import { PLUGIN_MODULE_NAME, STD_LIB_MODULE_NAME } from '../language-server/constants'; import { createZModelServices, ZModelServices } from '../language-server/zmodel-module'; import { Context } from '../types'; import { ensurePackage, installPackage, PackageManagers } from '../utils/pkg-utils'; +import { getVersion } from '../utils/version-utils'; import { CliError } from './cli-error'; import { PluginRunner } from './plugin-runner'; @@ -20,7 +24,7 @@ export async function initProject( projectPath: string, prismaSchema: string | undefined, packageManager: PackageManagers | undefined, - tag: string + tag?: string ) { if (!fs.existsSync(projectPath)) { console.error(`Path does not exist: ${projectPath}`); @@ -56,6 +60,8 @@ export async function initProject( ensurePackage('prisma', true, packageManager, 'latest', projectPath); ensurePackage('@prisma/client', false, packageManager, 'latest', projectPath); + + tag = tag ?? getVersion(); installPackage('zenstack', true, packageManager, tag, projectPath); installPackage('@zenstackhq/runtime', false, packageManager, tag, projectPath); @@ -180,3 +186,54 @@ export async function runPlugins(options: { schema: string; packageManager: Pack } } } + +export async function dumpInfo(projectPath: string) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let pkgJson: any; + const resolvedPath = path.resolve(projectPath); + try { + pkgJson = require(path.join(resolvedPath, 'package.json')); + } catch { + console.error('Unable to locate package.json. Are you in a valid project directory?'); + return; + } + const packages = [ + 'zenstack', + ...Object.keys(pkgJson.dependencies ?? {}).filter((p) => p.startsWith('@zenstackhq/')), + ...Object.keys(pkgJson.devDependencies ?? {}).filter((p) => p.startsWith('@zenstackhq/')), + ]; + + const versions = new Set(); + for (const pkg of packages) { + try { + const resolved = require.resolve(`${pkg}/package.json`, { paths: [resolvedPath] }); + // eslint-disable-next-line @typescript-eslint/no-var-requires + const version = require(resolved).version; + versions.add(version); + console.log(` ${colors.green(pkg.padEnd(20))}\t${version}`); + } catch { + // noop + } + } + + if (versions.size > 1) { + console.warn(colors.yellow('WARNING: Multiple versions of Zenstack packages detected. This may cause issues.')); + } else if (versions.size > 0) { + const spinner = ora('Checking npm registry').start(); + const latest = await getLatestVersion('zenstack'); + + if (!latest) { + spinner.fail('unable to check for latest version'); + } else { + spinner.succeed(); + const version = [...versions][0]; + if (semver.gt(latest, version)) { + console.log(`A newer version of Zenstack is available: ${latest}.`); + } else if (semver.gt(version, latest)) { + console.log('You are using a pre-release version of Zenstack.'); + } else { + console.log('You are using the latest version of Zenstack.'); + } + } + } +} diff --git a/packages/schema/src/cli/index.ts b/packages/schema/src/cli/index.ts index 17557638b..db5ee0939 100644 --- a/packages/schema/src/cli/index.ts +++ b/packages/schema/src/cli/index.ts @@ -7,7 +7,7 @@ import telemetry from '../telemetry'; import { PackageManagers } from '../utils/pkg-utils'; import { getVersion } from '../utils/version-utils'; import { CliError } from './cli-error'; -import { initProject, runPlugins } from './cli-util'; +import { dumpInfo, initProject, runPlugins } from './cli-util'; // required minimal version of Prisma export const requiredPrismaVersion = '4.0.0'; @@ -17,7 +17,7 @@ export const initAction = async ( options: { prisma: string | undefined; packageManager: PackageManagers | undefined; - tag: string; + tag?: string; } ): Promise => { await telemetry.trackSpan( @@ -29,6 +29,16 @@ export const initAction = async ( ); }; +export const infoAction = async (projectPath: string): Promise => { + await telemetry.trackSpan( + 'cli:command:start', + 'cli:command:complete', + 'cli:command:error', + { command: 'info' }, + () => dumpInfo(projectPath) + ); +}; + export const generateAction = async (options: { schema: string; packageManager: PackageManagers | undefined; @@ -95,16 +105,18 @@ export function createProgram() { const noDependencyCheck = new Option('--no-dependency-check', 'do not check if dependencies are installed'); + program + .command('info') + .description('Get information of installed ZenStack and related packages.') + .argument('[path]', 'project path', '.') + .action(infoAction); + program .command('init') .description('Initialize an existing project for ZenStack.') .addOption(pmOption) .addOption(new Option('--prisma ', 'location of Prisma schema file to bootstrap from')) - .addOption( - new Option('--tag ', 'the NPM package tag to use when installing dependencies').default( - '' - ) - ) + .addOption(new Option('--tag [tag]', 'the NPM package tag to use when installing dependencies')) .argument('[path]', 'project path', '.') .action(initAction); diff --git a/packages/schema/src/plugins/access-policy/policy-guard-generator.ts b/packages/schema/src/plugins/access-policy/policy-guard-generator.ts index 06a70336b..a42c6560c 100644 --- a/packages/schema/src/plugins/access-policy/policy-guard-generator.ts +++ b/packages/schema/src/plugins/access-policy/policy-guard-generator.ts @@ -13,7 +13,7 @@ import { MemberAccessExpr, Model, } from '@zenstackhq/language/ast'; -import { PolicyKind, PolicyOperationKind } from '@zenstackhq/runtime'; +import type { PolicyKind, PolicyOperationKind } from '@zenstackhq/runtime'; import { getDataModels, getLiteral, GUARD_FIELD_NAME, PluginError, PluginOptions, resolved } from '@zenstackhq/sdk'; import { camelCase } from 'change-case'; import { streamAllContents } from 'langium'; diff --git a/packages/schema/src/plugins/model-meta/index.ts b/packages/schema/src/plugins/model-meta/index.ts index 7ff2f918a..3710b36be 100644 --- a/packages/schema/src/plugins/model-meta/index.ts +++ b/packages/schema/src/plugins/model-meta/index.ts @@ -7,7 +7,7 @@ import { Model, ReferenceExpr, } from '@zenstackhq/language/ast'; -import { RuntimeAttribute } from '@zenstackhq/runtime'; +import type { RuntimeAttribute } from '@zenstackhq/runtime'; import { getAttributeArgs, getDataModels, getLiteral, hasAttribute, PluginOptions, resolved } from '@zenstackhq/sdk'; import { camelCase } from 'change-case'; import path from 'path'; diff --git a/packages/schema/src/plugins/plugin-utils.ts b/packages/schema/src/plugins/plugin-utils.ts index c70364438..7d3cc1320 100644 --- a/packages/schema/src/plugins/plugin-utils.ts +++ b/packages/schema/src/plugins/plugin-utils.ts @@ -1,4 +1,4 @@ -import { PolicyOperationKind } from '@zenstackhq/runtime'; +import type { PolicyOperationKind } from '@zenstackhq/runtime'; import fs from 'fs'; import path from 'path'; diff --git a/packages/schema/src/utils/ast-utils.ts b/packages/schema/src/utils/ast-utils.ts index 5456a2670..dd295ae4c 100644 --- a/packages/schema/src/utils/ast-utils.ts +++ b/packages/schema/src/utils/ast-utils.ts @@ -13,7 +13,7 @@ import { Model, ReferenceExpr, } from '@zenstackhq/language/ast'; -import { PolicyOperationKind } from '@zenstackhq/runtime'; +import type { PolicyOperationKind } from '@zenstackhq/runtime'; import { getLiteral } from '@zenstackhq/sdk'; import { isFromStdlib } from '../language-server/utils'; diff --git a/packages/schema/src/utils/pkg-utils.ts b/packages/schema/src/utils/pkg-utils.ts index 84b8d4553..4fe73d145 100644 --- a/packages/schema/src/utils/pkg-utils.ts +++ b/packages/schema/src/utils/pkg-utils.ts @@ -39,21 +39,34 @@ export function installPackage( dev: boolean, pkgManager: PackageManagers | undefined = undefined, tag = 'latest', - projectPath = '.' + projectPath = '.', + exactVersion = true ) { const manager = pkgManager ?? getPackageManager(projectPath); - console.log(`Installing package "${pkg}" with ${manager}`); + console.log(`Installing package "${pkg}@${tag}" with ${manager}`); switch (manager) { case 'yarn': - execSync(`yarn --cwd "${projectPath}" add ${pkg}@${tag} ${dev ? ' --dev' : ''} --ignore-engines`); + execSync( + `yarn --cwd "${projectPath}" add ${exactVersion ? '--exact' : ''} ${pkg}@${tag} ${ + dev ? ' --dev' : '' + } --ignore-engines` + ); break; case 'pnpm': - execSync(`pnpm add -C "${projectPath}" ${dev ? ' --save-dev' : ''} ${pkg}@${tag}`); + execSync( + `pnpm add -C "${projectPath}" ${exactVersion ? '--save-exact' : ''} ${ + dev ? ' --save-dev' : '' + } ${pkg}@${tag}` + ); break; default: - execSync(`npm install --prefix "${projectPath}" ${dev ? ' --save-dev' : ''} ${pkg}@${tag}`); + execSync( + `npm install --prefix "${projectPath}" ${exactVersion ? '--save-exact' : ''} ${ + dev ? ' --save-dev' : '' + } ${pkg}@${tag}` + ); break; } } @@ -63,11 +76,13 @@ export function ensurePackage( dev: boolean, pkgManager: PackageManagers | undefined = undefined, tag = 'latest', - projectPath = '.' + projectPath = '.', + exactVersion = false ) { + const resolvePath = path.resolve(projectPath); try { - require(pkg); - } catch { - installPackage(pkg, dev, pkgManager, tag, projectPath); + require.resolve(pkg, { paths: [resolvePath] }); + } catch (err) { + installPackage(pkg, dev, pkgManager, tag, resolvePath, exactVersion); } } diff --git a/packages/schema/tests/cli/cli.test.ts b/packages/schema/tests/cli/cli.test.ts index f0cb52fd2..e049390c7 100644 --- a/packages/schema/tests/cli/cli.test.ts +++ b/packages/schema/tests/cli/cli.test.ts @@ -1,5 +1,9 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +/// + import { getWorkspaceNpmCacheFolder } from '@zenstackhq/testtools'; import * as fs from 'fs'; +import * as path from 'path'; import * as tmp from 'tmp'; import { createProgram } from '../../src/cli'; import { execSync } from '../../src/utils/exec-utils'; @@ -25,7 +29,7 @@ describe('CLI Tests', () => { fs.writeFileSync('.npmrc', `cache=${getWorkspaceNpmCacheFolder(__dirname)}`); } - it('init project t3 std', async () => { + it('init project t3 npm std', async () => { execSync('npx --yes create-t3-app@latest --prisma --CI --noGit .', 'inherit', { npm_config_user_agent: 'npm', npm_config_cache: getWorkspaceNpmCacheFolder(__dirname), @@ -33,9 +37,44 @@ describe('CLI Tests', () => { createNpmrc(); const program = createProgram(); - program.parse(['init', '--tag', 'latest'], { from: 'user' }); + program.parse(['init'], { from: 'user' }); + + expect(fs.readFileSync('schema.zmodel', 'utf-8')).toEqual(fs.readFileSync('prisma/schema.prisma', 'utf-8')); + + checkDependency('zenstack', true, true); + checkDependency('@zenstackhq/runtime', false, true); + }); + + it('init project t3 yarn std', async () => { + execSync('npx --yes create-t3-app@latest --prisma --CI --noGit .', 'inherit', { + npm_config_user_agent: 'yarn', + npm_config_cache: getWorkspaceNpmCacheFolder(__dirname), + }); + createNpmrc(); + + const program = createProgram(); + program.parse(['init'], { from: 'user' }); + + expect(fs.readFileSync('schema.zmodel', 'utf-8')).toEqual(fs.readFileSync('prisma/schema.prisma', 'utf-8')); + + checkDependency('zenstack', true, true); + checkDependency('@zenstackhq/runtime', false, true); + }); + + it('init project t3 pnpm std', async () => { + execSync('npx --yes create-t3-app@latest --prisma --CI --noGit .', 'inherit', { + npm_config_user_agent: 'pnpm', + npm_config_cache: getWorkspaceNpmCacheFolder(__dirname), + }); + createNpmrc(); + + const program = createProgram(); + program.parse(['init'], { from: 'user' }); expect(fs.readFileSync('schema.zmodel', 'utf-8')).toEqual(fs.readFileSync('prisma/schema.prisma', 'utf-8')); + + checkDependency('zenstack', true, true); + checkDependency('@zenstackhq/runtime', false, true); }); it('init project t3 non-std prisma schema', async () => { @@ -52,6 +91,7 @@ describe('CLI Tests', () => { expect(fs.readFileSync('schema.zmodel', 'utf-8')).toEqual(fs.readFileSync('prisma/my.prisma', 'utf-8')); }); + // eslint-disable-next-line jest/no-disabled-tests it('init project empty project', async () => { fs.writeFileSync('package.json', JSON.stringify({ name: 'my app', version: '1.0.0' })); createNpmrc(); @@ -67,7 +107,7 @@ describe('CLI Tests', () => { provider = 'sqlite' url = 'file:./todo.db' } - `; + `; fs.writeFileSync('schema.zmodel', origZModelContent); createNpmrc(); const program = createProgram(); @@ -75,3 +115,19 @@ describe('CLI Tests', () => { expect(fs.readFileSync('schema.zmodel', 'utf-8')).toEqual(origZModelContent); }); }); + +function checkDependency(pkg: string, isDev: boolean, requireExactVersion = true) { + const pkgJson = require(path.resolve('./package.json')); + + if (isDev) { + expect(pkgJson.devDependencies[pkg]).toBeTruthy(); + if (requireExactVersion) { + expect(pkgJson.devDependencies[pkg]).not.toMatch(/^[\^~].*/); + } + } else { + expect(pkgJson.dependencies[pkg]).toBeTruthy(); + if (requireExactVersion) { + expect(pkgJson.dependencies[pkg]).not.toMatch(/^[\^~].*/); + } + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7ff8d0d4f..066fe56ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -335,17 +335,14 @@ importers: packages/schema: dependencies: '@prisma/generator-helper': - specifier: ^4.7.1 + specifier: ^4.0.0 version: 4.7.1 '@prisma/internals': - specifier: ^4.7.1 + specifier: ^4.0.0 version: 4.7.1 '@zenstackhq/language': specifier: workspace:* version: link:../language/dist - '@zenstackhq/runtime': - specifier: workspace:* - version: link:../runtime/dist '@zenstackhq/sdk': specifier: workspace:* version: link:../sdk/dist @@ -382,9 +379,6 @@ importers: pluralize: specifier: ^8.0.0 version: 8.0.0 - prisma: - specifier: ~4.7.0 - version: 4.7.0 promisify: specifier: ^0.0.3 version: 0.0.3 @@ -449,6 +443,9 @@ importers: '@typescript-eslint/parser': specifier: ^5.42.0 version: 5.42.0(eslint@8.27.0)(typescript@4.8.4) + '@zenstackhq/runtime': + specifier: workspace:* + version: link:../runtime/dist '@zenstackhq/testtools': specifier: workspace:* version: link:../testtools/dist @@ -470,12 +467,18 @@ importers: eslint-plugin-jest: specifier: ^27.1.7 version: 27.1.7(@typescript-eslint/eslint-plugin@5.42.0)(eslint@8.27.0)(jest@29.2.1)(typescript@4.8.4) + get-latest-version: + specifier: ^5.0.1 + version: 5.0.1 jest: specifier: ^29.2.1 version: 29.2.1(@types/node@14.18.32)(ts-node@10.9.1) langium-cli: specifier: ^1.0.0 version: 1.0.0 + prisma: + specifier: ^4.0.0 + version: 4.7.0 renamer: specifier: ^4.0.0 version: 4.0.0 @@ -3071,6 +3074,27 @@ packages: resolution: {integrity: sha512-TYh1MRcm4JnvpqtqOwT9WYaBYY4KERHdToxs/suDTLviGRsQkIjS5yYROTYTSJQUnYLOn/TuOh5GoMwfLSU+Ew==} engines: {node: '>=14'} + /@pnpm/config.env-replace@1.0.0: + resolution: {integrity: sha512-ZVPVDi1E8oeXlYqkGRtX0CkzLTwE2zt62bjWaWKaAvI8NZqHzlMvGeSNDpW+JB3+aKanYb4UETJOF1/CxGPemA==} + engines: {node: '>=12.22.0'} + dev: true + + /@pnpm/network.ca-file@1.0.2: + resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} + engines: {node: '>=12.22.0'} + dependencies: + graceful-fs: 4.2.10 + dev: true + + /@pnpm/npm-conf@2.1.0: + resolution: {integrity: sha512-Oe6ntvgsMTE3hDIqy6sajqHF+MnzJrOF06qC2QSiUEybLL7cp6tjoKUa32gpd9+KPVl4QyMs3E3nsXrx/Vdnlw==} + engines: {node: '>=12'} + dependencies: + '@pnpm/config.env-replace': 1.0.0 + '@pnpm/network.ca-file': 1.0.2 + config-chain: 1.1.13 + dev: true + /@prisma/client@4.7.1: resolution: {integrity: sha512-/GbnOwIPtjiveZNUzGXOdp7RxTEkHL4DZP3vBaFNadfr6Sf0RshU5EULFzVaSi9i9PIK9PYd+1Rn7z2B2npb9w==} engines: {node: '>=14.17'} @@ -5040,6 +5064,13 @@ packages: yargs: 17.6.0 dev: true + /config-chain@1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + dev: true + /constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} dependencies: @@ -5247,6 +5278,13 @@ packages: mimic-response: 3.1.0 dev: true + /decompress-response@7.0.0: + resolution: {integrity: sha512-6IvPrADQyyPGLpMnUh6kfKiqy7SrbXbjoUuZ90WMBJKErzv2pCiwlGEXjRX9/54OnTq+XFVnkOnOMzclLI5aEA==} + engines: {node: '>=10'} + dependencies: + mimic-response: 3.1.0 + dev: true + /dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} dev: true @@ -6453,6 +6491,18 @@ packages: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true + /follow-redirects@1.15.2(debug@4.3.4): + resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dependencies: + debug: 4.3.4 + dev: true + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -6490,6 +6540,13 @@ packages: engines: {node: '>= 0.6'} dev: true + /from2@2.3.0: + resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} + dependencies: + inherits: 2.0.4 + readable-stream: 2.3.7 + dev: true + /fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -6592,6 +6649,36 @@ packages: has-symbols: 1.0.3 dev: true + /get-it@8.1.1: + resolution: {integrity: sha512-83P2+3V/3E+KSdlHnGlOr4vCrlV8wDsT580AyJkMtkK/8LtZc0TOCI9bjQXH1sgYnmQTzCoPoPaOAE+a8JZqLQ==} + engines: {node: '>=14.0.0'} + dependencies: + debug: 4.3.4 + decompress-response: 7.0.0 + follow-redirects: 1.15.2(debug@4.3.4) + into-stream: 6.0.0 + is-plain-object: 5.0.0 + is-retry-allowed: 2.2.0 + is-stream: 2.0.1 + parse-headers: 2.0.5 + progress-stream: 2.0.0 + tunnel-agent: 0.6.0 + transitivePeerDependencies: + - supports-color + dev: true + + /get-latest-version@5.0.1: + resolution: {integrity: sha512-oonDx2gj9GzP+b1dxrd4KJwnTEFPjugNVALey5ze7cBkwjI/2BQ6X93hzE5cTVHV3DOPTB8U9HlbpEZVLjI1MQ==} + engines: {node: '>=14.18'} + dependencies: + get-it: 8.1.1 + registry-auth-token: 5.0.2 + registry-url: 5.1.0 + semver: 7.3.8 + transitivePeerDependencies: + - supports-color + dev: true + /get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} @@ -6902,6 +6989,14 @@ packages: side-channel: 1.0.4 dev: true + /into-stream@6.0.0: + resolution: {integrity: sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==} + engines: {node: '>=10'} + dependencies: + from2: 2.3.0 + p-is-promise: 3.0.0 + dev: true + /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -7025,6 +7120,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-plain-object@5.0.0: + resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} + engines: {node: '>=0.10.0'} + dev: true + /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -7033,6 +7133,11 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-retry-allowed@2.2.0: + resolution: {integrity: sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==} + engines: {node: '>=10'} + dev: true + /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: @@ -9798,6 +9903,11 @@ packages: dependencies: p-map: 2.1.0 + /p-is-promise@3.0.0: + resolution: {integrity: sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==} + engines: {node: '>=8'} + dev: true + /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -9864,6 +9974,10 @@ packages: callsites: 3.1.0 dev: true + /parse-headers@2.0.5: + resolution: {integrity: sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==} + dev: true + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -10156,6 +10270,13 @@ packages: engines: {node: '>= 0.6.0'} dev: true + /progress-stream@2.0.0: + resolution: {integrity: sha512-xJwOWR46jcXUq6EH9yYyqp+I52skPySOeHfkxOZ2IY1AiBi/sFJhbhAKHoV3OTw/omQ45KTio9215dRJ2Yxd3Q==} + dependencies: + speedometer: 1.0.0 + through2: 2.0.5 + dev: true + /progress@2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} @@ -10177,6 +10298,10 @@ packages: kleur: 3.0.3 sisteransi: 1.0.5 + /proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + dev: true + /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -10409,6 +10534,20 @@ packages: engines: {node: '>=8'} dev: true + /registry-auth-token@5.0.2: + resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==} + engines: {node: '>=14'} + dependencies: + '@pnpm/npm-conf': 2.1.0 + dev: true + + /registry-url@5.1.0: + resolution: {integrity: sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==} + engines: {node: '>=8'} + dependencies: + rc: 1.2.8 + dev: true + /renamer@4.0.0: resolution: {integrity: sha512-yurufcXxbJfFBVAUoByNyDVH811zTZ/MrKo6gUH8pHGeAmdK7J5egj2lSNe57HuVIvnVzSalzeVGu8pi8UHGxg==} engines: {node: '>=12.17'} @@ -10791,6 +10930,10 @@ packages: /spdx-license-ids@3.0.12: resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} + /speedometer@1.0.0: + resolution: {integrity: sha512-lgxErLl/7A5+vgIIXsh9MbeukOaCb2axgQ+bKCdIE+ibNT4XNYGNCR1qFEGq6F+YDASXK3Fh/c5FgtZchFolxw==} + dev: true + /split2@4.1.0: resolution: {integrity: sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==} engines: {node: '>= 10.x'}