create-nocobase-app 0.8.0-alpha.8 → 0.8.1-alpha.2

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-nocobase-app",
3
- "version": "0.8.0-alpha.8",
3
+ "version": "0.8.1-alpha.2",
4
4
  "main": "src/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "licenses": [
@@ -24,5 +24,5 @@
24
24
  "url": "git+https://github.com/nocobase/nocobase.git",
25
25
  "directory": "packages/core/create-nocobase-app"
26
26
  },
27
- "gitHead": "d53b20e08591651692c37b8bfdf1bfe59332bbdb"
27
+ "gitHead": "c638b5bb2f4a21405a64559dc12942b85904e3b6"
28
28
  }
package/src/generator.js CHANGED
@@ -105,6 +105,15 @@ class AppGenerator extends Generator {
105
105
  break;
106
106
  }
107
107
 
108
+ const keys = ['PLUGIN_PACKAGE_PREFIX', 'DB_HOST', 'DB_PORT', 'DB_DATABASE', 'DB_USER', 'DB_PASSWORD', 'DB_STORAGE'];
109
+
110
+ for (const key in env) {
111
+ if (keys.includes(key)) {
112
+ continue;
113
+ }
114
+ envs.push(`${key}=${env[key]}`);
115
+ }
116
+
108
117
  return {
109
118
  ...this.context,
110
119
  dependencies: dependencies.join(`,\n `),
@@ -114,6 +123,7 @@ class AppGenerator extends Generator {
114
123
  APP_ENV: 'development',
115
124
  DB_DIALECT: dbDialect,
116
125
  APP_KEY: crypto.randomBytes(256).toString('base64'),
126
+ PLUGIN_PACKAGE_PREFIX: `@nocobase/plugin-,@nocobase/preset-,@${this.context.name}/plugin-`,
117
127
  ...env,
118
128
  },
119
129
  };
@@ -5,6 +5,8 @@ APP_PORT={{{env.APP_PORT}}}
5
5
  API_BASE_PATH=/api/
6
6
  API_BASE_URL=
7
7
 
8
+ PLUGIN_PACKAGE_PREFIX={{{env.PLUGIN_PACKAGE_PREFIX}}}
9
+
8
10
  DB_LOGGING=off
9
11
  DB_DIALECT={{{env.DB_DIALECT}}}
10
12
  {{{envs}}}
@@ -20,7 +20,7 @@
20
20
  "@{{{name}}}/app-*": [
21
21
  "packages/app/*/src"
22
22
  ],
23
- "@{{{name}}}/*": [
23
+ "@{{{name}}}/plugin-*": [
24
24
  "packages/plugins/*/src"
25
25
  ]
26
26
  }