@intentius/chant-lexicon-docker 0.124.46 → 0.124.48

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 (39) hide show
  1. package/dist/export-resources.d.ts +21 -0
  2. package/dist/export-resources.d.ts.map +1 -0
  3. package/dist/export-resources.js +63 -0
  4. package/dist/import/adapter.d.ts +6 -2
  5. package/dist/import/adapter.d.ts.map +1 -1
  6. package/dist/import/adapter.js +11 -7
  7. package/dist/import/embedded.d.ts +27 -0
  8. package/dist/import/embedded.d.ts.map +1 -0
  9. package/dist/import/embedded.js +79 -0
  10. package/dist/import/engine.d.ts +39 -0
  11. package/dist/import/engine.d.ts.map +1 -0
  12. package/dist/import/engine.js +94 -0
  13. package/dist/import/generator.d.ts.map +1 -1
  14. package/dist/import/generator.js +41 -10
  15. package/dist/import/live-export.d.ts +142 -0
  16. package/dist/import/live-export.d.ts.map +1 -0
  17. package/dist/import/live-export.js +297 -0
  18. package/dist/import/parser.d.ts +9 -1
  19. package/dist/import/parser.d.ts.map +1 -1
  20. package/dist/import/parser.js +19 -2
  21. package/dist/import/testdata/tar.d.ts +3 -0
  22. package/dist/import/testdata/tar.d.ts.map +1 -0
  23. package/dist/import/testdata/tar.js +25 -0
  24. package/dist/integrity.json +2 -2
  25. package/dist/manifest.json +1 -1
  26. package/dist/plugin.d.ts.map +1 -1
  27. package/dist/plugin.js +5 -0
  28. package/package.json +3 -3
  29. package/src/export-resources.ts +90 -0
  30. package/src/import/adapter.ts +14 -9
  31. package/src/import/embedded-live.test.ts +248 -0
  32. package/src/import/embedded.ts +83 -0
  33. package/src/import/engine.ts +107 -0
  34. package/src/import/generator.ts +42 -10
  35. package/src/import/live-export.test.ts +271 -0
  36. package/src/import/live-export.ts +359 -0
  37. package/src/import/parser.ts +19 -2
  38. package/src/import/testdata/tar.ts +24 -0
  39. package/src/plugin.ts +6 -0
@@ -0,0 +1,24 @@
1
+ /** A ustar archive of regular files and directories, as `GET /containers/{id}/archive` returns one (test fixture). */
2
+ export function tarOf(...entries: Array<[name: string, content: string | null]>): Buffer {
3
+ const blocks: Buffer[] = [];
4
+ for (const [name, content] of entries) {
5
+ const data = content === null ? Buffer.alloc(0) : Buffer.from(content, "utf8");
6
+ const header = Buffer.alloc(512);
7
+ header.write(name, 0, 100, "utf8");
8
+ header.write("0000644\0", 100, 8, "ascii");
9
+ header.write("0000000\0", 108, 8, "ascii");
10
+ header.write("0000000\0", 116, 8, "ascii");
11
+ header.write(`${data.length.toString(8).padStart(11, "0")}\0`, 124, 12, "ascii");
12
+ header.write("00000000000\0", 136, 12, "ascii");
13
+ header.write(content === null ? "5" : "0", 156, 1, "ascii");
14
+ header.write("ustar\0", 257, 6, "ascii");
15
+ header.write("00", 263, 2, "ascii");
16
+ header.fill(" ", 148, 156);
17
+ let sum = 0;
18
+ for (const b of header) sum += b;
19
+ header.write(`${sum.toString(8).padStart(6, "0")}\0 `, 148, 8, "ascii");
20
+ blocks.push(header, data, Buffer.alloc((512 - (data.length % 512)) % 512));
21
+ }
22
+ blocks.push(Buffer.alloc(1024));
23
+ return Buffer.concat(blocks);
24
+ }
package/src/plugin.ts CHANGED
@@ -255,6 +255,12 @@ export const api = new Service({
255
255
  },
256
256
  ]),
257
257
 
258
+ // Live export (#4388): a compose project's services, read from the Engine API.
259
+ async exportResources(options) {
260
+ const { exportResources } = await import("./export-resources");
261
+ return exportResources(options);
262
+ },
263
+
258
264
  async listArtifacts(options) {
259
265
  const { listArtifacts } = await import("./list-artifacts");
260
266
  return listArtifacts(options);