@yongdall/init 0.1.0 → 0.2.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/index.d.mts +11 -2
- package/index.mjs +14 -6
- package/index.mjs.map +1 -1
- package/package.json +7 -8
package/index.d.mts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
//#region packages/init/index.d.mts
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {object} env
|
|
5
|
+
* @param {boolean} [env.development]
|
|
6
|
+
*/
|
|
7
|
+
declare function init({
|
|
8
|
+
development
|
|
9
|
+
}: {
|
|
10
|
+
development?: boolean | undefined;
|
|
11
|
+
}): Promise<void>;
|
|
3
12
|
//#endregion
|
|
4
|
-
export {
|
|
13
|
+
export { init as default };
|
package/index.mjs
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { setDevelopment } from "@yongdall/model";
|
|
2
2
|
import { boot, tenant } from "@yongdall/configuration";
|
|
3
|
+
import { loadPluginProfiles } from "@yongdall/plugins";
|
|
3
4
|
import initSystem from "@yongdall/core";
|
|
4
|
-
import { loadHooks } from "@yongdall/load";
|
|
5
5
|
|
|
6
6
|
//#region packages/init/index.mjs
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {object} env
|
|
10
|
+
* @param {boolean} [env.development]
|
|
11
|
+
*/
|
|
12
|
+
async function init({ development }) {
|
|
13
|
+
if (development) setDevelopment(true);
|
|
14
|
+
/** @type {Record<string, any>} */
|
|
15
|
+
const hooks = Object.create(null);
|
|
16
|
+
for await (const [plugin, config] of loadPluginProfiles("hooks")) hooks[plugin] = config;
|
|
17
|
+
initSystem(tenant, boot, hooks);
|
|
18
|
+
}
|
|
11
19
|
|
|
12
20
|
//#endregion
|
|
13
|
-
export {
|
|
21
|
+
export { init as default };
|
|
14
22
|
//# sourceMappingURL=index.mjs.map
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../packages/init/index.mjs"],"sourcesContent":["import { setDevelopment } from '@yongdall/model';\nimport { boot, tenant } from '@yongdall/configuration';\nimport
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../packages/init/index.mjs"],"sourcesContent":["import { setDevelopment } from '@yongdall/model';\nimport { boot, tenant } from '@yongdall/configuration';\nimport { loadPluginProfiles } from '@yongdall/plugins';\nimport initSystem from '@yongdall/core';\n\n/**\n * \n * @param {object} env \n * @param {boolean} [env.development]\n */\nexport default async function init({ development }) {\n\tif (development) {\n\t\tsetDevelopment(true);\n\t}\n\t/** @type {Record<string, any>} */\n\tconst hooks = Object.create(null);\n\tfor await (const [plugin, config] of loadPluginProfiles('hooks')) {\n\t\thooks[plugin] = config;\n\t}\n\tinitSystem(tenant, boot, hooks);\n}\n"],"mappings":";;;;;;;;;;;AAUA,eAA8B,KAAK,EAAE,eAAe;AACnD,KAAI,YACH,gBAAe,KAAK;;CAGrB,MAAM,QAAQ,OAAO,OAAO,KAAK;AACjC,YAAW,MAAM,CAAC,QAAQ,WAAW,mBAAmB,QAAQ,CAC/D,OAAM,UAAU;AAEjB,YAAW,QAAQ,MAAM,MAAM"}
|
package/package.json
CHANGED
|
@@ -5,19 +5,18 @@
|
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.mjs"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.2.0",
|
|
9
9
|
"description": "",
|
|
10
10
|
"keywords": [],
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@yongdall/plugins": "^0.
|
|
15
|
-
"@yongdall/assets": "^0.
|
|
16
|
-
"@yongdall/configuration": "^0.
|
|
17
|
-
"@yongdall/model": "^0.
|
|
18
|
-
"@yongdall/core": "^0.
|
|
19
|
-
"@yongdall/connection": "^0.
|
|
20
|
-
"@yongdall/load": "^0.1.0"
|
|
14
|
+
"@yongdall/plugins": "^0.2.0",
|
|
15
|
+
"@yongdall/assets": "^0.2.0",
|
|
16
|
+
"@yongdall/configuration": "^0.2.0",
|
|
17
|
+
"@yongdall/model": "^0.2.0",
|
|
18
|
+
"@yongdall/core": "^0.2.0",
|
|
19
|
+
"@yongdall/connection": "^0.2.0"
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {}
|
|
23
22
|
}
|