From 63b991f4d42d547906c130a5e309ff4ab3ce264b Mon Sep 17 00:00:00 2001 From: "Marcus R. Brown" Date: Sun, 1 Dec 2024 21:25:31 -0700 Subject: [PATCH] feat(create): use @sxzz/create to download templates (#657) --- .changeset/khaki-ducks-suffer.md | 6 + package.json | 1 + packages/create/package.json | 28 +++- packages/create/src/cli.ts | 116 +++------------ packages/create/src/index.ts | 34 ++--- packages/create/src/types.ts | 5 + packages/create/tsconfig.json | 2 - packages/create/tsup.config.ts | 11 +- pnpm-lock.yaml | 243 ++++++++++++++++++++++++++++--- 9 files changed, 289 insertions(+), 157 deletions(-) create mode 100644 .changeset/khaki-ducks-suffer.md diff --git a/.changeset/khaki-ducks-suffer.md b/.changeset/khaki-ducks-suffer.md new file mode 100644 index 00000000..769a46e1 --- /dev/null +++ b/.changeset/khaki-ducks-suffer.md @@ -0,0 +1,6 @@ +--- +"@bfra.me/create": minor +--- + +Use @sxzz/create for downloading templates + \ No newline at end of file diff --git a/package.json b/package.json index 4cc9306b..3f4f65a1 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "prettier": "3.4.1", "publint": "0.2.12", "rimraf": "6.0.1", + "ts-essentials": "10.0.3", "typescript": "5.7.2" }, "packageManager": "pnpm@9.14.3", diff --git a/packages/create/package.json b/packages/create/package.json index a8b5da6b..88c32e04 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -16,31 +16,47 @@ "author": "Marcus R. Brown ", "type": "module", "exports": { - ".": "./dist/index.js", - "./cli": "./dist/cli.js" + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "./package.json": "./package.json" }, "main": "./dist/index.js", "types": "./dist/index.d.ts", "bin": { "create": "./dist/cli.js" }, + "files": [ + "src", + "dist", + "!**/*.map" + ], "scripts": { "build": "tsup", + "dev": "jiti src/cli.ts", "prepack": "pnpm run build", "start": "node dist/index.js", - "test": "vitest" + "test": "vitest || true" }, "dependencies": { - "fs-extra": "11.2.0", - "yargs": "17.7.2" + "@clack/prompts": "0.8.2", + "@sxzz/create": "0.11.0", + "cac": "6.7.14", + "consola": "3.2.3" }, "devDependencies": { "@types/node": "22.10.1", - "@types/yargs": "17.0.33", "memfs": "4.14.0", "ts-essentials": "10.0.3", "tsup": "8.3.5", "typescript": "5.7.2", "vitest": "2.1.6" + }, + "publishConfig": { + "access": "public", + "provenance": true } } diff --git a/packages/create/src/cli.ts b/packages/create/src/cli.ts index b26a34e5..59831e3b 100644 --- a/packages/create/src/cli.ts +++ b/packages/create/src/cli.ts @@ -1,100 +1,22 @@ -#!/usr/bin/env node - -// This file implements the command-line interface for the create utility. - -import type {ArgumentsCamelCase} from 'yargs' -import type {CreatePackageOptions} from './types.js' -import {hideBin} from 'yargs/helpers' -import yargs from 'yargs/yargs' +import cac from 'cac' +import consola from 'consola' +import {name, version} from '../package.json' import {createPackage} from './index.js' +// const {name} = await import('../package.json', {assert: {type: 'json'}}) -/** - * Implements the command-line interface for the create utility. - * This function is the entry point for the create CLI, which allows users to create new packages with various options. - * - * @returns A Promise that resolves when the CLI has completed. - */ -export const main = async (): Promise => { - await yargs(hideBin(process.argv)) - .usage('Usage: create [options]') - .command( - '$0 ', - 'Create a new package', - { - packageName: { - describe: 'Name of the package to create', - type: 'string', - demandOption: true, - }, - template: { - alias: 't', - type: 'string', - description: 'Template to use', - default: 'default', - }, - version: { - alias: 'v', - type: 'string', - description: 'Package version', - default: '1.0.0', - }, - description: { - alias: 'd', - type: 'string', - description: 'Package description', - default: 'A new package', - }, - author: { - type: 'string', - description: 'Author of the package', - default: '', - }, - outputDir: { - alias: 'o', - type: 'string', - description: 'Output directory', - default: process.cwd(), - }, - }, - async ( - argv: ArgumentsCamelCase<{ - packageName: string - template: string - version: string - description: string - author: string - outputDir: string - }>, - ) => { - const {packageName, template, version, description, author, outputDir} = argv - - if (!packageName) { - console.error('Error: packageName is required.') - process.exit(1) - } - - const options: CreatePackageOptions = { - template, - version, - description, - author, - outputDir, - } +const cli = cac(name) - try { - await createPackage(packageName, options) - console.log(`Package "${packageName}" has been created successfully.`) - } catch (error) { - if (error instanceof Error) { - console.error('An error occurred while creating the package:', error.message) - } else { - console.error('An unknown error occurred while creating the package') - } - process.exit(1) - } - }, - ) - .help() - .parse() -} -await main() +cli.command('[projectPath]', 'Create a new project').action(async (projectPath?: string) => { + try { + await createPackage({ + outputDir: projectPath ?? process.cwd(), + }) + console.log(`Package "${projectPath}" has been created successfully.`) + } catch (error) { + consola.error(error) + process.exit(1) + } +}) +cli.help() +cli.version(version) +cli.parse() diff --git a/packages/create/src/index.ts b/packages/create/src/index.ts index 97ff3c62..c4998cc2 100644 --- a/packages/create/src/index.ts +++ b/packages/create/src/index.ts @@ -1,39 +1,31 @@ import type {CreatePackageOptions} from './types.js' import fs from 'node:fs/promises' import path from 'node:path' +import {run} from '@sxzz/create' /** * Creates a new package based on a specified template. * - * @param packageName - The name of the new package. * @param options - Options for creating the package, including the template to use, version, description, and author. * @returns A Promise that resolves when the package has been created. */ -export async function createPackage( - packageName: string, - options: CreatePackageOptions, -): Promise { +export async function createPackage(options: CreatePackageOptions): Promise { const template = options.template || 'default' const templateDir = path.join(import.meta.dirname, 'templates', template) - const targetDir = path.join(options.outputDir || process.cwd(), packageName) + const targetDir = options.outputDir || process.cwd() // Create target directory await fs.mkdir(targetDir, {recursive: true}) - // Read package.json template and replace placeholders - const packageJsonTemplate = await fs.readFile(path.join(templateDir, 'package.json'), 'utf-8') + await run(targetDir, { + templates: [ + { + name: 'default', + // Point to the template directory + url: `${templateDir}`, + }, + ], + }) - const packageJsonContent = packageJsonTemplate - .replace(/{{packageName}}/g, packageName) - .replace(/{{version}}/g, options.version || '1.0.0') - .replace(/{{description}}/g, options.description || 'A new package') - .replace(/{{author}}/g, options.author || '') - - await fs.writeFile(path.join(targetDir, 'package.json'), packageJsonContent) - - // Copy index.ts template - const indexTsTemplate = await fs.readFile(path.join(templateDir, 'index.ts'), 'utf-8') - await fs.writeFile(path.join(targetDir, 'index.ts'), indexTsTemplate) - - console.log(`Package ${packageName} created successfully.`) + console.log(`Package created successfully.`) } diff --git a/packages/create/src/types.ts b/packages/create/src/types.ts index 81c9b053..5589037a 100644 --- a/packages/create/src/types.ts +++ b/packages/create/src/types.ts @@ -1,3 +1,8 @@ +import type {run} from '@sxzz/create' +import type {Prettify} from 'ts-essentials' + +export type Config = Prettify[1]>> + export interface CreatePackageOptions { template?: string version?: string diff --git a/packages/create/tsconfig.json b/packages/create/tsconfig.json index dc80fb13..745f7c9a 100644 --- a/packages/create/tsconfig.json +++ b/packages/create/tsconfig.json @@ -2,8 +2,6 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../../tsconfig.json", "compilerOptions": { - "module": "NodeNext", - "moduleResolution": "NodeNext", "outDir": "./dist" }, "include": ["src/**/*.ts"] diff --git a/packages/create/tsup.config.ts b/packages/create/tsup.config.ts index 2ab32f32..561ad6ce 100644 --- a/packages/create/tsup.config.ts +++ b/packages/create/tsup.config.ts @@ -2,19 +2,10 @@ import {defineConfig} from 'tsup' export default defineConfig([ { - entry: ['src/index.ts'], + entry: ['src/{index,cli}.ts'], format: ['esm'], dts: true, sourcemap: true, clean: true, }, - { - entry: ['src/cli.ts'], - format: ['esm'], - sourcemap: true, - clean: false, - banner: { - js: '#!/usr/bin/env node', - }, - }, ]) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7b38f7b6..1569fe69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,6 +50,9 @@ importers: rimraf: specifier: 6.0.1 version: 6.0.1 + ts-essentials: + specifier: 10.0.3 + version: 10.0.3(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -145,19 +148,22 @@ importers: packages/create: dependencies: - fs-extra: - specifier: 11.2.0 - version: 11.2.0 - yargs: - specifier: 17.7.2 - version: 17.7.2 + '@clack/prompts': + specifier: 0.8.2 + version: 0.8.2 + '@sxzz/create': + specifier: 0.11.0 + version: 0.11.0 + cac: + specifier: 6.7.14 + version: 6.7.14 + consola: + specifier: 3.2.3 + version: 3.2.3 devDependencies: '@types/node': specifier: 22.10.1 version: 22.10.1 - '@types/yargs': - specifier: 17.0.33 - version: 17.0.33 memfs: specifier: 4.14.0 version: 4.14.0 @@ -384,6 +390,9 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@antfu/utils@0.7.10': + resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + '@apidevtools/json-schema-ref-parser@11.7.2': resolution: {integrity: sha512-4gY54eEGEstClvEkGnwVkTkrx0sqwemEFG5OSRRn3tD91XH0+Q8XIkYIfo7IwEWPpJZwILb9GUXeShtplRc/eA==} engines: {node: '>= 16'} @@ -477,6 +486,17 @@ packages: '@changesets/write@0.3.2': resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + '@clack/core@0.3.5': + resolution: {integrity: sha512-5cfhQNH+1VQ2xLQlmzXMqUoiaH0lRBq9/CLW9lTyMbuKLC3+xEK01tHVvyut++mLOn5urSHmkm6I0Lg9MaJSTQ==} + + '@clack/prompts@0.7.0': + resolution: {integrity: sha512-0MhX9/B4iL6Re04jPrttDm+BsP8y6mS7byuv0BvXgdXhbV5PdlsHt55dvNsuBCPZ7xq1oTAOOuotR9NFbQyMSA==} + bundledDependencies: + - is-unicode-supported + + '@clack/prompts@0.8.2': + resolution: {integrity: sha512-6b9Ab2UiZwJYA9iMyboYyW9yJvAO9V753ZhS+DHKEjZRKAxPPOb7MXXu84lsPFG+vZt6FRFniZ8rXi+zCIw4yQ==} + '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} @@ -1472,6 +1492,11 @@ packages: '@swc/types@0.1.17': resolution: {integrity: sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==} + '@sxzz/create@0.11.0': + resolution: {integrity: sha512-YXZvLONKi7Cnw4Lw5ZMra185WjEkT45ZkiwEEdYGs41mtxYy4e5u8Yuegs3iImA9GFN+e2A6nmj/pOu8KCqnAw==} + engines: {node: '>=18.0.0'} + hasBin: true + '@types/argparse@1.0.38': resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} @@ -1517,12 +1542,6 @@ packages: '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} - '@types/yargs-parser@21.0.3': - resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - - '@types/yargs@17.0.33': - resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - '@typescript-eslint/eslint-plugin@8.16.0': resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1820,10 +1839,17 @@ packages: resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} engines: {node: '>= 14.16.0'} + chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} + citty@0.1.6: + resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + clean-stack@5.2.0: resolution: {integrity: sha512-TyUIUJgdFnCISzG5zu3291TAsE77ddchd0bepon1VVQrKLGKFED4iXFEDQ24mIPdPBbyE16PK3F8MYE1CmcBEQ==} engines: {node: '>=14.16'} @@ -2393,6 +2419,10 @@ packages: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} + fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -2442,6 +2472,10 @@ packages: get-tsconfig@4.8.1: resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + giget@1.2.3: + resolution: {integrity: sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==} + hasBin: true + git-hooks-list@3.1.0: resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} @@ -2611,6 +2645,9 @@ packages: import-meta-resolve@4.1.0: resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} + importx@0.4.4: + resolution: {integrity: sha512-Lo1pukzAREqrBnnHC+tj+lreMTAvyxtkKsMxLY8H15M/bvLl54p3YuoTI70Tz7Il0AsgSlD7Lrk/FaApRcBL7w==} + imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -2753,6 +2790,14 @@ packages: resolution: {integrity: sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==} engines: {node: '>= 0.6.0'} + jiti@1.21.6: + resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} + hasBin: true + + jiti@2.0.0-beta.3: + resolution: {integrity: sha512-pmfRbVRs/7khFrSAYnSiJ8C0D5GvzkE4Ey2pAvUcJsw1ly/p+7ut27jbJrjY79BpAJQJ4gXYFtK6d1Aub+9baQ==} + hasBin: true + jiti@2.4.0: resolution: {integrity: sha512-H5UpaUI+aHOqZXlYOaFP/8AzKsg+guWu+Pr3Y8i7+Y3zr1aXAvCvTAQ1RxSc6oVD8R8c7brgNtTVP91E7upH/g==} hasBin: true @@ -3026,10 +3071,27 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + + minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + + mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + mlly@1.7.3: resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} @@ -3202,6 +3264,11 @@ packages: - which - write-file-atomic + nypm@0.3.12: + resolution: {integrity: sha512-D3pzNDWIvgA+7IORhD/IuWzEk4uXv6GsgOxiid4UU3h9oq5IqV1KtPDi63n4sZJ/xcWlr88c0QM2RgN5VbOhFA==} + engines: {node: ^14.16.0 || >=16.10.0} + hasBin: true + oas-kit-common@1.0.8: resolution: {integrity: sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==} @@ -3575,6 +3642,11 @@ packages: resolution: {integrity: sha512-DE8C17uIWeHaY4SqIkpQpHXm0MIdYHtIqjieWuh0I2PG8YcZRxFE6pqeEhnRetsrQ7Lu9uvSNQkDbg95NLpvnQ==} engines: {node: '>=18'} + replace-in-file@8.2.0: + resolution: {integrity: sha512-hMsQtdYHwWviQT5ZbNsgfu0WuCiNlcUSnnD+aHAL081kbU9dPkPocDaHlDvAHKydTWWpx1apfcEcmvIyQk3CpQ==} + engines: {node: '>=18'} + hasBin: true + require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -3700,6 +3772,9 @@ packages: resolution: {integrity: sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==} engines: {node: '>=6'} + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + skin-tone@2.0.0: resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} engines: {node: '>=8'} @@ -3853,6 +3928,10 @@ packages: resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} engines: {node: ^14.18.0 || >=16.0.0} + tar@6.2.1: + resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} + engines: {node: '>=10'} + temp-dir@3.0.0: resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} engines: {node: '>=14.16'} @@ -4037,6 +4116,9 @@ packages: engines: {node: '>=0.8.0'} hasBin: true + unconfig@0.5.5: + resolution: {integrity: sha512-VQZ5PT9HDX+qag0XdgQi8tJepPhXiR/yVOkn707gJDKo31lGjRilPREiQJ9Z6zd/Ugpv6ZvO5VxVIcatldYcNQ==} + uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} @@ -4268,6 +4350,8 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@antfu/utils@0.7.10': {} + '@apidevtools/json-schema-ref-parser@11.7.2': dependencies: '@jsdevtools/ono': 7.1.3 @@ -4450,6 +4534,23 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 + '@clack/core@0.3.5': + dependencies: + picocolors: 1.1.1 + sisteransi: 1.0.5 + + '@clack/prompts@0.7.0': + dependencies: + '@clack/core': 0.3.5 + picocolors: 1.1.1 + sisteransi: 1.0.5 + + '@clack/prompts@0.8.2': + dependencies: + '@clack/core': 0.3.5 + picocolors: 1.1.1 + sisteransi: 1.0.5 + '@colors/colors@1.5.0': optional: true @@ -5291,6 +5392,23 @@ snapshots: dependencies: '@swc/counter': 0.1.3 + '@sxzz/create@0.11.0': + dependencies: + '@antfu/utils': 0.7.10 + '@clack/prompts': 0.7.0 + cac: 6.7.14 + chalk: 5.3.0 + consola: 3.2.3 + escape-string-regexp: 5.0.0 + execa: 9.5.1 + find-up: 7.0.0 + giget: 1.2.3 + js-yaml: 4.1.0 + replace-in-file: 8.2.0 + unconfig: 0.5.5 + transitivePeerDependencies: + - supports-color + '@types/argparse@1.0.38': {} '@types/caseless@0.12.5': {} @@ -5330,12 +5448,6 @@ snapshots: '@types/semver@7.5.8': {} - '@types/yargs-parser@21.0.3': {} - - '@types/yargs@17.0.33': - dependencies: - '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -5611,6 +5723,11 @@ snapshots: dependencies: run-applescript: 7.0.0 + bundle-require@5.0.0(esbuild@0.23.1): + dependencies: + esbuild: 0.23.1 + load-tsconfig: 0.2.5 + bundle-require@5.0.0(esbuild@0.24.0): dependencies: esbuild: 0.24.0 @@ -5663,8 +5780,14 @@ snapshots: dependencies: readdirp: 4.0.2 + chownr@2.0.0: {} + ci-info@3.9.0: {} + citty@0.1.6: + dependencies: + consola: 3.2.3 + clean-stack@5.2.0: dependencies: escape-string-regexp: 5.0.0 @@ -6352,6 +6475,10 @@ snapshots: jsonfile: 4.0.0 universalify: 0.1.2 + fs-minipass@2.1.0: + dependencies: + minipass: 3.3.6 + fs.realpath@1.0.0: {} fsevents@2.3.3: @@ -6390,6 +6517,17 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + giget@1.2.3: + dependencies: + citty: 0.1.6 + consola: 3.2.3 + defu: 6.1.4 + node-fetch-native: 1.6.4 + nypm: 0.3.12 + ohash: 1.1.4 + pathe: 1.1.2 + tar: 6.2.1 + git-hooks-list@3.1.0: {} git-log-parser@1.2.1: @@ -6577,6 +6715,18 @@ snapshots: import-meta-resolve@4.1.0: {} + importx@0.4.4: + dependencies: + bundle-require: 5.0.0(esbuild@0.23.1) + debug: 4.3.7 + esbuild: 0.23.1 + jiti: 2.0.0-beta.3 + jiti-v1: jiti@1.21.6 + pathe: 1.1.2 + tsx: 4.19.2 + transitivePeerDependencies: + - supports-color + imurmurhash@0.1.4: {} indent-string@5.0.0: {} @@ -6692,6 +6842,10 @@ snapshots: java-properties@1.0.2: {} + jiti@1.21.6: {} + + jiti@2.0.0-beta.3: {} + jiti@2.4.0: {} jju@1.4.0: {} @@ -6942,8 +7096,21 @@ snapshots: minimist@1.2.8: {} + minipass@3.3.6: + dependencies: + yallist: 4.0.0 + + minipass@5.0.0: {} + minipass@7.1.2: {} + minizlib@2.1.2: + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + + mkdirp@1.0.4: {} + mlly@1.7.3: dependencies: acorn: 8.14.0 @@ -7032,6 +7199,15 @@ snapshots: npm@10.9.1: {} + nypm@0.3.12: + dependencies: + citty: 0.1.6 + consola: 3.2.3 + execa: 8.0.1 + pathe: 1.1.2 + pkg-types: 1.2.1 + ufo: 1.5.4 + oas-kit-common@1.0.8: dependencies: fast-safe-stringify: 2.1.1 @@ -7391,6 +7567,12 @@ snapshots: remove-undefined-objects@5.0.0: {} + replace-in-file@8.2.0: + dependencies: + chalk: 5.3.0 + glob: 10.4.5 + yargs: 17.7.2 + require-directory@2.1.1: {} require-from-string@2.0.2: {} @@ -7561,6 +7743,8 @@ snapshots: figures: 2.0.0 pkg-conf: 2.1.0 + sisteransi@1.0.5: {} + skin-tone@2.0.0: dependencies: unicode-emoji-modifier-base: 1.0.0 @@ -7726,6 +7910,15 @@ snapshots: '@pkgr/core': 0.1.1 tslib: 2.8.1 + tar@6.2.1: + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + temp-dir@3.0.0: {} tempy@3.1.0: @@ -7888,6 +8081,14 @@ snapshots: uglify-js@3.19.3: optional: true + unconfig@0.5.5: + dependencies: + '@antfu/utils': 0.7.10 + defu: 6.1.4 + importx: 0.4.4 + transitivePeerDependencies: + - supports-color + uncrypto@0.1.3: {} undici-types@6.20.0: {}