Skip to content

Commit 05037bb

Browse files
authored
add version to metdata of managed webhooks (#55)
1 parent 67bf04e commit 05037bb

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

packages/sync-engine/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import pkg from '../package.json' with { type: 'json' }
2+
3+
export const VERSION = pkg.version
4+
15
export { StripeSync } from './stripeSync'
26

37
export type * from './types'

packages/sync-engine/src/stripeSync.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Stripe from 'stripe'
22
import { pg as sql } from 'yesql'
3+
import pkg from '../package.json' with { type: 'json' }
34
import { PostgresClient } from './database/postgres'
45
import {
56
StripeSyncConfig,
@@ -2926,6 +2927,7 @@ export class StripeSync {
29262927
metadata: {
29272928
...webhookParams.metadata,
29282929
managed_by: 'stripe-sync',
2930+
version: pkg.version,
29292931
},
29302932
})
29312933

packages/sync-engine/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"outDir": "dist",
88
"esModuleInterop": true,
99
"skipLibCheck": true,
10-
"strict": true
10+
"strict": true,
11+
"resolveJsonModule": true
1112
},
1213
"include": ["src/**/*"]
1314
}

0 commit comments

Comments
 (0)