sqlmesh 0.187.6.dev5__py3-none-any.whl → 0.187.6.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.
- sqlmesh/_version.py +2 -2
- sqlmesh/lsp/main.py +178 -33
- sqlmesh/lsp/reference.py +6 -3
- {sqlmesh-0.187.6.dev5.dist-info → sqlmesh-0.187.6.dev7.dist-info}/METADATA +1 -1
- {sqlmesh-0.187.6.dev5.dist-info → sqlmesh-0.187.6.dev7.dist-info}/RECORD +52 -52
- web/client/dist/assets/{Audits-BPlxzqeG.js → Audits-C6gUfP0Y.js} +1 -1
- web/client/dist/assets/{Banner-BnIDM-p-.js → Banner-_C9c6nFf.js} +1 -1
- web/client/dist/assets/{ChevronDownIcon-v5uzV5KS.js → ChevronDownIcon-RfKS8PKd.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-lNBkq9fQ.js → ChevronRightIcon-CTOwDuap.js} +1 -1
- web/client/dist/assets/{Content-wP7OzMQ9.js → Content-Dxw_m-3F.js} +1 -1
- web/client/dist/assets/{Content-Dvky48vX.js → Content-Uj95lQQ-.js} +1 -1
- web/client/dist/assets/{Data-D2tj5W3z.js → Data-CH4v_k47.js} +1 -1
- web/client/dist/assets/{DataCatalog-H5ANpnSz.js → DataCatalog-CZgWBSbO.js} +1 -1
- web/client/dist/assets/{Editor-Dq1m6nff.js → Editor-CPGKdIv3.js} +1 -1
- web/client/dist/assets/{Editor-BpeAbLta.js → Editor-DDzPd4K5.js} +1 -1
- web/client/dist/assets/{Errors-BDlLsOz8.js → Errors-Bd_lCqWq.js} +1 -1
- web/client/dist/assets/{FileExplorer-BLOsvw4r.js → FileExplorer-FTqyN550.js} +1 -1
- web/client/dist/assets/{Footer-B4UOL2Zx.js → Footer-By8eV-Xw.js} +1 -1
- web/client/dist/assets/{Header-KC58-CQw.js → Header-CWgMNmyS.js} +1 -1
- web/client/dist/assets/{Input-DQ3H5Jf5.js → Input-tTLAeFk_.js} +1 -1
- web/client/dist/assets/Lineage-B24dFVy0.js +1 -0
- web/client/dist/assets/{ListboxShow-Bp0ARqZ0.js → ListboxShow-BnVk8Pao.js} +1 -1
- web/client/dist/assets/{ModelLineage-Du6fUL20.js → ModelLineage-CfoiOAVb.js} +1 -1
- web/client/dist/assets/{Models-BqQSh5xi.js → Models-C0WhiYIC.js} +1 -1
- web/client/dist/assets/{Page-C9v-mVEC.js → Page-LHbK1yD_.js} +1 -1
- web/client/dist/assets/{Plan-zagXv_gS.js → Plan-MwkSS6xa.js} +1 -1
- web/client/dist/assets/{PlusCircleIcon-DgugPkXr.js → PlusCircleIcon-CPdy9bpf.js} +1 -1
- web/client/dist/assets/{ReportErrors-ClY5ezEU.js → ReportErrors-9LAVRQKL.js} +1 -1
- web/client/dist/assets/{Root-BnlPjbrk.js → Root-CpkGXO_A.js} +1 -1
- web/client/dist/assets/{SearchList-B1ophTod.js → SearchList-DCuxxaPn.js} +1 -1
- web/client/dist/assets/{SelectEnvironment-CheqF0wg.js → SelectEnvironment-CltENlzE.js} +1 -1
- web/client/dist/assets/{SourceList-C_z4JbJU.js → SourceList-u_0soueL.js} +1 -1
- web/client/dist/assets/{SourceListItem-Be4vNQZL.js → SourceListItem-CHxTMFnQ.js} +1 -1
- web/client/dist/assets/{SplitPane-C8CPNQrK.js → SplitPane-DO1JEVxf.js} +1 -1
- web/client/dist/assets/{Tests-DuGqAE7Q.js → Tests-D_-8MKq9.js} +1 -1
- web/client/dist/assets/{Welcome-BovgrYsq.js → Welcome-DTulZMrl.js} +1 -1
- web/client/dist/assets/{context-BJbxiwu1.js → context-B7_ioojx.js} +1 -1
- web/client/dist/assets/{context-C7kvMRgQ.js → context-ByRTRbGV.js} +30 -30
- web/client/dist/assets/{editor-C3xrJUHo.js → editor-IxXTso9p.js} +1 -1
- web/client/dist/assets/{file-Cn8UMGdB.js → file-CtGXXxxH.js} +1 -1
- web/client/dist/assets/{floating-ui.react-dom-njuatPE_.js → floating-ui.react-dom-BqmCcnHz.js} +1 -1
- web/client/dist/assets/{help-B9pKFCi-.js → help-DZgsqPrY.js} +1 -1
- web/client/dist/assets/{index-D0B238GC.js → index-BOoFTMqX.js} +8 -8
- web/client/dist/assets/{index-0HTVGXbP.js → index-D-NV5rsk.js} +1 -1
- web/client/dist/assets/{plan-BT_YMvAu.js → plan-BITq8bOv.js} +1 -1
- web/client/dist/assets/{popover-zR5tE2ci.js → popover-CThXyzI8.js} +1 -1
- web/client/dist/assets/{project-8LRoNrpG.js → project-D9WffyNb.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Lineage-COIwTlx7.js +0 -1
- {sqlmesh-0.187.6.dev5.dist-info → sqlmesh-0.187.6.dev7.dist-info}/WHEEL +0 -0
- {sqlmesh-0.187.6.dev5.dist-info → sqlmesh-0.187.6.dev7.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.187.6.dev5.dist-info → sqlmesh-0.187.6.dev7.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.187.6.dev5.dist-info → sqlmesh-0.187.6.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.187.6.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 187, 6, '
|
|
20
|
+
__version__ = version = '0.187.6.dev7'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 187, 6, 'dev7')
|
sqlmesh/lsp/main.py
CHANGED
|
@@ -57,8 +57,12 @@ class SQLMeshLanguageServer:
|
|
|
57
57
|
self.server = LanguageServer(server_name, version)
|
|
58
58
|
self.context_class = context_class
|
|
59
59
|
self.lsp_context: t.Optional[LSPContext] = None
|
|
60
|
-
self.lint_cache: t.Dict[URI, t.List[AnnotatedRuleViolation]] = {}
|
|
61
60
|
|
|
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
|
+
self.client_supports_pull_diagnostics = False
|
|
62
66
|
# Register LSP features (e.g., formatting, hover, etc.)
|
|
63
67
|
self._register_features()
|
|
64
68
|
|
|
@@ -69,6 +73,18 @@ class SQLMeshLanguageServer:
|
|
|
69
73
|
def initialize(ls: LanguageServer, params: types.InitializeParams) -> None:
|
|
70
74
|
"""Initialize the server when the client connects."""
|
|
71
75
|
try:
|
|
76
|
+
# Check if client supports pull diagnostics
|
|
77
|
+
if params.capabilities and params.capabilities.text_document:
|
|
78
|
+
diagnostics = getattr(params.capabilities.text_document, "diagnostic", None)
|
|
79
|
+
if diagnostics:
|
|
80
|
+
self.client_supports_pull_diagnostics = True
|
|
81
|
+
ls.log_trace("Client supports pull diagnostics")
|
|
82
|
+
else:
|
|
83
|
+
self.client_supports_pull_diagnostics = False
|
|
84
|
+
ls.log_trace("Client does not support pull diagnostics")
|
|
85
|
+
else:
|
|
86
|
+
self.client_supports_pull_diagnostics = False
|
|
87
|
+
|
|
72
88
|
if params.workspace_folders:
|
|
73
89
|
# Try to find a SQLMesh config file in any workspace folder (only at the root level)
|
|
74
90
|
for folder in params.workspace_folders:
|
|
@@ -153,61 +169,71 @@ class SQLMeshLanguageServer:
|
|
|
153
169
|
def did_open(ls: LanguageServer, params: types.DidOpenTextDocumentParams) -> None:
|
|
154
170
|
uri = URI(params.text_document.uri)
|
|
155
171
|
context = self._context_get_or_load(uri)
|
|
156
|
-
|
|
172
|
+
models = context.map[uri.to_path()]
|
|
173
|
+
if models is None or not isinstance(models, ModelTarget):
|
|
174
|
+
return
|
|
175
|
+
|
|
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)
|
|
183
|
+
|
|
184
|
+
# Only publish diagnostics if client doesn't support pull diagnostics
|
|
185
|
+
if not self.client_supports_pull_diagnostics:
|
|
186
|
+
diagnostics, _ = self.lint_cache[uri]
|
|
157
187
|
ls.publish_diagnostics(
|
|
158
188
|
params.text_document.uri,
|
|
159
|
-
SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(
|
|
189
|
+
SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(diagnostics),
|
|
160
190
|
)
|
|
161
|
-
return
|
|
162
|
-
models = context.map[uri.to_path()]
|
|
163
|
-
if models is None:
|
|
164
|
-
return
|
|
165
|
-
if not isinstance(models, ModelTarget):
|
|
166
|
-
return
|
|
167
|
-
self.lint_cache[uri] = context.context.lint_models(
|
|
168
|
-
models.names,
|
|
169
|
-
raise_on_error=False,
|
|
170
|
-
)
|
|
171
|
-
ls.publish_diagnostics(
|
|
172
|
-
params.text_document.uri,
|
|
173
|
-
SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(self.lint_cache[uri]),
|
|
174
|
-
)
|
|
175
191
|
|
|
176
192
|
@self.server.feature(types.TEXT_DOCUMENT_DID_CHANGE)
|
|
177
193
|
def did_change(ls: LanguageServer, params: types.DidChangeTextDocumentParams) -> None:
|
|
178
194
|
uri = URI(params.text_document.uri)
|
|
179
195
|
context = self._context_get_or_load(uri)
|
|
180
196
|
models = context.map[uri.to_path()]
|
|
181
|
-
if models is None:
|
|
197
|
+
if models is None or not isinstance(models, ModelTarget):
|
|
182
198
|
return
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
199
|
+
|
|
200
|
+
# Always update the cache
|
|
201
|
+
diagnostics = context.context.lint_models(
|
|
186
202
|
models.names,
|
|
187
203
|
raise_on_error=False,
|
|
188
204
|
)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
205
|
+
self._diagnostic_version_counter += 1
|
|
206
|
+
self.lint_cache[uri] = (diagnostics, self._diagnostic_version_counter)
|
|
207
|
+
|
|
208
|
+
# Only publish diagnostics if client doesn't support pull diagnostics
|
|
209
|
+
if not self.client_supports_pull_diagnostics:
|
|
210
|
+
ls.publish_diagnostics(
|
|
211
|
+
params.text_document.uri,
|
|
212
|
+
SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(diagnostics),
|
|
213
|
+
)
|
|
193
214
|
|
|
194
215
|
@self.server.feature(types.TEXT_DOCUMENT_DID_SAVE)
|
|
195
216
|
def did_save(ls: LanguageServer, params: types.DidSaveTextDocumentParams) -> None:
|
|
196
217
|
uri = URI(params.text_document.uri)
|
|
197
218
|
context = self._context_get_or_load(uri)
|
|
198
219
|
models = context.map[uri.to_path()]
|
|
199
|
-
if models is None:
|
|
200
|
-
return
|
|
201
|
-
if not isinstance(models, ModelTarget):
|
|
220
|
+
if models is None or not isinstance(models, ModelTarget):
|
|
202
221
|
return
|
|
203
|
-
|
|
222
|
+
|
|
223
|
+
# Always update the cache
|
|
224
|
+
diagnostics = context.context.lint_models(
|
|
204
225
|
models.names,
|
|
205
226
|
raise_on_error=False,
|
|
206
227
|
)
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
228
|
+
self._diagnostic_version_counter += 1
|
|
229
|
+
self.lint_cache[uri] = (diagnostics, self._diagnostic_version_counter)
|
|
230
|
+
|
|
231
|
+
# Only publish diagnostics if client doesn't support pull diagnostics
|
|
232
|
+
if not self.client_supports_pull_diagnostics:
|
|
233
|
+
ls.publish_diagnostics(
|
|
234
|
+
params.text_document.uri,
|
|
235
|
+
SQLMeshLanguageServer._diagnostics_to_lsp_diagnostics(diagnostics),
|
|
236
|
+
)
|
|
211
237
|
|
|
212
238
|
@self.server.feature(types.TEXT_DOCUMENT_FORMATTING)
|
|
213
239
|
def formatting(
|
|
@@ -327,6 +353,125 @@ class SQLMeshLanguageServer:
|
|
|
327
353
|
ls.show_message(f"Error getting references: {e}", types.MessageType.Error)
|
|
328
354
|
return []
|
|
329
355
|
|
|
356
|
+
@self.server.feature(types.TEXT_DOCUMENT_DIAGNOSTIC)
|
|
357
|
+
def diagnostic(
|
|
358
|
+
ls: LanguageServer, params: types.DocumentDiagnosticParams
|
|
359
|
+
) -> types.DocumentDiagnosticReport:
|
|
360
|
+
"""Handle diagnostic pull requests from the client."""
|
|
361
|
+
try:
|
|
362
|
+
uri = URI(params.text_document.uri)
|
|
363
|
+
diagnostics, result_id = self._get_diagnostics_for_uri(uri)
|
|
364
|
+
|
|
365
|
+
# Check if client provided a previous result ID
|
|
366
|
+
if hasattr(params, "previous_result_id") and params.previous_result_id == result_id:
|
|
367
|
+
# Return unchanged report if diagnostics haven't changed
|
|
368
|
+
return types.RelatedUnchangedDocumentDiagnosticReport(
|
|
369
|
+
kind=types.DocumentDiagnosticReportKind.Unchanged,
|
|
370
|
+
result_id=str(result_id),
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
return types.RelatedFullDocumentDiagnosticReport(
|
|
374
|
+
kind=types.DocumentDiagnosticReportKind.Full,
|
|
375
|
+
items=diagnostics,
|
|
376
|
+
result_id=str(result_id),
|
|
377
|
+
)
|
|
378
|
+
except Exception as e:
|
|
379
|
+
ls.show_message(f"Error getting diagnostics: {e}", types.MessageType.Error)
|
|
380
|
+
return types.RelatedFullDocumentDiagnosticReport(
|
|
381
|
+
kind=types.DocumentDiagnosticReportKind.Full,
|
|
382
|
+
items=[],
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
@self.server.feature(types.WORKSPACE_DIAGNOSTIC)
|
|
386
|
+
def workspace_diagnostic(
|
|
387
|
+
ls: LanguageServer, params: types.WorkspaceDiagnosticParams
|
|
388
|
+
) -> types.WorkspaceDiagnosticReport:
|
|
389
|
+
"""Handle workspace-wide diagnostic pull requests from the client."""
|
|
390
|
+
try:
|
|
391
|
+
if self.lsp_context is None:
|
|
392
|
+
current_path = Path.cwd()
|
|
393
|
+
self._ensure_context_in_folder(current_path)
|
|
394
|
+
|
|
395
|
+
if self.lsp_context is None:
|
|
396
|
+
return types.WorkspaceDiagnosticReport(items=[])
|
|
397
|
+
|
|
398
|
+
items: t.List[
|
|
399
|
+
t.Union[
|
|
400
|
+
types.WorkspaceFullDocumentDiagnosticReport,
|
|
401
|
+
types.WorkspaceUnchangedDocumentDiagnosticReport,
|
|
402
|
+
]
|
|
403
|
+
] = []
|
|
404
|
+
|
|
405
|
+
# Get all SQL and Python model files from the context
|
|
406
|
+
for path, target in self.lsp_context.map.items():
|
|
407
|
+
if isinstance(target, ModelTarget):
|
|
408
|
+
uri = URI.from_path(path)
|
|
409
|
+
diagnostics, result_id = self._get_diagnostics_for_uri(uri)
|
|
410
|
+
|
|
411
|
+
# Check if we have a previous result ID for this file
|
|
412
|
+
previous_result_id = None
|
|
413
|
+
if hasattr(params, "previous_result_ids") and params.previous_result_ids:
|
|
414
|
+
for prev in params.previous_result_ids:
|
|
415
|
+
if prev.uri == uri.value:
|
|
416
|
+
previous_result_id = prev.value
|
|
417
|
+
break
|
|
418
|
+
|
|
419
|
+
if previous_result_id and previous_result_id == result_id:
|
|
420
|
+
# File hasn't changed
|
|
421
|
+
items.append(
|
|
422
|
+
types.WorkspaceUnchangedDocumentDiagnosticReport(
|
|
423
|
+
kind=types.DocumentDiagnosticReportKind.Unchanged,
|
|
424
|
+
result_id=str(result_id),
|
|
425
|
+
uri=uri.value,
|
|
426
|
+
)
|
|
427
|
+
)
|
|
428
|
+
else:
|
|
429
|
+
# File has changed or is new
|
|
430
|
+
items.append(
|
|
431
|
+
types.WorkspaceFullDocumentDiagnosticReport(
|
|
432
|
+
kind=types.DocumentDiagnosticReportKind.Full,
|
|
433
|
+
result_id=str(result_id),
|
|
434
|
+
uri=uri.value,
|
|
435
|
+
items=diagnostics,
|
|
436
|
+
)
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
return types.WorkspaceDiagnosticReport(items=items)
|
|
440
|
+
|
|
441
|
+
except Exception as e:
|
|
442
|
+
ls.show_message(
|
|
443
|
+
f"Error getting workspace diagnostics: {e}", types.MessageType.Error
|
|
444
|
+
)
|
|
445
|
+
return types.WorkspaceDiagnosticReport(items=[])
|
|
446
|
+
|
|
447
|
+
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
|
|
453
|
+
|
|
454
|
+
# Try to get diagnostics by loading context and linting
|
|
455
|
+
try:
|
|
456
|
+
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
|
|
471
|
+
except Exception:
|
|
472
|
+
# If we can't get diagnostics, return empty list with no result ID
|
|
473
|
+
return [], 0
|
|
474
|
+
|
|
330
475
|
def _context_get_or_load(self, document_uri: URI) -> LSPContext:
|
|
331
476
|
if self.lsp_context is None:
|
|
332
477
|
self._ensure_context_for_document(document_uri)
|
sqlmesh/lsp/reference.py
CHANGED
|
@@ -134,9 +134,12 @@ def get_model_definitions_for_a_path(
|
|
|
134
134
|
with open(file_path, "r", encoding="utf-8") as file:
|
|
135
135
|
read_file = file.readlines()
|
|
136
136
|
|
|
137
|
-
# Build scope tree to properly handle nested CTEs
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
# Build a scope tree to properly handle nested CTEs
|
|
138
|
+
try:
|
|
139
|
+
query = normalize_identifiers(query.copy(), dialect=dialect)
|
|
140
|
+
root_scope = build_scope(query)
|
|
141
|
+
except Exception:
|
|
142
|
+
root_scope = None
|
|
140
143
|
|
|
141
144
|
if root_scope:
|
|
142
145
|
# Traverse all scopes to find CTE definitions and table references
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=69xw6bTmi4cW90M-sl3g6wLDgxVcLHcKg1q8GS3lqyA,7466
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=f5wMd1D-q0Tfmeyk6jhWew59Zap6CmONqdGQFj7Q2wY,528
|
|
3
3
|
sqlmesh/magics.py,sha256=JHorAZNtezf123jmTyNSoUC9yHmv-08hMP205PJmmIo,39750
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -160,8 +160,8 @@ sqlmesh/lsp/completions.py,sha256=Uo8lUzPBeoB58Eu2642YoAtNI0pgIFWFSvwmuJALTv4,35
|
|
|
160
160
|
sqlmesh/lsp/context.py,sha256=nCWg2uVH28-IJC2uDYuCbiXTh1lUFElSpNu4Q-fDWi4,2918
|
|
161
161
|
sqlmesh/lsp/custom.py,sha256=1YVcQz0y-4cdsvTdOQvlhUQXwOqPBWi3v_u1X2EqQxE,901
|
|
162
162
|
sqlmesh/lsp/description.py,sha256=4QIGC9ix8IzmWF6DVUNhY4m1Crk3sNQA6hZ1RbyqU78,827
|
|
163
|
-
sqlmesh/lsp/main.py,sha256=
|
|
164
|
-
sqlmesh/lsp/reference.py,sha256=
|
|
163
|
+
sqlmesh/lsp/main.py,sha256=Lg_XHxXNScStf0aiOUptijZnBLOIjcmmhsFgM5w2rNo,27405
|
|
164
|
+
sqlmesh/lsp/reference.py,sha256=c9iof2QN13T5b-XFNuI8ABlOCDkhfBGTR6yNK8i9LyA,10569
|
|
165
165
|
sqlmesh/lsp/uri.py,sha256=mvSLbZGmMTHPpliThOtVWiFcHnfJzp1w39q9l-xD2SI,802
|
|
166
166
|
sqlmesh/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
167
|
sqlmesh/migrations/v0001_init.py,sha256=h8FwMYJj9_O8yGpk12guaSaGwX5A3we2GiKeHrXi15o,2048
|
|
@@ -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.187.6.
|
|
273
|
+
sqlmesh-0.187.6.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=
|
|
276
|
-
web/client/dist/assets/Audits-
|
|
277
|
-
web/client/dist/assets/Banner-
|
|
278
|
-
web/client/dist/assets/ChevronDownIcon-
|
|
279
|
-
web/client/dist/assets/ChevronRightIcon-
|
|
280
|
-
web/client/dist/assets/Content-
|
|
281
|
-
web/client/dist/assets/Content-
|
|
282
|
-
web/client/dist/assets/Data-
|
|
283
|
-
web/client/dist/assets/DataCatalog-
|
|
284
|
-
web/client/dist/assets/Editor-
|
|
285
|
-
web/client/dist/assets/Editor-
|
|
286
|
-
web/client/dist/assets/Errors-
|
|
287
|
-
web/client/dist/assets/FileExplorer-
|
|
288
|
-
web/client/dist/assets/Footer-
|
|
289
|
-
web/client/dist/assets/Header-
|
|
290
|
-
web/client/dist/assets/Input-
|
|
291
|
-
web/client/dist/assets/Lineage-
|
|
292
|
-
web/client/dist/assets/ListboxShow-
|
|
293
|
-
web/client/dist/assets/ModelLineage-
|
|
294
|
-
web/client/dist/assets/Models-
|
|
295
|
-
web/client/dist/assets/Page-
|
|
296
|
-
web/client/dist/assets/Plan-
|
|
297
|
-
web/client/dist/assets/PlusCircleIcon-
|
|
298
|
-
web/client/dist/assets/ReportErrors-
|
|
299
|
-
web/client/dist/assets/Root-
|
|
300
|
-
web/client/dist/assets/SearchList-
|
|
301
|
-
web/client/dist/assets/SelectEnvironment-
|
|
302
|
-
web/client/dist/assets/SourceList-
|
|
303
|
-
web/client/dist/assets/SourceListItem-
|
|
304
|
-
web/client/dist/assets/SplitPane-
|
|
305
|
-
web/client/dist/assets/Tests-
|
|
306
|
-
web/client/dist/assets/Welcome-
|
|
275
|
+
web/client/dist/index.html,sha256=8vySM6CmjEU7pX2XGNeYyHR4PwjYGMsYT_RJn3p8Qt8,5472
|
|
276
|
+
web/client/dist/assets/Audits-C6gUfP0Y.js,sha256=fgwKzn8EkoySQW3vumBtag39Tf7tKZ1CAjrtgiV6nVg,1041
|
|
277
|
+
web/client/dist/assets/Banner-_C9c6nFf.js,sha256=hGSMnU-Zmutt4YNdNkwg-jKE9OlPjQeULQifBdotSlY,1549
|
|
278
|
+
web/client/dist/assets/ChevronDownIcon-RfKS8PKd.js,sha256=XquGUICqkVP2nKhT55sDNAxYOZwGLSOCVWK-9qtrYeI,553
|
|
279
|
+
web/client/dist/assets/ChevronRightIcon-CTOwDuap.js,sha256=Kp7tXDvLy08rGX857CvNKpxK1ZM1voyQ0BhsPzSiBz4,553
|
|
280
|
+
web/client/dist/assets/Content-Dxw_m-3F.js,sha256=2tCL_vMTE21ljC7jovcFsLTghWCzNn1CSLwsAS24k6w,803
|
|
281
|
+
web/client/dist/assets/Content-Uj95lQQ-.js,sha256=ThFYaN_37COh1Ex8fhm0nUV4lYPKPK7qBz04eVGvQ5Q,37525
|
|
282
|
+
web/client/dist/assets/Data-CH4v_k47.js,sha256=FtHpolZ2s4xFYGB2WftK3bxH_ofkdeFPyY265vXJl3o,984
|
|
283
|
+
web/client/dist/assets/DataCatalog-CZgWBSbO.js,sha256=0EPDEoUQ274TF3LYesGQSwI1SX1v9KPDzMK6F3VJE5E,122464
|
|
284
|
+
web/client/dist/assets/Editor-CPGKdIv3.js,sha256=kdcII6GnxjQ5fpI5w4WM3hBAkFmNZe7K5MbzyrUkG6w,43614
|
|
285
|
+
web/client/dist/assets/Editor-DDzPd4K5.js,sha256=ocjBvMxBQmSI41y53wkHSXJl4a7LEV5yOB-fYZ34-RA,1490
|
|
286
|
+
web/client/dist/assets/Errors-Bd_lCqWq.js,sha256=yssKcyqinPUHwqqC-2MdHWTJXzFCvN8JYYsz8Nv3cJ8,1361
|
|
287
|
+
web/client/dist/assets/FileExplorer-FTqyN550.js,sha256=kpw7dZjsetzcJfBUYilG9TxMbB7LJdGO2PI9T6uklww,87619
|
|
288
|
+
web/client/dist/assets/Footer-By8eV-Xw.js,sha256=VmipP5rdEi5J0wgzNxuaPJahH5Bs2iQ-rIXokt47oxI,700
|
|
289
|
+
web/client/dist/assets/Header-CWgMNmyS.js,sha256=xHHIZPCPtf3D_twGczDQFG4rJJqSan0ik2MwBJx5JhE,11424
|
|
290
|
+
web/client/dist/assets/Input-tTLAeFk_.js,sha256=0NvLpJyhFlSRpoii8Rw0kkpZL6UQvqJofyZ6CtWyIIY,54762
|
|
291
|
+
web/client/dist/assets/Lineage-B24dFVy0.js,sha256=SDSpwYVvxnv3nR8ajlRZAvLQdRqmFDKapS_-t5dByPA,1002
|
|
292
|
+
web/client/dist/assets/ListboxShow-BnVk8Pao.js,sha256=21utItoWK1_Z7mO9hb8rB4dzBpYcwR67MAvsxeVS9AU,29911
|
|
293
|
+
web/client/dist/assets/ModelLineage-CfoiOAVb.js,sha256=TpX6nqlxrxUz5H6FWJFPPOmUylHHONpLtcwL9IdC1K0,15546
|
|
294
|
+
web/client/dist/assets/Models-C0WhiYIC.js,sha256=_A_J-isthWSwBACutDdKtkVSOFXvAsnxGVfCqcKhjwI,2194
|
|
295
|
+
web/client/dist/assets/Page-LHbK1yD_.js,sha256=SyzAMHijqIfq8vtiAiMtYZ5QON0q52--8TvOew03sjM,589
|
|
296
|
+
web/client/dist/assets/Plan-MwkSS6xa.js,sha256=oq0YAYYFY90bcu04QC_HAkido85WKk1cwRC4GOM1Fbo,666
|
|
297
|
+
web/client/dist/assets/PlusCircleIcon-CPdy9bpf.js,sha256=0tTpCrcTMrBwCtR3vrMzLfaF4zLBpJuqFewdnqn9QxY,11698
|
|
298
|
+
web/client/dist/assets/ReportErrors-9LAVRQKL.js,sha256=u8GQoJbChwgOnGbP_Nl_xI0DFJp3yX5V8Fh9NEyzi3s,5419
|
|
299
|
+
web/client/dist/assets/Root-CpkGXO_A.js,sha256=FAab1_hPThWp7PfqeJBFVSGOb7uanUhS21fxa5CK2gs,42195
|
|
300
|
+
web/client/dist/assets/SearchList-DCuxxaPn.js,sha256=ztgIhC9WWAAHa1tmtE_cUD6JmQn8y_yg1DiQTWtk6Wc,291983
|
|
301
|
+
web/client/dist/assets/SelectEnvironment-CltENlzE.js,sha256=5xZn3sxYxlf8NyZ-OHIri0VaK7jVXJZgQTev0f-u1oA,37637
|
|
302
|
+
web/client/dist/assets/SourceList-u_0soueL.js,sha256=jbbw4LnoTj1rbgMFJKEIOGSfYfNsVE0cDrPTTLtigmk,3205
|
|
303
|
+
web/client/dist/assets/SourceListItem-CHxTMFnQ.js,sha256=sXIp_m9CYqoUaMqC9ZYL77kgM1cmTVW9stwKO2qx9NI,1106
|
|
304
|
+
web/client/dist/assets/SplitPane-DO1JEVxf.js,sha256=wX4H77DQdK4sh66oPaRAIjVVNceXedaOcDcB_x1QQzg,10439
|
|
305
|
+
web/client/dist/assets/Tests-D_-8MKq9.js,sha256=ALocSXnbRuMy3supTdHrRHhabiflJza8G0y6Y5xMKvM,1014
|
|
306
|
+
web/client/dist/assets/Welcome-DTulZMrl.js,sha256=jpLQFORBeA76xkC_9bN2BzFIGvX1DdHNARLOXXBuBe4,354
|
|
307
307
|
web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js,sha256=WQq4BXvAMsPhT58adqrv_QHaYJQT-xKIiBnKBDPB-uk,239
|
|
308
|
-
web/client/dist/assets/context-
|
|
309
|
-
web/client/dist/assets/context-
|
|
310
|
-
web/client/dist/assets/editor-
|
|
311
|
-
web/client/dist/assets/file-
|
|
312
|
-
web/client/dist/assets/floating-ui.react-dom-
|
|
308
|
+
web/client/dist/assets/context-B7_ioojx.js,sha256=KL77RWbd8BbyqpQ1I1bDOv7uKytF8qRkyqQZY-PKdz0,4517
|
|
309
|
+
web/client/dist/assets/context-ByRTRbGV.js,sha256=U3-rAmOByd3G89QTIwAWKOQyLmaGbX_2Vhi6pDBp9K4,2043777
|
|
310
|
+
web/client/dist/assets/editor-IxXTso9p.js,sha256=UWbqhOKBoSojkYRCOPbmEuYbAIMwdoZnIvV2DChy7oY,7858
|
|
311
|
+
web/client/dist/assets/file-CtGXXxxH.js,sha256=Hmwx1J0KQMz0hcpqXiIynntwFpCDbMP5_938ZarD5-A,2349
|
|
312
|
+
web/client/dist/assets/floating-ui.react-dom-BqmCcnHz.js,sha256=hUj2Zpxmmuh4sZRjdhbW3WQdZO1jxbwFasZwBzAubkw,22264
|
|
313
313
|
web/client/dist/assets/help-6Q7f7fjd.js,sha256=93Iri9PzpAiPgCyRsrQwABjP2jomAUNR7y2OqHxPf34,445
|
|
314
|
-
web/client/dist/assets/help-
|
|
315
|
-
web/client/dist/assets/index-
|
|
316
|
-
web/client/dist/assets/index-
|
|
317
|
-
web/client/dist/assets/plan-
|
|
318
|
-
web/client/dist/assets/popover-
|
|
319
|
-
web/client/dist/assets/project-
|
|
314
|
+
web/client/dist/assets/help-DZgsqPrY.js,sha256=u34E2lFVgPEukvLepY35LaguZ9NvafB2IAjpUCfhPX8,57842
|
|
315
|
+
web/client/dist/assets/index-BOoFTMqX.js,sha256=6bJ--bovDCOYxNYsdTGPX9dkUhJGud7dInwHj5iDslQ,531532
|
|
316
|
+
web/client/dist/assets/index-D-NV5rsk.js,sha256=MOQca9xczbp7ryFp7CvKNQ4pWZrLAHcCA3Kn-E468rI,13582
|
|
317
|
+
web/client/dist/assets/plan-BITq8bOv.js,sha256=PM_G9uJMrLje18K44Wxbf9aftxeA_oIekqxKylI_QNg,13754
|
|
318
|
+
web/client/dist/assets/popover-CThXyzI8.js,sha256=Og-Lr2D_aptCqqoa1iK7TlQV59y2XPmwueK_kA5F3OM,68101
|
|
319
|
+
web/client/dist/assets/project-D9WffyNb.js,sha256=2EiQGE1FNRjLDvmBzIYSnu7YpGKPHGL7ljMvoFQYPDY,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.187.6.
|
|
392
|
-
sqlmesh-0.187.6.
|
|
393
|
-
sqlmesh-0.187.6.
|
|
394
|
-
sqlmesh-0.187.6.
|
|
395
|
-
sqlmesh-0.187.6.
|
|
391
|
+
sqlmesh-0.187.6.dev7.dist-info/METADATA,sha256=hUNr3g8uYQ-_rlFlkauSRlPcLF9VA6VmWu8ffRSR58w,26493
|
|
392
|
+
sqlmesh-0.187.6.dev7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
393
|
+
sqlmesh-0.187.6.dev7.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
394
|
+
sqlmesh-0.187.6.dev7.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
395
|
+
sqlmesh-0.187.6.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-
|
|
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-BOoFTMqX.js";import{P as j}from"./Page-LHbK1yD_.js";import{u as h}from"./project-D9WffyNb.js";import{S as v}from"./SourceList-u_0soueL.js";import{S as A}from"./SourceListItem-CHxTMFnQ.js";import"./SplitPane-DO1JEVxf.js";import"./file-CtGXXxxH.js";import"./Input-tTLAeFk_.js";import"./floating-ui.react-dom-BqmCcnHz.js";import"./index-D-NV5rsk.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-
|
|
1
|
+
import{j as s,c as i,l as a,m as n,H as p}from"./index-BOoFTMqX.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-
|
|
1
|
+
import{r as e}from"./index-BOoFTMqX.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-
|
|
1
|
+
import{r as e}from"./index-BOoFTMqX.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-
|
|
1
|
+
import{d as a,Q as l,v as e,j as r,U as n,e as d}from"./index-BOoFTMqX.js";import{D as u}from"./ReportErrors-9LAVRQKL.js";import"./PlusCircleIcon-CPdy9bpf.js";import"./popover-CThXyzI8.js";import"./floating-ui.react-dom-BqmCcnHz.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-DO1JEVxf.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-D0B238GC.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-CheqF0wg.js";import{u as j,a as Y,E as M}from"./plan-BT_YMvAu.js";import{B as S}from"./Banner-BnIDM-p-.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-DgugPkXr.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-zR5tE2ci.js";import{I as K}from"./Input-DQ3H5Jf5.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-Bp0ARqZ0.js";import{u as ze}from"./project-8LRoNrpG.js";import{F as we}from"./context-C7kvMRgQ.js";import"./ModelLineage-Du6fUL20.js";import"./editor-C3xrJUHo.js";import"./file-Cn8UMGdB.js";import"./SearchList-B1ophTod.js";import"./help-6Q7f7fjd.js";import"./floating-ui.react-dom-njuatPE_.js";import"./ChevronDownIcon-v5uzV5KS.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-C_z4JbJU.js";import"./index-0HTVGXbP.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-BOoFTMqX.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-CltENlzE.js";import{u as j,a as Y,E as M}from"./plan-BITq8bOv.js";import{B as S}from"./Banner-_C9c6nFf.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-CPdy9bpf.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-CThXyzI8.js";import{I as K}from"./Input-tTLAeFk_.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-BnVk8Pao.js";import{u as ze}from"./project-D9WffyNb.js";import{F as we}from"./context-ByRTRbGV.js";import"./ModelLineage-CfoiOAVb.js";import"./editor-IxXTso9p.js";import"./file-CtGXXxxH.js";import"./SearchList-DCuxxaPn.js";import"./help-6Q7f7fjd.js";import"./floating-ui.react-dom-BqmCcnHz.js";import"./ChevronDownIcon-RfKS8PKd.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-u_0soueL.js";import"./index-D-NV5rsk.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-
|
|
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-BOoFTMqX.js";import{g as b,T as g}from"./help-DZgsqPrY.js";import{u as r}from"./editor-IxXTso9p.js";import"./index-D-NV5rsk.js";import"./floating-ui.react-dom-BqmCcnHz.js";import"./Input-tTLAeFk_.js";import"./file-CtGXXxxH.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};
|