opkg 0.9.2 → 0.9.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/.claude/agents/code-reviewer.md +171 -0
- package/.claude/commands/commit-push-pr.md +20 -0
- package/.claude/commands/{specs/read.md → read-specs.md} +1 -1
- package/.claude/commands/{specs/update.md → update-specs.md} +4 -0
- package/.claude/skills/code-review-excellence/SKILL.md +538 -0
- package/README.md +2 -2
- package/package.json +3 -1
- package/packages/cli/dist/add-IJAPFHIX.js +624 -0
- package/packages/cli/dist/add-IJAPFHIX.js.map +7 -0
- package/packages/cli/dist/add-LLUNFLJI.js +624 -0
- package/packages/cli/dist/add-LLUNFLJI.js.map +7 -0
- package/packages/cli/dist/add-U44SL3OR.js +624 -0
- package/packages/cli/dist/add-U44SL3OR.js.map +7 -0
- package/packages/cli/dist/chunk-23VBP5L6.js +371 -0
- package/packages/cli/dist/chunk-23VBP5L6.js.map +7 -0
- package/packages/cli/dist/chunk-2SVHLF5C.js +1419 -0
- package/packages/cli/dist/chunk-2SVHLF5C.js.map +7 -0
- package/packages/cli/dist/chunk-37256POU.js +99 -0
- package/packages/cli/dist/chunk-37256POU.js.map +7 -0
- package/packages/cli/dist/chunk-3PZRVA6O.js +196 -0
- package/packages/cli/dist/chunk-3PZRVA6O.js.map +7 -0
- package/packages/cli/dist/chunk-427DCURL.js +155 -0
- package/packages/cli/dist/chunk-427DCURL.js.map +7 -0
- package/packages/cli/dist/chunk-4B5HJLP2.js +48 -0
- package/packages/cli/dist/chunk-4B5HJLP2.js.map +7 -0
- package/packages/cli/dist/chunk-4OWT3YEG.js +413 -0
- package/packages/cli/dist/chunk-4OWT3YEG.js.map +7 -0
- package/packages/cli/dist/chunk-4RIBTBXI.js +568 -0
- package/packages/cli/dist/chunk-4RIBTBXI.js.map +7 -0
- package/packages/cli/dist/chunk-4X2EJHJN.js +63 -0
- package/packages/cli/dist/chunk-4X2EJHJN.js.map +7 -0
- package/packages/cli/dist/chunk-6CYW66HD.js +1136 -0
- package/packages/cli/dist/chunk-6CYW66HD.js.map +7 -0
- package/packages/cli/dist/chunk-6DITYAFA.js +172 -0
- package/packages/cli/dist/chunk-6DITYAFA.js.map +7 -0
- package/packages/cli/dist/chunk-7KEAKEVZ.js +568 -0
- package/packages/cli/dist/chunk-7KEAKEVZ.js.map +7 -0
- package/packages/cli/dist/chunk-ABFUD25D.js +61 -0
- package/packages/cli/dist/chunk-ABFUD25D.js.map +7 -0
- package/packages/cli/dist/chunk-AR7GJCG6.js +274 -0
- package/packages/cli/dist/chunk-AR7GJCG6.js.map +7 -0
- package/packages/cli/dist/chunk-AYTGQCXH.js +86 -0
- package/packages/cli/dist/chunk-AYTGQCXH.js.map +7 -0
- package/packages/cli/dist/chunk-BROJ6OUT.js +631 -0
- package/packages/cli/dist/chunk-BROJ6OUT.js.map +7 -0
- package/packages/cli/dist/chunk-BVVSU7QD.js +23 -0
- package/packages/cli/dist/chunk-BVVSU7QD.js.map +7 -0
- package/packages/cli/dist/chunk-C6FY55UP.js +108 -0
- package/packages/cli/dist/chunk-C6FY55UP.js.map +7 -0
- package/packages/cli/dist/chunk-CVA64SXK.js +1136 -0
- package/packages/cli/dist/chunk-CVA64SXK.js.map +7 -0
- package/packages/cli/dist/chunk-D3O7LY2Q.js +1151 -0
- package/packages/cli/dist/chunk-D3O7LY2Q.js.map +7 -0
- package/packages/cli/dist/chunk-D6LEPODL.js +413 -0
- package/packages/cli/dist/chunk-D6LEPODL.js.map +7 -0
- package/packages/cli/dist/chunk-DEC24S7E.js +186 -0
- package/packages/cli/dist/chunk-DEC24S7E.js.map +7 -0
- package/packages/cli/dist/chunk-FMVVJH5M.js +371 -0
- package/packages/cli/dist/chunk-FMVVJH5M.js.map +7 -0
- package/packages/cli/dist/chunk-GDVFS3YP.js +130 -0
- package/packages/cli/dist/chunk-GDVFS3YP.js.map +7 -0
- package/packages/cli/dist/chunk-GEP2G5HF.js +31 -0
- package/packages/cli/dist/chunk-GEP2G5HF.js.map +7 -0
- package/packages/cli/dist/chunk-GSWHZBT2.js +62 -0
- package/packages/cli/dist/chunk-GSWHZBT2.js.map +7 -0
- package/packages/cli/dist/chunk-HTYHJA3B.js +61 -0
- package/packages/cli/dist/chunk-HTYHJA3B.js.map +7 -0
- package/packages/cli/dist/chunk-HYKYECAE.js +222 -0
- package/packages/cli/dist/chunk-HYKYECAE.js.map +7 -0
- package/packages/cli/dist/chunk-I7FEAHB4.js +100 -0
- package/packages/cli/dist/chunk-I7FEAHB4.js.map +7 -0
- package/packages/cli/dist/chunk-IHVZ5AUJ.js +107 -0
- package/packages/cli/dist/chunk-IHVZ5AUJ.js.map +7 -0
- package/packages/cli/dist/chunk-KI7FDU3H.js +99 -0
- package/packages/cli/dist/chunk-KI7FDU3H.js.map +7 -0
- package/packages/cli/dist/chunk-L5GRJQBS.js +32 -0
- package/packages/cli/dist/chunk-L5GRJQBS.js.map +7 -0
- package/packages/cli/dist/chunk-LHEAUDJL.js +302 -0
- package/packages/cli/dist/chunk-LHEAUDJL.js.map +7 -0
- package/packages/cli/dist/chunk-MIURCESJ.js +48 -0
- package/packages/cli/dist/chunk-MIURCESJ.js.map +7 -0
- package/packages/cli/dist/chunk-N43IXOND.js +732 -0
- package/packages/cli/dist/chunk-N43IXOND.js.map +7 -0
- package/packages/cli/dist/chunk-OUZRMGPV.js +274 -0
- package/packages/cli/dist/chunk-OUZRMGPV.js.map +7 -0
- package/packages/cli/dist/chunk-PSQXKAL4.js +371 -0
- package/packages/cli/dist/chunk-PSQXKAL4.js.map +7 -0
- package/packages/cli/dist/chunk-PUDRKDVZ.js +1419 -0
- package/packages/cli/dist/chunk-PUDRKDVZ.js.map +7 -0
- package/packages/cli/dist/chunk-RAKMX654.js +631 -0
- package/packages/cli/dist/chunk-RAKMX654.js.map +7 -0
- package/packages/cli/dist/chunk-RSFLK2TP.js +195 -0
- package/packages/cli/dist/chunk-RSFLK2TP.js.map +7 -0
- package/packages/cli/dist/chunk-S26PR2BS.js +99 -0
- package/packages/cli/dist/chunk-S26PR2BS.js.map +7 -0
- package/packages/cli/dist/chunk-U7FW7SXX.js +568 -0
- package/packages/cli/dist/chunk-U7FW7SXX.js.map +7 -0
- package/packages/cli/dist/chunk-VKM6K5TN.js +413 -0
- package/packages/cli/dist/chunk-VKM6K5TN.js.map +7 -0
- package/packages/cli/dist/chunk-VKNJG4JN.js +253 -0
- package/packages/cli/dist/chunk-VKNJG4JN.js.map +7 -0
- package/packages/cli/dist/chunk-VQ2KY6CK.js +113 -0
- package/packages/cli/dist/chunk-VQ2KY6CK.js.map +7 -0
- package/packages/cli/dist/chunk-VQDTXLOX.js +1312 -0
- package/packages/cli/dist/chunk-VQDTXLOX.js.map +7 -0
- package/packages/cli/dist/chunk-VXNS3X5O.js +60 -0
- package/packages/cli/dist/chunk-VXNS3X5O.js.map +7 -0
- package/packages/cli/dist/chunk-WF7H2YDU.js +376 -0
- package/packages/cli/dist/chunk-WF7H2YDU.js.map +7 -0
- package/packages/cli/dist/chunk-WNRXZLWW.js +266 -0
- package/packages/cli/dist/chunk-WNRXZLWW.js.map +7 -0
- package/packages/cli/dist/chunk-WT4VVCXM.js +1121 -0
- package/packages/cli/dist/chunk-WT4VVCXM.js.map +7 -0
- package/packages/cli/dist/configure-3AZUMDJZ.js +107 -0
- package/packages/cli/dist/configure-3AZUMDJZ.js.map +7 -0
- package/packages/cli/dist/configure-D722JQOD.js +107 -0
- package/packages/cli/dist/configure-D722JQOD.js.map +7 -0
- package/packages/cli/dist/configure-IU5H7XD6.js +107 -0
- package/packages/cli/dist/configure-IU5H7XD6.js.map +7 -0
- package/packages/cli/dist/file-format-detector-PXCIAKTK.js +22 -0
- package/packages/cli/dist/file-format-detector-PXCIAKTK.js.map +7 -0
- package/packages/cli/dist/index.js +17 -17
- package/packages/cli/dist/install-EZNWMLJR.js +7581 -0
- package/packages/cli/dist/install-EZNWMLJR.js.map +7 -0
- package/packages/cli/dist/install-F5ANFUBX.js +7577 -0
- package/packages/cli/dist/install-F5ANFUBX.js.map +7 -0
- package/packages/cli/dist/install-JSXEPPC2.js +7104 -0
- package/packages/cli/dist/install-JSXEPPC2.js.map +7 -0
- package/packages/cli/dist/install-QHEBX7JH.js +7101 -0
- package/packages/cli/dist/install-QHEBX7JH.js.map +7 -0
- package/packages/cli/dist/list-DMOUATYI.js +327 -0
- package/packages/cli/dist/list-DMOUATYI.js.map +7 -0
- package/packages/cli/dist/list-UESSCB7Y.js +327 -0
- package/packages/cli/dist/list-UESSCB7Y.js.map +7 -0
- package/packages/cli/dist/list-XR7RSJFS.js +327 -0
- package/packages/cli/dist/list-XR7RSJFS.js.map +7 -0
- package/packages/cli/dist/login-EYZ2SOYZ.js +150 -0
- package/packages/cli/dist/login-EYZ2SOYZ.js.map +7 -0
- package/packages/cli/dist/login-JWCSTAEU.js +150 -0
- package/packages/cli/dist/login-JWCSTAEU.js.map +7 -0
- package/packages/cli/dist/login-NRKHXZKM.js +150 -0
- package/packages/cli/dist/login-NRKHXZKM.js.map +7 -0
- package/packages/cli/dist/logout-HDMYRXIE.js +40 -0
- package/packages/cli/dist/logout-HDMYRXIE.js.map +7 -0
- package/packages/cli/dist/logout-SYHXCVCQ.js +40 -0
- package/packages/cli/dist/logout-SYHXCVCQ.js.map +7 -0
- package/packages/cli/dist/logout-X3XUUOH5.js +40 -0
- package/packages/cli/dist/logout-X3XUUOH5.js.map +7 -0
- package/packages/cli/dist/new-3LTFKDTQ.js +277 -0
- package/packages/cli/dist/new-3LTFKDTQ.js.map +7 -0
- package/packages/cli/dist/new-F46OSD72.js +277 -0
- package/packages/cli/dist/new-F46OSD72.js.map +7 -0
- package/packages/cli/dist/new-OPCCLNL2.js +277 -0
- package/packages/cli/dist/new-OPCCLNL2.js.map +7 -0
- package/packages/cli/dist/package-marker-detector-T5O5YD2E.js +80 -0
- package/packages/cli/dist/package-marker-detector-T5O5YD2E.js.map +7 -0
- package/packages/cli/dist/package-yml-QWZIJDYU.js +16 -0
- package/packages/cli/dist/package-yml-QWZIJDYU.js.map +7 -0
- package/packages/cli/dist/plugin-naming-YP2I4NPA.js +29 -0
- package/packages/cli/dist/plugin-naming-YP2I4NPA.js.map +7 -0
- package/packages/cli/dist/publish-4H43PCSG.js +619 -0
- package/packages/cli/dist/publish-4H43PCSG.js.map +7 -0
- package/packages/cli/dist/publish-RULKLNUX.js +619 -0
- package/packages/cli/dist/publish-RULKLNUX.js.map +7 -0
- package/packages/cli/dist/publish-URWY2P3E.js +619 -0
- package/packages/cli/dist/publish-URWY2P3E.js.map +7 -0
- package/packages/cli/dist/remove-BD52BHR2.js +542 -0
- package/packages/cli/dist/remove-BD52BHR2.js.map +7 -0
- package/packages/cli/dist/remove-G5NRC7LD.js +542 -0
- package/packages/cli/dist/remove-G5NRC7LD.js.map +7 -0
- package/packages/cli/dist/remove-TC3FQUYQ.js +542 -0
- package/packages/cli/dist/remove-TC3FQUYQ.js.map +7 -0
- package/packages/cli/dist/resource-discoverer-4X4RY43E.js +17 -0
- package/packages/cli/dist/resource-discoverer-4X4RY43E.js.map +7 -0
- package/packages/cli/dist/save-24TESYKI.js +1728 -0
- package/packages/cli/dist/save-24TESYKI.js.map +7 -0
- package/packages/cli/dist/save-N3QWF2WN.js +1728 -0
- package/packages/cli/dist/save-N3QWF2WN.js.map +7 -0
- package/packages/cli/dist/save-P2U67DTV.js +1728 -0
- package/packages/cli/dist/save-P2U67DTV.js.map +7 -0
- package/packages/cli/dist/search-ABROK3UO.js +157 -0
- package/packages/cli/dist/search-ABROK3UO.js.map +7 -0
- package/packages/cli/dist/search-WVFXFNAV.js +157 -0
- package/packages/cli/dist/search-WVFXFNAV.js.map +7 -0
- package/packages/cli/dist/search-YQN2Q2SO.js +157 -0
- package/packages/cli/dist/search-YQN2Q2SO.js.map +7 -0
- package/packages/cli/dist/set-DCWF73F6.js +251 -0
- package/packages/cli/dist/set-DCWF73F6.js.map +7 -0
- package/packages/cli/dist/set-GJEG2F6Y.js +251 -0
- package/packages/cli/dist/set-GJEG2F6Y.js.map +7 -0
- package/packages/cli/dist/set-NGM2FIKF.js +251 -0
- package/packages/cli/dist/set-NGM2FIKF.js.map +7 -0
- package/packages/cli/dist/uninstall-3CJQMTYH.js +539 -0
- package/packages/cli/dist/uninstall-3CJQMTYH.js.map +7 -0
- package/packages/cli/dist/uninstall-Q3CP4UN5.js +539 -0
- package/packages/cli/dist/uninstall-Q3CP4UN5.js.map +7 -0
- package/packages/cli/dist/uninstall-QU5OMEEC.js +539 -0
- package/packages/cli/dist/uninstall-QU5OMEEC.js.map +7 -0
- package/packages/cli/dist/unpublish-GHJQYC4S.js +245 -0
- package/packages/cli/dist/unpublish-GHJQYC4S.js.map +7 -0
- package/packages/cli/dist/unpublish-L2CYMK4B.js +245 -0
- package/packages/cli/dist/unpublish-L2CYMK4B.js.map +7 -0
- package/packages/cli/dist/unpublish-VBTNTMS5.js +245 -0
- package/packages/cli/dist/unpublish-VBTNTMS5.js.map +7 -0
- package/packages/cli/dist/view-MXRBMXOG.js +488 -0
- package/packages/cli/dist/view-MXRBMXOG.js.map +7 -0
- package/packages/cli/dist/view-NMND7SAW.js +488 -0
- package/packages/cli/dist/view-NMND7SAW.js.map +7 -0
- package/packages/cli/dist/view-RPQRDSYB.js +488 -0
- package/packages/cli/dist/view-RPQRDSYB.js.map +7 -0
- package/packages/cli/package.json +2 -0
- package/packages/core/dist/constants/index.d.ts +9 -0
- package/packages/core/dist/constants/index.d.ts.map +1 -1
- package/packages/core/dist/constants/index.js +12 -0
- package/packages/core/dist/constants/index.js.map +1 -1
- package/packages/core/dist/core/dependency-resolver/index.d.ts +2 -10
- package/packages/core/dist/core/dependency-resolver/index.d.ts.map +1 -1
- package/packages/core/dist/core/dependency-resolver/index.js +3 -14
- package/packages/core/dist/core/dependency-resolver/index.js.map +1 -1
- package/packages/core/dist/core/install/base-detector.d.ts +2 -1
- package/packages/core/dist/core/install/base-detector.d.ts.map +1 -1
- package/packages/core/dist/core/install/base-detector.js +54 -1
- package/packages/core/dist/core/install/base-detector.js.map +1 -1
- package/packages/core/dist/core/install/conflicts/file-conflict-resolver.d.ts +7 -5
- package/packages/core/dist/core/install/conflicts/file-conflict-resolver.d.ts.map +1 -1
- package/packages/core/dist/core/install/conflicts/file-conflict-resolver.js +25 -9
- package/packages/core/dist/core/install/conflicts/file-conflict-resolver.js.map +1 -1
- package/packages/core/dist/core/install/flow-index-installer.d.ts +2 -1
- package/packages/core/dist/core/install/flow-index-installer.d.ts.map +1 -1
- package/packages/core/dist/core/install/flow-index-installer.js +19 -4
- package/packages/core/dist/core/install/flow-index-installer.js.map +1 -1
- package/packages/core/dist/core/install/input-classifier-base.js +3 -3
- package/packages/core/dist/core/install/input-classifier-base.js.map +1 -1
- package/packages/core/dist/core/install/install-reporting.d.ts.map +1 -1
- package/packages/core/dist/core/install/install-reporting.js +7 -9
- package/packages/core/dist/core/install/install-reporting.js.map +1 -1
- package/packages/core/dist/core/install/list-handler.d.ts.map +1 -1
- package/packages/core/dist/core/install/list-handler.js +3 -0
- package/packages/core/dist/core/install/list-handler.js.map +1 -1
- package/packages/core/dist/core/install/marketplace-handler.d.ts.map +1 -1
- package/packages/core/dist/core/install/marketplace-handler.js.map +1 -1
- package/packages/core/dist/core/install/operations/conflict-handler.d.ts +2 -1
- package/packages/core/dist/core/install/operations/conflict-handler.d.ts.map +1 -1
- package/packages/core/dist/core/install/operations/conflict-handler.js +2 -2
- package/packages/core/dist/core/install/operations/conflict-handler.js.map +1 -1
- package/packages/core/dist/core/install/operations/installation-executor.d.ts +3 -0
- package/packages/core/dist/core/install/operations/installation-executor.d.ts.map +1 -1
- package/packages/core/dist/core/install/operations/installation-executor.js +39 -22
- package/packages/core/dist/core/install/operations/installation-executor.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/orchestrator.d.ts +7 -3
- package/packages/core/dist/core/install/orchestrator/orchestrator.d.ts.map +1 -1
- package/packages/core/dist/core/install/orchestrator/orchestrator.js +193 -93
- package/packages/core/dist/core/install/orchestrator/orchestrator.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/git-strategy.d.ts +1 -0
- package/packages/core/dist/core/install/orchestrator/strategies/git-strategy.d.ts.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/git-strategy.js +11 -24
- package/packages/core/dist/core/install/orchestrator/strategies/git-strategy.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/path-strategy.d.ts +2 -0
- package/packages/core/dist/core/install/orchestrator/strategies/path-strategy.d.ts.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/path-strategy.js +14 -14
- package/packages/core/dist/core/install/orchestrator/strategies/path-strategy.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/registry-strategy.d.ts +7 -0
- package/packages/core/dist/core/install/orchestrator/strategies/registry-strategy.d.ts.map +1 -1
- package/packages/core/dist/core/install/orchestrator/strategies/registry-strategy.js +28 -0
- package/packages/core/dist/core/install/orchestrator/strategies/registry-strategy.js.map +1 -1
- package/packages/core/dist/core/install/orchestrator/types.d.ts +2 -0
- package/packages/core/dist/core/install/orchestrator/types.d.ts.map +1 -1
- package/packages/core/dist/core/install/path-package-loader.d.ts.map +1 -1
- package/packages/core/dist/core/install/path-package-loader.js +20 -1
- package/packages/core/dist/core/install/path-package-loader.js.map +1 -1
- package/packages/core/dist/core/install/platform-resolution.d.ts +3 -0
- package/packages/core/dist/core/install/platform-resolution.d.ts.map +1 -1
- package/packages/core/dist/core/install/platform-resolution.js +5 -2
- package/packages/core/dist/core/install/platform-resolution.js.map +1 -1
- package/packages/core/dist/core/install/preprocessing/context-population.d.ts +18 -0
- package/packages/core/dist/core/install/preprocessing/context-population.d.ts.map +1 -0
- package/packages/core/dist/core/install/preprocessing/context-population.js +36 -0
- package/packages/core/dist/core/install/preprocessing/context-population.js.map +1 -0
- package/packages/core/dist/core/install/preprocessing/convenience-preprocessor.d.ts +23 -0
- package/packages/core/dist/core/install/preprocessing/convenience-preprocessor.d.ts.map +1 -1
- package/packages/core/dist/core/install/preprocessing/convenience-preprocessor.js +44 -0
- package/packages/core/dist/core/install/preprocessing/convenience-preprocessor.js.map +1 -1
- package/packages/core/dist/core/install/sources/git-source.d.ts.map +1 -1
- package/packages/core/dist/core/install/sources/git-source.js +67 -4
- package/packages/core/dist/core/install/sources/git-source.js.map +1 -1
- package/packages/core/dist/core/install/sources/path-source.d.ts.map +1 -1
- package/packages/core/dist/core/install/sources/path-source.js +8 -0
- package/packages/core/dist/core/install/sources/path-source.js.map +1 -1
- package/packages/core/dist/core/install/strategies/flow-based-strategy.d.ts.map +1 -1
- package/packages/core/dist/core/install/strategies/flow-based-strategy.js +12 -5
- package/packages/core/dist/core/install/strategies/flow-based-strategy.js.map +1 -1
- package/packages/core/dist/core/install/strategies/types.d.ts +11 -1
- package/packages/core/dist/core/install/strategies/types.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/context-builders.d.ts +5 -0
- package/packages/core/dist/core/install/unified/context-builders.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/context-builders.js +12 -0
- package/packages/core/dist/core/install/unified/context-builders.js.map +1 -1
- package/packages/core/dist/core/install/unified/context-helpers.d.ts +0 -4
- package/packages/core/dist/core/install/unified/context-helpers.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/context-helpers.js +0 -24
- package/packages/core/dist/core/install/unified/context-helpers.js.map +1 -1
- package/packages/core/dist/core/install/unified/index.d.ts +1 -1
- package/packages/core/dist/core/install/unified/index.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/index.js +1 -1
- package/packages/core/dist/core/install/unified/index.js.map +1 -1
- package/packages/core/dist/core/install/unified/multi-context-pipeline.d.ts +6 -0
- package/packages/core/dist/core/install/unified/multi-context-pipeline.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/multi-context-pipeline.js +11 -4
- package/packages/core/dist/core/install/unified/multi-context-pipeline.js.map +1 -1
- package/packages/core/dist/core/install/unified/phases/conflicts.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/phases/conflicts.js +1 -1
- package/packages/core/dist/core/install/unified/phases/conflicts.js.map +1 -1
- package/packages/core/dist/core/install/unified/phases/execute.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/phases/execute.js +5 -5
- package/packages/core/dist/core/install/unified/phases/execute.js.map +1 -1
- package/packages/core/dist/core/install/unified/phases/load-package.js +3 -3
- package/packages/core/dist/core/install/unified/phases/load-package.js.map +1 -1
- package/packages/core/dist/core/install/unified/phases/report.js +1 -1
- package/packages/core/dist/core/install/unified/phases/report.js.map +1 -1
- package/packages/core/dist/core/install/unified/pipeline.d.ts.map +1 -1
- package/packages/core/dist/core/install/unified/pipeline.js +7 -10
- package/packages/core/dist/core/install/unified/pipeline.js.map +1 -1
- package/packages/core/dist/core/install/wave-resolver/content-root-cache.d.ts +24 -0
- package/packages/core/dist/core/install/wave-resolver/content-root-cache.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/content-root-cache.js +71 -0
- package/packages/core/dist/core/install/wave-resolver/content-root-cache.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/context-builder.d.ts +39 -0
- package/packages/core/dist/core/install/wave-resolver/context-builder.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/context-builder.js +148 -0
- package/packages/core/dist/core/install/wave-resolver/context-builder.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/fetcher.d.ts +49 -0
- package/packages/core/dist/core/install/wave-resolver/fetcher.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/fetcher.js +221 -0
- package/packages/core/dist/core/install/wave-resolver/fetcher.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/index-updater.d.ts +23 -0
- package/packages/core/dist/core/install/wave-resolver/index-updater.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/index-updater.js +87 -0
- package/packages/core/dist/core/install/wave-resolver/index-updater.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/index-write-collector.d.ts +101 -0
- package/packages/core/dist/core/install/wave-resolver/index-write-collector.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/index-write-collector.js +194 -0
- package/packages/core/dist/core/install/wave-resolver/index-write-collector.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/index.d.ts +17 -0
- package/packages/core/dist/core/install/wave-resolver/index.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/index.js +16 -0
- package/packages/core/dist/core/install/wave-resolver/index.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/manifest-reader.d.ts +34 -0
- package/packages/core/dist/core/install/wave-resolver/manifest-reader.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/manifest-reader.js +112 -0
- package/packages/core/dist/core/install/wave-resolver/manifest-reader.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/types.d.ts +210 -0
- package/packages/core/dist/core/install/wave-resolver/types.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/types.js +6 -0
- package/packages/core/dist/core/install/wave-resolver/types.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/version-solver.d.ts +65 -0
- package/packages/core/dist/core/install/wave-resolver/version-solver.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/version-solver.js +166 -0
- package/packages/core/dist/core/install/wave-resolver/version-solver.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/wave-engine.d.ts +16 -0
- package/packages/core/dist/core/install/wave-resolver/wave-engine.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/wave-engine.js +337 -0
- package/packages/core/dist/core/install/wave-resolver/wave-engine.js.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/wave-installer.d.ts +50 -0
- package/packages/core/dist/core/install/wave-resolver/wave-installer.d.ts.map +1 -0
- package/packages/core/dist/core/install/wave-resolver/wave-installer.js +246 -0
- package/packages/core/dist/core/install/wave-resolver/wave-installer.js.map +1 -0
- package/packages/core/dist/core/ports/buffered-output.d.ts +36 -0
- package/packages/core/dist/core/ports/buffered-output.d.ts.map +1 -0
- package/packages/core/dist/core/ports/buffered-output.js +89 -0
- package/packages/core/dist/core/ports/buffered-output.js.map +1 -0
- package/packages/core/dist/core/ports/resolve.d.ts +0 -13
- package/packages/core/dist/core/ports/resolve.d.ts.map +1 -1
- package/packages/core/dist/core/ports/resolve.js +0 -28
- package/packages/core/dist/core/ports/resolve.js.map +1 -1
- package/packages/core/dist/core/remove/removal-confirmation.d.ts +4 -1
- package/packages/core/dist/core/remove/removal-confirmation.d.ts.map +1 -1
- package/packages/core/dist/core/remove/removal-confirmation.js +5 -4
- package/packages/core/dist/core/remove/removal-confirmation.js.map +1 -1
- package/packages/core/dist/core/remove/remove-from-source-pipeline.d.ts.map +1 -1
- package/packages/core/dist/core/remove/remove-from-source-pipeline.js +1 -10
- package/packages/core/dist/core/remove/remove-from-source-pipeline.js.map +1 -1
- package/packages/core/dist/core/uninstall/uninstall-executor.js +1 -1
- package/packages/core/dist/core/uninstall/uninstall-executor.js.map +1 -1
- package/packages/core/dist/core/uninstall/uninstall-reporter.d.ts +2 -2
- package/packages/core/dist/core/uninstall/uninstall-reporter.d.ts.map +1 -1
- package/packages/core/dist/core/uninstall/uninstall-reporter.js +4 -4
- package/packages/core/dist/core/uninstall/uninstall-reporter.js.map +1 -1
- package/packages/core/dist/index.d.ts +1 -1
- package/packages/core/dist/index.d.ts.map +1 -1
- package/packages/core/dist/types/execution-context.d.ts +40 -10
- package/packages/core/dist/types/execution-context.d.ts.map +1 -1
- package/packages/core/dist/utils/concurrency-pool.d.ts +34 -0
- package/packages/core/dist/utils/concurrency-pool.d.ts.map +1 -0
- package/packages/core/dist/utils/concurrency-pool.js +58 -0
- package/packages/core/dist/utils/concurrency-pool.js.map +1 -0
- package/packages/core/dist/utils/plugin-naming.d.ts +11 -3
- package/packages/core/dist/utils/plugin-naming.d.ts.map +1 -1
- package/packages/core/dist/utils/plugin-naming.js +27 -7
- package/packages/core/dist/utils/plugin-naming.js.map +1 -1
- package/plans/wave-resolver.md +254 -0
- package/.claude/agents/essentials/code-simplifier.md +0 -52
- package/.claude/commands/essentials/cleanup.md +0 -1
- package/.claude/commands/essentials/review.md +0 -8
- package/.claude/commands/git/commit.md +0 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../core/src/core/package-creation.ts", "../../core/src/utils/custom-path-resolution.ts", "../src/commands/new.ts"],
|
|
4
|
+
"sourcesContent": ["import { basename } from 'path';\nimport type { PackageYml } from '../types/index.js';\nimport type { PackageScope } from './scope-resolution.js';\nimport {\n getScopePackageDir,\n getScopePackageYmlPath,\n getScopeDisplayPath,\n getScopeDescription\n} from './scope-resolution.js';\nimport {\n resolveCustomPath,\n validateCustomPath,\n formatCustomPathForDisplay\n} from '../utils/custom-path-resolution.js';\nimport { parsePackageYml, writePackageYml } from '../utils/package-yml.js';\nimport { logger } from '../utils/logger.js';\nimport { displayPackageConfig } from '../utils/formatters.js';\nimport { exists, ensureDir } from '../utils/fs.js';\nimport { normalizePackageName, validatePackageName } from '../utils/package-name.js';\nimport type { PackageContext } from './package-context.js';\nimport type { OutputPort } from './ports/output.js';\nimport { resolveOutput } from './ports/resolve.js';\n\n/**\n * Options for creating a new package\n */\nexport interface CreatePackageOptions {\n /** Current working directory */\n cwd: string;\n\n /** Package scope (root, project, or global) - optional when customPath is provided */\n scope?: PackageScope;\n\n /** Custom directory path for package - overrides scope-based resolution */\n customPath?: string;\n\n /** Package name (optional for root scope, required for project/global) */\n packageName?: string;\n\n /** Force overwrite existing package */\n force?: boolean;\n}\n\n/**\n * Result of package creation\n */\nexport interface CreatePackageResult {\n /** Whether the operation was successful */\n success: boolean;\n\n /** Package context if successful */\n context?: PackageContext;\n\n /** Error message if unsuccessful */\n error?: string;\n\n /** Whether the package already existed (and was kept/overwritten) */\n wasExisting?: boolean;\n}\n\n/**\n * Create a new package with the specified scope and options\n * \n * This is the core package creation logic that handles:\n * - Validation of package name and scope\n * - Conflict detection with existing packages\n * - Directory structure creation\n * - openpackage.yml writing\n * \n * @param options - Package creation options\n * @returns Result containing success status and package context\n */\nexport async function createPackage(\n options: CreatePackageOptions,\n output?: OutputPort\n): Promise<CreatePackageResult> {\n const out = output ?? resolveOutput();\n const {\n cwd,\n scope,\n customPath,\n packageName,\n force = false\n } = options;\n\n try {\n // Validate that either scope or customPath is provided\n if (!scope && !customPath) {\n return {\n success: false,\n error: 'Either scope or customPath must be provided'\n };\n }\n\n // Step 1: Determine initial package name\n let normalizedName: string;\n let displayName: string;\n\n if (!packageName) {\n // No name provided - package name is required for non-root scopes\n if (scope && scope !== 'root' && !customPath) {\n return {\n success: false,\n error: `Package name is required for ${scope} scope.\\nUsage: opkg new <package-name> --scope ${scope}`\n };\n }\n // Use cwd basename as default for root scope\n displayName = basename(cwd);\n normalizedName = normalizePackageName(displayName);\n } else {\n // Package name provided\n validatePackageName(packageName);\n normalizedName = normalizePackageName(packageName);\n displayName = packageName;\n }\n\n // Step 2: Resolve target paths\n let packageDir: string;\n let packageYmlPath: string;\n let displayPath: string;\n let isCustomPath = false;\n\n if (customPath) {\n // Custom path provided - resolve and validate\n const resolved = resolveCustomPath(customPath, cwd);\n \n // Validate custom path\n const validation = await validateCustomPath(resolved, force);\n if (!validation.valid) {\n return {\n success: false,\n error: validation.error\n };\n }\n \n // Log warning if present\n if (validation.warning) {\n logger.warn(validation.warning);\n }\n \n packageDir = resolved.absolute;\n packageYmlPath = resolved.packageYmlPath;\n displayPath = formatCustomPathForDisplay(resolved, cwd);\n isCustomPath = true;\n \n logger.info(`Creating package '${normalizedName}' at custom path: ${packageDir}`);\n } else if (scope) {\n // Scope-based path resolution (existing logic)\n packageDir = getScopePackageDir(cwd, scope, scope === 'root' ? undefined : normalizedName);\n packageYmlPath = getScopePackageYmlPath(cwd, scope, scope === 'root' ? undefined : normalizedName);\n displayPath = getScopeDisplayPath(scope, scope === 'root' ? undefined : normalizedName);\n \n logger.info(`Creating ${scope} package '${normalizedName}' at: ${packageDir}`);\n } else {\n return {\n success: false,\n error: 'Either scope or customPath must be provided'\n };\n }\n\n // Step 3: Check for existing package\n const existingYml = await exists(packageYmlPath);\n let existingConfig: PackageYml | null = null;\n\n if (existingYml) {\n try {\n existingConfig = await parsePackageYml(packageYmlPath);\n } catch (error) {\n logger.warn(`Failed to parse existing openpackage.yml: ${error}`);\n }\n\n if (!force) {\n const errorMsg = existingConfig \n ? `Package '${normalizedName}' already exists at ${displayPath}. Use --force to overwrite.`\n : `Package already exists at ${displayPath}. Use --force to overwrite.`;\n \n return {\n success: false,\n error: errorMsg,\n wasExisting: true\n };\n }\n\n logger.info(`Overwriting existing package at ${displayPath} (--force enabled)`);\n }\n\n // Step 4: Create package config (minimal manifest)\n const packageConfig: PackageYml = {\n name: normalizedName\n };\n\n // Step 5: Ensure directory structure\n await ensureDir(packageDir);\n logger.debug(`Created package directory: ${packageDir}`);\n\n // Step 6: Write openpackage.yml\n await writePackageYml(packageYmlPath, packageConfig);\n logger.info(`Created openpackage.yml at ${packageYmlPath}`);\n\n // Step 7: Display success message\n displayPackageConfig(packageConfig, packageYmlPath, false);\n\n // Step 8: Show scope info\n if (isCustomPath) {\n out.message(` Location: Custom path (${displayPath})`);\n } else if (scope) {\n out.message(` Scope: ${getScopeDescription(scope)}`);\n }\n\n // Step 9: Return success with context\n return {\n success: true,\n context: {\n name: normalizedName,\n version: packageConfig.version,\n config: packageConfig,\n packageYmlPath,\n packageRootDir: packageDir,\n packageFilesDir: packageDir,\n location: (isCustomPath || (scope && scope === 'root')) ? 'root' : 'nested',\n isCwdPackage: !isCustomPath && scope === 'root',\n isNew: !existingYml\n },\n wasExisting: existingYml\n };\n\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n logger.error(`Failed to create package`, { error: errorMessage, scope, packageName });\n\n return {\n success: false,\n error: `Failed to create package: ${errorMessage}`\n };\n }\n}\n", "import { resolve, isAbsolute, dirname, join } from 'path';\nimport { exists, isDirectory } from './fs.js';\nimport { expandTildePath } from './path-resolution.js';\n\n/**\n * Utilities for custom path resolution and validation\n * \n * Handles user-specified custom paths for package creation,\n * including validation, normalization, and error reporting.\n */\n\n/**\n * Result of custom path resolution\n */\nexport interface ResolvedCustomPath {\n /** The original path as provided by the user */\n original: string;\n \n /** The resolved absolute path */\n absolute: string;\n \n /** The parent directory of the resolved path */\n parentDir: string;\n \n /** Path to openpackage.yml that will be created */\n packageYmlPath: string;\n}\n\n/**\n * Validation result for custom path\n */\nexport interface CustomPathValidation {\n /** Whether the path is valid */\n valid: boolean;\n \n /** Error message if invalid */\n error?: string;\n \n /** Warning message (path is valid but has concerns) */\n warning?: string;\n}\n\n/**\n * Resolve a custom path to an absolute path\n * \n * Handles:\n * - Relative paths (resolved from cwd)\n * - Absolute paths (used as-is)\n * - Tilde paths (expanded to home directory)\n * \n * @param customPath - The custom path provided by user\n * @param cwd - Current working directory for relative path resolution\n * @returns Resolved path information\n */\nexport function resolveCustomPath(\n customPath: string,\n cwd: string\n): ResolvedCustomPath {\n // Expand tilde if present\n const expandedPath = customPath.startsWith('~')\n ? expandTildePath(customPath)\n : customPath;\n \n // Resolve to absolute path\n const absolutePath = isAbsolute(expandedPath)\n ? resolve(expandedPath)\n : resolve(cwd, expandedPath);\n \n return {\n original: customPath,\n absolute: absolutePath,\n parentDir: dirname(absolutePath),\n packageYmlPath: join(absolutePath, 'openpackage.yml')\n };\n}\n\n/**\n * Validate a custom path for package creation\n * \n * Checks:\n * - Path is not empty\n * - Parent directory exists or can be created\n * - Path doesn't conflict with critical system paths\n * - Path has reasonable structure\n * \n * @param resolved - Resolved custom path information\n * @param force - Whether --force flag is set\n * @returns Validation result\n */\nexport async function validateCustomPath(\n resolved: ResolvedCustomPath,\n force: boolean = false\n): Promise<CustomPathValidation> {\n const { original, absolute, parentDir, packageYmlPath } = resolved;\n \n // Check for empty path\n if (!original || original.trim() === '') {\n return {\n valid: false,\n error: 'Path cannot be empty'\n };\n }\n \n // Check for dangerous paths\n const dangerousPathCheck = checkDangerousPath(absolute);\n if (!dangerousPathCheck.valid) {\n return dangerousPathCheck;\n }\n \n // Check if parent directory exists\n const parentExists = await exists(parentDir);\n if (!parentExists) {\n return {\n valid: false,\n error: `Parent directory does not exist: ${parentDir}\\n` +\n `Please create it first or choose a different path.`\n };\n }\n \n // Check if parent is actually a directory\n const parentIsDir = await isDirectory(parentDir);\n if (!parentIsDir) {\n return {\n valid: false,\n error: `Parent path exists but is not a directory: ${parentDir}`\n };\n }\n \n // Check if package directory already exists\n const targetExists = await exists(absolute);\n if (targetExists) {\n const targetIsDir = await isDirectory(absolute);\n if (!targetIsDir) {\n return {\n valid: false,\n error: `Path exists but is not a directory: ${absolute}`\n };\n }\n \n // Check if openpackage.yml already exists\n const ymlExists = await exists(packageYmlPath);\n if (ymlExists && !force) {\n return {\n valid: false,\n error: `Package already exists at: ${absolute}\\n` +\n `Use --force to overwrite.`\n };\n }\n \n // Directory exists, will be used or overwritten\n if (ymlExists && force) {\n return {\n valid: true,\n warning: `Overwriting existing package at: ${absolute}`\n };\n }\n }\n \n return { valid: true };\n}\n\n/**\n * Check if a path is dangerous or conflicts with critical system paths\n * \n * @param absolutePath - The absolute path to check\n * @returns Validation result\n */\nfunction checkDangerousPath(absolutePath: string): CustomPathValidation {\n const normalizedPath = absolutePath.toLowerCase();\n \n // Don't allow root directory\n if (absolutePath === '/' || /^[A-Z]:\\\\?$/.test(absolutePath)) {\n return {\n valid: false,\n error: 'Cannot create package in root directory'\n };\n }\n \n // Don't allow critical system directories\n // Note: We allow temp directories like /tmp and /var/folders (macOS temp)\n const dangerousPaths = [\n '/bin', '/sbin', '/usr', '/etc', '/sys', '/proc', '/dev',\n '/boot', '/lib', '/lib64', '/opt', '/root', '/srv',\n 'c:\\\\windows', 'c:\\\\program files', 'c:\\\\program files (x86)'\n ];\n \n for (const dangerous of dangerousPaths) {\n if (normalizedPath === dangerous || normalizedPath.startsWith(dangerous + '/')) {\n // Exception: Allow macOS temp directories in /var/folders\n if (dangerous === '/var' && normalizedPath.includes('/var/folders/')) {\n continue;\n }\n \n return {\n valid: false,\n error: `Cannot create package in system directory: ${absolutePath}`\n };\n }\n }\n \n return { valid: true };\n}\n\n/**\n * Format a custom path for display to the user\n * \n * Shows relative path if it's shorter and clearer,\n * otherwise shows absolute path with tilde expansion for home directory.\n * \n * @param resolved - Resolved custom path information\n * @param cwd - Current working directory for relative path display\n * @returns Formatted path for display\n */\nexport function formatCustomPathForDisplay(\n resolved: ResolvedCustomPath,\n cwd: string\n): string {\n const { original, absolute } = resolved;\n \n // If original was relative or tilde, prefer showing that\n if (!isAbsolute(original)) {\n return original;\n }\n \n // Otherwise show absolute with potential tilde\n return absolute;\n}\n", "import { createPackage } from '@opkg/core/core/package-creation.js';\nimport { parseScope, type PackageScope } from '@opkg/core/core/scope-resolution.js';\nimport { logger } from '@opkg/core/utils/logger.js';\nimport { createCliExecutionContext } from '../cli/context.js';\nimport { resolveOutput, resolvePrompt } from '@opkg/core/core/ports/resolve.js';\n\n/**\n * Command options for 'opkg new'\n */\ninterface NewCommandOptions {\n scope?: string;\n path?: string;\n force?: boolean;\n}\n\n/**\n * Setup the 'opkg new' command\n * \n * This command creates a new package with scope support:\n * - root: Create openpackage.yml in current directory\n * - project: Create in .openpackage/packages/<name>/\n * - global: Create in ~/.openpackage/packages/<name>/ (default)\n * - custom: Create at a user-specified path\n * \n * Creates a minimal package with only the name field set.\n * Use 'opkg set' to configure additional metadata (description, keywords, etc.)\n */\nexport async function setupNewCommand(args: any[]): Promise<void> {\n let [packageName, options] = args as [string | undefined, NewCommandOptions | undefined];\n const cwd = process.cwd();\n const ctx = await createCliExecutionContext({\n outputMode: !packageName ? 'rich' : 'plain',\n });\n const out = resolveOutput(ctx);\n const prm = resolvePrompt(ctx);\n\n // Parse and validate scope or custom path\n let scope: PackageScope | undefined;\n let customPath: string | undefined;\n \n if (options?.path) {\n // Custom path explicitly provided via flag\n customPath = options.path;\n \n // Warn if --scope is also provided\n if (options?.scope) {\n logger.warn('--scope is ignored when --path is specified');\n }\n } else if (options?.scope) {\n // Scope explicitly provided via flag\n try {\n scope = parseScope(options.scope);\n } catch (error) {\n throw new Error(error instanceof Error ? error.message : String(error));\n }\n } else {\n // No scope or path provided: default to global\n scope = 'global';\n }\n\n // Prompt for package name if not provided\n if (!packageName) {\n packageName = await prm.text('Enter package name:', {\n placeholder: 'my-package',\n validate: (value: string) => {\n if (!value || value.trim().length === 0) return 'Package name is required';\n if (!/^[a-z0-9]([a-z0-9._-]*[a-z0-9])?$/.test(value.trim())) {\n return 'Package name must be lowercase alphanumeric, can contain dots, hyphens, underscores';\n }\n return true;\n }\n });\n }\n\n logger.debug('Creating new package', {\n scope,\n customPath,\n packageName,\n force: options?.force\n });\n\n // Create the package\n const result = await createPackage({\n cwd,\n scope,\n customPath,\n packageName,\n force: options?.force || false\n }, out);\n\n if (!result.success) {\n throw new Error(result.error || 'Package creation failed');\n }\n\n // Get the actual package name from the result context\n const actualPackageName = result.context?.name || packageName;\n\n // Additional success messaging based on scope or custom path\n if (customPath) {\n out.note(\n `1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}\\n` +\n `2. Install to workspace: opkg install ${customPath}`,\n 'Next steps'\n );\n } else if (scope === 'project') {\n out.note(\n `1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}\\n` +\n `2. Install to this workspace: opkg install ${actualPackageName}`,\n 'Next steps'\n );\n } else if (scope === 'global') {\n out.note(\n `1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}\\n` +\n `2. Install to any workspace: opkg install ${actualPackageName}`,\n 'Next steps'\n );\n } else if (scope === 'root') {\n out.note(\n `1. Add files to your package: opkg add <file-or-dir>\\n` +\n `2. Install to other workspaces: opkg install ${actualPackageName}`,\n 'Next steps'\n );\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;;;ACAzB,SAAS,SAAS,YAAY,SAAS,YAAY;AAsD5C,SAAS,kBACd,YACA,KACoB;AAEpB,MAAM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GA,YAAQ;AAIV,EAAK,gBACH,cAAc,MAAM,IAAI,KAAK,uBAAuB;AAAA,IAClD,aAAa;AAAA,IACb,UAAU,CAAC,UACL,CAAC,SAAS,MAAM,KAAK,EAAE,WAAW,IAAU,6BAC3C,oCAAoC,KAAK,MAAM,KAAK,CAAC,IAGnD,KAFE;AAAA,EAIb,CAAC,IAGH,OAAO,MAAM,wBAAwB;AAAA,IACnC;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,SAAS;AAAA,EAClB,CAAC;AAGD,MAAM,SAAS,MAAM,cAAc;AAAA,IACjC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,SAAS,SAAS;AAAA,EAC3B,GAAG,GAAG;AAEN,MAAI,CAAC,OAAO;AACV,UAAM,IAAI,MAAM,OAAO,SAAS,yBAAyB;AAI3D,MAAM,oBAAoB,OAAO,SAAS,QAAQ;AAGlD,EAAI,aACF,IAAI;AAAA,IACF,6DAA6D,iBAAiB;AAAA,wCACrC,UAAU;AAAA,IACnD;AAAA,EACF,IACS,UAAU,YACnB,IAAI;AAAA,IACF,6DAA6D,iBAAiB;AAAA,6CAChC,iBAAiB;AAAA,IAC/D;AAAA,EACF,IACS,UAAU,WACnB,IAAI;AAAA,IACF,6DAA6D,iBAAiB;AAAA,4CACjC,iBAAiB;AAAA,IAC9D;AAAA,EACF,IACS,UAAU,UACnB,IAAI;AAAA,IACF;AAAA,+CACgD,iBAAiB;AAAA,IACjE;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getScopeDescription,
|
|
4
|
+
getScopeDisplayPath,
|
|
5
|
+
getScopePackageDir,
|
|
6
|
+
getScopePackageYmlPath,
|
|
7
|
+
parseScope
|
|
8
|
+
} from "./chunk-5HSDD3SL.js";
|
|
9
|
+
import {
|
|
10
|
+
expandTildePath
|
|
11
|
+
} from "./chunk-FRYA3JAQ.js";
|
|
12
|
+
import {
|
|
13
|
+
displayPackageConfig
|
|
14
|
+
} from "./chunk-MIURCESJ.js";
|
|
15
|
+
import {
|
|
16
|
+
createCliExecutionContext,
|
|
17
|
+
resolveOutput,
|
|
18
|
+
resolvePrompt
|
|
19
|
+
} from "./chunk-RAKMX654.js";
|
|
20
|
+
import "./chunk-XEPVYZO3.js";
|
|
21
|
+
import {
|
|
22
|
+
parsePackageYml,
|
|
23
|
+
writePackageYml
|
|
24
|
+
} from "./chunk-QTQYI4L5.js";
|
|
25
|
+
import {
|
|
26
|
+
normalizePackageName,
|
|
27
|
+
validatePackageName
|
|
28
|
+
} from "./chunk-VN22A7NW.js";
|
|
29
|
+
import "./chunk-J4IFFBLP.js";
|
|
30
|
+
import {
|
|
31
|
+
ensureDir,
|
|
32
|
+
exists,
|
|
33
|
+
isDirectory
|
|
34
|
+
} from "./chunk-S47F4OG4.js";
|
|
35
|
+
import "./chunk-ID4SVDQZ.js";
|
|
36
|
+
import {
|
|
37
|
+
logger
|
|
38
|
+
} from "./chunk-5EFWGD33.js";
|
|
39
|
+
|
|
40
|
+
// ../core/src/core/package-creation.ts
|
|
41
|
+
import { basename } from "path";
|
|
42
|
+
|
|
43
|
+
// ../core/src/utils/custom-path-resolution.ts
|
|
44
|
+
import { resolve, isAbsolute, dirname, join } from "path";
|
|
45
|
+
function resolveCustomPath(customPath, cwd) {
|
|
46
|
+
let expandedPath = customPath.startsWith("~") ? expandTildePath(customPath) : customPath, absolutePath = isAbsolute(expandedPath) ? resolve(expandedPath) : resolve(cwd, expandedPath);
|
|
47
|
+
return {
|
|
48
|
+
original: customPath,
|
|
49
|
+
absolute: absolutePath,
|
|
50
|
+
parentDir: dirname(absolutePath),
|
|
51
|
+
packageYmlPath: join(absolutePath, "openpackage.yml")
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
async function validateCustomPath(resolved, force = !1) {
|
|
55
|
+
let { original, absolute, parentDir, packageYmlPath } = resolved;
|
|
56
|
+
if (!original || original.trim() === "")
|
|
57
|
+
return {
|
|
58
|
+
valid: !1,
|
|
59
|
+
error: "Path cannot be empty"
|
|
60
|
+
};
|
|
61
|
+
let dangerousPathCheck = checkDangerousPath(absolute);
|
|
62
|
+
if (!dangerousPathCheck.valid)
|
|
63
|
+
return dangerousPathCheck;
|
|
64
|
+
if (!await exists(parentDir))
|
|
65
|
+
return {
|
|
66
|
+
valid: !1,
|
|
67
|
+
error: `Parent directory does not exist: ${parentDir}
|
|
68
|
+
Please create it first or choose a different path.`
|
|
69
|
+
};
|
|
70
|
+
if (!await isDirectory(parentDir))
|
|
71
|
+
return {
|
|
72
|
+
valid: !1,
|
|
73
|
+
error: `Parent path exists but is not a directory: ${parentDir}`
|
|
74
|
+
};
|
|
75
|
+
if (await exists(absolute)) {
|
|
76
|
+
if (!await isDirectory(absolute))
|
|
77
|
+
return {
|
|
78
|
+
valid: !1,
|
|
79
|
+
error: `Path exists but is not a directory: ${absolute}`
|
|
80
|
+
};
|
|
81
|
+
let ymlExists = await exists(packageYmlPath);
|
|
82
|
+
if (ymlExists && !force)
|
|
83
|
+
return {
|
|
84
|
+
valid: !1,
|
|
85
|
+
error: `Package already exists at: ${absolute}
|
|
86
|
+
Use --force to overwrite.`
|
|
87
|
+
};
|
|
88
|
+
if (ymlExists && force)
|
|
89
|
+
return {
|
|
90
|
+
valid: !0,
|
|
91
|
+
warning: `Overwriting existing package at: ${absolute}`
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return { valid: !0 };
|
|
95
|
+
}
|
|
96
|
+
function checkDangerousPath(absolutePath) {
|
|
97
|
+
let normalizedPath = absolutePath.toLowerCase();
|
|
98
|
+
if (absolutePath === "/" || /^[A-Z]:\\?$/.test(absolutePath))
|
|
99
|
+
return {
|
|
100
|
+
valid: !1,
|
|
101
|
+
error: "Cannot create package in root directory"
|
|
102
|
+
};
|
|
103
|
+
let dangerousPaths = [
|
|
104
|
+
"/bin",
|
|
105
|
+
"/sbin",
|
|
106
|
+
"/usr",
|
|
107
|
+
"/etc",
|
|
108
|
+
"/sys",
|
|
109
|
+
"/proc",
|
|
110
|
+
"/dev",
|
|
111
|
+
"/boot",
|
|
112
|
+
"/lib",
|
|
113
|
+
"/lib64",
|
|
114
|
+
"/opt",
|
|
115
|
+
"/root",
|
|
116
|
+
"/srv",
|
|
117
|
+
"c:\\windows",
|
|
118
|
+
"c:\\program files",
|
|
119
|
+
"c:\\program files (x86)"
|
|
120
|
+
];
|
|
121
|
+
for (let dangerous of dangerousPaths)
|
|
122
|
+
if (normalizedPath === dangerous || normalizedPath.startsWith(dangerous + "/")) {
|
|
123
|
+
if (dangerous === "/var" && normalizedPath.includes("/var/folders/"))
|
|
124
|
+
continue;
|
|
125
|
+
return {
|
|
126
|
+
valid: !1,
|
|
127
|
+
error: `Cannot create package in system directory: ${absolutePath}`
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return { valid: !0 };
|
|
131
|
+
}
|
|
132
|
+
function formatCustomPathForDisplay(resolved, cwd) {
|
|
133
|
+
let { original, absolute } = resolved;
|
|
134
|
+
return isAbsolute(original) ? absolute : original;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ../core/src/core/package-creation.ts
|
|
138
|
+
async function createPackage(options, output) {
|
|
139
|
+
let out = output ?? resolveOutput(), {
|
|
140
|
+
cwd,
|
|
141
|
+
scope,
|
|
142
|
+
customPath,
|
|
143
|
+
packageName,
|
|
144
|
+
force = !1
|
|
145
|
+
} = options;
|
|
146
|
+
try {
|
|
147
|
+
if (!scope && !customPath)
|
|
148
|
+
return {
|
|
149
|
+
success: !1,
|
|
150
|
+
error: "Either scope or customPath must be provided"
|
|
151
|
+
};
|
|
152
|
+
let normalizedName, displayName;
|
|
153
|
+
if (packageName)
|
|
154
|
+
validatePackageName(packageName), normalizedName = normalizePackageName(packageName), displayName = packageName;
|
|
155
|
+
else {
|
|
156
|
+
if (scope && scope !== "root" && !customPath)
|
|
157
|
+
return {
|
|
158
|
+
success: !1,
|
|
159
|
+
error: `Package name is required for ${scope} scope.
|
|
160
|
+
Usage: opkg new <package-name> --scope ${scope}`
|
|
161
|
+
};
|
|
162
|
+
displayName = basename(cwd), normalizedName = normalizePackageName(displayName);
|
|
163
|
+
}
|
|
164
|
+
let packageDir, packageYmlPath, displayPath, isCustomPath = !1;
|
|
165
|
+
if (customPath) {
|
|
166
|
+
let resolved = resolveCustomPath(customPath, cwd), validation = await validateCustomPath(resolved, force);
|
|
167
|
+
if (!validation.valid)
|
|
168
|
+
return {
|
|
169
|
+
success: !1,
|
|
170
|
+
error: validation.error
|
|
171
|
+
};
|
|
172
|
+
validation.warning && logger.warn(validation.warning), packageDir = resolved.absolute, packageYmlPath = resolved.packageYmlPath, displayPath = formatCustomPathForDisplay(resolved, cwd), isCustomPath = !0, logger.info(`Creating package '${normalizedName}' at custom path: ${packageDir}`);
|
|
173
|
+
} else if (scope)
|
|
174
|
+
packageDir = getScopePackageDir(cwd, scope, scope === "root" ? void 0 : normalizedName), packageYmlPath = getScopePackageYmlPath(cwd, scope, scope === "root" ? void 0 : normalizedName), displayPath = getScopeDisplayPath(scope, scope === "root" ? void 0 : normalizedName), logger.info(`Creating ${scope} package '${normalizedName}' at: ${packageDir}`);
|
|
175
|
+
else
|
|
176
|
+
return {
|
|
177
|
+
success: !1,
|
|
178
|
+
error: "Either scope or customPath must be provided"
|
|
179
|
+
};
|
|
180
|
+
let existingYml = await exists(packageYmlPath), existingConfig = null;
|
|
181
|
+
if (existingYml) {
|
|
182
|
+
try {
|
|
183
|
+
existingConfig = await parsePackageYml(packageYmlPath);
|
|
184
|
+
} catch (error) {
|
|
185
|
+
logger.warn(`Failed to parse existing openpackage.yml: ${error}`);
|
|
186
|
+
}
|
|
187
|
+
if (!force)
|
|
188
|
+
return {
|
|
189
|
+
success: !1,
|
|
190
|
+
error: existingConfig ? `Package '${normalizedName}' already exists at ${displayPath}. Use --force to overwrite.` : `Package already exists at ${displayPath}. Use --force to overwrite.`,
|
|
191
|
+
wasExisting: !0
|
|
192
|
+
};
|
|
193
|
+
logger.info(`Overwriting existing package at ${displayPath} (--force enabled)`);
|
|
194
|
+
}
|
|
195
|
+
let packageConfig = {
|
|
196
|
+
name: normalizedName
|
|
197
|
+
};
|
|
198
|
+
return await ensureDir(packageDir), logger.debug(`Created package directory: ${packageDir}`), await writePackageYml(packageYmlPath, packageConfig), logger.info(`Created openpackage.yml at ${packageYmlPath}`), displayPackageConfig(packageConfig, packageYmlPath, !1), isCustomPath ? out.message(` Location: Custom path (${displayPath})`) : scope && out.message(` Scope: ${getScopeDescription(scope)}`), {
|
|
199
|
+
success: !0,
|
|
200
|
+
context: {
|
|
201
|
+
name: normalizedName,
|
|
202
|
+
version: packageConfig.version,
|
|
203
|
+
config: packageConfig,
|
|
204
|
+
packageYmlPath,
|
|
205
|
+
packageRootDir: packageDir,
|
|
206
|
+
packageFilesDir: packageDir,
|
|
207
|
+
location: isCustomPath || scope && scope === "root" ? "root" : "nested",
|
|
208
|
+
isCwdPackage: !isCustomPath && scope === "root",
|
|
209
|
+
isNew: !existingYml
|
|
210
|
+
},
|
|
211
|
+
wasExisting: existingYml
|
|
212
|
+
};
|
|
213
|
+
} catch (error) {
|
|
214
|
+
let errorMessage = error instanceof Error ? error.message : String(error);
|
|
215
|
+
return logger.error("Failed to create package", { error: errorMessage, scope, packageName }), {
|
|
216
|
+
success: !1,
|
|
217
|
+
error: `Failed to create package: ${errorMessage}`
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// src/commands/new.ts
|
|
223
|
+
async function setupNewCommand(args) {
|
|
224
|
+
let [packageName, options] = args, cwd = process.cwd(), ctx = await createCliExecutionContext({
|
|
225
|
+
outputMode: packageName ? "plain" : "rich"
|
|
226
|
+
}), out = resolveOutput(ctx), prm = resolvePrompt(ctx), scope, customPath;
|
|
227
|
+
if (options?.path)
|
|
228
|
+
customPath = options.path, options?.scope && logger.warn("--scope is ignored when --path is specified");
|
|
229
|
+
else if (options?.scope)
|
|
230
|
+
try {
|
|
231
|
+
scope = parseScope(options.scope);
|
|
232
|
+
} catch (error) {
|
|
233
|
+
throw new Error(error instanceof Error ? error.message : String(error));
|
|
234
|
+
}
|
|
235
|
+
else
|
|
236
|
+
scope = "global";
|
|
237
|
+
packageName || (packageName = await prm.text("Enter package name:", {
|
|
238
|
+
placeholder: "my-package",
|
|
239
|
+
validate: (value) => !value || value.trim().length === 0 ? "Package name is required" : /^[a-z0-9]([a-z0-9._-]*[a-z0-9])?$/.test(value.trim()) ? !0 : "Package name must be lowercase alphanumeric, can contain dots, hyphens, underscores"
|
|
240
|
+
})), logger.debug("Creating new package", {
|
|
241
|
+
scope,
|
|
242
|
+
customPath,
|
|
243
|
+
packageName,
|
|
244
|
+
force: options?.force
|
|
245
|
+
});
|
|
246
|
+
let result = await createPackage({
|
|
247
|
+
cwd,
|
|
248
|
+
scope,
|
|
249
|
+
customPath,
|
|
250
|
+
packageName,
|
|
251
|
+
force: options?.force || !1
|
|
252
|
+
}, out);
|
|
253
|
+
if (!result.success)
|
|
254
|
+
throw new Error(result.error || "Package creation failed");
|
|
255
|
+
let actualPackageName = result.context?.name || packageName;
|
|
256
|
+
customPath ? out.note(
|
|
257
|
+
`1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}
|
|
258
|
+
2. Install to workspace: opkg install ${customPath}`,
|
|
259
|
+
"Next steps"
|
|
260
|
+
) : scope === "project" ? out.note(
|
|
261
|
+
`1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}
|
|
262
|
+
2. Install to this workspace: opkg install ${actualPackageName}`,
|
|
263
|
+
"Next steps"
|
|
264
|
+
) : scope === "global" ? out.note(
|
|
265
|
+
`1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}
|
|
266
|
+
2. Install to any workspace: opkg install ${actualPackageName}`,
|
|
267
|
+
"Next steps"
|
|
268
|
+
) : scope === "root" && out.note(
|
|
269
|
+
`1. Add files to your package: opkg add <file-or-dir>
|
|
270
|
+
2. Install to other workspaces: opkg install ${actualPackageName}`,
|
|
271
|
+
"Next steps"
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
export {
|
|
275
|
+
setupNewCommand
|
|
276
|
+
};
|
|
277
|
+
//# sourceMappingURL=new-OPCCLNL2.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../core/src/core/package-creation.ts", "../../core/src/utils/custom-path-resolution.ts", "../src/commands/new.ts"],
|
|
4
|
+
"sourcesContent": ["import { basename } from 'path';\nimport type { PackageYml } from '../types/index.js';\nimport type { PackageScope } from './scope-resolution.js';\nimport {\n getScopePackageDir,\n getScopePackageYmlPath,\n getScopeDisplayPath,\n getScopeDescription\n} from './scope-resolution.js';\nimport {\n resolveCustomPath,\n validateCustomPath,\n formatCustomPathForDisplay\n} from '../utils/custom-path-resolution.js';\nimport { parsePackageYml, writePackageYml } from '../utils/package-yml.js';\nimport { logger } from '../utils/logger.js';\nimport { displayPackageConfig } from '../utils/formatters.js';\nimport { exists, ensureDir } from '../utils/fs.js';\nimport { normalizePackageName, validatePackageName } from '../utils/package-name.js';\nimport type { PackageContext } from './package-context.js';\nimport type { OutputPort } from './ports/output.js';\nimport { resolveOutput } from './ports/resolve.js';\n\n/**\n * Options for creating a new package\n */\nexport interface CreatePackageOptions {\n /** Current working directory */\n cwd: string;\n\n /** Package scope (root, project, or global) - optional when customPath is provided */\n scope?: PackageScope;\n\n /** Custom directory path for package - overrides scope-based resolution */\n customPath?: string;\n\n /** Package name (optional for root scope, required for project/global) */\n packageName?: string;\n\n /** Force overwrite existing package */\n force?: boolean;\n}\n\n/**\n * Result of package creation\n */\nexport interface CreatePackageResult {\n /** Whether the operation was successful */\n success: boolean;\n\n /** Package context if successful */\n context?: PackageContext;\n\n /** Error message if unsuccessful */\n error?: string;\n\n /** Whether the package already existed (and was kept/overwritten) */\n wasExisting?: boolean;\n}\n\n/**\n * Create a new package with the specified scope and options\n * \n * This is the core package creation logic that handles:\n * - Validation of package name and scope\n * - Conflict detection with existing packages\n * - Directory structure creation\n * - openpackage.yml writing\n * \n * @param options - Package creation options\n * @returns Result containing success status and package context\n */\nexport async function createPackage(\n options: CreatePackageOptions,\n output?: OutputPort\n): Promise<CreatePackageResult> {\n const out = output ?? resolveOutput();\n const {\n cwd,\n scope,\n customPath,\n packageName,\n force = false\n } = options;\n\n try {\n // Validate that either scope or customPath is provided\n if (!scope && !customPath) {\n return {\n success: false,\n error: 'Either scope or customPath must be provided'\n };\n }\n\n // Step 1: Determine initial package name\n let normalizedName: string;\n let displayName: string;\n\n if (!packageName) {\n // No name provided - package name is required for non-root scopes\n if (scope && scope !== 'root' && !customPath) {\n return {\n success: false,\n error: `Package name is required for ${scope} scope.\\nUsage: opkg new <package-name> --scope ${scope}`\n };\n }\n // Use cwd basename as default for root scope\n displayName = basename(cwd);\n normalizedName = normalizePackageName(displayName);\n } else {\n // Package name provided\n validatePackageName(packageName);\n normalizedName = normalizePackageName(packageName);\n displayName = packageName;\n }\n\n // Step 2: Resolve target paths\n let packageDir: string;\n let packageYmlPath: string;\n let displayPath: string;\n let isCustomPath = false;\n\n if (customPath) {\n // Custom path provided - resolve and validate\n const resolved = resolveCustomPath(customPath, cwd);\n \n // Validate custom path\n const validation = await validateCustomPath(resolved, force);\n if (!validation.valid) {\n return {\n success: false,\n error: validation.error\n };\n }\n \n // Log warning if present\n if (validation.warning) {\n logger.warn(validation.warning);\n }\n \n packageDir = resolved.absolute;\n packageYmlPath = resolved.packageYmlPath;\n displayPath = formatCustomPathForDisplay(resolved, cwd);\n isCustomPath = true;\n \n logger.info(`Creating package '${normalizedName}' at custom path: ${packageDir}`);\n } else if (scope) {\n // Scope-based path resolution (existing logic)\n packageDir = getScopePackageDir(cwd, scope, scope === 'root' ? undefined : normalizedName);\n packageYmlPath = getScopePackageYmlPath(cwd, scope, scope === 'root' ? undefined : normalizedName);\n displayPath = getScopeDisplayPath(scope, scope === 'root' ? undefined : normalizedName);\n \n logger.info(`Creating ${scope} package '${normalizedName}' at: ${packageDir}`);\n } else {\n return {\n success: false,\n error: 'Either scope or customPath must be provided'\n };\n }\n\n // Step 3: Check for existing package\n const existingYml = await exists(packageYmlPath);\n let existingConfig: PackageYml | null = null;\n\n if (existingYml) {\n try {\n existingConfig = await parsePackageYml(packageYmlPath);\n } catch (error) {\n logger.warn(`Failed to parse existing openpackage.yml: ${error}`);\n }\n\n if (!force) {\n const errorMsg = existingConfig \n ? `Package '${normalizedName}' already exists at ${displayPath}. Use --force to overwrite.`\n : `Package already exists at ${displayPath}. Use --force to overwrite.`;\n \n return {\n success: false,\n error: errorMsg,\n wasExisting: true\n };\n }\n\n logger.info(`Overwriting existing package at ${displayPath} (--force enabled)`);\n }\n\n // Step 4: Create package config (minimal manifest)\n const packageConfig: PackageYml = {\n name: normalizedName\n };\n\n // Step 5: Ensure directory structure\n await ensureDir(packageDir);\n logger.debug(`Created package directory: ${packageDir}`);\n\n // Step 6: Write openpackage.yml\n await writePackageYml(packageYmlPath, packageConfig);\n logger.info(`Created openpackage.yml at ${packageYmlPath}`);\n\n // Step 7: Display success message\n displayPackageConfig(packageConfig, packageYmlPath, false);\n\n // Step 8: Show scope info\n if (isCustomPath) {\n out.message(` Location: Custom path (${displayPath})`);\n } else if (scope) {\n out.message(` Scope: ${getScopeDescription(scope)}`);\n }\n\n // Step 9: Return success with context\n return {\n success: true,\n context: {\n name: normalizedName,\n version: packageConfig.version,\n config: packageConfig,\n packageYmlPath,\n packageRootDir: packageDir,\n packageFilesDir: packageDir,\n location: (isCustomPath || (scope && scope === 'root')) ? 'root' : 'nested',\n isCwdPackage: !isCustomPath && scope === 'root',\n isNew: !existingYml\n },\n wasExisting: existingYml\n };\n\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n logger.error(`Failed to create package`, { error: errorMessage, scope, packageName });\n\n return {\n success: false,\n error: `Failed to create package: ${errorMessage}`\n };\n }\n}\n", "import { resolve, isAbsolute, dirname, join } from 'path';\nimport { exists, isDirectory } from './fs.js';\nimport { expandTildePath } from './path-resolution.js';\n\n/**\n * Utilities for custom path resolution and validation\n * \n * Handles user-specified custom paths for package creation,\n * including validation, normalization, and error reporting.\n */\n\n/**\n * Result of custom path resolution\n */\nexport interface ResolvedCustomPath {\n /** The original path as provided by the user */\n original: string;\n \n /** The resolved absolute path */\n absolute: string;\n \n /** The parent directory of the resolved path */\n parentDir: string;\n \n /** Path to openpackage.yml that will be created */\n packageYmlPath: string;\n}\n\n/**\n * Validation result for custom path\n */\nexport interface CustomPathValidation {\n /** Whether the path is valid */\n valid: boolean;\n \n /** Error message if invalid */\n error?: string;\n \n /** Warning message (path is valid but has concerns) */\n warning?: string;\n}\n\n/**\n * Resolve a custom path to an absolute path\n * \n * Handles:\n * - Relative paths (resolved from cwd)\n * - Absolute paths (used as-is)\n * - Tilde paths (expanded to home directory)\n * \n * @param customPath - The custom path provided by user\n * @param cwd - Current working directory for relative path resolution\n * @returns Resolved path information\n */\nexport function resolveCustomPath(\n customPath: string,\n cwd: string\n): ResolvedCustomPath {\n // Expand tilde if present\n const expandedPath = customPath.startsWith('~')\n ? expandTildePath(customPath)\n : customPath;\n \n // Resolve to absolute path\n const absolutePath = isAbsolute(expandedPath)\n ? resolve(expandedPath)\n : resolve(cwd, expandedPath);\n \n return {\n original: customPath,\n absolute: absolutePath,\n parentDir: dirname(absolutePath),\n packageYmlPath: join(absolutePath, 'openpackage.yml')\n };\n}\n\n/**\n * Validate a custom path for package creation\n * \n * Checks:\n * - Path is not empty\n * - Parent directory exists or can be created\n * - Path doesn't conflict with critical system paths\n * - Path has reasonable structure\n * \n * @param resolved - Resolved custom path information\n * @param force - Whether --force flag is set\n * @returns Validation result\n */\nexport async function validateCustomPath(\n resolved: ResolvedCustomPath,\n force: boolean = false\n): Promise<CustomPathValidation> {\n const { original, absolute, parentDir, packageYmlPath } = resolved;\n \n // Check for empty path\n if (!original || original.trim() === '') {\n return {\n valid: false,\n error: 'Path cannot be empty'\n };\n }\n \n // Check for dangerous paths\n const dangerousPathCheck = checkDangerousPath(absolute);\n if (!dangerousPathCheck.valid) {\n return dangerousPathCheck;\n }\n \n // Check if parent directory exists\n const parentExists = await exists(parentDir);\n if (!parentExists) {\n return {\n valid: false,\n error: `Parent directory does not exist: ${parentDir}\\n` +\n `Please create it first or choose a different path.`\n };\n }\n \n // Check if parent is actually a directory\n const parentIsDir = await isDirectory(parentDir);\n if (!parentIsDir) {\n return {\n valid: false,\n error: `Parent path exists but is not a directory: ${parentDir}`\n };\n }\n \n // Check if package directory already exists\n const targetExists = await exists(absolute);\n if (targetExists) {\n const targetIsDir = await isDirectory(absolute);\n if (!targetIsDir) {\n return {\n valid: false,\n error: `Path exists but is not a directory: ${absolute}`\n };\n }\n \n // Check if openpackage.yml already exists\n const ymlExists = await exists(packageYmlPath);\n if (ymlExists && !force) {\n return {\n valid: false,\n error: `Package already exists at: ${absolute}\\n` +\n `Use --force to overwrite.`\n };\n }\n \n // Directory exists, will be used or overwritten\n if (ymlExists && force) {\n return {\n valid: true,\n warning: `Overwriting existing package at: ${absolute}`\n };\n }\n }\n \n return { valid: true };\n}\n\n/**\n * Check if a path is dangerous or conflicts with critical system paths\n * \n * @param absolutePath - The absolute path to check\n * @returns Validation result\n */\nfunction checkDangerousPath(absolutePath: string): CustomPathValidation {\n const normalizedPath = absolutePath.toLowerCase();\n \n // Don't allow root directory\n if (absolutePath === '/' || /^[A-Z]:\\\\?$/.test(absolutePath)) {\n return {\n valid: false,\n error: 'Cannot create package in root directory'\n };\n }\n \n // Don't allow critical system directories\n // Note: We allow temp directories like /tmp and /var/folders (macOS temp)\n const dangerousPaths = [\n '/bin', '/sbin', '/usr', '/etc', '/sys', '/proc', '/dev',\n '/boot', '/lib', '/lib64', '/opt', '/root', '/srv',\n 'c:\\\\windows', 'c:\\\\program files', 'c:\\\\program files (x86)'\n ];\n \n for (const dangerous of dangerousPaths) {\n if (normalizedPath === dangerous || normalizedPath.startsWith(dangerous + '/')) {\n // Exception: Allow macOS temp directories in /var/folders\n if (dangerous === '/var' && normalizedPath.includes('/var/folders/')) {\n continue;\n }\n \n return {\n valid: false,\n error: `Cannot create package in system directory: ${absolutePath}`\n };\n }\n }\n \n return { valid: true };\n}\n\n/**\n * Format a custom path for display to the user\n * \n * Shows relative path if it's shorter and clearer,\n * otherwise shows absolute path with tilde expansion for home directory.\n * \n * @param resolved - Resolved custom path information\n * @param cwd - Current working directory for relative path display\n * @returns Formatted path for display\n */\nexport function formatCustomPathForDisplay(\n resolved: ResolvedCustomPath,\n cwd: string\n): string {\n const { original, absolute } = resolved;\n \n // If original was relative or tilde, prefer showing that\n if (!isAbsolute(original)) {\n return original;\n }\n \n // Otherwise show absolute with potential tilde\n return absolute;\n}\n", "import { createPackage } from '@opkg/core/core/package-creation.js';\nimport { parseScope, type PackageScope } from '@opkg/core/core/scope-resolution.js';\nimport { logger } from '@opkg/core/utils/logger.js';\nimport { createCliExecutionContext } from '../cli/context.js';\nimport { resolveOutput, resolvePrompt } from '@opkg/core/core/ports/resolve.js';\n\n/**\n * Command options for 'opkg new'\n */\ninterface NewCommandOptions {\n scope?: string;\n path?: string;\n force?: boolean;\n}\n\n/**\n * Setup the 'opkg new' command\n * \n * This command creates a new package with scope support:\n * - root: Create openpackage.yml in current directory\n * - project: Create in .openpackage/packages/<name>/\n * - global: Create in ~/.openpackage/packages/<name>/ (default)\n * - custom: Create at a user-specified path\n * \n * Creates a minimal package with only the name field set.\n * Use 'opkg set' to configure additional metadata (description, keywords, etc.)\n */\nexport async function setupNewCommand(args: any[]): Promise<void> {\n let [packageName, options] = args as [string | undefined, NewCommandOptions | undefined];\n const cwd = process.cwd();\n const ctx = await createCliExecutionContext({\n outputMode: !packageName ? 'rich' : 'plain',\n });\n const out = resolveOutput(ctx);\n const prm = resolvePrompt(ctx);\n\n // Parse and validate scope or custom path\n let scope: PackageScope | undefined;\n let customPath: string | undefined;\n \n if (options?.path) {\n // Custom path explicitly provided via flag\n customPath = options.path;\n \n // Warn if --scope is also provided\n if (options?.scope) {\n logger.warn('--scope is ignored when --path is specified');\n }\n } else if (options?.scope) {\n // Scope explicitly provided via flag\n try {\n scope = parseScope(options.scope);\n } catch (error) {\n throw new Error(error instanceof Error ? error.message : String(error));\n }\n } else {\n // No scope or path provided: default to global\n scope = 'global';\n }\n\n // Prompt for package name if not provided\n if (!packageName) {\n packageName = await prm.text('Enter package name:', {\n placeholder: 'my-package',\n validate: (value: string) => {\n if (!value || value.trim().length === 0) return 'Package name is required';\n if (!/^[a-z0-9]([a-z0-9._-]*[a-z0-9])?$/.test(value.trim())) {\n return 'Package name must be lowercase alphanumeric, can contain dots, hyphens, underscores';\n }\n return true;\n }\n });\n }\n\n logger.debug('Creating new package', {\n scope,\n customPath,\n packageName,\n force: options?.force\n });\n\n // Create the package\n const result = await createPackage({\n cwd,\n scope,\n customPath,\n packageName,\n force: options?.force || false\n }, out);\n\n if (!result.success) {\n throw new Error(result.error || 'Package creation failed');\n }\n\n // Get the actual package name from the result context\n const actualPackageName = result.context?.name || packageName;\n\n // Additional success messaging based on scope or custom path\n if (customPath) {\n out.note(\n `1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}\\n` +\n `2. Install to workspace: opkg install ${customPath}`,\n 'Next steps'\n );\n } else if (scope === 'project') {\n out.note(\n `1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}\\n` +\n `2. Install to this workspace: opkg install ${actualPackageName}`,\n 'Next steps'\n );\n } else if (scope === 'global') {\n out.note(\n `1. Add files to your package: opkg add <file-or-dir> --to ${actualPackageName}\\n` +\n `2. Install to any workspace: opkg install ${actualPackageName}`,\n 'Next steps'\n );\n } else if (scope === 'root') {\n out.note(\n `1. Add files to your package: opkg add <file-or-dir>\\n` +\n `2. Install to other workspaces: opkg install ${actualPackageName}`,\n 'Next steps'\n );\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;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./chunk-YMKK4XPN.js";
|
|
6
|
+
import "./chunk-IHVZ5AUJ.js";
|
|
7
|
+
import "./chunk-S47F4OG4.js";
|
|
8
|
+
import "./chunk-ID4SVDQZ.js";
|
|
9
|
+
import {
|
|
10
|
+
logger
|
|
11
|
+
} from "./chunk-5EFWGD33.js";
|
|
12
|
+
|
|
13
|
+
// ../core/src/core/install/package-marker-detector.ts
|
|
14
|
+
import { minimatch } from "minimatch";
|
|
15
|
+
function detectPlatformMarkers(files, targetDir) {
|
|
16
|
+
let matches = [], platforms = getPlatformDefinitions(targetDir), filePaths = new Set(files.map((f) => f.path));
|
|
17
|
+
for (let [platformId, definition] of Object.entries(platforms)) {
|
|
18
|
+
let detectionPatterns = definition.detection;
|
|
19
|
+
if (!(!detectionPatterns || detectionPatterns.length === 0))
|
|
20
|
+
for (let pattern of detectionPatterns)
|
|
21
|
+
matchDetectionPattern(filePaths, pattern) && matches.push({
|
|
22
|
+
platformId,
|
|
23
|
+
matchedPattern: pattern,
|
|
24
|
+
confidence: 1
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
let hasOpenPackageYml = filePaths.has("openpackage.yml"), hasPackageYml = filePaths.has("package.yml");
|
|
28
|
+
return {
|
|
29
|
+
matches,
|
|
30
|
+
hasOpenPackageYml,
|
|
31
|
+
hasPackageYml
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function matchDetectionPattern(filePaths, pattern) {
|
|
35
|
+
if (filePaths.has(pattern))
|
|
36
|
+
return !0;
|
|
37
|
+
if (pattern.includes("*") || pattern.includes("?") || pattern.includes("[")) {
|
|
38
|
+
for (let filePath of filePaths)
|
|
39
|
+
if (matchGlob(filePath, pattern))
|
|
40
|
+
return !0;
|
|
41
|
+
return !1;
|
|
42
|
+
}
|
|
43
|
+
for (let filePath of filePaths)
|
|
44
|
+
if (filePath === pattern || filePath.startsWith(pattern + "/"))
|
|
45
|
+
return !0;
|
|
46
|
+
return !1;
|
|
47
|
+
}
|
|
48
|
+
function matchGlob(filePath, pattern) {
|
|
49
|
+
try {
|
|
50
|
+
return minimatch(filePath, pattern);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
return logger.warn(`Invalid glob pattern: ${pattern}`, error), !1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function hasOpenPackageMarker(files) {
|
|
56
|
+
return files.some((f) => f.path === "openpackage.yml" || f.path === "package.yml");
|
|
57
|
+
}
|
|
58
|
+
function getPrimaryPlatformFromMarkers(markers) {
|
|
59
|
+
let { matches, hasOpenPackageYml, hasPackageYml } = markers;
|
|
60
|
+
return matches.length === 0 ? null : matches.length === 1 ? matches[0].platformId : matches.find((m) => m.platformId === "claude-plugin") ? "claude-plugin" : [...matches].sort(
|
|
61
|
+
(a, b) => b.matchedPattern.length - a.matchedPattern.length
|
|
62
|
+
)[0].platformId;
|
|
63
|
+
}
|
|
64
|
+
function isPurePlatformSpecific(markers) {
|
|
65
|
+
let { matches, hasOpenPackageYml, hasPackageYml } = markers;
|
|
66
|
+
return !(matches.length !== 1 || hasOpenPackageYml || hasPackageYml);
|
|
67
|
+
}
|
|
68
|
+
function isMixedFormat(markers) {
|
|
69
|
+
let { matches, hasOpenPackageYml, hasPackageYml } = markers;
|
|
70
|
+
return !!(matches.length > 1 || matches.length > 0 && (hasOpenPackageYml || hasPackageYml));
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
detectPlatformMarkers,
|
|
74
|
+
getPrimaryPlatformFromMarkers,
|
|
75
|
+
hasOpenPackageMarker,
|
|
76
|
+
isMixedFormat,
|
|
77
|
+
isPurePlatformSpecific,
|
|
78
|
+
matchDetectionPattern
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=package-marker-detector-T5O5YD2E.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../core/src/core/install/package-marker-detector.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Package Marker Detector Module\n * \n * Detects package-level format markers using patterns from platforms.jsonc.\n * This is the \"fast path\" for package format detection.\n * \n * All platform IDs and detection patterns are data-driven from platforms.jsonc -\n * no hardcoded platform checks.\n */\n\nimport { minimatch } from 'minimatch';\nimport { logger } from '../../utils/logger.js';\nimport { getPlatformDefinitions } from '../platforms.js';\nimport type { PackageFile, PlatformId } from './detection-types.js';\n\n/**\n * A matched platform marker\n */\nexport interface MarkerMatch {\n /** Platform ID from platforms.jsonc (e.g., 'claude', 'cursor', 'opencode') */\n platformId: PlatformId;\n \n /** Detection pattern that matched (e.g., '.claude-plugin/plugin.json') */\n matchedPattern: string;\n \n /** Confidence (1.0 for explicit markers) */\n confidence: number;\n}\n\n/**\n * Package marker detection result\n */\nexport interface PackageMarkers {\n /** All matched platform markers */\n matches: MarkerMatch[];\n \n /** Whether openpackage.yml exists (universal format indicator) */\n hasOpenPackageYml: boolean;\n \n /** Whether package.yml exists (legacy universal format) */\n hasPackageYml: boolean;\n}\n\n/**\n * Detect platform markers in a package using patterns from platforms.jsonc\n * \n * This is a data-driven approach - all platform IDs and detection patterns\n * come from the platform registry, with no hardcoded platform checks.\n * \n * @param files - List of package files\n * @param targetDir - Optional target directory for local platform config\n * @returns Detection results with all matched platforms\n */\nexport function detectPlatformMarkers(\n files: PackageFile[],\n targetDir?: string\n): PackageMarkers {\n const matches: MarkerMatch[] = [];\n const platforms = getPlatformDefinitions(targetDir);\n \n // Extract file paths for efficient matching\n const filePaths = new Set(files.map(f => f.path));\n \n // Check each platform's detection patterns\n for (const [platformId, definition] of Object.entries(platforms)) {\n const detectionPatterns = definition.detection;\n \n if (!detectionPatterns || detectionPatterns.length === 0) {\n continue;\n }\n \n // Check each detection pattern for this platform\n for (const pattern of detectionPatterns) {\n if (matchDetectionPattern(filePaths, pattern)) {\n matches.push({\n platformId,\n matchedPattern: pattern,\n confidence: 1.0\n });\n }\n }\n }\n \n // Check for universal format markers\n const hasOpenPackageYml = filePaths.has('openpackage.yml');\n const hasPackageYml = filePaths.has('package.yml');\n \n return {\n matches,\n hasOpenPackageYml,\n hasPackageYml\n };\n}\n\n/**\n * Check if a detection pattern matches any file in the package\n * \n * Handles both exact file paths and glob patterns.\n * \n * @param filePaths - Set of file paths in package\n * @param pattern - Detection pattern (e.g., '.claude', '*.json', 'AGENTS.md')\n * @returns True if pattern matches at least one file\n */\nexport function matchDetectionPattern(\n filePaths: Set<string>,\n pattern: string\n): boolean {\n // Try exact match first (optimization for non-glob patterns)\n if (filePaths.has(pattern)) {\n return true;\n }\n \n // Check if pattern contains glob characters\n const isGlob = pattern.includes('*') || pattern.includes('?') || pattern.includes('[');\n \n if (isGlob) {\n // Use glob matching\n for (const filePath of filePaths) {\n if (matchGlob(filePath, pattern)) {\n return true;\n }\n }\n return false;\n }\n \n // For non-glob patterns, check if any file starts with this path\n // This handles directory markers like '.claude' matching '.claude/agents/foo.md'\n for (const filePath of filePaths) {\n if (filePath === pattern || filePath.startsWith(pattern + '/')) {\n return true;\n }\n }\n \n return false;\n}\n\n/**\n * Match a file path against a glob pattern\n */\nfunction matchGlob(filePath: string, pattern: string): boolean {\n try {\n return minimatch(filePath, pattern);\n } catch (error) {\n logger.warn(`Invalid glob pattern: ${pattern}`, error);\n return false;\n }\n}\n\n/**\n * Check if openpackage.yml or package.yml exists\n * \n * These files indicate universal format but don't prevent per-file detection\n * (the package may still contain mixed platform-specific content).\n */\nexport function hasOpenPackageMarker(files: PackageFile[]): boolean {\n return files.some(f => f.path === 'openpackage.yml' || f.path === 'package.yml');\n}\n\n/**\n * Get primary platform from marker matches\n * \n * Determines the primary platform when multiple markers are found.\n * Uses priority ordering to resolve ambiguity.\n * \n * @param markers - Package marker detection results\n * @returns Primary platform ID, or null if none/ambiguous\n */\nexport function getPrimaryPlatformFromMarkers(\n markers: PackageMarkers\n): PlatformId | null {\n const { matches, hasOpenPackageYml, hasPackageYml } = markers;\n \n // No matches\n if (matches.length === 0) {\n return null;\n }\n \n // Single match - return that platform\n if (matches.length === 1) {\n return matches[0].platformId;\n }\n \n // Multiple matches - use priority\n // Priority order (highest to lowest):\n // 1. claude-plugin (explicit plugin manifest)\n // 2. Other platforms by detection pattern specificity\n \n // Check for claude-plugin first\n const claudePluginMatch = matches.find(m => m.platformId === 'claude-plugin');\n if (claudePluginMatch) {\n return 'claude-plugin';\n }\n \n // For other platforms, prefer more specific patterns (longer paths)\n const sorted = [...matches].sort((a, b) => \n b.matchedPattern.length - a.matchedPattern.length\n );\n \n return sorted[0].platformId;\n}\n\n/**\n * Check if markers indicate a pure platform-specific package\n * \n * A pure platform-specific package has:\n * - Exactly one platform marker\n * - No universal format marker (openpackage.yml)\n * \n * @param markers - Package marker detection results\n * @returns True if package is pure platform-specific\n */\nexport function isPurePlatformSpecific(markers: PackageMarkers): boolean {\n const { matches, hasOpenPackageYml, hasPackageYml } = markers;\n \n // Must have exactly one platform match\n if (matches.length !== 1) {\n return false;\n }\n \n // Must not have universal markers\n if (hasOpenPackageYml || hasPackageYml) {\n return false;\n }\n \n return true;\n}\n\n/**\n * Check if markers indicate a mixed format package\n * \n * A mixed format package has either:\n * - Multiple platform markers\n * - Both platform and universal markers\n * \n * @param markers - Package marker detection results\n * @returns True if package has mixed format indicators\n */\nexport function isMixedFormat(markers: PackageMarkers): boolean {\n const { matches, hasOpenPackageYml, hasPackageYml } = markers;\n \n // Multiple platform markers\n if (matches.length > 1) {\n return true;\n }\n \n // Platform marker + universal marker\n if (matches.length > 0 && (hasOpenPackageYml || hasPackageYml)) {\n return true;\n }\n \n return false;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAUA,SAAS,iBAAiB;AA2CnB,SAAS,sBACd,OACA,WACgB;AAChB,MAAM,UAAyB,CAAC,GAC1B,YAAY,uBAAuB,SAAS,GAG5C,YAAY,IAAI,IAAI,MAAM,IAAI,OAAK,EAAE,IAAI,CAAC;AAGhD,WAAW,CAAC,YAAY,UAAU,KAAK,OAAO,QAAQ,SAAS,GAAG;AAChE,QAAM,oBAAoB,WAAW;A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,CAAC,EAAE;AACnB;AAYO,SAAS,uBAAuB,SAAkC;AACvE,MAAM,EAAE,SAAS,mBAAmB,cAAc,IAAI;AAQtD,SALI,UAAQ,WAAW,KAKnB,qBAAqB;AAK3B;AAYO,SAAS,cAAc,SAAkC;AAC9D,MAAM,EAAE,SAAS,mBAAmB,cAAc,IAAI;AAQtD,SALI,WAAQ,SAAS,KAKjB,QAAQ,SAAS,MAAM,qBAAqB;AAKlD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
parsePackageYml,
|
|
4
|
+
serializePackageYml,
|
|
5
|
+
writePackageYml
|
|
6
|
+
} from "./chunk-427DCURL.js";
|
|
7
|
+
import "./chunk-VN22A7NW.js";
|
|
8
|
+
import "./chunk-S47F4OG4.js";
|
|
9
|
+
import "./chunk-ID4SVDQZ.js";
|
|
10
|
+
import "./chunk-5EFWGD33.js";
|
|
11
|
+
export {
|
|
12
|
+
parsePackageYml,
|
|
13
|
+
serializePackageYml,
|
|
14
|
+
writePackageYml
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=package-yml-QWZIJDYU.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
deriveNamespaceSlug,
|
|
4
|
+
detectOldGitHubNaming,
|
|
5
|
+
detectOldPluginNaming,
|
|
6
|
+
generateGitHubPackageName,
|
|
7
|
+
generateMarketplaceName,
|
|
8
|
+
generatePluginName,
|
|
9
|
+
isGitHubPluginName,
|
|
10
|
+
isScopedPluginName,
|
|
11
|
+
parseScopedPluginName,
|
|
12
|
+
splitPackageNameForTelemetry
|
|
13
|
+
} from "./chunk-WNRXZLWW.js";
|
|
14
|
+
import "./chunk-IHVZ5AUJ.js";
|
|
15
|
+
import "./chunk-ID4SVDQZ.js";
|
|
16
|
+
import "./chunk-5EFWGD33.js";
|
|
17
|
+
export {
|
|
18
|
+
deriveNamespaceSlug,
|
|
19
|
+
detectOldGitHubNaming,
|
|
20
|
+
detectOldPluginNaming,
|
|
21
|
+
generateGitHubPackageName,
|
|
22
|
+
generateMarketplaceName,
|
|
23
|
+
generatePluginName,
|
|
24
|
+
isGitHubPluginName,
|
|
25
|
+
isScopedPluginName,
|
|
26
|
+
parseScopedPluginName,
|
|
27
|
+
splitPackageNameForTelemetry
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=plugin-naming-YP2I4NPA.js.map
|