adminforth 2.25.0-test.1 → 2.25.0-test.10

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.
@@ -1,7 +1,7 @@
1
- FROM node:{{nodeMajor}}-slim
1
+ FROM devforth/node20-pnpm:latest
2
2
  WORKDIR /code/
3
- ADD package.json package-lock.json /code/
4
- RUN npm ci
3
+ ADD package.json pnpm-lock.yaml pnpm-workspace.yaml /code/
4
+ RUN pnpm i
5
5
  ADD . /code/
6
- RUN npx adminforth bundle
7
- CMD ["sh", "-c", "npm run migrate:prod && npm run prod"]
6
+ RUN pnpm exec adminforth bundle
7
+ CMD ["sh", "-c", "pnpm migrate:prod && pnpm prod"]
@@ -8,12 +8,12 @@
8
8
  "license": "ISC",
9
9
  "description": "",
10
10
  "scripts": {
11
- "dev": "pnpm _env:dev -- tsx watch index.ts",
12
- "prod": "pnpm _env:prod -- tsx index.ts",
11
+ "dev": "pnpm _env:dev tsx watch index.ts",
12
+ "prod": "pnpm _env:prod tsx index.ts",
13
13
  "start": "pnpm dev",
14
- "makemigration": "pnpm _env:dev -- npx --yes prisma migrate dev --create-only",
15
- "migrate:local": "pnpm _env:dev -- npx --yes prisma migrate deploy",
16
- "migrate:prod": "pnpm _env:prod -- npx --yes prisma migrate deploy",
14
+ "makemigration": "pnpm _env:dev npx --yes prisma migrate dev --create-only",
15
+ "migrate:local": "pnpm _env:dev npx --yes prisma migrate deploy",
16
+ "migrate:prod": "pnpm _env:prod npx --yes prisma migrate deploy",
17
17
  "_env:dev": "dotenvx run -f .env -f .env.local --",
18
18
  "_env:prod": "dotenvx run -f .env.prod --"
19
19
  },
@@ -0,0 +1,2 @@
1
+ onlyBuiltDependencies:
2
+ - better-sqlite3
@@ -26,7 +26,7 @@ Open `schema.prisma` and change schema as needed: add new tables, columns, etc (
26
26
  Run the following command to generate a new migration and apply it instantly in local database:
27
27
 
28
28
  ```bash
29
- pnpm makemigration -- --name <name_of_changes>
29
+ pnpm makemigration --name <name_of_changes>
30
30
  ```
31
31
 
32
32
  Your colleagues will need to pull the changes and run `pnpm migrate:local` to apply the migration in their local database.
@@ -317,11 +317,6 @@ async function writeTemplateFiles(dirname, cwd, options) {
317
317
  dest: 'resources/adminuser.ts',
318
318
  data: {},
319
319
  },
320
- {
321
- src: 'custom/package.json.hbs',
322
- dest: 'custom/package.json',
323
- data: {},
324
- },
325
320
  {
326
321
  src: 'custom/tsconfig.json.hbs',
327
322
  dest: 'custom/tsconfig.json',
@@ -338,6 +333,11 @@ async function writeTemplateFiles(dirname, cwd, options) {
338
333
  data: {
339
334
  sqliteFile,
340
335
  },
336
+ },
337
+ {
338
+ src: 'pnpm-workspace.yaml.hbs',
339
+ dest: 'pnpm-workspace.yaml',
340
+ data: {},
341
341
  }
342
342
  ];
343
343
 
@@ -387,7 +387,7 @@ function generateFinalInstructions(skipPrismaSetup, options) {
387
387
 
388
388
  instruction += `
389
389
  ${chalk.dim('// Generate and apply initial migration')}
390
- ${chalk.dim('$')}${chalk.cyan(' pnpm makemigration -- --name init && pnpm migrate:local')}\n`;
390
+ ${chalk.dim('$')}${chalk.cyan(' pnpm makemigration --name init && pnpm migrate:local')}\n`;
391
391
 
392
392
  instruction += `
393
393
  ${chalk.dim('// Start dev server with tsx watch for hot-reloading')}