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.
- pywire-0.1.4/.github/CODEOWNERS +1 -0
- pywire-0.1.4/.github/workflows/ci.yml +80 -0
- pywire-0.1.4/.github/workflows/deploy-docs.yml +46 -0
- pywire-0.1.4/.github/workflows/publish.yml +44 -0
- {pywire-0.1.2 → pywire-0.1.4}/PKG-INFO +1 -1
- pywire-0.1.4/docs/.gitignore +21 -0
- pywire-0.1.4/docs/.prettierignore +4 -0
- pywire-0.1.4/docs/.prettierrc +7 -0
- pywire-0.1.4/docs/.vscode/extensions.json +4 -0
- pywire-0.1.4/docs/.vscode/launch.json +11 -0
- pywire-0.1.4/docs/README.md +49 -0
- pywire-0.1.4/docs/astro.config.mjs +39 -0
- pywire-0.1.4/docs/eslint.config.js +65 -0
- pywire-0.1.4/docs/package.json +36 -0
- pywire-0.1.4/docs/pnpm-lock.yaml +5719 -0
- pywire-0.1.4/docs/public/favicon.svg +1 -0
- pywire-0.1.4/docs/scripts/check +15 -0
- pywire-0.1.4/docs/scripts/lint +12 -0
- pywire-0.1.4/docs/src/assets/houston.webp +0 -0
- pywire-0.1.4/docs/src/content/docs/guides/example.md +11 -0
- pywire-0.1.4/docs/src/content/docs/guides/getting-started.md +52 -0
- pywire-0.1.4/docs/src/content/docs/guides/walkthrough.md +41 -0
- pywire-0.1.4/docs/src/content/docs/index.mdx +38 -0
- pywire-0.1.4/docs/src/content/docs/reference/api.md +24 -0
- pywire-0.1.4/docs/src/content/docs/reference/example.md +11 -0
- pywire-0.1.4/docs/src/content.config.ts +7 -0
- pywire-0.1.4/docs/src/styles/custom.css +42 -0
- pywire-0.1.4/docs/tsconfig.json +5 -0
- {pywire-0.1.2 → pywire-0.1.4}/pyproject.toml +6 -7
- pywire-0.1.4/scripts/README.md +10 -0
- pywire-0.1.4/scripts/build +11 -0
- pywire-0.1.4/scripts/check +28 -0
- pywire-0.1.4/scripts/coverage +5 -0
- pywire-0.1.4/scripts/docs +5 -0
- pywire-0.1.4/scripts/install +14 -0
- pywire-0.1.4/scripts/lint +20 -0
- pywire-0.1.4/scripts/test +14 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/main.py +1 -1
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/build.mjs +1 -1
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/generator.py +5 -40
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/dev_server.py +0 -1
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/loader.py +3 -0
- pywire-0.1.4/src/pywire/static/pywire.core.min.js +3 -0
- pywire-0.1.4/src/pywire/static/pywire.dev.min.js +20 -0
- pywire-0.1.4/tests/debug_router.py +18 -0
- pywire-0.1.4/tests/test_app_advanced.py +70 -0
- pywire-0.1.4/tests/test_app_exhaustive.py +378 -0
- pywire-0.1.4/tests/test_app_mode.py +68 -0
- pywire-0.1.4/tests/test_app_runtime.py +123 -0
- pywire-0.1.4/tests/test_async_features.py +69 -0
- pywire-0.1.4/tests/test_codegen_generator.py +172 -0
- pywire-0.1.4/tests/test_codegen_template.py +191 -0
- pywire-0.1.4/tests/test_codegen_template_exhaustive.py +119 -0
- pywire-0.1.4/tests/test_compile_error.py +101 -0
- pywire-0.1.4/tests/test_compiler_sourcemap.py +83 -0
- pywire-0.1.4/tests/test_comprehensive_python_syntax.py +816 -0
- pywire-0.1.4/tests/test_config.py +59 -0
- pywire-0.1.4/tests/test_custom_errors.py +41 -0
- pywire-0.1.4/tests/test_debug_middleware.py +74 -0
- pywire-0.1.4/tests/test_debug_mock.py +22 -0
- pywire-0.1.4/tests/test_error_handling_debug.py +80 -0
- pywire-0.1.4/tests/test_file_routing.py +245 -0
- pywire-0.1.4/tests/test_fixes.py +61 -0
- pywire-0.1.4/tests/test_form_validation.py +235 -0
- pywire-0.1.4/tests/test_generator_advanced.py +107 -0
- pywire-0.1.4/tests/test_generator_exhaustive.py +58 -0
- pywire-0.1.4/tests/test_hooks_removal.py +69 -0
- pywire-0.1.4/tests/test_http_transport.py +125 -0
- pywire-0.1.4/tests/test_inline_compilation.py +41 -0
- pywire-0.1.4/tests/test_interactivity_codegen_complex.py +82 -0
- pywire-0.1.4/tests/test_interactivity_compiler.py +94 -0
- pywire-0.1.4/tests/test_jinja_interpolation.py +74 -0
- pywire-0.1.4/tests/test_layouts.py +150 -0
- pywire-0.1.4/tests/test_lifecycle_hooks.py +111 -0
- pywire-0.1.4/tests/test_logging_stream.py +65 -0
- pywire-0.1.4/tests/test_method_binding.py +78 -0
- pywire-0.1.4/tests/test_middleware_error.py +66 -0
- pywire-0.1.4/tests/test_mode_gating.py +74 -0
- pywire-0.1.4/tests/test_naming_conventions.py +121 -0
- pywire-0.1.4/tests/test_parser_advanced.py +68 -0
- pywire-0.1.4/tests/test_parser_compiler.py +110 -0
- pywire-0.1.4/tests/test_pjax_error.py +36 -0
- pywire-0.1.4/tests/test_reactive_attributes.py +189 -0
- pywire-0.1.4/tests/test_relocation_error.py +85 -0
- pywire-0.1.4/tests/test_rendering.py +224 -0
- pywire-0.1.4/tests/test_router_exhaustive.py +123 -0
- pywire-0.1.4/tests/test_router_expansion.py +72 -0
- pywire-0.1.4/tests/test_router_runtime.py +95 -0
- pywire-0.1.4/tests/test_runtime_helpers.py +27 -0
- pywire-0.1.4/tests/test_script_injection.py +92 -0
- pywire-0.1.4/tests/test_server_validation.py +148 -0
- pywire-0.1.4/tests/test_static_assets.py +77 -0
- pywire-0.1.4/tests/test_strict_routing.py +130 -0
- pywire-0.1.4/tests/test_style_collector.py +36 -0
- pywire-0.1.4/tests/test_syntax_enforcement.py +66 -0
- pywire-0.1.4/tests/test_templating_features.py +83 -0
- pywire-0.1.4/tests/test_transport_advanced.py +55 -0
- pywire-0.1.4/tests/test_transport_exhaustive.py +216 -0
- pywire-0.1.4/tests/test_validation_exhaustive.py +264 -0
- pywire-0.1.4/tests/test_websocket_advanced.py +54 -0
- pywire-0.1.4/tests/test_websocket_exhaustive.py +228 -0
- pywire-0.1.4/tests/test_websocket_handler.py +132 -0
- pywire-0.1.4/tests/test_wire_primitive.py +140 -0
- pywire-0.1.4/tox.ini +10 -0
- pywire-0.1.4/uv.lock +1446 -0
- {pywire-0.1.2 → pywire-0.1.4}/.gitignore +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/LICENSE +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/README.md +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/generators.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/tui.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/cli/validate.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/.prettierignore +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/.prettierrc +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/eslint.config.js +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/package.json +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/pnpm-lock.yaml +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/app.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/dom-updater.test.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/dom-updater.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/index.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transport-manager.test.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transport-manager.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/base.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/http.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/index.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/websocket.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/core/transports/webtransport.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/dev-app.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/error-trace.test.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/error-trace.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/index.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/dev/status-overlay.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/events/handler.test.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/events/handler.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/pywire.core.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/src/pywire.dev.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/tsconfig.json +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/client/vitest.config.ts +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/ast_nodes.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/base.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/conditional.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/events.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/form.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/loop.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/attributes/reactive.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/build.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/build_artifacts.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/attributes/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/attributes/base.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/attributes/events.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/directives/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/directives/base.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/directives/path.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/codegen/template.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/base.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/component.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/context.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/layout.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/no_spa.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/path.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/directives/props.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/exceptions.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/interpolation/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/interpolation/base.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/interpolation/jinja.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/parser.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/paths.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/compiler/preprocessor.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/core/wire.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/py.typed +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/__init__.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/aioquic_server.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/app.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/compile_error_page.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/debug.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/dev_server.py.broken +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/error_page.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/error_renderer.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/escape.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/files.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/helpers.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/http_transport.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/logging.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/page.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/pydantic_integration.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/router.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/server.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/style_collector.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/upload_manager.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/validation.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/websocket.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/runtime/webtransport_handler.py +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/templates/error/404.html +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/templates/error/500.html +0 -0
- {pywire-0.1.2 → pywire-0.1.4}/src/pywire/templates/error/base.html +0 -0
- {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
|
|
@@ -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,49 @@
|
|
|
1
|
+
# Starlight Starter Kit: Basics
|
|
2
|
+
|
|
3
|
+
[](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
|
+
}
|