outask 0.0.0-stage → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +38 -2
- package/bin/outask +7 -0
- package/bin/tasks +7 -0
- package/cli.mjs +151 -0
- package/mcp/package-lock.json +175 -0
- package/mcp/package.json +15 -0
- package/mcp/server.mjs +132 -0
- package/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/core/README.md +40 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-Anm-lwWi.d.mts +8507 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-Anm-lwWi.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs +1681 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-D1CeV_Jr.cjs +2902 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-D1CeV_Jr.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-V9XJSCfa.d.cts +8507 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-V9XJSCfa.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +175 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +201 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +99 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +99 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/package.json +85 -0
- package/node_modules/@modelcontextprotocol/server/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/server/README.md +30 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs +7514 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts +1071 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs +7531 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs +986 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts +74 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs +981 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +60 -0
- package/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +42 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D4NN8WsG.d.mts +4168 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D4NN8WsG.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DZmmlN8e.d.cts +4170 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-DZmmlN8e.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +46 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +34 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs +1978 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +810 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +810 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs +1790 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-BumlNux0.cjs +2477 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-BumlNux0.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DIH4cS6P.mjs +2326 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DIH4cS6P.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +23 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +11 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +11 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +22 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +12 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +4 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +30 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +10 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +10 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +29 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-BhnGYybN.cjs +8200 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-BhnGYybN.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs +7702 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +591 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +115 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +115 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +589 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts +1099 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +1099 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +5 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +3 -0
- package/node_modules/@modelcontextprotocol/server/package.json +160 -0
- package/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/node_modules/jsonc-parser/README.md +364 -0
- package/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/node_modules/jsonc-parser/package.json +37 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +218 -0
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +52 -0
- package/node_modules/zod/index.d.cts +3 -0
- package/node_modules/zod/index.d.ts +3 -0
- package/node_modules/zod/index.js +7 -0
- package/node_modules/zod/locales/index.cjs +36 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +51 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +147 -0
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +7 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +340 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +33 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +78 -0
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +97 -0
- package/node_modules/zod/src/v4/classic/external.ts +57 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +20 -0
- package/node_modules/zod/src/v4/classic/parse.ts +88 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2937 -0
- package/node_modules/zod/src/v4/core/api.ts +1875 -0
- package/node_modules/zod/src/v4/core/checks.ts +1266 -0
- package/node_modules/zod/src/v4/core/compile.ts +2322 -0
- package/node_modules/zod/src/v4/core/core.ts +230 -0
- package/node_modules/zod/src/v4/core/doc.ts +52 -0
- package/node_modules/zod/src/v4/core/errors.ts +543 -0
- package/node_modules/zod/src/v4/core/index.ts +19 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +148 -0
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +309 -0
- package/node_modules/zod/src/v4/core/regexes.ts +217 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +5226 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +857 -0
- package/node_modules/zod/src/v4/core/util.ts +1293 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +120 -0
- package/node_modules/zod/src/v4/locales/az.ts +116 -0
- package/node_modules/zod/src/v4/locales/be.ts +188 -0
- package/node_modules/zod/src/v4/locales/bg.ts +133 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +121 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +123 -0
- package/node_modules/zod/src/v4/locales/da.ts +128 -0
- package/node_modules/zod/src/v4/locales/de.ts +121 -0
- package/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +136 -0
- package/node_modules/zod/src/v4/locales/eo.ts +123 -0
- package/node_modules/zod/src/v4/locales/es.ts +145 -0
- package/node_modules/zod/src/v4/locales/fa.ts +131 -0
- package/node_modules/zod/src/v4/locales/fi.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr.ts +139 -0
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +253 -0
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/node_modules/zod/src/v4/locales/hu.ts +122 -0
- package/node_modules/zod/src/v4/locales/hy.ts +175 -0
- package/node_modules/zod/src/v4/locales/id.ts +120 -0
- package/node_modules/zod/src/v4/locales/index.ts +63 -0
- package/node_modules/zod/src/v4/locales/is.ts +124 -0
- package/node_modules/zod/src/v4/locales/it.ts +121 -0
- package/node_modules/zod/src/v4/locales/ja.ts +119 -0
- package/node_modules/zod/src/v4/locales/ka.ts +128 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +124 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +126 -0
- package/node_modules/zod/src/v4/locales/lt.ts +243 -0
- package/node_modules/zod/src/v4/locales/mk.ts +123 -0
- package/node_modules/zod/src/v4/locales/ms.ts +120 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +121 -0
- package/node_modules/zod/src/v4/locales/ota.ts +122 -0
- package/node_modules/zod/src/v4/locales/pl.ts +123 -0
- package/node_modules/zod/src/v4/locales/ps.ts +131 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +159 -0
- package/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/node_modules/zod/src/v4/locales/ru.ts +188 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +123 -0
- package/node_modules/zod/src/v4/locales/sv.ts +124 -0
- package/node_modules/zod/src/v4/locales/ta.ts +123 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +124 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +116 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +122 -0
- package/node_modules/zod/src/v4/locales/ur.ts +124 -0
- package/node_modules/zod/src/v4/locales/uz.ts +120 -0
- package/node_modules/zod/src/v4/locales/vi.ts +122 -0
- package/node_modules/zod/src/v4/locales/yo.ts +129 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +121 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +120 -0
- package/node_modules/zod/src/v4/mini/checks.ts +33 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +52 -0
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +16 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +2051 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +167 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +143 -0
- package/node_modules/zod/v3/errors.cjs +36 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +41 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +28 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +143 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +21 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +156 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +52 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +21 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3798 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3697 -0
- package/node_modules/zod/v4/classic/checks.cjs +53 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +66 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +80 -0
- package/node_modules/zod/v4/classic/compat.d.cts +48 -0
- package/node_modules/zod/v4/classic/compat.d.ts +48 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +102 -0
- package/node_modules/zod/v4/classic/errors.d.cts +29 -0
- package/node_modules/zod/v4/classic/errors.d.ts +29 -0
- package/node_modules/zod/v4/classic/errors.js +57 -0
- package/node_modules/zod/v4/classic/external.cjs +97 -0
- package/node_modules/zod/v4/classic/external.d.cts +19 -0
- package/node_modules/zod/v4/classic/external.d.ts +19 -0
- package/node_modules/zod/v4/classic/external.js +17 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +52 -0
- package/node_modules/zod/v4/classic/index.d.cts +3 -0
- package/node_modules/zod/v4/classic/index.d.ts +3 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +68 -0
- package/node_modules/zod/v4/classic/iso.d.cts +7 -0
- package/node_modules/zod/v4/classic/iso.d.ts +7 -0
- package/node_modules/zod/v4/classic/iso.js +15 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +63 -0
- package/node_modules/zod/v4/classic/parse.d.cts +44 -0
- package/node_modules/zod/v4/classic/parse.d.ts +44 -0
- package/node_modules/zod/v4/classic/parse.js +16 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1676 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +816 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +816 -0
- package/node_modules/zod/v4/classic/schemas.js +1535 -0
- package/node_modules/zod/v4/core/api.cjs +1269 -0
- package/node_modules/zod/v4/core/api.d.cts +335 -0
- package/node_modules/zod/v4/core/api.d.ts +335 -0
- package/node_modules/zod/v4/core/api.js +1107 -0
- package/node_modules/zod/v4/core/checks.cjs +561 -0
- package/node_modules/zod/v4/core/checks.d.cts +294 -0
- package/node_modules/zod/v4/core/checks.d.ts +294 -0
- package/node_modules/zod/v4/core/checks.js +516 -0
- package/node_modules/zod/v4/core/compile.cjs +1916 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1866 -0
- package/node_modules/zod/v4/core/core.cjs +167 -0
- package/node_modules/zod/v4/core/core.d.cts +82 -0
- package/node_modules/zod/v4/core/core.d.ts +82 -0
- package/node_modules/zod/v4/core/core.js +141 -0
- package/node_modules/zod/v4/core/doc.cjs +61 -0
- package/node_modules/zod/v4/core/doc.d.cts +16 -0
- package/node_modules/zod/v4/core/doc.d.ts +16 -0
- package/node_modules/zod/v4/core/doc.js +38 -0
- package/node_modules/zod/v4/core/errors.cjs +317 -0
- package/node_modules/zod/v4/core/errors.d.cts +225 -0
- package/node_modules/zod/v4/core/errors.d.ts +225 -0
- package/node_modules/zod/v4/core/errors.js +267 -0
- package/node_modules/zod/v4/core/index.cjs +70 -0
- package/node_modules/zod/v4/core/index.d.cts +19 -0
- package/node_modules/zod/v4/core/index.d.ts +19 -0
- package/node_modules/zod/v4/core/index.js +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
- package/node_modules/zod/v4/core/json-schema.cjs +21 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +89 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +89 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +233 -0
- package/node_modules/zod/v4/core/parse.d.cts +52 -0
- package/node_modules/zod/v4/core/parse.d.ts +52 -0
- package/node_modules/zod/v4/core/parse.js +175 -0
- package/node_modules/zod/v4/core/regexes.cjs +209 -0
- package/node_modules/zod/v4/core/regexes.d.cts +90 -0
- package/node_modules/zod/v4/core/regexes.d.ts +90 -0
- package/node_modules/zod/v4/core/regexes.js +156 -0
- package/node_modules/zod/v4/core/registries.cjs +75 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2699 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1275 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1275 -0
- package/node_modules/zod/v4/core/schemas.js +2636 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +21 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +681 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.js +651 -0
- package/node_modules/zod/v4/core/util.cjs +964 -0
- package/node_modules/zod/v4/core/util.d.cts +280 -0
- package/node_modules/zod/v4/core/util.d.ts +280 -0
- package/node_modules/zod/v4/core/util.js +873 -0
- package/node_modules/zod/v4/core/versions.cjs +27 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +51 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +4 -0
- package/node_modules/zod/v4/locales/ar.cjs +138 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +111 -0
- package/node_modules/zod/v4/locales/az.cjs +137 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +110 -0
- package/node_modules/zod/v4/locales/be.cjs +195 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +168 -0
- package/node_modules/zod/v4/locales/bg.cjs +152 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +125 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +139 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +112 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +143 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +116 -0
- package/node_modules/zod/v4/locales/da.cjs +147 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +120 -0
- package/node_modules/zod/v4/locales/de.cjs +140 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +113 -0
- package/node_modules/zod/v4/locales/el.cjs +139 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +112 -0
- package/node_modules/zod/v4/locales/en.cjs +152 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +125 -0
- package/node_modules/zod/v4/locales/eo.cjs +141 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +114 -0
- package/node_modules/zod/v4/locales/es.cjs +163 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +136 -0
- package/node_modules/zod/v4/locales/fa.cjs +146 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +119 -0
- package/node_modules/zod/v4/locales/fi.cjs +144 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +117 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +139 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +112 -0
- package/node_modules/zod/v4/locales/fr.cjs +156 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +129 -0
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +248 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +221 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +126 -0
- package/node_modules/zod/v4/locales/hu.cjs +140 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +113 -0
- package/node_modules/zod/v4/locales/hy.cjs +185 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +158 -0
- package/node_modules/zod/v4/locales/id.cjs +138 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +111 -0
- package/node_modules/zod/v4/locales/index.cjs +152 -0
- package/node_modules/zod/v4/locales/index.d.cts +63 -0
- package/node_modules/zod/v4/locales/index.d.ts +63 -0
- package/node_modules/zod/v4/locales/index.js +63 -0
- package/node_modules/zod/v4/locales/is.cjs +141 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +114 -0
- package/node_modules/zod/v4/locales/it.cjs +140 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +113 -0
- package/node_modules/zod/v4/locales/ja.cjs +139 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +112 -0
- package/node_modules/zod/v4/locales/ka.cjs +144 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +117 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +142 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +115 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +143 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +116 -0
- package/node_modules/zod/v4/locales/lt.cjs +234 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +207 -0
- package/node_modules/zod/v4/locales/mk.cjs +141 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +114 -0
- package/node_modules/zod/v4/locales/ms.cjs +139 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +112 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +142 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +115 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +140 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +113 -0
- package/node_modules/zod/v4/locales/ota.cjs +141 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +114 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +141 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +114 -0
- package/node_modules/zod/v4/locales/ps.cjs +146 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +119 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +169 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +142 -0
- package/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +122 -0
- package/node_modules/zod/v4/locales/ru.cjs +195 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +168 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +141 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +114 -0
- package/node_modules/zod/v4/locales/sv.cjs +142 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +115 -0
- package/node_modules/zod/v4/locales/ta.cjs +142 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +115 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +142 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +115 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +137 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +110 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +140 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +113 -0
- package/node_modules/zod/v4/locales/ur.cjs +142 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +115 -0
- package/node_modules/zod/v4/locales/uz.cjs +140 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +113 -0
- package/node_modules/zod/v4/locales/vi.cjs +140 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +113 -0
- package/node_modules/zod/v4/locales/yo.cjs +139 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +112 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +141 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +114 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +139 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +112 -0
- package/node_modules/zod/v4/mini/checks.cjs +54 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +71 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +95 -0
- package/node_modules/zod/v4/mini/external.d.cts +16 -0
- package/node_modules/zod/v4/mini/external.d.ts +16 -0
- package/node_modules/zod/v4/mini/external.js +16 -0
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +51 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +83 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +37 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1147 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +480 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +480 -0
- package/node_modules/zod/v4/mini/schemas.js +1002 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +51 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +32 -4
- package/runtime.cjs +14 -0
- package/scripts/arguments.mjs +77 -0
- package/scripts/continuation.mjs +31 -0
- package/scripts/create-task.mjs +27 -0
- package/scripts/delete-task.mjs +3 -0
- package/scripts/entry.mjs +6 -0
- package/scripts/get-task.mjs +40 -0
- package/scripts/get-tasks.mjs +84 -0
- package/scripts/hook.mjs +89 -0
- package/scripts/inspect-blockers.mjs +76 -0
- package/scripts/install-launcher.mjs +28 -0
- package/scripts/install-migration.mjs +82 -0
- package/scripts/install-path.mjs +105 -0
- package/scripts/install-release.mjs +252 -0
- package/scripts/lifecycle.mjs +35 -0
- package/scripts/list-tasks.mjs +117 -0
- package/scripts/output.mjs +67 -0
- package/scripts/schema.mjs +41 -0
- package/scripts/search-tasks.mjs +96 -0
- package/scripts/task-write-input.mjs +80 -0
- package/scripts/transition-task.mjs +3 -0
- package/scripts/update-release.mjs +82 -0
- package/scripts/update-task.mjs +29 -0
- package/scripts/validate-task-stores.mjs +34 -0
- package/src/blockers.mjs +134 -0
- package/src/cache.mjs +50 -0
- package/src/config.mjs +30 -0
- package/src/create.mjs +145 -0
- package/src/cursor.mjs +30 -0
- package/src/destinations.mjs +74 -0
- package/src/errors.mjs +16 -0
- package/src/field-rules.mjs +105 -0
- package/src/fields.mjs +32 -0
- package/src/input.mjs +146 -0
- package/src/limits.mjs +5 -0
- package/src/locations.mjs +19 -0
- package/src/pagination.mjs +30 -0
- package/src/project-lock.mjs +74 -0
- package/src/projects.mjs +33 -0
- package/src/response.mjs +75 -0
- package/src/schema.mjs +76 -0
- package/src/search-index-worker.mjs +10 -0
- package/src/search-index.mjs +639 -0
- package/src/search.mjs +228 -0
- package/src/service.mjs +260 -0
- package/src/source.mjs +48 -0
- package/src/sqlite.mjs +17 -0
- package/src/storage-format.mjs +15 -0
- package/src/stores.mjs +337 -0
- package/src/tasks.mjs +290 -0
- package/src/timestamps.mjs +22 -0
- package/src/transition.mjs +181 -0
- package/src/update.mjs +56 -0
- package/src/validation.mjs +144 -0
- package/src/version.mjs +5 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { cpSync, existsSync, linkSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, symlinkSync } from 'node:fs';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { dirname, join, resolve } from 'node:path';
|
|
5
|
+
import { configPath } from '../src/locations.mjs';
|
|
6
|
+
|
|
7
|
+
export function legacyLocations(env = process.env) {
|
|
8
|
+
const home = process.platform === 'win32' ? env.USERPROFILE || homedir() : env.HOME || homedir();
|
|
9
|
+
return [join(home, '.local/share/task-tracker'), join(home, '.local/share/task-tracker/releases'),
|
|
10
|
+
join(home, 'Library/Application Support'), join(env.LOCALAPPDATA || join(home, 'AppData/Local'), 'Programs')];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function legacyConfig(env = process.env) {
|
|
14
|
+
const home = env.HOME || homedir();
|
|
15
|
+
const path = join(env.XDG_CONFIG_HOME || join(home, '.config'), 'task-tracker/config.json');
|
|
16
|
+
// An explicitly selected registry is never moved by an application install.
|
|
17
|
+
if (env.TASK_TRACKER_CONFIG || !existsSync(path)) return undefined;
|
|
18
|
+
const target = resolve(configPath(env));
|
|
19
|
+
if (existsSync(target) && lstatSync(target).isSymbolicLink()) {
|
|
20
|
+
throw new Error(`CONFIG_MIGRATION_REQUIRED: ${target} is a user-managed symlink; select your registry explicitly with TASK_TRACKER_CONFIG`);
|
|
21
|
+
}
|
|
22
|
+
if (lstatSync(path).isSymbolicLink() && resolve(dirname(path), readlinkSync(path)) === resolve(target)) {
|
|
23
|
+
return { source: path, target };
|
|
24
|
+
}
|
|
25
|
+
// A directory alias may already expose exactly the canonical file. Do not
|
|
26
|
+
// replace that file with a link to itself or relocate user-managed folders.
|
|
27
|
+
if (existsSync(target) && realpathSync(path) === realpathSync(target)) return undefined;
|
|
28
|
+
if (!lstatSync(path).isFile() || [dirname(path), dirname(dirname(path))].some(directory => lstatSync(directory).isSymbolicLink())) {
|
|
29
|
+
throw new Error(`CONFIG_MIGRATION_REQUIRED: ${path} uses a symlink or non-file; select it explicitly with TASK_TRACKER_CONFIG to preserve that external registry`);
|
|
30
|
+
}
|
|
31
|
+
return { source: path, target };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Delete only a confirmed managed payload. Unrecognised files stay in place;
|
|
35
|
+
// their presence must never turn an old application directory into trash.
|
|
36
|
+
export function retirePayload(path, payload) {
|
|
37
|
+
for (const name of payload) rmSync(join(path, name), { recursive: true, force: true });
|
|
38
|
+
if (readdirSync(path).length === 0) rmdirSync(path);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function obsoleteInstalls(roots, destination, managed) {
|
|
42
|
+
const result = [];
|
|
43
|
+
for (const root of new Set(roots)) {
|
|
44
|
+
if (!existsSync(root) || !lstatSync(root).isDirectory()) continue;
|
|
45
|
+
for (const name of readdirSync(root)) {
|
|
46
|
+
const path = join(root, name);
|
|
47
|
+
if (path !== destination && !lstatSync(path).isSymbolicLink() && managed(path)) result.push(path);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function retireConfig(migration) {
|
|
54
|
+
if (!migration) return;
|
|
55
|
+
if (!existsSync(migration.target)) {
|
|
56
|
+
mkdirSync(dirname(migration.target), { recursive: true });
|
|
57
|
+
const staged = `${migration.target}.outask-${randomUUID()}`;
|
|
58
|
+
try {
|
|
59
|
+
cpSync(migration.source, staged, { errorOnExist: true, force: false });
|
|
60
|
+
// Publish complete bytes without overwriting a registry created meanwhile.
|
|
61
|
+
try { linkSync(staged, migration.target); } catch (error) {
|
|
62
|
+
if (error.code !== 'EEXIST') throw error;
|
|
63
|
+
}
|
|
64
|
+
} finally { rmSync(staged, { force: true }); }
|
|
65
|
+
}
|
|
66
|
+
if (!readFileSync(migration.source).equals(readFileSync(migration.target))) {
|
|
67
|
+
throw new Error('CONFIG_CONFLICT: registry changed during installation; both files were retained for reconciliation');
|
|
68
|
+
}
|
|
69
|
+
const temporary = `${migration.source}.outask-${randomUUID()}`;
|
|
70
|
+
let created = false;
|
|
71
|
+
try {
|
|
72
|
+
if (process.platform === 'win32') linkSync(migration.target, temporary);
|
|
73
|
+
else symlinkSync(migration.target, temporary);
|
|
74
|
+
created = true;
|
|
75
|
+
renameSync(temporary, migration.source);
|
|
76
|
+
created = false;
|
|
77
|
+
} catch (error) {
|
|
78
|
+
throw new Error(`CONFIG_MIGRATION_REQUIRED: could not link the legacy registry (${error.code}); neither settings copy was deleted. Select an external registry with TASK_TRACKER_CONFIG if its filesystem cannot provide the link`);
|
|
79
|
+
} finally {
|
|
80
|
+
if (created) rmSync(temporary, { force: true });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
5
|
+
|
|
6
|
+
const quote = (value) => "'" + value.replaceAll("'", "'\\''") + "'";
|
|
7
|
+
const managedBlocks = /^# Outask command path\ncase ":\$\{PATH-\}:" in\n \*:(.+):\*\) ;;\n \*\) export PATH=\1:"\$PATH" ;;\nesac\n/gm;
|
|
8
|
+
|
|
9
|
+
// Both installers configure future terminals after the command is installed.
|
|
10
|
+
// Profile errors must not turn a usable installation into a reported failure.
|
|
11
|
+
export function configurePath(bin, { env = process.env, platform = process.platform } = {}) {
|
|
12
|
+
if (platform === 'win32') return configureWindowsPath(bin, env);
|
|
13
|
+
const home = env.HOME || homedir();
|
|
14
|
+
const shell = basename(env.SHELL || '');
|
|
15
|
+
const setting = `export PATH=${quote(bin)}:"$PATH"`;
|
|
16
|
+
const messages = [`Run immediately: ${quote(join(bin, 'outask'))} --help`];
|
|
17
|
+
let profiles;
|
|
18
|
+
if (shell === 'zsh') {
|
|
19
|
+
const directory = env.ZDOTDIR === undefined ? home : resolve(env.ZDOTDIR);
|
|
20
|
+
profiles = [join(directory, '.zprofile')];
|
|
21
|
+
if (platform === 'linux') profiles.push(join(directory, '.zshrc'));
|
|
22
|
+
} else if (shell === 'bash') {
|
|
23
|
+
const login = ['.bash_profile', '.bash_login', '.profile'].map((name) => join(home, name));
|
|
24
|
+
profiles = [join(home, '.bashrc'), login.find(existsSync) || join(home, platform === 'darwin' ? '.bash_profile' : '.profile')];
|
|
25
|
+
} else {
|
|
26
|
+
messages.push(`Automatic PATH setup is unavailable for ${shell || 'an unknown shell'}. Add ${setting} to your shell startup file, then open a new terminal.`);
|
|
27
|
+
return messages;
|
|
28
|
+
}
|
|
29
|
+
// Literal quoting also protects shell pattern characters in custom paths.
|
|
30
|
+
const block = `# Outask command path\ncase ":\${PATH-}:" in\n *:${quote(bin)}:*) ;;\n *) ${setting} ;;\nesac\n`;
|
|
31
|
+
// A shell change must not leave the application's old generated paths in
|
|
32
|
+
// another shell's existing startup files. Only complete managed blocks count.
|
|
33
|
+
const candidates = ['.bashrc', '.bash_profile', '.bash_login', '.profile', '.zprofile', '.zshrc'].map(name => join(home, name));
|
|
34
|
+
if (env.ZDOTDIR !== undefined) candidates.push(join(resolve(env.ZDOTDIR), '.zprofile'), join(resolve(env.ZDOTDIR), '.zshrc'));
|
|
35
|
+
for (const profile of candidates) {
|
|
36
|
+
try {
|
|
37
|
+
if (existsSync(profile)) {
|
|
38
|
+
const contents = readFileSync(profile, 'utf8');
|
|
39
|
+
if (contents.replace(managedBlocks, '') !== contents) profiles.push(profile);
|
|
40
|
+
}
|
|
41
|
+
} catch (error) { messages.push(`Cannot inspect legacy PATH blocks in ${profile}: ${error.message}`); }
|
|
42
|
+
}
|
|
43
|
+
for (const profile of new Set(profiles)) {
|
|
44
|
+
try {
|
|
45
|
+
const original = existsSync(profile) ? readFileSync(profile, 'utf8') : '';
|
|
46
|
+
// Match the complete generated block, including the identical quoted
|
|
47
|
+
// path in the test and assignment. Other user shell code is untouched.
|
|
48
|
+
const contents = original.replace(managedBlocks, '');
|
|
49
|
+
const updated = `${contents && !contents.endsWith('\n') ? `${contents}\n` : contents}${block}`;
|
|
50
|
+
if (original !== updated) {
|
|
51
|
+
mkdirSync(dirname(profile), { recursive: true });
|
|
52
|
+
writeFileSync(profile, updated, { mode: 0o600 });
|
|
53
|
+
}
|
|
54
|
+
messages.push(`PATH configured in ${profile}.`);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
messages.push(`Command installed at ${join(bin, 'outask')}; PATH setup failed for ${profile}: ${error.message}. Add ${setting} to that startup file manually.`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
messages.push('Open a new terminal after PATH setup to use outask by name. The current terminal PATH is unchanged.');
|
|
60
|
+
return messages;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function configureWindowsPath(bin, env) {
|
|
64
|
+
const launcher = join(bin, 'outask.cmd');
|
|
65
|
+
const messages = [`Run immediately in PowerShell: & "${launcher}" --help`, `Run immediately in cmd.exe: "${launcher}" --help`];
|
|
66
|
+
// Read the raw registry value so expandable entries and its value kind survive.
|
|
67
|
+
const script = `
|
|
68
|
+
$ErrorActionPreference = 'Stop'
|
|
69
|
+
$key = [Microsoft.Win32.Registry]::CurrentUser.CreateSubKey('Environment')
|
|
70
|
+
try {
|
|
71
|
+
$raw = [string]$key.GetValue('Path', '', [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames)
|
|
72
|
+
$kind = [Microsoft.Win32.RegistryValueKind]::ExpandString
|
|
73
|
+
if ($key.GetValueNames() -contains 'Path') { $kind = $key.GetValueKind('Path') }
|
|
74
|
+
$bin = $env:OUTASK_INSTALL_BIN
|
|
75
|
+
$normal = $bin.TrimEnd('\\').ToLowerInvariant()
|
|
76
|
+
$kept = @($raw.Split(';') | Where-Object {
|
|
77
|
+
$entry = [Environment]::ExpandEnvironmentVariables($_.Trim().Trim('"')).TrimEnd('\\').ToLowerInvariant()
|
|
78
|
+
$entry -ne $normal
|
|
79
|
+
}) -join ';'
|
|
80
|
+
$separator = if ($kept.Length -eq 0 -or $kept.EndsWith(';')) { '' } else { ';' }
|
|
81
|
+
$updated = $kept + $separator + $bin
|
|
82
|
+
if ($updated -ne $raw) { $key.SetValue('Path', $updated, $kind) }
|
|
83
|
+
} finally { $key.Dispose() }
|
|
84
|
+
Add-Type -TypeDefinition @'
|
|
85
|
+
using System;
|
|
86
|
+
using System.Runtime.InteropServices;
|
|
87
|
+
public static class OutaskEnvironment {
|
|
88
|
+
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
|
89
|
+
public static extern IntPtr SendMessageTimeout(IntPtr window, uint message, UIntPtr parameter, string value, uint flags, uint timeout, out UIntPtr result);
|
|
90
|
+
}
|
|
91
|
+
'@
|
|
92
|
+
$result = [UIntPtr]::Zero
|
|
93
|
+
if ([OutaskEnvironment]::SendMessageTimeout([IntPtr]0xffff, 0x1a, [UIntPtr]::Zero, 'Environment', 2, 5000, [ref]$result) -eq [IntPtr]::Zero) {
|
|
94
|
+
throw 'User PATH was saved, but Windows environment-change notification failed; restart your terminal host or sign out and back in.'
|
|
95
|
+
}
|
|
96
|
+
`;
|
|
97
|
+
const result = spawnSync('powershell.exe', ['-NoLogo', '-NoProfile', '-NonInteractive', '-Command', script], {
|
|
98
|
+
env: { ...env, OUTASK_INSTALL_BIN: bin }, encoding: 'utf8', windowsHide: true, timeout: 30000,
|
|
99
|
+
});
|
|
100
|
+
if (result.error || result.status !== 0) {
|
|
101
|
+
messages.push(`Command installed at ${launcher}; user PATH setup failed: ${result.error?.message || result.stderr?.trim() || result.status}. Add ${bin} to your user PATH manually.`);
|
|
102
|
+
} else messages.push(`PATH configured in the current user's Windows environment: ${bin}.`);
|
|
103
|
+
messages.push('Open a new PowerShell or cmd.exe terminal to use outask by name. An already-open terminal keeps its existing PATH; launch from the printed path immediately.');
|
|
104
|
+
return messages;
|
|
105
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { accessSync, constants, cpSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, readlinkSync, realpathSync, renameSync, rmSync, symlinkSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { basename, delimiter, dirname, join, resolve, sep } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { parseArgs } from 'node:util';
|
|
7
|
+
import { commandNames, packageNames, installLocations, windowsLauncher, launcherEntry } from './install-launcher.mjs';
|
|
8
|
+
import { configurePath } from './install-path.mjs';
|
|
9
|
+
import { updateRelease } from './update-release.mjs';
|
|
10
|
+
import { legacyLocations, legacyConfig, obsoleteInstalls, retireConfig, retirePayload } from './install-migration.mjs';
|
|
11
|
+
|
|
12
|
+
const windows = process.platform === 'win32';
|
|
13
|
+
// Node 22's native recursive copy can misplace UTF-8 Windows paths. A filter
|
|
14
|
+
// selects its JavaScript traversal without excluding any files or changing links.
|
|
15
|
+
const copyOptions = { recursive: true, verbatimSymlinks: true, ...(windows ? { filter: () => true } : {}) };
|
|
16
|
+
const defaults = installLocations();
|
|
17
|
+
const root = resolve(fileURLToPath(new URL('../..', import.meta.url)));
|
|
18
|
+
const publicInstallers = { 'linux-x64': 'install.sh', 'macos-arm64': 'Install.command', 'windows-x64': 'Install.cmd' };
|
|
19
|
+
const managedPayload = ['app', 'bin', 'install.sh', 'install.mjs', 'install-path.mjs', 'install-launcher.mjs',
|
|
20
|
+
...(!windows ? ['install.cmd'] : []), 'Install.command', 'Install.cmd', 'release.json', 'README.md'];
|
|
21
|
+
function inspect(path) {
|
|
22
|
+
try { return lstatSync(path); } catch (error) {
|
|
23
|
+
if (error.code === 'ENOENT') return undefined;
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function canonical(path) {
|
|
28
|
+
try { return realpathSync(path); } catch (error) {
|
|
29
|
+
if (error.code !== 'ENOENT') throw error;
|
|
30
|
+
const parent = dirname(path);
|
|
31
|
+
return parent === path ? path : join(canonical(parent), basename(path));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function executable(path) {
|
|
35
|
+
try { accessSync(path, constants.X_OK); return !lstatSync(path).isDirectory(); } catch { return false; }
|
|
36
|
+
}
|
|
37
|
+
function startupFile(path) {
|
|
38
|
+
const result = { path };
|
|
39
|
+
try {
|
|
40
|
+
const stat = lstatSync(path);
|
|
41
|
+
result.type = stat.isFile() ? 'file' : stat.isDirectory() ? 'directory' : 'other';
|
|
42
|
+
result.size = stat.size;
|
|
43
|
+
} catch (error) { result.statError = error.code; }
|
|
44
|
+
try { result.realpath = realpathSync(path); } catch (error) { result.realpathError = error.code; }
|
|
45
|
+
try { result.readBytes = readFileSync(path).length; } catch (error) { result.readError = error.code; }
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
function managed(path) {
|
|
49
|
+
try {
|
|
50
|
+
const metadata = JSON.parse(readFileSync(join(path, 'release.json'), 'utf8'));
|
|
51
|
+
return typeof metadata.version === 'string' && /^[\w.+-]+$/.test(metadata.version)
|
|
52
|
+
&& ['linux-x64', 'macos-arm64', 'windows-x64'].includes(metadata.target)
|
|
53
|
+
&& packageNames.includes(JSON.parse(readFileSync(join(path, 'app/package.json'), 'utf8')).name);
|
|
54
|
+
} catch { return false; }
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
const { values, positionals } = parseArgs({ allowPositionals: true, options: {
|
|
59
|
+
'bin-dir': { type: 'string' }, 'release-root': { type: 'string' }, help: { type: 'boolean', short: 'h' },
|
|
60
|
+
} });
|
|
61
|
+
if (values.help) {
|
|
62
|
+
const metadata = join(root, 'release.json');
|
|
63
|
+
const target = inspect(metadata) ? JSON.parse(readFileSync(metadata, 'utf8')).target
|
|
64
|
+
: windows ? 'windows-x64' : process.platform === 'darwin' ? 'macos-arm64' : 'linux-x64';
|
|
65
|
+
const platform = target === 'windows-x64' ? 'Windows x64' : target === 'macos-arm64' ? 'macOS Apple silicon' : 'Linux x64';
|
|
66
|
+
const application = target === 'windows-x64' ? '%LOCALAPPDATA%\\Programs\\Outask'
|
|
67
|
+
: target === 'macos-arm64' ? '~/Library/Application Support/Outask' : '~/.local/share/outask';
|
|
68
|
+
const command = target === 'windows-x64' ? '%LOCALAPPDATA%\\Programs\\Outask\\commands\\outask.cmd' : '~/.local/bin/outask';
|
|
69
|
+
console.log(`Outask installer (${platform})
|
|
70
|
+
Usage: ${target === 'windows-x64' ? './Install.cmd (PowerShell), Install.cmd (cmd.exe)' : `./${publicInstallers[target]}`} [install|update|uninstall] [--bin-dir <directory>] [--release-root <parent-directory>]
|
|
71
|
+
Requires Node.js 22.23.3 or later on PATH. Open a new terminal after installation.
|
|
72
|
+
${target === 'windows-x64' ? 'Before first using this Windows writer generation, finish writes and close all previous CLI/MCP/HTTP sessions. Start new writers afterward; do not mix generations.\n' : ''}Application: ${application}
|
|
73
|
+
Command: ${command}
|
|
74
|
+
Install from the extracted application directory. Update downloads GitHub Latest stable; tar and network access are required.
|
|
75
|
+
Options change the command directory and application parent; reuse them for update/uninstall.
|
|
76
|
+
Uninstall removes the managed command link; application files, projects and configuration remain.`);
|
|
77
|
+
} else {
|
|
78
|
+
if (positionals.length > 1 || !['install', 'update', 'uninstall'].includes(positionals[0] ?? 'install')
|
|
79
|
+
|| values['bin-dir'] === '' || values['release-root'] === '') throw new Error('INVALID_INPUT: invalid action or empty directory');
|
|
80
|
+
const bin = canonical(resolve(values['bin-dir'] ?? defaults.bin));
|
|
81
|
+
const legacyRoot = canonical(join(homedir(), '.local/share/task-tracker/releases'));
|
|
82
|
+
const defaultRoot = defaults.releases;
|
|
83
|
+
const requestedRoot = canonical(resolve(values['release-root'] ?? defaultRoot));
|
|
84
|
+
const oldDefaults = legacyLocations().slice(0, 2).map(canonical);
|
|
85
|
+
// Old packaged updaters explicitly pass their former default directories.
|
|
86
|
+
// Recognise those defaults while preserving genuinely custom locations.
|
|
87
|
+
const releases = oldDefaults.includes(requestedRoot) ? canonical(defaultRoot) : requestedRoot;
|
|
88
|
+
if (!managed(root)) throw new Error('INVALID_RELEASE: invalid release metadata or application');
|
|
89
|
+
const releaseTarget = JSON.parse(readFileSync(join(root, 'release.json'), 'utf8')).target;
|
|
90
|
+
const payload = ['app', 'bin', publicInstallers[releaseTarget], 'release.json', 'README.md'];
|
|
91
|
+
const destination = join(releases, basename(defaults.destination));
|
|
92
|
+
const releaseRoots = [releases, legacyRoot, ...legacyLocations().map(canonical)];
|
|
93
|
+
const migration = positionals[0] === 'uninstall' ? undefined : legacyConfig();
|
|
94
|
+
if (positionals[0] !== 'uninstall' && migration && inspect(migration.target)
|
|
95
|
+
&& !readFileSync(migration.source).equals(readFileSync(migration.target))) {
|
|
96
|
+
throw new Error(`CONFIG_CONFLICT: ${migration.source} and ${migration.target} differ; reconcile the registries before migrating`);
|
|
97
|
+
}
|
|
98
|
+
const targets = commandNames.map((name) => join(bin, windows ? `${name}.cmd` : name));
|
|
99
|
+
const target = targets[0];
|
|
100
|
+
function owned(path) {
|
|
101
|
+
if (windows) {
|
|
102
|
+
if (!inspect(path)?.isFile()) return false;
|
|
103
|
+
const entry = launcherEntry(readFileSync(path, 'utf8'));
|
|
104
|
+
if (!entry) return false;
|
|
105
|
+
const parent = resolve(entry, '../../..');
|
|
106
|
+
if (entry !== join(parent, 'app/bin/tasks')) return false;
|
|
107
|
+
if (managed(parent)) return releaseRoots.includes(dirname(parent));
|
|
108
|
+
if (inspect(join(parent, 'release.json'))) return false;
|
|
109
|
+
try {
|
|
110
|
+
return packageNames.includes(JSON.parse(readFileSync(join(parent, 'app/package.json'), 'utf8')).name)
|
|
111
|
+
&& readFileSync(entry, 'utf8').includes("import('../cli.mjs')");
|
|
112
|
+
} catch { return false; }
|
|
113
|
+
}
|
|
114
|
+
if (!inspect(path)?.isSymbolicLink()) return false;
|
|
115
|
+
const linked = canonical(resolve(dirname(path), readlinkSync(path)));
|
|
116
|
+
const parent = linked.endsWith('/app/bin/tasks') ? resolve(linked, '../../..') : resolve(linked, '../..');
|
|
117
|
+
if (releaseRoots.includes(dirname(parent)) && managed(parent)) {
|
|
118
|
+
const metadata = JSON.parse(readFileSync(join(parent, 'release.json'), 'utf8'));
|
|
119
|
+
return linked === join(parent, 'app/bin/tasks') || linked === join(parent, 'bin/tasks');
|
|
120
|
+
}
|
|
121
|
+
if (linked !== join(parent, 'app/bin/tasks') || inspect(join(parent, 'release.json'))) return false;
|
|
122
|
+
try {
|
|
123
|
+
return packageNames.includes(JSON.parse(readFileSync(join(parent, 'app/package.json'), 'utf8')).name)
|
|
124
|
+
&& readFileSync(linked, 'utf8').includes("import('../cli.mjs')");
|
|
125
|
+
} catch { return false; }
|
|
126
|
+
}
|
|
127
|
+
for (const target of targets) if (inspect(target) && !owned(target)) throw new Error(`COMMAND_EXISTS: ${target} is unrelated; resolve the collision before installing`);
|
|
128
|
+
if (positionals[0] === 'uninstall') {
|
|
129
|
+
for (const target of targets) if (owned(target)) unlinkSync(target);
|
|
130
|
+
console.log(`Removed managed command link at ${target}. Application copies, project data and configuration are preserved.`);
|
|
131
|
+
} else if (positionals[0] === 'update') {
|
|
132
|
+
const installed = [destination, ...targets.filter(owned).map((path) => windows ? resolve(launcherEntry(readFileSync(path, 'utf8')), '../../..') : resolve(realpathSync(path), '../../..'))].find(managed);
|
|
133
|
+
if (!installed) throw new Error('NOT_INSTALLED: install first, or reuse your original --bin-dir and --release-root');
|
|
134
|
+
await updateRelease({ destination: installed, bin, releases });
|
|
135
|
+
} else {
|
|
136
|
+
if (windows) console.log('Windows coordination: before first using this writer generation, finish active writes and close all prior CLI/MCP/HTTP sessions. Start new writers afterward; do not mix generations.');
|
|
137
|
+
const obsolete = obsoleteInstalls(releaseRoots, destination, managed);
|
|
138
|
+
accessSync(join(root, 'app/bin/tasks'), constants.X_OK);
|
|
139
|
+
await import('../cli.mjs');
|
|
140
|
+
for (const part of (process.env.PATH ?? '').split(delimiter)) {
|
|
141
|
+
for (const name of windows ? commandNames.flatMap((name) => ['.cmd', '.exe', '.bat', '.com', '.ps1', ''].map((extension) => name + extension)) : commandNames) {
|
|
142
|
+
const candidate = resolve(part || '.', name);
|
|
143
|
+
if (executable(candidate) && !targets.includes(canonical(candidate)) && !owned(candidate)) throw new Error(`COMMAND_EXISTS: ${candidate} is already on PATH; resolve the collision before installing`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const stateOnly = destination === canonical(defaults.destination) && inspect(destination)?.isDirectory()
|
|
147
|
+
&& readdirSync(destination).every(name => ['config.json', 'cache', 'locks', 'commands'].includes(name));
|
|
148
|
+
if (inspect(destination) && (!inspect(destination).isDirectory() || (!managed(destination) && !stateOnly))) {
|
|
149
|
+
throw new Error(`INSTALL_EXISTS: ${destination} is unrelated; choose another --release-root or resolve the collision`);
|
|
150
|
+
}
|
|
151
|
+
// Stage the new program separately; unrelated files beside it are retained.
|
|
152
|
+
mkdirSync(releases, { recursive: true });
|
|
153
|
+
const work = mkdtempSync(join(releases, '.outask-install-'));
|
|
154
|
+
const staged = join(work, 'new');
|
|
155
|
+
const backup = join(work, 'old');
|
|
156
|
+
let linkWork;
|
|
157
|
+
let committed = false;
|
|
158
|
+
let rollbackFailed = false;
|
|
159
|
+
try {
|
|
160
|
+
mkdirSync(staged);
|
|
161
|
+
for (const name of payload) {
|
|
162
|
+
if (inspect(join(root, name))) cpSync(join(root, name), join(staged, name), copyOptions);
|
|
163
|
+
}
|
|
164
|
+
const check = spawnSync(process.execPath, [join(staged, 'app/bin/tasks'), '--help'], { encoding: 'utf8', timeout: 60000 });
|
|
165
|
+
if (check.error) throw check.error;
|
|
166
|
+
if (check.status !== 0) {
|
|
167
|
+
const entry = join(staged, 'app/bin/tasks');
|
|
168
|
+
const details = { source: startupFile(join(root, 'app/bin/tasks')), staged: startupFile(entry) };
|
|
169
|
+
try {
|
|
170
|
+
const names = readdirSync(dirname(entry));
|
|
171
|
+
details.binNames = names.slice(0, 32);
|
|
172
|
+
details.binNamesTruncated = names.length > 32;
|
|
173
|
+
} catch (error) { details.binError = error.code; }
|
|
174
|
+
// Probe through the child runtime's filesystem API independently of its main-module resolver.
|
|
175
|
+
const probe = spawnSync(process.execPath, ['-e', `const { lstatSync, realpathSync, readFileSync } = require('node:fs'); ${startupFile.toString()}; console.log(JSON.stringify(startupFile(process.argv[1])));`, entry], { encoding: 'utf8', timeout: 10000 });
|
|
176
|
+
details.child = { status: probe.status, error: probe.error?.code };
|
|
177
|
+
try { details.child.file = JSON.parse(probe.stdout); } catch { details.child.stderr = (probe.stderr ?? '').slice(0, 500); }
|
|
178
|
+
throw new Error(`INVALID_RELEASE: staged application failed startup: ${check.stderr || check.stdout}\nStaged startup diagnostics: ${JSON.stringify(details)}`);
|
|
179
|
+
}
|
|
180
|
+
const commandsInside = bin === destination || bin.startsWith(destination + sep);
|
|
181
|
+
if (!commandsInside) mkdirSync(bin, { recursive: true });
|
|
182
|
+
linkWork = mkdtempSync(join(commandsInside ? releases : bin, '.outask-link-'));
|
|
183
|
+
for (const [index, target] of targets.entries()) {
|
|
184
|
+
const link = join(linkWork, `new-${index}`);
|
|
185
|
+
if (windows) writeFileSync(link, windowsLauncher(join(destination, 'app/bin/tasks')));
|
|
186
|
+
else symlinkSync(join(destination, 'app/bin/tasks'), link);
|
|
187
|
+
}
|
|
188
|
+
const swapped = [];
|
|
189
|
+
mkdirSync(destination, { recursive: true });
|
|
190
|
+
mkdirSync(backup);
|
|
191
|
+
try {
|
|
192
|
+
// The root and all persistent state retain their original inodes.
|
|
193
|
+
for (const name of managedPayload) {
|
|
194
|
+
const current = join(destination, name);
|
|
195
|
+
const replacement = join(staged, name);
|
|
196
|
+
if (inspect(current)?.isFile() && inspect(replacement)?.isFile()
|
|
197
|
+
&& readFileSync(current).equals(readFileSync(replacement))) continue;
|
|
198
|
+
const item = { name, previous: false, installed: false };
|
|
199
|
+
swapped.push(item);
|
|
200
|
+
if (inspect(current)) {
|
|
201
|
+
renameSync(current, join(backup, name));
|
|
202
|
+
item.previous = true;
|
|
203
|
+
}
|
|
204
|
+
if (inspect(replacement)) {
|
|
205
|
+
renameSync(replacement, current);
|
|
206
|
+
item.installed = true;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
mkdirSync(bin, { recursive: true });
|
|
210
|
+
for (const [index, target] of targets.entries()) {
|
|
211
|
+
if (inspect(target)) cpSync(target, join(linkWork, `old-${index}`), copyOptions);
|
|
212
|
+
renameSync(join(linkWork, `new-${index}`), target);
|
|
213
|
+
}
|
|
214
|
+
committed = true;
|
|
215
|
+
} catch (error) {
|
|
216
|
+
for (const item of swapped.reverse()) {
|
|
217
|
+
try {
|
|
218
|
+
if (item.installed) renameSync(join(destination, item.name), join(staged, item.name));
|
|
219
|
+
if (item.previous) renameSync(join(backup, item.name), join(destination, item.name));
|
|
220
|
+
} catch (restoreError) {
|
|
221
|
+
rollbackFailed = true;
|
|
222
|
+
console.error(`Application recovery files retained at ${work}: ${restoreError.message}`);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
for (const [index, target] of targets.entries()) {
|
|
226
|
+
if (inspect(join(linkWork, `new-${index}`))) continue;
|
|
227
|
+
try {
|
|
228
|
+
if (inspect(target)) unlinkSync(target);
|
|
229
|
+
if (inspect(join(linkWork, `old-${index}`))) cpSync(join(linkWork, `old-${index}`), target, copyOptions);
|
|
230
|
+
} catch (restoreError) {
|
|
231
|
+
rollbackFailed = true;
|
|
232
|
+
console.error(`Command backup retained at ${linkWork}: ${restoreError.message}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
throw error;
|
|
236
|
+
}
|
|
237
|
+
} finally {
|
|
238
|
+
// Retain a backup if an OS error prevents rollback, rather than deleting it.
|
|
239
|
+
if (committed || !rollbackFailed) rmSync(work, { recursive: true, force: true });
|
|
240
|
+
else console.error(`Recovery files retained at ${work}`);
|
|
241
|
+
if (linkWork && !rollbackFailed) rmSync(linkWork, { recursive: true, force: true });
|
|
242
|
+
}
|
|
243
|
+
retireConfig(migration);
|
|
244
|
+
for (const previous of obsolete) retirePayload(previous, managedPayload);
|
|
245
|
+
console.log(`Installed Outask at ${destination}. Commands: ${targets.join(', ')}`);
|
|
246
|
+
for (const message of configurePath(bin)) console.log(message);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
} catch (error) {
|
|
250
|
+
console.error(error.message);
|
|
251
|
+
process.exitCode = 1;
|
|
252
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { parseArgs } from 'node:util';
|
|
2
|
+
import { deleteTask, transitionTask } from '../src/transition.mjs';
|
|
3
|
+
import { fail } from '../src/errors.mjs';
|
|
4
|
+
import { parseInteger, parseProject, parseSchema, projectHelp } from './arguments.mjs';
|
|
5
|
+
import { checkOptions } from './task-write-input.mjs';
|
|
6
|
+
import { reportError } from './output.mjs';
|
|
7
|
+
|
|
8
|
+
export function lifecycleCommand(deleting) {
|
|
9
|
+
const command = deleting ? 'delete-task' : 'transition-task';
|
|
10
|
+
const statusUsage = deleting ? '[--status <Archive-status>] ' : '--status <status> ';
|
|
11
|
+
const usage = `Usage: node app/scripts/${command}.mjs [project-path] <id> ${statusUsage}[--store <name>] [--if-updated-at <timestamp>] [--format json]`;
|
|
12
|
+
const options = {
|
|
13
|
+
'if-updated-at': { type: 'string' }, store: { type: 'string' },
|
|
14
|
+
status: { type: 'string' },
|
|
15
|
+
'schema-path': { type: 'string' },
|
|
16
|
+
format: { type: 'string', default: 'json' }, help: { type: 'boolean', short: 'h' },
|
|
17
|
+
};
|
|
18
|
+
const help = `${usage}\n${projectHelp}Move one retained task and return the complete task as JSON. --if-updated-at optionally checks the exact current timestamp under the write lock.\n${deleting ? 'Delete retains the task in Archive; choose --status when several Archive statuses exist.' : 'Any configured status is allowed; use an Active status to restore retained history.'}\nActual changes advance updated_at; no-ops preserve it. --if-updated-at expects a canonical UTC millisecond value, e.g. 2026-09-19T12:00:00.000Z.\nUnknown --status values report configured status choices. Status names are case-sensitive.\nConfigured destination files must exist. Use --store for ambiguous destinations. --schema-path selects a project-relative schema file. Run validation to recover interrupted moves.\n`;
|
|
19
|
+
function main(args) {
|
|
20
|
+
const { values, positionals, tokens } = parseArgs({ args, allowPositionals: true, tokens: true, options });
|
|
21
|
+
if (values.help) { process.stdout.write(help); return; }
|
|
22
|
+
checkOptions(tokens);
|
|
23
|
+
const { project, id } = parseProject(positionals, usage, true);
|
|
24
|
+
if (values.format !== 'json') fail('INVALID_INPUT', 'format must be json');
|
|
25
|
+
const settings = { ifUpdatedAt: values['if-updated-at'], store: values.store, schemaPath: parseSchema(values, tokens) };
|
|
26
|
+
const result = deleting ? deleteTask(project, parseInteger(id, 'id', 1), { ...settings, status: values.status })
|
|
27
|
+
: transitionTask(project, parseInteger(id, 'id', 1), values.status, settings);
|
|
28
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
29
|
+
}
|
|
30
|
+
return { usage, options, help, main };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function runLifecycle(deleting) {
|
|
34
|
+
try { lifecycleCommand(deleting).main(process.argv.slice(2)); } catch (error) { reportError(error); }
|
|
35
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import { fail } from '../src/errors.mjs';
|
|
4
|
+
import { defaultLimit, maxLimit, responseBytes } from '../src/limits.mjs';
|
|
5
|
+
import { updatePage } from '../src/pagination.mjs';
|
|
6
|
+
import { textBuffer } from '../src/response.mjs';
|
|
7
|
+
import { countTasks, listTasks } from '../src/tasks.mjs';
|
|
8
|
+
import { cacheOptions, commonHelp, commonOptions, parseInteger, parseOutput, parseProject, parseSchema, parseSelection, projectHelp } from './arguments.mjs';
|
|
9
|
+
import { isMain } from './entry.mjs';
|
|
10
|
+
import { nextCommand } from './continuation.mjs';
|
|
11
|
+
import { formatOutput, printOutput, reportError } from './output.mjs';
|
|
12
|
+
|
|
13
|
+
export const options = {
|
|
14
|
+
...commonOptions,
|
|
15
|
+
format: { type: 'string' }, full: { type: 'boolean' },
|
|
16
|
+
where: { type: 'string', multiple: true }, status: { type: 'string' },
|
|
17
|
+
id: { type: 'string', multiple: true }, sort: { type: 'string', default: 'id' },
|
|
18
|
+
desc: { type: 'boolean', default: false }, limit: { type: 'string', default: String(defaultLimit) },
|
|
19
|
+
offset: { type: 'string', default: '0' }, count: { type: 'boolean', default: false },
|
|
20
|
+
};
|
|
21
|
+
export const usage = 'Usage: node app/scripts/list-tasks.mjs [project-path] [options]';
|
|
22
|
+
export const help = `${usage}
|
|
23
|
+
|
|
24
|
+
${projectHelp}Reads never change task files.
|
|
25
|
+
--fields <names> Comma-separated fields; id,title,status (default), or all
|
|
26
|
+
--full All fields; text unless --format is supplied; excludes --fields/ids
|
|
27
|
+
${commonHelp.replace('text (default), table, json or ids', 'table (default), text, json or ids')} --status <status> Exact, case-sensitive status filter
|
|
28
|
+
--where <field>=<value> Repeatable AND filters; status is exact
|
|
29
|
+
--id <id> Repeatable ID filter (OR within IDs)
|
|
30
|
+
--sort <field> id (default); priority orders high, medium, low
|
|
31
|
+
--desc Reverse primary sort; ties always use ascending ID
|
|
32
|
+
--limit <n> Page size from 1 to 50 (default: 10); responses up to 32 KiB
|
|
33
|
+
--offset <n> Skip matching records (default: 0)
|
|
34
|
+
--count Print match count, ignoring pagination
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
function parseFilters(values) {
|
|
38
|
+
const filters = (values.where ?? []).map((expression) => {
|
|
39
|
+
const separator = expression.indexOf('=');
|
|
40
|
+
if (separator < 1) fail('INVALID_INPUT', '--where expects <field>=<value>');
|
|
41
|
+
return { field: expression.slice(0, separator), value: expression.slice(separator + 1) };
|
|
42
|
+
});
|
|
43
|
+
if (values.status !== undefined) filters.push({ field: 'status', value: values.status });
|
|
44
|
+
return filters;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function parseQuery(values) {
|
|
48
|
+
return {
|
|
49
|
+
...parseSelection(values), filters: parseFilters(values),
|
|
50
|
+
ids: (values.id ?? []).map((id) => parseInteger(id, '--id', 1)),
|
|
51
|
+
sort: values.sort, descending: values.desc,
|
|
52
|
+
limit: parseInteger(values.limit, '--limit', 1, maxLimit), offset: parseInteger(values.offset, '--offset'),
|
|
53
|
+
refreshMode: 'detached',
|
|
54
|
+
...cacheOptions(values),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function pageInfo(page, args, tokens, invocation) {
|
|
59
|
+
const range = page.tasks.length ? `records ${page.offset + 1}-${page.offset + page.tasks.length}` : 'no records';
|
|
60
|
+
const buffer = textBuffer();
|
|
61
|
+
buffer.add(`Showing ${range} of ${page.total} matches.\n`);
|
|
62
|
+
if (page.hasMore) {
|
|
63
|
+
const command = nextCommand(args, tokens, 'offset', page.nextOffset, invocation);
|
|
64
|
+
if (command === undefined) return undefined;
|
|
65
|
+
buffer.add(`Next page: ${command}\n`);
|
|
66
|
+
}
|
|
67
|
+
return buffer.finish();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function showPage(page, output, args, tokens, invocation) {
|
|
71
|
+
if (output.format === 'json') {
|
|
72
|
+
printOutput(page, page.fields, output);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
while (true) {
|
|
76
|
+
const info = pageInfo(page, args, tokens, invocation);
|
|
77
|
+
if (info === undefined) fail('OUTPUT_TOO_LARGE', 'page guidance exceeds 32 KiB; shorten field selections or filters');
|
|
78
|
+
const text = formatOutput(page.tasks, page.fields, output, responseBytes - Buffer.byteLength(info, 'utf8'));
|
|
79
|
+
if (text !== undefined) {
|
|
80
|
+
process.stdout.write(text);
|
|
81
|
+
process.stderr.write(info);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (page.tasks.length <= 1) {
|
|
85
|
+
fail('OUTPUT_TOO_LARGE', 'first task cannot fit in a rendered 32 KiB page; select fewer --fields, a smaller --max-width or shorter filters');
|
|
86
|
+
}
|
|
87
|
+
page.tasks.pop();
|
|
88
|
+
updatePage(page);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function main(args, guidance) {
|
|
93
|
+
const { values, positionals, tokens } = parseArgs({ args, options, allowPositionals: true, tokens: true });
|
|
94
|
+
if (values.help) {
|
|
95
|
+
process.stdout.write(help);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const { project } = parseProject(positionals, usage);
|
|
99
|
+
if (values.full && (values.fields !== undefined || values.format === 'ids')) {
|
|
100
|
+
fail('INVALID_INPUT', '--full cannot be combined with --fields or --format ids');
|
|
101
|
+
}
|
|
102
|
+
values.format ??= values.full ? 'text' : 'table';
|
|
103
|
+
if (values.full) values.fields = 'all';
|
|
104
|
+
const output = parseOutput(values);
|
|
105
|
+
const query = parseQuery(values);
|
|
106
|
+
query.schemaPath = parseSchema(values, tokens);
|
|
107
|
+
if (values.count) process.stdout.write(`${countTasks(project, query)}\n`);
|
|
108
|
+
else showPage(listTasks(project, query), output, guidance?.args ?? args, guidance?.tokens ?? tokens, guidance?.invocation);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (isMain(import.meta.url)) {
|
|
112
|
+
try {
|
|
113
|
+
main(process.argv.slice(2));
|
|
114
|
+
} catch (error) {
|
|
115
|
+
reportError(error);
|
|
116
|
+
}
|
|
117
|
+
}
|