@appxdigital/appx-core-cli 1.0.8 → 1.0.9
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 +1 -1
- package/templates/admin.config.template.js +1 -0
- package/wizard.js +4 -9
package/package.json
CHANGED
package/wizard.js
CHANGED
|
@@ -10,6 +10,7 @@ import { fileURLToPath } from 'url';
|
|
|
10
10
|
import cliProgress from 'cli-progress';
|
|
11
11
|
import { gatherFileUploadSettings, insertFileUploadConfiguration } from './utils/fileUploadConfig.js';
|
|
12
12
|
import packageJson from './package.json' assert { type: 'json' };
|
|
13
|
+
import crypto from 'crypto';
|
|
13
14
|
|
|
14
15
|
const __filename = fileURLToPath(import.meta.url);
|
|
15
16
|
const __dirname = path.dirname(__filename);
|
|
@@ -147,12 +148,6 @@ async function promptUser() {
|
|
|
147
148
|
message: 'Database Name:',
|
|
148
149
|
default: 'generic'
|
|
149
150
|
},
|
|
150
|
-
{
|
|
151
|
-
type: 'confirm',
|
|
152
|
-
name: 'backoffice',
|
|
153
|
-
message: 'Create backoffice?',
|
|
154
|
-
default: true
|
|
155
|
-
},
|
|
156
151
|
{
|
|
157
152
|
type: 'confirm',
|
|
158
153
|
name: 'showOutput',
|
|
@@ -223,7 +218,7 @@ APP_PORT=3000
|
|
|
223
218
|
USE_TRANSACTION=true
|
|
224
219
|
|
|
225
220
|
#Session secret
|
|
226
|
-
SESSION_SECRET="${
|
|
221
|
+
SESSION_SECRET="${crypto.randomBytes(32).toString('hex')}"
|
|
227
222
|
|
|
228
223
|
#Cookie name for the session token
|
|
229
224
|
SESSION_COOKIE_NAME="APPXCORE"
|
|
@@ -232,8 +227,8 @@ SESSION_COOKIE_NAME="APPXCORE"
|
|
|
232
227
|
SESSION_TTL=86400
|
|
233
228
|
|
|
234
229
|
# JWT
|
|
235
|
-
JWT_SECRET="${
|
|
236
|
-
JWT_REFRESH_SECRET="${
|
|
230
|
+
JWT_SECRET="${crypto.randomBytes(32).toString('hex')}"
|
|
231
|
+
JWT_REFRESH_SECRET="${crypto.randomBytes(32).toString('hex')}"
|
|
237
232
|
`;
|
|
238
233
|
|
|
239
234
|
fs.writeFileSync(`${projectPath}/.env`, envContent);
|