@arch-cadre/modules 0.0.6
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/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/client/extension-point-client.cjs +28 -0
- package/dist/client/extension-point-client.d.cts +20 -0
- package/dist/client/extension-point-client.d.cts.map +1 -0
- package/dist/client/extension-point-client.d.mts +20 -0
- package/dist/client/extension-point-client.d.mts.map +1 -0
- package/dist/client/extension-point-client.mjs +27 -0
- package/dist/client/extension-point-client.mjs.map +1 -0
- package/dist/client/extension-point.cjs +21 -0
- package/dist/client/extension-point.d.cts +21 -0
- package/dist/client/extension-point.d.cts.map +1 -0
- package/dist/client/extension-point.d.mts +21 -0
- package/dist/client/extension-point.d.mts.map +1 -0
- package/dist/client/extension-point.mjs +20 -0
- package/dist/client/extension-point.mjs.map +1 -0
- package/dist/client/widget-area.cjs +21 -0
- package/dist/client/widget-area.d.cts +19 -0
- package/dist/client/widget-area.d.cts.map +1 -0
- package/dist/client/widget-area.d.mts +19 -0
- package/dist/client/widget-area.d.mts.map +1 -0
- package/dist/client/widget-area.mjs +20 -0
- package/dist/client/widget-area.mjs.map +1 -0
- package/dist/index.cjs +22 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +7 -0
- package/dist/server/lifecycle.cjs +192 -0
- package/dist/server/lifecycle.d.cts +9 -0
- package/dist/server/lifecycle.d.cts.map +1 -0
- package/dist/server/lifecycle.d.mts +9 -0
- package/dist/server/lifecycle.d.mts.map +1 -0
- package/dist/server/lifecycle.mjs +190 -0
- package/dist/server/lifecycle.mjs.map +1 -0
- package/dist/server/manage.cjs +123 -0
- package/dist/server/manage.d.cts +35 -0
- package/dist/server/manage.d.cts.map +1 -0
- package/dist/server/manage.d.mts +35 -0
- package/dist/server/manage.d.mts.map +1 -0
- package/dist/server/manage.mjs +117 -0
- package/dist/server/manage.mjs.map +1 -0
- package/dist/server/registry.cjs +86 -0
- package/dist/server/registry.d.cts +5 -0
- package/dist/server/registry.d.cts.map +1 -0
- package/dist/server/registry.d.mts +5 -0
- package/dist/server/registry.d.mts.map +1 -0
- package/dist/server/registry.mjs +86 -0
- package/dist/server/registry.mjs.map +1 -0
- package/dist/server/ui.cjs +188 -0
- package/dist/server/ui.d.cts +17 -0
- package/dist/server/ui.d.cts.map +1 -0
- package/dist/server/ui.d.mts +17 -0
- package/dist/server/ui.d.mts.map +1 -0
- package/dist/server/ui.mjs +178 -0
- package/dist/server/ui.mjs.map +1 -0
- package/dist/server.cjs +30 -0
- package/dist/server.d.cts +6 -0
- package/dist/server.d.mts +6 -0
- package/dist/server.mjs +7 -0
- package/dist/types.cjs +19 -0
- package/dist/types.d.cts +117 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +117 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +19 -0
- package/dist/types.mjs.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
4
|
+
const require_ui = require('../server/ui.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_runtime.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
|
|
9
|
+
//#region src/client/extension-point-client.tsx
|
|
10
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: <explanation> */
|
|
11
|
+
function ExtensionPointClient({ module, point, className, props, fallback }) {
|
|
12
|
+
const [extensions, setExtensions] = (0, react.useState)([]);
|
|
13
|
+
(0, react.useEffect)(() => {
|
|
14
|
+
require_ui.getExtensions(module, point).then(setExtensions);
|
|
15
|
+
}, [module, point]);
|
|
16
|
+
if (extensions.length === 0) return fallback || null;
|
|
17
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
18
|
+
className,
|
|
19
|
+
children: extensions.map((ext) => {
|
|
20
|
+
const Component = ext.component;
|
|
21
|
+
if (!Component) return null;
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, { ...props }, ext.id);
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.ExtensionPointClient = ExtensionPointClient;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/client/extension-point-client.d.ts
|
|
4
|
+
interface ExtensionPointProps {
|
|
5
|
+
module: string;
|
|
6
|
+
point: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
props?: any;
|
|
9
|
+
fallback?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare function ExtensionPointClient({
|
|
12
|
+
module,
|
|
13
|
+
point,
|
|
14
|
+
className,
|
|
15
|
+
props,
|
|
16
|
+
fallback
|
|
17
|
+
}: ExtensionPointProps): any;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ExtensionPointClient };
|
|
20
|
+
//# sourceMappingURL=extension-point-client.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-client.d.cts","names":[],"sources":["../../src/client/extension-point-client.tsx"],"mappings":";;;UAQU,mBAAA;EACR,MAAA;EACA,KAAA;EACA,SAAA;EACA,KAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;AAAA;AAAA,iBAGH,oBAAA,CAAA;EACd,MAAA;EACA,KAAA;EACA,SAAA;EACA,KAAA;EACA;AAAA,GACC,mBAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/client/extension-point-client.d.ts
|
|
4
|
+
interface ExtensionPointProps {
|
|
5
|
+
module: string;
|
|
6
|
+
point: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
props?: any;
|
|
9
|
+
fallback?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare function ExtensionPointClient({
|
|
12
|
+
module,
|
|
13
|
+
point,
|
|
14
|
+
className,
|
|
15
|
+
props,
|
|
16
|
+
fallback
|
|
17
|
+
}: ExtensionPointProps): any;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ExtensionPointClient };
|
|
20
|
+
//# sourceMappingURL=extension-point-client.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-client.d.mts","names":[],"sources":["../../src/client/extension-point-client.tsx"],"mappings":";;;UAQU,mBAAA;EACR,MAAA;EACA,KAAA;EACA,SAAA;EACA,KAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;AAAA;AAAA,iBAGH,oBAAA,CAAA;EACd,MAAA;EACA,KAAA;EACA,SAAA;EACA,KAAA;EACA;AAAA,GACC,mBAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { getExtensions } from "../server/ui.mjs";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/extension-point-client.tsx
|
|
8
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: <explanation> */
|
|
9
|
+
function ExtensionPointClient({ module, point, className, props, fallback }) {
|
|
10
|
+
const [extensions, setExtensions] = useState([]);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
getExtensions(module, point).then(setExtensions);
|
|
13
|
+
}, [module, point]);
|
|
14
|
+
if (extensions.length === 0) return fallback || null;
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className,
|
|
17
|
+
children: extensions.map((ext) => {
|
|
18
|
+
const Component = ext.component;
|
|
19
|
+
if (!Component) return null;
|
|
20
|
+
return /* @__PURE__ */ jsx(Component, { ...props }, ext.id);
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ExtensionPointClient };
|
|
27
|
+
//# sourceMappingURL=extension-point-client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-client.mjs","names":[],"sources":["../../src/client/extension-point-client.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: <explanation> */\n\"use client\";\nimport * as React from \"react\";\n\n// import { getExtensions } from \"@kryo-hq/core\";\nimport { useEffect, useState } from \"react\";\nimport { getExtensions } from \"../server/ui\";\n\ninterface ExtensionPointProps {\n module: string;\n point: string;\n className?: string;\n props?: any;\n fallback?: React.ReactNode;\n}\n\nexport function ExtensionPointClient({\n module,\n point,\n className,\n props,\n fallback,\n}: ExtensionPointProps) {\n const [extensions, setExtensions] = useState<any[]>([]);\n\n useEffect(() => {\n getExtensions(module, point).then(setExtensions);\n }, [module, point]);\n\n if (extensions.length === 0) return (fallback as any) || null;\n\n return (\n <div className={className}>\n {extensions.map((ext) => {\n const Component = ext.component;\n if (!Component) return null;\n return <Component key={ext.id} {...props} />;\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgB,qBAAqB,EACnC,QACA,OACA,WACA,OACA,YACsB;CACtB,MAAM,CAAC,YAAY,iBAAiB,SAAgB,EAAE,CAAC;AAEvD,iBAAgB;AACd,gBAAc,QAAQ,MAAM,CAAC,KAAK,cAAc;IAC/C,CAAC,QAAQ,MAAM,CAAC;AAEnB,KAAI,WAAW,WAAW,EAAG,QAAQ,YAAoB;AAEzD,QACE,oBAAC;EAAe;YACb,WAAW,KAAK,QAAQ;GACvB,MAAM,YAAY,IAAI;AACtB,OAAI,CAAC,UAAW,QAAO;AACvB,UAAO,oBAAC,aAAuB,GAAI,SAAZ,IAAI,GAAiB;IAC5C;GACE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_ui = require('../server/ui.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_runtime.__toESM(react);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
|
|
7
|
+
//#region src/client/extension-point.tsx
|
|
8
|
+
async function ExtensionPoint({ module, point, className, props, fallback }) {
|
|
9
|
+
const extensions = await require_ui.getExtensions(module, point);
|
|
10
|
+
if (extensions.length === 0) return fallback || null;
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12
|
+
className,
|
|
13
|
+
children: extensions.map((ext) => {
|
|
14
|
+
const Component = ext.component;
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, { ...props }, ext.id);
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.ExtensionPoint = ExtensionPoint;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/client/extension-point.d.ts
|
|
5
|
+
interface ExtensionPointProps {
|
|
6
|
+
module: string;
|
|
7
|
+
point: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
props?: any;
|
|
10
|
+
fallback?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare function ExtensionPoint({
|
|
13
|
+
module,
|
|
14
|
+
point,
|
|
15
|
+
className,
|
|
16
|
+
props,
|
|
17
|
+
fallback
|
|
18
|
+
}: ExtensionPointProps): Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | react_jsx_runtime0.JSX.Element | null | undefined>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { ExtensionPoint };
|
|
21
|
+
//# sourceMappingURL=extension-point.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point.d.cts","names":[],"sources":["../../src/client/extension-point.tsx"],"mappings":";;;;UAGU,mBAAA;EACR,MAAA;EACA,KAAA;EACA,SAAA;EACA,KAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;AAAA;AAAA,iBAGG,cAAA,CAAA;EACpB,MAAA;EACA,KAAA;EACA,SAAA;EACA,KAAA;EACA;AAAA,GACC,mBAAA,GAAmB,OAAA,sCAAA,QAAA,CAAA,KAAA,CAAA,SAAA,IAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/extension-point.d.ts
|
|
5
|
+
interface ExtensionPointProps {
|
|
6
|
+
module: string;
|
|
7
|
+
point: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
props?: any;
|
|
10
|
+
fallback?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare function ExtensionPoint({
|
|
13
|
+
module,
|
|
14
|
+
point,
|
|
15
|
+
className,
|
|
16
|
+
props,
|
|
17
|
+
fallback
|
|
18
|
+
}: ExtensionPointProps): Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | react_jsx_runtime0.JSX.Element | null | undefined>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { ExtensionPoint };
|
|
21
|
+
//# sourceMappingURL=extension-point.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point.d.mts","names":[],"sources":["../../src/client/extension-point.tsx"],"mappings":";;;;UAGU,mBAAA;EACR,MAAA;EACA,KAAA;EACA,SAAA;EACA,KAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;AAAA;AAAA,iBAGG,cAAA,CAAA;EACpB,MAAA;EACA,KAAA;EACA,SAAA;EACA,KAAA;EACA;AAAA,GACC,mBAAA,GAAmB,OAAA,sCAAA,QAAA,CAAA,KAAA,CAAA,SAAA,IAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getExtensions } from "../server/ui.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/client/extension-point.tsx
|
|
6
|
+
async function ExtensionPoint({ module, point, className, props, fallback }) {
|
|
7
|
+
const extensions = await getExtensions(module, point);
|
|
8
|
+
if (extensions.length === 0) return fallback || null;
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className,
|
|
11
|
+
children: extensions.map((ext) => {
|
|
12
|
+
const Component = ext.component;
|
|
13
|
+
return /* @__PURE__ */ jsx(Component, { ...props }, ext.id);
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ExtensionPoint };
|
|
20
|
+
//# sourceMappingURL=extension-point.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point.mjs","names":[],"sources":["../../src/client/extension-point.tsx"],"sourcesContent":["import { getExtensions } from \"../server/ui\";\nimport * as React from \"react\";\n\ninterface ExtensionPointProps {\n module: string;\n point: string;\n className?: string;\n props?: any;\n fallback?: React.ReactNode;\n}\n\nexport async function ExtensionPoint({\n module,\n point,\n className,\n props,\n fallback,\n}: ExtensionPointProps) {\n const extensions = await getExtensions(module, point);\n\n if (extensions.length === 0) return fallback || null;\n\n return (\n <div className={className}>\n {extensions.map((ext) => {\n const Component = ext.component;\n return <Component key={ext.id} {...props} />;\n })}\n </div>\n );\n}\n"],"mappings":";;;;;AAWA,eAAsB,eAAe,EACnC,QACA,OACA,WACA,OACA,YACsB;CACtB,MAAM,aAAa,MAAM,cAAc,QAAQ,MAAM;AAErD,KAAI,WAAW,WAAW,EAAG,QAAO,YAAY;AAEhD,QACE,oBAAC;EAAe;YACb,WAAW,KAAK,QAAQ;GACvB,MAAM,YAAY,IAAI;AACtB,UAAO,oBAAC,aAAuB,GAAI,SAAZ,IAAI,GAAiB;IAC5C;GACE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_ui = require('../server/ui.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_runtime.__toESM(react);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
|
|
7
|
+
//#region src/client/widget-area.tsx
|
|
8
|
+
async function WidgetArea({ area, className, fallback, props }) {
|
|
9
|
+
const widgets = await require_ui.getModuleWidgets(area);
|
|
10
|
+
if (widgets.length === 0) return fallback || null;
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12
|
+
className,
|
|
13
|
+
children: widgets.map((widget) => {
|
|
14
|
+
const Component = widget.component;
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, { ...props }, widget.id);
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.WidgetArea = WidgetArea;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/client/widget-area.d.ts
|
|
5
|
+
interface WidgetAreaProps {
|
|
6
|
+
area: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
fallback?: React.ReactNode;
|
|
9
|
+
props?: any;
|
|
10
|
+
}
|
|
11
|
+
declare function WidgetArea({
|
|
12
|
+
area,
|
|
13
|
+
className,
|
|
14
|
+
fallback,
|
|
15
|
+
props
|
|
16
|
+
}: WidgetAreaProps): Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | react_jsx_runtime0.JSX.Element | null | undefined>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { WidgetArea };
|
|
19
|
+
//# sourceMappingURL=widget-area.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-area.d.cts","names":[],"sources":["../../src/client/widget-area.tsx"],"mappings":";;;;UAGU,eAAA;EACR,IAAA;EACA,SAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;EAEjB,KAAA;AAAA;AAAA,iBAGoB,UAAA,CAAA;EACpB,IAAA;EACA,SAAA;EACA,QAAA;EACA;AAAA,GACC,eAAA,GAAe,OAAA,sCAAA,QAAA,CAAA,KAAA,CAAA,SAAA,IAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/client/widget-area.d.ts
|
|
5
|
+
interface WidgetAreaProps {
|
|
6
|
+
area: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
fallback?: React.ReactNode;
|
|
9
|
+
props?: any;
|
|
10
|
+
}
|
|
11
|
+
declare function WidgetArea({
|
|
12
|
+
area,
|
|
13
|
+
className,
|
|
14
|
+
fallback,
|
|
15
|
+
props
|
|
16
|
+
}: WidgetAreaProps): Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | react_jsx_runtime0.JSX.Element | null | undefined>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { WidgetArea };
|
|
19
|
+
//# sourceMappingURL=widget-area.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-area.d.mts","names":[],"sources":["../../src/client/widget-area.tsx"],"mappings":";;;;UAGU,eAAA;EACR,IAAA;EACA,SAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;EAEjB,KAAA;AAAA;AAAA,iBAGoB,UAAA,CAAA;EACpB,IAAA;EACA,SAAA;EACA,QAAA;EACA;AAAA,GACC,eAAA,GAAe,OAAA,sCAAA,QAAA,CAAA,KAAA,CAAA,SAAA,IAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getModuleWidgets } from "../server/ui.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/client/widget-area.tsx
|
|
6
|
+
async function WidgetArea({ area, className, fallback, props }) {
|
|
7
|
+
const widgets = await getModuleWidgets(area);
|
|
8
|
+
if (widgets.length === 0) return fallback || null;
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className,
|
|
11
|
+
children: widgets.map((widget) => {
|
|
12
|
+
const Component = widget.component;
|
|
13
|
+
return /* @__PURE__ */ jsx(Component, { ...props }, widget.id);
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { WidgetArea };
|
|
20
|
+
//# sourceMappingURL=widget-area.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-area.mjs","names":[],"sources":["../../src/client/widget-area.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { getModuleWidgets } from \"../server/ui\";\n\ninterface WidgetAreaProps {\n area: string;\n className?: string;\n fallback?: React.ReactNode;\n // Przekazywanie dowolnych propsów do widgetów (np. dane użytkownika)\n props?: any;\n}\n\nexport async function WidgetArea({\n area,\n className,\n fallback,\n props,\n}: WidgetAreaProps) {\n const widgets = await getModuleWidgets(area);\n\n if (widgets.length === 0) {\n return fallback || null;\n }\n\n return (\n <div className={className}>\n {widgets.map((widget) => {\n const Component = widget.component;\n return <Component key={widget.id} {...props} />;\n })}\n </div>\n );\n}\n"],"mappings":";;;;;AAWA,eAAsB,WAAW,EAC/B,MACA,WACA,UACA,SACkB;CAClB,MAAM,UAAU,MAAM,iBAAiB,KAAK;AAE5C,KAAI,QAAQ,WAAW,EACrB,QAAO,YAAY;AAGrB,QACE,oBAAC;EAAe;YACb,QAAQ,KAAK,WAAW;GACvB,MAAM,YAAY,OAAO;AACzB,UAAO,oBAAC,aAA0B,GAAI,SAAf,OAAO,GAAiB;IAC/C;GACE"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_types = require('./types.cjs');
|
|
3
|
+
const require_ui = require('./server/ui.cjs');
|
|
4
|
+
const require_extension_point = require('./client/extension-point.cjs');
|
|
5
|
+
const require_extension_point_client = require('./client/extension-point-client.cjs');
|
|
6
|
+
const require_widget_area = require('./client/widget-area.cjs');
|
|
7
|
+
|
|
8
|
+
exports.ExtensionPoint = require_extension_point.ExtensionPoint;
|
|
9
|
+
exports.ExtensionPointClient = require_extension_point_client.ExtensionPointClient;
|
|
10
|
+
exports.ModuleManifestSchema = require_types.ModuleManifestSchema;
|
|
11
|
+
exports.WidgetArea = require_widget_area.WidgetArea;
|
|
12
|
+
exports.getApiModuleRoutes = require_ui.getApiModuleRoutes;
|
|
13
|
+
exports.getExtensions = require_ui.getExtensions;
|
|
14
|
+
exports.getKryoModuleNavigationGrouped = require_ui.getKryoModuleNavigationGrouped;
|
|
15
|
+
exports.getKryoModuleRoutes = require_ui.getKryoModuleRoutes;
|
|
16
|
+
exports.getKryoPathPrefix = require_ui.getKryoPathPrefix;
|
|
17
|
+
exports.getModuleNavigation = require_ui.getModuleNavigation;
|
|
18
|
+
exports.getModuleNavigationGrouped = require_ui.getModuleNavigationGrouped;
|
|
19
|
+
exports.getModuleWidgets = require_ui.getModuleWidgets;
|
|
20
|
+
exports.getPrivateModuleRoutes = require_ui.getPrivateModuleRoutes;
|
|
21
|
+
exports.getPublicModuleRoutes = require_ui.getPublicModuleRoutes;
|
|
22
|
+
exports.hasExtension = require_ui.hasExtension;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExtensionPoint } from "./client/extension-point.cjs";
|
|
2
|
+
import { ExtensionPointClient } from "./client/extension-point-client.cjs";
|
|
3
|
+
import { WidgetArea } from "./client/widget-area.cjs";
|
|
4
|
+
import { ApiRouteDefinition, IModule, ModuleExtension, ModuleManifest, ModuleManifestSchema, ModuleNavElement, ModuleNavigation, ModuleNavigationGroupMap, ModulePageProps, ModuleRouteDefinition, ModuleWidget, PrivateRouteDefinition, PublicRouteDefinition, SidebarGroupType, SidebarMenuItemType, SidebarMenuType, SystemEvent } from "./types.cjs";
|
|
5
|
+
import { getApiModuleRoutes, getExtensions, getKryoModuleNavigationGrouped, getKryoModuleRoutes, getKryoPathPrefix, getModuleNavigation, getModuleNavigationGrouped, getModuleWidgets, getPrivateModuleRoutes, getPublicModuleRoutes, hasExtension } from "./server/ui.cjs";
|
|
6
|
+
export { ApiRouteDefinition, ExtensionPoint, ExtensionPointClient, IModule, ModuleExtension, ModuleManifest, ModuleManifestSchema, ModuleNavElement, ModuleNavigation, ModuleNavigationGroupMap, ModulePageProps, ModuleRouteDefinition, ModuleWidget, PrivateRouteDefinition, PublicRouteDefinition, SidebarGroupType, SidebarMenuItemType, SidebarMenuType, SystemEvent, WidgetArea, getApiModuleRoutes, getExtensions, getKryoModuleNavigationGrouped, getKryoModuleRoutes, getKryoPathPrefix, getModuleNavigation, getModuleNavigationGrouped, getModuleWidgets, getPrivateModuleRoutes, getPublicModuleRoutes, hasExtension };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExtensionPoint } from "./client/extension-point.mjs";
|
|
2
|
+
import { ExtensionPointClient } from "./client/extension-point-client.mjs";
|
|
3
|
+
import { WidgetArea } from "./client/widget-area.mjs";
|
|
4
|
+
import { ApiRouteDefinition, IModule, ModuleExtension, ModuleManifest, ModuleManifestSchema, ModuleNavElement, ModuleNavigation, ModuleNavigationGroupMap, ModulePageProps, ModuleRouteDefinition, ModuleWidget, PrivateRouteDefinition, PublicRouteDefinition, SidebarGroupType, SidebarMenuItemType, SidebarMenuType, SystemEvent } from "./types.mjs";
|
|
5
|
+
import { getApiModuleRoutes, getExtensions, getKryoModuleNavigationGrouped, getKryoModuleRoutes, getKryoPathPrefix, getModuleNavigation, getModuleNavigationGrouped, getModuleWidgets, getPrivateModuleRoutes, getPublicModuleRoutes, hasExtension } from "./server/ui.mjs";
|
|
6
|
+
export { ApiRouteDefinition, ExtensionPoint, ExtensionPointClient, IModule, ModuleExtension, ModuleManifest, ModuleManifestSchema, ModuleNavElement, ModuleNavigation, ModuleNavigationGroupMap, ModulePageProps, ModuleRouteDefinition, ModuleWidget, PrivateRouteDefinition, PublicRouteDefinition, SidebarGroupType, SidebarMenuItemType, SidebarMenuType, SystemEvent, WidgetArea, getApiModuleRoutes, getExtensions, getKryoModuleNavigationGrouped, getKryoModuleRoutes, getKryoPathPrefix, getModuleNavigation, getModuleNavigationGrouped, getModuleWidgets, getPrivateModuleRoutes, getPublicModuleRoutes, hasExtension };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ModuleManifestSchema } from "./types.mjs";
|
|
2
|
+
import { getApiModuleRoutes, getExtensions, getKryoModuleNavigationGrouped, getKryoModuleRoutes, getKryoPathPrefix, getModuleNavigation, getModuleNavigationGrouped, getModuleWidgets, getPrivateModuleRoutes, getPublicModuleRoutes, hasExtension } from "./server/ui.mjs";
|
|
3
|
+
import { ExtensionPoint } from "./client/extension-point.mjs";
|
|
4
|
+
import { ExtensionPointClient } from "./client/extension-point-client.mjs";
|
|
5
|
+
import { WidgetArea } from "./client/widget-area.mjs";
|
|
6
|
+
|
|
7
|
+
export { ExtensionPoint, ExtensionPointClient, ModuleManifestSchema, WidgetArea, getApiModuleRoutes, getExtensions, getKryoModuleNavigationGrouped, getKryoModuleRoutes, getKryoPathPrefix, getModuleNavigation, getModuleNavigationGrouped, getModuleWidgets, getPrivateModuleRoutes, getPublicModuleRoutes, hasExtension };
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
|
|
3
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
4
|
+
const require_manage = require('./manage.cjs');
|
|
5
|
+
let _kryo_core_server = require("@kryo/core/server");
|
|
6
|
+
let _kryo_core = require("@kryo/core");
|
|
7
|
+
let drizzle_orm = require("drizzle-orm");
|
|
8
|
+
|
|
9
|
+
//#region src/server/lifecycle.ts
|
|
10
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
11
|
+
async function updateStep(moduleId, step) {
|
|
12
|
+
console.log(`[Kernel] "${moduleId}" step: ${step}`);
|
|
13
|
+
await _kryo_core_server.db.update(_kryo_core.systemModulesTable).set({ lastStep: step }).where((0, drizzle_orm.eq)(_kryo_core.systemModulesTable.id, moduleId));
|
|
14
|
+
}
|
|
15
|
+
async function resolveSchemaPath(moduleId) {
|
|
16
|
+
const path = await import("node:path");
|
|
17
|
+
const fs = await import("node:fs/promises");
|
|
18
|
+
const root = process.cwd();
|
|
19
|
+
if (moduleId === "@kryo/core" || moduleId === "core") {
|
|
20
|
+
const p = path.join(root, "node_modules", "@kryo", "core", "dist", "server", "database", "schema.cjs");
|
|
21
|
+
try {
|
|
22
|
+
await fs.access(p);
|
|
23
|
+
return p;
|
|
24
|
+
} catch {
|
|
25
|
+
const devP = path.resolve(root, "../../packages/kryo-core/src/server/database/schema.ts");
|
|
26
|
+
try {
|
|
27
|
+
await fs.access(devP);
|
|
28
|
+
return devP;
|
|
29
|
+
} catch {}
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const cleanId = moduleId.replace("@kryo/", "");
|
|
34
|
+
const possible = [
|
|
35
|
+
path.join(root, "modules", cleanId, "schema.ts"),
|
|
36
|
+
path.join(root, "modules", moduleId, "schema.ts"),
|
|
37
|
+
path.join(root, "node_modules", moduleId, "dist", "schema.cjs"),
|
|
38
|
+
path.join(root, "node_modules", `@kryo/${cleanId}`, "dist", "schema.cjs"),
|
|
39
|
+
path.resolve(root, "../../packages", cleanId, "src", "schema.ts"),
|
|
40
|
+
path.resolve(root, "../../packages", `kryo-${cleanId}`, "src", "schema.ts"),
|
|
41
|
+
path.resolve(root, "../../packages", cleanId, "schema.ts")
|
|
42
|
+
];
|
|
43
|
+
for (const p of possible) try {
|
|
44
|
+
await fs.access(p);
|
|
45
|
+
console.log(`[Kernel:Lifecycle] Resolved schema for ${moduleId} at: ${p}`);
|
|
46
|
+
return p;
|
|
47
|
+
} catch {}
|
|
48
|
+
console.warn(`[Kernel:Lifecycle] Could not resolve schema path for: ${moduleId}`);
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
async function pushModuleSchema(moduleId) {
|
|
52
|
+
const { exec } = await import("node:child_process");
|
|
53
|
+
const { promisify } = await import("node:util");
|
|
54
|
+
const execAsync = promisify(exec);
|
|
55
|
+
const path = await import("node:path");
|
|
56
|
+
console.log(`[Kernel:Lifecycle] Targeted sync for module: ${moduleId}`);
|
|
57
|
+
const root = process.cwd();
|
|
58
|
+
const enabledFromDb = await _kryo_core_server.db.select({ id: _kryo_core.systemModulesTable.id }).from(_kryo_core.systemModulesTable).where((0, drizzle_orm.eq)(_kryo_core.systemModulesTable.enabled, true));
|
|
59
|
+
const activeModuleIds = new Set(enabledFromDb.map((m) => m.id));
|
|
60
|
+
activeModuleIds.add("@kryo/core");
|
|
61
|
+
activeModuleIds.add(moduleId);
|
|
62
|
+
const schemaPaths = [];
|
|
63
|
+
for (const id of Array.from(activeModuleIds)) {
|
|
64
|
+
const p = await resolveSchemaPath(id);
|
|
65
|
+
if (p) schemaPaths.push(p);
|
|
66
|
+
}
|
|
67
|
+
if (schemaPaths.length === 0) {
|
|
68
|
+
console.warn(`[Kernel:Lifecycle] No schema paths resolved for ${moduleId}, skipping push.`);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const configPath = path.join(root, "drizzle.config.ts");
|
|
72
|
+
const cmd = `"${path.join(root, "node_modules", ".bin", "drizzle-kit")}" push --force --config=${configPath}`;
|
|
73
|
+
console.log(`[Kernel:Lifecycle] Executing isolated migration. Modules: ${Array.from(activeModuleIds).join(", ")}`);
|
|
74
|
+
try {
|
|
75
|
+
await execAsync(cmd, {
|
|
76
|
+
env: {
|
|
77
|
+
...process.env,
|
|
78
|
+
CI: "true",
|
|
79
|
+
DRIZZLE_SCHEMA_OVERRIDE: schemaPaths.join(",")
|
|
80
|
+
},
|
|
81
|
+
cwd: root
|
|
82
|
+
});
|
|
83
|
+
console.log(`[Kernel:Lifecycle] Isolated migration successful for ${moduleId}`);
|
|
84
|
+
} catch (e) {
|
|
85
|
+
console.error(`[Kernel:Lifecycle] Isolated migration failed for ${moduleId}:`);
|
|
86
|
+
console.error(e.stdout || e.message);
|
|
87
|
+
throw new Error(`Migration failed: ${moduleId}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async function performToggle(moduleId, isEnabled) {
|
|
91
|
+
try {
|
|
92
|
+
const { exec } = await import("node:child_process");
|
|
93
|
+
const { promisify } = await import("node:util");
|
|
94
|
+
promisify(exec);
|
|
95
|
+
const allModules = await require_manage.getModules();
|
|
96
|
+
const manifest = allModules.find((m) => m.id === moduleId);
|
|
97
|
+
await updateStep(moduleId, "Validate module...");
|
|
98
|
+
await sleep(500);
|
|
99
|
+
if (!manifest) return;
|
|
100
|
+
if (isEnabled) {
|
|
101
|
+
await updateStep(moduleId, "Queued...");
|
|
102
|
+
await sleep(500);
|
|
103
|
+
if (manifest.dependencies?.length) {
|
|
104
|
+
const pendingDeps = manifest.dependencies.filter((depId) => {
|
|
105
|
+
const dep = allModules.find((m) => m.id === depId);
|
|
106
|
+
return dep && !dep.enabled && !dep.system;
|
|
107
|
+
});
|
|
108
|
+
if (pendingDeps.length > 0) {
|
|
109
|
+
await updateStep(moduleId, "Waiting for dependencies...");
|
|
110
|
+
for (const depId of pendingDeps) {
|
|
111
|
+
await performToggle(depId, true);
|
|
112
|
+
await sleep(500);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
await updateStep(moduleId, "Initializing...");
|
|
117
|
+
await sleep(500);
|
|
118
|
+
await _kryo_core_server.db.update(_kryo_core.systemModulesTable).set({ enabled: true }).where((0, drizzle_orm.eq)(_kryo_core.systemModulesTable.id, moduleId));
|
|
119
|
+
const instance = await require_manage.getModuleInstance(moduleId);
|
|
120
|
+
await updateStep(moduleId, "Migrate database...");
|
|
121
|
+
await sleep(500);
|
|
122
|
+
try {
|
|
123
|
+
if (instance?.onMigrate) await instance.onMigrate();
|
|
124
|
+
else await pushModuleSchema(moduleId);
|
|
125
|
+
await updateStep(moduleId, "Migration successful");
|
|
126
|
+
} catch (e) {
|
|
127
|
+
await updateStep(moduleId, `Migration failed: ${e.message}`);
|
|
128
|
+
await sleep(500);
|
|
129
|
+
}
|
|
130
|
+
if (instance?.onEnable) {
|
|
131
|
+
await updateStep(moduleId, "Running setup...");
|
|
132
|
+
await sleep(500);
|
|
133
|
+
await instance.onEnable();
|
|
134
|
+
}
|
|
135
|
+
await updateStep(moduleId, "Finishing...");
|
|
136
|
+
await sleep(500);
|
|
137
|
+
await _kryo_core_server.db.update(_kryo_core.systemModulesTable).set({
|
|
138
|
+
installed: true,
|
|
139
|
+
lastStep: null
|
|
140
|
+
}).where((0, drizzle_orm.eq)(_kryo_core.systemModulesTable.id, moduleId));
|
|
141
|
+
} else {
|
|
142
|
+
const dependents = allModules.filter((m) => {
|
|
143
|
+
if (!m.enabled || m.id === moduleId) return false;
|
|
144
|
+
if (m.dependencies?.includes(moduleId)) return true;
|
|
145
|
+
if (m.extends?.includes(moduleId)) return m.extends.filter((targetId) => {
|
|
146
|
+
if (targetId === moduleId) return false;
|
|
147
|
+
return allModules.find((mod) => mod.id === targetId)?.enabled;
|
|
148
|
+
}).length === 0;
|
|
149
|
+
return false;
|
|
150
|
+
});
|
|
151
|
+
if (dependents.length > 0) {
|
|
152
|
+
await updateStep(moduleId, `Deactivating dependents...`);
|
|
153
|
+
for (const dep of dependents) {
|
|
154
|
+
await performToggle(dep.id, false);
|
|
155
|
+
await sleep(1e3);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
await updateStep(moduleId, "Deactivating...");
|
|
159
|
+
const instance = await require_manage.getModuleInstance(moduleId);
|
|
160
|
+
if (instance?.onDisable) await instance.onDisable();
|
|
161
|
+
await _kryo_core_server.db.update(_kryo_core.systemModulesTable).set({
|
|
162
|
+
enabled: false,
|
|
163
|
+
installed: false
|
|
164
|
+
}).where((0, drizzle_orm.eq)(_kryo_core.systemModulesTable.id, moduleId));
|
|
165
|
+
await updateStep(moduleId, null);
|
|
166
|
+
}
|
|
167
|
+
} catch (e) {
|
|
168
|
+
console.error(`[Kernel] Fatal error for ${moduleId}:`, e);
|
|
169
|
+
await updateStep(moduleId, `Error: ${e.message}`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
async function toggleModuleState(moduleId, isEnabled) {
|
|
173
|
+
const manifest = (await require_manage.getModules()).find((m) => m.id === moduleId);
|
|
174
|
+
if (!manifest) throw new Error(`Module "${moduleId}" not found`);
|
|
175
|
+
if (manifest.enabled === isEnabled) return { success: true };
|
|
176
|
+
performToggle(moduleId, isEnabled);
|
|
177
|
+
return { success: true };
|
|
178
|
+
}
|
|
179
|
+
async function initOperationalModules() {
|
|
180
|
+
const allModules = await require_manage.getModules();
|
|
181
|
+
for (const mod of allModules) if (mod.enabled) try {
|
|
182
|
+
const instance = await require_manage.getModuleInstance(mod.id);
|
|
183
|
+
if (instance?.init) await instance.init();
|
|
184
|
+
} catch (e) {
|
|
185
|
+
console.error(`[Kernel] Failed to init module ${mod.id}:`, e);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
exports.initOperationalModules = initOperationalModules;
|
|
191
|
+
exports.pushModuleSchema = pushModuleSchema;
|
|
192
|
+
exports.toggleModuleState = toggleModuleState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/server/lifecycle.d.ts
|
|
2
|
+
declare function pushModuleSchema(moduleId: string): Promise<void>;
|
|
3
|
+
declare function toggleModuleState(moduleId: string, isEnabled: boolean): Promise<{
|
|
4
|
+
success: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
declare function initOperationalModules(): Promise<void>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { initOperationalModules, pushModuleSchema, toggleModuleState };
|
|
9
|
+
//# sourceMappingURL=lifecycle.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.cts","names":[],"sources":["../../src/server/lifecycle.ts"],"mappings":";iBAqFsB,gBAAA,CAAiB,QAAA,WAAgB,OAAA;AAAA,iBAsLjC,iBAAA,CAAkB,QAAA,UAAkB,SAAA,YAAkB,OAAA;;;iBAWtD,sBAAA,CAAA,GAAsB,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/server/lifecycle.d.ts
|
|
2
|
+
declare function pushModuleSchema(moduleId: string): Promise<void>;
|
|
3
|
+
declare function toggleModuleState(moduleId: string, isEnabled: boolean): Promise<{
|
|
4
|
+
success: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
declare function initOperationalModules(): Promise<void>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { initOperationalModules, pushModuleSchema, toggleModuleState };
|
|
9
|
+
//# sourceMappingURL=lifecycle.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.mts","names":[],"sources":["../../src/server/lifecycle.ts"],"mappings":";iBAqFsB,gBAAA,CAAiB,QAAA,WAAgB,OAAA;AAAA,iBAsLjC,iBAAA,CAAkB,QAAA,UAAkB,SAAA,YAAkB,OAAA;;;iBAWtD,sBAAA,CAAA,GAAsB,OAAA"}
|