create-aomex 0.0.79 → 0.0.80

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-aomex",
3
- "version": "0.0.79",
3
+ "version": "0.0.80",
4
4
  "repository": "git@github.com:aomex/create-aomex.git",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -2,17 +2,26 @@ services:
2
2
  mysql:
3
3
  image: mysql:8.4
4
4
  environment:
5
- MYSQL_ROOT_PASSWORD: 'abcde'
5
+ MYSQL_ROOT_PASSWORD: "abcde"
6
6
  # 修改后需要同步修改.env里的参数
7
- MYSQL_DATABASE: '{{projectName}}'
7
+ MYSQL_DATABASE: "{{projectName}}"
8
8
  volumes:
9
9
  - ./volumes/mysql:/var/lib/mysql
10
10
  ports:
11
11
  - 3306:3306
12
- command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
12
+ command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --skip-log-bin
13
13
  healthcheck:
14
14
  test:
15
- ['CMD', 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p$$MYSQL_ROOT_PASSWORD']
15
+ [
16
+ "CMD",
17
+ "mysqladmin",
18
+ "ping",
19
+ "-h",
20
+ "localhost",
21
+ "-u",
22
+ "root",
23
+ "-p$$MYSQL_ROOT_PASSWORD",
24
+ ]
16
25
  interval: 5s
17
26
  timeout: 3s
18
27
  retries: 10
@@ -1,16 +1,8 @@
1
1
  import { PrismaClient } from '../generated/prisma/client';
2
2
  import * as runtime from '@prisma/client/runtime/client';
3
-
4
3
  import { PrismaMariaDb } from '@prisma/adapter-mariadb';
5
4
 
6
- const config = new URL(process.env['DATABASE_URL']!);
7
- const adapter = new PrismaMariaDb({
8
- host: config.hostname,
9
- port: parseInt(config.port),
10
- user: config.username,
11
- password: config.password,
12
- database: config.pathname.slice(1),
13
- });
5
+ const adapter = new PrismaMariaDb(process.env['DATABASE_URL']!);
14
6
 
15
7
  export const prisma = new PrismaClient({
16
8
  adapter,