@open-mercato/scheduler 0.5.1-develop.2681.c559bb2bc3 → 0.5.1-develop.2691.d8a0934b37
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/.turbo/turbo-build.log +2 -1
- package/build.mjs +7 -67
- package/package.json +5 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
scheduler
|
|
1
|
+
[build:scheduler] found 42 entry points
|
|
2
|
+
[build:scheduler] built successfully
|
package/build.mjs
CHANGED
|
@@ -1,70 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { dirname, join } from 'node:path'
|
|
1
|
+
import { dirname } from 'node:path'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { buildPackage } from '../../scripts/build-package.mjs'
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
ignore: ['**/__tests__/**', '**/*.test.ts', '**/*.test.tsx']
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
// Plugin to add .js extension to relative imports
|
|
11
|
-
const addJsExtension = {
|
|
12
|
-
name: 'add-js-extension',
|
|
13
|
-
setup(build) {
|
|
14
|
-
build.onEnd(async (result) => {
|
|
15
|
-
if (result.errors.length > 0) return
|
|
16
|
-
const outputFiles = await glob('dist/**/*.js')
|
|
17
|
-
for (const file of outputFiles) {
|
|
18
|
-
const fileDir = dirname(file)
|
|
19
|
-
let content = readFileSync(file, 'utf-8')
|
|
20
|
-
// Add .js to relative imports that don't have an extension
|
|
21
|
-
content = content.replace(
|
|
22
|
-
/from\s+["'](\.[^"']+)["']/g,
|
|
23
|
-
(match, path) => {
|
|
24
|
-
if (path.endsWith('.js') || path.endsWith('.json')) return match
|
|
25
|
-
// Check if it's a directory with index.js
|
|
26
|
-
const resolvedPath = join(fileDir, path)
|
|
27
|
-
if (existsSync(resolvedPath) && existsSync(join(resolvedPath, 'index.js'))) {
|
|
28
|
-
return `from "${path}/index.js"`
|
|
29
|
-
}
|
|
30
|
-
return `from "${path}.js"`
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
content = content.replace(
|
|
34
|
-
/import\s*\(\s*["'](\.[^"']+)["']\s*\)/g,
|
|
35
|
-
(match, path) => {
|
|
36
|
-
if (path.endsWith('.js') || path.endsWith('.json')) return match
|
|
37
|
-
// Check if it's a directory with index.js
|
|
38
|
-
const resolvedPath = join(fileDir, path)
|
|
39
|
-
if (existsSync(resolvedPath) && existsSync(join(resolvedPath, 'index.js'))) {
|
|
40
|
-
return `import("${path}/index.js")`
|
|
41
|
-
}
|
|
42
|
-
return `import("${path}.js")`
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
writeFileSync(file, content)
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
}
|
|
49
|
-
}
|
|
5
|
+
const packageDir = dirname(fileURLToPath(import.meta.url))
|
|
50
6
|
|
|
51
|
-
await
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
format: 'esm',
|
|
55
|
-
platform: 'node',
|
|
56
|
-
target: 'node18',
|
|
57
|
-
sourcemap: true,
|
|
58
|
-
plugins: [addJsExtension],
|
|
7
|
+
await buildPackage(packageDir, {
|
|
8
|
+
name: 'scheduler',
|
|
9
|
+
copyJson: true,
|
|
59
10
|
})
|
|
60
|
-
|
|
61
|
-
// Copy JSON files (translations, etc.)
|
|
62
|
-
const jsonFiles = await glob('src/**/*.json')
|
|
63
|
-
for (const jsonFile of jsonFiles) {
|
|
64
|
-
const destPath = jsonFile.replace('src/', 'dist/')
|
|
65
|
-
const destDir = dirname(destPath)
|
|
66
|
-
mkdirSync(destDir, { recursive: true })
|
|
67
|
-
copyFileSync(jsonFile, destPath)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
console.log('scheduler built successfully')
|
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.2691.d8a0934b37",
|
|
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.2691.d8a0934b37",
|
|
62
|
+
"@open-mercato/queue": "0.5.1-develop.2691.d8a0934b37",
|
|
63
63
|
"cron-parser": "^5.5.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@mikro-orm/core": "^6.6.10",
|
|
67
|
-
"@open-mercato/shared": "0.5.1-develop.
|
|
67
|
+
"@open-mercato/shared": "0.5.1-develop.2691.d8a0934b37",
|
|
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.2691.d8a0934b37",
|
|
82
82
|
"@types/jest": "^30.0.0",
|
|
83
83
|
"@types/node": "^25.6.0",
|
|
84
84
|
"jest": "^30.3.0",
|