@visulima/vis 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/dist/bin.js +1 -1
- package/dist/binx.js +2 -2
- package/dist/config/index.d.ts +1817 -1811
- package/dist/generate/index.d.ts +39 -39
- package/dist/packem_chunks/CONFIG_FILES.js +5 -5
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/cache-attestation.js +1 -1
- package/dist/packem_chunks/catalog.js +63 -61
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +133 -130
- package/dist/packem_chunks/detect.js +3 -3
- package/dist/packem_chunks/detect2.js +4 -4
- package/dist/packem_chunks/dispatch.js +3 -3
- package/dist/packem_chunks/extra-files.js +3 -3
- package/dist/packem_chunks/fix.js +8 -8
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +5 -5
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +6 -6
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +2 -2
- package/dist/packem_chunks/handler21.js +2 -2
- package/dist/packem_chunks/handler22.js +10 -10
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +5 -5
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +3 -3
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +2 -3
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler31.js +2 -2
- package/dist/packem_chunks/handler35.js +3 -3
- package/dist/packem_chunks/handler4.js +3 -3
- package/dist/packem_chunks/handler40.js +10 -10
- package/dist/packem_chunks/handler42.js +3 -3
- package/dist/packem_chunks/handler43.js +3 -3
- package/dist/packem_chunks/handler5.js +5 -5
- package/dist/packem_chunks/handler50.js +2 -2
- package/dist/packem_chunks/handler51.js +13 -13
- package/dist/packem_chunks/handler52.js +3 -3
- package/dist/packem_chunks/handler53.js +1 -1
- package/dist/packem_chunks/handler54.js +2 -2
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler57.js +5 -5
- package/dist/packem_chunks/handler58.js +4 -4
- package/dist/packem_chunks/handler59.js +8 -8
- package/dist/packem_chunks/handler6.js +6 -6
- package/dist/packem_chunks/handler60.js +2 -2
- package/dist/packem_chunks/handler61.js +13 -13
- package/dist/packem_chunks/handler62.js +3 -3
- package/dist/packem_chunks/handler63.js +3 -3
- package/dist/packem_chunks/handler64.js +4 -4
- package/dist/packem_chunks/handler65.js +6 -6
- package/dist/packem_chunks/handler66.js +2 -2
- package/dist/packem_chunks/handler67.js +16 -16
- package/dist/packem_chunks/handler68.js +7 -7
- package/dist/packem_chunks/handler69.js +25 -25
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +6 -6
- package/dist/packem_chunks/handler71.js +14 -14
- package/dist/packem_chunks/handler72.js +42 -42
- package/dist/packem_chunks/handler73.js +9 -9
- package/dist/packem_chunks/handler74.js +21 -21
- package/dist/packem_chunks/handler75.js +3 -3
- package/dist/packem_chunks/handler76.js +8 -8
- package/dist/packem_chunks/handler77.js +63 -64
- package/dist/packem_chunks/handler78.js +22 -22
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +5 -5
- package/dist/packem_chunks/heal.js +8 -8
- package/dist/packem_chunks/help-command.js +26 -26
- package/dist/packem_chunks/index2.js +5 -5
- package/dist/packem_chunks/index3.js +2 -2
- package/dist/packem_chunks/index4.js +11 -11
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/lean.js +1 -1
- package/dist/packem_chunks/list.js +2 -2
- package/dist/packem_chunks/loader.js +4 -4
- package/dist/packem_chunks/orchestrator.js +14 -14
- package/dist/packem_chunks/pre-mode.js +2 -2
- package/dist/packem_chunks/prompts.js +3 -3
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/publish-guards.js +1 -1
- package/dist/packem_chunks/registry.js +17 -17
- package/dist/packem_chunks/resolveFormatter.js +5 -5
- package/dist/packem_chunks/shell-runner.js +1 -1
- package/dist/packem_chunks/snapshot.js +2 -2
- package/dist/packem_chunks/stage-publisher.js +1 -1
- package/dist/packem_chunks/staged-registry.js +2 -2
- package/dist/packem_chunks/state.js +3 -3
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tar.js +3 -3
- package/dist/packem_chunks/tripwire.js +2 -2
- package/dist/packem_chunks/ts-loader.js +8 -8
- package/dist/packem_chunks/verify-lockfile.js +2 -2
- package/dist/packem_chunks/workspace.js +2 -2
- package/dist/packem_shared/advisories-BGeuHJQg.js +1 -0
- package/dist/packem_shared/affected-selection-B85ND6JV.js +1 -0
- package/dist/packem_shared/affected-shas-BWRRAB47.js +1 -0
- package/dist/packem_shared/ai-analysis-oNMAj1wd.js +68 -0
- package/dist/packem_shared/{ai-fix-CLfWbyqY.js → ai-fix-BgBU0TOz.js} +9 -9
- package/dist/packem_shared/{augment-BVuj3ee7.js → augment-HVeX6LpU.js} +4 -4
- package/dist/packem_shared/bin-DKod8Iqo.js +1 -0
- package/dist/packem_shared/build-scripts-CM8M1xcG.js +1 -0
- package/dist/packem_shared/{command-runtime-DTbo12cP.js → command-runtime-BVi4lL8k.js} +1 -1
- package/dist/packem_shared/cyclonedx-y7VLI-1d.js +4 -0
- package/dist/packem_shared/{dependency-scan-DZcSlSFp.js → dependency-scan-BAzKpXdW.js} +1 -1
- package/dist/packem_shared/{docker-69ybb6g7.js → docker-D1LStSlH.js} +36 -36
- package/dist/packem_shared/{en-C26W78--.js → en-BxrK-n-J.js} +10 -10
- package/dist/packem_shared/failure-log-ChuFC-8f.js +2 -0
- package/dist/packem_shared/giget-CAxjpwew.js +2 -0
- package/dist/packem_shared/glob-BUjyjdE8-BSrdzgma.js +1 -0
- package/dist/packem_shared/{index-Bhzio2RB.js → index-BJw7gKD1.js} +1 -1
- package/dist/packem_shared/index-BWl4DbMp.js +1 -0
- package/dist/packem_shared/index-DND6ptxQ.js +35 -0
- package/dist/packem_shared/{interface.d-B7VK2rcH.d.ts → interface.d-CRqRz4jt.d.ts} +39 -39
- package/dist/packem_shared/{interface.d-Cezzifoh.d.ts → interface.d-CrHOtJc1.d.ts} +37 -37
- package/dist/packem_shared/lifecycle-Db0qh6vR.js +2 -0
- package/dist/packem_shared/lockfile-CDQ0n4P5.js +1 -0
- package/dist/packem_shared/main-D_cam4hv.js +1 -0
- package/dist/packem_shared/manifests-Da_no4ZH.js +1 -0
- package/dist/packem_shared/{min-release-age-hK604veF.js → min-release-age-V6L6dpiP.js} +2 -2
- package/dist/packem_shared/missing-package-json-Jw8IEHct.js +1 -0
- package/dist/packem_shared/{native-config-sync-DDKjAy0i.js → native-config-sync-C0pUePad.js} +6 -6
- package/dist/packem_shared/osv-bloom-DNFpvSSO.js +2 -0
- package/dist/packem_shared/package-version-DjHDww_5.js +4 -0
- package/dist/packem_shared/packument-N3EWbZpL.js +1 -0
- package/dist/packem_shared/pm-runner-Bssje5qH.js +1 -0
- package/dist/packem_shared/project-name-filter-u2Q7YpQH.js +7 -0
- package/dist/packem_shared/prompt-BSAy8SMH.js +1 -0
- package/dist/packem_shared/{provenance-CRBV9cko.js → provenance-9OT8sTqn.js} +1 -1
- package/dist/packem_shared/{readJsonSync-DuMMeB3s-B9cGBVbJ.js → readJsonSync-BnWiH5-R-BpnwAB0Z.js} +1 -1
- package/dist/packem_shared/registry-keys-CYHd7qU2.js +1 -0
- package/dist/packem_shared/{resolve-explicit-BX6aMYl-.js → resolve-explicit-DC3XssJa.js} +1 -1
- package/dist/packem_shared/{resolve-runtime-COyiEML3.js → resolve-runtime-f5l4ODsH.js} +1 -1
- package/dist/packem_shared/run-file-zB4ACnUy.js +1 -0
- package/dist/packem_shared/{runtime-check-fzDkedMW.js → runtime-check-CWvAfu5u.js} +1 -1
- package/dist/packem_shared/s1ngularity-DsmC71xt.js +1 -0
- package/dist/packem_shared/{scan-progress-DQ9qIGzr.js → scan-progress-Ch8s3Uwl.js} +2 -2
- package/dist/packem_shared/selectors-CtxnIT4X.js +3 -0
- package/dist/packem_shared/signatures-Dwx5fD4g.js +2 -0
- package/dist/packem_shared/subtree-DSm0QEoE.js +2 -0
- package/dist/packem_shared/target-merge-b7bE1AEx.js +11 -0
- package/dist/packem_shared/target-options-BO4Uxt0k.js +1 -0
- package/dist/packem_shared/toolchain-BY8lJaSN.js +5 -0
- package/dist/packem_shared/typosquats-BUGgotNu.js +1 -0
- package/dist/packem_shared/{use-measured-height-DfNxp6nf.js → use-measured-height-BLZt9dW2.js} +1 -1
- package/dist/packem_shared/verify-B0ztxKMa.js +1 -0
- package/dist/packem_shared/vis-update-app-D1gLJB1O.js +1 -0
- package/dist/packem_shared/vis-user-error-DjFv8uxy.js +28 -0
- package/dist/packem_shared/watch-CGrUW_JD.js +1 -0
- package/dist/packem_shared/watch-loop-DIwSMjlA.js +11 -0
- package/dist/release/core/package-managers/index.d.ts +2 -2
- package/dist/release/core/version-actions/index.d.ts +10 -10
- package/dist/release/index.d.ts +60 -60
- package/dist/release/plugin-sdk.d.ts +80 -80
- package/dist/release/presets.d.ts +148 -148
- package/dist/release/types.d.ts +840 -840
- package/dist/runtime/preload.js +1 -1
- package/index.d.ts +204 -204
- package/index.js +52 -52
- package/package.json +12 -12
- package/schemas/project.schema.json +4 -1
- package/schemas/vis-config.schema.json +9 -3
- package/dist/packem_shared/advisories-B76fBVL-.js +0 -1
- package/dist/packem_shared/affected-shas-BOeR4vEc.js +0 -1
- package/dist/packem_shared/ai-analysis-D7HOdUwd.js +0 -68
- package/dist/packem_shared/bin-CkfFJCAM.js +0 -1
- package/dist/packem_shared/build-scripts-CfAqHBlq.js +0 -1
- package/dist/packem_shared/cyclonedx--L7NbMBH.js +0 -4
- package/dist/packem_shared/failure-log-BZQqxffZ.js +0 -2
- package/dist/packem_shared/giget-DVTFJlbR.js +0 -2
- package/dist/packem_shared/glob-DMbPwGSj-D2Hk3lFG.js +0 -1
- package/dist/packem_shared/index-2LCHaVNX.js +0 -35
- package/dist/packem_shared/index-B0EsgdzO.js +0 -1
- package/dist/packem_shared/index-Bq6YEpiq.js +0 -28
- package/dist/packem_shared/lifecycle-BcCMt9wn.js +0 -2
- package/dist/packem_shared/lockfile-Cwt0Nwr0.js +0 -1
- package/dist/packem_shared/main-B3juSU5z.js +0 -1
- package/dist/packem_shared/manifests-BshBdSb-.js +0 -1
- package/dist/packem_shared/missing-package-json-Cu0iWMT2.js +0 -1
- package/dist/packem_shared/osv-bloom-DMhXP184.js +0 -2
- package/dist/packem_shared/package-version-TsxLc6w2.js +0 -4
- package/dist/packem_shared/packument-CtVAoNo7.js +0 -1
- package/dist/packem_shared/pm-runner-CfyxALPK.js +0 -1
- package/dist/packem_shared/prompt-DjXHVgYU.js +0 -1
- package/dist/packem_shared/registry-keys-Ci2keQNi.js +0 -1
- package/dist/packem_shared/run-file-CTJfIZ0I.js +0 -1
- package/dist/packem_shared/s1ngularity-Cq1cCSpU.js +0 -1
- package/dist/packem_shared/selectors-B9dOMIMq.js +0 -3
- package/dist/packem_shared/signatures-DvD1E8Xa.js +0 -2
- package/dist/packem_shared/subtree-C7bZuiSQ.js +0 -2
- package/dist/packem_shared/target-merge-Dg25Izl5.js +0 -11
- package/dist/packem_shared/target-options-aPqByoww.js +0 -1
- package/dist/packem_shared/toolchain-CiaW3bx4.js +0 -5
- package/dist/packem_shared/typosquats-CRnvlYPw.js +0 -1
- package/dist/packem_shared/verify-23b6IfSg.js +0 -1
- package/dist/packem_shared/vis-update-app-De8JjZm0.js +0 -1
- package/dist/packem_shared/watch-B3P2dwoG.js +0 -1
- package/dist/packem_shared/watch-loop-B3_O8hF-.js +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as u}from"node:module";const h=u(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process
|
|
1
|
+
import{createRequire as u}from"node:module";let _;const h=t=>(_??=u(import.meta.url))(t),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$=t=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[i,e]=p.versions.node.split(".").map(Number);if(i>22||i===22&&e>=3||i===20&&e>=16)return p.getBuiltinModule(t)}return h(t)},f=$("node:assert");function g(t,i){return`#compdef ${t}
|
|
2
2
|
compdef _${t} ${t}
|
|
3
3
|
|
|
4
4
|
# zsh completion for ${t} -*- shell-script -*-
|
|
@@ -216,7 +216,7 @@ _${t}() {
|
|
|
216
216
|
if [ "\${funcstack[1]}" = "_${t}" ]; then
|
|
217
217
|
_${t}
|
|
218
218
|
fi
|
|
219
|
-
`}function
|
|
219
|
+
`}function v(t,i){let e=t.replace(/[-:]/g,"_");return`# bash completion for ${t}
|
|
220
220
|
|
|
221
221
|
# Define shell completion directives
|
|
222
222
|
readonly ShellCompDirectiveError=${n.ShellCompDirectiveError}
|
|
@@ -317,7 +317,7 @@ __${e}_complete() {
|
|
|
317
317
|
|
|
318
318
|
# Register completion function
|
|
319
319
|
complete -F __${e}_complete ${t}
|
|
320
|
-
`}function
|
|
320
|
+
`}function C(t,i){let e=t.replace(/[-:]/g,"_"),o=n.ShellCompDirectiveError,l=n.ShellCompDirectiveNoSpace,r=n.ShellCompDirectiveNoFileComp,s=n.ShellCompDirectiveFilterFileExt,a=n.ShellCompDirectiveFilterDirs;return`# fish completion for ${t} -*- shell-script -*-
|
|
321
321
|
|
|
322
322
|
function __${e}_debug
|
|
323
323
|
set -l file "$BASH_COMP_DEBUG_FILE"
|
|
@@ -551,7 +551,7 @@ complete -c ${t} -n '__${e}_clear_perform_completion_once_result'
|
|
|
551
551
|
complete -c ${t} -n 'not __${e}_requires_order_preservation && __${e}_prepare_completions' -f -a '$__${e}_comp_results'
|
|
552
552
|
# Otherwise we use the -k flag
|
|
553
553
|
complete -k -c ${t} -n '__${e}_requires_order_preservation && __${e}_prepare_completions' -f -a '$__${e}_comp_results'
|
|
554
|
-
`}function
|
|
554
|
+
`}function b(t,i){let e=t.replace(/[-:]/g,"_");return`# powershell completion for ${t} -*- shell-script -*-
|
|
555
555
|
|
|
556
556
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
557
557
|
function __${t}_debug {
|
|
@@ -799,4 +799,4 @@ complete -k -c ${t} -n '__${e}_requires_order_preservation && __${e}_prepare_com
|
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
Register-ArgumentCompleter -CommandName '${t}' -ScriptBlock $__${e}CompleterBlock
|
|
802
|
-
`}const n={ShellCompDirectiveError:1,ShellCompDirectiveNoSpace:2,ShellCompDirectiveNoFileComp:4,ShellCompDirectiveFilterFileExt:8,ShellCompDirectiveFilterDirs:16,ShellCompDirectiveKeepOrder:32,ShellCompDirectiveDefault:0};var
|
|
802
|
+
`}const n={ShellCompDirectiveError:1,ShellCompDirectiveNoSpace:2,ShellCompDirectiveNoFileComp:4,ShellCompDirectiveFilterFileExt:8,ShellCompDirectiveFilterDirs:16,ShellCompDirectiveKeepOrder:32,ShellCompDirectiveDefault:0};var w=class{name;variadic;command;handler;constructor(t,i,e,o=!1){this.command=t,this.name=i,this.handler=e,this.variadic=o}},D=class{value;description;command;handler;alias;isBoolean;constructor(t,i,e,o,l,r){this.command=t,this.value=i,this.description=e,this.handler=o,this.alias=l,this.isBoolean=r}},m=class{value;description;options=new Map;arguments=new Map;parent;constructor(t,i){this.value=t,this.description=i}option(t,i,e,o){let l,r,s;typeof e=="function"?(l=e,r=o,s=!1):typeof e=="string"?(l=void 0,r=e,s=!0):(l=void 0,r=void 0,s=!0);let a=new D(this,t,i,l,r,s);return this.options.set(t,a),this}argument(t,i,e=!1){let o=new w(this,t,i,e);return this.arguments.set(t,o),this}},S=class extends m{commands=new Map;completions=[];directive=n.ShellCompDirectiveDefault;constructor(){super("","")}command(t,i){let e=new m(t,i);return this.commands.set(t,e),e}stripOptions(t){let i=[],e=0;for(;e<t.length;){let o=t[e];if(o.startsWith("-")){e++;let l=!1,r=this.findOption(this,o);if(r)l=r.isBoolean??!1;else for(let[,s]of this.commands){let a=this.findOption(s,o);if(a){l=a.isBoolean??!1;break}}!l&&e<t.length&&!t[e].startsWith("-")&&e++}else i.push(o),e++}return i}matchCommand(t){t=this.stripOptions(t);let i=[],e=[],o=null;for(let l=0;l<t.length;l++){let r=t[l];i.push(r);let s=this.commands.get(i.join(" "));if(s)o=s;else{e=t.slice(l,t.length);break}}return[o||this,e]}shouldCompleteFlags(t,i){if(i.startsWith("-"))return!0;if(t?.startsWith("-")){let e=this.findOption(this,t);if(!e){for(let[,o]of this.commands)if(e=this.findOption(o,t),e)break}return!(e&&e.isBoolean)}return!1}shouldCompleteCommands(t){return!t.startsWith("-")}handleFlagCompletion(t,i,e,o){let l;if(e.includes("=")){let[r]=e.split("=");l=r}else if(o?.startsWith("-")){let r=this.findOption(t,o);r&&!r.isBoolean&&(l=o)}if(l){let r=this.findOption(t,l);if(r?.handler){let s=[];r.handler.call(r,(a,c)=>s.push({value:a,description:c}),t.options),this.completions=s}return}if(e.startsWith("-")){let r=e.startsWith("-")&&!e.startsWith("--"),s=e.replace(/^-+/,"");for(let[a,c]of t.options)r&&c.alias&&`-${c.alias}`.startsWith(e)?this.completions.push({value:`-${c.alias}`,description:c.description}):!r&&a.startsWith(s)&&this.completions.push({value:`--${a}`,description:c.description})}}findOption(t,i){let e=t.options.get(i);if(e||(e=t.options.get(i.replace(/^-+/,"")),e))return e;for(let[o,l]of t.options)if(l.alias&&`-${l.alias}`===i)return l}handleCommandCompletion(t,i){let e=this.stripOptions(t);for(let[o,l]of this.commands){if(o==="")continue;let r=o.split(" ");r.slice(0,e.length).every((s,a)=>s===e[a])&&r[e.length]?.startsWith(i)&&this.completions.push({value:r[e.length],description:l.description})}}handlePositionalCompletion(t,i){let e=this.stripOptions(i),o=t.value.split(" ").length,l=Math.max(0,e.length-o),r=Array.from(t.arguments.entries());if(r.length>0){let s;if(l<r.length){let[a,c]=r[l];s=c}else{let a=r[r.length-1][1];a.variadic&&(s=a)}if(s&&s.handler&&typeof s.handler=="function"){let a=[];s.handler.call(s,(c,d)=>a.push({value:c,description:d}),t.options),this.completions.push(...a)}}}complete(t){this.directive=n.ShellCompDirectiveNoFileComp;let i=new Set;this.completions.filter(e=>i.has(e.value)?!1:(i.add(e.value),!0)).filter(e=>{if(t.includes("=")){let[,o]=t.split("=");return e.value.startsWith(o)}return e.value.startsWith(t)}).forEach(e=>console.log(`${e.value} ${e.description??""}`)),console.log(`:${this.directive}`)}parse(t){this.completions=[];let i=t[t.length-1]==="";i&&t.pop();let e=t[t.length-1]||"",o=t.slice(0,-1);i&&(e!==""&&o.push(e),e="");let[l]=this.matchCommand(o),r=o[o.length-1];this.shouldCompleteFlags(r,e)?this.handleFlagCompletion(l,o,e,r):(this.shouldCompleteCommands(e)&&this.handleCommandCompletion(o,e),l&&l.arguments.size>0&&this.handlePositionalCompletion(l,o)),this.complete(e)}setup(t,i,e){switch(f(e==="zsh"||e==="bash"||e==="fish"||e==="powershell","Unsupported shell"),e){case"zsh":{let o=g(t,i);console.log(o);break}case"bash":{let o=v(t,i);console.log(o);break}case"fish":{let o=C(t,i);console.log(o);break}case"powershell":{let o=b(t,i);console.log(o);break}}}};const y=new S;export{w as Argument,m as Command,D as Option,S as RootCommand,n as ShellCompDirective,y as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{y as U,m as
|
|
1
|
+
import{y as U,m as z,u as H,I as K,z as b}from"../packem_shared/index-DND6ptxQ.js";import{E as X}from"../packem_shared/public-api-WqUCiyIe.js";import{p as Z}from"./cli-main.js";import{k as I,w as A,j as x}from"../packem_shared/en-BxrK-n-J.js";const ee=(e,t)=>typeof e!="string"||e===""?"":e[0].toLowerCase()+e.slice(1),k=(e,t)=>typeof e!="string"||e===""?"":(t?.locale?e[0].toLocaleUpperCase(t.locale):e[0].toUpperCase())+e.slice(1),te=(e,t)=>`${e}::${t?.joiner??""}::${t?.locale??""}::${t?.knownAcronyms?.join(",")??""}::${t?.normalize?"true":"false"}`,$=(e,t)=>{const{length:r}=e;if(r===0)return"";if(r===1)return e[0];const n=[];let o="",s="";for(let i=0;i<r;i++){const l=e[i];if(I.test(l)){o?(n.push(o+s+l),o="",s=""):(n.length>0&&n.push(t),o=l);continue}o?(s&&(s+=t),s+=l):(n.length>0&&n.push(t),n.push(l))}return n.join("")},ne=/(?<![a-zß])SS(?![a-z])/g,re=e=>e.replaceAll(ne,"ß"),oe=(e,t)=>{if(typeof e!="string"||!e)return"";let r=!0;return $(A(e,{handleAnsi:t?.handleAnsi,handleEmoji:t?.handleEmoji,knownAcronyms:t?.knownAcronyms,locale:t?.locale,normalize:t?.normalize,separators:void 0,stripAnsi:t?.stripAnsi,stripEmoji:t?.stripEmoji}).map(o=>{const s=o,i=s.toLowerCase();return r?(r=!1,ee(i)):k(i,t)}),"")},se=new x(1e3),S=(e,t)=>{if(typeof e!="string")return"";const r=t?.cache??!1,n=t?.cacheStore??se;let o;if(r&&(o=te(e,t)),r&&o&&n.has(o))return n.get(o);const s=A(e,{handleAnsi:t?.handleAnsi,handleEmoji:t?.handleEmoji,knownAcronyms:t?.knownAcronyms,locale:t?.locale,normalize:t?.normalize,separators:void 0,stripAnsi:t?.stripAnsi,stripEmoji:t?.stripEmoji}).map(l=>{if(t?.handleAnsi&&I.test(l))return l;if(t?.toUpperCase)return t.locale?l.toLocaleUpperCase(t.locale):l.toUpperCase();const a=t?.locale?.startsWith("de")?re(l):l;return t?.locale?a.toLocaleLowerCase(t.locale):a.toLowerCase()}),i=$(s,t?.joiner??"-");return r&&o&&n.set(o,i),i},ie=new x(1e3),le=(e,t)=>S(e,{cacheStore:ie,...t,joiner:"_",toUpperCase:!0}),ae=(e,t)=>typeof e!="string"||!e?"":$(A(e,{handleAnsi:t?.handleAnsi,handleEmoji:t?.handleEmoji,knownAcronyms:t?.knownAcronyms,locale:t?.locale,normalize:t?.normalize,separators:void 0,stripAnsi:t?.stripAnsi,stripEmoji:t?.stripEmoji}).map(n=>k(n.toLowerCase(),{locale:t?.locale})),""),ce=new x(1e3),fe=(e,t)=>S(e,{cacheStore:ce,...t,joiner:"_"}),ue=(e,t)=>typeof e!="string"?"":$(A(e,{handleAnsi:t?.handleAnsi,handleEmoji:t?.handleEmoji,knownAcronyms:t?.knownAcronyms,locale:t?.locale,normalize:t?.normalize,separators:void 0,stripAnsi:t?.stripAnsi,stripEmoji:t?.stripEmoji}).map(n=>k(n,{locale:t?.locale})),"-"),m=e=>e==null?"":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"?String(e):JSON.stringify(e),T={camel_case:e=>oe(m(e)),kebab_case:e=>S(m(e)),lower_case:e=>m(e).toLowerCase(),pascal_case:e=>ae(m(e)),path_join:(e,...t)=>{const r=[m(e),...t.map(n=>m(n))];return z(...r)},path_relative:(e,t)=>U(m(t),m(e)),snake_case:e=>fe(m(e)),upper_case:e=>m(e).toUpperCase(),upper_kebab_case:e=>ue(m(e)),upper_snake_case:e=>le(m(e))},N=(e,t,r=[])=>{const n=T[e];if(!n)throw new Error(`Unknown filter "${e}". Known filters: ${Object.keys(T).sort().join(", ")}.`);return n(t,...r)},R=e=>{const t=[];let r=0,n=0,o,s=-1;for(const i of e){if(s+=1,o){i===o&&(o=void 0);continue}if(i==='"'||i==="'"){o=i;continue}i==="("?r+=1:i===")"?r-=1:i===","&&r===0&&(t.push(e.slice(n,s)),n=s+1)}return t.push(e.slice(n)),t},pe=e=>{if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1)},me=/\[([^\]]+)\]/g,de=e=>{const t=e.trim(),r=t.indexOf("(");if(r===-1)return{args:[],name:t};if(!t.endsWith(")"))throw new Error(`Filter call "${e}" missing closing ")"`);const n=t.slice(0,r).trim(),o=t.slice(r+1,-1).trim();return o===""?{args:[],name:n}:{args:R(o).map(s=>{const i=s.trim();return pe(i)??i}),name:n}},he=e=>{const t=e.split("|").map(n=>n.trim()),r=t[0]??"";if(!r)throw new Error(`Empty variable name in expression "${e}"`);return{filters:t.slice(1).map(n=>de(n)),name:r}},ye=e=>e==null?"":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"?String(e):JSON.stringify(e),ge=(e,t)=>{const r=e.replaceAll(me,(n,o)=>{const{filters:s,name:i}=he(o);if(!Object.hasOwn(t,i))throw new Error(`Variable "${i}" used in filename "${e}" but not defined`);let l=t[i];for(const a of s)l=N(a.name,l,a.args);return ye(l)});return P(r)},P=e=>e.split("/").map(t=>t.endsWith(".tera")||t.endsWith(".twig")?t.slice(0,-5):t).join("/"),we=e=>e.endsWith(".raw")?e.slice(0,-4):e,be=e=>{const t=e.split("/");return(t.at(-1)??"").startsWith("_")?!0:t.slice(0,-1).includes("partials")},Ee=(e,t)=>{if(!e.startsWith(`---
|
|
2
2
|
`)&&!e.startsWith(`---\r
|
|
3
3
|
`))return{body:e};const r=e.indexOf(`
|
|
4
4
|
---`,3);if(r===-1)return{body:e};let n=r+1+3;e[n]==="\r"&&(n+=1),e[n]===`
|
|
5
5
|
`&&(n+=1);const o=e.startsWith(`---\r
|
|
6
6
|
`)?5:4,s=e.slice(o,r).replaceAll("\r","");let i;try{i=t(s)}catch(l){const a=l instanceof Error?l.message:String(l);throw new Error(`Failed to parse frontmatter YAML: ${a}`,{cause:l})}if(i==null)return{body:e.slice(n)};if(typeof i!="object"||Array.isArray(i))throw new TypeError(`Frontmatter must be a YAML mapping, got ${Array.isArray(i)?"array":typeof i}`);return{body:e.slice(n),frontmatter:i}},ve=/\{\{-?(.+?)-?\}\}|\{%-?(.+?)-?%\}/gs,q=e=>{const t=[];let r=0,n=1;const o=s=>{for(const i of s)i===`
|
|
7
|
-
`&&(n+=1)};for(const s of e.matchAll(ve)){const i=s.index??0;if(i>r){const c=e.slice(r,i);t.push({line:n,type:"text",value:c}),o(c)}const l=n,a=s[0];a.startsWith("{{")?t.push({line:l,type:"expr",value:(s[1]??"").trim()}):t.push({line:l,type:"stmt",value:(s[2]??"").trim()}),o(a),r=i+a.length}if(r<e.length){const s=e.slice(r);t.push({line:n,type:"text",value:s})}return t},Ae=new Set(["block","endblock","endfilter","endmacro","extends","filter","import","macro","set"]),F=(e,t)=>{let r=0;const n=(s,i)=>{throw new Error(`${t}:${s}: ${i}`)},o=s=>{const i=[];for(;r<e.length;){const l=e[r];if(l.type==="text"){i.push({type:"text",value:l.value}),r+=1;continue}if(l.type==="expr"){i.push({expression:l.value,line:l.line,type:"expr"}),r+=1;continue}const a=l.value.split(/\s+/)[0]??"";if(s.includes(a))return i;if(Ae.has(a)&&n(l.line,`Tera feature "{% ${a} %}" is not supported. Supported: if/else/endif, for/endfor, include. Rewrite the template to avoid macros, set, extends, block, and import.`),a==="if"){r+=1;const c=l.value.slice(2).trim(),p=o(["else","endif"]);let f;r<e.length&&e[r].type==="stmt"&&e[r].value.split(/\s+/)[0]==="else"&&(r+=1,f=o(["endif"])),(r>=e.length||e[r].type!=="stmt"||e[r].value.split(/\s+/)[0]!=="endif")&&n(l.line,"Unterminated {% if %} — missing {% endif %}"),r+=1,i.push({alternate:f,condition:c,consequent:p,line:l.line,type:"if"});continue}if(a==="for"){r+=1;const c=l.value.slice(3).trim(),p=c.indexOf(" in ");p===-1&&n(l.line,"Malformed {% for %} — expected `for <name> in <collection>`");const f=c.slice(0,p).trim(),d=c.slice(p+4).trim();(!f||!d)&&n(l.line,"Malformed {% for %} — missing binding or collection");const u=o(["endfor"]);(r>=e.length||e[r].type!=="stmt"||e[r].value.split(/\s+/)[0]!=="endfor")&&n(l.line,"Unterminated {% for %} — missing {% endfor %}"),r+=1,i.push({binding:f,body:u,collection:d,line:l.line,type:"for"});continue}if(a==="include"){r+=1;const c=l.value.slice(7).trim(),p=G(c);p===void 0&&n(l.line,"Malformed {% include %} — expected a quoted partial name"),i.push({line:l.line,name:p,type:"include"});continue}n(l.line,`Unknown tag "{% ${a} %}". Supported: if, for, include.`)}return i};return o([])},G=e=>{if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1)},$e=e=>e==null?"":typeof e=="boolean"||typeof e=="number"?String(e):typeof e=="string"?e:JSON.stringify(e),je=e=>e==null||e===!1||e===0||e===""?!1:Array.isArray(e)?e.length>0:!0,B=(e,t,r,n,o=!0)=>{const s=e.split(".");if(o&&s.length>0&&!Object.hasOwn(t,s[0]))throw new Error(`${n}:${r}: Variable "${e}" is not defined`);let i=t;for(const l of s){if(i==null)return;if(typeof i!="object")throw new TypeError(`${n}:${r}: Cannot read "${l}" on non-object value`);i=i[l]}return i},xe=e=>{const t=[];let r=0,n=0,o;for(let s=0;s<e.length;s+=1){const i=e[s];if(o){i===o&&(o=void 0);continue}if(i==='"'||i==="'"){o=i;continue}i==="("?r+=1:i===")"?r-=1:i==="|"&&r===0&&(t.push(e.slice(n,s)),n=s+1)}return t.push(e.slice(n)),t},ke=e=>{const t=e.trim(),r=t.indexOf("(");if(r===-1)return{args:[],name:t};if(!t.endsWith(")"))throw new Error(`Filter call "${e}" missing closing ")"`);const n=t.slice(0,r).trim(),o=t.slice(r+1,-1).trim();return o?{args:
|
|
7
|
+
`&&(n+=1)};for(const s of e.matchAll(ve)){const i=s.index??0;if(i>r){const c=e.slice(r,i);t.push({line:n,type:"text",value:c}),o(c)}const l=n,a=s[0];a.startsWith("{{")?t.push({line:l,type:"expr",value:(s[1]??"").trim()}):t.push({line:l,type:"stmt",value:(s[2]??"").trim()}),o(a),r=i+a.length}if(r<e.length){const s=e.slice(r);t.push({line:n,type:"text",value:s})}return t},Ae=new Set(["block","endblock","endfilter","endmacro","extends","filter","import","macro","set"]),F=(e,t)=>{let r=0;const n=(s,i)=>{throw new Error(`${t}:${s}: ${i}`)},o=s=>{const i=[];for(;r<e.length;){const l=e[r];if(l.type==="text"){i.push({type:"text",value:l.value}),r+=1;continue}if(l.type==="expr"){i.push({expression:l.value,line:l.line,type:"expr"}),r+=1;continue}const a=l.value.split(/\s+/)[0]??"";if(s.includes(a))return i;if(Ae.has(a)&&n(l.line,`Tera feature "{% ${a} %}" is not supported. Supported: if/else/endif, for/endfor, include. Rewrite the template to avoid macros, set, extends, block, and import.`),a==="if"){r+=1;const c=l.value.slice(2).trim(),p=o(["else","endif"]);let f;r<e.length&&e[r].type==="stmt"&&e[r].value.split(/\s+/)[0]==="else"&&(r+=1,f=o(["endif"])),(r>=e.length||e[r].type!=="stmt"||e[r].value.split(/\s+/)[0]!=="endif")&&n(l.line,"Unterminated {% if %} — missing {% endif %}"),r+=1,i.push({alternate:f,condition:c,consequent:p,line:l.line,type:"if"});continue}if(a==="for"){r+=1;const c=l.value.slice(3).trim(),p=c.indexOf(" in ");p===-1&&n(l.line,"Malformed {% for %} — expected `for <name> in <collection>`");const f=c.slice(0,p).trim(),d=c.slice(p+4).trim();(!f||!d)&&n(l.line,"Malformed {% for %} — missing binding or collection");const u=o(["endfor"]);(r>=e.length||e[r].type!=="stmt"||e[r].value.split(/\s+/)[0]!=="endfor")&&n(l.line,"Unterminated {% for %} — missing {% endfor %}"),r+=1,i.push({binding:f,body:u,collection:d,line:l.line,type:"for"});continue}if(a==="include"){r+=1;const c=l.value.slice(7).trim(),p=G(c);p===void 0&&n(l.line,"Malformed {% include %} — expected a quoted partial name"),i.push({line:l.line,name:p,type:"include"});continue}n(l.line,`Unknown tag "{% ${a} %}". Supported: if, for, include.`)}return i};return o([])},G=e=>{if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1)},$e=e=>e==null?"":typeof e=="boolean"||typeof e=="number"?String(e):typeof e=="string"?e:JSON.stringify(e),je=e=>e==null||e===!1||e===0||e===""?!1:Array.isArray(e)?e.length>0:!0,B=(e,t,r,n,o=!0)=>{const s=e.split(".");if(o&&s.length>0&&!Object.hasOwn(t,s[0]))throw new Error(`${n}:${r}: Variable "${e}" is not defined`);let i=t;for(const l of s){if(i==null)return;if(typeof i!="object")throw new TypeError(`${n}:${r}: Cannot read "${l}" on non-object value`);i=i[l]}return i},xe=e=>{const t=[];let r=0,n=0,o;for(let s=0;s<e.length;s+=1){const i=e[s];if(o){i===o&&(o=void 0);continue}if(i==='"'||i==="'"){o=i;continue}i==="("?r+=1:i===")"?r-=1:i==="|"&&r===0&&(t.push(e.slice(n,s)),n=s+1)}return t.push(e.slice(n)),t},ke=e=>{const t=e.trim(),r=t.indexOf("(");if(r===-1)return{args:[],name:t};if(!t.endsWith(")"))throw new Error(`Filter call "${e}" missing closing ")"`);const n=t.slice(0,r).trim(),o=t.slice(r+1,-1).trim();return o?{args:R(o).map(s=>s.trim()),name:n}:{args:[],name:n}},v=(e,t,r,n,o=!0)=>{const s=e.trim();if(s==="true")return!0;if(s==="false")return!1;if(s==="null"||s==="none")return null;const i=G(s);return i!==void 0?i:/^-?\d+(?:\.\d+)?$/.test(s)?Number(s):B(s,t,r,n,o)},D=(e,t,r,n,o=!0)=>{const s=xe(e),i=s[0].trim();let l=v(i,t,r,n,o);for(let a=1;a<s.length;a+=1){const c=s[a].trim(),{args:p,name:f}=ke(c),d=p.map(u=>v(u,t,r,n,o));try{l=N(f,l,d)}catch(u){const y=u instanceof Error?u.message:String(u);throw new Error(`${n}:${r}: ${y}`,{cause:u})}}return l},Y=(e,t)=>{let r,n=0;for(let o=0;o<=e.length-t.length;o+=1){const s=e[o];if(r){s===r&&(r=void 0);continue}if(s==='"'||s==="'"){r=s;continue}if(s==="("){n+=1;continue}if(s===")"){n-=1;continue}if(n===0&&e.slice(o,o+t.length)===t)return o}return-1},_=(e,t)=>{const r=[];let n=0,o=0;for(;o<=e.length-t.length;){const s=Y(e.slice(o),t);if(s===-1)break;r.push(e.slice(n,o+s)),o+=s+t.length,n=o}return r.push(e.slice(n)),r},g=(e,t,r,n)=>{const o=e.trim();if(o==="")return!1;if(o.startsWith("(")&&o.endsWith(")")&&Se(o)===o.length-1)return g(o.slice(1,-1),t,r,n);const s=_(o," or ");if(s.length>1)return s.some(l=>g(l,t,r,n));const i=_(o," and ");if(i.length>1)return i.every(l=>g(l,t,r,n));if(o.startsWith("not "))return!g(o.slice(4),t,r,n);for(const l of["==","!="]){const a=Y(o,l);if(a!==-1){const c=v(o.slice(0,a),t,n,r,!1),p=v(o.slice(a+l.length),t,n,r,!1),f=c===p;return l==="=="?f:!f}}return je(D(o,t,n,r,!1))},Se=e=>{if(e[0]!=="(")return-1;let t=0,r,n=-1;for(const o of e){if(n+=1,r){o===r&&(r=void 0);continue}if(o==='"'||o==="'"){r=o;continue}if(o==="(")t+=1;else if(o===")"&&(t-=1,t===0))return n}return-1},E=(e,t)=>{let r="";for(const n of e){if(n.type==="text"){r+=n.value;continue}if(n.type==="expr"){r+=$e(D(n.expression,t.scope,n.line,t.filename));continue}if(n.type==="if"){const o=g(n.condition,t.scope,t.filename,n.line)?n.consequent:n.alternate??[];r+=E(o,t);continue}if(n.type==="for"){const o=B(n.collection,t.scope,n.line,t.filename,!1);if(o==null)continue;if(!Array.isArray(o))throw new TypeError(`${t.filename}:${n.line}: {% for %} expected an array, got ${typeof o}`);for(const s of o){const i={...t.scope,[n.binding]:s};r+=E(n.body,{...t,scope:i})}continue}if(n.type==="include"){const o=t.partials?.get(n.name);if(!o)throw new Error(`${t.filename}:${n.line}: Partial "${n.name}" not found. Available: ${[...t.partials?.keys()??[]].join(", ")||"(none)"}`);const s=t.includeStack??new Set;if(s.has(n.name)){const i=[...s,n.name].join(" → ");throw new Error(`${t.filename}:${n.line}: Circular partial include detected: ${i}`)}s.add(n.name);try{r+=E(o,{...t,filename:`<partial:${n.name}>`,includeStack:s})}finally{s.delete(n.name)}}}return r},Ce=(e,t)=>F(q(e),t),j=(e,t)=>E(F(q(e),t.filename),t),L="template.yml",Oe=".raw",We=new Set([".cjs",".css",".env",".gitattributes",".gitignore",".graphql",".html",".ini",".js",".json",".json5",".jsonc",".jsx",".lock",".md",".mdx",".mjs",".prettierrc",".raw",".rs",".scss",".sh",".sql",".svg",".tera",".toml",".ts",".tsx",".twig",".txt",".vue",".xml",".yaml",".yml"]),Te=new Set(["Brewfile","CHANGELOG","CODEOWNERS","CONTRIBUTING","COPYING","Dockerfile","Gemfile","LICENCE","LICENSE","Makefile","NOTICE","Procfile","Rakefile","README","VERSION"]),_e=e=>{const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),r=t===-1?e:e.slice(t+1),n=r.lastIndexOf(".");return n===-1||n===0?"":r.slice(n).toLowerCase()},J=e=>{const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t===-1?e:e.slice(t+1)},Le=e=>{const t=_e(e);if(t!=="")return We.has(t);const r=J(e);return Te.has(r)},Me=e=>{const t={default:e.default,internal:e.internal,order:e.order,prompt:e.prompt,required:e.required};switch(e.type){case"array":return{...t,type:"array"};case"boolean":return{...t,default:typeof t.default=="boolean"?t.default:void 0,type:"boolean"};case"enum":return{...t,multiple:e.multiple,type:"enum",values:e.values??[]};case"number":return{...t,type:"number"};case"string":return{...t,type:"string"};default:throw new Error(`Unsupported variable type "${String(e.type)}"`)}},Ue=e=>e.replaceAll("\\","/").replace(/^\.\//,"").replaceAll(/\/+/g,"/"),ze=(e,t,r)=>{const n=t.split("/").filter(Boolean);if(n.length===0)throw new Error("Empty destination path for value");let o=e;for(let s=0;s<n.length-1;s+=1){const i=n[s],l=o[i];if(l===void 0){const a={};o[i]=a,o=a}else if(typeof l=="object"&&!Buffer.isBuffer(l))o=l;else throw new TypeError(`Path conflict: "${n.slice(0,s+1).join("/")}" is both a file and a directory`)}o[n.at(-1)]=r},M=(e,t,r)=>{if(typeof e!="string")return Ie(e);const n=e.includes("{{")||e.includes("{%")?j(e,{filename:`${r}#frontmatter`,scope:t}):e;return g(n,t,`${r}#frontmatter`,1)},Ie=e=>e==null||e===!1||e===0||e===""?!1:Array.isArray(e)?e.length>0:typeof e=="string"?e!=="false"&&e!=="0":!0,Ge=(e,t)=>{const r=z(e,L),n=H(r);if(!n||typeof n!="object")throw new Error(`${r}: must contain a YAML mapping`);const o={};if(n.variables)for(const[a,c]of Object.entries(n.variables))o[a]=Me(c);const s=new Map,i=[];for(const a of K(e,{includeDirs:!1,includeSymlinks:!1})){if(a.path===r)continue;const c=U(e,a.path).replaceAll("\\","/");if(c===L)continue;if(be(c)){const f=b(a.path),d=Ce(f,c);for(const u of Ne(c))s.has(u)&&s.get(u)!==d&&Z.warn(`partial name "${u}" is declared by multiple files — last one wins. Use distinct names or fully-qualified includes.`),s.set(u,d);continue}if(c.endsWith(Oe)){const f=b(a.path);i.push({binary:null,isRaw:!0,rawText:f,relativePath:c});continue}if(Le(c)){const f=b(a.path);i.push({binary:null,isRaw:!1,rawText:f,relativePath:c});continue}const p=b(a.path,{buffer:!0});i.push({binary:p,isRaw:!1,rawText:null,relativePath:c})}const l=a=>{const c={...a.builtins,...a.options},p={},f={};for(const u of i){const y=u.relativePath;let w,C,O=!1;if(u.binary)w=u.binary;else if(u.isRaw)w=u.rawText??"";else{const Q=u.rawText??"",h=Ee(Q,V=>X(V));if(h.frontmatter){if(h.frontmatter.skip!==void 0&&M(h.frontmatter.skip,c,y)||h.frontmatter.if!==void 0&&!M(h.frontmatter.if,c,y))continue;typeof h.frontmatter.to=="string"&&(C=j(h.frontmatter.to,{filename:`${y}#frontmatter.to`,partials:s,scope:c})),h.frontmatter.force===!0&&(O=!0)}w=j(h.body,{filename:y,partials:s,scope:c})}const W=Ue(C??ge(we(y),c));ze(p,W,w),O&&(f[W]={force:!0})}const d={files:p};return Object.keys(f).length>0&&(d.filesMeta=f),d};return{about:{description:n.description??`Moon-format template at ${e}`,name:n.title??t},destination:n.destination,options:o,produce:l}},Ne=e=>{const t=P(e),r=J(t),n=new Set([r,t]);if(r.startsWith("_")){n.add(r.replace(/^_+/,""));const o=t.slice(0,t.length-r.length);n.add(`${o}${r.replace(/^_+/,"")}`)}return[...n]};export{Ge as loadMoonTemplate};
|