@aurodesignsystem-dev/auro-cli 0.0.0-pr254.0 → 0.0.0-pr258.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/utils/auroSplash.js", "../src/utils/packageVersion.js", "../src/commands/dev.js", "../src/commands/_sharedOptions.js", "../src/scripts/build/index.js", "../src/scripts/build/bundleHandlers.js", "../src/scripts/docs/index.ts", "../src/utils/shell.js", "../src/scripts/docs/docs-generator.ts", "../src/utils/pathUtils.js", "../src/scripts/build/defaultDocsBuild.js", "../src/scripts/build/devServerUtils.js", "../src/scripts/analyze.js", "../src/scripts/build/configUtils.js", "../src/scripts/build/plugins.js", "../src/scripts/build/watchModeHandlers.js", "../src/commands/build.js", "../src/commands/migrate.js", "../src/commands/sync.js", "../src/scripts/syncDotGithubDir.ts", "../src/commands/wca-setup.js", "../src/scripts/prepWcaCompatibleCode.mjs", "../src/commands/check-commits.ts", "../src/scripts/check-commits/commit-analyzer.ts", "../src/utils/gitUtils.ts", "../src/scripts/check-commits/display-utils.ts", "../src/scripts/check-commits/github-labels.ts", "../src/commands/pr-release.ts", "../src/commands/test.ts", "../src/commands/agent.ts", "../src/scripts/agent/run-migrations/writeMultiGitterConfig.js", "../src/scripts/formatDependencyTree.ts", "../src/commands/docs.ts", "../src/commands/ado.ts", "../src/scripts/ado/index.ts"],
4
- "sourcesContent": ["import { program } from \"commander\";\nimport auroSplash from \"#utils/auroSplash.js\";\nimport getPackageVersion from \"#utils/packageVersion.js\";\n\n// Register commands (importing them will register them)\nimport \"#commands/dev.js\";\nimport \"#commands/build.js\";\nimport \"#commands/migrate.js\";\nimport \"#commands/sync.js\";\nimport \"#commands/wca-setup.js\";\nimport \"#commands/check-commits.ts\";\nimport \"#commands/pr-release.ts\";\nimport \"#commands/test.js\";\nimport \"#commands/agent.ts\";\nimport \"#commands/docs.ts\";\nimport \"#commands/ado.ts\";\n\nprogram\n .name(\"auro\")\n .version(getPackageVersion())\n .description(\"A cli tool to support the Auro Design System\");\n\nprogram.addHelpText(\"beforeAll\", auroSplash());\n\nprogram.parse();\n", "import figlet from \"figlet\";\nimport { mind } from \"gradient-string\";\n\nexport default () => {\n return mind(figlet.textSync(\"Auro CLI\"));\n};\n", "/* eslint-disable no-underscore-dangle, no-undef */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n/**\n * Simple debug logger that only prints when DEBUG environment variable is set.\n * @param {string} message - The message to log.\n */\nfunction debugLog(message) {\n if (process.env.DEBUG) {\n console.log(`[DEBUG] ${message}`);\n }\n}\n\n/**\n * Retrieves the version from the package.json file.\n * @returns {string} The version from package.json.\n */\nexport default function getPackageVersion() {\n try {\n // Get the directory path of the current module\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n debugLog(`Current module path: ${__dirname}`);\n\n // Standard installed module location - current directory\n const packagePath = path.resolve(__dirname, \"..\", \"package.json\");\n\n debugLog(`Checking package.json at: ${packagePath}`);\n if (fs.existsSync(packagePath)) {\n debugLog(`Found package.json at: ${packagePath}`);\n const packageJson = JSON.parse(fs.readFileSync(packagePath, \"utf8\"));\n return packageJson.version;\n }\n\n // Fallback to a default version if we can't find the package.json\n debugLog(\n \"Could not find package.json in the standard installed module location, using default version\",\n );\n return \"0.0.0\";\n } catch (error) {\n console.error(\"Error retrieving package version:\", error);\n return \"0.0.0\";\n }\n}\n", "import { program } from \"commander\";\nimport ora from \"ora\";\nimport {\n withBuildOptions,\n withServerOptions,\n} from \"#commands/_sharedOptions.js\";\nimport { buildWithRollup } from \"#scripts/build/index.js\";\n\nlet devCommand = program\n .command(\"dev\")\n .description(\"Runs development server for auro components\");\n\ndevCommand = withBuildOptions(devCommand);\ndevCommand = withServerOptions(devCommand);\n\nexport default devCommand.action(async (options) => {\n try {\n const build = ora(\"Initializing...\");\n\n if (options.watch) {\n build.text = \"Waiting for changes...\";\n build.spinner = \"bouncingBar\";\n build.color = \"green\";\n } else {\n build.text =\n options.docs === false\n ? \"Building component (docs disabled)\"\n : \"Building component\";\n }\n\n build.start();\n\n if (!options.watch) {\n build.succeed(\"Build completed!\");\n }\n\n await buildWithRollup({ ...options, dev: true, watch: options.watch });\n } catch (error) {\n // If there's any active spinner, we need to fail it\n ora().fail(`Build failed: ${error.message}`);\n console.error(error);\n process.exit(1);\n }\n});\n", "/**\n * @param {import('commander').Command} command\n * @returns {import('commander').Command}\n */\nexport function withBuildOptions(command) {\n return command\n .option(\"-m, --module-paths [paths...]\", \"Path(s) to node_modules folder\")\n .option(\"-w, --watch\", \"Watches for changes\")\n .option(\"--skip-docs\", \"Skip documentation generation\", false)\n .option(\n \"--wca-input [files...]\",\n \"Source file(s) to analyze for API documentation\",\n )\n .option(\"--wca-output [files...]\", \"Output file(s) for API documentation\");\n}\n\n/**\n * @param {import('commander').Command} command\n */\nexport function withServerOptions(command) {\n return command\n .option(\"-s, --serve\", \"Starts a server\")\n .option(\"-p, --port <number>\", \"Port for the server\")\n .option(\"-o, --open\", \"Open the browser after starting the server\");\n}\n", "import terser from \"@rollup/plugin-terser\";\nimport { watch } from \"rollup\";\nimport {\n buildCombinedBundle,\n cleanupDist,\n generateDocs,\n} from \"./bundleHandlers.js\";\nimport {\n getDemoConfig,\n getMainBundleConfig,\n} from \"./configUtils.js\";\nimport { startDevelopmentServer } from \"./devServerUtils.js\";\nimport {\n handleWatcherEvents,\n setupWatchModeListeners,\n} from \"./watchModeHandlers.js\";\n\n/**\n * Run a production build once\n * @param {object} options - Build options\n * @returns {Promise<void>}\n */\nasync function runProductionBuild(options) {\n const mainBundleConfig = getMainBundleConfig(options);\n const demoConfig = getDemoConfig(options);\n\n // Add terser for minification in production\n if (!options.dev) {\n mainBundleConfig.config.plugins.push(terser());\n }\n\n // Generate docs if enabled\n await generateDocs(options);\n\n // Build main and demo bundles\n await buildCombinedBundle(mainBundleConfig.config, demoConfig.config);\n}\n\n/**\n * Set up watch mode for development\n * @param {object} options - Build options\n * @returns {Promise<object>} - Rollup watcher\n */\nasync function setupWatchMode(options) {\n const { dev: isDevMode } = options;\n const mainBundleConfig = getMainBundleConfig({ ...options, watch: true });\n const demoConfig = getDemoConfig({ ...options, watch: true });\n\n // Create and configure the watcher\n const watcher = watch([mainBundleConfig.config, demoConfig.config]);\n\n // Set up watcher event handlers\n handleWatcherEvents(\n watcher,\n options,\n isDevMode ? async () => startDevelopmentServer(options) : undefined,\n );\n\n // Set up clean shutdown\n setupWatchModeListeners(watcher);\n\n return watcher;\n}\n\n/**\n * Build the component using Rollup with the provided options\n * @param {object} options - Build configuration options\n * @param {boolean} [options.dev=false] - Whether to run in development mode\n * @param {boolean} [options.watch] - Whether to run in watch mode (defaults to value of dev)\n * @param {boolean} [options.docs=true] - Whether to generate documentation\n * @returns {Promise<object|void>} - Rollup watcher if in watch mode\n */\nexport async function buildWithRollup(options = {}) {\n try {\n const { watch } = options;\n\n // Clean output directory\n cleanupDist();\n\n // Run production build once or set up watch mode\n // Only use watch mode if explicitly enabled\n if (watch) {\n return await setupWatchMode(options);\n }\n\n return await runProductionBuild(options);\n } catch (error) {\n throw new Error(`Build failed: ${error.message}`);\n }\n}\n\n// Re-export utilities for backward compatibility\nexport { cleanupDist };\n", "import { rmSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport ora from \"ora\";\nimport { rollup } from \"rollup\";\nimport { analyzeComponents } from \"#scripts/analyze.js\";\nimport { runDefaultDocsBuild } from \"#scripts/build/defaultDocsBuild.js\";\n\n/**\n * Clean up the dist folder\n * @returns {boolean} Success status\n */\nexport function cleanupDist() {\n const distPath = join(\"./dist\");\n const spinner = ora(\"Cleaning dist folder...\").start();\n\n try {\n rmSync(distPath, { recursive: true, force: true });\n spinner.succeed(\"All clean! Dist folder wiped.\");\n return true;\n } catch (error) {\n spinner.fail(`Oops! Couldn't clean dist/ folder: ${error.message}`);\n console.error(error);\n return false;\n }\n}\n\n/**\n * Run a build step with spinner feedback\n * @param {string} taskName - Name of the task for spinner text\n * @param {Function} taskFn - Async function to execute the task\n * @param {string} successMsg - Message to show on success\n * @param {string} failMsg - Message to show on failure\n * @returns {Promise<any>} - Result of the task function or throws error\n */\nasync function runBuildStep(taskName, taskFn, successMsg, failMsg) {\n const spinner = ora(taskName).start();\n\n try {\n const result = await taskFn();\n spinner.succeed(successMsg);\n return result;\n } catch (error) {\n spinner.fail(failMsg);\n console.error(`Error: ${error.message}`);\n throw error;\n }\n}\n\n/**\n * Builds the TypeScript definition files\n * @param {object} config - Rollup config for d.ts generation\n * @param {object} outputConfig - Output configuration for d.ts files\n */\nexport async function buildTypeDefinitions(config, outputConfig) {\n return runBuildStep(\n \"Creating type definitions...\",\n async () => {\n const bundle = await rollup(config);\n await bundle.write(outputConfig);\n await bundle.close();\n },\n \"Types files built.\",\n \"Darn! Type definitions failed.\",\n );\n}\n\n/**\n * Builds both the main bundle and demo files in one operation\n * @param {object} mainConfig - Rollup config for the main bundle\n * @param {object} demoConfig - Rollup config for the demo files\n */\nexport async function buildCombinedBundle(mainConfig, demoConfig) {\n return runBuildStep(\n `Bundling ${mainConfig.name || \"main\"} and ${demoConfig.name || \"demo\"}...`,\n async () => {\n // Build main bundle\n const mainBundle = await rollup(mainConfig);\n await mainBundle.write(mainConfig.output);\n await mainBundle.close();\n\n // Build demo files\n const demoBundle = await rollup(demoConfig);\n await demoBundle.write(demoConfig.output);\n await demoBundle.close();\n },\n `Bundles ready! ${mainConfig.name || \"Main\"} and ${demoConfig.name || \"demo\"} built.`,\n \"Bundle hiccup! Build failed.\",\n );\n}\n\n/**\n * Analyzes web components and generates API documentation.\n * @param {object} options - Options containing wcaInput and wcaOutput\n */\nexport async function generateDocs(options) {\n const { wcaInput: sourceFiles, wcaOutput: outFile, skipDocs } = options;\n\n if (skipDocs) {\n const skipSpinner = ora(\"Skipping docs generation...\").start();\n\n setTimeout(() => {\n skipSpinner.succeed(\"Docs generation skipped.\");\n }, 0);\n return;\n }\n\n return runBuildStep(\n \"Analyzing components and making docs...\",\n async () => {\n await analyzeComponents(sourceFiles, outFile);\n await runDefaultDocsBuild();\n },\n \"Docs ready! Looking good.\",\n \"Doc troubles!\",\n );\n}\n", "import ora from \"ora\";\nimport { shell } from \"#utils/shell.js\";\nimport Docs from \"./docs-generator.ts\";\nimport { configPath } from \"#utils/pathUtils.js\";\nimport { runDefaultDocsBuild } from \"../build/defaultDocsBuild.js\";\nimport { startDevelopmentServer } from \"../build/devServerUtils.js\";\n\nexport async function cem() {\n const cemSpinner = ora(\"Generating Custom Elements Manifest...\").start();\n\n try {\n // The shell function returns a promise that resolves when the command completes\n await shell(\n `npx --package=@custom-elements-manifest/analyzer -y -- cem analyze --config '${configPath(\"custom-elements-manifest.config.mjs\")}'`,\n );\n cemSpinner.succeed(\"Custom Elements Manifest generated successfully!\");\n } catch (error) {\n // Check if the error is just the plugin issue but the manifest was still created\n const errorMessage = error instanceof Error ? error.message : String(error);\n cemSpinner.warn('CEM analyzer completed with warnings: ' + errorMessage);\n }\n}\n\nexport async function api() {\n const docsSpinner = ora(\"Generating API md file...\").start();\n\n try {\n await Docs.generate();\n docsSpinner.succeed(\"API md file generated successfully!\");\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n docsSpinner.fail(\"Failed to generate API md file: \" + errorMessage);\n throw error;\n }\n}\n\nexport async function docs() {\n const docsSpinner = ora(\"Compiling documentation...\").start();\n\n try {\n await runDefaultDocsBuild();\n docsSpinner.succeed(\"Documentation compiled successfully!\");\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n docsSpinner.fail(\"Failed to compile MD documentation: \" + errorMessage);\n throw error;\n }\n}\n\nexport async function serve(options = {}) {\n await startDevelopmentServer(options);\n}\n", "import { spawn } from \"node:child_process\";\nimport ora from \"ora\";\n\nconst shell = (command, _args) => {\n const commandString = `${command} ${_args ? _args.join(\" \") : \"\"}`;\n\n // Initialize the spinner but don't start it - we'll just use it for completion status\n const spinner = ora();\n\n // Parse command string if no args are provided\n let finalCommand = command;\n let finalArgs = _args || [];\n\n if (!_args && typeof command === \"string\") {\n const parts = command.split(\" \");\n finalCommand = parts[0];\n finalArgs = parts.slice(1);\n }\n\n // Simple check for watch mode - if the command contains --watch or -w flags\n const isWatchMode =\n commandString.includes(\"--watch\") || commandString.includes(\" -w\");\n\n // Use different stdio configurations based on watch mode\n const stdio = isWatchMode\n ? \"inherit\" // Full TTY support for watch mode\n : [\"inherit\", \"pipe\", \"pipe\"]; // Capture output but allow input for normal mode\n\n const child = spawn(finalCommand, finalArgs, {\n stdio,\n shell: true,\n });\n\n // Only set up output capture if we're not in watch mode (stdio isn't 'inherit')\n if (!isWatchMode) {\n // Store command output to display after completion\n const commandOutput = [];\n\n child.stdout?.on(\"data\", (data) => {\n // Convert buffer to string\n const output = data.toString();\n\n // Store full output\n commandOutput.push(output);\n\n // Output directly to console\n process.stdout.write(output);\n });\n\n child.stderr?.on(\"data\", (data) => {\n const output = data.toString();\n commandOutput.push(output);\n process.stderr.write(output);\n });\n }\n\n // Set up a promise to track command completion\n return new Promise((resolve, reject) => {\n child.on(\"close\", (code) => {\n if (code !== 0) {\n // In watch mode, don't treat exit codes as errors - these are typically user terminations\n if (isWatchMode) {\n spinner.info(`Watch mode terminated with code ${code}`);\n resolve(); // Resolve without an error for watch mode commands\n } else {\n spinner.fail(`${commandString} failed (code ${code})`);\n reject(new Error(`Command failed with exit code ${code}`));\n }\n } else {\n spinner.succeed(`${commandString} completed successfully`);\n resolve();\n }\n });\n });\n};\n\nexport { shell };\n", "import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { markdownTable } from \"markdown-table\";\nimport type {\n Package,\n Module,\n Declaration,\n CustomElementDeclaration,\n ClassMember,\n Parameter,\n Attribute\n} from 'custom-elements-manifest';\n\ninterface GenerateOptions {\n outDir?: string;\n outFile?: string;\n manifestPath?: string;\n}\n\ninterface MergedTableData {\n name: string;\n properties: string;\n attributes: string;\n modifiers: string;\n type: string;\n default: string;\n description: string;\n}\n\nexport default class Docs {\n private static manifest: Package = { schemaVersion: \"1.0.0\", readme: \"\", modules: [] };\n\n /**\n * Generate markdown documentation for all components\n */\n static generate(options: GenerateOptions = {}): void {\n const {\n outDir = \"./docs\",\n outFile = \"api.md\",\n manifestPath = \"./custom-elements.json\",\n } = options;\n\n const { getElements, renderAllElements } = Docs;\n\n // Use provided manifest or fallback to default\n if (manifestPath) {\n try {\n const manifestContent = fs.readFileSync(manifestPath, \"utf8\");\n Docs.manifest = JSON.parse(manifestContent) as Package;\n } catch (error) {\n console.error(`Error reading manifest file at ${manifestPath}:`, error);\n throw error;\n }\n }\n\n const elements = getElements();\n\n // Create docs directory if it doesn't exist\n const docsDir = outDir;\n if (!fs.existsSync(docsDir)) {\n fs.mkdirSync(docsDir, { recursive: true });\n }\n\n // Generate combined API documentation\n const apiMarkdown = renderAllElements(elements);\n const apiFilename = path.join(docsDir, outFile);\n fs.writeFileSync(apiFilename, apiMarkdown);\n console.log(`Generated combined API documentation at ${apiFilename}`);\n }\n\n /**\n * Extract custom elements from the manifest\n */\n static getElements(): CustomElementDeclaration[] {\n\n // if wca exists, use only wca modules\n const wcaModules = Docs.manifest.modules.filter(Docs.isWcaModule);\n\n return Docs.manifest.modules.reduce(\n (els: CustomElementDeclaration[], module: Module) =>\n els.concat(\n module.declarations?.filter(\n (dec: Declaration): dec is CustomElementDeclaration => \n 'customElement' in dec && dec.customElement === true && 'tagName' in dec && \n (wcaModules.length > 0 ? Docs.isWcaModule(module) : true),\n ) ?? [],\n ),\n [],\n );\n }\n\n /**\n * Check if a module has a path that matches the WCA pattern\n */\n static isWcaModule(module: Module): boolean {\n // Check if the module path matches \"scripts/wca/auro-*.js\"\n const { path } = module;\n\n if (!path) {\n return false;\n }\n \n // Match the pattern: starts with \"scripts/wca/auro-\" and ends with \".js\"\n return path.startsWith('scripts/wca/auro-') && path.endsWith('.js');\n }\n\n /**\n * Render all elements into a single markdown document\n */\n static renderAllElements(elements: CustomElementDeclaration[]): string {\n return `${elements\n .sort((a, b) => (a.tagName || '').localeCompare(b.tagName || ''))\n .map((element: CustomElementDeclaration) => Docs.renderElement(element, true))\n .join(\"\\n\\n\")}`;\n }\n\n /**\n * Render a single element as markdown\n */\n static renderElement(element: CustomElementDeclaration, includeTitle = true): string {\n const sections = [];\n const { renderTable, renderPropertiesAttributesTable, renderParameters, getType } = Docs;\n \n // Title and description\n sections.push(includeTitle ? `# ${element.tagName}` : '');\n\n if (element.description) {\n sections.push(element.description);\n }\n \n // Properties & Attributes table\n const propertiesTable = renderPropertiesAttributesTable(element);\n if (propertiesTable) {\n sections.push(propertiesTable.trim());\n }\n \n // Methods table\n const methodsTable = renderTable(\n \"Methods\",\n [\"name\", \"parameters\", \"return\", \"description\"],\n (element.members || [])\n .filter(\n (m: ClassMember) =>\n m.kind === \"method\" && ('privacy' in m ? m.privacy !== \"private\" : true) && m.name[0] !== \"_\",\n )\n .map((m: ClassMember) => ({\n ...m,\n parameters: renderParameters('parameters' in m ? m.parameters as Parameter[] : undefined),\n returnType: 'return' in m && m.return ? getType(m.return) : \"\",\n })),\n );\n if (methodsTable) {\n sections.push(methodsTable.trim());\n }\n \n // Events table\n const eventsTable = renderTable(\n \"Events\",\n [\"name\", \"description\"],\n element.events as unknown as Record<string, unknown>[],\n );\n if (eventsTable) {\n sections.push(eventsTable.trim());\n }\n \n // Slots table\n const slotsTable = renderTable(\n \"Slots\",\n [[\"name\", \"(default)\"], \"description\"],\n element.slots as unknown as Record<string, unknown>[],\n );\n if (slotsTable) {\n sections.push(slotsTable.trim());\n }\n \n // CSS Shadow Parts table\n const cssPartsTable = renderTable(\n \"CSS Shadow Parts\",\n [\"name\", \"description\"],\n element.cssParts as unknown as Record<string, unknown>[],\n );\n if (cssPartsTable) {\n sections.push(cssPartsTable.trim());\n }\n \n // CSS Custom Properties table\n const cssPropertiesTable = renderTable(\n \"CSS Custom Properties\",\n [\"name\", \"description\"],\n element.cssProperties as unknown as Record<string, unknown>[],\n );\n if (cssPropertiesTable) {\n sections.push(cssPropertiesTable.trim());\n }\n \n return sections.join('\\n\\n');\n }\n\n /**\n * Render combined properties and attributes table\n */\n static renderPropertiesAttributesTable(element: CustomElementDeclaration): string {\n \n const { getType, escapeMarkdown } = Docs;\n \n const properties = element.members?.filter(\n (m: ClassMember) => \n m.kind === \"field\" && \n ('privacy' in m ? m.privacy !== \"private\" : true) && \n m.name[0] !== \"_\"\n ) || [];\n const attributes = element.attributes || [];\n\n // Create a merged dataset\n const mergedData: MergedTableData[] = [];\n const processedNames = new Set<string>();\n\n // Process properties first (only include those with descriptions)\n properties.forEach((prop: ClassMember) => {\n if (prop.description?.trim()) {\n const propType = getType(prop) || \"\";\n const returnType = 'return' in prop && prop.return ? getType(prop.return) : \"\";\n const displayType = returnType || propType;\n \n mergedData.push({\n name: prop.name,\n properties: prop.name,\n attributes: ('attribute' in prop ? prop.attribute as string : '') || \"\",\n modifiers: ('readonly' in prop && prop.readonly ? 'readonly' : ''),\n type: displayType,\n default: ('default' in prop ? prop.default as string : '') || \"\",\n description: prop.description || \"\",\n });\n }\n processedNames.add(prop.name);\n if ('attribute' in prop && prop.attribute) {\n processedNames.add(prop.attribute as string);\n }\n });\n\n // Process attributes that don't have corresponding properties (only include those with descriptions)\n attributes.forEach((attr: Attribute) => {\n if (!processedNames.has(attr.name) && attr.description?.trim()) {\n mergedData.push({\n name: attr.name,\n properties: \"\",\n attributes: attr.name,\n modifiers: \"\",\n type: getType(attr) || \"\",\n default: attr.default || \"\",\n description: attr.description || \"\",\n });\n }\n });\n\n if (mergedData.length === 0) {\n return \"\";\n }\n\n const headers = [\"Properties\", \"Attributes\", \"Modifiers\", \"Type\", \"Default\", \"Description\"];\n const rows = mergedData.map((item: MergedTableData) => {\n const defaultRaw = item.default || \"\";\n const defaultTrimmed = defaultRaw.trim();\n // Remove surrounding single quotes from default values like 'foo'\n const defaultSanitized = defaultTrimmed.replace(/^'([^']+)'$/, \"$1\");\n // Remove surrounding double quotes from default values like \"foo\"\n const defaultDoubleSanitized = defaultSanitized.replace(/^\"([^\"]+)\"$/, \"$1\");\n const defaultWrapped = defaultDoubleSanitized\n ? (defaultDoubleSanitized.startsWith('`') && defaultDoubleSanitized.endsWith('`')\n ? defaultDoubleSanitized\n : `\\`${defaultDoubleSanitized}\\``)\n : \"\";\n return [\n escapeMarkdown(item.properties),\n escapeMarkdown(item.attributes),\n escapeMarkdown(item.modifiers),\n escapeMarkdown(item.type),\n escapeMarkdown(defaultWrapped),\n escapeMarkdown(item.description),\n ];\n });\n\n const table = markdownTable([headers, ...rows]);\n\n return `### Properties & Attributes\n\n${table}\n`;\n }\n\n /**\n * Render method parameters as a formatted string\n */\n static renderParameters(parameters?: Parameter[]): string {\n\n const { escapeMarkdown, getType } = Docs;\n\n if (!parameters || parameters.length === 0) {\n return \"None\";\n }\n\n return parameters\n .map(\n (param: Parameter) => {\n const paramType = getType(param) || \"any\";\n const description = param.description ? ` - ${param.description}` : \"\";\n return `\\`${param.name}\\` (${escapeMarkdown(paramType)})${escapeMarkdown(description)}`;\n }\n )\n .join(\"<br>\");\n }\n\n /**\n * Renders a markdown table of data, plucking the given properties from each item in `data`.\n */\n static renderTable(\n name: string, \n properties: (string | string[])[], \n data?: Array<Record<string, unknown>>\n ): string {\n\n const { escapeMarkdown, get, capitalize } = Docs;\n\n if (data === undefined || data.length === 0) {\n return \"\";\n }\n\n // Filter out items without descriptions\n const filteredData = data.filter((item: Record<string, unknown>) => {\n const { description } = item;\n return typeof description === 'string' && description.trim();\n });\n\n if (filteredData.length === 0) {\n return \"\";\n }\n\n const headers = properties\n .map((p: string | string[]) => capitalize((Array.isArray(p) ? p[0] : p).split(\".\")[0]));\n\n const rows = filteredData\n .map((item: Record<string, unknown>) =>\n properties\n .map((p: string | string[]) => {\n const value = get(item, p);\n // Handle multiline content and escape characters for markdown\n return escapeMarkdown(String(value || \"\"));\n })\n );\n\n const table = markdownTable([headers, ...rows]);\n\n return `### ${name}\n\n${table}\n`;\n }\n\n /**\n * Escape markdown special characters for table content\n */\n static escapeMarkdown(text: string): string {\n return text\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\n/g, \"<br>\")\n .replace(/\\|/g, \"\\\\|\");\n }\n\n /**\n * Extract and format type information from a property or attribute according to custom-elements-manifest schema\n */\n // biome-ignore lint/suspicious/noExplicitAny: utility method needs to work with any object structure\n static getType(obj: any): string {\n if (!obj || !obj.type) {\n return \"\";\n }\n\n const { type } = obj;\n\n // Utility to normalize type text: fix union spacing and replace single quotes with backticks\n const normalizeType = (text: string): string => {\n return text\n // Normalize union separators to have spaces around |\n .replace(/\\s*\\|\\s*/g, ' | ')\n // Replace any single-quoted type segments with backticks\n .replace(/'([^']+)'/g, '`$1`');\n };\n\n // Handle simple string type\n if (typeof type === 'string') {\n return normalizeType(type);\n }\n\n // Handle type with text property\n if (type.text) {\n return normalizeType(type.text);\n }\n\n // Handle union types or arrays of types\n if (Array.isArray(type)) {\n // biome-ignore lint/suspicious/noExplicitAny: handling dynamic type structures from manifest\n return type.map((t: any) => {\n if (typeof t === 'string') return t;\n if (t.text) return t.text;\n if (t.name) return t.name;\n return String(t);\n }).join(' \\\\| ');\n }\n\n // Handle complex type objects\n if (type.name) {\n return normalizeType(type.name);\n }\n\n // Handle references\n if (type.references && Array.isArray(type.references)) {\n // biome-ignore lint/suspicious/noExplicitAny: handling dynamic reference structures from manifest\n return type.references.map((ref: any) => ref.name || String(ref)).join(' \\\\| ');\n }\n\n // Fallback to string representation\n const result = String(type);\n return normalizeType(result);\n }\n\n /**\n * Reads a (possibly deep) path off of an object.\n */\n // biome-ignore lint/suspicious/noExplicitAny: utility method needs to work with any object structure\n static get(obj: any, pathInput: string | string[]): string {\n let fallback = \"\";\n let path: string = pathInput as string;\n if (Array.isArray(pathInput)) {\n [path, fallback] = pathInput;\n }\n const parts = path.split(\".\");\n // biome-ignore lint/suspicious/noExplicitAny: utility method needs to work with any object structure\n let current: any = obj;\n while (current && parts.length) {\n current = current[parts.shift() as string];\n }\n return current == null || current === \"\" ? fallback : String(current);\n }\n\n /**\n * Capitalize the first letter of a string and add spaces before capital letters in camelCase\n */\n static capitalize(s: string): string {\n \n // Add spaces before capital letters and capitalize first letter\n return s\n .replace(/([A-Z])/g, ' $1')\n .replace(/^./, str => str.toUpperCase())\n .trim();\n }\n}\n", "import fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport process from \"node:process\";\n\nexport function getAuroHomeDir() {\n const homeDir = os.homedir() || process.env.HOME || process.env.USERPROFILE;\n\n if (!homeDir) {\n throw new Error(\"Unable to determine user home directory\");\n }\n\n return path.join(homeDir, \".auro\");\n}\n\nexport function withHomeDir(...args) {\n return path.join(getAuroHomeDir(), ...args);\n}\n\nexport function fromCliRoot(...relativePath) {\n const cliScript = fs.realpathSync(process.argv[1]);\n const dirname = path.dirname(cliScript);\n\n return path.resolve(dirname, ...relativePath);\n}\n \nexport const configPath = (file) => fromCliRoot(\"configs\",file)\n\nexport const migrationPath = (path) => fromCliRoot(\"migrations\",path)\n", "import { Logger } from \"@aurodesignsystem/auro-library/scripts/utils/logger.mjs\";\nimport {\n generateReadmeUrl,\n processContentForFile,\n templateFiller,\n} from \"@aurodesignsystem/auro-library/scripts/utils/sharedFileProcessorUtils.mjs\";\n\n/**\n * Processor config object.\n * @typedef {Object} ProcessorConfig\n * @property {boolean} [overwriteLocalCopies=true] - The release version tag to use instead of master.\n * @property {string} [remoteReadmeVersion=\"master\"] - The release version tag to use instead of master.\n * @property {string} [remoteReadmeUrl] - The release version tag to use instead of master.\n * @property {string} [remoteReadmeVariant=\"\"] - The variant string to use for the README source.\n * (like \"_esm\" to make README_esm.md).\n */\n\n/**\n * @param {ProcessorConfig} config - The configuration for this processor.\n */\nexport const defaultDocsProcessorConfig = {\n overwriteLocalCopies: true,\n remoteReadmeVersion: \"master\",\n // eslint-disable-next-line no-warning-comments\n // TODO: remove this variant when all components are updated to use latest auro-library\n // AND the default README.md is updated to use the new paths\n remoteReadmeVariant: \"_updated_paths\",\n};\n\nfunction pathFromCwd(pathLike) {\n const cwd = process.cwd();\n return `${cwd}/${pathLike}`;\n}\n\n/**\n * @param {ProcessorConfig} config - The configuration for this processor.\n * @returns {import('../utils/sharedFileProcessorUtils').FileProcessorConfig[]}\n */\nexport const fileConfigs = (config) => [\n // README.md\n {\n identifier: \"README.md\",\n input: {\n remoteUrl:\n config.remoteReadmeUrl ||\n generateReadmeUrl(\n config.remoteReadmeVersion,\n config.remoteReadmeVariant,\n ),\n fileName: pathFromCwd(\"/docTemplates/README.md\"),\n overwrite: config.overwriteLocalCopies,\n },\n output: pathFromCwd(\"/README.md\"),\n },\n // index.md\n {\n identifier: \"index.md\",\n input: pathFromCwd(\"/docs/partials/index.md\"),\n output: pathFromCwd(\"/demo/index.md\"),\n mdMagicConfig: {\n output: {\n directory: pathFromCwd(\"/demo\"),\n },\n },\n },\n // api.md\n {\n identifier: \"api.md\",\n input: pathFromCwd(\"/docs/partials/api.md\"),\n output: pathFromCwd(\"/demo/api.md\"),\n preProcessors: [templateFiller.formatApiTable],\n },\n];\n\n/**\n *\n * @param {ProcessorConfig} config - The configuration for this processor.\n * @return {Promise<void>}\n */\nexport async function processDocFiles(config = defaultDocsProcessorConfig) {\n // setup\n await templateFiller.extractNames();\n\n for (const fileConfig of fileConfigs(config)) {\n try {\n // eslint-disable-next-line no-await-in-loop\n await processContentForFile(fileConfig);\n } catch (err) {\n Logger.error(`Error processing ${fileConfig.identifier}: ${err.message}`);\n }\n }\n}\n\nexport async function runDefaultDocsBuild() {\n await processDocFiles({\n ...defaultDocsProcessorConfig,\n remoteReadmeUrl:\n \"https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/README.md\",\n });\n}\n", "import { startDevServer } from \"@web/dev-server\";\nimport { hmrPlugin } from \"@web/dev-server-hmr\";\nimport ora from \"ora\";\n/**\n * Default server configuration\n */\nconst DEFAULT_CONFIG = {\n watch: true,\n nodeResolve: true,\n basePath: \"/\",\n rootDir: \"./demo\",\n hmrInclude: [\"src/**/*\", \"demo/**/*\", \"apiExamples/**/*\", \"docs/**/*\"],\n};\n\n/**\n * Starts the development server\n * @param {object} options - Server options\n * @param {boolean} [options.serve] - Whether to start the server\n * @param {number} [options.port] - Port number for the server\n * @param {boolean} [options.open] - Whether to open the browser\n * @param {string} [options.rootDir] - Root directory for serving files\n * @param {string[]} [options.hmrInclude] - Patterns to include for HMR\n * @returns {Promise<object>} - The server instance\n */\nexport async function startDevelopmentServer(options = {}) {\n if (!options.serve) return;\n\n const serverSpinner = ora(\"Firing up dev server...\\n\").start();\n\n try {\n // Merge options with defaults\n const serverConfig = {\n port: Number(options.port) || undefined,\n open: options.open ? \"/\" : undefined,\n watch: options.watch ?? DEFAULT_CONFIG.watch,\n nodeResolve: options.nodeResolve ?? DEFAULT_CONFIG.nodeResolve,\n basePath: options.basePath ?? DEFAULT_CONFIG.basePath,\n rootDir: options.rootDir ?? DEFAULT_CONFIG.rootDir,\n\n // HTML file extension middleware\n middleware: [\n function rewriteIndex(context, next) {\n if (!context.url.endsWith(\"/\") && !context.url.includes(\".\")) {\n context.url += \".html\";\n }\n return next();\n },\n ],\n\n // Hot Module Replacement plugin\n plugins: [\n hmrPlugin({\n include: options.hmrInclude ?? DEFAULT_CONFIG.hmrInclude,\n }),\n ],\n };\n\n // Start the server with our configuration\n const server = await startDevServer({\n config: serverConfig,\n readCliArgs: false,\n readFileConfig: false,\n });\n\n serverSpinner.stop();\n return server;\n } catch (error) {\n serverSpinner.fail(\"Server snag! Couldn't start dev server.\");\n console.error(\"Error starting development server:\", error);\n throw new Error(`Development server failed to start: ${error.message}`);\n }\n}\n", "\nimport { cem, api } from '#scripts/docs/index.ts';\n\n/**\n * Analyzes web components and generates API documentation.\n */\nexport async function analyzeComponents() {\n \n await cem();\n\n await api();\n\n}", "import { basename, join } from \"node:path\";\nimport { nodeResolve } from \"@rollup/plugin-node-resolve\";\nimport { glob } from \"glob\";\nimport { litScss } from \"rollup-plugin-scss-lit\";\nimport { watchGlobs } from \"./plugins.js\";\n\n// Default paths used across configurations\nconst DEFAULTS = {\n moduleDirectories: [\"node_modules\"],\n modulePaths: [\"../../node_modules\", \"../node_modules\", \"node_modules\"],\n watchPatterns: [\"./apiExamples/**/*\", \"./docs/**/*\"],\n};\n\n/**\n * Creates Rollup plugins configuration.\n * @param {string[]} modulePaths - Additional paths to include in litScss.\n * @param {object} options - Additional options for plugins\n * @returns {object[]} - Array of Rollup plugins.\n */\nexport function getPluginsConfig(modulePaths = [], options = {}) {\n const {\n watchPatterns = DEFAULTS.watchPatterns,\n dedupe = [\"lit\", \"lit-element\", \"lit-html\"],\n dev = false,\n } = options;\n\n // Combine default paths with any user-provided paths\n const allModulePaths = [...DEFAULTS.modulePaths, ...modulePaths];\n\n return [\n nodeResolve({\n dedupe,\n preferBuiltins: false,\n moduleDirectories: DEFAULTS.moduleDirectories,\n }),\n litScss({\n // Disable CSS minification in dev for readability and faster rebuilds\n minify: dev ? false : { fast: true },\n options: {\n loadPaths: [...allModulePaths, join(process.cwd(), \"src\", \"styles\"), join(process.cwd(), \"src\")],\n },\n }),\n watchGlobs(watchPatterns),\n ];\n}\n\n/**\n * Creates Rollup configuration for the main bundle with output options.\n * @param {object} options - Build options.\n * @returns {object} - Complete Rollup configuration object with input and output.\n */\nexport function getMainBundleConfig(options = {}) {\n const {\n modulePaths = [],\n watch = false,\n input = [\"./src/index.js\", \"./src/registered.js\"],\n outputDir = \"./dist\",\n format = \"esm\",\n // When dev is true, avoid randomized filenames for easier debugging\n dev = false,\n } = options;\n\n return {\n name: \"Main\",\n config: {\n input,\n output: {\n format,\n dir: outputDir,\n // Stable names in dev; in production keep stable names for index/registered\n entryFileNames: (chunk) =>\n dev\n ? \"[name].js\"\n : [\"index\", \"registered\"].includes(chunk.name)\n ? \"[name].js\"\n : \"[name]-[hash].js\",\n chunkFileNames: dev ? \"[name].js\" : \"[name]-[hash].js\",\n assetFileNames: dev ? \"[name][extname]\" : \"[name]-[hash][extname]\",\n },\n external: getExternalConfig(),\n plugins: getPluginsConfig(modulePaths, { dev }),\n watch: getWatcherConfig(watch),\n },\n };\n}\n\n/**\n * Creates Rollup configuration for demo files.\n * @param {object} options - Build options.\n * @returns {object} - Rollup configuration object.\n */\nexport function getDemoConfig(options = {}) {\n const {\n modulePaths = [],\n watch = false,\n globPattern = \"./demo/*.js\",\n ignorePattern = [\"./demo/*.min.js\"],\n outputDir = \"./demo\",\n dev = false,\n } = options;\n\n return {\n name: \"Demo\",\n config: {\n input: Object.fromEntries(\n glob.sync(globPattern, { ignore: ignorePattern }).map((file) => {\n const name = basename(file, \".js\");\n return [name, file];\n }),\n ),\n output: {\n format: \"esm\",\n dir: outputDir,\n entryFileNames: \"[name].min.js\",\n chunkFileNames: \"[name].min.js\",\n assetFileNames: dev ? \"[name][extname]\" : \"[name]-[hash][extname]\",\n },\n plugins: getPluginsConfig(modulePaths, { dev }),\n watch: getWatcherConfig(watch),\n },\n };\n}\n\n/**\n * Creates Rollup configuration for watch mode.\n * @param {boolean|object} watchOptions - Whether to enable watch mode or watch options\n * @returns {object|false} - Watch configuration for Rollup or false if disabled\n */\nexport function getWatcherConfig(watchOptions) {\n // Return false if watch mode is disabled\n if (!watchOptions) {\n return false;\n }\n\n // Allow passing a configuration object or use defaults\n const options = typeof watchOptions === \"object\" ? watchOptions : {};\n\n return {\n clearScreen: options.clearScreen ?? true,\n buildDelay: options.buildDelay ?? 500,\n chokidar: {\n ignoreInitial: true,\n // Ignore common output files that cause feedback loops\n ignored: options.ignored ?? [\n \"**/dist/**/*.d.ts\",\n \"**/custom-elements.json\",\n \"**/demo/*.md\",\n \"**/demo/**/*.min.js\",\n \"**/docs/api.md\",\n \"**/node_modules/**\",\n \"**/.git/**\",\n ],\n // Reduce watcher's sensitivity to prevent loops\n awaitWriteFinish: options.awaitWriteFinish ?? {\n stabilityThreshold: 1000,\n pollInterval: 100,\n },\n },\n include: options.include ?? [\n \"./src/**/*.scss\",\n \"./src/**/*.js\",\n \"./src/**/*.ts\",\n \"./demo/**/*.js\",\n \"./apiExamples/**/*\",\n \"./docs/**/*.md\",\n ],\n exclude: options.exclude ?? [\"./dist/**/*\", \"./node_modules/**/*\"],\n };\n}\n\n/**\n * Creates external configuration for Rollup.\n * @param {string[]} additional - Additional external patterns\n * @returns {(string|RegExp)[]} - Array of external dependencies.\n */\nexport function getExternalConfig(additional = []) {\n const defaults = [\n // externalize all lit dependencies\n /node_modules\\/lit/,\n /node_modules\\/lit-element/,\n /node_modules\\/lit-html/,\n /node_modules\\/@lit/,\n ];\n\n return [...defaults, ...additional];\n}\n", "import path from \"node:path\";\nimport { glob } from \"glob\";\n\n/**\n * Creates a plugin that watches file globs and adds them to Rollup's watch list.\n * @param {string|string[]} globs - Glob pattern(s) to watch\n * @returns {object} - Rollup plugin\n */\nexport function watchGlobs(globs) {\n return {\n name: \"watch-globs\",\n buildStart() {\n const items = Array.isArray(globs) ? globs : [globs];\n\n for (const item of items) {\n try {\n for (const filename of glob.sync(path.resolve(item))) {\n this.addWatchFile(filename);\n }\n } catch (error) {\n this.error(`Error watching glob pattern \"${item}\": ${error.message}`);\n }\n }\n },\n };\n}\n", "import path from \"node:path\";\nimport ora from \"ora\";\nimport { rollup } from \"rollup\";\nimport { analyzeComponents } from \"#scripts/analyze.js\";\nimport { generateDocs } from \"./bundleHandlers.js\";\n\n// Track if any build is in progress to prevent overlapping operations\nlet buildInProgress = false;\n\n// Track build states and times in a single object for cleaner management\nconst builds = {\n analyze: { active: false, lastTime: 0 },\n docs: { active: false, lastTime: 0 },\n};\n\n// Minimum time between builds of the same type (in ms)\nconst MIN_BUILD_INTERVAL = 5000;\n\n// Track source paths of files that triggered a watch event\nconst sourceEventPaths = new Set();\n\n// Known output files that should never trigger a rebuild\nconst OUTPUT_PATHS = [\n \"/dist/index.d.ts\",\n \"/custom-elements.json\",\n \"/demo/api.md\",\n \"/docs/api.md\",\n \"/demo/index.min.js\",\n];\n\n// Path matching checks - handle any non-string input safely\nfunction isOutputFile(filePath) {\n if (!filePath || typeof filePath !== \"string\") return false;\n\n try {\n const normalizedPath = path.normalize(filePath);\n\n // Check if it's in our known output paths\n return (\n OUTPUT_PATHS.some((outputPath) => normalizedPath.endsWith(outputPath)) ||\n normalizedPath.includes(\"/dist/\") ||\n normalizedPath.endsWith(\".min.js\") ||\n normalizedPath.endsWith(\".d.ts\")\n );\n } catch (error) {\n console.error(`Error checking path (${typeof filePath}):`, error.message);\n return false; // If any error occurs, assume it's not an output file\n }\n}\n\n/**\n * Runs a build task with proper tracking of state\n * @param {string} taskName - Type of task (analyze, docs)\n * @param {Function} taskFn - The actual task function to run\n * @returns {Promise<boolean>} - Success status\n */\nasync function runBuildTask(taskName, taskFn) {\n const task = builds[taskName];\n\n // Skip if build is active or within throttle time\n if (task.active || Date.now() - task.lastTime < MIN_BUILD_INTERVAL) {\n return false;\n }\n\n try {\n task.active = true;\n task.lastTime = Date.now();\n return await taskFn();\n } catch (error) {\n console.error(`Error in ${taskName} task:`, error);\n return false;\n } finally {\n task.active = false;\n }\n}\n\n/**\n * Handles the watcher events.\n * @param {object} watcher - Rollup watcher object.\n * @param {object} options - Build options.\n * @param {Function} [onInitialBuildComplete] - Callback to run after initial build completes.\n */\nexport async function handleWatcherEvents(\n watcher,\n options,\n onInitialBuildComplete,\n) {\n // Track if this is the first build\n let isInitialBuild = true;\n // biome-ignore lint/style/useConst: This is an object that is mutated.\n let buildTasksResults = {analyze: false, docs: false };\n let scheduledTasksTimer = null;\n let bundleSpinner;\n\n // Create a spinner for watch mode\n const watchSpinner = ora(\"Activating watch mode...\").start();\n\n // The actual task functions\n const buildTasks = {\n // Function to analyze components\n analyze: async () => {\n const { wcaInput: sourceFiles, wcaOutput: outFile, skipDocs } = options;\n if (skipDocs) {\n const skipSpinner = ora(\"Skipping component analysis...\").start();\n setTimeout(() => {\n skipSpinner.succeed(\"Component analysis skipped.\");\n }, 0);\n return true;\n }\n\n const analyzeSpinner = ora(\n \"Detective work: analyzing components...\",\n ).start();\n try {\n await analyzeComponents(sourceFiles, outFile);\n analyzeSpinner.succeed(\"Component analysis complete! API generated.\");\n return true;\n } catch (error) {\n analyzeSpinner.fail(\"Analysis hiccup! Something went wrong.\");\n console.error(\"Component analysis error:\", error);\n return false;\n }\n },\n\n // Function to rebuild documentation\n docs: async () => {\n // Skip if main bundle is still building\n if (buildInProgress) {\n return false;\n }\n\n // Check if docs generation is skipped\n if (options.skipDocs) {\n const skipSpinner = ora(\"Skipping docs generation...\").start();\n setTimeout(() => {\n skipSpinner.succeed(\"Docs generation skipped.\");\n }, 0);\n return true;\n }\n\n const docsSpinner = ora(\"Refreshing docs...\").start();\n try {\n await generateDocs(options);\n docsSpinner.succeed(\"Documentation refreshed!\");\n return true;\n } catch (error) {\n docsSpinner.fail(\"Docs stumble! Couldn't refresh.\");\n console.error(\"Documentation rebuild error:\", error);\n }\n },\n };\n\n // Check if all initial build tasks completed successfully\n const checkInitialBuildComplete = () => {\n if (\n isInitialBuild &&\n buildTasksResults.analyze &&\n buildTasksResults.docs &&\n typeof onInitialBuildComplete === \"function\"\n ) {\n isInitialBuild = false;\n onInitialBuildComplete();\n }\n };\n\n // Schedule the post-bundle tasks with proper sequencing\n function schedulePostBundleTasks(delay = 1000) {\n if (scheduledTasksTimer) {\n clearTimeout(scheduledTasksTimer);\n }\n\n scheduledTasksTimer = setTimeout(async () => {\n // Run tasks with delays between them to avoid race conditions\n\n setTimeout(async () => {\n buildTasksResults.analyze = await runBuildTask(\n \"analyze\",\n buildTasks.analyze,\n );\n\n setTimeout(async () => {\n buildTasksResults.docs = await runBuildTask(\"docs\", buildTasks.docs);\n checkInitialBuildComplete();\n }, 1000);\n }, 1000);\n }, delay);\n }\n\n // Set up event handlers for the watcher\n watcher.on(\"event\", async (event) => {\n switch (event.code) {\n case \"START\":\n watchSpinner.succeed(\"Watch mode active! Eyes peeled.\");\n break;\n\n case \"BUNDLE_START\":\n // Clear source paths from the previous bundle operation\n sourceEventPaths.clear();\n\n // Store source file paths that triggered this build\n if (event.input) {\n try {\n // Handle different input formats safely\n const inputs = Array.isArray(event.input)\n ? event.input\n : typeof event.input === \"string\"\n ? [event.input]\n : typeof event.input === \"object\" && event.input !== null\n ? Object.values(event.input)\n : [];\n\n for (const input of inputs) {\n // Only process string inputs and skip non-string values\n if (typeof input === \"string\" && !isOutputFile(input)) {\n sourceEventPaths.add(path.normalize(input));\n }\n }\n } catch (error) {\n console.error(\"Error processing input paths:\", error);\n }\n }\n\n bundleSpinner = ora(\"Weaving bundles...\").start();\n buildInProgress = true;\n break;\n\n case \"BUNDLE_END\":\n if (bundleSpinner) {\n bundleSpinner.succeed(\n `Bundle ${Array.isArray(event.input) ? `of ${event.input.join(\"& \")} ` : \"\"}done in ${event.duration}ms! \uD83D\uDE80`,\n );\n }\n buildInProgress = false;\n\n // Schedule post-bundle tasks if source files triggered this build\n if (sourceEventPaths.size > 0) {\n schedulePostBundleTasks();\n }\n break;\n\n case \"END\":\n // We've already scheduled tasks in BUNDLE_END, nothing to do here\n break;\n\n case \"ERROR\":\n buildInProgress = false;\n if (bundleSpinner) {\n bundleSpinner.fail(`Oops! Bundle hit a snag: ${event.error.message}`);\n } else {\n ora().fail(`Watch mode hiccup: ${event.error.message}`);\n }\n sourceEventPaths.clear();\n break;\n }\n });\n}\n\n/**\n * Setup watch mode for rollup\n * @param {object} watcher - Rollup watcher instance\n */\nexport function setupWatchModeListeners(watcher) {\n process.on(\"SIGINT\", () => {\n const closeSpinner = ora(\"Wrapping up...\").start();\n watcher.close();\n closeSpinner.succeed(\"All done! See you next time. \u2728\");\n process.exit(0);\n });\n\n return watcher;\n}\n", "import { program } from \"commander\";\nimport ora from \"ora\";\nimport { withBuildOptions } from \"#commands/_sharedOptions.js\";\nimport { buildWithRollup } from \"#scripts/build/index.js\";\n\nlet buildCommand = program\n .command(\"build\")\n .description(\"Builds auro components\");\n\nbuildCommand = withBuildOptions(buildCommand);\n\nexport default buildCommand.action(async (options) => {\n try {\n const build = ora(\"Initializing...\");\n\n if (options.watch) {\n build.text = \"Waiting for changes...\";\n build.spinner = \"bouncingBar\";\n build.color = \"green\";\n } else {\n build.text =\n options.docs === false\n ? \"Building component (docs disabled)\"\n : \"Building component\";\n }\n\n build.start();\n\n await buildWithRollup(options);\n\n if (!options.watch) {\n build.succeed(\"Build completed!\");\n }\n } catch (error) {\n // If there's any active spinner, we need to fail it\n ora().fail(`Build failed: ${error.message}`);\n console.error(error);\n process.exit(1);\n }\n});\n", "import { exec } from \"node:child_process\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport { fileURLToPath } from \"node:url\";\nimport util from \"node:util\";\nimport { program } from \"commander\";\nimport inquirer from \"inquirer\";\nimport { shell } from \"#utils/shell.js\";\n\nexport default program\n .command(\"migrate\")\n .description(\"Script runner to perform repetitive code change tasks\")\n .requiredOption(\n \"-i, --id <string>\",\n \"Select the migration you would like to run by id\",\n )\n .option(\n \"-m, --multi-gitter\",\n \"Run the migration on all repositories in the multi-gitter config\",\n )\n .action(async (options) => {\n const filename = fileURLToPath(import.meta.url);\n const dirname = path.dirname(filename);\n const scriptPath = path.resolve(dirname, \"migrations\", options.id);\n\n if (options.multiGitter) {\n // Check if multi-gitter CLI command is available\n const execPromise = util.promisify(exec);\n\n try {\n await execPromise(\"command -v multi-gitter\");\n } catch {\n console.error(\"multi-gitter is not installed.\");\n process.exit(1);\n }\n\n const answers = await inquirer.prompt([\n {\n type: \"confirm\",\n name: \"dryRun\",\n message:\n \"Run migration in dry-run mode? (no changes will be committed)\",\n default: true,\n },\n ]);\n\n if (answers.dryRun) {\n shell(\n `multi-gitter run ${scriptPath}/script.sh --config \"${scriptPath}/multi-gitter.yml\" --dry-run`,\n );\n } else {\n shell(\n `multi-gitter run ${scriptPath}/script.sh --config \"${scriptPath}/multi-gitter.yml\"`,\n );\n }\n } else {\n shell(`${scriptPath}/script.sh`);\n }\n });\n", "import process from \"node:process\";\nimport { program } from \"commander\";\n\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { Logger } from \"@aurodesignsystem/auro-library/scripts/utils/logger.mjs\";\nimport { syncDotGithubDir } from \"#scripts/syncDotGithubDir.js\";\n\nexport default program\n .command(\"sync\")\n .option(\"-r, --ref <branch/tag/commit>\", \"Git reference (branch/tag/commit) to use\", \"main\")\n .description(\n \"Script runner to synchronize local repository configuration files\",\n )\n .action(async (options) => {\n Logger.info(\"Synchronizing repository configuration files...\");\n\n Logger.warn(\n \"Note: sync does not create a new git branch. Changes are added to the current branch.\",\n );\n\n const cwd = process.cwd();\n\n await syncDotGithubDir(cwd, options.ref);\n\n // Cleanup for specific files\n // ------------------------------------------------------\n\n // Some files have specific cleanup tasks that need to be run after syncing\n\n // CODEOWNERS - has a bizarre issue with line endings. This is a workaround!\n // Maybe it has to do with the file type since there's no ending?\n const codeownersPath = `${cwd}/.github/CODEOWNERS`;\n const codeowners = await readFile(codeownersPath, { encoding: \"utf-8\" });\n\n // Convert line endings to \\n\n const codeownersFixed = codeowners\n .replace(/\\r\\n/gu, \"\\n\")\n .replace(/\\n\\n/gu, \"\\n\");\n await writeFile(codeownersPath, codeownersFixed, { encoding: \"utf-8\" });\n\n if (codeownersFixed.includes(\"\\r\") || codeownersFixed.includes(\"\\n\\n\")) {\n Logger.error(\"CODEOWNERS file still has Windows line endings.\");\n }\n });\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { Octokit } from \"@octokit/rest\";\nimport ora from \"ora\";\n// @ts-expect-error: No types available currently\nimport { processContentForFile, templateFiller } from \"@aurodesignsystem/auro-library/scripts/utils/sharedFileProcessorUtils.mjs\";\n\n// BELOW TYPES ARE COPIED DIRECTLY FROM THE LIBRARY\n// How can we import JSDoc types from the library?\n\n/**\n * This is the expected object type when passing something other than a string.\n * @typedef {Object} InputFileType\n * @property {string} remoteUrl - The remote template to fetch.\n * @property {string} fileName - Path including file name to store.\n * @property {boolean} [overwrite] - Default is true. Choose to overwrite the file if it exists.\n */\n\ninterface FileProcessorConfig {\n identifier: string;\n input: string | {\n remoteUrl: string;\n fileName: string;\n overwrite?: boolean;\n };\n output: string;\n mdMagicConfig?: Partial<any>;\n preProcessors?: Array<(contents: string) => string>;\n postProcessors?: Array<(contents: string) => string>;\n}\n\n\n/**\n * Get folder items from a repository-relative path.\n * @param path - Repository-relative path (e.g. \".github/workflows\")\n * @returns Promise resolving to an array of GitHub content items.\n */\nasync function getFolderItemsFromRelativeRepoPath(path: string, ref: string) {\n const octokit = new Octokit({\n auth: process.env.GITHUB_TOKEN || '',\n });\n\n const response = await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {\n ref,\n owner: 'AlaskaAirlines',\n repo: 'auro-templates',\n path: path,\n headers: {\n 'X-GitHub-Api-Version': '2022-11-28'\n }\n });\n\n const responseData = response.data;\n if (typeof responseData !== 'object' || !Array.isArray(responseData)) {\n const errorMessage = `Unexpected response format: ${JSON.stringify(responseData)}`;\n const errorSpinner = ora().start();\n errorSpinner.fail(errorMessage);\n throw new Error(\"Failed to retrieve folder items\");\n }\n\n return responseData;\n}\n\ninterface ProcessIntoFileConfigArgs {\n folderItems: Awaited<ReturnType<typeof getFolderItemsFromRelativeRepoPath>>;\n templatePathToReplace: string;\n rootDir: string;\n ref: string;\n}\n\n/**\n * Recursively convert GitHub contents API items into FileProcessorConfig objects.\n */\nasync function processFolderItemsIntoFileConfigs({\n folderItems,\n templatePathToReplace,\n rootDir,\n ref,\n}: ProcessIntoFileConfigArgs): Promise<Array<FileProcessorConfig>> {\n const fileConfigs: Array<FileProcessorConfig> = [];\n\n for (const item of folderItems) {\n if (item.type == 'dir') {\n const directorySpinner = ora(`Processing directory: ${item.path}`).start();\n\n const nestedFolderItems = await getFolderItemsFromRelativeRepoPath(item.path, ref);\n \n directorySpinner.succeed(`Found ${nestedFolderItems.length} additional items in ${item.path}`);\n\n const nestedConfigs = await processFolderItemsIntoFileConfigs({\n folderItems: nestedFolderItems,\n templatePathToReplace,\n rootDir,\n ref,\n })\n\n fileConfigs.push(...nestedConfigs);\n\n continue;\n }\n\n const finalPath = item.path.replace(`${templatePathToReplace}/`, '');\n const outputPath = `${rootDir}/.github/${finalPath}`;\n\n const config = {\n identifier: item.name,\n input: {\n remoteUrl: item.download_url || '',\n fileName: outputPath,\n overwrite: true,\n },\n output: outputPath,\n } satisfies FileProcessorConfig;\n\n fileConfigs.push(config);\n }\n\n return fileConfigs;\n}\n\n\n/**\n * Recursively removes a directory and all its contents.\n * @param {string} dirPath - The path to the directory to remove.\n * @returns {Promise<void>} A promise that resolves when the directory is removed or rejects if an error occurs.\n * @throws {Error} If the directory cannot be removed.\n */\nasync function removeDirectory(dirPath: string) {\n try {\n await fs.rm(dirPath, { recursive: true, force: true });\n const successSpinner = ora().start();\n successSpinner.succeed(`Successfully removed directory: ${dirPath}`);\n } catch (error: any) {\n const errorSpinner = ora().start();\n errorSpinner.fail(`Error removing directory ${dirPath}: ${error.message}`);\n throw error;\n }\n}\n\n/**\n * Generates a tree-like structure representation of a directory.\n * @param {string} dirPath - The path to the directory to analyze.\n * @param {string} [prefix=''] - The prefix for the current level (used for recursion).\n * @param {boolean} [isLast=true] - Whether this is the last item at the current level.\n * @returns {Promise<string>} A promise that resolves to the tree structure as a string.\n */\nasync function generateDirectoryTree(dirPath: string, prefix: string = '', isLast: boolean = true): Promise<string> {\n try {\n const stats = await fs.stat(dirPath);\n const baseName = path.basename(dirPath);\n \n if (!stats.isDirectory()) {\n return `${prefix}${isLast ? '\u2514\u2500\u2500 ' : '\u251C\u2500\u2500 '}${baseName}\\n`;\n }\n\n let result = `${prefix}${isLast ? '\u2514\u2500\u2500 ' : '\u251C\u2500\u2500 '}${baseName}/\\n`;\n \n try {\n const entries = await fs.readdir(dirPath);\n const sortedEntries = entries.sort();\n \n for (let i = 0; i < sortedEntries.length; i++) {\n const entry = sortedEntries[i];\n const entryPath = path.join(dirPath, entry);\n const isLastEntry = i === sortedEntries.length - 1;\n const newPrefix = prefix + (isLast ? ' ' : '\u2502 ');\n \n result += await generateDirectoryTree(entryPath, newPrefix, isLastEntry);\n }\n } catch (readError) {\n // If we can't read the directory, just show it as a directory\n result += `${prefix}${isLast ? ' ' : '\u2502 '}\u2514\u2500\u2500 [Permission denied or error reading directory]\\n`;\n }\n \n return result;\n } catch (error) {\n return `${prefix}${isLast ? '\u2514\u2500\u2500 ' : '\u251C\u2500\u2500 '}[Error: ${error}]\\n`;\n }\n}\n\n/**\n * Sync the .github directory with the remote repository.\n * @param {string} rootDir - The root directory of the local repository.\n * @returns {Promise<void>} A promise that resolves when syncing is complete.\n */\nexport async function syncDotGithubDir(rootDir: string, ref = 'main') {\n if (!rootDir) {\n const errorSpinner = ora().start();\n errorSpinner.fail(\"Root directory must be specified\");\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n\n // Remove .github directory if it exists\n const githubPath = \".github\";\n\n const removeSpinner = ora(\"Removing existing .github directory...\").start();\n try {\n await removeDirectory(githubPath);\n removeSpinner.succeed(\".github directory removed successfully\");\n } catch (error: any) {\n removeSpinner.fail(`Error removing .github directory: ${error.message}`);\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n\n // Setup\n await templateFiller.extractNames();\n\n if (!process.env.GITHUB_TOKEN) {\n const tokenErrorSpinner = ora().start();\n tokenErrorSpinner.fail(\"GITHUB_TOKEN environment variable is not set.\");\n process.exit(1);\n }\n\n const templatesDefaultGithubPath = 'templates/default/.github';\n const folderItems = await getFolderItemsFromRelativeRepoPath(templatesDefaultGithubPath, ref);\n const fileConfigs = await processFolderItemsIntoFileConfigs({\n folderItems,\n templatePathToReplace: templatesDefaultGithubPath,\n rootDir,\n ref,\n });\n\n // Process all files\n const processSpinner = ora(\"Processing all files...\").start();\n try {\n await Promise.all(\n fileConfigs.map((config) => processContentForFile(config)),\n );\n processSpinner.succeed(\"All files processed.\");\n\n // Generate and display tree output of the rootDir directory\n const treeSpinner = ora(\"Generating directory tree...\").start();\n try {\n const githubDirPath = path.join(rootDir, '.github');\n const treeOutput = await generateDirectoryTree(githubDirPath);\n treeSpinner.succeed(\"Synced .github directory structure:\");\n console.log(treeOutput);\n } catch (treeError: any) {\n treeSpinner.fail(`Error generating directory tree: ${treeError.message}`);\n // Don't exit here since the main operation succeeded\n }\n\n } catch (error: any) {\n processSpinner.fail(`Error processing files: ${error.message}`);\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n}\n", "/* eslint-disable no-await-in-loop, line-comment-position, no-inline-comments, jsdoc/require-jsdoc, no-undef */\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Logger } from \"@aurodesignsystem/auro-library/scripts/utils/logger.mjs\";\nimport { program } from \"commander\";\nimport { glob } from \"glob\";\nimport getTemplatedComponentCode from \"#scripts/prepWcaCompatibleCode.mjs\";\n\n// Use glob directly as it's already promised-based in newer versions\n\nconst WAC_DIR = path.resolve(process.cwd(), \"./scripts/wca\");\n\nasync function globPath(sources) {\n try {\n const fileArrays = await Promise.all(sources.map((source) => glob(source)));\n return fileArrays.flat();\n } catch (err) {\n console.error(\"Error processing glob patterns:\", err);\n throw err; // Re-throw to handle failure at caller\n }\n}\n\nasync function createExtendsFile(filePaths) {\n if (!fs.existsSync(WAC_DIR)) {\n await fs.promises.mkdir(WAC_DIR, { recursive: true });\n }\n\n for (const filePath of filePaths) {\n const resolvedPath = path.resolve(process.cwd(), filePath);\n const fileContent = await fs.promises.readFile(resolvedPath, \"utf-8\");\n const newPath = path.resolve(WAC_DIR, `${path.basename(filePath)}`);\n const newCode = getTemplatedComponentCode(\n fileContent,\n path.relative(WAC_DIR, filePath),\n );\n await fs.promises.writeFile(newPath, newCode);\n }\n}\n\nasync function main() {\n // files to analyze\n const filePaths = await globPath([\"./src/auro-*.js\"]);\n await createExtendsFile(filePaths);\n}\n\nexport default program\n .command(\"wca-setup\")\n .description(\"Set up WCA (Web Component Analyzer) for the project\")\n .action(() => {\n main()\n .then(() => {\n Logger.success(\"WCA setup completed successfully.\");\n })\n .catch((error) => {\n Logger.error(`WCA setup failed: ${error.message}`);\n });\n });\n", "/* eslint-disable require-unicode-regexp, prefer-named-capture-group, prefer-destructuring, prettier/prettier */\n\nexport default (code, sourcePath) => {\n const defaultTag = (code.match(/static register\\(name \\= (.+)\\)/) ||\n code.match(/customElements.get\\((.+?)\\)/))[1];\n const className = code.match(/export class (.+) extends/)?.[1];\n const classDesc = code.match(/\\/\\*\\*((.|\\n)*?)(\\*\\n|\\*\\/|[@])/)?.[1] || \"\";\n\n if (!defaultTag || !className) {\n return code;\n }\n return `\nimport { ${className} } from '${sourcePath}';\n\n/**${classDesc}*/\nclass ${className}WCA extends ${className} {}\n\nif (!customElements.get(${defaultTag})) {\n customElements.define(${defaultTag}, ${className}WCA);\n}\n`;\n};\n", "import { program } from \"commander\";\nimport { analyzeCommits } from \"#scripts/check-commits/commit-analyzer.ts\";\n\nexport default program\n .command(\"check-commits\")\n .alias(\"cc\")\n .option(\n \"-l, --set-label\",\n \"Set label on the pull request based on the commit message type\",\n )\n .option(\"-d, --debug\", \"Display detailed commit information for debugging\")\n .option(\"-r, --release-notes\", \"Generate release notes based on commit messages\")\n .description(\n \"Check commits in the local repository for the types of semantic commit messages made and return the results.\",\n )\n .action(async (option) => {\n await analyzeCommits(option.debug, option.setLabel, option.releaseNotes);\n });\n", "import chalk from \"chalk\";\nimport ora from \"ora\";\nimport type { Ora } from \"ora\";\nimport { Git } from \"#utils/gitUtils.ts\";\nimport type { CommitInfo } from \"./display-utils.ts\";\nimport { displayDebugView, getColoredType } from \"./display-utils.ts\";\nimport { applyLabelToPR, getExistingLabels } from \"./github-labels.ts\";\n\n/**\n * Generate release notes in the specified format\n * First tries to show only feat, fix, and breaking commits\n * If none found, shows all commits for user selection\n * @param commitList The list of commits to process\n */\nfunction generateReleaseNotes(commitList: CommitInfo[]): void {\n const releaseCommitTypes = [\"feat\", \"fix\", \"breaking\"];\n \n // Filter for preferred commit types first\n const releaseCommits = commitList.filter(commit => \n releaseCommitTypes.includes(commit.type)\n );\n \n // Use filtered commits if any found, otherwise use all commits\n const commitsToShow = releaseCommits.length > 0 ? releaseCommits : commitList;\n \n if (commitsToShow.length === 0) {\n console.log(\"No commits found to include in release notes.\\n\");\n return;\n }\n \n console.log(\"\\n------\\n\");\n console.log(\"### In this release\\n\");\n \n for (const commit of commitsToShow) {\n // Format: - {short commit hash} {commit message}\n console.log(`- ${commit.hash} ${commit.subject}`);\n \n // Add extra commit message content if body exists\n if (commit.body?.trim()) {\n // Split body into meaningful chunks, handling different separators\n const bodyText = commit.body.trim();\n \n // Split by common separators and clean up\n const bodyLines = bodyText\n .split(/\\n+/) // Split on one or more newlines\n .map(line => line.trim())\n .filter(line => line.length > 0);\n \n for (const line of bodyLines) {\n // Handle issue references and add proper spacing\n let formattedLine = line;\n \n // Add spaces before issue references like AlaskaAirlines/auro-cli#108\n formattedLine = formattedLine.replace(\n /([^\\s])(AlaskaAirlines\\/[a-zA-Z0-9-]+#\\d+)/g, \n '$1 $2'\n );\n \n // Add spaces between consecutive issue references\n formattedLine = formattedLine.replace(\n /(AlaskaAirlines\\/[a-zA-Z0-9-]+#\\d+)([^\\s])/g, \n '$1 $2'\n );\n \n console.log(` - ${formattedLine}`);\n }\n }\n }\n \n console.log(\"\\n------\\n\");\n \n // Show helpful info about what was included\n if (releaseCommits.length > 0) {\n console.log(chalk.green(`\u2713 Showing ${releaseCommits.length} commits of types: ${releaseCommitTypes.join(\", \")}`));\n } else {\n console.log(chalk.yellow(`\u26A0 No feat/fix/breaking commits found. Showing all ${commitList.length} commits for your selection.`));\n }\n}\n\n/**\n * Analyze commit messages in the repository\n * @param debug Whether to display detailed debug information\n * @param verbose Whether to display verbose commit messages without truncation\n * @param setLabel Whether to apply a label to the PR based on commit types\n * @returns A promise that resolves when analysis is complete\n */\nexport async function analyzeCommits(\n debug = false,\n setLabel = false,\n releaseNotes = false,\n): Promise<void> {\n const spinner = ora(\"Checking commits...\\n\").start();\n\n try {\n const commitList = await Git.getCommitMessages();\n\n // Generate release notes if requested\n if (releaseNotes) {\n spinner.succeed(`Total commits analyzed: ${commitList.length}`);\n generateReleaseNotes(commitList);\n return;\n }\n\n // Only display commit details if debug mode is enabled\n if (debug) {\n displayDebugView(commitList);\n }\n\n spinner.succeed(`Total commits analyzed: ${commitList.length}`);\n\n if (commitList.length !== 0) {\n const commitTypes = commitList.map((commit) => commit.type);\n const uniqueTypes = Array.from(new Set(commitTypes));\n const formattedTypes = uniqueTypes\n .map((type) => getColoredType(type))\n .join(\", \");\n spinner.succeed(`Found commit types: ${formattedTypes}`);\n } else {\n spinner.info(\n \"The list of commits is created by comparing the current branch\\n\" +\n \"with the main branch. If you are on a new branch, please\\n\" +\n \"make sure to commit some changes before running this command.\",\n );\n }\n\n if (setLabel) {\n await handleLabels(commitList, spinner);\n }\n } catch (error) {\n spinner.fail(\"Error getting commit messages\");\n console.error(error);\n }\n}\n\n/**\n * Handle applying labels based on commit types\n * @param commitList The list of commits to analyze\n * @param spinner The ora spinner instance for status updates\n */\nasync function handleLabels(\n commitList: CommitInfo[],\n spinner: Ora,\n): Promise<void> {\n const validCommitTypes = [\n \"breaking\",\n \"feat\",\n \"fix\",\n \"perf\",\n \"docs\",\n \"style\",\n \"refactor\",\n \"test\",\n \"build\",\n \"ci\",\n \"chore\",\n ];\n\n const foundCommitTypes = commitList\n .map((commit) => commit.type)\n .filter((type) => validCommitTypes.includes(type));\n\n let selectedLabel = null;\n let highestPriorityIndex = Number.POSITIVE_INFINITY;\n\n for (const type of foundCommitTypes) {\n const priorityIndex = validCommitTypes.indexOf(type);\n if (priorityIndex < highestPriorityIndex) {\n highestPriorityIndex = priorityIndex;\n selectedLabel = type;\n }\n }\n\n if (selectedLabel) {\n const labelSpinner = ora(\n \"Checking existing labels on pull request...\",\n ).start();\n try {\n const existingLabels = await getExistingLabels();\n\n if (existingLabels.includes(`semantic-status: ${selectedLabel}`)) {\n labelSpinner.info(\n `Label \"semantic-status: ${getColoredType(selectedLabel)}\" already exists on the pull request.`,\n );\n return;\n }\n\n labelSpinner.text = \"Applying label to pull request...\";\n await applyLabelToPR(selectedLabel);\n labelSpinner.succeed(\n `Label \"semantic-status: ${getColoredType(selectedLabel)}\" applied to the pull request.`,\n );\n } catch (error: unknown) {\n const errorMessage =\n error instanceof Error ? error.message : String(error);\n labelSpinner.fail(errorMessage);\n }\n } else {\n spinner.warn(\n chalk.yellow(\"No semantic commit type found to apply as label.\"),\n );\n }\n}\n", "import { appendFile, readFile } from \"node:fs/promises\";\nimport { Logger } from \"@aurodesignsystem/auro-library/scripts/utils/logger.mjs\";\nimport { simpleGit } from \"simple-git\";\nimport type { SimpleGit } from \"simple-git\";\n\n// Initialize simple-git with proper typing\nlet git: SimpleGit;\ntry {\n git = simpleGit({\n baseDir: process.cwd(),\n binary: \"git\",\n maxConcurrentProcesses: 1,\n });\n} catch (error) {\n Logger.error(`Failed to initialize git: ${error}`);\n // Provide a minimal implementation to prevent runtime errors\n git = {} as SimpleGit;\n}\n\nexport class Git {\n static async checkGitignore(pattern: string) {\n if (pattern === \"\") {\n return false;\n }\n try {\n const fileContent = await readFile(\".gitignore\", \"utf-8\");\n return fileContent.includes(pattern);\n } catch (err) {\n Logger.error(`Error reading file: ${err}`);\n return false;\n }\n }\n\n static async getCommitMessages(): Promise<\n Array<{\n type: string;\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n }>\n > {\n try {\n interface GitCommitType {\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n type: string;\n }\n\n const currentBranch = await git.branchLocal();\n Logger.info(`Current branch: ${currentBranch.current}`);\n\n // ---- Get target branch (main) and PR commits ----\n let targetBranch = \"main\";\n let commitRange = \"\";\n\n // Check if we're in a GitHub Actions environment\n const isGitHubAction = !!process.env.GITHUB_ACTIONS;\n\n if (isGitHubAction) {\n Logger.info(\"Running in GitHub Actions environment\");\n // In GitHub Actions, we can use environment variables to determine the PR branch and base\n targetBranch = process.env.GITHUB_BASE_REF || \"main\";\n\n try {\n // Ensure target branch is fetched\n await git.fetch(\"origin\", targetBranch);\n Logger.info(`Fetched target branch: origin/${targetBranch}`);\n\n // Use the merge base between target branch and current HEAD to get PR-specific commits\n const mergeBase = await git.raw([\n \"merge-base\",\n `origin/${targetBranch}`,\n \"HEAD\",\n ]);\n\n // Get commits between merge base and HEAD - these are the PR commits\n commitRange = `${mergeBase.trim()}..HEAD`;\n Logger.info(`Using commit range: ${commitRange}`);\n } catch (error) {\n Logger.warn(`Error setting up commit range in CI: ${error}`);\n // Fall back to simpler approach (just compare with origin/targetBranch)\n commitRange = `origin/${targetBranch}..HEAD`;\n Logger.info(`Falling back to commit range: ${commitRange}`);\n }\n } else {\n // Local environment - try to determine PR commits\n Logger.info(\"Running in local environment\");\n\n try {\n // First check if origin/main exists, fetch it if needed\n try {\n await git.raw([\"rev-parse\", \"--verify\", `origin/${targetBranch}`]);\n } catch {\n Logger.info(`Fetching ${targetBranch} from origin`);\n await git.fetch(\"origin\", targetBranch);\n }\n\n // Find merge base between current branch and target branch\n const mergeBase = await git.raw([\n \"merge-base\",\n `origin/${targetBranch}`,\n currentBranch.current,\n ]);\n\n commitRange = `${mergeBase.trim()}..HEAD`;\n Logger.info(`Using commit range for PR commits: ${commitRange}`);\n } catch (error) {\n Logger.warn(`Error determining PR commits locally: ${error}`);\n\n // Fallback - use last few commits\n Logger.info(\"Falling back to analyzing recent commits\");\n commitRange = \"HEAD~10..HEAD\";\n Logger.info(`Using fallback commit range: ${commitRange}`);\n }\n }\n\n // Get and format the PR commits\n return await Git.getFormattedCommits(commitRange);\n } catch (err) {\n Logger.error(`Error getting commit messages: ${err}`);\n return [];\n }\n }\n\n // Helper function to get formatted commits for a given git range\n static async getFormattedCommits(commitRange: string): Promise<\n Array<{\n type: string;\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n }>\n > {\n interface GitCommitType {\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n type: string;\n }\n\n // Use a format that will let us parse each commit separately\n // %H = hash, %ad = author date, %an = author name, %s = subject, %b = body\n const branchCommitsRaw = await git.raw([\n \"log\",\n \"--pretty=format:COMMIT_START%n%H%n%ad%n%an%n%s%n%b%nCOMMIT_END\",\n \"--date=short\",\n commitRange,\n ]);\n\n // Split by our custom delimiter to get individual commits\n const commitChunks = branchCommitsRaw\n .split(\"COMMIT_START\\n\")\n .filter((chunk: string) => chunk.trim() !== \"\");\n\n const commits: GitCommitType[] = [];\n\n for (const chunk of commitChunks) {\n const parts = chunk.split(\"\\n\");\n if (parts.length >= 4) {\n const hash = parts[0];\n const date = parts[1];\n const author_name = parts[2];\n const subject = parts[3];\n\n // The rest is the body (may contain breaking changes)\n // Filter out the COMMIT_END marker\n const bodyLines = parts\n .slice(4)\n .filter((line: string) => line !== \"COMMIT_END\");\n const body = bodyLines.length > 0 ? bodyLines.join(\"\") : \"\";\n\n // Use a shorter hash format for better readability (7 characters)\n const shortHash = hash.substring(0, 7);\n\n // Determine commit type from subject\n const typeMatch = subject.match(\n /^(feat|fix|docs|style|refactor|perf|test|build|ci|chore)(\\(.+\\))?:/,\n );\n let type = typeMatch ? typeMatch[1] : \"unknown\";\n\n // Check for breaking changes\n if (body.includes(\"BREAKING CHANGE\")) {\n type = \"breaking\";\n }\n\n commits.push({\n type,\n hash: shortHash,\n date,\n subject,\n body,\n message: `${subject}${body ? `\\n\\n${body}` : \"\"}`,\n author_name,\n });\n }\n }\n\n return commits;\n }\n\n // Function to add file to .gitignore\n static async addToGitignore(pattern: string, log = true) {\n await Git.checkGitignore(pattern).then(async (result) => {\n if (result) {\n Logger.warn(`${pattern} already exists`);\n } else {\n try {\n await appendFile(\".gitignore\", `\\n${pattern}`);\n if (log) {\n Logger.success(`${pattern} added to .gitignore`);\n }\n } catch (err) {\n Logger.error(err);\n }\n }\n });\n }\n\n // Function to remove file from git cache\n static async removeFromGitCache(files: string[]) {\n try {\n await git.rmKeepLocal(files);\n Logger.success(`${files.join(\", \")} are removed from git cache`);\n } catch (err) {\n Logger.error(err);\n }\n }\n\n static async createBranch(branchName: string) {\n try {\n await git.checkoutLocalBranch(branchName);\n Logger.success(`Created and switched to ${branchName} branch`);\n } catch (err) {\n Logger.error(err);\n }\n }\n\n static async commitStagedFiles(message: string) {\n try {\n await git.add(\".\");\n await git.commit(message);\n Logger.success(`Committed with message: ${message}`);\n } catch (err) {\n Logger.error(err);\n }\n }\n}\n", "import chalk from \"chalk\";\n\n// Configuration constants for display\nexport const MAX_SUBJECT_LENGTH = 60;\nexport const MAX_BODY_LENGTH = 100;\n\nexport interface CommitInfo {\n type: string;\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n}\n\n// Define valid commit types for better type checking\nexport type CommitType =\n | \"breaking\"\n | \"feat\"\n | \"fix\"\n | \"perf\"\n | \"docs\"\n | \"style\"\n | \"refactor\"\n | \"test\"\n | \"build\"\n | \"ci\"\n | \"chore\"\n | \"unknown\";\n\n/**\n * Get colored text for commit type using a more harmonious color scheme\n */\nexport function getColoredType(type: string): string {\n switch (type) {\n case \"breaking\":\n return chalk.bold.red(type);\n case \"feat\":\n return chalk.bold.green(type);\n case \"fix\":\n return chalk.bold.green(type);\n case \"perf\":\n return chalk.bold.green(type);\n case \"docs\":\n return chalk.bold.cyan(type);\n case \"style\":\n return chalk.bold.cyan(type);\n case \"refactor\":\n return chalk.bold.cyan(type);\n case \"test\":\n return chalk.bold.cyan(type);\n case \"build\":\n return chalk.bold.cyan(type);\n case \"ci\":\n return chalk.bold.cyan(type);\n case \"chore\":\n return chalk.bold.cyan(type);\n default:\n return chalk.bold.white(type);\n }\n}\n\n/**\n * Helper function to wrap long strings to new lines\n */\nexport function wrapString(str: string, maxLength: number): string {\n if (!str) {\n return \"\";\n }\n\n // If the string is shorter than maxLength, return it as is\n if (str.length <= maxLength) {\n return str;\n }\n\n // Split the string into words\n const words = str.split(\" \");\n let result = \"\";\n let currentLine = \"\";\n\n // Build wrapped text with line breaks\n for (const word of words) {\n // If adding this word would exceed maxLength, start a new line\n if ((currentLine + word).length > maxLength && currentLine.length > 0) {\n result += `${currentLine.trim()}\\n`;\n currentLine = \"\";\n }\n currentLine = `${currentLine}${word} `;\n }\n\n // Add the last line\n if (currentLine.length > 0) {\n result += currentLine.trim();\n }\n\n return result;\n}\n\n/**\n * Display commits in a debug format with detailed information\n */\nexport function displayDebugView(commitList: CommitInfo[]): void {\n for (const commit of commitList) {\n console.log(\"\u2500\".repeat(60));\n\n // Use a consistent color theme for metadata\n const subject = wrapString(commit.subject, MAX_SUBJECT_LENGTH);\n const body = wrapString(commit.body, MAX_BODY_LENGTH);\n\n // Display commit info in a more compact format\n console.log(chalk.bold(`${getColoredType(commit.type)}`));\n console.log(\n chalk.dim(`${commit.hash} | ${commit.date} | ${commit.author_name}`),\n );\n console.log(chalk.bold(`${chalk.white(subject)}`));\n\n // Only add body if it exists and keep it more compact\n if (commit.body) {\n console.log(chalk.dim(body));\n }\n }\n console.log(\"\u2500\".repeat(60));\n console.log(\"\\n\");\n}\n", "import github from \"@actions/github\";\n\n/**\n * Get existing labels from the current pull request in a GitHub Actions environment\n * @returns Promise that resolves with an array of label names\n */\nexport async function getExistingLabels(): Promise<string[]> {\n try {\n // Get the GitHub token from environment\n const token = process.env.GITHUB_TOKEN;\n\n if (!token) {\n throw new Error(\"GITHUB_TOKEN environment variable is not set\");\n }\n\n // Check if we're in a GitHub Actions environment\n if (!process.env.GITHUB_REPOSITORY || !process.env.GITHUB_EVENT_PATH) {\n throw new Error(\n \"This function can only be used in a GitHub Actions environment\",\n );\n }\n\n const octokit = github.getOctokit(token);\n const { context } = github;\n\n // Make sure we're in a pull request context\n if (!context.payload.pull_request) {\n throw new Error(\"No pull request found in the GitHub context\");\n }\n\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split(\"/\");\n const prNumber = context.payload.pull_request.number;\n\n // Get existing labels\n const { data: existingLabels } =\n await octokit.rest.issues.listLabelsOnIssue({\n owner,\n repo,\n issue_number: prNumber,\n });\n\n // Return array of label names\n return existingLabels.map((label) => label.name);\n } catch (error) {\n if (error instanceof Error) {\n throw new Error(`Failed to get existing labels: ${error.message}`);\n }\n throw error;\n }\n}\n\n/**\n * Apply a label to the current pull request in a GitHub Actions environment\n * @param label The label to apply to the pull request\n * @returns Promise that resolves when the label is applied\n */\nexport async function applyLabelToPR(label: string): Promise<void> {\n try {\n // Get the GitHub token from environment\n const token = process.env.GITHUB_TOKEN;\n\n if (!token) {\n throw new Error(\"GITHUB_TOKEN environment variable is not set\");\n }\n\n // Check if we're in a GitHub Actions environment\n if (!process.env.GITHUB_REPOSITORY || !process.env.GITHUB_EVENT_PATH) {\n throw new Error(\n \"This function can only be used in a GitHub Actions environment\",\n );\n }\n\n const octokit = github.getOctokit(token);\n const { context } = github;\n\n // Make sure we're in a pull request context\n if (!context.payload.pull_request) {\n throw new Error(\"No pull request found in the GitHub context\");\n }\n\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split(\"/\");\n const prNumber = context.payload.pull_request.number;\n\n // Add prefix to the label\n const prefixedLabel = `semantic-status: ${label}`;\n\n // Get existing labels\n const existingLabels = await getExistingLabels();\n\n // If the label we want to apply already exists, do nothing\n if (existingLabels.includes(prefixedLabel)) {\n return;\n }\n\n // Find existing semantic status labels that are different from the one we want to apply\n const existingSemanticLabels = existingLabels.filter(\n (existingLabel) =>\n existingLabel.startsWith(\"semantic-status:\") &&\n existingLabel !== prefixedLabel,\n );\n\n // Remove existing semantic status labels that don't match the new one\n for (const existingLabel of existingSemanticLabels) {\n await octokit.rest.issues.removeLabel({\n owner,\n repo,\n issue_number: prNumber,\n name: existingLabel,\n });\n }\n\n // Add the new semantic status label\n await octokit.rest.issues.addLabels({\n owner,\n repo,\n issue_number: prNumber,\n labels: [prefixedLabel],\n });\n\n return;\n } catch (error) {\n if (error instanceof Error) {\n throw new Error(`Failed to apply label: ${error.message}`);\n }\n throw error;\n }\n}\n", "import fs from \"node:fs\";\nimport { get } from \"node:https\"; // Change to https\nimport chalk from \"chalk\";\nimport { program } from \"commander\";\nimport ora from \"ora\";\nimport type { Ora } from \"ora\";\n\nexport default program\n .command(\"pr-release\")\n .option(\n \"-n, --namespace <package-namespace>\",\n \"Set namespace of the package release\",\n \"@aurodesignsystem-dev\",\n )\n .option(\n \"-p, --pr-number <number>\",\n \"Set pull request number for the release\",\n \"0\",\n )\n .description(\n \"Generate the package version based off of PR number then update the package.json file. Note: this does not publish the package.\",\n )\n .action(async (option) => {\n await updatePackageJson(option);\n });\n\ninterface ReleaseOptions {\n namespace: string;\n prNumber: number;\n}\n\nconst updatePackageJson = async (option: ReleaseOptions): Promise<void> => {\n const { namespace, prNumber } = option;\n\n const packageSpinner = ora(\"Updating package.json\").start();\n\n try {\n const packageJsonPath = \"package.json\";\n\n // Read package.json\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\"));\n\n // Check if release version is on npmjs already\n packageSpinner.text = \"Checking npm registry for version information...\";\n\n const releaseVersion = `0.0.0-pr${prNumber}`;\n const packageComponent = packageJson.name.split(\"/\")[1];\n const packageName = `${namespace}/${packageComponent}`;\n const incrementVersion = await getIncrementVersion(\n releaseVersion,\n packageName,\n packageSpinner,\n );\n const packageVersion = `${releaseVersion}.${incrementVersion}`;\n\n packageJson.name = packageName;\n packageJson.version = packageVersion;\n\n packageSpinner.text = \"Writing updated package.json...\";\n\n // Write the updated package.json back to the file\n fs.writeFileSync(\n packageJsonPath,\n `${JSON.stringify(packageJson, null, 2)}\\n`,\n \"utf8\",\n );\n\n packageSpinner.succeed(\n `Package.json updated to use ${chalk.green(packageVersion)} and ${chalk.green(packageName)}`,\n );\n\n // Explicitly exit with success code to ensure terminal prompt returns\n process.exit(0);\n } catch (error: unknown) {\n packageSpinner.fail(`Failed to update package.json: ${error}`);\n process.exit(1); // Exit with error code\n }\n};\n\n// checks if version exists on npmjs and returns the next available increment version\nconst getIncrementVersion = (\n releaseVersion: string,\n packageName: string,\n spinner: Ora,\n): Promise<number> => {\n return new Promise((resolve) => {\n try {\n // Use the registry URL to get all versions for the package\n const registryUrl = `https://registry.npmjs.org/${packageName}`;\n\n const req = get(\n registryUrl,\n {\n headers: { Accept: \"application/json\" },\n },\n (res) => {\n // Handle redirects\n if (\n (res.statusCode === 301 || res.statusCode === 302) &&\n res.headers.location\n ) {\n // Persist redirect message\n spinner.info(`Following redirect to ${res.headers.location}...`);\n try {\n get(\n res.headers.location,\n { headers: { Accept: \"application/json\" } },\n handleResponse,\n )\n .on(\"error\", (err) => {\n // On redirect error, default to 0\n spinner.warn(\n `Error following redirect: ${err.message}, defaulting to version 0`,\n );\n resolve(0);\n })\n .end();\n } catch (error) {\n // If redirect request fails, default to 0\n spinner.warn(\n `Redirect request failed: ${error instanceof Error ? error.message : \"Unknown error\"}, defaulting to version 0`,\n );\n resolve(0);\n }\n return;\n }\n\n handleResponse(res);\n },\n );\n\n function handleResponse(res: import(\"http\").IncomingMessage) {\n if (res.statusCode !== 200) {\n // If package not found or other error, we can start with version 0\n spinner.info(\n `Package not found. Status code: ${chalk.red(res.statusCode)}, defaulting to version 0`,\n );\n resolve(0);\n return;\n }\n\n spinner.text = \"Processing version information...\";\n let data = \"\";\n res.on(\"data\", (chunk: Buffer | string) => {\n data += chunk;\n });\n\n res.on(\"end\", () => {\n try {\n const packageData = JSON.parse(data);\n const versions = packageData.versions\n ? Object.keys(packageData.versions)\n : [];\n\n spinner.text = \"Calculating next version number...\";\n\n // Find the highest existing iteration for this release version\n let maxIteration = -1;\n const versionRegex = new RegExp(`^${releaseVersion}\\\\.(\\\\d+)$`);\n\n for (const version of versions) {\n const match = version.match(versionRegex);\n if (match) {\n const iteration = Number.parseInt(match[1], 10);\n maxIteration = Math.max(maxIteration, iteration);\n }\n }\n\n // Return the next iteration number and persist this important info\n if (maxIteration >= 0) {\n spinner.info(\n `Found existing version ${chalk.green(`${releaseVersion}.${maxIteration}`)}. Incrementing to ${chalk.green(`${releaseVersion}.${maxIteration + 1}`)}`,\n );\n } else {\n spinner.info(\n `No existing version found for ${chalk.green(releaseVersion)}. Starting with ${chalk.green(`${releaseVersion}.0`)}`,\n );\n }\n resolve(maxIteration + 1);\n } catch (error) {\n // In case of parsing error, default to 0\n spinner.warn(\n `Failed to parse NPM registry response: ${error instanceof Error ? error.message : \"Unknown error\"}, defaulting to version 0`,\n );\n resolve(0);\n }\n });\n }\n\n req.on(\"error\", (err) => {\n // On request error, default to 0\n spinner.warn(`Request error: ${err.message}, defaulting to version 0`);\n resolve(0);\n });\n\n req.end();\n } catch (error) {\n // Catch any other errors and default to 0\n spinner.warn(\n \"Error checking version in npm registry, defaulting to version 0\",\n );\n resolve(0);\n }\n });\n};\n", "import path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { program } from \"commander\";\nimport open from \"open\";\nimport { shell } from \"#utils/shell.js\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst cliRootDir = path.resolve(path.dirname(__filename), \"..\");\n\nexport default program\n .command(\"test\")\n .option(\"-w, --watch\", \"Set watch number for the test\")\n .option(\"-c, --coverage-report\", \"Generate coverage report\")\n .option(\"-o, --open\", \"Open the coverage report in the browser\")\n .option(\"-f, --files <String|String[]>\", \"Test files glob pattern\")\n .description(\"Run the web test runner to test the component library\")\n .action(async (option) => {\n const configPath = path.join(\n cliRootDir,\n \"dist\",\n \"configs\",\n \"web-test-runner.config.mjs\",\n );\n let command = `npx wtr --config \"${configPath}\"`;\n const coveragePath = `${process.cwd()}/coverage/index.html`;\n\n if (option.coverageReport) {\n command += \" --coverage\";\n }\n\n if (option.watch) {\n command += \" --watch\";\n }\n\n if (option.files) {\n const files = Array.isArray(option.files)\n ? option.files.join(\" \")\n : option.files;\n command += ` --files \"${files}\"`;\n }\n\n shell(command);\n\n if (option.open) {\n await open(coveragePath);\n }\n });\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { program } from \"commander\";\nimport inquirer from \"inquirer\";\nimport ora from \"ora\";\nimport { createMultiGitterDependencyTreeConfig } from \"#scripts/agent/run-migrations/writeMultiGitterConfig.js\";\nimport {\n formatDependencyTree,\n getBatchedUpdateOrder,\n} from \"#scripts/formatDependencyTree.ts\";\nimport { fromCliRoot, withHomeDir } from \"#utils/pathUtils.js\";\nimport { shell } from \"#utils/shell.js\";\n\n// Multi-gitter and other config files live here\nconst CONFIG_DIR = withHomeDir(\"run-migrations\", \"config\");\n// Generated output files live here\nconst OUTPUT_DIR = withHomeDir(\"run-migrations\", \"outputs\");\n\nenum AgentActions {\n RunMigration = \"run-migration\",\n // Add more actions as needed\n}\n\ninterface AgentAnswers {\n agentAction: AgentActions;\n}\n\n// Agent component options\n// =========================================================\n\nconst auroComponents = [\n \"@aurodesignsystem/auro-accordion\",\n \"@aurodesignsystem/auro-alert\",\n \"@aurodesignsystem/auro-avatar\",\n \"@aurodesignsystem/auro-background\",\n \"@aurodesignsystem/auro-backtotop\",\n \"@aurodesignsystem/auro-button\",\n \"@aurodesignsystem/auro-badge\",\n \"@aurodesignsystem/auro-banner\",\n \"@aurodesignsystem/auro-card\",\n \"@aurodesignsystem/auro-carousel\",\n \"@aurodesignsystem/auro-datetime\",\n \"@aurodesignsystem/auro-dialog\",\n \"@aurodesignsystem/auro-drawer\",\n \"@aurodesignsystem/auro-formkit\",\n \"@aurodesignsystem/auro-flight\",\n \"@aurodesignsystem/auro-flightline\",\n \"@aurodesignsystem/auro-header\",\n \"@aurodesignsystem/auro-hyperlink\",\n \"@aurodesignsystem/auro-icon\",\n \"@aurodesignsystem/auro-loader\",\n \"@aurodesignsystem/auro-lockup\",\n \"@aurodesignsystem/auro-nav\",\n \"@aurodesignsystem/auro-pane\",\n \"@aurodesignsystem/auro-popover\",\n \"@aurodesignsystem/auro-sidenav\",\n \"@aurodesignsystem/auro-skeleton\",\n \"@aurodesignsystem/auro-slideshow\",\n \"@aurodesignsystem/auro-table\",\n \"@aurodesignsystem/auro-tabs\",\n \"@aurodesignsystem/auro-toast\",\n];\n\nconst auroPackages = [\n ...auroComponents,\n \"@aurodesignsystem/auro-library\",\n \"@aurodesignsystem/WebCoreStyleSheets\",\n \"@aurodesignsystem/AuroDesignTokens\",\n \"@aurodesignsystem/auro-cli\",\n \"@alaskaairux/icons\",\n];\n\n// Agent helpers\n// =========================================================\ninterface DependencyTreeAnswers {\n useExisting: boolean;\n}\n\nasync function getOrCreateDependencyTree(\n relevantPackages: string[],\n): Promise<string> {\n // check if output and config directories exist, if not create them\n try {\n await fs.mkdir(OUTPUT_DIR, { recursive: true });\n await fs.mkdir(CONFIG_DIR, { recursive: true });\n } catch (error) {\n console.error(\"Failed to create output or config directories:\", error);\n process.exit(1);\n }\n\n const spinner = ora(\"Creating dependency tree...\").start();\n\n // Create multi-gitter dependency tree configuration\n spinner.text = \"Creating multi-gitter dependency tree configuration...\";\n await createMultiGitterDependencyTreeConfig(CONFIG_DIR);\n\n spinner.text = \"Scraping dependencies from Auro packages...\";\n\n // Run multi-gitter using the generated config\n const scriptPath = fromCliRoot(\"static\", \"getAuroDeps.js\");\n const multiGitterCommand = `multi-gitter run \"node ${scriptPath}\" --config ${path.join(CONFIG_DIR, \"multi-gitter_DEPENDENCY_TREE.yml\")}`;\n try {\n await shell(multiGitterCommand);\n } catch (error) {\n spinner.fail(\"Failed to generate dependency tree:\");\n console.error(error);\n process.exit(1);\n }\n\n spinner.text = \"Generating dependency tree JSON file using packages...\";\n await formatDependencyTree(OUTPUT_DIR, relevantPackages);\n\n spinner.succeed(\"Dependency tree generated successfully.\");\n\n return path.join(OUTPUT_DIR, \"dependencyTree.json\");\n}\n\nconst getDependencyBatchesFromTree = async (\n dependencyTreePath: string,\n): Promise<string[][]> => {\n const spinner = ora(\"Loading dependency tree...\").start();\n const dependencyTree = JSON.parse(\n await fs.readFile(dependencyTreePath, \"utf-8\"),\n );\n\n spinner.text = \"Processing dependency tree...\";\n const batches = getBatchedUpdateOrder(dependencyTree);\n spinner.succeed(\"Dependency batches created successfully.\");\n\n return batches;\n};\n\n// Agent command\n// =========================================================\nexport default program.command(\"agent\").action(async (option) => {\n const answers = await inquirer.prompt([\n {\n type: \"select\",\n name: \"agentAction\",\n message: \"What agent action do you want to perform?\",\n choices: [\n {\n name: \"Run a migration on auro components\",\n value: AgentActions.RunMigration,\n },\n ],\n default: [AgentActions.RunMigration],\n },\n\n {\n type: \"input\",\n name: \"migrationId\",\n message: \"What migration id do you want to run?\",\n when: (answers) => answers.agentAction === AgentActions.RunMigration,\n validate: (input) =>\n input.trim() !== \"\" || \"Migration id cannot be empty.\",\n },\n\n {\n type: \"confirm\",\n name: \"useExisting\",\n message: \"Would you like to specify starting packages?\",\n default: true,\n transformer: (value) =>\n value ? \"Yes = Packages related to selections\" : \"No = All packages\",\n when: (answers) => answers.agentAction === AgentActions.RunMigration,\n },\n\n {\n type: \"checkbox\",\n name: \"startWithComponents\",\n message:\n \"Enter the components to start with (comma-separated, blank for all):\",\n choices: auroComponents.map((component) => ({\n name: component.replace(\"@aurodesignsystem/\", \"\"),\n value: component,\n })),\n when: (answers) =>\n answers.agentAction === AgentActions.RunMigration &&\n answers.useExisting,\n },\n ]);\n\n switch (answers.agentAction) {\n case AgentActions.RunMigration: {\n // Placeholder for actual migration logic\n const spinner = ora(\"Running migration...\").start();\n const dependencyTreePath = await getOrCreateDependencyTree(\n answers.startWithComponents,\n );\n\n spinner.text = \"Getting dependency batches from tree...\";\n const dependencyBatches =\n await getDependencyBatchesFromTree(dependencyTreePath);\n\n const batchedUpdateOrderText = dependencyBatches\n .map(\n (batch, index) =>\n `Batch ${index + 1}\\n${batch.map((pkg) => ` - ${pkg.replace(\"@aurodesignsystem\", \"AlaskaAirlines\").replace(\"@alaskaairux/icons\", \"AlaskaAirlines/Icons\")}`).join(\"\\n\")}`,\n )\n .join(\"\\n\\n\");\n\n console.log(batchedUpdateOrderText);\n\n spinner.text = \"Running migrations on dependency batches...\";\n // DO STUFF HERE :)\n\n new Promise((resolve) => setTimeout(resolve, 2000)); // Simulate async operation\n spinner.succeed(\"Migration process completed successfully.\");\n\n // spinner.succeed(\"Migration process completed.\");\n break;\n }\n // Add more cases for additional actions as needed\n default:\n console.error(\"Unknown action selected.\");\n // spinner.fail(\"Unknown action selected.\");\n }\n});\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport ora from \"ora\";\n\nconst JsonConfig = {\n \"auth-type\": \"workspace-token\",\n \"author-email\": null,\n \"author-name\": null,\n \"base-branch\": \"main\",\n \"base-url\": null,\n \"clone-dir\": \".gitter-temp\",\n \"code-search\": null,\n concurrent: 4,\n \"conflict-strategy\": \"replace\",\n draft: false,\n \"dry-run\": true,\n \"fetch-depth\": 1,\n fork: false,\n \"fork-owner\": null,\n \"git-type\": \"go\",\n group: null,\n \"include-subgroups\": false,\n insecure: false,\n interactive: false,\n labels: null,\n \"log-file\": \"'-'\",\n \"log-format\": \"'text'\",\n \"log-level\": \"'error'\",\n \"max-reviewers\": 0,\n \"max-team-reviewers\": 0,\n org: null,\n output: \"'-'\",\n \"plain-output\": false,\n platform: \"github\",\n project: null,\n \"push-only\": false,\n repo: [\n \"AlaskaAirlines/auro-accordion\",\n \"AlaskaAirlines/auro-alert\",\n \"AlaskaAirlines/auro-avatar\",\n \"AlaskaAirlines/auro-background\",\n \"AlaskaAirlines/auro-backtotop\",\n \"AlaskaAirlines/auro-button\",\n \"AlaskaAirlines/auro-badge\",\n \"AlaskaAirlines/auro-banner\",\n \"AlaskaAirlines/auro-card\",\n \"AlaskaAirlines/auro-carousel\",\n \"AlaskaAirlines/auro-datetime\",\n \"AlaskaAirlines/auro-dialog\",\n \"AlaskaAirlines/auro-drawer\",\n \"AlaskaAirlines/auro-flight\",\n \"AlaskaAirlines/auro-flightline\",\n \"AlaskaAirlines/auro-header\",\n \"AlaskaAirlines/auro-hyperlink\",\n \"AlaskaAirlines/auro-icon\",\n \"AlaskaAirlines/auro-loader\",\n \"AlaskaAirlines/auro-lockup\",\n \"AlaskaAirlines/auro-nav\",\n \"AlaskaAirlines/auro-pane\",\n \"AlaskaAirlines/auro-popover\",\n \"AlaskaAirlines/auro-sidenav\",\n \"AlaskaAirlines/auro-skeleton\",\n \"AlaskaAirlines/auro-slideshow\",\n \"AlaskaAirlines/auro-table\",\n \"AlaskaAirlines/auro-tabs\",\n \"AlaskaAirlines/auro-toast\",\n // UNCOMMENT BELOW WHEN MAIN/MASTER BRANCHES ARE READY\n // \"AlaskaAirlines/AuroDocsSite\"\n ],\n \"repo-exclude\": null,\n \"repo-include\": null,\n \"repo-search\": null,\n reviewers: null,\n \"skip-forks\": false,\n \"skip-pr\": false,\n \"skip-repo\": null,\n \"ssh-auth\": false,\n \"team-reviewers\": null,\n};\n\nfunction toYaml(config) {\n return Object.entries(config)\n .map(([key, value]) => {\n if (Array.isArray(value)) {\n return `${key}:\\n - ${value.join(\"\\n - \")}`;\n }\n if (typeof value === \"object\" && value !== null) {\n return `${key}:\\n${Object.entries(value)\n .map(([k, v]) => ` ${k}: ${v}`)\n .join(\"\\n\")}`;\n }\n return `${key}: ${value}`;\n })\n .join(\"\\n\");\n}\n\nexport async function createMultiGitterDependencyTreeConfig(outputPath) {\n const spinner = ora(\"Writing multi-gitter configuration...\").start();\n const configContent = toYaml(JsonConfig);\n const configPath = path.join(outputPath, \"multi-gitter_DEPENDENCY_TREE.yml\");\n\n try {\n await fs.writeFile(configPath, configContent, \"utf8\");\n spinner.succeed(`Multi-gitter configuration written to ${configPath}`);\n } catch (error) {\n spinner.fail(\"Error writing multi-gitter configuration:\");\n console.error(error);\n }\n}\n", "import fs from \"node:fs\";\nimport path from \"node:path\";\n\ninterface PackageJsonExcerpt {\n name: string;\n peerDependencies: Record<string, string>;\n devDependencies: Record<string, string>;\n dependencies: Record<string, string>;\n}\n\ninterface DependencyNode {\n dependsOn: string[];\n dependentPackages: string[];\n}\n\ntype DependencyTree = Record<string, DependencyNode>;\n\nexport function getBatchedUpdateOrder(\n dependencyTree: DependencyTree,\n): Array<string[]> {\n const inDegree: Record<string, number> = {};\n const batches: Array<string[]> = [];\n let currentBatch: string[] = [];\n const queue: string[] = [];\n\n // Initialize in-degree (count of dependencies for each package)\n for (const pkg in dependencyTree) {\n inDegree[pkg] = dependencyTree[pkg].dependsOn.length;\n }\n\n // Find packages with no dependencies (in-degree = 0)\n for (const pkg in inDegree) {\n if (inDegree[pkg] === 0) {\n queue.push(pkg);\n }\n }\n\n while (queue.length > 0) {\n currentBatch = [];\n // Process the queue (topological sorting)\n const queueLength = queue.length;\n for (let i = 0; i < queueLength; i++) {\n const current = queue.shift()!;\n currentBatch.push(current);\n\n // Reduce the in-degree of dependent packages\n for (const dependent of dependencyTree[current].dependentPackages) {\n inDegree[dependent]--;\n\n // If a package now has no dependencies, add it to the queue\n if (inDegree[dependent] === 0) {\n queue.push(dependent);\n }\n }\n }\n batches.push(currentBatch);\n }\n\n // If we couldn't process all packages, there is a circular dependency\n if (batches.flat().length !== Object.keys(dependencyTree).length) {\n throw new Error(\"Circular dependency detected!\");\n }\n\n return batches;\n}\n\nfunction getJsonFilesFromDirectory(directory: string): string[] {\n return fs.readdirSync(directory).filter((file) => file.endsWith(\".json\"));\n}\n\n/**\n * Formats the dependency tree for the specified target dependencies.\n * @param rawTargetDependencies {string[]} - List of target dependencies to format. Expects package names like \"button\", \"hyperlink\", etc. without the \"@aurodesignsystem/\" prefix.\n * @returns {Promise<DependencyTree>} - A promise that resolves to the formatted dependency tree.\n */\nexport async function formatDependencyTree(\n jsonFileDirectory: string,\n targetDependencies: string[] = [],\n): Promise<DependencyTree> {\n console.log(targetDependencies);\n let dependencyTree: DependencyTree = {};\n\n const files = getJsonFilesFromDirectory(jsonFileDirectory);\n\n for (const file of files) {\n // Skip the dependency tree file itself if it already exists\n if (file === \"dependencyTree.json\") {\n continue;\n }\n\n const contents = fs.readFileSync(`${jsonFileDirectory}/${file}`, \"utf-8\");\n const data: PackageJsonExcerpt = JSON.parse(contents);\n\n const packageName = data.name;\n const peerDependencies = Object.keys(data.peerDependencies);\n const devDependencies = Object.keys(data.devDependencies);\n const dependencies = Object.keys(data.dependencies);\n\n if (!dependencyTree[packageName]) {\n dependencyTree[packageName] = { dependsOn: [], dependentPackages: [] };\n }\n\n const allDependencies = [\n ...peerDependencies,\n ...devDependencies,\n ...dependencies,\n ];\n\n dependencyTree[packageName].dependsOn = [...new Set(allDependencies)];\n\n for (const dependency of allDependencies) {\n if (!dependencyTree[dependency]) {\n dependencyTree[dependency] = { dependsOn: [], dependentPackages: [] };\n }\n\n if (!dependencyTree[dependency].dependentPackages.includes(packageName)) {\n dependencyTree[dependency].dependentPackages.push(packageName);\n }\n }\n }\n\n // If there are no specified target dependencies, use all packages\n if (targetDependencies.length) {\n // If there ARE target dependencies, filter the dependency tree down to just relevant packages\n // A tree will start only include package that the target dependencies depend on, OR packages that depend on the target dependencies\n const relevantPackages = new Set<string>();\n\n // Include any packages that depend on a target dependency\n for (const [pkg, node] of Object.entries(dependencyTree)) {\n if (node.dependsOn.some((dep) => targetDependencies.includes(dep))) {\n relevantPackages.add(pkg);\n }\n }\n\n // Also include the target dependencies themselves\n for (const target of targetDependencies) {\n if (dependencyTree[target]) {\n relevantPackages.add(target);\n }\n }\n\n // Final filtered dependency tree\n const _filteredDependencyTree: DependencyTree = {};\n for (const pkg of relevantPackages) {\n _filteredDependencyTree[pkg] = {\n dependsOn: dependencyTree[pkg].dependsOn.filter((dep) =>\n relevantPackages.has(dep),\n ),\n dependentPackages: dependencyTree[pkg].dependentPackages.filter((dep) =>\n relevantPackages.has(dep),\n ),\n };\n }\n\n dependencyTree = _filteredDependencyTree;\n } else {\n console.log(\"No target dependencies provided - using all packages.\");\n }\n\n // Write the dependency tree to a file\n fs.writeFileSync(\n `${jsonFileDirectory}/dependencyTree.json`,\n JSON.stringify(dependencyTree, null, 2),\n );\n\n return dependencyTree;\n}\n", "import { program } from \"commander\";\nimport { api, cem, docs, serve } from \"#scripts/docs/index.ts\";\nimport { withServerOptions } from \"#commands/_sharedOptions.js\";\n\nlet docsCommand = program\n .command(\"docs\")\n .description(\"Generate API documentation\")\n .option(\"-c, --cem\", \"Generate Custom Elements Manifest (CEM) file\", false)\n .option(\"-a, --api\", \"Creates api md file from CEM\", false)\n \n docsCommand = withServerOptions(docsCommand);\n\n export default docsCommand.action(async (options) => {\n\n if (options.cem) {\n await cem();\n }\n\n if (options.api) {\n await api();\n }\n\n await docs();\n\n if( options.serve ) {\n await serve(options);\n }\n\n });\n", "import { program } from \"commander\";\nimport { createADOItem } from \"#scripts/ado/index.ts\";\n\nexport const adoCommand = program\n .command(\"ado\")\n .description(\"Generate ADO item from GitHub issue\")\n .option(\"-g, --gh-issue <issue>\", \"What GitHub issue to use\")\n .action(async (options) => {\n\n if (options.ghIssue) {\n await createADOItem(options.ghIssue);\n }\n });\n", "import { Octokit } from \"@octokit/rest\";\nimport * as azdev from \"azure-devops-node-api\";\nimport ora from \"ora\";\nimport type { WorkItem } from \"azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.js\";\n\ninterface GitHubIssue {\n title: string;\n body: string | null;\n html_url: string;\n number: number;\n repository: {\n owner: { login: string };\n name: string;\n };\n}\n\n/**\n * Fetches GitHub issue details\n * @param issueUrl - Full GitHub issue URL or in format \"owner/repo#number\"\n * @returns GitHub issue details\n */\nconst fetchGitHubIssue = async (issueUrl: string): Promise<GitHubIssue> => {\n const ghToken = process.env.GH_TOKEN;\n if (!ghToken) {\n throw new Error(\"GH_TOKEN environment variable is required\");\n }\n\n const octokit = new Octokit({\n auth: ghToken,\n });\n\n let owner: string;\n let repo: string;\n let issueNumberStr: string;\n\n // Parse the issue URL or reference\n if (issueUrl.includes('github.com')) {\n // Full URL format: https://github.com/owner/repo/issues/123\n const urlMatch = issueUrl.match(/github\\.com\\/([^\\/]+)\\/([^\\/]+)\\/issues\\/(\\d+)/);\n if (!urlMatch) {\n throw new Error(\"Invalid GitHub issue URL format\");\n }\n [, owner, repo, issueNumberStr] = urlMatch;\n } else if (issueUrl.includes('#')) {\n // Short format: owner/repo#123\n const shortMatch = issueUrl.match(/([^\\/]+)\\/([^#]+)#(\\d+)/);\n if (!shortMatch) {\n throw new Error(\"Invalid GitHub issue reference format\");\n }\n [, owner, repo, issueNumberStr] = shortMatch;\n } else {\n throw new Error(\"Issue must be provided as full URL or in format 'owner/repo#number'\");\n }\n\n const issueNumber = Number.parseInt(issueNumberStr, 10);\n\n try {\n const { data: issue } = await octokit.rest.issues.get({\n owner,\n repo,\n issue_number: issueNumber,\n });\n\n return {\n title: issue.title,\n body: issue.body ?? null,\n html_url: issue.html_url,\n number: issue.number,\n repository: {\n owner: { login: owner },\n name: repo,\n },\n };\n } catch (error) {\n throw new Error(`Failed to fetch GitHub issue: ${error}`);\n }\n};\n\n/**\n * Checks if GitHub issue already has an ADO work item linked\n * @param issue - GitHub issue details\n * @returns ADO URL if found, null otherwise\n */\nconst getExistingADOLink = async (issue: GitHubIssue): Promise<string | null> => {\n const ghToken = process.env.GH_TOKEN;\n if (!ghToken) {\n return null;\n }\n\n const octokit = new Octokit({\n auth: ghToken,\n });\n\n try {\n // Get the ADO field value from the GitHub project\n const query = `\n query($owner: String!, $repo: String!, $issueNumber: Int!) {\n repository(owner: $owner, name: $repo) {\n issue(number: $issueNumber) {\n projectItems(first: 10) {\n nodes {\n project {\n number\n }\n fieldValues(first: 20) {\n nodes {\n ... on ProjectV2ItemFieldTextValue {\n text\n field {\n ... on ProjectV2Field {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n `;\n\n const variables = {\n owner: issue.repository.owner.login,\n repo: issue.repository.name,\n issueNumber: issue.number,\n };\n\n const response = await octokit.graphql(query, variables) as {\n repository: {\n issue: {\n projectItems: {\n nodes: Array<{\n project: { number: number };\n fieldValues: {\n nodes: Array<{\n text?: string;\n field?: { name?: string };\n }>;\n };\n }>;\n };\n };\n };\n };\n\n // Look for project #19 with ado field\n const project19Item = response.repository.issue.projectItems.nodes.find(\n item => item.project.number === 19\n );\n\n if (project19Item) {\n const adoFieldValue = project19Item.fieldValues.nodes.find(\n fieldValue => fieldValue.field?.name?.toLowerCase() === 'ado' && fieldValue.text?.trim()\n );\n\n if (adoFieldValue?.text?.trim()) {\n return adoFieldValue.text.trim();\n }\n }\n\n return null;\n } catch (error) {\n console.error(`Failed to check existing ADO link: ${error}`);\n return null;\n }\n};\n\n/**\n * Adds GitHub issue to project #19 and updates the \"ado\" field\n * @param issue - GitHub issue details\n * @param adoWorkItemUrl - ADO work item URL\n */\nconst updateGitHubProject = async (\n issue: GitHubIssue,\n adoWorkItemUrl: string\n): Promise<void> => {\n const ghToken = process.env.GH_TOKEN;\n if (!ghToken) {\n throw new Error(\"GH_TOKEN environment variable is required\");\n }\n\n const octokit = new Octokit({\n auth: ghToken,\n });\n\n const projectNumber = 19; // Alaska Airlines project #19\n\n try {\n // Get project and issue info in one query\n const query = `\n query($org: String!, $projectNumber: Int!, $owner: String!, $repo: String!, $issueNumber: Int!) {\n organization(login: $org) {\n projectV2(number: $projectNumber) {\n id\n fields(first: 20) {\n nodes {\n ... on ProjectV2Field {\n id\n name\n }\n ... on ProjectV2SingleSelectField {\n id\n name\n }\n ... on ProjectV2IterationField {\n id\n name\n }\n }\n }\n }\n }\n repository(owner: $owner, name: $repo) {\n issue(number: $issueNumber) {\n id\n projectItems(first: 10) {\n nodes {\n id\n project {\n number\n }\n }\n }\n }\n }\n }\n `;\n\n const variables = {\n org: \"AlaskaAirlines\",\n projectNumber,\n owner: issue.repository.owner.login,\n repo: issue.repository.name,\n issueNumber: issue.number,\n };\n\n const response = await octokit.graphql(query, variables) as {\n organization: {\n projectV2: {\n id: string;\n fields: {\n nodes: Array<{ id: string; name: string }>;\n };\n };\n };\n repository: {\n issue: {\n id: string;\n projectItems: {\n nodes: Array<{\n id: string;\n project: { number: number };\n }>;\n };\n };\n };\n };\n\n const projectId = response.organization.projectV2.id;\n const issueId = response.repository.issue.id;\n const adoField = response.organization.projectV2.fields.nodes.find(\n field => field.name?.toLowerCase() === 'ado'\n );\n\n // Check if issue is already in the project\n let projectItemId = response.repository.issue.projectItems.nodes.find(\n item => item.project.number === projectNumber\n )?.id;\n\n // Add to project if not already there\n if (!projectItemId) {\n const addMutation = `\n mutation($projectId: ID!, $contentId: ID!) {\n addProjectV2ItemById(\n input: {\n projectId: $projectId\n contentId: $contentId\n }\n ) {\n item {\n id\n }\n }\n }\n `;\n\n const addResponse = await octokit.graphql(addMutation, {\n projectId,\n contentId: issueId,\n }) as {\n addProjectV2ItemById: {\n item: { id: string };\n };\n };\n\n projectItemId = addResponse.addProjectV2ItemById.item.id;\n // Issue added to project (handled by spinner in main function)\n }\n\n // Update the ado field if it exists\n if (adoField && projectItemId) {\n const updateMutation = `\n mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) {\n updateProjectV2ItemFieldValue(\n input: {\n projectId: $projectId\n itemId: $itemId\n fieldId: $fieldId\n value: {\n text: $value\n }\n }\n ) {\n projectV2Item {\n id\n }\n }\n }\n `;\n\n await octokit.graphql(updateMutation, {\n projectId,\n itemId: projectItemId,\n fieldId: adoField.id,\n value: adoWorkItemUrl,\n });\n\n // Field updated (handled by spinner in main function)\n } else if (!adoField) {\n throw new Error(\"No 'ado' field found in GitHub project\");\n }\n\n } catch (error) {\n console.error(`Failed to update GitHub project: ${error}`);\n // Don't throw - we don't want to fail the entire process\n }\n};\n\n/**\n * Creates a user story work item in Azure DevOps\n * @param issue - GitHub issue details\n * @returns Created work item\n */\nconst createADOWorkItem = async (issue: GitHubIssue): Promise<WorkItem> => {\n const adoToken = process.env.ADO_TOKEN;\n if (!adoToken) {\n throw new Error(\"ADO_TOKEN environment variable is required\");\n }\n\n // ADO organization and project details\n const orgUrl = \"https://dev.azure.com/itsals\";\n const projectName = \"E_Retain_Content\";\n const areaPath = \"E_Retain_Content\\\\Auro Design System\";\n\n // Create connection to Azure DevOps\n const authHandler = azdev.getPersonalAccessTokenHandler(adoToken);\n const connection = new azdev.WebApi(orgUrl, authHandler);\n const workItemTrackingApi = await connection.getWorkItemTrackingApi();\n\n try {\n // Prepare work item data - omitting iteration path to use project default\n const workItemData = [\n {\n op: \"add\",\n path: \"/fields/System.Title\",\n value: issue.title,\n },\n {\n op: \"add\",\n path: \"/fields/System.Description\",\n value: `GitHub Issue: <a href=\"${issue.html_url}\">${issue.html_url}</a>`,\n },\n {\n op: \"add\",\n path: \"/fields/System.AreaPath\",\n value: areaPath,\n },\n ];\n\n return await workItemTrackingApi.createWorkItem(\n null,\n workItemData,\n projectName,\n \"User Story\"\n );\n } catch (error) {\n throw new Error(`Failed to create ADO work item: ${error}`);\n }\n};\n\nexport const createADOItem = async (ghIssue: string) => {\n const spinner = ora(`Processing GitHub issue: ${ghIssue}`).start();\n \n try {\n // Validate environment variables\n if (!process.env.GH_TOKEN) {\n throw new Error(\"GH_TOKEN environment variable is required\");\n }\n if (!process.env.ADO_TOKEN) {\n throw new Error(\"ADO_TOKEN environment variable is required\");\n }\n\n spinner.text = \"Fetching GitHub issue details...\";\n const issue = await fetchGitHubIssue(ghIssue);\n spinner.succeed(`Found issue: \"${issue.title}\"`);\n\n // Check if issue already has an ADO work item linked in the project\n const checkSpinner = ora(\"Checking for existing ADO work item...\").start();\n const existingADOLink = await getExistingADOLink(issue);\n \n if (existingADOLink) {\n checkSpinner.succeed(\"ADO work item already exists for this issue!\");\n console.log(`${existingADOLink}`);\n return; // Exit early - no need to create a new work item\n }\n \n checkSpinner.succeed(\"No existing ADO work item found\");\n\n const createSpinner = ora(\"Creating new ADO work item...\").start();\n const workItem = await createADOWorkItem(issue);\n createSpinner.succeed(`Successfully created ADO work item #${workItem.id}`);\n \n console.log(`Work item: ${workItem._links?.html?.href || 'N/A'}`);\n\n // Add to GitHub project and update the ado field with the new work item\n if (workItem._links?.html?.href) {\n const projectSpinner = ora(\"Adding to GitHub project and updating ADO field...\").start();\n await updateGitHubProject(issue, workItem._links.html.href);\n projectSpinner.succeed(\"Updated GitHub project with ADO link\");\n } \n } catch (error) {\n spinner.fail(`Error: ${error instanceof Error ? error.message : error}`);\n process.exit(1);\n }\n}"],
5
- "mappings": ";AAAA,OAAS,WAAAA,OAAe,YCAxB,OAAOC,OAAY,SACnB,OAAS,QAAAC,OAAY,kBAErB,IAAOC,GAAQ,IACND,GAAKD,GAAO,SAAS,UAAU,CAAC,ECHzC,OAAOG,OA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AAE,EAG5DA,EAAS,QAAQ,MAAM,KAAM,CAC/B,IAAMC,EAAiB5C,EAAI,oDAAoD,EAAE,MAAM,EACvF,MAAMoB,GAAoBT,EAAOgC,EAAS,OAAO,KAAK,IAAI,EAC1DC,EAAe,QAAQ,sCAAsC,CAC/D,CACF,OAAShC,EAAO,CACd2B,EAAQ,KAAK,UAAU3B,aAAiB,MAAQA,EAAM,QAAUA,CAAK,EAAE,EACvE,QAAQ,KAAK,CAAC,CAChB,CACF,EDjbO,IAAMiC,GAAaC,GACvB,QAAQ,KAAK,EACb,YAAY,qCAAqC,EACjD,OAAO,yBAA0B,0BAA0B,EAC3D,OAAO,MAAOC,GAAY,CAErBA,EAAQ,SACV,MAAMC,GAAcD,EAAQ,OAAO,CAEvC,CAAC,ElCKHE,GACG,KAAK,MAAM,EACX,QAAQC,EAAkB,CAAC,EAC3B,YAAY,8CAA8C,EAE7DD,GAAQ,YAAY,YAAaE,GAAW,CAAC,EAE7CF,GAAQ,MAAM",
6
- "names": ["program", "figlet", "mind", "auroSplash_default", "fs", "path", "fileURLToPath", "debugLog", "message", "getPackageVersion", "__filename", "__dirname", "packagePath", "error", "program", "ora", "withBuildOptions", "command", "withServerOptions", "terser", "watch", "rmSync", "join", "ora", "rollup", "ora", "spawn", "ora", "shell", "command", "_args", "commandString", "spinner", "finalCommand", "finalArgs", "parts", "isWatchMode", "child", "commandOutput", "data", "output", "resolve", "reject", "code", "fs", "path", "markdownTable", "Docs", "_Docs", "options", "outDir", "outFile", "manifestPath", "getElements", "renderAllElements", "manifestContent", "error", "elements", "docsDir", "apiMarkdown", "apiFilename", "wcaModules", "els", "module", "dec", "a", "b", "element", "includeTitle", "sections", "renderTable", "renderPropertiesAttributesTable", "renderParameters", "getType", "propertiesTable", "methodsTable", "m", "eventsTable", "slotsTable", "cssPartsTable", "cssPropertiesTable", "escapeMarkdown", "properties", "attributes", "mergedData", "processedNames", "prop", "propType", "displayType", "attr", "headers", "rows", "item", "defaultDoubleSanitized", "defaultWrapped", "parameters", "param", "paramType", "description", "name", "data", "get", "capitalize", "filteredData", "p", "value", "table", "text", "obj", "type", "normalizeType", "t", "ref", "result", "pathInput", "fallback", "parts", "current", "s", "str", "fs", "os", "path", "process", "getAuroHomeDir", "homeDir", "withHomeDir", "args", "fromCliRoot", "relativePath", "cliScript", "dirname", "configPath", "file", "Logger", "generateReadmeUrl", "processContentForFile", "templateFiller", "defaultDocsProcessorConfig", "pathFromCwd", "pathLike", "fileConfigs", "config", "processDocFiles", "fileConfig", "err", "runDefaultDocsBuild", "startDevServer", "hmrPlugin", "ora", "DEFAULT_CONFIG", "startDevelopmentServer", "options", "serverSpinner", "serverConfig", "context", "next", "server", "error", "cem", "cemSpinner", "ora", "shell", "configPath", "error", "errorMessage", "api", "docsSpinner", "Docs", "docs", "runDefaultDocsBuild", "serve", "options", "startDevelopmentServer", "analyzeComponents", "cem", "api", "cleanupDist", "distPath", "join", "spinner", "ora", "rmSync", "error", "runBuildStep", "taskName", "taskFn", "successMsg", "failMsg", "result", "buildCombinedBundle", "mainConfig", "demoConfig", "runBuildStep", "mainBundle", "rollup", "demoBundle", "generateDocs", "options", "sourceFiles", "outFile", "skipDocs", "skipSpinner", "ora", "analyzeComponents", "runDefaultDocsBuild", "basename", "join", "nodeResolve", "glob", "litScss", "path", "glob", "watchGlobs", "globs", "items", "item", "filename", "error", "DEFAULTS", "getPluginsConfig", "modulePaths", "options", "watchPatterns", "dedupe", "dev", "allModulePaths", "nodeResolve", "litScss", "join", "watchGlobs", "getMainBundleConfig", "watch", "input", "outputDir", "format", "chunk", "getExternalConfig", "getWatcherConfig", "getDemoConfig", "globPattern", "ignorePattern", "glob", "file", "basename", "watchOptions", "additional", "path", "ora", "buildInProgress", "builds", "MIN_BUILD_INTERVAL", "sourceEventPaths", "OUTPUT_PATHS", "isOutputFile", "filePath", "normalizedPath", "path", "outputPath", "error", "runBuildTask", "taskName", "taskFn", "task", "handleWatcherEvents", "watcher", "options", "onInitialBuildComplete", "isInitialBuild", "buildTasksResults", "scheduledTasksTimer", "bundleSpinner", "watchSpinner", "ora", "buildTasks", "sourceFiles", "outFile", "skipDocs", "skipSpinner", "analyzeSpinner", "analyzeComponents", "docsSpinner", "generateDocs", "checkInitialBuildComplete", "schedulePostBundleTasks", "delay", "event", "inputs", "input", "setupWatchModeListeners", "closeSpinner", "runProductionBuild", "options", "mainBundleConfig", "getMainBundleConfig", "demoConfig", "getDemoConfig", "terser", "generateDocs", "buildCombinedBundle", "setupWatchMode", "isDevMode", "watcher", "watch", "handleWatcherEvents", "startDevelopmentServer", "setupWatchModeListeners", "buildWithRollup", "cleanupDist", "error", "devCommand", "program", "withBuildOptions", "withServerOptions", "dev_default", "options", "build", "ora", "buildWithRollup", "error", "program", "ora", "buildCommand", "program", "withBuildOptions", "build_default", "options", "build", "ora", "buildWithRollup", "error", "exec", "path", "process", "fileURLToPath", "util", "program", "inquirer", "migrate_default", "program", "options", "filename", "fileURLToPath", "dirname", "path", "scriptPath", "execPromise", "util", "exec", "process", "inquirer", "shell", "process", "program", "readFile", "writeFile", "Logger", "fs", "path", "Octokit", "ora", "processContentForFile", "templateFiller", "getFolderItemsFromRelativeRepoPath", "ref", "responseData", "errorMessage", "processFolderItemsIntoFileConfigs", "folderItems", "templatePathToReplace", "rootDir", "fileConfigs", "item", "directorySpinner", "nestedFolderItems", "nestedConfigs", "finalPath", "outputPath", "config", "removeDirectory", "dirPath", "error", "generateDirectoryTree", "prefix", "isLast", "stats", "baseName", "result", "sortedEntries", "i", "entry", "entryPath", "isLastEntry", "newPrefix", "syncDotGithubDir", "githubPath", "removeSpinner", "templatesDefaultGithubPath", "processSpinner", "treeSpinner", "githubDirPath", "treeOutput", "treeError", "sync_default", "program", "options", "Logger", "cwd", "process", "syncDotGithubDir", "codeownersPath", "codeownersFixed", "readFile", "writeFile", "fs", "path", "Logger", "program", "glob", "prepWcaCompatibleCode_default", "code", "sourcePath", "defaultTag", "className", "classDesc", "WAC_DIR", "path", "globPath", "sources", "source", "glob", "err", "createExtendsFile", "filePaths", "fs", "filePath", "resolvedPath", "fileContent", "newPath", "newCode", "prepWcaCompatibleCode_default", "main", "wca_setup_default", "program", "Logger", "error", "program", "chalk", "ora", "appendFile", "readFile", "Logger", "simpleGit", "git", "error", "Git", "_Git", "pattern", "err", "currentBranch", "targetBranch", "commitRange", "commitChunks", "chunk", "commits", "parts", "hash", "date", "author_name", "subject", "bodyLines", "line", "body", "shortHash", "typeMatch", "type", "log", "result", "files", "branchName", "message", "chalk", "MAX_SUBJECT_LENGTH", "MAX_BODY_LENGTH", "getColoredType", "type", "wrapString", "str", "maxLength", "words", "result", "currentLine", "word", "displayDebugView", "commitList", "commit", "subject", "body", "github", "getExistingLabels", "token", "octokit", "context", "owner", "repo", "prNumber", "existingLabels", "label", "error", "applyLabelToPR", "prefixedLabel", "existingSemanticLabels", "existingLabel", "generateReleaseNotes", "commitList", "releaseCommitTypes", "releaseCommits", "commit", "commitsToShow", "bodyLines", "line", "formattedLine", "chalk", "analyzeCommits", "debug", "setLabel", "releaseNotes", "spinner", "ora", "Git", "displayDebugView", "commitTypes", "formattedTypes", "type", "getColoredType", "handleLabels", "error", "validCommitTypes", "foundCommitTypes", "selectedLabel", "highestPriorityIndex", "priorityIndex", "labelSpinner", "getExistingLabels", "applyLabelToPR", "errorMessage", "check_commits_default", "program", "option", "analyzeCommits", "fs", "get", "chalk", "program", "ora", "pr_release_default", "option", "updatePackageJson", "namespace", "prNumber", "packageSpinner", "packageJsonPath", "packageJson", "releaseVersion", "packageComponent", "packageName", "incrementVersion", "getIncrementVersion", "packageVersion", "error", "spinner", "resolve", "handleResponse", "res", "data", "chunk", "packageData", "versions", "maxIteration", "versionRegex", "version", "match", "iteration", "registryUrl", "req", "err", "path", "fileURLToPath", "program", "open", "__filename", "fileURLToPath", "cliRootDir", "path", "test_default", "program", "option", "command", "coveragePath", "files", "shell", "open", "fs", "path", "program", "inquirer", "ora", "fs", "path", "ora", "JsonConfig", "toYaml", "config", "key", "value", "k", "v", "createMultiGitterDependencyTreeConfig", "outputPath", "spinner", "configContent", "configPath", "error", "fs", "getBatchedUpdateOrder", "dependencyTree", "inDegree", "batches", "currentBatch", "queue", "pkg", "queueLength", "i", "current", "dependent", "getJsonFilesFromDirectory", "directory", "file", "formatDependencyTree", "jsonFileDirectory", "targetDependencies", "files", "contents", "data", "packageName", "peerDependencies", "devDependencies", "dependencies", "allDependencies", "dependency", "relevantPackages", "node", "dep", "target", "_filteredDependencyTree", "CONFIG_DIR", "withHomeDir", "OUTPUT_DIR", "auroComponents", "auroPackages", "getOrCreateDependencyTree", "relevantPackages", "fs", "OUTPUT_DIR", "CONFIG_DIR", "error", "spinner", "ora", "createMultiGitterDependencyTreeConfig", "multiGitterCommand", "fromCliRoot", "path", "shell", "formatDependencyTree", "getDependencyBatchesFromTree", "dependencyTreePath", "dependencyTree", "batches", "getBatchedUpdateOrder", "agent_default", "program", "option", "answers", "inquirer", "input", "value", "component", "batchedUpdateOrderText", "batch", "index", "pkg", "resolve", "program", "docsCommand", "program", "withServerOptions", "docs_default", "options", "cem", "api", "docs", "serve", "program", "Octokit", "azdev", "ora", "fetchGitHubIssue", "issueUrl", "ghToken", "octokit", "owner", "repo", "issueNumberStr", "urlMatch", "shortMatch", "issueNumber", "issue", "error", "getExistingADOLink", "query", "variables", "project19Item", "item", "adoFieldValue", "fieldValue", "updateGitHubProject", "adoWorkItemUrl", "projectNumber", "response", "projectId", "issueId", "adoField", "field", "projectItemId", "createADOWorkItem", "adoToken", "orgUrl", "projectName", "areaPath", "authHandler", "workItemTrackingApi", "workItemData", "createADOItem", "ghIssue", "spinner", "checkSpinner", "existingADOLink", "createSpinner", "workItem", "projectSpinner", "adoCommand", "program", "options", "createADOItem", "program", "getPackageVersion", "auroSplash_default"]
4
+ "sourcesContent": ["import { program } from \"commander\";\nimport auroSplash from \"#utils/auroSplash.js\";\nimport getPackageVersion from \"#utils/packageVersion.js\";\n\n// Register commands (importing them will register them)\nimport \"#commands/dev.js\";\nimport \"#commands/build.js\";\nimport \"#commands/migrate.js\";\nimport \"#commands/sync.js\";\nimport \"#commands/wca-setup.js\";\nimport \"#commands/check-commits.ts\";\nimport \"#commands/pr-release.ts\";\nimport \"#commands/test.js\";\nimport \"#commands/agent.ts\";\nimport \"#commands/docs.ts\";\nimport \"#commands/ado.ts\";\n\nprogram\n .name(\"auro\")\n .version(getPackageVersion())\n .description(\"A cli tool to support the Auro Design System\");\n\nprogram.addHelpText(\"beforeAll\", auroSplash());\n\nprogram.parse();\n", "import figlet from \"figlet\";\nimport { mind } from \"gradient-string\";\n\nexport default () => {\n return mind(figlet.textSync(\"Auro CLI\"));\n};\n", "/* eslint-disable no-underscore-dangle, no-undef */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n/**\n * Simple debug logger that only prints when DEBUG environment variable is set.\n * @param {string} message - The message to log.\n */\nfunction debugLog(message) {\n if (process.env.DEBUG) {\n console.log(`[DEBUG] ${message}`);\n }\n}\n\n/**\n * Retrieves the version from the package.json file.\n * @returns {string} The version from package.json.\n */\nexport default function getPackageVersion() {\n try {\n // Get the directory path of the current module\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n debugLog(`Current module path: ${__dirname}`);\n\n // Standard installed module location - current directory\n const packagePath = path.resolve(__dirname, \"..\", \"package.json\");\n\n debugLog(`Checking package.json at: ${packagePath}`);\n if (fs.existsSync(packagePath)) {\n debugLog(`Found package.json at: ${packagePath}`);\n const packageJson = JSON.parse(fs.readFileSync(packagePath, \"utf8\"));\n return packageJson.version;\n }\n\n // Fallback to a default version if we can't find the package.json\n debugLog(\n \"Could not find package.json in the standard installed module location, using default version\",\n );\n return \"0.0.0\";\n } catch (error) {\n console.error(\"Error retrieving package version:\", error);\n return \"0.0.0\";\n }\n}\n", "import { program } from \"commander\";\nimport ora from \"ora\";\nimport {\n withBuildOptions,\n withServerOptions,\n} from \"#commands/_sharedOptions.js\";\nimport { buildWithRollup } from \"#scripts/build/index.js\";\n\nlet devCommand = program\n .command(\"dev\")\n .description(\"Runs development server for auro components\");\n\ndevCommand = withBuildOptions(devCommand);\ndevCommand = withServerOptions(devCommand);\n\nexport default devCommand.action(async (options) => {\n try {\n const build = ora(\"Initializing...\");\n\n if (options.watch) {\n build.text = \"Waiting for changes...\";\n build.spinner = \"bouncingBar\";\n build.color = \"green\";\n } else {\n build.text =\n options.docs === false\n ? \"Building component (docs disabled)\"\n : \"Building component\";\n }\n\n build.start();\n\n if (!options.watch) {\n build.succeed(\"Build completed!\");\n }\n\n await buildWithRollup({ ...options, dev: true, watch: options.watch });\n } catch (error) {\n // If there's any active spinner, we need to fail it\n ora().fail(`Build failed: ${error.message}`);\n console.error(error);\n process.exit(1);\n }\n});\n", "/**\n * @param {import('commander').Command} command\n * @returns {import('commander').Command}\n */\nexport function withBuildOptions(command) {\n return command\n .option(\"-m, --module-paths [paths...]\", \"Path(s) to node_modules folder\")\n .option(\"-w, --watch\", \"Watches for changes\")\n .option(\"--skip-docs\", \"Skip documentation generation\", false)\n .option(\n \"--wca-input [files...]\",\n \"Source file(s) to analyze for API documentation\",\n )\n .option(\"--wca-output [files...]\", \"Output file(s) for API documentation\");\n}\n\n/**\n * @param {import('commander').Command} command\n */\nexport function withServerOptions(command) {\n return command\n .option(\"-s, --serve\", \"Starts a server\")\n .option(\"-p, --port <number>\", \"Port for the server\")\n .option(\"-o, --open\", \"Open the browser after starting the server\");\n}\n", "import terser from \"@rollup/plugin-terser\";\nimport { watch } from \"rollup\";\nimport {\n buildCombinedBundle,\n cleanupDist,\n generateDocs,\n} from \"./bundleHandlers.js\";\nimport {\n getDemoConfig,\n getMainBundleConfig,\n} from \"./configUtils.js\";\nimport { startDevelopmentServer } from \"./devServerUtils.js\";\nimport {\n handleWatcherEvents,\n setupWatchModeListeners,\n} from \"./watchModeHandlers.js\";\n\n/**\n * Run a production build once\n * @param {object} options - Build options\n * @returns {Promise<void>}\n */\nasync function runProductionBuild(options) {\n const mainBundleConfig = getMainBundleConfig(options);\n const demoConfig = getDemoConfig(options);\n\n // Add terser for minification in production\n if (!options.dev) {\n mainBundleConfig.config.plugins.push(terser());\n }\n\n // Generate docs if enabled\n await generateDocs(options);\n\n // Build main and demo bundles\n await buildCombinedBundle(mainBundleConfig.config, demoConfig.config);\n}\n\n/**\n * Set up watch mode for development\n * @param {object} options - Build options\n * @returns {Promise<object>} - Rollup watcher\n */\nasync function setupWatchMode(options) {\n const { dev: isDevMode } = options;\n const mainBundleConfig = getMainBundleConfig({ ...options, watch: true });\n const demoConfig = getDemoConfig({ ...options, watch: true });\n\n // Create and configure the watcher\n const watcher = watch([mainBundleConfig.config, demoConfig.config]);\n\n // Set up watcher event handlers\n handleWatcherEvents(\n watcher,\n options,\n isDevMode ? async () => startDevelopmentServer(options) : undefined,\n );\n\n // Set up clean shutdown\n setupWatchModeListeners(watcher);\n\n return watcher;\n}\n\n/**\n * Build the component using Rollup with the provided options\n * @param {object} options - Build configuration options\n * @param {boolean} [options.dev=false] - Whether to run in development mode\n * @param {boolean} [options.watch] - Whether to run in watch mode (defaults to value of dev)\n * @param {boolean} [options.docs=true] - Whether to generate documentation\n * @returns {Promise<object|void>} - Rollup watcher if in watch mode\n */\nexport async function buildWithRollup(options = {}) {\n try {\n const { watch } = options;\n\n // Clean output directory\n cleanupDist();\n\n // Run production build once or set up watch mode\n // Only use watch mode if explicitly enabled\n if (watch) {\n return await setupWatchMode(options);\n }\n\n return await runProductionBuild(options);\n } catch (error) {\n throw new Error(`Build failed: ${error.message}`);\n }\n}\n\n// Re-export utilities for backward compatibility\nexport { cleanupDist };\n", "import { rmSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport ora from \"ora\";\nimport { rollup } from \"rollup\";\nimport { analyzeComponents } from \"#scripts/analyze.js\";\nimport { runDefaultDocsBuild } from \"#scripts/build/defaultDocsBuild.js\";\n\n/**\n * Clean up the dist folder\n * @returns {boolean} Success status\n */\nexport function cleanupDist() {\n const distPath = join(\"./dist\");\n const spinner = ora(\"Cleaning dist folder...\").start();\n\n try {\n rmSync(distPath, { recursive: true, force: true });\n spinner.succeed(\"All clean! Dist folder wiped.\");\n return true;\n } catch (error) {\n spinner.fail(`Oops! Couldn't clean dist/ folder: ${error.message}`);\n console.error(error);\n return false;\n }\n}\n\n/**\n * Run a build step with spinner feedback\n * @param {string} taskName - Name of the task for spinner text\n * @param {Function} taskFn - Async function to execute the task\n * @param {string} successMsg - Message to show on success\n * @param {string} failMsg - Message to show on failure\n * @returns {Promise<any>} - Result of the task function or throws error\n */\nasync function runBuildStep(taskName, taskFn, successMsg, failMsg) {\n const spinner = ora(taskName).start();\n\n try {\n const result = await taskFn();\n spinner.succeed(successMsg);\n return result;\n } catch (error) {\n spinner.fail(failMsg);\n console.error(`Error: ${error.message}`);\n throw error;\n }\n}\n\n/**\n * Builds the TypeScript definition files\n * @param {object} config - Rollup config for d.ts generation\n * @param {object} outputConfig - Output configuration for d.ts files\n */\nexport async function buildTypeDefinitions(config, outputConfig) {\n return runBuildStep(\n \"Creating type definitions...\",\n async () => {\n const bundle = await rollup(config);\n await bundle.write(outputConfig);\n await bundle.close();\n },\n \"Types files built.\",\n \"Darn! Type definitions failed.\",\n );\n}\n\n/**\n * Builds both the main bundle and demo files in one operation\n * @param {object} mainConfig - Rollup config for the main bundle\n * @param {object} demoConfig - Rollup config for the demo files\n */\nexport async function buildCombinedBundle(mainConfig, demoConfig) {\n return runBuildStep(\n `Bundling ${mainConfig.name || \"main\"} and ${demoConfig.name || \"demo\"}...`,\n async () => {\n // Build main bundle\n const mainBundle = await rollup(mainConfig);\n await mainBundle.write(mainConfig.output);\n await mainBundle.close();\n\n // Build demo files\n const demoBundle = await rollup(demoConfig);\n await demoBundle.write(demoConfig.output);\n await demoBundle.close();\n },\n `Bundles ready! ${mainConfig.name || \"Main\"} and ${demoConfig.name || \"demo\"} built.`,\n \"Bundle hiccup! Build failed.\",\n );\n}\n\n/**\n * Analyzes web components and generates API documentation.\n * @param {object} options - Options containing wcaInput and wcaOutput\n */\nexport async function generateDocs(options) {\n const { wcaInput: sourceFiles, wcaOutput: outFile, skipDocs } = options;\n\n if (skipDocs) {\n const skipSpinner = ora(\"Skipping docs generation...\").start();\n\n setTimeout(() => {\n skipSpinner.succeed(\"Docs generation skipped.\");\n }, 0);\n return;\n }\n\n return runBuildStep(\n \"Analyzing components and making docs...\",\n async () => {\n await analyzeComponents(sourceFiles, outFile);\n await runDefaultDocsBuild();\n },\n \"Docs ready! Looking good.\",\n \"Doc troubles!\",\n );\n}\n", "import ora from \"ora\";\nimport { shell } from \"#utils/shell.js\";\nimport Docs from \"./docs-generator.ts\";\nimport { configPath } from \"#utils/pathUtils.js\";\nimport { runDefaultDocsBuild } from \"../build/defaultDocsBuild.js\";\nimport { startDevelopmentServer } from \"../build/devServerUtils.js\";\n\nexport async function cem() {\n const cemSpinner = ora(\"Generating Custom Elements Manifest...\").start();\n\n try {\n // The shell function returns a promise that resolves when the command completes\n await shell(\n `npx --package=@custom-elements-manifest/analyzer -y -- cem analyze --config '${configPath(\"custom-elements-manifest.config.mjs\")}'`,\n );\n cemSpinner.succeed(\"Custom Elements Manifest generated successfully!\");\n } catch (error) {\n // Check if the error is just the plugin issue but the manifest was still created\n const errorMessage = error instanceof Error ? error.message : String(error);\n cemSpinner.warn('CEM analyzer completed with warnings: ' + errorMessage);\n }\n}\n\nexport async function api() {\n const docsSpinner = ora(\"Generating API md file...\").start();\n\n try {\n await Docs.generate();\n docsSpinner.succeed(\"API md file generated successfully!\");\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n docsSpinner.fail(\"Failed to generate API md file: \" + errorMessage);\n throw error;\n }\n}\n\nexport async function docs() {\n const docsSpinner = ora(\"Compiling documentation...\").start();\n\n try {\n await runDefaultDocsBuild();\n docsSpinner.succeed(\"Documentation compiled successfully!\");\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n docsSpinner.fail(\"Failed to compile MD documentation: \" + errorMessage);\n throw error;\n }\n}\n\nexport async function serve(options = {}) {\n await startDevelopmentServer(options);\n}\n", "import { spawn } from \"node:child_process\";\nimport ora from \"ora\";\n\nconst shell = (command, _args) => {\n const commandString = `${command} ${_args ? _args.join(\" \") : \"\"}`;\n\n // Initialize the spinner but don't start it - we'll just use it for completion status\n const spinner = ora();\n\n // Parse command string if no args are provided\n let finalCommand = command;\n let finalArgs = _args || [];\n\n if (!_args && typeof command === \"string\") {\n const parts = command.split(\" \");\n finalCommand = parts[0];\n finalArgs = parts.slice(1);\n }\n\n // Simple check for watch mode - if the command contains --watch or -w flags\n const isWatchMode =\n commandString.includes(\"--watch\") || commandString.includes(\" -w\");\n\n // Use different stdio configurations based on watch mode\n const stdio = isWatchMode\n ? \"inherit\" // Full TTY support for watch mode\n : [\"inherit\", \"pipe\", \"pipe\"]; // Capture output but allow input for normal mode\n\n const child = spawn(finalCommand, finalArgs, {\n stdio,\n shell: true,\n });\n\n // Only set up output capture if we're not in watch mode (stdio isn't 'inherit')\n if (!isWatchMode) {\n // Store command output to display after completion\n const commandOutput = [];\n\n child.stdout?.on(\"data\", (data) => {\n // Convert buffer to string\n const output = data.toString();\n\n // Store full output\n commandOutput.push(output);\n\n // Output directly to console\n process.stdout.write(output);\n });\n\n child.stderr?.on(\"data\", (data) => {\n const output = data.toString();\n commandOutput.push(output);\n process.stderr.write(output);\n });\n }\n\n // Set up a promise to track command completion\n return new Promise((resolve, reject) => {\n child.on(\"close\", (code) => {\n if (code !== 0) {\n // In watch mode, don't treat exit codes as errors - these are typically user terminations\n if (isWatchMode) {\n spinner.info(`Watch mode terminated with code ${code}`);\n resolve(); // Resolve without an error for watch mode commands\n } else {\n spinner.fail(`${commandString} failed (code ${code})`);\n reject(new Error(`Command failed with exit code ${code}`));\n }\n } else {\n spinner.succeed(`${commandString} completed successfully`);\n resolve();\n }\n });\n });\n};\n\nexport { shell };\n", "import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { markdownTable } from \"markdown-table\";\nimport type {\n Package,\n Module,\n Declaration,\n CustomElementDeclaration,\n ClassMember,\n Parameter,\n Attribute\n} from 'custom-elements-manifest';\n\ninterface GenerateOptions {\n outDir?: string;\n outFile?: string;\n manifestPath?: string;\n}\n\ninterface MergedTableData {\n name: string;\n properties: string;\n attributes: string;\n modifiers: string;\n type: string;\n default: string;\n description: string;\n}\n\nexport default class Docs {\n private static manifest: Package = { schemaVersion: \"1.0.0\", readme: \"\", modules: [] };\n\n /**\n * Generate markdown documentation for all components\n */\n static generate(options: GenerateOptions = {}): void {\n const {\n outDir = \"./docs\",\n outFile = \"api.md\",\n manifestPath = \"./custom-elements.json\",\n } = options;\n\n const { getElements, renderAllElements } = Docs;\n\n // Use provided manifest or fallback to default\n if (manifestPath) {\n try {\n const manifestContent = fs.readFileSync(manifestPath, \"utf8\");\n Docs.manifest = JSON.parse(manifestContent) as Package;\n } catch (error) {\n console.error(`Error reading manifest file at ${manifestPath}:`, error);\n throw error;\n }\n }\n\n const elements = getElements();\n\n // Create docs directory if it doesn't exist\n const docsDir = outDir;\n if (!fs.existsSync(docsDir)) {\n fs.mkdirSync(docsDir, { recursive: true });\n }\n\n // Generate combined API documentation\n const apiMarkdown = renderAllElements(elements);\n const apiFilename = path.join(docsDir, outFile);\n fs.writeFileSync(apiFilename, apiMarkdown);\n console.log(`Generated combined API documentation at ${apiFilename}`);\n }\n\n /**\n * Extract custom elements from the manifest\n */\n static getElements(): CustomElementDeclaration[] {\n\n // if wca exists, use only wca modules\n const wcaModules = Docs.manifest.modules.filter(Docs.isWcaModule);\n\n return Docs.manifest.modules.reduce(\n (els: CustomElementDeclaration[], module: Module) =>\n els.concat(\n module.declarations?.filter(\n (dec: Declaration): dec is CustomElementDeclaration => \n 'customElement' in dec && dec.customElement === true && 'tagName' in dec && \n (wcaModules.length > 0 ? Docs.isWcaModule(module) : true),\n ) ?? [],\n ),\n [],\n );\n }\n\n /**\n * Check if a module has a path that matches the WCA pattern\n */\n static isWcaModule(module: Module): boolean {\n // Check if the module path matches \"scripts/wca/auro-*.js\"\n const { path } = module;\n\n if (!path) {\n return false;\n }\n \n // Match the pattern: starts with \"scripts/wca/auro-\" and ends with \".js\"\n return path.startsWith('scripts/wca/auro-') && path.endsWith('.js');\n }\n\n /**\n * Render all elements into a single markdown document\n */\n static renderAllElements(elements: CustomElementDeclaration[]): string {\n return `${elements\n .sort((a, b) => (a.tagName || '').localeCompare(b.tagName || ''))\n .map((element: CustomElementDeclaration) => Docs.renderElement(element, true))\n .join(\"\\n\\n\")}`;\n }\n\n /**\n * Render a single element as markdown\n */\n static renderElement(element: CustomElementDeclaration, includeTitle = true): string {\n const sections = [];\n const { renderTable, renderPropertiesAttributesTable, renderParameters, getType } = Docs;\n \n // Title and description\n sections.push(includeTitle ? `# ${element.tagName}` : '');\n\n if (element.description) {\n sections.push(element.description);\n }\n \n // Properties & Attributes table\n const propertiesTable = renderPropertiesAttributesTable(element);\n if (propertiesTable) {\n sections.push(propertiesTable.trim());\n }\n \n // Methods table\n const methodsTable = renderTable(\n \"Methods\",\n [\"name\", \"parameters\", \"return\", \"description\"],\n (element.members || [])\n .filter(\n (m: ClassMember) =>\n m.kind === \"method\" && ('privacy' in m ? m.privacy !== \"private\" : true) && m.name[0] !== \"_\",\n )\n .map((m: ClassMember) => ({\n ...m,\n parameters: renderParameters('parameters' in m ? m.parameters as Parameter[] : undefined),\n return: 'return' in m && m.return ? getType(m.return) : \"\",\n })),\n );\n if (methodsTable) {\n sections.push(methodsTable.trim());\n }\n \n // Events table\n const eventsTable = renderTable(\n \"Events\",\n [\"name\", \"description\"],\n element.events as unknown as Record<string, unknown>[],\n );\n if (eventsTable) {\n sections.push(eventsTable.trim());\n }\n \n // Slots table\n const slotsTable = renderTable(\n \"Slots\",\n [[\"name\", \"(default)\"], \"description\"],\n element.slots as unknown as Record<string, unknown>[],\n );\n if (slotsTable) {\n sections.push(slotsTable.trim());\n }\n \n // CSS Shadow Parts table\n const cssPartsTable = renderTable(\n \"CSS Shadow Parts\",\n [\"name\", \"description\"],\n element.cssParts as unknown as Record<string, unknown>[],\n );\n if (cssPartsTable) {\n sections.push(cssPartsTable.trim());\n }\n \n // CSS Custom Properties table\n const cssPropertiesTable = renderTable(\n \"CSS Custom Properties\",\n [\"name\", \"description\"],\n element.cssProperties as unknown as Record<string, unknown>[],\n );\n if (cssPropertiesTable) {\n sections.push(cssPropertiesTable.trim());\n }\n \n return sections.join('\\n\\n');\n }\n\n /**\n * Render combined properties and attributes table\n */\n static renderPropertiesAttributesTable(element: CustomElementDeclaration): string {\n \n const { getType, escapeMarkdown } = Docs;\n \n const properties = element.members?.filter(\n (m: ClassMember) => \n m.kind === \"field\" && \n ('privacy' in m ? m.privacy !== \"private\" : true) && \n m.name[0] !== \"_\"\n ) || [];\n const attributes = element.attributes || [];\n\n // Create a merged dataset\n const mergedData: MergedTableData[] = [];\n const processedNames = new Set<string>();\n\n // Process properties first (only include those with descriptions)\n properties.forEach((prop: ClassMember) => {\n if (prop.description?.trim()) {\n const propType = getType(prop) || \"\";\n const returnType = 'return' in prop && prop.return ? getType(prop.return) : \"\";\n const displayType = returnType || propType;\n \n mergedData.push({\n name: prop.name,\n properties: prop.name,\n attributes: ('attribute' in prop ? prop.attribute as string : '') || \"\",\n modifiers: ('readonly' in prop && prop.readonly ? 'readonly' : ''),\n type: displayType,\n default: ('default' in prop ? prop.default as string : '') || \"\",\n description: prop.description || \"\",\n });\n }\n processedNames.add(prop.name);\n if ('attribute' in prop && prop.attribute) {\n processedNames.add(prop.attribute as string);\n }\n });\n\n // Process attributes that don't have corresponding properties (only include those with descriptions)\n attributes.forEach((attr: Attribute) => {\n if (!processedNames.has(attr.name) && attr.description?.trim()) {\n mergedData.push({\n name: attr.name,\n properties: \"\",\n attributes: attr.name,\n modifiers: \"\",\n type: getType(attr) || \"\",\n default: attr.default || \"\",\n description: attr.description || \"\",\n });\n }\n });\n\n if (mergedData.length === 0) {\n return \"\";\n }\n\n const headers = [\"Properties\", \"Attributes\", \"Modifiers\", \"Type\", \"Default\", \"Description\"];\n const rows = mergedData.map((item: MergedTableData) => {\n const defaultRaw = item.default || \"\";\n const defaultTrimmed = defaultRaw.trim();\n // Remove surrounding single quotes from default values like 'foo'\n const defaultSanitized = defaultTrimmed.replace(/^'([^']+)'$/, \"$1\");\n // Remove surrounding double quotes from default values like \"foo\"\n const defaultDoubleSanitized = defaultSanitized.replace(/^\"([^\"]+)\"$/, \"$1\");\n const defaultWrapped = defaultDoubleSanitized\n ? (defaultDoubleSanitized.startsWith('`') && defaultDoubleSanitized.endsWith('`')\n ? defaultDoubleSanitized\n : `\\`${defaultDoubleSanitized}\\``)\n : \"\";\n return [\n escapeMarkdown(item.properties),\n escapeMarkdown(item.attributes),\n escapeMarkdown(item.modifiers),\n escapeMarkdown(item.type),\n escapeMarkdown(defaultWrapped),\n escapeMarkdown(item.description),\n ];\n });\n\n const table = markdownTable([headers, ...rows]);\n\n return `### Properties & Attributes\n\n${table}\n`;\n }\n\n /**\n * Render method parameters as a formatted string\n */\n static renderParameters(parameters?: Parameter[]): string {\n\n const { escapeMarkdown, getType } = Docs;\n\n if (!parameters || parameters.length === 0) {\n return \"None\";\n }\n\n return parameters\n .map(\n (param: Parameter) => {\n const paramType = getType(param) || \"any\";\n const description = param.description ? ` - ${param.description}` : \"\";\n return `\\`${param.name}\\` (${escapeMarkdown(paramType)})${escapeMarkdown(description)}`;\n }\n )\n .join(\"<br>\");\n }\n\n /**\n * Renders a markdown table of data, plucking the given properties from each item in `data`.\n */\n static renderTable(\n name: string, \n properties: (string | string[])[], \n data?: Array<Record<string, unknown>>\n ): string {\n\n const { escapeMarkdown, get, capitalize } = Docs;\n\n if (data === undefined || data.length === 0) {\n return \"\";\n }\n\n // Filter out items without descriptions\n const filteredData = data.filter((item: Record<string, unknown>) => {\n const { description } = item;\n return typeof description === 'string' && description.trim();\n });\n\n if (filteredData.length === 0) {\n return \"\";\n }\n\n const headers = properties\n .map((p: string | string[]) => capitalize((Array.isArray(p) ? p[0] : p).split(\".\")[0]));\n\n const rows = filteredData\n .map((item: Record<string, unknown>) =>\n properties\n .map((p: string | string[]) => {\n const value = get(item, p);\n // Handle multiline content and escape characters for markdown\n return escapeMarkdown(String(value || \"\"));\n })\n );\n\n const table = markdownTable([headers, ...rows]);\n\n return `### ${name}\n\n${table}\n`;\n }\n\n /**\n * Escape markdown special characters for table content\n */\n static escapeMarkdown(text: string): string {\n return text\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\n/g, \"<br>\")\n .replace(/\\|/g, \"\\\\|\");\n }\n\n /**\n * Extract and format type information from a property or attribute according to custom-elements-manifest schema\n */\n // biome-ignore lint/suspicious/noExplicitAny: utility method needs to work with any object structure\n static getType(obj: any): string {\n if (!obj || !obj.type) {\n return \"\";\n }\n\n const { type } = obj;\n\n // Utility to normalize type text: fix union spacing and replace single quotes with backticks\n const normalizeType = (text: string): string => {\n return text\n // Normalize union separators to have spaces around |\n .replace(/\\s*\\|\\s*/g, ' | ')\n // Replace any single-quoted type segments with backticks\n .replace(/'([^']+)'/g, '`$1`');\n };\n\n // Handle simple string type\n if (typeof type === 'string') {\n return normalizeType(type);\n }\n\n // Handle type with text property\n if (type.text) {\n return normalizeType(type.text);\n }\n\n // Handle union types or arrays of types\n if (Array.isArray(type)) {\n // biome-ignore lint/suspicious/noExplicitAny: handling dynamic type structures from manifest\n return type.map((t: any) => {\n if (typeof t === 'string') return t;\n if (t.text) return t.text;\n if (t.name) return t.name;\n return String(t);\n }).join(' \\\\| ');\n }\n\n // Handle complex type objects\n if (type.name) {\n return normalizeType(type.name);\n }\n\n // Handle references\n if (type.references && Array.isArray(type.references)) {\n // biome-ignore lint/suspicious/noExplicitAny: handling dynamic reference structures from manifest\n return type.references.map((ref: any) => ref.name || String(ref)).join(' \\\\| ');\n }\n\n // Fallback to string representation\n const result = String(type);\n return normalizeType(result);\n }\n\n /**\n * Reads a (possibly deep) path off of an object.\n */\n // biome-ignore lint/suspicious/noExplicitAny: utility method needs to work with any object structure\n static get(obj: any, pathInput: string | string[]): string {\n let fallback = \"\";\n let path: string = pathInput as string;\n if (Array.isArray(pathInput)) {\n [path, fallback] = pathInput;\n }\n const parts = path.split(\".\");\n // biome-ignore lint/suspicious/noExplicitAny: utility method needs to work with any object structure\n let current: any = obj;\n while (current && parts.length) {\n current = current[parts.shift() as string];\n }\n return current == null || current === \"\" ? fallback : String(current);\n }\n\n /**\n * Capitalize the first letter of a string and add spaces before capital letters in camelCase\n */\n static capitalize(s: string): string {\n \n // Add spaces before capital letters and capitalize first letter\n return s\n .replace(/([A-Z])/g, ' $1')\n .replace(/^./, str => str.toUpperCase())\n .trim();\n }\n}\n", "import fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport process from \"node:process\";\n\nexport function getAuroHomeDir() {\n const homeDir = os.homedir() || process.env.HOME || process.env.USERPROFILE;\n\n if (!homeDir) {\n throw new Error(\"Unable to determine user home directory\");\n }\n\n return path.join(homeDir, \".auro\");\n}\n\nexport function withHomeDir(...args) {\n return path.join(getAuroHomeDir(), ...args);\n}\n\nexport function fromCliRoot(...relativePath) {\n const cliScript = fs.realpathSync(process.argv[1]);\n const dirname = path.dirname(cliScript);\n\n return path.resolve(dirname, ...relativePath);\n}\n \nexport const configPath = (file) => fromCliRoot(\"configs\",file)\n\nexport const migrationPath = (path) => fromCliRoot(\"migrations\",path)\n", "import { Logger } from \"@aurodesignsystem/auro-library/scripts/utils/logger.mjs\";\nimport {\n generateReadmeUrl,\n processContentForFile,\n templateFiller,\n} from \"@aurodesignsystem/auro-library/scripts/utils/sharedFileProcessorUtils.mjs\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nconst PAGE_TEMPLATE_PATH = \"/docs/pages\";\n\n/**\n * Processor config object.\n * @typedef {Object} ProcessorConfig\n * @property {boolean} [overwriteLocalCopies=true] - The release version tag to use instead of master.\n * @property {string} [remoteReadmeVersion=\"master\"] - The release version tag to use instead of master.\n * @property {string} [remoteReadmeUrl] - The release version tag to use instead of master.\n * @property {string} [remoteReadmeVariant=\"\"] - The variant string to use for the README source (like \"_esm\" to make README_esm.md).\n * @param {ProcessorConfig} config - The configuration for this processor.\n */\nexport const defaultDocsProcessorConfig = {\n overwriteLocalCopies: true,\n remoteReadmeVersion: \"master\",\n // eslint-disable-next-line no-warning-comments\n // TODO: remove this variant when all components are updated to use latest auro-library\n // AND the default README.md is updated to use the new paths\n remoteReadmeVariant: \"_updated_paths\",\n};\n\nfunction pathFromCwd(pathLike) {\n const cwd = process.cwd();\n return `${cwd}/${pathLike}`;\n}\n\n/**\n * @param {ProcessorConfig} config - The configuration for this processor.\n * @returns {import('../utils/sharedFileProcessorUtils').FileProcessorConfig[]}\n */\nexport async function fileConfigs(config) {\n const pageTemplateFullPath = pathFromCwd(PAGE_TEMPLATE_PATH);\n let pageFiles = [];\n\n if (fs.existsSync(pageTemplateFullPath)) {\n pageFiles = await fs.promises.readdir(pageTemplateFullPath);\n }\n\n const pageObjects = pageFiles.map((file) => ({\n identifier: file,\n input: path.join(pathFromCwd(PAGE_TEMPLATE_PATH), file),\n output: pathFromCwd(`/demo/${file}`),\n }));\n\n return [\n {\n identifier: \"README.md\",\n input: {\n remoteUrl:\n config.remoteReadmeUrl ||\n generateReadmeUrl(\n config.remoteReadmeVersion,\n config.remoteReadmeVariant,\n ),\n fileName: pathFromCwd(\"/docTemplates/README.md\"),\n overwrite: config.overwriteLocalCopies,\n },\n output: pathFromCwd(\"/README.md\"),\n },\n {\n identifier: \"index.md\",\n input: pathFromCwd(\"/docs/partials/index.md\"),\n output: pathFromCwd(\"/demo/index.md\"),\n mdMagicConfig: {\n output: {\n directory: pathFromCwd(\"/demo\"),\n },\n },\n },\n {\n identifier: \"api.md\",\n input: pathFromCwd(\"/docs/partials/api.md\"),\n output: pathFromCwd(\"/demo/api.md\"),\n preProcessors: [templateFiller.formatApiTable],\n },\n ...pageObjects]\n};\n\n/**\n *\n * @param {ProcessorConfig} config - The configuration for this processor.\n * @return {Promise<void>}\n */\nexport async function processDocFiles(config = defaultDocsProcessorConfig) {\n // setup\n await templateFiller.extractNames();\n\n const fileConfigsList = await fileConfigs(config);\n\n for (const fileConfig of fileConfigsList) {\n try {\n // eslint-disable-next-line no-await-in-loop\n await processContentForFile(fileConfig);\n } catch (err) {\n Logger.error(`Error processing ${fileConfig.identifier}: ${err.message}`);\n }\n }\n}\n\nexport async function runDefaultDocsBuild() {\n await processDocFiles({\n ...defaultDocsProcessorConfig,\n remoteReadmeUrl:\n \"https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/README.md\",\n });\n}\n", "import { startDevServer } from \"@web/dev-server\";\nimport { hmrPlugin } from \"@web/dev-server-hmr\";\nimport ora from \"ora\";\n/**\n * Default server configuration\n */\nconst DEFAULT_CONFIG = {\n watch: true,\n nodeResolve: true,\n basePath: \"/\",\n rootDir: \"./demo\",\n hmrInclude: [\"src/**/*\", \"demo/**/*\", \"apiExamples/**/*\", \"docs/**/*\"],\n};\n\n/**\n * Starts the development server\n * @param {object} options - Server options\n * @param {boolean} [options.serve] - Whether to start the server\n * @param {number} [options.port] - Port number for the server\n * @param {boolean} [options.open] - Whether to open the browser\n * @param {string} [options.rootDir] - Root directory for serving files\n * @param {string[]} [options.hmrInclude] - Patterns to include for HMR\n * @returns {Promise<object>} - The server instance\n */\nexport async function startDevelopmentServer(options = {}) {\n if (!options.serve) return;\n\n const serverSpinner = ora(\"Firing up dev server...\\n\").start();\n\n try {\n // Merge options with defaults\n const serverConfig = {\n port: Number(options.port) || undefined,\n open: options.open ? \"/\" : undefined,\n watch: options.watch ?? DEFAULT_CONFIG.watch,\n nodeResolve: options.nodeResolve ?? DEFAULT_CONFIG.nodeResolve,\n basePath: options.basePath ?? DEFAULT_CONFIG.basePath,\n rootDir: options.rootDir ?? DEFAULT_CONFIG.rootDir,\n\n // HTML file extension middleware\n middleware: [\n function rewriteIndex(context, next) {\n if (!context.url.endsWith(\"/\") && !context.url.includes(\".\")) {\n context.url += \".html\";\n }\n return next();\n },\n ],\n\n // Hot Module Replacement plugin\n plugins: [\n hmrPlugin({\n include: options.hmrInclude ?? DEFAULT_CONFIG.hmrInclude,\n }),\n ],\n };\n\n // Start the server with our configuration\n const server = await startDevServer({\n config: serverConfig,\n readCliArgs: false,\n readFileConfig: false,\n });\n\n serverSpinner.stop();\n return server;\n } catch (error) {\n serverSpinner.fail(\"Server snag! Couldn't start dev server.\");\n console.error(\"Error starting development server:\", error);\n throw new Error(`Development server failed to start: ${error.message}`);\n }\n}\n", "\nimport { cem, api } from '#scripts/docs/index.ts';\n\n/**\n * Analyzes web components and generates API documentation.\n */\nexport async function analyzeComponents() {\n \n await cem();\n\n await api();\n\n}", "import { basename, join } from \"node:path\";\nimport { nodeResolve } from \"@rollup/plugin-node-resolve\";\nimport { glob } from \"glob\";\nimport { litScss } from \"rollup-plugin-scss-lit\";\nimport { watchGlobs } from \"./plugins.js\";\n\n// Default paths used across configurations\nconst DEFAULTS = {\n moduleDirectories: [\"node_modules\"],\n modulePaths: [\"../../node_modules\", \"../node_modules\", \"node_modules\"],\n watchPatterns: [\"./apiExamples/**/*\", \"./docs/**/*\"],\n};\n\n/**\n * Creates Rollup plugins configuration.\n * @param {string[]} modulePaths - Additional paths to include in litScss.\n * @param {object} options - Additional options for plugins\n * @returns {object[]} - Array of Rollup plugins.\n */\nexport function getPluginsConfig(modulePaths = [], options = {}) {\n const {\n watchPatterns = DEFAULTS.watchPatterns,\n dedupe = [\"lit\", \"lit-element\", \"lit-html\"],\n dev = false,\n } = options;\n\n // Combine default paths with any user-provided paths\n const allModulePaths = [...DEFAULTS.modulePaths, ...modulePaths];\n\n return [\n nodeResolve({\n dedupe,\n preferBuiltins: false,\n moduleDirectories: DEFAULTS.moduleDirectories,\n }),\n litScss({\n // Disable CSS minification in dev for readability and faster rebuilds\n minify: dev ? false : { fast: true },\n options: {\n loadPaths: [...allModulePaths, join(process.cwd(), \"src\", \"styles\"), join(process.cwd(), \"src\")],\n },\n }),\n watchGlobs(watchPatterns),\n ];\n}\n\n/**\n * Creates Rollup configuration for the main bundle with output options.\n * @param {object} options - Build options.\n * @returns {object} - Complete Rollup configuration object with input and output.\n */\nexport function getMainBundleConfig(options = {}) {\n const {\n modulePaths = [],\n watch = false,\n input = [\"./src/index.js\", \"./src/registered.js\"],\n outputDir = \"./dist\",\n format = \"esm\",\n // When dev is true, avoid randomized filenames for easier debugging\n dev = false,\n } = options;\n\n return {\n name: \"Main\",\n config: {\n input,\n output: {\n format,\n dir: outputDir,\n // Stable names in dev; in production keep stable names for index/registered\n entryFileNames: (chunk) =>\n dev\n ? \"[name].js\"\n : [\"index\", \"registered\"].includes(chunk.name)\n ? \"[name].js\"\n : \"[name]-[hash].js\",\n chunkFileNames: dev ? \"[name].js\" : \"[name]-[hash].js\",\n assetFileNames: dev ? \"[name][extname]\" : \"[name]-[hash][extname]\",\n },\n external: getExternalConfig(),\n plugins: getPluginsConfig(modulePaths, { dev }),\n watch: getWatcherConfig(watch),\n },\n };\n}\n\n/**\n * Creates Rollup configuration for demo files.\n * @param {object} options - Build options.\n * @returns {object} - Rollup configuration object.\n */\nexport function getDemoConfig(options = {}) {\n const {\n modulePaths = [],\n watch = false,\n globPattern = \"./demo/*.js\",\n ignorePattern = [\"./demo/*.min.js\"],\n outputDir = \"./demo\",\n dev = false,\n } = options;\n\n return {\n name: \"Demo\",\n config: {\n input: Object.fromEntries(\n glob.sync(globPattern, { ignore: ignorePattern }).map((file) => {\n const name = basename(file, \".js\");\n return [name, file];\n }),\n ),\n output: {\n format: \"esm\",\n dir: outputDir,\n entryFileNames: \"[name].min.js\",\n chunkFileNames: \"[name].min.js\",\n assetFileNames: dev ? \"[name][extname]\" : \"[name]-[hash][extname]\",\n },\n plugins: getPluginsConfig(modulePaths, { dev }),\n watch: getWatcherConfig(watch),\n },\n };\n}\n\n/**\n * Creates Rollup configuration for watch mode.\n * @param {boolean|object} watchOptions - Whether to enable watch mode or watch options\n * @returns {object|false} - Watch configuration for Rollup or false if disabled\n */\nexport function getWatcherConfig(watchOptions) {\n // Return false if watch mode is disabled\n if (!watchOptions) {\n return false;\n }\n\n // Allow passing a configuration object or use defaults\n const options = typeof watchOptions === \"object\" ? watchOptions : {};\n\n return {\n clearScreen: options.clearScreen ?? true,\n buildDelay: options.buildDelay ?? 500,\n chokidar: {\n ignoreInitial: true,\n // Ignore common output files that cause feedback loops\n ignored: options.ignored ?? [\n \"**/dist/**/*.d.ts\",\n \"**/custom-elements.json\",\n \"**/demo/*.md\",\n \"**/demo/**/*.min.js\",\n \"**/docs/api.md\",\n \"**/node_modules/**\",\n \"**/.git/**\",\n ],\n // Reduce watcher's sensitivity to prevent loops\n awaitWriteFinish: options.awaitWriteFinish ?? {\n stabilityThreshold: 1000,\n pollInterval: 100,\n },\n },\n include: options.include ?? [\n \"./src/**/*.scss\",\n \"./src/**/*.js\",\n \"./src/**/*.ts\",\n \"./demo/**/*.js\",\n \"./apiExamples/**/*\",\n \"./docs/**/*.md\",\n ],\n exclude: options.exclude ?? [\"./dist/**/*\", \"./node_modules/**/*\"],\n };\n}\n\n/**\n * Creates external configuration for Rollup.\n * @param {string[]} additional - Additional external patterns\n * @returns {(string|RegExp)[]} - Array of external dependencies.\n */\nexport function getExternalConfig(additional = []) {\n const defaults = [\n // externalize all lit dependencies\n /node_modules\\/lit/,\n /node_modules\\/lit-element/,\n /node_modules\\/lit-html/,\n /node_modules\\/@lit/,\n ];\n\n return [...defaults, ...additional];\n}\n", "import path from \"node:path\";\nimport { glob } from \"glob\";\n\n/**\n * Creates a plugin that watches file globs and adds them to Rollup's watch list.\n * @param {string|string[]} globs - Glob pattern(s) to watch\n * @returns {object} - Rollup plugin\n */\nexport function watchGlobs(globs) {\n return {\n name: \"watch-globs\",\n buildStart() {\n const items = Array.isArray(globs) ? globs : [globs];\n\n for (const item of items) {\n try {\n for (const filename of glob.sync(path.resolve(item))) {\n this.addWatchFile(filename);\n }\n } catch (error) {\n this.error(`Error watching glob pattern \"${item}\": ${error.message}`);\n }\n }\n },\n };\n}\n", "import path from \"node:path\";\nimport ora from \"ora\";\nimport { rollup } from \"rollup\";\nimport { analyzeComponents } from \"#scripts/analyze.js\";\nimport { generateDocs } from \"./bundleHandlers.js\";\n\n// Track if any build is in progress to prevent overlapping operations\nlet buildInProgress = false;\n\n// Track build states and times in a single object for cleaner management\nconst builds = {\n analyze: { active: false, lastTime: 0 },\n docs: { active: false, lastTime: 0 },\n};\n\n// Minimum time between builds of the same type (in ms)\nconst MIN_BUILD_INTERVAL = 5000;\n\n// Track source paths of files that triggered a watch event\nconst sourceEventPaths = new Set();\n\n// Known output files that should never trigger a rebuild\nconst OUTPUT_PATHS = [\n \"/dist/index.d.ts\",\n \"/custom-elements.json\",\n \"/demo/api.md\",\n \"/docs/api.md\",\n \"/demo/index.min.js\",\n];\n\n// Path matching checks - handle any non-string input safely\nfunction isOutputFile(filePath) {\n if (!filePath || typeof filePath !== \"string\") return false;\n\n try {\n const normalizedPath = path.normalize(filePath);\n\n // Check if it's in our known output paths\n return (\n OUTPUT_PATHS.some((outputPath) => normalizedPath.endsWith(outputPath)) ||\n normalizedPath.includes(\"/dist/\") ||\n normalizedPath.endsWith(\".min.js\") ||\n normalizedPath.endsWith(\".d.ts\")\n );\n } catch (error) {\n console.error(`Error checking path (${typeof filePath}):`, error.message);\n return false; // If any error occurs, assume it's not an output file\n }\n}\n\n/**\n * Runs a build task with proper tracking of state\n * @param {string} taskName - Type of task (analyze, docs)\n * @param {Function} taskFn - The actual task function to run\n * @returns {Promise<boolean>} - Success status\n */\nasync function runBuildTask(taskName, taskFn) {\n const task = builds[taskName];\n\n // Skip if build is active or within throttle time\n if (task.active || Date.now() - task.lastTime < MIN_BUILD_INTERVAL) {\n return false;\n }\n\n try {\n task.active = true;\n task.lastTime = Date.now();\n return await taskFn();\n } catch (error) {\n console.error(`Error in ${taskName} task:`, error);\n return false;\n } finally {\n task.active = false;\n }\n}\n\n/**\n * Handles the watcher events.\n * @param {object} watcher - Rollup watcher object.\n * @param {object} options - Build options.\n * @param {Function} [onInitialBuildComplete] - Callback to run after initial build completes.\n */\nexport async function handleWatcherEvents(\n watcher,\n options,\n onInitialBuildComplete,\n) {\n // Track if this is the first build\n let isInitialBuild = true;\n // biome-ignore lint/style/useConst: This is an object that is mutated.\n let buildTasksResults = {analyze: false, docs: false };\n let scheduledTasksTimer = null;\n let bundleSpinner;\n\n // Create a spinner for watch mode\n const watchSpinner = ora(\"Activating watch mode...\").start();\n\n // The actual task functions\n const buildTasks = {\n // Function to analyze components\n analyze: async () => {\n const { wcaInput: sourceFiles, wcaOutput: outFile, skipDocs } = options;\n if (skipDocs) {\n const skipSpinner = ora(\"Skipping component analysis...\").start();\n setTimeout(() => {\n skipSpinner.succeed(\"Component analysis skipped.\");\n }, 0);\n return true;\n }\n\n const analyzeSpinner = ora(\n \"Detective work: analyzing components...\",\n ).start();\n try {\n await analyzeComponents(sourceFiles, outFile);\n analyzeSpinner.succeed(\"Component analysis complete! API generated.\");\n return true;\n } catch (error) {\n analyzeSpinner.fail(\"Analysis hiccup! Something went wrong.\");\n console.error(\"Component analysis error:\", error);\n return false;\n }\n },\n\n // Function to rebuild documentation\n docs: async () => {\n // Skip if main bundle is still building\n if (buildInProgress) {\n return false;\n }\n\n // Check if docs generation is skipped\n if (options.skipDocs) {\n const skipSpinner = ora(\"Skipping docs generation...\").start();\n setTimeout(() => {\n skipSpinner.succeed(\"Docs generation skipped.\");\n }, 0);\n return true;\n }\n\n const docsSpinner = ora(\"Refreshing docs...\").start();\n try {\n await generateDocs(options);\n docsSpinner.succeed(\"Documentation refreshed!\");\n return true;\n } catch (error) {\n docsSpinner.fail(\"Docs stumble! Couldn't refresh.\");\n console.error(\"Documentation rebuild error:\", error);\n }\n },\n };\n\n // Check if all initial build tasks completed successfully\n const checkInitialBuildComplete = () => {\n if (\n isInitialBuild &&\n buildTasksResults.analyze &&\n buildTasksResults.docs &&\n typeof onInitialBuildComplete === \"function\"\n ) {\n isInitialBuild = false;\n onInitialBuildComplete();\n }\n };\n\n // Schedule the post-bundle tasks with proper sequencing\n function schedulePostBundleTasks(delay = 1000) {\n if (scheduledTasksTimer) {\n clearTimeout(scheduledTasksTimer);\n }\n\n scheduledTasksTimer = setTimeout(async () => {\n // Run tasks with delays between them to avoid race conditions\n\n setTimeout(async () => {\n buildTasksResults.analyze = await runBuildTask(\n \"analyze\",\n buildTasks.analyze,\n );\n\n setTimeout(async () => {\n buildTasksResults.docs = await runBuildTask(\"docs\", buildTasks.docs);\n checkInitialBuildComplete();\n }, 1000);\n }, 1000);\n }, delay);\n }\n\n // Set up event handlers for the watcher\n watcher.on(\"event\", async (event) => {\n switch (event.code) {\n case \"START\":\n watchSpinner.succeed(\"Watch mode active! Eyes peeled.\");\n break;\n\n case \"BUNDLE_START\":\n // Clear source paths from the previous bundle operation\n sourceEventPaths.clear();\n\n // Store source file paths that triggered this build\n if (event.input) {\n try {\n // Handle different input formats safely\n const inputs = Array.isArray(event.input)\n ? event.input\n : typeof event.input === \"string\"\n ? [event.input]\n : typeof event.input === \"object\" && event.input !== null\n ? Object.values(event.input)\n : [];\n\n for (const input of inputs) {\n // Only process string inputs and skip non-string values\n if (typeof input === \"string\" && !isOutputFile(input)) {\n sourceEventPaths.add(path.normalize(input));\n }\n }\n } catch (error) {\n console.error(\"Error processing input paths:\", error);\n }\n }\n\n bundleSpinner = ora(\"Weaving bundles...\").start();\n buildInProgress = true;\n break;\n\n case \"BUNDLE_END\":\n if (bundleSpinner) {\n bundleSpinner.succeed(\n `Bundle ${Array.isArray(event.input) ? `of ${event.input.join(\"& \")} ` : \"\"}done in ${event.duration}ms! \uD83D\uDE80`,\n );\n }\n buildInProgress = false;\n\n // Schedule post-bundle tasks if source files triggered this build\n if (sourceEventPaths.size > 0) {\n schedulePostBundleTasks();\n }\n break;\n\n case \"END\":\n // We've already scheduled tasks in BUNDLE_END, nothing to do here\n break;\n\n case \"ERROR\":\n buildInProgress = false;\n if (bundleSpinner) {\n bundleSpinner.fail(`Oops! Bundle hit a snag: ${event.error.message}`);\n } else {\n ora().fail(`Watch mode hiccup: ${event.error.message}`);\n }\n sourceEventPaths.clear();\n break;\n }\n });\n}\n\n/**\n * Setup watch mode for rollup\n * @param {object} watcher - Rollup watcher instance\n */\nexport function setupWatchModeListeners(watcher) {\n process.on(\"SIGINT\", () => {\n const closeSpinner = ora(\"Wrapping up...\").start();\n watcher.close();\n closeSpinner.succeed(\"All done! See you next time. \u2728\");\n process.exit(0);\n });\n\n return watcher;\n}\n", "import { program } from \"commander\";\nimport ora from \"ora\";\nimport { withBuildOptions } from \"#commands/_sharedOptions.js\";\nimport { buildWithRollup } from \"#scripts/build/index.js\";\n\nlet buildCommand = program\n .command(\"build\")\n .description(\"Builds auro components\");\n\nbuildCommand = withBuildOptions(buildCommand);\n\nexport default buildCommand.action(async (options) => {\n try {\n const build = ora(\"Initializing...\");\n\n if (options.watch) {\n build.text = \"Waiting for changes...\";\n build.spinner = \"bouncingBar\";\n build.color = \"green\";\n } else {\n build.text =\n options.docs === false\n ? \"Building component (docs disabled)\"\n : \"Building component\";\n }\n\n build.start();\n\n await buildWithRollup(options);\n\n if (!options.watch) {\n build.succeed(\"Build completed!\");\n }\n } catch (error) {\n // If there's any active spinner, we need to fail it\n ora().fail(`Build failed: ${error.message}`);\n console.error(error);\n process.exit(1);\n }\n});\n", "import { exec } from \"node:child_process\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport { fileURLToPath } from \"node:url\";\nimport util from \"node:util\";\nimport { program } from \"commander\";\nimport inquirer from \"inquirer\";\nimport { shell } from \"#utils/shell.js\";\n\nexport default program\n .command(\"migrate\")\n .description(\"Script runner to perform repetitive code change tasks\")\n .requiredOption(\n \"-i, --id <string>\",\n \"Select the migration you would like to run by id\",\n )\n .option(\n \"-m, --multi-gitter\",\n \"Run the migration on all repositories in the multi-gitter config\",\n )\n .action(async (options) => {\n const filename = fileURLToPath(import.meta.url);\n const dirname = path.dirname(filename);\n const scriptPath = path.resolve(dirname, \"migrations\", options.id);\n\n if (options.multiGitter) {\n // Check if multi-gitter CLI command is available\n const execPromise = util.promisify(exec);\n\n try {\n await execPromise(\"command -v multi-gitter\");\n } catch {\n console.error(\"multi-gitter is not installed.\");\n process.exit(1);\n }\n\n const answers = await inquirer.prompt([\n {\n type: \"confirm\",\n name: \"dryRun\",\n message:\n \"Run migration in dry-run mode? (no changes will be committed)\",\n default: true,\n },\n ]);\n\n if (answers.dryRun) {\n shell(\n `multi-gitter run ${scriptPath}/script.sh --config \"${scriptPath}/multi-gitter.yml\" --dry-run`,\n );\n } else {\n shell(\n `multi-gitter run ${scriptPath}/script.sh --config \"${scriptPath}/multi-gitter.yml\"`,\n );\n }\n } else {\n shell(`${scriptPath}/script.sh`);\n }\n });\n", "import process from \"node:process\";\nimport { program } from \"commander\";\n\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { Logger } from \"@aurodesignsystem/auro-library/scripts/utils/logger.mjs\";\nimport { syncDotGithubDir } from \"#scripts/syncDotGithubDir.js\";\n\nexport default program\n .command(\"sync\")\n .option(\"-r, --ref <branch/tag/commit>\", \"Git reference (branch/tag/commit) to use\", \"main\")\n .description(\n \"Script runner to synchronize local repository configuration files\",\n )\n .action(async (options) => {\n Logger.info(\"Synchronizing repository configuration files...\");\n\n Logger.warn(\n \"Note: sync does not create a new git branch. Changes are added to the current branch.\",\n );\n\n const cwd = process.cwd();\n\n await syncDotGithubDir(cwd, options.ref);\n\n // Cleanup for specific files\n // ------------------------------------------------------\n\n // Some files have specific cleanup tasks that need to be run after syncing\n\n // CODEOWNERS - has a bizarre issue with line endings. This is a workaround!\n // Maybe it has to do with the file type since there's no ending?\n const codeownersPath = `${cwd}/.github/CODEOWNERS`;\n const codeowners = await readFile(codeownersPath, { encoding: \"utf-8\" });\n\n // Convert line endings to \\n\n const codeownersFixed = codeowners\n .replace(/\\r\\n/gu, \"\\n\")\n .replace(/\\n\\n/gu, \"\\n\");\n await writeFile(codeownersPath, codeownersFixed, { encoding: \"utf-8\" });\n\n if (codeownersFixed.includes(\"\\r\") || codeownersFixed.includes(\"\\n\\n\")) {\n Logger.error(\"CODEOWNERS file still has Windows line endings.\");\n }\n });\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { Octokit } from \"@octokit/rest\";\nimport ora from \"ora\";\n// @ts-expect-error: No types available currently\nimport { processContentForFile, templateFiller } from \"@aurodesignsystem/auro-library/scripts/utils/sharedFileProcessorUtils.mjs\";\n\n// BELOW TYPES ARE COPIED DIRECTLY FROM THE LIBRARY\n// How can we import JSDoc types from the library?\n\n/**\n * This is the expected object type when passing something other than a string.\n * @typedef {Object} InputFileType\n * @property {string} remoteUrl - The remote template to fetch.\n * @property {string} fileName - Path including file name to store.\n * @property {boolean} [overwrite] - Default is true. Choose to overwrite the file if it exists.\n */\n\ninterface FileProcessorConfig {\n identifier: string;\n input: string | {\n remoteUrl: string;\n fileName: string;\n overwrite?: boolean;\n };\n output: string;\n mdMagicConfig?: Partial<any>;\n preProcessors?: Array<(contents: string) => string>;\n postProcessors?: Array<(contents: string) => string>;\n}\n\n\n/**\n * Get folder items from a repository-relative path.\n * @param path - Repository-relative path (e.g. \".github/workflows\")\n * @returns Promise resolving to an array of GitHub content items.\n */\nasync function getFolderItemsFromRelativeRepoPath(path: string, ref: string) {\n const octokit = new Octokit({\n auth: process.env.GITHUB_TOKEN || '',\n });\n\n const response = await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {\n ref,\n owner: 'AlaskaAirlines',\n repo: 'auro-templates',\n path: path,\n headers: {\n 'X-GitHub-Api-Version': '2022-11-28'\n }\n });\n\n const responseData = response.data;\n if (typeof responseData !== 'object' || !Array.isArray(responseData)) {\n const errorMessage = `Unexpected response format: ${JSON.stringify(responseData)}`;\n const errorSpinner = ora().start();\n errorSpinner.fail(errorMessage);\n throw new Error(\"Failed to retrieve folder items\");\n }\n\n return responseData;\n}\n\ninterface ProcessIntoFileConfigArgs {\n folderItems: Awaited<ReturnType<typeof getFolderItemsFromRelativeRepoPath>>;\n templatePathToReplace: string;\n rootDir: string;\n ref: string;\n}\n\n/**\n * Recursively convert GitHub contents API items into FileProcessorConfig objects.\n */\nasync function processFolderItemsIntoFileConfigs({\n folderItems,\n templatePathToReplace,\n rootDir,\n ref,\n}: ProcessIntoFileConfigArgs): Promise<Array<FileProcessorConfig>> {\n const fileConfigs: Array<FileProcessorConfig> = [];\n\n for (const item of folderItems) {\n if (item.type == 'dir') {\n const directorySpinner = ora(`Processing directory: ${item.path}`).start();\n\n const nestedFolderItems = await getFolderItemsFromRelativeRepoPath(item.path, ref);\n \n directorySpinner.succeed(`Found ${nestedFolderItems.length} additional items in ${item.path}`);\n\n const nestedConfigs = await processFolderItemsIntoFileConfigs({\n folderItems: nestedFolderItems,\n templatePathToReplace,\n rootDir,\n ref,\n })\n\n fileConfigs.push(...nestedConfigs);\n\n continue;\n }\n\n const finalPath = item.path.replace(`${templatePathToReplace}/`, '');\n const outputPath = `${rootDir}/.github/${finalPath}`;\n\n const config = {\n identifier: item.name,\n input: {\n remoteUrl: item.download_url || '',\n fileName: outputPath,\n overwrite: true,\n },\n output: outputPath,\n } satisfies FileProcessorConfig;\n\n fileConfigs.push(config);\n }\n\n return fileConfigs;\n}\n\n\n/**\n * Recursively removes a directory and all its contents.\n * @param {string} dirPath - The path to the directory to remove.\n * @returns {Promise<void>} A promise that resolves when the directory is removed or rejects if an error occurs.\n * @throws {Error} If the directory cannot be removed.\n */\nasync function removeDirectory(dirPath: string) {\n try {\n await fs.rm(dirPath, { recursive: true, force: true });\n const successSpinner = ora().start();\n successSpinner.succeed(`Successfully removed directory: ${dirPath}`);\n } catch (error: any) {\n const errorSpinner = ora().start();\n errorSpinner.fail(`Error removing directory ${dirPath}: ${error.message}`);\n throw error;\n }\n}\n\n/**\n * Generates a tree-like structure representation of a directory.\n * @param {string} dirPath - The path to the directory to analyze.\n * @param {string} [prefix=''] - The prefix for the current level (used for recursion).\n * @param {boolean} [isLast=true] - Whether this is the last item at the current level.\n * @returns {Promise<string>} A promise that resolves to the tree structure as a string.\n */\nasync function generateDirectoryTree(dirPath: string, prefix: string = '', isLast: boolean = true): Promise<string> {\n try {\n const stats = await fs.stat(dirPath);\n const baseName = path.basename(dirPath);\n \n if (!stats.isDirectory()) {\n return `${prefix}${isLast ? '\u2514\u2500\u2500 ' : '\u251C\u2500\u2500 '}${baseName}\\n`;\n }\n\n let result = `${prefix}${isLast ? '\u2514\u2500\u2500 ' : '\u251C\u2500\u2500 '}${baseName}/\\n`;\n \n try {\n const entries = await fs.readdir(dirPath);\n const sortedEntries = entries.sort();\n \n for (let i = 0; i < sortedEntries.length; i++) {\n const entry = sortedEntries[i];\n const entryPath = path.join(dirPath, entry);\n const isLastEntry = i === sortedEntries.length - 1;\n const newPrefix = prefix + (isLast ? ' ' : '\u2502 ');\n \n result += await generateDirectoryTree(entryPath, newPrefix, isLastEntry);\n }\n } catch (readError) {\n // If we can't read the directory, just show it as a directory\n result += `${prefix}${isLast ? ' ' : '\u2502 '}\u2514\u2500\u2500 [Permission denied or error reading directory]\\n`;\n }\n \n return result;\n } catch (error) {\n return `${prefix}${isLast ? '\u2514\u2500\u2500 ' : '\u251C\u2500\u2500 '}[Error: ${error}]\\n`;\n }\n}\n\n/**\n * Sync the .github directory with the remote repository.\n * @param {string} rootDir - The root directory of the local repository.\n * @returns {Promise<void>} A promise that resolves when syncing is complete.\n */\nexport async function syncDotGithubDir(rootDir: string, ref = 'main') {\n if (!rootDir) {\n const errorSpinner = ora().start();\n errorSpinner.fail(\"Root directory must be specified\");\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n\n // Remove .github directory if it exists\n const githubPath = \".github\";\n\n const removeSpinner = ora(\"Removing existing .github directory...\").start();\n try {\n await removeDirectory(githubPath);\n removeSpinner.succeed(\".github directory removed successfully\");\n } catch (error: any) {\n removeSpinner.fail(`Error removing .github directory: ${error.message}`);\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n\n // Setup\n await templateFiller.extractNames();\n\n if (!process.env.GITHUB_TOKEN) {\n const tokenErrorSpinner = ora().start();\n tokenErrorSpinner.fail(\"GITHUB_TOKEN environment variable is not set.\");\n process.exit(1);\n }\n\n const templatesDefaultGithubPath = 'templates/default/.github';\n const folderItems = await getFolderItemsFromRelativeRepoPath(templatesDefaultGithubPath, ref);\n const fileConfigs = await processFolderItemsIntoFileConfigs({\n folderItems,\n templatePathToReplace: templatesDefaultGithubPath,\n rootDir,\n ref,\n });\n\n // Process all files\n const processSpinner = ora(\"Processing all files...\").start();\n try {\n await Promise.all(\n fileConfigs.map((config) => processContentForFile(config)),\n );\n processSpinner.succeed(\"All files processed.\");\n\n // Generate and display tree output of the rootDir directory\n const treeSpinner = ora(\"Generating directory tree...\").start();\n try {\n const githubDirPath = path.join(rootDir, '.github');\n const treeOutput = await generateDirectoryTree(githubDirPath);\n treeSpinner.succeed(\"Synced .github directory structure:\");\n console.log(treeOutput);\n } catch (treeError: any) {\n treeSpinner.fail(`Error generating directory tree: ${treeError.message}`);\n // Don't exit here since the main operation succeeded\n }\n\n } catch (error: any) {\n processSpinner.fail(`Error processing files: ${error.message}`);\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n}\n", "/* eslint-disable no-await-in-loop, line-comment-position, no-inline-comments, jsdoc/require-jsdoc, no-undef */\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Logger } from \"@aurodesignsystem/auro-library/scripts/utils/logger.mjs\";\nimport { program } from \"commander\";\nimport { glob } from \"glob\";\nimport getTemplatedComponentCode from \"#scripts/prepWcaCompatibleCode.mjs\";\n\n// Use glob directly as it's already promised-based in newer versions\n\nconst WAC_DIR = path.resolve(process.cwd(), \"./scripts/wca\");\n\nasync function globPath(sources) {\n try {\n const fileArrays = await Promise.all(sources.map((source) => glob(source)));\n return fileArrays.flat();\n } catch (err) {\n console.error(\"Error processing glob patterns:\", err);\n throw err; // Re-throw to handle failure at caller\n }\n}\n\nasync function createExtendsFile(filePaths) {\n if (!fs.existsSync(WAC_DIR)) {\n await fs.promises.mkdir(WAC_DIR, { recursive: true });\n }\n\n for (const filePath of filePaths) {\n const resolvedPath = path.resolve(process.cwd(), filePath);\n const fileContent = await fs.promises.readFile(resolvedPath, \"utf-8\");\n const newPath = path.resolve(WAC_DIR, `${path.basename(filePath)}`);\n const newCode = getTemplatedComponentCode(\n fileContent,\n path.relative(WAC_DIR, filePath),\n );\n await fs.promises.writeFile(newPath, newCode);\n }\n}\n\nasync function main() {\n // files to analyze\n const filePaths = await globPath([\"./src/auro-*.js\"]);\n await createExtendsFile(filePaths);\n}\n\nexport default program\n .command(\"wca-setup\")\n .description(\"Set up WCA (Web Component Analyzer) for the project\")\n .action(() => {\n main()\n .then(() => {\n Logger.success(\"WCA setup completed successfully.\");\n })\n .catch((error) => {\n Logger.error(`WCA setup failed: ${error.message}`);\n });\n });\n", "/* eslint-disable require-unicode-regexp, prefer-named-capture-group, prefer-destructuring, prettier/prettier */\n\nexport default (code, sourcePath) => {\n const defaultTag = (code.match(/static register\\(name \\= (.+)\\)/) ||\n code.match(/customElements.get\\((.+?)\\)/))[1];\n const className = code.match(/export class (.+) extends/)?.[1];\n const classDesc = code.match(/\\/\\*\\*((.|\\n)*?)(\\*\\n|\\*\\/|[@])/)?.[1] || \"\";\n\n if (!defaultTag || !className) {\n return code;\n }\n return `\nimport { ${className} } from '${sourcePath}';\n\n/**${classDesc}*/\nclass ${className}WCA extends ${className} {}\n\nif (!customElements.get(${defaultTag})) {\n customElements.define(${defaultTag}, ${className}WCA);\n}\n`;\n};\n", "import { program } from \"commander\";\nimport { analyzeCommits } from \"#scripts/check-commits/commit-analyzer.ts\";\n\nexport default program\n .command(\"check-commits\")\n .alias(\"cc\")\n .option(\n \"-l, --set-label\",\n \"Set label on the pull request based on the commit message type\",\n )\n .option(\"-d, --debug\", \"Display detailed commit information for debugging\")\n .option(\"-r, --release-notes\", \"Generate release notes based on commit messages\")\n .description(\n \"Check commits in the local repository for the types of semantic commit messages made and return the results.\",\n )\n .action(async (option) => {\n await analyzeCommits(option.debug, option.setLabel, option.releaseNotes);\n });\n", "import chalk from \"chalk\";\nimport ora from \"ora\";\nimport type { Ora } from \"ora\";\nimport { Git } from \"#utils/gitUtils.ts\";\nimport type { CommitInfo } from \"./display-utils.ts\";\nimport { displayDebugView, getColoredType } from \"./display-utils.ts\";\nimport { applyLabelToPR, getExistingLabels } from \"./github-labels.ts\";\n\n/**\n * Generate release notes in the specified format\n * First tries to show only feat, fix, and breaking commits\n * If none found, shows all commits for user selection\n * @param commitList The list of commits to process\n */\nfunction generateReleaseNotes(commitList: CommitInfo[]): void {\n const releaseCommitTypes = [\"feat\", \"fix\", \"breaking\"];\n \n // Filter for preferred commit types first\n const releaseCommits = commitList.filter(commit => \n releaseCommitTypes.includes(commit.type)\n );\n \n // Use filtered commits if any found, otherwise use all commits\n const commitsToShow = releaseCommits.length > 0 ? releaseCommits : commitList;\n \n if (commitsToShow.length === 0) {\n console.log(\"No commits found to include in release notes.\\n\");\n return;\n }\n \n console.log(\"\\n------\\n\");\n console.log(\"### In this release\\n\");\n \n for (const commit of commitsToShow) {\n // Format: - {short commit hash} {commit message}\n console.log(`- ${commit.hash} ${commit.subject}`);\n \n // Add extra commit message content if body exists\n if (commit.body?.trim()) {\n // Split body into meaningful chunks, handling different separators\n const bodyText = commit.body.trim();\n \n // Split by common separators and clean up\n const bodyLines = bodyText\n .split(/\\n+/) // Split on one or more newlines\n .map(line => line.trim())\n .filter(line => line.length > 0);\n \n for (const line of bodyLines) {\n // Handle issue references and add proper spacing\n let formattedLine = line;\n \n // Add spaces before issue references like AlaskaAirlines/auro-cli#108\n formattedLine = formattedLine.replace(\n /([^\\s])(AlaskaAirlines\\/[a-zA-Z0-9-]+#\\d+)/g, \n '$1 $2'\n );\n \n // Add spaces between consecutive issue references\n formattedLine = formattedLine.replace(\n /(AlaskaAirlines\\/[a-zA-Z0-9-]+#\\d+)([^\\s])/g, \n '$1 $2'\n );\n \n console.log(` - ${formattedLine}`);\n }\n }\n }\n \n console.log(\"\\n------\\n\");\n \n // Show helpful info about what was included\n if (releaseCommits.length > 0) {\n console.log(chalk.green(`\u2713 Showing ${releaseCommits.length} commits of types: ${releaseCommitTypes.join(\", \")}`));\n } else {\n console.log(chalk.yellow(`\u26A0 No feat/fix/breaking commits found. Showing all ${commitList.length} commits for your selection.`));\n }\n}\n\n/**\n * Analyze commit messages in the repository\n * @param debug Whether to display detailed debug information\n * @param verbose Whether to display verbose commit messages without truncation\n * @param setLabel Whether to apply a label to the PR based on commit types\n * @returns A promise that resolves when analysis is complete\n */\nexport async function analyzeCommits(\n debug = false,\n setLabel = false,\n releaseNotes = false,\n): Promise<void> {\n const spinner = ora(\"Checking commits...\\n\").start();\n\n try {\n const commitList = await Git.getCommitMessages();\n\n // Generate release notes if requested\n if (releaseNotes) {\n spinner.succeed(`Total commits analyzed: ${commitList.length}`);\n generateReleaseNotes(commitList);\n return;\n }\n\n // Only display commit details if debug mode is enabled\n if (debug) {\n displayDebugView(commitList);\n }\n\n spinner.succeed(`Total commits analyzed: ${commitList.length}`);\n\n if (commitList.length !== 0) {\n const commitTypes = commitList.map((commit) => commit.type);\n const uniqueTypes = Array.from(new Set(commitTypes));\n const formattedTypes = uniqueTypes\n .map((type) => getColoredType(type))\n .join(\", \");\n spinner.succeed(`Found commit types: ${formattedTypes}`);\n } else {\n spinner.info(\n \"The list of commits is created by comparing the current branch\\n\" +\n \"with the main branch. If you are on a new branch, please\\n\" +\n \"make sure to commit some changes before running this command.\",\n );\n }\n\n if (setLabel) {\n await handleLabels(commitList, spinner);\n }\n } catch (error) {\n spinner.fail(\"Error getting commit messages\");\n console.error(error);\n }\n}\n\n/**\n * Handle applying labels based on commit types\n * @param commitList The list of commits to analyze\n * @param spinner The ora spinner instance for status updates\n */\nasync function handleLabels(\n commitList: CommitInfo[],\n spinner: Ora,\n): Promise<void> {\n const validCommitTypes = [\n \"breaking\",\n \"feat\",\n \"fix\",\n \"perf\",\n \"docs\",\n \"style\",\n \"refactor\",\n \"test\",\n \"build\",\n \"ci\",\n \"chore\",\n ];\n\n const foundCommitTypes = commitList\n .map((commit) => commit.type)\n .filter((type) => validCommitTypes.includes(type));\n\n let selectedLabel = null;\n let highestPriorityIndex = Number.POSITIVE_INFINITY;\n\n for (const type of foundCommitTypes) {\n const priorityIndex = validCommitTypes.indexOf(type);\n if (priorityIndex < highestPriorityIndex) {\n highestPriorityIndex = priorityIndex;\n selectedLabel = type;\n }\n }\n\n if (selectedLabel) {\n const labelSpinner = ora(\n \"Checking existing labels on pull request...\",\n ).start();\n try {\n const existingLabels = await getExistingLabels();\n\n if (existingLabels.includes(`semantic-status: ${selectedLabel}`)) {\n labelSpinner.info(\n `Label \"semantic-status: ${getColoredType(selectedLabel)}\" already exists on the pull request.`,\n );\n return;\n }\n\n labelSpinner.text = \"Applying label to pull request...\";\n await applyLabelToPR(selectedLabel);\n labelSpinner.succeed(\n `Label \"semantic-status: ${getColoredType(selectedLabel)}\" applied to the pull request.`,\n );\n } catch (error: unknown) {\n const errorMessage =\n error instanceof Error ? error.message : String(error);\n labelSpinner.fail(errorMessage);\n }\n } else {\n spinner.warn(\n chalk.yellow(\"No semantic commit type found to apply as label.\"),\n );\n }\n}\n", "import { appendFile, readFile } from \"node:fs/promises\";\nimport { Logger } from \"@aurodesignsystem/auro-library/scripts/utils/logger.mjs\";\nimport { simpleGit } from \"simple-git\";\nimport type { SimpleGit } from \"simple-git\";\n\n// Initialize simple-git with proper typing\nlet git: SimpleGit;\ntry {\n git = simpleGit({\n baseDir: process.cwd(),\n binary: \"git\",\n maxConcurrentProcesses: 1,\n });\n} catch (error) {\n Logger.error(`Failed to initialize git: ${error}`);\n // Provide a minimal implementation to prevent runtime errors\n git = {} as SimpleGit;\n}\n\nexport class Git {\n static async checkGitignore(pattern: string) {\n if (pattern === \"\") {\n return false;\n }\n try {\n const fileContent = await readFile(\".gitignore\", \"utf-8\");\n return fileContent.includes(pattern);\n } catch (err) {\n Logger.error(`Error reading file: ${err}`);\n return false;\n }\n }\n\n static async getCommitMessages(): Promise<\n Array<{\n type: string;\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n }>\n > {\n try {\n interface GitCommitType {\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n type: string;\n }\n\n const currentBranch = await git.branchLocal();\n Logger.info(`Current branch: ${currentBranch.current}`);\n\n // ---- Get target branch (main) and PR commits ----\n let targetBranch = \"main\";\n let commitRange = \"\";\n\n // Check if we're in a GitHub Actions environment\n const isGitHubAction = !!process.env.GITHUB_ACTIONS;\n\n if (isGitHubAction) {\n Logger.info(\"Running in GitHub Actions environment\");\n // In GitHub Actions, we can use environment variables to determine the PR branch and base\n targetBranch = process.env.GITHUB_BASE_REF || \"main\";\n\n try {\n // Ensure target branch is fetched\n await git.fetch(\"origin\", targetBranch);\n Logger.info(`Fetched target branch: origin/${targetBranch}`);\n\n // Use the merge base between target branch and current HEAD to get PR-specific commits\n const mergeBase = await git.raw([\n \"merge-base\",\n `origin/${targetBranch}`,\n \"HEAD\",\n ]);\n\n // Get commits between merge base and HEAD - these are the PR commits\n commitRange = `${mergeBase.trim()}..HEAD`;\n Logger.info(`Using commit range: ${commitRange}`);\n } catch (error) {\n Logger.warn(`Error setting up commit range in CI: ${error}`);\n // Fall back to simpler approach (just compare with origin/targetBranch)\n commitRange = `origin/${targetBranch}..HEAD`;\n Logger.info(`Falling back to commit range: ${commitRange}`);\n }\n } else {\n // Local environment - try to determine PR commits\n Logger.info(\"Running in local environment\");\n\n try {\n // First check if origin/main exists, fetch it if needed\n try {\n await git.raw([\"rev-parse\", \"--verify\", `origin/${targetBranch}`]);\n } catch {\n Logger.info(`Fetching ${targetBranch} from origin`);\n await git.fetch(\"origin\", targetBranch);\n }\n\n // Find merge base between current branch and target branch\n const mergeBase = await git.raw([\n \"merge-base\",\n `origin/${targetBranch}`,\n currentBranch.current,\n ]);\n\n commitRange = `${mergeBase.trim()}..HEAD`;\n Logger.info(`Using commit range for PR commits: ${commitRange}`);\n } catch (error) {\n Logger.warn(`Error determining PR commits locally: ${error}`);\n\n // Fallback - use last few commits\n Logger.info(\"Falling back to analyzing recent commits\");\n commitRange = \"HEAD~10..HEAD\";\n Logger.info(`Using fallback commit range: ${commitRange}`);\n }\n }\n\n // Get and format the PR commits\n return await Git.getFormattedCommits(commitRange);\n } catch (err) {\n Logger.error(`Error getting commit messages: ${err}`);\n return [];\n }\n }\n\n // Helper function to get formatted commits for a given git range\n static async getFormattedCommits(commitRange: string): Promise<\n Array<{\n type: string;\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n }>\n > {\n interface GitCommitType {\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n type: string;\n }\n\n // Use a format that will let us parse each commit separately\n // %H = hash, %ad = author date, %an = author name, %s = subject, %b = body\n const branchCommitsRaw = await git.raw([\n \"log\",\n \"--pretty=format:COMMIT_START%n%H%n%ad%n%an%n%s%n%b%nCOMMIT_END\",\n \"--date=short\",\n commitRange,\n ]);\n\n // Split by our custom delimiter to get individual commits\n const commitChunks = branchCommitsRaw\n .split(\"COMMIT_START\\n\")\n .filter((chunk: string) => chunk.trim() !== \"\");\n\n const commits: GitCommitType[] = [];\n\n for (const chunk of commitChunks) {\n const parts = chunk.split(\"\\n\");\n if (parts.length >= 4) {\n const hash = parts[0];\n const date = parts[1];\n const author_name = parts[2];\n const subject = parts[3];\n\n // The rest is the body (may contain breaking changes)\n // Filter out the COMMIT_END marker\n const bodyLines = parts\n .slice(4)\n .filter((line: string) => line !== \"COMMIT_END\");\n const body = bodyLines.length > 0 ? bodyLines.join(\"\") : \"\";\n\n // Use a shorter hash format for better readability (7 characters)\n const shortHash = hash.substring(0, 7);\n\n // Determine commit type from subject\n const typeMatch = subject.match(\n /^(feat|fix|docs|style|refactor|perf|test|build|ci|chore)(\\(.+\\))?:/,\n );\n let type = typeMatch ? typeMatch[1] : \"unknown\";\n\n // Check for breaking changes\n if (body.includes(\"BREAKING CHANGE\")) {\n type = \"breaking\";\n }\n\n commits.push({\n type,\n hash: shortHash,\n date,\n subject,\n body,\n message: `${subject}${body ? `\\n\\n${body}` : \"\"}`,\n author_name,\n });\n }\n }\n\n return commits;\n }\n\n // Function to add file to .gitignore\n static async addToGitignore(pattern: string, log = true) {\n await Git.checkGitignore(pattern).then(async (result) => {\n if (result) {\n Logger.warn(`${pattern} already exists`);\n } else {\n try {\n await appendFile(\".gitignore\", `\\n${pattern}`);\n if (log) {\n Logger.success(`${pattern} added to .gitignore`);\n }\n } catch (err) {\n Logger.error(err);\n }\n }\n });\n }\n\n // Function to remove file from git cache\n static async removeFromGitCache(files: string[]) {\n try {\n await git.rmKeepLocal(files);\n Logger.success(`${files.join(\", \")} are removed from git cache`);\n } catch (err) {\n Logger.error(err);\n }\n }\n\n static async createBranch(branchName: string) {\n try {\n await git.checkoutLocalBranch(branchName);\n Logger.success(`Created and switched to ${branchName} branch`);\n } catch (err) {\n Logger.error(err);\n }\n }\n\n static async commitStagedFiles(message: string) {\n try {\n await git.add(\".\");\n await git.commit(message);\n Logger.success(`Committed with message: ${message}`);\n } catch (err) {\n Logger.error(err);\n }\n }\n}\n", "import chalk from \"chalk\";\n\n// Configuration constants for display\nexport const MAX_SUBJECT_LENGTH = 60;\nexport const MAX_BODY_LENGTH = 100;\n\nexport interface CommitInfo {\n type: string;\n hash: string;\n date: string;\n subject: string;\n body: string;\n message: string;\n author_name: string;\n}\n\n// Define valid commit types for better type checking\nexport type CommitType =\n | \"breaking\"\n | \"feat\"\n | \"fix\"\n | \"perf\"\n | \"docs\"\n | \"style\"\n | \"refactor\"\n | \"test\"\n | \"build\"\n | \"ci\"\n | \"chore\"\n | \"unknown\";\n\n/**\n * Get colored text for commit type using a more harmonious color scheme\n */\nexport function getColoredType(type: string): string {\n switch (type) {\n case \"breaking\":\n return chalk.bold.red(type);\n case \"feat\":\n return chalk.bold.green(type);\n case \"fix\":\n return chalk.bold.green(type);\n case \"perf\":\n return chalk.bold.green(type);\n case \"docs\":\n return chalk.bold.cyan(type);\n case \"style\":\n return chalk.bold.cyan(type);\n case \"refactor\":\n return chalk.bold.cyan(type);\n case \"test\":\n return chalk.bold.cyan(type);\n case \"build\":\n return chalk.bold.cyan(type);\n case \"ci\":\n return chalk.bold.cyan(type);\n case \"chore\":\n return chalk.bold.cyan(type);\n default:\n return chalk.bold.white(type);\n }\n}\n\n/**\n * Helper function to wrap long strings to new lines\n */\nexport function wrapString(str: string, maxLength: number): string {\n if (!str) {\n return \"\";\n }\n\n // If the string is shorter than maxLength, return it as is\n if (str.length <= maxLength) {\n return str;\n }\n\n // Split the string into words\n const words = str.split(\" \");\n let result = \"\";\n let currentLine = \"\";\n\n // Build wrapped text with line breaks\n for (const word of words) {\n // If adding this word would exceed maxLength, start a new line\n if ((currentLine + word).length > maxLength && currentLine.length > 0) {\n result += `${currentLine.trim()}\\n`;\n currentLine = \"\";\n }\n currentLine = `${currentLine}${word} `;\n }\n\n // Add the last line\n if (currentLine.length > 0) {\n result += currentLine.trim();\n }\n\n return result;\n}\n\n/**\n * Display commits in a debug format with detailed information\n */\nexport function displayDebugView(commitList: CommitInfo[]): void {\n for (const commit of commitList) {\n console.log(\"\u2500\".repeat(60));\n\n // Use a consistent color theme for metadata\n const subject = wrapString(commit.subject, MAX_SUBJECT_LENGTH);\n const body = wrapString(commit.body, MAX_BODY_LENGTH);\n\n // Display commit info in a more compact format\n console.log(chalk.bold(`${getColoredType(commit.type)}`));\n console.log(\n chalk.dim(`${commit.hash} | ${commit.date} | ${commit.author_name}`),\n );\n console.log(chalk.bold(`${chalk.white(subject)}`));\n\n // Only add body if it exists and keep it more compact\n if (commit.body) {\n console.log(chalk.dim(body));\n }\n }\n console.log(\"\u2500\".repeat(60));\n console.log(\"\\n\");\n}\n", "import github from \"@actions/github\";\n\n/**\n * Get existing labels from the current pull request in a GitHub Actions environment\n * @returns Promise that resolves with an array of label names\n */\nexport async function getExistingLabels(): Promise<string[]> {\n try {\n // Get the GitHub token from environment\n const token = process.env.GITHUB_TOKEN;\n\n if (!token) {\n throw new Error(\"GITHUB_TOKEN environment variable is not set\");\n }\n\n // Check if we're in a GitHub Actions environment\n if (!process.env.GITHUB_REPOSITORY || !process.env.GITHUB_EVENT_PATH) {\n throw new Error(\n \"This function can only be used in a GitHub Actions environment\",\n );\n }\n\n const octokit = github.getOctokit(token);\n const { context } = github;\n\n // Make sure we're in a pull request context\n if (!context.payload.pull_request) {\n throw new Error(\"No pull request found in the GitHub context\");\n }\n\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split(\"/\");\n const prNumber = context.payload.pull_request.number;\n\n // Get existing labels\n const { data: existingLabels } =\n await octokit.rest.issues.listLabelsOnIssue({\n owner,\n repo,\n issue_number: prNumber,\n });\n\n // Return array of label names\n return existingLabels.map((label) => label.name);\n } catch (error) {\n if (error instanceof Error) {\n throw new Error(`Failed to get existing labels: ${error.message}`);\n }\n throw error;\n }\n}\n\n/**\n * Apply a label to the current pull request in a GitHub Actions environment\n * @param label The label to apply to the pull request\n * @returns Promise that resolves when the label is applied\n */\nexport async function applyLabelToPR(label: string): Promise<void> {\n try {\n // Get the GitHub token from environment\n const token = process.env.GITHUB_TOKEN;\n\n if (!token) {\n throw new Error(\"GITHUB_TOKEN environment variable is not set\");\n }\n\n // Check if we're in a GitHub Actions environment\n if (!process.env.GITHUB_REPOSITORY || !process.env.GITHUB_EVENT_PATH) {\n throw new Error(\n \"This function can only be used in a GitHub Actions environment\",\n );\n }\n\n const octokit = github.getOctokit(token);\n const { context } = github;\n\n // Make sure we're in a pull request context\n if (!context.payload.pull_request) {\n throw new Error(\"No pull request found in the GitHub context\");\n }\n\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split(\"/\");\n const prNumber = context.payload.pull_request.number;\n\n // Add prefix to the label\n const prefixedLabel = `semantic-status: ${label}`;\n\n // Get existing labels\n const existingLabels = await getExistingLabels();\n\n // If the label we want to apply already exists, do nothing\n if (existingLabels.includes(prefixedLabel)) {\n return;\n }\n\n // Find existing semantic status labels that are different from the one we want to apply\n const existingSemanticLabels = existingLabels.filter(\n (existingLabel) =>\n existingLabel.startsWith(\"semantic-status:\") &&\n existingLabel !== prefixedLabel,\n );\n\n // Remove existing semantic status labels that don't match the new one\n for (const existingLabel of existingSemanticLabels) {\n await octokit.rest.issues.removeLabel({\n owner,\n repo,\n issue_number: prNumber,\n name: existingLabel,\n });\n }\n\n // Add the new semantic status label\n await octokit.rest.issues.addLabels({\n owner,\n repo,\n issue_number: prNumber,\n labels: [prefixedLabel],\n });\n\n return;\n } catch (error) {\n if (error instanceof Error) {\n throw new Error(`Failed to apply label: ${error.message}`);\n }\n throw error;\n }\n}\n", "import fs from \"node:fs\";\nimport { get } from \"node:https\"; // Change to https\nimport chalk from \"chalk\";\nimport { program } from \"commander\";\nimport ora from \"ora\";\nimport type { Ora } from \"ora\";\n\nexport default program\n .command(\"pr-release\")\n .option(\n \"-n, --namespace <package-namespace>\",\n \"Set namespace of the package release\",\n \"@aurodesignsystem-dev\",\n )\n .option(\n \"-p, --pr-number <number>\",\n \"Set pull request number for the release\",\n \"0\",\n )\n .description(\n \"Generate the package version based off of PR number then update the package.json file. Note: this does not publish the package.\",\n )\n .action(async (option) => {\n await updatePackageJson(option);\n });\n\ninterface ReleaseOptions {\n namespace: string;\n prNumber: number;\n}\n\nconst updatePackageJson = async (option: ReleaseOptions): Promise<void> => {\n const { namespace, prNumber } = option;\n\n const packageSpinner = ora(\"Updating package.json\").start();\n\n try {\n const packageJsonPath = \"package.json\";\n\n // Read package.json\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\"));\n\n // Check if release version is on npmjs already\n packageSpinner.text = \"Checking npm registry for version information...\";\n\n const releaseVersion = `0.0.0-pr${prNumber}`;\n const packageComponent = packageJson.name.split(\"/\")[1];\n const packageName = `${namespace}/${packageComponent}`;\n const incrementVersion = await getIncrementVersion(\n releaseVersion,\n packageName,\n packageSpinner,\n );\n const packageVersion = `${releaseVersion}.${incrementVersion}`;\n\n packageJson.name = packageName;\n packageJson.version = packageVersion;\n\n packageSpinner.text = \"Writing updated package.json...\";\n\n // Write the updated package.json back to the file\n fs.writeFileSync(\n packageJsonPath,\n `${JSON.stringify(packageJson, null, 2)}\\n`,\n \"utf8\",\n );\n\n packageSpinner.succeed(\n `Package.json updated to use ${chalk.green(packageVersion)} and ${chalk.green(packageName)}`,\n );\n\n // Explicitly exit with success code to ensure terminal prompt returns\n process.exit(0);\n } catch (error: unknown) {\n packageSpinner.fail(`Failed to update package.json: ${error}`);\n process.exit(1); // Exit with error code\n }\n};\n\n// checks if version exists on npmjs and returns the next available increment version\nconst getIncrementVersion = (\n releaseVersion: string,\n packageName: string,\n spinner: Ora,\n): Promise<number> => {\n return new Promise((resolve) => {\n try {\n // Use the registry URL to get all versions for the package\n const registryUrl = `https://registry.npmjs.org/${packageName}`;\n\n const req = get(\n registryUrl,\n {\n headers: { Accept: \"application/json\" },\n },\n (res) => {\n // Handle redirects\n if (\n (res.statusCode === 301 || res.statusCode === 302) &&\n res.headers.location\n ) {\n // Persist redirect message\n spinner.info(`Following redirect to ${res.headers.location}...`);\n try {\n get(\n res.headers.location,\n { headers: { Accept: \"application/json\" } },\n handleResponse,\n )\n .on(\"error\", (err) => {\n // On redirect error, default to 0\n spinner.warn(\n `Error following redirect: ${err.message}, defaulting to version 0`,\n );\n resolve(0);\n })\n .end();\n } catch (error) {\n // If redirect request fails, default to 0\n spinner.warn(\n `Redirect request failed: ${error instanceof Error ? error.message : \"Unknown error\"}, defaulting to version 0`,\n );\n resolve(0);\n }\n return;\n }\n\n handleResponse(res);\n },\n );\n\n function handleResponse(res: import(\"http\").IncomingMessage) {\n if (res.statusCode !== 200) {\n // If package not found or other error, we can start with version 0\n spinner.info(\n `Package not found. Status code: ${chalk.red(res.statusCode)}, defaulting to version 0`,\n );\n resolve(0);\n return;\n }\n\n spinner.text = \"Processing version information...\";\n let data = \"\";\n res.on(\"data\", (chunk: Buffer | string) => {\n data += chunk;\n });\n\n res.on(\"end\", () => {\n try {\n const packageData = JSON.parse(data);\n const versions = packageData.versions\n ? Object.keys(packageData.versions)\n : [];\n\n spinner.text = \"Calculating next version number...\";\n\n // Find the highest existing iteration for this release version\n let maxIteration = -1;\n const versionRegex = new RegExp(`^${releaseVersion}\\\\.(\\\\d+)$`);\n\n for (const version of versions) {\n const match = version.match(versionRegex);\n if (match) {\n const iteration = Number.parseInt(match[1], 10);\n maxIteration = Math.max(maxIteration, iteration);\n }\n }\n\n // Return the next iteration number and persist this important info\n if (maxIteration >= 0) {\n spinner.info(\n `Found existing version ${chalk.green(`${releaseVersion}.${maxIteration}`)}. Incrementing to ${chalk.green(`${releaseVersion}.${maxIteration + 1}`)}`,\n );\n } else {\n spinner.info(\n `No existing version found for ${chalk.green(releaseVersion)}. Starting with ${chalk.green(`${releaseVersion}.0`)}`,\n );\n }\n resolve(maxIteration + 1);\n } catch (error) {\n // In case of parsing error, default to 0\n spinner.warn(\n `Failed to parse NPM registry response: ${error instanceof Error ? error.message : \"Unknown error\"}, defaulting to version 0`,\n );\n resolve(0);\n }\n });\n }\n\n req.on(\"error\", (err) => {\n // On request error, default to 0\n spinner.warn(`Request error: ${err.message}, defaulting to version 0`);\n resolve(0);\n });\n\n req.end();\n } catch (error) {\n // Catch any other errors and default to 0\n spinner.warn(\n \"Error checking version in npm registry, defaulting to version 0\",\n );\n resolve(0);\n }\n });\n};\n", "import path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { program } from \"commander\";\nimport open from \"open\";\nimport { shell } from \"#utils/shell.js\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst cliRootDir = path.resolve(path.dirname(__filename), \"..\");\n\nexport default program\n .command(\"test\")\n .option(\"-w, --watch\", \"Set watch number for the test\")\n .option(\"-c, --coverage-report\", \"Generate coverage report\")\n .option(\"-o, --open\", \"Open the coverage report in the browser\")\n .option(\"-f, --files <String|String[]>\", \"Test files glob pattern\")\n .description(\"Run the web test runner to test the component library\")\n .action(async (option) => {\n const configPath = path.join(\n cliRootDir,\n \"dist\",\n \"configs\",\n \"web-test-runner.config.mjs\",\n );\n let command = `npx wtr --config \"${configPath}\"`;\n const coveragePath = `${process.cwd()}/coverage/index.html`;\n\n if (option.coverageReport) {\n command += \" --coverage\";\n }\n\n if (option.watch) {\n command += \" --watch\";\n }\n\n if (option.files) {\n const files = Array.isArray(option.files)\n ? option.files.join(\" \")\n : option.files;\n command += ` --files \"${files}\"`;\n }\n\n shell(command);\n\n if (option.open) {\n await open(coveragePath);\n }\n });\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { program } from \"commander\";\nimport inquirer from \"inquirer\";\nimport ora from \"ora\";\nimport { createMultiGitterDependencyTreeConfig } from \"#scripts/agent/run-migrations/writeMultiGitterConfig.js\";\nimport {\n formatDependencyTree,\n getBatchedUpdateOrder,\n} from \"#scripts/formatDependencyTree.ts\";\nimport { fromCliRoot, withHomeDir } from \"#utils/pathUtils.js\";\nimport { shell } from \"#utils/shell.js\";\n\n// Multi-gitter and other config files live here\nconst CONFIG_DIR = withHomeDir(\"run-migrations\", \"config\");\n// Generated output files live here\nconst OUTPUT_DIR = withHomeDir(\"run-migrations\", \"outputs\");\n\nenum AgentActions {\n RunMigration = \"run-migration\",\n // Add more actions as needed\n}\n\ninterface AgentAnswers {\n agentAction: AgentActions;\n}\n\n// Agent component options\n// =========================================================\n\nconst auroComponents = [\n \"@aurodesignsystem/auro-accordion\",\n \"@aurodesignsystem/auro-alert\",\n \"@aurodesignsystem/auro-avatar\",\n \"@aurodesignsystem/auro-background\",\n \"@aurodesignsystem/auro-backtotop\",\n \"@aurodesignsystem/auro-button\",\n \"@aurodesignsystem/auro-badge\",\n \"@aurodesignsystem/auro-banner\",\n \"@aurodesignsystem/auro-card\",\n \"@aurodesignsystem/auro-carousel\",\n \"@aurodesignsystem/auro-datetime\",\n \"@aurodesignsystem/auro-dialog\",\n \"@aurodesignsystem/auro-drawer\",\n \"@aurodesignsystem/auro-formkit\",\n \"@aurodesignsystem/auro-flight\",\n \"@aurodesignsystem/auro-flightline\",\n \"@aurodesignsystem/auro-header\",\n \"@aurodesignsystem/auro-hyperlink\",\n \"@aurodesignsystem/auro-icon\",\n \"@aurodesignsystem/auro-loader\",\n \"@aurodesignsystem/auro-lockup\",\n \"@aurodesignsystem/auro-nav\",\n \"@aurodesignsystem/auro-pane\",\n \"@aurodesignsystem/auro-popover\",\n \"@aurodesignsystem/auro-sidenav\",\n \"@aurodesignsystem/auro-skeleton\",\n \"@aurodesignsystem/auro-slideshow\",\n \"@aurodesignsystem/auro-table\",\n \"@aurodesignsystem/auro-tabs\",\n \"@aurodesignsystem/auro-toast\",\n];\n\nconst auroPackages = [\n ...auroComponents,\n \"@aurodesignsystem/auro-library\",\n \"@aurodesignsystem/WebCoreStyleSheets\",\n \"@aurodesignsystem/AuroDesignTokens\",\n \"@aurodesignsystem/auro-cli\",\n \"@alaskaairux/icons\",\n];\n\n// Agent helpers\n// =========================================================\ninterface DependencyTreeAnswers {\n useExisting: boolean;\n}\n\nasync function getOrCreateDependencyTree(\n relevantPackages: string[],\n): Promise<string> {\n // check if output and config directories exist, if not create them\n try {\n await fs.mkdir(OUTPUT_DIR, { recursive: true });\n await fs.mkdir(CONFIG_DIR, { recursive: true });\n } catch (error) {\n console.error(\"Failed to create output or config directories:\", error);\n process.exit(1);\n }\n\n const spinner = ora(\"Creating dependency tree...\").start();\n\n // Create multi-gitter dependency tree configuration\n spinner.text = \"Creating multi-gitter dependency tree configuration...\";\n await createMultiGitterDependencyTreeConfig(CONFIG_DIR);\n\n spinner.text = \"Scraping dependencies from Auro packages...\";\n\n // Run multi-gitter using the generated config\n const scriptPath = fromCliRoot(\"static\", \"getAuroDeps.js\");\n const multiGitterCommand = `multi-gitter run \"node ${scriptPath}\" --config ${path.join(CONFIG_DIR, \"multi-gitter_DEPENDENCY_TREE.yml\")}`;\n try {\n await shell(multiGitterCommand);\n } catch (error) {\n spinner.fail(\"Failed to generate dependency tree:\");\n console.error(error);\n process.exit(1);\n }\n\n spinner.text = \"Generating dependency tree JSON file using packages...\";\n await formatDependencyTree(OUTPUT_DIR, relevantPackages);\n\n spinner.succeed(\"Dependency tree generated successfully.\");\n\n return path.join(OUTPUT_DIR, \"dependencyTree.json\");\n}\n\nconst getDependencyBatchesFromTree = async (\n dependencyTreePath: string,\n): Promise<string[][]> => {\n const spinner = ora(\"Loading dependency tree...\").start();\n const dependencyTree = JSON.parse(\n await fs.readFile(dependencyTreePath, \"utf-8\"),\n );\n\n spinner.text = \"Processing dependency tree...\";\n const batches = getBatchedUpdateOrder(dependencyTree);\n spinner.succeed(\"Dependency batches created successfully.\");\n\n return batches;\n};\n\n// Agent command\n// =========================================================\nexport default program.command(\"agent\").action(async (option) => {\n const answers = await inquirer.prompt([\n {\n type: \"select\",\n name: \"agentAction\",\n message: \"What agent action do you want to perform?\",\n choices: [\n {\n name: \"Run a migration on auro components\",\n value: AgentActions.RunMigration,\n },\n ],\n default: [AgentActions.RunMigration],\n },\n\n {\n type: \"input\",\n name: \"migrationId\",\n message: \"What migration id do you want to run?\",\n when: (answers) => answers.agentAction === AgentActions.RunMigration,\n validate: (input) =>\n input.trim() !== \"\" || \"Migration id cannot be empty.\",\n },\n\n {\n type: \"confirm\",\n name: \"useExisting\",\n message: \"Would you like to specify starting packages?\",\n default: true,\n transformer: (value) =>\n value ? \"Yes = Packages related to selections\" : \"No = All packages\",\n when: (answers) => answers.agentAction === AgentActions.RunMigration,\n },\n\n {\n type: \"checkbox\",\n name: \"startWithComponents\",\n message:\n \"Enter the components to start with (comma-separated, blank for all):\",\n choices: auroComponents.map((component) => ({\n name: component.replace(\"@aurodesignsystem/\", \"\"),\n value: component,\n })),\n when: (answers) =>\n answers.agentAction === AgentActions.RunMigration &&\n answers.useExisting,\n },\n ]);\n\n switch (answers.agentAction) {\n case AgentActions.RunMigration: {\n // Placeholder for actual migration logic\n const spinner = ora(\"Running migration...\").start();\n const dependencyTreePath = await getOrCreateDependencyTree(\n answers.startWithComponents,\n );\n\n spinner.text = \"Getting dependency batches from tree...\";\n const dependencyBatches =\n await getDependencyBatchesFromTree(dependencyTreePath);\n\n const batchedUpdateOrderText = dependencyBatches\n .map(\n (batch, index) =>\n `Batch ${index + 1}\\n${batch.map((pkg) => ` - ${pkg.replace(\"@aurodesignsystem\", \"AlaskaAirlines\").replace(\"@alaskaairux/icons\", \"AlaskaAirlines/Icons\")}`).join(\"\\n\")}`,\n )\n .join(\"\\n\\n\");\n\n console.log(batchedUpdateOrderText);\n\n spinner.text = \"Running migrations on dependency batches...\";\n // DO STUFF HERE :)\n\n new Promise((resolve) => setTimeout(resolve, 2000)); // Simulate async operation\n spinner.succeed(\"Migration process completed successfully.\");\n\n // spinner.succeed(\"Migration process completed.\");\n break;\n }\n // Add more cases for additional actions as needed\n default:\n console.error(\"Unknown action selected.\");\n // spinner.fail(\"Unknown action selected.\");\n }\n});\n", "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport ora from \"ora\";\n\nconst JsonConfig = {\n \"auth-type\": \"workspace-token\",\n \"author-email\": null,\n \"author-name\": null,\n \"base-branch\": \"main\",\n \"base-url\": null,\n \"clone-dir\": \".gitter-temp\",\n \"code-search\": null,\n concurrent: 4,\n \"conflict-strategy\": \"replace\",\n draft: false,\n \"dry-run\": true,\n \"fetch-depth\": 1,\n fork: false,\n \"fork-owner\": null,\n \"git-type\": \"go\",\n group: null,\n \"include-subgroups\": false,\n insecure: false,\n interactive: false,\n labels: null,\n \"log-file\": \"'-'\",\n \"log-format\": \"'text'\",\n \"log-level\": \"'error'\",\n \"max-reviewers\": 0,\n \"max-team-reviewers\": 0,\n org: null,\n output: \"'-'\",\n \"plain-output\": false,\n platform: \"github\",\n project: null,\n \"push-only\": false,\n repo: [\n \"AlaskaAirlines/auro-accordion\",\n \"AlaskaAirlines/auro-alert\",\n \"AlaskaAirlines/auro-avatar\",\n \"AlaskaAirlines/auro-background\",\n \"AlaskaAirlines/auro-backtotop\",\n \"AlaskaAirlines/auro-button\",\n \"AlaskaAirlines/auro-badge\",\n \"AlaskaAirlines/auro-banner\",\n \"AlaskaAirlines/auro-card\",\n \"AlaskaAirlines/auro-carousel\",\n \"AlaskaAirlines/auro-datetime\",\n \"AlaskaAirlines/auro-dialog\",\n \"AlaskaAirlines/auro-drawer\",\n \"AlaskaAirlines/auro-flight\",\n \"AlaskaAirlines/auro-flightline\",\n \"AlaskaAirlines/auro-header\",\n \"AlaskaAirlines/auro-hyperlink\",\n \"AlaskaAirlines/auro-icon\",\n \"AlaskaAirlines/auro-loader\",\n \"AlaskaAirlines/auro-lockup\",\n \"AlaskaAirlines/auro-nav\",\n \"AlaskaAirlines/auro-pane\",\n \"AlaskaAirlines/auro-popover\",\n \"AlaskaAirlines/auro-sidenav\",\n \"AlaskaAirlines/auro-skeleton\",\n \"AlaskaAirlines/auro-slideshow\",\n \"AlaskaAirlines/auro-table\",\n \"AlaskaAirlines/auro-tabs\",\n \"AlaskaAirlines/auro-toast\",\n // UNCOMMENT BELOW WHEN MAIN/MASTER BRANCHES ARE READY\n // \"AlaskaAirlines/AuroDocsSite\"\n ],\n \"repo-exclude\": null,\n \"repo-include\": null,\n \"repo-search\": null,\n reviewers: null,\n \"skip-forks\": false,\n \"skip-pr\": false,\n \"skip-repo\": null,\n \"ssh-auth\": false,\n \"team-reviewers\": null,\n};\n\nfunction toYaml(config) {\n return Object.entries(config)\n .map(([key, value]) => {\n if (Array.isArray(value)) {\n return `${key}:\\n - ${value.join(\"\\n - \")}`;\n }\n if (typeof value === \"object\" && value !== null) {\n return `${key}:\\n${Object.entries(value)\n .map(([k, v]) => ` ${k}: ${v}`)\n .join(\"\\n\")}`;\n }\n return `${key}: ${value}`;\n })\n .join(\"\\n\");\n}\n\nexport async function createMultiGitterDependencyTreeConfig(outputPath) {\n const spinner = ora(\"Writing multi-gitter configuration...\").start();\n const configContent = toYaml(JsonConfig);\n const configPath = path.join(outputPath, \"multi-gitter_DEPENDENCY_TREE.yml\");\n\n try {\n await fs.writeFile(configPath, configContent, \"utf8\");\n spinner.succeed(`Multi-gitter configuration written to ${configPath}`);\n } catch (error) {\n spinner.fail(\"Error writing multi-gitter configuration:\");\n console.error(error);\n }\n}\n", "import fs from \"node:fs\";\nimport path from \"node:path\";\n\ninterface PackageJsonExcerpt {\n name: string;\n peerDependencies: Record<string, string>;\n devDependencies: Record<string, string>;\n dependencies: Record<string, string>;\n}\n\ninterface DependencyNode {\n dependsOn: string[];\n dependentPackages: string[];\n}\n\ntype DependencyTree = Record<string, DependencyNode>;\n\nexport function getBatchedUpdateOrder(\n dependencyTree: DependencyTree,\n): Array<string[]> {\n const inDegree: Record<string, number> = {};\n const batches: Array<string[]> = [];\n let currentBatch: string[] = [];\n const queue: string[] = [];\n\n // Initialize in-degree (count of dependencies for each package)\n for (const pkg in dependencyTree) {\n inDegree[pkg] = dependencyTree[pkg].dependsOn.length;\n }\n\n // Find packages with no dependencies (in-degree = 0)\n for (const pkg in inDegree) {\n if (inDegree[pkg] === 0) {\n queue.push(pkg);\n }\n }\n\n while (queue.length > 0) {\n currentBatch = [];\n // Process the queue (topological sorting)\n const queueLength = queue.length;\n for (let i = 0; i < queueLength; i++) {\n const current = queue.shift()!;\n currentBatch.push(current);\n\n // Reduce the in-degree of dependent packages\n for (const dependent of dependencyTree[current].dependentPackages) {\n inDegree[dependent]--;\n\n // If a package now has no dependencies, add it to the queue\n if (inDegree[dependent] === 0) {\n queue.push(dependent);\n }\n }\n }\n batches.push(currentBatch);\n }\n\n // If we couldn't process all packages, there is a circular dependency\n if (batches.flat().length !== Object.keys(dependencyTree).length) {\n throw new Error(\"Circular dependency detected!\");\n }\n\n return batches;\n}\n\nfunction getJsonFilesFromDirectory(directory: string): string[] {\n return fs.readdirSync(directory).filter((file) => file.endsWith(\".json\"));\n}\n\n/**\n * Formats the dependency tree for the specified target dependencies.\n * @param rawTargetDependencies {string[]} - List of target dependencies to format. Expects package names like \"button\", \"hyperlink\", etc. without the \"@aurodesignsystem/\" prefix.\n * @returns {Promise<DependencyTree>} - A promise that resolves to the formatted dependency tree.\n */\nexport async function formatDependencyTree(\n jsonFileDirectory: string,\n targetDependencies: string[] = [],\n): Promise<DependencyTree> {\n console.log(targetDependencies);\n let dependencyTree: DependencyTree = {};\n\n const files = getJsonFilesFromDirectory(jsonFileDirectory);\n\n for (const file of files) {\n // Skip the dependency tree file itself if it already exists\n if (file === \"dependencyTree.json\") {\n continue;\n }\n\n const contents = fs.readFileSync(`${jsonFileDirectory}/${file}`, \"utf-8\");\n const data: PackageJsonExcerpt = JSON.parse(contents);\n\n const packageName = data.name;\n const peerDependencies = Object.keys(data.peerDependencies);\n const devDependencies = Object.keys(data.devDependencies);\n const dependencies = Object.keys(data.dependencies);\n\n if (!dependencyTree[packageName]) {\n dependencyTree[packageName] = { dependsOn: [], dependentPackages: [] };\n }\n\n const allDependencies = [\n ...peerDependencies,\n ...devDependencies,\n ...dependencies,\n ];\n\n dependencyTree[packageName].dependsOn = [...new Set(allDependencies)];\n\n for (const dependency of allDependencies) {\n if (!dependencyTree[dependency]) {\n dependencyTree[dependency] = { dependsOn: [], dependentPackages: [] };\n }\n\n if (!dependencyTree[dependency].dependentPackages.includes(packageName)) {\n dependencyTree[dependency].dependentPackages.push(packageName);\n }\n }\n }\n\n // If there are no specified target dependencies, use all packages\n if (targetDependencies.length) {\n // If there ARE target dependencies, filter the dependency tree down to just relevant packages\n // A tree will start only include package that the target dependencies depend on, OR packages that depend on the target dependencies\n const relevantPackages = new Set<string>();\n\n // Include any packages that depend on a target dependency\n for (const [pkg, node] of Object.entries(dependencyTree)) {\n if (node.dependsOn.some((dep) => targetDependencies.includes(dep))) {\n relevantPackages.add(pkg);\n }\n }\n\n // Also include the target dependencies themselves\n for (const target of targetDependencies) {\n if (dependencyTree[target]) {\n relevantPackages.add(target);\n }\n }\n\n // Final filtered dependency tree\n const _filteredDependencyTree: DependencyTree = {};\n for (const pkg of relevantPackages) {\n _filteredDependencyTree[pkg] = {\n dependsOn: dependencyTree[pkg].dependsOn.filter((dep) =>\n relevantPackages.has(dep),\n ),\n dependentPackages: dependencyTree[pkg].dependentPackages.filter((dep) =>\n relevantPackages.has(dep),\n ),\n };\n }\n\n dependencyTree = _filteredDependencyTree;\n } else {\n console.log(\"No target dependencies provided - using all packages.\");\n }\n\n // Write the dependency tree to a file\n fs.writeFileSync(\n `${jsonFileDirectory}/dependencyTree.json`,\n JSON.stringify(dependencyTree, null, 2),\n );\n\n return dependencyTree;\n}\n", "import { program } from \"commander\";\nimport { api, cem, docs, serve } from \"#scripts/docs/index.ts\";\nimport { withServerOptions } from \"#commands/_sharedOptions.js\";\n\nlet docsCommand = program\n .command(\"docs\")\n .description(\"Generate API documentation\")\n .option(\"-c, --cem\", \"Generate Custom Elements Manifest (CEM) file\", false)\n .option(\"-a, --api\", \"Creates api md file from CEM\", false)\n \n docsCommand = withServerOptions(docsCommand);\n\n export default docsCommand.action(async (options) => {\n\n if (options.cem) {\n await cem();\n }\n\n if (options.api) {\n await api();\n }\n\n await docs();\n\n if( options.serve ) {\n await serve(options);\n }\n\n });\n", "import { program } from \"commander\";\nimport { createADOItem } from \"#scripts/ado/index.ts\";\n\nexport const adoCommand = program\n .command(\"ado\")\n .description(\"Generate ADO item from GitHub issue\")\n .option(\"-g, --gh-issue <issue>\", \"What GitHub issue to use\")\n .action(async (options) => {\n\n if (options.ghIssue) {\n await createADOItem(options.ghIssue);\n }\n });\n", "import { Octokit } from \"@octokit/rest\";\nimport * as azdev from \"azure-devops-node-api\";\nimport ora from \"ora\";\nimport type { WorkItem } from \"azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.js\";\n\ninterface GitHubIssue {\n title: string;\n body: string | null;\n html_url: string;\n number: number;\n repository: {\n owner: { login: string };\n name: string;\n };\n}\n\n/**\n * Fetches GitHub issue details\n * @param issueUrl - Full GitHub issue URL or in format \"owner/repo#number\"\n * @returns GitHub issue details\n */\nconst fetchGitHubIssue = async (issueUrl: string): Promise<GitHubIssue> => {\n const ghToken = process.env.GH_TOKEN;\n if (!ghToken) {\n throw new Error(\"GH_TOKEN environment variable is required\");\n }\n\n const octokit = new Octokit({\n auth: ghToken,\n });\n\n let owner: string;\n let repo: string;\n let issueNumberStr: string;\n\n // Parse the issue URL or reference\n if (issueUrl.includes('github.com')) {\n // Full URL format: https://github.com/owner/repo/issues/123\n const urlMatch = issueUrl.match(/github\\.com\\/([^\\/]+)\\/([^\\/]+)\\/issues\\/(\\d+)/);\n if (!urlMatch) {\n throw new Error(\"Invalid GitHub issue URL format\");\n }\n [, owner, repo, issueNumberStr] = urlMatch;\n } else if (issueUrl.includes('#')) {\n // Short format: owner/repo#123\n const shortMatch = issueUrl.match(/([^\\/]+)\\/([^#]+)#(\\d+)/);\n if (!shortMatch) {\n throw new Error(\"Invalid GitHub issue reference format\");\n }\n [, owner, repo, issueNumberStr] = shortMatch;\n } else {\n throw new Error(\"Issue must be provided as full URL or in format 'owner/repo#number'\");\n }\n\n const issueNumber = Number.parseInt(issueNumberStr, 10);\n\n try {\n const { data: issue } = await octokit.rest.issues.get({\n owner,\n repo,\n issue_number: issueNumber,\n });\n\n return {\n title: issue.title,\n body: issue.body ?? null,\n html_url: issue.html_url,\n number: issue.number,\n repository: {\n owner: { login: owner },\n name: repo,\n },\n };\n } catch (error) {\n throw new Error(`Failed to fetch GitHub issue: ${error}`);\n }\n};\n\n/**\n * Checks if GitHub issue already has an ADO work item linked\n * @param issue - GitHub issue details\n * @returns ADO URL if found, null otherwise\n */\nconst getExistingADOLink = async (issue: GitHubIssue): Promise<string | null> => {\n const ghToken = process.env.GH_TOKEN;\n if (!ghToken) {\n return null;\n }\n\n const octokit = new Octokit({\n auth: ghToken,\n });\n\n try {\n // Get the ADO field value from the GitHub project\n const query = `\n query($owner: String!, $repo: String!, $issueNumber: Int!) {\n repository(owner: $owner, name: $repo) {\n issue(number: $issueNumber) {\n projectItems(first: 10) {\n nodes {\n project {\n number\n }\n fieldValues(first: 20) {\n nodes {\n ... on ProjectV2ItemFieldTextValue {\n text\n field {\n ... on ProjectV2Field {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n `;\n\n const variables = {\n owner: issue.repository.owner.login,\n repo: issue.repository.name,\n issueNumber: issue.number,\n };\n\n const response = await octokit.graphql(query, variables) as {\n repository: {\n issue: {\n projectItems: {\n nodes: Array<{\n project: { number: number };\n fieldValues: {\n nodes: Array<{\n text?: string;\n field?: { name?: string };\n }>;\n };\n }>;\n };\n };\n };\n };\n\n // Look for project #19 with ado field\n const project19Item = response.repository.issue.projectItems.nodes.find(\n item => item.project.number === 19\n );\n\n if (project19Item) {\n const adoFieldValue = project19Item.fieldValues.nodes.find(\n fieldValue => fieldValue.field?.name?.toLowerCase() === 'ado' && fieldValue.text?.trim()\n );\n\n if (adoFieldValue?.text?.trim()) {\n return adoFieldValue.text.trim();\n }\n }\n\n return null;\n } catch (error) {\n console.error(`Failed to check existing ADO link: ${error}`);\n return null;\n }\n};\n\n/**\n * Adds GitHub issue to project #19 and updates the \"ado\" field\n * @param issue - GitHub issue details\n * @param adoWorkItemUrl - ADO work item URL\n */\nconst updateGitHubProject = async (\n issue: GitHubIssue,\n adoWorkItemUrl: string\n): Promise<void> => {\n const ghToken = process.env.GH_TOKEN;\n if (!ghToken) {\n throw new Error(\"GH_TOKEN environment variable is required\");\n }\n\n const octokit = new Octokit({\n auth: ghToken,\n });\n\n const projectNumber = 19; // Alaska Airlines project #19\n\n try {\n // Get project and issue info in one query\n const query = `\n query($org: String!, $projectNumber: Int!, $owner: String!, $repo: String!, $issueNumber: Int!) {\n organization(login: $org) {\n projectV2(number: $projectNumber) {\n id\n fields(first: 20) {\n nodes {\n ... on ProjectV2Field {\n id\n name\n }\n ... on ProjectV2SingleSelectField {\n id\n name\n }\n ... on ProjectV2IterationField {\n id\n name\n }\n }\n }\n }\n }\n repository(owner: $owner, name: $repo) {\n issue(number: $issueNumber) {\n id\n projectItems(first: 10) {\n nodes {\n id\n project {\n number\n }\n }\n }\n }\n }\n }\n `;\n\n const variables = {\n org: \"AlaskaAirlines\",\n projectNumber,\n owner: issue.repository.owner.login,\n repo: issue.repository.name,\n issueNumber: issue.number,\n };\n\n const response = await octokit.graphql(query, variables) as {\n organization: {\n projectV2: {\n id: string;\n fields: {\n nodes: Array<{ id: string; name: string }>;\n };\n };\n };\n repository: {\n issue: {\n id: string;\n projectItems: {\n nodes: Array<{\n id: string;\n project: { number: number };\n }>;\n };\n };\n };\n };\n\n const projectId = response.organization.projectV2.id;\n const issueId = response.repository.issue.id;\n const adoField = response.organization.projectV2.fields.nodes.find(\n field => field.name?.toLowerCase() === 'ado'\n );\n\n // Check if issue is already in the project\n let projectItemId = response.repository.issue.projectItems.nodes.find(\n item => item.project.number === projectNumber\n )?.id;\n\n // Add to project if not already there\n if (!projectItemId) {\n const addMutation = `\n mutation($projectId: ID!, $contentId: ID!) {\n addProjectV2ItemById(\n input: {\n projectId: $projectId\n contentId: $contentId\n }\n ) {\n item {\n id\n }\n }\n }\n `;\n\n const addResponse = await octokit.graphql(addMutation, {\n projectId,\n contentId: issueId,\n }) as {\n addProjectV2ItemById: {\n item: { id: string };\n };\n };\n\n projectItemId = addResponse.addProjectV2ItemById.item.id;\n // Issue added to project (handled by spinner in main function)\n }\n\n // Update the ado field if it exists\n if (adoField && projectItemId) {\n const updateMutation = `\n mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) {\n updateProjectV2ItemFieldValue(\n input: {\n projectId: $projectId\n itemId: $itemId\n fieldId: $fieldId\n value: {\n text: $value\n }\n }\n ) {\n projectV2Item {\n id\n }\n }\n }\n `;\n\n await octokit.graphql(updateMutation, {\n projectId,\n itemId: projectItemId,\n fieldId: adoField.id,\n value: adoWorkItemUrl,\n });\n\n // Field updated (handled by spinner in main function)\n } else if (!adoField) {\n throw new Error(\"No 'ado' field found in GitHub project\");\n }\n\n } catch (error) {\n console.error(`Failed to update GitHub project: ${error}`);\n // Don't throw - we don't want to fail the entire process\n }\n};\n\n/**\n * Creates a user story work item in Azure DevOps\n * @param issue - GitHub issue details\n * @returns Created work item\n */\nconst createADOWorkItem = async (issue: GitHubIssue): Promise<WorkItem> => {\n const adoToken = process.env.ADO_TOKEN;\n if (!adoToken) {\n throw new Error(\"ADO_TOKEN environment variable is required\");\n }\n\n // ADO organization and project details\n const orgUrl = \"https://dev.azure.com/itsals\";\n const projectName = \"E_Retain_Content\";\n const areaPath = \"E_Retain_Content\\\\Auro Design System\";\n\n // Create connection to Azure DevOps\n const authHandler = azdev.getPersonalAccessTokenHandler(adoToken);\n const connection = new azdev.WebApi(orgUrl, authHandler);\n const workItemTrackingApi = await connection.getWorkItemTrackingApi();\n\n try {\n // Prepare work item data - omitting iteration path to use project default\n const workItemData = [\n {\n op: \"add\",\n path: \"/fields/System.Title\",\n value: issue.title,\n },\n {\n op: \"add\",\n path: \"/fields/System.Description\",\n value: `GitHub Issue: <a href=\"${issue.html_url}\">${issue.html_url}</a>`,\n },\n {\n op: \"add\",\n path: \"/fields/System.AreaPath\",\n value: areaPath,\n },\n ];\n\n return await workItemTrackingApi.createWorkItem(\n null,\n workItemData,\n projectName,\n \"User Story\"\n );\n } catch (error) {\n throw new Error(`Failed to create ADO work item: ${error}`);\n }\n};\n\nexport const createADOItem = async (ghIssue: string) => {\n const spinner = ora(`Processing GitHub issue: ${ghIssue}`).start();\n \n try {\n // Validate environment variables\n if (!process.env.GH_TOKEN) {\n throw new Error(\"GH_TOKEN environment variable is required\");\n }\n if (!process.env.ADO_TOKEN) {\n throw new Error(\"ADO_TOKEN environment variable is required\");\n }\n\n spinner.text = \"Fetching GitHub issue details...\";\n const issue = await fetchGitHubIssue(ghIssue);\n spinner.succeed(`Found issue: \"${issue.title}\"`);\n\n // Check if issue already has an ADO work item linked in the project\n const checkSpinner = ora(\"Checking for existing ADO work item...\").start();\n const existingADOLink = await getExistingADOLink(issue);\n \n if (existingADOLink) {\n checkSpinner.succeed(\"ADO work item already exists for this issue!\");\n console.log(`${existingADOLink}`);\n return; // Exit early - no need to create a new work item\n }\n \n checkSpinner.succeed(\"No existing ADO work item found\");\n\n const createSpinner = ora(\"Creating new ADO work item...\").start();\n const workItem = await createADOWorkItem(issue);\n createSpinner.succeed(`Successfully created ADO work item #${workItem.id}`);\n \n console.log(`Work item: ${workItem._links?.html?.href || 'N/A'}`);\n\n // Add to GitHub project and update the ado field with the new work item\n if (workItem._links?.html?.href) {\n const projectSpinner = ora(\"Adding to GitHub project and updating ADO field...\").start();\n await updateGitHubProject(issue, workItem._links.html.href);\n projectSpinner.succeed(\"Updated GitHub project with ADO link\");\n } \n } catch (error) {\n spinner.fail(`Error: ${error instanceof Error ? error.message : error}`);\n process.exit(1);\n }\n}"],
5
+ "mappings": ";AAAA,OAAS,WAAAA,OAAe,YCAxB,OAAOC,OAAY,SACnB,OAAS,QAAAC,OAAY,kBAErB,IAAOC,GAAQ,IACND,GAAKD,GAAO,SAAS,UAAU,CAAC,ECHzC,OAAOG,OAAQ,UACf,OAAOC,OAAU,YACjB,OAAS,iBAAAC,OAAqB,WAM9B,SAASC,EAASC,EAAS,CACrB,QAAQ,IAAI,OACd,QAAQ,IAAI,WAAWA,CAAO,EAAE,CAEpC,CAMe,SAARC,GAAqC,CAC1C,GAAI,CAEF,IAAMC,EAAaJ,GAAc,YAAY,GAAG,EAC1CK,EAAYN,GAAK,QAAQK,CAAU,EACzCH,EAAS,wBAAwBI,CAAS,EAAE,EAG5C,IAAMC,EAAcP,GAAK,QAAQM,EAAW,KAAM,cAAc,EAGhE,OADAJ,EAAS,6BAA6BK,CAAW,EAAE,EAC/CR,GAAG,WAAWQ,CAAW,GAC3BL,EAAS,0BAA0BK,CAAW,EAAE,EAC5B,KAAK,MAAMR,GAAG,aAAaQ,EAAa,MAAM,CAAC,EAChD,UAIrBL,EACE,8FACF,EACO,QACT,OAASM,EAAO,CACd,eAAQ,MAAM,oCAAqCA,CAAK,EACjD,OACT,CACF,CC7CA,OAAS,WAAAC,OAAe,YACxB,OAAOC,OAAS,MCGT,SAASC,EAAiBC,EAAS,CACxC,OAAOA,EACJ,OAAO,gCAAiC,gCAAgC,EACxE,OAAO,cAAe,qBAAqB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GAAaC,GACvB,QAAQ,KAAK,EACb,YAAY,qCAAqC,EACjD,OAAO,yBAA0B,0BAA0B,EAC3D,OAAO,MAAOC,GAAY,CAErBA,EAAQ,SACV,MAAMC,GAAcD,EAAQ,OAAO,CAEvC,CAAC,ElCKHE,GACG,KAAK,MAAM,EACX,QAAQC,EAAkB,CAAC,EAC3B,YAAY,8CAA8C,EAE7DD,GAAQ,YAAY,YAAaE,GAAW,CAAC,EAE7CF,GAAQ,MAAM",
6
+ "names": ["program", "figlet", "mind", "auroSplash_default", "fs", "path", "fileURLToPath", "debugLog", "message", "getPackageVersion", "__filename", "__dirname", "packagePath", "error", "program", "ora", "withBuildOptions", "command", "withServerOptions", "terser", "watch", "rmSync", "join", "ora", "rollup", "ora", "spawn", "ora", "shell", "command", "_args", "commandString", "spinner", "finalCommand", "finalArgs", "parts", "isWatchMode", "child", "commandOutput", "data", "output", "resolve", "reject", "code", "fs", "path", "markdownTable", "Docs", "_Docs", "options", "outDir", "outFile", "manifestPath", "getElements", "renderAllElements", "manifestContent", "error", "elements", "docsDir", "apiMarkdown", "apiFilename", "wcaModules", "els", "module", "dec", "a", "b", "element", "includeTitle", "sections", "renderTable", "renderPropertiesAttributesTable", "renderParameters", "getType", "propertiesTable", "methodsTable", "m", "eventsTable", "slotsTable", "cssPartsTable", "cssPropertiesTable", "escapeMarkdown", "properties", "attributes", "mergedData", "processedNames", "prop", "propType", "displayType", "attr", "headers", "rows", "item", "defaultDoubleSanitized", "defaultWrapped", "parameters", "param", "paramType", "description", "name", "data", "get", "capitalize", "filteredData", "p", "value", "table", "text", "obj", "type", "normalizeType", "t", "ref", "result", "pathInput", "fallback", "parts", "current", "s", "str", "fs", "os", "path", "process", "getAuroHomeDir", "homeDir", "withHomeDir", "args", "fromCliRoot", "relativePath", "cliScript", "dirname", "configPath", "file", "Logger", "generateReadmeUrl", "processContentForFile", "templateFiller", "fs", "path", "PAGE_TEMPLATE_PATH", "defaultDocsProcessorConfig", "pathFromCwd", "pathLike", "fileConfigs", "config", "pageTemplateFullPath", "pageFiles", "pageObjects", "file", "processDocFiles", "fileConfigsList", "fileConfig", "err", "runDefaultDocsBuild", "startDevServer", "hmrPlugin", "ora", "DEFAULT_CONFIG", "startDevelopmentServer", "options", "serverSpinner", "serverConfig", "context", "next", "server", "error", "cem", "cemSpinner", "ora", "shell", "configPath", "error", "errorMessage", "api", "docsSpinner", "Docs", "docs", "runDefaultDocsBuild", "serve", "options", "startDevelopmentServer", "analyzeComponents", "cem", "api", "cleanupDist", "distPath", "join", "spinner", "ora", "rmSync", "error", "runBuildStep", "taskName", "taskFn", "successMsg", "failMsg", "result", "buildCombinedBundle", "mainConfig", "demoConfig", "runBuildStep", "mainBundle", "rollup", "demoBundle", "generateDocs", "options", "sourceFiles", "outFile", "skipDocs", "skipSpinner", "ora", "analyzeComponents", "runDefaultDocsBuild", "basename", "join", "nodeResolve", "glob", "litScss", "path", "glob", "watchGlobs", "globs", "items", "item", "filename", "error", "DEFAULTS", "getPluginsConfig", "modulePaths", "options", "watchPatterns", "dedupe", "dev", "allModulePaths", "nodeResolve", "litScss", "join", "watchGlobs", "getMainBundleConfig", "watch", "input", "outputDir", "format", "chunk", "getExternalConfig", "getWatcherConfig", "getDemoConfig", "globPattern", "ignorePattern", "glob", "file", "basename", "watchOptions", "additional", "path", "ora", "buildInProgress", "builds", "MIN_BUILD_INTERVAL", "sourceEventPaths", "OUTPUT_PATHS", "isOutputFile", "filePath", "normalizedPath", "path", "outputPath", "error", "runBuildTask", "taskName", "taskFn", "task", "handleWatcherEvents", "watcher", "options", "onInitialBuildComplete", "isInitialBuild", "buildTasksResults", "scheduledTasksTimer", "bundleSpinner", "watchSpinner", "ora", "buildTasks", "sourceFiles", "outFile", "skipDocs", "skipSpinner", "analyzeSpinner", "analyzeComponents", "docsSpinner", "generateDocs", "checkInitialBuildComplete", "schedulePostBundleTasks", "delay", "event", "inputs", "input", "setupWatchModeListeners", "closeSpinner", "runProductionBuild", "options", "mainBundleConfig", "getMainBundleConfig", "demoConfig", "getDemoConfig", "terser", "generateDocs", "buildCombinedBundle", "setupWatchMode", "isDevMode", "watcher", "watch", "handleWatcherEvents", "startDevelopmentServer", "setupWatchModeListeners", "buildWithRollup", "cleanupDist", "error", "devCommand", "program", "withBuildOptions", "withServerOptions", "dev_default", "options", "build", "ora", "buildWithRollup", "error", "program", "ora", "buildCommand", "program", "withBuildOptions", "build_default", "options", "build", "ora", "buildWithRollup", "error", "exec", "path", "process", "fileURLToPath", "util", "program", "inquirer", "migrate_default", "program", "options", "filename", "fileURLToPath", "dirname", "path", "scriptPath", "execPromise", "util", "exec", "process", "inquirer", "shell", "process", "program", "readFile", "writeFile", "Logger", "fs", "path", "Octokit", "ora", "processContentForFile", "templateFiller", "getFolderItemsFromRelativeRepoPath", "ref", "responseData", "errorMessage", "processFolderItemsIntoFileConfigs", "folderItems", "templatePathToReplace", "rootDir", "fileConfigs", "item", "directorySpinner", "nestedFolderItems", "nestedConfigs", "finalPath", "outputPath", "config", "removeDirectory", "dirPath", "error", "generateDirectoryTree", "prefix", "isLast", "stats", "baseName", "result", "sortedEntries", "i", "entry", "entryPath", "isLastEntry", "newPrefix", "syncDotGithubDir", "githubPath", "removeSpinner", "templatesDefaultGithubPath", "processSpinner", "treeSpinner", "githubDirPath", "treeOutput", "treeError", "sync_default", "program", "options", "Logger", "cwd", "process", "syncDotGithubDir", "codeownersPath", "codeownersFixed", "readFile", "writeFile", "fs", "path", "Logger", "program", "glob", "prepWcaCompatibleCode_default", "code", "sourcePath", "defaultTag", "className", "classDesc", "WAC_DIR", "path", "globPath", "sources", "source", "glob", "err", "createExtendsFile", "filePaths", "fs", "filePath", "resolvedPath", "fileContent", "newPath", "newCode", "prepWcaCompatibleCode_default", "main", "wca_setup_default", "program", "Logger", "error", "program", "chalk", "ora", "appendFile", "readFile", "Logger", "simpleGit", "git", "error", "Git", "_Git", "pattern", "err", "currentBranch", "targetBranch", "commitRange", "commitChunks", "chunk", "commits", "parts", "hash", "date", "author_name", "subject", "bodyLines", "line", "body", "shortHash", "typeMatch", "type", "log", "result", "files", "branchName", "message", "chalk", "MAX_SUBJECT_LENGTH", "MAX_BODY_LENGTH", "getColoredType", "type", "wrapString", "str", "maxLength", "words", "result", "currentLine", "word", "displayDebugView", "commitList", "commit", "subject", "body", "github", "getExistingLabels", "token", "octokit", "context", "owner", "repo", "prNumber", "existingLabels", "label", "error", "applyLabelToPR", "prefixedLabel", "existingSemanticLabels", "existingLabel", "generateReleaseNotes", "commitList", "releaseCommitTypes", "releaseCommits", "commit", "commitsToShow", "bodyLines", "line", "formattedLine", "chalk", "analyzeCommits", "debug", "setLabel", "releaseNotes", "spinner", "ora", "Git", "displayDebugView", "commitTypes", "formattedTypes", "type", "getColoredType", "handleLabels", "error", "validCommitTypes", "foundCommitTypes", "selectedLabel", "highestPriorityIndex", "priorityIndex", "labelSpinner", "getExistingLabels", "applyLabelToPR", "errorMessage", "check_commits_default", "program", "option", "analyzeCommits", "fs", "get", "chalk", "program", "ora", "pr_release_default", "option", "updatePackageJson", "namespace", "prNumber", "packageSpinner", "packageJsonPath", "packageJson", "releaseVersion", "packageComponent", "packageName", "incrementVersion", "getIncrementVersion", "packageVersion", "error", "spinner", "resolve", "handleResponse", "res", "data", "chunk", "packageData", "versions", "maxIteration", "versionRegex", "version", "match", "iteration", "registryUrl", "req", "err", "path", "fileURLToPath", "program", "open", "__filename", "fileURLToPath", "cliRootDir", "path", "test_default", "program", "option", "command", "coveragePath", "files", "shell", "open", "fs", "path", "program", "inquirer", "ora", "fs", "path", "ora", "JsonConfig", "toYaml", "config", "key", "value", "k", "v", "createMultiGitterDependencyTreeConfig", "outputPath", "spinner", "configContent", "configPath", "error", "fs", "getBatchedUpdateOrder", "dependencyTree", "inDegree", "batches", "currentBatch", "queue", "pkg", "queueLength", "i", "current", "dependent", "getJsonFilesFromDirectory", "directory", "file", "formatDependencyTree", "jsonFileDirectory", "targetDependencies", "files", "contents", "data", "packageName", "peerDependencies", "devDependencies", "dependencies", "allDependencies", "dependency", "relevantPackages", "node", "dep", "target", "_filteredDependencyTree", "CONFIG_DIR", "withHomeDir", "OUTPUT_DIR", "auroComponents", "auroPackages", "getOrCreateDependencyTree", "relevantPackages", "fs", "OUTPUT_DIR", "CONFIG_DIR", "error", "spinner", "ora", "createMultiGitterDependencyTreeConfig", "multiGitterCommand", "fromCliRoot", "path", "shell", "formatDependencyTree", "getDependencyBatchesFromTree", "dependencyTreePath", "dependencyTree", "batches", "getBatchedUpdateOrder", "agent_default", "program", "option", "answers", "inquirer", "input", "value", "component", "batchedUpdateOrderText", "batch", "index", "pkg", "resolve", "program", "docsCommand", "program", "withServerOptions", "docs_default", "options", "cem", "api", "docs", "serve", "program", "Octokit", "azdev", "ora", "fetchGitHubIssue", "issueUrl", "ghToken", "octokit", "owner", "repo", "issueNumberStr", "urlMatch", "shortMatch", "issueNumber", "issue", "error", "getExistingADOLink", "query", "variables", "project19Item", "item", "adoFieldValue", "fieldValue", "updateGitHubProject", "adoWorkItemUrl", "projectNumber", "response", "projectId", "issueId", "adoField", "field", "projectItemId", "createADOWorkItem", "adoToken", "orgUrl", "projectName", "areaPath", "authHandler", "workItemTrackingApi", "workItemData", "createADOItem", "ghIssue", "spinner", "checkSpinner", "existingADOLink", "createSpinner", "workItem", "projectSpinner", "adoCommand", "program", "options", "createADOItem", "program", "getPackageVersion", "auroSplash_default"]
7
7
  }