@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@appxdigital/appx-core-cli",
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "npm:publish": "npm publish --access public",
@@ -5,6 +5,7 @@ const componentLoader = new ComponentLoader();
5
5
 
6
6
  export const AdminConfig: AdminConfigType = {
7
7
  componentLoader,
8
+ adminRoles: ['ADMIN'],
8
9
  resources: [
9
10
  {
10
11
  name: 'User',
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="${require('crypto').randomBytes(32).toString('hex')}"
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="${require('crypto').randomBytes(32).toString('hex')}"
236
- JWT_REFRESH_SECRET="${require('crypto').randomBytes(32).toString('hex')}"
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);