@skillsmith/cli 0.7.2 → 0.7.4
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 +9 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli.js +44014 -0
- package/package.json +21 -11
- package/dist/src/commands/__meta__/telemetry-coverage.test.d.ts +0 -20
- package/dist/src/commands/__meta__/telemetry-coverage.test.d.ts.map +0 -1
- package/dist/src/commands/__meta__/telemetry-coverage.test.js +0 -118
- package/dist/src/commands/__meta__/telemetry-coverage.test.js.map +0 -1
- package/dist/src/commands/ab-test.d.ts +0 -29
- package/dist/src/commands/ab-test.d.ts.map +0 -1
- package/dist/src/commands/ab-test.js +0 -226
- package/dist/src/commands/ab-test.js.map +0 -1
- package/dist/src/commands/ab-test.test.d.ts +0 -7
- package/dist/src/commands/ab-test.test.d.ts.map +0 -1
- package/dist/src/commands/ab-test.test.js +0 -255
- package/dist/src/commands/ab-test.test.js.map +0 -1
- package/dist/src/commands/analyze.d.ts +0 -14
- package/dist/src/commands/analyze.d.ts.map +0 -1
- package/dist/src/commands/analyze.js +0 -191
- package/dist/src/commands/analyze.js.map +0 -1
- package/dist/src/commands/audit-collisions.d.ts +0 -68
- package/dist/src/commands/audit-collisions.d.ts.map +0 -1
- package/dist/src/commands/audit-collisions.js +0 -309
- package/dist/src/commands/audit-collisions.js.map +0 -1
- package/dist/src/commands/audit-sources.action.d.ts +0 -37
- package/dist/src/commands/audit-sources.action.d.ts.map +0 -1
- package/dist/src/commands/audit-sources.action.js +0 -321
- package/dist/src/commands/audit-sources.action.js.map +0 -1
- package/dist/src/commands/audit-sources.d.ts +0 -37
- package/dist/src/commands/audit-sources.d.ts.map +0 -1
- package/dist/src/commands/audit-sources.js +0 -55
- package/dist/src/commands/audit-sources.js.map +0 -1
- package/dist/src/commands/audit-sources.test.d.ts +0 -9
- package/dist/src/commands/audit-sources.test.d.ts.map +0 -1
- package/dist/src/commands/audit-sources.test.js +0 -228
- package/dist/src/commands/audit-sources.test.js.map +0 -1
- package/dist/src/commands/audit.d.ts +0 -40
- package/dist/src/commands/audit.d.ts.map +0 -1
- package/dist/src/commands/audit.js +0 -223
- package/dist/src/commands/audit.js.map +0 -1
- package/dist/src/commands/audit.test.d.ts +0 -8
- package/dist/src/commands/audit.test.d.ts.map +0 -1
- package/dist/src/commands/audit.test.js +0 -97
- package/dist/src/commands/audit.test.js.map +0 -1
- package/dist/src/commands/author/index.d.ts +0 -17
- package/dist/src/commands/author/index.d.ts.map +0 -1
- package/dist/src/commands/author/index.js +0 -21
- package/dist/src/commands/author/index.js.map +0 -1
- package/dist/src/commands/author/init.action.d.ts +0 -29
- package/dist/src/commands/author/init.action.d.ts.map +0 -1
- package/dist/src/commands/author/init.action.js +0 -131
- package/dist/src/commands/author/init.action.js.map +0 -1
- package/dist/src/commands/author/init.d.ts +0 -36
- package/dist/src/commands/author/init.d.ts.map +0 -1
- package/dist/src/commands/author/init.helpers.d.ts +0 -80
- package/dist/src/commands/author/init.helpers.d.ts.map +0 -1
- package/dist/src/commands/author/init.helpers.js +0 -107
- package/dist/src/commands/author/init.helpers.js.map +0 -1
- package/dist/src/commands/author/init.js +0 -320
- package/dist/src/commands/author/init.js.map +0 -1
- package/dist/src/commands/author/mcp-init.d.ts +0 -21
- package/dist/src/commands/author/mcp-init.d.ts.map +0 -1
- package/dist/src/commands/author/mcp-init.js +0 -202
- package/dist/src/commands/author/mcp-init.js.map +0 -1
- package/dist/src/commands/author/subagent.d.ts +0 -23
- package/dist/src/commands/author/subagent.d.ts.map +0 -1
- package/dist/src/commands/author/subagent.js +0 -174
- package/dist/src/commands/author/subagent.js.map +0 -1
- package/dist/src/commands/author/transform.d.ts +0 -23
- package/dist/src/commands/author/transform.d.ts.map +0 -1
- package/dist/src/commands/author/transform.js +0 -149
- package/dist/src/commands/author/transform.js.map +0 -1
- package/dist/src/commands/author/utils.d.ts +0 -27
- package/dist/src/commands/author/utils.d.ts.map +0 -1
- package/dist/src/commands/author/utils.js +0 -118
- package/dist/src/commands/author/utils.js.map +0 -1
- package/dist/src/commands/config.d.ts +0 -57
- package/dist/src/commands/config.d.ts.map +0 -1
- package/dist/src/commands/config.js +0 -226
- package/dist/src/commands/config.js.map +0 -1
- package/dist/src/commands/create.d.ts +0 -43
- package/dist/src/commands/create.d.ts.map +0 -1
- package/dist/src/commands/create.js +0 -336
- package/dist/src/commands/create.js.map +0 -1
- package/dist/src/commands/diff.d.ts +0 -21
- package/dist/src/commands/diff.d.ts.map +0 -1
- package/dist/src/commands/diff.js +0 -227
- package/dist/src/commands/diff.js.map +0 -1
- package/dist/src/commands/diff.test.d.ts +0 -6
- package/dist/src/commands/diff.test.d.ts.map +0 -1
- package/dist/src/commands/diff.test.js +0 -327
- package/dist/src/commands/diff.test.js.map +0 -1
- package/dist/src/commands/import-local.d.ts +0 -28
- package/dist/src/commands/import-local.d.ts.map +0 -1
- package/dist/src/commands/import-local.helpers.d.ts +0 -28
- package/dist/src/commands/import-local.helpers.d.ts.map +0 -1
- package/dist/src/commands/import-local.helpers.js +0 -166
- package/dist/src/commands/import-local.helpers.js.map +0 -1
- package/dist/src/commands/import-local.js +0 -273
- package/dist/src/commands/import-local.js.map +0 -1
- package/dist/src/commands/import-local.types.d.ts +0 -59
- package/dist/src/commands/import-local.types.d.ts.map +0 -1
- package/dist/src/commands/import-local.types.js +0 -2
- package/dist/src/commands/import-local.types.js.map +0 -1
- package/dist/src/commands/import.d.ts +0 -47
- package/dist/src/commands/import.d.ts.map +0 -1
- package/dist/src/commands/import.js +0 -314
- package/dist/src/commands/import.js.map +0 -1
- package/dist/src/commands/index.d.ts +0 -28
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -50
- package/dist/src/commands/index.js.map +0 -1
- package/dist/src/commands/info.d.ts +0 -19
- package/dist/src/commands/info.d.ts.map +0 -1
- package/dist/src/commands/info.js +0 -110
- package/dist/src/commands/info.js.map +0 -1
- package/dist/src/commands/install-skill.d.ts +0 -16
- package/dist/src/commands/install-skill.d.ts.map +0 -1
- package/dist/src/commands/install-skill.js +0 -155
- package/dist/src/commands/install-skill.js.map +0 -1
- package/dist/src/commands/install.d.ts +0 -34
- package/dist/src/commands/install.d.ts.map +0 -1
- package/dist/src/commands/install.js +0 -311
- package/dist/src/commands/install.js.map +0 -1
- package/dist/src/commands/inventory.action.d.ts +0 -55
- package/dist/src/commands/inventory.action.d.ts.map +0 -1
- package/dist/src/commands/inventory.action.js +0 -179
- package/dist/src/commands/inventory.action.js.map +0 -1
- package/dist/src/commands/inventory.action.test.d.ts +0 -19
- package/dist/src/commands/inventory.action.test.d.ts.map +0 -1
- package/dist/src/commands/inventory.action.test.js +0 -371
- package/dist/src/commands/inventory.action.test.js.map +0 -1
- package/dist/src/commands/inventory.d.ts +0 -21
- package/dist/src/commands/inventory.d.ts.map +0 -1
- package/dist/src/commands/inventory.js +0 -42
- package/dist/src/commands/inventory.js.map +0 -1
- package/dist/src/commands/login.d.ts +0 -7
- package/dist/src/commands/login.d.ts.map +0 -1
- package/dist/src/commands/login.js +0 -323
- package/dist/src/commands/login.js.map +0 -1
- package/dist/src/commands/login.test-helpers.d.ts +0 -7
- package/dist/src/commands/login.test-helpers.d.ts.map +0 -1
- package/dist/src/commands/login.test-helpers.js +0 -44
- package/dist/src/commands/login.test-helpers.js.map +0 -1
- package/dist/src/commands/login.test.d.ts +0 -2
- package/dist/src/commands/login.test.d.ts.map +0 -1
- package/dist/src/commands/login.test.js +0 -387
- package/dist/src/commands/login.test.js.map +0 -1
- package/dist/src/commands/logout.d.ts +0 -15
- package/dist/src/commands/logout.d.ts.map +0 -1
- package/dist/src/commands/logout.js +0 -54
- package/dist/src/commands/logout.js.map +0 -1
- package/dist/src/commands/logout.test.d.ts +0 -8
- package/dist/src/commands/logout.test.d.ts.map +0 -1
- package/dist/src/commands/logout.test.js +0 -137
- package/dist/src/commands/logout.test.js.map +0 -1
- package/dist/src/commands/manage.d.ts +0 -19
- package/dist/src/commands/manage.d.ts.map +0 -1
- package/dist/src/commands/manage.js +0 -346
- package/dist/src/commands/manage.js.map +0 -1
- package/dist/src/commands/merge.d.ts +0 -24
- package/dist/src/commands/merge.d.ts.map +0 -1
- package/dist/src/commands/merge.js +0 -168
- package/dist/src/commands/merge.js.map +0 -1
- package/dist/src/commands/pin.d.ts +0 -26
- package/dist/src/commands/pin.d.ts.map +0 -1
- package/dist/src/commands/pin.js +0 -138
- package/dist/src/commands/pin.js.map +0 -1
- package/dist/src/commands/pin.test.d.ts +0 -6
- package/dist/src/commands/pin.test.d.ts.map +0 -1
- package/dist/src/commands/pin.test.js +0 -206
- package/dist/src/commands/pin.test.js.map +0 -1
- package/dist/src/commands/recommend-scoring.d.ts +0 -29
- package/dist/src/commands/recommend-scoring.d.ts.map +0 -1
- package/dist/src/commands/recommend-scoring.js +0 -141
- package/dist/src/commands/recommend-scoring.js.map +0 -1
- package/dist/src/commands/recommend.d.ts +0 -15
- package/dist/src/commands/recommend.d.ts.map +0 -1
- package/dist/src/commands/recommend.helpers.d.ts +0 -44
- package/dist/src/commands/recommend.helpers.d.ts.map +0 -1
- package/dist/src/commands/recommend.helpers.js +0 -303
- package/dist/src/commands/recommend.helpers.js.map +0 -1
- package/dist/src/commands/recommend.js +0 -198
- package/dist/src/commands/recommend.js.map +0 -1
- package/dist/src/commands/recommend.types.d.ts +0 -66
- package/dist/src/commands/recommend.types.d.ts.map +0 -1
- package/dist/src/commands/recommend.types.js +0 -14
- package/dist/src/commands/recommend.types.js.map +0 -1
- package/dist/src/commands/run-registry-sync.d.ts +0 -31
- package/dist/src/commands/run-registry-sync.d.ts.map +0 -1
- package/dist/src/commands/run-registry-sync.js +0 -45
- package/dist/src/commands/run-registry-sync.js.map +0 -1
- package/dist/src/commands/search-formatters.d.ts +0 -36
- package/dist/src/commands/search-formatters.d.ts.map +0 -1
- package/dist/src/commands/search-formatters.js +0 -132
- package/dist/src/commands/search-formatters.js.map +0 -1
- package/dist/src/commands/search-types.d.ts +0 -46
- package/dist/src/commands/search-types.d.ts.map +0 -1
- package/dist/src/commands/search-types.js +0 -12
- package/dist/src/commands/search-types.js.map +0 -1
- package/dist/src/commands/search.action.d.ts +0 -16
- package/dist/src/commands/search.action.d.ts.map +0 -1
- package/dist/src/commands/search.action.js +0 -384
- package/dist/src/commands/search.action.js.map +0 -1
- package/dist/src/commands/search.d.ts +0 -18
- package/dist/src/commands/search.d.ts.map +0 -1
- package/dist/src/commands/search.helpers.d.ts +0 -52
- package/dist/src/commands/search.helpers.d.ts.map +0 -1
- package/dist/src/commands/search.helpers.js +0 -95
- package/dist/src/commands/search.helpers.js.map +0 -1
- package/dist/src/commands/search.js +0 -48
- package/dist/src/commands/search.js.map +0 -1
- package/dist/src/commands/search.test.d.ts +0 -10
- package/dist/src/commands/search.test.d.ts.map +0 -1
- package/dist/src/commands/search.test.js +0 -179
- package/dist/src/commands/search.test.js.map +0 -1
- package/dist/src/commands/sync.action.d.ts +0 -39
- package/dist/src/commands/sync.action.d.ts.map +0 -1
- package/dist/src/commands/sync.action.js +0 -353
- package/dist/src/commands/sync.action.js.map +0 -1
- package/dist/src/commands/sync.d.ts +0 -24
- package/dist/src/commands/sync.d.ts.map +0 -1
- package/dist/src/commands/sync.helpers.d.ts +0 -55
- package/dist/src/commands/sync.helpers.d.ts.map +0 -1
- package/dist/src/commands/sync.helpers.js +0 -90
- package/dist/src/commands/sync.helpers.js.map +0 -1
- package/dist/src/commands/sync.js +0 -101
- package/dist/src/commands/sync.js.map +0 -1
- package/dist/src/commands/telemetry.action.d.ts +0 -38
- package/dist/src/commands/telemetry.action.d.ts.map +0 -1
- package/dist/src/commands/telemetry.action.js +0 -350
- package/dist/src/commands/telemetry.action.js.map +0 -1
- package/dist/src/commands/telemetry.d.ts +0 -30
- package/dist/src/commands/telemetry.d.ts.map +0 -1
- package/dist/src/commands/telemetry.helpers.d.ts +0 -58
- package/dist/src/commands/telemetry.helpers.d.ts.map +0 -1
- package/dist/src/commands/telemetry.helpers.js +0 -173
- package/dist/src/commands/telemetry.helpers.js.map +0 -1
- package/dist/src/commands/telemetry.helpers.test.d.ts +0 -15
- package/dist/src/commands/telemetry.helpers.test.d.ts.map +0 -1
- package/dist/src/commands/telemetry.helpers.test.js +0 -240
- package/dist/src/commands/telemetry.helpers.test.js.map +0 -1
- package/dist/src/commands/telemetry.js +0 -65
- package/dist/src/commands/telemetry.js.map +0 -1
- package/dist/src/commands/telemetry.test.d.ts +0 -18
- package/dist/src/commands/telemetry.test.d.ts.map +0 -1
- package/dist/src/commands/telemetry.test.js +0 -401
- package/dist/src/commands/telemetry.test.js.map +0 -1
- package/dist/src/commands/whoami.d.ts +0 -15
- package/dist/src/commands/whoami.d.ts.map +0 -1
- package/dist/src/commands/whoami.js +0 -55
- package/dist/src/commands/whoami.js.map +0 -1
- package/dist/src/commands/whoami.test.d.ts +0 -8
- package/dist/src/commands/whoami.test.d.ts.map +0 -1
- package/dist/src/commands/whoami.test.js +0 -133
- package/dist/src/commands/whoami.test.js.map +0 -1
- package/dist/src/config.d.ts +0 -29
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -34
- package/dist/src/config.js.map +0 -1
- package/dist/src/index.d.ts +0 -22
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -117
- package/dist/src/index.js.map +0 -1
- package/dist/src/templates/changelog.md.template.d.ts +0 -8
- package/dist/src/templates/changelog.md.template.d.ts.map +0 -1
- package/dist/src/templates/changelog.md.template.js +0 -19
- package/dist/src/templates/changelog.md.template.js.map +0 -1
- package/dist/src/templates/index.d.ts +0 -11
- package/dist/src/templates/index.d.ts.map +0 -1
- package/dist/src/templates/index.js +0 -11
- package/dist/src/templates/index.js.map +0 -1
- package/dist/src/templates/mcp-server.template.d.ts +0 -82
- package/dist/src/templates/mcp-server.template.d.ts.map +0 -1
- package/dist/src/templates/mcp-server.template.js +0 -430
- package/dist/src/templates/mcp-server.template.js.map +0 -1
- package/dist/src/templates/mcp-server.template.snippets.d.ts +0 -51
- package/dist/src/templates/mcp-server.template.snippets.d.ts.map +0 -1
- package/dist/src/templates/mcp-server.template.snippets.js +0 -162
- package/dist/src/templates/mcp-server.template.snippets.js.map +0 -1
- package/dist/src/templates/mcp-template-handlers.d.ts +0 -33
- package/dist/src/templates/mcp-template-handlers.d.ts.map +0 -1
- package/dist/src/templates/mcp-template-handlers.js +0 -106
- package/dist/src/templates/mcp-template-handlers.js.map +0 -1
- package/dist/src/templates/mcp-template-types.d.ts +0 -48
- package/dist/src/templates/mcp-template-types.d.ts.map +0 -1
- package/dist/src/templates/mcp-template-types.js +0 -18
- package/dist/src/templates/mcp-template-types.js.map +0 -1
- package/dist/src/templates/readme.md.template.d.ts +0 -8
- package/dist/src/templates/readme.md.template.d.ts.map +0 -1
- package/dist/src/templates/readme.md.template.js +0 -86
- package/dist/src/templates/readme.md.template.js.map +0 -1
- package/dist/src/templates/skill.md.template.d.ts +0 -8
- package/dist/src/templates/skill.md.template.d.ts.map +0 -1
- package/dist/src/templates/skill.md.template.js +0 -97
- package/dist/src/templates/skill.md.template.js.map +0 -1
- package/dist/src/templates/subagent.md.template.d.ts +0 -38
- package/dist/src/templates/subagent.md.template.d.ts.map +0 -1
- package/dist/src/templates/subagent.md.template.js +0 -128
- package/dist/src/templates/subagent.md.template.js.map +0 -1
- package/dist/src/utils/errors.d.ts +0 -52
- package/dist/src/utils/errors.d.ts.map +0 -1
- package/dist/src/utils/errors.js +0 -58
- package/dist/src/utils/errors.js.map +0 -1
- package/dist/src/utils/formatters.d.ts +0 -39
- package/dist/src/utils/formatters.d.ts.map +0 -1
- package/dist/src/utils/formatters.js +0 -69
- package/dist/src/utils/formatters.js.map +0 -1
- package/dist/src/utils/license-types.d.ts +0 -88
- package/dist/src/utils/license-types.d.ts.map +0 -1
- package/dist/src/utils/license-types.js +0 -60
- package/dist/src/utils/license-types.js.map +0 -1
- package/dist/src/utils/license-validation.d.ts +0 -61
- package/dist/src/utils/license-validation.d.ts.map +0 -1
- package/dist/src/utils/license-validation.js +0 -198
- package/dist/src/utils/license-validation.js.map +0 -1
- package/dist/src/utils/license.d.ts +0 -56
- package/dist/src/utils/license.d.ts.map +0 -1
- package/dist/src/utils/license.js +0 -163
- package/dist/src/utils/license.js.map +0 -1
- package/dist/src/utils/license.test.d.ts +0 -7
- package/dist/src/utils/license.test.d.ts.map +0 -1
- package/dist/src/utils/license.test.js +0 -308
- package/dist/src/utils/license.test.js.map +0 -1
- package/dist/src/utils/manifest.d.ts +0 -121
- package/dist/src/utils/manifest.d.ts.map +0 -1
- package/dist/src/utils/manifest.js +0 -133
- package/dist/src/utils/manifest.js.map +0 -1
- package/dist/src/utils/manifest.test.d.ts +0 -20
- package/dist/src/utils/manifest.test.d.ts.map +0 -1
- package/dist/src/utils/manifest.test.js +0 -344
- package/dist/src/utils/manifest.test.js.map +0 -1
- package/dist/src/utils/node-version.d.ts +0 -41
- package/dist/src/utils/node-version.d.ts.map +0 -1
- package/dist/src/utils/node-version.js +0 -123
- package/dist/src/utils/node-version.js.map +0 -1
- package/dist/src/utils/open-database.d.ts +0 -35
- package/dist/src/utils/open-database.d.ts.map +0 -1
- package/dist/src/utils/open-database.js +0 -73
- package/dist/src/utils/open-database.js.map +0 -1
- package/dist/src/utils/require-tier.d.ts +0 -38
- package/dist/src/utils/require-tier.d.ts.map +0 -1
- package/dist/src/utils/require-tier.js +0 -74
- package/dist/src/utils/require-tier.js.map +0 -1
- package/dist/src/utils/sanitize.d.ts +0 -30
- package/dist/src/utils/sanitize.d.ts.map +0 -1
- package/dist/src/utils/sanitize.js +0 -45
- package/dist/src/utils/sanitize.js.map +0 -1
- package/dist/src/utils/skill-name.d.ts +0 -19
- package/dist/src/utils/skill-name.d.ts.map +0 -1
- package/dist/src/utils/skill-name.js +0 -26
- package/dist/src/utils/skill-name.js.map +0 -1
- package/dist/src/utils/skills-directory.d.ts +0 -95
- package/dist/src/utils/skills-directory.d.ts.map +0 -1
- package/dist/src/utils/skills-directory.js +0 -285
- package/dist/src/utils/skills-directory.js.map +0 -1
- package/dist/src/utils/startup-header-gate.d.ts +0 -29
- package/dist/src/utils/startup-header-gate.d.ts.map +0 -1
- package/dist/src/utils/startup-header-gate.js +0 -44
- package/dist/src/utils/startup-header-gate.js.map +0 -1
- package/dist/src/utils/startup-header-gate.test.d.ts +0 -2
- package/dist/src/utils/startup-header-gate.test.d.ts.map +0 -1
- package/dist/src/utils/startup-header-gate.test.js +0 -46
- package/dist/src/utils/startup-header-gate.test.js.map +0 -1
- package/dist/src/utils/tool-analyzer.d.ts +0 -54
- package/dist/src/utils/tool-analyzer.d.ts.map +0 -1
- package/dist/src/utils/tool-analyzer.js +0 -156
- package/dist/src/utils/tool-analyzer.js.map +0 -1
- package/dist/src/version.d.ts +0 -2
- package/dist/src/version.d.ts.map +0 -1
- package/dist/src/version.js +0 -24
- package/dist/src/version.js.map +0 -1
- package/dist/tests/audit-collisions.test.d.ts +0 -42
- package/dist/tests/audit-collisions.test.d.ts.map +0 -1
- package/dist/tests/audit-collisions.test.js +0 -370
- package/dist/tests/audit-collisions.test.js.map +0 -1
- package/dist/tests/audit-restructure.test.d.ts +0 -15
- package/dist/tests/audit-restructure.test.d.ts.map +0 -1
- package/dist/tests/audit-restructure.test.js +0 -151
- package/dist/tests/audit-restructure.test.js.map +0 -1
- package/dist/tests/author.test.d.ts +0 -5
- package/dist/tests/author.test.d.ts.map +0 -1
- package/dist/tests/author.test.js +0 -653
- package/dist/tests/author.test.js.map +0 -1
- package/dist/tests/config.test.d.ts +0 -33
- package/dist/tests/config.test.d.ts.map +0 -1
- package/dist/tests/config.test.js +0 -240
- package/dist/tests/config.test.js.map +0 -1
- package/dist/tests/create.test.d.ts +0 -5
- package/dist/tests/create.test.d.ts.map +0 -1
- package/dist/tests/create.test.js +0 -449
- package/dist/tests/create.test.js.map +0 -1
- package/dist/tests/e2e/audit-sources-affix.test.d.ts +0 -11
- package/dist/tests/e2e/audit-sources-affix.test.d.ts.map +0 -1
- package/dist/tests/e2e/audit-sources-affix.test.js +0 -121
- package/dist/tests/e2e/audit-sources-affix.test.js.map +0 -1
- package/dist/tests/e2e/audit-sources-apply.test.d.ts +0 -13
- package/dist/tests/e2e/audit-sources-apply.test.d.ts.map +0 -1
- package/dist/tests/e2e/audit-sources-apply.test.js +0 -166
- package/dist/tests/e2e/audit-sources-apply.test.js.map +0 -1
- package/dist/tests/e2e/audit-sources-recovery.test.d.ts +0 -15
- package/dist/tests/e2e/audit-sources-recovery.test.d.ts.map +0 -1
- package/dist/tests/e2e/audit-sources-recovery.test.js +0 -179
- package/dist/tests/e2e/audit-sources-recovery.test.js.map +0 -1
- package/dist/tests/e2e/audit-sources-roundtrip.test.d.ts +0 -23
- package/dist/tests/e2e/audit-sources-roundtrip.test.d.ts.map +0 -1
- package/dist/tests/e2e/audit-sources-roundtrip.test.js +0 -139
- package/dist/tests/e2e/audit-sources-roundtrip.test.js.map +0 -1
- package/dist/tests/e2e/author.e2e.test.d.ts +0 -9
- package/dist/tests/e2e/author.e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/author.e2e.test.js +0 -666
- package/dist/tests/e2e/author.e2e.test.js.map +0 -1
- package/dist/tests/e2e/import.e2e.test.d.ts +0 -10
- package/dist/tests/e2e/import.e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/import.e2e.test.js +0 -213
- package/dist/tests/e2e/import.e2e.test.js.map +0 -1
- package/dist/tests/e2e/manage.e2e.test.d.ts +0 -9
- package/dist/tests/e2e/manage.e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/manage.e2e.test.js +0 -277
- package/dist/tests/e2e/manage.e2e.test.js.map +0 -1
- package/dist/tests/e2e/search.e2e.test.d.ts +0 -10
- package/dist/tests/e2e/search.e2e.test.d.ts.map +0 -1
- package/dist/tests/e2e/search.e2e.test.js +0 -324
- package/dist/tests/e2e/search.e2e.test.js.map +0 -1
- package/dist/tests/e2e/test-config.d.ts +0 -39
- package/dist/tests/e2e/test-config.d.ts.map +0 -1
- package/dist/tests/e2e/test-config.js +0 -44
- package/dist/tests/e2e/test-config.js.map +0 -1
- package/dist/tests/e2e/utils/baseline-collector.d.ts +0 -107
- package/dist/tests/e2e/utils/baseline-collector.d.ts.map +0 -1
- package/dist/tests/e2e/utils/baseline-collector.js +0 -211
- package/dist/tests/e2e/utils/baseline-collector.js.map +0 -1
- package/dist/tests/e2e/utils/hardcoded-detector.d.ts +0 -46
- package/dist/tests/e2e/utils/hardcoded-detector.d.ts.map +0 -1
- package/dist/tests/e2e/utils/hardcoded-detector.js +0 -238
- package/dist/tests/e2e/utils/hardcoded-detector.js.map +0 -1
- package/dist/tests/e2e/utils/index.d.ts +0 -12
- package/dist/tests/e2e/utils/index.d.ts.map +0 -1
- package/dist/tests/e2e/utils/index.js +0 -12
- package/dist/tests/e2e/utils/index.js.map +0 -1
- package/dist/tests/e2e/utils/linear-reporter.d.ts +0 -60
- package/dist/tests/e2e/utils/linear-reporter.d.ts.map +0 -1
- package/dist/tests/e2e/utils/linear-reporter.js +0 -223
- package/dist/tests/e2e/utils/linear-reporter.js.map +0 -1
- package/dist/tests/e2e/utils/mock-github.d.ts +0 -23
- package/dist/tests/e2e/utils/mock-github.d.ts.map +0 -1
- package/dist/tests/e2e/utils/mock-github.js +0 -60
- package/dist/tests/e2e/utils/mock-github.js.map +0 -1
- package/dist/tests/e2e/utils/mock-prompts.d.ts +0 -19
- package/dist/tests/e2e/utils/mock-prompts.d.ts.map +0 -1
- package/dist/tests/e2e/utils/mock-prompts.js +0 -48
- package/dist/tests/e2e/utils/mock-prompts.js.map +0 -1
- package/dist/tests/e2e/utils/source-recovery-fixture.d.ts +0 -49
- package/dist/tests/e2e/utils/source-recovery-fixture.d.ts.map +0 -1
- package/dist/tests/e2e/utils/source-recovery-fixture.js +0 -106
- package/dist/tests/e2e/utils/source-recovery-fixture.js.map +0 -1
- package/dist/tests/embedding-probe-stdio.test.d.ts +0 -11
- package/dist/tests/embedding-probe-stdio.test.d.ts.map +0 -1
- package/dist/tests/embedding-probe-stdio.test.js +0 -58
- package/dist/tests/embedding-probe-stdio.test.js.map +0 -1
- package/dist/tests/import.test.d.ts +0 -5
- package/dist/tests/import.test.d.ts.map +0 -1
- package/dist/tests/import.test.js +0 -11
- package/dist/tests/import.test.js.map +0 -1
- package/dist/tests/init.test.d.ts +0 -30
- package/dist/tests/init.test.d.ts.map +0 -1
- package/dist/tests/init.test.js +0 -357
- package/dist/tests/init.test.js.map +0 -1
- package/dist/tests/install-multi-client.test.d.ts +0 -2
- package/dist/tests/install-multi-client.test.d.ts.map +0 -1
- package/dist/tests/install-multi-client.test.js +0 -202
- package/dist/tests/install-multi-client.test.js.map +0 -1
- package/dist/tests/install-quarantine.test.d.ts +0 -10
- package/dist/tests/install-quarantine.test.d.ts.map +0 -1
- package/dist/tests/install-quarantine.test.js +0 -86
- package/dist/tests/install-quarantine.test.js.map +0 -1
- package/dist/tests/install-skill.test.d.ts +0 -8
- package/dist/tests/install-skill.test.d.ts.map +0 -1
- package/dist/tests/install-skill.test.js +0 -414
- package/dist/tests/install-skill.test.js.map +0 -1
- package/dist/tests/integration/import-local.test.d.ts +0 -2
- package/dist/tests/integration/import-local.test.d.ts.map +0 -1
- package/dist/tests/integration/import-local.test.js +0 -158
- package/dist/tests/integration/import-local.test.js.map +0 -1
- package/dist/tests/license-validation.test.d.ts +0 -8
- package/dist/tests/license-validation.test.d.ts.map +0 -1
- package/dist/tests/license-validation.test.js +0 -186
- package/dist/tests/license-validation.test.js.map +0 -1
- package/dist/tests/manage.test.d.ts +0 -5
- package/dist/tests/manage.test.d.ts.map +0 -1
- package/dist/tests/manage.test.js +0 -495
- package/dist/tests/manage.test.js.map +0 -1
- package/dist/tests/mcp-server-template.test.d.ts +0 -7
- package/dist/tests/mcp-server-template.test.d.ts.map +0 -1
- package/dist/tests/mcp-server-template.test.js +0 -372
- package/dist/tests/mcp-server-template.test.js.map +0 -1
- package/dist/tests/node-version.test.d.ts +0 -8
- package/dist/tests/node-version.test.d.ts.map +0 -1
- package/dist/tests/node-version.test.js +0 -200
- package/dist/tests/node-version.test.js.map +0 -1
- package/dist/tests/open-database.test.d.ts +0 -2
- package/dist/tests/open-database.test.d.ts.map +0 -1
- package/dist/tests/open-database.test.js +0 -77
- package/dist/tests/open-database.test.js.map +0 -1
- package/dist/tests/recommend-helpers.test.d.ts +0 -9
- package/dist/tests/recommend-helpers.test.d.ts.map +0 -1
- package/dist/tests/recommend-helpers.test.js +0 -308
- package/dist/tests/recommend-helpers.test.js.map +0 -1
- package/dist/tests/recommend-scoring.test.d.ts +0 -8
- package/dist/tests/recommend-scoring.test.d.ts.map +0 -1
- package/dist/tests/recommend-scoring.test.js +0 -184
- package/dist/tests/recommend-scoring.test.js.map +0 -1
- package/dist/tests/recommend.errors.test.d.ts +0 -8
- package/dist/tests/recommend.errors.test.d.ts.map +0 -1
- package/dist/tests/recommend.errors.test.js +0 -232
- package/dist/tests/recommend.errors.test.js.map +0 -1
- package/dist/tests/recommend.filters.test.d.ts +0 -9
- package/dist/tests/recommend.filters.test.d.ts.map +0 -1
- package/dist/tests/recommend.filters.test.js +0 -235
- package/dist/tests/recommend.filters.test.js.map +0 -1
- package/dist/tests/recommend.test-helpers.d.ts +0 -66
- package/dist/tests/recommend.test-helpers.d.ts.map +0 -1
- package/dist/tests/recommend.test-helpers.js +0 -79
- package/dist/tests/recommend.test-helpers.js.map +0 -1
- package/dist/tests/recommend.test.d.ts +0 -11
- package/dist/tests/recommend.test.d.ts.map +0 -1
- package/dist/tests/recommend.test.js +0 -320
- package/dist/tests/recommend.test.js.map +0 -1
- package/dist/tests/search-helpers.test.d.ts +0 -2
- package/dist/tests/search-helpers.test.d.ts.map +0 -1
- package/dist/tests/search-helpers.test.js +0 -110
- package/dist/tests/search-helpers.test.js.map +0 -1
- package/dist/tests/search.test.d.ts +0 -5
- package/dist/tests/search.test.d.ts.map +0 -1
- package/dist/tests/search.test.js +0 -91
- package/dist/tests/search.test.js.map +0 -1
- package/dist/tests/skills-directory-per-harness.test.d.ts +0 -2
- package/dist/tests/skills-directory-per-harness.test.d.ts.map +0 -1
- package/dist/tests/skills-directory-per-harness.test.js +0 -116
- package/dist/tests/skills-directory-per-harness.test.js.map +0 -1
- package/dist/tests/skills-directory.test.d.ts +0 -2
- package/dist/tests/skills-directory.test.d.ts.map +0 -1
- package/dist/tests/skills-directory.test.js +0 -108
- package/dist/tests/skills-directory.test.js.map +0 -1
- package/dist/tests/sync.auth-ux.test.d.ts +0 -14
- package/dist/tests/sync.auth-ux.test.d.ts.map +0 -1
- package/dist/tests/sync.auth-ux.test.js +0 -148
- package/dist/tests/sync.auth-ux.test.js.map +0 -1
- package/dist/tests/tool-analyzer.test.d.ts +0 -8
- package/dist/tests/tool-analyzer.test.d.ts.map +0 -1
- package/dist/tests/tool-analyzer.test.js +0 -149
- package/dist/tests/tool-analyzer.test.js.map +0 -1
- package/dist/tests/unit/commands/install.test.d.ts +0 -7
- package/dist/tests/unit/commands/install.test.d.ts.map +0 -1
- package/dist/tests/unit/commands/install.test.js +0 -482
- package/dist/tests/unit/commands/install.test.js.map +0 -1
- package/dist/tests/unit/import-local.helpers.test.d.ts +0 -2
- package/dist/tests/unit/import-local.helpers.test.d.ts.map +0 -1
- package/dist/tests/unit/import-local.helpers.test.js +0 -96
- package/dist/tests/unit/import-local.helpers.test.js.map +0 -1
|
@@ -1,666 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* E2E Test: skillsmith init, validate, publish commands
|
|
3
|
-
*
|
|
4
|
-
* Tests skill authoring commands in a clean Codespace environment.
|
|
5
|
-
*
|
|
6
|
-
* User Journey: Create and publish custom skills
|
|
7
|
-
*/
|
|
8
|
-
import { describe, it, expect, beforeAll, afterAll, beforeEach } from 'vitest';
|
|
9
|
-
import { spawn } from 'child_process';
|
|
10
|
-
import { existsSync, rmSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
11
|
-
import { join, dirname } from 'path';
|
|
12
|
-
import { tmpdir } from 'os';
|
|
13
|
-
import { fileURLToPath } from 'url';
|
|
14
|
-
import { scanCommandOutput } from './utils/hardcoded-detector.js';
|
|
15
|
-
import { recordTiming } from './utils/baseline-collector.js';
|
|
16
|
-
import { queueIssue } from './utils/linear-reporter.js';
|
|
17
|
-
// ESM compatibility for __dirname
|
|
18
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
19
|
-
const __dirname = dirname(__filename);
|
|
20
|
-
// Test configuration
|
|
21
|
-
const TEST_DIR = join(tmpdir(), 'skillsmith-e2e-author');
|
|
22
|
-
const CLI_PATH = join(__dirname, '../../dist/src/index.js');
|
|
23
|
-
// Valid SKILL.md content for validation tests
|
|
24
|
-
const VALID_SKILL_MD = `---
|
|
25
|
-
name: test-skill
|
|
26
|
-
version: 1.0.0
|
|
27
|
-
description: A test skill for E2E testing
|
|
28
|
-
author: test-author
|
|
29
|
-
triggers:
|
|
30
|
-
- test trigger
|
|
31
|
-
- run test
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
# test-skill
|
|
35
|
-
|
|
36
|
-
A test skill for E2E testing purposes.
|
|
37
|
-
|
|
38
|
-
## Usage
|
|
39
|
-
|
|
40
|
-
Use this skill to test things.
|
|
41
|
-
|
|
42
|
-
## Examples
|
|
43
|
-
|
|
44
|
-
\`\`\`
|
|
45
|
-
test example
|
|
46
|
-
\`\`\`
|
|
47
|
-
`;
|
|
48
|
-
// Invalid SKILL.md for error testing
|
|
49
|
-
const INVALID_SKILL_MD = `
|
|
50
|
-
# Missing Frontmatter
|
|
51
|
-
|
|
52
|
-
This skill has no frontmatter and should fail validation.
|
|
53
|
-
`;
|
|
54
|
-
/**
|
|
55
|
-
* Execute CLI command
|
|
56
|
-
*/
|
|
57
|
-
async function runCommand(args, cwd, timeoutMs = 30000) {
|
|
58
|
-
return new Promise((resolve, reject) => {
|
|
59
|
-
const startTime = Date.now();
|
|
60
|
-
let stdout = '';
|
|
61
|
-
let stderr = '';
|
|
62
|
-
const proc = spawn('node', [CLI_PATH, ...args], {
|
|
63
|
-
cwd: cwd || TEST_DIR,
|
|
64
|
-
env: {
|
|
65
|
-
...process.env,
|
|
66
|
-
NODE_ENV: 'test',
|
|
67
|
-
SKILLSMITH_E2E: 'true',
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
const timeout = setTimeout(() => {
|
|
71
|
-
proc.kill('SIGTERM');
|
|
72
|
-
reject(new Error(`Command timed out after ${timeoutMs}ms`));
|
|
73
|
-
}, timeoutMs);
|
|
74
|
-
proc.stdout.on('data', (data) => {
|
|
75
|
-
stdout += data.toString();
|
|
76
|
-
});
|
|
77
|
-
proc.stderr.on('data', (data) => {
|
|
78
|
-
stderr += data.toString();
|
|
79
|
-
});
|
|
80
|
-
proc.on('close', (code) => {
|
|
81
|
-
clearTimeout(timeout);
|
|
82
|
-
resolve({
|
|
83
|
-
exitCode: code ?? 1,
|
|
84
|
-
stdout,
|
|
85
|
-
stderr,
|
|
86
|
-
durationMs: Date.now() - startTime,
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
proc.on('error', (error) => {
|
|
90
|
-
clearTimeout(timeout);
|
|
91
|
-
reject(error);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Assert no hardcoded values in command output
|
|
97
|
-
*/
|
|
98
|
-
function assertNoHardcoded(result, command, testName, testFile) {
|
|
99
|
-
const detection = scanCommandOutput(result.stdout, result.stderr, command);
|
|
100
|
-
if (!detection.passed) {
|
|
101
|
-
const failure = {
|
|
102
|
-
testName,
|
|
103
|
-
testFile,
|
|
104
|
-
command,
|
|
105
|
-
error: `Hardcoded values detected`,
|
|
106
|
-
stdout: result.stdout,
|
|
107
|
-
stderr: result.stderr,
|
|
108
|
-
hardcodedIssues: detection.issues,
|
|
109
|
-
duration: result.durationMs,
|
|
110
|
-
timestamp: new Date().toISOString(),
|
|
111
|
-
};
|
|
112
|
-
queueIssue(failure);
|
|
113
|
-
const errorDetails = detection.issues
|
|
114
|
-
.filter((i) => i.severity === 'error')
|
|
115
|
-
.map((i) => ` - ${i.type}: ${i.value}`)
|
|
116
|
-
.join('\n');
|
|
117
|
-
expect.fail(`Hardcoded values detected:\n${errorDetails}`);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
describe('E2E: skillsmith init', () => {
|
|
121
|
-
beforeEach(() => {
|
|
122
|
-
// Reset test directory for each test
|
|
123
|
-
if (existsSync(TEST_DIR)) {
|
|
124
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
125
|
-
}
|
|
126
|
-
mkdirSync(TEST_DIR, { recursive: true });
|
|
127
|
-
});
|
|
128
|
-
afterAll(() => {
|
|
129
|
-
if (existsSync(TEST_DIR)) {
|
|
130
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
describe('Init Command', () => {
|
|
134
|
-
it('should display help without errors', async () => {
|
|
135
|
-
const result = await runCommand(['init', '--help']);
|
|
136
|
-
expect(result.exitCode).toBe(0);
|
|
137
|
-
expect(result.stdout).toContain('Initialize');
|
|
138
|
-
assertNoHardcoded(result, 'skillsmith init --help', 'init: help', __filename);
|
|
139
|
-
});
|
|
140
|
-
// SMI-1473: Using non-interactive flags for E2E testing
|
|
141
|
-
it('should create skill scaffold with name', async () => {
|
|
142
|
-
const result = await runCommand([
|
|
143
|
-
'init',
|
|
144
|
-
'my-new-skill',
|
|
145
|
-
'-d',
|
|
146
|
-
'Test skill description',
|
|
147
|
-
'-a',
|
|
148
|
-
'test-author',
|
|
149
|
-
'-c',
|
|
150
|
-
'development',
|
|
151
|
-
]);
|
|
152
|
-
recordTiming('init:named', 'skillsmith init name', result.durationMs);
|
|
153
|
-
expect(result.exitCode).toBe(0);
|
|
154
|
-
// Verify created files
|
|
155
|
-
const skillDir = join(TEST_DIR, 'my-new-skill');
|
|
156
|
-
expect(existsSync(skillDir)).toBe(true);
|
|
157
|
-
expect(existsSync(join(skillDir, 'SKILL.md'))).toBe(true);
|
|
158
|
-
expect(existsSync(join(skillDir, 'README.md'))).toBe(true);
|
|
159
|
-
assertNoHardcoded(result, 'skillsmith init name', 'init: create skill', __filename);
|
|
160
|
-
});
|
|
161
|
-
// SMI-1473: Using non-interactive flags for E2E testing
|
|
162
|
-
it('should create skill scaffold with custom path', async () => {
|
|
163
|
-
const customPath = join(TEST_DIR, 'custom-skills');
|
|
164
|
-
mkdirSync(customPath, { recursive: true });
|
|
165
|
-
const result = await runCommand([
|
|
166
|
-
'init',
|
|
167
|
-
'path-skill',
|
|
168
|
-
'-p',
|
|
169
|
-
customPath,
|
|
170
|
-
'-d',
|
|
171
|
-
'Test skill',
|
|
172
|
-
'-a',
|
|
173
|
-
'test',
|
|
174
|
-
'-c',
|
|
175
|
-
'development',
|
|
176
|
-
]);
|
|
177
|
-
expect(result.exitCode).toBe(0);
|
|
178
|
-
// Verify created at custom path
|
|
179
|
-
expect(existsSync(join(customPath, 'path-skill', 'SKILL.md'))).toBe(true);
|
|
180
|
-
assertNoHardcoded(result, 'skillsmith init -p custom', 'init: custom path', __filename);
|
|
181
|
-
});
|
|
182
|
-
// SMI-1473: Using non-interactive flags for E2E testing
|
|
183
|
-
it('should create resources directory', async () => {
|
|
184
|
-
const result = await runCommand([
|
|
185
|
-
'init',
|
|
186
|
-
'resource-skill',
|
|
187
|
-
'-d',
|
|
188
|
-
'Test skill',
|
|
189
|
-
'-a',
|
|
190
|
-
'test',
|
|
191
|
-
'-c',
|
|
192
|
-
'development',
|
|
193
|
-
]);
|
|
194
|
-
expect(result.exitCode).toBe(0);
|
|
195
|
-
const resourceDir = join(TEST_DIR, 'resource-skill', 'resources');
|
|
196
|
-
expect(existsSync(resourceDir)).toBe(true);
|
|
197
|
-
assertNoHardcoded(result, 'skillsmith init resources', 'init: resources dir', __filename);
|
|
198
|
-
});
|
|
199
|
-
// SMI-1473: Using non-interactive flags for E2E testing
|
|
200
|
-
it('should create scripts directory with example', async () => {
|
|
201
|
-
const result = await runCommand([
|
|
202
|
-
'init',
|
|
203
|
-
'script-skill',
|
|
204
|
-
'-d',
|
|
205
|
-
'Test skill',
|
|
206
|
-
'-a',
|
|
207
|
-
'test',
|
|
208
|
-
'-c',
|
|
209
|
-
'development',
|
|
210
|
-
]);
|
|
211
|
-
expect(result.exitCode).toBe(0);
|
|
212
|
-
const scriptsDir = join(TEST_DIR, 'script-skill', 'scripts');
|
|
213
|
-
expect(existsSync(scriptsDir)).toBe(true);
|
|
214
|
-
expect(existsSync(join(scriptsDir, 'example.js'))).toBe(true);
|
|
215
|
-
assertNoHardcoded(result, 'skillsmith init scripts', 'init: scripts dir', __filename);
|
|
216
|
-
});
|
|
217
|
-
// SMI-1473: Using non-interactive flags for E2E testing
|
|
218
|
-
it('should handle existing directory gracefully', async () => {
|
|
219
|
-
// Create skill first
|
|
220
|
-
await runCommand([
|
|
221
|
-
'init',
|
|
222
|
-
'existing-skill',
|
|
223
|
-
'-d',
|
|
224
|
-
'Test skill',
|
|
225
|
-
'-a',
|
|
226
|
-
'test',
|
|
227
|
-
'-c',
|
|
228
|
-
'development',
|
|
229
|
-
]);
|
|
230
|
-
// Try to create again with --yes to auto-confirm overwrite
|
|
231
|
-
const result = await runCommand([
|
|
232
|
-
'init',
|
|
233
|
-
'existing-skill',
|
|
234
|
-
'-d',
|
|
235
|
-
'Test skill updated',
|
|
236
|
-
'-a',
|
|
237
|
-
'test',
|
|
238
|
-
'-c',
|
|
239
|
-
'development',
|
|
240
|
-
'-y',
|
|
241
|
-
]);
|
|
242
|
-
// Should succeed with --yes flag
|
|
243
|
-
expect(result.exitCode).toBe(0);
|
|
244
|
-
assertNoHardcoded(result, 'skillsmith init existing', 'init: existing dir', __filename);
|
|
245
|
-
});
|
|
246
|
-
// SMI-1473: Using non-interactive flags for E2E testing
|
|
247
|
-
it('should not contain hardcoded paths in generated files', async () => {
|
|
248
|
-
const result = await runCommand([
|
|
249
|
-
'init',
|
|
250
|
-
'path-check-skill',
|
|
251
|
-
'-d',
|
|
252
|
-
'Test skill',
|
|
253
|
-
'-a',
|
|
254
|
-
'test',
|
|
255
|
-
'-c',
|
|
256
|
-
'development',
|
|
257
|
-
]);
|
|
258
|
-
expect(result.exitCode).toBe(0);
|
|
259
|
-
// Read generated SKILL.md
|
|
260
|
-
const skillMd = readFileSync(join(TEST_DIR, 'path-check-skill', 'SKILL.md'), 'utf-8');
|
|
261
|
-
// Should not contain hardcoded paths
|
|
262
|
-
expect(skillMd).not.toMatch(/\/Users\/[a-zA-Z0-9_-]+\//);
|
|
263
|
-
expect(skillMd).not.toMatch(/\/home\/[a-zA-Z0-9_-]+\//);
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
});
|
|
267
|
-
describe('E2E: skillsmith validate', () => {
|
|
268
|
-
beforeAll(() => {
|
|
269
|
-
if (existsSync(TEST_DIR)) {
|
|
270
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
271
|
-
}
|
|
272
|
-
mkdirSync(TEST_DIR, { recursive: true });
|
|
273
|
-
});
|
|
274
|
-
afterAll(() => {
|
|
275
|
-
if (existsSync(TEST_DIR)) {
|
|
276
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
describe('Validate Command', () => {
|
|
280
|
-
it('should display help without errors', async () => {
|
|
281
|
-
const result = await runCommand(['validate', '--help']);
|
|
282
|
-
expect(result.exitCode).toBe(0);
|
|
283
|
-
expect(result.stdout).toContain('Validate');
|
|
284
|
-
assertNoHardcoded(result, 'skillsmith validate --help', 'validate: help', __filename);
|
|
285
|
-
});
|
|
286
|
-
it('should validate valid SKILL.md', async () => {
|
|
287
|
-
// Create valid skill
|
|
288
|
-
const skillDir = join(TEST_DIR, 'valid-skill');
|
|
289
|
-
mkdirSync(skillDir, { recursive: true });
|
|
290
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
291
|
-
const result = await runCommand(['validate', skillDir]);
|
|
292
|
-
recordTiming('validate:valid', 'skillsmith validate valid', result.durationMs);
|
|
293
|
-
expect(result.exitCode).toBe(0);
|
|
294
|
-
assertNoHardcoded(result, 'skillsmith validate valid', 'validate: valid skill', __filename);
|
|
295
|
-
});
|
|
296
|
-
it('should reject invalid SKILL.md', async () => {
|
|
297
|
-
// Create invalid skill
|
|
298
|
-
const skillDir = join(TEST_DIR, 'invalid-skill');
|
|
299
|
-
mkdirSync(skillDir, { recursive: true });
|
|
300
|
-
writeFileSync(join(skillDir, 'SKILL.md'), INVALID_SKILL_MD);
|
|
301
|
-
const result = await runCommand(['validate', skillDir]);
|
|
302
|
-
recordTiming('validate:invalid', 'skillsmith validate invalid', result.durationMs);
|
|
303
|
-
// Should fail
|
|
304
|
-
expect(result.exitCode).not.toBe(0);
|
|
305
|
-
assertNoHardcoded(result, 'skillsmith validate invalid', 'validate: invalid skill', __filename);
|
|
306
|
-
});
|
|
307
|
-
it('should handle missing SKILL.md', async () => {
|
|
308
|
-
const emptyDir = join(TEST_DIR, 'empty-dir');
|
|
309
|
-
mkdirSync(emptyDir, { recursive: true });
|
|
310
|
-
const result = await runCommand(['validate', emptyDir]);
|
|
311
|
-
// Should fail with appropriate error
|
|
312
|
-
expect(result.exitCode).not.toBe(0);
|
|
313
|
-
assertNoHardcoded(result, 'skillsmith validate missing', 'validate: missing file', __filename);
|
|
314
|
-
});
|
|
315
|
-
it('should validate current directory by default', async () => {
|
|
316
|
-
// Create skill in test dir root
|
|
317
|
-
writeFileSync(join(TEST_DIR, 'SKILL.md'), VALID_SKILL_MD);
|
|
318
|
-
const result = await runCommand(['validate'], TEST_DIR);
|
|
319
|
-
expect(result.exitCode).toBe(0);
|
|
320
|
-
assertNoHardcoded(result, 'skillsmith validate .', 'validate: current dir', __filename);
|
|
321
|
-
});
|
|
322
|
-
it('should output parsed metadata', async () => {
|
|
323
|
-
const skillDir = join(TEST_DIR, 'metadata-skill');
|
|
324
|
-
mkdirSync(skillDir, { recursive: true });
|
|
325
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
326
|
-
const result = await runCommand(['validate', skillDir]);
|
|
327
|
-
expect(result.exitCode).toBe(0);
|
|
328
|
-
// Should show parsed metadata
|
|
329
|
-
const output = result.stdout;
|
|
330
|
-
expect(output).toContain('test-skill');
|
|
331
|
-
assertNoHardcoded(result, 'skillsmith validate metadata', 'validate: metadata output', __filename);
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
});
|
|
335
|
-
describe('E2E: skillsmith publish', () => {
|
|
336
|
-
beforeEach(() => {
|
|
337
|
-
if (existsSync(TEST_DIR)) {
|
|
338
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
339
|
-
}
|
|
340
|
-
mkdirSync(TEST_DIR, { recursive: true });
|
|
341
|
-
});
|
|
342
|
-
afterAll(() => {
|
|
343
|
-
if (existsSync(TEST_DIR)) {
|
|
344
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
describe('Publish Command', () => {
|
|
348
|
-
it('should display help without errors', async () => {
|
|
349
|
-
const result = await runCommand(['publish', '--help']);
|
|
350
|
-
expect(result.exitCode).toBe(0);
|
|
351
|
-
expect(result.stdout).toContain('Prepare');
|
|
352
|
-
assertNoHardcoded(result, 'skillsmith publish --help', 'publish: help', __filename);
|
|
353
|
-
});
|
|
354
|
-
it('should prepare valid skill for publishing', async () => {
|
|
355
|
-
// Create valid skill
|
|
356
|
-
const skillDir = join(TEST_DIR, 'publish-skill');
|
|
357
|
-
mkdirSync(skillDir, { recursive: true });
|
|
358
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
359
|
-
const result = await runCommand(['publish', skillDir]);
|
|
360
|
-
recordTiming('publish:prepare', 'skillsmith publish', result.durationMs);
|
|
361
|
-
expect(result.exitCode).toBe(0);
|
|
362
|
-
// Should create publish manifest
|
|
363
|
-
expect(existsSync(join(skillDir, '.skillsmith-publish.json'))).toBe(true);
|
|
364
|
-
assertNoHardcoded(result, 'skillsmith publish', 'publish: prepare skill', __filename);
|
|
365
|
-
});
|
|
366
|
-
it('should generate checksum', async () => {
|
|
367
|
-
const skillDir = join(TEST_DIR, 'checksum-skill');
|
|
368
|
-
mkdirSync(skillDir, { recursive: true });
|
|
369
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
370
|
-
const result = await runCommand(['publish', skillDir]);
|
|
371
|
-
expect(result.exitCode).toBe(0);
|
|
372
|
-
// Read manifest
|
|
373
|
-
const manifest = JSON.parse(readFileSync(join(skillDir, '.skillsmith-publish.json'), 'utf-8'));
|
|
374
|
-
expect(manifest.checksum).toBeDefined();
|
|
375
|
-
expect(typeof manifest.checksum).toBe('string');
|
|
376
|
-
assertNoHardcoded(result, 'skillsmith publish checksum', 'publish: checksum', __filename);
|
|
377
|
-
});
|
|
378
|
-
it('should reject invalid skill', async () => {
|
|
379
|
-
const skillDir = join(TEST_DIR, 'invalid-publish');
|
|
380
|
-
mkdirSync(skillDir, { recursive: true });
|
|
381
|
-
writeFileSync(join(skillDir, 'SKILL.md'), INVALID_SKILL_MD);
|
|
382
|
-
const result = await runCommand(['publish', skillDir]);
|
|
383
|
-
// Should fail validation before publishing
|
|
384
|
-
expect(result.exitCode).not.toBe(0);
|
|
385
|
-
assertNoHardcoded(result, 'skillsmith publish invalid', 'publish: invalid skill', __filename);
|
|
386
|
-
});
|
|
387
|
-
it('should include publishing instructions', async () => {
|
|
388
|
-
const skillDir = join(TEST_DIR, 'instructions-skill');
|
|
389
|
-
mkdirSync(skillDir, { recursive: true });
|
|
390
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
391
|
-
const result = await runCommand(['publish', skillDir]);
|
|
392
|
-
expect(result.exitCode).toBe(0);
|
|
393
|
-
// Output should contain publishing instructions
|
|
394
|
-
const output = result.stdout;
|
|
395
|
-
expect(output).toMatch(/github|manual|archive/i);
|
|
396
|
-
assertNoHardcoded(result, 'skillsmith publish instructions', 'publish: instructions', __filename);
|
|
397
|
-
});
|
|
398
|
-
it('should not expose local paths in manifest', async () => {
|
|
399
|
-
const skillDir = join(TEST_DIR, 'path-manifest');
|
|
400
|
-
mkdirSync(skillDir, { recursive: true });
|
|
401
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
402
|
-
const result = await runCommand(['publish', skillDir]);
|
|
403
|
-
expect(result.exitCode).toBe(0);
|
|
404
|
-
// Read manifest
|
|
405
|
-
const manifest = readFileSync(join(skillDir, '.skillsmith-publish.json'), 'utf-8');
|
|
406
|
-
// Should not contain local paths
|
|
407
|
-
expect(manifest).not.toMatch(/\/Users\/[a-zA-Z0-9_-]+\//);
|
|
408
|
-
expect(manifest).not.toMatch(/\/home\/[a-zA-Z0-9_-]+\//);
|
|
409
|
-
expect(manifest).not.toContain(TEST_DIR);
|
|
410
|
-
});
|
|
411
|
-
});
|
|
412
|
-
});
|
|
413
|
-
// SMI-1389: E2E tests for author subagent command
|
|
414
|
-
describe('E2E: skillsmith author subagent', () => {
|
|
415
|
-
beforeEach(() => {
|
|
416
|
-
if (existsSync(TEST_DIR)) {
|
|
417
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
418
|
-
}
|
|
419
|
-
mkdirSync(TEST_DIR, { recursive: true });
|
|
420
|
-
});
|
|
421
|
-
afterAll(() => {
|
|
422
|
-
if (existsSync(TEST_DIR)) {
|
|
423
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
describe('Author Subagent Command', () => {
|
|
427
|
-
it('should display help without errors', async () => {
|
|
428
|
-
const result = await runCommand(['author', 'subagent', '--help']);
|
|
429
|
-
expect(result.exitCode).toBe(0);
|
|
430
|
-
expect(result.stdout).toContain('Generate');
|
|
431
|
-
expect(result.stdout).toContain('subagent');
|
|
432
|
-
assertNoHardcoded(result, 'skillsmith author subagent --help', 'author subagent: help', __filename);
|
|
433
|
-
});
|
|
434
|
-
it('should generate subagent from valid skill', async () => {
|
|
435
|
-
// Create valid skill
|
|
436
|
-
const skillDir = join(TEST_DIR, 'subagent-skill');
|
|
437
|
-
mkdirSync(skillDir, { recursive: true });
|
|
438
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
439
|
-
// Create output directory
|
|
440
|
-
const outputDir = join(TEST_DIR, 'agents');
|
|
441
|
-
const result = await runCommand(['author', 'subagent', skillDir, '-o', outputDir]);
|
|
442
|
-
recordTiming('author:subagent', 'skillsmith author subagent', result.durationMs);
|
|
443
|
-
expect(result.exitCode).toBe(0);
|
|
444
|
-
expect(existsSync(join(outputDir, 'test-skill-specialist.md'))).toBe(true);
|
|
445
|
-
assertNoHardcoded(result, 'skillsmith author subagent', 'author subagent: generate', __filename);
|
|
446
|
-
});
|
|
447
|
-
it('should include CLAUDE.md snippet in output', async () => {
|
|
448
|
-
const skillDir = join(TEST_DIR, 'claude-md-skill');
|
|
449
|
-
mkdirSync(skillDir, { recursive: true });
|
|
450
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
451
|
-
const outputDir = join(TEST_DIR, 'agents-claude');
|
|
452
|
-
const result = await runCommand(['author', 'subagent', skillDir, '-o', outputDir]);
|
|
453
|
-
expect(result.exitCode).toBe(0);
|
|
454
|
-
expect(result.stdout).toContain('CLAUDE.md');
|
|
455
|
-
expect(result.stdout).toContain('Delegation');
|
|
456
|
-
assertNoHardcoded(result, 'skillsmith author subagent claude', 'author subagent: claude.md', __filename);
|
|
457
|
-
});
|
|
458
|
-
it('should skip CLAUDE.md snippet with --skip-claude-md', async () => {
|
|
459
|
-
const skillDir = join(TEST_DIR, 'skip-claude-skill');
|
|
460
|
-
mkdirSync(skillDir, { recursive: true });
|
|
461
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
462
|
-
const outputDir = join(TEST_DIR, 'agents-skip');
|
|
463
|
-
const result = await runCommand([
|
|
464
|
-
'author',
|
|
465
|
-
'subagent',
|
|
466
|
-
skillDir,
|
|
467
|
-
'-o',
|
|
468
|
-
outputDir,
|
|
469
|
-
'--skip-claude-md',
|
|
470
|
-
]);
|
|
471
|
-
expect(result.exitCode).toBe(0);
|
|
472
|
-
expect(result.stdout).not.toContain('Add to your CLAUDE.md');
|
|
473
|
-
assertNoHardcoded(result, 'skillsmith author subagent skip', 'author subagent: skip claude', __filename);
|
|
474
|
-
});
|
|
475
|
-
it('should use custom tools when provided', async () => {
|
|
476
|
-
const skillDir = join(TEST_DIR, 'custom-tools-skill');
|
|
477
|
-
mkdirSync(skillDir, { recursive: true });
|
|
478
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
479
|
-
const outputDir = join(TEST_DIR, 'agents-tools');
|
|
480
|
-
const result = await runCommand([
|
|
481
|
-
'author',
|
|
482
|
-
'subagent',
|
|
483
|
-
skillDir,
|
|
484
|
-
'-o',
|
|
485
|
-
outputDir,
|
|
486
|
-
'--tools',
|
|
487
|
-
'Read,Write,Bash',
|
|
488
|
-
]);
|
|
489
|
-
expect(result.exitCode).toBe(0);
|
|
490
|
-
expect(result.stdout).toContain('Read, Write, Bash');
|
|
491
|
-
assertNoHardcoded(result, 'skillsmith author subagent tools', 'author subagent: custom tools', __filename);
|
|
492
|
-
});
|
|
493
|
-
it('should handle missing SKILL.md gracefully', async () => {
|
|
494
|
-
const emptyDir = join(TEST_DIR, 'empty-subagent');
|
|
495
|
-
mkdirSync(emptyDir, { recursive: true });
|
|
496
|
-
const result = await runCommand(['author', 'subagent', emptyDir]);
|
|
497
|
-
expect(result.exitCode).not.toBe(0);
|
|
498
|
-
assertNoHardcoded(result, 'skillsmith author subagent missing', 'author subagent: missing', __filename);
|
|
499
|
-
});
|
|
500
|
-
// SMI-1397: Test for --model option
|
|
501
|
-
it('should use specified model in subagent output', async () => {
|
|
502
|
-
const skillDir = join(TEST_DIR, 'model-test-skill');
|
|
503
|
-
mkdirSync(skillDir, { recursive: true });
|
|
504
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
505
|
-
const outputDir = join(TEST_DIR, 'agents-model');
|
|
506
|
-
const result = await runCommand([
|
|
507
|
-
'author',
|
|
508
|
-
'subagent',
|
|
509
|
-
skillDir,
|
|
510
|
-
'-o',
|
|
511
|
-
outputDir,
|
|
512
|
-
'--model',
|
|
513
|
-
'opus',
|
|
514
|
-
]);
|
|
515
|
-
expect(result.exitCode).toBe(0);
|
|
516
|
-
expect(result.stdout).toContain('opus');
|
|
517
|
-
// Verify the generated file contains the model
|
|
518
|
-
const generatedContent = readFileSync(join(outputDir, 'test-skill-specialist.md'), 'utf-8');
|
|
519
|
-
expect(generatedContent).toContain('model: opus');
|
|
520
|
-
assertNoHardcoded(result, 'skillsmith author subagent model', 'author subagent: model option', __filename);
|
|
521
|
-
});
|
|
522
|
-
it('should use haiku model when specified', async () => {
|
|
523
|
-
const skillDir = join(TEST_DIR, 'haiku-test-skill');
|
|
524
|
-
mkdirSync(skillDir, { recursive: true });
|
|
525
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
526
|
-
const outputDir = join(TEST_DIR, 'agents-haiku');
|
|
527
|
-
const result = await runCommand([
|
|
528
|
-
'author',
|
|
529
|
-
'subagent',
|
|
530
|
-
skillDir,
|
|
531
|
-
'-o',
|
|
532
|
-
outputDir,
|
|
533
|
-
'--model',
|
|
534
|
-
'haiku',
|
|
535
|
-
]);
|
|
536
|
-
expect(result.exitCode).toBe(0);
|
|
537
|
-
const generatedContent = readFileSync(join(outputDir, 'test-skill-specialist.md'), 'utf-8');
|
|
538
|
-
expect(generatedContent).toContain('model: haiku');
|
|
539
|
-
assertNoHardcoded(result, 'skillsmith author subagent haiku', 'author subagent: haiku model', __filename);
|
|
540
|
-
});
|
|
541
|
-
});
|
|
542
|
-
});
|
|
543
|
-
// SMI-1390: E2E tests for author transform command
|
|
544
|
-
describe('E2E: skillsmith author transform', () => {
|
|
545
|
-
beforeEach(() => {
|
|
546
|
-
if (existsSync(TEST_DIR)) {
|
|
547
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
548
|
-
}
|
|
549
|
-
mkdirSync(TEST_DIR, { recursive: true });
|
|
550
|
-
});
|
|
551
|
-
afterAll(() => {
|
|
552
|
-
if (existsSync(TEST_DIR)) {
|
|
553
|
-
rmSync(TEST_DIR, { recursive: true, force: true });
|
|
554
|
-
}
|
|
555
|
-
});
|
|
556
|
-
describe('Author Transform Command', () => {
|
|
557
|
-
it('should display help without errors', async () => {
|
|
558
|
-
const result = await runCommand(['author', 'transform', '--help']);
|
|
559
|
-
expect(result.exitCode).toBe(0);
|
|
560
|
-
expect(result.stdout).toContain('Upgrade');
|
|
561
|
-
expect(result.stdout).toContain('transform');
|
|
562
|
-
assertNoHardcoded(result, 'skillsmith author transform --help', 'author transform: help', __filename);
|
|
563
|
-
});
|
|
564
|
-
it('should show dry-run preview without creating files', async () => {
|
|
565
|
-
const skillDir = join(TEST_DIR, 'dry-run-skill');
|
|
566
|
-
mkdirSync(skillDir, { recursive: true });
|
|
567
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
568
|
-
const result = await runCommand(['author', 'transform', skillDir, '--dry-run']);
|
|
569
|
-
recordTiming('author:transform:dry-run', 'skillsmith author transform --dry-run', result.durationMs);
|
|
570
|
-
expect(result.exitCode).toBe(0);
|
|
571
|
-
expect(result.stdout).toContain('Dry run');
|
|
572
|
-
expect(result.stdout).toContain('test-skill');
|
|
573
|
-
expect(result.stdout).toContain('Required Tools');
|
|
574
|
-
assertNoHardcoded(result, 'skillsmith author transform dry-run', 'author transform: dry-run', __filename);
|
|
575
|
-
});
|
|
576
|
-
it('should transform skill and generate subagent', async () => {
|
|
577
|
-
const skillDir = join(TEST_DIR, 'transform-skill');
|
|
578
|
-
mkdirSync(skillDir, { recursive: true });
|
|
579
|
-
writeFileSync(join(skillDir, 'SKILL.md'), VALID_SKILL_MD);
|
|
580
|
-
// Note: This will write to ~/.claude/agents by default
|
|
581
|
-
// In real E2E we'd want to mock this or use --output
|
|
582
|
-
const result = await runCommand(['author', 'transform', skillDir, '--dry-run']);
|
|
583
|
-
expect(result.exitCode).toBe(0);
|
|
584
|
-
assertNoHardcoded(result, 'skillsmith author transform', 'author transform: transform', __filename);
|
|
585
|
-
});
|
|
586
|
-
it('should handle missing SKILL.md gracefully', async () => {
|
|
587
|
-
const emptyDir = join(TEST_DIR, 'empty-transform');
|
|
588
|
-
mkdirSync(emptyDir, { recursive: true });
|
|
589
|
-
const result = await runCommand(['author', 'transform', emptyDir]);
|
|
590
|
-
expect(result.exitCode).not.toBe(0);
|
|
591
|
-
assertNoHardcoded(result, 'skillsmith author transform missing', 'author transform: missing', __filename);
|
|
592
|
-
});
|
|
593
|
-
it('should detect and display required tools', async () => {
|
|
594
|
-
// Skill with specific tool requirements
|
|
595
|
-
const toolSkillMd = `---
|
|
596
|
-
name: tool-test-skill
|
|
597
|
-
version: 1.0.0
|
|
598
|
-
description: A skill that uses bash commands and file editing
|
|
599
|
-
author: test
|
|
600
|
-
---
|
|
601
|
-
|
|
602
|
-
# tool-test-skill
|
|
603
|
-
|
|
604
|
-
This skill runs npm commands via bash and writes files.
|
|
605
|
-
|
|
606
|
-
## Usage
|
|
607
|
-
|
|
608
|
-
Run \`npm install\` and edit configuration files.
|
|
609
|
-
`;
|
|
610
|
-
const skillDir = join(TEST_DIR, 'tool-detect-skill');
|
|
611
|
-
mkdirSync(skillDir, { recursive: true });
|
|
612
|
-
writeFileSync(join(skillDir, 'SKILL.md'), toolSkillMd);
|
|
613
|
-
const result = await runCommand(['author', 'transform', skillDir, '--dry-run']);
|
|
614
|
-
expect(result.exitCode).toBe(0);
|
|
615
|
-
expect(result.stdout).toContain('Required Tools');
|
|
616
|
-
// Should detect Bash from "npm commands via bash"
|
|
617
|
-
// Should detect Write/Edit from "writes files" and "edit"
|
|
618
|
-
assertNoHardcoded(result, 'skillsmith author transform tools', 'author transform: detect tools', __filename);
|
|
619
|
-
});
|
|
620
|
-
// SMI-1397: Test for --batch option
|
|
621
|
-
it('should batch transform multiple skills', async () => {
|
|
622
|
-
// Create first skill
|
|
623
|
-
const skillDir1 = join(TEST_DIR, 'batch-skill-1');
|
|
624
|
-
mkdirSync(skillDir1, { recursive: true });
|
|
625
|
-
writeFileSync(join(skillDir1, 'SKILL.md'), `---
|
|
626
|
-
name: batch-skill-one
|
|
627
|
-
version: 1.0.0
|
|
628
|
-
description: First batch skill for testing
|
|
629
|
-
author: test
|
|
630
|
-
---
|
|
631
|
-
|
|
632
|
-
# batch-skill-one
|
|
633
|
-
|
|
634
|
-
First skill in batch processing test.
|
|
635
|
-
`);
|
|
636
|
-
// Create second skill
|
|
637
|
-
const skillDir2 = join(TEST_DIR, 'batch-skill-2');
|
|
638
|
-
mkdirSync(skillDir2, { recursive: true });
|
|
639
|
-
writeFileSync(join(skillDir2, 'SKILL.md'), `---
|
|
640
|
-
name: batch-skill-two
|
|
641
|
-
version: 1.0.0
|
|
642
|
-
description: Second batch skill for testing
|
|
643
|
-
author: test
|
|
644
|
-
---
|
|
645
|
-
|
|
646
|
-
# batch-skill-two
|
|
647
|
-
|
|
648
|
-
Second skill in batch processing test.
|
|
649
|
-
`);
|
|
650
|
-
const result = await runCommand([
|
|
651
|
-
'author',
|
|
652
|
-
'transform',
|
|
653
|
-
'--batch',
|
|
654
|
-
`${skillDir1},${skillDir2}`,
|
|
655
|
-
'--dry-run',
|
|
656
|
-
]);
|
|
657
|
-
recordTiming('author:transform:batch', 'skillsmith author transform --batch', result.durationMs);
|
|
658
|
-
expect(result.exitCode).toBe(0);
|
|
659
|
-
expect(result.stdout).toContain('Batch processing 2 skills');
|
|
660
|
-
expect(result.stdout).toContain('batch-skill-one');
|
|
661
|
-
expect(result.stdout).toContain('batch-skill-two');
|
|
662
|
-
assertNoHardcoded(result, 'skillsmith author transform batch', 'author transform: batch', __filename);
|
|
663
|
-
});
|
|
664
|
-
});
|
|
665
|
-
});
|
|
666
|
-
//# sourceMappingURL=author.e2e.test.js.map
|