adminforth 2.25.0-test.2 → 2.25.0-test.4

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"]
@@ -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',
@@ -15,46 +15,6 @@ async function getNextAvailablePort(startPort: number | undefined) {
15
15
  return await portfinder.getPortPromise({ port: startPort });
16
16
  };
17
17
 
18
- function ignoreTailwindErrors(): Plugin {
19
- return {
20
- name: 'ignore-tailwind-errors',
21
- configureServer(server) {
22
- server.middlewares.use((req, res, next) => {
23
- const originalWrite = res.write;
24
- res.write = function(chunk) {
25
- if (typeof chunk === 'string' && chunk.includes('tailwind')) {
26
- return true;
27
- }
28
- return originalWrite.call(this, chunk);
29
- };
30
- next();
31
- });
32
- },
33
- config(config, { command }) {
34
- if (command === 'build') {
35
- // Override PostCSS config for build
36
- config.css = config.css || {};
37
- config.css.postcss = {
38
- plugins: [
39
- {
40
- postcssPlugin: 'ignore-tailwind-errors',
41
- Once(root, helpers) {
42
- try {
43
- return tailwindcss()(root, helpers);
44
- } catch (error: any) {
45
- console.warn('TailwindCSS warning ignored:', error.message);
46
- return;
47
- }
48
- }
49
- }
50
- ]
51
- };
52
- }
53
- }
54
- };
55
- }
56
-
57
-
58
18
  const appPort = await getNextAvailablePort(5173);
59
19
  const hmrPort = await getNextAvailablePort(5273);
60
20
  console.log(`SPA port: ${appPort}. HMR port: ${hmrPort}`);
@@ -89,6 +49,12 @@ export default defineConfig({
89
49
  return id.toString().split('node_modules/')[1].split('/')[0].toString();
90
50
  }
91
51
  },
52
+ assetFileNames: (assetInfo) => {
53
+ return assetInfo.name?.startsWith('.pnpm')
54
+ ? assetInfo.name.replace(/^\.pnpm/, 'pnpm')
55
+ : assetInfo.name;
56
+ },
57
+
92
58
  },
93
59
  },
94
60
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.25.0-test.2",
3
+ "version": "2.25.0-test.4",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,12 +0,0 @@
1
- {
2
- "name": "custom",
3
- "version": "1.0.0",
4
- "main": "index.ts",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "keywords": [],
9
- "author": "",
10
- "license": "ISC",
11
- "description": ""
12
- }