@open-mercato/scheduler 0.5.1-develop.2691.d8a0934b37 → 0.5.1-develop.2694.732417c5ec
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.
|
@@ -8,7 +8,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
8
8
|
if (kind && result) __defProp(target, key, result);
|
|
9
9
|
return result;
|
|
10
10
|
};
|
|
11
|
-
import { Entity, PrimaryKey, Property
|
|
11
|
+
import { Entity, Index, PrimaryKey, Property } from "@mikro-orm/decorators/legacy";
|
|
12
12
|
let ScheduledJob = class {
|
|
13
13
|
};
|
|
14
14
|
__decorateClass([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/modules/scheduler/data/entities.ts"],
|
|
4
|
-
"sourcesContent": ["import { Entity, PrimaryKey, Property
|
|
5
|
-
"mappings": ";;;;;;;;;;AAAA,SAAS,QAAQ,YAAY,
|
|
4
|
+
"sourcesContent": ["import { Entity, Index, PrimaryKey, Property } from '@mikro-orm/decorators/legacy'\n\n@Entity({ tableName: 'scheduled_jobs' })\n@Index({ name: 'scheduled_jobs_org_tenant_idx', properties: ['organizationId', 'tenantId'] })\n@Index({ name: 'scheduled_jobs_next_run_idx', properties: ['nextRunAt'] })\n@Index({ name: 'scheduled_jobs_scope_idx', properties: ['scopeType', 'isEnabled'] })\nexport class ScheduledJob {\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'organization_id', type: 'uuid', nullable: true })\n organizationId?: string | null\n\n @Property({ name: 'tenant_id', type: 'uuid', nullable: true })\n tenantId?: string | null\n\n @Property({ name: 'scope_type', type: 'text', default: 'tenant' })\n scopeType!: 'system' | 'organization' | 'tenant'\n\n @Property({ type: 'text' })\n name!: string\n\n @Property({ type: 'text', nullable: true })\n description?: string | null\n\n @Property({ name: 'schedule_type', type: 'text' })\n scheduleType!: 'cron' | 'interval'\n\n @Property({ name: 'schedule_value', type: 'text' })\n scheduleValue!: string\n\n @Property({ type: 'text', default: 'UTC' })\n timezone!: string\n\n @Property({ name: 'target_type', type: 'text' })\n targetType!: 'queue' | 'command'\n\n @Property({ name: 'target_queue', type: 'text', nullable: true })\n targetQueue?: string | null\n\n @Property({ name: 'target_command', type: 'text', nullable: true })\n targetCommand?: string | null\n\n @Property({ name: 'target_payload', type: 'jsonb', nullable: true })\n targetPayload?: Record<string, unknown> | null\n\n @Property({ name: 'require_feature', type: 'text', nullable: true })\n requireFeature?: string | null\n\n @Property({ name: 'is_enabled', type: 'boolean', default: true })\n isEnabled!: boolean\n\n @Property({ name: 'last_run_at', type: Date, nullable: true })\n lastRunAt?: Date | null\n\n @Property({ name: 'next_run_at', type: Date, nullable: true })\n nextRunAt?: Date | null\n\n @Property({ name: 'source_type', type: 'text', default: 'user' })\n sourceType!: 'user' | 'module'\n\n @Property({ name: 'source_module', type: 'text', nullable: true })\n sourceModule?: string | null\n\n @Property({ name: 'created_at', type: Date, defaultRaw: 'now()' })\n createdAt!: Date\n\n @Property({ name: 'updated_at', type: Date, defaultRaw: 'now()', onUpdate: () => new Date() })\n updatedAt!: Date\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n\n @Property({ name: 'created_by_user_id', type: 'uuid', nullable: true })\n createdByUserId?: string | null\n\n @Property({ name: 'updated_by_user_id', type: 'uuid', nullable: true })\n updatedByUserId?: string | null\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAAA,SAAS,QAAQ,OAAO,YAAY,gBAAgB;AAM7C,IAAM,eAAN,MAAmB;AAwE1B;AAtEE;AAAA,EADC,WAAW,EAAE,MAAM,QAAQ,YAAY,oBAAoB,CAAC;AAAA,GADlD,aAEX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,mBAAmB,MAAM,QAAQ,UAAU,KAAK,CAAC;AAAA,GAJxD,aAKX;AAGA;AAAA,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vironment: 'node',
|
|
5
4
|
watchman: false,
|
|
6
5
|
roots: ['<rootDir>/src'],
|
|
7
6
|
testMatch: ['**/__tests__/**/*.test.ts'],
|
|
7
|
+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
|
8
8
|
moduleNameMapper: {
|
|
9
9
|
'^@open-mercato/core/(.*)$': '<rootDir>/../core/src/$1',
|
|
10
10
|
'^@open-mercato/shared/(.*)$': '<rootDir>/../shared/src/$1',
|
|
11
11
|
'^@open-mercato/queue/(.*)$': '<rootDir>/../queue/src/$1',
|
|
12
12
|
'^@open-mercato/events/(.*)$': '<rootDir>/../events/src/$1',
|
|
13
13
|
'^@open-mercato/ui/(.*)$': '<rootDir>/../ui/src/$1',
|
|
14
|
-
// Strip .js extensions from relative imports
|
|
14
|
+
// Strip .js extensions from relative imports (@mikro-orm ESM compatibility)
|
|
15
15
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
16
16
|
},
|
|
17
17
|
transform: {
|
|
18
|
-
'^.+\\.
|
|
19
|
-
'
|
|
18
|
+
'^.+\\.(t|j)sx?$': [
|
|
19
|
+
'<rootDir>/../../scripts/jest-mikroorm-transformer.cjs',
|
|
20
20
|
{
|
|
21
21
|
tsconfig: {
|
|
22
22
|
esModuleInterop: true,
|
|
23
|
-
|
|
23
|
+
allowJs: true,
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
],
|
|
27
27
|
},
|
|
28
28
|
transformIgnorePatterns: [
|
|
29
|
-
'node_modules/(?!(@mikro-orm
|
|
29
|
+
'node_modules/(?!(@mikro-orm)/)',
|
|
30
30
|
],
|
|
31
|
-
extensionsToTreatAsEsm: ['.ts'],
|
|
32
|
-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
|
33
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/scheduler",
|
|
3
|
-
"version": "0.5.1-develop.
|
|
3
|
+
"version": "0.5.1-develop.2694.732417c5ec",
|
|
4
4
|
"description": "Database-managed scheduled jobs with admin UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"./*/*/*/*/*/*.json": "./src/*/*/*/*/*/*.json"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@open-mercato/events": "0.5.1-develop.
|
|
62
|
-
"@open-mercato/queue": "0.5.1-develop.
|
|
61
|
+
"@open-mercato/events": "0.5.1-develop.2694.732417c5ec",
|
|
62
|
+
"@open-mercato/queue": "0.5.1-develop.2694.732417c5ec",
|
|
63
63
|
"cron-parser": "^5.5.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@mikro-orm/core": "^
|
|
67
|
-
"@open-mercato/shared": "0.5.1-develop.
|
|
66
|
+
"@mikro-orm/core": "^7.0.10",
|
|
67
|
+
"@open-mercato/shared": "0.5.1-develop.2694.732417c5ec",
|
|
68
68
|
"bullmq": "^5.0.0",
|
|
69
69
|
"ioredis": "^5.0.0",
|
|
70
70
|
"zod": ">=3.23.0"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@open-mercato/shared": "0.5.1-develop.
|
|
81
|
+
"@open-mercato/shared": "0.5.1-develop.2694.732417c5ec",
|
|
82
82
|
"@types/jest": "^30.0.0",
|
|
83
83
|
"@types/node": "^25.6.0",
|
|
84
84
|
"jest": "^30.3.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Entity, PrimaryKey, Property
|
|
1
|
+
import { Entity, Index, PrimaryKey, Property } from '@mikro-orm/decorators/legacy'
|
|
2
2
|
|
|
3
3
|
@Entity({ tableName: 'scheduled_jobs' })
|
|
4
4
|
@Index({ name: 'scheduled_jobs_org_tenant_idx', properties: ['organizationId', 'tenantId'] })
|