@open-mercato/webhooks 0.5.1-develop.2683.4878a05b8e → 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 +4 -67
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
webhooks built successfully
|
|
1
|
+
[build:webhooks] found 58 entry points
|
|
2
|
+
[build:webhooks] built successfully
|
package/build.mjs
CHANGED
|
@@ -1,70 +1,7 @@
|
|
|
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
|
-
cwd: __dirname,
|
|
11
|
-
ignore: ['**/__tests__/**', '**/*.test.ts', '**/*.test.tsx'],
|
|
12
|
-
absolute: true,
|
|
13
|
-
})
|
|
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
|
-
const addJsExtension = {
|
|
23
|
-
name: 'add-js-extension',
|
|
24
|
-
setup(build) {
|
|
25
|
-
build.onEnd(async (result) => {
|
|
26
|
-
if (result.errors.length > 0) return
|
|
27
|
-
const outputFiles = await glob('dist/**/*.js', { cwd: __dirname, absolute: true })
|
|
28
|
-
for (const file of outputFiles) {
|
|
29
|
-
const fileDir = dirname(file)
|
|
30
|
-
let content = readFileSync(file, 'utf-8')
|
|
31
|
-
content = content.replace(
|
|
32
|
-
/from\s+["'](\.[^"']+)["']/g,
|
|
33
|
-
(match, path) => {
|
|
34
|
-
if (path.endsWith('.js') || path.endsWith('.json')) return match
|
|
35
|
-
const resolvedPath = join(fileDir, path)
|
|
36
|
-
if (existsSync(resolvedPath) && existsSync(join(resolvedPath, 'index.js'))) {
|
|
37
|
-
return `from "${path}/index.js"`
|
|
38
|
-
}
|
|
39
|
-
return `from "${path}.js"`
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
content = content.replace(
|
|
43
|
-
/import\s*\(\s*["'](\.[^"']+)["']\s*\)/g,
|
|
44
|
-
(match, path) => {
|
|
45
|
-
if (path.endsWith('.js') || path.endsWith('.json')) return match
|
|
46
|
-
const resolvedPath = join(fileDir, path)
|
|
47
|
-
if (existsSync(resolvedPath) && existsSync(join(resolvedPath, 'index.js'))) {
|
|
48
|
-
return `import("${path}/index.js")`
|
|
49
|
-
}
|
|
50
|
-
return `import("${path}.js")`
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
writeFileSync(file, content)
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
await esbuild.build({
|
|
60
|
-
entryPoints,
|
|
61
|
-
outdir: 'dist',
|
|
62
|
-
format: 'esm',
|
|
63
|
-
platform: 'node',
|
|
64
|
-
target: 'node18',
|
|
65
|
-
sourcemap: true,
|
|
66
|
-
jsx: 'automatic',
|
|
67
|
-
plugins: [addJsExtension],
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
console.log('webhooks built successfully')
|
|
7
|
+
await buildPackage(packageDir, { name: 'webhooks' })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/webhooks",
|
|
3
|
-
"version": "0.5.1-develop.
|
|
3
|
+
"version": "0.5.1-develop.2691.d8a0934b37",
|
|
4
4
|
"description": "Webhooks module for Open Mercato — Standard Webhooks compliant outbound/inbound delivery",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -69,18 +69,18 @@
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@open-mercato/core": "0.5.1-develop.
|
|
73
|
-
"@open-mercato/queue": "0.5.1-develop.
|
|
74
|
-
"@open-mercato/ui": "0.5.1-develop.
|
|
72
|
+
"@open-mercato/core": "0.5.1-develop.2691.d8a0934b37",
|
|
73
|
+
"@open-mercato/queue": "0.5.1-develop.2691.d8a0934b37",
|
|
74
|
+
"@open-mercato/ui": "0.5.1-develop.2691.d8a0934b37"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@mikro-orm/postgresql": "^6.6.10",
|
|
78
|
-
"@open-mercato/shared": "0.5.1-develop.
|
|
78
|
+
"@open-mercato/shared": "0.5.1-develop.2691.d8a0934b37",
|
|
79
79
|
"react": "^19.0.0",
|
|
80
80
|
"react-dom": "^19.0.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@open-mercato/shared": "0.5.1-develop.
|
|
83
|
+
"@open-mercato/shared": "0.5.1-develop.2691.d8a0934b37",
|
|
84
84
|
"@types/jest": "^30.0.0",
|
|
85
85
|
"esbuild": "^0.28.0",
|
|
86
86
|
"glob": "^13.0.6",
|