amazon-sagemaker-sql-editor 0.1.1__tar.gz → 0.1.3__tar.gz
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.
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/PKG-INFO +1 -1
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/_version.py +1 -1
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/cache/api_cache.py +14 -3
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/glue/adapter.py +35 -1
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/snowflake/adapter.py +6 -6
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/snowflake/service.py +8 -2
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/handlers.py +32 -2
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/package.json +7 -4
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/schemas/@amzn/amazon_sagemaker_sql_editor/dora-side-panel.json +20 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/schemas/@amzn/amazon_sagemaker_sql_editor/package.json.orig +258 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/18.3cd1c9086d107be4d6aa.js +2 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/315.a2d8bea073429d48d652.js +1 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/388.274e5c9a5e587027d745.js +1 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/444.419d655ff257271bc44e.js +2 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/444.419d655ff257271bc44e.js.LICENSE.txt +9 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/717.680219a91f7a9c99cf78.js +309 -0
- amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/728.ab0ae6d2ecebf23bd369.js → amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/728.9f456d03b3a2df9fd5e1.js +2 -2
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/728.9f456d03b3a2df9fd5e1.js.LICENSE.txt +9 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/730.4507387adf57dd97953c.js +104 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/747.1ee1c0cc92639356b6eb.js +1 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/784.055f1f7a40c35908201b.js +102 -0
- amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/remoteEntry.ca86253038720c257f95.js +1 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/third-party-licenses.json +79 -7
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/model/models.py +3 -5
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/service/api_service.py +14 -5
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/service/data_provider_service.py +6 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/service/schema_service.py +4 -1
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/service/search_service.py +19 -11
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/constants.py +9 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/date_time.py +5 -1
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/package.json +6 -3
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/base.css +19 -0
- amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/101.f98599824b56d8ed73b1.js +0 -267
- amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/297.3b6efb204fd150af18f0.js +0 -102
- amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/447.39b6df2ebaf01da716fe.js +0 -1
- amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/471.5fa75d86606475473e4c.js +0 -104
- amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/747.6438b3332f26aa734fe4.js +0 -1
- amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/remoteEntry.92c1a971d50aaabe9a25.js +0 -1
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/.gitignore +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/LICENSE +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/NOTICE +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/README.md +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/__init__.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/adapter/adapter_factory.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/adapter/adapters.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/cache/__init__.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/athena/__init__.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/athena/adapter.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/athena/service.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/glue/__init__.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/redshift/__init__.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/redshift/adapter.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/redshift/service.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/data_store/snowflake/__init__.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/extension.py +0 -0
- /amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/728.ab0ae6d2ecebf23bd369.js.LICENSE.txt → /amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/18.3cd1c9086d107be4d6aa.js.LICENSE.txt +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/285.1e1c6e03719f825e2fab.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/338.580bd3cf4cffa0f456aa.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/338.580bd3cf4cffa0f456aa.js.LICENSE.txt +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/378.97d19c9d9373933d99d6.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/505.c72f97e2a7be1a13593b.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/745.b61bef84c1f51150bbee.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/745.b61bef84c1f51150bbee.js.LICENSE.txt +0 -0
- /amazon_sagemaker_sql_editor-0.1.1/amazon_sagemaker_sql_editor/labextension/static/297.3b6efb204fd150af18f0.js.LICENSE.txt → /amazon_sagemaker_sql_editor-0.1.3/amazon_sagemaker_sql_editor/labextension/static/784.055f1f7a40c35908201b.js.LICENSE.txt +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/823.3c1cb8eefae9628b7433.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/846.715b0ca55ef993eb9b85.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/860.2c95214bce137ef11b3a.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/906.f8f47910a001eea72472.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/labextension/static/style.js +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/model/__init__.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/service/service_factory.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/api_utils.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/async_io.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/client_factory.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/exceptions.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/language_server/autocomplete_file_handler.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/language_server/autocomplete_schema_adapter.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/metrics/service_metrics.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/pagination/paginator.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/amazon_sagemaker_sql_editor/utils/sql_execution.py +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/install.json +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/jupyter-config/jupyter_server_config.d/amazon_sagemaker_sql_editor.json +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/pyproject.toml +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/athena.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/back-arrow.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/chevron-down.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/chevron-right.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/close.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/column.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/data-icon.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/datazone.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/ml-brain.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/redshift.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/refresh-icon.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/sagemaker-logo.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/schema.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/search.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/snowflake.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/table.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/three-dots.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/icons/view.svg +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/index.css +0 -0
- {amazon_sagemaker_sql_editor-0.1.1 → amazon_sagemaker_sql_editor-0.1.3}/style/index.js +0 -0
|
@@ -145,7 +145,13 @@ class PostDataSourcesApiCache(Cache):
|
|
|
145
145
|
key = args_to_key(base=base, args=(), kwargs={"path": path}, typed=typed, ignore=ignore)
|
|
146
146
|
return key
|
|
147
147
|
|
|
148
|
-
async def get_response_memoized(
|
|
148
|
+
async def get_response_memoized(
|
|
149
|
+
self,
|
|
150
|
+
get_response_func: callable,
|
|
151
|
+
path: str,
|
|
152
|
+
refresh: bool,
|
|
153
|
+
enable_default_athena: bool = None,
|
|
154
|
+
):
|
|
149
155
|
"""
|
|
150
156
|
Fetches response from cache or underlying data-stores
|
|
151
157
|
Updates lastUpdateTime for all parent nodes of path
|
|
@@ -154,11 +160,15 @@ class PostDataSourcesApiCache(Cache):
|
|
|
154
160
|
:param get_response_func: get_response() from PostDataSourcesApiService
|
|
155
161
|
:param path: path for which response needs to be fetched
|
|
156
162
|
:param refresh: whether to force-fetch from underlying data-stores
|
|
163
|
+
:param enable_default_athena: whether default athena connection should be returned
|
|
157
164
|
:return: response from cache or underlying data-stores
|
|
158
165
|
"""
|
|
159
166
|
# fetch data from cache or underlying data-stores
|
|
160
167
|
response, from_cache = await self._get_response_memoized(
|
|
161
|
-
get_response_func,
|
|
168
|
+
get_response_func,
|
|
169
|
+
path=path,
|
|
170
|
+
refresh=refresh,
|
|
171
|
+
enable_default_athena=enable_default_athena,
|
|
162
172
|
)
|
|
163
173
|
|
|
164
174
|
# update 'lastUpdateTime' for all parent nodes of path
|
|
@@ -175,6 +185,7 @@ class PostDataSourcesApiCache(Cache):
|
|
|
175
185
|
self,
|
|
176
186
|
get_response_func: callable,
|
|
177
187
|
path: str,
|
|
188
|
+
enable_default_athena: bool = None,
|
|
178
189
|
expire: float = None,
|
|
179
190
|
tag=None,
|
|
180
191
|
ignore=None,
|
|
@@ -218,7 +229,7 @@ class PostDataSourcesApiCache(Cache):
|
|
|
218
229
|
# call func if refresh=True or cache is not set
|
|
219
230
|
if refresh or result is ENOVAL:
|
|
220
231
|
from_cache = False
|
|
221
|
-
result = await get_response_func(path=path)
|
|
232
|
+
result = await get_response_func(path=path, enable_default_athena=enable_default_athena)
|
|
222
233
|
if expire is None or expire > 0:
|
|
223
234
|
self.set(key, result, expire, tag=tag, retry=True)
|
|
224
235
|
|
|
@@ -15,6 +15,7 @@ from amazon_sagemaker_sql_editor.utils.constants import (
|
|
|
15
15
|
NodeType,
|
|
16
16
|
DataSourceType,
|
|
17
17
|
DataSourcesConstants,
|
|
18
|
+
DefaultAthena,
|
|
18
19
|
)
|
|
19
20
|
from amazon_sagemaker_sql_editor.utils.date_time import current_time_utc
|
|
20
21
|
|
|
@@ -49,10 +50,25 @@ class GlueGetConnectionsResponseAdapter(GetConnectionsResponseAdapter):
|
|
|
49
50
|
lastUpdateTime=connection["LastUpdatedTime"].timestamp(),
|
|
50
51
|
)
|
|
51
52
|
connection_models.append(connection_model)
|
|
52
|
-
|
|
53
|
+
enable_default_athena_kwargs_name = "enable_default_athena"
|
|
54
|
+
enable_default_athena = kwargs.get(enable_default_athena_kwargs_name)
|
|
55
|
+
if enable_default_athena:
|
|
56
|
+
connection_models.append(
|
|
57
|
+
GlueGetConnectionsResponseAdapter.get_default_athena_connection()
|
|
58
|
+
)
|
|
53
59
|
model = ConnectionsResponseModel(connections=connection_models)
|
|
54
60
|
self.model = model
|
|
55
61
|
|
|
62
|
+
@staticmethod
|
|
63
|
+
def get_default_athena_connection():
|
|
64
|
+
return ConnectionModel(
|
|
65
|
+
name=DefaultAthena.CONNECTION_NAME,
|
|
66
|
+
type=DefaultAthena.CONNECTION_TYPE,
|
|
67
|
+
source=DataSourcesConstants.CONNECTION_TYPE_GLUE,
|
|
68
|
+
lastUpdateTime=DefaultAthena.LAST_UPDATED_TIME,
|
|
69
|
+
metadata=ConnectionMetadataModel(description=DefaultAthena.CONNECTION_DESCRIPTION),
|
|
70
|
+
)
|
|
71
|
+
|
|
56
72
|
|
|
57
73
|
class GluePostDataSourcesResponseAdapter(PostDataSourcesResponseAdapter):
|
|
58
74
|
def _set_model(self, **kwargs):
|
|
@@ -79,6 +95,11 @@ class GluePostDataSourcesResponseAdapter(PostDataSourcesResponseAdapter):
|
|
|
79
95
|
)
|
|
80
96
|
node_list.append(node_model)
|
|
81
97
|
|
|
98
|
+
enable_default_athena_kwargs_name = "enable_default_athena"
|
|
99
|
+
enable_default_athena = kwargs.get(enable_default_athena_kwargs_name)
|
|
100
|
+
if enable_default_athena:
|
|
101
|
+
node_list.append(GluePostDataSourcesResponseAdapter.get_default_athena_connection())
|
|
102
|
+
|
|
82
103
|
self.model = NodeResponseModel(
|
|
83
104
|
isLeaf=False,
|
|
84
105
|
lastUpdateTime=current_time_utc().timestamp(),
|
|
@@ -88,6 +109,19 @@ class GluePostDataSourcesResponseAdapter(PostDataSourcesResponseAdapter):
|
|
|
88
109
|
name="root",
|
|
89
110
|
)
|
|
90
111
|
|
|
112
|
+
@staticmethod
|
|
113
|
+
def get_default_athena_connection():
|
|
114
|
+
return NodeResponseModel(
|
|
115
|
+
name=DefaultAthena.CONNECTION_NAME,
|
|
116
|
+
nodeType=NodeType.DATA_SOURCE.value.__str__(),
|
|
117
|
+
isLeaf=False,
|
|
118
|
+
lastUpdateTime=DefaultAthena.LAST_UPDATED_TIME,
|
|
119
|
+
nodeData=NodeDataModel(
|
|
120
|
+
source=DataSourcesConstants.CONNECTION_TYPE_GLUE,
|
|
121
|
+
type=DefaultAthena.CONNECTION_TYPE,
|
|
122
|
+
),
|
|
123
|
+
)
|
|
124
|
+
|
|
91
125
|
def _create_model_for_type(self, node_type: str, **kwargs):
|
|
92
126
|
"""
|
|
93
127
|
Method to create model object for a specific node type
|
|
@@ -57,17 +57,17 @@ class SnowflakePostDataSourcesResponseAdapter(PostDataSourcesResponseAdapter):
|
|
|
57
57
|
source=DataSourcesConstants.CONNECTION_TYPE_GLUE,
|
|
58
58
|
type=DataSourceType.SNOWFLAKE.value.__str__(),
|
|
59
59
|
sampleQuery=f"-- Query to list tables from schema '{database_name}.{name}'\n"
|
|
60
|
-
f'
|
|
60
|
+
f'SELECT * FROM "{database_name}"."INFORMATION_SCHEMA"."TABLES" WHERE TABLE_SCHEMA = \'{name}\' ORDER BY TABLE_TYPE ASC',
|
|
61
61
|
)
|
|
62
62
|
elif node_type == NodeType.TABLE.value.__str__():
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
database_name = node_info[0]
|
|
64
|
+
schema_name = node_info[1]
|
|
65
|
+
name = node_info[2]
|
|
66
66
|
|
|
67
67
|
# set table metadata
|
|
68
68
|
table_metadata = {
|
|
69
|
-
"Created On": convert_datetime_format(node_info[
|
|
70
|
-
"Owner": node_info[
|
|
69
|
+
"Created On": convert_datetime_format(node_info[4], "%b %d %Y %H:%M:%S %Z"),
|
|
70
|
+
"Owner": node_info[3], # role name which owns the table
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
node_data = TableNodeDataModel(
|
|
@@ -23,7 +23,7 @@ class SnowflakeDataProviderService(SQLDataProviderService):
|
|
|
23
23
|
path_components=path_components,
|
|
24
24
|
metastore_type=metastore_type,
|
|
25
25
|
)
|
|
26
|
-
self.fully_qualified_sql_path = ".".join(self.path_components[1:])
|
|
26
|
+
self.fully_qualified_sql_path = ".".join(['"' + s + '"' for s in self.path_components[1:]])
|
|
27
27
|
|
|
28
28
|
async def _get_databases(self, **kwargs):
|
|
29
29
|
sql_query = "SHOW DATABASES"
|
|
@@ -37,7 +37,13 @@ class SnowflakeDataProviderService(SQLDataProviderService):
|
|
|
37
37
|
raise NotImplementedError()
|
|
38
38
|
|
|
39
39
|
async def _get_tables(self, **kwargs):
|
|
40
|
-
|
|
40
|
+
database_name = self.path_components[1]
|
|
41
|
+
schema_name = self.path_components[2]
|
|
42
|
+
sql_query = (
|
|
43
|
+
f"SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_OWNER, CREATED, * "
|
|
44
|
+
f'FROM "{database_name}"."INFORMATION_SCHEMA"."TABLES" '
|
|
45
|
+
f"WHERE TABLE_SCHEMA like '{schema_name}' ORDER BY TABLE_TYPE ASC"
|
|
46
|
+
)
|
|
41
47
|
return await self._get_query_results(sql_query=sql_query)
|
|
42
48
|
|
|
43
49
|
async def _get_columns(self, **kwargs):
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import json
|
|
4
|
+
import re
|
|
4
5
|
import traceback
|
|
5
6
|
from typing import Optional, Awaitable
|
|
6
7
|
from http import HTTPStatus
|
|
7
8
|
|
|
8
9
|
import tornado
|
|
10
|
+
from tornado import web
|
|
9
11
|
from jupyter_server.base.handlers import JupyterHandler
|
|
10
12
|
import botocore.exceptions
|
|
11
13
|
|
|
@@ -52,6 +54,9 @@ class ConnectionsHandler(JupyterHandler):
|
|
|
52
54
|
connection_filter_type = self.get_query_argument(
|
|
53
55
|
ConnectionsApiQueryArgs.FILTER_TYPE, default=None
|
|
54
56
|
)
|
|
57
|
+
enable_default_athena = self.get_query_argument(
|
|
58
|
+
ConnectionsApiQueryArgs.ENABLE_DEFAULT_ATHENA, default=None
|
|
59
|
+
)
|
|
55
60
|
|
|
56
61
|
self.log.debug(
|
|
57
62
|
f"Received request: {Api.PREFIX_GET.value}{Api.NAME_CONNECTIONS.value}. "
|
|
@@ -61,6 +66,7 @@ class ConnectionsHandler(JupyterHandler):
|
|
|
61
66
|
response = await GetConnectionsApiService().get_response(
|
|
62
67
|
connection_filter_type=connection_filter_type,
|
|
63
68
|
connection_filter_source=connection_filter_source,
|
|
69
|
+
enable_default_athena=enable_default_athena,
|
|
64
70
|
)
|
|
65
71
|
response = json.dumps(response)
|
|
66
72
|
|
|
@@ -132,6 +138,7 @@ class DataSourcesDetailsHandler(JupyterHandler):
|
|
|
132
138
|
refresh = request_body.get(DataSourcesApiBodyArgs.REFRESH)
|
|
133
139
|
page_size = request_body.get(DataSourcesApiBodyArgs.PAGE_SIZE)
|
|
134
140
|
next_token = request_body.get(DataSourcesApiBodyArgs.NEXT_TOKEN)
|
|
141
|
+
enable_default_athena = request_body.get(DataSourcesApiBodyArgs.ENABLE_DEFAULT_ATHENA)
|
|
135
142
|
|
|
136
143
|
self.log.debug(
|
|
137
144
|
f"Received request: {Api.PREFIX_POST.value}{Api.NAME_DATA_SOURCES.value}. "
|
|
@@ -154,6 +161,7 @@ class DataSourcesDetailsHandler(JupyterHandler):
|
|
|
154
161
|
modified_since=if_modified_since,
|
|
155
162
|
next_token=next_token,
|
|
156
163
|
page_size=page_size,
|
|
164
|
+
enable_default_athena=enable_default_athena,
|
|
157
165
|
)
|
|
158
166
|
|
|
159
167
|
if refresh:
|
|
@@ -165,7 +173,7 @@ class DataSourcesDetailsHandler(JupyterHandler):
|
|
|
165
173
|
GetConnectionsApiService(),
|
|
166
174
|
self.log,
|
|
167
175
|
)
|
|
168
|
-
).refresh_index_for_path(path)
|
|
176
|
+
).refresh_index_for_path(path, enable_default_athena)
|
|
169
177
|
|
|
170
178
|
response = json.dumps(response)
|
|
171
179
|
|
|
@@ -177,6 +185,25 @@ class DataSourcesDetailsHandler(JupyterHandler):
|
|
|
177
185
|
self.set_status(HTTPStatus.NOT_MODIFIED.real)
|
|
178
186
|
await self.finish()
|
|
179
187
|
|
|
188
|
+
except web.HTTPError as error:
|
|
189
|
+
if re.search("^4\d{2}$", str(error.status_code)):
|
|
190
|
+
self.log.error(f"Client error: {error}")
|
|
191
|
+
traceback.print_tb(error.__traceback__)
|
|
192
|
+
self.set_status(HTTPStatus.BAD_REQUEST.real)
|
|
193
|
+
await self.finish(
|
|
194
|
+
{
|
|
195
|
+
"message": str(error),
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
else:
|
|
199
|
+
self.log.error(f"Server error: {error}")
|
|
200
|
+
traceback.print_tb(error.__traceback__)
|
|
201
|
+
self.set_status(HTTPStatus.INTERNAL_SERVER_ERROR.real)
|
|
202
|
+
await self.finish(
|
|
203
|
+
{
|
|
204
|
+
"message": "A server error occurred",
|
|
205
|
+
}
|
|
206
|
+
)
|
|
180
207
|
except SagemakerSQLFault as error:
|
|
181
208
|
self.log.error(f"Server error: {error}")
|
|
182
209
|
traceback.print_tb(error.__traceback__)
|
|
@@ -345,8 +372,11 @@ class SearchHandler(JupyterHandler):
|
|
|
345
372
|
highlight = self.get_query_argument("highlight", default=None)
|
|
346
373
|
page_size = int(self.get_query_argument("pageSize", default="100"))
|
|
347
374
|
next_token = self.get_query_argument("nextToken", default=None)
|
|
375
|
+
enable_default_athena = self.get_query_argument("enableDefaultAthena", default=None)
|
|
348
376
|
|
|
349
|
-
request = SearchRequest(
|
|
377
|
+
request = SearchRequest(
|
|
378
|
+
term, filters, highlight, page_size, next_token, enable_default_athena
|
|
379
|
+
)
|
|
350
380
|
try:
|
|
351
381
|
request.validate_and_sanitize()
|
|
352
382
|
except ValueError as e:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amzn/amazon_sagemaker_sql_editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Jupyter extension for SQL editing capabilities within Amazon SageMaker notebooks",
|
|
5
5
|
"private": true,
|
|
6
6
|
"keywords": [
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
18
18
|
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
19
|
-
"style/index.js"
|
|
19
|
+
"style/index.js",
|
|
20
|
+
"schema/*.json"
|
|
20
21
|
],
|
|
21
22
|
"main": "lib/index.js",
|
|
22
23
|
"types": "lib/index.d.ts",
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
},
|
|
40
|
+
"schemaDir": "schema",
|
|
39
41
|
"outputDir": "amazon_sagemaker_sql_editor/labextension",
|
|
40
42
|
"sharedPackages": {
|
|
41
43
|
"@jupyter-lsp/jupyterlab-lsp": {
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
"@jupyter-lsp/jupyterlab-lsp:hover"
|
|
62
64
|
],
|
|
63
65
|
"_build": {
|
|
64
|
-
"load": "static/remoteEntry.
|
|
66
|
+
"load": "static/remoteEntry.ca86253038720c257f95.js",
|
|
65
67
|
"extension": "./extension",
|
|
66
68
|
"style": "./style"
|
|
67
69
|
}
|
|
@@ -102,6 +104,8 @@
|
|
|
102
104
|
"@jupyter-lsp/jupyterlab-lsp": "^5.0.1",
|
|
103
105
|
"@jupyterlab/application": "^4.0.10",
|
|
104
106
|
"@jupyterlab/apputils": "^4.1.10",
|
|
107
|
+
"react-arborist": "^3.4.0",
|
|
108
|
+
"use-resize-observer": "^9.1.0",
|
|
105
109
|
"@jupyterlab/cells": "^4.0.10",
|
|
106
110
|
"@jupyterlab/codeeditor": "^4.0.10",
|
|
107
111
|
"@jupyterlab/codemirror": "^4.0.10",
|
|
@@ -114,7 +118,6 @@
|
|
|
114
118
|
"@lumino/widgets": "^2.0.1",
|
|
115
119
|
"@mui/material": "^5.14.9",
|
|
116
120
|
"@mui/system": "^5.14.12",
|
|
117
|
-
"@mui/x-tree-view": "^6.17.0",
|
|
118
121
|
"react": "^18.2.0",
|
|
119
122
|
"react-dom": "^18.2.0",
|
|
120
123
|
"sql-formatter": "^12.2.1",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Data Discovery",
|
|
3
|
+
"description": "Settings for data discovery",
|
|
4
|
+
"properties": {
|
|
5
|
+
"workGroup": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"title": "WorkGroup",
|
|
8
|
+
"description": "Default Athena work group to query with",
|
|
9
|
+
"default": "primary"
|
|
10
|
+
},
|
|
11
|
+
"enableDefaultAthena": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"title": "Enable default Athena connection",
|
|
14
|
+
"description": "Allows you to easily query Athena with default credentials and default work group",
|
|
15
|
+
"default": false
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"type": "object"
|
|
20
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@amzn/amazon_sagemaker_sql_editor",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Jupyter extension for SQL editing capabilities within Amazon SageMaker notebooks",
|
|
5
|
+
"private": true,
|
|
6
|
+
"keywords": [
|
|
7
|
+
"jupyter",
|
|
8
|
+
"jupyterlab",
|
|
9
|
+
"jupyterlab-extension"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://aws.amazon.com/sagemaker/",
|
|
12
|
+
"license": "BSD-3-Clause",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Amazon"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
18
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
19
|
+
"style/index.js",
|
|
20
|
+
"schema/*.json"
|
|
21
|
+
],
|
|
22
|
+
"main": "lib/index.js",
|
|
23
|
+
"types": "lib/index.d.ts",
|
|
24
|
+
"style": "style/index.css",
|
|
25
|
+
"workspaces": [
|
|
26
|
+
"ui-tests"
|
|
27
|
+
],
|
|
28
|
+
"jupyterlab": {
|
|
29
|
+
"extension": true,
|
|
30
|
+
"discovery": {
|
|
31
|
+
"server": {
|
|
32
|
+
"managers": [
|
|
33
|
+
"pip"
|
|
34
|
+
],
|
|
35
|
+
"base": {
|
|
36
|
+
"name": "amazon_sagemaker_sql_editor"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"schemaDir": "schema",
|
|
41
|
+
"outputDir": "amazon_sagemaker_sql_editor/labextension",
|
|
42
|
+
"sharedPackages": {
|
|
43
|
+
"@jupyter-lsp/jupyterlab-lsp": {
|
|
44
|
+
"bundled": false,
|
|
45
|
+
"singleton": true
|
|
46
|
+
},
|
|
47
|
+
"@lezer/common": {
|
|
48
|
+
"bundled": true,
|
|
49
|
+
"singleton": true,
|
|
50
|
+
"requiredVersion": "^1.2.0"
|
|
51
|
+
},
|
|
52
|
+
"@mui/system": {
|
|
53
|
+
"requiredVersion": "^5.14.12"
|
|
54
|
+
},
|
|
55
|
+
"@emotion/react": {
|
|
56
|
+
"requiredVersion": "^11.11.2"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"disabledExtensions": [
|
|
60
|
+
"@jupyter-lsp/jupyterlab-lsp:syntax_highlighting",
|
|
61
|
+
"@jupyter-lsp/jupyterlab-lsp:ipython-sql",
|
|
62
|
+
"@jupyter-lsp/jupyterlab-lsp:code-jumpers",
|
|
63
|
+
"@jupyter-lsp/jupyterlab-lsp:hover"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "npm run build:lib && npm run build:labextension:dev",
|
|
68
|
+
"build:labextension": "jupyter labextension build .",
|
|
69
|
+
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
70
|
+
"build:lib": "tsc --sourceMap",
|
|
71
|
+
"build:lib:prod": "tsc",
|
|
72
|
+
"build:prod": "npm run clean && npm run lint && npm run build:lib:prod && npm run build:labextension",
|
|
73
|
+
"release": "npm run build:prod",
|
|
74
|
+
"clean": "rimraf lib tsconfig.tsbuildinfo && rimraf amazon_sagemaker_sql_editor/labextension amazon_sagemaker_sql_editor/_version.py && rimraf .eslintcache .stylelintcache",
|
|
75
|
+
"eslint": "npm run eslint:check --fix",
|
|
76
|
+
"eslint:check": "eslint src --cache --ext .ts,.tsx",
|
|
77
|
+
"install:extension": "npm run build",
|
|
78
|
+
"lint": "npm run stylelint && npm run prettier && npm run eslint",
|
|
79
|
+
"lint:check": "npm run stylelint:check && npm run prettier:check && npm run eslint:check",
|
|
80
|
+
"prettier": "npm run prettier:base --write --list-different",
|
|
81
|
+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\" --write",
|
|
82
|
+
"prettier:check": "npm run prettier:base --check",
|
|
83
|
+
"stylelint": "npm run stylelint:check --fix",
|
|
84
|
+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
85
|
+
"test": "jest --coverage",
|
|
86
|
+
"test:watch": "jest --watch",
|
|
87
|
+
"watch": "run-p watch:src watch:labextension",
|
|
88
|
+
"watch:src": "tsc -w --sourceMap",
|
|
89
|
+
"watch:labextension": "jupyter labextension watch ."
|
|
90
|
+
},
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"@codemirror/lang-sql": "^6.0.0",
|
|
93
|
+
"@codemirror/language": "^6.0.0",
|
|
94
|
+
"@codemirror/state": "^6.0.0",
|
|
95
|
+
"@codemirror/view": "^6.0.0",
|
|
96
|
+
"@emotion/css": "^11.11.2",
|
|
97
|
+
"@emotion/react": "^11.11.2",
|
|
98
|
+
"@emotion/styled": "^11.11.0",
|
|
99
|
+
"@jupyter-lsp/jupyterlab-lsp": "^5.0.1",
|
|
100
|
+
"@jupyterlab/application": "^4.0.10",
|
|
101
|
+
"@jupyterlab/apputils": "^4.1.10",
|
|
102
|
+
"react-arborist": "^3.4.0",
|
|
103
|
+
"use-resize-observer": "^9.1.0",
|
|
104
|
+
"@jupyterlab/cells": "^4.0.10",
|
|
105
|
+
"@jupyterlab/codeeditor": "^4.0.10",
|
|
106
|
+
"@jupyterlab/codemirror": "^4.0.10",
|
|
107
|
+
"@jupyterlab/fileeditor": "^4.0.10",
|
|
108
|
+
"@jupyterlab/lsp": "^4.0.10",
|
|
109
|
+
"@jupyterlab/tooltip": "^4.0.10",
|
|
110
|
+
"@jupyterlab/notebook": "^4.0.10",
|
|
111
|
+
"@jupyterlab/ui-components": "^4.0.10",
|
|
112
|
+
"@lezer/common": "^1.2.0",
|
|
113
|
+
"@lumino/widgets": "^2.0.1",
|
|
114
|
+
"@mui/material": "^5.14.9",
|
|
115
|
+
"@mui/system": "^5.14.12",
|
|
116
|
+
"react": "^18.2.0",
|
|
117
|
+
"react-dom": "^18.2.0",
|
|
118
|
+
"sql-formatter": "^12.2.1",
|
|
119
|
+
"vscode-jsonrpc": "^8.1.0"
|
|
120
|
+
},
|
|
121
|
+
"devDependencies": {
|
|
122
|
+
"@jupyterlab/builder": "^4.0.10",
|
|
123
|
+
"@jupyterlab/completer": "^4.0.10",
|
|
124
|
+
"@jupyterlab/logconsole": "^4.0.10",
|
|
125
|
+
"@jupyterlab/testutils": "^4.0.10",
|
|
126
|
+
"@testing-library/dom": "^9.3.4",
|
|
127
|
+
"@testing-library/jest-dom": "^6.2.0",
|
|
128
|
+
"@testing-library/react": "^14.1.2",
|
|
129
|
+
"@testing-library/user-event": "^13.0.0",
|
|
130
|
+
"@types/codemirror": "^5.60.15",
|
|
131
|
+
"@types/jest": "^29.2.0",
|
|
132
|
+
"@types/json-schema": "^7.0.11",
|
|
133
|
+
"@types/node": "^20.3.3",
|
|
134
|
+
"@types/react": "^18.0.26",
|
|
135
|
+
"@types/react-addons-linked-state-mixin": "^0.14.22",
|
|
136
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
137
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
138
|
+
"css-loader": "^6.7.1",
|
|
139
|
+
"eslint": "^8.36.0",
|
|
140
|
+
"eslint-config-prettier": "^8.8.0",
|
|
141
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
142
|
+
"jest": "^29.7.0",
|
|
143
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
144
|
+
"mkdirp": "^1.0.3",
|
|
145
|
+
"npm-run-all": "^4.1.5",
|
|
146
|
+
"prettier": "^3.0.0",
|
|
147
|
+
"rimraf": "^5.0.1",
|
|
148
|
+
"source-map-loader": "^1.0.2",
|
|
149
|
+
"style-loader": "^3.3.1",
|
|
150
|
+
"stylelint": "^15.10.1",
|
|
151
|
+
"stylelint-config-recommended": "^13.0.0",
|
|
152
|
+
"stylelint-config-standard": "^34.0.0",
|
|
153
|
+
"stylelint-csstree-validator": "^3.0.0",
|
|
154
|
+
"stylelint-prettier": "^4.0.0",
|
|
155
|
+
"ts-jest": "^29.1.1",
|
|
156
|
+
"typescript": "~5.0.2",
|
|
157
|
+
"yjs": "^13.5.40"
|
|
158
|
+
},
|
|
159
|
+
"overrides": {
|
|
160
|
+
"@jupyterlab/completer": "^4.0.10"
|
|
161
|
+
},
|
|
162
|
+
"sideEffects": [
|
|
163
|
+
"style/*.css",
|
|
164
|
+
"style/index.js"
|
|
165
|
+
],
|
|
166
|
+
"styleModule": "style/index.js",
|
|
167
|
+
"publishConfig": {
|
|
168
|
+
"access": "public"
|
|
169
|
+
},
|
|
170
|
+
"eslintIgnore": [
|
|
171
|
+
"node_modules",
|
|
172
|
+
"dist",
|
|
173
|
+
"coverage",
|
|
174
|
+
"**/*.d.ts",
|
|
175
|
+
"tests",
|
|
176
|
+
"**/__tests__",
|
|
177
|
+
"ui-tests"
|
|
178
|
+
],
|
|
179
|
+
"eslintConfig": {
|
|
180
|
+
"extends": [
|
|
181
|
+
"eslint:recommended",
|
|
182
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
183
|
+
"plugin:@typescript-eslint/recommended",
|
|
184
|
+
"plugin:prettier/recommended"
|
|
185
|
+
],
|
|
186
|
+
"parser": "@typescript-eslint/parser",
|
|
187
|
+
"parserOptions": {
|
|
188
|
+
"project": "tsconfig.json",
|
|
189
|
+
"sourceType": "module"
|
|
190
|
+
},
|
|
191
|
+
"plugins": [
|
|
192
|
+
"@typescript-eslint"
|
|
193
|
+
],
|
|
194
|
+
"rules": {
|
|
195
|
+
"@typescript-eslint/naming-convention": [
|
|
196
|
+
"error",
|
|
197
|
+
{
|
|
198
|
+
"selector": "interface",
|
|
199
|
+
"format": [
|
|
200
|
+
"PascalCase"
|
|
201
|
+
],
|
|
202
|
+
"custom": {
|
|
203
|
+
"regex": "^I[A-Z]",
|
|
204
|
+
"match": true
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"@typescript-eslint/no-unused-vars": [
|
|
209
|
+
"error",
|
|
210
|
+
{
|
|
211
|
+
"args": "none"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
215
|
+
"@typescript-eslint/no-namespace": "off",
|
|
216
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
217
|
+
"@typescript-eslint/quotes": [
|
|
218
|
+
"error",
|
|
219
|
+
"single",
|
|
220
|
+
{
|
|
221
|
+
"avoidEscape": true,
|
|
222
|
+
"allowTemplateLiterals": false
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
"curly": [
|
|
226
|
+
"error",
|
|
227
|
+
"all"
|
|
228
|
+
],
|
|
229
|
+
"eqeqeq": "error",
|
|
230
|
+
"prefer-arrow-callback": "error"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"prettier": {
|
|
234
|
+
"singleQuote": true,
|
|
235
|
+
"trailingComma": "none",
|
|
236
|
+
"arrowParens": "avoid",
|
|
237
|
+
"endOfLine": "auto",
|
|
238
|
+
"printWidth": 100,
|
|
239
|
+
"tabWidth": 2
|
|
240
|
+
},
|
|
241
|
+
"stylelint": {
|
|
242
|
+
"extends": [
|
|
243
|
+
"stylelint-config-recommended",
|
|
244
|
+
"stylelint-config-standard",
|
|
245
|
+
"stylelint-prettier/recommended"
|
|
246
|
+
],
|
|
247
|
+
"plugins": [
|
|
248
|
+
"stylelint-csstree-validator"
|
|
249
|
+
],
|
|
250
|
+
"rules": {
|
|
251
|
+
"csstree/validator": true,
|
|
252
|
+
"property-no-vendor-prefix": null,
|
|
253
|
+
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
|
|
254
|
+
"selector-no-vendor-prefix": null,
|
|
255
|
+
"value-no-vendor-prefix": null
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 18.3cd1c9086d107be4d6aa.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_amzn_amazon_sagemaker_sql_editor=self.webpackChunk_amzn_amazon_sagemaker_sql_editor||[]).push([[18],{3349:(e,r,t)=>{function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(r,{Z:()=>n})},2122:(e,r,t)=>{function n(){return n=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},n.apply(this,arguments)}t.d(r,{Z:()=>n})},8999:(e,r,t)=>{function n(e,r){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},n(e,r)}function o(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,n(e,r)}t.d(r,{Z:()=>o})},5251:(e,r,t)=>{var n=t(6029),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var n,a={},c=null,f=null;for(n in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(f=r.ref),r)s.call(r,n)&&!_.hasOwnProperty(n)&&(a[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===a[n]&&(a[n]=r[n]);return{$$typeof:o,type:e,key:c,ref:f,props:a,_owner:i.current}}r.Fragment=a,r.jsx=c,r.jsxs=c},5893:(e,r,t)=>{e.exports=t(5251)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_amzn_amazon_sagemaker_sql_editor=self.webpackChunk_amzn_amazon_sagemaker_sql_editor||[]).push([[315,388],{6388:(e,n,r)=>{r.r(n),r.d(n,{default:()=>c});var t=r(6029);function u(e,n,r){return e[n]?e[n][0]?e[n][0][r]:e[n][r]:"contentBoxSize"===n?e.contentRect["inlineSize"===r?"width":"height"]:void 0}function c(e){void 0===e&&(e={});var n=e.onResize,r=(0,t.useRef)(void 0);r.current=n;var c=e.round||Math.round,i=(0,t.useRef)(),o=(0,t.useState)({width:void 0,height:void 0}),a=o[0],s=o[1],f=(0,t.useRef)(!1);(0,t.useEffect)((function(){return f.current=!1,function(){f.current=!0}}),[]);var l=(0,t.useRef)({width:void 0,height:void 0}),d=function(e,n){var r=(0,t.useRef)(null),u=(0,t.useRef)(null);u.current=n;var c=(0,t.useRef)(null);(0,t.useEffect)((function(){i()}));var i=(0,t.useCallback)((function(){var n=c.current,t=u.current,i=n||(t?t instanceof Element?t:t.current:null);r.current&&r.current.element===i&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:i,subscriber:e,cleanup:i?e(i):void 0})}),[e]);return(0,t.useEffect)((function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}}),[]),(0,t.useCallback)((function(e){c.current=e,i()}),[i])}((0,t.useCallback)((function(n){return i.current&&i.current.box===e.box&&i.current.round===c||(i.current={box:e.box,round:c,instance:new ResizeObserver((function(n){var t=n[0],i="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",o=u(t,i,"inlineSize"),a=u(t,i,"blockSize"),d=o?c(o):void 0,h=a?c(a):void 0;if(l.current.width!==d||l.current.height!==h){var b={width:d,height:h};l.current.width=d,l.current.height=h,r.current?r.current(b):f.current||s(b)}}))}),i.current.instance.observe(n,{box:e.box}),function(){i.current&&i.current.instance.unobserve(n)}}),[e.box,c]),e.ref);return(0,t.useMemo)((function(){return{ref:d,width:a.width,height:a.height}}),[d,a.width,a.height])}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_amzn_amazon_sagemaker_sql_editor=self.webpackChunk_amzn_amazon_sagemaker_sql_editor||[]).push([[388,315],{6388:(e,n,r)=>{r.r(n),r.d(n,{default:()=>c});var t=r(6029);function u(e,n,r){return e[n]?e[n][0]?e[n][0][r]:e[n][r]:"contentBoxSize"===n?e.contentRect["inlineSize"===r?"width":"height"]:void 0}function c(e){void 0===e&&(e={});var n=e.onResize,r=(0,t.useRef)(void 0);r.current=n;var c=e.round||Math.round,i=(0,t.useRef)(),o=(0,t.useState)({width:void 0,height:void 0}),a=o[0],s=o[1],f=(0,t.useRef)(!1);(0,t.useEffect)((function(){return f.current=!1,function(){f.current=!0}}),[]);var l=(0,t.useRef)({width:void 0,height:void 0}),d=function(e,n){var r=(0,t.useRef)(null),u=(0,t.useRef)(null);u.current=n;var c=(0,t.useRef)(null);(0,t.useEffect)((function(){i()}));var i=(0,t.useCallback)((function(){var n=c.current,t=u.current,i=n||(t?t instanceof Element?t:t.current:null);r.current&&r.current.element===i&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:i,subscriber:e,cleanup:i?e(i):void 0})}),[e]);return(0,t.useEffect)((function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}}),[]),(0,t.useCallback)((function(e){c.current=e,i()}),[i])}((0,t.useCallback)((function(n){return i.current&&i.current.box===e.box&&i.current.round===c||(i.current={box:e.box,round:c,instance:new ResizeObserver((function(n){var t=n[0],i="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",o=u(t,i,"inlineSize"),a=u(t,i,"blockSize"),d=o?c(o):void 0,h=a?c(a):void 0;if(l.current.width!==d||l.current.height!==h){var b={width:d,height:h};l.current.width=d,l.current.height=h,r.current?r.current(b):f.current||s(b)}}))}),i.current.instance.observe(n,{box:e.box}),function(){i.current&&i.current.instance.unobserve(n)}}),[e.box,c]),e.ref);return(0,t.useMemo)((function(){return{ref:d,width:a.width,height:a.height}}),[d,a.width,a.height])}}}]);
|