pickier 0.1.68 → 0.1.70

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.
Files changed (136) hide show
  1. package/dist/bin/cli.js +2 -2
  2. package/dist/chunk-0b2yx624.js +3 -0
  3. package/dist/chunk-1jtr81zg.js +25 -0
  4. package/dist/chunk-5c026tb4.js +3 -0
  5. package/dist/chunk-5tx5kfq7.js +2 -0
  6. package/dist/chunk-8m82hwdv.js +3 -0
  7. package/dist/chunk-c82emw32.js +3 -0
  8. package/dist/chunk-dxrcbgyc.js +49 -0
  9. package/dist/chunk-gpfjzx90.js +2 -0
  10. package/dist/chunk-he3fbz3w.js +8 -0
  11. package/dist/chunk-m9ym248d.js +2 -0
  12. package/dist/chunk-mqjmcycy.js +128 -0
  13. package/dist/chunk-ng3egs14.js +2 -0
  14. package/dist/chunk-pvptb0h1.js +3 -0
  15. package/dist/chunk-qjzzx1m2.js +61 -0
  16. package/dist/chunk-t4eg5fx5.js +41 -0
  17. package/dist/chunk-t776wefr.js +2 -0
  18. package/dist/chunk-wx92kdf9.js +9 -0
  19. package/dist/chunk-xjt8q744.js +3 -0
  20. package/dist/native/darwin-arm64/pickier-native +0 -0
  21. package/dist/native/darwin-x64/pickier-native +0 -0
  22. package/dist/native/linux-arm64/pickier-native +0 -0
  23. package/dist/native/linux-x64/pickier-native +0 -0
  24. package/dist/native/win32-arm64/pickier-native.exe +0 -0
  25. package/dist/native/win32-x64/pickier-native.exe +0 -0
  26. package/dist/src/cache.d.ts +21 -0
  27. package/dist/src/index.js +1 -1
  28. package/dist/src/lexer.d.ts +2 -0
  29. package/dist/src/lint-worker.d.ts +1 -0
  30. package/dist/src/lint-worker.js +2 -0
  31. package/dist/src/linter.d.ts +17 -1
  32. package/dist/src/logger.d.ts +20 -0
  33. package/dist/src/native.d.ts +64 -0
  34. package/dist/src/parallel.d.ts +17 -0
  35. package/dist/src/plugins/lazy.d.ts +10 -0
  36. package/dist/src/plugins/manifest.d.ts +123 -0
  37. package/dist/src/plugins/utils.d.ts +6 -0
  38. package/dist/src/rules/shell/_continuation.d.ts +4 -0
  39. package/dist/src/rules/style/consistent-list-newline.d.ts +2 -0
  40. package/dist/src/types.d.ts +1 -0
  41. package/dist/src/utils.d.ts +1 -0
  42. package/package.json +3 -2
  43. package/dist/chunk-5dpt7qv4.js +0 -2
  44. package/dist/chunk-ek25vxkw.js +0 -2
  45. package/dist/chunk-jcy3sgzh.js +0 -2
  46. package/dist/chunk-q47v401h.js +0 -92
  47. package/dist/chunk-s0n5r5hb.js +0 -227
  48. package/dist/chunk-zeaz9zt8.js +0 -2
  49. package/dist/src/plugins/index.d.ts +0 -2
  50. package/dist/src/plugins/lockfile.d.ts +0 -22
  51. package/dist/src/plugins/markdown.d.ts +0 -2
  52. package/dist/src/plugins/publint.d.ts +0 -10
  53. package/dist/src/plugins/shell.d.ts +0 -2
  54. package/dist/src/plugins/spell.d.ts +0 -3
  55. package/dist/src/rules/lockfile/parser.d.ts +0 -85
  56. package/dist/src/rules/lockfile/validate-host.d.ts +0 -18
  57. package/dist/src/rules/lockfile/validate-https.d.ts +0 -14
  58. package/dist/src/rules/lockfile/validate-integrity.d.ts +0 -19
  59. package/dist/src/rules/lockfile/validate-package-names.d.ts +0 -23
  60. package/dist/src/rules/lockfile/validate-scheme.d.ts +0 -17
  61. package/dist/src/rules/markdown/_fence-tracking.d.ts +0 -70
  62. package/dist/src/rules/markdown/_shared.d.ts +0 -9
  63. package/dist/src/rules/markdown/blanks-around-fences.d.ts +0 -5
  64. package/dist/src/rules/markdown/blanks-around-headings.d.ts +0 -5
  65. package/dist/src/rules/markdown/blanks-around-lists.d.ts +0 -5
  66. package/dist/src/rules/markdown/blanks-around-tables.d.ts +0 -5
  67. package/dist/src/rules/markdown/code-block-style.d.ts +0 -5
  68. package/dist/src/rules/markdown/code-fence-style.d.ts +0 -5
  69. package/dist/src/rules/markdown/commands-show-output.d.ts +0 -5
  70. package/dist/src/rules/markdown/descriptive-link-text.d.ts +0 -5
  71. package/dist/src/rules/markdown/emphasis-style.d.ts +0 -5
  72. package/dist/src/rules/markdown/fenced-code-language.d.ts +0 -5
  73. package/dist/src/rules/markdown/first-line-heading.d.ts +0 -5
  74. package/dist/src/rules/markdown/heading-increment.d.ts +0 -5
  75. package/dist/src/rules/markdown/heading-start-left.d.ts +0 -5
  76. package/dist/src/rules/markdown/heading-style.d.ts +0 -5
  77. package/dist/src/rules/markdown/hr-style.d.ts +0 -5
  78. package/dist/src/rules/markdown/line-length.d.ts +0 -5
  79. package/dist/src/rules/markdown/link-fragments.d.ts +0 -5
  80. package/dist/src/rules/markdown/link-image-reference-definitions.d.ts +0 -5
  81. package/dist/src/rules/markdown/link-image-style.d.ts +0 -5
  82. package/dist/src/rules/markdown/list-indent.d.ts +0 -5
  83. package/dist/src/rules/markdown/list-marker-space.d.ts +0 -5
  84. package/dist/src/rules/markdown/no-alt-text.d.ts +0 -5
  85. package/dist/src/rules/markdown/no-bare-urls.d.ts +0 -5
  86. package/dist/src/rules/markdown/no-blanks-blockquote.d.ts +0 -5
  87. package/dist/src/rules/markdown/no-duplicate-heading.d.ts +0 -10
  88. package/dist/src/rules/markdown/no-emphasis-as-heading.d.ts +0 -9
  89. package/dist/src/rules/markdown/no-empty-links.d.ts +0 -5
  90. package/dist/src/rules/markdown/no-hard-tabs.d.ts +0 -5
  91. package/dist/src/rules/markdown/no-inline-html.d.ts +0 -5
  92. package/dist/src/rules/markdown/no-missing-space-atx.d.ts +0 -5
  93. package/dist/src/rules/markdown/no-missing-space-closed-atx.d.ts +0 -5
  94. package/dist/src/rules/markdown/no-multiple-blanks.d.ts +0 -5
  95. package/dist/src/rules/markdown/no-multiple-space-atx.d.ts +0 -5
  96. package/dist/src/rules/markdown/no-multiple-space-blockquote.d.ts +0 -5
  97. package/dist/src/rules/markdown/no-multiple-space-closed-atx.d.ts +0 -5
  98. package/dist/src/rules/markdown/no-reversed-links.d.ts +0 -5
  99. package/dist/src/rules/markdown/no-space-in-code.d.ts +0 -5
  100. package/dist/src/rules/markdown/no-space-in-emphasis.d.ts +0 -5
  101. package/dist/src/rules/markdown/no-space-in-links.d.ts +0 -5
  102. package/dist/src/rules/markdown/no-trailing-punctuation.d.ts +0 -5
  103. package/dist/src/rules/markdown/no-trailing-spaces.d.ts +0 -5
  104. package/dist/src/rules/markdown/ol-prefix.d.ts +0 -5
  105. package/dist/src/rules/markdown/proper-names.d.ts +0 -5
  106. package/dist/src/rules/markdown/reference-links-images.d.ts +0 -14
  107. package/dist/src/rules/markdown/required-headings.d.ts +0 -5
  108. package/dist/src/rules/markdown/single-title.d.ts +0 -5
  109. package/dist/src/rules/markdown/single-trailing-newline.d.ts +0 -5
  110. package/dist/src/rules/markdown/strong-style.d.ts +0 -16
  111. package/dist/src/rules/markdown/table-column-count.d.ts +0 -5
  112. package/dist/src/rules/markdown/table-column-style.d.ts +0 -5
  113. package/dist/src/rules/markdown/table-pipe-style.d.ts +0 -5
  114. package/dist/src/rules/markdown/ul-indent.d.ts +0 -14
  115. package/dist/src/rules/markdown/ul-style.d.ts +0 -5
  116. package/dist/src/rules/shell/command-substitution.d.ts +0 -6
  117. package/dist/src/rules/shell/consistent-case-terminators.d.ts +0 -9
  118. package/dist/src/rules/shell/function-style.d.ts +0 -6
  119. package/dist/src/rules/shell/heredoc-indent.d.ts +0 -7
  120. package/dist/src/rules/shell/indent.d.ts +0 -2
  121. package/dist/src/rules/shell/keyword-spacing.d.ts +0 -10
  122. package/dist/src/rules/shell/no-broken-redirect.d.ts +0 -7
  123. package/dist/src/rules/shell/no-cd-without-check.d.ts +0 -6
  124. package/dist/src/rules/shell/no-eval.d.ts +0 -6
  125. package/dist/src/rules/shell/no-exit-in-subshell.d.ts +0 -7
  126. package/dist/src/rules/shell/no-ls-parsing.d.ts +0 -7
  127. package/dist/src/rules/shell/no-trailing-semicolons.d.ts +0 -6
  128. package/dist/src/rules/shell/no-trailing-whitespace.d.ts +0 -5
  129. package/dist/src/rules/shell/no-useless-cat.d.ts +0 -6
  130. package/dist/src/rules/shell/no-variable-in-single-quotes.d.ts +0 -7
  131. package/dist/src/rules/shell/operator-spacing.d.ts +0 -11
  132. package/dist/src/rules/shell/prefer-double-brackets.d.ts +0 -6
  133. package/dist/src/rules/shell/prefer-printf.d.ts +0 -6
  134. package/dist/src/rules/shell/quote-variables.d.ts +0 -2
  135. package/dist/src/rules/shell/set-options.d.ts +0 -8
  136. package/dist/src/rules/shell/shebang.d.ts +0 -2
package/dist/bin/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- async function y(){let n=process.argv.slice(2),c=n[0]==="run",w=c?1:0,a=c?"auto":"lint",m=!1,u=!1,d=!1,g=!1,h,p=[],x=!0;for(let t=w;t<n.length;t++){let e=n[t];if(e==="--mode")a=n[++t]||"auto";else if(e==="--format")d=!0,a="format";else if(e==="--check")m=!0;else if(e==="--write")u=!0;else if(e==="--config")h=n[++t];else if(e==="--verbose")g=!0;else if(e==="--ext"||e==="--ignore-path")t++;else if(e==="--fix"||e==="--dry-run"||e==="--reporter"||e==="--max-warnings"||e==="--cache"){x=!1,p.length=0;break}else if(e.startsWith("--"));else p.push(e)}if(x&&(a==="format"||a==="auto"||a==="lint")&&p.length>0){let{runUnified:t}=await import("../chunk-jcy3sgzh.js"),e=await t(p,{mode:a,check:m,write:u,verbose:g,config:h});process.exit(e)}let{CLI:k}=await import("../chunk-p0j2ra3t.js"),{version:b}=await import("../chunk-zeaz9zt8.js"),r=new k("pickier"),l=(t)=>{let[e,o]=t;return[Array.isArray(e)?e.filter((f)=>typeof f==="string"):[],o&&typeof o==="object"?o:{}]};r.command("[...globs]","Lint files (default)").option("--fix","Auto-fix lint problems").option("--format","Format files instead of linting").option("--dry-run","Simulate fixes without writing").option("--check","Check formatting without writing (CI-friendly)").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier .").example("pickier . --fix").example("pickier . --format").example("pickier src --fix --verbose").action(async(...t)=>{let[e,o]=l(t);if(e.length===0){r.outputHelp();return}let{runUnified:s}=await import("../chunk-jcy3sgzh.js"),i;if(o.format){if(i="format",!o.check)o.write=!0}else i="lint";let f=await s(e,{...o,mode:i});process.exit(f)}),r.command("lint [...globs]","[DEPRECATION] Use `pickier [...globs]` instead. Lint files").option("--fix","Auto-fix problems").option("--dry-run","Simulate fixes without writing").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier lint .").example("pickier lint src --fix").example('pickier lint "src/**/*.{ts,tsx}" --reporter json').action(async(...t)=>{let[e,o]=l(t),{runUnified:s}=await import("../chunk-jcy3sgzh.js"),i=await s(e,{...o,mode:"lint"});process.exit(i)}),r.command("format [...globs]","[DEPRECATION] Use `pickier [...globs] --format` instead. Format files").option("--write","Write changes to files").option("--check","Check without writing (CI-friendly)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file").option("--ext <exts>","Comma-separated extensions").option("--verbose","Verbose output").example("pickier format . --write").example("pickier format . --check").action(async(...t)=>{let[e,o]=l(t),{runUnified:s}=await import("../chunk-jcy3sgzh.js"),i=await s(e,{...o,mode:"format"});process.exit(i)}),r.command("run [...globs]","Unified mode (auto, lint, or format)").option("--mode <mode>","auto|lint|format",{default:"auto"}).option("--fix","Auto-fix problems (lint mode)").option("--dry-run","Simulate fixes without writing (lint mode)").option("--max-warnings <n>","Max warnings before non-zero exit (lint mode)",{default:-1}).option("--reporter <name>","stylish|json|compact (lint mode)",{default:"stylish"}).option("--write","Write changes to files (format mode)").option("--check","Check without writing (format mode)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache (lint mode)").option("--verbose","Verbose output").example("pickier run . --mode lint --fix").example("pickier run . --mode format --write").action(async(...t)=>{let[e,o]=l(t),{runUnified:s}=await import("../chunk-jcy3sgzh.js"),i=await s(e,o);process.exit(i)}),r.command("version","Show the version of the CLI").action(async()=>{let{version:t}=await import("../chunk-zeaz9zt8.js");process.stdout.write(`${t}
4
- `)}),r.version(b),r.help(),r.parse()}y().catch((n)=>{let c=n instanceof Error?n.message:String(n);process.stderr.write(`pickier: ${c}
3
+ async function U(){let i=process.argv.slice(2),c=i[0]==="run",y=c?1:0,a=c?"auto":"lint",d=!1,g=!1,h=!1,x=!1,w,k,f=!1,m,p=[],b=!0;for(let t=y;t<i.length;t++){let e=i[t];if(e==="--mode")a=i[++t]||"auto";else if(e==="--format")h=!0,a="format";else if(e==="--check")d=!0;else if(e==="--write")g=!0;else if(e==="--config")w=i[++t];else if(e==="--verbose")x=!0;else if(e==="--ext")k=i[++t];else if(e==="--ignore-path")t++;else if(e==="--cache")f=!0;else if(e==="--reporter"){let o=i[++t];m=o==="json"||o==="compact"?o:"stylish"}else if(e==="--fix"||e==="--dry-run"||e==="--max-warnings"){b=!1,p.length=0;break}else if(e.startsWith("--"));else p.push(e)}if(b&&(a==="format"||a==="auto"||a==="lint")&&p.length>0){let{runUnified:t}=await import("../chunk-ng3egs14.js"),e=await t(p,{mode:a,check:d,write:g,verbose:x,config:w,ext:k,...f&&{cache:f},...m&&{reporter:m}});process.exit(e)}let{CLI:v}=await import("../chunk-p0j2ra3t.js"),{version:C}=await import("../chunk-5tx5kfq7.js"),r=new v("pickier"),l=(t)=>{let[e,o]=t;return[Array.isArray(e)?e.filter((u)=>typeof u==="string"):[],o&&typeof o==="object"?o:{}]};r.command("[...globs]","Lint files (default)").option("--fix","Auto-fix lint problems").option("--format","Format files instead of linting").option("--dry-run","Simulate fixes without writing").option("--check","Check formatting without writing (CI-friendly)").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier .").example("pickier . --fix").example("pickier . --format").example("pickier src --fix --verbose").action(async(...t)=>{let[e,o]=l(t);if(e.length===0){r.outputHelp();return}let{runUnified:s}=await import("../chunk-ng3egs14.js"),n;if(o.format){if(n="format",!o.check)o.write=!0}else n="lint";let u=await s(e,{...o,mode:n});process.exit(u)}),r.command("lint [...globs]","[DEPRECATION] Use `pickier [...globs]` instead. Lint files").option("--fix","Auto-fix problems").option("--dry-run","Simulate fixes without writing").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier lint .").example("pickier lint src --fix").example('pickier lint "src/**/*.{ts,tsx}" --reporter json').action(async(...t)=>{let[e,o]=l(t),{runUnified:s}=await import("../chunk-ng3egs14.js"),n=await s(e,{...o,mode:"lint"});process.exit(n)}),r.command("format [...globs]","[DEPRECATION] Use `pickier [...globs] --format` instead. Format files").option("--write","Write changes to files").option("--check","Check without writing (CI-friendly)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file").option("--ext <exts>","Comma-separated extensions").option("--verbose","Verbose output").example("pickier format . --write").example("pickier format . --check").action(async(...t)=>{let[e,o]=l(t),{runUnified:s}=await import("../chunk-ng3egs14.js"),n=await s(e,{...o,mode:"format"});process.exit(n)}),r.command("run [...globs]","Unified mode (auto, lint, or format)").option("--mode <mode>","auto|lint|format",{default:"auto"}).option("--fix","Auto-fix problems (lint mode)").option("--dry-run","Simulate fixes without writing (lint mode)").option("--max-warnings <n>","Max warnings before non-zero exit (lint mode)",{default:-1}).option("--reporter <name>","stylish|json|compact (lint mode)",{default:"stylish"}).option("--write","Write changes to files (format mode)").option("--check","Check without writing (format mode)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache (lint mode)").option("--verbose","Verbose output").example("pickier run . --mode lint --fix").example("pickier run . --mode format --write").action(async(...t)=>{let[e,o]=l(t),{runUnified:s}=await import("../chunk-ng3egs14.js"),n=await s(e,o);process.exit(n)}),r.command("version","Show the version of the CLI").action(async()=>{let{version:t}=await import("../chunk-5tx5kfq7.js");process.stdout.write(`${t}
4
+ `)}),r.version(C),r.help(),r.parse()}U().catch((i)=>{let c=i instanceof Error?i.message:String(i);process.stderr.write(`pickier: ${c}
5
5
  `),process.exit(1)});
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var{defineProperty:e,getOwnPropertyNames:g,getOwnPropertyDescriptor:h}=Object,i=Object.prototype.hasOwnProperty;function j(a){return this[a]}var C=(a)=>{var b=(f??=new WeakMap).get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function"){for(var d of g(a))if(!i.call(b,d))e(b,d,{get:j.bind(a,d),enumerable:!(c=h(a,d))||c.enumerable})}return f.set(a,b),b},f;var k=(a)=>a;function l(a,b){this[a]=k.bind(null,b)}var O=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:l.bind(b,c)})};var _=(a,b,c)=>()=>{if(a)try{b=a(a=0)}catch(d){c=[d]}if(c)throw c[0];return b};var J=import.meta.require;
3
+ export{C,O,_,J};
@@ -0,0 +1,25 @@
1
+ // @bun
2
+ import{i,g}from"./chunk-c82emw32.js";import{readdirSync as Xe,readFileSync as Qe}from"fs";import{homedir as Ve}from"os";import{join as ce}from"path";var xe=["code-style","lint"],l={ignores:["**/node_modules/**","**/.pnpm/**","**/.yarn/**","**/dist/**","**/build/**","**/out/**","**/.output/**","**/.next/**","**/.nuxt/**","**/.vite/**","**/.turbo/**","**/.cache/**","**/coverage/**","**/vendor/**","**/pantry/**","**/tmp/**","**/.git/**","**/.idea/**","**/.vscode/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/*.test.ts","**/*.spec.ts","**/.bunpress/**","**/.vitepress/cache/**","**/storage/framework/stx/**","**/storage/framework/runtime/**","**/storage/cloud/**","**/*.lock","**/package-lock.json","**/pnpm-lock.yaml"],lint:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],reporter:"stylish",cache:!1,maxWarnings:-1},format:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],trimTrailingWhitespace:!0,maxConsecutiveBlankLines:1,finalNewline:"one",indent:2,indentStyle:"spaces",preserveCodeIndentation:!1,quotes:"single",semi:!1},rules:{noDebugger:"error",noConsole:"warn"},pluginRules:{"style/brace-style":"warn","style/curly":"off","style/if-newline":"off","style/max-statements-per-line":"warn","pickier/import-dedupe":"warn","pickier/no-import-node-modules-by-path":"error","pickier/no-import-dist":"error","pickier/prefer-const":"error","pickier/prefer-template":"warn","pickier/no-unused-vars":"error","pickier/no-unused-imports":"error","pickier/sort-tailwind-classes":"warn","regexp/no-unused-capturing-group":"error","regexp/no-super-linear-backtracking":"error","regexp/no-useless-lazy":"error","ts/no-top-level-await":"error","ts/member-delimiter-style":"off","ts/type-annotation-spacing":"off","style/comma-dangle":"off","style/keyword-spacing":"off","style/arrow-spacing":"off","style/space-infix-ops":"off","style/object-curly-spacing":"off","style/spaced-comment":"off","style/block-spacing":"off","style/space-before-blocks":"off","style/comma-spacing":"off","style/semi-spacing":"off","style/rest-spread-spacing":"off","style/key-spacing":"off","style/computed-property-spacing":"off","style/array-bracket-spacing":"off","style/space-in-parens":"off","style/template-curly-spacing":"off","style/space-unary-ops":"off","style/switch-colon-spacing":"off","style/arrow-parens":"off","style/space-before-function-paren":"off","style/quote-props":"off","style/no-floating-decimal":"off","style/new-parens":"off","style/no-extra-parens":"off","style/wrap-iife":"off","style/comma-style":"off","style/dot-location":"off","style/operator-linebreak":"off","style/multiline-ternary":"off","style/padded-blocks":"off","style/lines-between-class-members":"off","style/no-tabs":"off","style/no-mixed-spaces-and-tabs":"off","style/generator-star-spacing":"off","style/yield-star-spacing":"off","style/function-call-spacing":"off","style/template-tag-spacing":"off","style/no-whitespace-before-property":"off","style/no-mixed-operators":"off","style/indent-binary-ops":"off","ts/type-generic-spacing":"off","ts/type-named-tuple-spacing":"off","markdown/heading-increment":"warn","markdown/heading-style":"warn","markdown/no-missing-space-atx":"error","markdown/no-multiple-space-atx":"error","markdown/no-missing-space-closed-atx":"error","markdown/no-multiple-space-closed-atx":"error","markdown/blanks-around-headings":"warn","markdown/heading-start-left":"warn","markdown/no-duplicate-heading":"warn","markdown/single-title":"warn","markdown/no-trailing-punctuation":"warn","markdown/ul-style":"warn","markdown/list-indent":"error","markdown/ul-indent":"warn","markdown/ol-prefix":"warn","markdown/list-marker-space":"error","markdown/blanks-around-lists":"warn","markdown/no-trailing-spaces":"error","markdown/no-hard-tabs":"error","markdown/no-multiple-blanks":"warn","markdown/no-multiple-space-blockquote":"error","markdown/no-blanks-blockquote":"warn","markdown/blanks-around-fences":"warn","markdown/single-trailing-newline":"error","markdown/blanks-around-tables":"warn","markdown/no-reversed-links":"error","markdown/no-bare-urls":"warn","markdown/no-space-in-links":"error","markdown/no-empty-links":"error","markdown/link-fragments":"warn","markdown/reference-links-images":"warn","markdown/link-image-reference-definitions":"warn","markdown/link-image-style":"warn","markdown/descriptive-link-text":"warn","markdown/line-length":"off","markdown/commands-show-output":"warn","markdown/fenced-code-language":"warn","markdown/code-block-style":"off","markdown/code-fence-style":"warn","markdown/no-emphasis-as-heading":"warn","markdown/no-space-in-emphasis":"warn","markdown/no-space-in-code":"warn","markdown/emphasis-style":"warn","markdown/strong-style":"warn","markdown/no-inline-html":"off","markdown/hr-style":"warn","markdown/first-line-heading":"off","markdown/required-headings":"off","markdown/proper-names":"off","markdown/no-alt-text":"warn","markdown/table-pipe-style":"warn","markdown/table-column-count":"warn","markdown/table-column-style":"warn","lockfile/validate-host":["warn",{allowedHosts:["npm","yarn"]}],"lockfile/validate-https":"error","lockfile/validate-integrity":["warn",{requiredAlgorithm:"sha512"}],"lockfile/validate-package-names":"error","lockfile/validate-scheme":["error",{allowedSchemes:["https:","git+https:","git+ssh:"]}],"publint/exports-types-should-be-first":"error","publint/exports-default-should-be-last":"error","publint/exports-module-should-precede-require":"error","publint/exports-value-invalid":"error","publint/imports-key-invalid":"error","publint/imports-value-invalid":"error","publint/imports-default-should-be-last":"error","publint/imports-module-should-precede-require":"error","publint/use-type":"warn","publint/deprecated-field-jsnext":"warn","publint/field-invalid-value-type":"error","publint/local-dependency":"error","publint/has-module-but-no-exports":"warn","publint/exports-missing-root-entrypoint":"warn","publint/exports-fallback-array-use":"warn","publint/file-does-not-exist":"warn","publint/file-invalid-format":"warn","publint/module-should-be-esm":"error","publint/bin-file-not-executable":"error","publint/exports-module-should-be-esm":"error","shell/command-substitution":"error","shell/quote-variables":"warn","shell/no-cd-without-check":"warn","shell/no-eval":"error","shell/no-useless-cat":"warn","shell/shebang":"warn","shell/indent":"warn","shell/function-style":"warn","shell/operator-spacing":"warn","shell/keyword-spacing":"warn","shell/no-trailing-semicolons":"warn","shell/no-trailing-whitespace":"error","shell/prefer-double-brackets":"warn","shell/set-options":"off","shell/prefer-printf":"warn","shell/consistent-case-terminators":"warn","shell/no-broken-redirect":"error","shell/heredoc-indent":"warn","shell/no-ls-parsing":"warn","shell/no-variable-in-single-quotes":"warn","shell/no-exit-in-subshell":"warn","spell/check":"off","spell/check-comments":"off","spell/check-markdown":"off"},verbose:!0},Ze=new Set(["PICKIER_CONCURRENCY","PICKIER_DIAGNOSTICS","PICKIER_FAIL_ON_WARNINGS","PICKIER_NO_AUTO_CONFIG","PICKIER_RULE_TIMEOUT_MS","PICKIER_TIMEOUT_MS","PICKIER_TRACE","PICKIER_WORKERS"]),et=/^\.?(?:pickier|code-style|lint|config)(?:\.(?:pickier|code-style|lint|config))*\.(?:ts|js|mjs|cjs|mts|cts|json|jsonc)$/i,tt=new Set(["pickier",...xe]);function nt(e){for(let w of Object.keys(process.env))if(w.startsWith("PICKIER_")&&!Ze.has(w))return!0;let a=Ve(),n=[e,ce(e,"config"),ce(e,".config"),ce(a,".config","pickier"),ce(a,".config"),a];for(let w of n){let k;try{k=Xe(w,{withFileTypes:!0})}catch{continue}for(let C of k){if(C.isDirectory())continue;if(et.test(C.name))return!0}}let s;try{s=Qe(ce(e,"package.json"),"utf8")}catch{return!1}try{let w=JSON.parse(s);return w!==null&&typeof w==="object"&&Object.keys(w).some((k)=>tt.has(k))}catch{return!0}}var pe=null;async function Y(){if(!pe)if(!nt(process.cwd()))pe=l;else{let{loadConfig:e}=await import("./chunk-qjzzx1m2.js");pe=await e({name:"pickier",alias:[...xe],defaultConfig:l})}return pe}var W=l;var rt=new Set([".ts",".js"]),st=new Set([".json",".jsonc"]),it=new Set([".yaml",".yml"]),ot=new Set([".sh",".bash",".zsh",".ksh",".dash"]),at=new Set([".md",".mdx",".markdown"]),lt=/^#!\s*(?:\/usr\/bin\/env\s+)?(?:ba|z|k|da)?sh\b/;var ct=/^[}\])]/,ft=/\s*\/\/.*$/,ut=/^(?:if|else\s+if|for|while)\s*\(/,pt=/^(?:\.[\w$[]|\?[\s.:]|:\s|&&|\|\|)/;function dt(e){let a=e.charCodeAt(0);if(a!==105&&a!==101&&a!==102&&a!==119&&a!==100)return!1;let n=ut.exec(e);if(!n)return/^(?:else|do)\s*$/.test(e);let s=0,w=null;for(let k=n[0].length-1;k<e.length;k++){let C=e[k];if(w){if(C==="\\"){k++;continue}if(C===w)w=null;continue}if(C==="'"||C==='"'||C==="`"){w=C;continue}if(C==="(")s++;else if(C===")"){if(s--,s===0)return e.slice(k+1).trim().length===0}}return!1}var mt=/^\s*for\s*\(/,gt=new RegExp("^\\s*;\\s*$"),ht=new RegExp(";{2,}\\s*$"),yt=/([\w)])\{/g,wt=/\{(return|if|for|while|switch|const|let|var|function)\b/g,bt=/,(\S)/g,kt=/(?<![=!<>+\-*/%&|^?])=(?![=><])/g,Ct=/(\w)\+(\w)/g,xt=/(\w)-(\w)/g,St=/(\w)\*(\w)/g,Et=/(\w)\/(\w)/g,_t=new RegExp("(?<=\\S);([^\\s;])","g"),Rt=/([\w)\]])<(\d)/g,It=/([\w)\]])>(\d)/g,Se=/\s{2,}/g,Ee=/^\s*$/,Ot=/^\s*\/\//,_e=/^\s*\/\*/,vt=/^\s*import\b/,Re=/\bfrom\s*['"][^'"]+['"]|^\s*import\s+['"][^'"]+['"]/,At=/package\.json$/i,Tt=/[jt]sconfig(?:\..+)?\.json$/i,le=/[ \t]+$/,Nt=/^\n+/;function ue(e){let a=e.lastIndexOf(".");return a>=0?e.slice(a):""}function de(e){return rt.has(ue(e))}function Pt(e){return st.has(ue(e))}function $t(e){return it.has(ue(e))}function Mt(e){return at.has(ue(e))}function Lt(e){return ot.has(ue(e))}function jt(e,a){return Lt(e)||lt.test(a)}function Ft(e,a){let n=e.split(`
3
+ `),s=n.length,w=Array(s),k=a.format.indent,C=a.format.indentStyle==="tabs",x=0,A=new g,N=!1,O="",j=!1,D=0;for(let U=0;U<s;U++){let B=n[U];if(B.length===0||/^\s*$/.test(B)){w[U]="";continue}if(N){if(w[U]=B,B.trim()===O)N=!1,O="";continue}let se=i(B);if(se)N=!0,O=se;let re=0;while(re<B.length&&(B.charCodeAt(re)===32||B.charCodeAt(re)===9))re++;let F=B.slice(re).trimEnd();if(F.startsWith("#")&&U>0){let J=C?"\t".repeat(x):" ".repeat(x*k);w[U]=J+F;continue}let te=A.read(F);if(/^case\b/.test(F)&&/\bin\s*$/.test(F))D++,j=!0;if(/^esac\b/.test(F)){if(D=Math.max(0,D-1),D===0)j=!1}let ae=j&&/\)\s*$/.test(F)&&!/\$\(/.test(F)&&!/^\s*\(/.test(F)&&!F.startsWith("#"),oe=/^;[;&]\s*$/.test(F),_=/^(?:fi|done|esac|elif|else)\b/.test(F)||/^\}/.test(F);if(!te.continuation&&_)x=Math.max(0,x-1);if(!te.continuation&&oe)x=Math.max(0,x-1);let S=x+Number(te.continuation),ne=C?"\t".repeat(S):" ".repeat(S*k);if(w[U]=ne+F,te.continuation){if(te.closesHeader)x++;continue}if(/^then\b/.test(F)||/^do\b/.test(F)||/^else\b/.test(F))x++;else if(/^if\b/.test(F)&&/\bthen\s*$/.test(F))x++;else if(/^elif\b/.test(F)&&/\bthen\s*$/.test(F))x++;else if(/^(?:while|for|until)\b/.test(F)&&/\bdo\s*$/.test(F))x++;else if(/^case\b/.test(F)&&/\bin\s*$/.test(F))x++;else if(ae)x++;else if(/\{\s*$/.test(F)&&!F.startsWith("#"))x++}return w.join(`
4
+ `)}function Dt(e,a){try{let n=Bun.YAML.parse(e),s=a.format.indentStyle==="tabs"?"\t":a.format.indent;return Bun.YAML.stringify(n,null,s).split(`
5
+ `).map((k)=>k.replace(/[ \t]+$/,"")).join(`
6
+ `)}catch{return e}}var Ie=Array.from({length:129},(e,a)=>" ".repeat(a));function Wt(e){if(e<=0)return"";return e<Ie.length?Ie[e]:" ".repeat(e)}function Ut(e,a){if((a.format.indentStyle||"spaces")==="tabs")return"\t".repeat(Math.max(0,e));return Wt(Math.max(0,e*a.format.indent))}function Gt(e){return`'${e.slice(1,-1).replace(/\\"/g,'"')}'`}function Kt(e){return`"${e.slice(1,-1).replace(/\\'/g,"'")}"`}function Bt(e,a){for(let n=0;n<e.length;n++){if(e[n]==="\\"){n++;continue}if(e[n]===a)return!0}return!1}function zt(e,a,n){if(!de(n))return e;let s=e.split(`
7
+ `);for(let w=0;w<s.length;w++)s[w]=Me(s[w],a);return s.join(`
8
+ `)}function Me(e,a){let n=a==="single";if(n?!e.includes('"'):!e.includes("'"))return e;let s=[],w=0,k=0,C=0,x=0;while(w<e.length){let A=e[w];if(C===0){if(A==="/"){let N=e[w+1];if(N==="/")break;if(N==="*"){let O=e.indexOf("*/",w+2);w=O===-1?e.length:O+2;continue}if(Be(e,w)){let O=ze(e,w);if(O!==-1){w=O;continue}}w++;continue}if(A==='"'){C=2,x=w,w++;continue}if(A==="'"){C=1,x=w,w++;continue}if(A==="`"){C=3,w++;continue}w++}else if(C===3){if(A==="\\"){w+=2;continue}if(A==="`")C=0;w++}else{if(A==="\\"){w+=2;continue}if(A===(C===1?"'":'"')){let O=e.slice(x+1,w);if((C===2&&n||C===1&&!n)&&!Bt(O,n?"'":'"')){if(x>k)s.push(e.slice(k,x));if(C===2)s.push(Gt(`"${O}"`));else s.push(Kt(`'${O}'`));k=w+1}C=0,w++;continue}w++}}if(s.length===0)return e;if(k<e.length)s.push(e.slice(k));return s.join("")}function Ht(e){return e===123||e===44||e===61||e===43||e===45||e===42||e===47||e===59||e===60||e===62}var Jt=/\s/;function qt(e,a){let n=!1;for(let s=a;s<e.length;s++){let w=e.charCodeAt(s),k=w===32||w>=9&&w<=13||w>=128&&Jt.test(e[s]);if(k&&n)return!0;n=k}return!1}var Le=1,je=2,Fe=4,De=8,We=16,Ue=32;function ye(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95}function Yt(e){let a=0;for(let n=1;n<e.length-1;n++){let s=e.charCodeAt(n);if(s===43||s===45||s===42||s===47){if(ye(e.charCodeAt(n-1))&&ye(e.charCodeAt(n+1)))a|=s===43?Le:s===45?je:s===42?Fe:De}else if(s===60||s===62){let w=e.charCodeAt(n+1),k=e.charCodeAt(n-1);if(w>=48&&w<=57&&(ye(k)||k===41||k===93))a|=s===60?We:Ue}}return a}function Xt(e,a){if(a+e.length<4)return e;let n=0;while(n<e.length&&(e[n]===" "||e[n]==="\t"))n++;if(n<e.length){let A=e[n];if(A==="/"&&(e[n+1]==="/"||e[n+1]==="*"))return e;if(A==="*")return e}let s=!1;for(let A=n;A<e.length;A++)if(Ht(e.charCodeAt(A))){s=!0;break}if(!s)return e;let{text:w,strings:k}=tn(e),C=w;if(C.includes("{"))C=C.replace(yt,"$1 {"),C=C.replace(wt,"{ $1");if(C.includes(","))C=C.replace(bt,", $1");if(C.includes("="))C=C.replace(kt," = ");let x=Yt(C);if(x&Le)C=C.replace(Ct,"$1 + $2");if(x&je)C=C.replace(xt,"$1 - $2");if(x&Fe)C=C.replace(St,"$1 * $2");if(x&De)C=C.replace(Et,"$1 / $2");if(C.includes(";"))C=C.replace(_t,"; $1");if(x&We)C=C.replace(Rt,"$1 < $2");if(x&Ue)C=C.replace(It,"$1 > $2");if(qt(C,n))if(n>0){let A=C.slice(n);C=C.slice(0,n)+A.replace(Se," ")}else C=C.replace(Se," ");return k.length>0?nn(C,k):C}function me(e){let a=e[e.length-1];return a!==void 0&&a.t==="tmpl"}function Ge(e,a,n){a++;while(a<e.length){let s=e[a];if(s==="\\"){a+=2;continue}if(s===n)return a+1;a++}return a}function we(e,a){for(let s of a)if(s.t==="tmpl")s.start=-1;let n=0;while(n<e.length){let s=a[a.length-1],w=e[n];if(s===void 0||s.t==="interp"){if(w==="`"){a.push({t:"tmpl",start:n}),n++;continue}if(w==="'"||w==='"'){n=Ge(e,n,w);continue}if(w==="/"&&e[n+1]==="/")break;if(s!==void 0){if(w==="{"){s.braces++,n++;continue}if(w==="}"){if(s.braces===0)a.pop();else s.braces--;n++;continue}}n++}else{if(w==="\\"){n+=2;continue}if(w==="`"){a.pop(),n++;continue}if(w==="$"&&e[n+1]==="{"){a.push({t:"interp",braces:0}),n+=2;continue}n++}}if(me(a)){for(let s of a)if(s.t==="tmpl"&&s.start>=0)return s.start}return-1}function Oe(e,a){let n=a,s=null,w=0;while(w<e.length){let k=e[w];if(n){if(k==="*"&&e[w+1]==="/"){n=!1,w+=2;continue}w++;continue}if(s){if(k==="\\"){w+=2;continue}if(k===s)s=null;w++;continue}if(k==="'"||k==='"'||k==="`"){s=k,w++;continue}if(k==="/"){if(e[w+1]==="/")break;if(e[w+1]==="*"){n=!0,w+=2;continue}}w++}return n}function ve(e,a){let n=e.length,s=Array(n),w=a.format.quotes,k=a.format.semi===!0,C=0,x=0,A=!1,N=[];for(let O=0;O<n;O++){let j=e[O];if(A){A=Oe(j,!0),s[O]=j;continue}let D=me(N),U=-1;if(N.length>0||j.indexOf("`")!==-1)U=we(j,N);if(D){s[O]=j;continue}if(U<0&&N.length===0)A=j.includes("/*")&&Oe(j,!1);let B="",se=!1,re="";if(U>=0){B=j.slice(U);let J=j.slice(0,U);if(J.length===0){s[O]=B;continue}if(se=le.test(J),J.trim().length===0)re=J;j=J}if(j.length===0){s[O]="";continue}j=Me(j,w);let F=0;while(F<j.length&&(j.charCodeAt(F)===32||j.charCodeAt(F)===9))F++;let te=j.slice(F).trimEnd();if(ct.test(te))C=Math.max(0,C-1);let ae=pt.test(te)?1:0,oe=a.format.preserveCodeIndentation?j.slice(0,F):Ut(C+x+ae,a),_=te.charCodeAt(te.length-1);if(_===123||_===91||_===40)C+=1,x=0;else if(!te.startsWith("//")&&!te.startsWith("*")&&!te.startsWith("/*")){let J=te.includes("//")?te.replace(ft,""):te;x=dt(J)?x+1:0}let S=Xt(te,oe.length),ne=!1;if(k){if(!mt.test(S))if(gt.test(S))ne=!0;else S=S.replace(ht,";")}if(ne)j="";else if(a.format.trimTrailingWhitespace)S=S.trimEnd(),j=S.length===0?"":oe+S;else j=oe+S;if(U>=0){if(re)j=re;else if(se&&!le.test(j))j+=" ";j+=B}s[O]=j}return s}var Ae=/^[ \t]*(`{3,}|~{3,})(.*)$/,Qt=/^ {0,3}#{1,6}(?:[ \t]|$)/;function Vt(e,a){let n=a.format.trimTrailingWhitespace,s=Math.max(0,a.format.maxConsecutiveBlankLines),w=[],k=0,C="",x=0;for(let A=0;A<e.length;A++){let N=e[A];if(C!==""){let B=N.indexOf(C)!==-1?Ae.exec(N):null;if(B&&B[1][0]===C&&B[1].length>=x&&B[2].trim()==="")C="",w.push(n?N.replace(le,""):N);else w.push(N);continue}if(N.length===0||N.trim()===""){if(k++,k<=s)w.push("");continue}if(k=0,N.indexOf("```")!==-1||N.indexOf("~~~")!==-1){let B=Ae.exec(N);if(B&&!(B[1][0]==="`"&&B[2].includes("`"))){C=B[1][0],x=B[1].length,w.push(n?N.replace(le,""):N);continue}}let O=N.charCodeAt(N.length-1);if(!n||O!==32&&O!==9){w.push(N);continue}let j=N.replace(le,""),D=e[A+1],U=N.endsWith(" ")&&D!==void 0&&D.trim()!==""&&!Qt.test(N);w.push(U?`${j} `:j)}return w}function Zt(e,a){let n=[],s=0,w=[];for(let k of e){let C=me(w);if(w.length>0||k.indexOf("`")!==-1)we(k,w);if(C){n.push(k),s=0;continue}if(k===""){if(s++,s<=a)n.push("")}else s=0,n.push(k)}return n}function d(e,a,n){if(e.length===0)return"";let w=(e.includes("\r")?e.replace(/\r\n/g,`
9
+ `):e).split(`
10
+ `),k;if(Mt(n))k=Vt(w,a);else if(a.format.trimTrailingWhitespace){k=[];let x=0,A=Math.max(0,a.format.maxConsecutiveBlankLines),N=[];for(let O of w){let j=me(N),D=!1;if(N.length>0||O.indexOf("`")!==-1)D=we(O,N)>=0;if(j||D){k.push(O),x=0;continue}let U=O[O.length-1],B=U===" "||U==="\t"?O.replace(le,""):O;if(B===""){if(x++,x<=A)k.push("")}else x=0,k.push(B)}}else k=Zt(w,Math.max(0,a.format.maxConsecutiveBlankLines));let C;if(de(n)&&!(k.length>0&&k[0].startsWith("#!"))){let x=0;while(x<k.length&&k[x]==="")x++;if(x>0)k=k.slice(x);return k=He(k)??k,C=ve(k,a).join(`
11
+ `),Te(C,a)}if(C=k.join(`
12
+ `),C=C.replace(Nt,""),de(n))C=R(C);if($t(n)){let x=Dt(C,a);if(x!==C)C=x}if(Pt(n)){let x=an(C,n);if(x!=null)C=x}if(jt(n,C))C=Ft(C,a);else if(de(n))C=ve(C.split(`
13
+ `),a).join(`
14
+ `);else C=zt(C,a.format.quotes,n);return Te(C,a)}function Te(e,a){let n=e.length;while(n>0&&e.charCodeAt(n-1)===10)n--;if(a.format.finalNewline==="none")return n===e.length?e:e.slice(0,n);let s=a.format.finalNewline==="two"?`
15
+
16
+ `:`
17
+ `;if(e.length-n===s.length)return e;return e.slice(0,n)+s}function Ne(e,a,n,s){for(let w=a+1;w<e.length;w++){let k=e[w];if(k==="\\"){w++;continue}if(k===n)return!0;if(k===s)return!1}return!0}function M(e,a){if(/^\s*\/\/\/\s*<reference/.test(e))return[];let n=[],s=null,w=!1;for(let k=0;k<e.length;k++){let C=e[k];if(w){w=!1;continue}if(C==="\\"){w=!0;continue}if(!s){if(C==="/"&&e[k+1]==="/")break;if(C==="'"){if(a==="double"&&Ne(e,k,"'",'"'))n.push(k);s="single";continue}else if(C==='"'){if(a==="single"&&Ne(e,k,'"',"'"))n.push(k);s="double";continue}else if(C==="`"){s="template";continue}}else if(s==="single"&&C==="'"||s==="double"&&C==='"'||s==="template"&&C==="`"){s=null;continue}}return n}function E(e,a,n="spaces",s){if(n==="tabs")return/[^\t]/.test(e);if(/\t/.test(e))return!0;let w=e.length;if(s&&w%a===1){let k=s.trimStart();if(k.startsWith("* ")||k.startsWith("*/")||k==="*")return!1}return w%a!==0}function Ke(e,a){let n=a+1;while(n<e.length){let s=e[n];if(s==="\\"){n+=2;continue}if(s==="`")return n+1;if(s==="$"&&e[n+1]==="{"){n+=2;let w=1;while(n<e.length&&w>0){let k=e[n];if(k==="\\"){n+=2;continue}if(k==="`"){n=Ke(e,n);continue}if(k==="'"||k==='"'){n=Ge(e,n,k);continue}if(k==="{")w++;else if(k==="}")w--;n++}continue}n++}return n}var en=new Set(["return","typeof","instanceof","in","of","new","delete","void","do","else","case","yield","await"]);function Be(e,a){let n=a-1;while(n>=0&&(e[n]===" "||e[n]==="\t"))n--;if(n<0)return!0;let s=e[n];if("(,=:[!&|?;{}<>+-*%^~".includes(s))return!0;if(/[\w$]/.test(s)){let w=n;while(w>=0&&/[\w$]/.test(e[w]))w--;return en.has(e.slice(w+1,n+1))}return!1}function ze(e,a){let n=a+1,s=!1,w=-1;while(n<e.length){let k=e[n];if(k==="\\"){n+=2;continue}if(k==="["&&!s)s=!0,w=n;else if(k==="]"&&s){let C=e[w+1]==="^"?w+2:w+1;if(n!==C)s=!1}else if(k==="/"&&!s){n++;while(n<e.length&&/[a-z]/i.test(e[n]))n++;return n}n++}return-1}function tn(e){if(!e.includes("'")&&!e.includes('"')&&!e.includes("`")&&!e.includes("/"))return{text:e,strings:[]};let a=[],n=[],s=0,w=0;while(s<e.length){let k=e[s];if(k==="/"){let C=e[s+1];if(C==="/"){if(s>w)n.push(e.slice(w,s));a.push(e.slice(s)),n.push(`@@S${a.length-1}@@`),w=e.length;break}if(C==="*"){let x=e.indexOf("*/",s+2),A=x===-1?e.length:x+2;if(s>w)n.push(e.slice(w,s));a.push(e.slice(s,A)),n.push(`@@S${a.length-1}@@`),s=A,w=s;continue}if(Be(e,s)){let x=ze(e,s);if(x!==-1){if(s>w)n.push(e.slice(w,s));a.push(e.slice(s,x)),n.push(`@@S${a.length-1}@@`),s=x,w=s;continue}}s++;continue}if(k==="'"||k==='"'||k==="`"){if(s>w)n.push(e.slice(w,s));let C=s;if(k==="`")s=Ke(e,s);else{let x=k;s++;while(s<e.length){if(e[s]==="\\"){s+=2;continue}if(e[s]===x){s++;break}s++}}a.push(e.slice(C,s)),n.push(`@@S${a.length-1}@@`),w=s;continue}s++}if(w<e.length)n.push(e.slice(w));return{text:n.join(""),strings:a}}function nn(e,a){if(a.length===0)return e;let n="",s=0,w=e.indexOf("@@S");while(w!==-1){let k=w+3;while(k<e.length&&e.charCodeAt(k)>=48&&e.charCodeAt(k)<=57)k++;if(k>w+3&&e.charCodeAt(k)===64&&e.charCodeAt(k+1)===64)n+=e.slice(s,w)+(a[Number(e.slice(w+3,k))]??""),s=k+2,w=e.indexOf("@@S",s);else w=e.indexOf("@@S",w+1)}return s===0?e:n+e.slice(s)}function Pe(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36}function rn(e,a){let n=0;while(!0){let s=e.indexOf(a,n);if(s===-1)return!1;if(n=s+1,Pe(e.charCodeAt(s+a.length)))continue;let w=s-1,k=!0;while(w>=0){let C=e.charCodeAt(w);if(!Pe(C))break;if(C<48||C>57){k=!1;break}w--}if(k)return!0}}function R(e){let a=e[0];if(a!=="i"&&a!==" "&&a!=="\t"&&a!=="/"&&a!==`
18
+ `)return e;let n=He(e.split(`
19
+ `));return n===null?e:n.join(`
20
+ `)}function He(e){let a=e.length===0?void 0:e[0].length>0?e[0][0]:e.length>1?`
21
+ `:void 0;if(a!=="i"&&a!==" "&&a!=="\t"&&a!=="/"&&a!==`
22
+ `)return null;let n=[],s=[],w=[],k=0,C=0,x=-1,A=!1;while(k<e.length){let _=e[k];if(Ee.test(_)){k++;continue}if(Ot.test(_)||_e.test(_)){let ee=k;if(_e.test(_)){while(k<e.length&&!e[k].includes("*/"))k++;k++}else k++;if(!A){for(let ie=ee;ie<k&&ie<e.length;ie++)s.push(e[ie]);C=k}else if(x<0)x=ee;continue}if(!vt.test(_))break;let S=_.trim(),ne=k+1;while(!Re.test(S)&&ne<e.length&&ne-k<50)S+=` ${e[ne].trim()}`,ne++;if(!Re.test(S))return null;let J=on(S);if(!J)return null;if(x>=0){for(let ee=x;ee<k;ee++)if(!Ee.test(e[ee]))w.push(e[ee]);x=-1}n.push(J),k=ne,C=k,A=!0}if(n.length===0)return null;let N=x>=0?x:C,O=e.slice(N),j=0;while(j<O.length&&O[j]==="")j++;let D=j===0?O:O.slice(j),U=new Map,B=(_)=>{let S=U.get(_);if(S===void 0){S=!1;for(let ne of O)if(rn(ne,_)){S=!0;break}U.set(_,S)}return S};for(let _ of n){if(_.kind!=="value")continue;_.named=_.named.filter((S)=>{if(S.alias)return!0;return B(S.name)})}let se=n.filter((_)=>{if(_.kind==="side-effect")return!0;if(_.kind==="type")return _.namedTypes.length>0;return Boolean(_.defaultName||_.namespaceName||_.named.length>0)}),re=new Map;for(let _ of se){let S=re.get(_.source)||{};if(_.kind==="side-effect")S.side=S.side||[],S.side.push(_);else if(_.kind==="type"){if(!S.type)S.type={kind:"type",source:_.source,named:[],namedTypes:[],original:""};S.type.namedTypes=(S.type.namedTypes||[]).concat(_.namedTypes)}else{if(!S.value)S.value={kind:"value",source:_.source,named:[],namedTypes:[],original:""};if(_.defaultName)S.value.defaultName=_.defaultName;if(_.namespaceName)S.value.namespaceName=_.namespaceName;if(S.value.named=(S.value.named||[]).concat(_.named),_.namedTypes.length>0){if(!S.type)S.type={kind:"type",source:_.source,named:[],namedTypes:[],original:""};S.type.namedTypes=S.type.namedTypes.concat(_.namedTypes)}}re.set(_.source,S)}let F=[];for(let[_,S]of re){if(S.side)F.push(...S.side);if(S.value){let ne=(J)=>{if(!J.alias)return J;return/^[A-Z]$/i.test(J.name)&&/^[A-Z]$/i.test(J.alias)?{name:J.alias,alias:J.name}:J};S.value.named=S.value.named.map(ne),S.value.named.sort((J,ee)=>J.name.localeCompare(ee.name)),F.push(S.value)}if(S.type&&S.type.namedTypes.length>0){let ne=new Set,J=(ee)=>{if(!ee.alias)return ee;return/^[A-Z]$/i.test(ee.name)&&/^[A-Z]$/i.test(ee.alias)?{name:ee.alias,alias:ee.name}:ee};S.type.namedTypes=S.type.namedTypes.map(J).filter((ee)=>{let ie=`${ee.name}|${ee.alias||""}`;if(ne.has(ie))return!1;return ne.add(ie),!0}),S.type.namedTypes.sort((ee,ie)=>ee.name.localeCompare(ie.name)),F.push(S.type)}}let te=(_)=>_.startsWith(".")?2:_.startsWith("node:")?0:1,ae=(_)=>{if(_.kind!=="value")return 99;if(_.defaultName)return 0;if(_.namespaceName)return 1;return 2};if(F.sort((_,S)=>{if(_.kind!==S.kind){if(_.kind==="type")return-1;if(S.kind==="type")return 1;if(_.kind==="side-effect")return-1;if(S.kind==="side-effect")return 1}if(_.kind==="type"&&S.kind==="type"){let ne=te(_.source),J=te(S.source);if(ne!==J)return ne-J;return _.source.localeCompare(S.source)}if(_.kind==="value"&&S.kind==="value"){let ne=te(_.source),J=te(S.source);if(ne!==J)return ne-J;let ee=ae(_),ie=ae(S);if(ee!==ie)return ee-ie;return _.source.localeCompare(S.source)}return _.source.localeCompare(S.source)}),F.length===0){if(s.length>0||w.length>0)return[...s,...w,...D.length>0?D:[""]];return D}let oe=[...s];for(let _ of F){let S=sn(_);if(S.includes(`
23
+ `))oe.push(...S.split(`
24
+ `));else oe.push(S)}return oe.push(...w),oe.push(""),oe.push(...D),oe}function sn(e){if(e.kind==="side-effect")return`import '${e.source}'`;if(e.kind==="type")return`import type { ${e.namedTypes.map((w)=>w.alias?`${w.name} as ${w.alias}`:w.name).join(", ")} } from '${e.source}'`;let a=[];if(e.defaultName)a.push(e.defaultName);if(e.namespaceName)a.push(`* as ${e.namespaceName}`);if(e.named.length>0){let s=e.named.map((w)=>w.alias?`${w.name} as ${w.alias}`:w.name).join(", ");a.push(`{ ${s} }`)}return`import ${a.join(", ")} from '${e.source}'`}function on(e){let a=e.match(/^\s*import\s+['"]([^'"]+)['"]/);if(a)return{kind:"side-effect",source:a[1],named:[],namedTypes:[],original:e};if(a=e.match(/^\s*import\s+type\s+\{([^}]*)\}\s+from\s+['"]([^'"]+)['"]/),a){let D=a[1],U=a[2],B=D.split(",").map((se)=>se.trim()).filter(Boolean).map((se)=>{let re=se.match(/^(\w+)(?:\s+as\s+(\w+))?$/);return{name:re?.[1]||se,alias:re?.[2]}});return{kind:"type",source:U,named:[],namedTypes:B,original:e}}let n=e.match(/^\s*import\s+/),s=new RegExp(`\\sfrom\\s+['"]([^'"]+)['"]\\s*;?$`),w=e.match(s);if(!n||!w)return;let k=w[1],C=e.slice(n[0].length,w.index).trim(),x,A,N=[],O=[],j=C.match(/\{([^}]*)\}/);if(j){let U=j[1].split(",").map((B)=>B.trim()).filter(Boolean);for(let B of U){let se=/^type\s+/.test(B),F=B.replace(/^type\s+/,"").match(/^(\w+)(?:\s+as\s+(\w+))?$/);if(!F)continue;let te={name:F[1],alias:F[2]};if(se)O.push(te);else N.push(te)}C=C.replace(/\{[\s\S]*?\}/,"").trim()}if(C.length>0){let D=C.split(",").map((U)=>U.trim()).filter(Boolean);for(let U of D)if(U.startsWith("* as "))A=U.slice(5).trim();else if(/^\w+$/.test(U))x=U}return{kind:"value",source:k,defaultName:x,namespaceName:A,named:N,namedTypes:O,original:e}}function an(e,a){if(At.test(a))return ln(e);if(Tt.test(a))return cn(e);return null}function Je(e){try{return JSON.parse(e)}catch{return null}}function fe(e,a,n=[]){let s={};for(let k of a)if(Object.prototype.hasOwnProperty.call(e,k))s[k]=e[k];for(let k of n){let C=Object.keys(e).filter((x)=>k.test(x)&&!(x in s)).sort();for(let x of C)s[x]=e[x]}let w=Object.keys(e).filter((k)=>!(k in s)).sort();for(let k of w)s[k]=e[k];return s}function $e(e){let a={};for(let n of Object.keys(e).sort())a[n]=e[n];return a}function ln(e){let a=Je(e);if(!a||typeof a!=="object")return e;let s=fe(a,["publisher","name","displayName","type","version","private","packageManager","description","author","contributors","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","imports","exports","main","module","unpkg","jsdelivr","types","typesVersions","bin","icon","files","engines","activationEvents","contributes","scripts","peerDependencies","peerDependenciesMeta","dependencies","optionalDependencies","devDependencies","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"]);if(Array.isArray(s.files)){if(s.files.every((C)=>typeof C==="string"))s.files=[...s.files].sort()}for(let k of Object.keys(s))if(/^(?:dev|peer|optional|bundled)?[Dd]ependencies(?:Meta)?$/.test(k)||/^(?:resolutions|overrides|pnpm\.overrides)$/.test(k)){if(s[k]&&typeof s[k]==="object")s[k]=$e(s[k])}if(s.pnpm&&typeof s.pnpm==="object"&&s.pnpm.overrides&&typeof s.pnpm.overrides==="object")s.pnpm.overrides=$e(s.pnpm.overrides);if(s.exports&&typeof s.exports==="object"){let k=s.exports,C=["types","import","require","default"];if(!Array.isArray(k)){let x={};for(let A of Object.keys(k)){let N=k[A];if(N&&typeof N==="object"&&!Array.isArray(N))x[A]=fe(N,C);else x[A]=N}s.exports=x}}let w=["pre-commit","prepare-commit-msg","commit-msg","post-commit","pre-rebase","post-rewrite","post-checkout","post-merge","pre-push","pre-auto-gc"];for(let k of["gitHooks","husky","simple-git-hooks"])if(s[k]&&typeof s[k]==="object")s[k]=fe(s[k],w);return JSON.stringify(s,null,2)}function cn(e){let a=Je(e);if(!a||typeof a!=="object")return e;let s=fe(a,["extends","compilerOptions","references","files","include","exclude"]);if(s.compilerOptions&&typeof s.compilerOptions==="object"){let w=["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedDeclarations","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"];s.compilerOptions=fe(s.compilerOptions,w)}return JSON.stringify(s,null,2)}import{readdirSync as fn,readFileSync as un,statSync as ke}from"fs";import{extname as pn,isAbsolute as ge,join as he,resolve as dn}from"path";var P=5;function mn(e){let a="",n=0;while(n<e.length){let s=e[n];if(s==="*")if(e[n+1]==="*"){if(a+=".*",n+=2,e[n]==="/")n++}else a+="[^/]*",n++;else if(s==="?")a+="[^/]",n++;else if(s==="["){let w=e.indexOf("]",n);if(w===-1)a+="\\[",n++;else a+=e.slice(n,w+1),n=w+1}else if(".+^${}()|\\".includes(s))a+=`\\${s}`,n++;else a+=s,n++}return new RegExp(`^${a}$`)}function*Ye(e,a,n){let s;try{s=fn(e)}catch{return}for(let w of s){if(!n&&w.startsWith("."))continue;let k=he(e,w);if(a(k))continue;let C;try{C=ke(k)}catch{continue}if(C.isDirectory())yield*Ye(k,a,n);else yield k}}function*qe(e,a,n,s){yield*Ye(e,h(a,s),n)}async function u(e,a={}){let n=a.cwd??process.cwd(),s=a.ignore??[],w=a.dot??!1,k=a.absolute??!0,C=h(s,n);if(typeof globalThis.Bun?.Glob<"u"){let A=globalThis.Bun.Glob,N=[];for(let O of e){if(!/[*?[{]/.test(O)){let D=ge(O)?O:he(n,O);if(ke(D,{throwIfNoEntry:!1})?.isFile()){if(!C(D))N.push(k?D:D.startsWith(`${n}/`)?D.slice(n.length+1):D);continue}}let j=new A(O);for await(let D of j.scan({cwd:n,dot:w,onlyFiles:a.onlyFiles??!0,followSymlinks:!1})){let U=ge(D)?D:he(n,D),B=U.startsWith(`${n}/`)?U.slice(n.length+1):U;if(C(U))continue;N.push(k?U:B)}}return N}let x=[];for(let A of e){if(!/[*?[{]/.test(A)){let O=ge(A)?A:he(n,A);try{if(!ke(O).isDirectory()){let D=O.startsWith(`${n}/`)?O.slice(n.length+1):O;if(!C(O))x.push(k?O:D)}else for(let D of qe(O,s,w,n))x.push(k?D:D.startsWith(`${n}/`)?D.slice(n.length+1):D)}catch{}continue}let N=mn(A);for(let O of qe(n,s,w,n)){let j=O.startsWith(`${n}/`)?O.slice(n.length+1):O;if(N.test(j)||N.test(j.replace(/\\/g,"/")))x.push(k?O:j)}}return x}function Z(e){let a=0,n=[],s=()=>{if(n.length>0&&a<e)a++,n.shift()()};return(w)=>new Promise((k,C)=>{let x=()=>{w().then((A)=>{a--,k(A),s()},(A)=>{a--,C(A),s()})};if(a<e)a++,x();else n.push(x)})}var r={get TRACE(){return process.env.PICKIER_TRACE==="1"},get TIMEOUT_MS(){return Number(process.env.PICKIER_TIMEOUT_MS||"8000")},get RULE_TIMEOUT_MS(){return Number(process.env.PICKIER_RULE_TIMEOUT_MS||"5000")},get CONCURRENCY(){return Number(process.env.PICKIER_CONCURRENCY)||8},get DIAGNOSTICS(){return process.env.PICKIER_DIAGNOSTICS==="1"},get FAIL_ON_WARNINGS(){return process.env.PICKIER_FAIL_ON_WARNINGS==="1"},get NO_AUTO_CONFIG(){return process.env.PICKIER_NO_AUTO_CONFIG==="1"},get WORKERS(){let e=process.env.PICKIER_WORKERS;if(e===void 0||e==="")return null;let a=Number(e);return Number.isFinite(a)?Math.max(0,Math.floor(a)):null}},L=["**/node_modules/**","**/.git/**"],f=["**/node_modules/**","**/dist/**","**/build/**","**/.git/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.vercel/**","**/.netlify/**","**/.cache/**","**/.turbo/**","**/.vscode/**","**/.idea/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/coverage/**","**/.nyc_output/**","**/.tmp/**","**/.temp/**","**/vendor/**","**/pantry/**","**/target/**","**/zig-cache/**","**/zig-out/**","**/.zig-cache/**","**/__pycache__/**","**/.pytest_cache/**","**/venv/**","**/.venv/**","**/out/**","**/.DS_Store","**/Thumbs.db"];function T(e,a){let n=e[a];if(n===void 0){let k=a.indexOf("/");if(k>0){let C=a.slice(0,k),x=a.slice(k+1),A=C==="general"?"pickier":C==="pickier"?"general":null;if(A)n=e[`${A}/${x}`];if(n===void 0)n=e[x]}}let s,w;if(typeof n==="string"){if(n==="error")s="error";else if(n==="warn"||n==="warning")s="warning"}else if(Array.isArray(n)&&typeof n[0]==="string"){let k=n[0];if(k==="error")s="error";else if(k==="warn"||k==="warning")s="warning";w=n[1]}return{enabled:!!s,severity:s,options:w}}function v(e){let a=Array.isArray(e)?e[0]:e;if(typeof a!=="string")return;if(a==="off")return"off";if(a==="error")return"error";if(a==="warn"||a==="warning")return"warning";return}function o(e,a,n=[],s){for(let k of[a,...n]){let C=v(e.rules?.[k])??v(e.pluginRules?.[k]);if(C)return C==="off"?void 0:C}let w=v(s);return w==="off"?void 0:w}function X(e,a){return v(e.rules?.[a])==="off"||v(e.pluginRules?.[a])==="off"}function y(e,a){return`\x1B[${e}m${a}\x1B[0m`}function V(e){return y("32",e)}function K(e){return y("31",e)}function z(e){return y("33",e)}function q(e){return y("34",e)}function G(e){return y("90",e)}function H(e){return y("1",e)}var t={green:V,red:K,yellow:z,blue:q,gray:G,bold:H};function p(e,a){let n=a.ignores?[...new Set([...e.ignores||[],...a.ignores])]:e.ignores,s={...e.pluginRules||{},...a.pluginRules||{}};if((a.tailwind??e.tailwind)?.enabled&&!Object.prototype.hasOwnProperty.call(s,"pickier/sort-tailwind-classes"))s["pickier/sort-tailwind-classes"]="warn";return{...e,...a,verbose:a.verbose??e.verbose,ignores:n,lint:{...e.lint,...a.lint||{}},format:{...e.format,...a.format||{}},rules:{...e.rules,...a.rules||{}},pluginRules:s}}var be=null;async function c(e){if(!e){if(r.NO_AUTO_CONFIG){if(!be)be=p(l,{});return be}try{let{getConfig:s}=await import("./chunk-m9ym248d.js"),w=await s();return p(l,w)}catch{}return p(l,{})}let a=ge(e)?e:dn(process.cwd(),e);if(pn(a).toLowerCase()===".json")try{let s=un(a,"utf8");return p(l,JSON.parse(s))}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),p(l,{})}try{let s=await import(a);return p(l,s.default||s)}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),p(l,{})}}function b(e){return e.map((a)=>{if(/[*?[\]{}()!]/.test(a))return a;if(/\.[A-Z0-9]+$/i.test(a))return a;return`${a.replace(/\/$/,"")}/**/*`})}function I(e,a){let n=e.lastIndexOf(".");if(n<0)return!1;let s=e.slice(n);return a.has(s)}function Ce(e){if(!e.includes("\\")&&!e.includes("//"))return e;return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function gn(e){let a=[];for(let n of e){let s=Ce(n.trim());if(!s)continue;let w=s.match(/\*\*\/\*\.(.+)$/);if(w){a.push({raw:s,kind:"extension",value:w[1]});continue}let k=s.match(/\*\*\/(.+?)\/\*\*$/);if(k){a.push({raw:s,kind:"segment",value:k[1]});continue}let C=s.match(/\*\*\/(.+)$/);if(C)a.push({raw:s,kind:"suffix",value:C[1].replace(/\/$/,"")})}return a}function m(e){return[...new Set([...L,...e])]}function h(e,a=process.cwd()){let n=gn([...L,...e]);if(n.length===0)return()=>!1;let s=new Set([...f,...L]),w=Ce(a).replace(/\/$/,""),k=`${w}/`,C=n.map((x)=>({pattern:x,universal:s.has(x.raw),suffix:x.kind==="extension"?`.${x.value}`:`/${x.value}`,inner:`/${x.value}/`}));return(x)=>{let A=Ce(x),N=A!==w&&!A.startsWith(k),O=N?A:A.slice(w.length);for(let{pattern:j,universal:D,suffix:U,inner:B}of C){if(N&&!D)continue;if(j.kind==="extension"){if(O.endsWith(U))return!0;continue}if(j.kind==="segment"||j.kind==="suffix"){if(O.includes(B)||O.endsWith(U))return!0}}return!1}}function Q(e,a){return h(a)(e)}
25
+ export{l,Y,W,d,M,E,R,P,u,Z,r,L,f,T,v,o,X,y,V,K,z,q,G,H,t,p,c,b,I,m,h,Q};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{s}from"./chunk-8m82hwdv.js";import{dirname as ne,resolve as ue}from"path";function c(e){try{let r=JSON.parse(e);if(typeof r!=="object"||r===null||Array.isArray(r))return null;return r}catch{return null}}function le(e,r){let t=e.split(`
3
+ `),o=1,n=0;for(let u of r){let i=new RegExp(`"${ce(u)}"\\s*:`);for(let l=n;l<t.length;l++)if(i.test(t[l])){o=l+1,n=l+1;break}}return o}function k(e){return ne(e)}function b(e,r){return ue(e,r)}function f(e){let r="pkg";for(let t of e)if(/^\d+$/.test(t))r+=`[${t}]`;else if(!/^[a-z_$][a-z0-9_$]*$/i.test(t))r+=`["${t}"]`;else r+=`.${t}`;return r}function d(e,r){if(e.publishConfig?.[r]!==void 0)return[e.publishConfig[r],["publishConfig",r]];return[e[r],[r]]}var ae=new RegExp(`(?:[\\s;]|^)(?:import[\\w,{}\\s*]*from|import\\s*['"*{]|export\\b\\s*(?:[*{]|default|type|function|const|var|let|async function)|import\\.meta\\b)`,"m"),pe=new RegExp("(?:[\\s;]|^)(?:module.exports\\b|exports\\.\\w|require\\s*\\(|global\\.\\w|Object\\.(?:defineProperty|defineProperties|assign)\\s*\\(\\s*exports\\b)","m");function I(e){let r=de(e),t=ae.test(r),o=pe.test(r);if(t&&o)return"mixed";if(t)return"ESM";if(o)return"CJS";return"unknown"}function H(e,r){if(e.endsWith(".mjs"))return"ESM";if(e.endsWith(".cjs"))return"CJS";return r==="module"?"ESM":"CJS"}function X(e){if(e==="ESM")return".mjs";if(e==="CJS")return".cjs";return".js"}function Y(e){return e===".mjs"||e===".cjs"}function P(e){return e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")}function G(e){return/^#!\s*\//.test(e)}function de(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*/g,"")}function x(e,r,t,o){E(e,r,t,o)}function E(e,r,t,o){if(typeof e==="string"){o(e,{path:r,isImports:t});return}if(Array.isArray(e)){o(e,{path:r,isImports:t});for(let n=0;n<e.length;n++)E(e[n],r.concat(String(n)),t,o);return}if(e!==null&&typeof e==="object"){let n=Object.keys(e);o(e,{path:r,isImports:t},n);for(let u of n)E(e[u],r.concat(u),t,o)}}function p(e,r,t,o,n,u,i){return{filePath:e,line:le(r,t),column:1,ruleId:o,message:n,severity:u,...i&&{help:i}}}function ce(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var L={meta:{docs:"Disallow deprecated jsnext:main and jsnext fields",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[];if(t["jsnext:main"]!=null)o.push(p(r.filePath,e,["jsnext:main"],"publint/deprecated-field-jsnext",'pkg["jsnext:main"] is deprecated. pkg.module should be used instead.',"warning",'The jsnext:main field is no longer recognized by modern bundlers. Use "module" instead.'));if(t.jsnext!=null)o.push(p(r.filePath,e,["jsnext"],"publint/deprecated-field-jsnext","pkg.jsnext is deprecated. pkg.module should be used instead.","warning",'The jsnext field is no longer recognized by modern bundlers. Use "module" instead.'));return o}};var M={meta:{docs:'Ensure "default" condition is last in exports objects',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"exports");if(n==null)return[];return x(n,u,!1,(i,l,a)=>{if(!a||typeof i!=="object"||Array.isArray(i))return;if(!("default"in i))return;if(a[a.length-1]!=="default")o.push(p(r.filePath,e,l.path.concat("default"),"publint/exports-default-should-be-last",`${f(l.path.concat("default"))} should be the last condition in the object so it doesn't take precedence over the keys following it.`,"error",'Conditions are resolved in order. "default" acts as a fallback and should come last.'))}),o}};var S={meta:{docs:"Warn against using fallback arrays in exports",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"exports");if(n==null)return[];return x(n,u,!1,(i,l)=>{if(!Array.isArray(i))return;o.push(p(r.filePath,e,l.path,"publint/exports-fallback-array-use",`${f(l.path)} uses fallback arrays which is not recommended. It works differently in some tools and may face inconsistent behaviors.`,"warning","Fallback arrays pick the first parseable value and have no practical use case in Node.js currently."))}),o}};var F={meta:{docs:"Ensure exports has a root entrypoint when main/module exist",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let[o]=d(t,"main"),[n]=d(t,"module"),[u,i]=d(t,"exports");if(o==null&&n==null||u==null)return[];if(typeof u!=="object"||Array.isArray(u))return[];let l=Object.keys(u);if(l.length===0)return[];if(!l[0]?.startsWith("."))return[];if(l.includes("."))return[];let m=[];if(o)m.push("main");if(n)m.push("module");return[p(r.filePath,e,i,"publint/exports-missing-root-entrypoint",`${f(i)} is missing the root entrypoint export, which is defined in pkg.${m[0]}. Environments that support "exports" will ignore pkg.${m[0]} as "exports" takes the highest priority.`,"warning",`Add ${f(i.concat("."))} to ensure the root entrypoint is accessible.`)]}};var w={meta:{docs:'Ensure "module" condition precedes "require" in exports',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"exports");if(n==null)return[];return x(n,u,!1,(i,l,a)=>{if(!a||typeof i!=="object"||Array.isArray(i))return;if(!("module"in i)||!("require"in i))return;if(a.indexOf("module")>a.indexOf("require"))o.push(p(r.filePath,e,l.path.concat("module"),"publint/exports-module-should-precede-require",`${f(l.path.concat("module"))} should come before the "require" condition so it can take precedence when used by a bundler.`,"error",'Bundlers prioritize conditions by order. "module" should precede "require" to ensure ESM is preferred.'))}),o}};var j={meta:{docs:'Ensure "types" condition is first in exports objects',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"exports");if(n==null)return[];return x(n,u,!1,(i,l,a)=>{if(!a||typeof i!=="object"||Array.isArray(i))return;if(!("types"in i))return;let m=a.indexOf("types");if(m===0)return;if(a.slice(0,m).filter((g)=>{if(g.startsWith("types"))return!1;if(typeof i[g]==="object"&&i[g]!==null&&Q(i[g],"types"))return!1;return!0}).length>0)o.push(p(r.filePath,e,l.path.concat("types"),"publint/exports-types-should-be-first",`${f(l.path.concat("types"))} should be the first condition in the object so it can be resolved by TypeScript.`,"error",'TypeScript resolves conditions in order. The "types" condition must come first to ensure correct type resolution.'))}),o}};function Q(e,r){for(let t in e){if(t===r)return!0;if(typeof e[t]==="object"&&e[t]!==null&&Q(e[t],r))return!0}return!1}var T={meta:{docs:'Ensure exports values start with "./"',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"exports");if(n==null)return[];return x(n,u,!1,(i,l)=>{if(typeof i!=="string")return;if(i.startsWith("./"))return;let a=`./${i.replace(/^[/]+/,"")}`;o.push(p(r.filePath,e,l.path,"publint/exports-value-invalid",`${f(l.path)} is "${i}" which is invalid as it does not start with "./". Use "${a}" instead.`,"error",'All exports values must be relative paths starting with "./".'))}),o}};var fe=[{field:"main",expectTypes:["string"]},{field:"module",expectTypes:["string"]},{field:"types",expectTypes:["string"]},{field:"typings",expectTypes:["string"]},{field:"browser",expectTypes:["string","object"]},{field:"bin",expectTypes:["string","object"]},{field:"exports",expectTypes:["string","object"]},{field:"imports",expectTypes:["object"]},{field:"name",expectTypes:["string"]},{field:"version",expectTypes:["string"]},{field:"description",expectTypes:["string"]},{field:"license",expectTypes:["string"]}],J={meta:{docs:"Ensure package.json fields have correct value types",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[];for(let{field:n,expectTypes:u}of fe){let[i,l]=d(t,n);if(i==null)continue;let a=typeof i;if(!u.includes(a)){let m=u.length===1?u[0]:`${u.slice(0,-1).join(", ")} or ${u[u.length-1]}`;o.push(p(r.filePath,e,l,"publint/field-invalid-value-type",`${f(l)} has an invalid ${a} type. Expected a ${m} type instead.`,"error",`The "${n}" field must be of type ${m}.`))}}return o}};var V={meta:{docs:"Suggest adding exports when module field is present",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let[o,n]=d(t,"module"),[u]=d(t,"exports");if(o!=null&&u==null)return[p(r.filePath,e,n,"publint/has-module-but-no-exports","pkg.module is used to output ESM, but pkg.exports is not defined. As Node.js doesn't read pkg.module, the ESM output may be skipped. Consider adding pkg.exports to export the ESM output.","warning",'Node.js only reads "exports" for module resolution. Without it, the ESM entry point in "module" is ignored by Node.js.')];return[]}};var A={meta:{docs:'Ensure "default" condition is last in imports objects',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"imports");if(n==null||typeof n!=="object")return[];return x(n,u,!0,(i,l,a)=>{if(!a||typeof i!=="object"||Array.isArray(i))return;if(!("default"in i))return;if(a[a.length-1]!=="default")o.push(p(r.filePath,e,l.path.concat("default"),"publint/imports-default-should-be-last",`${f(l.path.concat("default"))} should be the last condition in the object so it doesn't take precedence over the keys following it.`,"error",'Conditions are resolved in order. "default" acts as a fallback and should come last.'))}),o}};var D={meta:{docs:'Ensure imports keys start with "#"',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"imports");if(n==null||typeof n!=="object"||Array.isArray(n))return[];for(let i of Object.keys(n))if(!i.startsWith("#")){let l=`#${i.replace(/^[/]+/,"")}`,a=u.concat(i);o.push(p(r.filePath,e,a,"publint/imports-key-invalid",`${f(a)} is invalid as the imports key does not start with "#". Use "${l}" instead.`,"error",'All imports keys must start with "#" to distinguish them from package specifiers.'))}return o}};var O={meta:{docs:'Ensure "module" condition precedes "require" in imports',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"imports");if(n==null||typeof n!=="object")return[];return x(n,u,!0,(i,l,a)=>{if(!a||typeof i!=="object"||Array.isArray(i))return;if(!("module"in i)||!("require"in i))return;if(a.indexOf("module")>a.indexOf("require"))o.push(p(r.filePath,e,l.path.concat("module"),"publint/imports-module-should-precede-require",`${f(l.path.concat("module"))} should come before the "require" condition so it can take precedence when used by a bundler.`,"error",'Bundlers prioritize conditions by order. "module" should precede "require" to ensure ESM is preferred.'))}),o}};var W={meta:{docs:'Ensure imports values start with "./"',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],[n,u]=d(t,"imports");if(n==null||typeof n!=="object")return[];return x(n,u,!0,(i,l)=>{if(typeof i!=="string")return;if(!i.startsWith("."))return;if(i.startsWith("./"))return;let a=`./${i.replace(/^[/]+/,"")}`;o.push(p(r.filePath,e,l.path,"publint/imports-value-invalid",`${f(l.path)} is "${i}" which is invalid as it does not start with "./". Use "${a}" instead.`,"error",'Relative imports values must start with "./".'))}),o}};var v={meta:{docs:"Disallow local file references in dependencies",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],n=["dependencies","optionalDependencies","peerDependencies"];for(let u of n){let i=t[u];if(!i||typeof i!=="object")continue;for(let l of Object.keys(i)){let a=i[l];if(typeof a==="string"&&(a.startsWith("file:")||a.startsWith("link:")))o.push(p(r.filePath,e,[u,l],"publint/local-dependency",`The "${l}" dependency references "${a}" that will likely not work when installed by end-users.`,"error","Local file references (file: or link:) are not portable and will fail for consumers of the package."))}}return o}};var N={meta:{docs:'Suggest specifying the "type" field in package.json',recommended:!0},check(e,r){let t=c(e);if(!t)return[];if(t.type==null)return[p(r.filePath,e,["name"],"publint/use-type",'The package does not specify the "type" field. Node.js may attempt to detect the package type causing a small performance hit. Consider adding "type": "commonjs" or "type": "module".',"warning",'Adding "type" helps Node.js resolve module format without detection overhead.')];return[]}};import{existsSync as me,readFileSync as he}from"fs";var B={meta:{docs:"Ensure bin files have a shebang for executability",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],n=k(r.filePath),[u,i]=d(t,"bin");if(u==null)return[];if(typeof u==="string")Z(u,i,n,o,r.filePath,e);else if(typeof u==="object"){for(let l of Object.keys(u))if(typeof u[l]==="string")Z(u[l],i.concat(l),n,o,r.filePath,e)}return o}};function Z(e,r,t,o,n,u){let i=b(t,e);if(!me(i))return;if(!P(e))return;let l;try{l=he(i,"utf8")}catch{return}if(!G(l))o.push(p(n,u,r,"publint/bin-file-not-executable",`${f(r)} is "${e}" but the file is not executable. It should start with a shebang, e.g. #!/usr/bin/env node.`,"error","Bin files must start with a shebang (e.g. #!/usr/bin/env node) to be executable."))}import{existsSync as ee,readFileSync as te}from"fs";var q={meta:{docs:'Ensure files under "module" condition in exports are ESM',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],n=k(r.filePath),[u,i]=d(t,"exports");if(u==null)return[];x(u,i,!1,(m,h)=>{if(typeof m!=="string")return;if(!h.path.includes("module"))return;if(!m.startsWith("./")&&!m.startsWith("../"))return;if(m.includes("*"))return;let g=b(n,m);if(!ee(g))return;if(!P(m))return;let y;try{y=te(g,"utf8")}catch{return}if(I(y)==="CJS")o.push(p(r.filePath,e,h.path,"publint/exports-module-should-be-esm",`${f(h.path)} should be ESM, but the code is written in CJS.`,"error",'The "module" condition is only used by bundlers and must contain ESM code.'))});let[l,a]=d(t,"imports");if(l!=null&&typeof l==="object")x(l,a,!0,(m,h)=>{if(typeof m!=="string")return;if(!h.path.includes("module"))return;if(!m.startsWith("./"))return;if(m.includes("*"))return;let g=b(n,m);if(!ee(g))return;if(!P(m))return;let y;try{y=te(g,"utf8")}catch{return}if(I(y)==="CJS")o.push(p(r.filePath,e,h.path,"publint/exports-module-should-be-esm",`${f(h.path)} should be ESM, but the code is written in CJS.`,"error",'The "module" condition is only used by bundlers and must contain ESM code.'))});return o}};import{existsSync as R}from"fs";import{dirname as ge,isAbsolute as xe,resolve as ye}from"path";function _(e,r){let t=r;while(t.startsWith("./"))t=t.slice(2);let o=t.split("/")[0];if(!o||o===".."||o.startsWith("."))return!1;let n=xe(r)?ge(r).split("/")[0]||"/":ye(e,o);return!R(n)}var U={meta:{docs:"Ensure files referenced in package.json exist",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],n=k(r.filePath),u=["main","module","types","typings","unpkg","jsdelivr"];for(let h of u){let[g,y]=d(t,h);if(g==null||typeof g!=="string")continue;if(_(n,g))continue;let C=b(n,g);if(!se(C))o.push(p(r.filePath,e,y,"publint/file-does-not-exist",`${f(y)} is "${g}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))}let[i,l]=d(t,"bin");if(i!=null){if(typeof i==="string")re(i,l,o,r.filePath,e,n);else if(typeof i==="object"){for(let h of Object.keys(i))if(typeof i[h]==="string")re(i[h],l.concat(h),o,r.filePath,e,n)}}let[a,m]=d(t,"exports");if(a!=null)x(a,m,!1,(h,g)=>{if(typeof h!=="string")return;if(!h.startsWith("./")&&!h.startsWith("../"))return;if(h.includes("*"))return;if(_(n,h))return;let y=b(n,h);if(!R(y))o.push(p(r.filePath,e,g.path,"publint/file-does-not-exist",`${f(g.path)} is "${h}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))});return o}};function re(e,r,t,o,n,u){if(_(u,e))return;let i=b(u,e);if(!se(i))t.push(p(o,n,r,"publint/file-does-not-exist",`${f(r)} is "${e}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))}function se(e){if(R(e))return!0;if(R(`${e}.js`))return!0;if(R(`${e}/index.js`))return!0;return!1}import{existsSync as be,readFileSync as ke}from"fs";import{extname as Pe}from"path";var z={meta:{docs:"Ensure file code format matches its extension and package type",recommended:!0},check(e,r){let t=c(e);if(!t)return[];let o=[],n=k(r.filePath),u=t.type,[i,l]=d(t,"main");if(i!=null&&typeof i==="string")oe(i,l,n,u,o,r.filePath,e);let[a,m]=d(t,"exports");if(a!=null)x(a,m,!1,(h,g)=>{if(typeof h!=="string")return;if(!h.startsWith("./")&&!h.startsWith("../"))return;if(h.includes("*"))return;if(g.path.includes("browser"))return;oe(h,g.path,n,u,o,r.filePath,e)});return o}};function oe(e,r,t,o,n,u,i){let l=b(t,e);if(!be(l))return;if(!P(e))return;let a;try{a=ke(l,"utf8")}catch{return}let m=I(a);if(m==="unknown"||m==="mixed")return;let h=H(l,o);if(m===h)return;let g=Pe(l),y=X(m),ie=(Y(g)?"FILE_INVALID_EXPLICIT_FORMAT":"FILE_INVALID_FORMAT")==="FILE_INVALID_EXPLICIT_FORMAT"?`${f(r)} is "${e}" and ends with the ${g} extension, but the code is written in ${m}. Consider using the ${y} extension.`:`${f(r)} is "${e}" and is written in ${m}, but is interpreted as ${h}. Consider using the ${y} extension.`;n.push(p(u,i,r,"publint/file-invalid-format",ie,"warning",`The file's code format (${m}) doesn't match the expected format (${h}) based on its extension and package type.`))}import{existsSync as Ie,readFileSync as Re}from"fs";var K={meta:{docs:'Ensure the "module" field points to an ESM file',recommended:!0},check(e,r){let t=c(e);if(!t)return[];let[o,n]=d(t,"module");if(o==null||typeof o!=="string")return[];let u=k(r.filePath),i=b(u,o);if(!Ie(i))return[];if(!P(o))return[];let l;try{l=Re(i,"utf8")}catch{return[]}if(I(l)==="CJS")return[p(r.filePath,e,n,"publint/module-should-be-esm",`${f(n)} should be ESM, but the code is written in CJS.`,"error",'The "module" field is intended for ESM output used by bundlers. It should point to an ESM file.')];return[]}};var Bt={name:"publint",rules:{"use-type":s(N),"local-dependency":s(v),"deprecated-field-jsnext":s(L),"has-module-but-no-exports":s(V),"field-invalid-value-type":s(J),"exports-types-should-be-first":s(j),"exports-default-should-be-last":s(M),"exports-module-should-precede-require":s(w),"exports-value-invalid":s(T),"exports-missing-root-entrypoint":s(F),"exports-fallback-array-use":s(S),"imports-key-invalid":s(D),"imports-value-invalid":s(W),"imports-default-should-be-last":s(A),"imports-module-should-precede-require":s(O),"file-does-not-exist":s(U),"file-invalid-format":s(z),"module-should-be-esm":s(K),"bin-file-not-executable":s(B),"exports-module-should-be-esm":s(q)}};export{Bt as publintPlugin};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ee,te,A,ne,se,re,ie,oe,ae,le,ce,ue,fe,me,he,de,pe,ge,ye,be}from"./chunk-pvptb0h1.js";export{se as author,me as bin,ae as bugs,be as default,pe as dependencies,ne as description,ye as devDependencies,ce as exports,he as files,ie as homepage,le as keywords,re as license,ue as module,ee as name,ge as optionalDependencies,oe as repository,de as scripts,te as type,fe as types,A as version};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var u=/\.(?:ts|js|tsx|jsx|mts|mjs|cts|cjs)$/;function e(r){return{meta:r.meta,check:(i,t)=>{if(!u.test(t.filePath))return[];return r.check(i,t)},fix:r.fix?(i,t)=>{if(!u.test(t.filePath))return i;return r.fix(i,t)}:void 0}}var f=/\.(?:md|mdx|markdown)$/i;function w(r){return{meta:r.meta,check:(i,t)=>{if(f.test(t.filePath))return[];return r.check(i,t)},fix:r.fix?(i,t)=>{if(f.test(t.filePath))return i;return r.fix(i,t)}:void 0}}var l=/\.(?:sh|bash|zsh|ksh|dash)$/,a=/^#!\s*(?:\/usr\/bin\/env\s+)?(?:ba|z|k|da)?sh\b/;function n(r){return{meta:r.meta,check:(i,t)=>{if(!l.test(t.filePath)&&!a.test(i))return[];return r.check(i,t)},fix:r.fix?(i,t)=>{if(!l.test(t.filePath)&&!a.test(i))return i;return r.fix(i,t)}:void 0}}var o=/(?:^|[/\\])package\.json$/;function s(r){return{meta:r.meta,check:(i,t)=>{if(!o.test(t.filePath))return[];return r.check(i,t)},fix:r.fix?(i,t)=>{if(!o.test(t.filePath))return i;return r.fix(i,t)}:void 0}}
3
+ export{e,w,n,s};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ function a(o){let c=o.length,e=Array.from({length:c},(n,s)=>o[s]),t=0;while(t<c){let n=o[t];if(n==="#"&&(t===0||/\s/.test(o[t-1]))){while(t<c)e[t]=" ",t++;break}if(n==="$"&&o[t+1]==="'"){t+=2;while(t<c){if(o[t]==="\\"&&t+1<c){e[t]=" ",e[t+1]=" ",t+=2;continue}if(o[t]==="'"){t++;break}e[t]=" ",t++}continue}if(n==="$"&&o[t+1]==='"'){t++,t=r(o,t,e);continue}if(n==="$"&&o[t+1]==="{"){t+=2;let s=1;while(t<c&&s>0){let f=o[t];if(f==="\\"&&t+1<c){e[t]=" ",e[t+1]=" ",t+=2;continue}if(f==="'"){t++;while(t<c&&o[t]!=="'")e[t]=" ",t++;if(t<c)t++;continue}if(f==='"'){t=r(o,t,e);continue}if(f==="{"){s++,t++;continue}if(f==="}"){s--,t++;continue}e[t]=" ",t++}continue}if(n==="$"&&o[t+1]==="("&&o[t+2]==="("){t+=3;let s=2;while(t<c&&s>0){let f=o[t];if(f==="("){s++,t++;continue}if(f===")"){s--,t++;continue}e[t]=" ",t++}continue}if(n==="$"&&o[t+1]==="("){t+=2;let s=1;while(t<c&&s>0){let f=o[t];if(f==="\\"&&t+1<c){e[t]=" ",e[t+1]=" ",t+=2;continue}if(f==="'"){t++;while(t<c&&o[t]!=="'")e[t]=" ",t++;if(t<c)t++;continue}if(f==='"'){t=r(o,t,e);continue}if(f==="("){s++,t++;continue}if(f===")"){s--,t++;continue}e[t]=" ",t++}continue}if(n==="'"){t++;while(t<c&&o[t]!=="'")e[t]=" ",t++;if(t<c)t++;continue}if(n==='"'){t=r(o,t,e);continue}if(n==="`"){t++;while(t<c&&o[t]!=="`"){if(o[t]==="\\"&&t+1<c){e[t]=" ",e[t+1]=" ",t+=2;continue}e[t]=" ",t++}if(t<c)t++;continue}t++}return e.join("")}function r(o,c,e){let t=o.length,n=c+1;while(n<t){let s=o[n];if(s==="\\"&&n+1<t){e[n]=" ",e[n+1]=" ",n+=2;continue}if(s==='"')return n+1;if(s==="$"&&o[n+1]==="("&&o[n+2]==="("){n+=3;let f=2;while(n<t&&f>0){let u=o[n];if(u==="("){f++,n++;continue}if(u===")"){f--,n++;continue}e[n]=" ",n++}continue}if(s==="$"&&o[n+1]==="("){n+=2;let f=1;while(n<t&&f>0){let u=o[n];if(u==="\\"&&n+1<t){e[n]=" ",e[n+1]=" ",n+=2;continue}if(u==="'"){n++;while(n<t&&o[n]!=="'")e[n]=" ",n++;if(n<t)n++;continue}if(u==='"'){n=r(o,n,e);continue}if(u==="("){f++,n++;continue}if(u===")"){f--,n++;continue}e[n]=" ",n++}continue}if(s==="$"&&o[n+1]==="{"){n+=2;let f=1;while(n<t&&f>0){let u=o[n];if(u==="{"){f++,n++;continue}if(u==="}"){f--,n++;continue}e[n]=" ",n++}continue}e[n]=" ",n++}return n}function i(o){let e=a(o).match(/<<-?/);if(!e||e.index===void 0)return null;let n=o.slice(e.index+e[0].length).match(/^\s*(['"]?)(\w+)\1/);if(!n)return null;return n[2]}class g{continued=!1;header;read(o){let c=a(o).trim(),e=this.continued;if(!e)this.header=/^(?:if|elif)\b/.test(c)?"then":/^(?:while|for|until)\b/.test(c)?"do":void 0;let t=e&&this.header!==void 0&&new RegExp(`\\b${this.header}\\s*$`).test(c),n=c.match(/\\+$/)?.[0].length??0;if(this.continued=n%2===1,!this.continued)this.header=void 0;return{continuation:e,closesHeader:t}}}
3
+ export{a,i,g};