@itrocks/framework 0.5.0 → 0.6.0

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/cjs/main.js CHANGED
@@ -15,8 +15,10 @@ const request_response_1 = require("@itrocks/request-response");
15
15
  const route_1 = require("@itrocks/route");
16
16
  const store_1 = require("@itrocks/store");
17
17
  const template_1 = require("@itrocks/template");
18
+ const node_crypto_1 = require("node:crypto");
18
19
  const node_path_1 = require("node:path");
19
20
  const node_path_2 = require("node:path");
21
+ const ephemeralSessionSecret = (0, node_crypto_1.randomBytes)(32).toString('base64url');
20
22
  template_1.frontScripts.push('/lib/air-datepicker/locale/en.js', '/lib/air-datepicker/locale/fr.js');
21
23
  async function execute(request) {
22
24
  // Access control
@@ -63,14 +65,16 @@ async function run() {
63
65
  });
64
66
  const server = new fastify_1.FastifyServer({
65
67
  assetPath: app_dir_1.appDir,
68
+ cookie: config_1.config.session.cookie,
66
69
  execute: request => execute(new action_request_2.Request(request)),
67
70
  favicon: config_1.config.container?.favicon ?? (0, node_path_2.normalize)((0, node_path_1.join)(__dirname, '../favicon.png')),
68
71
  frontScripts: template_1.frontScripts,
69
72
  host: config_1.config.server.host,
70
73
  manifest: config_1.config.container?.manifest,
71
74
  port: config_1.config.server.port,
75
+ rolling: config_1.config.session.rolling,
72
76
  scriptCalls: ['loadCss', 'loadScript'],
73
- secret: config_1.config.session.secret ?? config_1.config.secret ?? 'defaultSecretHaving32CharactersOrGreater',
77
+ secret: config_1.config.session.secret ?? config_1.config.secret ?? ephemeralSessionSecret,
74
78
  secure: config_1.config.server.secure ?? 'auto',
75
79
  store: new fastify_file_session_store_1.FileStore((0, node_path_2.normalize)((0, node_path_1.join)(app_dir_1.appDir, config_1.config.session.path)))
76
80
  });
@@ -1,7 +1,8 @@
1
1
  import { HtmlContainer } from '@itrocks/core-transformers';
2
2
  import { ReflectProperty as RP } from '@itrocks/reflect';
3
+ import { ReflectClass } from './reflect-class';
3
4
  export declare class ReflectProperty<T extends object, K extends keyof T = keyof T> extends RP<T, K> {
4
- get class(): any;
5
+ get class(): ReflectClass<T>;
5
6
  edit(format?: string): Promise<any>;
6
7
  output(format?: string, askFor?: HtmlContainer): Promise<any>;
7
8
  outputMandatoryContainer(format?: string): Promise<any>;
package/package.json CHANGED
@@ -101,5 +101,5 @@
101
101
  "build:back": "tsc",
102
102
  "build:front": "tsc -p src/front/tsconfig.json && node -e \"const fs=require('node:fs');for(const file of fs.readdirSync('.').filter(file=>file.endsWith('.js')||file.endsWith('.d.ts')))fs.writeFileSync(file,fs.readFileSync(file,'utf8').replaceAll('../../',''))\""
103
103
  },
104
- "version": "0.5.0"
104
+ "version": "0.6.0"
105
105
  }