sqlmesh 0.181.2.dev15__py3-none-any.whl → 0.181.2.dev16__py3-none-any.whl
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.
- sqlmesh/_version.py +2 -2
- {sqlmesh-0.181.2.dev15.dist-info → sqlmesh-0.181.2.dev16.dist-info}/METADATA +1 -1
- {sqlmesh-0.181.2.dev15.dist-info → sqlmesh-0.181.2.dev16.dist-info}/RECORD +49 -49
- web/client/dist/assets/{Audits-Dt3QUYCw.js → Audits-CpTpRWJS.js} +1 -1
- web/client/dist/assets/{Banner-NSDMTUuS.js → Banner-DoiNAKye.js} +1 -1
- web/client/dist/assets/{ChevronDownIcon-PDbmvmYa.js → ChevronDownIcon-BEGYfY2e.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-e7qtOZnd.js → ChevronRightIcon-DukIeKXy.js} +1 -1
- web/client/dist/assets/{Content-UwEUgKuG.js → Content-C_JUq1Do.js} +1 -1
- web/client/dist/assets/{Content-BlU-e5xI.js → Content-CfmwrKKm.js} +1 -1
- web/client/dist/assets/{Data-DEoVdKU8.js → Data-ChAnh4ni.js} +1 -1
- web/client/dist/assets/{DataCatalog-CgZ0v9q7.js → DataCatalog-DWoqDoha.js} +7 -7
- web/client/dist/assets/{Editor-BRHZhM5n.js → Editor-CUljCEXi.js} +1 -1
- web/client/dist/assets/{Editor-Dch_R4cm.js → Editor-ClszqJ2I.js} +1 -1
- web/client/dist/assets/{Errors-DH-4Ne3K.js → Errors-Fuw_f-1a.js} +1 -1
- web/client/dist/assets/{FileExplorer-T0Rm9zhJ.js → FileExplorer-CXZ9Q150.js} +1 -1
- web/client/dist/assets/{Footer-1h_XqoQ5.js → Footer-BFLq78dA.js} +1 -1
- web/client/dist/assets/{Header-DxWr0vca.js → Header-BEK5IMP9.js} +1 -1
- web/client/dist/assets/Input-tR0WpVuK.js +41 -0
- web/client/dist/assets/Lineage-CpFxhla3.js +1 -0
- web/client/dist/assets/{ListboxShow-DT2Vq8H-.js → ListboxShow-C9Uz0VvV.js} +1 -1
- web/client/dist/assets/ModelLineage-bdWk08Ab.js +1 -0
- web/client/dist/assets/{Models-7gFwDtX4.js → Models-BU-MA8yO.js} +1 -1
- web/client/dist/assets/{Page-CxGA6pbl.js → Page-DwNrMCBx.js} +1 -1
- web/client/dist/assets/{Plan-0rJvdSbW.js → Plan-CrjOn4QG.js} +1 -1
- web/client/dist/assets/{PlusCircleIcon-D6THv_ZD.js → PlusCircleIcon-C1VPxB8A.js} +1 -1
- web/client/dist/assets/{ReportErrors-BcdDXnmw.js → ReportErrors-BcmrRxbG.js} +1 -1
- web/client/dist/assets/{Root-PD0OqcHQ.js → Root-BzyY-jcn.js} +1 -1
- web/client/dist/assets/{SearchList-k4ylxX-x.js → SearchList-wEGQkxPR.js} +1 -1
- web/client/dist/assets/{SelectEnvironment-BsRoqhGW.js → SelectEnvironment-LGhN0dhR.js} +1 -1
- web/client/dist/assets/{SourceList-DsSkJAMU.js → SourceList-DHZ9-QtW.js} +1 -1
- web/client/dist/assets/{SourceListItem-Bt7Bfyt2.js → SourceListItem-CzN9ypEP.js} +1 -1
- web/client/dist/assets/{SplitPane-DWWdLh3i.js → SplitPane-Djy_uJgV.js} +1 -1
- web/client/dist/assets/{Tests-Cq9jRmAp.js → Tests-DXoZpfR7.js} +1 -1
- web/client/dist/assets/{Welcome-BrOApqHN.js → Welcome-DREQuVRP.js} +1 -1
- web/client/dist/assets/{context-YFUfJm57.js → context-C8brTRBZ.js} +2 -2
- web/client/dist/assets/{context-DH7g-F8j.js → context-CKu1HxT0.js} +1 -1
- web/client/dist/assets/{editor-BKhlmwRX.js → editor-D_hgjDRq.js} +1 -1
- web/client/dist/assets/{file-DahECWZX.js → file-CyBkQGGI.js} +1 -1
- web/client/dist/assets/{help-CeInptNb.js → help-BcOVbjKP.js} +1 -1
- web/client/dist/assets/{index-BafGN4in.js → index-CYAA3nVF.js} +1 -1
- web/client/dist/assets/index-RJnYVUFY.js +4 -0
- web/client/dist/assets/{plan-BX1iXHwl.js → plan-BaiSs9Um.js} +1 -1
- web/client/dist/assets/{project-Bag2J0QC.js → project-vqNomsgg.js} +1 -1
- web/client/dist/assets/{transition-BlPPv2uy.js → transition-CtNxN7ku.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Input-CLgDkIXg.js +0 -41
- web/client/dist/assets/Lineage-UyUAWe1z.js +0 -1
- web/client/dist/assets/ModelLineage-E21kqsuu.js +0 -1
- web/client/dist/assets/index-CAWWTpIH.js +0 -4
- {sqlmesh-0.181.2.dev15.dist-info → sqlmesh-0.181.2.dev16.dist-info}/WHEEL +0 -0
- {sqlmesh-0.181.2.dev15.dist-info → sqlmesh-0.181.2.dev16.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.181.2.dev15.dist-info → sqlmesh-0.181.2.dev16.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.181.2.dev15.dist-info → sqlmesh-0.181.2.dev16.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as E,d as U,a as k,j as z,a9 as O,ah as P,w as y,G as R,ai as C,J as H,i as x,aj as Q,ak as Z,b as V,h as ee}from"./index-
|
|
1
|
+
import{r as E,d as U,a as k,j as z,a9 as O,ah as P,w as y,G as R,ai as C,J as H,i as x,aj as Q,ak as Z,b as V,h as ee}from"./index-CYAA3nVF.js";import{u as h,M as g}from"./project-vqNomsgg.js";import{M as b}from"./file-CyBkQGGI.js";import{u as te}from"./editor-D_hgjDRq.js";const le={Added:1,Modified:2,Deleted:3},G=E.createContext({artifactRename:void 0,setArtifactRename:()=>{},selectArtifactsInRange:()=>new Set,createDirectory:()=>{},createFile:()=>{},renameArtifact:()=>{},removeArtifacts:()=>{},removeArtifactWithConfirmation:()=>{},moveArtifacts:()=>{},isTopGroupInActiveRange:()=>!1,isBottomGroupInActiveRange:()=>!1,isMiddleGroupInActiveRange:()=>!1});function re({children:$}){const{addError:v}=U(),A=h(e=>e.activeRange),l=h(e=>e.project),_=h(e=>e.files),D=h(e=>e.setActiveRange),j=h(e=>e.setSelectedFile),I=h(e=>e.setFiles),c=h(e=>e.inActiveRange),S=k(e=>e.addConfirmation),p=te(e=>e.tab),[F,r]=E.useState(!1),[w,N]=E.useState();E.useEffect(()=>{j(p==null?void 0:p.file)},[p==null?void 0:p.id]);function L(e){const n=A.length-1,s=l.allVisibleArtifacts,u=A[0],a=A[n],i=s.indexOf(e),o=u==null?0:s.indexOf(u),m=a==null?n:s.indexOf(a),f=i>o?o:i,d=i>m||i>o&&i<m?i:m;D(s.slice(f,d+1))}function X(e){if(F)return;r(!0);const t=O("new_directory");P([e.path,t].join("/"),{}).then(n=>{y(n)||e.open()}).catch(n=>v(R.FileExplorer,n)).finally(()=>{r(!1)})}function W(e,t){if(F)return;y(t)&&(e.isModels?t=".sql":e.isTests?t=".yaml":t=".py"),r(!0);const n=O("new_file",t);C(`${e.path}/${n}`,{content:""}).then(s=>{y(s)||e.open()}).catch(s=>v(R.FileExplorer,s)).finally(()=>{r(!1)})}function Y(e,t){var i;t=t==null?void 0:t.replaceAll("/","").trim();const s=(((i=e.parent)==null?void 0:i.artifacts)??[]).some(o=>o.name===t);if(F||H(t)||s)return;r(!0);const u=e.name,a=e.path;e.rename(t),e instanceof g&&P(a,{new_path:e.path}).catch(o=>{v(R.FileExplorer,o),e.rename(u)}).finally(()=>{r(!1),x(p)&&e.hasFile(p.file)&&j(p.file),I(l.allFiles)}),e instanceof b&&C(a,{new_path:e.path}).then(o=>{e.update(o),_.set(e.path,e),_.delete(a)}).catch(o=>{v(R.FileExplorer,o),e.rename(u)}).finally(()=>{r(!1),I(l.allFiles)})}function T(e){if(F)return;r(!0);const t=e.map(n=>n instanceof b?Q(n.path):Z(n.path));Promise.all(t).then(()=>{D([])}).catch(n=>v(R.FileExplorer,n)).finally(()=>{r(!1)})}function q(e){c(e)?S({headline:"Removing Selected Files/Directories",description:`Are you sure you want to remove ${A.length} items?`,yesText:"Yes, Remove",noText:"No, Cancel",details:A.map(t=>t.path),action:()=>{T(A)}}):S({headline:`Removing ${e instanceof g?"Directory":"File"}`,description:`Are you sure you want to remove the ${e instanceof g?"directory":"file"} "${e.name}"?`,yesText:"Yes, Remove",noText:"No, Cancel",action:()=>{x(e.parent)&&T([e])}})}function M(e,t,n=!1){if(F)return;r(!0);const s=[],u=[],a=[];if(e.forEach(i=>{const o=t.containsName(i.name),m=i.path;if(o&&V(n))return a.push(i);n&&i.rename(i.copyName());let f=[t.path,i.name].join("/");for(;f.startsWith("/");)f=f.slice(1).trim();i instanceof g&&(s.push(()=>{var d;(d=i.parent)==null||d.removeDirectory(i),t.addDirectory(i)}),u.push(P(m,{new_path:f})),i.allVisibleArtifacts.forEach(d=>e.splice(e.indexOf(d),1))),i instanceof b&&(s.push(()=>{var d;(d=i.parent)==null||d.removeFile(i),t.addFile(i)}),u.push(C(m,{new_path:f})))}),ee(a)){S({headline:"Moving Duplicates",description:"All duplicated names will be renamed!",yesText:"Yes, Rename",noText:"No, Cancel",details:a.map(i=>i.path),action:()=>{M(e,t,!0)}});return}Promise.all(u).then(i=>{i.forEach((o,m)=>{var f;return(f=s[m])==null?void 0:f.call(s)})}).catch(i=>{console.log(i)}).finally(()=>{r(!1),D([]),I(l.allFiles)})}function B(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&(y(n)||V(c(n)))&&x(s)&&c(s)}function J(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&(y(s)||V(c(s)))&&x(n)&&c(n)}function K(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&x(s)&&c(s)&&x(n)&&c(n)}return z.jsx(G.Provider,{value:{artifactRename:w,setArtifactRename:N,createDirectory:X,createFile:W,renameArtifact:Y,removeArtifacts:T,removeArtifactWithConfirmation:q,moveArtifacts:M,selectArtifactsInRange:L,isTopGroupInActiveRange:B,isBottomGroupInActiveRange:J,isMiddleGroupInActiveRange:K},children:$})}function ce(){return E.useContext(G)}export{le as EnumFileExplorerChange,G as FileExplorerContext,re as default,ce as useFileExplorer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as W,aA as y,w as l,b as A,aB as m}from"./index-
|
|
1
|
+
import{a1 as W,aA as y,w as l,b as A,aB as m}from"./index-CYAA3nVF.js";import{M as Z}from"./file-CyBkQGGI.js";const I=`(function(){"use strict";function l(n){return n===!1}function w(n){return n===""}function y(n){return a(n)||w(n)}function a(n){return n==null}function D(...n){return n.filter(Boolean).join("__")}const r={Upstream:"upstream",Downstream:"downstream"},m=self;m.onmessage=async n=>{if(n.data.topic==="lineage")try{const{currentLineage:t,newLineage:s,mainNode:o}=n.data.payload,e=await g(t,s),c=await N(o,e);m.postMessage({topic:"lineage",payload:{lineage:e,nodesConnections:c}})}catch(t){m.postMessage({topic:"error",error:t})}};async function g(n={},t={}){return Object.entries(t).reduce((s,[o,e=[]])=>{var c;return o=encodeURI(o),s[o]={models:e.map(encodeURI),columns:((c=n==null?void 0:n[o])==null?void 0:c.columns)??void 0},s},{})}async function N(n,t={}){return new Promise((s,o)=>{if(a(t)||a(n))return{};const e={};try{f(r.Upstream,n,t,e),f(r.Downstream,n,t,e)}catch(c){o(c)}s(e)})}function f(n=r.Downstream,t,s={},o={}){var u;const e=n===r.Downstream;let c=[];e?c=Object.keys(s).filter(i=>s[i].models.includes(t)):c=((u=s[t])==null?void 0:u.models)??[],l(t in o)&&(o[t]=d());for(const i of c){const p=e?d(t,i,[o[t]]):d(i,t,[o[t]]);i in o?o[i].edges.push(p):(o[i]=p,f(n,i,s,o))}}function d(n,t,s=[]){const o=D(n,t);return{id:y(o)?void 0:o,edges:s}}})();
|
|
2
2
|
`,r=typeof self<"u"&&self.Blob&&new Blob([I],{type:"text/javascript;charset=utf-8"});function F(t){let s;try{if(s=r&&(self.URL||self.webkitURL).createObjectURL(r),!s)throw"";const e=new Worker(s,{name:t==null?void 0:t.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(s)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(I),{name:t==null?void 0:t.name})}finally{s&&(self.URL||self.webkitURL).revokeObjectURL(s)}}const b=`(function(){"use strict";const g=self;import("https://cdn.jsdelivr.net/pyodide/v0.23.2/full/pyodide.js").then(()=>{const c=s();g.onmessage=async a=>{var i,l,t;const{sqlglot:C}=await c;if(a.data.topic==="validate"){let I;try{I=JSON.parse((i=C.get("validate"))==null?void 0:i(a.data.payload))}catch{I=!1}g.postMessage({topic:"validate",payload:I})}if(a.data.topic==="dialect"){let I;try{I=JSON.parse((l=C.get("get_dialect"))==null?void 0:l(a.data.payload))}catch{I={keywords:"",types:""}}g.postMessage({topic:"dialect",payload:I})}if(a.data.topic==="dialects"){let I;try{I=JSON.parse(C.get("dialects"))}catch{I=[]}g.postMessage({topic:"dialects",payload:I})}a.data.topic==="format"&&g.postMessage({topic:"format",payload:((t=C.get("format"))==null?void 0:t(a.data.payload.sql,a.data.payload.dialect))??""}),a.data.topic==="init"&&g.postMessage({topic:"init"})}}).catch(console.error);async function s(){g.pyodide=await g.loadPyodide(),await g.pyodide.loadPackage("micropip");const c=g.pyodide.pyimport("micropip");await c.install("sqlglot"),await c.install("typing-extensions");const a=await(await fetch(new URL("data:application/octet-stream;base64,aW1wb3J0IGpzb24KCmltcG9ydCBzcWxnbG90CmZyb20gc3FsZ2xvdCBpbXBvcnQgZXhwCmZyb20gc3FsZ2xvdC5kaWFsZWN0cy5kaWFsZWN0IGltcG9ydCBEaWFsZWN0LCBEaWFsZWN0VHlwZQoKZGlhbGVjdHMgPSBqc29uLmR1bXBzKAogICAgWwogICAgICAgIHsKICAgICAgICAgICAgImRpYWxlY3RfdGl0bGUiOiAiU1FMR2xvdCIgaWYgZGlhbGVjdCA9PSAiIiBlbHNlIGRpYWxlY3RfY2xhc3MuX19uYW1lX18sCiAgICAgICAgICAgICJkaWFsZWN0X25hbWUiOiBkaWFsZWN0LAogICAgICAgIH0KICAgICAgICBmb3IgZGlhbGVjdCwgZGlhbGVjdF9jbGFzcyBpbiBEaWFsZWN0LmNsYXNzZXMuaXRlbXMoKQogICAgXQopCgoKZGVmIHBhcnNlX3RvX2pzb24oc3FsOiBzdHIsIHJlYWQ6IERpYWxlY3RUeXBlID0gTm9uZSkgLT4gc3RyOgogICAgcmV0dXJuIGpzb24uZHVtcHMoCiAgICAgICAgW2V4cC5kdW1wKCkgaWYgZXhwIGVsc2Uge30gZm9yIGV4cCBpbiBzcWxnbG90LnBhcnNlKHNxbCwgcmVhZD1yZWFkLCBlcnJvcl9sZXZlbD0iaWdub3JlIildCiAgICApCgoKZGVmIGdldF9kaWFsZWN0KG5hbWU6IHN0ciA9ICIiKSAtPiBzdHI6CiAgICBkaWFsZWN0ID0gRGlhbGVjdC5jbGFzc2VzLmdldChuYW1lLCBEaWFsZWN0KQogICAga2V5d29yZHMgPSBkaWFsZWN0LnRva2VuaXplcl9jbGFzcy5LRVlXT1JEUwogICAgdHlwZV9tYXBwaW5nID0gZGlhbGVjdC5nZW5lcmF0b3JfY2xhc3MuVFlQRV9NQVBQSU5HCgogICAgcmV0dXJuIGpzb24uZHVtcHMoCiAgICAgICAgewogICAgICAgICAgICAia2V5d29yZHMiOiAiICIuam9pbihrZXl3b3JkcyksCiAgICAgICAgICAgICJ0eXBlcyI6ICIgIi5qb2luKHR5cGVfbWFwcGluZy5nZXQodCwgdC52YWx1ZSkgZm9yIHQgaW4gZXhwLkRhdGFUeXBlLlR5cGUpLAogICAgICAgIH0KICAgICkKCgpkZWYgZm9ybWF0KHNxbDogc3RyID0gIiIsIHJlYWQ6IERpYWxlY3RUeXBlID0gTm9uZSkgLT4gc3RyOgogICAgcmV0dXJuICJcbiIuam9pbigKICAgICAgICBzcWxnbG90LnRyYW5zcGlsZShzcWwsIHJlYWQ9cmVhZCwgZXJyb3JfbGV2ZWw9c3FsZ2xvdC5lcnJvcnMuRXJyb3JMZXZlbC5JR05PUkUsIHByZXR0eT1UcnVlKQogICAgKQoKCmRlZiB2YWxpZGF0ZShzcWw6IHN0ciA9ICIiLCByZWFkOiBEaWFsZWN0VHlwZSA9IE5vbmUpIC0+IHN0cjoKICAgIHRyeToKICAgICAgICBzcWxnbG90LnRyYW5zcGlsZSgKICAgICAgICAgICAgc3FsLCByZWFkPXJlYWQsIHByZXR0eT1GYWxzZSwgdW5zdXBwb3J0ZWRfbGV2ZWw9c3FsZ2xvdC5lcnJvcnMuRXJyb3JMZXZlbC5JTU1FRElBVEUKICAgICAgICApCiAgICBleGNlcHQgc3FsZ2xvdC5lcnJvcnMuUGFyc2VFcnJvcjoKICAgICAgICByZXR1cm4ganNvbi5kdW1wcyhGYWxzZSkKCiAgICByZXR1cm4ganNvbi5kdW1wcyhUcnVlKQoKCnsKICAgICJkaWFsZWN0cyI6IGRpYWxlY3RzLAogICAgImdldF9kaWFsZWN0IjogZ2V0X2RpYWxlY3QsCiAgICAicGFyc2VfdG9fanNvbiI6IHBhcnNlX3RvX2pzb24sCiAgICAidmFsaWRhdGUiOiB2YWxpZGF0ZSwKICAgICJmb3JtYXQiOiBmb3JtYXQsCn0K",self.location.href))).text();return g.postMessage({topic:"init"}),{sqlglot:g.pyodide.runPython(a)}}})();
|
|
3
3
|
`,d=typeof self<"u"&&self.Blob&&new Blob([b],{type:"text/javascript;charset=utf-8"});function w(t){let s;try{if(s=d&&(self.URL||self.webkitURL).createObjectURL(d),!s)throw"";const e=new Worker(s,{name:t==null?void 0:t.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(s)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(b),{name:t==null?void 0:t.name})}finally{s&&(self.URL||self.webkitURL).revokeObjectURL(s)}}const R=w(),[v,g]=y("tabs"),{tabs:h=[],id:G}=v()??{},C=p(),f=u(C),B=new Map([[C,f]]),U=W((t,s)=>({storedTabs:h,storedTabId:G,tab:f,tabs:B,engine:R,dialects:[],previewQuery:void 0,previewTable:void 0,previewDiff:void 0,direction:"vertical",inTabs(e){return s().tabs.has(e)},replaceTab(e,a){const n=s(),i=Array.from(n.tabs.entries()),o=i.findIndex(([c])=>c===e.file);i[o]=[a.file,a],t(()=>({tabs:new Map(i)})),n.updateStoredTabsIds()},updateStoredTabsIds(){const e=s();if(l(e.tab)){g({id:void 0,tabs:[]}),t(()=>({storedTabId:void 0,storedTabs:[]}));return}const a=[];for(const i of e.tabs.values())A(i.file.isChanged)&&i.file.isLocal||a.push({id:i.file.id,content:i.file.content});const n=e.tab.file.isChanged||e.tab.file.isRemote?e.tab.file.id:void 0;g({id:n,tabs:a}),t(()=>({storedTabId:n,storedTabs:a}))},refreshTab(e){l(e)||s().selectTab({...e})},setDialects(e){t(()=>({dialects:e}))},selectTab(e){const a=s();t(()=>({tab:e})),a.updateStoredTabsIds()},addTabs(e){const a=s();for(const n of e)a.tabs.set(n.file,n);t(()=>({tabs:new Map(a.tabs)}))},addTab(e){const a=s();if(a.tabs.has(e.file))a.tabs.set(e.file,e),t(()=>({tabs:new Map(a.tabs)}));else{const n=Array.from(a.tabs.entries()),i=n.findIndex(([o])=>{var c;return o===((c=a.tab)==null?void 0:c.file)});n.splice(i<0?n.length:i+1,0,[e.file,e]),t(()=>({tabs:new Map(n)}))}a.updateStoredTabsIds()},closeTab(e){var n;const a=s();if(e.removeChanges(),a.tabs.delete(e),a.tabs.size===0)a.selectTab(void 0);else if(a.tabs.size===1){const i=Array.from(a.tabs.values());a.selectTab(i.at(0))}else if(e.id===((n=a.tab)==null?void 0:n.file.id)){const i=Array.from(a.tabs.values()),o=i.findIndex(c=>c.file===e);a.selectTab(i.at(o-1))}t(()=>({tabs:new Map(a.tabs)})),a.updateStoredTabsIds()},createTab:u,setPreviewQuery(e){t(()=>({previewQuery:e}))},setPreviewTable(e){t(()=>({previewTable:e}))},setPreviewDiff(e){t(()=>({previewDiff:e}))},setDirection(e){t(()=>({direction:e}))}}));function u(t=p()){return{id:m(),file:t,isValid:!0}}function p(t){return new Z({id:t,name:"",path:"",content:`-- Create arbitrary SQL queries
|
|
4
4
|
-- and execute them against different environments
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var u=Object.defineProperty;var g=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var h=(r,e,t)=>g(r,typeof e!="symbol"?e+"":e,t);import{a0 as _,J as x,a9 as m,aa as n,ab as c,X as d,b as f}from"./index-
|
|
1
|
+
var u=Object.defineProperty;var g=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var h=(r,e,t)=>g(r,typeof e!="symbol"?e+"":e,t);import{a0 as _,J as x,a9 as m,aa as n,ab as c,X as d,b as f}from"./index-CYAA3nVF.js";class y extends _{constructor(t,s){super(t!=null&&t.isModel?t.initial:{...t,name:(t==null?void 0:t.name)??"",path:(t==null?void 0:t.path)??""});h(this,"_path");h(this,"_name");h(this,"parent");h(this,"remove",!1);this._path=(t==null?void 0:t.path)??this.initial.path,this._name=(t==null?void 0:t.name)??this.initial.name,this.parent=s}get id(){return x(this.path)?this.initial.id:this.path}get name(){return this._name}get path(){return this._path}get isUntitled(){return this.name===""}get isLocal(){return this.path===""}get isRemote(){return this.path!==""}get withParent(){var t;return!!((t=this.parent)!=null&&t.isModel)}copyName(){return`Copy of ${this.name}__${m()}`}rename(t){this.isRemote&&(this._path=this._path.replace(this.name,t)),this._name=t}static findArtifactByPath(t,s){return t.path===s?t:t.allArtifacts.find(a=>a.path===s)}}const p={SQL:".sql",PY:".py",YAML:".yaml",YML:".yml"};class o extends y{constructor(t,s){super(o.getInitialArtifact(t),s);h(this,"_content","");h(this,"content");h(this,"extension");h(this,"isFormatted");this.content=this._content=n((t==null?void 0:t.content)??this.initial.content),this.extension=n((t==null?void 0:t.extension)??this.initial.extension),this.isFormatted=t==null?void 0:t.isFormatted}get basename(){return this.name.replace(this.extension,"")}get isEmpty(){return c(this.content)}get isChanged(){return d(this._content)&&this.content!==this._content}get isSQL(){return this.extension===p.SQL}get fingerprint(){return`${this._content}${this.name}${this.path}`}removeChanges(){this.content=this._content}copyName(){return`Copy of ${n(this.name.split(this.extension)[0])}__${m()}${this.extension}`}update(t){const s=n(t==null?void 0:t.content);(c(this._content)||f(this.isChanged))&&(this.content=s),this._content=s,this.extension=n(t==null?void 0:t.extension)}static getInitialArtifact(t){return o.isModelFile(t)?t.initial:{name:n(t==null?void 0:t.name),path:n(t==null?void 0:t.path),extension:(t==null?void 0:t.extension)??p.SQL,content:n(t==null?void 0:t.content)}}static isModelFile(t){return t instanceof o}}export{p as E,o as M,y as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as I,j as w,h as le,c as X,i as Fe,m as xe,w as de}from"./index-
|
|
1
|
+
import{r as I,j as w,h as le,c as X,i as Fe,m as xe,w as de}from"./index-CYAA3nVF.js";import{u as $e}from"./index-RJnYVUFY.js";import{F as Ve,m as Me,n as Pe,I as se}from"./Input-tR0WpVuK.js";/**
|
|
2
2
|
* table-core
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) TanStack
|