@kitledger/admin 0.0.1 → 0.0.2
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-package/admin.d.ts +1 -1
- package/dist-package/admin.js +4 -3
- package/package.json +2 -2
package/dist-package/admin.d.ts
CHANGED
package/dist-package/admin.js
CHANGED
|
@@ -14,8 +14,9 @@ const DIST_PATH = path.resolve(__dirname, '../dist');
|
|
|
14
14
|
const assetsPath = relative(process.cwd(), DIST_PATH);
|
|
15
15
|
export function defineAdminUI(options) {
|
|
16
16
|
return {
|
|
17
|
-
|
|
17
|
+
serverPath: options.serverPath,
|
|
18
18
|
htmlContent: getAdminHtmlContent(options),
|
|
19
|
+
basePath: options.basePath || '/admin',
|
|
19
20
|
assetsPath: assetsPath
|
|
20
21
|
};
|
|
21
22
|
}
|
|
@@ -29,9 +30,9 @@ function getAdminHtmlContent(config) {
|
|
|
29
30
|
throw new Error(`Kitledger UI not found at ${htmlPath}.`);
|
|
30
31
|
}
|
|
31
32
|
let html = fs.readFileSync(htmlPath, 'utf-8');
|
|
32
|
-
const safeBase = config.basePath
|
|
33
|
+
const safeBase = config.basePath.endsWith('/')
|
|
33
34
|
? config.basePath
|
|
34
|
-
: `${config.basePath
|
|
35
|
+
: `${config.basePath}/`;
|
|
35
36
|
const injection = `
|
|
36
37
|
<base href="${safeBase}" />
|
|
37
38
|
<script>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitledger/admin",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"import": "./dist-package/admin.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"globals": "^16.5.0",
|
|
31
31
|
"typescript": "~5.9.3",
|
|
32
32
|
"vite": "npm:rolldown-vite@7.2.5",
|
|
33
|
-
"@kitledger/core": "0.0.
|
|
33
|
+
"@kitledger/core": "0.0.2"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"dev": "vite",
|