sqlmesh 0.181.2.dev7__py3-none-any.whl → 0.181.2.dev9__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.
Files changed (52) hide show
  1. sqlmesh/_version.py +2 -2
  2. sqlmesh/lsp/api.py +61 -0
  3. sqlmesh/lsp/main.py +25 -0
  4. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/METADATA +1 -1
  5. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/RECORD +51 -50
  6. web/client/dist/assets/{Audits-4U9LnWyN.js → Audits-DRkR6sg0.js} +1 -1
  7. web/client/dist/assets/{Banner-DfF4HK9_.js → Banner-BXisqtMu.js} +1 -1
  8. web/client/dist/assets/{ChevronDownIcon-DhkdL7W7.js → ChevronDownIcon-D8CFPQ96.js} +1 -1
  9. web/client/dist/assets/{ChevronRightIcon-CknBR_Ye.js → ChevronRightIcon-BpRv8ZN4.js} +1 -1
  10. web/client/dist/assets/{Content-T59G6CRd.js → Content-KG4KSDDO.js} +1 -1
  11. web/client/dist/assets/{Content-DfnWzoRW.js → Content-pMJLtxGr.js} +1 -1
  12. web/client/dist/assets/{Data-Dvs4EVTS.js → Data-D-rZnh8x.js} +1 -1
  13. web/client/dist/assets/{DataCatalog-CsA-vDbc.js → DataCatalog-BJTDeU-_.js} +1 -1
  14. web/client/dist/assets/{Editor-DsU0OwIl.js → Editor-C8-1rqZ2.js} +1 -1
  15. web/client/dist/assets/{Editor-DgIo0RbF.js → Editor-Cpn7iBcm.js} +1 -1
  16. web/client/dist/assets/{Errors-BOLt2obm.js → Errors-DyDRdQyq.js} +1 -1
  17. web/client/dist/assets/{FileExplorer-CIj2pM9u.js → FileExplorer-CmdsG4yG.js} +3 -3
  18. web/client/dist/assets/{Footer--bTxQCKB.js → Footer-D4ok48Gm.js} +1 -1
  19. web/client/dist/assets/{Header-DmcDkHFL.js → Header-BVwdhMQQ.js} +1 -1
  20. web/client/dist/assets/{Input-CJirBrKe.js → Input-CxOCLTNw.js} +1 -1
  21. web/client/dist/assets/Lineage-ZXdxdqzl.js +1 -0
  22. web/client/dist/assets/{ListboxShow-C0DBUX71.js → ListboxShow-YBO3HIHQ.js} +1 -1
  23. web/client/dist/assets/{ModelLineage-B8hv0xJ-.js → ModelLineage-BFuK5Bgk.js} +1 -1
  24. web/client/dist/assets/{Models-CCm5MLTD.js → Models-Dn2xoUA7.js} +1 -1
  25. web/client/dist/assets/{Page-WrN3RYDT.js → Page-kOwPk8A6.js} +1 -1
  26. web/client/dist/assets/{Plan-CFJZVnkR.js → Plan-BQe3-3RL.js} +1 -1
  27. web/client/dist/assets/{PlusCircleIcon-CcC2lSkc.js → PlusCircleIcon-CXYicjof.js} +1 -1
  28. web/client/dist/assets/{ReportErrors-BK8N5y1z.js → ReportErrors-DaAC3YF4.js} +1 -1
  29. web/client/dist/assets/{Root-DSGcTlxk.js → Root-BIGZcS_U.js} +1 -1
  30. web/client/dist/assets/{SearchList-B9NnvRod.js → SearchList-Lag39srv.js} +1 -1
  31. web/client/dist/assets/{SelectEnvironment-CJsiOTlU.js → SelectEnvironment-0MCV04NI.js} +1 -1
  32. web/client/dist/assets/{SourceList-FVjgH2xJ.js → SourceList-CTL41Fia.js} +1 -1
  33. web/client/dist/assets/{SourceListItem-BDqqo5jo.js → SourceListItem-6mIYlySR.js} +1 -1
  34. web/client/dist/assets/{SplitPane-BSlIdmc8.js → SplitPane-7_khUxNG.js} +1 -1
  35. web/client/dist/assets/{Tests-DAbOEH7t.js → Tests-DSsKelgd.js} +1 -1
  36. web/client/dist/assets/{Welcome-c37SRGFq.js → Welcome-C0F3fb3h.js} +1 -1
  37. web/client/dist/assets/{context-APidk_GA.js → context-B0V9EzWJ.js} +13 -13
  38. web/client/dist/assets/{context-DmjvuTWz.js → context-pytQSsK4.js} +1 -1
  39. web/client/dist/assets/{editor-B2GioI_r.js → editor-CmeEFdEz.js} +1 -1
  40. web/client/dist/assets/{file-C7afm_LM.js → file-DY5SRTK1.js} +1 -1
  41. web/client/dist/assets/{help-C_umCstj.js → help-Bm8ph9oI.js} +1 -1
  42. web/client/dist/assets/{index-CK4fdw8q.js → index-BWibl-Ee.js} +1 -1
  43. web/client/dist/assets/{index-COnjINWU.js → index-C22hdM_h.js} +2 -2
  44. web/client/dist/assets/{plan-BwAtu9hd.js → plan-BUTy2uM-.js} +1 -1
  45. web/client/dist/assets/{project-CWUUCZWT.js → project-CtAE3tsj.js} +1 -1
  46. web/client/dist/assets/{transition-DjPYSO2n.js → transition-CiMBgn_Y.js} +1 -1
  47. web/client/dist/index.html +1 -1
  48. web/client/dist/assets/Lineage-BbLp8RL_.js +0 -1
  49. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/WHEEL +0 -0
  50. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/entry_points.txt +0 -0
  51. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/licenses/LICENSE +0 -0
  52. {sqlmesh-0.181.2.dev7.dist-info → sqlmesh-0.181.2.dev9.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.181.2.dev7'
21
- __version_tuple__ = version_tuple = (0, 181, 2, 'dev7')
20
+ __version__ = version = '0.181.2.dev9'
21
+ __version_tuple__ = version_tuple = (0, 181, 2, 'dev9')
sqlmesh/lsp/api.py ADDED
@@ -0,0 +1,61 @@
1
+ """
2
+ This module maps the LSP custom API calls to the SQLMesh web api.
3
+
4
+ Allowing the LSP to call the web api without having to know the details of the web api
5
+ and thus passing through the details of the web api to the LSP, so that both the LSP
6
+ and the web api can communicate with the same process, avoiding the need to have a
7
+ separate process for the web api.
8
+ """
9
+
10
+ import typing as t
11
+ from pydantic import field_validator
12
+ from sqlmesh.utils.pydantic import PydanticModel
13
+ from web.server.models import Model
14
+
15
+ API_FEATURE = "sqlmesh/api"
16
+
17
+
18
+ class ApiRequest(PydanticModel):
19
+ """
20
+ Request to call the SQLMesh API.
21
+ This is a generic request that can be used to call any API endpoint.
22
+ """
23
+
24
+ requestId: str
25
+ url: str
26
+ method: t.Optional[str] = "GET"
27
+ params: t.Optional[t.Dict[str, t.Any]] = None
28
+ body: t.Optional[t.Dict[str, t.Any]] = None
29
+
30
+
31
+ class ApiResponseGetModels(PydanticModel):
32
+ """
33
+ Response from the SQLMesh API for the get_models endpoint.
34
+ """
35
+
36
+ data: t.List[Model]
37
+
38
+ @field_validator("data", mode="before")
39
+ def sanitize_datetime_fields(cls, data: t.List[Model]) -> t.List[Model]:
40
+ """
41
+ Convert datetime objects to None to avoid serialization issues.
42
+ """
43
+ if isinstance(data, list):
44
+ for model in data:
45
+ if hasattr(model, "details") and model.details:
46
+ # Convert datetime fields to None to avoid serialization issues
47
+ for field in ["stamp", "start", "cron_prev", "cron_next"]:
48
+ if (
49
+ hasattr(model.details, field)
50
+ and getattr(model.details, field) is not None
51
+ ):
52
+ setattr(model.details, field, None)
53
+ return data
54
+
55
+
56
+ class ApiResponseGetLineage(PydanticModel):
57
+ """
58
+ Response from the SQLMesh API for the get_lineage endpoint.
59
+ """
60
+
61
+ data: t.Dict[str, t.List[str]]
sqlmesh/lsp/main.py CHANGED
@@ -11,12 +11,20 @@ from pygls.server import LanguageServer
11
11
  from sqlmesh._version import __version__
12
12
  from sqlmesh.core.context import Context
13
13
  from sqlmesh.core.linter.definition import AnnotatedRuleViolation
14
+ from sqlmesh.lsp.api import (
15
+ API_FEATURE,
16
+ ApiRequest,
17
+ ApiResponseGetLineage,
18
+ ApiResponseGetModels,
19
+ )
14
20
  from sqlmesh.lsp.completions import get_sql_completions
15
21
  from sqlmesh.lsp.context import LSPContext, ModelTarget
16
22
  from sqlmesh.lsp.custom import ALL_MODELS_FEATURE, AllModelsRequest, AllModelsResponse
17
23
  from sqlmesh.lsp.reference import (
18
24
  get_references,
19
25
  )
26
+ from web.server.api.endpoints.lineage import model_lineage
27
+ from web.server.api.endpoints.models import get_models
20
28
 
21
29
 
22
30
  class SQLMeshLanguageServer:
@@ -79,6 +87,23 @@ class SQLMeshLanguageServer:
79
87
  except Exception as e:
80
88
  return get_sql_completions(None, params.textDocument.uri)
81
89
 
90
+ @self.server.feature(API_FEATURE)
91
+ def api(
92
+ ls: LanguageServer, request: ApiRequest
93
+ ) -> t.Union[ApiResponseGetModels, ApiResponseGetLineage]:
94
+ ls.log_trace(f"API request: {request}")
95
+ if self.lsp_context is None:
96
+ raise RuntimeError("No context found")
97
+ if request.url == "/api/models":
98
+ response = ApiResponseGetModels(data=get_models(self.lsp_context.context))
99
+ return response
100
+ if request.url.startswith("/api/lineage"):
101
+ name = request.url.split("/")[-1]
102
+ lineage = model_lineage(name, self.lsp_context.context)
103
+ non_set_lineage = {k: v for k, v in lineage.items() if v is not None}
104
+ return ApiResponseGetLineage(data=non_set_lineage)
105
+ raise NotImplementedError(f"API request not implemented: {request.url}")
106
+
82
107
  @self.server.feature(types.TEXT_DOCUMENT_DID_OPEN)
83
108
  def did_open(ls: LanguageServer, params: types.DidOpenTextDocumentParams) -> None:
84
109
  context = self._context_get_or_load(params.text_document.uri)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlmesh
3
- Version: 0.181.2.dev7
3
+ Version: 0.181.2.dev9
4
4
  Summary: Next-generation data transformation framework
5
5
  Author-email: "TobikoData Inc." <engineering@tobikodata.com>
6
6
  License: Apache License
@@ -1,5 +1,5 @@
1
1
  sqlmesh/__init__.py,sha256=DRovDXI-9D9xeYDP7t8Fq7mI31S2btlN-LHPOK3y7PA,7240
2
- sqlmesh/_version.py,sha256=8r2JEsifNarsOVqbo9kwcaq4X7phTueVMYWzJc5SnMk,528
2
+ sqlmesh/_version.py,sha256=pdQbmj44CtnrUwTCDUdwN7ubFUI2ff2s9-yJj7xVPhk,528
3
3
  sqlmesh/magics.py,sha256=9oY1Uz8uwsuTtPRg9HTYDxnGiJ7-OVRCpmCgAhbKHUU,39431
4
4
  sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -155,10 +155,11 @@ sqlmesh/integrations/github/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
155
155
  sqlmesh/integrations/github/cicd/command.py,sha256=a48qtSeRM7RD3IeydJwHLAZBHRbmFdA7uHh7Yhe5a74,11301
156
156
  sqlmesh/integrations/github/cicd/config.py,sha256=qEy0mRfPYJw1pm68UK0v1_4kZBj5QodnpIsOZ8JjZro,1838
157
157
  sqlmesh/integrations/github/cicd/controller.py,sha256=AiEMsRW4WSVxXP_7oQSIdzBzmYPxfYDgYeOYRk9sfJA,41388
158
+ sqlmesh/lsp/api.py,sha256=Ls7BjrPSovvOu6VU_eFR0_nHcbsQl020eJvGbdWi7s8,1957
158
159
  sqlmesh/lsp/completions.py,sha256=ScW0H9couhfW6QckEX2djVYTClRPXpT2Hdcg1qLfUUY,3479
159
160
  sqlmesh/lsp/context.py,sha256=vUpbWYjKYuwDvU3zkzhAgw9An-TeVYe_5KTk-ec_UwM,1569
160
161
  sqlmesh/lsp/custom.py,sha256=GvNAiW7imPI8xmIx3qLWN5FljGPHFJKh0N5b6aZnwRo,489
161
- sqlmesh/lsp/main.py,sha256=HBbJMtWF98yZiTHspdx0hfyGnsMTh2WSirgYvvOwRs4,15204
162
+ sqlmesh/lsp/main.py,sha256=AHVkfOvmDh3NqgfGF41uAnlxUDZdFyx5HEpGgCA_F1o,16346
162
163
  sqlmesh/lsp/reference.py,sha256=3vmLpEDbsJ740DfaOc2_ESZnXsUxWLS4lUunoO9km9s,8121
163
164
  sqlmesh/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
164
165
  sqlmesh/migrations/v0001_init.py,sha256=h8FwMYJj9_O8yGpk12guaSaGwX5A3we2GiKeHrXi15o,2048
@@ -265,52 +266,52 @@ sqlmesh/utils/pandas.py,sha256=j_tYhuPcWpzuPceZZ6IhdTVbmxYyGJW7l4FHr4bQqjM,1824
265
266
  sqlmesh/utils/pydantic.py,sha256=ioaAzYF42PutEJRyAS11-AHguiCG3yWI6VRcTVa2G-g,10470
266
267
  sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
267
268
  sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
268
- sqlmesh-0.181.2.dev7.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
269
+ sqlmesh-0.181.2.dev9.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
269
270
  web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
270
- web/client/dist/index.html,sha256=cQRIlDgkl6OgeWuHI9hM8bJhKUE9-Ji2NpQa2hlgNM8,5472
271
- web/client/dist/assets/Audits-4U9LnWyN.js,sha256=reXu-sKJ76kiaAZIGkCPvgO68Km9tj1PN_9mx6X6WAY,997
272
- web/client/dist/assets/Banner-DfF4HK9_.js,sha256=3BnO9YvlfNClvwjj-x_vYtKuU9yhcEpNAtlTlV8OcqI,1544
273
- web/client/dist/assets/ChevronDownIcon-DhkdL7W7.js,sha256=_bcy_7xgZxvqJb2wgWsiYLrCe_AWUlqdpXDJ-NXBMT4,553
274
- web/client/dist/assets/ChevronRightIcon-CknBR_Ye.js,sha256=iefwFz4lH3BbfkNd9H0wyMWLN60-9Z4NBLqGXyHIvTU,553
275
- web/client/dist/assets/Content-DfnWzoRW.js,sha256=4BLYGscrBO1bstvPDbnsQ66GhTFZAopMim48-b4eDN4,762
276
- web/client/dist/assets/Content-T59G6CRd.js,sha256=79yjjIjAdvojLIZA4aq6XZHVeAZg7zRCPTBaDqX4dMo,37120
277
- web/client/dist/assets/Data-Dvs4EVTS.js,sha256=6S3nYEqXpHoDX27bPpvEMdvNzFZlKPpGRZG7qEjEZEs,935
278
- web/client/dist/assets/DataCatalog-CsA-vDbc.js,sha256=f0lhClNyokb0nonFaEwM6QA-aizLGX6enNLg-IwDbag,122504
279
- web/client/dist/assets/Editor-DgIo0RbF.js,sha256=XBFEID_HGbRMD_gHfJbJvpkg_zWJ2UIU9GeKrZVDE4c,1490
280
- web/client/dist/assets/Editor-DsU0OwIl.js,sha256=7RViw7lrvvYIDP33vYvksxfeh_te66B9trQvllrnvKc,43432
281
- web/client/dist/assets/Errors-BOLt2obm.js,sha256=rV2e5XAy2zlur0tGOJO2VdCJJlaWpZp599k4gm923hk,1322
282
- web/client/dist/assets/FileExplorer-CIj2pM9u.js,sha256=-WdmXtxC8KmeB8HXpumIu-uZvhkLs9p3ovED5W3iTqI,111685
283
- web/client/dist/assets/Footer--bTxQCKB.js,sha256=ImzJnKOezbq3i6pN4aa5zVIQ57-It6rtbRVEO2B2C78,700
284
- web/client/dist/assets/Header-DmcDkHFL.js,sha256=RolaLH17VNqOuascSDV_KNB6VE500Jjx5PIoMvid6ZU,11424
285
- web/client/dist/assets/Input-CJirBrKe.js,sha256=2J5GAzUgLaFgDDbH7OyOWNzYaN251ML5mdRxG7jes58,73966
286
- web/client/dist/assets/Lineage-BbLp8RL_.js,sha256=I8wvJZ2HjN1-XuDgHXe-yJKcCU1UfyVMtt7sSC61T0w,961
287
- web/client/dist/assets/ListboxShow-C0DBUX71.js,sha256=Ra3RaX37AXVj0vk9uCBUT5SuwvcrZFeku3SWcJExDa4,17746
288
- web/client/dist/assets/ModelLineage-B8hv0xJ-.js,sha256=r-SnfH2VU1C_Nx0rtB3Ih0j6PrBfUc5NVMGePWw-Tbo,15496
289
- web/client/dist/assets/Models-CCm5MLTD.js,sha256=3q3svI1v1P-Kxc4PHaROYzsgAVYlyGbkfIK0tpNOf5I,2153
290
- web/client/dist/assets/Page-WrN3RYDT.js,sha256=rHtSBMr6ElD7CQ9HuLIursOPU66NSF3WbdGWkoDoGeQ,589
291
- web/client/dist/assets/Plan-CFJZVnkR.js,sha256=GSoY9G0CcEqUN67p6iKnxu4mytkVxRcKL_Kq1dbUDNg,666
292
- web/client/dist/assets/PlusCircleIcon-CcC2lSkc.js,sha256=Tzdp-wik-LGycQVQbXY_AEoN4EPJo_Dc5-D9b_Ah9cg,11175
293
- web/client/dist/assets/ReportErrors-BK8N5y1z.js,sha256=R7pkyG2oj_jZs3xiyYoqNPZIUUuHINFBYbt7Xxk6D6o,5417
294
- web/client/dist/assets/Root-DSGcTlxk.js,sha256=DxLvGwalhQjlALql9NGlpe-oGNuAKvFBsKr_a_3W5Fs,46591
295
- web/client/dist/assets/SearchList-B9NnvRod.js,sha256=o_DOanztEuYGs3oLKx0aJMufCNKF35vB6Yq87S4aZvw,291986
296
- web/client/dist/assets/SelectEnvironment-CJsiOTlU.js,sha256=eijUKz8OXyt0xbCAyHGC3vqV7vp6t3u0dGNfq3WS3YM,33099
297
- web/client/dist/assets/SourceList-FVjgH2xJ.js,sha256=ICkX6Xa-I4jdlv0_4-t1hw_ctf2Iqmg80XuecYc_GyY,3205
298
- web/client/dist/assets/SourceListItem-BDqqo5jo.js,sha256=uPJB2DcKlvkPwc1Gasr1eoE8sKgVc7aWEESdAxI8n4Y,1106
299
- web/client/dist/assets/SplitPane-BSlIdmc8.js,sha256=q346h-M0VvEdFMXukCBTCsDE-MbzBeg6YcK37Uwr204,10439
300
- web/client/dist/assets/Tests-DAbOEH7t.js,sha256=4N65D0W6NkJxX9hk7JO8K74b_FCDcXYncBp8GarbYlw,975
301
- web/client/dist/assets/Welcome-c37SRGFq.js,sha256=XV09jHinTeasR6UUtJZZUhoZweL9-svJ7yjYIOQUdZI,354
271
+ web/client/dist/index.html,sha256=WK-eWd8ZVqVncYTXpjv9EGEHJE0FMNHSwjxeopNR3cA,5472
272
+ web/client/dist/assets/Audits-DRkR6sg0.js,sha256=z8oi0f9lhAcWZu8BO5UQ_4Gun-sKf7lvmiG44HU-ibk,997
273
+ web/client/dist/assets/Banner-BXisqtMu.js,sha256=uEwYG3F1nWVii1VdFE0OJ5ayhpoN_vjFgntWk92-3dQ,1544
274
+ web/client/dist/assets/ChevronDownIcon-D8CFPQ96.js,sha256=h_L163a7QbPbqxHOgvCWMYCRALzz0GCoXFbNqYpR0cE,553
275
+ web/client/dist/assets/ChevronRightIcon-BpRv8ZN4.js,sha256=L9BEAkukZDUa5QT2d0ffu-hc6g8udngqtj7nI9n1La0,553
276
+ web/client/dist/assets/Content-KG4KSDDO.js,sha256=1Y2L0fXFhhhxCTLh46Yy3m1sVU-TdY4tJ3g-ieUFKrM,37120
277
+ web/client/dist/assets/Content-pMJLtxGr.js,sha256=Z05o87KdA4wuTwtOdE8iSHZaiE_wfOHOZvXOYJmf0qM,762
278
+ web/client/dist/assets/Data-D-rZnh8x.js,sha256=SW3r8BC64Dma4aP15VnSuivFAqQ56WRKs4Y9Ksvr2s0,935
279
+ web/client/dist/assets/DataCatalog-BJTDeU-_.js,sha256=OgfI_x8BCPQamp6MhNgJYSN1iqen1jzvKnHMx42FYu4,122504
280
+ web/client/dist/assets/Editor-C8-1rqZ2.js,sha256=Y-wcbUy6DGq1D4ZMwe6oYTu71fbTRtkJdqfvEL6peDk,43432
281
+ web/client/dist/assets/Editor-Cpn7iBcm.js,sha256=0JXVUjBQGM0D0lyRfoFSS-PIIFu2aAgSlNaUFXHxJRA,1490
282
+ web/client/dist/assets/Errors-DyDRdQyq.js,sha256=yXYo3oFNsgKMw4-9pLQOXfgoY8pkNzxmAKDPOFwvtUI,1322
283
+ web/client/dist/assets/FileExplorer-CmdsG4yG.js,sha256=WOOlErtVqaiBleoF0umPhGXfRmcE42GyAbFJINiLGjg,111732
284
+ web/client/dist/assets/Footer-D4ok48Gm.js,sha256=KFXXp_82gkypjqqWrGyeM1r7P0XXyPZyNeAU98vEdjc,700
285
+ web/client/dist/assets/Header-BVwdhMQQ.js,sha256=sxQqN5tsKJP8nU9zQnjB4dWHzMC0JC_5pVD8oAl37_M,11424
286
+ web/client/dist/assets/Input-CxOCLTNw.js,sha256=jnUYFjA0JPkP9DaYNKN5E6eeiz1HyOUWwZSBM5R-B3s,73966
287
+ web/client/dist/assets/Lineage-ZXdxdqzl.js,sha256=9Bgq5cgRTOsDKgmzKdyny994FlGzPh0HKYQnGDYaCgI,961
288
+ web/client/dist/assets/ListboxShow-YBO3HIHQ.js,sha256=VMqfpmV5_0MaP8CZ53vWzv5NqNjh56JziA7_mUPNz8g,17746
289
+ web/client/dist/assets/ModelLineage-BFuK5Bgk.js,sha256=piPRPeXBCwytukzz4bO5HBs9A-levlBfl2uVLU9sxbs,15496
290
+ web/client/dist/assets/Models-Dn2xoUA7.js,sha256=P7G47J0J2rG9hpFKN_jFfg3WBz7oYSyCrqgVwINXmIQ,2153
291
+ web/client/dist/assets/Page-kOwPk8A6.js,sha256=k8N3ySF3XCWGqzOeYt4R6V5SdsiAsKRjbYQumjJ_Uz0,589
292
+ web/client/dist/assets/Plan-BQe3-3RL.js,sha256=0EhwkVkWpq6C5HLfhg__gChgTo0dSv1FU0d5r5g4PFM,666
293
+ web/client/dist/assets/PlusCircleIcon-CXYicjof.js,sha256=BYJSlRK3fEZcA8pvA92Ir4jETViKJwicxPSoLIU_hJg,11175
294
+ web/client/dist/assets/ReportErrors-DaAC3YF4.js,sha256=aRxoGcmxN2NyDNMzppGkE2W0h9cYwUWmZRP0aRovJ3g,5417
295
+ web/client/dist/assets/Root-BIGZcS_U.js,sha256=33WhaiWsn-XAOTe_GTvec88vtY_QoEzNalpvqI6lpnE,46591
296
+ web/client/dist/assets/SearchList-Lag39srv.js,sha256=0fjANgdjCiEM28XY9u4pcHNlNKtEwn3DHtq4YSxigaM,291986
297
+ web/client/dist/assets/SelectEnvironment-0MCV04NI.js,sha256=0i2I9MdFuMtw0FjqsnLtbCVEKcHkI5mNUTSfzYv4ONE,33099
298
+ web/client/dist/assets/SourceList-CTL41Fia.js,sha256=GlSBkt3Ry_d-NjQOQzY93S39qOJLFXMRJ2jQpbO5Q54,3205
299
+ web/client/dist/assets/SourceListItem-6mIYlySR.js,sha256=fjXpeuPdzVXe3iYAdrwckX1d-FNkz7gCsgygvs9ZJJs,1106
300
+ web/client/dist/assets/SplitPane-7_khUxNG.js,sha256=ZUr5REciuXdMcIZ_YU2GKgrOG_n3bJWIgdx15VDKmqE,10439
301
+ web/client/dist/assets/Tests-DSsKelgd.js,sha256=G1dLa7gSelw38BW73f3wD6cmAAiGQh2uR450aGlm_y0,975
302
+ web/client/dist/assets/Welcome-C0F3fb3h.js,sha256=CcUanBaO1kSdsDSXPlD7Hv4qkYA1uVX2DFmzbGulhgk,354
302
303
  web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js,sha256=WQq4BXvAMsPhT58adqrv_QHaYJQT-xKIiBnKBDPB-uk,239
303
- web/client/dist/assets/context-APidk_GA.js,sha256=bIfSayNn6ebgeE7BFDdVjUN93N7L5eafygs50RrsdLg,2041946
304
- web/client/dist/assets/context-DmjvuTWz.js,sha256=5jOe_FVEFUQS6v9WzFgG1G1wDcbIqQE7e5vFTm2ZUHQ,4522
305
- web/client/dist/assets/editor-B2GioI_r.js,sha256=lcv7wYo_5oASSaIrfkcPTzb9jbpWVGBpAViPGALPLXU,7858
306
- web/client/dist/assets/file-C7afm_LM.js,sha256=WrZq-ZVAWv2i1yPL-gpJ-YQOPdVxP1aODX5LvWuBRJU,2350
304
+ web/client/dist/assets/context-B0V9EzWJ.js,sha256=ESboQ_Dgf0VKNnj7csbr2whkAv-ZEwmbV9dlYQujNwQ,2042187
305
+ web/client/dist/assets/context-pytQSsK4.js,sha256=bN3v4oExbztDaAlLqoo0rfu1mjKPnLHSNek6Zs-fPwE,4522
306
+ web/client/dist/assets/editor-CmeEFdEz.js,sha256=HwFhg9LC__CO7EKt0hxa0-LPzxkhwsI39igBynLN-9g,7858
307
+ web/client/dist/assets/file-DY5SRTK1.js,sha256=KtMEsTR94oQZ5g7i-GCRHO9ne6eM3SDWh1YHWK7MiE8,2350
307
308
  web/client/dist/assets/help-6Q7f7fjd.js,sha256=93Iri9PzpAiPgCyRsrQwABjP2jomAUNR7y2OqHxPf34,445
308
- web/client/dist/assets/help-C_umCstj.js,sha256=5fc9OWrxSmkdXuXgIlW3llKvH-iBZHb2vht0-5DZ3V4,57842
309
- web/client/dist/assets/index-CK4fdw8q.js,sha256=v-7_JEPgjatkpjVjlurC1yCw--K5ZvvYtglsl4GBn9A,13664
310
- web/client/dist/assets/index-COnjINWU.js,sha256=ijS_lhnZDFjQgIaWDS2VWYza0f0d8TjDfzBkVSmtak0,513118
311
- web/client/dist/assets/plan-BwAtu9hd.js,sha256=TPidThtLU1lNVkOyZZlXeI5_dtHUxCM_YQueY2KO1eU,13755
312
- web/client/dist/assets/project-CWUUCZWT.js,sha256=YpZ1v0OBydue0TH9UdZuPETZktoa8bTDOp2OkK5EAkE,3338
313
- web/client/dist/assets/transition-DjPYSO2n.js,sha256=34OQHogpStYAtYfDvrFGYjYqn0x4kt4nkVaVax5NAIA,34243
309
+ web/client/dist/assets/help-Bm8ph9oI.js,sha256=xTEC4acHEtmFXY38TbgrLgbARlYVBEcH8SMGBK5lAuI,57842
310
+ web/client/dist/assets/index-BWibl-Ee.js,sha256=GuYi95d4eMY1zafK7uWpGZYJGgSScCNX9xjkOSEQbsU,13664
311
+ web/client/dist/assets/index-C22hdM_h.js,sha256=uspdrak-Rg6A4r0PzNAiMDKaghkglEpUtoDGpxgm090,513118
312
+ web/client/dist/assets/plan-BUTy2uM-.js,sha256=fTQuB4YqEHt8_G-zErtkht8BwnEt2eY_YVZLyJ7PnSY,13755
313
+ web/client/dist/assets/project-CtAE3tsj.js,sha256=qtr_F09930Wbq_QLXJvbGODkz4Ib_nhLuQJn9pBSxdM,3338
314
+ web/client/dist/assets/transition-CiMBgn_Y.js,sha256=r8la6LJmmLmBazDixprluPFsRuWlPtkHHcNHeVgswpE,34243
314
315
  web/client/dist/css/base.css,sha256=JApDmQihY7DRy5Bd30uYMm5NdMKm0QsEOMBsOuK7gyU,9048
315
316
  web/client/dist/css/design.css,sha256=9VTHN-aYFVW6I53jUWbV8qaqo87tXyZTYSWFLC_sRQY,17057
316
317
  web/client/dist/favicons/favicon.svg,sha256=ZPNT00J77RHUj6Nlh6Z4Puxnp_oq9RSqACjomhDRUXE,1586
@@ -382,8 +383,8 @@ web/server/api/endpoints/models.py,sha256=SzS5bshzdXyM6hb948sZ_3k-xhpGCHkxkb7pHz
382
383
  web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
383
384
  web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
384
385
  web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
385
- sqlmesh-0.181.2.dev7.dist-info/METADATA,sha256=uAqPKGwBv0r6245w3anejNksYKPIkqOPpUwtrvx1G58,25307
386
- sqlmesh-0.181.2.dev7.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
387
- sqlmesh-0.181.2.dev7.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
388
- sqlmesh-0.181.2.dev7.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
389
- sqlmesh-0.181.2.dev7.dist-info/RECORD,,
386
+ sqlmesh-0.181.2.dev9.dist-info/METADATA,sha256=IRfi3VQrcjEajdatUSkYuXwChuBero9lsBn-etbb1X8,25307
387
+ sqlmesh-0.181.2.dev9.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
388
+ sqlmesh-0.181.2.dev9.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
389
+ sqlmesh-0.181.2.dev9.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
390
+ sqlmesh-0.181.2.dev9.dist-info/RECORD,,
@@ -1 +1 @@
1
- import{y as u,j as s,O as f,e as t,I as c,B as d,n as p,m as x}from"./index-COnjINWU.js";import{P as j}from"./Page-WrN3RYDT.js";import{u as h}from"./project-CWUUCZWT.js";import{S as v}from"./SourceList-FVjgH2xJ.js";import{S as y}from"./SourceListItem-BDqqo5jo.js";import"./SplitPane-BSlIdmc8.js";import"./file-C7afm_LM.js";import"./Input-CJirBrKe.js";import"./index-CK4fdw8q.js";function g(){const{pathname:a}=u(),i=h(e=>e.files),r=Array.from(i.values()).filter(e=>e.path.endsWith("audits"));return s.jsx(j,{sidebar:s.jsxs("div",{className:"flex flex-col w-full h-full",children:[s.jsx(v,{keyId:"basename",keyName:"basename",to:t.Audits,items:r,isActive:e=>`${t.Audits}/${e}`===a,className:"h-full",listItem:({to:e,name:o,description:m,text:l,disabled:n=!1})=>s.jsx(y,{to:e,name:o,text:l,description:m,disabled:n})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(d,{size:x.sm,variant:p.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{g as default};
1
+ import{y as u,j as s,O as f,e as t,I as c,B as d,n as p,m as x}from"./index-C22hdM_h.js";import{P as j}from"./Page-kOwPk8A6.js";import{u as h}from"./project-CtAE3tsj.js";import{S as v}from"./SourceList-CTL41Fia.js";import{S as y}from"./SourceListItem-6mIYlySR.js";import"./SplitPane-7_khUxNG.js";import"./file-DY5SRTK1.js";import"./Input-CxOCLTNw.js";import"./index-BWibl-Ee.js";function g(){const{pathname:a}=u(),i=h(e=>e.files),r=Array.from(i.values()).filter(e=>e.path.endsWith("audits"));return s.jsx(j,{sidebar:s.jsxs("div",{className:"flex flex-col w-full h-full",children:[s.jsx(v,{keyId:"basename",keyName:"basename",to:t.Audits,items:r,isActive:e=>`${t.Audits}/${e}`===a,className:"h-full",listItem:({to:e,name:o,description:m,text:l,disabled:n=!1})=>s.jsx(y,{to:e,name:o,text:l,description:m,disabled:n})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(d,{size:x.sm,variant:p.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{g as default};
@@ -1 +1 @@
1
- import{j as s,c as i,m as a,n,I as p}from"./index-COnjINWU.js";function l({variant:t=n.Neutral,size:e=a.md,isFull:r=!1,isCenter:u=!1,hasBackground:x=!0,hasBackgroundOnHover:f=!1,hasBorder:c=!1,children:m,className:b}){return s.jsx("div",{className:i("w-full text-sm px-4 overflow-hidden rounded-lg",e===a.sm&&"py-2",e===a.md&&"py-4",e===a.lg&&"py-6",r&&"h-full",u&&"justify-center items-center",c&&"border-2",w(t,x,f),b),children:m})}function g({className:t}){return s.jsx(p,{className:i("mx-4 w-full",t)})}function d({children:t,className:e}){return s.jsx("h4",{className:i("font-bold text-sm whitespace-nowrap text-left",e),children:t})}function o({children:t,className:e}){return s.jsx("p",{className:i("text-neutral-600",e),children:t})}l.Label=d;l.Description=o;l.Divider=g;function w(t,e=!0,r=!1){switch(t){case n.Primary:return[r?"hover:bg-primary-5":"",e?"bg-primary-5":"","text-primary-600 dark:text-primary-400"];case n.Success:return[r?"hover:bg-success-5":"",e?"bg-success-5":"","text-success-600 dark:text-success-400"];case n.Warning:return[r?"hover:bg-warning-5":"",e?"bg-warning-5":"","text-warning-600 dark:text-warning-400"];case n.Danger:return[r?"hover:bg-danger-5":"",e?"bg-danger-5":"","text-danger-600 dark:text-danger-400"];case n.Info:return[r?"hover:bg-info-5":"",e?"bg-info-5":"","text-info-600 dark:text-info-400"];case n.Neutral:return[r?"hover:bg-neutral-5":"",e?"bg-neutral-5":"","text-neutral-600 dark:text-neutral-400"];default:return["bg-transparent","text-neutral-600 dark:text-neutral-400"]}}export{l as B};
1
+ import{j as s,c as i,m as a,n,I as p}from"./index-C22hdM_h.js";function l({variant:t=n.Neutral,size:e=a.md,isFull:r=!1,isCenter:u=!1,hasBackground:x=!0,hasBackgroundOnHover:f=!1,hasBorder:c=!1,children:m,className:b}){return s.jsx("div",{className:i("w-full text-sm px-4 overflow-hidden rounded-lg",e===a.sm&&"py-2",e===a.md&&"py-4",e===a.lg&&"py-6",r&&"h-full",u&&"justify-center items-center",c&&"border-2",w(t,x,f),b),children:m})}function g({className:t}){return s.jsx(p,{className:i("mx-4 w-full",t)})}function d({children:t,className:e}){return s.jsx("h4",{className:i("font-bold text-sm whitespace-nowrap text-left",e),children:t})}function o({children:t,className:e}){return s.jsx("p",{className:i("text-neutral-600",e),children:t})}l.Label=d;l.Description=o;l.Divider=g;function w(t,e=!0,r=!1){switch(t){case n.Primary:return[r?"hover:bg-primary-5":"",e?"bg-primary-5":"","text-primary-600 dark:text-primary-400"];case n.Success:return[r?"hover:bg-success-5":"",e?"bg-success-5":"","text-success-600 dark:text-success-400"];case n.Warning:return[r?"hover:bg-warning-5":"",e?"bg-warning-5":"","text-warning-600 dark:text-warning-400"];case n.Danger:return[r?"hover:bg-danger-5":"",e?"bg-danger-5":"","text-danger-600 dark:text-danger-400"];case n.Info:return[r?"hover:bg-info-5":"",e?"bg-info-5":"","text-info-600 dark:text-info-400"];case n.Neutral:return[r?"hover:bg-neutral-5":"",e?"bg-neutral-5":"","text-neutral-600 dark:text-neutral-400"];default:return["bg-transparent","text-neutral-600 dark:text-neutral-400"]}}export{l as B};
@@ -1 +1 @@
1
- import{r as e}from"./index-COnjINWU.js";function t({title:r,titleId:a,...l},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},l),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const c=e.forwardRef(t);export{c as F};
1
+ import{r as e}from"./index-C22hdM_h.js";function t({title:r,titleId:a,...l},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},l),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const c=e.forwardRef(t);export{c as F};
@@ -1 +1 @@
1
- import{r as e}from"./index-COnjINWU.js";function o({title:r,titleId:a,...t},l){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const i=e.forwardRef(o);export{i as F};
1
+ import{r as e}from"./index-C22hdM_h.js";function o({title:r,titleId:a,...t},l){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const i=e.forwardRef(o);export{i as F};
@@ -1,4 +1,4 @@
1
- import{r as y,R as J,a as O,j as e,n as I,t as Me,b as C,B as te,w as B,m as T,c as g,M as Pe,g as V,J as ze,K as ie,i as M,P as Q,h as H,T as Re,I as re,Q as xe,D as Ue,C as U,s as Le,L as $e,d as Ve,l as Ge,p as He,q as qe,U as Ke,V as Ze,e as Ye}from"./index-COnjINWU.js";import{G as Je,B as Qe,F as We,w as Xe,u as Z,S as es,A as ss,a as ge,b as E,E as A,P as L,c as as}from"./SelectEnvironment-CJsiOTlU.js";import{u as x,a as Y,E as z}from"./plan-BwAtu9hd.js";import{B as F}from"./Banner-DfF4HK9_.js";import{A as $,F as ye,a as we,p as ns}from"./PlusCircleIcon-CcC2lSkc.js";import{U as ts,C as Ee,I as ls,y as is,o as le,T as rs,p as os,b as cs,F as ds,c as ms,A as us,z as Te,D as ee}from"./transition-DjPYSO2n.js";import{I as q}from"./Input-CJirBrKe.js";import{T as ps,p as fs}from"./ListboxShow-C0DBUX71.js";import{u as Be}from"./project-CWUUCZWT.js";import{F as je}from"./context-APidk_GA.js";import"./ModelLineage-B8hv0xJ-.js";import"./editor-B2GioI_r.js";import"./file-C7afm_LM.js";import"./SearchList-B9NnvRod.js";import"./help-6Q7f7fjd.js";import"./ChevronDownIcon-DhkdL7W7.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-FVjgH2xJ.js";import"./index-CK4fdw8q.js";function hs({title:s,titleId:a,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},t),s?y.createElement("title",{id:a},s):null,y.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const W=y.forwardRef(hs);let be=y.createContext(null);be.displayName="GroupContext";let xs=y.Fragment;function js(s){var a;let[t,r]=y.useState(null),[l,i]=We(),[o,u]=Xe(),c=y.useMemo(()=>({switch:t,setSwitch:r,labelledby:l,describedby:o}),[t,r,l,o]),d={},p=s;return J.createElement(u,{name:"Switch.Description"},J.createElement(i,{name:"Switch.Label",props:{htmlFor:(a=c.switch)==null?void 0:a.id,onClick(n){t&&(n.currentTarget.tagName==="LABEL"&&n.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(be.Provider,{value:c},Ee({ourProps:d,theirProps:p,defaultTag:xs,name:"Switch.Group"}))))}let vs="button";function gs(s,a){var t;let r=ls(),{id:l=`headlessui-switch-${r}`,checked:i,defaultChecked:o=!1,onChange:u,disabled:c=!1,name:d,value:p,form:n,...j}=s,m=y.useContext(be),f=y.useRef(null),h=is(f,a,m===null?null:m.setSwitch),[P,S]=ps(i,u,o),D=le(()=>S==null?void 0:S(!P)),N=le(_=>{if(us(_.currentTarget))return _.preventDefault();_.preventDefault(),D()}),k=le(_=>{_.key===Te.Space?(_.preventDefault(),D()):_.key===Te.Enter&&fs(_.currentTarget)}),w=le(_=>_.preventDefault()),R=y.useMemo(()=>({checked:P}),[P]),pe={id:l,ref:h,role:"switch",type:rs(s,f),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":m==null?void 0:m.labelledby,"aria-describedby":m==null?void 0:m.describedby,disabled:c,onClick:N,onKeyUp:k,onKeyPress:w},fe=os();return y.useEffect(()=>{var _;let b=(_=f.current)==null?void 0:_.closest("form");b&&o!==void 0&&fe.addEventListener(b,"reset",()=>{S(o)})},[f,S]),J.createElement(J.Fragment,null,d!=null&&P&&J.createElement(cs,{features:ms.Hidden,...ds({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:c,form:n,checked:P,name:d,value:p})}),Ee({ourProps:pe,theirProps:j,slot:R,defaultTag:vs,name:"Switch"}))}let ys=ts(gs),ws=js,he=Object.assign(ys,{Group:ws,Label:Qe,Description:Je});function bs(){const s=O(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(F,{variant:I.Warning,children:e.jsx($,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs($.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(F.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ye,{className:"w-5 text-warning-500"}):e.jsx(we,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx($.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(F.Description,{children:"Prod will be completely backfilled in order to ensure there are no data gaps. After this is applied, it is recommended to validate further changes in a dev environment before deploying to production."})})]})})})})}function Ns(s=0){return y.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function ks({run:s,apply:a,cancel:t,reset:r}){const l=Me(),{change_categorization:i}=Z(),o=O(b=>b.modules),u=O(b=>b.environment),c=O(b=>b.environments),d=O(b=>b.addConfirmation),p=O(b=>b.setShowConfirmation),n=x(b=>b.planAction),j=x(b=>b.planOverview),m=x(b=>b.planApply),f=x(b=>b.planCancel),h=Ns();function P(b){b.stopPropagation(),r()}function S(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const Oe=u.isProd&&C(u.isInitial),ke=Array.from(i.values()).some(Ie=>B(Ie.category));Oe?d({headline:"Applying Plan Directly On Prod Environment!",tagline:"Safer choice will be to select or add new environment first.",description:"Are you sure you want to apply your changes directly on prod?",yesText:`Yes, Run ${u.name}`,noText:"No, Cancel",action:a,details:ke?["ATTENTION!","[Breaking Change] category will be applied to all uncategorized changes"]:void 0,children:e.jsxs("div",{className:"mt-5 pt-4",children:[e.jsx("h4",{className:"mb-2",children:`${c.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[c.size>1&&e.jsx(es,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{p(!1)},size:T.md}),e.jsx(ss,{className:"w-full",size:T.md,onAdd:()=>{p(!1)}})]})]})}):ke?d({headline:"Some changes are missing categorization!",description:"Are you sure you want to proceed?",details:["[Breaking Change] category will be applied to all uncategorized changes"],yesText:"Yes, Apply",noText:"No, Cancel",action:a}):a()}function k(b){b.stopPropagation(),s()}const w=j.isFailed||m.isFailed||f.isSuccessful,R=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(w),pe=n.isApplying||f.isCancelling||m.isRunning&&j.isFinished,fe=w||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),_=o.showHistoryNavigation;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between pt-2 pl-4 pr-2 pb-2",children:[e.jsx("div",{className:"flex w-full items-center",children:e.jsx(ee,{appear:!0,show:R,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",children:R&&e.jsx(te,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:h,variant:f.isSuccessful?I.Danger:I.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[z.RunningTask,z.Running,z.Run,z.Applying,z.ApplyBackfill,z.ApplyVirtual,z.ApplyChangesAndBackfill,z.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[pe&&e.jsx(te,{onClick:S,variant:I.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[z.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),fe&&e.jsx(te,{onClick:P,variant:I.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),_&&e.jsx(te,{onClick:D,variant:I.Info,children:"Go Back"})]})]})})}function Ps({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:o}){return e.jsxs(he.Group,{as:"div",className:"m-1",children:[e.jsxs(he,{checked:i?!1:a,onChange:t,className:g("flex relative border-secondary-30 rounded-full m-0","shrink-0 focus:outline-none ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100 focus:border-secondary-500 focus-visible:ring-opacity-75","transition duration-200 ease-in-out",a?"bg-secondary-500":"bg-secondary-20",o,i?"opacity-50 cursor-not-allowed":"cursor-pointer",l===T.sm&&"h-[14px] w-6 focus:ring-1 border",l===T.md&&"h-5 w-10 focus:ring-2 border-2",l===T.lg&&"h-7 w-14 focus:ring-4 border-2"),disabled:i,children:[e.jsx("span",{className:"sr-only",children:r}),e.jsx("span",{"aria-hidden":"true",className:g("pointer-events-none inline-block transform rounded-full shadow-md transition duration-200 ease-in-out","bg-light",l===T.sm&&"h-3 w-3",l===T.md&&"h-4 w-4",l===T.lg&&"h-6 w-6",a&&l===T.sm&&"translate-x-[10px]",a&&l===T.md&&"translate-x-5",a&&l===T.lg&&"translate-x-7")})]}),s!=null&&e.jsx(he.Label,{className:g("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function K({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:g("flex justify-between",i),children:[e.jsxs("label",{className:"block mb-1 px-3 text-sm font-bold",children:[s,e.jsx("small",{className:"block text-xs text-neutral-500",children:a})]}),e.jsx(Ps,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ts({disabled:s=!1,className:a}){const t=ge(),{start:r,end:l,isInitialPlanRun:i}=Z();return e.jsxs("div",{className:g("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(q,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:o,className:u})=>e.jsx(q.Textfield,{className:g(u,"w-full"),disabled:o,placeholder:"2023-12-13",value:r,onInput:c=>{c.stopPropagation(),t({type:E.DateStart,start:c.target.value})}})}),e.jsx(q,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:o,className:u})=>e.jsx(q.Textfield,{className:g(u,"w-full"),disabled:o,placeholder:"2022-12-13",value:l,onInput:c=>{c.stopPropagation(),t({type:E.DateEnd,end:c.target.value})}})})]})}function Cs(){const s=ge(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:o,restate_models:u,isInitialPlanRun:c,create_from:d,include_unmodified:p}=Z(),n=y.useRef(null),j=x(N=>N.planAction),m=x(N=>N.planOverview),f=x(N=>N.planApply),h=O(N=>N.environment),P=O(N=>N.environments),S=Pe.getOnlyRemote(Array.from(P));y.useEffect(()=>{s({type:E.PlanOptions,...m.plan_options,skip_tests:!1})},[]);const D=j.isProcessing||j.isDone||f.isFinished||m.isLatest&&C(j.isRun)||m.isVirtualUpdate;return y.useEffect(()=>{var N;B(n.current)||j.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,j]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:g(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ts,{className:g(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(F,{children:e.jsx($,{defaultOpen:j.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs($.Button,{ref:n,className:g("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(F.Label,{className:"mr-2 text-sm w-full",children:[e.jsx("span",{children:"Additional Options"}),D&&e.jsx("span",{className:"ml-1",children:"(Read Only)"})]}),N?e.jsx(ye,{className:"h-5 w-5 text-neutral-400"}):e.jsx(we,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs($.Panel,{unmount:!1,className:g("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:g(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(h.isProd)&&e.jsx(q,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:S.length<2,children:({className:k,disabled:w})=>e.jsx(q.Selector,{className:g(k,"w-full"),list:Pe.getOnlyRemote(Array.from(P)).filter(R=>R!==h).map(R=>({value:R.name,text:R.name})),onChange:R=>{s({type:E.PlanOptions,create_from:R})},value:d,disabled:w})}),e.jsx(q,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models
1
+ import{r as y,R as J,a as O,j as e,n as I,t as Me,b as C,B as te,w as B,m as T,c as g,M as Pe,g as V,J as ze,K as ie,i as M,P as Q,h as H,T as Re,I as re,Q as xe,D as Ue,C as U,s as Le,L as $e,d as Ve,l as Ge,p as He,q as qe,U as Ke,V as Ze,e as Ye}from"./index-C22hdM_h.js";import{G as Je,B as Qe,F as We,w as Xe,u as Z,S as es,A as ss,a as ge,b as E,E as A,P as L,c as as}from"./SelectEnvironment-0MCV04NI.js";import{u as x,a as Y,E as z}from"./plan-BUTy2uM-.js";import{B as F}from"./Banner-BXisqtMu.js";import{A as $,F as ye,a as we,p as ns}from"./PlusCircleIcon-CXYicjof.js";import{U as ts,C as Ee,I as ls,y as is,o as le,T as rs,p as os,b as cs,F as ds,c as ms,A as us,z as Te,D as ee}from"./transition-CiMBgn_Y.js";import{I as q}from"./Input-CxOCLTNw.js";import{T as ps,p as fs}from"./ListboxShow-YBO3HIHQ.js";import{u as Be}from"./project-CtAE3tsj.js";import{F as je}from"./context-B0V9EzWJ.js";import"./ModelLineage-BFuK5Bgk.js";import"./editor-CmeEFdEz.js";import"./file-DY5SRTK1.js";import"./SearchList-Lag39srv.js";import"./help-6Q7f7fjd.js";import"./ChevronDownIcon-D8CFPQ96.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-CTL41Fia.js";import"./index-BWibl-Ee.js";function hs({title:s,titleId:a,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},t),s?y.createElement("title",{id:a},s):null,y.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const W=y.forwardRef(hs);let be=y.createContext(null);be.displayName="GroupContext";let xs=y.Fragment;function js(s){var a;let[t,r]=y.useState(null),[l,i]=We(),[o,u]=Xe(),c=y.useMemo(()=>({switch:t,setSwitch:r,labelledby:l,describedby:o}),[t,r,l,o]),d={},p=s;return J.createElement(u,{name:"Switch.Description"},J.createElement(i,{name:"Switch.Label",props:{htmlFor:(a=c.switch)==null?void 0:a.id,onClick(n){t&&(n.currentTarget.tagName==="LABEL"&&n.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(be.Provider,{value:c},Ee({ourProps:d,theirProps:p,defaultTag:xs,name:"Switch.Group"}))))}let vs="button";function gs(s,a){var t;let r=ls(),{id:l=`headlessui-switch-${r}`,checked:i,defaultChecked:o=!1,onChange:u,disabled:c=!1,name:d,value:p,form:n,...j}=s,m=y.useContext(be),f=y.useRef(null),h=is(f,a,m===null?null:m.setSwitch),[P,S]=ps(i,u,o),D=le(()=>S==null?void 0:S(!P)),N=le(_=>{if(us(_.currentTarget))return _.preventDefault();_.preventDefault(),D()}),k=le(_=>{_.key===Te.Space?(_.preventDefault(),D()):_.key===Te.Enter&&fs(_.currentTarget)}),w=le(_=>_.preventDefault()),R=y.useMemo(()=>({checked:P}),[P]),pe={id:l,ref:h,role:"switch",type:rs(s,f),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":m==null?void 0:m.labelledby,"aria-describedby":m==null?void 0:m.describedby,disabled:c,onClick:N,onKeyUp:k,onKeyPress:w},fe=os();return y.useEffect(()=>{var _;let b=(_=f.current)==null?void 0:_.closest("form");b&&o!==void 0&&fe.addEventListener(b,"reset",()=>{S(o)})},[f,S]),J.createElement(J.Fragment,null,d!=null&&P&&J.createElement(cs,{features:ms.Hidden,...ds({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:c,form:n,checked:P,name:d,value:p})}),Ee({ourProps:pe,theirProps:j,slot:R,defaultTag:vs,name:"Switch"}))}let ys=ts(gs),ws=js,he=Object.assign(ys,{Group:ws,Label:Qe,Description:Je});function bs(){const s=O(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(F,{variant:I.Warning,children:e.jsx($,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs($.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(F.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ye,{className:"w-5 text-warning-500"}):e.jsx(we,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx($.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(F.Description,{children:"Prod will be completely backfilled in order to ensure there are no data gaps. After this is applied, it is recommended to validate further changes in a dev environment before deploying to production."})})]})})})})}function Ns(s=0){return y.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function ks({run:s,apply:a,cancel:t,reset:r}){const l=Me(),{change_categorization:i}=Z(),o=O(b=>b.modules),u=O(b=>b.environment),c=O(b=>b.environments),d=O(b=>b.addConfirmation),p=O(b=>b.setShowConfirmation),n=x(b=>b.planAction),j=x(b=>b.planOverview),m=x(b=>b.planApply),f=x(b=>b.planCancel),h=Ns();function P(b){b.stopPropagation(),r()}function S(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const Oe=u.isProd&&C(u.isInitial),ke=Array.from(i.values()).some(Ie=>B(Ie.category));Oe?d({headline:"Applying Plan Directly On Prod Environment!",tagline:"Safer choice will be to select or add new environment first.",description:"Are you sure you want to apply your changes directly on prod?",yesText:`Yes, Run ${u.name}`,noText:"No, Cancel",action:a,details:ke?["ATTENTION!","[Breaking Change] category will be applied to all uncategorized changes"]:void 0,children:e.jsxs("div",{className:"mt-5 pt-4",children:[e.jsx("h4",{className:"mb-2",children:`${c.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[c.size>1&&e.jsx(es,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{p(!1)},size:T.md}),e.jsx(ss,{className:"w-full",size:T.md,onAdd:()=>{p(!1)}})]})]})}):ke?d({headline:"Some changes are missing categorization!",description:"Are you sure you want to proceed?",details:["[Breaking Change] category will be applied to all uncategorized changes"],yesText:"Yes, Apply",noText:"No, Cancel",action:a}):a()}function k(b){b.stopPropagation(),s()}const w=j.isFailed||m.isFailed||f.isSuccessful,R=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(w),pe=n.isApplying||f.isCancelling||m.isRunning&&j.isFinished,fe=w||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),_=o.showHistoryNavigation;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between pt-2 pl-4 pr-2 pb-2",children:[e.jsx("div",{className:"flex w-full items-center",children:e.jsx(ee,{appear:!0,show:R,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",children:R&&e.jsx(te,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:h,variant:f.isSuccessful?I.Danger:I.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[z.RunningTask,z.Running,z.Run,z.Applying,z.ApplyBackfill,z.ApplyVirtual,z.ApplyChangesAndBackfill,z.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[pe&&e.jsx(te,{onClick:S,variant:I.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[z.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),fe&&e.jsx(te,{onClick:P,variant:I.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),_&&e.jsx(te,{onClick:D,variant:I.Info,children:"Go Back"})]})]})})}function Ps({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:o}){return e.jsxs(he.Group,{as:"div",className:"m-1",children:[e.jsxs(he,{checked:i?!1:a,onChange:t,className:g("flex relative border-secondary-30 rounded-full m-0","shrink-0 focus:outline-none ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100 focus:border-secondary-500 focus-visible:ring-opacity-75","transition duration-200 ease-in-out",a?"bg-secondary-500":"bg-secondary-20",o,i?"opacity-50 cursor-not-allowed":"cursor-pointer",l===T.sm&&"h-[14px] w-6 focus:ring-1 border",l===T.md&&"h-5 w-10 focus:ring-2 border-2",l===T.lg&&"h-7 w-14 focus:ring-4 border-2"),disabled:i,children:[e.jsx("span",{className:"sr-only",children:r}),e.jsx("span",{"aria-hidden":"true",className:g("pointer-events-none inline-block transform rounded-full shadow-md transition duration-200 ease-in-out","bg-light",l===T.sm&&"h-3 w-3",l===T.md&&"h-4 w-4",l===T.lg&&"h-6 w-6",a&&l===T.sm&&"translate-x-[10px]",a&&l===T.md&&"translate-x-5",a&&l===T.lg&&"translate-x-7")})]}),s!=null&&e.jsx(he.Label,{className:g("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function K({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:g("flex justify-between",i),children:[e.jsxs("label",{className:"block mb-1 px-3 text-sm font-bold",children:[s,e.jsx("small",{className:"block text-xs text-neutral-500",children:a})]}),e.jsx(Ps,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ts({disabled:s=!1,className:a}){const t=ge(),{start:r,end:l,isInitialPlanRun:i}=Z();return e.jsxs("div",{className:g("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(q,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:o,className:u})=>e.jsx(q.Textfield,{className:g(u,"w-full"),disabled:o,placeholder:"2023-12-13",value:r,onInput:c=>{c.stopPropagation(),t({type:E.DateStart,start:c.target.value})}})}),e.jsx(q,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:o,className:u})=>e.jsx(q.Textfield,{className:g(u,"w-full"),disabled:o,placeholder:"2022-12-13",value:l,onInput:c=>{c.stopPropagation(),t({type:E.DateEnd,end:c.target.value})}})})]})}function Cs(){const s=ge(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:o,restate_models:u,isInitialPlanRun:c,create_from:d,include_unmodified:p}=Z(),n=y.useRef(null),j=x(N=>N.planAction),m=x(N=>N.planOverview),f=x(N=>N.planApply),h=O(N=>N.environment),P=O(N=>N.environments),S=Pe.getOnlyRemote(Array.from(P));y.useEffect(()=>{s({type:E.PlanOptions,...m.plan_options,skip_tests:!1})},[]);const D=j.isProcessing||j.isDone||f.isFinished||m.isLatest&&C(j.isRun)||m.isVirtualUpdate;return y.useEffect(()=>{var N;B(n.current)||j.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,j]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:g(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ts,{className:g(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(F,{children:e.jsx($,{defaultOpen:j.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs($.Button,{ref:n,className:g("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(F.Label,{className:"mr-2 text-sm w-full",children:[e.jsx("span",{children:"Additional Options"}),D&&e.jsx("span",{className:"ml-1",children:"(Read Only)"})]}),N?e.jsx(ye,{className:"h-5 w-5 text-neutral-400"}):e.jsx(we,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs($.Panel,{unmount:!1,className:g("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:g(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(h.isProd)&&e.jsx(q,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:S.length<2,children:({className:k,disabled:w})=>e.jsx(q.Selector,{className:g(k,"w-full"),list:Pe.getOnlyRemote(Array.from(P)).filter(R=>R!==h).map(R=>({value:R.name,text:R.name})),onChange:R=>{s({type:E.PlanOptions,create_from:R})},value:d,disabled:w})}),e.jsx(q,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models
2
2
  downstream from the one specified. For production
3
3
  environment, all related model versions will have
4
4
  their intervals wiped, but only the current
@@ -1 +1 @@
1
- import{d as a,U as l,w as e,j as r,V as n,e as d}from"./index-COnjINWU.js";import{D as u}from"./ReportErrors-BK8N5y1z.js";import"./PlusCircleIcon-CcC2lSkc.js";import"./transition-DjPYSO2n.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-BSlIdmc8.js";function j(){const{errors:i}=a(),{id:s}=l(),o=e(s)?void 0:Array.from(i).find(t=>t.id===s);return r.jsx("div",{className:"flex overflow-auto w-full h-full",children:e(o)?r.jsx(n,{link:d.Errors,description:e(s)?void 0:`Error ${s} Does Not Exist`,message:"Back To Errors"}):r.jsx("div",{className:"p-4 h-full w-full",children:r.jsx("div",{className:"w-full h-full p-4 rounded-lg bg-danger-5 text-danger-700",children:r.jsx(u,{error:o,scope:o.key,withSplitPane:!0})})})})}export{j as default};
1
+ import{d as a,U as l,w as e,j as r,V as n,e as d}from"./index-C22hdM_h.js";import{D as u}from"./ReportErrors-DaAC3YF4.js";import"./PlusCircleIcon-CXYicjof.js";import"./transition-CiMBgn_Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-7_khUxNG.js";function j(){const{errors:i}=a(),{id:s}=l(),o=e(s)?void 0:Array.from(i).find(t=>t.id===s);return r.jsx("div",{className:"flex overflow-auto w-full h-full",children:e(o)?r.jsx(n,{link:d.Errors,description:e(s)?void 0:`Error ${s} Does Not Exist`,message:"Back To Errors"}):r.jsx("div",{className:"p-4 h-full w-full",children:r.jsx("div",{className:"w-full h-full p-4 rounded-lg bg-danger-5 text-danger-700",children:r.jsx(u,{error:o,scope:o.key,withSplitPane:!0})})})})}export{j as default};
@@ -1 +1 @@
1
- import{U as x,a as m,w as h,Q as o,a5 as c,a6 as D,a7 as T,r as b,j as u}from"./index-COnjINWU.js";import{g,T as E}from"./help-C_umCstj.js";import{u as r}from"./editor-B2GioI_r.js";import"./index-CK4fdw8q.js";import"./Input-CJirBrKe.js";import"./file-C7afm_LM.js";const d=24*60*60*1e3;function Q(){const{modelName:a}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),f=r(e=>e.previewTable),i=r(e=>e.setPreviewQuery),n=r(e=>e.setPreviewTable),t=h(a)||a===(s==null?void 0:s.name)?s:p.get(encodeURI(a)),l={model:t.displayName,start:o(c(Date.now()-d)),end:o(new Date),execution_time:o(c(Date.now()-d)),limit:1e3},{refetch:v}=D(l),{refetch:w}=T(l);return b.useEffect(()=>{i(void 0),n(void 0),v().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(g(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(E,{headline:t==null?void 0:t.displayName,data:f??[[],[]]})})}export{Q as default};
1
+ import{U as x,a as m,w as h,Q as o,a5 as c,a6 as D,a7 as T,r as b,j as u}from"./index-C22hdM_h.js";import{g,T as E}from"./help-Bm8ph9oI.js";import{u as r}from"./editor-CmeEFdEz.js";import"./index-BWibl-Ee.js";import"./Input-CxOCLTNw.js";import"./file-DY5SRTK1.js";const d=24*60*60*1e3;function Q(){const{modelName:a}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),f=r(e=>e.previewTable),i=r(e=>e.setPreviewQuery),n=r(e=>e.setPreviewTable),t=h(a)||a===(s==null?void 0:s.name)?s:p.get(encodeURI(a)),l={model:t.displayName,start:o(c(Date.now()-d)),end:o(new Date),execution_time:o(c(Date.now()-d)),limit:1e3},{refetch:v}=D(l),{refetch:w}=T(l);return b.useEffect(()=>{i(void 0),n(void 0),v().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(g(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(E,{headline:t==null?void 0:t.displayName,data:f??[[],[]]})})}export{Q as default};