Skip to content

Commit f64d1da

Browse files
committed
rebase cleanup
1 parent effd03d commit f64d1da

12 files changed

Lines changed: 32 additions & 28 deletions

File tree

apps/supabase/src/edge-functions/stripe-worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const pool = new pg.Pool({ connectionString: dbUrl, max: 2 })
2626
const resolved = await resolveOpenApiSpec({ apiVersion: '2020-08-27' })
2727
const registry = buildResourceRegistry(resolved.spec, stripeKey, resolved.apiVersion)
2828

29-
Deno.serve(async (req) => {
29+
Deno.serve(async (req) => {
3030
// Auth: validate Bearer token against vault worker secret
3131
const authHeader = req.headers.get('Authorization')
3232
if (!authHeader?.startsWith('Bearer ')) {

packages/openapi/jsonSchemaConverter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ParsedResourceTable, ScalarType } from './types'
1+
import type { ParsedResourceTable, ScalarType } from './types.js'
22

33
const SCALAR_TYPE_TO_JSON_SCHEMA: Record<ScalarType, { type: string; format?: string }> = {
44
text: { type: 'string' },

packages/openapi/listFnResolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { OpenApiSchemaObject, OpenApiSpec } from './types'
2-
import { OPENAPI_RESOURCE_TABLE_ALIASES } from './runtimeMappings'
1+
import type { OpenApiSchemaObject, OpenApiSpec } from './types.js'
2+
import { OPENAPI_RESOURCE_TABLE_ALIASES } from './runtimeMappings.js'
33

44
const SCHEMA_REF_PREFIX = '#/components/schemas/'
55

packages/openapi/package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,23 @@
33
"version": "0.1.0",
44
"private": true,
55
"type": "module",
6-
"main": "./dist/index.cjs",
76
"exports": {
87
".": {
98
"types": "./index.ts",
10-
"import": "./dist/index.js",
11-
"require": "./dist/index.cjs"
9+
"import": "./index.ts",
10+
"default": "./index.ts"
11+
}
12+
},
13+
"publishConfig": {
14+
"exports": {
15+
".": {
16+
"types": "./dist/index.d.ts",
17+
"import": "./dist/index.js"
18+
}
1219
}
1320
},
1421
"scripts": {
15-
"build": "tsup index.ts --format esm,cjs --dts",
22+
"build": "tsc",
1623
"test": "vitest --passWithNoTests"
1724
},
1825
"files": [

packages/openapi/runtimeMappings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ParsedColumn } from './types'
1+
import type { ParsedColumn } from './types.js'
22

33
/**
44
* Overrides for x-resourceId values whose table name cannot be inferred by the

packages/openapi/specFetchHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os from 'node:os'
22
import fs from 'node:fs/promises'
33
import path from 'node:path'
4-
import type { OpenApiSpec, ResolveSpecConfig, ResolvedOpenApiSpec } from './types'
4+
import type { OpenApiSpec, ResolveSpecConfig, ResolvedOpenApiSpec } from './types.js'
55

66
const DEFAULT_CACHE_DIR = path.join(os.tmpdir(), 'stripe-sync-openapi-cache')
77

packages/openapi/specParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import type {
66
ParsedColumn,
77
ParsedOpenApiSpec,
88
ScalarType,
9-
} from './types'
10-
import { OPENAPI_COMPATIBILITY_COLUMNS, OPENAPI_RESOURCE_TABLE_ALIASES } from './runtimeMappings'
9+
} from './types.js'
10+
import { OPENAPI_COMPATIBILITY_COLUMNS, OPENAPI_RESOURCE_TABLE_ALIASES } from './runtimeMappings.js'
1111

1212
const SCHEMA_REF_PREFIX = '#/components/schemas/'
1313

packages/openapi/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"compilerOptions": {
33
"target": "esnext",
4-
"module": "esnext",
5-
"moduleResolution": "bundler",
4+
"module": "nodenext",
5+
"moduleResolution": "nodenext",
66
"declaration": true,
7+
"declarationMap": true,
78
"outDir": "dist",
89
"esModuleInterop": true,
910
"skipLibCheck": true,

packages/source-stripe/src/process-event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export async function* processStripeEvent(
150150
resourceConfig.isFinalState &&
151151
!resourceConfig.isFinalState(dataObject)
152152
) {
153-
data = (await resourceConfig.retrieveFn(dataObject.id)) as Record<string, unknown>
153+
data = (await resourceConfig.retrieveFn!(dataObject.id)) as Record<string, unknown>
154154
}
155155

156156
// 6. Yield main record

packages/source-stripe/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"rootDir": "src"
1414
},
1515
"include": ["src/**/*"],
16-
"exclude": ["src/server", "src/**/*.test.ts", "src/**/__tests__/**"]
16+
"exclude": ["src/server", "src/openapi", "src/**/*.test.ts", "src/**/__tests__/**"]
1717
}

0 commit comments

Comments
 (0)