diff --git a/.github/workflows/jsr.yml b/.github/workflows/jsr.yml index dd38b00..e207d3e 100644 --- a/.github/workflows/jsr.yml +++ b/.github/workflows/jsr.yml @@ -1,20 +1,9 @@ -name: Publish to jsr +name: Publish to jsr.io on: release: types: [released] - workflow_dispatch: jobs: publish: - runs-on: ubuntu-latest - - permissions: - contents: read - id-token: write - - steps: - - uses: actions/checkout@v4 - - - name: Publish package - run: npx jsr publish \ No newline at end of file + uses: cross-org/workflows/.github/workflows/jsr-publish.yml@main \ No newline at end of file diff --git a/deno.json b/deno.json index 0624a35..13ec435 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@cross/utils", - "version": "0.6.1", + "version": "0.6.2", "exports": { ".": "./mod.ts", "./ansi": "./utils/ansi.ts", diff --git a/utils/ansi.ts b/utils/ansi.ts index 8140d73..515e5a7 100644 --- a/utils/ansi.ts +++ b/utils/ansi.ts @@ -36,11 +36,10 @@ const enum AnsiCodes { BgWhite = "\x1b[47m", } - /** - * Contains methods for applying various ANSI text styles to console output. - */ +/** + * Contains methods for applying various ANSI text styles to console output. + */ export class Colors { - /** * Applies bold formatting to text. * @param {string} text The text to format. @@ -260,13 +259,11 @@ export class Colors { return AnsiCodes.FgWhite + text + AnsiCodes.Reset; } } - /** - * Contains methods for controlling cursor behavior in the console, like movement, visibility, - * or clearing the screen. - */ +/** + * Contains methods for controlling cursor behavior in the console, like movement, visibility, + * or clearing the screen. + */ export class Cursor { - - /** * Moves the cursor up a specified number of lines. * @param {number} lines The number of lines to move up (default: 1). diff --git a/utils/args.ts b/utils/args.ts index bc2afd6..e1313c5 100644 --- a/utils/args.ts +++ b/utils/args.ts @@ -45,11 +45,11 @@ export function args(all: boolean = false): string[] { /** * Provides command-line argument parsing functionality. - * + * * **Key Features:** * * Handles short and long flags (e.g., `-f` and `--flag`) * * Supports multiple values for a single flag - * * Stores loose arguments (those not associated with flags) + * * Stores loose arguments (those not associated with flags) * * Collects a "rest command" portion after the `--` delimiter, useful for subcommands. */ export class ArgsParser { @@ -115,17 +115,17 @@ export class ArgsParser { /** * Constructs a new instance of the ArgsParser class, parsing provided command-line arguments. - * - * @param {string[]} cmdArgs - An array of command-line arguments to parse. + * + * @param {string[]} cmdArgs - An array of command-line arguments to parse. * * @example * // Basic usage - * const argsParser = new ArgsParser(process.argv.slice(2)); - * const inputFile = argsParser.get('input'); + * const argsParser = new ArgsParser(process.argv.slice(2)); + * const inputFile = argsParser.get('input'); * * // Handling flags, multiple values, and loose arguments - * const options = argsParser.getArray('option'); - * const isVerbose = argsParser.get('verbose'); + * const options = argsParser.getArray('option'); + * const isVerbose = argsParser.get('verbose'); * const looseArgs = argsParser.getLoose(); */ constructor(cmdArgs: string[]) { diff --git a/utils/spawn.ts b/utils/spawn.ts index 2d0cbcc..c38cde1 100644 --- a/utils/spawn.ts +++ b/utils/spawn.ts @@ -1,6 +1,5 @@ import { CurrentRuntime, Runtime } from "@cross/runtime"; - // Runtime-specific execution functions (also using async/await) async function spawnNodeChildProcess( command: string[],