@agents-inc/cli 0.35.0 → 0.41.1
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.
- package/CHANGELOG.md +103 -0
- package/config/skills-matrix.yaml +124 -132
- package/config/stacks.yaml +687 -687
- package/dist/{chunk-BLLXNFWP.js → chunk-2D6LKRHW.js} +2 -2
- package/dist/{chunk-KWF6D7ZP.js → chunk-342YB6TQ.js} +27 -19
- package/dist/chunk-342YB6TQ.js.map +1 -0
- package/dist/{chunk-OGXSTJP2.js → chunk-423MJ6DT.js} +66 -36
- package/dist/chunk-423MJ6DT.js.map +1 -0
- package/dist/{chunk-5LPPIT6H.js → chunk-4LT6RXMY.js} +4 -4
- package/dist/{chunk-LFHZBF6N.js → chunk-4SYXPG7L.js} +4 -3
- package/dist/chunk-4SYXPG7L.js.map +1 -0
- package/dist/{chunk-CXWPUVA7.js → chunk-4UTPJXUX.js} +9 -9
- package/dist/{chunk-CEWNZQMH.js → chunk-5TMB53BV.js} +9 -3
- package/dist/chunk-5TMB53BV.js.map +1 -0
- package/dist/chunk-7FBM7V3E.js +144 -0
- package/dist/chunk-7FBM7V3E.js.map +1 -0
- package/dist/chunk-ACVJVYMC.js +111 -0
- package/dist/chunk-ACVJVYMC.js.map +1 -0
- package/dist/{chunk-YN35L5NE.js → chunk-AH7XHAKN.js} +12 -12
- package/dist/chunk-AH7XHAKN.js.map +1 -0
- package/dist/{chunk-5YNZJ5TP.js → chunk-AVVYFEMF.js} +2 -2
- package/dist/{chunk-U36YCEBK.js → chunk-BFISETQG.js} +32 -23
- package/dist/chunk-BFISETQG.js.map +1 -0
- package/dist/{chunk-YCS7GF6Y.js → chunk-BK7TANUV.js} +6 -2
- package/dist/chunk-BK7TANUV.js.map +1 -0
- package/dist/{chunk-OGJ7DFCL.js → chunk-DV4ALU5I.js} +6 -6
- package/dist/{chunk-NJ775OJ4.js → chunk-FHBICUXB.js} +7 -7
- package/dist/chunk-FHBICUXB.js.map +1 -0
- package/dist/{chunk-OKILA27U.js → chunk-GEDWVX6Y.js} +87 -100
- package/dist/chunk-GEDWVX6Y.js.map +1 -0
- package/dist/{chunk-DC5AK3LW.js → chunk-GG4BSB6S.js} +5 -11
- package/dist/chunk-GG4BSB6S.js.map +1 -0
- package/dist/{chunk-BPD4VUAU.js → chunk-H6H3COI5.js} +5 -5
- package/dist/{chunk-AQQVSNUX.js → chunk-K77I4XGL.js} +20 -6
- package/dist/chunk-K77I4XGL.js.map +1 -0
- package/dist/chunk-KC2SIUIA.js +46 -0
- package/dist/chunk-KC2SIUIA.js.map +1 -0
- package/dist/{chunk-HTTPKSL6.js → chunk-KXM7KOPE.js} +2 -2
- package/dist/{chunk-GGHH3KR2.js → chunk-LJRP4SWY.js} +6 -5
- package/dist/chunk-LJRP4SWY.js.map +1 -0
- package/dist/{chunk-PKUIO2Z7.js → chunk-MNPPGIZQ.js} +8 -8
- package/dist/chunk-MNPPGIZQ.js.map +1 -0
- package/dist/{chunk-IG7CUREJ.js → chunk-NYP5SB2V.js} +2 -2
- package/dist/{chunk-JXMRTHDT.js → chunk-NZYKDVRL.js} +2 -2
- package/dist/{chunk-XNQJBQ5X.js → chunk-PURJZ72D.js} +2 -2
- package/dist/{chunk-VEZ2GZEK.js → chunk-R52N7DBG.js} +2 -2
- package/dist/chunk-SILUTTV7.js +113 -0
- package/dist/chunk-SILUTTV7.js.map +1 -0
- package/dist/{chunk-YIKBNGE3.js → chunk-TJAZ7QCF.js} +7 -7
- package/dist/chunk-TJAZ7QCF.js.map +1 -0
- package/dist/{chunk-WMVGRAFB.js → chunk-TTXV55NQ.js} +235 -117
- package/dist/chunk-TTXV55NQ.js.map +1 -0
- package/dist/{chunk-ZE355C6C.js → chunk-UKTYDNWJ.js} +9 -4
- package/dist/chunk-UKTYDNWJ.js.map +1 -0
- package/dist/{chunk-YPJKOM42.js → chunk-WS6OQIEN.js} +2 -2
- package/dist/{chunk-OI4WBRC7.js → chunk-XJXJZ2MJ.js} +113 -150
- package/dist/chunk-XJXJZ2MJ.js.map +1 -0
- package/dist/chunk-YLJYAQSG.js +210 -0
- package/dist/chunk-YLJYAQSG.js.map +1 -0
- package/dist/{chunk-MZB3GGOH.js → chunk-YRVTXSXP.js} +1 -2
- package/dist/chunk-YRVTXSXP.js.map +1 -0
- package/dist/{chunk-XYCN2GCV.js → chunk-ZLHGJSRK.js} +3 -3
- package/dist/cli/defaults/agent-mappings.yaml +16 -72
- package/dist/commands/build/marketplace.js +3 -3
- package/dist/commands/build/plugins.js +5 -5
- package/dist/commands/build/stack.js +5 -5
- package/dist/commands/compile.js +14 -18
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/get.js +8 -8
- package/dist/commands/config/get.js.map +1 -1
- package/dist/commands/config/index.js +5 -5
- package/dist/commands/config/path.js +4 -4
- package/dist/commands/config/set-project.js +7 -7
- package/dist/commands/config/set-project.js.map +1 -1
- package/dist/commands/config/show.js +5 -5
- package/dist/commands/config/unset-project.js +5 -5
- package/dist/commands/config/unset-project.js.map +1 -1
- package/dist/commands/diff.js +12 -9
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +8 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +35 -29
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +6 -6
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/import/skill.js +16 -16
- package/dist/commands/import/skill.js.map +1 -1
- package/dist/commands/info.js +7 -6
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/init.js +42 -31
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +6 -5
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/agent.js +5 -5
- package/dist/commands/new/skill.js +12 -9
- package/dist/commands/new/skill.js.map +1 -1
- package/dist/commands/outdated.js +8 -5
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +7 -7
- package/dist/commands/uninstall.js +122 -103
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +8 -7
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate.js +5 -5
- package/dist/commands/version/bump.js +4 -4
- package/dist/commands/version/index.js +4 -4
- package/dist/commands/version/set.js +4 -4
- package/dist/commands/version/show.js +4 -4
- package/dist/components/skill-search/skill-search.js +3 -3
- package/dist/components/wizard/category-grid.js +3 -3
- package/dist/components/wizard/category-grid.test.js +79 -58
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/checkbox-grid.js +10 -0
- package/dist/components/wizard/checkbox-grid.test.js +270 -0
- package/dist/components/wizard/checkbox-grid.test.js.map +1 -0
- package/dist/components/wizard/domain-selection.js +7 -5
- package/dist/components/wizard/help-modal.js +2 -2
- package/dist/components/wizard/menu-item.js +2 -2
- package/dist/components/wizard/search-modal.js +2 -2
- package/dist/components/wizard/search-modal.test.js +2 -2
- package/dist/components/wizard/section-progress.js +2 -2
- package/dist/components/wizard/section-progress.test.js +2 -2
- package/dist/components/wizard/source-grid.js +4 -4
- package/dist/components/wizard/source-grid.test.js +4 -4
- package/dist/components/wizard/stack-selection.js +9 -8
- package/dist/components/wizard/step-agents.js +16 -0
- package/dist/components/wizard/step-agents.js.map +1 -0
- package/dist/components/wizard/step-agents.test.js +190 -0
- package/dist/components/wizard/step-agents.test.js.map +1 -0
- package/dist/components/wizard/step-build.js +10 -9
- package/dist/components/wizard/step-build.test.js +56 -53
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +3 -3
- package/dist/components/wizard/step-confirm.test.js +19 -12
- package/dist/components/wizard/step-confirm.test.js.map +1 -1
- package/dist/components/wizard/step-refine.js +2 -2
- package/dist/components/wizard/step-refine.test.js +2 -2
- package/dist/components/wizard/step-settings.js +5 -5
- package/dist/components/wizard/step-settings.test.js +8 -8
- package/dist/components/wizard/step-sources.js +11 -10
- package/dist/components/wizard/step-sources.test.js +16 -15
- package/dist/components/wizard/step-sources.test.js.map +1 -1
- package/dist/components/wizard/step-stack.js +12 -10
- package/dist/components/wizard/step-stack.test.js +19 -19
- package/dist/components/wizard/step-stack.test.js.map +1 -1
- package/dist/components/wizard/view-title.js +2 -2
- package/dist/components/wizard/wizard-layout.js +8 -7
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard-tabs.test.js +6 -4
- package/dist/components/wizard/wizard-tabs.test.js.map +1 -1
- package/dist/components/wizard/wizard.js +27 -24
- package/dist/config/skills-matrix.yaml +124 -132
- package/dist/config/stacks.yaml +687 -687
- package/dist/hooks/init.js +3 -3
- package/dist/{source-manager-PTK4P6BF.js → source-manager-PPABS6BC.js} +4 -4
- package/dist/source-manager-PPABS6BC.js.map +1 -0
- package/dist/stores/wizard-store.js +5 -4
- package/dist/stores/wizard-store.test.js +336 -136
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/src/schemas/agent.schema.json +3 -3
- package/src/schemas/metadata.schema.json +55 -15
- package/src/schemas/project-config.schema.json +42 -2
- package/src/schemas/project-source-config.schema.json +5 -5
- package/src/schemas/skills-matrix.schema.json +103 -104
- package/src/schemas/stack.schema.json +1 -1
- package/src/schemas/stacks.schema.json +41 -1
- package/dist/chunk-AQQVSNUX.js.map +0 -1
- package/dist/chunk-CEWNZQMH.js.map +0 -1
- package/dist/chunk-DC5AK3LW.js.map +0 -1
- package/dist/chunk-GGHH3KR2.js.map +0 -1
- package/dist/chunk-KWF6D7ZP.js.map +0 -1
- package/dist/chunk-LFHZBF6N.js.map +0 -1
- package/dist/chunk-MZB3GGOH.js.map +0 -1
- package/dist/chunk-NJ775OJ4.js.map +0 -1
- package/dist/chunk-NVQEHRJY.js +0 -120
- package/dist/chunk-NVQEHRJY.js.map +0 -1
- package/dist/chunk-OGXSTJP2.js.map +0 -1
- package/dist/chunk-OI4WBRC7.js.map +0 -1
- package/dist/chunk-OKILA27U.js.map +0 -1
- package/dist/chunk-PKUIO2Z7.js.map +0 -1
- package/dist/chunk-U36YCEBK.js.map +0 -1
- package/dist/chunk-UFUQUFV6.js +0 -256
- package/dist/chunk-UFUQUFV6.js.map +0 -1
- package/dist/chunk-WMVGRAFB.js.map +0 -1
- package/dist/chunk-YCS7GF6Y.js.map +0 -1
- package/dist/chunk-YIKBNGE3.js.map +0 -1
- package/dist/chunk-YN35L5NE.js.map +0 -1
- package/dist/chunk-ZE355C6C.js.map +0 -1
- /package/dist/{chunk-BLLXNFWP.js.map → chunk-2D6LKRHW.js.map} +0 -0
- /package/dist/{chunk-5LPPIT6H.js.map → chunk-4LT6RXMY.js.map} +0 -0
- /package/dist/{chunk-CXWPUVA7.js.map → chunk-4UTPJXUX.js.map} +0 -0
- /package/dist/{chunk-5YNZJ5TP.js.map → chunk-AVVYFEMF.js.map} +0 -0
- /package/dist/{chunk-OGJ7DFCL.js.map → chunk-DV4ALU5I.js.map} +0 -0
- /package/dist/{chunk-BPD4VUAU.js.map → chunk-H6H3COI5.js.map} +0 -0
- /package/dist/{chunk-HTTPKSL6.js.map → chunk-KXM7KOPE.js.map} +0 -0
- /package/dist/{chunk-IG7CUREJ.js.map → chunk-NYP5SB2V.js.map} +0 -0
- /package/dist/{chunk-JXMRTHDT.js.map → chunk-NZYKDVRL.js.map} +0 -0
- /package/dist/{chunk-XNQJBQ5X.js.map → chunk-PURJZ72D.js.map} +0 -0
- /package/dist/{chunk-VEZ2GZEK.js.map → chunk-R52N7DBG.js.map} +0 -0
- /package/dist/{chunk-YPJKOM42.js.map → chunk-WS6OQIEN.js.map} +0 -0
- /package/dist/{chunk-XYCN2GCV.js.map → chunk-ZLHGJSRK.js.map} +0 -0
- /package/dist/{source-manager-PTK4P6BF.js.map → components/wizard/checkbox-grid.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/commands/update.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Flags, Args } from \"@oclif/core\";\nimport { printTable } from \"@oclif/table\";\nimport { render } from \"ink\";\nimport path from \"path\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { loadSkillsMatrixFromSource, type SourceLoadResult } from \"../lib/loading/index.js\";\nimport { recompileAgents } from \"../lib/agents/index.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport {\n compareLocalSkillsWithSource,\n injectForkedFromMetadata,\n type SkillComparisonResult,\n} from \"../lib/skills/index.js\";\nimport { fileExists, copy } from \"../utils/fs.js\";\nimport { LOCAL_SKILLS_PATH } from \"../consts.js\";\nimport {\n ERROR_MESSAGES,\n SUCCESS_MESSAGES,\n STATUS_MESSAGES,\n INFO_MESSAGES,\n} from \"../utils/messages.js\";\nimport { Confirm } from \"../components/common/confirm.js\";\n\nasync function updateSkill(\n skill: SkillComparisonResult,\n projectDir: string,\n sourceResult: SourceLoadResult,\n): Promise<{ success: boolean; newHash: string | null; error?: string }> {\n if (!skill.sourcePath || !skill.sourceHash) {\n return { success: false, newHash: null, error: \"No source path available\" };\n }\n\n const localSkillsPath = path.join(projectDir, LOCAL_SKILLS_PATH);\n const destPath = path.join(localSkillsPath, skill.dirName);\n const srcPath = path.join(sourceResult.sourcePath, \"src\", skill.sourcePath);\n\n try {\n await copy(srcPath, destPath);\n await injectForkedFromMetadata(destPath, skill.id, skill.sourceHash);\n\n return { success: true, newHash: skill.sourceHash };\n } catch (error) {\n return {\n success: false,\n newHash: null,\n error: getErrorMessage(error),\n };\n }\n}\n\nfunction findSkillByPartialMatch(\n skillName: string,\n results: SkillComparisonResult[],\n): SkillComparisonResult | null {\n const exact = results.find((r) => r.id === skillName);\n if (exact) return exact;\n\n const partial = results.find((r) => {\n const nameWithoutAuthor = r.id.replace(/\\s*\\(@\\w+\\)$/, \"\").toLowerCase();\n return nameWithoutAuthor === skillName.toLowerCase();\n });\n if (partial) return partial;\n\n const byDir = results.find((r) => r.dirName.toLowerCase() === skillName.toLowerCase());\n if (byDir) return byDir;\n\n return null;\n}\n\nfunction findSimilarSkills(skillName: string, results: SkillComparisonResult[]): string[] {\n const lowered = skillName.toLowerCase();\n return results\n .filter((r) => {\n const name = r.id.toLowerCase();\n const dir = r.dirName.toLowerCase();\n return (\n name.includes(lowered) || dir.includes(lowered) || lowered.includes(name.split(\" \")[0])\n );\n })\n .map((r) => r.id)\n .slice(0, 3);\n}\n\ntype UpdateConfirmProps = {\n onConfirm: () => void;\n onCancel: () => void;\n};\n\nconst UpdateConfirm: React.FC<UpdateConfirmProps> = ({ onConfirm, onCancel }) => {\n return (\n <Confirm\n message=\"Proceed with update?\"\n onConfirm={onConfirm}\n onCancel={onCancel}\n defaultValue={false}\n />\n );\n};\n\nexport default class Update extends BaseCommand {\n static summary = \"Update local skills from source\";\n\n static description =\n \"Update local skills from the source repository. By default, checks all skills for updates. Specify a skill name to update only that skill.\";\n\n static args = {\n skill: Args.string({\n description: \"Specific skill to update (optional)\",\n required: false,\n }),\n };\n\n static flags = {\n ...BaseCommand.baseFlags,\n yes: Flags.boolean({\n char: \"y\",\n description: \"Skip confirmation prompt\",\n default: false,\n }),\n \"no-recompile\": Flags.boolean({\n description: \"Skip agent recompilation after update\",\n default: false,\n }),\n };\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"<%= config.bin %> <%= command.id %> my-skill\",\n \"<%= config.bin %> <%= command.id %> --yes\",\n \"<%= config.bin %> <%= command.id %> --source /path/to/marketplace\",\n \"<%= config.bin %> <%= command.id %> --no-recompile\",\n ];\n\n async run(): Promise<void> {\n const { args, flags } = await this.parse(Update);\n const projectDir = process.cwd();\n const shouldRecompile = !flags[\"no-recompile\"];\n\n try {\n const localSkillsPath = path.join(projectDir, LOCAL_SKILLS_PATH);\n if (!(await fileExists(localSkillsPath))) {\n this.warn(ERROR_MESSAGES.NO_LOCAL_SKILLS);\n return;\n }\n\n this.log(STATUS_MESSAGES.LOADING_SKILLS);\n\n const sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir,\n });\n\n this.log(\n `Loaded from ${sourceResult.isLocal ? \"local\" : \"remote\"}: ${sourceResult.sourcePath}`,\n );\n\n const sourceSkills: Record<string, { path: string }> = {};\n for (const [skillId, skill] of Object.entries(sourceResult.matrix.skills)) {\n if (!skill) continue;\n if (!skill.local) {\n sourceSkills[skillId] = { path: skill.path };\n }\n }\n\n const allResults = await compareLocalSkillsWithSource(\n projectDir,\n sourceResult.sourcePath,\n sourceSkills,\n );\n\n let outdatedSkills = allResults.filter((r) => r.status === \"outdated\");\n\n if (args.skill) {\n const foundSkill = findSkillByPartialMatch(args.skill, allResults);\n\n if (!foundSkill) {\n this.log(\"\");\n this.log(`Error: Skill \"${args.skill}\" not found.`);\n this.log(\"\");\n\n const similar = findSimilarSkills(args.skill, allResults);\n if (similar.length > 0) {\n this.log(\"Did you mean one of these?\");\n for (const name of similar) {\n this.log(` - ${name}`);\n }\n this.log(\"\");\n }\n\n this.log(`Run \\`agentsinc search ${args.skill}\\` to search available skills.`);\n this.log(\"\");\n this.error(ERROR_MESSAGES.SKILL_NOT_FOUND, { exit: EXIT_CODES.ERROR });\n }\n\n if (foundSkill.status === \"current\") {\n this.log(\"\");\n this.log(`Skill \"${foundSkill.id}\" is already up to date.`);\n this.log(\"\");\n this.log(` Local hash: ${foundSkill.localHash}`);\n this.log(` Source hash: ${foundSkill.sourceHash}`);\n this.log(\"\");\n return;\n }\n\n if (foundSkill.status === \"local-only\") {\n this.log(\"\");\n this.log(`Skill \"${foundSkill.id}\" is a local-only skill (not forked from source).`);\n this.log(\"Cannot update local-only skills.\");\n this.log(\"\");\n return;\n }\n\n outdatedSkills = [foundSkill];\n }\n\n if (outdatedSkills.length === 0) {\n this.log(\"\");\n this.logSuccess(SUCCESS_MESSAGES.ALL_SKILLS_UP_TO_DATE);\n this.log(\"\");\n return;\n }\n\n this.log(\"\");\n this.log(\"The following skills will be updated:\");\n this.log(\"\");\n\n printTable({\n data: outdatedSkills.map((skill) => ({\n skill: skill.id,\n localHash: skill.localHash ?? \"-\",\n sourceHash: skill.sourceHash ?? \"-\",\n })),\n columns: [\n { key: \"skill\", name: \"Skill\" },\n { key: \"localHash\", name: \"Local Hash\" },\n { key: \"sourceHash\", name: \"Source Hash\" },\n ],\n headerOptions: { bold: true },\n });\n\n this.log(\"\");\n this.log(`${outdatedSkills.length} skill(s) will be updated.`);\n this.log(\"\");\n\n if (!flags.yes) {\n let confirmed = false;\n let cancelled = false;\n\n const { waitUntilExit } = render(\n <UpdateConfirm\n onConfirm={() => {\n confirmed = true;\n }}\n onCancel={() => {\n cancelled = true;\n }}\n />,\n );\n\n await waitUntilExit();\n\n if (cancelled) {\n this.log(\"Update cancelled\");\n this.exit(EXIT_CODES.CANCELLED);\n }\n\n if (!confirmed) {\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n return;\n }\n }\n\n this.log(\"\");\n\n const updated: string[] = [];\n const failed: string[] = [];\n\n for (const skill of outdatedSkills) {\n this.log(`Updating ${skill.id}...`);\n\n const result = await updateSkill(skill, projectDir, sourceResult);\n\n if (result.success) {\n this.log(` Updated ${skill.id}`);\n updated.push(skill.id);\n } else {\n this.log(` Failed to update ${skill.id}: ${result.error}`);\n failed.push(skill.id);\n }\n }\n\n let recompiledAgents: string[] = [];\n\n if (shouldRecompile && updated.length > 0) {\n this.log(\"\");\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n\n try {\n const recompileResult = await recompileAgents({\n pluginDir: projectDir,\n sourcePath: sourceResult.sourcePath,\n projectDir,\n });\n\n recompiledAgents = recompileResult.compiled;\n\n if (recompiledAgents.length > 0) {\n this.log(\"Agents recompiled\");\n for (const agent of recompiledAgents) {\n this.log(` Recompiled: ${agent}`);\n }\n } else {\n this.log(INFO_MESSAGES.NO_AGENTS_TO_RECOMPILE);\n }\n\n if (recompileResult.warnings.length > 0) {\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n }\n } catch (error) {\n this.warn(\"Agent recompilation failed\");\n this.warn(`Could not recompile agents: ${getErrorMessage(error)}`);\n }\n }\n\n this.log(\"\");\n if (failed.length === 0) {\n const agentMsg =\n recompiledAgents.length > 0 ? `, ${recompiledAgents.length} agent(s) recompiled` : \"\";\n this.logSuccess(`Update complete! ${updated.length} skill(s) updated${agentMsg}.`);\n } else {\n this.warn(\n `Update finished with errors: ${updated.length} updated, ${failed.length} failed.`,\n );\n }\n this.log(\"\");\n\n if (failed.length > 0) {\n this.error(\"Some updates failed\", { exit: EXIT_CODES.ERROR });\n }\n } catch (error) {\n const message = getErrorMessage(error);\n this.error(`Update failed: ${message}`, { exit: EXIT_CODES.ERROR });\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA,SAAS,OAAO,YAAY;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,OAAO,UAAU;AAyFb;AAnEJ,eAAe,YACb,OACA,YACA,cACuE;AACvE,MAAI,CAAC,MAAM,cAAc,CAAC,MAAM,YAAY;AAC1C,WAAO,EAAE,SAAS,OAAO,SAAS,MAAM,OAAO,2BAA2B;AAAA,EAC5E;AAEA,QAAM,kBAAkB,KAAK,KAAK,YAAY,iBAAiB;AAC/D,QAAM,WAAW,KAAK,KAAK,iBAAiB,MAAM,OAAO;AACzD,QAAM,UAAU,KAAK,KAAK,aAAa,YAAY,OAAO,MAAM,UAAU;AAE1E,MAAI;AACF,UAAM,KAAK,SAAS,QAAQ;AAC5B,UAAM,yBAAyB,UAAU,MAAM,IAAI,MAAM,UAAU;AAEnE,WAAO,EAAE,SAAS,MAAM,SAAS,MAAM,WAAW;AAAA,EACpD,SAAS,OAAO;AACd,WAAO;AAAA,MACL,SAAS;AAAA,MACT,SAAS;AAAA,MACT,OAAO,gBAAgB,KAAK;AAAA,IAC9B;AAAA,EACF;AACF;AAEA,SAAS,wBACP,WACA,SAC8B;AAC9B,QAAM,QAAQ,QAAQ,KAAK,CAAC,MAAM,EAAE,OAAO,SAAS;AACpD,MAAI,MAAO,QAAO;AAElB,QAAM,UAAU,QAAQ,KAAK,CAAC,M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;AAAA,YACX,YAAY,aAAa;AAAA,YACzB;AAAA,UACF,CAAC;AAED,6BAAmB,gBAAgB;AAEnC,cAAI,iBAAiB,SAAS,GAAG;AAC/B,iBAAK,IAAI,mBAAmB;AAC5B,uBAAW,SAAS,kBAAkB;AACpC,mBAAK,IAAI,iBAAiB,KAAK,EAAE;AAAA,YACnC;AAAA,UACF,OAAO;AACL,iBAAK,IAAI,cAAc,sBAAsB;AAAA,UAC/C;AAEA,cAAI,gBAAgB,SAAS,SAAS,GAAG;AACvC,uBAAW,WAAW,gBAAgB,UAAU;AAC9C,mBAAK,KAAK,OAAO;AAAA,YACnB;AAAA,UACF;AAAA,QACF,SAAS,OAAO;AACd,eAAK,KAAK,4BAA4B;AACtC,eAAK,KAAK,+BAA+B,gBAAgB,KAAK,CAAC,EAAE;AAAA,QACnE;AAAA,MACF;AAEA,WAAK,IAAI,EAAE;AACX,UAAI,OAAO,WAAW,GAAG;AACvB,cAAM,WACJ,iBAAiB,SAAS,IAAI,KAAK,iBAAiB,MAAM,yBAAyB;AACrF,aAAK,WAAW,oBAAoB,QAAQ,MAAM,oBAAoB,QAAQ,GAAG;AAAA,MACnF,OAAO;AACL,aAAK;AAAA,UACH,gCAAgC,QAAQ,MAAM,aAAa,OAAO,MAAM;AAAA,QAC1E;AAAA,MACF;AACA,WAAK,IAAI,EAAE;AAEX,UAAI,OAAO,SAAS,GAAG;AACrB,aAAK,MAAM,uBAAuB,EAAE,MAAM,WAAW,MAAM,CAAC;AAAA,MAC9D;AAAA,IACF,SAAS,OAAO;AACd,YAAM,UAAU,gBAAgB,KAAK;AACrC,WAAK,MAAM,kBAAkB,OAAO,IAAI,EAAE,MAAM,WAAW,MAAM,CAAC;AAAA,IACpE;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli/commands/update.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Flags, Args } from \"@oclif/core\";\nimport { printTable } from \"@oclif/table\";\nimport { render } from \"ink\";\nimport path from \"path\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { loadSkillsMatrixFromSource, type SourceLoadResult } from \"../lib/loading/index.js\";\nimport { recompileAgents } from \"../lib/agents/index.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport {\n compareLocalSkillsWithSource,\n injectForkedFromMetadata,\n type SkillComparisonResult,\n} from \"../lib/skills/index.js\";\nimport { fileExists, copy } from \"../utils/fs.js\";\nimport { CLI_BIN_NAME, LOCAL_SKILLS_PATH } from \"../consts.js\";\nimport {\n ERROR_MESSAGES,\n SUCCESS_MESSAGES,\n STATUS_MESSAGES,\n INFO_MESSAGES,\n} from \"../utils/messages.js\";\nimport { Confirm } from \"../components/common/confirm.js\";\n\nasync function updateSkill(\n skill: SkillComparisonResult,\n projectDir: string,\n sourceResult: SourceLoadResult,\n): Promise<{ success: boolean; newHash: string | null; error?: string }> {\n if (!skill.sourcePath || !skill.sourceHash) {\n return { success: false, newHash: null, error: \"No source path available\" };\n }\n\n const localSkillsPath = path.join(projectDir, LOCAL_SKILLS_PATH);\n const destPath = path.join(localSkillsPath, skill.dirName);\n const srcPath = path.join(sourceResult.sourcePath, \"src\", skill.sourcePath);\n\n try {\n await copy(srcPath, destPath);\n await injectForkedFromMetadata(destPath, skill.id, skill.sourceHash);\n\n return { success: true, newHash: skill.sourceHash };\n } catch (error) {\n return {\n success: false,\n newHash: null,\n error: getErrorMessage(error),\n };\n }\n}\n\nfunction findSkillByPartialMatch(\n skillName: string,\n results: SkillComparisonResult[],\n): SkillComparisonResult | null {\n const exact = results.find((r) => r.id === skillName);\n if (exact) return exact;\n\n const partial = results.find((r) => {\n const nameWithoutAuthor = r.id.replace(/\\s*\\(@\\w+\\)$/, \"\").toLowerCase();\n return nameWithoutAuthor === skillName.toLowerCase();\n });\n if (partial) return partial;\n\n const byDir = results.find((r) => r.dirName.toLowerCase() === skillName.toLowerCase());\n if (byDir) return byDir;\n\n return null;\n}\n\nfunction findSimilarSkills(skillName: string, results: SkillComparisonResult[]): string[] {\n const lowered = skillName.toLowerCase();\n return results\n .filter((r) => {\n const name = r.id.toLowerCase();\n const dir = r.dirName.toLowerCase();\n return (\n name.includes(lowered) || dir.includes(lowered) || lowered.includes(name.split(\" \")[0])\n );\n })\n .map((r) => r.id)\n .slice(0, 3);\n}\n\ntype UpdateConfirmProps = {\n onConfirm: () => void;\n onCancel: () => void;\n};\n\nconst UpdateConfirm: React.FC<UpdateConfirmProps> = ({ onConfirm, onCancel }) => {\n return (\n <Confirm\n message=\"Proceed with update?\"\n onConfirm={onConfirm}\n onCancel={onCancel}\n defaultValue={false}\n />\n );\n};\n\nexport default class Update extends BaseCommand {\n static summary = \"Update local skills from source\";\n\n static description =\n \"Update local skills from the source repository. By default, checks all skills for updates. Specify a skill name to update only that skill.\";\n\n static args = {\n skill: Args.string({\n description: \"Specific skill to update (optional)\",\n required: false,\n }),\n };\n\n static flags = {\n ...BaseCommand.baseFlags,\n yes: Flags.boolean({\n char: \"y\",\n description: \"Skip confirmation prompt\",\n default: false,\n }),\n \"no-recompile\": Flags.boolean({\n description: \"Skip agent recompilation after update\",\n default: false,\n }),\n };\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"<%= config.bin %> <%= command.id %> my-skill\",\n \"<%= config.bin %> <%= command.id %> --yes\",\n \"<%= config.bin %> <%= command.id %> --source /path/to/marketplace\",\n \"<%= config.bin %> <%= command.id %> --no-recompile\",\n ];\n\n async run(): Promise<void> {\n const { args, flags } = await this.parse(Update);\n const projectDir = process.cwd();\n const shouldRecompile = !flags[\"no-recompile\"];\n\n try {\n const localSkillsPath = path.join(projectDir, LOCAL_SKILLS_PATH);\n if (!(await fileExists(localSkillsPath))) {\n this.warn(ERROR_MESSAGES.NO_LOCAL_SKILLS);\n return;\n }\n\n this.log(STATUS_MESSAGES.LOADING_SKILLS);\n\n const sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir,\n });\n\n this.log(\n `Loaded from ${sourceResult.isLocal ? \"local\" : \"remote\"}: ${sourceResult.sourcePath}`,\n );\n\n const sourceSkills: Record<string, { path: string }> = {};\n for (const [skillId, skill] of Object.entries(sourceResult.matrix.skills)) {\n if (!skill) continue;\n if (!skill.local) {\n sourceSkills[skillId] = { path: skill.path };\n }\n }\n\n const allResults = await compareLocalSkillsWithSource(\n projectDir,\n sourceResult.sourcePath,\n sourceSkills,\n );\n\n let outdatedSkills = allResults.filter((r) => r.status === \"outdated\");\n\n if (args.skill) {\n const foundSkill = findSkillByPartialMatch(args.skill, allResults);\n\n if (!foundSkill) {\n this.log(\"\");\n this.log(`Error: Skill \"${args.skill}\" not found.`);\n this.log(\"\");\n\n const similar = findSimilarSkills(args.skill, allResults);\n if (similar.length > 0) {\n this.log(\"Did you mean one of these?\");\n for (const name of similar) {\n this.log(` - ${name}`);\n }\n this.log(\"\");\n }\n\n this.log(`Run \\`${CLI_BIN_NAME} search ${args.skill}\\` to search available skills.`);\n this.log(\"\");\n this.error(ERROR_MESSAGES.SKILL_NOT_FOUND, { exit: EXIT_CODES.ERROR });\n }\n\n if (foundSkill.status === \"current\") {\n this.log(\"\");\n this.log(`Skill \"${foundSkill.id}\" is already up to date.`);\n this.log(\"\");\n this.log(` Local hash: ${foundSkill.localHash}`);\n this.log(` Source hash: ${foundSkill.sourceHash}`);\n this.log(\"\");\n return;\n }\n\n if (foundSkill.status === \"local-only\") {\n this.log(\"\");\n this.log(`Skill \"${foundSkill.id}\" is a local-only skill (not forked from source).`);\n this.log(\"Cannot update local-only skills.\");\n this.log(\"\");\n return;\n }\n\n outdatedSkills = [foundSkill];\n }\n\n if (outdatedSkills.length === 0) {\n this.log(\"\");\n this.logSuccess(SUCCESS_MESSAGES.ALL_SKILLS_UP_TO_DATE);\n this.log(\"\");\n return;\n }\n\n this.log(\"\");\n this.log(\"The following skills will be updated:\");\n this.log(\"\");\n\n printTable({\n data: outdatedSkills.map((skill) => ({\n skill: skill.id,\n localHash: skill.localHash ?? \"-\",\n sourceHash: skill.sourceHash ?? \"-\",\n })),\n columns: [\n { key: \"skill\", name: \"Skill\" },\n { key: \"localHash\", name: \"Local Hash\" },\n { key: \"sourceHash\", name: \"Source Hash\" },\n ],\n headerOptions: { bold: true },\n });\n\n this.log(\"\");\n this.log(`${outdatedSkills.length} skill(s) will be updated.`);\n this.log(\"\");\n\n if (!flags.yes) {\n let confirmed = false;\n let cancelled = false;\n\n const { waitUntilExit } = render(\n <UpdateConfirm\n onConfirm={() => {\n confirmed = true;\n }}\n onCancel={() => {\n cancelled = true;\n }}\n />,\n );\n\n await waitUntilExit();\n\n if (cancelled) {\n this.log(\"Update cancelled\");\n this.exit(EXIT_CODES.CANCELLED);\n }\n\n if (!confirmed) {\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n return;\n }\n }\n\n this.log(\"\");\n\n const updated: string[] = [];\n const failed: string[] = [];\n\n for (const skill of outdatedSkills) {\n this.log(`Updating ${skill.id}...`);\n\n const result = await updateSkill(skill, projectDir, sourceResult);\n\n if (result.success) {\n this.log(` Updated ${skill.id}`);\n updated.push(skill.id);\n } else {\n this.log(` Failed to update ${skill.id}: ${result.error}`);\n failed.push(skill.id);\n }\n }\n\n let recompiledAgents: string[] = [];\n\n if (shouldRecompile && updated.length > 0) {\n this.log(\"\");\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n\n try {\n const recompileResult = await recompileAgents({\n pluginDir: projectDir,\n sourcePath: sourceResult.sourcePath,\n projectDir,\n });\n\n recompiledAgents = recompileResult.compiled;\n\n if (recompiledAgents.length > 0) {\n this.log(\"Agents recompiled\");\n for (const agent of recompiledAgents) {\n this.log(` Recompiled: ${agent}`);\n }\n } else {\n this.log(INFO_MESSAGES.NO_AGENTS_TO_RECOMPILE);\n }\n\n if (recompileResult.warnings.length > 0) {\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n }\n } catch (error) {\n this.warn(\"Agent recompilation failed\");\n this.warn(`Could not recompile agents: ${getErrorMessage(error)}`);\n }\n }\n\n this.log(\"\");\n if (failed.length === 0) {\n const agentMsg =\n recompiledAgents.length > 0 ? `, ${recompiledAgents.length} agent(s) recompiled` : \"\";\n this.logSuccess(`Update complete! ${updated.length} skill(s) updated${agentMsg}.`);\n } else {\n this.warn(\n `Update finished with errors: ${updated.length} updated, ${failed.length} failed.`,\n );\n }\n this.log(\"\");\n\n if (failed.length > 0) {\n this.error(\"Some updates failed\", { exit: EXIT_CODES.ERROR });\n }\n } catch (error) {\n const message = getErrorMessage(error);\n this.error(`Update failed: ${message}`, { exit: EXIT_CODES.ERROR });\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA,SAAS,OAAO,YAAY;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,OAAO,UAAU;AAyFb;AAnEJ,eAAe,YACb,OACA,YACA,cACuE;AACvE,MAAI,CAAC,MAAM,cAAc,CAAC,MAAM,YAAY;AAC1C,WAAO,EAAE,SAAS,OAAO,SAAS,MAAM,OAAO,2BAA2B;AAAA,EAC5E;AAEA,QAAM,kBAAkB,KAAK,KAAK,YAAY,iBAAiB;AAC/D,QAAM,WAAW,KAAK,KAAK,iBAAiB,MAAM,OAAO;AACzD,QAAM,UAAU,KAAK,KAAK,aAAa,YAAY,OAAO,MAAM,UAAU;AAE1E,MAAI;AACF,UAAM,KAAK,SAAS,QAAQ;AAC5B,UAAM,yBAAyB,UAAU,MAAM,IAAI,MAAM,UAAU;AAEnE,WAAO,EAAE,SAAS,MAAM,SAAS,MAAM,WAAW;AAAA,EACpD,SAAS,OAAO;AACd,WAAO;AAAA,MACL,SAAS;AAAA,MACT,SAAS;AAAA,MACT,OAAO,gBAAgB,KAAK;AAAA,IAC9B;AAAA,EACF;AACF;AAEA,SAAS,wBACP,WACA,SAC8B;AAC9B,QAAM,QAAQ,QAAQ,KAAK,CAAC,MAAM,EAAE,OAAO,SAAS;AACpD,MAAI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
ERROR_MESSAGES
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-LJRP4SWY.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseCommand,
|
|
7
7
|
EXIT_CODES
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-2D6LKRHW.js";
|
|
9
9
|
import {
|
|
10
10
|
extractFrontmatter,
|
|
11
11
|
printPluginValidationResult,
|
|
12
12
|
validateAllPlugins,
|
|
13
13
|
validatePlugin
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-TTXV55NQ.js";
|
|
15
15
|
import "../chunk-T4EXUIBY.js";
|
|
16
16
|
import {
|
|
17
17
|
agentFrontmatterValidationSchema,
|
|
@@ -27,12 +27,12 @@ import {
|
|
|
27
27
|
skillsMatrixConfigSchema,
|
|
28
28
|
stackConfigValidationSchema,
|
|
29
29
|
stacksConfigSchema
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-XJXJZ2MJ.js";
|
|
31
31
|
import {
|
|
32
32
|
CLAUDE_DIR,
|
|
33
33
|
CLAUDE_SRC_DIR,
|
|
34
34
|
STANDARD_FILES
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-BK7TANUV.js";
|
|
36
36
|
import {
|
|
37
37
|
init_esm_shims
|
|
38
38
|
} from "../chunk-DHET7RCE.js";
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-2D6LKRHW.js";
|
|
6
6
|
import {
|
|
7
7
|
bumpPluginVersion,
|
|
8
8
|
findPluginManifest
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-TTXV55NQ.js";
|
|
10
10
|
import "../../chunk-T4EXUIBY.js";
|
|
11
11
|
import {
|
|
12
12
|
pluginManifestSchema,
|
|
13
13
|
readFile
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-XJXJZ2MJ.js";
|
|
15
15
|
import {
|
|
16
16
|
PLUGIN_MANIFEST_DIR,
|
|
17
17
|
PLUGIN_MANIFEST_FILE
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-BK7TANUV.js";
|
|
19
19
|
import {
|
|
20
20
|
init_esm_shims
|
|
21
21
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-2D6LKRHW.js";
|
|
6
6
|
import {
|
|
7
7
|
findPluginManifest,
|
|
8
8
|
getPluginVersion
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-TTXV55NQ.js";
|
|
10
10
|
import "../../chunk-T4EXUIBY.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-XJXJZ2MJ.js";
|
|
12
12
|
import {
|
|
13
13
|
PLUGIN_MANIFEST_DIR,
|
|
14
14
|
PLUGIN_MANIFEST_FILE
|
|
15
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-BK7TANUV.js";
|
|
16
16
|
import {
|
|
17
17
|
init_esm_shims
|
|
18
18
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-2D6LKRHW.js";
|
|
6
6
|
import {
|
|
7
7
|
findPluginManifest
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-TTXV55NQ.js";
|
|
9
9
|
import "../../chunk-T4EXUIBY.js";
|
|
10
10
|
import {
|
|
11
11
|
pluginManifestSchema,
|
|
12
12
|
readFile,
|
|
13
13
|
writeFile
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-XJXJZ2MJ.js";
|
|
15
15
|
import {
|
|
16
16
|
PLUGIN_MANIFEST_DIR,
|
|
17
17
|
PLUGIN_MANIFEST_FILE
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-BK7TANUV.js";
|
|
19
19
|
import {
|
|
20
20
|
init_esm_shims
|
|
21
21
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BaseCommand,
|
|
4
4
|
EXIT_CODES
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-2D6LKRHW.js";
|
|
6
6
|
import {
|
|
7
7
|
findPluginManifest,
|
|
8
8
|
getPluginVersion
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-TTXV55NQ.js";
|
|
10
10
|
import "../../chunk-T4EXUIBY.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-XJXJZ2MJ.js";
|
|
12
12
|
import {
|
|
13
13
|
PLUGIN_MANIFEST_DIR,
|
|
14
14
|
PLUGIN_MANIFEST_FILE
|
|
15
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-BK7TANUV.js";
|
|
16
16
|
import {
|
|
17
17
|
init_esm_shims
|
|
18
18
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
SkillSearch
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-ZLHGJSRK.js";
|
|
5
|
+
import "../../chunk-AVVYFEMF.js";
|
|
6
6
|
import "../../chunk-U3IGFMCY.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-BK7TANUV.js";
|
|
8
8
|
import "../../chunk-DHET7RCE.js";
|
|
9
9
|
export {
|
|
10
10
|
SkillSearch
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CategoryGrid
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-GEDWVX6Y.js";
|
|
5
|
+
import "../../chunk-GG4BSB6S.js";
|
|
6
|
+
import "../../chunk-BK7TANUV.js";
|
|
7
7
|
import "../../chunk-DHET7RCE.js";
|
|
8
8
|
export {
|
|
9
9
|
CategoryGrid
|
|
@@ -21,9 +21,9 @@ import {
|
|
|
21
21
|
} from "../../chunk-XY3XDVMI.js";
|
|
22
22
|
import {
|
|
23
23
|
CategoryGrid
|
|
24
|
-
} from "../../chunk-
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
24
|
+
} from "../../chunk-GEDWVX6Y.js";
|
|
25
|
+
import "../../chunk-GG4BSB6S.js";
|
|
26
|
+
import "../../chunk-BK7TANUV.js";
|
|
27
27
|
import {
|
|
28
28
|
init_esm_shims
|
|
29
29
|
} from "../../chunk-DHET7RCE.js";
|
|
@@ -48,7 +48,7 @@ var createCategory = (id, displayName, options, overrides = {}) => ({
|
|
|
48
48
|
});
|
|
49
49
|
var defaultCategories = [
|
|
50
50
|
createCategory(
|
|
51
|
-
"framework",
|
|
51
|
+
"web-framework",
|
|
52
52
|
"Framework",
|
|
53
53
|
[
|
|
54
54
|
createOption("web-test-react", "React", {
|
|
@@ -62,7 +62,7 @@ var defaultCategories = [
|
|
|
62
62
|
{ required: true }
|
|
63
63
|
),
|
|
64
64
|
createCategory(
|
|
65
|
-
"styling",
|
|
65
|
+
"web-styling",
|
|
66
66
|
"Styling",
|
|
67
67
|
[
|
|
68
68
|
createOption("web-scss-mod", "SCSS Modules", { selected: true }),
|
|
@@ -72,7 +72,7 @@ var defaultCategories = [
|
|
|
72
72
|
],
|
|
73
73
|
{ required: true }
|
|
74
74
|
),
|
|
75
|
-
createCategory("client-state", "Client State", [
|
|
75
|
+
createCategory("web-client-state", "Client State", [
|
|
76
76
|
createOption("web-test-zustand", "Zustand", { state: "recommended" }),
|
|
77
77
|
createOption("web-test-jotai", "Jotai"),
|
|
78
78
|
createOption("web-test-redux", "Redux", {
|
|
@@ -81,16 +81,16 @@ var defaultCategories = [
|
|
|
81
81
|
}),
|
|
82
82
|
createOption("web-test-mobx", "MobX")
|
|
83
83
|
]),
|
|
84
|
-
createCategory("server-state", "Server State", [
|
|
84
|
+
createCategory("web-server-state", "Server State", [
|
|
85
85
|
createOption("web-react-query", "React Query", { selected: true }),
|
|
86
86
|
createOption("web-test-swr", "SWR"),
|
|
87
87
|
createOption("web-test-apollo", "Apollo")
|
|
88
88
|
]),
|
|
89
|
-
createCategory("analytics", "Analytics", [createOption("web-test-posthog", "PostHog")])
|
|
89
|
+
createCategory("api-analytics", "Analytics", [createOption("web-test-posthog", "PostHog")])
|
|
90
90
|
];
|
|
91
91
|
var categoriesWithFramework = [
|
|
92
92
|
createCategory(
|
|
93
|
-
"framework",
|
|
93
|
+
"web-framework",
|
|
94
94
|
"Framework",
|
|
95
95
|
[
|
|
96
96
|
createOption("web-test-react", "React", {
|
|
@@ -106,7 +106,7 @@ var categoriesWithFramework = [
|
|
|
106
106
|
{ required: true }
|
|
107
107
|
),
|
|
108
108
|
createCategory(
|
|
109
|
-
"styling",
|
|
109
|
+
"web-styling",
|
|
110
110
|
"Styling",
|
|
111
111
|
[
|
|
112
112
|
createOption("web-scss-mod", "SCSS Modules"),
|
|
@@ -116,7 +116,7 @@ var categoriesWithFramework = [
|
|
|
116
116
|
],
|
|
117
117
|
{ required: true }
|
|
118
118
|
),
|
|
119
|
-
createCategory("client-state", "Client State", [
|
|
119
|
+
createCategory("web-client-state", "Client State", [
|
|
120
120
|
createOption("web-test-zustand", "Zustand", { state: "recommended" }),
|
|
121
121
|
createOption("web-test-jotai", "Jotai"),
|
|
122
122
|
createOption("web-test-redux", "Redux", { state: "discouraged" }),
|
|
@@ -127,11 +127,11 @@ var defaultProps = {
|
|
|
127
127
|
categories: defaultCategories,
|
|
128
128
|
defaultFocusedRow: 0,
|
|
129
129
|
defaultFocusedCol: 0,
|
|
130
|
-
|
|
130
|
+
showLabels: false,
|
|
131
131
|
expertMode: false,
|
|
132
132
|
onToggle: vi.fn(),
|
|
133
133
|
onFocusChange: vi.fn(),
|
|
134
|
-
|
|
134
|
+
onToggleLabels: vi.fn()
|
|
135
135
|
};
|
|
136
136
|
var renderGrid = (props = {}) => {
|
|
137
137
|
return render(/* @__PURE__ */ jsx(CategoryGrid, { ...defaultProps, ...props }));
|
|
@@ -218,7 +218,7 @@ describe("CategoryGrid component", () => {
|
|
|
218
218
|
});
|
|
219
219
|
it("should show disabled options with dimmed styling", () => {
|
|
220
220
|
const categories = [
|
|
221
|
-
createCategory("testing", "Test", [
|
|
221
|
+
createCategory("web-testing", "Test", [
|
|
222
222
|
createOption("web-test-opt1", "Option 1"),
|
|
223
223
|
createOption("web-test-opt2", "Option 2", { state: "disabled" })
|
|
224
224
|
])
|
|
@@ -230,7 +230,7 @@ describe("CategoryGrid component", () => {
|
|
|
230
230
|
});
|
|
231
231
|
it("should render selected skills with label text", () => {
|
|
232
232
|
const categories = [
|
|
233
|
-
createCategory("forms", "Forms", [
|
|
233
|
+
createCategory("web-forms", "Forms", [
|
|
234
234
|
createOption("web-test-opt1", "Selected Skill", { selected: true })
|
|
235
235
|
])
|
|
236
236
|
];
|
|
@@ -241,7 +241,7 @@ describe("CategoryGrid component", () => {
|
|
|
241
241
|
});
|
|
242
242
|
it("should render unselected skills with label text", () => {
|
|
243
243
|
const categories = [
|
|
244
|
-
createCategory("forms", "Forms", [
|
|
244
|
+
createCategory("web-forms", "Forms", [
|
|
245
245
|
createOption("web-test-opt1", "Unselected Skill", { state: "normal", selected: false })
|
|
246
246
|
])
|
|
247
247
|
];
|
|
@@ -252,7 +252,7 @@ describe("CategoryGrid component", () => {
|
|
|
252
252
|
});
|
|
253
253
|
it("should render disabled skills with label text", () => {
|
|
254
254
|
const categories = [
|
|
255
|
-
createCategory("forms", "Forms", [
|
|
255
|
+
createCategory("web-forms", "Forms", [
|
|
256
256
|
createOption("web-test-opt1", "Disabled Skill", { state: "disabled" })
|
|
257
257
|
])
|
|
258
258
|
];
|
|
@@ -263,7 +263,7 @@ describe("CategoryGrid component", () => {
|
|
|
263
263
|
});
|
|
264
264
|
it("should render discouraged skills with label text", () => {
|
|
265
265
|
const categories = [
|
|
266
|
-
createCategory("forms", "Forms", [
|
|
266
|
+
createCategory("web-forms", "Forms", [
|
|
267
267
|
createOption("web-test-opt1", "Discouraged Skill", { state: "discouraged" })
|
|
268
268
|
])
|
|
269
269
|
];
|
|
@@ -274,7 +274,7 @@ describe("CategoryGrid component", () => {
|
|
|
274
274
|
});
|
|
275
275
|
it("should render both selected and unselected skills with labels", () => {
|
|
276
276
|
const categories = [
|
|
277
|
-
createCategory("forms", "Forms", [
|
|
277
|
+
createCategory("web-forms", "Forms", [
|
|
278
278
|
createOption("web-test-opt1", "Active", { selected: true }),
|
|
279
279
|
createOption("web-test-opt2", "Inactive", { selected: false })
|
|
280
280
|
])
|
|
@@ -287,7 +287,7 @@ describe("CategoryGrid component", () => {
|
|
|
287
287
|
});
|
|
288
288
|
it("should render skill label regardless of selection state", () => {
|
|
289
289
|
const categories1 = [
|
|
290
|
-
createCategory("forms", "Forms", [
|
|
290
|
+
createCategory("web-forms", "Forms", [
|
|
291
291
|
createOption("web-test-opt1", "Toggle Skill", { selected: false })
|
|
292
292
|
])
|
|
293
293
|
];
|
|
@@ -295,7 +295,7 @@ describe("CategoryGrid component", () => {
|
|
|
295
295
|
const output1 = frame1();
|
|
296
296
|
unmount1();
|
|
297
297
|
const categories2 = [
|
|
298
|
-
createCategory("forms", "Forms", [
|
|
298
|
+
createCategory("web-forms", "Forms", [
|
|
299
299
|
createOption("web-test-opt1", "Toggle Skill", { selected: true })
|
|
300
300
|
])
|
|
301
301
|
];
|
|
@@ -327,11 +327,11 @@ describe("CategoryGrid component", () => {
|
|
|
327
327
|
});
|
|
328
328
|
it("should not lock any sections when no framework category exists", () => {
|
|
329
329
|
const categoriesNoFramework = [
|
|
330
|
-
createCategory("styling", "Styling", [
|
|
330
|
+
createCategory("web-styling", "Styling", [
|
|
331
331
|
createOption("web-test-scss", "SCSS"),
|
|
332
332
|
createOption("web-test-tailwind", "Tailwind")
|
|
333
333
|
]),
|
|
334
|
-
createCategory("client-state", "State", [createOption("web-test-zustand", "Zustand")])
|
|
334
|
+
createCategory("web-client-state", "State", [createOption("web-test-zustand", "Zustand")])
|
|
335
335
|
];
|
|
336
336
|
const { lastFrame, unmount } = renderGrid({
|
|
337
337
|
categories: categoriesNoFramework
|
|
@@ -546,13 +546,13 @@ describe("CategoryGrid component", () => {
|
|
|
546
546
|
await delay(RENDER_DELAY_MS);
|
|
547
547
|
await stdin.write(" ");
|
|
548
548
|
await delay(INPUT_DELAY_MS);
|
|
549
|
-
globalExpect(onToggle).toHaveBeenCalledWith("framework", "web-test-vue");
|
|
549
|
+
globalExpect(onToggle).toHaveBeenCalledWith("web-framework", "web-test-vue");
|
|
550
550
|
});
|
|
551
551
|
it("should call onToggle when pressing space on a selected option", async () => {
|
|
552
552
|
const onToggle = vi.fn();
|
|
553
553
|
const categories = [
|
|
554
554
|
createCategory(
|
|
555
|
-
"framework",
|
|
555
|
+
"web-framework",
|
|
556
556
|
"Framework",
|
|
557
557
|
[
|
|
558
558
|
createOption("web-test-react", "React", { selected: true }),
|
|
@@ -573,12 +573,12 @@ describe("CategoryGrid component", () => {
|
|
|
573
573
|
await delay(RENDER_DELAY_MS);
|
|
574
574
|
await stdin.write(" ");
|
|
575
575
|
await delay(INPUT_DELAY_MS);
|
|
576
|
-
globalExpect(onToggle).toHaveBeenCalledWith("framework", "web-test-react");
|
|
576
|
+
globalExpect(onToggle).toHaveBeenCalledWith("web-framework", "web-test-react");
|
|
577
577
|
});
|
|
578
578
|
it("should NOT call onToggle when all options in a category are disabled", async () => {
|
|
579
579
|
const onToggle = vi.fn();
|
|
580
580
|
const categories = [
|
|
581
|
-
createCategory("testing", "Test", [
|
|
581
|
+
createCategory("web-testing", "Test", [
|
|
582
582
|
createOption("web-test-opt1", "Option 1", { state: "disabled" }),
|
|
583
583
|
createOption("web-test-opt2", "Option 2", { state: "disabled" })
|
|
584
584
|
])
|
|
@@ -613,7 +613,7 @@ describe("CategoryGrid component", () => {
|
|
|
613
613
|
it("should navigate to disabled options when navigating right", async () => {
|
|
614
614
|
const onFocusChange = vi.fn();
|
|
615
615
|
const categories = [
|
|
616
|
-
createCategory("testing", "Test", [
|
|
616
|
+
createCategory("web-testing", "Test", [
|
|
617
617
|
createOption("web-test-opt1", "Option 1"),
|
|
618
618
|
createOption("web-test-opt2", "Option 2", { state: "disabled" }),
|
|
619
619
|
createOption("web-test-opt3", "Option 3")
|
|
@@ -635,7 +635,7 @@ describe("CategoryGrid component", () => {
|
|
|
635
635
|
it("should navigate to disabled options when navigating left", async () => {
|
|
636
636
|
const onFocusChange = vi.fn();
|
|
637
637
|
const categories = [
|
|
638
|
-
createCategory("testing", "Test", [
|
|
638
|
+
createCategory("web-testing", "Test", [
|
|
639
639
|
createOption("web-test-opt1", "Option 1"),
|
|
640
640
|
createOption("web-test-opt2", "Option 2", { state: "disabled" }),
|
|
641
641
|
createOption("web-test-opt3", "Option 3")
|
|
@@ -658,7 +658,7 @@ describe("CategoryGrid component", () => {
|
|
|
658
658
|
it("should navigate between all-disabled options in a row", async () => {
|
|
659
659
|
const onFocusChange = vi.fn();
|
|
660
660
|
const categories = [
|
|
661
|
-
createCategory("testing", "Test", [
|
|
661
|
+
createCategory("web-testing", "Test", [
|
|
662
662
|
createOption("web-test-opt1", "Option 1", { state: "disabled" }),
|
|
663
663
|
createOption("web-test-opt2", "Option 2", { state: "disabled" })
|
|
664
664
|
])
|
|
@@ -714,37 +714,59 @@ describe("CategoryGrid component", () => {
|
|
|
714
714
|
globalExpect(onFocusChange).not.toHaveBeenCalled();
|
|
715
715
|
});
|
|
716
716
|
});
|
|
717
|
-
describe("
|
|
718
|
-
it("should call
|
|
719
|
-
const
|
|
717
|
+
describe("compatibility labels toggle", () => {
|
|
718
|
+
it("should call onToggleLabels when pressing d key", async () => {
|
|
719
|
+
const onToggleLabels = vi.fn();
|
|
720
720
|
const { stdin, unmount } = renderGrid({
|
|
721
|
-
|
|
721
|
+
onToggleLabels
|
|
722
722
|
});
|
|
723
723
|
cleanup = unmount;
|
|
724
724
|
await delay(RENDER_DELAY_MS);
|
|
725
725
|
await stdin.write("d");
|
|
726
726
|
await delay(INPUT_DELAY_MS);
|
|
727
|
-
globalExpect(
|
|
727
|
+
globalExpect(onToggleLabels).toHaveBeenCalled();
|
|
728
728
|
});
|
|
729
|
-
it("should show
|
|
730
|
-
const { lastFrame, unmount } = renderGrid({
|
|
729
|
+
it("should show compatibility labels when showLabels is true", () => {
|
|
730
|
+
const { lastFrame, unmount } = renderGrid({ showLabels: true });
|
|
731
731
|
cleanup = unmount;
|
|
732
732
|
const output = lastFrame();
|
|
733
|
-
globalExpect(output).toContain("
|
|
733
|
+
globalExpect(output).toContain("(recommended)");
|
|
734
734
|
});
|
|
735
|
-
it("should
|
|
736
|
-
const { lastFrame, unmount } = renderGrid({
|
|
735
|
+
it("should show Selected label for selected skills when showLabels is true", () => {
|
|
736
|
+
const { lastFrame, unmount } = renderGrid({ showLabels: true });
|
|
737
737
|
cleanup = unmount;
|
|
738
738
|
const output = lastFrame();
|
|
739
|
-
globalExpect(output).
|
|
739
|
+
globalExpect(output).toContain("(selected)");
|
|
740
740
|
});
|
|
741
|
-
it("should show
|
|
741
|
+
it("should show Discouraged label when showLabels is true", () => {
|
|
742
742
|
const { lastFrame, unmount } = renderGrid({
|
|
743
|
-
|
|
743
|
+
categories: categoriesWithFramework,
|
|
744
|
+
showLabels: true
|
|
744
745
|
});
|
|
745
746
|
cleanup = unmount;
|
|
746
747
|
const output = lastFrame();
|
|
747
|
-
globalExpect(output).toContain("
|
|
748
|
+
globalExpect(output).toContain("(discouraged)");
|
|
749
|
+
});
|
|
750
|
+
it("should hide compatibility labels when showLabels is false", () => {
|
|
751
|
+
const { lastFrame, unmount } = renderGrid({ showLabels: false });
|
|
752
|
+
cleanup = unmount;
|
|
753
|
+
const output = lastFrame();
|
|
754
|
+
globalExpect(output).not.toContain("(recommended)");
|
|
755
|
+
globalExpect(output).not.toContain("(selected)");
|
|
756
|
+
globalExpect(output).not.toContain("(discouraged)");
|
|
757
|
+
globalExpect(output).not.toContain("(disabled)");
|
|
758
|
+
});
|
|
759
|
+
it("should show Disabled label for disabled options when showLabels is true", () => {
|
|
760
|
+
const categories = [
|
|
761
|
+
createCategory("web-testing", "Test", [
|
|
762
|
+
createOption("web-test-opt1", "Option 1"),
|
|
763
|
+
createOption("web-test-opt2", "Option 2", { state: "disabled" })
|
|
764
|
+
])
|
|
765
|
+
];
|
|
766
|
+
const { lastFrame, unmount } = renderGrid({ categories, showLabels: true });
|
|
767
|
+
cleanup = unmount;
|
|
768
|
+
const output = lastFrame();
|
|
769
|
+
globalExpect(output).toContain("(disabled)");
|
|
748
770
|
});
|
|
749
771
|
});
|
|
750
772
|
describe("expert mode", () => {
|
|
@@ -772,7 +794,7 @@ describe("CategoryGrid component", () => {
|
|
|
772
794
|
describe("edge cases", () => {
|
|
773
795
|
it("should handle single category", () => {
|
|
774
796
|
const categories = [
|
|
775
|
-
createCategory("forms", "Single Category", [createOption("web-test-opt1", "Option 1")])
|
|
797
|
+
createCategory("web-forms", "Single Category", [createOption("web-test-opt1", "Option 1")])
|
|
776
798
|
];
|
|
777
799
|
const { lastFrame, unmount } = renderGrid({ categories });
|
|
778
800
|
cleanup = unmount;
|
|
@@ -782,7 +804,7 @@ describe("CategoryGrid component", () => {
|
|
|
782
804
|
});
|
|
783
805
|
it("should handle single option in category", () => {
|
|
784
806
|
const categories = [
|
|
785
|
-
createCategory("forms", "Single", [createOption("web-test-only", "Only Option")])
|
|
807
|
+
createCategory("web-forms", "Single", [createOption("web-test-only", "Only Option")])
|
|
786
808
|
];
|
|
787
809
|
const { lastFrame, unmount } = renderGrid({ categories });
|
|
788
810
|
cleanup = unmount;
|
|
@@ -794,7 +816,7 @@ describe("CategoryGrid component", () => {
|
|
|
794
816
|
{ length: 10 },
|
|
795
817
|
(_, i) => createOption(`web-test-opt${i}`, `Option ${i}`)
|
|
796
818
|
);
|
|
797
|
-
const categories = [createCategory("mocking", "Many Options", options)];
|
|
819
|
+
const categories = [createCategory("web-mocking", "Many Options", options)];
|
|
798
820
|
const { lastFrame, unmount } = renderGrid({ categories });
|
|
799
821
|
cleanup = unmount;
|
|
800
822
|
const output = lastFrame();
|
|
@@ -804,7 +826,7 @@ describe("CategoryGrid component", () => {
|
|
|
804
826
|
});
|
|
805
827
|
it("should handle long option labels", () => {
|
|
806
828
|
const categories = [
|
|
807
|
-
createCategory("i18n", "Long Labels", [
|
|
829
|
+
createCategory("web-i18n", "Long Labels", [
|
|
808
830
|
createOption("web-test-long1", "Very Long Option Name"),
|
|
809
831
|
createOption("web-test-long2", "Another Long Name")
|
|
810
832
|
])
|
|
@@ -816,12 +838,12 @@ describe("CategoryGrid component", () => {
|
|
|
816
838
|
});
|
|
817
839
|
it("should handle categories with different option counts", () => {
|
|
818
840
|
const categories = [
|
|
819
|
-
createCategory("framework", "Category 1", [
|
|
841
|
+
createCategory("web-framework", "Category 1", [
|
|
820
842
|
createOption("web-test-opt1", "Option 1"),
|
|
821
843
|
createOption("web-test-opt2", "Option 2")
|
|
822
844
|
]),
|
|
823
|
-
createCategory("styling", "Category 2", [createOption("web-test-opt3", "Option 3")]),
|
|
824
|
-
createCategory("client-state", "Category 3", [
|
|
845
|
+
createCategory("web-styling", "Category 2", [createOption("web-test-opt3", "Option 3")]),
|
|
846
|
+
createCategory("web-client-state", "Category 3", [
|
|
825
847
|
createOption("web-test-opt4", "Option 4"),
|
|
826
848
|
createOption("web-test-opt5", "Option 5"),
|
|
827
849
|
createOption("web-test-opt6", "Option 6")
|
|
@@ -840,7 +862,7 @@ describe("CategoryGrid component", () => {
|
|
|
840
862
|
const onFocusChange = vi.fn();
|
|
841
863
|
const categories = [
|
|
842
864
|
createCategory(
|
|
843
|
-
"framework",
|
|
865
|
+
"web-framework",
|
|
844
866
|
"Framework",
|
|
845
867
|
[
|
|
846
868
|
createOption("web-test-opt1", "Option 1", { selected: true }),
|
|
@@ -850,7 +872,7 @@ describe("CategoryGrid component", () => {
|
|
|
850
872
|
],
|
|
851
873
|
{ required: true }
|
|
852
874
|
),
|
|
853
|
-
createCategory("styling", "Category 2", [createOption("web-test-opt4", "Option 4")])
|
|
875
|
+
createCategory("web-styling", "Category 2", [createOption("web-test-opt4", "Option 4")])
|
|
854
876
|
];
|
|
855
877
|
const { stdin, unmount } = renderGrid({
|
|
856
878
|
categories,
|
|
@@ -869,7 +891,7 @@ describe("CategoryGrid component", () => {
|
|
|
869
891
|
describe("installed skills", () => {
|
|
870
892
|
it("should render installed skill with label only (no checkmark icon)", () => {
|
|
871
893
|
const categories = [
|
|
872
|
-
createCategory("forms", "Forms", [
|
|
894
|
+
createCategory("web-forms", "Forms", [
|
|
873
895
|
createOption("web-test-opt1", "Option 1", { installed: true })
|
|
874
896
|
])
|
|
875
897
|
];
|
|
@@ -881,7 +903,7 @@ describe("CategoryGrid component", () => {
|
|
|
881
903
|
});
|
|
882
904
|
it("should render installed and selected skill with label only", () => {
|
|
883
905
|
const categories = [
|
|
884
|
-
createCategory("forms", "Forms", [
|
|
906
|
+
createCategory("web-forms", "Forms", [
|
|
885
907
|
createOption("web-test-opt1", "Option 1", { installed: true, selected: true })
|
|
886
908
|
])
|
|
887
909
|
];
|
|
@@ -891,16 +913,15 @@ describe("CategoryGrid component", () => {
|
|
|
891
913
|
globalExpect(output).not.toContain("\u2713");
|
|
892
914
|
globalExpect(output).toContain("Option 1");
|
|
893
915
|
});
|
|
894
|
-
it("should
|
|
916
|
+
it("should render local installed skill without L badge or checkmark", () => {
|
|
895
917
|
const categories = [
|
|
896
|
-
createCategory("forms", "Forms", [
|
|
918
|
+
createCategory("web-forms", "Forms", [
|
|
897
919
|
createOption("web-test-opt1", "Option 1", { local: true, installed: true })
|
|
898
920
|
])
|
|
899
921
|
];
|
|
900
922
|
const { lastFrame, unmount } = renderGrid({ categories });
|
|
901
923
|
cleanup = unmount;
|
|
902
924
|
const output = lastFrame();
|
|
903
|
-
globalExpect(output).toContain("L");
|
|
904
925
|
globalExpect(output).not.toContain("\u2713");
|
|
905
926
|
globalExpect(output).toContain("Option 1");
|
|
906
927
|
});
|