@elaraai/east-node-io 0.0.1-beta.1 → 0.0.1-beta.2

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 (114) hide show
  1. package/dist/compression/gzip.d.ts +108 -0
  2. package/dist/compression/gzip.d.ts.map +1 -0
  3. package/dist/compression/gzip.js +153 -0
  4. package/dist/compression/gzip.js.map +1 -0
  5. package/dist/compression/index.d.ts +308 -0
  6. package/dist/compression/index.d.ts.map +1 -0
  7. package/dist/compression/index.js +289 -0
  8. package/dist/compression/index.js.map +1 -0
  9. package/dist/compression/tar.d.ts +115 -0
  10. package/dist/compression/tar.d.ts.map +1 -0
  11. package/dist/compression/tar.js +254 -0
  12. package/dist/compression/tar.js.map +1 -0
  13. package/dist/compression/types.d.ts +124 -0
  14. package/dist/compression/types.d.ts.map +1 -0
  15. package/dist/compression/types.js +106 -0
  16. package/dist/compression/types.js.map +1 -0
  17. package/dist/compression/zip.d.ts +121 -0
  18. package/dist/compression/zip.d.ts.map +1 -0
  19. package/dist/compression/zip.js +200 -0
  20. package/dist/compression/zip.js.map +1 -0
  21. package/dist/connection/index.d.ts +78 -0
  22. package/dist/connection/index.d.ts.map +1 -0
  23. package/dist/connection/index.js +134 -0
  24. package/dist/connection/index.js.map +1 -0
  25. package/dist/format/csv.d.ts +210 -0
  26. package/dist/format/csv.d.ts.map +1 -0
  27. package/dist/format/csv.js +729 -0
  28. package/dist/format/csv.js.map +1 -0
  29. package/dist/format/index.d.ts +641 -0
  30. package/dist/format/index.d.ts.map +1 -0
  31. package/dist/format/index.js +463 -0
  32. package/dist/format/index.js.map +1 -0
  33. package/dist/format/types.d.ts +176 -0
  34. package/dist/format/types.d.ts.map +1 -0
  35. package/dist/format/types.js +122 -0
  36. package/dist/format/types.js.map +1 -0
  37. package/dist/format/xlsx.d.ts +178 -0
  38. package/dist/format/xlsx.d.ts.map +1 -0
  39. package/dist/format/xlsx.js +313 -0
  40. package/dist/format/xlsx.js.map +1 -0
  41. package/dist/format/xml.d.ts +302 -0
  42. package/dist/format/xml.d.ts.map +1 -0
  43. package/dist/format/xml.js +602 -0
  44. package/dist/format/xml.js.map +1 -0
  45. package/dist/index.d.ts +25 -0
  46. package/dist/index.d.ts.map +1 -0
  47. package/dist/index.js +32 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/nosql/index.d.ts +503 -0
  50. package/dist/nosql/index.d.ts.map +1 -0
  51. package/dist/nosql/index.js +483 -0
  52. package/dist/nosql/index.js.map +1 -0
  53. package/dist/nosql/mongodb.d.ts +306 -0
  54. package/dist/nosql/mongodb.d.ts.map +1 -0
  55. package/dist/nosql/mongodb.js +552 -0
  56. package/dist/nosql/mongodb.js.map +1 -0
  57. package/dist/nosql/redis.d.ts +268 -0
  58. package/dist/nosql/redis.d.ts.map +1 -0
  59. package/dist/nosql/redis.js +371 -0
  60. package/dist/nosql/redis.js.map +1 -0
  61. package/dist/nosql/types.d.ts +70 -0
  62. package/dist/nosql/types.d.ts.map +1 -0
  63. package/dist/nosql/types.js +79 -0
  64. package/dist/nosql/types.js.map +1 -0
  65. package/dist/sql/index.d.ts +777 -0
  66. package/dist/sql/index.d.ts.map +1 -0
  67. package/dist/sql/index.js +515 -0
  68. package/dist/sql/index.js.map +1 -0
  69. package/dist/sql/mysql.d.ts +238 -0
  70. package/dist/sql/mysql.d.ts.map +1 -0
  71. package/dist/sql/mysql.js +396 -0
  72. package/dist/sql/mysql.js.map +1 -0
  73. package/dist/sql/postgres.d.ts +237 -0
  74. package/dist/sql/postgres.d.ts.map +1 -0
  75. package/dist/sql/postgres.js +381 -0
  76. package/dist/sql/postgres.js.map +1 -0
  77. package/dist/sql/sqlite.d.ts +217 -0
  78. package/dist/sql/sqlite.d.ts.map +1 -0
  79. package/dist/sql/sqlite.js +366 -0
  80. package/dist/sql/sqlite.js.map +1 -0
  81. package/dist/sql/types.d.ts +205 -0
  82. package/dist/sql/types.d.ts.map +1 -0
  83. package/dist/sql/types.js +175 -0
  84. package/dist/sql/types.js.map +1 -0
  85. package/dist/storage/index.d.ts +304 -0
  86. package/dist/storage/index.d.ts.map +1 -0
  87. package/dist/storage/index.js +234 -0
  88. package/dist/storage/index.js.map +1 -0
  89. package/dist/storage/s3.d.ts +373 -0
  90. package/dist/storage/s3.d.ts.map +1 -0
  91. package/dist/storage/s3.js +502 -0
  92. package/dist/storage/s3.js.map +1 -0
  93. package/dist/storage/types.d.ts +117 -0
  94. package/dist/storage/types.d.ts.map +1 -0
  95. package/dist/storage/types.js +94 -0
  96. package/dist/storage/types.js.map +1 -0
  97. package/dist/transfer/ftp.d.ts +333 -0
  98. package/dist/transfer/ftp.d.ts.map +1 -0
  99. package/dist/transfer/ftp.js +437 -0
  100. package/dist/transfer/ftp.js.map +1 -0
  101. package/dist/transfer/index.d.ts +456 -0
  102. package/dist/transfer/index.d.ts.map +1 -0
  103. package/dist/transfer/index.js +414 -0
  104. package/dist/transfer/index.js.map +1 -0
  105. package/dist/transfer/sftp.d.ts +333 -0
  106. package/dist/transfer/sftp.d.ts.map +1 -0
  107. package/dist/transfer/sftp.js +436 -0
  108. package/dist/transfer/sftp.js.map +1 -0
  109. package/dist/transfer/types.d.ts +108 -0
  110. package/dist/transfer/types.d.ts.map +1 -0
  111. package/dist/transfer/types.js +110 -0
  112. package/dist/transfer/types.js.map +1 -0
  113. package/dist/tsconfig.tsbuildinfo +1 -0
  114. package/package.json +6 -6
@@ -0,0 +1,289 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * Compression platform functions for East Node IO.
7
+ *
8
+ * Provides functions for compressing and decompressing data using various
9
+ * formats like gzip, zip, and tar.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * import { East, BlobType, StringType } from "@elaraai/east";
14
+ * import { Compression } from "@elaraai/east-node-io";
15
+ *
16
+ * const compressText = East.function([StringType], BlobType, ($, text) => {
17
+ * const data = $.let(text.encodeUtf8());
18
+ * const options = $.let({
19
+ * level: { tag: "some", value: 9n },
20
+ * });
21
+ * const compressed = $.let(Compression.Gzip.compress(data, options));
22
+ * return $.return(compressed);
23
+ * });
24
+ *
25
+ * const compiled = East.compileAsync(compressText.toIR(), Compression.Gzip.Implementation);
26
+ * await compiled("Hello, World!"); // Compressed gzip blob
27
+ * ```
28
+ *
29
+ * @packageDocumentation
30
+ */
31
+ // Export types
32
+ export * from "./types.js";
33
+ // Export platform functions and implementation
34
+ export { gzip_compress, gzip_decompress, GzipImpl } from "./gzip.js";
35
+ export { zip_compress, zip_decompress, ZipImpl } from "./zip.js";
36
+ export { tar_create, tar_extract, TarImpl } from "./tar.js";
37
+ // Import for grouped exports
38
+ import { gzip_compress, gzip_decompress, GzipImpl } from "./gzip.js";
39
+ import { zip_compress, zip_decompress, ZipImpl } from "./zip.js";
40
+ import { tar_create, tar_extract, TarImpl } from "./tar.js";
41
+ import { GzipLevelType, GzipOptionsType, ZipLevelType, ZipOptionsType, ZipEntryType, ZipEntriesType, ZipExtractedType, TarEntryType, TarEntriesType, TarExtractedType, } from "./types.js";
42
+ /**
43
+ * Compression platform functions grouped by compression type.
44
+ *
45
+ * Provides organized access to compression-specific operations for compressing
46
+ * and decompressing data in East programs.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * import { East, BlobType, StringType } from "@elaraai/east";
51
+ * import { Compression } from "@elaraai/east-node-io";
52
+ *
53
+ * const compressAndDecompress = East.function([StringType], StringType, ($, text) => {
54
+ * const data = $.let(text.encodeUtf8());
55
+ * const options = $.let({
56
+ * level: { tag: "some", value: 9n },
57
+ * });
58
+ *
59
+ * const compressed = $.let(Compression.Gzip.compress(data, options));
60
+ * const decompressed = $.let(Compression.Gzip.decompress(compressed));
61
+ * const result = $.let(decompressed.decodeUtf8());
62
+ * return $.return(result);
63
+ * });
64
+ *
65
+ * const compiled = East.compileAsync(compressAndDecompress.toIR(), Compression.Gzip.Implementation);
66
+ * await compiled("Hello, World!"); // "Hello, World!"
67
+ * ```
68
+ */
69
+ export const Compression = {
70
+ /**
71
+ * Gzip compression operations.
72
+ *
73
+ * Provides functions for compressing and decompressing data using gzip (RFC 1952).
74
+ */
75
+ Gzip: {
76
+ /**
77
+ * Compresses data using gzip compression.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * import { East, BlobType, StringType } from "@elaraai/east";
82
+ * import { Compression } from "@elaraai/east-node-io";
83
+ *
84
+ * const compressText = East.function([StringType], BlobType, ($, text) => {
85
+ * const data = $.let(text.encodeUtf8());
86
+ * const options = $.let({
87
+ * level: { tag: "some", value: 9n },
88
+ * });
89
+ * const compressed = $.let(Compression.Gzip.compress(data, options));
90
+ * return $.return(compressed);
91
+ * });
92
+ *
93
+ * const compiled = East.compileAsync(compressText.toIR(), Compression.Gzip.Implementation);
94
+ * await compiled("Hello, World!");
95
+ * ```
96
+ */
97
+ compress: gzip_compress,
98
+ /**
99
+ * Decompresses gzip-compressed data.
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * import { East, BlobType, StringType } from "@elaraai/east";
104
+ * import { Compression } from "@elaraai/east-node-io";
105
+ *
106
+ * const decompressText = East.function([BlobType], StringType, ($, compressed) => {
107
+ * const decompressed = $.let(Compression.Gzip.decompress(compressed));
108
+ * const text = $.let(decompressed.decodeUtf8());
109
+ * return $.return(text);
110
+ * });
111
+ *
112
+ * const compiled = East.compileAsync(decompressText.toIR(), Compression.Gzip.Implementation);
113
+ * await compiled(compressedBlob);
114
+ * ```
115
+ */
116
+ decompress: gzip_decompress,
117
+ /**
118
+ * Node.js implementation of Gzip platform functions.
119
+ *
120
+ * Pass this to {@link East.compileAsync} to enable gzip operations.
121
+ */
122
+ Implementation: GzipImpl,
123
+ /**
124
+ * Type definitions for Gzip operations.
125
+ */
126
+ Types: {
127
+ /**
128
+ * Compression level (0-9).
129
+ */
130
+ Level: GzipLevelType,
131
+ /**
132
+ * Gzip compression options.
133
+ */
134
+ Options: GzipOptionsType,
135
+ },
136
+ },
137
+ /**
138
+ * ZIP archive operations.
139
+ *
140
+ * Provides functions for creating and extracting ZIP archives with multiple files.
141
+ */
142
+ Zip: {
143
+ /**
144
+ * Creates a ZIP archive from a list of files.
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * import { East, BlobType, StringType } from "@elaraai/east";
149
+ * import { Compression } from "@elaraai/east-node-io";
150
+ *
151
+ * const createZip = East.function([StringType, StringType], BlobType, ($, file1, file2) => {
152
+ * const entries = $.let([
153
+ * { name: "file1.txt", data: file1.encodeUtf8() },
154
+ * { name: "file2.txt", data: file2.encodeUtf8() },
155
+ * ]);
156
+ * const options = $.let({
157
+ * level: { tag: "some", value: 9n },
158
+ * });
159
+ * const zipBlob = $.let(Compression.Zip.compress(entries, options));
160
+ * return $.return(zipBlob);
161
+ * });
162
+ *
163
+ * const compiled = East.compileAsync(createZip.toIR(), Compression.Zip.Implementation);
164
+ * await compiled("Hello", "World");
165
+ * ```
166
+ */
167
+ compress: zip_compress,
168
+ /**
169
+ * Extracts files from a ZIP archive.
170
+ *
171
+ * @example
172
+ * ```ts
173
+ * import { East, BlobType, DictType, StringType } from "@elaraai/east";
174
+ * import { Compression } from "@elaraai/east-node-io";
175
+ *
176
+ * const extractZip = East.function([BlobType], DictType(StringType, BlobType), ($, zipBlob) => {
177
+ * const files = $.let(Compression.Zip.decompress(zipBlob));
178
+ * return $.return(files);
179
+ * });
180
+ *
181
+ * const compiled = East.compileAsync(extractZip.toIR(), Compression.Zip.Implementation);
182
+ * await compiled(zipBlob);
183
+ * ```
184
+ */
185
+ decompress: zip_decompress,
186
+ /**
187
+ * Node.js implementation of ZIP platform functions.
188
+ *
189
+ * Pass this to {@link East.compileAsync} to enable ZIP operations.
190
+ */
191
+ Implementation: ZipImpl,
192
+ /**
193
+ * Type definitions for ZIP operations.
194
+ */
195
+ Types: {
196
+ /**
197
+ * Compression level (0-9).
198
+ */
199
+ Level: ZipLevelType,
200
+ /**
201
+ * ZIP compression options.
202
+ */
203
+ Options: ZipOptionsType,
204
+ /**
205
+ * Entry in a ZIP archive.
206
+ */
207
+ Entry: ZipEntryType,
208
+ /**
209
+ * List of entries for creating a ZIP archive.
210
+ */
211
+ Entries: ZipEntriesType,
212
+ /**
213
+ * Extracted files from a ZIP archive.
214
+ */
215
+ Extracted: ZipExtractedType,
216
+ },
217
+ },
218
+ /**
219
+ * TAR archive operations.
220
+ *
221
+ * Provides functions for creating and extracting TAR archives (without compression).
222
+ */
223
+ Tar: {
224
+ /**
225
+ * Creates a TAR archive from a list of files.
226
+ *
227
+ * @example
228
+ * ```ts
229
+ * import { East, BlobType, StringType } from "@elaraai/east";
230
+ * import { Compression } from "@elaraai/east-node-io";
231
+ *
232
+ * const createTar = East.function([StringType, StringType], BlobType, ($, file1, file2) => {
233
+ * const entries = $.let([
234
+ * { name: "file1.txt", data: file1.encodeUtf8() },
235
+ * { name: "file2.txt", data: file2.encodeUtf8() },
236
+ * ]);
237
+ * const tarBlob = $.let(Compression.Tar.create(entries));
238
+ * return $.return(tarBlob);
239
+ * });
240
+ *
241
+ * const compiled = East.compileAsync(createTar.toIR(), Compression.Tar.Implementation);
242
+ * await compiled("Hello", "World");
243
+ * ```
244
+ */
245
+ create: tar_create,
246
+ /**
247
+ * Extracts files from a TAR archive.
248
+ *
249
+ * @example
250
+ * ```ts
251
+ * import { East, BlobType, DictType, StringType } from "@elaraai/east";
252
+ * import { Compression } from "@elaraai/east-node-io";
253
+ *
254
+ * const extractTar = East.function([BlobType], DictType(StringType, BlobType), ($, tarBlob) => {
255
+ * const files = $.let(Compression.Tar.extract(tarBlob));
256
+ * return $.return(files);
257
+ * });
258
+ *
259
+ * const compiled = East.compileAsync(extractTar.toIR(), Compression.Tar.Implementation);
260
+ * await compiled(tarBlob);
261
+ * ```
262
+ */
263
+ extract: tar_extract,
264
+ /**
265
+ * Node.js implementation of TAR platform functions.
266
+ *
267
+ * Pass this to {@link East.compileAsync} to enable TAR operations.
268
+ */
269
+ Implementation: TarImpl,
270
+ /**
271
+ * Type definitions for TAR operations.
272
+ */
273
+ Types: {
274
+ /**
275
+ * Entry in a TAR archive.
276
+ */
277
+ Entry: TarEntryType,
278
+ /**
279
+ * List of entries for creating a TAR archive.
280
+ */
281
+ Entries: TarEntriesType,
282
+ /**
283
+ * Extracted files from a TAR archive.
284
+ */
285
+ Extracted: TarExtractedType,
286
+ },
287
+ },
288
+ };
289
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/compression/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAe;AACf,cAAc,YAAY,CAAC;AAE3B,+CAA+C;AAC/C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE5D,6BAA6B;AAC7B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EACH,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,gBAAgB,GACnB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB;;;;OAIG;IACH,IAAI,EAAE;QACF;;;;;;;;;;;;;;;;;;;;WAoBG;QACH,QAAQ,EAAE,aAAa;QAEvB;;;;;;;;;;;;;;;;;WAiBG;QACH,UAAU,EAAE,eAAe;QAE3B;;;;WAIG;QACH,cAAc,EAAE,QAAQ;QAExB;;WAEG;QACH,KAAK,EAAE;YACH;;eAEG;YACH,KAAK,EAAE,aAAa;YAEpB;;eAEG;YACH,OAAO,EAAE,eAAe;SAC3B;KACJ;IAED;;;;OAIG;IACH,GAAG,EAAE;QACD;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,QAAQ,EAAE,YAAY;QAEtB;;;;;;;;;;;;;;;;WAgBG;QACH,UAAU,EAAE,cAAc;QAE1B;;;;WAIG;QACH,cAAc,EAAE,OAAO;QAEvB;;WAEG;QACH,KAAK,EAAE;YACH;;eAEG;YACH,KAAK,EAAE,YAAY;YAEnB;;eAEG;YACH,OAAO,EAAE,cAAc;YAEvB;;eAEG;YACH,KAAK,EAAE,YAAY;YAEnB;;eAEG;YACH,OAAO,EAAE,cAAc;YAEvB;;eAEG;YACH,SAAS,EAAE,gBAAgB;SAC9B;KACJ;IAED;;;;OAIG;IACH,GAAG,EAAE;QACD;;;;;;;;;;;;;;;;;;;;WAoBG;QACH,MAAM,EAAE,UAAU;QAElB;;;;;;;;;;;;;;;;WAgBG;QACH,OAAO,EAAE,WAAW;QAEpB;;;;WAIG;QACH,cAAc,EAAE,OAAO;QAEvB;;WAEG;QACH,KAAK,EAAE;YACH;;eAEG;YACH,KAAK,EAAE,YAAY;YAEnB;;eAEG;YACH,OAAO,EAAE,cAAc;YAEvB;;eAEG;YACH,SAAS,EAAE,gBAAgB;SAC9B;KACJ;CACK,CAAC"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * TAR archive platform functions for East Node IO.
7
+ *
8
+ * Provides TAR archive creation and extraction operations for East programs,
9
+ * enabling file archiving using the TAR format (without compression).
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+ import { BlobType } from "@elaraai/east";
14
+ import type { PlatformFunction } from "@elaraai/east/internal";
15
+ /**
16
+ * Creates a TAR archive from a list of files.
17
+ *
18
+ * Archives multiple files into a single TAR file. Each file entry contains
19
+ * a name (path) and its data. TAR archives are not compressed by default,
20
+ * but can be compressed separately using gzip (creating .tar.gz files).
21
+ *
22
+ * This is a platform function for the East language, enabling TAR archive
23
+ * creation in East programs running on Node.js.
24
+ *
25
+ * @param entries - List of files to include in the archive
26
+ * @returns TAR archive as blob
27
+ *
28
+ * @throws {EastError} When archiving fails due to:
29
+ * - Empty file name (location: "tar_create")
30
+ * - File name too long (> 100 characters) (location: "tar_create")
31
+ * - Memory allocation errors (location: "tar_create")
32
+ * - Internal errors (location: "tar_create")
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * import { East, BlobType, StringType } from "@elaraai/east";
37
+ * import { Compression } from "@elaraai/east-node-io";
38
+ *
39
+ * const createTar = East.function([StringType, StringType], BlobType, ($, file1Content, file2Content) => {
40
+ * const entries = $.let([
41
+ * {
42
+ * name: "file1.txt",
43
+ * data: file1Content.encodeUtf8(),
44
+ * },
45
+ * {
46
+ * name: "file2.txt",
47
+ * data: file2Content.encodeUtf8(),
48
+ * },
49
+ * ]);
50
+ * const tarBlob = $.let(Compression.Tar.create(entries));
51
+ * return $.return(tarBlob);
52
+ * });
53
+ *
54
+ * const compiled = East.compile(createTar.toIR(), Compression.Tar.Implementation);
55
+ * const result = compiled("Hello", "World"); // TAR archive blob
56
+ * ```
57
+ *
58
+ * @remarks
59
+ * - Uses POSIX ustar format (IEEE 1003.1-1988)
60
+ * - File names are limited to 100 characters (or 256 with prefix)
61
+ * - TAR does not include compression - use with gzip for .tar.gz
62
+ * - File permissions default to 0644 (readable/writable by owner)
63
+ * - Operations are asynchronous (use East.compileAsync)
64
+ */
65
+ export declare const tar_create: import("@elaraai/east").AsyncPlatformDefinition<[import("@elaraai/east").ArrayType<import("@elaraai/east").StructType<{
66
+ name: import("@elaraai/east").StringType;
67
+ data: BlobType;
68
+ }>>], BlobType>;
69
+ /**
70
+ * Extracts files from a TAR archive.
71
+ *
72
+ * Extracts all files from a TAR archive into a dictionary mapping file
73
+ * names to their data. Supports POSIX ustar format.
74
+ *
75
+ * This is a platform function for the East language, enabling TAR archive
76
+ * extraction in East programs running on Node.js.
77
+ *
78
+ * @param tarData - TAR archive blob
79
+ * @returns Dictionary mapping file names to their data
80
+ *
81
+ * @throws {EastError} When extraction fails due to:
82
+ * - Invalid TAR format (location: "tar_extract")
83
+ * - Corrupted archive (location: "tar_extract")
84
+ * - Invalid checksum (location: "tar_extract")
85
+ * - Memory allocation errors (location: "tar_extract")
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * import { East, BlobType, DictType, StringType } from "@elaraai/east";
90
+ * import { Compression } from "@elaraai/east-node-io";
91
+ *
92
+ * const extractTar = East.function([BlobType], DictType(StringType, BlobType), ($, tarBlob) => {
93
+ * const files = $.let(Compression.Tar.extract(tarBlob));
94
+ * return $.return(files);
95
+ * });
96
+ *
97
+ * const compiled = East.compile(extractTar.toIR(), Compression.Tar.Implementation);
98
+ * const result = compiled(tarBlob);
99
+ * // Map { "file1.txt" => Uint8Array, "file2.txt" => Uint8Array }
100
+ * ```
101
+ *
102
+ * @remarks
103
+ * - Supports POSIX ustar format (IEEE 1003.1-1988)
104
+ * - Validates header checksums
105
+ * - Skips directory entries (only extracts files)
106
+ * - Operations are asynchronous (use East.compileAsync)
107
+ */
108
+ export declare const tar_extract: import("@elaraai/east").AsyncPlatformDefinition<[BlobType], import("@elaraai/east").DictType<import("@elaraai/east").StringType, BlobType>>;
109
+ /**
110
+ * Node.js implementation of TAR platform functions.
111
+ *
112
+ * Pass this array to {@link East.compileAsync} to enable TAR archive operations.
113
+ */
114
+ export declare const TarImpl: PlatformFunction[];
115
+ //# sourceMappingURL=tar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tar.d.ts","sourceRoot":"","sources":["../../src/compression/tar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAQ,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,UAAU;;;eAA+D,CAAC;AAEvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,WAAW,6IAAkE,CAAC;AAyI3F;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,gBAAgB,EAwBrC,CAAC"}
@@ -0,0 +1,254 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * TAR archive platform functions for East Node IO.
7
+ *
8
+ * Provides TAR archive creation and extraction operations for East programs,
9
+ * enabling file archiving using the TAR format (without compression).
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+ import { East, BlobType } from "@elaraai/east";
14
+ import { EastError } from "@elaraai/east/internal";
15
+ import { pack, extract } from "tar-stream";
16
+ import { Readable } from "node:stream";
17
+ import { TarEntriesType, TarExtractedType } from "./types.js";
18
+ /**
19
+ * Creates a TAR archive from a list of files.
20
+ *
21
+ * Archives multiple files into a single TAR file. Each file entry contains
22
+ * a name (path) and its data. TAR archives are not compressed by default,
23
+ * but can be compressed separately using gzip (creating .tar.gz files).
24
+ *
25
+ * This is a platform function for the East language, enabling TAR archive
26
+ * creation in East programs running on Node.js.
27
+ *
28
+ * @param entries - List of files to include in the archive
29
+ * @returns TAR archive as blob
30
+ *
31
+ * @throws {EastError} When archiving fails due to:
32
+ * - Empty file name (location: "tar_create")
33
+ * - File name too long (> 100 characters) (location: "tar_create")
34
+ * - Memory allocation errors (location: "tar_create")
35
+ * - Internal errors (location: "tar_create")
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * import { East, BlobType, StringType } from "@elaraai/east";
40
+ * import { Compression } from "@elaraai/east-node-io";
41
+ *
42
+ * const createTar = East.function([StringType, StringType], BlobType, ($, file1Content, file2Content) => {
43
+ * const entries = $.let([
44
+ * {
45
+ * name: "file1.txt",
46
+ * data: file1Content.encodeUtf8(),
47
+ * },
48
+ * {
49
+ * name: "file2.txt",
50
+ * data: file2Content.encodeUtf8(),
51
+ * },
52
+ * ]);
53
+ * const tarBlob = $.let(Compression.Tar.create(entries));
54
+ * return $.return(tarBlob);
55
+ * });
56
+ *
57
+ * const compiled = East.compile(createTar.toIR(), Compression.Tar.Implementation);
58
+ * const result = compiled("Hello", "World"); // TAR archive blob
59
+ * ```
60
+ *
61
+ * @remarks
62
+ * - Uses POSIX ustar format (IEEE 1003.1-1988)
63
+ * - File names are limited to 100 characters (or 256 with prefix)
64
+ * - TAR does not include compression - use with gzip for .tar.gz
65
+ * - File permissions default to 0644 (readable/writable by owner)
66
+ * - Operations are asynchronous (use East.compileAsync)
67
+ */
68
+ export const tar_create = East.asyncPlatform("tar_create", [TarEntriesType], BlobType);
69
+ /**
70
+ * Extracts files from a TAR archive.
71
+ *
72
+ * Extracts all files from a TAR archive into a dictionary mapping file
73
+ * names to their data. Supports POSIX ustar format.
74
+ *
75
+ * This is a platform function for the East language, enabling TAR archive
76
+ * extraction in East programs running on Node.js.
77
+ *
78
+ * @param tarData - TAR archive blob
79
+ * @returns Dictionary mapping file names to their data
80
+ *
81
+ * @throws {EastError} When extraction fails due to:
82
+ * - Invalid TAR format (location: "tar_extract")
83
+ * - Corrupted archive (location: "tar_extract")
84
+ * - Invalid checksum (location: "tar_extract")
85
+ * - Memory allocation errors (location: "tar_extract")
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * import { East, BlobType, DictType, StringType } from "@elaraai/east";
90
+ * import { Compression } from "@elaraai/east-node-io";
91
+ *
92
+ * const extractTar = East.function([BlobType], DictType(StringType, BlobType), ($, tarBlob) => {
93
+ * const files = $.let(Compression.Tar.extract(tarBlob));
94
+ * return $.return(files);
95
+ * });
96
+ *
97
+ * const compiled = East.compile(extractTar.toIR(), Compression.Tar.Implementation);
98
+ * const result = compiled(tarBlob);
99
+ * // Map { "file1.txt" => Uint8Array, "file2.txt" => Uint8Array }
100
+ * ```
101
+ *
102
+ * @remarks
103
+ * - Supports POSIX ustar format (IEEE 1003.1-1988)
104
+ * - Validates header checksums
105
+ * - Skips directory entries (only extracts files)
106
+ * - Operations are asynchronous (use East.compileAsync)
107
+ */
108
+ export const tar_extract = East.asyncPlatform("tar_extract", [BlobType], TarExtractedType);
109
+ /**
110
+ * Helper function to create a TAR archive using tar-stream.
111
+ *
112
+ * @param entries - List of file entries
113
+ * @returns TAR archive as Uint8Array
114
+ */
115
+ async function createTar(entries) {
116
+ return new Promise((resolve, reject) => {
117
+ const chunks = [];
118
+ const tarPack = pack();
119
+ // Collect chunks
120
+ tarPack.on('data', (chunk) => {
121
+ chunks.push(new Uint8Array(chunk));
122
+ });
123
+ tarPack.on('end', () => {
124
+ const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
125
+ const result = new Uint8Array(totalLength);
126
+ let offset = 0;
127
+ for (const chunk of chunks) {
128
+ result.set(chunk, offset);
129
+ offset += chunk.length;
130
+ }
131
+ resolve(result);
132
+ });
133
+ tarPack.on('error', (err) => {
134
+ reject(new EastError(`TAR creation failed: ${err.message}`, {
135
+ location: { filename: "tar_create", line: 0n, column: 0n },
136
+ cause: err
137
+ }));
138
+ });
139
+ // Add all entries to the archive
140
+ for (const entry of entries) {
141
+ const name = entry.name;
142
+ const data = entry.data;
143
+ if (!name || name.length === 0) {
144
+ reject(new EastError("File name cannot be empty", {
145
+ location: { filename: "tar_create", line: 0n, column: 0n }
146
+ }));
147
+ return;
148
+ }
149
+ // Write entry to tar stream
150
+ const entryStream = tarPack.entry({
151
+ name: name,
152
+ size: data.length,
153
+ mode: 0o644,
154
+ mtime: new Date()
155
+ }, (err) => {
156
+ if (err) {
157
+ reject(new EastError(`Failed to add entry ${name}: ${err.message}`, {
158
+ location: { filename: "tar_create", line: 0n, column: 0n },
159
+ cause: err
160
+ }));
161
+ }
162
+ });
163
+ entryStream.write(Buffer.from(data));
164
+ entryStream.end();
165
+ }
166
+ // Finalize the archive
167
+ tarPack.finalize();
168
+ });
169
+ }
170
+ /**
171
+ * Helper function to extract files from a TAR archive.
172
+ *
173
+ * @param tarData - TAR archive data
174
+ * @returns Map of file names to their data
175
+ */
176
+ async function extractTar(tarData) {
177
+ return new Promise((resolve, reject) => {
178
+ const files = new Map();
179
+ const tarExtract = extract();
180
+ tarExtract.on('entry', (header, stream, next) => {
181
+ const chunks = [];
182
+ stream.on('data', (chunk) => {
183
+ chunks.push(new Uint8Array(chunk));
184
+ });
185
+ stream.on('end', () => {
186
+ // Only store files, not directories
187
+ if (header.type === 'file') {
188
+ const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
189
+ const result = new Uint8Array(totalLength);
190
+ let offset = 0;
191
+ for (const chunk of chunks) {
192
+ result.set(chunk, offset);
193
+ offset += chunk.length;
194
+ }
195
+ files.set(header.name, result);
196
+ }
197
+ next();
198
+ });
199
+ stream.on('error', (err) => {
200
+ reject(new EastError(`Failed to extract entry ${header.name}: ${err.message}`, {
201
+ location: { filename: "tar_extract", line: 0n, column: 0n },
202
+ cause: err
203
+ }));
204
+ });
205
+ stream.resume();
206
+ });
207
+ tarExtract.on('finish', () => {
208
+ resolve(files);
209
+ });
210
+ tarExtract.on('error', (err) => {
211
+ reject(new EastError(`TAR extraction failed: ${err.message}`, {
212
+ location: { filename: "tar_extract", line: 0n, column: 0n },
213
+ cause: err
214
+ }));
215
+ });
216
+ // Feed the tar data to the extractor
217
+ const readable = Readable.from(Buffer.from(tarData));
218
+ readable.pipe(tarExtract);
219
+ });
220
+ }
221
+ /**
222
+ * Node.js implementation of TAR platform functions.
223
+ *
224
+ * Pass this array to {@link East.compileAsync} to enable TAR archive operations.
225
+ */
226
+ export const TarImpl = [
227
+ tar_create.implement(async (entries) => {
228
+ try {
229
+ return await createTar(entries);
230
+ }
231
+ catch (err) {
232
+ if (err instanceof EastError)
233
+ throw err;
234
+ throw new EastError(`TAR creation failed: ${err.message}`, {
235
+ location: { filename: "tar_create", line: 0n, column: 0n },
236
+ cause: err
237
+ });
238
+ }
239
+ }),
240
+ tar_extract.implement(async (tarData) => {
241
+ try {
242
+ return await extractTar(tarData);
243
+ }
244
+ catch (err) {
245
+ if (err instanceof EastError)
246
+ throw err;
247
+ throw new EastError(`TAR extraction failed: ${err.message}`, {
248
+ location: { filename: "tar_extract", line: 0n, column: 0n },
249
+ cause: err
250
+ });
251
+ }
252
+ }),
253
+ ];
254
+ //# sourceMappingURL=tar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tar.js","sourceRoot":"","sources":["../../src/compression/tar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,CAAC;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