@open-mercato/queue 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 -2
- package/build.mjs +6 -69
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
queue built successfully
|
|
1
|
+
[build:queue] found 7 entry points
|
|
2
|
+
[build:queue] built successfully
|
package/build.mjs
CHANGED
|
@@ -1,73 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { glob } from 'glob'
|
|
3
|
-
import { readFileSync, writeFileSync, existsSync } from 'node:fs'
|
|
4
|
-
import { dirname, join } from 'node:path'
|
|
1
|
+
import { dirname } from 'node:path'
|
|
5
2
|
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { buildPackage } from '../../scripts/build-package.mjs'
|
|
6
4
|
|
|
7
|
-
const
|
|
5
|
+
const packageDir = dirname(fileURLToPath(import.meta.url))
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
absolute: true,
|
|
7
|
+
await buildPackage(packageDir, {
|
|
8
|
+
name: 'queue',
|
|
9
|
+
entryPoints: 'src/**/*.ts',
|
|
13
10
|
})
|
|
14
|
-
|
|
15
|
-
if (entryPoints.length === 0) {
|
|
16
|
-
console.error('No entry points found!')
|
|
17
|
-
process.exit(1)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
console.log(`Found ${entryPoints.length} entry points`)
|
|
21
|
-
|
|
22
|
-
// Plugin to add .js extension to relative imports
|
|
23
|
-
const addJsExtension = {
|
|
24
|
-
name: 'add-js-extension',
|
|
25
|
-
setup(build) {
|
|
26
|
-
build.onEnd(async (result) => {
|
|
27
|
-
if (result.errors.length > 0) return
|
|
28
|
-
const outputFiles = await glob('dist/**/*.js', { cwd: __dirname, absolute: true })
|
|
29
|
-
for (const file of outputFiles) {
|
|
30
|
-
const fileDir = dirname(file)
|
|
31
|
-
let content = readFileSync(file, 'utf-8')
|
|
32
|
-
// Add .js to relative imports that don't have an extension
|
|
33
|
-
content = content.replace(
|
|
34
|
-
/from\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 `from "${path}/index.js"`
|
|
41
|
-
}
|
|
42
|
-
return `from "${path}.js"`
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
content = content.replace(
|
|
46
|
-
/import\s*\(\s*["'](\.[^"']+)["']\s*\)/g,
|
|
47
|
-
(match, path) => {
|
|
48
|
-
if (path.endsWith('.js') || path.endsWith('.json')) return match
|
|
49
|
-
// Check if it's a directory with index.js
|
|
50
|
-
const resolvedPath = join(fileDir, path)
|
|
51
|
-
if (existsSync(resolvedPath) && existsSync(join(resolvedPath, 'index.js'))) {
|
|
52
|
-
return `import("${path}/index.js")`
|
|
53
|
-
}
|
|
54
|
-
return `import("${path}.js")`
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
writeFileSync(file, content)
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
await esbuild.build({
|
|
64
|
-
entryPoints,
|
|
65
|
-
outdir: 'dist',
|
|
66
|
-
format: 'esm',
|
|
67
|
-
platform: 'node',
|
|
68
|
-
target: 'node18',
|
|
69
|
-
sourcemap: true,
|
|
70
|
-
plugins: [addJsExtension],
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
console.log('queue built successfully')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/queue",
|
|
3
|
-
"version": "0.5.1-develop.
|
|
3
|
+
"version": "0.5.1-develop.2691.d8a0934b37",
|
|
4
4
|
"description": "Multi-strategy job queue with local and BullMQ support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@open-mercato/shared": "0.5.1-develop.
|
|
53
|
+
"@open-mercato/shared": "0.5.1-develop.2691.d8a0934b37"
|
|
54
54
|
},
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|