alepha 0.9.2 → 0.9.4

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.
package/topic.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import * as _alepha_core0$1 from "alepha";
2
1
  import * as _alepha_core1 from "alepha";
3
- import * as _alepha_core0 from "alepha";
4
2
  import { Alepha, Descriptor, KIND, Service, Static, TSchema } from "alepha";
5
3
  import { DateTimeProvider, DurationLike } from "alepha/datetime";
4
+ import * as _alepha_logger0 from "alepha/logger";
6
5
 
7
6
  //#region src/providers/TopicProvider.d.ts
8
7
  /**
@@ -37,7 +36,6 @@ declare abstract class TopicProvider {
37
36
  }
38
37
  type SubscribeCallback = (message: string) => Promise<void> | void;
39
38
  type UnSubscribeFn = () => Promise<void>;
40
- //# sourceMappingURL=TopicProvider.d.ts.map
41
39
  //#endregion
42
40
  //#region src/descriptors/$topic.d.ts
43
41
  /**
@@ -76,7 +74,7 @@ interface TopicDescriptorOptions<T extends TopicMessageSchema> {
76
74
  handler?: TopicHandler<T>;
77
75
  }
78
76
  declare class TopicDescriptor<T extends TopicMessageSchema> extends Descriptor<TopicDescriptorOptions<T>> {
79
- protected readonly log: _alepha_core0$1.Logger;
77
+ protected readonly log: _alepha_logger0.Logger;
80
78
  protected readonly dateTimeProvider: DateTimeProvider;
81
79
  readonly provider: TopicProvider;
82
80
  get name(): string;
@@ -100,7 +98,6 @@ interface TopicMessageSchema {
100
98
  payload: TSchema;
101
99
  }
102
100
  type TopicHandler<T extends TopicMessageSchema = TopicMessageSchema> = (message: TopicMessage<T>) => unknown;
103
- //# sourceMappingURL=$topic.d.ts.map
104
101
  //#endregion
105
102
  //#region src/descriptors/$subscriber.d.ts
106
103
  /**
@@ -115,7 +112,6 @@ interface SubscriberDescriptorOptions<T extends TopicMessageSchema> {
115
112
  handler: TopicHandler<T>;
116
113
  }
117
114
  declare class SubscriberDescriptor<T extends TopicMessageSchema> extends Descriptor<SubscriberDescriptorOptions<T>> {}
118
- //# sourceMappingURL=$subscriber.d.ts.map
119
115
  //#endregion
120
116
  //#region src/errors/TopicTimeoutError.d.ts
121
117
  declare class TopicTimeoutError extends Error {
@@ -123,11 +119,10 @@ declare class TopicTimeoutError extends Error {
123
119
  readonly timeout: number;
124
120
  constructor(topic: string, timeout: number);
125
121
  }
126
- //# sourceMappingURL=TopicTimeoutError.d.ts.map
127
122
  //#endregion
128
123
  //#region src/providers/MemoryTopicProvider.d.ts
129
124
  declare class MemoryTopicProvider extends TopicProvider {
130
- protected readonly log: _alepha_core1.Logger;
125
+ protected readonly log: _alepha_logger0.Logger;
131
126
  protected readonly subscriptions: Record<string, SubscribeCallback[]>;
132
127
  protected readonly start: _alepha_core1.HookDescriptor<"start">;
133
128
  /**
@@ -151,7 +146,6 @@ declare class MemoryTopicProvider extends TopicProvider {
151
146
  */
152
147
  unsubscribe(topic: string): Promise<void>;
153
148
  }
154
- //# sourceMappingURL=MemoryTopicProvider.d.ts.map
155
149
  //#endregion
156
150
  //#region src/index.d.ts
157
151
  /**
@@ -163,9 +157,7 @@ declare class MemoryTopicProvider extends TopicProvider {
163
157
  * @see {@link $subscriber}
164
158
  * @module alepha.topic
165
159
  */
166
- declare const AlephaTopic: _alepha_core0.ModuleDescriptor;
167
- //# sourceMappingURL=index.d.ts.map
168
-
160
+ declare const AlephaTopic: _alepha_core1.Service<_alepha_core1.Module>;
169
161
  //#endregion
170
162
  export { $subscriber, $topic, AlephaTopic, MemoryTopicProvider, SubscribeCallback, SubscriberDescriptor, SubscriberDescriptorOptions, TopicDescriptor, TopicDescriptorOptions, TopicHandler, TopicMessage, TopicMessageSchema, TopicProvider, TopicTimeoutError, TopicWaitOptions, UnSubscribeFn };
171
163
  //# sourceMappingURL=index.d.ts.map
package/vite.d.ts CHANGED
@@ -34,7 +34,6 @@ interface ViteCompressOptions {
34
34
  }
35
35
  declare function viteCompress(options?: ViteCompressOptions): Plugin;
36
36
  declare function compressFile(options: ViteCompressOptions | undefined, filePath: string): Promise<void>;
37
- //# sourceMappingURL=viteCompress.d.ts.map
38
37
  //#endregion
39
38
  //#region src/helpers/buildClient.d.ts
40
39
  interface BuildClientOptions {
@@ -51,6 +50,57 @@ interface BuildClientOptions {
51
50
  config?: UserConfig;
52
51
  }
53
52
  //#endregion
53
+ //#region src/viteAlephaBuildDocker.d.ts
54
+ interface ViteAlephaBuildDockerOptions {
55
+ /**
56
+ * The directory where the build output will be placed.
57
+ *
58
+ * @default "dist"
59
+ */
60
+ distDir?: string;
61
+ /**
62
+ * Image name to use in the Dockerfile.
63
+ * If not provided, it will default to `node:24-alpine`.
64
+ */
65
+ image?: string;
66
+ /**
67
+ * Command to run in the Docker container.
68
+ * If not provided, it will default to `node`.
69
+ */
70
+ command?: string;
71
+ }
72
+ //#endregion
73
+ //#region src/viteAlephaBuildVercel.d.ts
74
+ interface ViteAlephaBuildVercelOptions {
75
+ /**
76
+ * The directory where the build output will be placed.
77
+ *
78
+ * @default "dist"
79
+ */
80
+ distDir?: string;
81
+ /**
82
+ * The name of the client directory.
83
+ *
84
+ * @default "public"
85
+ */
86
+ clientDir?: string;
87
+ config?: VercelConfig;
88
+ }
89
+ interface VercelConfig {
90
+ projectName?: string;
91
+ orgId?: string;
92
+ projectId?: string;
93
+ crons?: Array<{
94
+ path: string;
95
+ schedule: string;
96
+ }>;
97
+ }
98
+ declare function viteAlephaBuildVercel(opts?: ViteAlephaBuildVercelOptions): Promise<{
99
+ name: string;
100
+ apply: string;
101
+ writeBundle(): void;
102
+ }>;
103
+ //#endregion
54
104
  //#region src/viteAlephaBuild.d.ts
55
105
  interface ViteAlephaBuildOptions {
56
106
  /**
@@ -70,10 +120,14 @@ interface ViteAlephaBuildOptions {
70
120
  *
71
121
  * @default false
72
122
  */
73
- vercel?: boolean;
123
+ vercel?: boolean | VercelConfig;
124
+ /**
125
+ * If true, the build will be optimized for Docker deployment.
126
+ * Additionally, it will generate a Dockerfile in the dist directory.
127
+ */
128
+ docker?: boolean | ViteAlephaBuildDockerOptions;
74
129
  }
75
130
  declare function viteAlephaBuild(options?: ViteAlephaBuildOptions): Promise<Plugin>;
76
- //# sourceMappingURL=viteAlephaBuild.d.ts.map
77
131
  //#endregion
78
132
  //#region src/viteAlephaDev.d.ts
79
133
  interface ViteAlephaDevOptions {
@@ -88,46 +142,21 @@ interface ViteAlephaDevOptions {
88
142
  * @default false
89
143
  */
90
144
  debug?: boolean;
145
+ onReload?: () => void;
91
146
  }
92
147
  /**
93
148
  * Plug Alepha into Vite development server.
94
149
  */
95
150
  declare function viteAlephaDev(options?: ViteAlephaDevOptions): Promise<Plugin>;
96
- //# sourceMappingURL=viteAlephaDev.d.ts.map
97
151
  //#endregion
98
152
  //#region src/viteAlepha.d.ts
99
153
  type ViteAlephaOptions = ViteAlephaDevOptions & ViteAlephaBuildOptions;
100
154
  declare function viteAlepha(options?: ViteAlephaOptions): (Plugin | Promise<Plugin>)[];
101
- //# sourceMappingURL=viteAlepha.d.ts.map
102
- //#endregion
103
- //#region src/viteAlephaBuildVercel.d.ts
104
- interface ViteAlephaBuildVercelOptions {
105
- /**
106
- * The directory where the build output will be placed.
107
- *
108
- * @default "dist"
109
- */
110
- distDir?: string;
111
- /**
112
- * The name of the client directory.
113
- *
114
- * @default "public"
115
- */
116
- clientDir?: string;
117
- }
118
- declare function viteAlephaBuildVercel(opts?: ViteAlephaBuildVercelOptions): Promise<{
119
- name: string;
120
- apply: string;
121
- writeBundle(): void;
122
- }>;
123
- //# sourceMappingURL=viteAlephaBuildVercel.d.ts.map
124
155
  //#endregion
125
156
  //#region src/index.d.ts
126
157
  declare global {
127
158
  var __alepha: Alepha;
128
159
  }
129
- //# sourceMappingURL=index.d.ts.map
130
-
131
160
  //#endregion
132
- export { ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, compressFile, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
161
+ export { VercelConfig, ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, compressFile, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
133
162
  //# sourceMappingURL=index.d.ts.map
package/testing.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "@faker-js/faker";
package/testing.js DELETED
@@ -1 +0,0 @@
1
- export * from '@alepha/testing'