@lunora/cli 1.0.0-alpha.55 → 1.0.0-alpha.56
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.
|
@@ -9,7 +9,7 @@ import { d as defineHandler } from '../packem_shared/command-D3lB_4Az.mjs';
|
|
|
9
9
|
import { d as detectPackageManager, e as execArgsFor, r as runScriptCommand } from '../packem_shared/detect-package-manager-Cxo6Tpyx.mjs';
|
|
10
10
|
import { createServer, request } from 'node:http';
|
|
11
11
|
import { connect } from 'node:net';
|
|
12
|
-
import { loadStudioAssets, studioAssetsStamp, renderStudioHtml, resolveAdminToken, SCHEMA_EDIT_ENDPOINT, POLICY_SCAFFOLD_ENDPOINT, SEED_ENDPOINT, serveJsonHandler, handleSchemaEditRequest, handlePolicyScaffoldRequest, handleSeedRequest } from '@lunora/config/studio-host';
|
|
12
|
+
import { loadStudioAssets, studioAssetsStamp, renderStudioHtml, resolveAdminToken, SCHEMA_EDIT_ENDPOINT, POLICY_SCAFFOLD_ENDPOINT, SEED_ENDPOINT, serveJsonHandler, isStandaloneModulePath, readStandaloneAsset, assetContentType, handleSchemaEditRequest, handlePolicyScaffoldRequest, handleSeedRequest } from '@lunora/config/studio-host';
|
|
13
13
|
import { c as createTuiConfirm } from '../packem_shared/tui-prompts-BjEN8XgP.mjs';
|
|
14
14
|
|
|
15
15
|
const DEFAULT_DEBOUNCE_MS = 100;
|
|
@@ -166,7 +166,9 @@ const startStudioServer = async (options) => {
|
|
|
166
166
|
response.end(deniedMessage);
|
|
167
167
|
};
|
|
168
168
|
const serveStaticAsset = (pathname, response) => {
|
|
169
|
-
|
|
169
|
+
const isStyle = pathname === "/styles.css";
|
|
170
|
+
const isModule = isStandaloneModulePath(pathname);
|
|
171
|
+
if (!isStyle && !isModule) {
|
|
170
172
|
return false;
|
|
171
173
|
}
|
|
172
174
|
const stamp = studioAssetsStamp(import.meta.url);
|
|
@@ -180,8 +182,19 @@ const startStudioServer = async (options) => {
|
|
|
180
182
|
response.end("Lunora studio assets not found — install and build @lunora/studio.");
|
|
181
183
|
return true;
|
|
182
184
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
if (isStyle) {
|
|
186
|
+
sendAsset(response, assets.styles, "text/css; charset=utf-8");
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
const fileName = pathname.slice(pathname.lastIndexOf("/") + 1);
|
|
190
|
+
const bytes = readStandaloneAsset(fileName, import.meta.url);
|
|
191
|
+
if (bytes === void 0) {
|
|
192
|
+
response.statusCode = 404;
|
|
193
|
+
response.setHeader("Content-Type", "text/plain");
|
|
194
|
+
response.end("Not found");
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
sendAsset(response, bytes, assetContentType(fileName));
|
|
185
198
|
return true;
|
|
186
199
|
};
|
|
187
200
|
const document = Buffer.from(html);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/cli",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.56",
|
|
4
4
|
"description": "The Lunora CLI: init, dev, deploy, codegen, run, reset, and migrate commands",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@bomb.sh/tab": "0.0.17",
|
|
55
55
|
"@lunora/codegen": "1.0.0-alpha.27",
|
|
56
|
-
"@lunora/config": "1.0.0-alpha.
|
|
56
|
+
"@lunora/config": "1.0.0-alpha.44",
|
|
57
57
|
"@lunora/container": "1.0.0-alpha.5",
|
|
58
58
|
"@lunora/d1": "1.0.0-alpha.20",
|
|
59
59
|
"@lunora/seed": "1.0.0-alpha.13",
|