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ourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@aneuhold/main-scripts@2.8.0/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node --no-warnings\nimport { DR } from '@aneuhold/core-ts-lib';\nimport { program } from 'commander';\nimport clean from './commands/clean.js';\nimport config from './commands/config.js';\nimport dev from './commands/dev.js';\nimport downloadAndMergeVideos from './commands/downloadAndMergeVideos.js';\nimport downloadVideos from './commands/downloadVideos.js';\nimport fpull from './commands/fpull.js';\nimport mergeAllVideos from './commands/mergeAllVideos.js';\nimport mergeVideos from './commands/mergeVideos.js';\nimport open from './commands/open.js';\nimport pkg from './commands/pkg.js';\nimport setup from './commands/setup.js';\nimport startup from './commands/startup.js';\nimport sub from './commands/sub.js';\nimport unsub from './commands/unsub.js';\nimport vscode from './commands/vscode.js';\nimport { addWorktree, listWorktrees, removeWorktree } from './commands/worktree.js';\nimport calculateProbabilities from './utils/calculator.js';\nimport { triggerUpdate } from './utils/updateIfNeeded.js';\nprogram.name('tb');\nprogram\n    .option('-v, --verbose', 'run with verbose logging')\n    .hook('preAction', (thisCommand) => {\n    if (thisCommand.opts().verbose) {\n        DR.logger.setVerboseLogging(true);\n        DR.logger.verbose.info('Verbose logging enabled...');\n    }\n});\nprogram\n    .command('test')\n    .argument('[args...]')\n    .description('Runs a test command to make sure the package is working')\n    .action((args) => {\n    DR.logger.info(`You entered the following args: ${JSON.stringify(args)}`);\n    calculateProbabilities();\n});\nprogram\n    .command('update')\n    .description('Forces an update for this package')\n    .action(async () => {\n    await triggerUpdate();\n});\nprogram\n    .command('fpull')\n    .description('Runs git fetch -a and then git pull in the current directory')\n    .action(async () => {\n    await fpull();\n});\nprogram\n    .command('setup')\n    .description('Sets up the dev environment based on the name of the current directory')\n    .action(async () => {\n    await setup();\n});\nprogram\n    .command('open')\n    .description('Opens up the relevant project in the correct editor according to the current directory,' +\n    ' or the provided app with presets.')\n    .argument('[appName]', 'The name of the app to open if wanted')\n    .argument('[methodName]', 'The method to call of the specified application')\n    .action(async (appName, methodName) => {\n    await open(appName, methodName);\n});\nprogram\n    .command('startup')\n    .description('Runs the startup script for the current system with no arguments')\n    .action(async () => {\n    await startup();\n});\nprogram\n    .command('clean')\n    .description('Cleans up the provided target, for example branches')\n    .argument('[target]', 'The target to clean up. To see options, run this' +\n    ' command without arguments.')\n    .action(async (target) => {\n    await clean(target);\n});\nprogram\n    .command('downloadVideos')\n    .description('Downloads all videos from the videosToDownload.ts file to a folder in the current directory.')\n    .action(async () => {\n    await downloadVideos(false);\n});\nprogram\n    .command('mergeVideos')\n    .description('Merges all videos in the provided folder into a single video called merged.mp4.')\n    .argument('[pathToFolder]', 'The path to the folder containing the videos to merge. Defaults to the current directory.')\n    .action(async (pathToFolder) => {\n    await mergeVideos(pathToFolder);\n});\nprogram\n    .command('downloadAndMergeVideos')\n    .description('Downloads all videos from the videosToDownload.ts file to a folder in the current directory,' +\n    ' then merges all videos in that folder into a single video called merged.mp4.')\n    .action(async () => {\n    await downloadAndMergeVideos();\n});\nprogram\n    .command('mergeAllVideos')\n    .description('Merges all videos in folders in the current directory into a merged.mp4 file in each folder.')\n    .action(async () => {\n    await mergeAllVideos();\n});\nprogram\n    .command('pkg')\n    .description('Performs actions related to package publishing. This is ' +\n    'typically used inside a package.json file as one of the scripts.')\n    .argument('[packageAction]', 'The package action to perform. Supported actions are: validateJsr, publishJsr, validateNpm, publishNpm, testStringReplacement, prepare.')\n    .argument('[versionType]', 'For prepare action: version type (patch, minor, major). Defaults to patch if not specified.')\n    .option('-a, --alternative-names <names...>', 'Alternative package names to use for publishing/validation')\n    .option('-o, --original-string <string>', 'Original string for testStringReplacement action')\n    .option('-n, --new-string <string>', 'New string for testStringReplacement action')\n    .option('--allow-slow-types', 'For validateJsr: allow slow types (defaults to false)')\n    .action(async (packageAction, versionType, options) => {\n    await pkg(packageAction, versionType, options.alternativeNames, options.originalString, options.newString, options.allowSlowTypes);\n});\nprogram\n    .command('sub')\n    .description('Subscribes to a package using local-npm-registry for automatic updates during development')\n    .argument('[packagePrefix]', 'The package prefix to subscribe to (e.g., \"client-core\", \"spa\"). To see options, run this command without arguments.')\n    .action(async (packagePrefix) => {\n    await sub(packagePrefix);\n});\nprogram\n    .command('unsub')\n    .description('Unsubscribes from a package using local-npm-registry and resets to original version')\n    .argument('[packagePrefix]', 'The package prefix to unsubscribe from (e.g., \"client-core\", \"spa\"). If not provided, unsubscribes from all packages.')\n    .action(async (packagePrefix) => {\n    await unsub(packagePrefix);\n});\nprogram\n    .command('dev')\n    .description('Starts development mode with nodemon to watch for changes. Auto-detects the current project and runs in the first packageJsonPath directory.')\n    .action(async () => {\n    await dev();\n});\nprogram\n    .command('config')\n    .description('Shows the current configuration, initializes a new config file, or edits the existing config')\n    .argument('[action]', 'The action to perform: \"show\" (default), \"init\" to create a new config file, or \"edit\" to open in VS Code')\n    .argument('[folderName]', 'For init action: optional folder name to create a project configuration')\n    .action(async (action, folderName) => {\n    await config(action, folderName);\n});\nconst worktreeCmd = program\n    .command('worktree')\n    .alias('wt')\n    .description('Manage git worktrees with project-aware configuration');\nworktreeCmd\n    .command('add [branchName]', { isDefault: true })\n    .description('Create a new worktree (default action). Uses smart defaults if no branch name provided.')\n    .action(async (branchName) => {\n    await addWorktree(branchName);\n});\nworktreeCmd\n    .command('list')\n    .alias('ls')\n    .description('List all worktrees')\n    .action(async () => {\n    await listWorktrees();\n});\nworktreeCmd\n    .command('remove')\n    .alias('rm')\n    .description('Remove a worktree (interactive selection)')\n    .action(async () => {\n    await removeWorktree();\n});\nprogram\n    .command('vscode')\n    .description('Manage VS Code workspaces')\n    .argument('[command]', 'The command to execute (workspace/ws)')\n    .argument('[action]', 'The action to perform (list/ls)')\n    .action(async (command, action) => {\n    await vscode(command, action);\n});\n// Run the thang\nvoid (async () => {\n    await program.parseAsync();\n    process.exit();\n})();\n"]}