@fps-games/editor-deployment 0.2.3-beta.13 → 0.2.3-beta.14

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.
Files changed (36) hide show
  1. package/bin/fps-editor-prepare.mjs +3 -4
  2. package/bin/fps-editor-server.mjs +1 -1
  3. package/licenses/THIRD_PARTY_NOTICES.txt +2 -2
  4. package/manifest.json +62 -73
  5. package/npm-shrinkwrap.json +3 -4
  6. package/package.json +7 -7
  7. package/public/assets/{editor-core-plugin-host-c2002442.js → editor-core-plugin-host-94e73c63.js} +1 -1
  8. package/public/assets/editor-core-plugin-host-94e73c63.js.br +0 -0
  9. package/public/assets/editor-core-plugin-host-94e73c63.js.gz +0 -0
  10. package/public/assets/index-CToRH9gy.js +1 -0
  11. package/public/assets/index-CToRH9gy.js.br +0 -0
  12. package/public/assets/index-CToRH9gy.js.gz +0 -0
  13. package/public/assets/playable-sdk-CrrQJDf4.js +4 -0
  14. package/public/assets/playable-sdk-CrrQJDf4.js.br +0 -0
  15. package/public/assets/playable-sdk-CrrQJDf4.js.gz +0 -0
  16. package/public/assets/playable-standard-project-DkUozryX.js +5249 -0
  17. package/public/assets/playable-standard-project-DkUozryX.js.br +0 -0
  18. package/public/assets/playable-standard-project-DkUozryX.js.gz +0 -0
  19. package/public/index.html +3 -3
  20. package/public/index.html.br +0 -0
  21. package/public/index.html.gz +0 -0
  22. package/runtime/editor-control-plane.mjs +96 -5
  23. package/worker/editor-service-worker.mjs +17 -24
  24. package/bin/fps-editor-agent.mjs +0 -5
  25. package/public/assets/editor-core-plugin-host-c2002442.js.br +0 -0
  26. package/public/assets/editor-core-plugin-host-c2002442.js.gz +0 -0
  27. package/public/assets/index-c2oXc5B5.js +0 -5
  28. package/public/assets/index-c2oXc5B5.js.br +0 -0
  29. package/public/assets/index-c2oXc5B5.js.gz +0 -0
  30. package/public/assets/playable-sdk-Dfz54Mv_.js +0 -5
  31. package/public/assets/playable-sdk-Dfz54Mv_.js.br +0 -0
  32. package/public/assets/playable-sdk-Dfz54Mv_.js.gz +0 -0
  33. package/public/assets/playable-standard-project-C61X2B53.js +0 -5247
  34. package/public/assets/playable-standard-project-C61X2B53.js.br +0 -0
  35. package/public/assets/playable-standard-project-C61X2B53.js.gz +0 -0
  36. package/runtime/runtime-debug-authoring-bridge.mjs +0 -1
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{createHash as me,randomBytes as We}from"node:crypto";import{chmod as St,copyFile as Be,lstat as q,mkdir as de,mkdtemp as It,readFile as ne,readdir as Mt,realpath as te,rename as X,rm as Q,stat as kt,writeFile as Ke}from"node:fs/promises";import{fileURLToPath as jt,pathToFileURL as Et}from"node:url";import s from"node:path";import et from"node:path";function xe(e){let t=[],r;for(let n=0;n<e.length;n+=1){let i=e[n];if(i!=="--project-root"&&!i.startsWith("--project-root=")){t.push(i);continue}if(r!==void 0)throw new Error("--project-root may only be provided once.");let o=i==="--project-root"?e[++n]:i.slice(15);if(o===void 0||!o.trim()||o.startsWith("--"))throw new Error("--project-root requires a non-empty path.");r=o}return{argv:t,projectRoot:et.resolve(process.cwd(),r??"."),explicit:r!==void 0}}import{readFile as $t,realpath as ze,stat as wt}from"node:fs/promises";import ue from"node:path";function Se(e){return e==="fps.builtin.pbr"||e==="fps.builtin.standard"?e:void 0}var y={nodeKinds:["group","instance","transform","primitive","image"],primitiveShapes:["cube","sphere","plane","capsule"],transformTypes:["plain","light","camera","groundDecal"],assetTypes:["glb","texture"],materialScopes:["sharedAsset","nodeMaterial"],materialModes:["shared","instance"],materialShaderIds:["fps.builtin.pbr","fps.builtin.standard"],materialAssetSystemPresets:["default-pbr","default-standard"],runtimeV3:{assetFields:["id","guid","type","url","external","warmupCount","singleton","materialMode","defaults","materialSlots"],materialSlotFields:["slotId","label","sourceSurfaces"],materialSlotSourceSurfaceFields:["ownerNodePath","nodeIndex","nodeIndexPath","meshIndex","primitiveIndex","sourceMaterialIndex","sourceMeshName"]},hierarchy:{parentTargets:["root","sceneNode"]},runtimeOnlyTokens:["/@fs","assetUrl","sourceAssetUrl","sourceAssetPath"]},Yt=new Set(y.nodeKinds),Xt=new Set(y.primitiveShapes),Qt=new Set(y.assetTypes),vt=new Set(y.materialModes),er=new Set(y.materialScopes),tr=new Set(y.materialAssetSystemPresets),rr=new Set(y.transformTypes),nr=new Set(y.hierarchy.parentTargets),ir=y.runtimeOnlyTokens,or=new Set(y.runtimeV3.assetFields),sr=new Set(y.runtimeV3.materialSlotFields),ar=new Set(y.runtimeV3.materialSlotSourceSurfaceFields);var tt=/^[a-z0-9]+(?:[._-][a-z0-9]+)+$/;function Ie(e){return typeof e=="string"&&!e.startsWith("fps.builtin.")&&tt.test(e)}var x=(e,t)=>({kind:"number",...e!=null?{min:e}:{},...t!=null?{max:t}:{}}),R={kind:"texture"},Me={kind:"color"},rt={kind:"enum",values:["lit","unlit"]},nt={kind:"enum",values:["opaque","mask","blend"]},Ee={lightingModel:rt,baseColor:{kind:"object",properties:{color:Me,texture:R,brightness:x(0),saturation:x(0),contrast:x(0),hue:x(-180,180)}},normal:{kind:"object",properties:{texture:R,strength:x(0)}},emission:{kind:"object",properties:{color:Me,intensity:x(0),texture:R,maskTexture:R}},alpha:{kind:"object",properties:{mode:nt,opacity:x(0,1),cutoff:x(0,1),texture:R}}},it={kind:"object",properties:{...Ee,metallic:x(0,1),roughness:x(0,1),metallicRoughness:{kind:"object",properties:{texture:R}},occlusion:{kind:"object",properties:{texture:R,strength:x(0)}}}},ot={kind:"object",properties:Ee},st={lightingModel:"lit",baseColor:{color:{r:1,g:1,b:1},brightness:1,saturation:1,contrast:1,hue:0},metallic:0,roughness:1,emission:{color:{r:0,g:0,b:0},intensity:0}},at={lightingModel:"lit",baseColor:{color:{r:1,g:1,b:1},brightness:1,saturation:1,contrast:1,hue:0},emission:{color:{r:0,g:0,b:0},intensity:0}},ke=[{id:"surface",title:"Surface",order:40},{id:"geometry",title:"Geometry",order:50},{id:"emission",title:"Emission",order:60},{id:"alpha",title:"Alpha",order:70}],T={path:"properties.lightingModel",operator:"equals",value:"lit",inactiveReasonKey:"litMaterial"},Ae=[V("properties.lightingModel","surface",1,"enum","assetLightingModel","lightingModel","lit",{options:[{value:"lit",labelKey:"assetLightingModelLit"},{value:"unlit",labelKey:"assetLightingModelUnlit"}],binding:"lightingModel",updateClass:"define"}),V("properties.baseColor.color","surface",2,"color","assetBaseColor","baseColor",{r:1,g:1,b:1},{binding:"baseColor.color"}),z("properties.baseColor.texture.textureAssetId","properties.baseColor.texture","surface",3,"assetBaseTexture","baseTexture","baseColor.texture"),S("properties.baseColor.brightness","surface",4,"assetBrightness","brightness",1,{softMin:0,softMax:4,step:.05,conditions:[L("properties.baseColor.texture.textureAssetId","baseTexture")]}),S("properties.baseColor.saturation","surface",5,"assetSaturation","saturation",1,{softMin:0,softMax:2,step:.05,conditions:[L("properties.baseColor.texture.textureAssetId","baseTexture")]}),S("properties.baseColor.contrast","surface",6,"assetContrast","contrast",1,{softMin:0,softMax:2,step:.05,conditions:[L("properties.baseColor.texture.textureAssetId","baseTexture")]}),S("properties.baseColor.hue","surface",7,"assetHue","hue",0,{step:1,conditions:[L("properties.baseColor.texture.textureAssetId","baseTexture")]}),z("properties.normal.texture.textureAssetId","properties.normal.texture","geometry",10,"assetNormalTexture","normalTexture","normal.texture",[T]),S("properties.normal.strength","geometry",11,"assetNormalStrength","normalStrength",1,{softMin:0,softMax:4,step:.05,conditions:[T,L("properties.normal.texture.textureAssetId","normalTexture")]}),V("properties.emission.color","emission",50,"color","assetEmissionColor","emissionColor",{r:0,g:0,b:0},{binding:"emission.color"}),S("properties.emission.intensity","emission",51,"assetEmissionIntensity","emissionIntensity",0,{softMin:0,softMax:8,step:.05}),z("properties.emission.texture.textureAssetId","properties.emission.texture","emission",52,"assetEmissionTexture","emissionTexture","emission.texture"),V("properties.alpha.mode","alpha",60,"enum","assetAlphaMode","alphaMode","opaque",{options:[{value:"opaque",labelKey:"assetAlphaModeOpaque"},{value:"mask",labelKey:"assetAlphaModeMask"},{value:"blend",labelKey:"assetAlphaModeBlend"}],binding:"alpha.mode",updateClass:"pipeline"}),S("properties.alpha.opacity","alpha",61,"assetAlphaOpacity","alphaOpacity",1,{step:.05,conditions:[{path:"properties.alpha.mode",operator:"equals",value:"blend",inactiveReasonKey:"alphaBlend"}]}),S("properties.alpha.cutoff","alpha",62,"assetAlphaCutoff","alphaCutoff",.5,{step:.01,conditions:[{path:"properties.alpha.mode",operator:"equals",value:"mask",inactiveReasonKey:"alphaMask"}]}),z("properties.alpha.texture.textureAssetId","properties.alpha.texture","alpha",63,"assetAlphaTexture","alphaTexture","alpha.texture",[{path:"properties.alpha.mode",operator:"not-equals",value:"opaque",inactiveReasonKey:"alphaTransparency"}])],ct=[...Ae,S("properties.metallic","geometry",20,"assetMetallic","metallic",0,{step:.05,conditions:[T]}),S("properties.roughness","geometry",21,"assetRoughness","roughness",1,{step:.05,conditions:[T]}),z("properties.metallicRoughness.texture.textureAssetId","properties.metallicRoughness.texture","geometry",22,"assetMetallicRoughnessTexture","metallicRoughnessTexture","metallicRoughness.texture",[T]),z("properties.occlusion.texture.textureAssetId","properties.occlusion.texture","geometry",23,"assetOcclusionTexture","occlusionTexture","occlusion.texture",[T]),S("properties.occlusion.strength","geometry",24,"assetOcclusionStrength","occlusionStrength",1,{softMin:0,softMax:4,step:.05,conditions:[T,L("properties.occlusion.texture.textureAssetId","occlusionTexture")]})],se=[{shaderId:"fps.builtin.pbr",version:1,runtimeKind:"pbr",displayName:"PBR",propertiesSchema:it,defaultProperties:st,inspector:{sections:ke,fields:ct}},{shaderId:"fps.builtin.standard",version:1,runtimeKind:"standard",displayName:"Standard",propertiesSchema:ot,defaultProperties:at,inspector:{sections:ke,fields:Ae}}],ur=ae(se);function ae(e){let t=new Map;for(let n of e){lt(n,t);let i=ut(n);t.set(n.shaderId,Re(i))}let r=Object.freeze([...t.values()]);return Object.freeze({get(n){return typeof n=="string"?t.get(n)??null:null},list(){return r}})}function V(e,t,r,n,i,o,a,l){return{path:e,sectionId:t,order:r,control:n,labelKey:i,tooltipKey:o,defaultValue:a,updateClass:"uniform",...l}}function S(e,t,r,n,i,o,a={}){return V(e,t,r,"number",n,i,o,{binding:e.replace(/^properties\./,""),step:a.step??.05,displayPrecision:2,precision:2,...a})}function z(e,t,r,n,i,o,a,l){return V(e,r,n,"texture",i,o,"",{schemaPath:t,binding:a,updateClass:"texture",conditions:l})}function L(e,t){return{path:e,operator:"truthy",inactiveReasonKey:t}}function lt(e,t){if(!Se(e.shaderId)&&!Ie(e.shaderId))throw new Error("Material Shader Definition shaderId must be a supported built-in id or a lowercase namespaced project id.");if(!Number.isInteger(e.version)||e.version<=0)throw new Error(`Material Shader Definition ${e.shaderId} must use a positive integer version.`);if(t.has(e.shaderId))throw new Error(`Duplicate Material Shader Definition: ${e.shaderId}`);if(e.sourceFile!=null&&!mt(e.sourceFile))throw new Error(`Material Shader Definition ${e.shaderId} sourceFile must be a safe project-relative path.`);Pe(e.shaderId,e.propertiesSchema,"properties");let r=[];if(Ne(e.propertiesSchema,e.defaultProperties,"properties",r),r.length>0){let o=r[0];throw new Error(`Material Shader Definition ${e.shaderId} default ${o.path} ${o.message}.`)}let n=new Set;for(let o of e.inspector.sections){if(!o.id.trim()||n.has(o.id))throw new Error(`Material Shader Definition ${e.shaderId} contains an invalid or duplicate section: ${o.id}`);n.add(o.id)}let i=new Set;for(let o of e.inspector.fields){if(!o.path.startsWith("properties.")||i.has(o.path))throw new Error(`Material Shader Definition ${e.shaderId} contains an invalid or duplicate field: ${o.path}`);if(!n.has(o.sectionId))throw new Error(`Material Shader Definition ${e.shaderId} field ${o.path} references an unknown section.`);ft(e,o),i.add(o.path)}}function ut(e){let t=structuredClone(e);return{...t,inspector:{...t.inspector,fields:t.inspector.fields.map(r=>{if(r.control!=="number")return r;let n=Fe(t.propertiesSchema,r.schemaPath??r.path);return n?.kind!=="number"?r:{...r,...n.min!=null?{min:n.min}:{},...n.max!=null?{max:n.max}:{}}})}}}function ft(e,t){let r=[["min",t.min],["max",t.max],["softMin",t.softMin],["softMax",t.softMax]];for(let[i,o]of r)if(o!=null&&!Number.isFinite(o))throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} ${i} must be finite.`);if(t.control!=="number"){if(r.some(([,i])=>i!=null))throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} uses numeric ranges with a non-number control.`);return}let n=Fe(e.propertiesSchema,t.schemaPath??t.path);if(n?.kind!=="number")throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} must reference a number schema.`);for(let[i,o,a]of[["min",t.min,n.min],["max",t.max,n.max]])if(o!=null&&o!==a)throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} ${i} must match propertiesSchema.`);if(t.softMin!=null&&t.softMax!=null&&t.softMin>t.softMax)throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} softMin must not exceed softMax.`);if(n.min!=null&&t.softMin!=null&&t.softMin<n.min)throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} softMin must not be below the schema minimum.`);if(n.max!=null&&t.softMax!=null&&t.softMax>n.max)throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} softMax must not exceed the schema maximum.`)}function Pe(e,t,r){if(t.kind==="object"){for(let[n,i]of Object.entries(t.properties))Pe(e,i,`${r}.${n}`);return}if(t.kind==="number"){if(t.min!=null&&!Number.isFinite(t.min))throw new Error(`Material Shader Definition ${e} number field ${r} min must be finite.`);if(t.max!=null&&!Number.isFinite(t.max))throw new Error(`Material Shader Definition ${e} number field ${r} max must be finite.`);if(t.min!=null&&t.max!=null&&t.min>t.max)throw new Error(`Material Shader Definition ${e} number field ${r} min must not exceed max.`);return}if(t.kind==="color"&&t.channels!=null&&t.channels!==3&&t.channels!==4)throw new Error(`Material Shader Definition ${e} color field ${r} channels must be 3 or 4.`)}function mt(e){let t=e.trim();return!t||t.startsWith("/")||t.includes("\\")||t.includes(":")?!1:!t.split("/").includes("..")}function dt(e){let t=e.trim();return t.startsWith("properties.")?t:`properties.${t}`}function Fe(e,t){let r=dt(t).replace(/^properties\./,"").split(".").filter(Boolean);if(r.length===0)return null;let n=e;for(let i of r){if(n.kind!=="object")return null;let o=n.properties[i];if(!o)return null;n=o}return n}function Ne(e,t,r,n){if(e.kind==="object"){if(!oe(t)){n.push({path:r,message:"must be an object"});return}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e.properties,o)||n.push({path:`${r}.${o}`,message:"is not supported by the selected shader"});for(let[o,a]of Object.entries(e.properties))t[o]!==void 0&&Ne(a,t[o],`${r}.${o}`,n);return}if(e.kind==="number"){if(typeof t!="number"||!Number.isFinite(t)){n.push({path:r,message:"must be a finite number"});return}e.min!=null&&t<e.min&&n.push({path:r,message:`must be greater than or equal to ${e.min}`}),e.max!=null&&t>e.max&&n.push({path:r,message:`must be less than or equal to ${e.max}`});return}if(e.kind==="boolean"){typeof t!="boolean"&&n.push({path:r,message:"must be a boolean"});return}if(e.kind==="string"){t!==null&&typeof t!="string"?n.push({path:r,message:"must be a string"}):t===null&&!e.nullable&&n.push({path:r,message:"must not be null"});return}if(e.kind==="enum"){(typeof t!="string"||!e.values.includes(t))&&n.push({path:r,message:`must be one of: ${e.values.join(", ")}`});return}if(e.kind==="color"){let o=e.channels===4?["r","g","b","a"]:["r","g","b"];je(t,r,o,n,e.channels===4?"an RGBA object":"an RGB object");return}if(e.kind==="vec2"||e.kind==="vec3"){je(t,r,e.kind==="vec2"?["x","y"]:["x","y","z"],n,`a ${e.kind} object`);return}if(t===null)return;if(!oe(t)){n.push({path:r,message:"must be a texture reference object or null"});return}Object.keys(t).some(o=>o!=="url"&&o!=="textureAssetId")&&n.push({path:r,message:"must contain only url or textureAssetId"});for(let o of["url","textureAssetId"]){let a=t[o];a!==void 0&&(typeof a!="string"||!a.trim())&&n.push({path:`${r}.${o}`,message:"must be a non-empty string"})}}function je(e,t,r,n,i){if(!oe(e)){n.push({path:t,message:`must be ${i}`});return}Object.keys(e).some(o=>!r.includes(o))&&n.push({path:t,message:`must contain only ${r.join(", ")}`});for(let o of r)(typeof e[o]!="number"||!Number.isFinite(e[o]))&&n.push({path:`${t}.${o}`,message:"must be a finite number"})}function Re(e){if(e&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))Re(t)}return e}function oe(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}var pt=Object.freeze([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),bt=Object.freeze([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function O(e){return gt(new TextEncoder().encode(e))}function ee(e){return`sha256:${O(JSON.stringify(e))}`}function gt(e){let t=Math.ceil((e.length+9)/64)*64,r=new Uint8Array(t);r.set(e),r[e.length]=128;let n=new DataView(r.buffer);n.setUint32(t-8,Math.floor(e.length/536870912),!1),n.setUint32(t-4,e.length*8>>>0,!1);let i=[...pt],o=new Uint32Array(64);for(let a=0;a<r.length;a+=64){for(let u=0;u<16;u+=1)o[u]=n.getUint32(a+u*4,!1);for(let u=16;u<64;u+=1){let j=o[u-15],E=o[u-2],F=M(j,7)^M(j,18)^j>>>3,J=M(E,17)^M(E,19)^E>>>10;o[u]=o[u-16]+F+o[u-7]+J>>>0}let[l,d,I,D,f,p,c,P]=i;for(let u=0;u<64;u+=1){let j=M(f,6)^M(f,11)^M(f,25),E=f&p^~f&c,F=P+j+E+bt[u]+o[u]>>>0,J=M(l,2)^M(l,13)^M(l,22),_=l&d^l&I^d&I,Z=J+_>>>0;P=c,c=p,p=f,f=D+F>>>0,D=I,I=d,d=l,l=F+Z>>>0}i[0]=i[0]+l>>>0,i[1]=i[1]+d>>>0,i[2]=i[2]+I>>>0,i[3]=i[3]+D>>>0,i[4]=i[4]+f>>>0,i[5]=i[5]+p>>>0,i[6]=i[6]+c>>>0,i[7]=i[7]+P>>>0}return i.map(a=>a.toString(16).padStart(8,"0")).join("")}function M(e,t){return e>>>t|e<<32-t}var B="fps.plugin.materials",ce="@fps-games/plugin-materials";function Oe(e){let t=e?.[B];if(t==null)return null;if(!U(t)||t.schemaVersion!==1||typeof t.snapshotId!="string"||!Array.isArray(t.shaders))throw new Error("Materials Plugin snapshot is invalid. Run fps-editor-prepare again.");let r=structuredClone(t);return yt(r),Ce(r)}function ht(e){return ae([...se,...e?.shaders.map(t=>t.definition)??[]])}function yt(e){if(!/^sha256:[a-f0-9]{64}$/.test(e.snapshotId)||e.shaders.length===0)throw new Error("Materials Plugin snapshot identity is invalid. Run fps-editor-prepare again.");for(let r of e.shaders)if(!U(r)||!U(r.definition)||!U(r.program))throw new Error("Materials Plugin Shader snapshot is invalid. Run fps-editor-prepare again.");ht(e);for(let r of e.shaders){let{definition:n,program:i}=r;if(i.shaderId!==n.shaderId||i.definitionVersion!==n.version)throw new Error(`Material snapshot Definition identity does not match its program: ${n.shaderId}`);if(i.language!=="glsl"||!Te(i.vertexSourcePath)||!Te(i.fragmentSourcePath)||!/^[a-f0-9]{64}$/.test(i.vertexSourceHash)||!/^[a-f0-9]{64}$/.test(i.fragmentSourceHash)||typeof i.vertexSource!="string"||!i.vertexSource.trim()||typeof i.fragmentSource!="string"||!i.fragmentSource.trim())throw new Error(`Material snapshot program is invalid: ${n.shaderId}`);if(O(i.vertexSource)!==i.vertexSourceHash||O(i.fragmentSource)!==i.fragmentSourceHash)throw new Error(`Material snapshot source hash does not match its GLSL content: ${n.shaderId}`);if(!Array.isArray(i.attributes)||i.attributes.length===0||i.attributes.some(o=>!/^[A-Za-z_][A-Za-z0-9_]*$/.test(o))||new Set(i.attributes).size!==i.attributes.length)throw new Error(`Material snapshot attributes are invalid: ${n.shaderId}`);if(!["opaque","combine","add"].includes(i.alphaMode)||!U(i.enumUniformValues)||!U(i.frame)||!["on-demand","continuous"].includes(i.frame.mode))throw new Error(`Material snapshot rendering policy is invalid: ${n.shaderId}`)}let t={schemaVersion:e.schemaVersion,shaders:e.shaders};if(ee(t)!==e.snapshotId)throw new Error("Materials Plugin snapshot payload does not match its identity. Run fps-editor-prepare again.")}function Te(e){return typeof e=="string"&&!!e&&!e.startsWith("/")&&!e.includes("\\")&&!e.includes(":")&&e.split("/").every(t=>!!t&&t!=="."&&t!=="..")}function Ce(e){if(!e||typeof e!="object"||Object.isFrozen(e))return e;for(let t of Object.values(e))Ce(t);return Object.freeze(e)}function U(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}async function Ue(e,t){let r=t.plugins.find(I=>I.pluginId===B&&I.targets.includes("editor"));if(!r)return null;if(r.packageName!==ce)throw new Error(`Materials Plugin package must be ${ce}.`);if(r.config==null)return null;let n=A(r.config,"Materials Plugin config");if(n.schemaVersion!==1||!Array.isArray(n.shaders)||n.shaders.length===0)throw new Error("Materials Plugin config must use schemaVersion 1 and declare shaders.");let i=await ze(e),o=new Set,a=[];for(let I of n.shaders){let D=A(I,"Materials Plugin shader entry"),f=A(D.definition,"Materials Plugin Shader Definition"),p=A(D.program,"Materials Plugin shader program"),c=G(f.shaderId,"Material shaderId");if(o.has(c))throw new Error(`Duplicate Material shaderId: ${c}`);o.add(c);let P=f.version;if(!Number.isSafeInteger(P)||Number(P)<1)throw new Error(`Material Definition version must be a positive integer: ${c}`);if(f.runtimeKind!=="shader-material")throw new Error(`Material runtimeKind must be shader-material: ${c}`);if(p.language!=="glsl")throw new Error(`Material program language must be glsl: ${c}`);let u=_e(p.vertexSource,`Material vertexSource: ${c}`),j=_e(p.fragmentSource,`Material fragmentSource: ${c}`),E=await De(i,u),F=await De(i,j),J=Ve(A(f.inspector,"Material Inspector").fields,"Material Inspector fields"),_=new Map;for(let w of J){let b=A(w,"Material Inspector field"),g=G(b.path,"Material Inspector field path");if(_.has(g))throw new Error(`Duplicate Material Inspector field: ${c}:${g}`);if(_.set(g,b),b.updateClass!=="uniform")throw new Error(`Deployment ShaderMaterial only supports uniform fields: ${c}:${g}`);if(!["number","boolean","enum","color","vec2","vec3"].includes(String(b.control)))throw new Error(`Deployment ShaderMaterial does not support control: ${c}:${String(b.control)}`);le(b.binding,`Material Inspector binding: ${c}:${g}`);let N=Le(f.propertiesSchema,typeof b.schemaPath=="string"?b.schemaPath:g);if(!N||N.kind!==b.control)throw new Error(`Material Inspector field control does not match its schema: ${c}:${g}`);let Y=xt(f.defaultProperties,g);if(Y===void 0||JSON.stringify(Y)!==JSON.stringify(b.defaultValue))throw new Error(`Material Inspector field default must match defaultProperties: ${c}:${g}`)}let Z=H(p.enumUniformValues)?p.enumUniformValues:{};for(let[w,b]of Object.entries(Z)){let g=_.get(w),N=g?Le(f.propertiesSchema,g.schemaPath??w):null,Y=A(b,`Material enum uniform mapping: ${c}:${w}`);if(!g||g.control!=="enum"||N?.kind!=="enum"||!Array.isArray(N.values)||N.values.some(v=>typeof v!="string"||!Number.isFinite(Y[v]))||Object.keys(Y).some(v=>!N.values.includes(v)))throw new Error(`Material enum uniform mapping is invalid: ${c}:${w}`)}for(let[w,b]of _)if(b.control==="enum"&&!Object.prototype.hasOwnProperty.call(Z,w))throw new Error(`Material enum uniform mapping is required: ${c}:${w}`);let $=p.frame===void 0?{mode:"on-demand"}:A(p.frame,"Material frame");if($.mode!=="on-demand"&&$.mode!=="continuous")throw new Error(`Material frame mode is invalid: ${c}`);$.timeUniform!==void 0&&le($.timeUniform,`Material timeUniform: ${c}`),$.cameraPositionUniform!==void 0&&le($.cameraPositionUniform,`Material cameraPositionUniform: ${c}`);let we=p.alphaMode??"opaque";if(!["opaque","combine","add"].includes(String(we)))throw new Error(`Material alphaMode is invalid: ${c}`);a.push(Object.freeze({definition:f,program:Object.freeze({shaderId:c,definitionVersion:P,language:"glsl",vertexSourcePath:u,fragmentSourcePath:j,vertexSourceHash:O(E),fragmentSourceHash:O(F),vertexSource:E,fragmentSource:F,attributes:Object.freeze(p.attributes===void 0?["position","normal"]:Ve(p.attributes,"Material attributes").map(w=>G(w,"Material attribute"))),alphaMode:we,enumUniformValues:Object.freeze(structuredClone(Z)),frame:Object.freeze({mode:$.mode,...$.timeUniform?{timeUniform:G($.timeUniform,"Material timeUniform")}:{},...$.cameraPositionUniform?{cameraPositionUniform:G($.cameraPositionUniform,"Material cameraPositionUniform")}:{}})})}))}let l={schemaVersion:1,shaders:Object.freeze(a)},d=Object.freeze({...l,snapshotId:ee(l)});return Oe({[B]:d})}async function De(e,t){let r=ue.resolve(e,t),n=await ze(r).catch(()=>"");if(!n||n!==e&&!n.startsWith(`${e}${ue.sep}`))throw new Error(`Material shader source escapes the project root: ${t}`);if(!(await wt(n)).isFile())throw new Error(`Material shader source is not a file: ${t}`);return $t(n,"utf8")}function _e(e,t){let r=G(e,t);if(ue.isAbsolute(r)||r.includes("\\")||r.split("/").some(n=>!n||n==="."||n===".."))throw new Error(`${t} must be a normalized project-relative path.`);return r}function G(e,t){if(typeof e!="string"||!e.trim())throw new Error(`${t} must be a non-empty string.`);return e.trim()}function le(e,t){if(typeof e!="string"||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(e))throw new Error(`${t} must be a GLSL identifier.`)}function Le(e,t){let r=H(e)?e:null;if(!r||typeof t!="string")return null;for(let n of t.replace(/^properties\./,"").split(".").filter(Boolean)){if(r.kind!=="object"||!H(r.properties)||!H(r.properties[n]))return null;r=r.properties[n]}return r}function xt(e,t){let r=e;for(let n of t.replace(/^properties\./,"").split(".").filter(Boolean)){if(!H(r))return;r=r[n]}return r}function Ve(e,t){if(!Array.isArray(e))throw new Error(`${t} must be an array.`);return e}function A(e,t){if(!H(e))throw new Error(`${t} must be an object.`);return e}function H(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}var At=s.dirname(jt(import.meta.url)),pe=s.resolve(At,".."),be=xe(process.argv.slice(2)),Pt=be.argv.includes("--reset-test-state"),Ge=be.argv.filter(e=>e!=="--reset-test-state");if(Ge.length>0)throw new Error(`Unexpected argument: ${Ge[0]}`);var h=await te(be.projectRoot),K=s.join(h,".fps-editor"),W=s.join(K,"deployments"),ge=s.join(K,"state"),Je=s.join(K,"current.json"),fe=s.join(ge,"runtime-bridge-token"),Ft=s.join(ge,"playwright-working-document-journal.json");Wt();await ye(h,K);await ye(K,W);await ye(K,ge,448);Pt&&await Q(Ft,{force:!0});await zt();var k=await _t(),C=JSON.parse(await ne(s.join(pe,"manifest.json"),"utf8"));Tt(C);var ie=await Ut(),He=await Ue(h,ie),Ze=Object.freeze({...He?{[B]:He}:{}}),Ye=Bt({projectDefinition:ie,pluginSnapshots:Ze});await he(pe,C.files);var Xe=Ht(C.files);k&&k.editorDistHash===C.build.distHash&&k.projectSourceHash===Ye&&k.deployment?.packageHash===Xe&&JSON.stringify(k.deployment?.manifest)===JSON.stringify(C)&&await Ot(k)&&(console.log("[fps-editor-server] existing deployment and static Project definition are current."),process.exit(0));var m=await Rt(pe,C,Xe),Nt=["a","b"].map(e=>({release:e,artifactId:`${m.id}-${e}`,rootPath:s.relative(h,s.join(m.rootPath,"public")),build:{...m.manifest.build,buildId:`${m.manifest.build.buildId}.release-${e}`}})),Qe={schemaVersion:3,preparedAt:new Date().toISOString(),editorDistHash:C.build.distHash,projectSourceHash:Ye,projectDefinition:ie,pluginSnapshots:Ze,deployment:{id:m.id,rootPath:s.relative(h,m.rootPath),packageHash:m.packageHash,manifest:m.manifest},workerEntry:s.relative(h,s.join(m.rootPath,m.manifest.entrypoints.worker)),serverEntry:s.relative(h,s.join(m.rootPath,m.manifest.entrypoints.server)),runtimeViteBridgeEntry:s.relative(h,s.join(m.rootPath,m.manifest.entrypoints.runtimeViteBridge)),builds:Nt,staged:k?.deployment?.id&&k.deployment.id!==m.id?{deploymentId:k.deployment.id}:null};await Gt(Je,Qe);await Lt(Qe);console.log([`[fps-editor-server] prepared deployment ${m.id}`,`for static Project ${ie.projectId}.`].join(" "));async function Rt(e,t,r){let n=await It(s.join(W,".install-"));try{for(let l of t.files){let d=s.join(n,l.path);await de(s.dirname(d),{recursive:!0}),await Be(s.join(e,l.path),d)}await Be(s.join(e,"manifest.json"),s.join(n,"manifest.json"));let i=`${t.version}-${r.slice(0,16)}`,o=s.join(W,i),a=await q(o).catch(()=>null);return a&&await Ct(e,o,t)?await Q(n,{recursive:!0,force:!0}):a?await Dt(n,o):await X(n,o),{id:i,rootPath:o,manifest:t,packageHash:r}}finally{await Q(n,{recursive:!0,force:!0}).catch(()=>{})}}function Tt(e){if(e?.schemaVersion!==2||e.artifactKind!=="fps-editor-deployment-package"||e.packageName!=="@fps-games/editor-deployment")throw new Error("Editor deployment manifest is invalid.");if(e.node?.range!==">=24 <27"||e.node?.bundled!==!1)throw new Error("Editor deployment Node.js contract is invalid.");if(typeof e.build?.version!="string"||typeof e.build?.distHash!="string"||typeof e.commitSha!="string")throw new Error("Editor deployment build identity is incomplete.");for(let t of["server","worker","browser","runtimeViteBridge"])if(typeof e.entrypoints?.[t]!="string")throw new Error(`Editor deployment ${t} entrypoint is missing.`);for(let t of["prepare","server","project","agent"])if(typeof e.binaries?.[t]!="string")throw new Error(`Editor deployment ${t} binary is missing.`);if(e.projectContentBundled!==!1)throw new Error("Editor deployment must not contain project content.")}async function he(e,t){if(!Array.isArray(t)||t.length===0)throw new Error("Editor deployment file manifest is empty.");for(let r of t){if(!ve(r.path))throw new Error(`Unsafe deployment file path: ${String(r.path)}.`);let n=await re(e,r.path);if(n.byteLength!==r.size||qt(n)!==r.sha256)throw new Error(`Editor deployment file integrity mismatch: ${r.path}.`)}}async function Ot(e){try{if(!e.deployment||typeof e.deployment.rootPath!="string"||!e.deployment.manifest||!Array.isArray(e.deployment.manifest.files))return!1;let t=s.resolve(h,e.deployment.rootPath);if(!$e(t,W))return!1;let r=s.relative(h,s.join(t,e.deployment.manifest.entrypoints.server)),n=s.relative(h,s.join(t,e.deployment.manifest.entrypoints.worker)),i=s.relative(h,s.join(t,e.deployment.manifest.entrypoints.runtimeViteBridge));if(e.serverEntry!==r||e.workerEntry!==n||e.runtimeViteBridgeEntry!==i)return!1;let o=[e.serverEntry,e.workerEntry,e.runtimeViteBridgeEntry,s.join(e.deployment.rootPath,e.deployment.manifest.entrypoints.browser)];return(await Promise.all(o.map(d=>q(s.join(h,d))))).every(d=>d.isFile()&&!d.isSymbolicLink())?(await he(t,e.deployment.manifest.files),(await re(t,"manifest.json")).equals(Buffer.from(`${JSON.stringify(e.deployment.manifest,null,2)}
3
- `))):!1}catch{return!1}}async function Ct(e,t,r){try{await he(t,r.files);let[n,i]=await Promise.all([re(e,"manifest.json"),re(t,"manifest.json")]);return n.equals(i)}catch{return!1}}async function re(e,t){if(!ve(t))throw new Error(`Unsafe deployment file path: ${String(t)}.`);let r=await q(e);if(!r.isDirectory()||r.isSymbolicLink())throw new Error(`Editor deployment root is not a regular directory: ${e}.`);let n=await te(e),i=s.join(e,t),o=await q(i);if(!o.isFile()||o.isSymbolicLink())throw new Error(`Editor deployment file is not a regular file: ${t}.`);let a=await te(i),l=s.resolve(n,t);if(a!==l||!$e(a,n))throw new Error(`Editor deployment file escaped its deployment root: ${t}.`);return ne(i)}async function ye(e,t,r){await q(t).catch(a=>{if(qe(a)&&a.code==="ENOENT")return null;throw a})||await de(t,r===void 0?void 0:{mode:r}).catch(a=>{if(!qe(a)||a.code!=="EEXIST")throw a});let i=await q(t),o=await te(t);if(!i.isDirectory()||i.isSymbolicLink()||o!==t||!$e(o,e))throw new Error(`Editor deployment directory must be a regular project directory: ${t}.`)}async function Dt(e,t){let r=s.join(W,`.replace-${s.basename(t)}-${process.pid}-${We(6).toString("hex")}`);await X(t,r);try{await X(e,t)}catch(n){try{await X(r,t)}catch(i){throw new AggregateError([n,i],`Editor deployment replacement and rollback both failed for ${s.basename(t)}.`)}throw n}await Q(r,{recursive:!0,force:!0})}async function _t(){try{let e=JSON.parse(await ne(Je,"utf8"));return e?.schemaVersion===3?e:null}catch{return null}}async function Lt(e){let t=new Set([e.deployment.id,e.staged?.deploymentId].filter(Boolean));await Vt(W,t)}async function Vt(e,t){for(let r of await Mt(e,{withFileTypes:!0}))!r.isDirectory()||r.name.startsWith(".")||t.has(r.name)||await Q(s.join(e,r.name),{recursive:!0,force:!0})}async function zt(){(await ne(fe,"utf8").catch(()=>"")).trim()||(await Ke(fe,`${We(32).toString("base64url")}
4
- `,{encoding:"utf8",mode:384}),await St(fe,384))}async function Ut(){let e=s.join(h,"fps.config.ts");if(!(await kt(e).catch(()=>null))?.isFile())throw new Error("fps.config.ts is required.");let r=await import(`${Et(e).href}?fps-editor-prepare=${Date.now()}`),n=r.default??r.fpsConfig;if(!n||typeof n!="object"||Array.isArray(n)||n.schemaVersion!==1||typeof n.projectId!="string"||!n.authoring||!Array.isArray(n.plugins))throw new Error("fps.config.ts must default-export a valid defineFpsProject() definition.");return n}function Bt(e){return me("sha256").update(JSON.stringify(e)).digest("hex")}async function Gt(e,t){await de(s.dirname(e),{recursive:!0});let r=`${e}.${process.pid}.tmp`;await Ke(r,`${JSON.stringify(t,null,2)}
5
- `),await X(r,e)}function ve(e){return typeof e=="string"&&e.length>0&&!e.includes("\\")&&!s.isAbsolute(e)&&!e.split("/").includes("..")}function $e(e,t){if(e===t)return!0;let r=s.relative(t,e);return r.length>0&&r!==".."&&!r.startsWith(`..${s.sep}`)&&!s.isAbsolute(r)}function Ht(e){return me("sha256").update(JSON.stringify(e)).digest("hex")}function qt(e){return me("sha256").update(e).digest("hex")}function qe(e){return e instanceof Error&&"code"in e}function Wt(){let e=Number.parseInt(process.versions.node.split(".")[0]??"",10);if(!Number.isSafeInteger(e)||e<24||e>=27)throw new Error(`prepare:server requires Node.js >=24 <27; current version is ${process.versions.node}.`)}
2
+ import{createHash as ue,randomBytes as yt}from"node:crypto";import{copyFile as ze,lstat as q,mkdir as fe,mkdtemp as $t,readFile as me,readdir as wt,realpath as ee,rename as X,rm as te,stat as xt,writeFile as St}from"node:fs/promises";import{fileURLToPath as It,pathToFileURL as Mt}from"node:url";import a from"node:path";import Ye from"node:path";function $e(e){let t=[],r;for(let n=0;n<e.length;n+=1){let i=e[n];if(i!=="--project-root"&&!i.startsWith("--project-root=")){t.push(i);continue}if(r!==void 0)throw new Error("--project-root may only be provided once.");let o=i==="--project-root"?e[++n]:i.slice(15);if(o===void 0||!o.trim()||o.startsWith("--"))throw new Error("--project-root requires a non-empty path.");r=o}return{argv:t,projectRoot:Ye.resolve(process.cwd(),r??"."),explicit:r!==void 0}}import{readFile as bt,realpath as Le,stat as ht}from"node:fs/promises";import le from"node:path";function we(e){return e==="fps.builtin.pbr"||e==="fps.builtin.standard"?e:void 0}var g={nodeKinds:["group","instance","transform","primitive","image"],primitiveShapes:["cube","sphere","plane","capsule"],transformTypes:["plain","light","camera","groundDecal"],assetTypes:["glb","texture"],materialScopes:["sharedAsset","nodeMaterial"],materialModes:["shared","instance"],materialShaderIds:["fps.builtin.pbr","fps.builtin.standard"],materialAssetSystemPresets:["default-pbr","default-standard"],runtimeV3:{assetFields:["id","guid","type","url","external","warmupCount","singleton","materialMode","defaults","materialSlots"],materialSlotFields:["slotId","label","sourceSurfaces"],materialSlotSourceSurfaceFields:["ownerNodePath","nodeIndex","nodeIndexPath","meshIndex","primitiveIndex","sourceMaterialIndex","sourceMeshName"]},hierarchy:{parentTargets:["root","sceneNode"]},runtimeOnlyTokens:["/@fs","assetUrl","sourceAssetUrl","sourceAssetPath"]},Kt=new Set(g.nodeKinds),Wt=new Set(g.primitiveShapes),Jt=new Set(g.assetTypes),Zt=new Set(g.materialModes),Yt=new Set(g.materialScopes),Xt=new Set(g.materialAssetSystemPresets),Qt=new Set(g.transformTypes),vt=new Set(g.hierarchy.parentTargets),er=g.runtimeOnlyTokens,tr=new Set(g.runtimeV3.assetFields),rr=new Set(g.runtimeV3.materialSlotFields),nr=new Set(g.runtimeV3.materialSlotSourceSurfaceFields);var Xe=/^[a-z0-9]+(?:[._-][a-z0-9]+)+$/;function xe(e){return typeof e=="string"&&!e.startsWith("fps.builtin.")&&Xe.test(e)}var w=(e,t)=>({kind:"number",...e!=null?{min:e}:{},...t!=null?{max:t}:{}}),R={kind:"texture"},Se={kind:"color"},Qe={kind:"enum",values:["lit","unlit"]},ve={kind:"enum",values:["opaque","mask","blend"]},ke={lightingModel:Qe,baseColor:{kind:"object",properties:{color:Se,texture:R,brightness:w(0),saturation:w(0),contrast:w(0),hue:w(-180,180)}},normal:{kind:"object",properties:{texture:R,strength:w(0)}},emission:{kind:"object",properties:{color:Se,intensity:w(0),texture:R,maskTexture:R}},alpha:{kind:"object",properties:{mode:ve,opacity:w(0,1),cutoff:w(0,1),texture:R}}},et={kind:"object",properties:{...ke,metallic:w(0,1),roughness:w(0,1),metallicRoughness:{kind:"object",properties:{texture:R}},occlusion:{kind:"object",properties:{texture:R,strength:w(0)}}}},tt={kind:"object",properties:ke},rt={lightingModel:"lit",baseColor:{color:{r:1,g:1,b:1},brightness:1,saturation:1,contrast:1,hue:0},metallic:0,roughness:1,emission:{color:{r:0,g:0,b:0},intensity:0}},nt={lightingModel:"lit",baseColor:{color:{r:1,g:1,b:1},brightness:1,saturation:1,contrast:1,hue:0},emission:{color:{r:0,g:0,b:0},intensity:0}},Ie=[{id:"surface",title:"Surface",order:40},{id:"geometry",title:"Geometry",order:50},{id:"emission",title:"Emission",order:60},{id:"alpha",title:"Alpha",order:70}],T={path:"properties.lightingModel",operator:"equals",value:"lit",inactiveReasonKey:"litMaterial"},je=[V("properties.lightingModel","surface",1,"enum","assetLightingModel","lightingModel","lit",{options:[{value:"lit",labelKey:"assetLightingModelLit"},{value:"unlit",labelKey:"assetLightingModelUnlit"}],binding:"lightingModel",updateClass:"define"}),V("properties.baseColor.color","surface",2,"color","assetBaseColor","baseColor",{r:1,g:1,b:1},{binding:"baseColor.color"}),z("properties.baseColor.texture.textureAssetId","properties.baseColor.texture","surface",3,"assetBaseTexture","baseTexture","baseColor.texture"),x("properties.baseColor.brightness","surface",4,"assetBrightness","brightness",1,{softMin:0,softMax:4,step:.05,conditions:[L("properties.baseColor.texture.textureAssetId","baseTexture")]}),x("properties.baseColor.saturation","surface",5,"assetSaturation","saturation",1,{softMin:0,softMax:2,step:.05,conditions:[L("properties.baseColor.texture.textureAssetId","baseTexture")]}),x("properties.baseColor.contrast","surface",6,"assetContrast","contrast",1,{softMin:0,softMax:2,step:.05,conditions:[L("properties.baseColor.texture.textureAssetId","baseTexture")]}),x("properties.baseColor.hue","surface",7,"assetHue","hue",0,{step:1,conditions:[L("properties.baseColor.texture.textureAssetId","baseTexture")]}),z("properties.normal.texture.textureAssetId","properties.normal.texture","geometry",10,"assetNormalTexture","normalTexture","normal.texture",[T]),x("properties.normal.strength","geometry",11,"assetNormalStrength","normalStrength",1,{softMin:0,softMax:4,step:.05,conditions:[T,L("properties.normal.texture.textureAssetId","normalTexture")]}),V("properties.emission.color","emission",50,"color","assetEmissionColor","emissionColor",{r:0,g:0,b:0},{binding:"emission.color"}),x("properties.emission.intensity","emission",51,"assetEmissionIntensity","emissionIntensity",0,{softMin:0,softMax:8,step:.05}),z("properties.emission.texture.textureAssetId","properties.emission.texture","emission",52,"assetEmissionTexture","emissionTexture","emission.texture"),V("properties.alpha.mode","alpha",60,"enum","assetAlphaMode","alphaMode","opaque",{options:[{value:"opaque",labelKey:"assetAlphaModeOpaque"},{value:"mask",labelKey:"assetAlphaModeMask"},{value:"blend",labelKey:"assetAlphaModeBlend"}],binding:"alpha.mode",updateClass:"pipeline"}),x("properties.alpha.opacity","alpha",61,"assetAlphaOpacity","alphaOpacity",1,{step:.05,conditions:[{path:"properties.alpha.mode",operator:"equals",value:"blend",inactiveReasonKey:"alphaBlend"}]}),x("properties.alpha.cutoff","alpha",62,"assetAlphaCutoff","alphaCutoff",.5,{step:.01,conditions:[{path:"properties.alpha.mode",operator:"equals",value:"mask",inactiveReasonKey:"alphaMask"}]}),z("properties.alpha.texture.textureAssetId","properties.alpha.texture","alpha",63,"assetAlphaTexture","alphaTexture","alpha.texture",[{path:"properties.alpha.mode",operator:"not-equals",value:"opaque",inactiveReasonKey:"alphaTransparency"}])],it=[...je,x("properties.metallic","geometry",20,"assetMetallic","metallic",0,{step:.05,conditions:[T]}),x("properties.roughness","geometry",21,"assetRoughness","roughness",1,{step:.05,conditions:[T]}),z("properties.metallicRoughness.texture.textureAssetId","properties.metallicRoughness.texture","geometry",22,"assetMetallicRoughnessTexture","metallicRoughnessTexture","metallicRoughness.texture",[T]),z("properties.occlusion.texture.textureAssetId","properties.occlusion.texture","geometry",23,"assetOcclusionTexture","occlusionTexture","occlusion.texture",[T]),x("properties.occlusion.strength","geometry",24,"assetOcclusionStrength","occlusionStrength",1,{softMin:0,softMax:4,step:.05,conditions:[T,L("properties.occlusion.texture.textureAssetId","occlusionTexture")]})],oe=[{shaderId:"fps.builtin.pbr",version:1,runtimeKind:"pbr",displayName:"PBR",propertiesSchema:et,defaultProperties:rt,inspector:{sections:Ie,fields:it}},{shaderId:"fps.builtin.standard",version:1,runtimeKind:"standard",displayName:"Standard",propertiesSchema:tt,defaultProperties:nt,inspector:{sections:Ie,fields:je}}],sr=se(oe);function se(e){let t=new Map;for(let n of e){ot(n,t);let i=st(n);t.set(n.shaderId,Fe(i))}let r=Object.freeze([...t.values()]);return Object.freeze({get(n){return typeof n=="string"?t.get(n)??null:null},list(){return r}})}function V(e,t,r,n,i,o,s,l){return{path:e,sectionId:t,order:r,control:n,labelKey:i,tooltipKey:o,defaultValue:s,updateClass:"uniform",...l}}function x(e,t,r,n,i,o,s={}){return V(e,t,r,"number",n,i,o,{binding:e.replace(/^properties\./,""),step:s.step??.05,displayPrecision:2,precision:2,...s})}function z(e,t,r,n,i,o,s,l){return V(e,r,n,"texture",i,o,"",{schemaPath:t,binding:s,updateClass:"texture",conditions:l})}function L(e,t){return{path:e,operator:"truthy",inactiveReasonKey:t}}function ot(e,t){if(!we(e.shaderId)&&!xe(e.shaderId))throw new Error("Material Shader Definition shaderId must be a supported built-in id or a lowercase namespaced project id.");if(!Number.isInteger(e.version)||e.version<=0)throw new Error(`Material Shader Definition ${e.shaderId} must use a positive integer version.`);if(t.has(e.shaderId))throw new Error(`Duplicate Material Shader Definition: ${e.shaderId}`);if(e.sourceFile!=null&&!ct(e.sourceFile))throw new Error(`Material Shader Definition ${e.shaderId} sourceFile must be a safe project-relative path.`);Ee(e.shaderId,e.propertiesSchema,"properties");let r=[];if(Pe(e.propertiesSchema,e.defaultProperties,"properties",r),r.length>0){let o=r[0];throw new Error(`Material Shader Definition ${e.shaderId} default ${o.path} ${o.message}.`)}let n=new Set;for(let o of e.inspector.sections){if(!o.id.trim()||n.has(o.id))throw new Error(`Material Shader Definition ${e.shaderId} contains an invalid or duplicate section: ${o.id}`);n.add(o.id)}let i=new Set;for(let o of e.inspector.fields){if(!o.path.startsWith("properties.")||i.has(o.path))throw new Error(`Material Shader Definition ${e.shaderId} contains an invalid or duplicate field: ${o.path}`);if(!n.has(o.sectionId))throw new Error(`Material Shader Definition ${e.shaderId} field ${o.path} references an unknown section.`);at(e,o),i.add(o.path)}}function st(e){let t=structuredClone(e);return{...t,inspector:{...t.inspector,fields:t.inspector.fields.map(r=>{if(r.control!=="number")return r;let n=Ae(t.propertiesSchema,r.schemaPath??r.path);return n?.kind!=="number"?r:{...r,...n.min!=null?{min:n.min}:{},...n.max!=null?{max:n.max}:{}}})}}}function at(e,t){let r=[["min",t.min],["max",t.max],["softMin",t.softMin],["softMax",t.softMax]];for(let[i,o]of r)if(o!=null&&!Number.isFinite(o))throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} ${i} must be finite.`);if(t.control!=="number"){if(r.some(([,i])=>i!=null))throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} uses numeric ranges with a non-number control.`);return}let n=Ae(e.propertiesSchema,t.schemaPath??t.path);if(n?.kind!=="number")throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} must reference a number schema.`);for(let[i,o,s]of[["min",t.min,n.min],["max",t.max,n.max]])if(o!=null&&o!==s)throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} ${i} must match propertiesSchema.`);if(t.softMin!=null&&t.softMax!=null&&t.softMin>t.softMax)throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} softMin must not exceed softMax.`);if(n.min!=null&&t.softMin!=null&&t.softMin<n.min)throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} softMin must not be below the schema minimum.`);if(n.max!=null&&t.softMax!=null&&t.softMax>n.max)throw new Error(`Material Shader Definition ${e.shaderId} field ${t.path} softMax must not exceed the schema maximum.`)}function Ee(e,t,r){if(t.kind==="object"){for(let[n,i]of Object.entries(t.properties))Ee(e,i,`${r}.${n}`);return}if(t.kind==="number"){if(t.min!=null&&!Number.isFinite(t.min))throw new Error(`Material Shader Definition ${e} number field ${r} min must be finite.`);if(t.max!=null&&!Number.isFinite(t.max))throw new Error(`Material Shader Definition ${e} number field ${r} max must be finite.`);if(t.min!=null&&t.max!=null&&t.min>t.max)throw new Error(`Material Shader Definition ${e} number field ${r} min must not exceed max.`);return}if(t.kind==="color"&&t.channels!=null&&t.channels!==3&&t.channels!==4)throw new Error(`Material Shader Definition ${e} color field ${r} channels must be 3 or 4.`)}function ct(e){let t=e.trim();return!t||t.startsWith("/")||t.includes("\\")||t.includes(":")?!1:!t.split("/").includes("..")}function lt(e){let t=e.trim();return t.startsWith("properties.")?t:`properties.${t}`}function Ae(e,t){let r=lt(t).replace(/^properties\./,"").split(".").filter(Boolean);if(r.length===0)return null;let n=e;for(let i of r){if(n.kind!=="object")return null;let o=n.properties[i];if(!o)return null;n=o}return n}function Pe(e,t,r,n){if(e.kind==="object"){if(!ie(t)){n.push({path:r,message:"must be an object"});return}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e.properties,o)||n.push({path:`${r}.${o}`,message:"is not supported by the selected shader"});for(let[o,s]of Object.entries(e.properties))t[o]!==void 0&&Pe(s,t[o],`${r}.${o}`,n);return}if(e.kind==="number"){if(typeof t!="number"||!Number.isFinite(t)){n.push({path:r,message:"must be a finite number"});return}e.min!=null&&t<e.min&&n.push({path:r,message:`must be greater than or equal to ${e.min}`}),e.max!=null&&t>e.max&&n.push({path:r,message:`must be less than or equal to ${e.max}`});return}if(e.kind==="boolean"){typeof t!="boolean"&&n.push({path:r,message:"must be a boolean"});return}if(e.kind==="string"){t!==null&&typeof t!="string"?n.push({path:r,message:"must be a string"}):t===null&&!e.nullable&&n.push({path:r,message:"must not be null"});return}if(e.kind==="enum"){(typeof t!="string"||!e.values.includes(t))&&n.push({path:r,message:`must be one of: ${e.values.join(", ")}`});return}if(e.kind==="color"){let o=e.channels===4?["r","g","b","a"]:["r","g","b"];Me(t,r,o,n,e.channels===4?"an RGBA object":"an RGB object");return}if(e.kind==="vec2"||e.kind==="vec3"){Me(t,r,e.kind==="vec2"?["x","y"]:["x","y","z"],n,`a ${e.kind} object`);return}if(t===null)return;if(!ie(t)){n.push({path:r,message:"must be a texture reference object or null"});return}Object.keys(t).some(o=>o!=="url"&&o!=="textureAssetId")&&n.push({path:r,message:"must contain only url or textureAssetId"});for(let o of["url","textureAssetId"]){let s=t[o];s!==void 0&&(typeof s!="string"||!s.trim())&&n.push({path:`${r}.${o}`,message:"must be a non-empty string"})}}function Me(e,t,r,n,i){if(!ie(e)){n.push({path:t,message:`must be ${i}`});return}Object.keys(e).some(o=>!r.includes(o))&&n.push({path:t,message:`must contain only ${r.join(", ")}`});for(let o of r)(typeof e[o]!="number"||!Number.isFinite(e[o]))&&n.push({path:`${t}.${o}`,message:"must be a finite number"})}function Fe(e){if(e&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.values(e))Fe(t)}return e}function ie(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}var ut=Object.freeze([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ft=Object.freeze([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function O(e){return mt(new TextEncoder().encode(e))}function v(e){return`sha256:${O(JSON.stringify(e))}`}function mt(e){let t=Math.ceil((e.length+9)/64)*64,r=new Uint8Array(t);r.set(e),r[e.length]=128;let n=new DataView(r.buffer);n.setUint32(t-8,Math.floor(e.length/536870912),!1),n.setUint32(t-4,e.length*8>>>0,!1);let i=[...ut],o=new Uint32Array(64);for(let s=0;s<r.length;s+=64){for(let u=0;u<16;u+=1)o[u]=n.getUint32(s+u*4,!1);for(let u=16;u<64;u+=1){let j=o[u-15],E=o[u-2],F=M(j,7)^M(j,18)^j>>>3,J=M(E,17)^M(E,19)^E>>>10;o[u]=o[u-16]+F+o[u-7]+J>>>0}let[l,S,I,D,f,d,c,P]=i;for(let u=0;u<64;u+=1){let j=M(f,6)^M(f,11)^M(f,25),E=f&d^~f&c,F=P+j+E+ft[u]+o[u]>>>0,J=M(l,2)^M(l,13)^M(l,22),_=l&S^l&I^S&I,Z=J+_>>>0;P=c,c=d,d=f,f=D+F>>>0,D=I,I=S,S=l,l=F+Z>>>0}i[0]=i[0]+l>>>0,i[1]=i[1]+S>>>0,i[2]=i[2]+I>>>0,i[3]=i[3]+D>>>0,i[4]=i[4]+f>>>0,i[5]=i[5]+d>>>0,i[6]=i[6]+c>>>0,i[7]=i[7]+P>>>0}return i.map(s=>s.toString(16).padStart(8,"0")).join("")}function M(e,t){return e>>>t|e<<32-t}var B="fps.plugin.materials",ae="@fps-games/plugin-materials";function Re(e){let t=e?.[B];if(t==null)return null;if(!U(t)||t.schemaVersion!==1||typeof t.snapshotId!="string"||!Array.isArray(t.shaders))throw new Error("Materials Plugin snapshot is invalid. Run fps-editor-prepare again.");let r=structuredClone(t);return pt(r),Te(r)}function dt(e){return se([...oe,...e?.shaders.map(t=>t.definition)??[]])}function pt(e){if(!/^sha256:[a-f0-9]{64}$/.test(e.snapshotId)||e.shaders.length===0)throw new Error("Materials Plugin snapshot identity is invalid. Run fps-editor-prepare again.");for(let r of e.shaders)if(!U(r)||!U(r.definition)||!U(r.program))throw new Error("Materials Plugin Shader snapshot is invalid. Run fps-editor-prepare again.");dt(e);for(let r of e.shaders){let{definition:n,program:i}=r;if(i.shaderId!==n.shaderId||i.definitionVersion!==n.version)throw new Error(`Material snapshot Definition identity does not match its program: ${n.shaderId}`);if(i.language!=="glsl"||!Ne(i.vertexSourcePath)||!Ne(i.fragmentSourcePath)||!/^[a-f0-9]{64}$/.test(i.vertexSourceHash)||!/^[a-f0-9]{64}$/.test(i.fragmentSourceHash)||typeof i.vertexSource!="string"||!i.vertexSource.trim()||typeof i.fragmentSource!="string"||!i.fragmentSource.trim())throw new Error(`Material snapshot program is invalid: ${n.shaderId}`);if(O(i.vertexSource)!==i.vertexSourceHash||O(i.fragmentSource)!==i.fragmentSourceHash)throw new Error(`Material snapshot source hash does not match its GLSL content: ${n.shaderId}`);if(!Array.isArray(i.attributes)||i.attributes.length===0||i.attributes.some(o=>!/^[A-Za-z_][A-Za-z0-9_]*$/.test(o))||new Set(i.attributes).size!==i.attributes.length)throw new Error(`Material snapshot attributes are invalid: ${n.shaderId}`);if(!["opaque","combine","add"].includes(i.alphaMode)||!U(i.enumUniformValues)||!U(i.frame)||!["on-demand","continuous"].includes(i.frame.mode))throw new Error(`Material snapshot rendering policy is invalid: ${n.shaderId}`)}let t={schemaVersion:e.schemaVersion,shaders:e.shaders};if(v(t)!==e.snapshotId)throw new Error("Materials Plugin snapshot payload does not match its identity. Run fps-editor-prepare again.")}function Ne(e){return typeof e=="string"&&!!e&&!e.startsWith("/")&&!e.includes("\\")&&!e.includes(":")&&e.split("/").every(t=>!!t&&t!=="."&&t!=="..")}function Te(e){if(!e||typeof e!="object"||Object.isFrozen(e))return e;for(let t of Object.values(e))Te(t);return Object.freeze(e)}function U(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}async function Ve(e,t){let r=t.plugins.find(I=>I.pluginId===B&&I.targets.includes("editor"));if(!r)return null;if(r.packageName!==ae)throw new Error(`Materials Plugin package must be ${ae}.`);if(r.config==null)return null;let n=A(r.config,"Materials Plugin config");if(n.schemaVersion!==1||!Array.isArray(n.shaders)||n.shaders.length===0)throw new Error("Materials Plugin config must use schemaVersion 1 and declare shaders.");let i=await Le(e),o=new Set,s=[];for(let I of n.shaders){let D=A(I,"Materials Plugin shader entry"),f=A(D.definition,"Materials Plugin Shader Definition"),d=A(D.program,"Materials Plugin shader program"),c=G(f.shaderId,"Material shaderId");if(o.has(c))throw new Error(`Duplicate Material shaderId: ${c}`);o.add(c);let P=f.version;if(!Number.isSafeInteger(P)||Number(P)<1)throw new Error(`Material Definition version must be a positive integer: ${c}`);if(f.runtimeKind!=="shader-material")throw new Error(`Material runtimeKind must be shader-material: ${c}`);if(d.language!=="glsl")throw new Error(`Material program language must be glsl: ${c}`);let u=Ce(d.vertexSource,`Material vertexSource: ${c}`),j=Ce(d.fragmentSource,`Material fragmentSource: ${c}`),E=await Oe(i,u),F=await Oe(i,j),J=_e(A(f.inspector,"Material Inspector").fields,"Material Inspector fields"),_=new Map;for(let $ of J){let p=A($,"Material Inspector field"),b=G(p.path,"Material Inspector field path");if(_.has(b))throw new Error(`Duplicate Material Inspector field: ${c}:${b}`);if(_.set(b,p),p.updateClass!=="uniform")throw new Error(`Deployment ShaderMaterial only supports uniform fields: ${c}:${b}`);if(!["number","boolean","enum","color","vec2","vec3"].includes(String(p.control)))throw new Error(`Deployment ShaderMaterial does not support control: ${c}:${String(p.control)}`);ce(p.binding,`Material Inspector binding: ${c}:${b}`);let N=De(f.propertiesSchema,typeof p.schemaPath=="string"?p.schemaPath:b);if(!N||N.kind!==p.control)throw new Error(`Material Inspector field control does not match its schema: ${c}:${b}`);let Y=gt(f.defaultProperties,b);if(Y===void 0||JSON.stringify(Y)!==JSON.stringify(p.defaultValue))throw new Error(`Material Inspector field default must match defaultProperties: ${c}:${b}`)}let Z=H(d.enumUniformValues)?d.enumUniformValues:{};for(let[$,p]of Object.entries(Z)){let b=_.get($),N=b?De(f.propertiesSchema,b.schemaPath??$):null,Y=A(p,`Material enum uniform mapping: ${c}:${$}`);if(!b||b.control!=="enum"||N?.kind!=="enum"||!Array.isArray(N.values)||N.values.some(Q=>typeof Q!="string"||!Number.isFinite(Y[Q]))||Object.keys(Y).some(Q=>!N.values.includes(Q)))throw new Error(`Material enum uniform mapping is invalid: ${c}:${$}`)}for(let[$,p]of _)if(p.control==="enum"&&!Object.prototype.hasOwnProperty.call(Z,$))throw new Error(`Material enum uniform mapping is required: ${c}:${$}`);let y=d.frame===void 0?{mode:"on-demand"}:A(d.frame,"Material frame");if(y.mode!=="on-demand"&&y.mode!=="continuous")throw new Error(`Material frame mode is invalid: ${c}`);y.timeUniform!==void 0&&ce(y.timeUniform,`Material timeUniform: ${c}`),y.cameraPositionUniform!==void 0&&ce(y.cameraPositionUniform,`Material cameraPositionUniform: ${c}`);let ye=d.alphaMode??"opaque";if(!["opaque","combine","add"].includes(String(ye)))throw new Error(`Material alphaMode is invalid: ${c}`);s.push(Object.freeze({definition:f,program:Object.freeze({shaderId:c,definitionVersion:P,language:"glsl",vertexSourcePath:u,fragmentSourcePath:j,vertexSourceHash:O(E),fragmentSourceHash:O(F),vertexSource:E,fragmentSource:F,attributes:Object.freeze(d.attributes===void 0?["position","normal"]:_e(d.attributes,"Material attributes").map($=>G($,"Material attribute"))),alphaMode:ye,enumUniformValues:Object.freeze(structuredClone(Z)),frame:Object.freeze({mode:y.mode,...y.timeUniform?{timeUniform:G(y.timeUniform,"Material timeUniform")}:{},...y.cameraPositionUniform?{cameraPositionUniform:G(y.cameraPositionUniform,"Material cameraPositionUniform")}:{}})})}))}let l={schemaVersion:1,shaders:Object.freeze(s)},S=Object.freeze({...l,snapshotId:v(l)});return Re({[B]:S})}async function Oe(e,t){let r=le.resolve(e,t),n=await Le(r).catch(()=>"");if(!n||n!==e&&!n.startsWith(`${e}${le.sep}`))throw new Error(`Material shader source escapes the project root: ${t}`);if(!(await ht(n)).isFile())throw new Error(`Material shader source is not a file: ${t}`);return bt(n,"utf8")}function Ce(e,t){let r=G(e,t);if(le.isAbsolute(r)||r.includes("\\")||r.split("/").some(n=>!n||n==="."||n===".."))throw new Error(`${t} must be a normalized project-relative path.`);return r}function G(e,t){if(typeof e!="string"||!e.trim())throw new Error(`${t} must be a non-empty string.`);return e.trim()}function ce(e,t){if(typeof e!="string"||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(e))throw new Error(`${t} must be a GLSL identifier.`)}function De(e,t){let r=H(e)?e:null;if(!r||typeof t!="string")return null;for(let n of t.replace(/^properties\./,"").split(".").filter(Boolean)){if(r.kind!=="object"||!H(r.properties)||!H(r.properties[n]))return null;r=r.properties[n]}return r}function gt(e,t){let r=e;for(let n of t.replace(/^properties\./,"").split(".").filter(Boolean)){if(!H(r))return;r=r[n]}return r}function _e(e,t){if(!Array.isArray(e))throw new Error(`${t} must be an array.`);return e}function A(e,t){if(!H(e))throw new Error(`${t} must be an object.`);return e}function H(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}var kt=a.dirname(It(import.meta.url)),de=a.resolve(kt,".."),pe=$e(process.argv.slice(2)),jt=pe.argv.includes("--reset-test-state"),Ue=pe.argv.filter(e=>e!=="--reset-test-state");if(Ue.length>0)throw new Error(`Unexpected argument: ${Ue[0]}`);var h=await ee(pe.projectRoot),W=a.join(h,".fps-editor"),K=a.join(W,"deployments"),Et=a.join(W,"state"),He=a.join(W,"current.json");Bt();await he(h,W);await he(W,K);await he(W,Et,448);jt&&console.log("[fps-editor-prepare] Browser Draft test state resets with the page lifecycle.");var k=await Ot(),C=JSON.parse(await me(a.join(de,"manifest.json"),"utf8"));Ft(C);var ne=await _t(),Be=await Ve(h,ne),qe=Object.freeze({...Be?{[B]:Be}:{}}),Ke=Lt({projectDefinition:ne,pluginSnapshots:qe});await be(de,C.files);var We=zt(C.files);k&&k.editorDistHash===C.build.distHash&&k.projectSourceHash===Ke&&k.deployment?.packageHash===We&&JSON.stringify(k.deployment?.manifest)===JSON.stringify(C)&&await Nt(k)&&(console.log("[fps-editor-prepare] existing Browser deployment and static Project definition are current."),process.exit(0));var m=await Pt(de,C,We),At=["a","b"].map(e=>({release:e,artifactId:`${m.id}-${e}`,rootPath:a.relative(h,a.join(m.rootPath,"public")),build:{...m.manifest.build,buildId:`${m.manifest.build.buildId}.release-${e}`}})),Je={schemaVersion:4,preparedAt:new Date().toISOString(),editorDistHash:C.build.distHash,projectSourceHash:Ke,projectDefinition:ne,pluginSnapshots:qe,deployment:{id:m.id,rootPath:a.relative(h,m.rootPath),packageHash:m.packageHash,manifest:m.manifest},serverEntry:a.relative(h,a.join(m.rootPath,m.manifest.entrypoints.server)),workerEntry:a.relative(h,a.join(m.rootPath,m.manifest.entrypoints.worker)),browserEntry:a.relative(h,a.join(m.rootPath,m.manifest.entrypoints.browser)),builds:At,staged:k?.deployment?.id&&k.deployment.id!==m.id?{deploymentId:k.deployment.id}:null};await Vt(He,Je);await Ct(Je);console.log([`[fps-editor-prepare] prepared Browser + Project I/O deployment ${m.id}`,`for static Project ${ne.projectId}.`].join(" "));async function Pt(e,t,r){let n=await $t(a.join(K,".install-"));try{for(let l of t.files){let S=a.join(n,l.path);await fe(a.dirname(S),{recursive:!0}),await ze(a.join(e,l.path),S)}await ze(a.join(e,"manifest.json"),a.join(n,"manifest.json"));let i=`${t.version}-${r.slice(0,16)}`,o=a.join(K,i),s=await q(o).catch(()=>null);return s&&await Rt(e,o,t)?await te(n,{recursive:!0,force:!0}):s?await Tt(n,o):await X(n,o),{id:i,rootPath:o,manifest:t,packageHash:r}}finally{await te(n,{recursive:!0,force:!0}).catch(()=>{})}}function Ft(e){if(e?.schemaVersion!==3||e.artifactKind!=="fps-editor-deployment-package"||e.packageName!=="@fps-games/editor-deployment")throw new Error("Editor deployment manifest is invalid.");if(e.node?.range!==">=24 <27"||e.node?.bundled!==!1)throw new Error("Editor deployment Node.js contract is invalid.");if(typeof e.build?.version!="string"||typeof e.build?.distHash!="string"||typeof e.commitSha!="string")throw new Error("Editor deployment build identity is incomplete.");if(e.authority!=="browser")throw new Error("Editor deployment authority must be Browser-owned.");for(let t of["server","worker","browser"])if(typeof e.entrypoints?.[t]!="string")throw new Error(`Editor deployment ${t} entrypoint is missing.`);for(let t of["prepare","server","project"])if(typeof e.binaries?.[t]!="string")throw new Error(`Editor deployment ${t} binary is missing.`);if(e.projectContentBundled!==!1)throw new Error("Editor deployment must not contain project content.")}async function be(e,t){if(!Array.isArray(t)||t.length===0)throw new Error("Editor deployment file manifest is empty.");for(let r of t){if(!Ze(r.path))throw new Error(`Unsafe deployment file path: ${String(r.path)}.`);let n=await re(e,r.path);if(n.byteLength!==r.size||Ut(n)!==r.sha256)throw new Error(`Editor deployment file integrity mismatch: ${r.path}.`)}}async function Nt(e){try{if(!e.deployment||typeof e.deployment.rootPath!="string"||!e.deployment.manifest||!Array.isArray(e.deployment.manifest.files))return!1;let t=a.resolve(h,e.deployment.rootPath);if(!ge(t,K))return!1;let r={serverEntry:a.relative(h,a.join(t,e.deployment.manifest.entrypoints.server)),workerEntry:a.relative(h,a.join(t,e.deployment.manifest.entrypoints.worker)),browserEntry:a.relative(h,a.join(t,e.deployment.manifest.entrypoints.browser))};if(Object.entries(r).some(([s,l])=>e[s]!==l))return!1;let n=Object.values(r);return(await Promise.all(n.map(s=>q(a.join(h,s))))).every(s=>s.isFile()&&!s.isSymbolicLink())?(await be(t,e.deployment.manifest.files),(await re(t,"manifest.json")).equals(Buffer.from(`${JSON.stringify(e.deployment.manifest,null,2)}
3
+ `))):!1}catch{return!1}}async function Rt(e,t,r){try{await be(t,r.files);let[n,i]=await Promise.all([re(e,"manifest.json"),re(t,"manifest.json")]);return n.equals(i)}catch{return!1}}async function re(e,t){if(!Ze(t))throw new Error(`Unsafe deployment file path: ${String(t)}.`);let r=await q(e);if(!r.isDirectory()||r.isSymbolicLink())throw new Error(`Editor deployment root is not a regular directory: ${e}.`);let n=await ee(e),i=a.join(e,t),o=await q(i);if(!o.isFile()||o.isSymbolicLink())throw new Error(`Editor deployment file is not a regular file: ${t}.`);let s=await ee(i),l=a.resolve(n,t);if(s!==l||!ge(s,n))throw new Error(`Editor deployment file escaped its deployment root: ${t}.`);return me(i)}async function he(e,t,r){await q(t).catch(s=>{if(Ge(s)&&s.code==="ENOENT")return null;throw s})||await fe(t,r===void 0?void 0:{mode:r}).catch(s=>{if(!Ge(s)||s.code!=="EEXIST")throw s});let i=await q(t),o=await ee(t);if(!i.isDirectory()||i.isSymbolicLink()||o!==t||!ge(o,e))throw new Error(`Editor deployment directory must be a regular project directory: ${t}.`)}async function Tt(e,t){let r=a.join(K,`.replace-${a.basename(t)}-${process.pid}-${yt(6).toString("hex")}`);await X(t,r);try{await X(e,t)}catch(n){try{await X(r,t)}catch(i){throw new AggregateError([n,i],`Editor deployment replacement and rollback both failed for ${a.basename(t)}.`)}throw n}await te(r,{recursive:!0,force:!0})}async function Ot(){try{let e=JSON.parse(await me(He,"utf8"));return e?.schemaVersion===4?e:null}catch{return null}}async function Ct(e){let t=new Set([e.deployment.id,e.staged?.deploymentId].filter(Boolean));await Dt(K,t)}async function Dt(e,t){for(let r of await wt(e,{withFileTypes:!0}))!r.isDirectory()||r.name.startsWith(".")||t.has(r.name)||await te(a.join(e,r.name),{recursive:!0,force:!0})}async function _t(){let e=a.join(h,"fps.config.ts");if(!(await xt(e).catch(()=>null))?.isFile())throw new Error("fps.config.ts is required.");let r=await import(`${Mt(e).href}?fps-editor-prepare=${Date.now()}`),n=r.default??r.fpsConfig;if(!n||typeof n!="object"||Array.isArray(n)||n.schemaVersion!==1||typeof n.projectId!="string"||!n.authoring||!Array.isArray(n.plugins))throw new Error("fps.config.ts must default-export a valid defineFpsProject() definition.");return n}function Lt(e){return ue("sha256").update(JSON.stringify(e)).digest("hex")}async function Vt(e,t){await fe(a.dirname(e),{recursive:!0});let r=`${e}.${process.pid}.tmp`;await St(r,`${JSON.stringify(t,null,2)}
4
+ `),await X(r,e)}function Ze(e){return typeof e=="string"&&e.length>0&&!e.includes("\\")&&!a.isAbsolute(e)&&!e.split("/").includes("..")}function ge(e,t){if(e===t)return!0;let r=a.relative(t,e);return r.length>0&&r!==".."&&!r.startsWith(`..${a.sep}`)&&!a.isAbsolute(r)}function zt(e){return ue("sha256").update(JSON.stringify(e)).digest("hex")}function Ut(e){return ue("sha256").update(e).digest("hex")}function Ge(e){return e instanceof Error&&"code"in e}function Bt(){let e=Number.parseInt(process.versions.node.split(".")[0]??"",10);if(!Number.isSafeInteger(e)||e<24||e>=27)throw new Error(`prepare:server requires Node.js >=24 <27; current version is ${process.versions.node}.`)}
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{once as u}from"node:events";import{readFile as w}from"node:fs/promises";import{spawn as v}from"node:child_process";import o from"node:path";import j from"node:path";function l(r){let d=[],t;for(let n=0;n<r.length;n+=1){let e=r[n];if(e!=="--project-root"&&!e.startsWith("--project-root=")){d.push(e);continue}if(t!==void 0)throw new Error("--project-root may only be provided once.");let s=e==="--project-root"?r[++n]:e.slice(15);if(s===void 0||!s.trim()||s.startsWith("--"))throw new Error("--project-root requires a non-empty path.");t=s}return{argv:d,projectRoot:j.resolve(process.cwd(),t??"."),explicit:t!==void 0}}var p=l(process.argv.slice(2));if(p.argv.length>0)throw new Error(`Unexpected argument: ${p.argv[0]}`);var c=p.projectRoot,E=o.join(c,".fps-editor/current.json"),a=JSON.parse(await w(E,"utf8").catch(r=>{throw new Error("Editor deployment is not prepared. Run fps-editor-prepare --project-root <project> first.",{cause:r})}));if(a.schemaVersion!==3||typeof a.serverEntry!="string")throw new Error("Editor deployment state is invalid. Run fps-editor-prepare --project-root <project> again.");var h=o.resolve(c,a.serverEntry),i=o.relative(c,h);if(!i||i===".."||i.startsWith(`..${o.sep}`)||o.isAbsolute(i))throw new Error("Prepared Editor server entry escapes the project root.");var m=v(process.execPath,[h],{cwd:c,env:process.env,stdio:"inherit"});for(let r of["SIGINT","SIGTERM"])process.once(r,()=>m.kill(r));var[g,f]=await u(m,"exit");f?process.kill(process.pid,f):process.exitCode=g??1;
2
+ import{once as u}from"node:events";import{readFile as w}from"node:fs/promises";import{spawn as v}from"node:child_process";import o from"node:path";import j from"node:path";function l(r){let d=[],t;for(let n=0;n<r.length;n+=1){let e=r[n];if(e!=="--project-root"&&!e.startsWith("--project-root=")){d.push(e);continue}if(t!==void 0)throw new Error("--project-root may only be provided once.");let s=e==="--project-root"?r[++n]:e.slice(15);if(s===void 0||!s.trim()||s.startsWith("--"))throw new Error("--project-root requires a non-empty path.");t=s}return{argv:d,projectRoot:j.resolve(process.cwd(),t??"."),explicit:t!==void 0}}var p=l(process.argv.slice(2));if(p.argv.length>0)throw new Error(`Unexpected argument: ${p.argv[0]}`);var c=p.projectRoot,E=o.join(c,".fps-editor/current.json"),a=JSON.parse(await w(E,"utf8").catch(r=>{throw new Error("Editor deployment is not prepared. Run fps-editor-prepare --project-root <project> first.",{cause:r})}));if(a.schemaVersion!==4||typeof a.serverEntry!="string")throw new Error("Editor deployment state is invalid. Run fps-editor-prepare --project-root <project> again.");var h=o.resolve(c,a.serverEntry),i=o.relative(c,h);if(!i||i===".."||i.startsWith(`..${o.sep}`)||o.isAbsolute(i))throw new Error("Prepared Editor server entry escapes the project root.");var m=v(process.execPath,[h],{cwd:c,env:process.env,stdio:"inherit"});for(let r of["SIGINT","SIGTERM"])process.once(r,()=>m.kill(r));var[g,f]=await u(m,"exit");f?process.kill(process.pid,f):process.exitCode=g??1;
@@ -1,6 +1,6 @@
1
1
  FPS Game Editor deployment npm package
2
- Version: 0.2.3-beta.13
3
- Commit: e4254b1303732e67474f2852e9f7a21f874a252f
2
+ Version: 0.2.3-beta.14
3
+ Commit: de6f8eb3a03759702af1ec76c35dfa5fbc5379e3
4
4
 
5
5
  This package contains compiled third-party dependencies declared by the source repository.
6
6
  The authoritative dependency names, versions, notices, and license metadata are recorded in
package/manifest.json CHANGED
@@ -1,42 +1,36 @@
1
1
  {
2
- "schemaVersion": 2,
2
+ "schemaVersion": 3,
3
3
  "artifactKind": "fps-editor-deployment-package",
4
4
  "packageName": "@fps-games/editor-deployment",
5
- "version": "0.2.3-beta.13",
6
- "commitSha": "e4254b1303732e67474f2852e9f7a21f874a252f",
5
+ "version": "0.2.3-beta.14",
6
+ "commitSha": "de6f8eb3a03759702af1ec76c35dfa5fbc5379e3",
7
7
  "node": {
8
8
  "range": ">=24 <27",
9
9
  "bundled": false
10
10
  },
11
11
  "build": {
12
12
  "packageName": "@fps-games/editor",
13
- "version": "0.2.3-beta.13",
14
- "buildId": "0.2.3-beta.13-e46749a8bb61",
15
- "distHash": "e46749a8bb61794103f5beebaaa3d478e4056b225005d15b54ab989d6d1d38e5"
13
+ "version": "0.2.3-beta.14",
14
+ "buildId": "0.2.3-beta.14-eab0c3634e5c",
15
+ "distHash": "eab0c3634e5c5e3e9ff76bbbf239b6b4f734c9c21b5796fdc17ff51dae6417ef"
16
16
  },
17
17
  "binaries": {
18
18
  "prepare": "bin/fps-editor-prepare.mjs",
19
19
  "server": "bin/fps-editor-server.mjs",
20
- "project": "bin/fps-editor-project.mjs",
21
- "agent": "bin/fps-editor-agent.mjs"
20
+ "project": "bin/fps-editor-project.mjs"
22
21
  },
23
22
  "entrypoints": {
24
23
  "server": "runtime/editor-control-plane.mjs",
25
24
  "worker": "worker/editor-service-worker.mjs",
26
- "browser": "public/index.html",
27
- "runtimeViteBridge": "runtime/runtime-debug-authoring-bridge.mjs"
25
+ "browser": "public/index.html"
28
26
  },
27
+ "authority": "browser",
29
28
  "projectContentBundled": false,
30
29
  "files": [
31
- {
32
- "path": "bin/fps-editor-agent.mjs",
33
- "size": 34366,
34
- "sha256": "4883afce5d90f9dbfb114c5e3991c5c13e230299e322db281e31434a3f6d5faa"
35
- },
36
30
  {
37
31
  "path": "bin/fps-editor-prepare.mjs",
38
- "size": 32455,
39
- "sha256": "068c1e0de67569dcd2e9e14772456e98742cd976d64eaf56413d3506973662ea"
32
+ "size": 32223,
33
+ "sha256": "b5a42aa36e8205cbac73a80a934badbbcfa6e737acd4ca6d9f9b35d1c38ae017"
40
34
  },
41
35
  {
42
36
  "path": "bin/fps-editor-project.mjs",
@@ -46,12 +40,12 @@
46
40
  {
47
41
  "path": "bin/fps-editor-server.mjs",
48
42
  "size": 1534,
49
- "sha256": "cf0f06b14151fd4da32d74c94f7adc89cfe30b6839b84c470d76d534776ef574"
43
+ "sha256": "91ea74f9d86f87cb403c00763728c4abcafe0a1e2fe29e0c5a8def9c9a069fd1"
50
44
  },
51
45
  {
52
46
  "path": "licenses/THIRD_PARTY_NOTICES.txt",
53
47
  "size": 361,
54
- "sha256": "167b59a33ba2af104635dd2b97027ebe7973a838df1c01917ddcbaa117d61729"
48
+ "sha256": "45d0a037f3fae5b0ac93a95a376961a248313ed3eb93520c989e6b6e16ee6a9f"
55
49
  },
56
50
  {
57
51
  "path": "public/assets/abstractAudioBus-B_nOEXGJ.js",
@@ -554,19 +548,19 @@
554
548
  "sha256": "d073f6fcebf3a8df09a6f131373477c5e42e91d4ffa223fd208b3e00dea299b1"
555
549
  },
556
550
  {
557
- "path": "public/assets/editor-core-plugin-host-c2002442.js",
558
- "size": 81527,
559
- "sha256": "c2002442f2beef9f889604ca693be3ef8f4e8f1719f7235dd9991d2ecc5f5f19"
551
+ "path": "public/assets/editor-core-plugin-host-94e73c63.js",
552
+ "size": 81439,
553
+ "sha256": "94e73c6349e9e0e1aba449241140123bf6b6578e7df2c9a5a83d1597cde16b92"
560
554
  },
561
555
  {
562
- "path": "public/assets/editor-core-plugin-host-c2002442.js.br",
563
- "size": 20816,
564
- "sha256": "4e6f9c0b79b3f09ed52bc607094f478bc208715086d09015b87f8d2e84617f85"
556
+ "path": "public/assets/editor-core-plugin-host-94e73c63.js.br",
557
+ "size": 20877,
558
+ "sha256": "48d02261fedb8ced89bb5baa8395f375287bc86b7f2c2192fdcdc35e2c608b24"
565
559
  },
566
560
  {
567
- "path": "public/assets/editor-core-plugin-host-c2002442.js.gz",
568
- "size": 23236,
569
- "sha256": "4669d18fd115ab9cae2b2c32fb54a0bba583b0cd4a12b9d399bbd0db8bea68dd"
561
+ "path": "public/assets/editor-core-plugin-host-94e73c63.js.gz",
562
+ "size": 23224,
563
+ "sha256": "8490ca99483bcbfef49722f130cf7983e771bbf60fdbb896c795bfd206c6bd58"
570
564
  },
571
565
  {
572
566
  "path": "public/assets/exrTextureLoader-BDHqc6R_.js",
@@ -1634,19 +1628,19 @@
1634
1628
  "sha256": "90aa7a97454a456b51041d0ffd95e58764299fd83075d786b81634c31514f6c1"
1635
1629
  },
1636
1630
  {
1637
- "path": "public/assets/index-c2oXc5B5.js",
1638
- "size": 44559,
1639
- "sha256": "3995e63a6813d112c60be207fcd4d6246907afe80d03906344d5c9bcfe3bec66"
1631
+ "path": "public/assets/index-CToRH9gy.js",
1632
+ "size": 37552,
1633
+ "sha256": "2ddccf21c4e98882e3a2a7988d4ed7e6b041f314422986d75bb53198cfb73ace"
1640
1634
  },
1641
1635
  {
1642
- "path": "public/assets/index-c2oXc5B5.js.br",
1643
- "size": 12970,
1644
- "sha256": "1f22989653e9a237a5b8eabf8613970d6ca91d7e607539881934b105be0a4653"
1636
+ "path": "public/assets/index-CToRH9gy.js.br",
1637
+ "size": 10763,
1638
+ "sha256": "958e0ed21dcd479ab4d2b42a84b8354cd277a5985cb5899ee1151b2c1c16ad43"
1645
1639
  },
1646
1640
  {
1647
- "path": "public/assets/index-c2oXc5B5.js.gz",
1648
- "size": 15024,
1649
- "sha256": "61a6124d5dd9113322b81fa0ad1db533e7e594ff1a249057f5c55b372fef0529"
1641
+ "path": "public/assets/index-CToRH9gy.js.gz",
1642
+ "size": 12238,
1643
+ "sha256": "5422dd83cdd0bf8ea1faff587ebf12a37dd66b62796b0f74895ee0116b1d0a0b"
1650
1644
  },
1651
1645
  {
1652
1646
  "path": "public/assets/index-Xd6hsly2.js",
@@ -2124,34 +2118,34 @@
2124
2118
  "sha256": "c98a82244f857667386c5836c68291e4d1264538921d2dfbf71128a4d9bc9e53"
2125
2119
  },
2126
2120
  {
2127
- "path": "public/assets/playable-sdk-Dfz54Mv_.js",
2128
- "size": 146895,
2129
- "sha256": "bcffaabf178088815e9b5ddab9d84a5c061ed7b86cfa0eb4dbe60d9a6a30c370"
2121
+ "path": "public/assets/playable-sdk-CrrQJDf4.js",
2122
+ "size": 144678,
2123
+ "sha256": "d777c241fd14ae4f92047e51edafd54bd4c5a7046856c5ac0f775804bad2dfe9"
2130
2124
  },
2131
2125
  {
2132
- "path": "public/assets/playable-sdk-Dfz54Mv_.js.br",
2133
- "size": 34974,
2134
- "sha256": "996d81861311e1042a8d345620f280fce7061b5fc23117f8d888292d4113a7a1"
2126
+ "path": "public/assets/playable-sdk-CrrQJDf4.js.br",
2127
+ "size": 34608,
2128
+ "sha256": "4fdd12c4b63f21024bcdbdd218816423346bc04b407be76ab7b96ab931cd4c99"
2135
2129
  },
2136
2130
  {
2137
- "path": "public/assets/playable-sdk-Dfz54Mv_.js.gz",
2138
- "size": 42444,
2139
- "sha256": "c43dd7ea5b71d662f6a7d40129222c2e31154ef098db0fd877001a1246aba08c"
2131
+ "path": "public/assets/playable-sdk-CrrQJDf4.js.gz",
2132
+ "size": 41943,
2133
+ "sha256": "b82e6e26c29669ff52e951dd89bb8372ac0b08d15f5b28f968f851e871076877"
2140
2134
  },
2141
2135
  {
2142
- "path": "public/assets/playable-standard-project-C61X2B53.js",
2143
- "size": 3567528,
2144
- "sha256": "899ddf593e0bd402f5e635fcc080e9a54dbb1008be6ac65f1f307cbb3509be64"
2136
+ "path": "public/assets/playable-standard-project-DkUozryX.js",
2137
+ "size": 3578112,
2138
+ "sha256": "36a1ed02d59902ae3ca77aa105f8dcbb131fa23463a0aba39913a833dd6e099d"
2145
2139
  },
2146
2140
  {
2147
- "path": "public/assets/playable-standard-project-C61X2B53.js.br",
2148
- "size": 745655,
2149
- "sha256": "21d89c3ceeb94cd2fc202ebbb122ca51dc441d03ca8a15fe972b14f1eacc8ad8"
2141
+ "path": "public/assets/playable-standard-project-DkUozryX.js.br",
2142
+ "size": 742637,
2143
+ "sha256": "0502bf318c36dc1122d0a5918c846a6d8093f03823569b3bfe698f75c1dc9bce"
2150
2144
  },
2151
2145
  {
2152
- "path": "public/assets/playable-standard-project-C61X2B53.js.gz",
2153
- "size": 960493,
2154
- "sha256": "a603393200d9efe85ba5ca7315980f22e33d9f636d5a13365c66b10de49b7a05"
2146
+ "path": "public/assets/playable-standard-project-DkUozryX.js.gz",
2147
+ "size": 958487,
2148
+ "sha256": "8fcb917ac6b8363dc9b406b3033b3080f5c17838e340a2d38949ef417dfcc4bb"
2155
2149
  },
2156
2150
  {
2157
2151
  "path": "public/assets/rgbdDecode.fragment-Cf7NitgJ.js",
@@ -2651,38 +2645,33 @@
2651
2645
  {
2652
2646
  "path": "public/index.html",
2653
2647
  "size": 1027,
2654
- "sha256": "13c7f4ef7dbe60ba6f7f5781ae1b893f45948550bd6db0d85edfaf4cfdb18b0e"
2648
+ "sha256": "514fbdfde6884e633149082f4b0173e9b27f7a3e76b7350c90deff5f614e5871"
2655
2649
  },
2656
2650
  {
2657
2651
  "path": "public/index.html.br",
2658
- "size": 392,
2659
- "sha256": "d47c81b530097d3f0799c3d36cde971ebf7e8eb3d1ed3f400293710a49fbf5b3"
2652
+ "size": 389,
2653
+ "sha256": "61a418a0e82afefb1f363c683dd50335ea8e7778e61776be48ef1fa4b66b9438"
2660
2654
  },
2661
2655
  {
2662
2656
  "path": "public/index.html.gz",
2663
- "size": 558,
2664
- "sha256": "7decded24f6be1ed83b66664e56b1b92cc88ee87b0e093d7a118cb4801eb61b3"
2657
+ "size": 557,
2658
+ "sha256": "7e4fda7af4017f3792069801c9a6eab24012905c42e5305b70c54086242902d6"
2665
2659
  },
2666
2660
  {
2667
2661
  "path": "runtime/editor-control-plane.mjs",
2668
- "size": 20995,
2669
- "sha256": "0561f81548ad09c3e01876b23608e6ffe9762e7a5cf028f479cbd8abaccf439b"
2670
- },
2671
- {
2672
- "path": "runtime/runtime-debug-authoring-bridge.mjs",
2673
- "size": 3242,
2674
- "sha256": "2768b4f4640607ed784ca69418a535425dd6ca269f790180c38a54537e7da107"
2662
+ "size": 801375,
2663
+ "sha256": "0b279407265c1c9e6a37e5046de7da371f1678a064e1f1310d59267ab462952c"
2675
2664
  },
2676
2665
  {
2677
2666
  "path": "worker/editor-service-worker.mjs",
2678
- "size": 1230440,
2679
- "sha256": "9239816ac7791fe21fc4fcbad3cd2258ff66be412850fd2f5d70b6f91e0eed95"
2667
+ "size": 620853,
2668
+ "sha256": "c5a4add341bf47e6891ba50fbf8be29776359a16242e7fec438e3ceb5f18e003"
2680
2669
  }
2681
2670
  ],
2682
2671
  "sizes": {
2683
- "packagePayloadBytes": 17436842,
2684
- "browserRawBytes": 11077593,
2685
- "browserGzipBytes": 2704619,
2686
- "browserBrotliBytes": 2111208
2672
+ "packagePayloadBytes": 17560228,
2673
+ "browserRawBytes": 11078865,
2674
+ "browserGzipBytes": 2699313,
2675
+ "browserBrotliBytes": 2105675
2687
2676
  }
2688
2677
  }
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "@fps-games/editor-deployment",
3
- "version": "0.2.3-beta.13",
3
+ "version": "0.2.3-beta.14",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@fps-games/editor-deployment",
9
- "version": "0.2.3-beta.13",
9
+ "version": "0.2.3-beta.14",
10
10
  "bin": {
11
11
  "fps-editor-prepare": "bin/fps-editor-prepare.mjs",
12
12
  "fps-editor-server": "bin/fps-editor-server.mjs",
13
- "fps-editor-project": "bin/fps-editor-project.mjs",
14
- "fps-editor-agent": "bin/fps-editor-agent.mjs"
13
+ "fps-editor-project": "bin/fps-editor-project.mjs"
15
14
  },
16
15
  "engines": {
17
16
  "node": ">=24 <27"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fps-games/editor-deployment",
3
- "version": "0.2.3-beta.13",
3
+ "version": "0.2.3-beta.14",
4
4
  "type": "module",
5
5
  "description": "Prebuilt FPS Game Editor control plane, browser client, and project preparation tools.",
6
6
  "repository": {
@@ -11,8 +11,7 @@
11
11
  "bin": {
12
12
  "fps-editor-prepare": "bin/fps-editor-prepare.mjs",
13
13
  "fps-editor-server": "bin/fps-editor-server.mjs",
14
- "fps-editor-project": "bin/fps-editor-project.mjs",
15
- "fps-editor-agent": "bin/fps-editor-agent.mjs"
14
+ "fps-editor-project": "bin/fps-editor-project.mjs"
16
15
  },
17
16
  "files": [
18
17
  "bin",
@@ -31,11 +30,12 @@
31
30
  "node": ">=24 <27"
32
31
  },
33
32
  "devDependencies": {
34
- "@fps-games/editor": "0.2.3-beta.13",
35
- "@fps-games/editor-core": "0.2.3-beta.13",
36
- "@fps-games/editor-protocol": "0.2.3-beta.13",
33
+ "@fps-games/editor": "0.2.3-beta.14",
34
+ "@fps-games/editor-core": "0.2.3-beta.14",
35
+ "@fps-games/editor-playable-sdk": "0.2.3-beta.14",
36
+ "@fps-games/editor-protocol": "0.2.3-beta.14",
37
37
  "@fps-games/engine": "0.0.1-beta.21",
38
- "@fps-games/plugin-hierarchy": "0.2.3-beta.13",
38
+ "@fps-games/plugin-hierarchy": "0.2.3-beta.14",
39
39
  "@fps-games/plugin-sdk": "0.1.0-beta.2"
40
40
  },
41
41
  "publishConfig": {