@swarmdo/cli 1.13.0 → 1.15.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.
Files changed (48) hide show
  1. package/README.md +3 -1
  2. package/dist/src/apply/apply.d.ts +50 -0
  3. package/dist/src/apply/apply.d.ts.map +1 -0
  4. package/dist/src/apply/apply.js +186 -0
  5. package/dist/src/apply/apply.js.map +1 -0
  6. package/dist/src/commands/apply.d.ts +18 -0
  7. package/dist/src/commands/apply.d.ts.map +1 -0
  8. package/dist/src/commands/apply.js +118 -0
  9. package/dist/src/commands/apply.js.map +1 -0
  10. package/dist/src/commands/compact.d.ts.map +1 -1
  11. package/dist/src/commands/compact.js +3 -2
  12. package/dist/src/commands/compact.js.map +1 -1
  13. package/dist/src/commands/index.d.ts.map +1 -1
  14. package/dist/src/commands/index.js +9 -3
  15. package/dist/src/commands/index.js.map +1 -1
  16. package/dist/src/commands/pack.js +2 -2
  17. package/dist/src/commands/pack.js.map +1 -1
  18. package/dist/src/commands/redact.d.ts.map +1 -1
  19. package/dist/src/commands/redact.js +2 -1
  20. package/dist/src/commands/redact.js.map +1 -1
  21. package/dist/src/commands/sbom.d.ts +14 -0
  22. package/dist/src/commands/sbom.d.ts.map +1 -0
  23. package/dist/src/commands/sbom.js +73 -0
  24. package/dist/src/commands/sbom.js.map +1 -0
  25. package/dist/src/mcp-client.d.ts.map +1 -1
  26. package/dist/src/mcp-client.js +2 -0
  27. package/dist/src/mcp-client.js.map +1 -1
  28. package/dist/src/mcp-tools/apply-tools.d.ts +11 -0
  29. package/dist/src/mcp-tools/apply-tools.d.ts.map +1 -0
  30. package/dist/src/mcp-tools/apply-tools.js +44 -0
  31. package/dist/src/mcp-tools/apply-tools.js.map +1 -0
  32. package/dist/src/mcp-tools/index.d.ts +1 -0
  33. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  34. package/dist/src/mcp-tools/index.js +1 -0
  35. package/dist/src/mcp-tools/index.js.map +1 -1
  36. package/dist/src/mcp-tools/profiles.d.ts.map +1 -1
  37. package/dist/src/mcp-tools/profiles.js +1 -0
  38. package/dist/src/mcp-tools/profiles.js.map +1 -1
  39. package/dist/src/sbom/sbom.d.ts +64 -0
  40. package/dist/src/sbom/sbom.d.ts.map +1 -0
  41. package/dist/src/sbom/sbom.js +130 -0
  42. package/dist/src/sbom/sbom.js.map +1 -0
  43. package/dist/src/util/stdout.d.ts +12 -0
  44. package/dist/src/util/stdout.d.ts.map +1 -0
  45. package/dist/src/util/stdout.js +16 -0
  46. package/dist/src/util/stdout.js.map +1 -0
  47. package/dist/tsconfig.tsbuildinfo +1 -1
  48. package/package.json +1 -1
@@ -0,0 +1,12 @@
1
+ /**
2
+ * writeStdout — write to stdout and RESOLVE ONLY WHEN THE CHUNK IS FLUSHED.
3
+ *
4
+ * process.stdout on a pipe is asynchronous: write() buffers in JS and returns
5
+ * immediately. If the command then returns and the CLI harness calls
6
+ * process.exit(), any unflushed bytes are discarded — large piped output
7
+ * (`swarmdo sbom | …`, `pack`, `compact`, `redact`) truncates at the ~64 KiB
8
+ * pipe buffer. Awaiting the write callback guarantees the data reached the OS
9
+ * before we hand control back. For a TTY (synchronous) this is a no-op await.
10
+ */
11
+ export declare function writeStdout(data: string): Promise<void>;
12
+ //# sourceMappingURL=stdout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stdout.d.ts","sourceRoot":"","sources":["../../../src/util/stdout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvD"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * writeStdout — write to stdout and RESOLVE ONLY WHEN THE CHUNK IS FLUSHED.
3
+ *
4
+ * process.stdout on a pipe is asynchronous: write() buffers in JS and returns
5
+ * immediately. If the command then returns and the CLI harness calls
6
+ * process.exit(), any unflushed bytes are discarded — large piped output
7
+ * (`swarmdo sbom | …`, `pack`, `compact`, `redact`) truncates at the ~64 KiB
8
+ * pipe buffer. Awaiting the write callback guarantees the data reached the OS
9
+ * before we hand control back. For a TTY (synchronous) this is a no-op await.
10
+ */
11
+ export function writeStdout(data) {
12
+ return new Promise((resolve, reject) => {
13
+ process.stdout.write(data, (err) => (err ? reject(err) : resolve()));
14
+ });
15
+ }
16
+ //# sourceMappingURL=stdout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stdout.js","sourceRoot":"","sources":["../../../src/util/stdout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACL,CAAC"}