From 70e37457390495f9dcbb99bfca9dc6af70209a84 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 2 May 2024 17:25:53 -0700 Subject: [PATCH] upgrade to use inquirerer --- packages/cli/README.md | 77 +++--- packages/cli/package.json | 8 +- packages/cli/src/commands/codegen/cli.ts | 70 +++++ packages/cli/src/commands/codegen/index.ts | 90 +++++++ packages/cli/src/commands/index.ts | 64 +++++ packages/cli/src/commands/protogen/cli.ts | 51 ++++ packages/cli/src/commands/protogen/helpers.ts | 72 ++++++ packages/cli/src/commands/protogen/index.ts | 55 ++++ packages/cli/src/index.ts | 91 ++----- packages/cli/src/package.ts | 33 +++ packages/cli/src/parser.js | 8 - packages/cli/types/commands/codegen/cli.d.ts | 3 + .../cli/types/commands/codegen/index.d.ts | 3 + packages/cli/types/commands/index.d.ts | 3 + packages/cli/types/commands/protogen/cli.d.ts | 3 + .../cli/types/commands/protogen/index.d.ts | 3 + packages/cli/types/help.d.ts | 1 + packages/cli/types/index.d.ts | 6 +- packages/cli/types/package.d.ts | 1 + packages/cli/types/parser.d.ts | 2 - yarn.lock | 244 +++++++++++++++++- 21 files changed, 758 insertions(+), 130 deletions(-) create mode 100644 packages/cli/src/commands/codegen/cli.ts create mode 100644 packages/cli/src/commands/codegen/index.ts create mode 100644 packages/cli/src/commands/index.ts create mode 100644 packages/cli/src/commands/protogen/cli.ts create mode 100644 packages/cli/src/commands/protogen/helpers.ts create mode 100644 packages/cli/src/commands/protogen/index.ts create mode 100644 packages/cli/src/package.ts delete mode 100755 packages/cli/src/parser.js create mode 100644 packages/cli/types/commands/codegen/cli.d.ts create mode 100644 packages/cli/types/commands/codegen/index.d.ts create mode 100644 packages/cli/types/commands/index.d.ts create mode 100644 packages/cli/types/commands/protogen/cli.d.ts create mode 100644 packages/cli/types/commands/protogen/index.d.ts create mode 100644 packages/cli/types/help.d.ts create mode 100644 packages/cli/types/package.d.ts delete mode 100644 packages/cli/types/parser.d.ts diff --git a/packages/cli/README.md b/packages/cli/README.md index d61eb23..fb8e3f5 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -45,50 +45,61 @@ pg-proto-parser --inFile pg_query.proto --outDir out ## Usage -After installation, you can run the `pg-proto-parser` command as follows: +After installation, you can run the `pg-proto-parser` command for code generation as follows: + +### codegen ```bash -pg-proto-parser --inFile --outDir +pg-proto-parser codegen --inFile --outDir \ + [--enums] [--enumsJSON] [--typeUnion] \ + [--header] [--types] [--utils] \ + [--case] [--optional] [--removeUndefined] ``` -- `--inFile`: Path to the `.proto` file to be parsed. -- `--outDir`: Directory to save the generated TypeScript files. +#### Options for codegen + +| Option | Description | Default Value | +|---------------------|---------------------------------------------------------------------------------------------------------------------------|---------------| +| `--inFile` | Path to the `.proto` file to be parsed. | *Required* | +| `--outDir` | Directory to save the generated TypeScript files. | *Required* | +| `--enums` | Generate TypeScript enum types for PostgreSQL enums. | `false` | +| `--enumsJSON` | Generate JSON files mapping enum names to values. | `false` | +| `--typeUnion` | Generate TypeScript unions from enum types. | `false` | +| `--header` | Include a header in the generated TypeScript files to aid in integration. | `false` | +| `--types` | Generate TypeScript interfaces for protobuf messages. | `false` | +| `--utils` | Generate TypeScript utility functions for enums. | `false` | +| `--case` | Keep field casing as defined in the protobuf file. If false, fields will be converted to camelCase. | `false` | +| `--optional` | Generate TypeScript interfaces with optional fields. | `false` | +| `--removeUndefined` | Remove the 'UNDEFINED' enum entry if it exists. | `false` | +| `--help`, `-h` | Show this help message and exit. | | +| `--version`, `-v` | Show the version number and exit. | | -## Options +To explicitly set a boolean option to false, prepend the option with `--no-`. For example, to disable JSON enum mapping, use `--no-enumsJSON`. -```bash -pg-proto-parser --input \ - --output \ - [--enums] \ - [--enumsJSON] \ - [--typeUnion] \ - [--header] \ - [--types] \ - [--utils] \ - [--case] \ - [--optional] \ - [--removeUndefined] -``` +### protogen +You can also generate code using the `protogen` command: -| Option | Description | Default Value | -|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------|---------------| -| `--input`, `-i` | Path to the `.proto` file to be parsed. | *Required* | -| `--output`, `-o` | Directory to save the generated TypeScript files. | *Required* | -| `--enums` | Generate TypeScript enum types for PostgreSQL enums. | `true` | -| `--enumsJSON` | Generate JSON files mapping enum names to integer values and vice versa. | `true` | -| `--typeUnion` | Generate TypeScript unions from enum types. | `true` | -| `--header` | Include a header in the generated TypeScript files to avoid manual manipulation which could cause issues in CI/CD pipelines. | `true` | -| `--types` | Generate TypeScript interfaces for protobuf messages. | `true` | -| `--utils` | Generate TypeScript utility functions for building ASTs. | `false` | -| `--case` | Keep field casing as defined in the protobuf file. If false, fields will be converted to camelCase. | `false` | -| `--optional` | Generate TypeScript interfaces with optional fields mapping to the PostgreSQL node types' fields; sets all fields to optional. | `true` | -| `--removeUndefined` | Remove the initial `UNDEFINED` enum entry and adjust the subsequent values by decrementing them. | `true` | +```bash +pg-proto-parser protogen --protoUrl \ + --inFile \ + --outFile \ + --originalPackageName \ + --newPackageName +``` +#### Options for protogen -To explicitly set a boolean option to false, prepend the option with `--no-`. For example, to disable JSON enum mapping, use `--no-enumsJSON`. +| Option | Description | Default Value | +|-------------------------|-------------------------------------------------------------------------------------|---------------| +| `--protoUrl` | Full URL to download the proto file (optional). | | +| `--inFile` | Path where the proto file will be saved or path to an existing proto file. | *Required* | +| `--outFile` | Path where the generated JavaScript file will be saved. | *Required* | +| `--originalPackageName` | Original package name to be replaced in the JS file. | protobufjs/minimal | +| `--newPackageName` | New package name to replace in the JS file. | @launchql/protobufjs/minimal | +| `--help`, `-h` | Show this help message. | | +| `--version`, `-v` | Show the version number. | | -Note: Boolean flags default to true when specified without a value. To set them to false, use the no- prefix (e.g., `--no-enumsJSON` will set `enumsJSON` to false). ## Related diff --git a/packages/cli/package.json b/packages/cli/package.json index b29ca55..9280a52 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -18,7 +18,7 @@ "main" ], "bin": { - "pg-proto-parser": "main/parser.js" + "pg-proto-parser": "main/index.js" }, "scripts": { "build:main": "yarn tsc -p tsconfig.json --outDir main --module commonjs", @@ -28,7 +28,7 @@ "prepare": "npm run clean && npm run build", "lint": "eslint .", "format": "eslint . --fix", - "dev": "NODE_ENV=development ts-node src/parser", + "dev": "ts-node src/index", "test": "jest", "test:watch": "jest --watch", "test:debug": "node --inspect node_modules/.bin/jest --runInBand" @@ -74,7 +74,11 @@ "typescript": "^5.0.4" }, "dependencies": { + "@launchql/protobufjs": "7.2.6", + "@launchql/protobufjs-cli": "1.1.5", + "chalk": "^4.1.0", "glob": "8.0.3", + "inquirerer": "1.9.0", "minimist": "1.2.8", "mkdirp": "3.0.1", "nested-obj": "^0.0.1", diff --git a/packages/cli/src/commands/codegen/cli.ts b/packages/cli/src/commands/codegen/cli.ts new file mode 100644 index 0000000..3e9d8ec --- /dev/null +++ b/packages/cli/src/commands/codegen/cli.ts @@ -0,0 +1,70 @@ +import { readAndParsePackageJson } from '../../package'; +import { PgProtoParser, PgProtoParserOptions, getOptionsWithDefaults } from 'pg-proto-parser'; +import o from 'nested-obj'; + +export const help = (): void => { + console.log(` + Usage: + + pg-proto-parser codegen --inFile --outDir + [--enums] [--enumsJSON] [--typeUnion] + [--header] [--types] [--utils] + [--case] [--optional] [--removeUndefined] + + Options: + + --help, -h Show this help message and exit. + --inFile Path to the .proto file to be parsed. + --outDir Directory to save the generated TypeScript files. + --enums Generate TypeScript enum types for PostgreSQL enums. + --enumsJSON Generate JSON files mapping enum names to values. + --typeUnion Generate TypeScript unions from enum types. + --header Include a header in the generated TypeScript files. + --types Generate TypeScript interfaces for protobuf messages. + --utils Generate TypeScript utility functions for enums. + --case Keep field casing as defined in the protobuf file. + --optional Generate TypeScript interfaces with optional fields. + --removeUndefined Remove the 'UNDEFINED' enum entry if it exists. + --version, -v Show the version number and exit. + `); +} + +export default async (argv) => { + + if (argv.help || argv.h) { + help(); + process.exit(0); + } + + if (argv.version || argv.v) { + console.log(`Version: ${readAndParsePackageJson().version}`); + process.exit(0); + } + + if (!argv.inFile || !argv.outDir) { + console.log('Input Error: inFile and outDir are required!'); + help(); + process.exit(1); + } + + const options: PgProtoParserOptions = getOptionsWithDefaults({ + outDir: argv.outDir + }); + + // Setting nested options using objectPath + o.set(options, 'enums.enabled', argv.enums); + o.set(options, 'enums.enumsAsTypeUnion', argv.typeUnion); + o.set(options, 'enums.json.enabled', argv.enumsJSON); + o.set(options, 'enums.removeUndefinedAt0', argv.removeUndefined); + o.set(options, 'includeHeader', argv.header); + o.set(options, 'parser.keepCase', argv.case); + o.set(options, 'types.enabled', argv.types); + o.set(options, 'types.optionalFields', argv.optional); + o.set(options, 'utils.astHelpers.enabled', argv.utils); + + const parser = new PgProtoParser(argv.inFile, options); + // Generate TypeScript and JSON files + await parser.write(); + + return argv; +}; diff --git a/packages/cli/src/commands/codegen/index.ts b/packages/cli/src/commands/codegen/index.ts new file mode 100644 index 0000000..3295e77 --- /dev/null +++ b/packages/cli/src/commands/codegen/index.ts @@ -0,0 +1,90 @@ +import { CLIOptions, Inquirerer } from 'inquirerer' +import { ParsedArgs } from 'minimist'; +import cli, { help } from './cli'; +export const commands = async (argv: Partial, prompter: Inquirerer, _options: CLIOptions) => { + + if (argv.help || argv.h) { + help(); + process.exit(0); + } + + argv = await prompter.prompt(argv, [ + { + type: 'text', + name: 'inFile', + message: 'provide inFile (./path/to/proto.proto):' + }, + { + type: 'text', + name: 'outDir', + message: 'provide outDir (./outputDir):' + }, + { + type: 'confirm', + name: 'enums', + message: 'Enable enums?', + default: false, + useDefault: true + }, + { + type: 'confirm', + name: 'typeUnion', + message: 'Use enums as type union?', + default: false, + useDefault: true + }, + { + type: 'confirm', + name: 'enumsJSON', + message: 'Enable JSON for enums?', + default: false, + useDefault: true + }, + { + type: 'confirm', + name: 'removeUndefined', + message: 'Remove undefined at index 0?', + default: false, + useDefault: true + }, + { + type: 'confirm', + name: 'header', + message: 'Include header in output?', + default: false, + useDefault: true + }, + { + type: 'confirm', + name: 'case', + message: 'Keep case in parser?', + default: false, + useDefault: true + }, + { + type: 'confirm', + name: 'types', + message: 'Enable types?', + default: false, + useDefault: true + }, + { + type: 'confirm', + name: 'optional', + message: 'Are optional fields enabled?', + default: false, + useDefault: true + }, + { + type: 'confirm', + name: 'utils', + message: 'Enable AST helpers in utils?', + default: false, + useDefault: true + } + ]); + + argv = await cli(argv); + + return argv; +}; \ No newline at end of file diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts new file mode 100644 index 0000000..1c44db5 --- /dev/null +++ b/packages/cli/src/commands/index.ts @@ -0,0 +1,64 @@ +import { CLIOptions, Inquirerer, Question } from 'inquirerer' +import { ParsedArgs } from 'minimist'; + +import { commands as codegen } from './codegen'; +import { commands as protogen } from './protogen'; + +import { help as codegenHelp } from './codegen/cli'; +import { help as protogenHelp } from './protogen/cli'; + +export const commands = async (argv: Partial, prompter: Inquirerer, _options: CLIOptions) => { + let command; + + if (argv._.length > 0) { + command = argv._.shift(); + } + + if (command) { + argv.command = command; + } + + if (argv.help || argv.h) { + codegenHelp(); + protogenHelp(); + process.exit(0); + } + + + const questions: Question[] = [ + { + type: 'autocomplete', + name: 'command', + message: 'choose a command', + options: [ + 'protogen', + 'codegen' + ] + } + ]; + + ({ command } = await prompter.prompt(argv, questions)); + + // recursive... + delete argv.command; + + // @ts-ignore + prompter.exit = () => {}; + + switch (command) { + case 'protogen': + argv = await protogen(argv, prompter, _options); + break; + + case 'codegen': + argv = await codegen(argv, prompter, _options); + break; + + default: + console.log(`No recognized command provided or no command given: ${command}`); + break; + } + + return argv; + +}; \ No newline at end of file diff --git a/packages/cli/src/commands/protogen/cli.ts b/packages/cli/src/commands/protogen/cli.ts new file mode 100644 index 0000000..ce0d756 --- /dev/null +++ b/packages/cli/src/commands/protogen/cli.ts @@ -0,0 +1,51 @@ +import { downloadProtoFile, generateProtoJS, replaceTextInProtoJS } from './helpers'; + +export interface CommandOptions { + help?: boolean; + h?: boolean; + version?: boolean; + v?: boolean; + protoUrl?: string; + inFile: string; + outFile: string; + originalPackageName: string; + newPackageName: string; +} + +export const help = (): void => { + console.log(` + Usage: + + pg-proto-parser protogen --protoUrl + --inFile + --outFile + --originalPackageName + --newPackageName + + Options: + + --help, -h Show this help message. + --version, -v Show the version number. + --protoUrl Full URL to download the proto file (optional). + --inFile Path where the proto file will be saved or path to an existing proto file. + --outFile Path where the generated JavaScript file will be saved. + --originalPackageName Original package name to be replaced in the JS file. + --newPackageName New package name to replace in the JS file. + `); +} + +export default async (argv: CommandOptions): Promise => { + + try { + if (argv.protoUrl) { + await downloadProtoFile(argv.protoUrl, argv.inFile); + } + await generateProtoJS(argv.inFile, argv.outFile); + await replaceTextInProtoJS(argv.outFile, argv.originalPackageName, argv.newPackageName); + console.log('All operations completed successfully.'); + } catch (error) { + console.error('An error occurred:', error.message); + } + + return argv; +}; diff --git a/packages/cli/src/commands/protogen/helpers.ts b/packages/cli/src/commands/protogen/helpers.ts new file mode 100644 index 0000000..9f1d482 --- /dev/null +++ b/packages/cli/src/commands/protogen/helpers.ts @@ -0,0 +1,72 @@ +import https from 'https'; +import fs from 'fs'; +import { exec } from 'child_process'; +import { sync as mkdirp } from 'mkdirp'; +import { dirname } from 'path'; + +// Download .proto file if URL +export const downloadProtoFile = (protoUrl: string, filePath: string): Promise => { + mkdirp(dirname(filePath)); + + return new Promise((resolve, reject) => { + https.get(protoUrl, (response) => { + if (response.statusCode !== 200) { + console.error(`Failed to download file: Status Code: ${response.statusCode}`); + response.resume(); // consume response data to free up memory + reject(new Error('Failed to download file')); + return; + } + + const fileStream = fs.createWriteStream(filePath); + response.pipe(fileStream); + fileStream.on('finish', () => { + fileStream.close(); + console.log('Downloaded proto file.'); + resolve(); + }); + }).on('error', (err) => { + console.error(`Error downloading the file: ${err.message}`); + fs.unlink(filePath, () => {}); // Delete the file async. (No need to check error here) + reject(err); + }); + }); +} + +// Generate JavaScript from proto file using pbjs +export const generateProtoJS = (inFile: string, outFile: string): Promise => new Promise((resolve, reject) => { + const command = `pbjs --keep-case -t static-module -o ${outFile} ${inFile}`; + mkdirp(dirname(outFile)); + + exec(command, (error, _stdout, _stderr) => { + if (error) { + console.error(`Error during code generation: ${error.message}`); + reject(error); + return; + } + console.log('Generated proto.js from proto file.'); + resolve(); + }); +}); + +// Replace text in generated JS file +export const replaceTextInProtoJS = (filePath: string, originalPackage: string, newPackage: string): Promise => new Promise((resolve, reject) => { + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + console.error(`Error reading proto.js: ${err.message}`); + reject(err); + return; + } + + const result = data.replace(new RegExp(originalPackage, 'g'), newPackage); + + fs.writeFile(filePath, result, 'utf8', (err) => { + if (err) { + console.error(`Error writing back to proto.js: ${err.message}`); + reject(err); + return; + } + console.log('Replaced text in proto.js successfully.'); + resolve(); + }); + }); +}); diff --git a/packages/cli/src/commands/protogen/index.ts b/packages/cli/src/commands/protogen/index.ts new file mode 100644 index 0000000..ab36af5 --- /dev/null +++ b/packages/cli/src/commands/protogen/index.ts @@ -0,0 +1,55 @@ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { ParsedArgs } from 'minimist'; +import cli, { CommandOptions, help } from './cli'; +export const commands = async (argv: Partial, prompter: Inquirerer, _options: CLIOptions) => { + + if (argv.help || argv.h) { + help(); + process.exit(0); + } + + argv = await prompter.prompt(argv, [ + // use false, TODO: add optional flag on questions allowSkip: boolean + // @ts-ignore + { + type: 'text', + name: 'protoUrl', + message: 'Enter the URL to the proto file (optional):', + required: false, + default: false, + useDefault: true + }, + { + type: 'text', + name: 'inFile', + message: 'Provide the path where the proto file will be saved or the path to an existing proto file:', + required: true + }, + { + type: 'text', + name: 'outFile', + message: 'Provide the path where the generated JavaScript file will be saved:', + required: true + }, + { + type: 'text', + name: 'originalPackageName', + message: 'Enter the original package name to be replaced in the JS file:', + required: true, + default: 'protobufjs/minimal', + useDefault: true + }, + { + type: 'text', + name: 'newPackageName', + message: 'Enter the new package name to replace in the JS file:', + required: true, + default: '@launchql/protobufjs/minimal', + useDefault: true + } + ]); + + argv = await cli(argv as CommandOptions); + + return argv; +}; diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 6d0ce7f..40b221c 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,69 +1,22 @@ -import pkg from '../package.json'; -import { PgProtoParser, PgProtoParserOptions, getOptionsWithDefaults } from 'pg-proto-parser'; -import o from 'nested-obj'; - -export const help = (): void => { - console.log(` - Usage: - - pg-proto-parser --input --output - [--enums] [--enumsJSON] [--typeUnion] - [--header] [--types] [--utils] - [--case] [--optional] [--removeUndefined] - - Options: - - --help, -h Show this help message and exit. - --input, -i Path to the .proto file to be parsed. - --output, -o Directory to save the generated TypeScript files. - --enums Generate TypeScript enum types for PostgreSQL enums. - --enumsJSON Generate JSON files mapping enum names to values. - --typeUnion Generate TypeScript unions from enum types. - --header Include a header in the generated TypeScript files. - --types Generate TypeScript interfaces for protobuf messages. - --utils Generate TypeScript utility functions for enums. - --case Keep field casing as defined in the protobuf file. - --optional Generate TypeScript interfaces with optional fields. - --removeUndefined Remove the 'UNDEFINED' enum entry if it exists. - --version, -v Show the version number and exit. - `); -} - -export default async (argv) => { - - if (argv.help || argv.h) { - help(); - process.exit(0); - } - - if (argv.version || argv.v) { - console.log(`Version: ${pkg.version}`); - process.exit(0); - } - - if (!argv.input || !argv.output) { - console.log('Input Error: input and output are required!'); - help(); - process.exit(1); - } - - const options: PgProtoParserOptions = getOptionsWithDefaults({ - outDir: argv.output - }); - - // Setting nested options using objectPath - o.set(options, 'enums.enabled', argv.enums); - o.set(options, 'enums.enumsAsTypeUnion', argv.typeUnion); - o.set(options, 'enums.json.enabled', argv.enumsJSON); - o.set(options, 'enums.removeUndefinedAt0', argv.removeUndefined); - o.set(options, 'includeHeader', argv.header); - o.set(options, 'parser.keepCase', argv.case); - o.set(options, 'types.enabled', argv.types); - o.set(options, 'types.optionalFields', argv.optional); - o.set(options, 'utils.astHelpers.enabled', argv.utils); - - const parser = new PgProtoParser(argv.input, options); - - // Generate TypeScript and JSON files - await parser.write(); -}; +#!/usr/bin/env node +import { CLI, CLIOptions } from 'inquirerer'; + +import { commands } from './commands' + +export const options: Partial = { + minimistOpts: { + alias: { + v: 'version', + h: 'help' + } + } + }; + +const app = new CLI(commands, options); + +app.run().then(()=> { + // all done! +}).catch(error => { + console.error(error); + process.exit(1); +}) diff --git a/packages/cli/src/package.ts b/packages/cli/src/package.ts new file mode 100644 index 0000000..74d39ab --- /dev/null +++ b/packages/cli/src/package.ts @@ -0,0 +1,33 @@ +import { existsSync,readFileSync } from "fs"; +import { dirname,join } from "path"; + +// need to search due to the dist/ folder and src/, etc. +function findPackageJson(currentDir: string): string { + const filePath = join(currentDir, 'package.json'); + + // Check if package.json exists in the current directory + if (existsSync(filePath)) { + return filePath; + } + + // Get the parent directory + const parentDir = dirname(currentDir); + + // If reached the root directory, package.json is not found + if (parentDir === currentDir) { + throw new Error('package.json not found in any parent directory'); + } + + // Recursively look in the parent directory + return findPackageJson(parentDir); +} + +export function readAndParsePackageJson(): any { + // Start searching from the current directory + const pkgPath = findPackageJson(__dirname); + + // Read and parse the package.json + const str = readFileSync(pkgPath, 'utf8'); + const pkg = JSON.parse(str); + return pkg; +} \ No newline at end of file diff --git a/packages/cli/src/parser.js b/packages/cli/src/parser.js deleted file mode 100755 index 92951ab..0000000 --- a/packages/cli/src/parser.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -import run from './index'; - -var argv = require('minimist')(process.argv.slice(2)); - -(async () => { - await run(argv); -})(); diff --git a/packages/cli/types/commands/codegen/cli.d.ts b/packages/cli/types/commands/codegen/cli.d.ts new file mode 100644 index 0000000..f8e3848 --- /dev/null +++ b/packages/cli/types/commands/codegen/cli.d.ts @@ -0,0 +1,3 @@ +export declare const help: () => void; +declare const _default: (argv: any) => Promise; +export default _default; diff --git a/packages/cli/types/commands/codegen/index.d.ts b/packages/cli/types/commands/codegen/index.d.ts new file mode 100644 index 0000000..ee845a5 --- /dev/null +++ b/packages/cli/types/commands/codegen/index.d.ts @@ -0,0 +1,3 @@ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { ParsedArgs } from 'minimist'; +export declare const commands: (argv: Partial, prompter: Inquirerer, _options: CLIOptions) => Promise>; diff --git a/packages/cli/types/commands/index.d.ts b/packages/cli/types/commands/index.d.ts new file mode 100644 index 0000000..ee845a5 --- /dev/null +++ b/packages/cli/types/commands/index.d.ts @@ -0,0 +1,3 @@ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { ParsedArgs } from 'minimist'; +export declare const commands: (argv: Partial, prompter: Inquirerer, _options: CLIOptions) => Promise>; diff --git a/packages/cli/types/commands/protogen/cli.d.ts b/packages/cli/types/commands/protogen/cli.d.ts new file mode 100644 index 0000000..f8e3848 --- /dev/null +++ b/packages/cli/types/commands/protogen/cli.d.ts @@ -0,0 +1,3 @@ +export declare const help: () => void; +declare const _default: (argv: any) => Promise; +export default _default; diff --git a/packages/cli/types/commands/protogen/index.d.ts b/packages/cli/types/commands/protogen/index.d.ts new file mode 100644 index 0000000..ee845a5 --- /dev/null +++ b/packages/cli/types/commands/protogen/index.d.ts @@ -0,0 +1,3 @@ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { ParsedArgs } from 'minimist'; +export declare const commands: (argv: Partial, prompter: Inquirerer, _options: CLIOptions) => Promise>; diff --git a/packages/cli/types/help.d.ts b/packages/cli/types/help.d.ts new file mode 100644 index 0000000..db073e8 --- /dev/null +++ b/packages/cli/types/help.d.ts @@ -0,0 +1 @@ +export declare function getUsage(): string; diff --git a/packages/cli/types/index.d.ts b/packages/cli/types/index.d.ts index ab0e1e8..c081d8c 100644 --- a/packages/cli/types/index.d.ts +++ b/packages/cli/types/index.d.ts @@ -1,3 +1,3 @@ -export declare const help: () => void; -declare const _default: (argv: any) => Promise; -export default _default; +#!/usr/bin/env node +import { CLIOptions } from 'inquirerer'; +export declare const options: Partial; diff --git a/packages/cli/types/package.d.ts b/packages/cli/types/package.d.ts new file mode 100644 index 0000000..6099225 --- /dev/null +++ b/packages/cli/types/package.d.ts @@ -0,0 +1 @@ +export declare function readAndParsePackageJson(): any; diff --git a/packages/cli/types/parser.d.ts b/packages/cli/types/parser.d.ts deleted file mode 100644 index b798801..0000000 --- a/packages/cli/types/parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -export {}; diff --git a/yarn.lock b/yarn.lock index a6ac89c..0a72cae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -166,6 +166,11 @@ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz#1e416d3627393fab1cb5b0f2f1796a100ae9133a" integrity sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg== +"@babel/parser@^7.20.15": + version "7.24.5" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" + integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -652,6 +657,29 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jsdoc/salty@^0.2.1": + version "0.2.8" + resolved "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.8.tgz#8d29923a9429694a437a50ab75004b576131d597" + integrity sha512-5e+SFVavj1ORKlKaKr2BmTOekmXbelU7dC0cDkQLqag7xfuTPuGMUFx7KWJuv4bYZrTsoL2Z18VVCOKYxzoHcg== + dependencies: + lodash "^4.17.21" + +"@launchql/protobufjs-cli@1.1.5": + version "1.1.5" + resolved "https://registry.npmjs.org/@launchql/protobufjs-cli/-/protobufjs-cli-1.1.5.tgz#bdcd08179377d2edcd0009b7d82530b0183f615f" + integrity sha512-k9Zr2Ny0CKlBGV5w+1ZBgsN2sQMKdbCwYSM1Ogo/het+S3YgYFbddyIz8us/z/2EDuuexGNCVaXsU8+wRTCDng== + dependencies: + chalk "^4.0.0" + escodegen "^1.13.0" + espree "^9.0.0" + estraverse "^5.1.0" + glob "^8.0.0" + jsdoc "^4.0.0" + minimist "^1.2.0" + semver "^7.1.2" + tmp "^0.2.1" + uglify-js "^3.7.7" + "@launchql/protobufjs@7.2.6": version "7.2.6" resolved "https://registry.npmjs.org/@launchql/protobufjs/-/protobufjs-7.2.6.tgz#f8b8fe02ca411d496390064eb398ba5245ca4e22" @@ -1200,6 +1228,24 @@ expect "^29.0.0" pretty-format "^29.0.0" +"@types/linkify-it@^5": + version "5.0.0" + resolved "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz#21413001973106cda1c3a9b91eedd4ccd5469d76" + integrity sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q== + +"@types/markdown-it@^14.1.1": + version "14.1.1" + resolved "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz#06bafb7a4e3f77b62b1f308acf7df76687887e0b" + integrity sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg== + dependencies: + "@types/linkify-it" "^5" + "@types/mdurl" "^2" + +"@types/mdurl@^2": + version "2.0.0" + resolved "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz#d43878b5b20222682163ae6f897b20447233bdfd" + integrity sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg== + "@types/minimatch@^3.0.3": version "3.0.5" resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" @@ -1543,6 +1589,11 @@ bl@^4.0.3, bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" +bluebird@^3.7.2: + version "3.7.2" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + boolbase@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -1700,6 +1751,13 @@ case@1.6.3: resolved "https://registry.npmjs.org/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== +catharsis@^0.9.0: + version "0.9.0" + resolved "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz#40382a168be0e6da308c277d3a2b3eb40c7d2121" + integrity sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A== + dependencies: + lodash "^4.17.15" + chalk@4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -2072,12 +2130,12 @@ dedent@^1.0.0: resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== -deep-is@^0.1.3: +deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -deepmerge@4.3.1, deepmerge@^4.2.2: +deepmerge@4.3.1, deepmerge@^4.2.2, deepmerge@^4.3.1: version "4.3.1" resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== @@ -2248,7 +2306,7 @@ enquirer@~2.3.6: dependencies: ansi-colors "^4.1.1" -entities@^4.2.0: +entities@^4.2.0, entities@^4.4.0: version "4.5.0" resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== @@ -2295,6 +2353,18 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +escodegen@^1.13.0: + version "1.14.3" + resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + eslint-config-prettier@^8.8.0: version "8.10.0" resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" @@ -2366,7 +2436,7 @@ eslint@8.38.0: strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.5.1, espree@^9.6.0: +espree@^9.0.0, espree@^9.5.1, espree@^9.6.0: version "9.6.1" resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== @@ -2375,7 +2445,7 @@ espree@^9.5.1, espree@^9.6.0: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" -esprima@4.0.1, esprima@^4.0.0, esprima@~4.0.0: +esprima@4.0.1, esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -2394,6 +2464,11 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" +estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" @@ -2495,7 +2570,7 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-sta resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== @@ -2810,7 +2885,7 @@ glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.1: +glob@^8.0.0, glob@^8.0.1: version "8.1.0" resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -2855,7 +2930,7 @@ globby@11.1.0: merge2 "^1.4.1" slash "^3.0.0" -graceful-fs@4.2.11, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@4.2.11, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -3095,6 +3170,16 @@ inquirer@^8.2.4: through "^2.3.6" wrap-ansi "^6.0.1" +inquirerer@1.9.0: + version "1.9.0" + resolved "https://registry.npmjs.org/inquirerer/-/inquirerer-1.9.0.tgz#108071773a28ea5b950271572ac3051f34e0c92e" + integrity sha512-/LAn/F70YvRQZWz9r1q1seoO2oRMiSCSK8xKHGlkNebSibx5FppUKZLEjXgkCy1tgccas933q/Y7qNccFxrYkw== + dependencies: + chalk "^4.1.0" + deepmerge "^4.3.1" + js-yaml "^4.1.0" + minimist "^1.2.8" + ip-address@^9.0.5: version "9.0.5" resolved "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" @@ -3712,11 +3797,39 @@ js-yaml@^3.10.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js2xmlparser@^4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz#2a1fdf01e90585ef2ae872a01bc169c6a8d5e60a" + integrity sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA== + dependencies: + xmlcreate "^2.0.4" + jsbn@1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== +jsdoc@^4.0.0: + version "4.0.3" + resolved "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.3.tgz#bfee86c6a82f6823e12b5e8be698fd99ae46c061" + integrity sha512-Nu7Sf35kXJ1MWDZIMAuATRQTg1iIPdzh7tqJ6jjvaU/GfDf+qi5UV8zJR3Mo+/pYFvm8mzay4+6O5EWigaQBQw== + dependencies: + "@babel/parser" "^7.20.15" + "@jsdoc/salty" "^0.2.1" + "@types/markdown-it" "^14.1.1" + bluebird "^3.7.2" + catharsis "^0.9.0" + escape-string-regexp "^2.0.0" + js2xmlparser "^4.0.2" + klaw "^3.0.0" + markdown-it "^14.1.0" + markdown-it-anchor "^8.6.7" + marked "^4.0.10" + mkdirp "^1.0.4" + requizzle "^0.2.3" + strip-json-comments "^3.1.0" + underscore "~1.13.2" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -3793,6 +3906,13 @@ kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146" + integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== + dependencies: + graceful-fs "^4.1.9" + kleur@^3.0.3: version "3.0.3" resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -3891,6 +4011,14 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + libnpmaccess@7.0.2: version "7.0.2" resolved "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-7.0.2.tgz#7f056c8c933dd9c8ba771fa6493556b53c5aac52" @@ -3923,6 +4051,13 @@ lines-and-columns@~2.0.3: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz#d00318855905d2660d8c0822e3f5a4715855fc42" integrity sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A== +linkify-it@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" + integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== + dependencies: + uc.micro "^2.0.0" + load-json-file@6.2.0: version "6.2.0" resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-6.2.0.tgz#5c7770b42cafa97074ca2848707c61662f4251a1" @@ -3980,7 +4115,7 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.21: +lodash@^4.17.15, lodash@^4.17.21: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -4109,6 +4244,33 @@ map-obj@^4.0.0: resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== +markdown-it-anchor@^8.6.7: + version "8.6.7" + resolved "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634" + integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== + +markdown-it@^14.1.0: + version "14.1.0" + resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" + integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== + dependencies: + argparse "^2.0.1" + entities "^4.4.0" + linkify-it "^5.0.0" + mdurl "^2.0.0" + punycode.js "^2.3.1" + uc.micro "^2.1.0" + +marked@^4.0.10: + version "4.3.0" + resolved "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== + +mdurl@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" + integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== + meow@^8.1.2: version "8.1.2" resolved "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -4210,7 +4372,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@1.2.8, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: +minimist@1.2.8, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.8: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -4665,6 +4827,18 @@ open@^8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + optionator@^0.9.1: version "0.9.3" resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -4953,6 +5127,11 @@ prelude-ls@^1.2.1: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + prettier-linter-helpers@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" @@ -5027,6 +5206,11 @@ proxy-from-env@^1.1.0: resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +punycode.js@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" + integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== + punycode@^2.1.0: version "2.3.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" @@ -5164,6 +5348,13 @@ require-directory@^2.1.1: resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== +requizzle@^0.2.3: + version "0.2.4" + resolved "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz#319eb658b28c370f0c20f968fa8ceab98c13d27c" + integrity sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw== + dependencies: + lodash "^4.17.21" + resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -5285,7 +5476,7 @@ semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: +semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: version "7.6.0" resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== @@ -5660,7 +5851,7 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@~0.2.1: +tmp@^0.2.1, tmp@~0.2.1: version "0.2.3" resolved "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== @@ -5755,6 +5946,13 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + type-detect@4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -5800,11 +5998,21 @@ typedarray@^0.0.6: resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== -uglify-js@^3.1.4: +uc.micro@^2.0.0, uc.micro@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" + integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== + +uglify-js@^3.1.4, uglify-js@^3.7.7: version "3.17.4" resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== +underscore@~1.13.2: + version "1.13.6" + resolved "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" + integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== + undici-types@~5.26.4: version "5.26.5" resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" @@ -5967,6 +6175,11 @@ wide-align@^1.1.5: dependencies: string-width "^1.0.2 || 2 || 3 || 4" +word-wrap@~1.2.3: + version "1.2.5" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" @@ -6050,6 +6263,11 @@ write-pkg@4.0.0: type-fest "^0.4.1" write-json-file "^3.2.0" +xmlcreate@^2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz#0c5ab0f99cdd02a81065fa9cd8f8ae87624889be" + integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== + xtend@~4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"