tinybird 0.0.1.dev200__tar.gz → 0.0.1.dev202__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.
Potentially problematic release.
This version of tinybird might be problematic. Click here for more details.
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/build.py +11 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/connection.py +9 -10
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/create.py +16 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/secret.py +10 -1
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/watch.py +10 -1
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/setup.cfg +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/datafile.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/common.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/local_common.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/forward/commands'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev202'
|
|
8
|
+
__revision__ = '63a6016'
|
|
@@ -306,8 +306,19 @@ def process(
|
|
|
306
306
|
build_status.building = True
|
|
307
307
|
if file_changed and (file_changed.endswith(FixtureExtension.NDJSON) or file_changed.endswith(FixtureExtension.CSV)):
|
|
308
308
|
rebuild_fixture(project, tb_client, file_changed)
|
|
309
|
+
if build_status:
|
|
310
|
+
build_status.building = False
|
|
311
|
+
build_status.error = None
|
|
309
312
|
elif file_changed and file_changed.endswith(".sql"):
|
|
310
313
|
rebuild_fixture_sql(project, tb_client, file_changed)
|
|
314
|
+
if build_status:
|
|
315
|
+
build_status.building = False
|
|
316
|
+
build_status.error = None
|
|
317
|
+
elif file_changed and (file_changed.endswith(".env.local") or file_changed.endswith(".env")):
|
|
318
|
+
load_secrets(project, tb_client)
|
|
319
|
+
if build_status:
|
|
320
|
+
build_status.building = False
|
|
321
|
+
build_status.error = None
|
|
311
322
|
else:
|
|
312
323
|
try:
|
|
313
324
|
build_result = build_project(project, tb_client, silent)
|
|
@@ -38,6 +38,7 @@ from tinybird.tb.modules.create import (
|
|
|
38
38
|
from tinybird.tb.modules.exceptions import CLIConnectionException
|
|
39
39
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
40
40
|
from tinybird.tb.modules.project import Project
|
|
41
|
+
from tinybird.tb.modules.secret import save_secret_to_env_file
|
|
41
42
|
|
|
42
43
|
DATA_CONNECTOR_SETTINGS: Dict[DataConnectorType, List[str]] = {
|
|
43
44
|
DataConnectorType.KAFKA: [
|
|
@@ -186,7 +187,7 @@ async def connection_create_s3(ctx: Context) -> None:
|
|
|
186
187
|
)
|
|
187
188
|
unique_suffix = uuid.uuid4().hex[:8] # Use first 8 chars of a UUID for brevity
|
|
188
189
|
secret_name = f"s3_role_arn_{connection_name}_{unique_suffix}"
|
|
189
|
-
|
|
190
|
+
save_secret_to_env_file(project=project, name=secret_name, value=role_arn)
|
|
190
191
|
|
|
191
192
|
create_in_cloud = (
|
|
192
193
|
click.confirm(FeedbackManager.prompt_connection_in_cloud_confirmation(), default=True)
|
|
@@ -241,7 +242,6 @@ async def connection_create_gcs(ctx: Context) -> None:
|
|
|
241
242
|
"""
|
|
242
243
|
project: Project = ctx.ensure_object(dict)["project"]
|
|
243
244
|
obj: Dict[str, Any] = ctx.ensure_object(dict)
|
|
244
|
-
client: TinyB = obj["client"]
|
|
245
245
|
|
|
246
246
|
service = DataConnectorType.GCLOUD_STORAGE
|
|
247
247
|
click.echo(FeedbackManager.prompt_gcs_connection_header())
|
|
@@ -250,7 +250,7 @@ async def connection_create_gcs(ctx: Context) -> None:
|
|
|
250
250
|
creds_json = get_gcs_svc_account_creds()
|
|
251
251
|
unique_suffix = uuid.uuid4().hex[:8] # Use first 8 chars of a UUID for brevity
|
|
252
252
|
secret_name = f"gcs_svc_account_creds_{connection_name}_{unique_suffix}"
|
|
253
|
-
|
|
253
|
+
save_secret_to_env_file(project=project, name=secret_name, value=creds_json)
|
|
254
254
|
|
|
255
255
|
connection_path = await generate_gcs_connection_file_with_secrets(
|
|
256
256
|
name=connection_name,
|
|
@@ -356,7 +356,6 @@ async def connection_create_kafka(
|
|
|
356
356
|
security_protocol="SASL_SSL",
|
|
357
357
|
skip_secrets=False,
|
|
358
358
|
) -> Tuple[str, str, str, str, str, str, str, str, List[str]]:
|
|
359
|
-
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
360
359
|
obj: Dict[str, Any] = ctx.ensure_object(dict)
|
|
361
360
|
click.echo(FeedbackManager.gray(message="\n» Creating Kafka connection..."))
|
|
362
361
|
project: Project = ctx.ensure_object(dict)["project"]
|
|
@@ -374,7 +373,7 @@ async def connection_create_kafka(
|
|
|
374
373
|
|
|
375
374
|
validate_kafka_bootstrap_servers(bootstrap_servers)
|
|
376
375
|
secret_required = not skip_secrets and click.confirm(
|
|
377
|
-
FeedbackManager.highlight(message=" ? Do you want to store the bootstrap server in a
|
|
376
|
+
FeedbackManager.highlight(message=" ? Do you want to store the bootstrap server in a .env.local file? [Y/n]"),
|
|
378
377
|
default=True,
|
|
379
378
|
show_default=False,
|
|
380
379
|
)
|
|
@@ -385,7 +384,7 @@ async def connection_create_kafka(
|
|
|
385
384
|
if secret_required:
|
|
386
385
|
tb_secret_bootstrap_servers = str(click.prompt(FeedbackManager.highlight(message=" ? Secret name")))
|
|
387
386
|
try:
|
|
388
|
-
|
|
387
|
+
save_secret_to_env_file(project=project, name=tb_secret_bootstrap_servers, value=bootstrap_servers)
|
|
389
388
|
except Exception as e:
|
|
390
389
|
raise CLIConnectionException(FeedbackManager.error(message=str(e)))
|
|
391
390
|
|
|
@@ -395,7 +394,7 @@ async def connection_create_kafka(
|
|
|
395
394
|
validate_kafka_key(key)
|
|
396
395
|
|
|
397
396
|
secret_required = not skip_secrets and click.confirm(
|
|
398
|
-
FeedbackManager.highlight(message=" ? Do you want to store the Kafka key in a
|
|
397
|
+
FeedbackManager.highlight(message=" ? Do you want to store the Kafka key in a .env.local file? [Y/n]"),
|
|
399
398
|
default=True,
|
|
400
399
|
show_default=False,
|
|
401
400
|
)
|
|
@@ -403,7 +402,7 @@ async def connection_create_kafka(
|
|
|
403
402
|
if secret_required:
|
|
404
403
|
tb_secret_key = str(click.prompt(FeedbackManager.highlight(message=" ? Secret name")))
|
|
405
404
|
try:
|
|
406
|
-
|
|
405
|
+
save_secret_to_env_file(project=project, name=tb_secret_key, value=key)
|
|
407
406
|
except Exception as e:
|
|
408
407
|
raise CLIConnectionException(FeedbackManager.error(message=str(e)))
|
|
409
408
|
|
|
@@ -413,7 +412,7 @@ async def connection_create_kafka(
|
|
|
413
412
|
validate_kafka_secret(secret)
|
|
414
413
|
|
|
415
414
|
secret_required = not skip_secrets and click.confirm(
|
|
416
|
-
FeedbackManager.highlight(message=" ? Do you want to store the Kafka secret in a
|
|
415
|
+
FeedbackManager.highlight(message=" ? Do you want to store the Kafka secret in a .env.local file? [Y/n]"),
|
|
417
416
|
default=True,
|
|
418
417
|
show_default=False,
|
|
419
418
|
)
|
|
@@ -421,7 +420,7 @@ async def connection_create_kafka(
|
|
|
421
420
|
if secret_required:
|
|
422
421
|
tb_secret_secret = str(click.prompt(FeedbackManager.highlight(message=" ? Secret name")))
|
|
423
422
|
try:
|
|
424
|
-
|
|
423
|
+
save_secret_to_env_file(project=project, name=tb_secret_secret, value=secret)
|
|
425
424
|
except Exception as e:
|
|
426
425
|
raise CLIConnectionException(FeedbackManager.error(message=str(e)))
|
|
427
426
|
|
|
@@ -124,6 +124,12 @@ async def create(
|
|
|
124
124
|
if data or prompt:
|
|
125
125
|
click.echo(FeedbackManager.success(message="✓ Resources created!\n"))
|
|
126
126
|
|
|
127
|
+
if not already_has_env_file(root_folder):
|
|
128
|
+
click.echo(FeedbackManager.highlight(message="\n» Creating .env.local file..."))
|
|
129
|
+
create_env_file(root_folder)
|
|
130
|
+
click.echo(FeedbackManager.success(message="✓ Done!\n"))
|
|
131
|
+
created_something = True
|
|
132
|
+
|
|
127
133
|
if not already_has_cicd(root_folder):
|
|
128
134
|
click.echo(FeedbackManager.highlight(message="\n» Creating CI/CD files for GitHub and GitLab..."))
|
|
129
135
|
init_git(root_folder)
|
|
@@ -230,6 +236,11 @@ def already_has_cursor_rules(folder: str) -> bool:
|
|
|
230
236
|
return any((Path(folder) / path).exists() for path in cursor_rules_paths)
|
|
231
237
|
|
|
232
238
|
|
|
239
|
+
def already_has_env_file(folder: str) -> bool:
|
|
240
|
+
env_file_pattern = ".env.*"
|
|
241
|
+
return any((Path(folder) / path).exists() for path in glob.glob(env_file_pattern))
|
|
242
|
+
|
|
243
|
+
|
|
233
244
|
def create_project_structure(folder: str):
|
|
234
245
|
folder_path = Path(folder)
|
|
235
246
|
PROJECT_PATHS_DESCRIPTIONS = {
|
|
@@ -433,6 +444,11 @@ GCS_SERVICE_ACCOUNT_CREDENTIALS_JSON {{{{ tb_secret("{svc_account_creds}") }}}}
|
|
|
433
444
|
return file_path
|
|
434
445
|
|
|
435
446
|
|
|
447
|
+
def create_env_file(folder: str):
|
|
448
|
+
env_file = Path(folder) / ".env.local"
|
|
449
|
+
env_file.write_text("")
|
|
450
|
+
|
|
451
|
+
|
|
436
452
|
def create_rules(folder: str, source: str, agent: str):
|
|
437
453
|
if agent == "cursor":
|
|
438
454
|
extension = ".cursorrules"
|
|
@@ -2,7 +2,7 @@ import re
|
|
|
2
2
|
from typing import Dict, Optional
|
|
3
3
|
|
|
4
4
|
import click
|
|
5
|
-
from dotenv import dotenv_values
|
|
5
|
+
from dotenv import dotenv_values, set_key
|
|
6
6
|
|
|
7
7
|
from tinybird.syncasync import async_to_sync
|
|
8
8
|
from tinybird.tb.client import TinyB
|
|
@@ -137,3 +137,12 @@ def load_secrets(project: Project, client: TinyB):
|
|
|
137
137
|
click.echo(FeedbackManager.success(message="✓ Secrets loaded!"))
|
|
138
138
|
except Exception as e:
|
|
139
139
|
click.echo(FeedbackManager.error(message=f"✗ Error: {e}"))
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def save_secret_to_env_file(project: Project, name: str, value: str):
|
|
143
|
+
env_path = project.path / ".env.local"
|
|
144
|
+
|
|
145
|
+
if not env_path.exists():
|
|
146
|
+
env_path.touch()
|
|
147
|
+
|
|
148
|
+
set_key(env_path, key_to_set=name, value_to_set=value)
|
|
@@ -23,7 +23,16 @@ from tinybird.tb.modules.shell import Shell
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class WatchProjectHandler(PatternMatchingEventHandler):
|
|
26
|
-
valid_extensions = [
|
|
26
|
+
valid_extensions = [
|
|
27
|
+
".datasource",
|
|
28
|
+
".pipe",
|
|
29
|
+
"connection",
|
|
30
|
+
FixtureExtension.CSV,
|
|
31
|
+
FixtureExtension.NDJSON,
|
|
32
|
+
".sql",
|
|
33
|
+
".env",
|
|
34
|
+
".env.local",
|
|
35
|
+
]
|
|
27
36
|
|
|
28
37
|
def __init__(self, shell: Shell, project: Project, process: Callable):
|
|
29
38
|
self.shell = shell
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/build_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/format_common.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/parse_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/datafile/pipe_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb/modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev200 → tinybird-0.0.1.dev202}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|