sqlmesh 0.188.1.dev5__py3-none-any.whl → 0.188.1.dev7__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 (54) hide show
  1. sqlmesh/_version.py +2 -2
  2. sqlmesh/lsp/context.py +92 -31
  3. sqlmesh/lsp/main.py +14 -50
  4. sqlmesh/magics.py +7 -1
  5. {sqlmesh-0.188.1.dev5.dist-info → sqlmesh-0.188.1.dev7.dist-info}/METADATA +1 -1
  6. {sqlmesh-0.188.1.dev5.dist-info → sqlmesh-0.188.1.dev7.dist-info}/RECORD +53 -53
  7. web/client/dist/assets/{Audits-CxDNe6z-.js → Audits-yd9300pl.js} +1 -1
  8. web/client/dist/assets/{Banner-DgEFplVH.js → Banner-DQJLxQK4.js} +1 -1
  9. web/client/dist/assets/{ChevronDownIcon-BH5O_hpi.js → ChevronDownIcon-CglA7k4-.js} +1 -1
  10. web/client/dist/assets/{ChevronRightIcon-B2tR7wtU.js → ChevronRightIcon-xw0l9rry.js} +1 -1
  11. web/client/dist/assets/{Content-CQOt5HQJ.js → Content-DQHjja2B.js} +1 -1
  12. web/client/dist/assets/{Content-CiZNHHa7.js → Content-DdhorPW0.js} +1 -1
  13. web/client/dist/assets/{Data-CcafCjCX.js → Data-HtiT4UV2.js} +1 -1
  14. web/client/dist/assets/{DataCatalog-FDQcoVzu.js → DataCatalog-_7fRHUeM.js} +1 -1
  15. web/client/dist/assets/{Editor-DPJUo9Bh.js → Editor-BFYqqR17.js} +1 -1
  16. web/client/dist/assets/{Editor-UHmKFABp.js → Editor-ncrD1ZO_.js} +1 -1
  17. web/client/dist/assets/{Errors-PPhF0BLv.js → Errors-BosrEbuf.js} +1 -1
  18. web/client/dist/assets/{FileExplorer-Dn5aKM9r.js → FileExplorer-C6Imxadq.js} +1 -1
  19. web/client/dist/assets/{Footer-C3l7iM3A.js → Footer-C9MHPzk1.js} +1 -1
  20. web/client/dist/assets/{Header-iNVdvXN8.js → Header-DQF-wN9R.js} +1 -1
  21. web/client/dist/assets/{Input-CettPX-D.js → Input-LXiA3uoO.js} +1 -1
  22. web/client/dist/assets/Lineage-BbURajUV.js +1 -0
  23. web/client/dist/assets/{ListboxShow-BaJGpuWH.js → ListboxShow-BUIulc8M.js} +1 -1
  24. web/client/dist/assets/{ModelLineage-zSYJ8qL6.js → ModelLineage-BbFqz62a.js} +1 -1
  25. web/client/dist/assets/{Models-BpC_5kGJ.js → Models-2zScbq9i.js} +1 -1
  26. web/client/dist/assets/{Page-Bq-HPl_L.js → Page-Bf2QbngA.js} +1 -1
  27. web/client/dist/assets/{Plan-DBHhKyK_.js → Plan-DIc3XAIr.js} +1 -1
  28. web/client/dist/assets/{PlusCircleIcon-Bh1eQZZw.js → PlusCircleIcon-BIG5lKYN.js} +1 -1
  29. web/client/dist/assets/{ReportErrors-BvekyVWZ.js → ReportErrors-DD5Tkzy2.js} +1 -1
  30. web/client/dist/assets/{Root-B3mVFWm-.js → Root-B9zs-snk.js} +1 -1
  31. web/client/dist/assets/{SearchList-BoZPD5Ug.js → SearchList-DgKaZfJZ.js} +1 -1
  32. web/client/dist/assets/{SelectEnvironment-DVTyPJgk.js → SelectEnvironment-CP_GD64v.js} +1 -1
  33. web/client/dist/assets/{SourceList-De_bjt2z.js → SourceList-DdN6hYD1.js} +1 -1
  34. web/client/dist/assets/{SourceListItem-s3cjyYyg.js → SourceListItem-BynoG2tu.js} +1 -1
  35. web/client/dist/assets/{SplitPane-YXb1GDjg.js → SplitPane-DrxVfnY9.js} +1 -1
  36. web/client/dist/assets/{Tests-CABcm50Q.js → Tests-A4Bnjxwk.js} +1 -1
  37. web/client/dist/assets/{Welcome-BmBt__Vn.js → Welcome-DbSZJpJE.js} +1 -1
  38. web/client/dist/assets/{context-0jZBOaYJ.js → context-Bxzp3TEa.js} +2 -2
  39. web/client/dist/assets/{context-C6hLZh3v.js → context-DUKxn1wN.js} +1 -1
  40. web/client/dist/assets/{editor-Dn-V5hys.js → editor-CJ4oQlo_.js} +1 -1
  41. web/client/dist/assets/{file-FSJHKTZR.js → file-CFuQwF_m.js} +1 -1
  42. web/client/dist/assets/{floating-ui.react-dom-CwIPOwQR.js → floating-ui.react-dom-CN8_HaDW.js} +1 -1
  43. web/client/dist/assets/{help-Eh_Sg5R6.js → help-BGO8vW5o.js} +1 -1
  44. web/client/dist/assets/{index-OgPYo7hm.js → index-C_NFRX2g.js} +1 -1
  45. web/client/dist/assets/{index-hHSGLUzW.js → index-DGopuBhO.js} +14 -14
  46. web/client/dist/assets/{plan-Crz4bZML.js → plan-CN6Tq0vs.js} +1 -1
  47. web/client/dist/assets/{popover-CiOVW6r6.js → popover-DJJmvGdj.js} +1 -1
  48. web/client/dist/assets/{project-6bhvIw3F.js → project-CmqDHjoE.js} +1 -1
  49. web/client/dist/index.html +1 -1
  50. web/client/dist/assets/Lineage-DPXlJvwM.js +0 -1
  51. {sqlmesh-0.188.1.dev5.dist-info → sqlmesh-0.188.1.dev7.dist-info}/WHEEL +0 -0
  52. {sqlmesh-0.188.1.dev5.dist-info → sqlmesh-0.188.1.dev7.dist-info}/entry_points.txt +0 -0
  53. {sqlmesh-0.188.1.dev5.dist-info → sqlmesh-0.188.1.dev7.dist-info}/licenses/LICENSE +0 -0
  54. {sqlmesh-0.188.1.dev5.dist-info → sqlmesh-0.188.1.dev7.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.188.1.dev5'
21
- __version_tuple__ = version_tuple = (0, 188, 1, 'dev5')
20
+ __version__ = version = '0.188.1.dev7'
21
+ __version_tuple__ = version_tuple = (0, 188, 1, 'dev7')
sqlmesh/lsp/context.py CHANGED
@@ -4,6 +4,7 @@ from sqlmesh.core.context import Context
4
4
  import typing as t
5
5
 
6
6
  from sqlmesh.core.model.definition import SqlModel
7
+ from sqlmesh.core.linter.definition import AnnotatedRuleViolation
7
8
  from sqlmesh.lsp.custom import RenderModelEntry
8
9
  from sqlmesh.lsp.uri import URI
9
10
 
@@ -28,8 +29,14 @@ class LSPContext:
28
29
  model names and standalone audit names.
29
30
  """
30
31
 
32
+ map: t.Dict[Path, t.Union[ModelTarget, AuditTarget]]
33
+ _render_cache: t.Dict[Path, t.List[RenderModelEntry]]
34
+ _lint_cache: t.Dict[Path, t.List[AnnotatedRuleViolation]]
35
+
31
36
  def __init__(self, context: Context) -> None:
32
37
  self.context = context
38
+ self._render_cache = {}
39
+ self._lint_cache = {}
33
40
 
34
41
  # Add models to the map
35
42
  model_map: t.Dict[Path, ModelTarget] = {}
@@ -54,36 +61,90 @@ class LSPContext:
54
61
  **audit_map,
55
62
  }
56
63
 
64
+ def render_model(self, uri: URI) -> t.List[RenderModelEntry]:
65
+ """Get rendered models for a file, using cache when available.
57
66
 
58
- def render_model(context: LSPContext, uri: URI) -> t.Iterator[RenderModelEntry]:
59
- target = context.map[uri.to_path()]
60
- if isinstance(target, AuditTarget):
61
- audit = context.context.standalone_audits[target.name]
62
- definition = audit.render_definition(
63
- include_python=False,
64
- render_query=True,
65
- )
66
- rendered_query = [render.sql(dialect=audit.dialect, pretty=True) for render in definition]
67
- yield RenderModelEntry(
68
- name=audit.name,
69
- fqn=audit.fqn,
70
- description=audit.description,
71
- rendered_query="\n\n".join(rendered_query),
72
- )
73
- if isinstance(target, ModelTarget):
74
- for name in target.names:
75
- model = context.context.get_model(name)
76
- if isinstance(model, SqlModel):
77
- rendered_query = [
78
- render.sql(dialect=model.dialect, pretty=True)
79
- for render in model.render_definition(
80
- include_python=False,
81
- render_query=True,
67
+ Args:
68
+ uri: The URI of the file to render.
69
+
70
+ Returns:
71
+ List of rendered model entries.
72
+ """
73
+ path = uri.to_path()
74
+
75
+ # Check cache first
76
+ if path in self._render_cache:
77
+ return self._render_cache[path]
78
+
79
+ # If not cached, render and cache
80
+ entries: t.List[RenderModelEntry] = []
81
+ target = self.map.get(path)
82
+
83
+ if isinstance(target, AuditTarget):
84
+ audit = self.context.standalone_audits[target.name]
85
+ definition = audit.render_definition(
86
+ include_python=False,
87
+ render_query=True,
88
+ )
89
+ rendered_query = [
90
+ render.sql(dialect=audit.dialect, pretty=True) for render in definition
91
+ ]
92
+ entry = RenderModelEntry(
93
+ name=audit.name,
94
+ fqn=audit.fqn,
95
+ description=audit.description,
96
+ rendered_query="\n\n".join(rendered_query),
97
+ )
98
+ entries.append(entry)
99
+
100
+ elif isinstance(target, ModelTarget):
101
+ for name in target.names:
102
+ model = self.context.get_model(name)
103
+ if isinstance(model, SqlModel):
104
+ rendered_query = [
105
+ render.sql(dialect=model.dialect, pretty=True)
106
+ for render in model.render_definition(
107
+ include_python=False,
108
+ render_query=True,
109
+ )
110
+ ]
111
+ entry = RenderModelEntry(
112
+ name=model.name,
113
+ fqn=model.fqn,
114
+ description=model.description,
115
+ rendered_query="\n\n".join(rendered_query),
82
116
  )
83
- ]
84
- yield RenderModelEntry(
85
- name=model.name,
86
- fqn=model.fqn,
87
- description=model.description,
88
- rendered_query="\n\n".join(rendered_query),
89
- )
117
+ entries.append(entry)
118
+
119
+ # Store in cache
120
+ self._render_cache[path] = entries
121
+ return entries
122
+
123
+ def lint_model(self, uri: URI) -> t.List[AnnotatedRuleViolation]:
124
+ """Get lint diagnostics for a model, using cache when available.
125
+
126
+ Args:
127
+ uri: The URI of the file to lint.
128
+
129
+ Returns:
130
+ List of annotated rule violations.
131
+ """
132
+ path = uri.to_path()
133
+
134
+ # Check cache first
135
+ if path in self._lint_cache:
136
+ return self._lint_cache[path]
137
+
138
+ # If not cached, lint and cache
139
+ target = self.map.get(path)
140
+ if target is None or not isinstance(target, ModelTarget):
141
+ return []
142
+
143
+ diagnostics = self.context.lint_models(
144
+ target.names,
145
+ raise_on_error=False,
146
+ )
147
+
148
+ # Store in cache
149
+ self._lint_cache[path] = diagnostics
150
+ return diagnostics
sqlmesh/lsp/main.py CHANGED
@@ -24,7 +24,6 @@ from sqlmesh.lsp.completions import get_sql_completions
24
24
  from sqlmesh.lsp.context import (
25
25
  LSPContext,
26
26
  ModelTarget,
27
- render_model as render_model_context,
28
27
  )
29
28
  from sqlmesh.lsp.custom import (
30
29
  ALL_MODELS_FEATURE,
@@ -58,10 +57,6 @@ class SQLMeshLanguageServer:
58
57
  self.context_class = context_class
59
58
  self.lsp_context: t.Optional[LSPContext] = None
60
59
 
61
- # Cache stores tuples of (diagnostics, diagnostic_version)
62
- self.lint_cache: t.Dict[URI, t.Tuple[t.List[AnnotatedRuleViolation], int]] = {}
63
- self._diagnostic_version_counter: int = 0
64
-
65
60
  self.client_supports_pull_diagnostics = False
66
61
  # Register LSP features (e.g., formatting, hover, etc.)
67
62
  self._register_features()
@@ -120,7 +115,7 @@ class SQLMeshLanguageServer:
120
115
  def render_model(ls: LanguageServer, params: RenderModelRequest) -> RenderModelResponse:
121
116
  uri = URI(params.textDocumentUri)
122
117
  context = self._context_get_or_load(uri)
123
- return RenderModelResponse(models=list(render_model_context(context, uri)))
118
+ return RenderModelResponse(models=context.render_model(uri))
124
119
 
125
120
  @self.server.feature(API_FEATURE)
126
121
  def api(ls: LanguageServer, request: ApiRequest) -> t.Dict[str, t.Any]:
@@ -173,17 +168,11 @@ class SQLMeshLanguageServer:
173
168
  if models is None or not isinstance(models, ModelTarget):
174
169
  return
175
170
 
176
- if self.lint_cache.get(uri) is None:
177
- diagnostics = context.context.lint_models(
178
- models.names,
179
- raise_on_error=False,
180
- )
181
- self._diagnostic_version_counter += 1
182
- self.lint_cache[uri] = (diagnostics, self._diagnostic_version_counter)
171
+ # Get diagnostics from context (which handles caching)
172
+ diagnostics = context.lint_model(uri)
183
173
 
184
174
  # Only publish diagnostics if client doesn't support pull diagnostics
185
175
  if not self.client_supports_pull_diagnostics:
186
- diagnostics, _ = self.lint_cache[uri]
187
176
  ls.publish_diagnostics(
188
177
  params.text_document.uri,
189
178
  SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(diagnostics),
@@ -197,13 +186,8 @@ class SQLMeshLanguageServer:
197
186
  if models is None or not isinstance(models, ModelTarget):
198
187
  return
199
188
 
200
- # Always update the cache
201
- diagnostics = context.context.lint_models(
202
- models.names,
203
- raise_on_error=False,
204
- )
205
- self._diagnostic_version_counter += 1
206
- self.lint_cache[uri] = (diagnostics, self._diagnostic_version_counter)
189
+ # Get diagnostics from context (which handles caching)
190
+ diagnostics = context.lint_model(uri)
207
191
 
208
192
  # Only publish diagnostics if client doesn't support pull diagnostics
209
193
  if not self.client_supports_pull_diagnostics:
@@ -220,13 +204,8 @@ class SQLMeshLanguageServer:
220
204
  if models is None or not isinstance(models, ModelTarget):
221
205
  return
222
206
 
223
- # Always update the cache
224
- diagnostics = context.context.lint_models(
225
- models.names,
226
- raise_on_error=False,
227
- )
228
- self._diagnostic_version_counter += 1
229
- self.lint_cache[uri] = (diagnostics, self._diagnostic_version_counter)
207
+ # Get diagnostics from context (which handles caching)
208
+ diagnostics = context.lint_model(uri)
230
209
 
231
210
  # Only publish diagnostics if client doesn't support pull diagnostics
232
211
  if not self.client_supports_pull_diagnostics:
@@ -445,31 +424,16 @@ class SQLMeshLanguageServer:
445
424
  return types.WorkspaceDiagnosticReport(items=[])
446
425
 
447
426
  def _get_diagnostics_for_uri(self, uri: URI) -> t.Tuple[t.List[types.Diagnostic], int]:
448
- """Get diagnostics for a specific URI, returning (diagnostics, result_id)."""
449
- # Check if we have cached diagnostics
450
- if uri in self.lint_cache:
451
- diagnostics, result_id = self.lint_cache[uri]
452
- return SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(diagnostics), result_id
427
+ """Get diagnostics for a specific URI, returning (diagnostics, result_id).
453
428
 
454
- # Try to get diagnostics by loading context and linting
429
+ Since we no longer track version numbers, we always return 0 as the result_id.
430
+ This means pull diagnostics will always fetch fresh results.
431
+ """
455
432
  try:
456
433
  context = self._context_get_or_load(uri)
457
- models = context.map[uri.to_path()]
458
- if models is None or not isinstance(models, ModelTarget):
459
- return [], 0
460
-
461
- # Lint the models and cache the results
462
- diagnostics = context.context.lint_models(
463
- models.names,
464
- raise_on_error=False,
465
- )
466
- self._diagnostic_version_counter += 1
467
- self.lint_cache[uri] = (diagnostics, self._diagnostic_version_counter)
468
- return SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(
469
- diagnostics
470
- ), self._diagnostic_version_counter
434
+ diagnostics = context.lint_model(uri)
435
+ return SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(diagnostics), 0
471
436
  except Exception:
472
- # If we can't get diagnostics, return empty list with no result ID
473
437
  return [], 0
474
438
 
475
439
  def _context_get_or_load(self, document_uri: URI) -> LSPContext:
@@ -523,7 +487,7 @@ class SQLMeshLanguageServer:
523
487
  created_context = self.context_class(paths=[path])
524
488
  self.lsp_context = LSPContext(created_context)
525
489
  loaded = True
526
- # Re-check context for document now that it's loaded
490
+ # Re-check context for the document now that it's loaded
527
491
  return self._ensure_context_for_document(document_uri)
528
492
  except Exception as e:
529
493
  self.server.show_message(
sqlmesh/magics.py CHANGED
@@ -32,7 +32,7 @@ from sqlmesh.core.context import Context
32
32
  from sqlmesh.core.dialect import format_model_expressions, parse
33
33
  from sqlmesh.core.model import load_sql_based_model
34
34
  from sqlmesh.core.test import ModelTestMetadata
35
- from sqlmesh.utils import sqlglot_dialects, yaml, Verbosity
35
+ from sqlmesh.utils import sqlglot_dialects, yaml, Verbosity, optional_import
36
36
  from sqlmesh.utils.errors import MagicError, MissingContextException, SQLMeshError
37
37
 
38
38
  logger = logging.getLogger(__name__)
@@ -548,6 +548,8 @@ class SQLMeshMagics(Magics):
548
548
  def evaluate(self, context: Context, line: str) -> None:
549
549
  """Evaluate a model query and fetches a dataframe."""
550
550
  context.refresh()
551
+
552
+ snowpark = optional_import("snowflake.snowpark")
551
553
  args = parse_argstring(self.evaluate, line)
552
554
 
553
555
  df = context.evaluate(
@@ -557,6 +559,10 @@ class SQLMeshMagics(Magics):
557
559
  execution_time=args.execution_time,
558
560
  limit=args.limit,
559
561
  )
562
+
563
+ if snowpark and isinstance(df, snowpark.DataFrame):
564
+ df = df.limit(args.limit or 100).to_pandas()
565
+
560
566
  self.display(df)
561
567
 
562
568
  @magic_arguments()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlmesh
3
- Version: 0.188.1.dev5
3
+ Version: 0.188.1.dev7
4
4
  Summary: Next-generation data transformation framework
5
5
  Author-email: "TobikoData Inc." <engineering@tobikodata.com>
6
6
  License: Apache License
@@ -1,6 +1,6 @@
1
1
  sqlmesh/__init__.py,sha256=69xw6bTmi4cW90M-sl3g6wLDgxVcLHcKg1q8GS3lqyA,7466
2
- sqlmesh/_version.py,sha256=zXIZ5hgc787p9ox8--L6hHJyXpFfa37vGrcvnC79XaI,528
3
- sqlmesh/magics.py,sha256=JHorAZNtezf123jmTyNSoUC9yHmv-08hMP205PJmmIo,39750
2
+ sqlmesh/_version.py,sha256=wywJkf5IKZ8yoj5ZLyjSrChyrg233K3yMpowNlVlFOA,528
3
+ sqlmesh/magics.py,sha256=fu7-OeT_0_TAkWZOLoiioE3-3iFpvTRxFCbQUlRnfuw,39944
4
4
  sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  sqlmesh/cicd/bot.py,sha256=2zlbn-DXkqQzr3lA0__IGU4XaIfXBXBKLWXNI2DRJX8,759
@@ -157,10 +157,10 @@ sqlmesh/integrations/github/cicd/config.py,sha256=tRhMZaLf1p6AWXvi67n85Q-lptJNGt
157
157
  sqlmesh/integrations/github/cicd/controller.py,sha256=FmOO93RF5auSU6aDU2beiP5LblLs38eAUYgHGWB9jYc,41666
158
158
  sqlmesh/lsp/api.py,sha256=LJdECSaEZoPbu_Xl4KscVG-WLt7_g4dY-zKGO68dH14,2162
159
159
  sqlmesh/lsp/completions.py,sha256=Uo8lUzPBeoB58Eu2642YoAtNI0pgIFWFSvwmuJALTv4,3583
160
- sqlmesh/lsp/context.py,sha256=nCWg2uVH28-IJC2uDYuCbiXTh1lUFElSpNu4Q-fDWi4,2918
160
+ sqlmesh/lsp/context.py,sha256=mqxUn_RuTZZwmRw6Axi4roUQNMDS5zv6a5X595A6Enc,4764
161
161
  sqlmesh/lsp/custom.py,sha256=7VPBK8E6w3KFsYxjiQgpdPkSBGzT69HfPvnS3wYpWNo,920
162
162
  sqlmesh/lsp/description.py,sha256=4QIGC9ix8IzmWF6DVUNhY4m1Crk3sNQA6hZ1RbyqU78,827
163
- sqlmesh/lsp/main.py,sha256=Lg_XHxXNScStf0aiOUptijZnBLOIjcmmhsFgM5w2rNo,27405
163
+ sqlmesh/lsp/main.py,sha256=CA4Y02jBufhqz_Nz7QfTKoH-5mIxcPXf5BCrUuoxoyc,25789
164
164
  sqlmesh/lsp/reference.py,sha256=-HkMMzRzq4ike5mSkoWajanYNMAwhQhlPaqw62451ac,16887
165
165
  sqlmesh/lsp/uri.py,sha256=mvSLbZGmMTHPpliThOtVWiFcHnfJzp1w39q9l-xD2SI,802
166
166
  sqlmesh/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -270,53 +270,53 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
270
270
  sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
271
271
  sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
272
272
  sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
273
- sqlmesh-0.188.1.dev5.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
273
+ sqlmesh-0.188.1.dev7.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
274
274
  web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
275
- web/client/dist/index.html,sha256=Q21mZoousg66LOW4HLrz-148ej1b80OxDZNUqB4uZR8,5472
276
- web/client/dist/assets/Audits-CxDNe6z-.js,sha256=fWqj6aR188vCiP9eX0VJ7x0sJ1C85UVeY9oLzKDjVlM,1041
277
- web/client/dist/assets/Banner-DgEFplVH.js,sha256=gy7cE4-Rgl2k4QE-XP5Ea1csUM8I3LC3X3ez2wK4SgE,1549
278
- web/client/dist/assets/ChevronDownIcon-BH5O_hpi.js,sha256=SHJnNbS0v5pCNT4YLFduXgOjalvcVjp_jQRxpSlLEsI,553
279
- web/client/dist/assets/ChevronRightIcon-B2tR7wtU.js,sha256=BFWhJzdvJ049JJ4_JjW9K_KvB9M2ZbSLpFM4P6OTSkI,553
280
- web/client/dist/assets/Content-CQOt5HQJ.js,sha256=ouXsagTuPTs9JaU1gIieiynfwTR2lov6SSdHfLQzAJE,803
281
- web/client/dist/assets/Content-CiZNHHa7.js,sha256=QOff9Y0q76_cjylwQnZGHqVsJt5KRtPX8vIrG4vRBPM,37525
282
- web/client/dist/assets/Data-CcafCjCX.js,sha256=c9s6LZKmdn_SgumEo-xWp3_TsZsO-v9f95vSdpn1vFo,984
283
- web/client/dist/assets/DataCatalog-FDQcoVzu.js,sha256=TyVysjMgM7-230nbvQAd4C_TPy_cp78H66HNmkoI3Qc,122464
284
- web/client/dist/assets/Editor-DPJUo9Bh.js,sha256=M8mvD7FQs_TQJl0NWyaNHzIOThC8T-wH4WHE7rfwgb0,43614
285
- web/client/dist/assets/Editor-UHmKFABp.js,sha256=PX-n2xihxJ7PxaT9mPqwSBaEHQoYK7It-tzc1RVzg4Y,1490
286
- web/client/dist/assets/Errors-PPhF0BLv.js,sha256=v5IKnpL7Qtq0vqaHu1qi5Grd7u0swhyeRMT9c3-tIKE,1361
287
- web/client/dist/assets/FileExplorer-Dn5aKM9r.js,sha256=FJh0nry7LONeskGemhIqF4dNTpsBmuoWAuWyfHj98E4,87619
288
- web/client/dist/assets/Footer-C3l7iM3A.js,sha256=-iHPlYtkQdz2dSfJlAEiklq2ZYIJo0hB_gfqTBmbCqA,700
289
- web/client/dist/assets/Header-iNVdvXN8.js,sha256=82qWpUWMnIQ5wSc_jeH6jJqwDZw6I0XZXRDVTFI0OM8,11424
290
- web/client/dist/assets/Input-CettPX-D.js,sha256=FIzhPDuocjwsMo6XY-l3aMWdWDLZ6MijIbwoIE-qnqs,54814
291
- web/client/dist/assets/Lineage-DPXlJvwM.js,sha256=QICRfX3D7jD8y3IMEwQK_SPfErGj4X62txDKH_gCNg8,1002
292
- web/client/dist/assets/ListboxShow-BaJGpuWH.js,sha256=9KJm9oKNz_3fnZQioYJywUul8fEs0a45tolYkx0k1Kw,29911
293
- web/client/dist/assets/ModelLineage-zSYJ8qL6.js,sha256=aCiyZrvlc4wR10ARPUS19BEwiFsJnh-EROL9Kz145I0,15546
294
- web/client/dist/assets/Models-BpC_5kGJ.js,sha256=tnILJbIz8eCITZHqC-GdpguHawre9yzMFo91iyDJgB4,2194
295
- web/client/dist/assets/Page-Bq-HPl_L.js,sha256=WZqfTvxv5WdXUaXTtNyIyhD7dN3rX8uCPn71MwTAPb4,589
296
- web/client/dist/assets/Plan-DBHhKyK_.js,sha256=yYZfyUrIuDLmw3XOjwJfx-kDe5aLx3T-Ma5wymMmui4,666
297
- web/client/dist/assets/PlusCircleIcon-Bh1eQZZw.js,sha256=6WXLTg7tAN9BRhQlGh626TONY_9NaAwVlqOqF2QJa_U,11698
298
- web/client/dist/assets/ReportErrors-BvekyVWZ.js,sha256=HVkj4iScRVByFTrVXOGVOQcKcRgqUIea05Sky9Z1BX8,5419
299
- web/client/dist/assets/Root-B3mVFWm-.js,sha256=B_P8L2kiJXTe_pN_44U44RCbY1fovhgek0Xc6D83Zd0,42195
300
- web/client/dist/assets/SearchList-BoZPD5Ug.js,sha256=fHaRgL_JQZ-gmz3_WEsG4y6WNifOtp0vRHUzez3JoOs,291983
301
- web/client/dist/assets/SelectEnvironment-DVTyPJgk.js,sha256=yrD0ItxkuXmlQYrSeeDFjFUOKrMTs97X1UcW6eJ0bEo,37637
302
- web/client/dist/assets/SourceList-De_bjt2z.js,sha256=p5aCUaYluWjhTRGnf4CxYIKzY8fEV110g3wsRfNRE64,3205
303
- web/client/dist/assets/SourceListItem-s3cjyYyg.js,sha256=hduor8KK96MbjCOLu3tfH5jJ9_LCslY6RpcFrEgMcoc,1106
304
- web/client/dist/assets/SplitPane-YXb1GDjg.js,sha256=QbeM8DsgSgD40RaEWJH4XhrksPnOqm5g5-EoxIWfQ7M,10439
305
- web/client/dist/assets/Tests-CABcm50Q.js,sha256=voZnyReSGa1Hyhoc_w0EG_eRGUtSGjH33jAgoOOeBWs,1014
306
- web/client/dist/assets/Welcome-BmBt__Vn.js,sha256=6hrX3WW_ZjtVr3LBM8SQp6Dqo-FrMEi_tlnSSyOUcvo,354
275
+ web/client/dist/index.html,sha256=SZAIyEMRTaAz5h63Jg1UPib6v2scbURBURXaYWbeels,5472
276
+ web/client/dist/assets/Audits-yd9300pl.js,sha256=Vv7BcvM07rW2_89mRd0suy-0FuYGjDX4NI8dQTw7u5s,1041
277
+ web/client/dist/assets/Banner-DQJLxQK4.js,sha256=mP_f8k5Mn8NQZoy9MTTd2kDacFKw3dtOp7da5K21GQs,1549
278
+ web/client/dist/assets/ChevronDownIcon-CglA7k4-.js,sha256=XJOtHXY0lnaKyIAkvkv8rCXvbkPugDpMyxVgP1V1yto,553
279
+ web/client/dist/assets/ChevronRightIcon-xw0l9rry.js,sha256=52g8zWJANOvN4KDuJsSjwzBYYDd89NoA6AnmW8vYCcU,553
280
+ web/client/dist/assets/Content-DQHjja2B.js,sha256=Gzd-RFnUNavM7ll0Hfm8AE5TcWGDFpf_auZsTjWync4,803
281
+ web/client/dist/assets/Content-DdhorPW0.js,sha256=SaUVjVYUGjVaLCCrbBBEynh28y0WC96VKWiy29aytWY,37525
282
+ web/client/dist/assets/Data-HtiT4UV2.js,sha256=5t9dlKsLer0BrDr2pjq2IJuvbXfAX_wjwuZ19lMlD0o,984
283
+ web/client/dist/assets/DataCatalog-_7fRHUeM.js,sha256=kH6P0FMQGoycFW6dTRqfY_hlkp7K1kWEnf6Ok7ADkzQ,122464
284
+ web/client/dist/assets/Editor-BFYqqR17.js,sha256=SqvWBIQaMJzsx5KVA56zG2LTRKeihHtoTvtnKsg9OUU,43614
285
+ web/client/dist/assets/Editor-ncrD1ZO_.js,sha256=kv0KhGlVCyteGH0V94gjwXw1G6w2mcbIUmftk_psZdw,1490
286
+ web/client/dist/assets/Errors-BosrEbuf.js,sha256=mR-xSv6n3rdFjT0yG1aN8Gy95SBpIeA1BaQ-o9mAXw8,1361
287
+ web/client/dist/assets/FileExplorer-C6Imxadq.js,sha256=lDRYpIWp9PCXXAm0lLH2g-ZomGfpVrRsw-D6BxXSdU4,87619
288
+ web/client/dist/assets/Footer-C9MHPzk1.js,sha256=nrKsDQdFUSqjNkEC0arozm_RdSJxpXq_1_R4fElwCT8,700
289
+ web/client/dist/assets/Header-DQF-wN9R.js,sha256=5WSSOWrDKPNBMeOrriKbk5R7iQfU1hrXw1ePXp6tm7w,11424
290
+ web/client/dist/assets/Input-LXiA3uoO.js,sha256=vBSWpYRst69NqBxzPl5rPuNvyUbjzzkPEZL06ZzY0FY,54814
291
+ web/client/dist/assets/Lineage-BbURajUV.js,sha256=N91_zIKzNrEklxKD8Lpd3lfEVkHVp7JusqSz7toarEs,1002
292
+ web/client/dist/assets/ListboxShow-BUIulc8M.js,sha256=McO91Xk3M4g4iZUwn4WKQk58O2Oh24_Z2kO86Cimpdc,29911
293
+ web/client/dist/assets/ModelLineage-BbFqz62a.js,sha256=TsH-fNX9gFTwA2l1Jg6V7EQvxh-lzKCaPOLeEuIeD9A,15546
294
+ web/client/dist/assets/Models-2zScbq9i.js,sha256=XriH6_El9FejIfysPujDLwA9MJUkvkdBPpUbt79Qa1A,2194
295
+ web/client/dist/assets/Page-Bf2QbngA.js,sha256=d9YaN7h0PpWb0l4zPs21wZZgCcM3PRoHj1WanMNSTeU,589
296
+ web/client/dist/assets/Plan-DIc3XAIr.js,sha256=4a1i6ipiVLk66TnMxkR47QnIVs9gF3vpORhkOLE5_HQ,666
297
+ web/client/dist/assets/PlusCircleIcon-BIG5lKYN.js,sha256=JbTtdF2t7i3N_G5EPOQzMMD3EzSA3epcgCVlDOigDf0,11698
298
+ web/client/dist/assets/ReportErrors-DD5Tkzy2.js,sha256=R1YTmYHHpTimq5AodJTehFVfrng6xXuyMmJB2LzaHC4,5419
299
+ web/client/dist/assets/Root-B9zs-snk.js,sha256=-k9B1CRiz6Jq7HzRLRNsCtZ5JdCpomynAYdPK-AGkTk,42195
300
+ web/client/dist/assets/SearchList-DgKaZfJZ.js,sha256=FCSoe9AQvShArXIIWSViOfEyGjc8OAGirWqzZY-ffkU,291983
301
+ web/client/dist/assets/SelectEnvironment-CP_GD64v.js,sha256=MVwv4ukJ5rKbnYC9FGkX1ioiMGdOQ4o9X2Yowyu0bTM,37637
302
+ web/client/dist/assets/SourceList-DdN6hYD1.js,sha256=pOSC-dZdULh55RCkuiHDgh5qHBvxMrudESD9fMOxt2k,3205
303
+ web/client/dist/assets/SourceListItem-BynoG2tu.js,sha256=OZU_-6yiiJ-DYyM_l2v-sLOXMd7kqL7pO5bMw6wSg9w,1106
304
+ web/client/dist/assets/SplitPane-DrxVfnY9.js,sha256=2Z9SrIwp52LH7upEdlRiQxStgh98vxPg0KOAE0TwcME,10439
305
+ web/client/dist/assets/Tests-A4Bnjxwk.js,sha256=d6UpGm-gvfs75HXkyRwAopNXAMYZx8vm6dnY8c05eZA,1014
306
+ web/client/dist/assets/Welcome-DbSZJpJE.js,sha256=GEr8wRY_CQTwwFmMOBJ4YFzoprSnofoovf54qZOnPWc,354
307
307
  web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js,sha256=WQq4BXvAMsPhT58adqrv_QHaYJQT-xKIiBnKBDPB-uk,239
308
- web/client/dist/assets/context-0jZBOaYJ.js,sha256=jo_9Wr8FLrovaPRGt8SDIDmAWseCq_hbPd5YhU8s8Ww,2043868
309
- web/client/dist/assets/context-C6hLZh3v.js,sha256=eirjooqqs00l6Z0FGoPiILplkwk6tQPLFyHxQgETIGk,4517
310
- web/client/dist/assets/editor-Dn-V5hys.js,sha256=z7jZb4-h-kvpjpCBwDuIclYIyEXh2u86kzu0G38irzU,7858
311
- web/client/dist/assets/file-FSJHKTZR.js,sha256=jtC5Xi2U5to2BdsxLE88haSbwDyjW6ERbcLu8SQBv6U,2349
312
- web/client/dist/assets/floating-ui.react-dom-CwIPOwQR.js,sha256=S4rqciaWEeT0tbt3WKxtO0skIT5Kvojs8a3P0y-BpCw,22266
308
+ web/client/dist/assets/context-Bxzp3TEa.js,sha256=iowjjj0FomYc32oCUjBoYZt6t48nArnVWyMzg_P-eTw,2043849
309
+ web/client/dist/assets/context-DUKxn1wN.js,sha256=kxLtrrtk6zvF4HW03WRbRnOopPb1hzWgILLq73SxsgA,4517
310
+ web/client/dist/assets/editor-CJ4oQlo_.js,sha256=BFDZXJPcwMqfj6Pu0y1cULFlaztH_Z3VzbqUeNxHNX0,7858
311
+ web/client/dist/assets/file-CFuQwF_m.js,sha256=2jj9xp6a4mloEIS4kVX5guwkQG61EqdfJ389Qgk91vI,2349
312
+ web/client/dist/assets/floating-ui.react-dom-CN8_HaDW.js,sha256=ohIWkjD-lBdwAHQon-BnfEcK3t0XRDKzM1n8FRww4Zs,22266
313
313
  web/client/dist/assets/help-6Q7f7fjd.js,sha256=93Iri9PzpAiPgCyRsrQwABjP2jomAUNR7y2OqHxPf34,445
314
- web/client/dist/assets/help-Eh_Sg5R6.js,sha256=3VrQ3Y8KF0XUjsV7TYpxBHm-W6o97nIQC8ev21nV9uI,57842
315
- web/client/dist/assets/index-OgPYo7hm.js,sha256=IPfWesTyoOHT8jFE2lS7rbR76sNqzVqKIh06l9WzqJ4,13582
316
- web/client/dist/assets/index-hHSGLUzW.js,sha256=1BGXhd6gXcfScTgpibwyDAajyravnvZ7ykVVBWa3E3U,531532
317
- web/client/dist/assets/plan-Crz4bZML.js,sha256=lAaLbozj4-nZ1Du-IlNIaTYQhgyrfFMR05rrlXzORjs,13754
318
- web/client/dist/assets/popover-CiOVW6r6.js,sha256=oabzGDgSgVDnuPe1fODpQjLqNTVq-Rd6JmJSs37Ort0,68101
319
- web/client/dist/assets/project-6bhvIw3F.js,sha256=9GF7_EHJW-FMWr4dMNlzVxHI9K5No4chzD4-1VwKa94,3338
314
+ web/client/dist/assets/help-BGO8vW5o.js,sha256=CtBMnmPx6yHBaLBCa3zJSfeF3Lkc9-ekn816CCyGFJY,57842
315
+ web/client/dist/assets/index-C_NFRX2g.js,sha256=3PWz9ArWKLzM9t1_d8YqwB1cIRIfAnTHrPsZRov4zvs,13582
316
+ web/client/dist/assets/index-DGopuBhO.js,sha256=hzOODGU3VGCkqPwcSuAsdXEUpzpmm1OXPmH_YBfXsnw,531612
317
+ web/client/dist/assets/plan-CN6Tq0vs.js,sha256=pbg_KODYcsuDQS9GbuToW18Vy3zcvpbaMOFVXA4VGuU,13754
318
+ web/client/dist/assets/popover-DJJmvGdj.js,sha256=wVjAfLXBtIidtSCDC7ew4YSCGpyo8X-pyvCdrMnqVDM,68101
319
+ web/client/dist/assets/project-CmqDHjoE.js,sha256=AAwdlj83W6b3QAgSyPnPuAXVD8vSaKbStVXhwROg7XM,3338
320
320
  web/client/dist/css/base.css,sha256=JApDmQihY7DRy5Bd30uYMm5NdMKm0QsEOMBsOuK7gyU,9048
321
321
  web/client/dist/css/design.css,sha256=9VTHN-aYFVW6I53jUWbV8qaqo87tXyZTYSWFLC_sRQY,17057
322
322
  web/client/dist/favicons/favicon.svg,sha256=ZPNT00J77RHUj6Nlh6Z4Puxnp_oq9RSqACjomhDRUXE,1586
@@ -388,8 +388,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
388
388
  web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
389
389
  web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
390
390
  web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
391
- sqlmesh-0.188.1.dev5.dist-info/METADATA,sha256=gLhh8_wZLCIGV0AAolzMW0UFUlz-lqMDrZbh1r_c-FA,26531
392
- sqlmesh-0.188.1.dev5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
393
- sqlmesh-0.188.1.dev5.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
394
- sqlmesh-0.188.1.dev5.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
395
- sqlmesh-0.188.1.dev5.dist-info/RECORD,,
391
+ sqlmesh-0.188.1.dev7.dist-info/METADATA,sha256=wVn3ufUjSd0LQ3CHHjN3Ek8MiRR9hvmDK9Ray6Pk9oc,26531
392
+ sqlmesh-0.188.1.dev7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
393
+ sqlmesh-0.188.1.dev7.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
394
+ sqlmesh-0.188.1.dev7.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
395
+ sqlmesh-0.188.1.dev7.dist-info/RECORD,,
@@ -1 +1 @@
1
- import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-hHSGLUzW.js";import{P as j}from"./Page-Bq-HPl_L.js";import{u as h}from"./project-6bhvIw3F.js";import{S as v}from"./SourceList-De_bjt2z.js";import{S as A}from"./SourceListItem-s3cjyYyg.js";import"./SplitPane-YXb1GDjg.js";import"./file-FSJHKTZR.js";import"./Input-CettPX-D.js";import"./floating-ui.react-dom-CwIPOwQR.js";import"./index-OgPYo7hm.js";function k(){const{pathname:a}=n(),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:u=!1})=>s.jsx(A,{to:e,name:o,text:l,description:m,disabled:u})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:d.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{k as default};
1
+ import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-DGopuBhO.js";import{P as j}from"./Page-Bf2QbngA.js";import{u as h}from"./project-CmqDHjoE.js";import{S as v}from"./SourceList-DdN6hYD1.js";import{S as A}from"./SourceListItem-BynoG2tu.js";import"./SplitPane-DrxVfnY9.js";import"./file-CFuQwF_m.js";import"./Input-LXiA3uoO.js";import"./floating-ui.react-dom-CN8_HaDW.js";import"./index-C_NFRX2g.js";function k(){const{pathname:a}=n(),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:u=!1})=>s.jsx(A,{to:e,name:o,text:l,description:m,disabled:u})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:d.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{k as default};
@@ -1 +1 @@
1
- import{j as s,c as i,l as a,m as n,H as p}from"./index-hHSGLUzW.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,l as a,m as n,H as p}from"./index-DGopuBhO.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-hHSGLUzW.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-DGopuBhO.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-hHSGLUzW.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-DGopuBhO.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 +1 @@
1
- import{d as a,Q as l,v as e,j as r,U as n,e as d}from"./index-hHSGLUzW.js";import{D as u}from"./ReportErrors-BvekyVWZ.js";import"./PlusCircleIcon-Bh1eQZZw.js";import"./popover-CiOVW6r6.js";import"./floating-ui.react-dom-CwIPOwQR.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-YXb1GDjg.js";function v(){const{errors:i}=a(),{id:o}=l(),s=e(o)?void 0:Array.from(i).find(t=>t.id===o);return r.jsx("div",{className:"flex overflow-auto w-full h-full",children:e(s)?r.jsx(n,{link:d.Errors,description:e(o)?void 0:`Error ${o} 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:s,scope:s.key,withSplitPane:!0})})})})}export{v as default};
1
+ import{d as a,Q as l,v as e,j as r,U as n,e as d}from"./index-DGopuBhO.js";import{D as u}from"./ReportErrors-DD5Tkzy2.js";import"./PlusCircleIcon-BIG5lKYN.js";import"./popover-DJJmvGdj.js";import"./floating-ui.react-dom-CN8_HaDW.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-DrxVfnY9.js";function v(){const{errors:i}=a(),{id:o}=l(),s=e(o)?void 0:Array.from(i).find(t=>t.id===o);return r.jsx("div",{className:"flex overflow-auto w-full h-full",children:e(s)?r.jsx(n,{link:d.Errors,description:e(o)?void 0:`Error ${o} 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:s,scope:s.key,withSplitPane:!0})})})})}export{v as default};
@@ -1,4 +1,4 @@
1
- import{r as v,R as J,a as _,j as e,m as O,s as Qe,b as C,B as oe,v as E,l as T,c as w,M as De,f as V,I as Xe,J as de,i as I,K as Q,g as H,T as Me,H as ue,P as ye,C as es,A as $,q as ss,L as as,d as ns,k as ts,o as ls,p as is,Q as rs,U as os,e as cs}from"./index-hHSGLUzW.js";import{u as W,S as ds,A as us,a as Ne,b as R,E as A,P as z,c as ms}from"./SelectEnvironment-DVTyPJgk.js";import{u as j,a as Y,E as M}from"./plan-Crz4bZML.js";import{B as S}from"./Banner-DgEFplVH.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-Bh1eQZZw.js";import{K as fs,L as $e,V as hs,y as xs,p as js,o as ce,$ as vs,W as gs,X as ys,_ as ws,Y as bs,a as Re,Z as Ns,z as se}from"./popover-CiOVW6r6.js";import{I as K}from"./Input-CettPX-D.js";import{H as ks,V as Ps,Q as Ts,w as Cs,u as Fs,a as As,l as Ss,T as Ds,N as Rs,U as Es,j as Bs,p as _s}from"./ListboxShow-BaJGpuWH.js";import{u as ze}from"./project-6bhvIw3F.js";import{F as we}from"./context-0jZBOaYJ.js";import"./ModelLineage-zSYJ8qL6.js";import"./editor-Dn-V5hys.js";import"./file-FSJHKTZR.js";import"./SearchList-BoZPD5Ug.js";import"./help-6Q7f7fjd.js";import"./floating-ui.react-dom-CwIPOwQR.js";import"./ChevronDownIcon-BH5O_hpi.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-De_bjt2z.js";import"./index-OgPYo7hm.js";function Os({title:s,titleId:a,...t},r){return v.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?v.createElement("title",{id:a},s):null,v.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 X=v.forwardRef(Os);let Te=v.createContext(null);Te.displayName="GroupContext";let Is=v.Fragment;function Ms(s){var a;let[t,r]=v.useState(null),[l,i]=Ts(),[c,u]=Cs(),o=v.useMemo(()=>({switch:t,setSwitch:r}),[t,r]),d={},m=s,n=$e();return J.createElement(u,{name:"Switch.Description",value:c},J.createElement(i,{name:"Switch.Label",value:l,props:{htmlFor:(a=o.switch)==null?void 0:a.id,onClick(h){t&&(hs(h.currentTarget)&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(Te.Provider,{value:o},n({ourProps:d,theirProps:m,slot:{},defaultTag:Is,name:"Switch.Group"}))))}let $s="button";function zs(s,a){var t;let r=v.useId(),l=Fs(),i=As(),{id:c=l||`headlessui-switch-${r}`,disabled:u=i||!1,checked:o,defaultChecked:d,onChange:m,name:n,value:h,form:p,autoFocus:f=!1,...x}=s,F=v.useContext(Te),[B,D]=v.useState(null),N=v.useRef(null),k=xs(N,a,F===null?null:F.setSwitch,D),g=Ss(d),[P,Z]=Ds(o,m,g??!1),je=js(),[le,b]=v.useState(!1),ie=ce(()=>{b(!0),Z==null||Z(!P),je.nextFrame(()=>{b(!1)})}),re=ce(U=>{if(Ns(U.currentTarget))return U.preventDefault();U.preventDefault(),ie()}),ve=ce(U=>{U.key===Re.Space?(U.preventDefault(),ie()):U.key===Re.Enter&&_s(U.currentTarget)}),Le=ce(U=>U.preventDefault()),Ve=Rs(),Ge=Es(),{isFocusVisible:Fe,focusProps:He}=vs({autoFocus:f}),{isHovered:Ae,hoverProps:Ke}=gs({isDisabled:u}),{pressed:Se,pressProps:Ze}=ys({disabled:u}),qe=v.useMemo(()=>({checked:P,disabled:u,hover:Ae,focus:Fe,active:Se,autofocus:f,changing:le}),[P,Ae,Fe,Se,u,le,f]),We=ws({id:c,ref:k,role:"switch",type:bs(s,B),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":Ve,"aria-describedby":Ge,disabled:u||void 0,autoFocus:f,onClick:re,onKeyUp:ve,onKeyPress:Le},He,Ke,Ze),Ye=v.useCallback(()=>{if(g!==void 0)return Z==null?void 0:Z(g)},[Z,g]),Je=$e();return J.createElement(J.Fragment,null,n!=null&&J.createElement(Bs,{disabled:u,data:{[n]:h||"on"},overrides:{type:"checkbox",checked:P},form:p,onReset:Ye}),Je({ourProps:We,theirProps:x,slot:qe,defaultTag:$s,name:"Switch"}))}let Us=fs(zs),Ls=Ms,Vs=Ps,Gs=ks,ge=Object.assign(Us,{Group:Ls,Label:Vs,Description:Gs});function Hs(){const s=_(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(S,{variant:O.Warning,children:e.jsx(L,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(S.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ke,{className:"w-5 text-warning-500"}):e.jsx(Pe,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx(L.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(S.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 Ks(s=0){return v.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function Zs({run:s,apply:a,cancel:t,reset:r}){const l=Qe(),{change_categorization:i}=W(),c=_(b=>b.modules),u=_(b=>b.environment),o=_(b=>b.environments),d=_(b=>b.addConfirmation),m=_(b=>b.setShowConfirmation),n=j(b=>b.planAction),h=j(b=>b.planOverview),p=j(b=>b.planApply),f=j(b=>b.planCancel),x=Ks();function F(b){b.stopPropagation(),r()}function B(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const ie=u.isProd&&C(u.isInitial),re=Array.from(i.values()).some(ve=>E(ve.category));ie?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:re?["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:`${o.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[o.size>1&&e.jsx(ds,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{m(!1)},size:T.md}),e.jsx(us,{className:"w-full",size:T.md,onAdd:()=>{m(!1)}})]})]})}):re?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 g=h.isFailed||p.isFailed||f.isSuccessful,P=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(g),Z=n.isApplying||f.isCancelling||p.isRunning&&h.isFinished,je=g||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),le=c.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(se,{appear:!0,show:P,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",as:"div",children:P&&e.jsx(oe,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:x,variant:f.isSuccessful?O.Danger:O.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[M.RunningTask,M.Running,M.Run,M.Applying,M.ApplyBackfill,M.ApplyVirtual,M.ApplyChangesAndBackfill,M.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[Z&&e.jsx(oe,{onClick:B,variant:O.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[M.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),je&&e.jsx(oe,{onClick:F,variant:O.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),le&&e.jsx(oe,{onClick:D,variant:O.Info,children:"Go Back"})]})]})})}function qs({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:c}){return e.jsxs(ge.Group,{as:"div",className:"m-1",children:[e.jsxs(ge,{checked:i?!1:a,onChange:t,className:w("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",c,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:w("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(ge.Label,{className:w("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function q({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:w("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(qs,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ws({disabled:s=!1,className:a}){const t=Ne(),{start:r,end:l,isInitialPlanRun:i}=W();return e.jsxs("div",{className:w("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(K,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2023-12-13",value:r,onInput:o=>{o.stopPropagation(),t({type:R.DateStart,start:o.target.value})}})}),e.jsx(K,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2022-12-13",value:l,onInput:o=>{o.stopPropagation(),t({type:R.DateEnd,end:o.target.value})}})})]})}function Ys(){const s=Ne(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:c,restate_models:u,isInitialPlanRun:o,create_from:d,include_unmodified:m}=W(),n=v.useRef(null),h=j(N=>N.planAction),p=j(N=>N.planOverview),f=j(N=>N.planApply),x=_(N=>N.environment),F=_(N=>N.environments),B=De.getOnlyRemote(Array.from(F));v.useEffect(()=>{s({type:R.PlanOptions,...p.plan_options,skip_tests:!1})},[]);const D=h.isProcessing||h.isDone||f.isFinished||p.isLatest&&C(h.isRun)||p.isVirtualUpdate;return v.useEffect(()=>{var N;E(n.current)||h.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,h]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:w(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ws,{className:w(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(S,{children:e.jsx(L,{defaultOpen:h.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{ref:n,className:w("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(S.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(ke,{className:"h-5 w-5 text-neutral-400"}):e.jsx(Pe,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs(L.Panel,{unmount:!1,className:w("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:w(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(x.isProd)&&e.jsx(K,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:B.length<2,children:({className:k,disabled:g})=>e.jsx(K.Selector,{className:w(k,"w-full"),list:De.getOnlyRemote(Array.from(F)).filter(P=>P!==x).map(P=>({value:P.name,text:P.name})),onChange:P=>{s({type:R.PlanOptions,create_from:P})},value:d,disabled:g})}),e.jsx(K,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models
1
+ import{r as v,R as J,a as _,j as e,m as O,s as Qe,b as C,B as oe,v as E,l as T,c as w,M as De,f as V,I as Xe,J as de,i as I,K as Q,g as H,T as Me,H as ue,P as ye,C as es,A as $,q as ss,L as as,d as ns,k as ts,o as ls,p as is,Q as rs,U as os,e as cs}from"./index-DGopuBhO.js";import{u as W,S as ds,A as us,a as Ne,b as R,E as A,P as z,c as ms}from"./SelectEnvironment-CP_GD64v.js";import{u as j,a as Y,E as M}from"./plan-CN6Tq0vs.js";import{B as S}from"./Banner-DQJLxQK4.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-BIG5lKYN.js";import{K as fs,L as $e,V as hs,y as xs,p as js,o as ce,$ as vs,W as gs,X as ys,_ as ws,Y as bs,a as Re,Z as Ns,z as se}from"./popover-DJJmvGdj.js";import{I as K}from"./Input-LXiA3uoO.js";import{H as ks,V as Ps,Q as Ts,w as Cs,u as Fs,a as As,l as Ss,T as Ds,N as Rs,U as Es,j as Bs,p as _s}from"./ListboxShow-BUIulc8M.js";import{u as ze}from"./project-CmqDHjoE.js";import{F as we}from"./context-Bxzp3TEa.js";import"./ModelLineage-BbFqz62a.js";import"./editor-CJ4oQlo_.js";import"./file-CFuQwF_m.js";import"./SearchList-DgKaZfJZ.js";import"./help-6Q7f7fjd.js";import"./floating-ui.react-dom-CN8_HaDW.js";import"./ChevronDownIcon-CglA7k4-.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-DdN6hYD1.js";import"./index-C_NFRX2g.js";function Os({title:s,titleId:a,...t},r){return v.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?v.createElement("title",{id:a},s):null,v.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 X=v.forwardRef(Os);let Te=v.createContext(null);Te.displayName="GroupContext";let Is=v.Fragment;function Ms(s){var a;let[t,r]=v.useState(null),[l,i]=Ts(),[c,u]=Cs(),o=v.useMemo(()=>({switch:t,setSwitch:r}),[t,r]),d={},m=s,n=$e();return J.createElement(u,{name:"Switch.Description",value:c},J.createElement(i,{name:"Switch.Label",value:l,props:{htmlFor:(a=o.switch)==null?void 0:a.id,onClick(h){t&&(hs(h.currentTarget)&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(Te.Provider,{value:o},n({ourProps:d,theirProps:m,slot:{},defaultTag:Is,name:"Switch.Group"}))))}let $s="button";function zs(s,a){var t;let r=v.useId(),l=Fs(),i=As(),{id:c=l||`headlessui-switch-${r}`,disabled:u=i||!1,checked:o,defaultChecked:d,onChange:m,name:n,value:h,form:p,autoFocus:f=!1,...x}=s,F=v.useContext(Te),[B,D]=v.useState(null),N=v.useRef(null),k=xs(N,a,F===null?null:F.setSwitch,D),g=Ss(d),[P,Z]=Ds(o,m,g??!1),je=js(),[le,b]=v.useState(!1),ie=ce(()=>{b(!0),Z==null||Z(!P),je.nextFrame(()=>{b(!1)})}),re=ce(U=>{if(Ns(U.currentTarget))return U.preventDefault();U.preventDefault(),ie()}),ve=ce(U=>{U.key===Re.Space?(U.preventDefault(),ie()):U.key===Re.Enter&&_s(U.currentTarget)}),Le=ce(U=>U.preventDefault()),Ve=Rs(),Ge=Es(),{isFocusVisible:Fe,focusProps:He}=vs({autoFocus:f}),{isHovered:Ae,hoverProps:Ke}=gs({isDisabled:u}),{pressed:Se,pressProps:Ze}=ys({disabled:u}),qe=v.useMemo(()=>({checked:P,disabled:u,hover:Ae,focus:Fe,active:Se,autofocus:f,changing:le}),[P,Ae,Fe,Se,u,le,f]),We=ws({id:c,ref:k,role:"switch",type:bs(s,B),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":Ve,"aria-describedby":Ge,disabled:u||void 0,autoFocus:f,onClick:re,onKeyUp:ve,onKeyPress:Le},He,Ke,Ze),Ye=v.useCallback(()=>{if(g!==void 0)return Z==null?void 0:Z(g)},[Z,g]),Je=$e();return J.createElement(J.Fragment,null,n!=null&&J.createElement(Bs,{disabled:u,data:{[n]:h||"on"},overrides:{type:"checkbox",checked:P},form:p,onReset:Ye}),Je({ourProps:We,theirProps:x,slot:qe,defaultTag:$s,name:"Switch"}))}let Us=fs(zs),Ls=Ms,Vs=Ps,Gs=ks,ge=Object.assign(Us,{Group:Ls,Label:Vs,Description:Gs});function Hs(){const s=_(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(S,{variant:O.Warning,children:e.jsx(L,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(S.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ke,{className:"w-5 text-warning-500"}):e.jsx(Pe,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx(L.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(S.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 Ks(s=0){return v.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function Zs({run:s,apply:a,cancel:t,reset:r}){const l=Qe(),{change_categorization:i}=W(),c=_(b=>b.modules),u=_(b=>b.environment),o=_(b=>b.environments),d=_(b=>b.addConfirmation),m=_(b=>b.setShowConfirmation),n=j(b=>b.planAction),h=j(b=>b.planOverview),p=j(b=>b.planApply),f=j(b=>b.planCancel),x=Ks();function F(b){b.stopPropagation(),r()}function B(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const ie=u.isProd&&C(u.isInitial),re=Array.from(i.values()).some(ve=>E(ve.category));ie?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:re?["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:`${o.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[o.size>1&&e.jsx(ds,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{m(!1)},size:T.md}),e.jsx(us,{className:"w-full",size:T.md,onAdd:()=>{m(!1)}})]})]})}):re?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 g=h.isFailed||p.isFailed||f.isSuccessful,P=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(g),Z=n.isApplying||f.isCancelling||p.isRunning&&h.isFinished,je=g||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),le=c.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(se,{appear:!0,show:P,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",as:"div",children:P&&e.jsx(oe,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:x,variant:f.isSuccessful?O.Danger:O.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[M.RunningTask,M.Running,M.Run,M.Applying,M.ApplyBackfill,M.ApplyVirtual,M.ApplyChangesAndBackfill,M.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[Z&&e.jsx(oe,{onClick:B,variant:O.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[M.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),je&&e.jsx(oe,{onClick:F,variant:O.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),le&&e.jsx(oe,{onClick:D,variant:O.Info,children:"Go Back"})]})]})})}function qs({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:c}){return e.jsxs(ge.Group,{as:"div",className:"m-1",children:[e.jsxs(ge,{checked:i?!1:a,onChange:t,className:w("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",c,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:w("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(ge.Label,{className:w("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function q({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:w("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(qs,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ws({disabled:s=!1,className:a}){const t=Ne(),{start:r,end:l,isInitialPlanRun:i}=W();return e.jsxs("div",{className:w("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(K,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2023-12-13",value:r,onInput:o=>{o.stopPropagation(),t({type:R.DateStart,start:o.target.value})}})}),e.jsx(K,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2022-12-13",value:l,onInput:o=>{o.stopPropagation(),t({type:R.DateEnd,end:o.target.value})}})})]})}function Ys(){const s=Ne(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:c,restate_models:u,isInitialPlanRun:o,create_from:d,include_unmodified:m}=W(),n=v.useRef(null),h=j(N=>N.planAction),p=j(N=>N.planOverview),f=j(N=>N.planApply),x=_(N=>N.environment),F=_(N=>N.environments),B=De.getOnlyRemote(Array.from(F));v.useEffect(()=>{s({type:R.PlanOptions,...p.plan_options,skip_tests:!1})},[]);const D=h.isProcessing||h.isDone||f.isFinished||p.isLatest&&C(h.isRun)||p.isVirtualUpdate;return v.useEffect(()=>{var N;E(n.current)||h.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,h]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:w(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ws,{className:w(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(S,{children:e.jsx(L,{defaultOpen:h.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{ref:n,className:w("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(S.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(ke,{className:"h-5 w-5 text-neutral-400"}):e.jsx(Pe,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs(L.Panel,{unmount:!1,className:w("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:w(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(x.isProd)&&e.jsx(K,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:B.length<2,children:({className:k,disabled:g})=>e.jsx(K.Selector,{className:w(k,"w-full"),list:De.getOnlyRemote(Array.from(F)).filter(P=>P!==x).map(P=>({value:P.name,text:P.name})),onChange:P=>{s({type:R.PlanOptions,create_from:P})},value:d,disabled:g})}),e.jsx(K,{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{Q as x,a as m,v as h,P as a,a4 as c,a5 as D,a6 as P,r as T,j as u}from"./index-hHSGLUzW.js";import{g as b,T as g}from"./help-Eh_Sg5R6.js";import{u as r}from"./editor-Dn-V5hys.js";import"./index-OgPYo7hm.js";import"./floating-ui.react-dom-CwIPOwQR.js";import"./Input-CettPX-D.js";import"./file-FSJHKTZR.js";const d=24*60*60*1e3;function S(){const{modelName:o}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),v=r(e=>e.previewTable),i=r(e=>e.setPreviewQuery),n=r(e=>e.setPreviewTable),t=h(o)||o===(s==null?void 0:s.name)?s:p.get(encodeURI(o)),l={model:t.displayName,start:a(c(Date.now()-d)),end:a(new Date),execution_time:a(c(Date.now()-d)),limit:1e3},{refetch:f}=D(l),{refetch:w}=P(l);return T.useEffect(()=>{i(void 0),n(void 0),f().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(b(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(g,{headline:t==null?void 0:t.displayName,data:v??[[],[]]})})}export{S as default};
1
+ import{Q as x,a as m,v as h,P as a,a4 as c,a5 as D,a6 as P,r as T,j as u}from"./index-DGopuBhO.js";import{g as b,T as g}from"./help-BGO8vW5o.js";import{u as r}from"./editor-CJ4oQlo_.js";import"./index-C_NFRX2g.js";import"./floating-ui.react-dom-CN8_HaDW.js";import"./Input-LXiA3uoO.js";import"./file-CFuQwF_m.js";const d=24*60*60*1e3;function S(){const{modelName:o}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),v=r(e=>e.previewTable),i=r(e=>e.setPreviewQuery),n=r(e=>e.setPreviewTable),t=h(o)||o===(s==null?void 0:s.name)?s:p.get(encodeURI(o)),l={model:t.displayName,start:a(c(Date.now()-d)),end:a(new Date),execution_time:a(c(Date.now()-d)),limit:1e3},{refetch:f}=D(l),{refetch:w}=P(l);return T.useEffect(()=>{i(void 0),n(void 0),f().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(b(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(g,{headline:t==null?void 0:t.displayName,data:v??[[],[]]})})}export{S as default};