structured-fw 0.9.5 → 0.9.7
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.
|
@@ -18,6 +18,7 @@ export declare class Application {
|
|
|
18
18
|
readonly components: Components;
|
|
19
19
|
readonly handlebars: Handlebars;
|
|
20
20
|
readonly exportedRequestContextData: Array<keyof RequestContextData>;
|
|
21
|
+
data: LooseObject;
|
|
21
22
|
constructor(config: StructuredConfig);
|
|
22
23
|
init(): Promise<void>;
|
|
23
24
|
private start;
|
|
@@ -18,6 +18,7 @@ export class Application {
|
|
|
18
18
|
this.eventEmitter = new EventEmitter();
|
|
19
19
|
this.handlebars = new Handlebars();
|
|
20
20
|
this.exportedRequestContextData = [];
|
|
21
|
+
this.data = {};
|
|
21
22
|
this.config = config;
|
|
22
23
|
this.cookies = new Cookies();
|
|
23
24
|
this.session = new Session(this);
|
package/index.ts
CHANGED
|
@@ -1,30 +1,4 @@
|
|
|
1
1
|
import { Application } from "structured-fw/Application";
|
|
2
2
|
import { config } from './Config.js';
|
|
3
|
-
import { Layout } from "./system/server/Layout.js";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
app.registerPlugin(async (app) => {
|
|
8
|
-
|
|
9
|
-
}, {
|
|
10
|
-
poop: 123
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// app.on('afterComponentsLoaded', (components) => {
|
|
14
|
-
// components.componentNames.forEach((componentName) => {
|
|
15
|
-
// console.log(componentName)
|
|
16
|
-
// console.log(components.getByName(componentName));
|
|
17
|
-
// });
|
|
18
|
-
// })
|
|
19
|
-
|
|
20
|
-
// app.on('componentCreated', (component) => {
|
|
21
|
-
// console.log(component.document.id);
|
|
22
|
-
// })
|
|
23
|
-
|
|
24
|
-
app.on('documentCreated', (document) => {
|
|
25
|
-
document.on('componentCreated', (component) => {
|
|
26
|
-
document.head.add(`<script>console.log('${component.name}')</script>`);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export const layout: Layout = new Layout(app, 'layout');
|
|
4
|
+
new Application(config);
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"main": "build/index",
|
|
17
|
-
"version": "0.9.
|
|
17
|
+
"version": "0.9.7",
|
|
18
18
|
"scripts": {
|
|
19
19
|
"develop": "tsc --watch",
|
|
20
20
|
"startDev": "cd build && nodemon --watch '../app/**/*' --watch '../build/**/*' -e js,html,css index.js",
|