Skip to content

Commit ba25d22

Browse files
committed
chore: wip
1 parent c65f9e8 commit ba25d22

File tree

2 files changed

+64
-4
lines changed

2 files changed

+64
-4
lines changed

.stacks/core/database-v2/package.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"name": "@stacksjs/database-v2",
3+
"type": "module",
4+
"version": "0.51.0",
5+
"packageManager": "pnpm@7.27.1",
6+
"description": "The Stacks database integration. (external use)",
7+
"author": "Chris Breuer",
8+
"license": "MIT",
9+
"funding": "https://github.com/sponsors/chrisbbreuer",
10+
"homepage": "https://github.com/stacksjs/stacks/tree/main/.stacks/core/database#readme",
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/stacksjs/stacks.git",
14+
"directory": "./.stacks/core/database"
15+
},
16+
"bugs": {
17+
"url": "https://github.com/stacksjs/stacks/issues"
18+
},
19+
"keywords": [
20+
"database",
21+
"orm",
22+
"mysql",
23+
"postgres",
24+
"planetScale",
25+
"supabase",
26+
"singleStore",
27+
"prisma",
28+
"stacks"
29+
],
30+
"module": "dist/index.mjs",
31+
"types": "dist/index.d.ts",
32+
"contributors": [
33+
"Chris Breuer <chris@ow3.org>"
34+
],
35+
"files": [
36+
"dist",
37+
"README.md"
38+
],
39+
"engines": {
40+
"node": ">=v18.14.2",
41+
"pnpm": ">=7.27.1"
42+
},
43+
"scripts": {
44+
"build": "mkdist -d",
45+
"dev": "mkdist -d",
46+
"prepublishOnly": "pnpm run build",
47+
"typecheck": "tsc --noEmit"
48+
},
49+
"peerDependencies": {
50+
"@stacksjs/path": "workspace:*",
51+
"@stacksjs/utils": "workspace:*"
52+
},
53+
"dependencies": {
54+
"@prisma/client": "^4.10.1"
55+
},
56+
"devDependencies": {
57+
"@stacksjs/testing": "workspace:*",
58+
"mkdist": "^1.1.1",
59+
"typescript": "^4.9.5"
60+
}
61+
}

.stacks/core/database/src/migrations/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,11 @@ function readModelsFromFolder(folderPath: string): Promise<ModelData[]> {
7676
const models: ModelData[] = []
7777

7878
fs.readdir(folderPath, (err, files) => {
79-
if (err) {
79+
if (err)
8080
reject(err)
81-
}
8281

8382
const promises = files
84-
.filter((file) => file.endsWith('.ts'))
83+
.filter(file => file.endsWith('.ts'))
8584
.map((file) => {
8685
const filePath = `${folderPath}/${file}`
8786

@@ -95,7 +94,7 @@ function readModelsFromFolder(folderPath: string): Promise<ModelData[]> {
9594

9695
Promise.all(promises)
9796
.then(() => resolve(models))
98-
.catch((err) => reject(err))
97+
.catch(err => reject(err))
9998
})
10099
})
101100
}

0 commit comments

Comments
 (0)