alepha 0.14.4 → 0.15.1
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/README.md +44 -102
- package/dist/api/audits/index.d.ts +331 -443
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +2 -2
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.d.ts +0 -113
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +2 -3
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.d.ts +151 -262
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/notifications/index.browser.js +4 -4
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +164 -276
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +4 -4
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.d.ts +265 -377
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/users/index.browser.js +1 -2
- package/dist/api/users/index.browser.js.map +1 -1
- package/dist/api/users/index.d.ts +195 -301
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +203 -184
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +1 -2
- package/dist/batch/index.js.map +1 -1
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cache/redis/index.js +2 -2
- package/dist/cache/redis/index.js.map +1 -1
- package/dist/cli/index.d.ts +5900 -165
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1481 -639
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +8 -4
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +29 -25
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +563 -54
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +175 -8
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +564 -54
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +563 -54
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js +4 -4
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/index.d.ts +89 -42
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +129 -33
- package/dist/email/index.js.map +1 -1
- package/dist/fake/index.d.ts +7969 -2
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/fake/index.js +22 -22
- package/dist/fake/index.js.map +1 -1
- package/dist/file/index.d.ts +134 -1
- package/dist/file/index.d.ts.map +1 -1
- package/dist/file/index.js +253 -1
- package/dist/file/index.js.map +1 -1
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/redis/index.d.ts.map +1 -1
- package/dist/logger/index.d.ts +1 -2
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +1 -5
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts +19 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +28 -4
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/chunk-DH6iiROE.js +38 -0
- package/dist/orm/index.browser.js +9 -9
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.bun.js +2821 -0
- package/dist/orm/index.bun.js.map +1 -0
- package/dist/orm/index.d.ts +318 -169
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +2086 -1776
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +4 -4
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/redis/index.d.ts.map +1 -1
- package/dist/redis/index.bun.js +285 -0
- package/dist/redis/index.bun.js.map +1 -0
- package/dist/redis/index.d.ts +13 -31
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +18 -38
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts.map +1 -1
- package/dist/router/index.d.ts.map +1 -1
- package/dist/scheduler/index.d.ts +83 -1
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +393 -1
- package/dist/scheduler/index.js.map +1 -1
- package/dist/security/index.browser.js +5 -1
- package/dist/security/index.browser.js.map +1 -1
- package/dist/security/index.d.ts +598 -112
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +1808 -97
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +1200 -175
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +1268 -37
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cache/index.d.ts +6 -3
- package/dist/server/cache/index.d.ts.map +1 -1
- package/dist/server/cache/index.js +1 -1
- package/dist/server/cache/index.js.map +1 -1
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +3 -3
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.d.ts +115 -13
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +321 -139
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +0 -1
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/health/index.d.ts +0 -1
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/helmet/index.d.ts.map +1 -1
- package/dist/server/links/index.browser.js +9 -1
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +1 -2
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +14 -7
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts +514 -1
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/metrics/index.js +4462 -4
- package/dist/server/metrics/index.js.map +1 -1
- package/dist/server/multipart/index.d.ts.map +1 -1
- package/dist/server/proxy/index.d.ts +0 -1
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/swagger/index.d.ts +1 -2
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +1 -2
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +3 -1
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js +10 -10
- package/dist/sms/index.js.map +1 -1
- package/dist/thread/index.d.ts +0 -1
- package/dist/thread/index.d.ts.map +1 -1
- package/dist/thread/index.js +2 -2
- package/dist/thread/index.js.map +1 -1
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/redis/index.d.ts.map +1 -1
- package/dist/vite/index.d.ts +6315 -149
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +140 -469
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.browser.js +9 -9
- package/dist/websocket/index.browser.js.map +1 -1
- package/dist/websocket/index.d.ts +28 -28
- package/dist/websocket/index.d.ts.map +1 -1
- package/dist/websocket/index.js +9 -9
- package/dist/websocket/index.js.map +1 -1
- package/package.json +13 -18
- package/src/api/files/controllers/AdminFileStatsController.ts +0 -1
- package/src/api/users/atoms/realmAuthSettingsAtom.ts +5 -0
- package/src/api/users/controllers/{UserRealmController.ts → RealmController.ts} +11 -11
- package/src/api/users/entities/users.ts +1 -1
- package/src/api/users/index.ts +8 -8
- package/src/api/users/primitives/{$userRealm.ts → $realm.ts} +17 -19
- package/src/api/users/providers/{UserRealmProvider.ts → RealmProvider.ts} +26 -30
- package/src/api/users/schemas/{userRealmConfigSchema.ts → realmConfigSchema.ts} +2 -2
- package/src/api/users/services/CredentialService.ts +7 -7
- package/src/api/users/services/IdentityService.ts +4 -4
- package/src/api/users/services/RegistrationService.spec.ts +25 -27
- package/src/api/users/services/RegistrationService.ts +38 -27
- package/src/api/users/services/SessionCrudService.ts +3 -3
- package/src/api/users/services/SessionService.spec.ts +3 -3
- package/src/api/users/services/SessionService.ts +27 -18
- package/src/api/users/services/UserService.ts +7 -7
- package/src/batch/providers/BatchProvider.ts +1 -2
- package/src/cli/apps/AlephaCli.ts +2 -2
- package/src/cli/apps/AlephaPackageBuilderCli.ts +47 -20
- package/src/cli/assets/apiHelloControllerTs.ts +19 -0
- package/src/cli/assets/apiIndexTs.ts +16 -0
- package/src/cli/assets/biomeJson.ts +2 -1
- package/src/cli/assets/claudeMd.ts +308 -0
- package/src/cli/assets/dummySpecTs.ts +2 -1
- package/src/cli/assets/editorconfig.ts +2 -1
- package/src/cli/assets/mainBrowserTs.ts +4 -3
- package/src/cli/assets/mainCss.ts +24 -0
- package/src/cli/assets/mainServerTs.ts +24 -0
- package/src/cli/assets/tsconfigJson.ts +2 -1
- package/src/cli/assets/webAppRouterTs.ts +16 -0
- package/src/cli/assets/webHelloComponentTsx.ts +20 -0
- package/src/cli/assets/webIndexTs.ts +16 -0
- package/src/cli/atoms/appEntryOptions.ts +13 -0
- package/src/cli/atoms/buildOptions.ts +1 -1
- package/src/cli/atoms/changelogOptions.ts +1 -1
- package/src/cli/commands/build.ts +97 -61
- package/src/cli/commands/db.ts +21 -18
- package/src/cli/commands/deploy.ts +17 -5
- package/src/cli/commands/dev.ts +26 -47
- package/src/cli/commands/gen/env.ts +1 -1
- package/src/cli/commands/init.ts +79 -25
- package/src/cli/commands/lint.ts +9 -3
- package/src/cli/commands/test.ts +8 -2
- package/src/cli/commands/typecheck.ts +5 -1
- package/src/cli/commands/verify.ts +4 -2
- package/src/cli/defineConfig.ts +9 -0
- package/src/cli/index.ts +2 -1
- package/src/cli/providers/AppEntryProvider.ts +131 -0
- package/src/cli/providers/ViteBuildProvider.ts +82 -0
- package/src/cli/providers/ViteDevServerProvider.ts +350 -0
- package/src/cli/providers/ViteTemplateProvider.ts +27 -0
- package/src/cli/services/AlephaCliUtils.ts +72 -602
- package/src/cli/services/PackageManagerUtils.ts +308 -0
- package/src/cli/services/ProjectScaffolder.ts +329 -0
- package/src/command/helpers/Runner.ts +15 -3
- package/src/core/Alepha.ts +2 -8
- package/src/core/__tests__/Alepha-graph.spec.ts +4 -0
- package/src/core/index.shared.ts +1 -0
- package/src/core/index.ts +2 -0
- package/src/core/primitives/$hook.ts +6 -2
- package/src/core/primitives/$module.spec.ts +4 -0
- package/src/core/primitives/$module.ts +12 -0
- package/src/core/providers/AlsProvider.ts +1 -1
- package/src/core/providers/CodecManager.spec.ts +12 -6
- package/src/core/providers/CodecManager.ts +26 -6
- package/src/core/providers/EventManager.ts +169 -13
- package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +878 -0
- package/src/core/providers/KeylessJsonSchemaCodec.ts +789 -0
- package/src/core/providers/SchemaValidator.spec.ts +236 -0
- package/src/core/providers/StateManager.spec.ts +27 -16
- package/src/email/providers/LocalEmailProvider.spec.ts +111 -87
- package/src/email/providers/LocalEmailProvider.ts +52 -15
- package/src/email/providers/NodemailerEmailProvider.ts +167 -56
- package/src/file/errors/FileError.ts +7 -0
- package/src/file/index.ts +9 -1
- package/src/file/providers/MemoryFileSystemProvider.ts +393 -0
- package/src/logger/providers/PrettyFormatterProvider.ts +0 -9
- package/src/mcp/errors/McpError.ts +30 -0
- package/src/mcp/index.ts +3 -0
- package/src/mcp/transports/SseMcpTransport.ts +16 -6
- package/src/orm/index.browser.ts +1 -19
- package/src/orm/index.bun.ts +77 -0
- package/src/orm/index.shared-server.ts +22 -0
- package/src/orm/index.shared.ts +15 -0
- package/src/orm/index.ts +19 -39
- package/src/orm/providers/DrizzleKitProvider.ts +3 -5
- package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -5
- package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +4 -0
- package/src/orm/providers/drivers/DatabaseProvider.ts +4 -0
- package/src/orm/providers/drivers/PglitePostgresProvider.ts +4 -0
- package/src/orm/services/Repository.ts +19 -0
- package/src/redis/index.bun.ts +35 -0
- package/src/redis/providers/BunRedisProvider.ts +12 -43
- package/src/redis/providers/BunRedisSubscriberProvider.ts +2 -3
- package/src/redis/providers/NodeRedisProvider.ts +16 -34
- package/src/{server/security → security}/__tests__/BasicAuth.spec.ts +11 -11
- package/src/{server/security → security}/__tests__/ServerSecurityProvider-realm.spec.ts +21 -16
- package/src/{server/security/providers → security/__tests__}/ServerSecurityProvider.spec.ts +5 -5
- package/src/security/index.browser.ts +5 -0
- package/src/security/index.ts +90 -7
- package/src/security/primitives/{$realm.spec.ts → $issuer.spec.ts} +11 -11
- package/src/security/primitives/{$realm.ts → $issuer.ts} +20 -17
- package/src/security/primitives/$role.ts +5 -5
- package/src/security/primitives/$serviceAccount.spec.ts +5 -5
- package/src/security/primitives/$serviceAccount.ts +3 -3
- package/src/{server/security → security}/providers/ServerSecurityProvider.ts +5 -7
- package/src/server/auth/primitives/$auth.ts +10 -10
- package/src/server/auth/primitives/$authCredentials.ts +3 -3
- package/src/server/auth/primitives/$authGithub.ts +3 -3
- package/src/server/auth/primitives/$authGoogle.ts +3 -3
- package/src/server/auth/providers/ServerAuthProvider.ts +13 -13
- package/src/server/cache/providers/ServerCacheProvider.ts +1 -1
- package/src/server/cookies/providers/ServerCookiesProvider.ts +3 -3
- package/src/server/core/index.ts +1 -1
- package/src/server/core/providers/BunHttpServerProvider.ts +1 -1
- package/src/server/core/providers/NodeHttpServerProvider.spec.ts +125 -0
- package/src/server/core/providers/NodeHttpServerProvider.ts +92 -24
- package/src/server/core/providers/ServerBodyParserProvider.ts +19 -23
- package/src/server/core/providers/ServerLoggerProvider.ts +23 -19
- package/src/server/core/providers/ServerProvider.ts +144 -24
- package/src/server/core/providers/ServerRouterProvider.ts +259 -115
- package/src/server/core/providers/ServerTimingProvider.ts +2 -2
- package/src/server/links/atoms/apiLinksAtom.ts +7 -0
- package/src/server/links/index.browser.ts +2 -0
- package/src/server/links/index.ts +3 -1
- package/src/server/links/providers/LinkProvider.ts +1 -1
- package/src/server/swagger/index.ts +1 -1
- package/src/sms/providers/LocalSmsProvider.spec.ts +153 -111
- package/src/sms/providers/LocalSmsProvider.ts +8 -7
- package/src/vite/index.ts +3 -2
- package/src/vite/tasks/buildClient.ts +0 -1
- package/src/vite/tasks/buildServer.ts +80 -22
- package/src/vite/tasks/copyAssets.ts +5 -4
- package/src/vite/tasks/generateCloudflare.ts +7 -0
- package/src/vite/tasks/generateSitemap.ts +64 -23
- package/src/vite/tasks/index.ts +0 -2
- package/src/vite/tasks/prerenderPages.ts +49 -24
- package/dist/server/security/index.browser.js +0 -13
- package/dist/server/security/index.browser.js.map +0 -1
- package/dist/server/security/index.d.ts +0 -173
- package/dist/server/security/index.d.ts.map +0 -1
- package/dist/server/security/index.js +0 -311
- package/dist/server/security/index.js.map +0 -1
- package/src/cli/assets/appRouterTs.ts +0 -9
- package/src/cli/assets/indexHtml.ts +0 -15
- package/src/cli/assets/mainTs.ts +0 -13
- package/src/cli/commands/format.ts +0 -17
- package/src/server/security/index.browser.ts +0 -10
- package/src/server/security/index.ts +0 -94
- package/src/vite/helpers/boot.ts +0 -106
- package/src/vite/plugins/viteAlephaDev.ts +0 -177
- package/src/vite/tasks/devServer.ts +0 -69
- package/src/vite/tasks/runAlepha.ts +0 -270
- /package/src/{server/security → security}/primitives/$basicAuth.ts +0 -0
- /package/src/{server/security → security}/providers/ServerBasicAuthProvider.ts +0 -0
package/dist/api/jobs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha103 from "alepha";
|
|
2
2
|
import { Alepha, Async, KIND, Primitive, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
|
|
3
3
|
import * as alepha_server0 from "alepha/server";
|
|
4
4
|
import * as alepha_orm33 from "alepha/orm";
|
|
@@ -11,8 +11,6 @@ import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
|
|
|
11
11
|
import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
|
|
12
12
|
import "alepha/retry";
|
|
13
13
|
import "drizzle-orm/sqlite-core";
|
|
14
|
-
import "drizzle-orm/postgres-js";
|
|
15
|
-
import "postgres";
|
|
16
14
|
|
|
17
15
|
//#region ../../src/orm/schemas/insertSchema.d.ts
|
|
18
16
|
/**
|
|
@@ -230,186 +228,77 @@ interface PgRefOptions {
|
|
|
230
228
|
*/
|
|
231
229
|
type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
|
|
232
230
|
//#endregion
|
|
233
|
-
//#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
|
|
234
|
-
declare module "alepha" {
|
|
235
|
-
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
236
|
-
}
|
|
237
|
-
declare const envSchema$1: alepha226.TObject<{
|
|
238
|
-
/**
|
|
239
|
-
* Main configuration for database connection.
|
|
240
|
-
* Accept a string in the format of a Postgres connection URL.
|
|
241
|
-
* Example: postgres://user:password@localhost:5432/database
|
|
242
|
-
* or
|
|
243
|
-
* Example: postgres://user:password@localhost:5432/database?sslmode=require
|
|
244
|
-
*/
|
|
245
|
-
DATABASE_URL: alepha226.TOptional<alepha226.TString>;
|
|
246
|
-
/**
|
|
247
|
-
* In addition to the DATABASE_URL, you can specify the postgres schema name.
|
|
248
|
-
*
|
|
249
|
-
* It will monkey patch drizzle tables.
|
|
250
|
-
*/
|
|
251
|
-
POSTGRES_SCHEMA: alepha226.TOptional<alepha226.TString>;
|
|
252
|
-
}>;
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
|
|
255
|
-
/**
|
|
256
|
-
* Configuration options for the Node.js SQLite database provider.
|
|
257
|
-
*/
|
|
258
|
-
declare const nodeSqliteOptions: alepha226.Atom<alepha226.TObject<{
|
|
259
|
-
path: alepha226.TOptional<alepha226.TString>;
|
|
260
|
-
}>, "alepha.postgres.node-sqlite.options">;
|
|
261
|
-
type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
|
|
262
|
-
declare module "alepha" {
|
|
263
|
-
interface State {
|
|
264
|
-
[nodeSqliteOptions.key]: NodeSqliteProviderOptions;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Add a fake support for SQLite in Node.js based on Postgres interfaces.
|
|
269
|
-
*
|
|
270
|
-
* This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
|
|
271
|
-
* This is NOT recommended for production use.
|
|
272
|
-
*/
|
|
273
|
-
//#endregion
|
|
274
|
-
//#region ../../src/orm/index.d.ts
|
|
275
|
-
declare module "alepha" {
|
|
276
|
-
interface Hooks {
|
|
277
|
-
/**
|
|
278
|
-
* Fires before creating an entity in the repository.
|
|
279
|
-
*/
|
|
280
|
-
"repository:create:before": {
|
|
281
|
-
tableName: string;
|
|
282
|
-
data: any;
|
|
283
|
-
};
|
|
284
|
-
/**
|
|
285
|
-
* Fires after creating an entity in the repository.
|
|
286
|
-
*/
|
|
287
|
-
"repository:create:after": {
|
|
288
|
-
tableName: string;
|
|
289
|
-
data: any;
|
|
290
|
-
entity: any;
|
|
291
|
-
};
|
|
292
|
-
/**
|
|
293
|
-
* Fires before updating entities in the repository.
|
|
294
|
-
*/
|
|
295
|
-
"repository:update:before": {
|
|
296
|
-
tableName: string;
|
|
297
|
-
where: any;
|
|
298
|
-
data: any;
|
|
299
|
-
};
|
|
300
|
-
/**
|
|
301
|
-
* Fires after updating entities in the repository.
|
|
302
|
-
*/
|
|
303
|
-
"repository:update:after": {
|
|
304
|
-
tableName: string;
|
|
305
|
-
where: any;
|
|
306
|
-
data: any;
|
|
307
|
-
entities: any[];
|
|
308
|
-
};
|
|
309
|
-
/**
|
|
310
|
-
* Fires before deleting entities from the repository.
|
|
311
|
-
*/
|
|
312
|
-
"repository:delete:before": {
|
|
313
|
-
tableName: string;
|
|
314
|
-
where: any;
|
|
315
|
-
};
|
|
316
|
-
/**
|
|
317
|
-
* Fires after deleting entities from the repository.
|
|
318
|
-
*/
|
|
319
|
-
"repository:delete:after": {
|
|
320
|
-
tableName: string;
|
|
321
|
-
where: any;
|
|
322
|
-
ids: Array<string | number>;
|
|
323
|
-
};
|
|
324
|
-
/**
|
|
325
|
-
* Fires before reading entities from the repository.
|
|
326
|
-
*/
|
|
327
|
-
"repository:read:before": {
|
|
328
|
-
tableName: string;
|
|
329
|
-
query: any;
|
|
330
|
-
};
|
|
331
|
-
/**
|
|
332
|
-
* Fires after reading entities from the repository.
|
|
333
|
-
*/
|
|
334
|
-
"repository:read:after": {
|
|
335
|
-
tableName: string;
|
|
336
|
-
query: any;
|
|
337
|
-
entities: any[];
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
//#endregion
|
|
342
231
|
//#region ../../src/api/jobs/schemas/jobExecutionQuerySchema.d.ts
|
|
343
|
-
declare const jobExecutionQuerySchema:
|
|
344
|
-
page:
|
|
345
|
-
size:
|
|
346
|
-
sort:
|
|
347
|
-
status:
|
|
348
|
-
job:
|
|
232
|
+
declare const jobExecutionQuerySchema: alepha103.TObject<{
|
|
233
|
+
page: alepha103.TOptional<alepha103.TInteger>;
|
|
234
|
+
size: alepha103.TOptional<alepha103.TInteger>;
|
|
235
|
+
sort: alepha103.TOptional<alepha103.TString>;
|
|
236
|
+
status: alepha103.TOptional<alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
|
|
237
|
+
job: alepha103.TOptional<alepha103.TString>;
|
|
349
238
|
}>;
|
|
350
239
|
type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
|
|
351
240
|
//#endregion
|
|
352
241
|
//#region ../../src/api/jobs/services/JobService.d.ts
|
|
353
242
|
declare class JobService {
|
|
354
243
|
protected readonly alepha: Alepha;
|
|
355
|
-
protected readonly executionRepository: alepha_orm33.Repository<
|
|
356
|
-
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
357
|
-
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
358
|
-
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
359
|
-
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
360
|
-
finishedAt:
|
|
361
|
-
job:
|
|
362
|
-
status:
|
|
363
|
-
error:
|
|
364
|
-
logs:
|
|
365
|
-
level:
|
|
366
|
-
message:
|
|
367
|
-
service:
|
|
368
|
-
module:
|
|
369
|
-
context:
|
|
370
|
-
app:
|
|
371
|
-
data:
|
|
372
|
-
timestamp:
|
|
244
|
+
protected readonly executionRepository: alepha_orm33.Repository<alepha103.TObject<{
|
|
245
|
+
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
|
|
246
|
+
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
|
|
247
|
+
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
248
|
+
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
249
|
+
finishedAt: alepha103.TOptional<alepha103.TString>;
|
|
250
|
+
job: alepha103.TString;
|
|
251
|
+
status: alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
252
|
+
error: alepha103.TOptional<alepha103.TString>;
|
|
253
|
+
logs: alepha103.TOptional<alepha103.TArray<alepha103.TObject<{
|
|
254
|
+
level: alepha103.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
255
|
+
message: alepha103.TString;
|
|
256
|
+
service: alepha103.TString;
|
|
257
|
+
module: alepha103.TString;
|
|
258
|
+
context: alepha103.TOptional<alepha103.TString>;
|
|
259
|
+
app: alepha103.TOptional<alepha103.TString>;
|
|
260
|
+
data: alepha103.TOptional<alepha103.TAny>;
|
|
261
|
+
timestamp: alepha103.TNumber;
|
|
373
262
|
}>>>;
|
|
374
263
|
}>>;
|
|
375
264
|
getJobs(): Promise<string[]>;
|
|
376
|
-
getJobExecutions(query?: JobExecutionQuery): Promise<
|
|
377
|
-
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
378
|
-
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
379
|
-
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
380
|
-
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
381
|
-
finishedAt:
|
|
382
|
-
job:
|
|
383
|
-
status:
|
|
384
|
-
error:
|
|
385
|
-
logs:
|
|
386
|
-
level:
|
|
387
|
-
message:
|
|
388
|
-
service:
|
|
389
|
-
module:
|
|
390
|
-
context:
|
|
391
|
-
app:
|
|
392
|
-
data:
|
|
393
|
-
timestamp:
|
|
265
|
+
getJobExecutions(query?: JobExecutionQuery): Promise<alepha103.Page<alepha_orm33.PgStatic<alepha103.TObject<{
|
|
266
|
+
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
|
|
267
|
+
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
|
|
268
|
+
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
269
|
+
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
270
|
+
finishedAt: alepha103.TOptional<alepha103.TString>;
|
|
271
|
+
job: alepha103.TString;
|
|
272
|
+
status: alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
273
|
+
error: alepha103.TOptional<alepha103.TString>;
|
|
274
|
+
logs: alepha103.TOptional<alepha103.TArray<alepha103.TObject<{
|
|
275
|
+
level: alepha103.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
276
|
+
message: alepha103.TString;
|
|
277
|
+
service: alepha103.TString;
|
|
278
|
+
module: alepha103.TString;
|
|
279
|
+
context: alepha103.TOptional<alepha103.TString>;
|
|
280
|
+
app: alepha103.TOptional<alepha103.TString>;
|
|
281
|
+
data: alepha103.TOptional<alepha103.TAny>;
|
|
282
|
+
timestamp: alepha103.TNumber;
|
|
394
283
|
}>>>;
|
|
395
|
-
}>, alepha_orm33.PgRelationMap<
|
|
396
|
-
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
397
|
-
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
398
|
-
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
399
|
-
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
400
|
-
finishedAt:
|
|
401
|
-
job:
|
|
402
|
-
status:
|
|
403
|
-
error:
|
|
404
|
-
logs:
|
|
405
|
-
level:
|
|
406
|
-
message:
|
|
407
|
-
service:
|
|
408
|
-
module:
|
|
409
|
-
context:
|
|
410
|
-
app:
|
|
411
|
-
data:
|
|
412
|
-
timestamp:
|
|
284
|
+
}>, alepha_orm33.PgRelationMap<alepha103.TObject<{
|
|
285
|
+
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
|
|
286
|
+
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
|
|
287
|
+
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
288
|
+
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
289
|
+
finishedAt: alepha103.TOptional<alepha103.TString>;
|
|
290
|
+
job: alepha103.TString;
|
|
291
|
+
status: alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
292
|
+
error: alepha103.TOptional<alepha103.TString>;
|
|
293
|
+
logs: alepha103.TOptional<alepha103.TArray<alepha103.TObject<{
|
|
294
|
+
level: alepha103.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
295
|
+
message: alepha103.TString;
|
|
296
|
+
service: alepha103.TString;
|
|
297
|
+
module: alepha103.TString;
|
|
298
|
+
context: alepha103.TOptional<alepha103.TString>;
|
|
299
|
+
app: alepha103.TOptional<alepha103.TString>;
|
|
300
|
+
data: alepha103.TOptional<alepha103.TAny>;
|
|
301
|
+
timestamp: alepha103.TNumber;
|
|
413
302
|
}>>>;
|
|
414
303
|
}>>>>>;
|
|
415
304
|
triggerJob(name: string): Promise<{
|
|
@@ -423,75 +312,75 @@ declare class AdminJobController {
|
|
|
423
312
|
protected readonly group: string;
|
|
424
313
|
protected readonly jobService: JobService;
|
|
425
314
|
readonly getJobs: alepha_server0.ActionPrimitiveFn<{
|
|
426
|
-
response:
|
|
315
|
+
response: alepha103.TArray<alepha103.TString>;
|
|
427
316
|
}>;
|
|
428
317
|
readonly getJobExecutions: alepha_server0.ActionPrimitiveFn<{
|
|
429
|
-
query:
|
|
430
|
-
page:
|
|
431
|
-
size:
|
|
432
|
-
sort:
|
|
433
|
-
status:
|
|
434
|
-
job:
|
|
318
|
+
query: alepha103.TObject<{
|
|
319
|
+
page: alepha103.TOptional<alepha103.TInteger>;
|
|
320
|
+
size: alepha103.TOptional<alepha103.TInteger>;
|
|
321
|
+
sort: alepha103.TOptional<alepha103.TString>;
|
|
322
|
+
status: alepha103.TOptional<alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
|
|
323
|
+
job: alepha103.TOptional<alepha103.TString>;
|
|
435
324
|
}>;
|
|
436
|
-
response:
|
|
437
|
-
id: PgAttr<PgAttr<
|
|
438
|
-
version: PgAttr<PgAttr<
|
|
439
|
-
createdAt: PgAttr<PgAttr<
|
|
440
|
-
updatedAt: PgAttr<PgAttr<
|
|
441
|
-
finishedAt:
|
|
442
|
-
job:
|
|
443
|
-
status:
|
|
444
|
-
error:
|
|
445
|
-
logs:
|
|
446
|
-
level:
|
|
447
|
-
message:
|
|
448
|
-
service:
|
|
449
|
-
module:
|
|
450
|
-
context:
|
|
451
|
-
app:
|
|
452
|
-
data:
|
|
453
|
-
timestamp:
|
|
325
|
+
response: alepha103.TPage<alepha103.TObject<{
|
|
326
|
+
id: PgAttr<PgAttr<alepha103.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
327
|
+
version: PgAttr<PgAttr<alepha103.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
328
|
+
createdAt: PgAttr<PgAttr<alepha103.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
329
|
+
updatedAt: PgAttr<PgAttr<alepha103.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
330
|
+
finishedAt: alepha103.TOptional<alepha103.TString>;
|
|
331
|
+
job: alepha103.TString;
|
|
332
|
+
status: alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
333
|
+
error: alepha103.TOptional<alepha103.TString>;
|
|
334
|
+
logs: alepha103.TOptional<alepha103.TArray<alepha103.TObject<{
|
|
335
|
+
level: alepha103.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
336
|
+
message: alepha103.TString;
|
|
337
|
+
service: alepha103.TString;
|
|
338
|
+
module: alepha103.TString;
|
|
339
|
+
context: alepha103.TOptional<alepha103.TString>;
|
|
340
|
+
app: alepha103.TOptional<alepha103.TString>;
|
|
341
|
+
data: alepha103.TOptional<alepha103.TAny>;
|
|
342
|
+
timestamp: alepha103.TNumber;
|
|
454
343
|
}>>>;
|
|
455
344
|
}>>;
|
|
456
345
|
}>;
|
|
457
346
|
readonly triggerJob: alepha_server0.ActionPrimitiveFn<{
|
|
458
|
-
body:
|
|
459
|
-
name:
|
|
347
|
+
body: alepha103.TObject<{
|
|
348
|
+
name: alepha103.TString;
|
|
460
349
|
}>;
|
|
461
|
-
response:
|
|
462
|
-
ok:
|
|
463
|
-
id:
|
|
464
|
-
count:
|
|
350
|
+
response: alepha103.TObject<{
|
|
351
|
+
ok: alepha103.TBoolean;
|
|
352
|
+
id: alepha103.TOptional<alepha103.TUnion<[alepha103.TString, alepha103.TInteger]>>;
|
|
353
|
+
count: alepha103.TOptional<alepha103.TNumber>;
|
|
465
354
|
}>;
|
|
466
355
|
}>;
|
|
467
356
|
}
|
|
468
357
|
//#endregion
|
|
469
358
|
//#region ../../src/api/jobs/entities/jobExecutions.d.ts
|
|
470
|
-
declare const jobExecutions: alepha_orm33.EntityPrimitive<
|
|
471
|
-
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
472
|
-
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
473
|
-
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
474
|
-
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
475
|
-
finishedAt:
|
|
476
|
-
job:
|
|
477
|
-
status:
|
|
478
|
-
error:
|
|
479
|
-
logs:
|
|
480
|
-
level:
|
|
481
|
-
message:
|
|
482
|
-
service:
|
|
483
|
-
module:
|
|
484
|
-
context:
|
|
485
|
-
app:
|
|
486
|
-
data:
|
|
487
|
-
timestamp:
|
|
359
|
+
declare const jobExecutions: alepha_orm33.EntityPrimitive<alepha103.TObject<{
|
|
360
|
+
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
|
|
361
|
+
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
|
|
362
|
+
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
363
|
+
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
364
|
+
finishedAt: alepha103.TOptional<alepha103.TString>;
|
|
365
|
+
job: alepha103.TString;
|
|
366
|
+
status: alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
367
|
+
error: alepha103.TOptional<alepha103.TString>;
|
|
368
|
+
logs: alepha103.TOptional<alepha103.TArray<alepha103.TObject<{
|
|
369
|
+
level: alepha103.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
370
|
+
message: alepha103.TString;
|
|
371
|
+
service: alepha103.TString;
|
|
372
|
+
module: alepha103.TString;
|
|
373
|
+
context: alepha103.TOptional<alepha103.TString>;
|
|
374
|
+
app: alepha103.TOptional<alepha103.TString>;
|
|
375
|
+
data: alepha103.TOptional<alepha103.TAny>;
|
|
376
|
+
timestamp: alepha103.TNumber;
|
|
488
377
|
}>>>;
|
|
489
378
|
}>>;
|
|
490
379
|
type JobExecutionEntity = Static<typeof jobExecutions.schema>;
|
|
491
380
|
//#endregion
|
|
492
381
|
//#region ../../src/api/jobs/providers/JobProvider.d.ts
|
|
493
|
-
declare const envSchema:
|
|
494
|
-
JOB_PREFIX:
|
|
382
|
+
declare const envSchema: alepha103.TObject<{
|
|
383
|
+
JOB_PREFIX: alepha103.TOptional<alepha103.TString>;
|
|
495
384
|
}>;
|
|
496
385
|
declare module "alepha" {
|
|
497
386
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
@@ -504,24 +393,24 @@ declare class JobProvider {
|
|
|
504
393
|
protected readonly alepha: Alepha;
|
|
505
394
|
protected readonly dateTimeProvider: DateTimeProvider;
|
|
506
395
|
protected readonly cronProvider: CronProvider;
|
|
507
|
-
protected readonly executionRepository: alepha_orm33.Repository<
|
|
508
|
-
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
509
|
-
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
510
|
-
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
511
|
-
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<
|
|
512
|
-
finishedAt:
|
|
513
|
-
job:
|
|
514
|
-
status:
|
|
515
|
-
error:
|
|
516
|
-
logs:
|
|
517
|
-
level:
|
|
518
|
-
message:
|
|
519
|
-
service:
|
|
520
|
-
module:
|
|
521
|
-
context:
|
|
522
|
-
app:
|
|
523
|
-
data:
|
|
524
|
-
timestamp:
|
|
396
|
+
protected readonly executionRepository: alepha_orm33.Repository<alepha103.TObject<{
|
|
397
|
+
id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
|
|
398
|
+
version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
|
|
399
|
+
createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
400
|
+
updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha103.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
|
|
401
|
+
finishedAt: alepha103.TOptional<alepha103.TString>;
|
|
402
|
+
job: alepha103.TString;
|
|
403
|
+
status: alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
404
|
+
error: alepha103.TOptional<alepha103.TString>;
|
|
405
|
+
logs: alepha103.TOptional<alepha103.TArray<alepha103.TObject<{
|
|
406
|
+
level: alepha103.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
407
|
+
message: alepha103.TString;
|
|
408
|
+
service: alepha103.TString;
|
|
409
|
+
module: alepha103.TString;
|
|
410
|
+
context: alepha103.TOptional<alepha103.TString>;
|
|
411
|
+
app: alepha103.TOptional<alepha103.TString>;
|
|
412
|
+
data: alepha103.TOptional<alepha103.TAny>;
|
|
413
|
+
timestamp: alepha103.TNumber;
|
|
525
414
|
}>>>;
|
|
526
415
|
}>>;
|
|
527
416
|
protected readonly env: {
|
|
@@ -615,31 +504,31 @@ interface JobHandlerArguments {
|
|
|
615
504
|
}
|
|
616
505
|
//#endregion
|
|
617
506
|
//#region ../../src/api/jobs/schemas/jobExecutionResourceSchema.d.ts
|
|
618
|
-
declare const jobExecutionResourceSchema:
|
|
619
|
-
id: PgAttr<PgAttr<
|
|
620
|
-
version: PgAttr<PgAttr<
|
|
621
|
-
createdAt: PgAttr<PgAttr<
|
|
622
|
-
updatedAt: PgAttr<PgAttr<
|
|
623
|
-
finishedAt:
|
|
624
|
-
job:
|
|
625
|
-
status:
|
|
626
|
-
error:
|
|
627
|
-
logs:
|
|
628
|
-
level:
|
|
629
|
-
message:
|
|
630
|
-
service:
|
|
631
|
-
module:
|
|
632
|
-
context:
|
|
633
|
-
app:
|
|
634
|
-
data:
|
|
635
|
-
timestamp:
|
|
507
|
+
declare const jobExecutionResourceSchema: alepha103.TObject<{
|
|
508
|
+
id: PgAttr<PgAttr<alepha103.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
509
|
+
version: PgAttr<PgAttr<alepha103.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
510
|
+
createdAt: PgAttr<PgAttr<alepha103.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
511
|
+
updatedAt: PgAttr<PgAttr<alepha103.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
512
|
+
finishedAt: alepha103.TOptional<alepha103.TString>;
|
|
513
|
+
job: alepha103.TString;
|
|
514
|
+
status: alepha103.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
|
|
515
|
+
error: alepha103.TOptional<alepha103.TString>;
|
|
516
|
+
logs: alepha103.TOptional<alepha103.TArray<alepha103.TObject<{
|
|
517
|
+
level: alepha103.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
518
|
+
message: alepha103.TString;
|
|
519
|
+
service: alepha103.TString;
|
|
520
|
+
module: alepha103.TString;
|
|
521
|
+
context: alepha103.TOptional<alepha103.TString>;
|
|
522
|
+
app: alepha103.TOptional<alepha103.TString>;
|
|
523
|
+
data: alepha103.TOptional<alepha103.TAny>;
|
|
524
|
+
timestamp: alepha103.TNumber;
|
|
636
525
|
}>>>;
|
|
637
526
|
}>;
|
|
638
527
|
type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
|
|
639
528
|
//#endregion
|
|
640
529
|
//#region ../../src/api/jobs/schemas/triggerJobSchema.d.ts
|
|
641
|
-
declare const triggerJobSchema:
|
|
642
|
-
name:
|
|
530
|
+
declare const triggerJobSchema: alepha103.TObject<{
|
|
531
|
+
name: alepha103.TString;
|
|
643
532
|
}>;
|
|
644
533
|
type TriggerJob = Static<typeof triggerJobSchema>;
|
|
645
534
|
//#endregion
|
|
@@ -652,7 +541,7 @@ type TriggerJob = Static<typeof triggerJobSchema>;
|
|
|
652
541
|
*
|
|
653
542
|
* @module alepha.api.jobs
|
|
654
543
|
*/
|
|
655
|
-
declare const AlephaApiJobs:
|
|
544
|
+
declare const AlephaApiJobs: alepha103.Service<alepha103.Module>;
|
|
656
545
|
//#endregion
|
|
657
546
|
export { $job, AdminJobController, AlephaApiJobs, Job, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobHandlerArguments, JobPrimitive, JobPrimitiveOptions, JobProvider, JobRegistration, JobService, TriggerJob, jobExecutionQuerySchema, jobExecutionResourceSchema, jobExecutions, triggerJobSchema };
|
|
658
547
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/orm/schemas/insertSchema.ts","../../../src/orm/schemas/updateSchema.ts","../../../src/orm/primitives/$entity.ts","../../../src/orm/constants/PG_SYMBOLS.ts","../../../src/orm/helpers/pgAttr.ts","../../../src/
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/orm/schemas/insertSchema.ts","../../../src/orm/schemas/updateSchema.ts","../../../src/orm/primitives/$entity.ts","../../../src/orm/constants/PG_SYMBOLS.ts","../../../src/orm/helpers/pgAttr.ts","../../../src/api/jobs/schemas/jobExecutionQuerySchema.ts","../../../src/api/jobs/services/JobService.ts","../../../src/api/jobs/controllers/AdminJobController.ts","../../../src/api/jobs/entities/jobExecutions.ts","../../../src/api/jobs/providers/JobProvider.ts","../../../src/api/jobs/primitives/$job.ts","../../../src/api/jobs/schemas/jobExecutionResourceSchema.ts","../../../src/api/jobs/schemas/triggerJobSchema.ts","../../../src/api/jobs/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KAaY,aAAA,WAAwB,OAAA,IAAW,OAAA,eACjC,CAAA,iBAAkB,CAAA,eAAgB,CAAA;EAAA,CACvC,UAAA;AAAA;EACD,WAAA;AAAA,IACF,SAAA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OAAA;AAAA;AAAA,KAEU,UAAA,GAAa,MAAA,QAAc,gBAAA;;;;;;;;;;AZMvC;caaa,aAAA,EAAa,SAAA,CAAA,OAAA,CAGxB,SAAA,CAHwB,MAAA"}
|
|
@@ -260,12 +260,12 @@ var NotificationService = class {
|
|
|
260
260
|
maxSize: 100,
|
|
261
261
|
maxDuration: [15, "seconds"],
|
|
262
262
|
schema: notificationCreateSchema,
|
|
263
|
-
handler: async (notifications
|
|
263
|
+
handler: async (notifications) => {
|
|
264
264
|
this.log.debug("Processing notification batch", {
|
|
265
|
-
size: notifications
|
|
266
|
-
templates: [...new Set(notifications
|
|
265
|
+
size: notifications.length,
|
|
266
|
+
templates: [...new Set(notifications.map((n) => n.template))]
|
|
267
267
|
});
|
|
268
|
-
const entities = await this.notificationRepository.createMany(notifications
|
|
268
|
+
const entities = await this.notificationRepository.createMany(notifications);
|
|
269
269
|
await this.alepha.inject(NotificationQueues).processNotification.push(...entities.map((it) => ({ notificationId: it.id })));
|
|
270
270
|
this.log.info("Notification batch queued", {
|
|
271
271
|
count: entities.length,
|