biucingcli 0.9.1__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.
- biucingcli/__init__.py +5 -0
- biucingcli/cli.py +849 -0
- biucingcli/template_data/android/template/.editorconfig +9 -0
- biucingcli/template_data/android/template/.gitignore +26 -0
- biucingcli/template_data/android/template/.mise.toml +3 -0
- biucingcli/template_data/android/template/Brewfile +6 -0
- biucingcli/template_data/android/template/Makefile +103 -0
- biucingcli/template_data/android/template/README.md +163 -0
- biucingcli/template_data/android/template/app/build.gradle.kts +178 -0
- biucingcli/template_data/android/template/app/proguard-rules.pro +1 -0
- biucingcli/template_data/android/template/app/src/androidTest/java/app/HomeRouteUiTest.kt +21 -0
- biucingcli/template_data/android/template/app/src/main/AndroidManifest.xml +18 -0
- biucingcli/template_data/android/template/app/src/main/java/app/MainActivity.kt +36 -0
- biucingcli/template_data/android/template/app/src/main/res/values/strings.xml +4 -0
- biucingcli/template_data/android/template/app/src/main/res/values/themes.xml +8 -0
- biucingcli/template_data/android/template/app/src/test/java/app/AppSmokeTest.kt +19 -0
- biucingcli/template_data/android/template/build.gradle.kts +27 -0
- biucingcli/template_data/android/template/core/designsystem/build.gradle.kts +33 -0
- biucingcli/template_data/android/template/core/designsystem/src/main/java/designsystem/Components.kt +75 -0
- biucingcli/template_data/android/template/core/designsystem/src/main/java/designsystem/DesignTokens.kt +23 -0
- biucingcli/template_data/android/template/core/designsystem/src/main/java/designsystem/Theme.kt +110 -0
- biucingcli/template_data/android/template/core/model/build.gradle.kts +26 -0
- biucingcli/template_data/android/template/core/model/src/main/java/model/Greeting.kt +6 -0
- biucingcli/template_data/android/template/core/model/src/test/java/model/GreetingTest.kt +16 -0
- biucingcli/template_data/android/template/core/network/build.gradle.kts +26 -0
- biucingcli/template_data/android/template/core/network/src/main/java/network/AppEnvironment.kt +17 -0
- biucingcli/template_data/android/template/core/testing/build.gradle.kts +27 -0
- biucingcli/template_data/android/template/core/testing/src/main/java/testing/FakeAppEnvironmentProvider.kt +13 -0
- biucingcli/template_data/android/template/docs/release-delivery.md +68 -0
- biucingcli/template_data/android/template/docs/release-signing.properties.example +20 -0
- biucingcli/template_data/android/template/fastlane/.env.example +22 -0
- biucingcli/template_data/android/template/fastlane/Appfile +1 -0
- biucingcli/template_data/android/template/fastlane/Fastfile +121 -0
- biucingcli/template_data/android/template/feature/home/build.gradle.kts +35 -0
- biucingcli/template_data/android/template/feature/home/src/main/java/home/HomeRoute.kt +38 -0
- biucingcli/template_data/android/template/feature/settings/build.gradle.kts +34 -0
- biucingcli/template_data/android/template/feature/settings/src/main/java/settings/SettingsRoute.kt +35 -0
- biucingcli/template_data/android/template/gradle/libs.versions.toml +35 -0
- biucingcli/template_data/android/template/gradle/verification-metadata.xml +3462 -0
- biucingcli/template_data/android/template/gradle/wrapper/gradle-wrapper.jar +0 -0
- biucingcli/template_data/android/template/gradle/wrapper/gradle-wrapper.jar.sha256 +1 -0
- biucingcli/template_data/android/template/gradle/wrapper/gradle-wrapper.properties +10 -0
- biucingcli/template_data/android/template/gradle.properties +4 -0
- biucingcli/template_data/android/template/gradlew +252 -0
- biucingcli/template_data/android/template/gradlew.bat +94 -0
- biucingcli/template_data/android/template/scripts/artifact-info +11 -0
- biucingcli/template_data/android/template/scripts/bootstrap +17 -0
- biucingcli/template_data/android/template/scripts/doctor +133 -0
- biucingcli/template_data/android/template/scripts/setup-android-sdk +23 -0
- biucingcli/template_data/android/template/scripts/sync-gradle-wrapper +19 -0
- biucingcli/template_data/android/template/scripts/verify-gradle-supply-chain +61 -0
- biucingcli/template_data/android/template/scripts/verify-release-artifact +104 -0
- biucingcli/template_data/android/template/settings.gradle.kts +25 -0
- biucingcli/template_data/android/template.json +146 -0
- biucingcli/template_data/apple/template/.gitignore +28 -0
- biucingcli/template_data/apple/template/.mise.toml +4 -0
- biucingcli/template_data/apple/template/.swiftformat +10 -0
- biucingcli/template_data/apple/template/.swiftlint.yml +33 -0
- biucingcli/template_data/apple/template/App/Config/ProjectDescriptionHelpers/Module.swift +6 -0
- biucingcli/template_data/apple/template/App/Config/XCConfig/Base.xcconfig +4 -0
- biucingcli/template_data/apple/template/App/Project.swift +66 -0
- biucingcli/template_data/apple/template/App/Targets/App/Resources/.gitkeep +1 -0
- biucingcli/template_data/apple/template/App/Targets/App/Sources/AppEntry.swift +9 -0
- biucingcli/template_data/apple/template/App/Targets/App/Sources/HomeView.swift +18 -0
- biucingcli/template_data/apple/template/App/Targets/App/Sources/HomeViewModel.swift +38 -0
- biucingcli/template_data/apple/template/App/Targets/AppTests/Sources/AppTests.swift +59 -0
- biucingcli/template_data/apple/template/Brewfile +8 -0
- biucingcli/template_data/apple/template/Makefile +128 -0
- biucingcli/template_data/apple/template/Packages/AppServices/Package.swift +20 -0
- biucingcli/template_data/apple/template/Packages/AppServices/Sources/AppServices/StarterMetadata.swift +52 -0
- biucingcli/template_data/apple/template/Packages/DesignSystem/Package.swift +20 -0
- biucingcli/template_data/apple/template/Packages/DesignSystem/Sources/DesignSystem/Theme.swift +8 -0
- biucingcli/template_data/apple/template/README.md +133 -0
- biucingcli/template_data/apple/template/Tuist.swift +8 -0
- biucingcli/template_data/apple/template/Workspace.swift +11 -0
- biucingcli/template_data/apple/template/docs/release-delivery.md +55 -0
- biucingcli/template_data/apple/template/fastlane/.env.example +20 -0
- biucingcli/template_data/apple/template/fastlane/Appfile +3 -0
- biucingcli/template_data/apple/template/fastlane/Fastfile +126 -0
- biucingcli/template_data/apple/template/fastlane/Matchfile +7 -0
- biucingcli/template_data/apple/template/scripts/bootstrap +9 -0
- biucingcli/template_data/apple/template/scripts/doctor +163 -0
- biucingcli/template_data/apple/template/scripts/setup-xcode +6 -0
- biucingcli/template_data/apple/template/scripts/test-destination +42 -0
- biucingcli/template_data/apple/template/scripts/verify-release-identity +88 -0
- biucingcli/template_data/apple/template.json +110 -0
- biucingcli/template_data/frontend/template/.dockerignore +8 -0
- biucingcli/template_data/frontend/template/.env.example +1 -0
- biucingcli/template_data/frontend/template/.gitignore +7 -0
- biucingcli/template_data/frontend/template/.npmrc +1 -0
- biucingcli/template_data/frontend/template/.prettierignore +2 -0
- biucingcli/template_data/frontend/template/.prettierrc.json +4 -0
- biucingcli/template_data/frontend/template/Dockerfile +25 -0
- biucingcli/template_data/frontend/template/Dockerfile.dev +35 -0
- biucingcli/template_data/frontend/template/Dockerfile.dev.full +40 -0
- biucingcli/template_data/frontend/template/Makefile +137 -0
- biucingcli/template_data/frontend/template/README.md +146 -0
- biucingcli/template_data/frontend/template/compose.dev.yaml +29 -0
- biucingcli/template_data/frontend/template/eslint.config.js +27 -0
- biucingcli/template_data/frontend/template/index.html +12 -0
- biucingcli/template_data/frontend/template/nginx.conf +11 -0
- biucingcli/template_data/frontend/template/package.json +50 -0
- biucingcli/template_data/frontend/template/playwright.production.config.ts +21 -0
- biucingcli/template_data/frontend/template/playwright.smoke.config.ts +19 -0
- biucingcli/template_data/frontend/template/pnpm-lock.yaml +4054 -0
- biucingcli/template_data/frontend/template/public/.gitkeep +1 -0
- biucingcli/template_data/frontend/template/scripts/browser-smoke-production +55 -0
- biucingcli/template_data/frontend/template/scripts/doctor +46 -0
- biucingcli/template_data/frontend/template/src/App.test.tsx +18 -0
- biucingcli/template_data/frontend/template/src/App.tsx +5 -0
- biucingcli/template_data/frontend/template/src/components/MetricCard.tsx +14 -0
- biucingcli/template_data/frontend/template/src/components/TaskPanel.tsx +32 -0
- biucingcli/template_data/frontend/template/src/config/env.ts +3 -0
- biucingcli/template_data/frontend/template/src/hooks/useProjectOverview.ts +24 -0
- biucingcli/template_data/frontend/template/src/index.css +208 -0
- biucingcli/template_data/frontend/template/src/main.tsx +11 -0
- biucingcli/template_data/frontend/template/src/pages/HomePage.tsx +60 -0
- biucingcli/template_data/frontend/template/src/router/AppRouter.tsx +14 -0
- biucingcli/template_data/frontend/template/src/services/api/client.ts +33 -0
- biucingcli/template_data/frontend/template/src/services/projectOverview.ts +39 -0
- biucingcli/template_data/frontend/template/src/test/setup.ts +1 -0
- biucingcli/template_data/frontend/template/src/types/projectOverview.ts +22 -0
- biucingcli/template_data/frontend/template/src/vite-env.d.ts +9 -0
- biucingcli/template_data/frontend/template/tests/browser-smoke.spec.ts +16 -0
- biucingcli/template_data/frontend/template/tests/production-browser-smoke.spec.ts +22 -0
- biucingcli/template_data/frontend/template/tsconfig.json +21 -0
- biucingcli/template_data/frontend/template/vite.config.ts +12 -0
- biucingcli/template_data/frontend/template.json +81 -0
- biucingcli/template_data/harmonyos/template/.gitignore +21 -0
- biucingcli/template_data/harmonyos/template/.mise.toml +2 -0
- biucingcli/template_data/harmonyos/template/AppScope/app.json5 +10 -0
- biucingcli/template_data/harmonyos/template/AppScope/resources/base/element/string.json +8 -0
- biucingcli/template_data/harmonyos/template/AppScope/resources/base/media/background.svg +3 -0
- biucingcli/template_data/harmonyos/template/AppScope/resources/base/media/foreground.svg +4 -0
- biucingcli/template_data/harmonyos/template/AppScope/resources/base/media/layered_image.json +6 -0
- biucingcli/template_data/harmonyos/template/Makefile +106 -0
- biucingcli/template_data/harmonyos/template/README.md +152 -0
- biucingcli/template_data/harmonyos/template/build-profile.json5 +36 -0
- biucingcli/template_data/harmonyos/template/code-linter.json5 +12 -0
- biucingcli/template_data/harmonyos/template/docs/release-signing.local.properties.example +14 -0
- biucingcli/template_data/harmonyos/template/entry/build-profile.json5 +9 -0
- biucingcli/template_data/harmonyos/template/entry/hvigorfile.ts +6 -0
- biucingcli/template_data/harmonyos/template/entry/oh-package.json5 +9 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/ets/core/config/AppConfig.ets +10 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/ets/core/designsystem/Tokens.ets +28 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/ets/entryability/EntryAbility.ets +29 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/ets/pages/Index.ets +47 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/ets/pages/Settings.ets +96 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/module.json5 +34 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/resources/base/element/color.json +24 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/resources/base/element/string.json +12 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/resources/base/media/app_icon.svg +5 -0
- biucingcli/template_data/harmonyos/template/entry/src/main/resources/base/profile/main_pages.json +6 -0
- biucingcli/template_data/harmonyos/template/entry/src/test/List.test.ets +11 -0
- biucingcli/template_data/harmonyos/template/hvigor/hvigor-config.json5 +8 -0
- biucingcli/template_data/harmonyos/template/hvigorfile.ts +6 -0
- biucingcli/template_data/harmonyos/template/oh-package-lock.json5 +19 -0
- biucingcli/template_data/harmonyos/template/oh-package.json5 +13 -0
- biucingcli/template_data/harmonyos/template/scripts/artifact-info +31 -0
- biucingcli/template_data/harmonyos/template/scripts/bootstrap +38 -0
- biucingcli/template_data/harmonyos/template/scripts/doctor +147 -0
- biucingcli/template_data/harmonyos/template/scripts/lint +105 -0
- biucingcli/template_data/harmonyos/template/scripts/release-build +199 -0
- biucingcli/template_data/harmonyos/template/scripts/release-preflight +109 -0
- biucingcli/template_data/harmonyos/template/scripts/test +28 -0
- biucingcli/template_data/harmonyos/template/scripts/verify-release-artifact +173 -0
- biucingcli/template_data/harmonyos/template/scripts/verify-supply-chain +70 -0
- biucingcli/template_data/harmonyos/template.json +134 -0
- biucingcli/template_data/microservice/template/.air.toml +11 -0
- biucingcli/template_data/microservice/template/.dockerignore +5 -0
- biucingcli/template_data/microservice/template/.gitignore +4 -0
- biucingcli/template_data/microservice/template/.mise.toml +3 -0
- biucingcli/template_data/microservice/template/Brewfile +7 -0
- biucingcli/template_data/microservice/template/Dockerfile +44 -0
- biucingcli/template_data/microservice/template/Dockerfile.dev +50 -0
- biucingcli/template_data/microservice/template/Makefile +145 -0
- biucingcli/template_data/microservice/template/README.md +191 -0
- biucingcli/template_data/microservice/template/api/buf.gen.yaml +11 -0
- biucingcli/template_data/microservice/template/api/buf.yaml +11 -0
- biucingcli/template_data/microservice/template/api/proto/service/v1/service.proto +18 -0
- biucingcli/template_data/microservice/template/cmd/server/main.go +81 -0
- biucingcli/template_data/microservice/template/compose.dev.yaml +49 -0
- biucingcli/template_data/microservice/template/configs/config.yaml +18 -0
- biucingcli/template_data/microservice/template/deploy/compose.yaml +35 -0
- biucingcli/template_data/microservice/template/deploy/otel-collector.yaml +15 -0
- biucingcli/template_data/microservice/template/go.mod +53 -0
- biucingcli/template_data/microservice/template/go.sum +138 -0
- biucingcli/template_data/microservice/template/internal/config/config.go +112 -0
- biucingcli/template_data/microservice/template/internal/config/config_test.go +92 -0
- biucingcli/template_data/microservice/template/internal/handler/health.go +25 -0
- biucingcli/template_data/microservice/template/internal/handler/ping.go +25 -0
- biucingcli/template_data/microservice/template/internal/model/health.go +8 -0
- biucingcli/template_data/microservice/template/internal/model/ping.go +7 -0
- biucingcli/template_data/microservice/template/internal/repository/.gitkeep +1 -0
- biucingcli/template_data/microservice/template/internal/router/router.go +26 -0
- biucingcli/template_data/microservice/template/internal/runtime/server.go +116 -0
- biucingcli/template_data/microservice/template/internal/runtime/server_test.go +161 -0
- biucingcli/template_data/microservice/template/internal/service/health.go +26 -0
- biucingcli/template_data/microservice/template/internal/service/ping.go +23 -0
- biucingcli/template_data/microservice/template/internal/telemetry/telemetry.go +56 -0
- biucingcli/template_data/microservice/template/internal/transport/grpc.go +51 -0
- biucingcli/template_data/microservice/template/internal/transport/ping.go +28 -0
- biucingcli/template_data/microservice/template/scripts/bootstrap +29 -0
- biucingcli/template_data/microservice/template/scripts/doctor +115 -0
- biucingcli/template_data/microservice/template/tests/server_test.go +153 -0
- biucingcli/template_data/microservice/template.json +114 -0
- biucingcli/template_data/web-service/template/.air.toml +11 -0
- biucingcli/template_data/web-service/template/.dockerignore +5 -0
- biucingcli/template_data/web-service/template/.gitignore +5 -0
- biucingcli/template_data/web-service/template/.mise.toml +2 -0
- biucingcli/template_data/web-service/template/Brewfile +5 -0
- biucingcli/template_data/web-service/template/Dockerfile +41 -0
- biucingcli/template_data/web-service/template/Dockerfile.dev +45 -0
- biucingcli/template_data/web-service/template/Makefile +113 -0
- biucingcli/template_data/web-service/template/README.md +164 -0
- biucingcli/template_data/web-service/template/cmd/server/main.go +50 -0
- biucingcli/template_data/web-service/template/compose.dev.yaml +28 -0
- biucingcli/template_data/web-service/template/compose.yaml +14 -0
- biucingcli/template_data/web-service/template/configs/config.yaml +10 -0
- biucingcli/template_data/web-service/template/go.mod +36 -0
- biucingcli/template_data/web-service/template/go.sum +89 -0
- biucingcli/template_data/web-service/template/internal/config/config.go +84 -0
- biucingcli/template_data/web-service/template/internal/config/config_test.go +88 -0
- biucingcli/template_data/web-service/template/internal/handler/health.go +25 -0
- biucingcli/template_data/web-service/template/internal/handler/ping.go +25 -0
- biucingcli/template_data/web-service/template/internal/handler/user.go +40 -0
- biucingcli/template_data/web-service/template/internal/model/health.go +6 -0
- biucingcli/template_data/web-service/template/internal/model/ping.go +7 -0
- biucingcli/template_data/web-service/template/internal/model/user.go +7 -0
- biucingcli/template_data/web-service/template/internal/repository/.gitkeep +1 -0
- biucingcli/template_data/web-service/template/internal/repository/user.go +37 -0
- biucingcli/template_data/web-service/template/internal/router/router.go +28 -0
- biucingcli/template_data/web-service/template/internal/runtime/server.go +76 -0
- biucingcli/template_data/web-service/template/internal/runtime/server_test.go +139 -0
- biucingcli/template_data/web-service/template/internal/service/health.go +22 -0
- biucingcli/template_data/web-service/template/internal/service/ping.go +23 -0
- biucingcli/template_data/web-service/template/internal/service/user.go +27 -0
- biucingcli/template_data/web-service/template/scripts/bootstrap +23 -0
- biucingcli/template_data/web-service/template/scripts/doctor +83 -0
- biucingcli/template_data/web-service/template/tests/server_test.go +160 -0
- biucingcli/template_data/web-service/template.json +88 -0
- biucingcli/template_data/worker/template/.dockerignore +3 -0
- biucingcli/template_data/worker/template/.gitignore +2 -0
- biucingcli/template_data/worker/template/.mise.toml +2 -0
- biucingcli/template_data/worker/template/Brewfile +1 -0
- biucingcli/template_data/worker/template/Dockerfile +19 -0
- biucingcli/template_data/worker/template/Dockerfile.dev +9 -0
- biucingcli/template_data/worker/template/Makefile +105 -0
- biucingcli/template_data/worker/template/README.md +164 -0
- biucingcli/template_data/worker/template/cmd/worker/main.go +41 -0
- biucingcli/template_data/worker/template/compose.dev.yaml +29 -0
- biucingcli/template_data/worker/template/configs/config.json +11 -0
- biucingcli/template_data/worker/template/go.mod +3 -0
- biucingcli/template_data/worker/template/go.sum +1 -0
- biucingcli/template_data/worker/template/internal/config/config.go +108 -0
- biucingcli/template_data/worker/template/internal/config/config_test.go +86 -0
- biucingcli/template_data/worker/template/internal/runtime/runner.go +199 -0
- biucingcli/template_data/worker/template/internal/runtime/runner_test.go +215 -0
- biucingcli/template_data/worker/template/internal/task/heartbeat.go +19 -0
- biucingcli/template_data/worker/template/scripts/bootstrap +6 -0
- biucingcli/template_data/worker/template/scripts/doctor +41 -0
- biucingcli/template_data/worker/template/tests/worker_test.go +44 -0
- biucingcli/template_data/worker/template.json +100 -0
- biucingcli/templates.py +902 -0
- biucingcli-0.9.1.dist-info/METADATA +204 -0
- biucingcli-0.9.1.dist-info/RECORD +269 -0
- biucingcli-0.9.1.dist-info/WHEEL +5 -0
- biucingcli-0.9.1.dist-info/entry_points.txt +2 -0
- biucingcli-0.9.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
APP_NAME={{PACKAGE_NAME}}
|
|
2
|
+
WORKTREE_ROOT ?=$(shell git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
3
|
+
WORKTREE_LABEL ?=$(shell basename "$(WORKTREE_ROOT)" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-' | sed 's/^-//; s/-$$//')
|
|
4
|
+
WORKTREE_ID ?=$(shell printf '%s' "$(WORKTREE_ROOT)" | shasum | cut -c1-8)
|
|
5
|
+
WORKTREE_SLUG ?=$(APP_NAME)-$(WORKTREE_ID)
|
|
6
|
+
COMPOSE_PROJECT_NAME ?=$(WORKTREE_SLUG)
|
|
7
|
+
IMAGE ?=$(WORKTREE_SLUG)
|
|
8
|
+
TAG ?=dev
|
|
9
|
+
IMAGE_REF := $(IMAGE):$(TAG)
|
|
10
|
+
COMPOSE ?=COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker compose
|
|
11
|
+
DOCKER ?=docker
|
|
12
|
+
BUILDER_IMAGE ?=node:20-alpine
|
|
13
|
+
RUNTIME_IMAGE ?=nginx:1.27-alpine
|
|
14
|
+
DEV_BASE_IMAGE ?=node:20-bookworm
|
|
15
|
+
DEV_COMPOSE_FILE ?=compose.dev.yaml
|
|
16
|
+
DEV_SERVICE ?=frontend-dev
|
|
17
|
+
DEV_DOCKERFILE ?=Dockerfile.dev
|
|
18
|
+
DEV_PORT ?=5173
|
|
19
|
+
DEV_HOST_PORT ?=$(DEV_PORT)
|
|
20
|
+
HOST_PORT ?=8080
|
|
21
|
+
CONTAINER_PORT ?=80
|
|
22
|
+
RUNTIME_CONTAINER ?=$(WORKTREE_SLUG)-production-smoke
|
|
23
|
+
PNPM_HOME ?=$(WORKTREE_ROOT)/.pnpm-home/$(WORKTREE_ID)
|
|
24
|
+
PNPM_STORE_DIR ?=$(WORKTREE_ROOT)/.pnpm-store
|
|
25
|
+
export COMPOSE_PROJECT_NAME
|
|
26
|
+
export DEV_HOST_PORT
|
|
27
|
+
export DEV_PORT
|
|
28
|
+
export HOST_PORT
|
|
29
|
+
export CONTAINER_PORT
|
|
30
|
+
export PNPM_HOME
|
|
31
|
+
export PNPM_STORE_DIR
|
|
32
|
+
export DEV_BASE_IMAGE
|
|
33
|
+
|
|
34
|
+
.PHONY: worktree-info worktree-doctor worktree-compose-config clean-worktree bootstrap bootstrap-full install lockfile-update doctor dev dev-shell lint typecheck test verify build preview browser-install browser-smoke browser-smoke-production format format-check docker-build docker-run clean help
|
|
35
|
+
|
|
36
|
+
worktree-info:
|
|
37
|
+
@printf '%s\n' "Worktree root: $(WORKTREE_ROOT)"
|
|
38
|
+
@printf '%s\n' "Worktree label: $(WORKTREE_LABEL)"
|
|
39
|
+
@printf '%s\n' "Worktree ID: $(WORKTREE_ID)"
|
|
40
|
+
@printf '%s\n' "Worktree slug: $(WORKTREE_SLUG)"
|
|
41
|
+
@printf '%s\n' "Compose project: $(COMPOSE_PROJECT_NAME)"
|
|
42
|
+
@printf '%s\n' "Dev URL: http://127.0.0.1:$(DEV_HOST_PORT)"
|
|
43
|
+
@printf '%s\n' "Runtime URL: http://127.0.0.1:$(HOST_PORT)"
|
|
44
|
+
@printf '%s\n' "Production smoke container: $(RUNTIME_CONTAINER)"
|
|
45
|
+
@printf '%s\n' "Image ref: $(IMAGE_REF)"
|
|
46
|
+
@printf '%s\n' "Builder image: $(BUILDER_IMAGE)"
|
|
47
|
+
@printf '%s\n' "Runtime base image: $(RUNTIME_IMAGE)"
|
|
48
|
+
@printf '%s\n' "Development base image: $(DEV_BASE_IMAGE)"
|
|
49
|
+
@printf '%s\n' "Compose file: $(DEV_COMPOSE_FILE)"
|
|
50
|
+
@printf '%s\n' "pnpm home: $(PNPM_HOME)"
|
|
51
|
+
@printf '%s\n' "pnpm store: $(PNPM_STORE_DIR)"
|
|
52
|
+
|
|
53
|
+
worktree-doctor:
|
|
54
|
+
@$(MAKE) --no-print-directory worktree-info
|
|
55
|
+
@case "$(PNPM_HOME)" in "$(WORKTREE_ROOT)"/*) ;; *) printf '%s\n' "PNPM_HOME should stay inside this worktree: $(PNPM_HOME)"; exit 1;; esac
|
|
56
|
+
@case "$(PNPM_STORE_DIR)" in "$(WORKTREE_ROOT)"/*) ;; *) printf '%s\n' "PNPM_STORE_DIR should stay inside this worktree: $(PNPM_STORE_DIR)"; exit 1;; esac
|
|
57
|
+
@if [ "$(DEV_HOST_PORT)" = "5173" ]; then printf '%s\n' "Warning: DEV_HOST_PORT uses the default 5173; override it when another worktree is running."; fi
|
|
58
|
+
@if [ "$(HOST_PORT)" = "8080" ]; then printf '%s\n' "Warning: HOST_PORT uses the default 8080; override it when another runtime container is running."; fi
|
|
59
|
+
@if ! command -v lsof >/dev/null 2>&1; then printf '%s\n' "Port occupancy checks skipped: lsof is not available."; else \
|
|
60
|
+
if lsof -nP -iTCP:$(DEV_HOST_PORT) -sTCP:LISTEN >/dev/null 2>&1; then printf '%s\n%s\n' "Warning: DEV_HOST_PORT $(DEV_HOST_PORT) is already in use." "Suggested override: DEV_HOST_PORT=$$(( $(DEV_HOST_PORT) + 10000 )) make dev"; fi; \
|
|
61
|
+
if lsof -nP -iTCP:$(HOST_PORT) -sTCP:LISTEN >/dev/null 2>&1; then printf '%s\n%s\n' "Warning: HOST_PORT $(HOST_PORT) is already in use." "Suggested override: HOST_PORT=$$(( $(HOST_PORT) + 10000 )) make docker-run"; fi; \
|
|
62
|
+
fi
|
|
63
|
+
@printf '%s\n' "Compose config check: make worktree-compose-config"
|
|
64
|
+
|
|
65
|
+
worktree-compose-config:
|
|
66
|
+
@if ! command -v docker >/dev/null 2>&1; then printf '%s\n' "Docker is not available; cannot render Compose config."; exit 1; fi
|
|
67
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) config
|
|
68
|
+
|
|
69
|
+
clean-worktree:
|
|
70
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) down --remove-orphans --volumes
|
|
71
|
+
@$(DOCKER) rm -f "$(RUNTIME_CONTAINER)" >/dev/null 2>&1 || true
|
|
72
|
+
|
|
73
|
+
bootstrap:
|
|
74
|
+
DEV_DOCKERFILE=$(DEV_DOCKERFILE) $(COMPOSE) -f $(DEV_COMPOSE_FILE) build $(DEV_SERVICE)
|
|
75
|
+
|
|
76
|
+
bootstrap-full:
|
|
77
|
+
DEV_DOCKERFILE=Dockerfile.dev.full $(COMPOSE) -f $(DEV_COMPOSE_FILE) build $(DEV_SERVICE)
|
|
78
|
+
|
|
79
|
+
doctor:
|
|
80
|
+
./scripts/doctor
|
|
81
|
+
|
|
82
|
+
install:
|
|
83
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm install --frozen-lockfile
|
|
84
|
+
|
|
85
|
+
lockfile-update:
|
|
86
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm install --no-frozen-lockfile
|
|
87
|
+
|
|
88
|
+
dev:
|
|
89
|
+
DEV_DOCKERFILE=$(DEV_DOCKERFILE) $(COMPOSE) -f $(DEV_COMPOSE_FILE) up $(DEV_SERVICE)
|
|
90
|
+
|
|
91
|
+
dev-shell:
|
|
92
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) bash
|
|
93
|
+
|
|
94
|
+
lint:
|
|
95
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm lint
|
|
96
|
+
|
|
97
|
+
typecheck:
|
|
98
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm typecheck
|
|
99
|
+
|
|
100
|
+
test:
|
|
101
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm test
|
|
102
|
+
|
|
103
|
+
verify: doctor lint typecheck test build
|
|
104
|
+
|
|
105
|
+
build:
|
|
106
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm build
|
|
107
|
+
|
|
108
|
+
preview:
|
|
109
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm --service-ports $(DEV_SERVICE) pnpm preview --host 0.0.0.0 --port $(DEV_PORT)
|
|
110
|
+
|
|
111
|
+
browser-install:
|
|
112
|
+
DEV_DOCKERFILE=$(DEV_DOCKERFILE) $(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) bash -lc "pnpm install --frozen-lockfile && pnpm browser:install"
|
|
113
|
+
|
|
114
|
+
browser-smoke:
|
|
115
|
+
DEV_DOCKERFILE=$(DEV_DOCKERFILE) $(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm browser:smoke
|
|
116
|
+
|
|
117
|
+
browser-smoke-production: docker-build browser-install
|
|
118
|
+
DOCKER="$(DOCKER)" IMAGE_REF="$(IMAGE_REF)" HOST_PORT="$(HOST_PORT)" CONTAINER_PORT="$(CONTAINER_PORT)" RUNTIME_CONTAINER="$(RUNTIME_CONTAINER)" DEV_COMPOSE_FILE="$(DEV_COMPOSE_FILE)" DEV_SERVICE="$(DEV_SERVICE)" DEV_DOCKERFILE="$(DEV_DOCKERFILE)" COMPOSE_PROJECT_NAME="$(COMPOSE_PROJECT_NAME)" ./scripts/browser-smoke-production
|
|
119
|
+
|
|
120
|
+
format:
|
|
121
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm format
|
|
122
|
+
|
|
123
|
+
format-check:
|
|
124
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) run --rm $(DEV_SERVICE) pnpm format:check
|
|
125
|
+
|
|
126
|
+
docker-build:
|
|
127
|
+
$(DOCKER) build --build-arg BUILDER_IMAGE=$(BUILDER_IMAGE) --build-arg RUNTIME_IMAGE=$(RUNTIME_IMAGE) -t $(IMAGE_REF) .
|
|
128
|
+
|
|
129
|
+
docker-run:
|
|
130
|
+
$(DOCKER) run --rm -p $(HOST_PORT):$(CONTAINER_PORT) $(IMAGE_REF)
|
|
131
|
+
|
|
132
|
+
clean:
|
|
133
|
+
$(COMPOSE) -f $(DEV_COMPOSE_FILE) down --remove-orphans
|
|
134
|
+
@$(DOCKER) rm -f "$(RUNTIME_CONTAINER)" >/dev/null 2>&1 || true
|
|
135
|
+
|
|
136
|
+
help:
|
|
137
|
+
@printf '%s\n' "Common commands:" " make bootstrap Prepare project dependencies and tooling" " make doctor Check the local environment" " make lint Run static checks" " make test Run automated tests" " make verify Run the template quality gate" " make build Build the project" " make clean Remove generated build state" " make help Show this command contract"
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# {{DISPLAY_NAME}}
|
|
2
|
+
|
|
3
|
+
This project was generated by BiucingCLI.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- React
|
|
8
|
+
- TypeScript
|
|
9
|
+
- Docker
|
|
10
|
+
|
|
11
|
+
## Project Layout
|
|
12
|
+
|
|
13
|
+
- `src/pages`: route-level pages or screens
|
|
14
|
+
- `src/router`: route declarations and top-level router composition
|
|
15
|
+
- `src/components`: reusable UI building blocks
|
|
16
|
+
- `src/hooks`: stateful view hooks
|
|
17
|
+
- `src/services`: API client, data access, and local fallback services
|
|
18
|
+
- `src/config`: runtime configuration derived from Vite environment variables
|
|
19
|
+
- `src/types`: shared TypeScript models
|
|
20
|
+
|
|
21
|
+
## Docker Workflow
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
make bootstrap
|
|
25
|
+
make dev
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This starter is designed to run development, checks, and runtime packaging inside Docker by default.
|
|
29
|
+
The default development image stays relatively light and installs project dependencies into a named volume on first use.
|
|
30
|
+
If you want a heavier image that prewarms the pnpm store and Chromium browser cache ahead of time, run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
make bootstrap-full
|
|
34
|
+
DEV_DOCKERFILE=Dockerfile.dev.full make dev
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Available Commands
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
make bootstrap
|
|
41
|
+
make bootstrap-full
|
|
42
|
+
make install
|
|
43
|
+
make lockfile-update
|
|
44
|
+
make dev
|
|
45
|
+
make dev-shell
|
|
46
|
+
make doctor
|
|
47
|
+
make lint
|
|
48
|
+
make typecheck
|
|
49
|
+
make test
|
|
50
|
+
make verify
|
|
51
|
+
make build
|
|
52
|
+
make browser-install
|
|
53
|
+
make browser-smoke
|
|
54
|
+
make browser-smoke-production
|
|
55
|
+
make docker-build
|
|
56
|
+
make docker-run
|
|
57
|
+
make clean
|
|
58
|
+
make help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Local Frontend URL
|
|
62
|
+
|
|
63
|
+
- Development server: `http://127.0.0.1:5173`
|
|
64
|
+
- Runtime image: `http://127.0.0.1:8080`
|
|
65
|
+
|
|
66
|
+
## Worktree Workflow
|
|
67
|
+
|
|
68
|
+
This starter is safe to run from parallel Git worktrees when each worktree keeps its own identity and host ports.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
make worktree-info
|
|
72
|
+
make worktree-doctor
|
|
73
|
+
make worktree-compose-config
|
|
74
|
+
DEV_HOST_PORT=5174 make dev
|
|
75
|
+
HOST_PORT=8081 make docker-run
|
|
76
|
+
make clean-worktree
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- `WORKTREE_LABEL` is derived from the worktree directory name for display.
|
|
80
|
+
- `WORKTREE_ID` is derived from the current worktree path by default and can be overridden.
|
|
81
|
+
- `COMPOSE_PROJECT_NAME` defaults to `{{PACKAGE_NAME}}-$(WORKTREE_ID)`, so Compose containers, networks, and volumes stay scoped to the worktree.
|
|
82
|
+
- `IMAGE` defaults to the worktree slug and `TAG` defaults to `dev`, so runtime image tags do not overwrite another worktree by default.
|
|
83
|
+
- `.npmrc` keeps direct `pnpm install` package-store state under `.pnpm-store` inside this worktree.
|
|
84
|
+
- `make worktree-doctor` checks whether published host ports are already in use and prints suggested overrides.
|
|
85
|
+
- `make worktree-compose-config` renders the current worktree's Compose config without starting containers.
|
|
86
|
+
- `make clean-worktree` removes only the current worktree's Compose containers, networks, and volumes.
|
|
87
|
+
|
|
88
|
+
## Direct pnpm Scripts
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pnpm dev
|
|
92
|
+
pnpm lint
|
|
93
|
+
pnpm build
|
|
94
|
+
pnpm typecheck
|
|
95
|
+
pnpm test
|
|
96
|
+
pnpm test:watch
|
|
97
|
+
pnpm browser:install
|
|
98
|
+
pnpm browser:smoke
|
|
99
|
+
pnpm format
|
|
100
|
+
pnpm format:check
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Quality Checks
|
|
104
|
+
|
|
105
|
+
- ESLint runs with the flat config format and TypeScript-aware rules.
|
|
106
|
+
- Prettier keeps formatting consistent across the starter files.
|
|
107
|
+
- Vitest and Testing Library provide a fast component-test baseline.
|
|
108
|
+
- Playwright provides a single-command browser smoke check for localhost verification.
|
|
109
|
+
- `make browser-smoke` runs the Playwright smoke check inside the Docker development image.
|
|
110
|
+
- `make browser-smoke-production` builds the Nginx runtime image, waits for its container health check, and verifies the rendered app plus the `nginx` response header in Chromium.
|
|
111
|
+
|
|
112
|
+
## Runtime Configuration
|
|
113
|
+
|
|
114
|
+
- `VITE_API_BASE_URL`: optional base URL for backend requests.
|
|
115
|
+
- When `VITE_API_BASE_URL` is not set, the starter keeps using local fallback data.
|
|
116
|
+
|
|
117
|
+
## Docker Files
|
|
118
|
+
|
|
119
|
+
- `Dockerfile.dev`: default lighter Node development image
|
|
120
|
+
- `Dockerfile.dev.full`: optional heavier development image that prewarms pnpm dependencies and Chromium
|
|
121
|
+
- `compose.dev.yaml`: local Docker development workflow
|
|
122
|
+
- `Dockerfile`: production build and static runtime image
|
|
123
|
+
- `nginx.conf`: SPA-friendly static serving config
|
|
124
|
+
|
|
125
|
+
## Package Manager
|
|
126
|
+
|
|
127
|
+
- This starter standardizes on `pnpm` via Corepack.
|
|
128
|
+
- The generated `package.json` declares the expected `pnpm` and Node.js versions, and the committed `pnpm-lock.yaml` is the reproducible dependency source of truth.
|
|
129
|
+
- `make install`, development images, and the production image use `--frozen-lockfile` and fail when `package.json` and `pnpm-lock.yaml` disagree.
|
|
130
|
+
- After intentionally editing dependencies, run `make lockfile-update`, review both manifest and lockfile changes, then return to frozen installs.
|
|
131
|
+
- Compose-scoped `node_modules`, pnpm, and Playwright cache volumes persist downloads across container runs without sharing state across worktrees.
|
|
132
|
+
- Direct pnpm usage reads `.npmrc`, so package-store state stays in `.pnpm-store` under the current worktree.
|
|
133
|
+
|
|
134
|
+
## Browser Smoke Check
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
make browser-install
|
|
138
|
+
make browser-smoke
|
|
139
|
+
make browser-smoke-production
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
- With the default dev image, `make browser-install` populates the shared Playwright cache volume.
|
|
143
|
+
- With `Dockerfile.dev.full`, the initial build preloads that browser cache so smoke checks are ready sooner on first run.
|
|
144
|
+
- `browser:smoke` starts a local Vite server on `127.0.0.1:4173`, opens Chromium, checks the starter homepage, and writes a screenshot under `test-results/`.
|
|
145
|
+
- `browser-smoke-production` uses a separate Playwright configuration with no Vite server. It starts the built Nginx image in a worktree-scoped temporary container, waits for Docker health, runs Chromium from the development container against the published runtime port, verifies the Nginx response, and always removes the runtime container on exit.
|
|
146
|
+
- `BUILDER_IMAGE`, `RUNTIME_IMAGE`, and `DEV_BASE_IMAGE` are overridable when CI uses an approved registry mirror. Defaults remain the official Docker Hub Node and Nginx images.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
services:
|
|
2
|
+
frontend-dev:
|
|
3
|
+
build:
|
|
4
|
+
context: .
|
|
5
|
+
dockerfile: ${DEV_DOCKERFILE:-Dockerfile.dev}
|
|
6
|
+
args:
|
|
7
|
+
DEV_BASE_IMAGE: ${DEV_BASE_IMAGE:-node:20-bookworm}
|
|
8
|
+
working_dir: /workspace
|
|
9
|
+
command: bash -lc "if [ ! -d node_modules/.pnpm ]; then pnpm install --frozen-lockfile; fi; pnpm dev --host 0.0.0.0 --port ${DEV_PORT:-5173} --strictPort"
|
|
10
|
+
environment:
|
|
11
|
+
CHOKIDAR_USEPOLLING: "true"
|
|
12
|
+
PNPM_STORE_DIR: /pnpm-store
|
|
13
|
+
npm_config_store_dir: /pnpm-store
|
|
14
|
+
PLAYWRIGHT_BROWSERS_PATH: /ms-playwright
|
|
15
|
+
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-}
|
|
16
|
+
ports:
|
|
17
|
+
- "${DEV_HOST_PORT:-5173}:${DEV_PORT:-5173}"
|
|
18
|
+
extra_hosts:
|
|
19
|
+
- "host.docker.internal:host-gateway"
|
|
20
|
+
volumes:
|
|
21
|
+
- .:/workspace
|
|
22
|
+
- frontend-node-modules:/workspace/node_modules
|
|
23
|
+
- frontend-pnpm-store:/pnpm-store
|
|
24
|
+
- frontend-playwright-cache:/ms-playwright
|
|
25
|
+
|
|
26
|
+
volumes:
|
|
27
|
+
frontend-node-modules:
|
|
28
|
+
frontend-pnpm-store:
|
|
29
|
+
frontend-playwright-cache:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import reactHooks from "eslint-plugin-react-hooks";
|
|
4
|
+
import reactRefresh from "eslint-plugin-react-refresh";
|
|
5
|
+
import tseslint from "typescript-eslint";
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{
|
|
9
|
+
ignores: ["dist"],
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
13
|
+
files: ["**/*.{ts,tsx}"],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
ecmaVersion: 2020,
|
|
16
|
+
globals: globals.browser,
|
|
17
|
+
},
|
|
18
|
+
plugins: {
|
|
19
|
+
"react-hooks": reactHooks,
|
|
20
|
+
"react-refresh": reactRefresh,
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
...reactHooks.configs.recommended.rules,
|
|
24
|
+
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>{{DISPLAY_NAME}}</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PACKAGE_NAME}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@9.9.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20.0.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "vite",
|
|
12
|
+
"lint": "eslint .",
|
|
13
|
+
"build": "tsc && vite build",
|
|
14
|
+
"preview": "vite preview",
|
|
15
|
+
"typecheck": "tsc --noEmit",
|
|
16
|
+
"test": "vitest run",
|
|
17
|
+
"test:watch": "vitest",
|
|
18
|
+
"browser:install": "playwright install chromium",
|
|
19
|
+
"browser:smoke": "playwright test -c playwright.smoke.config.ts",
|
|
20
|
+
"browser:smoke:production": "playwright test -c playwright.production.config.ts",
|
|
21
|
+
"format": "prettier --write .",
|
|
22
|
+
"format:check": "prettier --check ."
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"react": "^18.3.1",
|
|
26
|
+
"react-dom": "^18.3.1",
|
|
27
|
+
"react-router-dom": "^6.26.1"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@eslint/js": "^9.9.0",
|
|
31
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
32
|
+
"@testing-library/react": "^16.0.0",
|
|
33
|
+
"@testing-library/user-event": "^14.5.2",
|
|
34
|
+
"@types/react": "^18.3.5",
|
|
35
|
+
"@types/react-dom": "^18.3.0",
|
|
36
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
37
|
+
"eslint": "^9.9.0",
|
|
38
|
+
"eslint-config-prettier": "^9.1.0",
|
|
39
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
40
|
+
"eslint-plugin-react-refresh": "^0.4.11",
|
|
41
|
+
"globals": "^15.9.0",
|
|
42
|
+
"jsdom": "^25.0.1",
|
|
43
|
+
"playwright": "1.55.0",
|
|
44
|
+
"prettier": "^3.3.3",
|
|
45
|
+
"typescript": "^5.5.4",
|
|
46
|
+
"typescript-eslint": "^8.3.0",
|
|
47
|
+
"vite": "^5.4.2",
|
|
48
|
+
"vitest": "^2.0.5"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineConfig } from "playwright/test";
|
|
2
|
+
|
|
3
|
+
const baseURL = process.env.PLAYWRIGHT_BASE_URL;
|
|
4
|
+
|
|
5
|
+
if (!baseURL) {
|
|
6
|
+
throw new Error(
|
|
7
|
+
"PLAYWRIGHT_BASE_URL is required for production image browser tests.",
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
testDir: "./tests",
|
|
13
|
+
testMatch: "production-browser-smoke.spec.ts",
|
|
14
|
+
fullyParallel: false,
|
|
15
|
+
reporter: "list",
|
|
16
|
+
use: {
|
|
17
|
+
baseURL,
|
|
18
|
+
headless: true,
|
|
19
|
+
screenshot: "only-on-failure",
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineConfig } from "playwright/test";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
testDir: "./tests",
|
|
5
|
+
testMatch: "browser-smoke.spec.ts",
|
|
6
|
+
fullyParallel: false,
|
|
7
|
+
reporter: "list",
|
|
8
|
+
use: {
|
|
9
|
+
baseURL: "http://127.0.0.1:4173",
|
|
10
|
+
headless: true,
|
|
11
|
+
screenshot: "only-on-failure",
|
|
12
|
+
},
|
|
13
|
+
webServer: {
|
|
14
|
+
command: "pnpm exec vite --host 127.0.0.1 --port 4173 --strictPort",
|
|
15
|
+
url: "http://127.0.0.1:4173",
|
|
16
|
+
reuseExistingServer: true,
|
|
17
|
+
timeout: 30_000,
|
|
18
|
+
},
|
|
19
|
+
});
|