arkitekt-next 0.8.41__py3-none-any.whl → 0.8.43__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.

Potentially problematic release.


This version of arkitekt-next might be problematic. Click here for more details.

@@ -55,6 +55,7 @@ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_d
55
55
 
56
56
  chosen_services = registry.service_builders
57
57
 
58
+
58
59
  if services:
59
60
  chosen_services = {
60
61
  key: service
@@ -70,6 +71,19 @@ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_d
70
71
  chosen_services = {service: chosen_services[service]}
71
72
 
72
73
 
74
+
75
+
76
+ if os.path.exists(config):
77
+ if click.confirm(
78
+ f"GraphQL Config file already exists. Do you want to merge your choices?"
79
+ ):
80
+ file = yaml.load(open(config, "r"), Loader=yaml.FullLoader)
81
+ projects = file.get("projects", {})
82
+ click.echo(f"Merging {",".join(chosen_services.keys())} in {",".join(projects.keys())}...")
83
+
84
+
85
+ has_done_something = False
86
+
73
87
 
74
88
  for key, service in chosen_services.items():
75
89
  try:
@@ -80,6 +94,13 @@ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_d
80
94
  get_console(ctx).print(f"[red]No schema or project found for {key} [/]")
81
95
  continue
82
96
 
97
+ if key in projects:
98
+ get_console(ctx).print(f"[red]Project {key} already exists [/]")
99
+ if not click.confirm("Do you want to overwrite it?"):
100
+ continue
101
+
102
+ has_done_something = True
103
+
83
104
  if documents:
84
105
  os.makedirs(os.path.join(app_documents, key), exist_ok=True)
85
106
  if seperate_doc_dirs:
@@ -119,15 +140,13 @@ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_d
119
140
  except Exception as e:
120
141
  raise ClickException(f"Failed to initialize project for {key}. Error: {e}") from e
121
142
 
122
- if os.path.exists(config):
123
- if not click.confirm(
124
- f"GraphQL Config file already exists. Do you want to overwrite?"
125
- ):
126
- click.echo("Aborting...")
127
- ctx.abort()
128
-
129
- graph_config_path = os.path.join(app_directory, config)
130
- yaml.safe_dump(
131
- {"projects": projects}, open(graph_config_path, "w"), sort_keys=False
132
- )
133
- get_console(ctx).print(f"Config file written to {graph_config_path}")
143
+
144
+ if has_done_something:
145
+ graph_config_path = os.path.join(app_directory, config)
146
+ yaml.safe_dump(
147
+ {"projects": projects}, open(graph_config_path, "w"), sort_keys=False
148
+ )
149
+ get_console(ctx).print(f"Config file written to {graph_config_path}")
150
+ else:
151
+ get_console(ctx).print("No projects initialized")
152
+ get_console(ctx).print("Exiting...")
@@ -117,7 +117,7 @@ with_choose_services = click.option(
117
117
  help="The services to create the codegen for",
118
118
  multiple=True,
119
119
  type=click.Choice(compile_services()),
120
- default=["mikro"],
120
+ default=[],
121
121
  )
122
122
  with_graphql_config = click.option(
123
123
  "--config",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arkitekt-next
3
- Version: 0.8.41
3
+ Version: 0.8.43
4
4
  Summary: client for the arkitekt_next platform
5
5
  License: MIT
6
6
  Author: jhnnsrs
@@ -52,7 +52,7 @@ arkitekt_next/cli/commands/call/main.py,sha256=SdxlvSgA17-M_gwItiFU_srbh-CNdHpCT
52
52
  arkitekt_next/cli/commands/call/remote.py,sha256=Id6t1nUdXmERx9wbutEhvryUMAM80_G4HVHkhYZosTE,2097
53
53
  arkitekt_next/cli/commands/gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  arkitekt_next/cli/commands/gen/compile.py,sha256=F0rAeBL4WWLdBGQRxVNqe5Bjek_SovhNO5rKrMEhj_4,1457
55
- arkitekt_next/cli/commands/gen/init.py,sha256=QtH7-lUDrlbBSEBR14O6rON7cQaI7oORT-4owe-P1h8,4267
55
+ arkitekt_next/cli/commands/gen/init.py,sha256=Zuvx02qRN9HQs6OkDB2h2usdRHiPmYb5rocK5sWeP2s,4887
56
56
  arkitekt_next/cli/commands/gen/main.py,sha256=_BdkcsXoWY5_3gmboq2e0pGYM6lAnwqQgBAyxmvdf6U,947
57
57
  arkitekt_next/cli/commands/gen/watch.py,sha256=nf4QckdTJOWxvKoeNRwvC4rXQ4xhIx8LCDDJzpPhcY8,1189
58
58
  arkitekt_next/cli/commands/init/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -89,7 +89,7 @@ arkitekt_next/cli/errors.py,sha256=zLTjaCbun6qM2nTldjyZd-DvykqKn5A3Gn80uYdx7Vc,9
89
89
  arkitekt_next/cli/inspect.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
90
90
  arkitekt_next/cli/io.py,sha256=QSnyIjPKZZ_pWp-b_hbM4XGwarCf4IYTgcXtNXBawH8,7143
91
91
  arkitekt_next/cli/main.py,sha256=Ua7sq_OfC491F6r6zNs_oEiR4jVOsZwxLpX0ZXR0Jk0,2227
92
- arkitekt_next/cli/options.py,sha256=ojOJ2oAUmPeSaITcwdtbBJcz8kGb1dp4vFw7KYQfZis,3821
92
+ arkitekt_next/cli/options.py,sha256=LwhEdjZutH_go568buS37L9Gn_roinrCC6BUu2sC3B0,3814
93
93
  arkitekt_next/cli/schemas/fluss.schema.graphql,sha256=MqrSpOxtWO9kWFCoUn9ySBPhIH3XozFiqrQl2zjEbiQ,35803
94
94
  arkitekt_next/cli/schemas/gucker.schema.graphql,sha256=r_KL-MoFRCGUobbtcBLCnpmFcali2A12TguynqQgmN4,152947
95
95
  arkitekt_next/cli/schemas/kabinet.schema.graphql,sha256=-N7igrfzFphjA2qV-abW59k8jtdJh1py4008W0MkqrM,9915
@@ -132,8 +132,8 @@ arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
132
132
  arkitekt_next/service_registry.py,sha256=oga1_fy7clwtcQO7XcSzWlyu2d5dna9H79uKLv8fKI0,6119
133
133
  arkitekt_next/tqdm.py,sha256=lQcJI5Q6Py7Gy88hOCiJujjPEEGd8G2k1mOVJJ6oYe8,1531
134
134
  arkitekt_next/utils.py,sha256=QETdzn_GIMSw6LdaXL89bqvqp9MGwEBK8Lj54MpnMwc,2396
135
- arkitekt_next-0.8.41.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
136
- arkitekt_next-0.8.41.dist-info/METADATA,sha256=zZl8i_6WYk2xndHkpW6eDelUZyV-oeD3FA1_9BhFzcY,6210
137
- arkitekt_next-0.8.41.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
138
- arkitekt_next-0.8.41.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
139
- arkitekt_next-0.8.41.dist-info/RECORD,,
135
+ arkitekt_next-0.8.43.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
136
+ arkitekt_next-0.8.43.dist-info/METADATA,sha256=nDN6-T9qyNtDmLwTtTCBM1dMl6HUE3xGpYIrnp1xUAg,6210
137
+ arkitekt_next-0.8.43.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
138
+ arkitekt_next-0.8.43.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
139
+ arkitekt_next-0.8.43.dist-info/RECORD,,