dsh-webui-studio 0.2.0 → 0.2.1
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/lib/host/preview-worker.js +1 -9
- package/lib/host/routes.js +0 -7
- package/package.json +1 -1
|
@@ -211,15 +211,7 @@ export function applyPreviewWorker(ctx, harmony, options) {
|
|
|
211
211
|
response.end(request.method === 'HEAD' ? undefined : options.bridge);
|
|
212
212
|
},
|
|
213
213
|
};
|
|
214
|
-
const
|
|
215
|
-
kind: 'prefix',
|
|
216
|
-
path: '/dsh-harmony/studio-preview/api',
|
|
217
|
-
handler(_request, response) {
|
|
218
|
-
response.writeHead(404);
|
|
219
|
-
response.end('not found');
|
|
220
|
-
},
|
|
221
|
-
};
|
|
222
|
-
const dispose = [ctx.webServer.register(bridge), ctx.webServer.register(removedApi), ctx.webServer.tapIndex(html => {
|
|
214
|
+
const dispose = [ctx.webServer.register(bridge), ctx.webServer.tapIndex(html => {
|
|
223
215
|
const config = `<script>window.__DSH_STUDIO_PREVIEW__=${JSON.stringify({
|
|
224
216
|
parentOrigin: options.parentOrigin,
|
|
225
217
|
capability: options.bridgeCapability,
|
package/lib/host/routes.js
CHANGED
|
@@ -74,13 +74,6 @@ export function createStudioRoutes(assets, ready = () => true) {
|
|
|
74
74
|
const page = Buffer.from(documentHtml());
|
|
75
75
|
const setupPage = Buffer.from(harmonySetupHtml());
|
|
76
76
|
return [
|
|
77
|
-
{
|
|
78
|
-
kind: 'prefix',
|
|
79
|
-
path: `${STUDIO_PATH}/api`,
|
|
80
|
-
handler(_request, response) {
|
|
81
|
-
sendJson(response, 404, { error: 'not found' });
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
77
|
{
|
|
85
78
|
kind: 'exact',
|
|
86
79
|
path: STUDIO_PATH,
|