pywire 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 (202) hide show
  1. pywire-0.1.4/.github/CODEOWNERS +1 -0
  2. pywire-0.1.4/.github/workflows/ci.yml +80 -0
  3. pywire-0.1.4/.github/workflows/deploy-docs.yml +46 -0
  4. pywire-0.1.4/.github/workflows/publish.yml +44 -0
  5. {pywire-0.1.2 → pywire-0.1.4}/PKG-INFO +1 -1
  6. pywire-0.1.4/docs/.gitignore +21 -0
  7. pywire-0.1.4/docs/.prettierignore +4 -0
  8. pywire-0.1.4/docs/.prettierrc +7 -0
  9. pywire-0.1.4/docs/.vscode/extensions.json +4 -0
  10. pywire-0.1.4/docs/.vscode/launch.json +11 -0
  11. pywire-0.1.4/docs/README.md +49 -0
  12. pywire-0.1.4/docs/astro.config.mjs +39 -0
  13. pywire-0.1.4/docs/eslint.config.js +65 -0
  14. pywire-0.1.4/docs/package.json +36 -0
  15. pywire-0.1.4/docs/pnpm-lock.yaml +5719 -0
  16. pywire-0.1.4/docs/public/favicon.svg +1 -0
  17. pywire-0.1.4/docs/scripts/check +15 -0
  18. pywire-0.1.4/docs/scripts/lint +12 -0
  19. pywire-0.1.4/docs/src/assets/houston.webp +0 -0
  20. pywire-0.1.4/docs/src/content/docs/guides/example.md +11 -0
  21. pywire-0.1.4/docs/src/content/docs/guides/getting-started.md +52 -0
  22. pywire-0.1.4/docs/src/content/docs/guides/walkthrough.md +41 -0
  23. pywire-0.1.4/docs/src/content/docs/index.mdx +38 -0
  24. pywire-0.1.4/docs/src/content/docs/reference/api.md +24 -0
  25. pywire-0.1.4/docs/src/content/docs/reference/example.md +11 -0
  26. pywire-0.1.4/docs/src/content.config.ts +7 -0
  27. pywire-0.1.4/docs/src/styles/custom.css +42 -0
  28. pywire-0.1.4/docs/tsconfig.json +5 -0
  29. {pywire-0.1.2 → pywire-0.1.4}/pyproject.toml +6 -7
  30. pywire-0.1.4/scripts/README.md +10 -0
  31. pywire-0.1.4/scripts/build +11 -0
  32. pywire-0.1.4/scripts/check +28 -0
  33. pywire-0.1.4/scripts/coverage +5 -0
  34. pywire-0.1.4/scripts/docs +5 -0
  35. pywire-0.1.4/scripts/install +14 -0
  36. pywire-0.1.4/scripts/lint +20 -0
  37. pywire-0.1.4/scripts/test +14 -0
  38. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/main.py +1 -1
  39. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/build.mjs +1 -1
  40. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/generator.py +5 -40
  41. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/dev_server.py +0 -1
  42. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/loader.py +3 -0
  43. pywire-0.1.4/src/pywire/static/pywire.core.min.js +3 -0
  44. pywire-0.1.4/src/pywire/static/pywire.dev.min.js +20 -0
  45. pywire-0.1.4/tests/debug_router.py +18 -0
  46. pywire-0.1.4/tests/test_app_advanced.py +70 -0
  47. pywire-0.1.4/tests/test_app_exhaustive.py +378 -0
  48. pywire-0.1.4/tests/test_app_mode.py +68 -0
  49. pywire-0.1.4/tests/test_app_runtime.py +123 -0
  50. pywire-0.1.4/tests/test_async_features.py +69 -0
  51. pywire-0.1.4/tests/test_codegen_generator.py +172 -0
  52. pywire-0.1.4/tests/test_codegen_template.py +191 -0
  53. pywire-0.1.4/tests/test_codegen_template_exhaustive.py +119 -0
  54. pywire-0.1.4/tests/test_compile_error.py +101 -0
  55. pywire-0.1.4/tests/test_compiler_sourcemap.py +83 -0
  56. pywire-0.1.4/tests/test_comprehensive_python_syntax.py +816 -0
  57. pywire-0.1.4/tests/test_config.py +59 -0
  58. pywire-0.1.4/tests/test_custom_errors.py +41 -0
  59. pywire-0.1.4/tests/test_debug_middleware.py +74 -0
  60. pywire-0.1.4/tests/test_debug_mock.py +22 -0
  61. pywire-0.1.4/tests/test_error_handling_debug.py +80 -0
  62. pywire-0.1.4/tests/test_file_routing.py +245 -0
  63. pywire-0.1.4/tests/test_fixes.py +61 -0
  64. pywire-0.1.4/tests/test_form_validation.py +235 -0
  65. pywire-0.1.4/tests/test_generator_advanced.py +107 -0
  66. pywire-0.1.4/tests/test_generator_exhaustive.py +58 -0
  67. pywire-0.1.4/tests/test_hooks_removal.py +69 -0
  68. pywire-0.1.4/tests/test_http_transport.py +125 -0
  69. pywire-0.1.4/tests/test_inline_compilation.py +41 -0
  70. pywire-0.1.4/tests/test_interactivity_codegen_complex.py +82 -0
  71. pywire-0.1.4/tests/test_interactivity_compiler.py +94 -0
  72. pywire-0.1.4/tests/test_jinja_interpolation.py +74 -0
  73. pywire-0.1.4/tests/test_layouts.py +150 -0
  74. pywire-0.1.4/tests/test_lifecycle_hooks.py +111 -0
  75. pywire-0.1.4/tests/test_logging_stream.py +65 -0
  76. pywire-0.1.4/tests/test_method_binding.py +78 -0
  77. pywire-0.1.4/tests/test_middleware_error.py +66 -0
  78. pywire-0.1.4/tests/test_mode_gating.py +74 -0
  79. pywire-0.1.4/tests/test_naming_conventions.py +121 -0
  80. pywire-0.1.4/tests/test_parser_advanced.py +68 -0
  81. pywire-0.1.4/tests/test_parser_compiler.py +110 -0
  82. pywire-0.1.4/tests/test_pjax_error.py +36 -0
  83. pywire-0.1.4/tests/test_reactive_attributes.py +189 -0
  84. pywire-0.1.4/tests/test_relocation_error.py +85 -0
  85. pywire-0.1.4/tests/test_rendering.py +224 -0
  86. pywire-0.1.4/tests/test_router_exhaustive.py +123 -0
  87. pywire-0.1.4/tests/test_router_expansion.py +72 -0
  88. pywire-0.1.4/tests/test_router_runtime.py +95 -0
  89. pywire-0.1.4/tests/test_runtime_helpers.py +27 -0
  90. pywire-0.1.4/tests/test_script_injection.py +92 -0
  91. pywire-0.1.4/tests/test_server_validation.py +148 -0
  92. pywire-0.1.4/tests/test_static_assets.py +77 -0
  93. pywire-0.1.4/tests/test_strict_routing.py +130 -0
  94. pywire-0.1.4/tests/test_style_collector.py +36 -0
  95. pywire-0.1.4/tests/test_syntax_enforcement.py +66 -0
  96. pywire-0.1.4/tests/test_templating_features.py +83 -0
  97. pywire-0.1.4/tests/test_transport_advanced.py +55 -0
  98. pywire-0.1.4/tests/test_transport_exhaustive.py +216 -0
  99. pywire-0.1.4/tests/test_validation_exhaustive.py +264 -0
  100. pywire-0.1.4/tests/test_websocket_advanced.py +54 -0
  101. pywire-0.1.4/tests/test_websocket_exhaustive.py +228 -0
  102. pywire-0.1.4/tests/test_websocket_handler.py +132 -0
  103. pywire-0.1.4/tests/test_wire_primitive.py +140 -0
  104. pywire-0.1.4/tox.ini +10 -0
  105. pywire-0.1.4/uv.lock +1446 -0
  106. {pywire-0.1.2 → pywire-0.1.4}/.gitignore +0 -0
  107. {pywire-0.1.2 → pywire-0.1.4}/LICENSE +0 -0
  108. {pywire-0.1.2 → pywire-0.1.4}/README.md +0 -0
  109. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/__init__.py +0 -0
  110. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/__init__.py +0 -0
  111. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/generators.py +0 -0
  112. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/tui.py +0 -0
  113. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/validate.py +0 -0
  114. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/.prettierignore +0 -0
  115. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/.prettierrc +0 -0
  116. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/eslint.config.js +0 -0
  117. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/package.json +0 -0
  118. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/pnpm-lock.yaml +0 -0
  119. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/app.ts +0 -0
  120. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/dom-updater.test.ts +0 -0
  121. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/dom-updater.ts +0 -0
  122. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/index.ts +0 -0
  123. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transport-manager.test.ts +0 -0
  124. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transport-manager.ts +0 -0
  125. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/base.ts +0 -0
  126. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/http.ts +0 -0
  127. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/index.ts +0 -0
  128. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/websocket.ts +0 -0
  129. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/webtransport.ts +0 -0
  130. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/dev-app.ts +0 -0
  131. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/error-trace.test.ts +0 -0
  132. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/error-trace.ts +0 -0
  133. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/index.ts +0 -0
  134. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/status-overlay.ts +0 -0
  135. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/events/handler.test.ts +0 -0
  136. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/events/handler.ts +0 -0
  137. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/pywire.core.ts +0 -0
  138. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/pywire.dev.ts +0 -0
  139. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/tsconfig.json +0 -0
  140. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/vitest.config.ts +0 -0
  141. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/__init__.py +0 -0
  142. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/ast_nodes.py +0 -0
  143. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/__init__.py +0 -0
  144. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/base.py +0 -0
  145. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/conditional.py +0 -0
  146. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/events.py +0 -0
  147. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/form.py +0 -0
  148. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/loop.py +0 -0
  149. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/reactive.py +0 -0
  150. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/build.py +0 -0
  151. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/build_artifacts.py +0 -0
  152. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/__init__.py +0 -0
  153. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/attributes/__init__.py +0 -0
  154. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/attributes/base.py +0 -0
  155. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/attributes/events.py +0 -0
  156. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/directives/__init__.py +0 -0
  157. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/directives/base.py +0 -0
  158. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/directives/path.py +0 -0
  159. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/template.py +0 -0
  160. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/__init__.py +0 -0
  161. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/base.py +0 -0
  162. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/component.py +0 -0
  163. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/context.py +0 -0
  164. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/layout.py +0 -0
  165. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/no_spa.py +0 -0
  166. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/path.py +0 -0
  167. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/props.py +0 -0
  168. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/exceptions.py +0 -0
  169. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/interpolation/__init__.py +0 -0
  170. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/interpolation/base.py +0 -0
  171. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/interpolation/jinja.py +0 -0
  172. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/parser.py +0 -0
  173. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/paths.py +0 -0
  174. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/preprocessor.py +0 -0
  175. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/core/wire.py +0 -0
  176. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/py.typed +0 -0
  177. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/__init__.py +0 -0
  178. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/aioquic_server.py +0 -0
  179. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/app.py +0 -0
  180. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/compile_error_page.py +0 -0
  181. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/debug.py +0 -0
  182. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/dev_server.py.broken +0 -0
  183. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/error_page.py +0 -0
  184. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/error_renderer.py +0 -0
  185. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/escape.py +0 -0
  186. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/files.py +0 -0
  187. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/helpers.py +0 -0
  188. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/http_transport.py +0 -0
  189. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/logging.py +0 -0
  190. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/page.py +0 -0
  191. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/pydantic_integration.py +0 -0
  192. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/router.py +0 -0
  193. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/server.py +0 -0
  194. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/style_collector.py +0 -0
  195. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/upload_manager.py +0 -0
  196. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/validation.py +0 -0
  197. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/websocket.py +0 -0
  198. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/webtransport_handler.py +0 -0
  199. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/templates/error/404.html +0 -0
  200. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/templates/error/500.html +0 -0
  201. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/templates/error/base.html +0 -0
  202. {pywire-0.1.2 → pywire-0.1.4}/src/pywire/templates/error/compile_error.html +0 -0
@@ -0,0 +1 @@
1
+ @pywire/maintainers
@@ -0,0 +1,80 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ branches: ["main"]
8
+
9
+ jobs:
10
+ test:
11
+ name: "Tests"
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Setup Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: '20'
22
+ - name: Install pnpm
23
+ uses: pnpm/action-setup@v2
24
+ with:
25
+ version: 9
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v5
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+ enable-cache: true
31
+ - name: Build client bundle
32
+ run: |
33
+ cd src/pywire/client
34
+ pnpm install --frozen-lockfile
35
+ pnpm build
36
+ - name: Install dependencies
37
+ run: uv sync --all-extras
38
+ - name: Run tests
39
+ run: uv run pytest
40
+
41
+ build:
42
+ name: "Build"
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+
47
+ - name: Setup Node.js
48
+ uses: actions/setup-node@v4
49
+ with:
50
+ node-version: '20'
51
+
52
+ - name: Install pnpm
53
+ uses: pnpm/action-setup@v2
54
+ with:
55
+ version: 9
56
+
57
+ - name: Install dependencies
58
+ # This will install both client and doc dependencies if pnpm-workspace is set up,
59
+ # otherwise we might need to be specific. Assuming standard pnpm install works for the root/client.
60
+ # But scripts/build assumes we can run pnpm build in specific dirs.
61
+ # Let's check how scripts/build works again.
62
+ # scripts/build does `cd docs && pnpm build` and `cd src/pywire/client && pnpm build`.
63
+ # So we probably just need pnpm available.
64
+ # But we probably need to install dependencies in those folders first?
65
+ # The script doesn't seem to have install steps.
66
+ # Let's assume we need to install dependencies.
67
+ # actually, looking at scripts/build again:
68
+ # cd docs && pnpm build
69
+ # cd src/pywire/client && pnpm build
70
+ # It assumes deps are installed.
71
+ # We should probably run scripts/install? No that's python.
72
+ # We should probably do pnpm install in the steps.
73
+ run: |
74
+ # We need to install dependencies for docs and client before building
75
+ # Assuming these have package.json files
76
+ cd docs && pnpm install --frozen-lockfile
77
+ cd ../src/pywire/client && pnpm install --frozen-lockfile
78
+
79
+ - name: Run build script
80
+ run: ./scripts/build
@@ -0,0 +1,46 @@
1
+ name: Deploy Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "v*"
9
+
10
+ jobs:
11
+ deploy-docs:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ deployments: write
16
+ name: Deploy Documentation
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: '20'
24
+
25
+ - name: Install pnpm
26
+ uses: pnpm/action-setup@v2
27
+ with:
28
+ version: 8
29
+
30
+ - name: Install dependencies
31
+ working-directory: docs
32
+ run: pnpm install
33
+
34
+ - name: Build
35
+ working-directory: docs
36
+ run: pnpm run build
37
+
38
+ - name: Deploy to Cloudflare Pages
39
+ uses: cloudflare/pages-action@v1
40
+ with:
41
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
42
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
43
+ projectName: pywire-docs
44
+ directory: docs/dist
45
+ gitHubToken: ${{ secrets.GITHUB_TOKEN }}
46
+ branch: ${{ github.ref_name == 'main' && 'nightly' || 'main' }}
@@ -0,0 +1,44 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ environment: release
12
+ permissions:
13
+ id-token: write
14
+ contents: write
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Install pnpm
18
+ uses: pnpm/action-setup@v2
19
+ with:
20
+ version: 9
21
+
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: '20'
26
+ cache: 'pnpm'
27
+ cache-dependency-path: 'src/pywire/client/pnpm-lock.yaml'
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v5
31
+ with:
32
+ enable-cache: true
33
+
34
+ - name: Build client assets
35
+ run: |
36
+ cd src/pywire/client
37
+ pnpm install
38
+ pnpm build
39
+
40
+ - name: Build
41
+ run: uv build
42
+
43
+ - name: Publish
44
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywire
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: HTML-over-the-wire Python web framework
5
5
  Author-email: Reece Holmdahl <reece@pywire.dev>
6
6
  License-File: LICENSE
@@ -0,0 +1,21 @@
1
+ # build output
2
+ dist/
3
+ # generated types
4
+ .astro/
5
+
6
+ # dependencies
7
+ node_modules/
8
+
9
+ # logs
10
+ npm-debug.log*
11
+ yarn-debug.log*
12
+ yarn-error.log*
13
+ pnpm-debug.log*
14
+
15
+
16
+ # environment variables
17
+ .env
18
+ .env.production
19
+
20
+ # macOS-specific files
21
+ .DS_Store
@@ -0,0 +1,4 @@
1
+ node_modules/
2
+ dist/
3
+ pnpm-lock.yaml
4
+ *.lock
@@ -0,0 +1,7 @@
1
+ {
2
+ "tabWidth": 2,
3
+ "semi": false,
4
+ "singleQuote": true,
5
+ "printWidth": 100,
6
+ "plugins": ["prettier-plugin-astro"]
7
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "recommendations": ["astro-build.astro-vscode"],
3
+ "unwantedRecommendations": []
4
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "command": "./node_modules/.bin/astro dev",
6
+ "name": "Development server",
7
+ "request": "launch",
8
+ "type": "node-terminal"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,49 @@
1
+ # Starlight Starter Kit: Basics
2
+
3
+ [![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
4
+
5
+ ```
6
+ pnpm create astro@latest -- --template starlight
7
+ ```
8
+
9
+ > 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
10
+
11
+ ## 🚀 Project Structure
12
+
13
+ Inside of your Astro + Starlight project, you'll see the following folders and files:
14
+
15
+ ```
16
+ .
17
+ ├── public/
18
+ ├── src/
19
+ │ ├── assets/
20
+ │ ├── content/
21
+ │ │ └── docs/
22
+ │ └── content.config.ts
23
+ ├── astro.config.mjs
24
+ ├── package.json
25
+ └── tsconfig.json
26
+ ```
27
+
28
+ Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
29
+
30
+ Images can be added to `src/assets/` and embedded in Markdown with a relative link.
31
+
32
+ Static assets, like favicons, can be placed in the `public/` directory.
33
+
34
+ ## 🧞 Commands
35
+
36
+ All commands are run from the root of the project, from a terminal:
37
+
38
+ | Command | Action |
39
+ | :--------------------- | :----------------------------------------------- |
40
+ | `pnpm install` | Installs dependencies |
41
+ | `pnpm dev` | Starts local dev server at `localhost:4321` |
42
+ | `pnpm build` | Build your production site to `./dist/` |
43
+ | `pnpm preview` | Preview your build locally, before deploying |
44
+ | `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
45
+ | `pnpm astro -- --help` | Get help using the Astro CLI |
46
+
47
+ ## 👀 Want to learn more?
48
+
49
+ Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
@@ -0,0 +1,39 @@
1
+ // @ts-check
2
+ import { defineConfig } from 'astro/config'
3
+ import starlight from '@astrojs/starlight'
4
+
5
+ // https://astro.build/config
6
+ export default defineConfig({
7
+ site: 'https://pywire.dev',
8
+ base: '/docs',
9
+ integrations: [
10
+ starlight({
11
+ title: 'pywire',
12
+ customCss: ['./src/styles/custom.css'],
13
+ social: [
14
+ { icon: 'github', label: 'GitHub', href: 'https://github.com/pywire/pywire' },
15
+ { icon: 'discord', label: 'Discord', href: 'https://discord.gg/pywire' },
16
+ ],
17
+ sidebar: [
18
+ {
19
+ label: 'Guides',
20
+ items: [
21
+ { label: 'Getting Started', slug: 'guides/getting-started' },
22
+ { label: 'Walkthrough', slug: 'guides/walkthrough' },
23
+ ],
24
+ },
25
+ {
26
+ label: 'Reference',
27
+ autogenerate: { directory: 'reference' },
28
+ },
29
+ {
30
+ label: 'Project',
31
+ items: [
32
+ { label: 'Back to Website', link: 'https://pywire.dev', attrs: { target: '_self' } },
33
+ { label: 'Releases', link: 'https://github.com/pywire/pywire/releases' },
34
+ ],
35
+ },
36
+ ],
37
+ }),
38
+ ],
39
+ })
@@ -0,0 +1,65 @@
1
+ import globals from 'globals'
2
+ import js from '@eslint/js'
3
+ import astro from 'eslint-plugin-astro'
4
+ import tseslint from '@typescript-eslint/eslint-plugin'
5
+ import tsParser from '@typescript-eslint/parser'
6
+ import astroParser from 'astro-eslint-parser'
7
+
8
+ export default [
9
+ // Ignore patterns
10
+ {
11
+ ignores: ['dist/**', 'node_modules/**', '.astro/**'],
12
+ },
13
+
14
+ // Base configuration
15
+ {
16
+ languageOptions: {
17
+ globals: {
18
+ ...globals.node,
19
+ ...globals.browser,
20
+ },
21
+ ecmaVersion: 'latest',
22
+ sourceType: 'module',
23
+ },
24
+ },
25
+
26
+ // ESLint recommended rules
27
+ js.configs.recommended,
28
+
29
+ // Astro files
30
+ {
31
+ files: ['**/*.astro'],
32
+ plugins: {
33
+ astro,
34
+ },
35
+ languageOptions: {
36
+ parser: astroParser,
37
+ parserOptions: {
38
+ parser: '@typescript-eslint/parser',
39
+ extraFileExtensions: ['.astro'],
40
+ },
41
+ },
42
+ rules: {
43
+ ...astro.configs.recommended.rules,
44
+ 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
45
+ },
46
+ },
47
+
48
+ // TypeScript files
49
+ {
50
+ files: ['**/*.ts'],
51
+ plugins: {
52
+ '@typescript-eslint': tseslint,
53
+ },
54
+ languageOptions: {
55
+ parser: tsParser,
56
+ },
57
+ rules: {
58
+ ...tseslint.configs.recommended.rules,
59
+ '@typescript-eslint/no-unused-vars': [
60
+ 'error',
61
+ { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
62
+ ],
63
+ },
64
+ },
65
+ ]
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "docs",
3
+ "type": "module",
4
+ "version": "0.1.0",
5
+ "scripts": {
6
+ "dev": "astro dev",
7
+ "start": "astro dev",
8
+ "build": "astro build",
9
+ "preview": "astro preview",
10
+ "astro": "astro",
11
+ "lint": "eslint .",
12
+ "lint:fix": "eslint . --fix",
13
+ "format": "prettier --write .",
14
+ "format:check": "prettier --check .",
15
+ "typecheck": "astro check",
16
+ "check": "pnpm format:check && pnpm lint && pnpm typecheck"
17
+ },
18
+ "dependencies": {
19
+ "@astrojs/check": "^0.9.6",
20
+ "@astrojs/starlight": "^0.37.4",
21
+ "astro": "^5.6.1",
22
+ "sharp": "^0.34.2",
23
+ "typescript": "^5.9.3"
24
+ },
25
+ "devDependencies": {
26
+ "@eslint/js": "^9.35.0",
27
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
28
+ "@typescript-eslint/parser": "^8.43.0",
29
+ "astro-eslint-parser": "^1.2.2",
30
+ "eslint": "^9.35.0",
31
+ "eslint-plugin-astro": "^1.3.1",
32
+ "globals": "^16.4.0",
33
+ "prettier": "^3.6.2",
34
+ "prettier-plugin-astro": "^0.14.1"
35
+ }
36
+ }