@guren/server 0.2.0-alpha.7 → 1.0.0-rc.9

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 (54) hide show
  1. package/dist/Application-DtWDHXr1.d.ts +2110 -0
  2. package/dist/BroadcastManager-AkIWUGJo.d.ts +466 -0
  3. package/dist/CacheManager-BkvHEOZX.d.ts +244 -0
  4. package/dist/ConsoleKernel-CqCVrdZs.d.ts +207 -0
  5. package/dist/EventManager-CmIoLt7r.d.ts +207 -0
  6. package/dist/Gate-CNkBYf8m.d.ts +268 -0
  7. package/dist/HealthManager-DUyMIzsZ.d.ts +141 -0
  8. package/dist/I18nManager-Dtgzsf5n.d.ts +270 -0
  9. package/dist/LogManager-7mxnkaPM.d.ts +256 -0
  10. package/dist/MailManager-DpMvYiP9.d.ts +292 -0
  11. package/dist/Scheduler-BstvSca7.d.ts +469 -0
  12. package/dist/StorageManager-oZTHqaza.d.ts +337 -0
  13. package/dist/api-token-JOif2CtG.d.ts +1792 -0
  14. package/dist/app-key-CsBfRC_Q.d.ts +214 -0
  15. package/dist/auth/index.d.ts +418 -0
  16. package/dist/auth/index.js +6742 -0
  17. package/dist/authorization/index.d.ts +129 -0
  18. package/dist/authorization/index.js +621 -0
  19. package/dist/broadcasting/index.d.ts +233 -0
  20. package/dist/broadcasting/index.js +907 -0
  21. package/dist/cache/index.d.ts +233 -0
  22. package/dist/cache/index.js +817 -0
  23. package/dist/encryption/index.d.ts +222 -0
  24. package/dist/encryption/index.js +602 -0
  25. package/dist/events/index.d.ts +155 -0
  26. package/dist/events/index.js +330 -0
  27. package/dist/health/index.d.ts +185 -0
  28. package/dist/health/index.js +379 -0
  29. package/dist/i18n/index.d.ts +101 -0
  30. package/dist/i18n/index.js +597 -0
  31. package/dist/index-9_Jzj5jo.d.ts +7 -0
  32. package/dist/index.d.ts +2628 -619
  33. package/dist/index.js +22229 -3116
  34. package/dist/lambda/index.d.ts +156 -0
  35. package/dist/lambda/index.js +91 -0
  36. package/dist/logging/index.d.ts +50 -0
  37. package/dist/logging/index.js +557 -0
  38. package/dist/mail/index.d.ts +288 -0
  39. package/dist/mail/index.js +695 -0
  40. package/dist/mcp/index.d.ts +139 -0
  41. package/dist/mcp/index.js +382 -0
  42. package/dist/notifications/index.d.ts +271 -0
  43. package/dist/notifications/index.js +741 -0
  44. package/dist/queue/index.d.ts +423 -0
  45. package/dist/queue/index.js +958 -0
  46. package/dist/runtime/index.d.ts +93 -0
  47. package/dist/runtime/index.js +834 -0
  48. package/dist/scheduling/index.d.ts +41 -0
  49. package/dist/scheduling/index.js +836 -0
  50. package/dist/storage/index.d.ts +196 -0
  51. package/dist/storage/index.js +832 -0
  52. package/dist/vite/index.js +203 -3
  53. package/package.json +93 -6
  54. package/dist/chunk-FK2XQSBF.js +0 -160
@@ -0,0 +1,196 @@
1
+ import { b as StorageDriver, L as LocalDriverOptions, P as PutOptions, F as FileMetadata, e as S3DriverOptions, M as MemoryDriverOptions } from '../StorageManager-oZTHqaza.js';
2
+ export { D as DiskConfig, f as DriverConfig, a as StorageConfig, c as StorageDriverFactory, S as StorageManager, d as createStorageManager } from '../StorageManager-oZTHqaza.js';
3
+
4
+ /**
5
+ * Local filesystem storage driver.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const driver = new LocalDriver({
10
+ * root: './storage/app',
11
+ * url: '/storage',
12
+ * })
13
+ *
14
+ * await driver.put('avatars/user-1.jpg', imageBuffer)
15
+ * const url = driver.url('avatars/user-1.jpg')
16
+ * ```
17
+ */
18
+ declare class LocalDriver implements StorageDriver {
19
+ private readonly root;
20
+ private readonly baseUrl;
21
+ private readonly defaultVisibility;
22
+ constructor(options: LocalDriverOptions);
23
+ /**
24
+ * Get the full path for a file.
25
+ */
26
+ private fullPath;
27
+ /**
28
+ * Ensure the directory exists.
29
+ */
30
+ private ensureDirectory;
31
+ put(path: string, content: Buffer | string, options?: PutOptions): Promise<string>;
32
+ putFile(path: string, localPath: string, options?: PutOptions): Promise<string>;
33
+ get(path: string): Promise<Buffer | null>;
34
+ getAsString(path: string): Promise<string | null>;
35
+ exists(path: string): Promise<boolean>;
36
+ delete(path: string): Promise<boolean>;
37
+ deleteMany(paths: string[]): Promise<number>;
38
+ copy(from: string, to: string): Promise<string>;
39
+ move(from: string, to: string): Promise<string>;
40
+ url(path: string): string;
41
+ temporaryUrl(path: string, expiration: Date): Promise<string>;
42
+ size(path: string): Promise<number>;
43
+ lastModified(path: string): Promise<Date>;
44
+ metadata(path: string): Promise<FileMetadata | null>;
45
+ files(directory: string): Promise<string[]>;
46
+ directories(directory: string): Promise<string[]>;
47
+ allFiles(directory: string): Promise<string[]>;
48
+ makeDirectory(path: string): Promise<void>;
49
+ deleteDirectory(path: string): Promise<void>;
50
+ setVisibility(path: string, visibility: 'public' | 'private'): Promise<void>;
51
+ getVisibility(path: string): Promise<'public' | 'private'>;
52
+ /**
53
+ * Get the root directory.
54
+ */
55
+ getRoot(): string;
56
+ }
57
+
58
+ /**
59
+ * AWS S3 storage driver.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * import { S3Client } from '@aws-sdk/client-s3'
64
+ *
65
+ * const client = new S3Client({ region: 'ap-northeast-1' })
66
+ * const driver = new S3Driver({
67
+ * client,
68
+ * bucket: 'my-bucket',
69
+ * })
70
+ *
71
+ * await driver.put('avatars/user-1.jpg', imageBuffer)
72
+ * const url = driver.url('avatars/user-1.jpg')
73
+ * ```
74
+ */
75
+ declare class S3Driver implements StorageDriver {
76
+ private readonly options;
77
+ private client;
78
+ private readonly bucket;
79
+ private readonly region;
80
+ private readonly endpoint?;
81
+ private readonly accessKeyId?;
82
+ private readonly secretAccessKey?;
83
+ private readonly prefix;
84
+ private readonly baseUrl;
85
+ private readonly defaultVisibility;
86
+ constructor(options: S3DriverOptions);
87
+ /**
88
+ * Get or create the S3 client.
89
+ */
90
+ private getClient;
91
+ /**
92
+ * Get the prefixed key.
93
+ */
94
+ private prefixKey;
95
+ /**
96
+ * Get ACL from visibility.
97
+ */
98
+ private getAcl;
99
+ put(path: string, content: Buffer | string, options?: PutOptions): Promise<string>;
100
+ putFile(path: string, localPath: string, options?: PutOptions): Promise<string>;
101
+ get(path: string): Promise<Buffer | null>;
102
+ getAsString(path: string): Promise<string | null>;
103
+ exists(path: string): Promise<boolean>;
104
+ delete(path: string): Promise<boolean>;
105
+ deleteMany(paths: string[]): Promise<number>;
106
+ copy(from: string, to: string): Promise<string>;
107
+ move(from: string, to: string): Promise<string>;
108
+ url(path: string): string;
109
+ temporaryUrl(path: string, expiration: Date): Promise<string>;
110
+ size(path: string): Promise<number>;
111
+ lastModified(path: string): Promise<Date>;
112
+ metadata(path: string): Promise<FileMetadata | null>;
113
+ files(directory: string): Promise<string[]>;
114
+ directories(directory: string): Promise<string[]>;
115
+ allFiles(directory: string): Promise<string[]>;
116
+ makeDirectory(path: string): Promise<void>;
117
+ deleteDirectory(path: string): Promise<void>;
118
+ setVisibility(path: string, visibility: 'public' | 'private'): Promise<void>;
119
+ getVisibility(path: string): Promise<'public' | 'private'>;
120
+ /**
121
+ * Get the bucket name.
122
+ */
123
+ getBucket(): string;
124
+ /**
125
+ * Get the prefix.
126
+ */
127
+ getPrefix(): string;
128
+ }
129
+
130
+ /**
131
+ * In-memory storage driver for testing.
132
+ *
133
+ * @example
134
+ * ```ts
135
+ * const driver = new MemoryDriver()
136
+ *
137
+ * await driver.put('avatars/user-1.jpg', imageBuffer)
138
+ * const content = await driver.get('avatars/user-1.jpg')
139
+ * ```
140
+ */
141
+ declare class MemoryDriver implements StorageDriver {
142
+ private readonly storage;
143
+ private readonly baseUrl;
144
+ constructor(options?: MemoryDriverOptions);
145
+ /**
146
+ * Normalize path (remove leading/trailing slashes).
147
+ */
148
+ private normalizePath;
149
+ /**
150
+ * Get directory from path.
151
+ */
152
+ private getDirectory;
153
+ /**
154
+ * Check if a path is in a directory.
155
+ */
156
+ private isInDirectory;
157
+ /**
158
+ * Check if a path is under a directory (recursive).
159
+ */
160
+ private isUnderDirectory;
161
+ put(path: string, content: Buffer | string, options?: PutOptions): Promise<string>;
162
+ putFile(path: string, localPath: string, options?: PutOptions): Promise<string>;
163
+ get(path: string): Promise<Buffer | null>;
164
+ getAsString(path: string): Promise<string | null>;
165
+ exists(path: string): Promise<boolean>;
166
+ delete(path: string): Promise<boolean>;
167
+ deleteMany(paths: string[]): Promise<number>;
168
+ copy(from: string, to: string): Promise<string>;
169
+ move(from: string, to: string): Promise<string>;
170
+ url(path: string): string;
171
+ temporaryUrl(path: string, expiration: Date): Promise<string>;
172
+ size(path: string): Promise<number>;
173
+ lastModified(path: string): Promise<Date>;
174
+ metadata(path: string): Promise<FileMetadata | null>;
175
+ files(directory: string): Promise<string[]>;
176
+ directories(directory: string): Promise<string[]>;
177
+ allFiles(directory: string): Promise<string[]>;
178
+ makeDirectory(path: string): Promise<void>;
179
+ deleteDirectory(path: string): Promise<void>;
180
+ setVisibility(path: string, visibility: 'public' | 'private'): Promise<void>;
181
+ getVisibility(path: string): Promise<'public' | 'private'>;
182
+ /**
183
+ * Clear all files (for testing).
184
+ */
185
+ clear(): void;
186
+ /**
187
+ * Get the number of stored files.
188
+ */
189
+ count(): number;
190
+ /**
191
+ * Get all stored file paths.
192
+ */
193
+ getAllPaths(): string[];
194
+ }
195
+
196
+ export { FileMetadata, LocalDriver, LocalDriverOptions, MemoryDriver, MemoryDriverOptions, PutOptions, S3Driver, S3DriverOptions, StorageDriver };