@schoolai/shipyard 1.0.0 → 1.1.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.
@@ -40,4 +40,4 @@ export {
40
40
  logger,
41
41
  createChildLogger
42
42
  };
43
- //# sourceMappingURL=chunk-ERDY7OVK.js.map
43
+ //# sourceMappingURL=chunk-FY3DRRGT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/logger.ts"],"sourcesContent":["import { mkdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport pino from 'pino';\nimport { getShipyardHome } from './env.js';\n\nconst logDir = join(getShipyardHome(), 'logs');\nmkdirSync(logDir, { recursive: true, mode: 0o700 });\n\nconst logFilePath = join(logDir, 'daemon.log');\n\n/** Exposed for output.ts to append CLI output to the same log file. */\nexport function getLogFilePath(): string {\n return logFilePath;\n}\n\nconst isDev = process.env.NODE_ENV !== 'production';\nconst level = process.env.LOG_LEVEL ?? 'info';\n\nconst transport = pino.transport({\n targets: [\n ...(isDev\n ? [{ target: 'pino-pretty', options: { colorize: true }, level }]\n : [{ target: 'pino/file', options: { destination: 1 }, level }]),\n {\n target: 'pino-roll',\n options: {\n file: logFilePath,\n frequency: 'daily',\n limit: { count: 7 },\n mkdir: true,\n },\n level,\n },\n ],\n});\n\n/**\n * Pino's error serializer only triggers on the `err` key (not `error`).\n * Always use `{ err: myError }` when logging Error objects.\n * See: https://github.com/pinojs/pino/issues/895\n */\nexport const logger = pino({ level }, transport);\n\nexport function createChildLogger(context: { taskId?: string; sessionId?: string; mode?: string }) {\n return logger.child(context);\n}\n"],"mappings":";;;;;;AAAA,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,OAAO,UAAU;AAGjB,IAAM,SAAS,KAAK,gBAAgB,GAAG,MAAM;AAC7C,UAAU,QAAQ,EAAE,WAAW,MAAM,MAAM,IAAM,CAAC;AAElD,IAAM,cAAc,KAAK,QAAQ,YAAY;AAGtC,SAAS,iBAAyB;AACvC,SAAO;AACT;AAEA,IAAM,QAAQ,QAAQ,IAAI,aAAa;AACvC,IAAM,QAAQ,QAAQ,IAAI,aAAa;AAEvC,IAAM,YAAY,KAAK,UAAU;AAAA,EAC/B,SAAS;AAAA,IACP,GAAI,QACA,CAAC,EAAE,QAAQ,eAAe,SAAS,EAAE,UAAU,KAAK,GAAG,MAAM,CAAC,IAC9D,CAAC,EAAE,QAAQ,aAAa,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;AAAA,IAChE;AAAA,MACE,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,MAAM;AAAA,QACN,WAAW;AAAA,QACX,OAAO,EAAE,OAAO,EAAE;AAAA,QAClB,OAAO;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAOM,IAAM,SAAS,KAAK,EAAE,MAAM,GAAG,SAAS;AAExC,SAAS,kBAAkB,SAAiE;AACjG,SAAO,OAAO,MAAM,OAAO;AAC7B;","names":[]}
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getLogFilePath
4
- } from "./chunk-ERDY7OVK.js";
4
+ } from "./chunk-FY3DRRGT.js";
5
5
 
6
6
  // src/commands/output.ts
7
7
  import { appendFileSync } from "fs";
@@ -33,4 +33,4 @@ export {
33
33
  print,
34
34
  printError
35
35
  };
36
- //# sourceMappingURL=chunk-EB3RPXYR.js.map
36
+ //# sourceMappingURL=chunk-K3GFMEBF.js.map