coloco 0.1.2__tar.gz → 0.1.4__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.
Files changed (41) hide show
  1. {coloco-0.1.2 → coloco-0.1.4}/PKG-INFO +1 -1
  2. {coloco-0.1.2 → coloco-0.1.4}/pyproject.toml +2 -2
  3. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/cli/api.py +7 -2
  4. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/docker/Dockerfile-tpl +0 -4
  5. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+app/app.svelte-tpl +6 -2
  6. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+node/package.json-tpl +2 -3
  7. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+node/vite.config.ts-tpl +1 -1
  8. {coloco-0.1.2 → coloco-0.1.4}/LICENSE +0 -0
  9. {coloco-0.1.2 → coloco-0.1.4}/README.md +0 -0
  10. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/__init__.py +0 -0
  11. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/__main__.py +0 -0
  12. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/api.py +0 -0
  13. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/app.py +0 -0
  14. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/cli/createapp.py +0 -0
  15. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/cli/dev.py +0 -0
  16. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/cli/node.py +0 -0
  17. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/cli/package.py +0 -0
  18. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/codegen.py +0 -0
  19. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/exceptions.py +0 -0
  20. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/lifespan.py +0 -0
  21. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/requirements.txt +0 -0
  22. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/static.py +0 -0
  23. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/docker/.dockerignore-tpl +0 -0
  24. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/docker/docker-compose.yml-tpl +0 -0
  25. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+app/404.svelte-tpl +0 -0
  26. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+app/app.css-tpl +0 -0
  27. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+app/index.html-tpl +0 -0
  28. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+app/index.svelte-tpl +0 -0
  29. /coloco-0.1.2/src/coloco/templates/standard/+app/main.ts → /coloco-0.1.4/src/coloco/templates/standard/+app/main.ts-tpl +0 -0
  30. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+node/openapi-ts.config.ts-tpl +0 -0
  31. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+node/svelte.config.js-tpl +0 -0
  32. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+node/tsconfig.json-tpl +0 -0
  33. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/+node/vite-env.d.ts-tpl +0 -0
  34. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/.gitignore-tpl +0 -0
  35. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/README.md-tpl +0 -0
  36. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/example/api.py-tpl +0 -0
  37. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/example/index.svelte-tpl +0 -0
  38. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/main.py-tpl +0 -0
  39. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/requirements.txt-tpl +0 -0
  40. {coloco-0.1.2 → coloco-0.1.4}/src/coloco/templates/standard/tsconfig.json-tpl +0 -0
  41. {coloco-0.1.2 → coloco-0.1.4}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: coloco
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: A kit for creating FastAPI + Svelte applications
5
5
  Author-Email: Channel Cat <channelcat@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "coloco"
3
- version = "0.1.2"
3
+ version = "0.1.4"
4
4
  description = "A kit for creating FastAPI + Svelte applications"
5
5
  authors = [
6
6
  { name = "Channel Cat", email = "channelcat@gmail.com" },
@@ -20,7 +20,7 @@ readme = "README.md"
20
20
  text = "MIT"
21
21
 
22
22
  [project.scripts]
23
- coloco = "coloco:main"
23
+ coloco = "coloco.__main__:app"
24
24
 
25
25
  [build-system]
26
26
  requires = [
@@ -1,8 +1,10 @@
1
+ from ..app import ColocoApp
1
2
  from importlib import import_module
2
- import typer
3
+ import os
3
4
  from rich import print
5
+ import sys
6
+ import typer
4
7
  import uvicorn
5
- from ..app import ColocoApp
6
8
 
7
9
 
8
10
  app = typer.Typer()
@@ -22,8 +24,11 @@ def serve(
22
24
  )
23
25
  raise typer.Abort()
24
26
 
27
+
25
28
  module_name, var_name = app.rsplit(".", 1)
26
29
  try:
30
+ # Needed for when running the binary
31
+ sys.path.append(os.getcwd())
27
32
  module = import_module(module_name)
28
33
  except ImportError:
29
34
  print(f"[red]Module or python file {module_name} not found[/red]")
@@ -9,10 +9,6 @@ WORKDIR /app
9
9
  ADD ./requirements.txt /app/requirements.txt
10
10
  RUN python -m pip install -r /app/requirements.txt
11
11
 
12
- # TODO: remove this when coloco is a package
13
- ADD ./coloco/requirements.txt /app/coloco/requirements.txt
14
- RUN python -m pip install -r /app/coloco/requirements.txt
15
-
16
12
  # Node Install
17
13
  RUN mkdir /.npm && chown -R 1000:1000 "/.npm"
18
14
  ADD ./+node/package.json /app/package.json
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { setupClient } from "@coloco/client";
2
+ import { setupClient } from "@coloco/api-client-svelte";
3
3
  import { route, Router, getRoutes } from "@coloco/router";
4
4
 
5
5
  import Index from "./index.svelte";
@@ -15,11 +15,15 @@
15
15
  </script>
16
16
 
17
17
  <main>
18
- Main Page<br /><br />
18
+ Main Page
19
+
20
+ <br /><br />
19
21
 
20
22
  <a use:route href="/">Home</a><br />
21
23
  <a use:route href="/example">Example</a><br />
22
24
  <a use:route href="/missing">Missing</a>
25
+
26
+ <br /><br />
23
27
 
24
28
  <Router basePath="/" {routes} />
25
29
  </main>
@@ -10,11 +10,10 @@
10
10
  "check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json"
11
11
  },
12
12
  "devDependencies": {
13
- "@coloco/api-client-svelte": "^0.1.0",
14
- "@coloco/router": "^0.1.0",
13
+ "@coloco/api-client-svelte": "^0.1.1",
14
+ "@coloco/router": "^0.1.2",
15
15
  "@hey-api/client-fetch": "^0.8.2",
16
16
  "@hey-api/openapi-ts": "^0.64.7",
17
- "@mateothegreat/svelte5-router": "^0.1.38",
18
17
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
19
18
  "@tsconfig/svelte": "^5.0.4",
20
19
  "@types/node": "^22.13.4",
@@ -12,7 +12,7 @@ export default defineConfig({
12
12
  root: resolve(root, '+app'),
13
13
  server: {
14
14
  host: "0.0.0.0",
15
- port: 5172,
15
+ port: 5173,
16
16
  },
17
17
  clearScreen: false,
18
18
  resolve: {
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