Skip to content

Commit c31e92d

Browse files
build(config): enhance bundling configuration for extension compatibility
- Added Reserved array to protect critical identifiers from minification mangling, ensuring VS Code extension API compatibility in Cocoon shim layer - Updated Terser compression settings to ECMAScript 2020 standard and increased optimization passes while preserving console/debugger removal for production builds - Disabled identifier mangling to maintain API contract stability between Sky frontend and Cocoon extension host - Enabled experimental decorators in TypeScript configuration to support dependency injection patterns in Mountain's effect system - Added explicit file copy for VS Code keyboard layout resources to ensure proper localization support in Sky UI - Configured modern ECMAScript parsing targets to align with VS Code's runtime requirements while maintaining Tauri's webview compatibility These changes improve build artifact reliability for the Cocoon extension host environment while maintaining strict compatibility with VS Code's extension API surface area.
1 parent 23f5b9c commit c31e92d

12 files changed

Lines changed: 164 additions & 11 deletions

Source/pages/Application.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ const Browser = process.env["Browser"] === "true";
185185
;
186186
script-src
187187
'self'
188+
'unsafe-inline'
188189
'unsafe-eval'
189190
blob:
190191
;

Target/Application/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html class=no-js data-beasties-container dir=ltr lang=en><head><script type=module>document.documentElement.classList.remove("no-js"),document.documentElement.classList.add("js")</script><title>FIDDEE</title><meta charset=utf-8><meta content name=description><meta content=yes name=mobile-web-app-capable><meta content=yes name=apple-mobile-web-app-capable><meta content=FIDDEE name=apple-mobile-web-app-title><meta content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" name=viewport><meta content=#ffffff name=theme-color><meta content="telephone=no" name=format-detection><meta content=on name=twitter:dnt><meta content=" default-src 'none' ; img-src 'self' data: blob: vscode-remote-resource: vscode-managed-remote-resource: https: ; manifest-src 'self' ; media-src 'self' ; frame-src 'self' vscode-webview: ; script-src 'self' 'unsafe-eval' blob: ; style-src 'self' 'unsafe-inline' ; connect-src 'self' wss://tauri.localhost https: ; font-src 'self' vscode-remote-resource: vscode-managed-remote-resource: ; block-all-mixed-content ; upgrade-insecure-requests ; require-trusted-types-for 'script' ; trusted-types WorkerApplication amdLoader cellRendererEditorText defaultWorkerFactory diffEditorWidget diffReview domLineBreaksComputer dompurify editorGhostText editorViewLayer notebookRenderer stickyScrollViewLayer tokenizeToString notebookChatEditController ; " http-equiv=Content-Security-Policy><meta data-settings={&#34;remoteAuthority&#34;:&#34;&#34;,&#34;serverBasePath&#34;:&#34;/&#34;,&#34;connectionToken&#34;:&#34;&#34;,&#34;enableWorkspaceTrust&#34;:true,&#34;settingsSyncOptions&#34;:{&#34;enabled&#34;:false},&#34;productConfiguration&#34;:{&#34;embedderIdentifier&#34;:&#34;desktop&#34;,&#34;nameShort&#34;:&#34;FIDDEE&#34;,&#34;nameLong&#34;:&#34;FIDDEE&#34;,&#34;applicationName&#34;:&#34;fiddee&#34;},&#34;developmentOptions&#34;:{&#34;logLevel&#34;:0,&#34;enableSmokeTestDriver&#34;:false}} id=vscode-workbench-web-configuration><meta data-settings={} id=vscode-workbench-auth-session><link href=/Manifest.json rel=manifest crossorigin=use-credentials><script type=module>const Site="https://tauri.localhost/";globalThis._VSCODE_FILE_ROOT=`${Site}/Static/Application/`</script><script type=module>const Worker="/Worker.js?BASE_REMOTE=https%3A%2F%2Ftauri.localhost%2F&Time=1746516769390";window._WORKER=Worker</script><style>:root{--vscode-sash-size:4px;--vscode-sash-hover-size:4px}@property --chat-editing-last-edit-shift{syntax:"<percentage>";initial-value:100%;inherits:false}@property --inline-chat-frame-progress{syntax:"<percentage>";initial-value:0%;inherits:false}body{height:100%;width:100%;margin:0;padding:0;overflow:hidden;font-size:11px;user-select:none;-webkit-user-select:none}</style><link href=/_astro/Browser.CRM72xFj.css rel=stylesheet media=print onload="this.media=&#34;all&#34;"><noscript><link href=/_astro/Browser.CRM72xFj.css rel=stylesheet></noscript></head><body aria-label><script type=module>window._LOAD_CSS_WORKER=e=>{const r=e+(e.includes("?")?"&":"?")+"Skip=Intercept";try{if(document.querySelector(`link[href="${r}"]`))return;const e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=r,e.onerror=r=>{e.remove()},e.onload=()=>{},document.head.appendChild(e)}catch{}},(()=>{if(window._POLICY_WORKER=window._POLICY_WORKER||{},window.trustedTypes&&window.trustedTypes.createPolicy&&!window._POLICY_WORKER.WorkerApplication)try{window._POLICY_WORKER.WorkerApplication=window.trustedTypes.createPolicy("WorkerApplication",{createScriptURL:e=>{if(e&&/^\/[^/\\:]+\.js(\?.*)?$/.test(e))return e;throw new TypeError(`Invalid URL format for service worker script: ${e}`)}})}catch(e){e instanceof TypeError&&e.message.includes("already exists")}})();const e="string"==typeof window._WORKER?window._WORKER:"/Worker.js",r="WorkerReload";if("serviceWorker"in navigator){navigator.serviceWorker.addEventListener("controllerchange",(()=>{"true"===sessionStorage.getItem(r)&&(sessionStorage.removeItem(r),window.location.reload())})),navigator.serviceWorker.addEventListener("message",(e=>{"New"===e.data?.Version&&window.location.reload()}));const t=async()=>{const t=!!navigator.serviceWorker.controller;try{let o;if(window.trustedTypes)try{const r=window._POLICY_WORKER?.WorkerApplication;if(!r)throw new Error("Required Trusted Types policy 'WorkerApplication' not found. Ensure Policy.js executes first and succeeds.");o=r.createScriptURL(e)}catch(e){throw e}else o=e;const i=await navigator.serviceWorker.register(o,{scope:"/Application",type:"module"});i.installing||i.waiting||i.active,await navigator.serviceWorker.ready;const n=!!navigator.serviceWorker.controller;if(t||n)sessionStorage.getItem(r)&&sessionStorage.removeItem(r);else{if(!sessionStorage.getItem(r))return sessionStorage.setItem(r,"true"),void window.location.reload();sessionStorage.removeItem(r)}}catch(e){e instanceof TypeError&&(e.message.includes("TrustedScriptURL")||e.message.includes("Trusted Type")),sessionStorage.removeItem(r)}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}</script><script type=module src=/_astro/Browser.astro_astro_type_script_index_0_lang.Cm3WIShT.js></script></body></html>
1+
<!DOCTYPE html><html class=no-js data-beasties-container dir=ltr lang=en><head><script type=module>document.documentElement.classList.remove("no-js"),document.documentElement.classList.add("js")</script><title>FIDDEE</title><meta charset=utf-8><meta content name=description><meta content=yes name=mobile-web-app-capable><meta content=yes name=apple-mobile-web-app-capable><meta content=FIDDEE name=apple-mobile-web-app-title><meta content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" name=viewport><meta content=#ffffff name=theme-color><meta content="telephone=no" name=format-detection><meta content=on name=twitter:dnt><meta content=" default-src 'none' ; img-src 'self' data: blob: vscode-remote-resource: vscode-managed-remote-resource: https: ; manifest-src 'self' ; media-src 'self' ; frame-src 'self' vscode-webview: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: ; style-src 'self' 'unsafe-inline' ; connect-src 'self' wss://tauri.localhost https: ; font-src 'self' vscode-remote-resource: vscode-managed-remote-resource: ; block-all-mixed-content ; upgrade-insecure-requests ; require-trusted-types-for 'script' ; trusted-types WorkerApplication amdLoader cellRendererEditorText defaultWorkerFactory diffEditorWidget diffReview domLineBreaksComputer dompurify editorGhostText editorViewLayer notebookRenderer stickyScrollViewLayer tokenizeToString notebookChatEditController ; " http-equiv=Content-Security-Policy><meta data-settings={&#34;remoteAuthority&#34;:&#34;&#34;,&#34;serverBasePath&#34;:&#34;/&#34;,&#34;connectionToken&#34;:&#34;&#34;,&#34;enableWorkspaceTrust&#34;:true,&#34;settingsSyncOptions&#34;:{&#34;enabled&#34;:false},&#34;productConfiguration&#34;:{&#34;embedderIdentifier&#34;:&#34;desktop&#34;,&#34;nameShort&#34;:&#34;FIDDEE&#34;,&#34;nameLong&#34;:&#34;FIDDEE&#34;,&#34;applicationName&#34;:&#34;fiddee&#34;},&#34;developmentOptions&#34;:{&#34;logLevel&#34;:0,&#34;enableSmokeTestDriver&#34;:false}} id=vscode-workbench-web-configuration><meta data-settings={} id=vscode-workbench-auth-session><link href=/Manifest.json rel=manifest crossorigin=use-credentials><script type=module>const Site="https://tauri.localhost/";globalThis._VSCODE_FILE_ROOT=`${Site}/Static/Application/`</script><script type=module>const Worker="/Worker.js?BASE_REMOTE=https%3A%2F%2Ftauri.localhost%2F&Time=1746528213663";window._WORKER=Worker</script><style>:root{--vscode-sash-size:4px;--vscode-sash-hover-size:4px}@property --chat-editing-last-edit-shift{syntax:"<percentage>";initial-value:100%;inherits:false}@property --inline-chat-frame-progress{syntax:"<percentage>";initial-value:0%;inherits:false}body{height:100%;width:100%;margin:0;padding:0;overflow:hidden;font-size:11px;user-select:none;-webkit-user-select:none}</style><link href=/_astro/Browser.CRM72xFj.css rel=stylesheet media=print onload="this.media=&#34;all&#34;"><noscript><link href=/_astro/Browser.CRM72xFj.css rel=stylesheet></noscript></head><body aria-label><script type=module>window._LOAD_CSS_WORKER=e=>{const r=e+(e.includes("?")?"&":"?")+"Skip=Intercept";try{if(document.querySelector(`link[href="${r}"]`))return;const e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=r,e.onerror=r=>{e.remove()},e.onload=()=>{},document.head.appendChild(e)}catch{}},(()=>{if(window._POLICY_WORKER=window._POLICY_WORKER||{},window.trustedTypes&&window.trustedTypes.createPolicy&&!window._POLICY_WORKER.WorkerApplication)try{window._POLICY_WORKER.WorkerApplication=window.trustedTypes.createPolicy("WorkerApplication",{createScriptURL:e=>{if(e&&/^\/[^/\\:]+\.js(\?.*)?$/.test(e))return e;throw new TypeError(`Invalid URL format for service worker script: ${e}`)}})}catch(e){e instanceof TypeError&&e.message.includes("already exists")}})();const s="string"==typeof window._WORKER?window._WORKER:"/Worker.js",e="WorkerReload";if("serviceWorker"in navigator){navigator.serviceWorker.addEventListener("controllerchange",(()=>{"true"===sessionStorage.getItem(e)&&(sessionStorage.removeItem(e),window.location.reload())})),navigator.serviceWorker.addEventListener("message",(e=>{"New"===e.data?.Version&&window.location.reload()}));const r=async()=>{const r=!!navigator.serviceWorker.controller;try{let t;if(window.trustedTypes)try{const e=window._POLICY_WORKER?.WorkerApplication;if(!e)throw new Error("Required Trusted Types policy 'WorkerApplication' not found. Ensure Policy.js executes first and succeeds.");t=e.createScriptURL(s)}catch(e){throw e}else t=s;const o=await navigator.serviceWorker.register(t,{scope:"/Application",type:"module"});o.installing||o.waiting||o.active,await navigator.serviceWorker.ready;const i=!!navigator.serviceWorker.controller;if(r||i)sessionStorage.getItem(e)&&sessionStorage.removeItem(e);else{if(!sessionStorage.getItem(e))return sessionStorage.setItem(e,"true"),void window.location.reload();sessionStorage.removeItem(e)}}catch(r){r instanceof TypeError&&(r.message.includes("TrustedScriptURL")||r.message.includes("Trusted Type")),sessionStorage.removeItem(e)}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",r):r()}</script><script type=module src=/_astro/Browser.astro_astro_type_script_index_0_lang.BZmB-OSp.js></script></body></html>

Target/Isolation/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html data-beasties-container lang=en><head><meta charset=UTF-8><title>Isolation Secure Script</title></head><body><script type=module>window.__TAURI_ISOLATION_HOOK__=o=>(console.log("hook",o),o)</script></body></html>
1+
<!DOCTYPE html><html data-beasties-container lang=en><head><meta charset=UTF-8><title>Isolation Secure Script</title></head><body><script type=module>window.__TAURI_ISOLATION_HOOK__=_=>_</script></body></html>

Target/Static/Application/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Target/Worker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Target/_astro/Browser.astro_astro_type_script_index_0_lang.Cm3WIShT.js renamed to Target/_astro/Browser.astro_astro_type_script_index_0_lang.BZmB-OSp.js

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

Target/_astro/Default.astro_astro_type_script_index_0_lang.B5_-wFAE.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import'@codeeditorland/output/Target/Microsoft/VSCode/vs/code/electron-sandbox/workbench/workbench.js'

Target/_astro/__vite-browser-external.FmFgRqLi.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const __viteBrowserExternal={}
2+
export{__viteBrowserExternal as default}

0 commit comments

Comments
 (0)