alepha 0.11.7 → 0.11.10

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 (169) hide show
  1. package/README.md +55 -17
  2. package/dist/index.cjs +15805 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +1 -0
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.js +15804 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +36 -372
  9. package/src/assets/biomeJson.ts +33 -0
  10. package/src/assets/tsconfigJson.ts +17 -0
  11. package/src/assets/viteConfigTs.ts +14 -0
  12. package/src/commands/BiomeCommands.ts +60 -0
  13. package/src/commands/CoreCommands.ts +266 -0
  14. package/src/commands/DrizzleCommands.ts +403 -0
  15. package/src/commands/VerifyCommands.ts +48 -0
  16. package/src/commands/ViteCommands.ts +152 -0
  17. package/src/index.ts +35 -0
  18. package/src/services/ProcessRunner.ts +89 -0
  19. package/src/version.ts +7 -0
  20. package/api/files.cjs +0 -8
  21. package/api/files.d.ts +0 -438
  22. package/api/files.js +0 -1
  23. package/api/jobs.cjs +0 -8
  24. package/api/jobs.d.ts +0 -327
  25. package/api/jobs.js +0 -1
  26. package/api/notifications.cjs +0 -8
  27. package/api/notifications.d.ts +0 -263
  28. package/api/notifications.js +0 -1
  29. package/api/users.cjs +0 -8
  30. package/api/users.d.ts +0 -923
  31. package/api/users.js +0 -1
  32. package/api/verifications.cjs +0 -8
  33. package/api/verifications.d.ts +0 -1
  34. package/api/verifications.js +0 -1
  35. package/batch.cjs +0 -8
  36. package/batch.d.ts +0 -154
  37. package/batch.js +0 -1
  38. package/bucket.cjs +0 -8
  39. package/bucket.d.ts +0 -520
  40. package/bucket.js +0 -1
  41. package/cache/redis.cjs +0 -8
  42. package/cache/redis.d.ts +0 -40
  43. package/cache/redis.js +0 -1
  44. package/cache.cjs +0 -8
  45. package/cache.d.ts +0 -288
  46. package/cache.js +0 -1
  47. package/command.cjs +0 -8
  48. package/command.d.ts +0 -269
  49. package/command.js +0 -1
  50. package/core.cjs +0 -8
  51. package/core.d.ts +0 -1904
  52. package/core.js +0 -1
  53. package/datetime.cjs +0 -8
  54. package/datetime.d.ts +0 -144
  55. package/datetime.js +0 -1
  56. package/devtools.cjs +0 -8
  57. package/devtools.d.ts +0 -252
  58. package/devtools.js +0 -1
  59. package/email.cjs +0 -8
  60. package/email.d.ts +0 -187
  61. package/email.js +0 -1
  62. package/fake.cjs +0 -8
  63. package/fake.d.ts +0 -73
  64. package/fake.js +0 -1
  65. package/file.cjs +0 -8
  66. package/file.d.ts +0 -528
  67. package/file.js +0 -1
  68. package/lock/redis.cjs +0 -8
  69. package/lock/redis.d.ts +0 -24
  70. package/lock/redis.js +0 -1
  71. package/lock.cjs +0 -8
  72. package/lock.d.ts +0 -552
  73. package/lock.js +0 -1
  74. package/logger.cjs +0 -8
  75. package/logger.d.ts +0 -287
  76. package/logger.js +0 -1
  77. package/postgres.cjs +0 -8
  78. package/postgres.d.ts +0 -2143
  79. package/postgres.js +0 -1
  80. package/queue/redis.cjs +0 -8
  81. package/queue/redis.d.ts +0 -29
  82. package/queue/redis.js +0 -1
  83. package/queue.cjs +0 -8
  84. package/queue.d.ts +0 -760
  85. package/queue.js +0 -1
  86. package/react/auth.cjs +0 -8
  87. package/react/auth.d.ts +0 -504
  88. package/react/auth.js +0 -1
  89. package/react/form.cjs +0 -8
  90. package/react/form.d.ts +0 -211
  91. package/react/form.js +0 -1
  92. package/react/head.cjs +0 -8
  93. package/react/head.d.ts +0 -120
  94. package/react/head.js +0 -1
  95. package/react/i18n.cjs +0 -8
  96. package/react/i18n.d.ts +0 -168
  97. package/react/i18n.js +0 -1
  98. package/react.cjs +0 -8
  99. package/react.d.ts +0 -1263
  100. package/react.js +0 -1
  101. package/redis.cjs +0 -8
  102. package/redis.d.ts +0 -82
  103. package/redis.js +0 -1
  104. package/retry.cjs +0 -8
  105. package/retry.d.ts +0 -162
  106. package/retry.js +0 -1
  107. package/router.cjs +0 -8
  108. package/router.d.ts +0 -45
  109. package/router.js +0 -1
  110. package/scheduler.cjs +0 -8
  111. package/scheduler.d.ts +0 -145
  112. package/scheduler.js +0 -1
  113. package/security.cjs +0 -8
  114. package/security.d.ts +0 -586
  115. package/security.js +0 -1
  116. package/server/cache.cjs +0 -8
  117. package/server/cache.d.ts +0 -163
  118. package/server/cache.js +0 -1
  119. package/server/compress.cjs +0 -8
  120. package/server/compress.d.ts +0 -38
  121. package/server/compress.js +0 -1
  122. package/server/cookies.cjs +0 -8
  123. package/server/cookies.d.ts +0 -144
  124. package/server/cookies.js +0 -1
  125. package/server/cors.cjs +0 -8
  126. package/server/cors.d.ts +0 -45
  127. package/server/cors.js +0 -1
  128. package/server/health.cjs +0 -8
  129. package/server/health.d.ts +0 -58
  130. package/server/health.js +0 -1
  131. package/server/helmet.cjs +0 -8
  132. package/server/helmet.d.ts +0 -98
  133. package/server/helmet.js +0 -1
  134. package/server/links.cjs +0 -8
  135. package/server/links.d.ts +0 -322
  136. package/server/links.js +0 -1
  137. package/server/metrics.cjs +0 -8
  138. package/server/metrics.d.ts +0 -35
  139. package/server/metrics.js +0 -1
  140. package/server/multipart.cjs +0 -8
  141. package/server/multipart.d.ts +0 -42
  142. package/server/multipart.js +0 -1
  143. package/server/proxy.cjs +0 -8
  144. package/server/proxy.d.ts +0 -234
  145. package/server/proxy.js +0 -1
  146. package/server/security.cjs +0 -8
  147. package/server/security.d.ts +0 -92
  148. package/server/security.js +0 -1
  149. package/server/static.cjs +0 -8
  150. package/server/static.d.ts +0 -119
  151. package/server/static.js +0 -1
  152. package/server/swagger.cjs +0 -8
  153. package/server/swagger.d.ts +0 -161
  154. package/server/swagger.js +0 -1
  155. package/server.cjs +0 -8
  156. package/server.d.ts +0 -849
  157. package/server.js +0 -1
  158. package/topic/redis.cjs +0 -8
  159. package/topic/redis.d.ts +0 -42
  160. package/topic/redis.js +0 -1
  161. package/topic.cjs +0 -8
  162. package/topic.d.ts +0 -819
  163. package/topic.js +0 -1
  164. package/ui.cjs +0 -8
  165. package/ui.d.ts +0 -813
  166. package/ui.js +0 -1
  167. package/vite.cjs +0 -8
  168. package/vite.d.ts +0 -186
  169. package/vite.js +0 -1
package/fake.d.ts DELETED
@@ -1,73 +0,0 @@
1
- import * as _alepha_core0 from "alepha";
2
- import { StaticDecode, TSchema } from "alepha";
3
-
4
- //#region src/providers/FakeProvider.d.ts
5
- interface FakeOptions {
6
- /**
7
- * Faker locale to use for generating fake data.
8
- * @default "en"
9
- */
10
- locale?: string;
11
- /**
12
- * Seed for deterministic fake data generation.
13
- */
14
- seed?: number;
15
- }
16
- /**
17
- * Generate fake data from TypeBox schemas using faker.js.
18
- *
19
- * @example
20
- * ```ts
21
- * const fake = new FakeProvider();
22
- * const userSchema = t.object({
23
- * id: t.uuid(),
24
- * name: t.text(),
25
- * email: t.email(),
26
- * });
27
- * const fakeUser = fake.generate(userSchema);
28
- * ```
29
- */
30
- declare class FakeProvider {
31
- private readonly faker;
32
- private readonly guard;
33
- constructor(options?: FakeOptions);
34
- /**
35
- * Generate fake data matching the given TypeBox schema.
36
- */
37
- generate<T extends TSchema>(schema: T): StaticDecode<T>;
38
- /**
39
- * Generate multiple fake data items.
40
- */
41
- generateMany<T extends TSchema>(schema: T, count: number): StaticDecode<T>[];
42
- private generateValue;
43
- private generateString;
44
- private generateNumber;
45
- private generateInteger;
46
- private generateBigInt;
47
- private generateBoolean;
48
- private generateArray;
49
- private generateObject;
50
- /**
51
- * Generate a value with context from the property key name.
52
- * This helps generate more realistic fake data based on field names.
53
- */
54
- private generateValueWithContext;
55
- private generateRecord;
56
- }
57
- //#endregion
58
- //#region src/index.d.ts
59
- /**
60
- * Provides fake data generation capabilities for Alepha applications using faker.js and TypeBox schemas.
61
- *
62
- * The fake module enables declarative fake data generation from TypeBox schemas, making it easy to create
63
- * realistic test data, seed databases, or generate mock responses. It intelligently uses property key names
64
- * to generate contextually appropriate data (e.g., "email" generates an email address, "firstName" generates
65
- * a first name).
66
- *
67
- * @see {@link FakeProvider}
68
- * @module alepha.fake
69
- */
70
- declare const AlephaFake: _alepha_core0.Service<_alepha_core0.Module>;
71
- //#endregion
72
- export { AlephaFake, FakeOptions, FakeProvider };
73
- //# sourceMappingURL=index.d.ts.map
package/fake.js DELETED
@@ -1 +0,0 @@
1
- export * from '@alepha/fake'
package/file.cjs DELETED
@@ -1,8 +0,0 @@
1
- 'use strict';
2
- var m = require('@alepha/file');
3
- Object.keys(m).forEach(function (k) {
4
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
5
- enumerable: true,
6
- get: function () { return m[k]; }
7
- });
8
- });
package/file.d.ts DELETED
@@ -1,528 +0,0 @@
1
- import * as _alepha_core0 from "alepha";
2
- import { FileLike, StreamLike } from "alepha";
3
- import { Readable } from "node:stream";
4
-
5
- //#region src/helpers/detectFileType.d.ts
6
- interface FileTypeResult {
7
- /**
8
- * The detected MIME type
9
- */
10
- mimeType: string;
11
- /**
12
- * The detected file extension
13
- */
14
- extension: string;
15
- /**
16
- * Whether the file type was verified by magic bytes
17
- */
18
- verified: boolean;
19
- /**
20
- * The stream (potentially wrapped to allow re-reading)
21
- */
22
- stream: Readable;
23
- }
24
- /**
25
- * Detects the file type by checking magic bytes against the stream content.
26
- *
27
- * @param stream - The readable stream to check
28
- * @param filename - The filename (used to get the extension)
29
- * @returns File type information including MIME type, extension, and verification status
30
- *
31
- * @example
32
- * ```typescript
33
- * const stream = fs.createReadStream('image.png');
34
- * const result = await detectFileType(stream, 'image.png');
35
- * console.log(result.mimeType); // 'image/png'
36
- * console.log(result.verified); // true if magic bytes match
37
- * ```
38
- */
39
- declare function detectFileType(stream: Readable, filename: string): Promise<FileTypeResult>;
40
- //#endregion
41
- //#region src/FileSystem.d.ts
42
- /**
43
- * Options for creating a file from a URL
44
- */
45
- interface CreateFileFromUrlOptions {
46
- /**
47
- * The URL to load the file from (file://, http://, or https://)
48
- */
49
- url: string;
50
- /**
51
- * The MIME type of the file (optional, will be detected from filename if not provided)
52
- */
53
- type?: string;
54
- /**
55
- * The name of the file (optional, will be extracted from URL if not provided)
56
- */
57
- name?: string;
58
- }
59
- /**
60
- * Options for creating a file from a Buffer
61
- */
62
- interface CreateFileFromBufferOptions {
63
- /**
64
- * The Buffer containing the file data
65
- */
66
- buffer: Buffer;
67
- /**
68
- * The MIME type of the file (optional, will be detected from name if not provided)
69
- */
70
- type?: string;
71
- /**
72
- * The name of the file (required for proper content type detection)
73
- */
74
- name?: string;
75
- }
76
- /**
77
- * Options for creating a file from a stream
78
- */
79
- interface CreateFileFromStreamOptions {
80
- /**
81
- * The readable stream containing the file data
82
- */
83
- stream: StreamLike;
84
- /**
85
- * The MIME type of the file (optional, will be detected from name if not provided)
86
- */
87
- type?: string;
88
- /**
89
- * The name of the file (required for proper content type detection)
90
- */
91
- name?: string;
92
- /**
93
- * The size of the file in bytes (optional)
94
- */
95
- size?: number;
96
- }
97
- /**
98
- * Options for creating a file from text content
99
- */
100
- interface CreateFileFromTextOptions {
101
- /**
102
- * The text content to create the file from
103
- */
104
- text: string;
105
- /**
106
- * The MIME type of the file (default: text/plain)
107
- */
108
- type?: string;
109
- /**
110
- * The name of the file (default: "file.txt")
111
- */
112
- name?: string;
113
- }
114
- /**
115
- * Options for creating a file from a Web File object
116
- */
117
- interface CreateFileFromWebFileOptions {
118
- /**
119
- * The Web File object
120
- */
121
- file: File;
122
- /**
123
- * Override the MIME type (optional, uses file.type if not provided)
124
- */
125
- type?: string;
126
- /**
127
- * Override the name (optional, uses file.name if not provided)
128
- */
129
- name?: string;
130
- /**
131
- * Override the size (optional, uses file.size if not provided)
132
- */
133
- size?: number;
134
- }
135
- /**
136
- * Options for creating a file from an ArrayBuffer
137
- */
138
- interface CreateFileFromArrayBufferOptions {
139
- /**
140
- * The ArrayBuffer containing the file data
141
- */
142
- arrayBuffer: ArrayBuffer;
143
- /**
144
- * The MIME type of the file (optional, will be detected from name if not provided)
145
- */
146
- type?: string;
147
- /**
148
- * The name of the file (required for proper content type detection)
149
- */
150
- name?: string;
151
- }
152
- /**
153
- * Union type for all createFile options
154
- */
155
- type CreateFileOptions = CreateFileFromUrlOptions | CreateFileFromBufferOptions | CreateFileFromStreamOptions | CreateFileFromTextOptions | CreateFileFromWebFileOptions | CreateFileFromArrayBufferOptions;
156
- /**
157
- * Options for rm (remove) operation
158
- */
159
- interface RmOptions {
160
- /**
161
- * If true, removes directories and their contents recursively
162
- */
163
- recursive?: boolean;
164
- /**
165
- * If true, no error will be thrown if the path does not exist
166
- */
167
- force?: boolean;
168
- }
169
- /**
170
- * Options for cp (copy) operation
171
- */
172
- interface CpOptions {
173
- /**
174
- * If true, copy directories recursively
175
- */
176
- recursive?: boolean;
177
- /**
178
- * If true, overwrite existing destination
179
- */
180
- force?: boolean;
181
- }
182
- /**
183
- * Options for mkdir operation
184
- */
185
- interface MkdirOptions {
186
- /**
187
- * If true, creates parent directories as needed
188
- */
189
- recursive?: boolean;
190
- /**
191
- * File mode (permission and sticky bits)
192
- */
193
- mode?: number;
194
- }
195
- /**
196
- * Options for ls (list) operation
197
- */
198
- interface LsOptions {
199
- /**
200
- * If true, list contents of directories recursively
201
- */
202
- recursive?: boolean;
203
- /**
204
- * If true, include hidden files (starting with .)
205
- */
206
- hidden?: boolean;
207
- }
208
- /**
209
- * FileSystem interface providing utilities for working with files.
210
- */
211
- declare abstract class FileSystem {
212
- /**
213
- * Creates a FileLike object from various sources.
214
- *
215
- * @param options - Options for creating the file
216
- * @returns A FileLike object
217
- */
218
- abstract createFile(options: CreateFileOptions): FileLike;
219
- /**
220
- * Detects the file type by checking magic bytes in a stream.
221
- *
222
- * @param stream - The readable stream to check
223
- * @param filename - The filename (used to get the extension)
224
- * @returns File type information including MIME type, extension, and verification status
225
- */
226
- abstract detectFileType(stream: Readable, filename: string): Promise<FileTypeResult>;
227
- /**
228
- * Gets the content type (MIME type) based on a filename.
229
- *
230
- * @param filename - The filename to check
231
- * @returns The MIME type
232
- */
233
- abstract getContentType(filename: string): string;
234
- /**
235
- * Removes a file or directory.
236
- *
237
- * @param path - The path to remove
238
- * @param options - Remove options
239
- */
240
- abstract rm(path: string, options?: RmOptions): Promise<void>;
241
- /**
242
- * Copies a file or directory.
243
- *
244
- * @param src - Source path
245
- * @param dest - Destination path
246
- * @param options - Copy options
247
- */
248
- abstract cp(src: string, dest: string, options?: CpOptions): Promise<void>;
249
- /**
250
- * Moves/renames a file or directory.
251
- *
252
- * @param src - Source path
253
- * @param dest - Destination path
254
- */
255
- abstract mv(src: string, dest: string): Promise<void>;
256
- /**
257
- * Creates a directory.
258
- *
259
- * @param path - The directory path to create
260
- * @param options - Mkdir options
261
- */
262
- abstract mkdir(path: string, options?: MkdirOptions): Promise<void>;
263
- /**
264
- * Lists files in a directory.
265
- *
266
- * @param path - The directory path to list
267
- * @param options - List options
268
- * @returns Array of filenames
269
- */
270
- abstract ls(path: string, options?: LsOptions): Promise<string[]>;
271
- }
272
- //#endregion
273
- //#region src/helpers/createFile.d.ts
274
- declare const createFile: (source: string | Buffer | ArrayBuffer | StreamLike | File, options?: {
275
- type?: string;
276
- name?: string;
277
- size?: number;
278
- }) => FileLike;
279
- declare const createFileFromWebFile: (source: File, options?: {
280
- type?: string;
281
- name?: string;
282
- size?: number;
283
- }) => FileLike;
284
- declare const createFileFromBuffer: (source: Buffer, options?: {
285
- type?: string;
286
- name?: string;
287
- }) => FileLike;
288
- declare const createFileFromStream: (source: StreamLike, options?: {
289
- type?: string;
290
- name?: string;
291
- size?: number;
292
- }) => FileLike & {
293
- _buffer: null | Buffer;
294
- };
295
- declare const createFileFromUrl: (url: string, options?: {
296
- type?: string;
297
- name?: string;
298
- }) => FileLike;
299
- /**
300
- * Converts a stream-like object to a Buffer.
301
- */
302
- declare const streamToBuffer: (streamLike: StreamLike) => Promise<Buffer>;
303
- /**
304
- * Converts a Node.js Buffer to an ArrayBuffer.
305
- */
306
- declare const bufferToArrayBuffer: (buffer: Buffer) => ArrayBuffer;
307
- declare const isReadableStream: (obj: unknown) => obj is NodeJS.ReadableStream;
308
- //#endregion
309
- //#region src/helpers/getContentType.d.ts
310
- /**
311
- * Can be used to get the content type of file based on its extension.
312
- *
313
- * Feel free to add more mime types in your project!
314
- */
315
- declare const mimeMap: Record<string, string>;
316
- /**
317
- * Returns the content type of file based on its filename.
318
- * @see {mimeMap}
319
- */
320
- declare const getContentType: (filename: string) => string;
321
- //#endregion
322
- //#region src/NodeFileSystem.d.ts
323
- /**
324
- * Node.js implementation of FileSystem interface.
325
- *
326
- * @example
327
- * ```typescript
328
- * const fs = new NodeFileSystem();
329
- *
330
- * // Create from URL
331
- * const file1 = fs.createFile({ url: "file:///path/to/file.png" });
332
- *
333
- * // Create from Buffer
334
- * const file2 = fs.createFile({ buffer: Buffer.from("hello"), name: "hello.txt" });
335
- *
336
- * // Create from text
337
- * const file3 = fs.createFile({ text: "Hello, world!", name: "greeting.txt" });
338
- *
339
- * // File operations
340
- * await fs.mkdir("/tmp/mydir", { recursive: true });
341
- * await fs.cp("/src/file.txt", "/dest/file.txt");
342
- * await fs.mv("/old/path.txt", "/new/path.txt");
343
- * const files = await fs.ls("/tmp");
344
- * await fs.rm("/tmp/file.txt");
345
- * ```
346
- */
347
- declare class NodeFileSystem implements FileSystem {
348
- /**
349
- * Creates a FileLike object from various sources.
350
- *
351
- * @param options - Options for creating the file
352
- * @returns A FileLike object
353
- *
354
- * @example
355
- * ```typescript
356
- * const fs = new NodeFileSystem();
357
- *
358
- * // From URL
359
- * const file1 = fs.createFile({ url: "https://example.com/image.png" });
360
- *
361
- * // From Buffer
362
- * const file2 = fs.createFile({
363
- * buffer: Buffer.from("hello"),
364
- * name: "hello.txt",
365
- * type: "text/plain"
366
- * });
367
- *
368
- * // From text
369
- * const file3 = fs.createFile({ text: "Hello!", name: "greeting.txt" });
370
- *
371
- * // From stream with detection
372
- * const stream = createReadStream("/path/to/file.png");
373
- * const file4 = fs.createFile({ stream, name: "image.png" });
374
- * ```
375
- */
376
- createFile(options: CreateFileOptions): FileLike;
377
- /**
378
- * Detects the file type by checking magic bytes in a stream.
379
- *
380
- * @param stream - The readable stream to check
381
- * @param filename - The filename (used to get the extension)
382
- * @returns File type information including MIME type, extension, and verification status
383
- *
384
- * @example
385
- * ```typescript
386
- * const fs = new NodeFileSystem();
387
- * const stream = createReadStream('image.png');
388
- * const result = await fs.detectFileType(stream, 'image.png');
389
- * console.log(result.mimeType); // 'image/png'
390
- * console.log(result.verified); // true if magic bytes match
391
- * ```
392
- */
393
- detectFileType(stream: Readable, filename: string): Promise<FileTypeResult>;
394
- /**
395
- * Gets the content type (MIME type) based on a filename.
396
- *
397
- * @param filename - The filename to check
398
- * @returns The MIME type
399
- *
400
- * @example
401
- * ```typescript
402
- * const fs = new NodeFileSystem();
403
- * const mimeType = fs.getContentType("image.png"); // "image/png"
404
- * ```
405
- */
406
- getContentType(filename: string): string;
407
- /**
408
- * Removes a file or directory.
409
- *
410
- * @param path - The path to remove
411
- * @param options - Remove options
412
- *
413
- * @example
414
- * ```typescript
415
- * const fs = new NodeFileSystem();
416
- *
417
- * // Remove a file
418
- * await fs.rm("/tmp/file.txt");
419
- *
420
- * // Remove a directory recursively
421
- * await fs.rm("/tmp/mydir", { recursive: true });
422
- *
423
- * // Remove with force (no error if doesn't exist)
424
- * await fs.rm("/tmp/maybe-exists.txt", { force: true });
425
- * ```
426
- */
427
- rm(path: string, options?: RmOptions): Promise<void>;
428
- /**
429
- * Copies a file or directory.
430
- *
431
- * @param src - Source path
432
- * @param dest - Destination path
433
- * @param options - Copy options
434
- *
435
- * @example
436
- * ```typescript
437
- * const fs = new NodeFileSystem();
438
- *
439
- * // Copy a file
440
- * await fs.cp("/src/file.txt", "/dest/file.txt");
441
- *
442
- * // Copy a directory recursively
443
- * await fs.cp("/src/dir", "/dest/dir", { recursive: true });
444
- *
445
- * // Copy with force (overwrite existing)
446
- * await fs.cp("/src/file.txt", "/dest/file.txt", { force: true });
447
- * ```
448
- */
449
- cp(src: string, dest: string, options?: CpOptions): Promise<void>;
450
- /**
451
- * Moves/renames a file or directory.
452
- *
453
- * @param src - Source path
454
- * @param dest - Destination path
455
- *
456
- * @example
457
- * ```typescript
458
- * const fs = new NodeFileSystem();
459
- *
460
- * // Move/rename a file
461
- * await fs.mv("/old/path.txt", "/new/path.txt");
462
- *
463
- * // Move a directory
464
- * await fs.mv("/old/dir", "/new/dir");
465
- * ```
466
- */
467
- mv(src: string, dest: string): Promise<void>;
468
- /**
469
- * Creates a directory.
470
- *
471
- * @param path - The directory path to create
472
- * @param options - Mkdir options
473
- *
474
- * @example
475
- * ```typescript
476
- * const fs = new NodeFileSystem();
477
- *
478
- * // Create a directory
479
- * await fs.mkdir("/tmp/mydir");
480
- *
481
- * // Create nested directories
482
- * await fs.mkdir("/tmp/path/to/dir", { recursive: true });
483
- *
484
- * // Create with specific permissions
485
- * await fs.mkdir("/tmp/mydir", { mode: 0o755 });
486
- * ```
487
- */
488
- mkdir(path: string, options?: MkdirOptions): Promise<void>;
489
- /**
490
- * Lists files in a directory.
491
- *
492
- * @param path - The directory path to list
493
- * @param options - List options
494
- * @returns Array of filenames
495
- *
496
- * @example
497
- * ```typescript
498
- * const fs = new NodeFileSystem();
499
- *
500
- * // List files in a directory
501
- * const files = await fs.ls("/tmp");
502
- * console.log(files); // ["file1.txt", "file2.txt", "subdir"]
503
- *
504
- * // List with hidden files
505
- * const allFiles = await fs.ls("/tmp", { hidden: true });
506
- *
507
- * // List recursively
508
- * const allFilesRecursive = await fs.ls("/tmp", { recursive: true });
509
- * ```
510
- */
511
- ls(path: string, options?: LsOptions): Promise<string[]>;
512
- }
513
- //#endregion
514
- //#region src/index.d.ts
515
- /**
516
- * Provides file system capabilities for Alepha applications with support for multiple file sources and operations.
517
- *
518
- * The file module enables working with files from various sources (URLs, buffers, streams) and provides
519
- * utilities for file type detection, content type determination, and common file system operations.
520
- *
521
- * @see {@link FileSystem}
522
- * @see {@link NodeFileSystem}
523
- * @module alepha.file
524
- */
525
- declare const AlephaFile: _alepha_core0.Service<_alepha_core0.Module>;
526
- //#endregion
527
- export { AlephaFile, CpOptions, CreateFileFromArrayBufferOptions, CreateFileFromBufferOptions, CreateFileFromStreamOptions, CreateFileFromTextOptions, CreateFileFromUrlOptions, CreateFileFromWebFileOptions, CreateFileOptions, FileSystem, FileTypeResult, LsOptions, MkdirOptions, NodeFileSystem, RmOptions, bufferToArrayBuffer, createFile, createFileFromBuffer, createFileFromStream, createFileFromUrl, createFileFromWebFile, detectFileType, getContentType, isReadableStream, mimeMap, streamToBuffer };
528
- //# sourceMappingURL=index.d.ts.map
package/file.js DELETED
@@ -1 +0,0 @@
1
- export * from '@alepha/file'
package/lock/redis.cjs DELETED
@@ -1,8 +0,0 @@
1
- 'use strict';
2
- var m = require('@alepha/lock-redis');
3
- Object.keys(m).forEach(function (k) {
4
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
5
- enumerable: true,
6
- get: function () { return m[k]; }
7
- });
8
- });
package/lock/redis.d.ts DELETED
@@ -1,24 +0,0 @@
1
- import * as _alepha_core0 from "alepha";
2
- import { LockProvider } from "alepha/lock";
3
- import * as _alepha_logger0 from "alepha/logger";
4
- import { RedisProvider } from "alepha/redis";
5
-
6
- //#region src/providers/RedisLockProvider.d.ts
7
- declare class RedisLockProvider implements LockProvider {
8
- protected readonly log: _alepha_logger0.Logger;
9
- protected readonly redisProvider: RedisProvider;
10
- set(key: string, value: string, nx?: boolean, px?: number): Promise<string>;
11
- del(...keys: string[]): Promise<void>;
12
- }
13
- //#endregion
14
- //#region src/index.d.ts
15
- /**
16
- * Plugin for Alepha that provides a locking mechanism.
17
- *
18
- * @see {@link RedisLockProvider}
19
- * @module alepha.lock.redis
20
- */
21
- declare const AlephaLockRedis: _alepha_core0.Service<_alepha_core0.Module>;
22
- //#endregion
23
- export { AlephaLockRedis, RedisLockProvider };
24
- //# sourceMappingURL=index.d.ts.map
package/lock/redis.js DELETED
@@ -1 +0,0 @@
1
- export * from '@alepha/lock-redis'
package/lock.cjs DELETED
@@ -1,8 +0,0 @@
1
- 'use strict';
2
- var m = require('@alepha/lock');
3
- Object.keys(m).forEach(function (k) {
4
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
5
- enumerable: true,
6
- get: function () { return m[k]; }
7
- });
8
- });