@xylabs/ts-scripts-yarn3 5.0.26 → 5.0.27

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 (120) hide show
  1. package/dist/actions/build.mjs.map +1 -1
  2. package/dist/actions/clean-docs.mjs.map +1 -1
  3. package/dist/actions/clean-jest.mjs.map +1 -1
  4. package/dist/actions/clean.mjs.map +1 -1
  5. package/dist/actions/compile.mjs.map +1 -1
  6. package/dist/actions/copy-assets.mjs.map +1 -1
  7. package/dist/actions/dead.mjs.map +1 -1
  8. package/dist/actions/deploy-major.mjs.map +1 -1
  9. package/dist/actions/deploy-minor.mjs.map +1 -1
  10. package/dist/actions/deploy-next.mjs.map +1 -1
  11. package/dist/actions/deploy.mjs.map +1 -1
  12. package/dist/actions/deps.mjs.map +1 -1
  13. package/dist/actions/fix.mjs.map +1 -1
  14. package/dist/actions/gen-docs.mjs.map +1 -1
  15. package/dist/actions/gitignore-gen.mjs.map +1 -1
  16. package/dist/actions/index.mjs +2 -2
  17. package/dist/actions/index.mjs.map +1 -1
  18. package/dist/actions/license.mjs.map +1 -1
  19. package/dist/actions/lint-clean.mjs.map +1 -1
  20. package/dist/actions/lint-profile.mjs.map +1 -1
  21. package/dist/actions/lint.mjs.map +1 -1
  22. package/dist/actions/npmignore-gen.mjs.map +1 -1
  23. package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
  24. package/dist/actions/package/compile/compile.mjs +1 -1
  25. package/dist/actions/package/compile/compile.mjs.map +1 -1
  26. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
  27. package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
  28. package/dist/actions/package/compile/index.mjs +1 -1
  29. package/dist/actions/package/compile/index.mjs.map +1 -1
  30. package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
  31. package/dist/actions/package/compile/packageCompileTscTypes.mjs +1 -1
  32. package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
  33. package/dist/actions/package/compile/packageCompileTsup.mjs +1 -1
  34. package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
  35. package/dist/actions/package/gen-docs.mjs +1 -1
  36. package/dist/actions/package/gen-docs.mjs.map +1 -1
  37. package/dist/actions/package/index.mjs +2 -2
  38. package/dist/actions/package/index.mjs.map +1 -1
  39. package/dist/actions/package/publint.mjs.map +1 -1
  40. package/dist/actions/package/recompile.mjs +1 -1
  41. package/dist/actions/package/recompile.mjs.map +1 -1
  42. package/dist/actions/publint.mjs.map +1 -1
  43. package/dist/actions/rebuild.mjs.map +1 -1
  44. package/dist/actions/recompile.mjs.map +1 -1
  45. package/dist/actions/reinstall.mjs.map +1 -1
  46. package/dist/actions/relint.mjs.map +1 -1
  47. package/dist/actions/retest.mjs.map +1 -1
  48. package/dist/actions/sonar.mjs.map +1 -1
  49. package/dist/actions/test.mjs.map +1 -1
  50. package/dist/actions/up.mjs.map +1 -1
  51. package/dist/actions/updo.mjs.map +1 -1
  52. package/dist/actions/upplug.mjs.map +1 -1
  53. package/dist/actions/upyarn.mjs.map +1 -1
  54. package/dist/bin/package/build-only.mjs +1 -1
  55. package/dist/bin/package/build-only.mjs.map +1 -1
  56. package/dist/bin/package/build.mjs +1 -1
  57. package/dist/bin/package/build.mjs.map +1 -1
  58. package/dist/bin/package/compile-only.mjs +1 -1
  59. package/dist/bin/package/compile-only.mjs.map +1 -1
  60. package/dist/bin/package/compile-tsup.mjs +1 -1
  61. package/dist/bin/package/compile-tsup.mjs.map +1 -1
  62. package/dist/bin/package/compile.mjs +1 -1
  63. package/dist/bin/package/compile.mjs.map +1 -1
  64. package/dist/bin/package/gen-docs.mjs +1 -1
  65. package/dist/bin/package/gen-docs.mjs.map +1 -1
  66. package/dist/bin/package/publint.mjs.map +1 -1
  67. package/dist/bin/package/recompile.mjs +1 -1
  68. package/dist/bin/package/recompile.mjs.map +1 -1
  69. package/dist/bin/xy-ts.mjs.map +1 -1
  70. package/dist/bin/xy.mjs.map +1 -1
  71. package/dist/index.mjs +2 -2
  72. package/dist/index.mjs.map +1 -1
  73. package/dist/lib/file/fileLines.mjs.map +1 -1
  74. package/dist/lib/file/index.mjs.map +1 -1
  75. package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
  76. package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
  77. package/dist/lib/index.mjs.map +1 -1
  78. package/dist/lib/runSteps.mjs.map +1 -1
  79. package/dist/lib/runStepsAsync.mjs.map +1 -1
  80. package/dist/lib/runXy.mjs.map +1 -1
  81. package/dist/lib/yarn/index.mjs.map +1 -1
  82. package/dist/lib/yarn/workspace/index.mjs.map +1 -1
  83. package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
  84. package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
  85. package/dist/loadPackageConfig.mjs.map +1 -1
  86. package/dist/xy/index.mjs.map +1 -1
  87. package/dist/xy/param.mjs.map +1 -1
  88. package/dist/xy/xy.mjs.map +1 -1
  89. package/dist/xy/xyBuildCommands.mjs.map +1 -1
  90. package/dist/xy/xyCommonCommands.mjs.map +1 -1
  91. package/dist/xy/xyDeployCommands.mjs.map +1 -1
  92. package/dist/xy/xyInstallCommands.mjs.map +1 -1
  93. package/dist/xy/xyLintCommands.mjs.map +1 -1
  94. package/dist/xy/xyParseOptions.mjs.map +1 -1
  95. package/package.json +4 -4
  96. package/src/actions/deps.ts +1 -2
  97. package/src/actions/gen-docs.ts +1 -2
  98. package/src/actions/package/compile/XyConfig.ts +1 -1
  99. package/src/actions/package/compile/buildEntries.ts +1 -1
  100. package/src/actions/package/compile/compile.ts +1 -1
  101. package/src/actions/package/compile/copyTypeFiles.ts +1 -1
  102. package/src/actions/package/compile/getCompilerOptions.ts +2 -2
  103. package/src/actions/package/compile/packageCompileTsc.ts +5 -8
  104. package/src/actions/package/compile/packageCompileTscTypes.ts +4 -6
  105. package/src/actions/package/gen-docs.ts +1 -1
  106. package/src/actions/package/publint.ts +1 -1
  107. package/src/lib/file/fileLines.ts +3 -4
  108. package/src/lib/file/tryReadFileSync.ts +4 -4
  109. package/src/lib/runSteps.ts +1 -2
  110. package/src/lib/runStepsAsync.ts +1 -1
  111. package/src/lib/yarn/workspace/yarnWorkspace.ts +1 -1
  112. package/src/lib/yarn/workspace/yarnWorkspaces.ts +1 -1
  113. package/src/loadPackageConfig.ts +1 -1
  114. package/src/xy/param.ts +1 -1
  115. package/src/xy/xyBuildCommands.ts +1 -1
  116. package/src/xy/xyCommonCommands.ts +1 -1
  117. package/src/xy/xyDeployCommands.ts +1 -1
  118. package/src/xy/xyInstallCommands.ts +1 -1
  119. package/src/xy/xyLintCommands.ts +1 -1
  120. package/src/xy/xyParseOptions.ts +1 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["checkResult.ts","processEx.ts","withError.ts","withErrnoException.ts","safeExit.ts","runSteps.ts","fix.ts"],"sourcesContent":["import chalk from 'chalk'\n\nexport const checkResult = (name: string, result: number, level: 'error' | 'warn' = 'error', exitOnFail = false) => {\n if (result) {\n const exiting = exitOnFail ? '[Exiting Process]' : '[Continuing]'\n const chalkFunc = level === 'error' ? chalk.red : chalk.yellow\n console[level](chalkFunc(`${name} had ${result} failures ${exiting}`))\n if (exitOnFail) {\n process.exit(result)\n }\n }\n}\n","import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException.ts'\nimport { withError } from './withError.ts'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode\n = withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n })\n ?? withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n })\n ?? (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n // This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n","export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => (!!ex.name && !!ex.message),\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n","import { withError } from './withError.ts'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(\n ex: unknown, closure: (error: T) => number,\n) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n","/** Catch child process a crash and returns the code */\n\nimport { processEx } from './processEx.ts'\n\nconst safeExit = (func: () => number, exitOnFail = true): number => {\n try {\n const result = func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nconst safeExitAsync = async (func: () => Promise<number>, exitOnFail = true): Promise<number> => {\n try {\n const result = await func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nexport { safeExit, safeExitAsync }\n","import type { SpawnSyncOptionsWithBufferEncoding } from 'node:child_process'\nimport { spawnSync } from 'node:child_process'\nimport { existsSync } from 'node:fs'\n\nimport chalk from 'chalk'\n\nimport { checkResult } from './checkResult.ts'\nimport { safeExit } from './safeExit.ts'\n\nexport type ScriptStep =\n | [/* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ string | string[]]\n | [/* command */ string, /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding]\n\nexport const runSteps = (name: string, steps: ScriptStep[], exitOnFail = true, messages?: string[]): number => {\n return safeExit(() => {\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`${name} [${pkgName}]`))\n let totalStatus = 0\n for (const [i, [command, args, config]] of steps.entries()) {\n if (messages?.[i]) {\n console.log(chalk.gray(messages?.[i]))\n }\n const argList = Array.isArray(args) ? args : args.split(' ')\n if (command === 'node' && !existsSync(argList[0])) {\n throw new Error(`File not found [${argList[0]}]`)\n }\n const status\n = spawnSync(command, Array.isArray(args) ? args : args.split(' '), {\n ...config,\n encoding: 'utf8',\n env: { FORCE_COLOR: '3', ...process.env },\n shell: true,\n stdio: 'inherit',\n }).status ?? 0\n checkResult(name, status, 'error', exitOnFail)\n totalStatus += status ?? 0\n }\n return totalStatus\n }, !!exitOnFail)\n}\n","import { runSteps } from '../lib/index.ts'\n\nexport const fix = () => {\n return runSteps('Fix', [['yarn', ['eslint', '.', '--fix', '--cache']]])\n}\n"],"mappings":";;;;AAAA,OAAOA,WAAW;AAEX,IAAMC,cAAc,wBAACC,MAAcC,QAAgBC,QAA0B,SAASC,aAAa,UAAK;AAC7G,MAAIF,QAAQ;AACV,UAAMG,UAAUD,aAAa,sBAAsB;AACnD,UAAME,YAAYH,UAAU,UAAUI,MAAMC,MAAMD,MAAME;AACxDC,YAAQP,KAAAA,EAAOG,UAAU,GAAGL,IAAAA,QAAYC,MAAAA,aAAmBG,OAAAA,EAAS,CAAA;AACpE,QAAID,YAAY;AACdO,cAAQC,KAAKV,MAAAA;IACf;EACF;AACF,GAT2B;;;ACF3B,OAAOW,YAAW;;;ACAX,IAAMC,YAAY,wBAEvBC,IACAC,SACAC,YAAY,CAACF,QAAW,CAAC,CAACA,IAAGG,QAAQ,CAAC,CAACH,IAAGI,YAAQ;AAElD,SAAOF,UAAUF,EAAAA,IAAWC,QAAQD,EAAAA,IAAWK;AACjD,GAPyB;;;ACElB,IAAMC,qBAAqB,wBAChCC,IAAaC,YAAAA;AAEb,SAAOC,UAAaF,IAAIC,SAAS,CAACD,QAAiBA,IAA6BG,UAAUC,MAAAA;AAC5F,GAJkC;;;AFG3B,IAAMC,YAAY,wBAACC,OAAAA;AACxB,QAAMC,QAAQ,OAAOD,OAAO,WAAW,IAAIE,MAAMF,EAAAA,IAAMA;AACvD,QAAMG,WACFC,mBAAmBH,OAAO,CAACA,WAAAA;AAC3B,QAAIA,OAAMI,SAAS,UAAU;AAC3BC,cAAQL,MAAMM,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AAA,IAAQA,OAAOA,KAAKO,MAAM,GAAA;AACxD,UAAIR,YAAY,UAAU,CAACS,WAAWJ,QAAQ,CAAA,CAAE,GAAG;AACjD,cAAM,IAAIK,MAAM,mBAAmBL,QAAQ,CAAA,CAAE,GAAG;MAClD;AACA,YAAMM,SACFC,UAAUZ,SAASM,MAAMC,QAAQN,IAAAA,IAAQA,OAAOA,KAAKO,MAAM,GAAA,GAAM;QACjE,GAAGN;QACHW,UAAU;QACVrB,KAAK;UAAEsB,aAAa;UAAK,GAAGvB,QAAQC;QAAI;QACxCuB,OAAO;QACPC,OAAO;MACT,CAAA,EAAGL,UAAU;AACfM,kBAAYhC,MAAM0B,QAAQ,SAASxB,UAAAA;AACnCW,qBAAea,UAAU;IAC3B;AACA,WAAOb;EACT,GAAG,CAAC,CAACX,UAAAA;AACP,GA1BwB;;;ACXjB,IAAM+B,MAAM,6BAAA;AACjB,SAAOC,SAAS,OAAO;IAAC;MAAC;MAAQ;QAAC;QAAU;QAAK;QAAS;;;GAAY;AACxE,GAFmB;","names":["chalk","checkResult","name","result","level","exitOnFail","exiting","chalkFunc","chalk","red","yellow","console","process","exit","chalk","withError","ex","closure","predicate","name","message","undefined","withErrnoException","ex","closure","withError","errno","undefined","processEx","ex","error","Error","exitCode","withErrnoException","code","console","chalk","red","path","errno","withError","name","message","JSON","stringify","process","exit","safeExit","func","exitOnFail","result","process","exit","ex","processEx","spawnSync","existsSync","chalk","runSteps","name","steps","exitOnFail","messages","safeExit","pkgName","process","env","npm_package_name","console","log","chalk","green","totalStatus","i","command","args","config","entries","gray","argList","Array","isArray","split","existsSync","Error","status","spawnSync","encoding","FORCE_COLOR","shell","stdio","checkResult","fix","runSteps"]}
1
+ {"version":3,"sources":["checkResult.ts","processEx.ts","withError.ts","withErrnoException.ts","safeExit.ts","runSteps.ts","fix.ts"],"sourcesContent":["import chalk from 'chalk'\n\nexport const checkResult = (name: string, result: number, level: 'error' | 'warn' = 'error', exitOnFail = false) => {\n if (result) {\n const exiting = exitOnFail ? '[Exiting Process]' : '[Continuing]'\n const chalkFunc = level === 'error' ? chalk.red : chalk.yellow\n console[level](chalkFunc(`${name} had ${result} failures ${exiting}`))\n if (exitOnFail) {\n process.exit(result)\n }\n }\n}\n","import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException.ts'\nimport { withError } from './withError.ts'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode\n = withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n })\n ?? withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n })\n ?? (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n // This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n","export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => (!!ex.name && !!ex.message),\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n","import { withError } from './withError.ts'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(\n ex: unknown, closure: (error: T) => number,\n) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n","/** Catch child process a crash and returns the code */\n\nimport { processEx } from './processEx.ts'\n\nconst safeExit = (func: () => number, exitOnFail = true): number => {\n try {\n const result = func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nconst safeExitAsync = async (func: () => Promise<number>, exitOnFail = true): Promise<number> => {\n try {\n const result = await func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nexport { safeExit, safeExitAsync }\n","import { spawnSync, SpawnSyncOptionsWithBufferEncoding } from 'node:child_process'\nimport { existsSync } from 'node:fs'\n\nimport chalk from 'chalk'\n\nimport { checkResult } from './checkResult.ts'\nimport { safeExit } from './safeExit.ts'\n\nexport type ScriptStep =\n | [/* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ string | string[]]\n | [/* command */ string, /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding]\n\nexport const runSteps = (name: string, steps: ScriptStep[], exitOnFail = true, messages?: string[]): number => {\n return safeExit(() => {\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`${name} [${pkgName}]`))\n let totalStatus = 0\n for (const [i, [command, args, config]] of steps.entries()) {\n if (messages?.[i]) {\n console.log(chalk.gray(messages?.[i]))\n }\n const argList = Array.isArray(args) ? args : args.split(' ')\n if (command === 'node' && !existsSync(argList[0])) {\n throw new Error(`File not found [${argList[0]}]`)\n }\n const status\n = spawnSync(command, Array.isArray(args) ? args : args.split(' '), {\n ...config,\n encoding: 'utf8',\n env: { FORCE_COLOR: '3', ...process.env },\n shell: true,\n stdio: 'inherit',\n }).status ?? 0\n checkResult(name, status, 'error', exitOnFail)\n totalStatus += status ?? 0\n }\n return totalStatus\n }, !!exitOnFail)\n}\n","import { runSteps } from '../lib/index.ts'\n\nexport const fix = () => {\n return runSteps('Fix', [['yarn', ['eslint', '.', '--fix', '--cache']]])\n}\n"],"mappings":";;;;AAAA,OAAOA,WAAW;AAEX,IAAMC,cAAc,wBAACC,MAAcC,QAAgBC,QAA0B,SAASC,aAAa,UAAK;AAC7G,MAAIF,QAAQ;AACV,UAAMG,UAAUD,aAAa,sBAAsB;AACnD,UAAME,YAAYH,UAAU,UAAUI,MAAMC,MAAMD,MAAME;AACxDC,YAAQP,KAAAA,EAAOG,UAAU,GAAGL,IAAAA,QAAYC,MAAAA,aAAmBG,OAAAA,EAAS,CAAA;AACpE,QAAID,YAAY;AACdO,cAAQC,KAAKV,MAAAA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","name","result","level","exitOnFail","exiting","chalkFunc","chalk","red","yellow","console","process","exit","chalk","withError","ex","closure","predicate","name","message","undefined","withErrnoException","ex","closure","withError","errno","undefined","processEx","ex","error","Error","exitCode","withErrnoException","code","console","chalk","red","path","errno","withError","name","message","JSON","stringify","process","exit","safeExit","func","exitOnFail","result","process","exit","ex","processEx","spawnSync","existsSync","chalk","runSteps","name","steps","exitOnFail","messages","safeExit","pkgName","process","env","npm_package_name","console","log","chalk","green","totalStatus","i","command","args","config","entries","gray","argList","Array","isArray","split","existsSync","Error","status","spawnSync","encoding","FORCE_COLOR","shell","stdio","checkResult","fix","runSteps"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["checkResult.ts","processEx.ts","withError.ts","withErrnoException.ts","safeExit.ts","runSteps.ts","gen-docs.ts"],"sourcesContent":["import chalk from 'chalk'\n\nexport const checkResult = (name: string, result: number, level: 'error' | 'warn' = 'error', exitOnFail = false) => {\n if (result) {\n const exiting = exitOnFail ? '[Exiting Process]' : '[Continuing]'\n const chalkFunc = level === 'error' ? chalk.red : chalk.yellow\n console[level](chalkFunc(`${name} had ${result} failures ${exiting}`))\n if (exitOnFail) {\n process.exit(result)\n }\n }\n}\n","import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException.ts'\nimport { withError } from './withError.ts'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode\n = withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n })\n ?? withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n })\n ?? (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n // This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n","export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => (!!ex.name && !!ex.message),\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n","import { withError } from './withError.ts'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(\n ex: unknown, closure: (error: T) => number,\n) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n","/** Catch child process a crash and returns the code */\n\nimport { processEx } from './processEx.ts'\n\nconst safeExit = (func: () => number, exitOnFail = true): number => {\n try {\n const result = func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nconst safeExitAsync = async (func: () => Promise<number>, exitOnFail = true): Promise<number> => {\n try {\n const result = await func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nexport { safeExit, safeExitAsync }\n","import type { SpawnSyncOptionsWithBufferEncoding } from 'node:child_process'\nimport { spawnSync } from 'node:child_process'\nimport { existsSync } from 'node:fs'\n\nimport chalk from 'chalk'\n\nimport { checkResult } from './checkResult.ts'\nimport { safeExit } from './safeExit.ts'\n\nexport type ScriptStep =\n | [/* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ string | string[]]\n | [/* command */ string, /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding]\n\nexport const runSteps = (name: string, steps: ScriptStep[], exitOnFail = true, messages?: string[]): number => {\n return safeExit(() => {\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`${name} [${pkgName}]`))\n let totalStatus = 0\n for (const [i, [command, args, config]] of steps.entries()) {\n if (messages?.[i]) {\n console.log(chalk.gray(messages?.[i]))\n }\n const argList = Array.isArray(args) ? args : args.split(' ')\n if (command === 'node' && !existsSync(argList[0])) {\n throw new Error(`File not found [${argList[0]}]`)\n }\n const status\n = spawnSync(command, Array.isArray(args) ? args : args.split(' '), {\n ...config,\n encoding: 'utf8',\n env: { FORCE_COLOR: '3', ...process.env },\n shell: true,\n stdio: 'inherit',\n }).status ?? 0\n checkResult(name, status, 'error', exitOnFail)\n totalStatus += status ?? 0\n }\n return totalStatus\n }, !!exitOnFail)\n}\n","import type { ScriptStep } from '../lib/index.ts'\nimport { runSteps } from '../lib/index.ts'\n\nexport interface GenDocsParams {\n incremental?: boolean\n pkg?: string\n}\n\nexport interface GenDocsPackageParams { pkg: string }\n\nexport const genDocs = ({ pkg, incremental }: GenDocsParams) => {\n return pkg ? genDocsPackage({ pkg }) : genDocsAll({ incremental })\n}\n\nexport const genDocsPackage = ({ pkg }: GenDocsPackageParams) => {\n const steps: ScriptStep[] = [['yarn', ['workspace', pkg, 'run', 'package-gen-docs']]]\n\n return runSteps(`GenDocs [${pkg}]`, [...steps])\n}\n\nexport const genDocsAll = ({ incremental }: GenDocsParams) => {\n const incrementalOptions = incremental ? ['--since', '-pA'] : ['-pA']\n const steps: ScriptStep[] = [['yarn', ['workspaces', 'foreach', ...incrementalOptions, 'run', 'package-gen-docs']]]\n\n return runSteps(`GenDocs [All${incremental ? '-Incremental' : ''}]`, [...steps])\n}\n"],"mappings":";;;;AAAA,OAAOA,WAAW;AAEX,IAAMC,cAAc,wBAACC,MAAcC,QAAgBC,QAA0B,SAASC,aAAa,UAAK;AAC7G,MAAIF,QAAQ;AACV,UAAMG,UAAUD,aAAa,sBAAsB;AACnD,UAAME,YAAYH,UAAU,UAAUI,MAAMC,MAAMD,MAAME;AACxDC,YAAQP,KAAAA,EAAOG,UAAU,GAAGL,IAAAA,QAAYC,MAAAA,aAAmBG,OAAAA,EAAS,CAAA;AACpE,QAAID,YAAY;AACdO,cAAQC,KAAKV,MAAAA;IACf;EACF;AACF,GAT2B;;;ACF3B,OAAOW,YAAW;;;ACAX,IAAMC,YAAY,wBAEvBC,IACAC,SACAC,YAAY,CAACF,QAAW,CAAC,CAACA,IAAGG,QAAQ,CAAC,CAACH,IAAGI,Y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,YAAYL,GAAAA,KAAQ;OAAII;GAAM;AAChD,GAJ8B;AAMvB,IAAMD,aAAa,wBAAC,EAAEF,YAAW,MAAiB;AACvD,QAAMK,qBAAqBL,cAAc;IAAC;IAAW;MAAS;IAAC;;AAC/D,QAAMG,QAAsB;IAAC;MAAC;MAAQ;QAAC;QAAc;WAAcE;QAAoB;QAAO;;;;AAE9F,SAAOD,SAAS,eAAeJ,cAAc,iBAAiB,EAAA,KAAO;OAAIG;GAAM;AACjF,GAL0B;","names":["chalk","checkResult","name","result","level","exitOnFail","exiting","chalkFunc","chalk","red","yellow","console","process","exit","chalk","withError","ex","closure","predicate","name","message","undefined","withErrnoException","ex","closure","withError","errno","undefined","processEx","ex","error","Error","exitCode","withErrnoException","code","console","chalk","red","path","errno","withError","name","message","JSON","stringify","process","exit","safeExit","func","exitOnFail","result","process","exit","ex","processEx","spawnSync","existsSync","chalk","runSteps","name","steps","exitOnFail","messages","safeExit","pkgName","process","env","npm_package_name","console","log","chalk","green","totalStatus","i","command","args","config","entries","gray","argList","Array","isArray","split","existsSync","Error","status","spawnSync","encoding","FORCE_COLOR","shell","stdio","checkResult","genDocs","pkg","incremental","genDocsPackage","genDocsAll","steps","runSteps","incrementalOptions"]}
1
+ {"version":3,"sources":["checkResult.ts","processEx.ts","withError.ts","withErrnoException.ts","safeExit.ts","runSteps.ts","gen-docs.ts"],"sourcesContent":["import chalk from 'chalk'\n\nexport const checkResult = (name: string, result: number, level: 'error' | 'warn' = 'error', exitOnFail = false) => {\n if (result) {\n const exiting = exitOnFail ? '[Exiting Process]' : '[Continuing]'\n const chalkFunc = level === 'error' ? chalk.red : chalk.yellow\n console[level](chalkFunc(`${name} had ${result} failures ${exiting}`))\n if (exitOnFail) {\n process.exit(result)\n }\n }\n}\n","import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException.ts'\nimport { withError } from './withError.ts'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode\n = withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n })\n ?? withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n })\n ?? (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n // This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n","export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => (!!ex.name && !!ex.message),\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n","import { withError } from './withError.ts'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(\n ex: unknown, closure: (error: T) => number,\n) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n","/** Catch child process a crash and returns the code */\n\nimport { processEx } from './processEx.ts'\n\nconst safeExit = (func: () => number, exitOnFail = true): number => {\n try {\n const result = func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nconst safeExitAsync = async (func: () => Promise<number>, exitOnFail = true): Promise<number> => {\n try {\n const result = await func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nexport { safeExit, safeExitAsync }\n","import { spawnSync, SpawnSyncOptionsWithBufferEncoding } from 'node:child_process'\nimport { existsSync } from 'node:fs'\n\nimport chalk from 'chalk'\n\nimport { checkResult } from './checkResult.ts'\nimport { safeExit } from './safeExit.ts'\n\nexport type ScriptStep =\n | [/* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ string | string[]]\n | [/* command */ string, /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding]\n\nexport const runSteps = (name: string, steps: ScriptStep[], exitOnFail = true, messages?: string[]): number => {\n return safeExit(() => {\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`${name} [${pkgName}]`))\n let totalStatus = 0\n for (const [i, [command, args, config]] of steps.entries()) {\n if (messages?.[i]) {\n console.log(chalk.gray(messages?.[i]))\n }\n const argList = Array.isArray(args) ? args : args.split(' ')\n if (command === 'node' && !existsSync(argList[0])) {\n throw new Error(`File not found [${argList[0]}]`)\n }\n const status\n = spawnSync(command, Array.isArray(args) ? args : args.split(' '), {\n ...config,\n encoding: 'utf8',\n env: { FORCE_COLOR: '3', ...process.env },\n shell: true,\n stdio: 'inherit',\n }).status ?? 0\n checkResult(name, status, 'error', exitOnFail)\n totalStatus += status ?? 0\n }\n return totalStatus\n }, !!exitOnFail)\n}\n","import { runSteps, ScriptStep } from '../lib/index.ts'\n\nexport interface GenDocsParams {\n incremental?: boolean\n pkg?: string\n}\n\nexport interface GenDocsPackageParams { pkg: string }\n\nexport const genDocs = ({ pkg, incremental }: GenDocsParams) => {\n return pkg ? genDocsPackage({ pkg }) : genDocsAll({ incremental })\n}\n\nexport const genDocsPackage = ({ pkg }: GenDocsPackageParams) => {\n const steps: ScriptStep[] = [['yarn', ['workspace', pkg, 'run', 'package-gen-docs']]]\n\n return runSteps(`GenDocs [${pkg}]`, [...steps])\n}\n\nexport const genDocsAll = ({ incremental }: GenDocsParams) => {\n const incrementalOptions = incremental ? ['--since', '-pA'] : ['-pA']\n const steps: ScriptStep[] = [['yarn', ['workspaces', 'foreach', ...incrementalOptions, 'run', 'package-gen-docs']]]\n\n return runSteps(`GenDocs [All${incremental ? '-Incremental' : ''}]`, [...steps])\n}\n"],"mappings":";;;;AAAA,OAAOA,WAAW;AAEX,IAAMC,cAAc,wBAACC,MAAcC,QAAgBC,QAA0B,SAASC,aAAa,UAAK;AAC7G,MAAIF,QAAQ;AACV,UAAMG,UAAUD,aAAa,sBAAsB;AACnD,UAAME,YAAYH,UAAU,U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CAACX,UAAAA;AACP,GA1BwB;;;ACHjB,IAAM+B,UAAU,wBAAC,EAAEC,KAAKC,YAAW,MAAiB;AACzD,SAAOD,MAAME,eAAe;IAAEF;EAAI,CAAA,IAAKG,WAAW;IAAEF;EAAY,CAAA;AAClE,GAFuB;AAIhB,IAAMC,iBAAiB,wBAAC,EAAEF,IAAG,MAAwB;AAC1D,QAAMI,QAAsB;IAAC;MAAC;MAAQ;QAAC;QAAaJ;QAAK;QAAO;;;;AAEhE,SAAOK,SAAS,YAAYL,GAAAA,KAAQ;OAAII;GAAM;AAChD,GAJ8B;AAMvB,IAAMD,aAAa,wBAAC,EAAEF,YAAW,MAAiB;AACvD,QAAMK,qBAAqBL,cAAc;IAAC;IAAW;MAAS;IAAC;;AAC/D,QAAMG,QAAsB;IAAC;MAAC;MAAQ;QAAC;QAAc;WAAcE;QAAoB;QAAO;;;;AAE9F,SAAOD,SAAS,eAAeJ,cAAc,iBAAiB,EAAA,KAAO;OAAIG;GAAM;AACjF,GAL0B;","names":["chalk","checkResult","name","result","level","exitOnFail","exiting","chalkFunc","chalk","red","yellow","console","process","exit","chalk","withError","ex","closure","predicate","name","message","undefined","withErrnoException","ex","closure","withError","errno","undefined","processEx","ex","error","Error","exitCode","withErrnoException","code","console","chalk","red","path","errno","withError","name","message","JSON","stringify","process","exit","safeExit","func","exitOnFail","result","process","exit","ex","processEx","spawnSync","existsSync","chalk","runSteps","name","steps","exitOnFail","messages","safeExit","pkgName","process","env","npm_package_name","console","log","chalk","green","totalStatus","i","command","args","config","entries","gray","argList","Array","isArray","split","existsSync","Error","status","spawnSync","encoding","FORCE_COLOR","shell","stdio","checkResult","genDocs","pkg","incremental","genDocsPackage","genDocsAll","steps","runSteps","incrementalOptions"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["constants.ts","fileLines.ts","empty.ts","union.ts","ReadFileSyncOptions.ts","generateIgnoreFiles.ts","yarnWorkspaces.ts","yarnWorkspace.ts","yarnInitCwd.ts","gitignore-gen.ts"],"sourcesContent":["export const WINDOWS_NEWLINE_REGEX = /\\r\\n/g\nexport const CROSS_PLATFORM_NEWLINE = '\\n'\n","import type { PathLike, WriteFileOptions } from 'node:fs'\nimport {\n existsSync, readFileSync, writeFileSync,\n} from 'node:fs'\n\nimport { notEmpty } from '../string/index.ts'\nimport { CROSS_PLATFORM_NEWLINE, WINDOWS_NEWLINE_REGEX } from './constants.ts'\nimport type { ReadFileSyncOptions } from './ReadFileSyncOptions.ts'\nimport { defaultReadFileSyncOptions } from './ReadFileSyncOptions.ts'\n\nexport const readLines = (uri: PathLike, options: ReadFileSyncOptions = defaultReadFileSyncOptions): string[] =>\n existsSync(uri)\n ? readFileSync(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE)\n : []\n\nexport const readNonEmptyLines = (uri: PathLike, options: ReadFileSyncOptions = defaultReadFileSyncOptions): string[] =>\n readLines(uri, options).filter(notEmpty)\n\nexport const writeLines = (uri: PathLike, lines: string[], options: WriteFileOptions = defaultReadFileSyncOptions) => {\n const existing = existsSync(uri) ? readFileSync(uri, options) : undefined\n const desired = lines.join(CROSS_PLATFORM_NEWLINE)\n // Check if the file is different before writing\n if (existing !== desired) writeFileSync(uri, desired, options)\n}\n","export const empty = (value?: string | undefined): boolean => value?.trim().length === 0\nexport const notEmpty = (value?: string | undefined): boolean => !empty(value)\n","export const union = (a: string[], b: string[]): Set<string> => new Set([...new Set(a), ...new Set(b)])\n","export type ReadFileSyncOptions = BufferEncoding | {\n encoding: BufferEncoding\n flags?: string\n}\n\nexport const defaultReadFileSyncOptions: ReadFileSyncOptions = { encoding: 'utf8' }\n","import chalk from 'chalk'\n\nimport { readNonEmptyLines, writeLines } from './file/index.ts'\nimport { union } from './string/index.ts'\nimport {\n INIT_CWD, yarnWorkspace, yarnWorkspaces,\n} from './yarn/index.ts'\n\nconst localeCompare = (a: string, b: string) => a.localeCompare(b)\n\nconst mergeEntries = (a: string[], b: string[]): string[] => [...union(a, b)].sort(localeCompare)\n\nexport const generateIgnoreFiles = (filename: string, pkg?: string) => {\n console.log(chalk.green(`Generate ${filename} Files`))\n const cwd = INIT_CWD() ?? '.'\n const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces()\n const readEntries = (location: string): string[] => readNonEmptyLines(`${location}/${filename}`)\n const writeEntries = (location: string, entries: string[]) => writeLines(`${location}/${filename}`, entries)\n const results = workspaces.map(({ location, name }) => {\n try {\n writeEntries(location, mergeEntries(readEntries(cwd), readEntries(location)))\n return 0\n } catch (ex) {\n const error = ex as Error\n console.error(`Generate ${filename} Files [${name}] [${error.message}]`)\n return 1\n }\n })\n const succeeded = results.every(result => result === 0)\n return succeeded ? 0 : 1\n}\n","import { spawnSync } from 'node:child_process'\n\nimport type { Workspace } from './Workspace.ts'\n\nexport const yarnWorkspaces = (): Workspace[] => {\n const result = spawnSync('yarn', ['workspaces', 'list', '--json', '--recursive'], { encoding: 'utf8', shell: true })\n if (result.error) {\n throw result.error\n }\n return (\n result.stdout\n .toString()\n // NOTE: This probably doesn't work on Windows\n // TODO: Replace /r/n with /n first\n .split('\\n')\n .slice(0, -1)\n .map((item) => {\n return JSON.parse(item)\n })\n )\n}\n","import type { Workspace } from './Workspace.ts'\nimport { yarnWorkspaces } from './yarnWorkspaces.ts'\n\nexport const yarnWorkspace = (pkg: string): Workspace => {\n const workspace = yarnWorkspaces().find(({ name }) => name === pkg)\n if (!workspace) throw new Error(`Workspace ${pkg} not found`)\n return workspace\n}\n","export const INIT_CWD = () => {\n if (!process.env.INIT_CWD) console.error('Missing INIT_CWD')\n return process.env.INIT_CWD\n}\n","import { generateIgnoreFiles } from '../lib/index.ts'\n\nconst filename = '.gitignore'\n\nexport const gitignoreGen = (pkg?: string) => generateIgnoreFiles(filename, pkg)\n"],"mappings":";;;;AAAO,IAAMA,wBAAwB;AAC9B,IAAMC,yBAAyB;;;ACAtC,SACEC,YAAYC,cAAcC,qBACrB;;;ACHA,IAAM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MAAMC,CAAAA,WAAUA,WAAW,CAAA;AACrD,SAAOF,YAAY,IAAI;AACzB,GAlBmC;;;AIVnC,IAAMG,WAAW;AAEV,IAAMC,eAAe,wBAACC,QAAiBC,oBAAoBH,UAAUE,GAAAA,GAAhD;","names":["WINDOWS_NEWLINE_REGEX","CROSS_PLATFORM_NEWLINE","existsSync","readFileSync","writeFileSync","empty","value","trim","length","notEmpty","union","a","b","Set","defaultReadFileSyncOptions","encoding","readLines","uri","options","defaultReadFileSyncOptions","existsSync","readFileSync","replace","WINDOWS_NEWLINE_REGEX","CROSS_PLATFORM_NEWLINE","split","readNonEmptyLines","filter","notEmpty","writeLines","lines","existing","undefined","desired","join","writeFileSync","chalk","spawnSync","yarnWorkspaces","result","spawnSync","encoding","shell","error","stdout","toString","split","slice","map","item","JSON","parse","yarnWorkspace","pkg","workspace","yarnWorkspaces","find","name","Error","INIT_CWD","process","env","console","error","localeCompare","a","b","mergeEntries","union","sort","generateIgnoreFiles","filename","pkg","console","log","chalk","green","cwd","INIT_CWD","workspaces","yarnWorkspace","yarnWorkspaces","readEntries","location","readNonEmptyLines","writeEntries","entries","writeLines","results","map","name","ex","error","message","succeeded","every","result","filename","gitignoreGen","pkg","generateIgnoreFiles"]}
1
+ {"version":3,"sources":["constants.ts","fileLines.ts","empty.ts","union.ts","ReadFileSyncOptions.ts","generateIgnoreFiles.ts","yarnWorkspaces.ts","yarnWorkspace.ts","yarnInitCwd.ts","gitignore-gen.ts"],"sourcesContent":["export const WINDOWS_NEWLINE_REGEX = /\\r\\n/g\nexport const CROSS_PLATFORM_NEWLINE = '\\n'\n","import {\n existsSync, PathLike, readFileSync, WriteFileOptions,\n writeFileSync,\n} from 'node:fs'\n\nimport { notEmpty } from '../string/index.ts'\nimport { CROSS_PLATFORM_NEWLINE, WINDOWS_NEWLINE_REGEX } from './constants.ts'\nimport { defaultReadFileSyncOptions, ReadFileSyncOptions } from './ReadFileSyncOptions.ts'\n\nexport const readLines = (uri: PathLike, options: ReadFileSyncOptions = defaultReadFileSyncOptions): string[] =>\n existsSync(uri)\n ? readFileSync(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE)\n : []\n\nexport const readNonEmptyLines = (uri: PathLike, options: ReadFileSyncOptions = defaultReadFileSyncOptions): string[] =>\n readLines(uri, options).filter(notEmpty)\n\nexport const writeLines = (uri: PathLike, lines: string[], options: WriteFileOptions = defaultReadFileSyncOptions) => {\n const existing = existsSync(uri) ? readFileSync(uri, options) : undefined\n const desired = lines.join(CROSS_PLATFORM_NEWLINE)\n // Check if the file is different before writing\n if (existing !== desired) writeFileSync(uri, desired, options)\n}\n","export const empty = (value?: string | undefined): boolean => value?.trim().length === 0\nexport const notEmpty = (value?: string | undefined): boolean => !empty(value)\n","export const union = (a: string[], b: string[]): Set<string> => new Set([...new Set(a), ...new Set(b)])\n","export type ReadFileSyncOptions = BufferEncoding | {\n encoding: BufferEncoding\n flags?: string\n}\n\nexport const defaultReadFileSyncOptions: ReadFileSyncOptions = { encoding: 'utf8' }\n","import chalk from 'chalk'\n\nimport { readNonEmptyLines, writeLines } from './file/index.ts'\nimport { union } from './string/index.ts'\nimport {\n INIT_CWD, yarnWorkspace, yarnWorkspaces,\n} from './yarn/index.ts'\n\nconst localeCompare = (a: string, b: string) => a.localeCompare(b)\n\nconst mergeEntries = (a: string[], b: string[]): string[] => [...union(a, b)].sort(localeCompare)\n\nexport const generateIgnoreFiles = (filename: string, pkg?: string) => {\n console.log(chalk.green(`Generate ${filename} Files`))\n const cwd = INIT_CWD() ?? '.'\n const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces()\n const readEntries = (location: string): string[] => readNonEmptyLines(`${location}/${filename}`)\n const writeEntries = (location: string, entries: string[]) => writeLines(`${location}/${filename}`, entries)\n const results = workspaces.map(({ location, name }) => {\n try {\n writeEntries(location, mergeEntries(readEntries(cwd), readEntries(location)))\n return 0\n } catch (ex) {\n const error = ex as Error\n console.error(`Generate ${filename} Files [${name}] [${error.message}]`)\n return 1\n }\n })\n const succeeded = results.every(result => result === 0)\n return succeeded ? 0 : 1\n}\n","import { spawnSync } from 'node:child_process'\n\nimport { Workspace } from './Workspace.ts'\n\nexport const yarnWorkspaces = (): Workspace[] => {\n const result = spawnSync('yarn', ['workspaces', 'list', '--json', '--recursive'], { encoding: 'utf8', shell: true })\n if (result.error) {\n throw result.error\n }\n return (\n result.stdout\n .toString()\n // NOTE: This probably doesn't work on Windows\n // TODO: Replace /r/n with /n first\n .split('\\n')\n .slice(0, -1)\n .map((item) => {\n return JSON.parse(item)\n })\n )\n}\n","import { Workspace } from './Workspace.ts'\nimport { yarnWorkspaces } from './yarnWorkspaces.ts'\n\nexport const yarnWorkspace = (pkg: string): Workspace => {\n const workspace = yarnWorkspaces().find(({ name }) => name === pkg)\n if (!workspace) throw new Error(`Workspace ${pkg} not found`)\n return workspace\n}\n","export const INIT_CWD = () => {\n if (!process.env.INIT_CWD) console.error('Missing INIT_CWD')\n return process.env.INIT_CWD\n}\n","import { generateIgnoreFiles } from '../lib/index.ts'\n\nconst filename = '.gitignore'\n\nexport const gitignoreGen = (pkg?: string) => generateIgnoreFiles(filename, pkg)\n"],"mappings":";;;;AAAO,IAAMA,wBAAwB;AAC9B,IAAMC,yBAAyB;;;ACDtC,SACEC,YAAsBC,cACtBC,qBACK;;;ACHA,IAAMC,QAAQ,wBAACC,UAAwCA,OAAOC,KAAAA,EAAOC,WAAW,GAAlE;AACd,IAAMC,WAAW,wBAACH,UAAwC,CAACD,MAAMC,KAAAA,GAAhD;;;ACDjB,IAAMI,QAAQ,wBAACC,GAAaC,MAA6B,oBAAIC,IAAI;KAAI,IAAIA,IAAIF,CAAAA;KAAO,IAAIE,IAAID,CAAAA;CAAG,GAAjF;;;ACKd,IAAME,6BAAkD;EAAEC,UAAU;AAAO;;;AHI3E,IAAMC,YAAY,wBAACC,KAAeC,UAA+BC,+BACtEC,WAAWH,GAAAA,IACPI,aAA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D,EAAED,cAAcE,CAAAA,GAA1C;AAEtB,IAAMC,eAAe,wBAACF,GAAaC,MAA0B;KAAIE,MAAMH,GAAGC,CAAAA;EAAIG,KAAKL,aAAAA,GAA9D;AAEd,IAAMM,sBAAsB,wBAACC,WAAkBC,QAAAA;AACpDC,UAAQC,IAAIC,MAAMC,MAAM,YAAYL,SAAAA,QAAgB,CAAA;AACpD,QAAMM,MAAMC,SAAAA,KAAc;AAC1B,QAAMC,aAAaP,MAAM;IAACQ,cAAcR,GAAAA;MAAQS,eAAAA;AAChD,QAAMC,cAAc,wBAACC,aAA+BC,kBAAkB,GAAGD,QAAAA,IAAYZ,SAAAA,EAAU,GAA3E;AACpB,QAAMc,eAAe,wBAACF,UAAkBG,YAAsBC,WAAW,GAAGJ,QAAAA,IAAYZ,SAAAA,IAAYe,OAAAA,GAA/E;AACrB,QAAME,UAAUT,WAAWU,IAAI,CAAC,EAAEN,UAAUO,KAAI,MAAE;AAChD,QAAI;AACFL,mBAAaF,UAAUhB,aAAae,YAAYL,GAAAA,GAAMK,YAAYC,QAAAA,CAAAA,CAAAA;AAClE,aAAO;IACT,SAASQ,IAAI;AACX,YAAMC,QAAQD;AACdlB,cAAQmB,MAAM,YAAYrB,SAAAA,WAAmBmB,IAAAA,MAAUE,MAAMC,OAAO,GAAG;AACvE,aAAO;IACT;EACF,CAAA;AACA,QAAMC,YAAYN,QAAQO,MAAMC,CAAAA,WAAUA,WAAW,CAAA;AACrD,SAAOF,YAAY,IAAI;AACzB,GAlBmC;;;AIVnC,IAAMG,WAAW;AAEV,IAAMC,eAAe,wBAACC,QAAiBC,oBAAoBH,UAAUE,GAAAA,GAAhD;","names":["WINDOWS_NEWLINE_REGEX","CROSS_PLATFORM_NEWLINE","existsSync","readFileSync","writeFileSync","empty","value","trim","length","notEmpty","union","a","b","Set","defaultReadFileSyncOptions","encoding","readLines","uri","options","defaultReadFileSyncOptions","existsSync","readFileSync","replace","WINDOWS_NEWLINE_REGEX","CROSS_PLATFORM_NEWLINE","split","readNonEmptyLines","filter","notEmpty","writeLines","lines","existing","undefined","desired","join","writeFileSync","chalk","spawnSync","yarnWorkspaces","result","spawnSync","encoding","shell","error","stdout","toString","split","slice","map","item","JSON","parse","yarnWorkspace","pkg","workspace","yarnWorkspaces","find","name","Error","INIT_CWD","process","env","console","error","localeCompare","a","b","mergeEntries","union","sort","generateIgnoreFiles","filename","pkg","console","log","chalk","green","cwd","INIT_CWD","workspaces","yarnWorkspace","yarnWorkspaces","readEntries","location","readNonEmptyLines","writeEntries","entries","writeLines","results","map","name","ex","error","message","succeeded","every","result","filename","gitignoreGen","pkg","generateIgnoreFiles"]}
@@ -1457,7 +1457,7 @@ var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", { verbose }
1457
1457
  removeComments: false,
1458
1458
  skipDefaultLibCheck: true,
1459
1459
  skipLibCheck: true,
1460
- sourceMap: true
1460
+ sourceMap: false
1461
1461
  }),
1462
1462
  ...compilerOptionsParam
1463
1463
  };
@@ -1911,7 +1911,7 @@ var runTypeDoc = /* @__PURE__ */ __name(async (app) => {
1911
1911
  return ExitCodes.NoEntryPoints;
1912
1912
  }
1913
1913
  if (app.options.getValue("watch")) {
1914
- app.convertAndWatch(async (project2) => {
1914
+ await app.convertAndWatch(async (project2) => {
1915
1915
  const out = app.options.getValue("out");
1916
1916
  if (out) {
1917
1917
  await app.generateDocs(project2, out);