@sibyllinesoft/arbiter 0.1.0
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.
- package/README.md +222 -0
- package/dist/cli.js +28718 -0
- package/dist/templates/plopfiles/__tests__/build-systems.test.ts +730 -0
- package/dist/templates/plopfiles/__tests__/e2e.test.ts +451 -0
- package/dist/templates/plopfiles/__tests__/generation.test.ts +384 -0
- package/dist/templates/plopfiles/__tests__/linting.test.ts +854 -0
- package/dist/templates/plopfiles/__tests__/modules.test.ts +278 -0
- package/dist/templates/plopfiles/__tests__/smoke.test.ts +619 -0
- package/dist/templates/plopfiles/__tests__/templates.test.ts +341 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/module.js +43 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/templates/.air.toml.hbs +30 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/templates/cmd/server/main.go.hbs +50 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/templates/go.mod.hbs +9 -0
- package/dist/templates/plopfiles/_modules/backends/go-chi/templates/internal/handlers/health.go.hbs +51 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/module.js +38 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/build.gradle.kts.hbs +37 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/settings.gradle.kts.hbs +1 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/kotlin/Application.kt.hbs +44 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/kotlin/routes/Health.kt.hbs +41 -0
- package/dist/templates/plopfiles/_modules/backends/kotlin-ktor/templates/src/main/resources/logback.xml.hbs +11 -0
- package/dist/templates/plopfiles/_modules/backends/node-express/module.js +54 -0
- package/dist/templates/plopfiles/_modules/backends/node-express/templates/src/index.ts.hbs +37 -0
- package/dist/templates/plopfiles/_modules/backends/node-express/templates/src/routes/health.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/backends/node-express/templates/tsconfig.json.hbs +18 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/module.js +56 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/index.ts.hbs +30 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/routes/health.ts.hbs +64 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/src/routes/index.ts.hbs +38 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/tsconfig.json.hbs +20 -0
- package/dist/templates/plopfiles/_modules/backends/node-hono/templates/typedoc.json.hbs +25 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/module.js +65 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/__init__.py.hbs +1 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/config.py.hbs +28 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/main.py.hbs +40 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/routers/__init__.py.hbs +1 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/app/routers/health.py.hbs +24 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/pyproject.toml.hbs +40 -0
- package/dist/templates/plopfiles/_modules/backends/python-fastapi/templates/requirements.txt.hbs +6 -0
- package/dist/templates/plopfiles/_modules/backends/rust-axum/module.js +44 -0
- package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/Cargo.toml.hbs +23 -0
- package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/src/health.rs.hbs +41 -0
- package/dist/templates/plopfiles/_modules/backends/rust-axum/templates/src/main.rs.hbs +57 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/module.js +33 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-alb.tf.hbs +92 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-ecs.tf.hbs +84 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-iam.tf.hbs +60 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws-vpc.tf.hbs +106 -0
- package/dist/templates/plopfiles/_modules/cloud/aws/templates/aws.tf.hbs +56 -0
- package/dist/templates/plopfiles/_modules/cloud/azure/module.js +31 -0
- package/dist/templates/plopfiles/_modules/cloud/azure/templates/azure-container-apps.tf.hbs +99 -0
- package/dist/templates/plopfiles/_modules/cloud/azure/templates/azure.tf.hbs +54 -0
- package/dist/templates/plopfiles/_modules/cloud/cloudflare/module.js +43 -0
- package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/src/types.d.ts.hbs +6 -0
- package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/src/worker.ts.hbs +51 -0
- package/dist/templates/plopfiles/_modules/cloud/cloudflare/templates/wrangler.toml.hbs +36 -0
- package/dist/templates/plopfiles/_modules/cloud/gcp/module.js +31 -0
- package/dist/templates/plopfiles/_modules/cloud/gcp/templates/gcp-cloudrun.tf.hbs +89 -0
- package/dist/templates/plopfiles/_modules/cloud/gcp/templates/gcp.tf.hbs +62 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/module.js +51 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/src/lib/supabase.ts.hbs +25 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/src/types/supabase.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/config.toml.hbs +71 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/functions/hello/index.ts.hbs +34 -0
- package/dist/templates/plopfiles/_modules/cloud/supabase/templates/supabase/migrations/00000000000000_init.sql.hbs +60 -0
- package/dist/templates/plopfiles/_modules/composer.js +180 -0
- package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/drizzle.config.ts.hbs +10 -0
- package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/module.js +53 -0
- package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/templates/index.ts.hbs +15 -0
- package/dist/templates/plopfiles/_modules/databases/postgres-drizzle/templates/schema.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/module.js +51 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/forge.config.ts.hbs +38 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/package.json.hbs +22 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/src/main.ts.hbs +48 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/src/preload.ts.hbs +18 -0
- package/dist/templates/plopfiles/_modules/desktop/electron/templates/tsconfig.json.hbs +14 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/module.js +38 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/Cargo.toml.hbs +20 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/build.rs.hbs +3 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/src/main.rs.hbs +30 -0
- package/dist/templates/plopfiles/_modules/desktop/tauri/templates/src-tauri/tauri.conf.json.hbs +44 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/module.js +61 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/architecture/components.md.hbs +37 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/architecture/overview.md.hbs +43 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/contributing/development.md.hbs +164 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/contributing/guidelines.md.hbs +50 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/configuration.md.hbs +37 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/installation.md.hbs +53 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/getting-started/quickstart.md.hbs +39 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/index.md.hbs +44 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/javascripts/extra.js.hbs +23 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/docs/stylesheets/extra.css.hbs +51 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/mkdocs.yml.hbs +141 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/requirements-docs.txt.hbs +15 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/scripts/aggregate-docs.mjs.hbs +188 -0
- package/dist/templates/plopfiles/_modules/docs/mkdocs/templates/scripts/gen_ref_pages.py.hbs +54 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/module.js +60 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/index.html.hbs +13 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/nginx.conf.hbs +31 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/postcss.config.js.hbs +6 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/App.tsx.hbs +12 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/index.css.hbs +25 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/lib/api.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/main.tsx.hbs +18 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/src/pages/Home.tsx.hbs +31 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tailwind.config.js.hbs +8 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tsconfig.json.hbs +25 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/tsconfig.node.json.hbs +10 -0
- package/dist/templates/plopfiles/_modules/frontends/react-vite/templates/vite.config.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/module.js +51 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/index.html.hbs +13 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/postcss.config.js.hbs +6 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/App.tsx.hbs +12 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/index.css.hbs +3 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/index.tsx.hbs +21 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/lib/api.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/src/pages/Home.tsx.hbs +34 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/tailwind.config.js.hbs +8 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/tsconfig.json.hbs +24 -0
- package/dist/templates/plopfiles/_modules/frontends/solid-vite/templates/vite.config.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/module.js +54 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/index.html.hbs +13 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/postcss.config.js.hbs +6 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/App.vue.hbs +9 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/index.css.hbs +3 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/lib/api.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/main.ts.hbs +14 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/pages/Home.vue.hbs +27 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/src/router.ts.hbs +13 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/tailwind.config.js.hbs +8 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/tsconfig.json.hbs +25 -0
- package/dist/templates/plopfiles/_modules/frontends/vue-vite/templates/vite.config.ts.hbs +21 -0
- package/dist/templates/plopfiles/_modules/infra/docker-compose/module.js +52 -0
- package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/Dockerfile.backend.hbs +32 -0
- package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/Dockerfile.frontend.hbs +31 -0
- package/dist/templates/plopfiles/_modules/infra/docker-compose/templates/docker-compose.yml.hbs +97 -0
- package/dist/templates/plopfiles/_modules/infra/github-actions/module.js +24 -0
- package/dist/templates/plopfiles/_modules/infra/github-actions/templates/.github/workflows/ci.yml.hbs +78 -0
- package/dist/templates/plopfiles/_modules/infra/github-actions/templates/.github/workflows/deploy.yml.hbs +60 -0
- package/dist/templates/plopfiles/_modules/infra/just/module.js +26 -0
- package/dist/templates/plopfiles/_modules/infra/just/templates/justfile.hbs +205 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/module.js +30 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/deployment.yaml.hbs +48 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/ingress.yaml.hbs +23 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/kustomization.yaml.hbs +11 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/base/service.yaml.hbs +15 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/dev/deployment-patch.yaml.hbs +17 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/dev/kustomization.yaml.hbs +15 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/prod/deployment-patch.yaml.hbs +17 -0
- package/dist/templates/plopfiles/_modules/infra/kubernetes/templates/k8s/overlays/prod/kustomization.yaml.hbs +15 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/module.js +30 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/.gitignore.hbs +5 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/Pulumi.dev.yaml.hbs +3 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/Pulumi.yaml.hbs +7 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/index.ts.hbs +26 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/package.json.hbs +12 -0
- package/dist/templates/plopfiles/_modules/infra/pulumi/templates/tsconfig.json.hbs +16 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/module.js +31 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/.gitignore.hbs +12 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/main.tf.hbs +34 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/outputs.tf.hbs +15 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/terraform.tfvars.example.hbs +6 -0
- package/dist/templates/plopfiles/_modules/infra/terraform/templates/variables.tf.hbs +30 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/module.js +38 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/build.gradle.kts.hbs +102 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/proguard-rules.pro.hbs +20 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/AndroidManifest.xml.hbs +25 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ApiClient.kt.hbs +38 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/App.kt.hbs +116 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/MainActivity.kt.hbs +28 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Color.kt.hbs +11 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Theme.kt.hbs +55 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/kotlin/com/example/app/ui/theme/Type.kt.hbs +31 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/res/values/strings.xml.hbs +3 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/app/src/main/res/values/themes.xml.hbs +4 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/build.gradle.kts.hbs +6 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/gradle.properties.hbs +4 -0
- package/dist/templates/plopfiles/_modules/mobile/android-kotlin/templates/settings.gradle.kts.hbs +18 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/module.js +36 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/.env.hbs +1 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/main.dart.hbs +29 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/screens/home_screen.dart.hbs +88 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/lib/services/api_service.dart.hbs +61 -0
- package/dist/templates/plopfiles/_modules/mobile/flutter/templates/pubspec.yaml.hbs +25 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/module.js +39 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/App.swift.hbs +10 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/AccentColor.colorset/Contents.json.hbs +11 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/AppIcon.appiconset/Contents.json.hbs +13 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Assets.xcassets/Contents.json.hbs +6 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/ContentView.swift.hbs +13 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Services/APIClient.swift.hbs +58 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Views/DetailsView.swift.hbs +22 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App/Views/HomeView.swift.hbs +62 -0
- package/dist/templates/plopfiles/_modules/mobile/ios-swift/templates/App.xcodeproj/project.pbxproj.hbs +363 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/module.js +36 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app/_layout.tsx.hbs +16 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app/index.tsx.hbs +66 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/app.json.hbs +37 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/package.json.hbs +29 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/src/lib/api.ts.hbs +52 -0
- package/dist/templates/plopfiles/_modules/mobile/react-native/templates/tsconfig.json.hbs +11 -0
- package/dist/templates/plopfiles/_modules/quality/biome/module.js +44 -0
- package/dist/templates/plopfiles/_modules/quality/biome/templates/biome.json.hbs +126 -0
- package/dist/templates/plopfiles/_modules/quality/clippy/module.js +40 -0
- package/dist/templates/plopfiles/_modules/quality/clippy/templates/clippy.toml.hbs +29 -0
- package/dist/templates/plopfiles/_modules/quality/clippy/templates/rustfmt.toml.hbs +44 -0
- package/dist/templates/plopfiles/_modules/quality/golangci-lint/module.js +40 -0
- package/dist/templates/plopfiles/_modules/quality/golangci-lint/templates/.golangci.yml.hbs +199 -0
- package/dist/templates/plopfiles/_modules/quality/ruff/module.js +43 -0
- package/dist/templates/plopfiles/_modules/quality/ruff/templates/mypy.ini.hbs +48 -0
- package/dist/templates/plopfiles/_modules/quality/ruff/templates/ruff.toml.hbs +111 -0
- package/dist/templates/plopfiles/_modules/storybook/react-storybook/module.js +54 -0
- package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/.storybook/main.ts.hbs +44 -0
- package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/.storybook/preview.ts.hbs +68 -0
- package/dist/templates/plopfiles/_modules/storybook/react-storybook/templates/src/stories/Button.stories.tsx.hbs +158 -0
- package/dist/templates/plopfiles/_modules/types.ts +98 -0
- package/dist/templates/plopfiles/full-stack/plopfile.js +132 -0
- package/dist/templates/plopfiles/full-stack/templates/gitignore.hbs +44 -0
- package/dist/templates/plopfiles/full-stack/templates/package.json.hbs +21 -0
- package/dist/templates/plopfiles/presets/cli-go/module.js +43 -0
- package/dist/templates/plopfiles/presets/cli-go/templates/README.md.hbs +42 -0
- package/dist/templates/plopfiles/presets/cli-go/templates/config.json.hbs +9 -0
- package/dist/templates/plopfiles/presets/cli-node/module.js +45 -0
- package/dist/templates/plopfiles/presets/cli-node/templates/README.md.hbs +42 -0
- package/dist/templates/plopfiles/presets/cli-node/templates/config.json.hbs +9 -0
- package/dist/templates/plopfiles/presets/cli-python/module.js +43 -0
- package/dist/templates/plopfiles/presets/cli-python/templates/README.md.hbs +42 -0
- package/dist/templates/plopfiles/presets/cli-python/templates/config.json.hbs +9 -0
- package/dist/templates/plopfiles/presets/cli-rust/module.js +43 -0
- package/dist/templates/plopfiles/presets/cli-rust/templates/README.md.hbs +42 -0
- package/dist/templates/plopfiles/presets/cli-rust/templates/config.json.hbs +9 -0
- package/dist/templates/plopfiles/presets/loader.js +125 -0
- package/dist/templates/plopfiles/typescript-service/plopfile.js +186 -0
- package/dist/templates/plopfiles/typescript-service/templates/Dockerfile.hbs +29 -0
- package/dist/templates/plopfiles/typescript-service/templates/README.md.hbs +85 -0
- package/dist/templates/plopfiles/typescript-service/templates/config.ts.hbs +15 -0
- package/dist/templates/plopfiles/typescript-service/templates/db/index.ts.hbs +19 -0
- package/dist/templates/plopfiles/typescript-service/templates/db/schema.ts.hbs +16 -0
- package/dist/templates/plopfiles/typescript-service/templates/index.ts.hbs +89 -0
- package/dist/templates/plopfiles/typescript-service/templates/package.json.hbs +36 -0
- package/dist/templates/plopfiles/typescript-service/templates/routes/health.ts.hbs +61 -0
- package/dist/templates/plopfiles/typescript-service/templates/routes/index.ts.hbs +35 -0
- package/dist/templates/plopfiles/typescript-service/templates/tsconfig.json.hbs +24 -0
- package/dist/templates/plopfiles/typescript-service/templates/types.ts.hbs +28 -0
- package/dist/templates/typescript/component.module.css.tpl +6 -0
- package/dist/templates/typescript/component.test.tsx.tpl +9 -0
- package/dist/templates/typescript/component.tsx.tpl +17 -0
- package/dist/templates/typescript/component.types.ts.tpl +3 -0
- package/dist/templates/typescript/project/nextjs/app/globals.css.tpl +10 -0
- package/dist/templates/typescript/project/nextjs/app/layout.tsx.tpl +15 -0
- package/dist/templates/typescript/project/nextjs/app/page.tsx.tpl +8 -0
- package/dist/templates/typescript/project/nextjs/babel.config.js.tpl +8 -0
- package/dist/templates/typescript/project/nextjs/jest.config.js.tpl +10 -0
- package/dist/templates/typescript/project/nextjs/jest.setup.ts.tpl +6 -0
- package/dist/templates/typescript/project/nextjs/next-env.d.ts.tpl +5 -0
- package/dist/templates/typescript/project/nextjs/next.config.js.tpl +9 -0
- package/dist/templates/typescript/project/nextjs/package.json.tpl +1 -0
- package/dist/templates/typescript/project/nextjs/tsconfig.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/App.css.tpl +8 -0
- package/dist/templates/typescript/project/vite/App.tsx.tpl +17 -0
- package/dist/templates/typescript/project/vite/index.css.tpl +8 -0
- package/dist/templates/typescript/project/vite/index.html.tpl +13 -0
- package/dist/templates/typescript/project/vite/main.tsx.tpl +10 -0
- package/dist/templates/typescript/project/vite/package.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/test-setup.ts.tpl +1 -0
- package/dist/templates/typescript/project/vite/tsconfig.build.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/tsconfig.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/tsconfig.node.json.tpl +1 -0
- package/dist/templates/typescript/project/vite/vite.config.ts.tpl +18 -0
- package/dist/templates/typescript/service.api.ts.tpl +27 -0
- package/dist/templates/typescript/service.class.ts.tpl +28 -0
- package/dist/templates/typescript/service.handler.ts.tpl +42 -0
- package/dist/templates/typescript/service.schema.ts.tpl +16 -0
- package/package.json +95 -0
- package/templates/typescript/component.module.css.tpl +6 -0
- package/templates/typescript/component.test.tsx.tpl +9 -0
- package/templates/typescript/component.tsx.tpl +17 -0
- package/templates/typescript/component.types.ts.tpl +3 -0
- package/templates/typescript/project/nextjs/app/globals.css.tpl +10 -0
- package/templates/typescript/project/nextjs/app/layout.tsx.tpl +15 -0
- package/templates/typescript/project/nextjs/app/page.tsx.tpl +8 -0
- package/templates/typescript/project/nextjs/babel.config.js.tpl +8 -0
- package/templates/typescript/project/nextjs/jest.config.js.tpl +10 -0
- package/templates/typescript/project/nextjs/jest.setup.ts.tpl +6 -0
- package/templates/typescript/project/nextjs/next-env.d.ts.tpl +5 -0
- package/templates/typescript/project/nextjs/next.config.js.tpl +9 -0
- package/templates/typescript/project/nextjs/package.json.tpl +1 -0
- package/templates/typescript/project/nextjs/tsconfig.json.tpl +1 -0
- package/templates/typescript/project/vite/App.css.tpl +8 -0
- package/templates/typescript/project/vite/App.tsx.tpl +17 -0
- package/templates/typescript/project/vite/index.css.tpl +8 -0
- package/templates/typescript/project/vite/index.html.tpl +13 -0
- package/templates/typescript/project/vite/main.tsx.tpl +10 -0
- package/templates/typescript/project/vite/package.json.tpl +1 -0
- package/templates/typescript/project/vite/test-setup.ts.tpl +1 -0
- package/templates/typescript/project/vite/tsconfig.build.json.tpl +1 -0
- package/templates/typescript/project/vite/tsconfig.json.tpl +1 -0
- package/templates/typescript/project/vite/tsconfig.node.json.tpl +1 -0
- package/templates/typescript/project/vite/vite.config.ts.tpl +18 -0
- package/templates/typescript/service.api.ts.tpl +27 -0
- package/templates/typescript/service.class.ts.tpl +28 -0
- package/templates/typescript/service.handler.ts.tpl +42 -0
- package/templates/typescript/service.schema.ts.tpl +16 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Generation Tests
|
|
3
|
+
*
|
|
4
|
+
* Actually generates projects and validates the output files.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
|
|
8
|
+
import { tmpdir } from "os";
|
|
9
|
+
import { join } from "path";
|
|
10
|
+
import { mkdtemp, readFile, readdir, rm, stat } from "fs/promises";
|
|
11
|
+
import nodePlop from "node-plop";
|
|
12
|
+
import { composeModules } from "../_modules/composer.js";
|
|
13
|
+
|
|
14
|
+
// Helper to run a plopfile and generate files
|
|
15
|
+
async function generateProject(
|
|
16
|
+
plopfilePath: string,
|
|
17
|
+
destPath: string,
|
|
18
|
+
answers: Record<string, unknown>,
|
|
19
|
+
): Promise<void> {
|
|
20
|
+
const plop = await nodePlop(plopfilePath, {
|
|
21
|
+
destBasePath: destPath,
|
|
22
|
+
force: true,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const generators = plop.getGeneratorList();
|
|
26
|
+
const generator = plop.getGenerator(generators[0]?.name || "default");
|
|
27
|
+
const results = await generator.runActions(answers);
|
|
28
|
+
|
|
29
|
+
if (results.failures && results.failures.length > 0) {
|
|
30
|
+
throw new Error(`Generation failed: ${results.failures.map((f) => f.error).join(", ")}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Helper to check if files exist
|
|
35
|
+
async function filesExist(basePath: string, files: string[]): Promise<boolean> {
|
|
36
|
+
for (const file of files) {
|
|
37
|
+
try {
|
|
38
|
+
await stat(join(basePath, file));
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Helper to validate JSON syntax
|
|
47
|
+
async function isValidJson(filePath: string): Promise<boolean> {
|
|
48
|
+
try {
|
|
49
|
+
const content = await readFile(filePath, "utf-8");
|
|
50
|
+
JSON.parse(content);
|
|
51
|
+
return true;
|
|
52
|
+
} catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Helper to validate TypeScript/JavaScript syntax (basic check)
|
|
58
|
+
async function hasNoObviousSyntaxErrors(filePath: string): Promise<boolean> {
|
|
59
|
+
try {
|
|
60
|
+
const content = await readFile(filePath, "utf-8");
|
|
61
|
+
// Check for common template rendering issues
|
|
62
|
+
if (content.includes("{{") && content.includes("}}")) {
|
|
63
|
+
// Unrendered Handlebars template
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (content.includes("undefined") && !content.includes("typeof")) {
|
|
67
|
+
// Check for accidental undefined values (but allow typeof checks)
|
|
68
|
+
const lines = content.split("\n");
|
|
69
|
+
for (const line of lines) {
|
|
70
|
+
if (line.includes(": undefined") || line.includes("= undefined")) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
} catch {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
describe("Full-Stack Generation", () => {
|
|
82
|
+
let tempDir: string;
|
|
83
|
+
|
|
84
|
+
beforeAll(async () => {
|
|
85
|
+
tempDir = await mkdtemp(join(tmpdir(), "arbiter-test-"));
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
afterAll(async () => {
|
|
89
|
+
await rm(tempDir, { recursive: true, force: true });
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test("generates node-hono + react-vite + postgres-drizzle project", async () => {
|
|
93
|
+
const projectDir = join(tempDir, "node-react-postgres");
|
|
94
|
+
|
|
95
|
+
const { actions, manifest } = await composeModules(
|
|
96
|
+
{
|
|
97
|
+
backend: "node-hono",
|
|
98
|
+
frontend: "react-vite",
|
|
99
|
+
database: "postgres-drizzle",
|
|
100
|
+
infra: ["docker-compose"],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "test-app",
|
|
104
|
+
projectDir,
|
|
105
|
+
backendDir: "backend",
|
|
106
|
+
frontendDir: "frontend",
|
|
107
|
+
},
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
// Verify manifest
|
|
111
|
+
expect(manifest.modules).toContain("backends/node-hono");
|
|
112
|
+
expect(manifest.modules).toContain("frontends/react-vite");
|
|
113
|
+
expect(manifest.modules).toContain("databases/postgres-drizzle");
|
|
114
|
+
expect(manifest.modules).toContain("infra/docker-compose");
|
|
115
|
+
|
|
116
|
+
// Verify dependencies were collected
|
|
117
|
+
expect(manifest.dependencies).toHaveProperty("hono");
|
|
118
|
+
expect(manifest.dependencies).toHaveProperty("react");
|
|
119
|
+
expect(manifest.dependencies).toHaveProperty("drizzle-orm");
|
|
120
|
+
|
|
121
|
+
// Verify scripts were collected
|
|
122
|
+
expect(manifest.scripts).toHaveProperty("dev:backend");
|
|
123
|
+
expect(manifest.scripts).toHaveProperty("dev:frontend");
|
|
124
|
+
expect(manifest.scripts).toHaveProperty("docker:up");
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
test("generates python-fastapi + vue-vite + supabase project", async () => {
|
|
128
|
+
const projectDir = join(tempDir, "python-vue-supabase");
|
|
129
|
+
|
|
130
|
+
const { actions, manifest } = await composeModules(
|
|
131
|
+
{
|
|
132
|
+
backend: "python-fastapi",
|
|
133
|
+
frontend: "vue-vite",
|
|
134
|
+
cloud: ["supabase"],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "py-vue-app",
|
|
138
|
+
projectDir,
|
|
139
|
+
backendDir: "backend",
|
|
140
|
+
frontendDir: "frontend",
|
|
141
|
+
},
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
expect(manifest.modules).toContain("backends/python-fastapi");
|
|
145
|
+
expect(manifest.modules).toContain("frontends/vue-vite");
|
|
146
|
+
expect(manifest.modules).toContain("cloud/supabase");
|
|
147
|
+
|
|
148
|
+
expect(manifest.dependencies).toHaveProperty("vue");
|
|
149
|
+
expect(manifest.dependencies).toHaveProperty("@supabase/supabase-js");
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
test("generates rust-axum + solid-vite + kubernetes project", async () => {
|
|
153
|
+
const projectDir = join(tempDir, "rust-solid-k8s");
|
|
154
|
+
|
|
155
|
+
const { actions, manifest } = await composeModules(
|
|
156
|
+
{
|
|
157
|
+
backend: "rust-axum",
|
|
158
|
+
frontend: "solid-vite",
|
|
159
|
+
infra: ["kubernetes", "github-actions"],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: "rust-solid-app",
|
|
163
|
+
projectDir,
|
|
164
|
+
backendDir: "backend",
|
|
165
|
+
frontendDir: "frontend",
|
|
166
|
+
},
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
expect(manifest.modules).toContain("backends/rust-axum");
|
|
170
|
+
expect(manifest.modules).toContain("frontends/solid-vite");
|
|
171
|
+
expect(manifest.modules).toContain("infra/kubernetes");
|
|
172
|
+
expect(manifest.modules).toContain("infra/github-actions");
|
|
173
|
+
|
|
174
|
+
expect(manifest.dependencies).toHaveProperty("solid-js");
|
|
175
|
+
expect(manifest.scripts).toHaveProperty("k8s:apply");
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
test("generates go-chi + terraform + aws project", async () => {
|
|
179
|
+
const projectDir = join(tempDir, "go-aws");
|
|
180
|
+
|
|
181
|
+
const { actions, manifest } = await composeModules(
|
|
182
|
+
{
|
|
183
|
+
backend: "go-chi",
|
|
184
|
+
infra: ["terraform"],
|
|
185
|
+
cloud: ["aws"],
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: "go-aws-app",
|
|
189
|
+
projectDir,
|
|
190
|
+
backendDir: "backend",
|
|
191
|
+
},
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
expect(manifest.modules).toContain("backends/go-chi");
|
|
195
|
+
expect(manifest.modules).toContain("infra/terraform");
|
|
196
|
+
expect(manifest.modules).toContain("cloud/aws");
|
|
197
|
+
|
|
198
|
+
expect(manifest.scripts).toHaveProperty("dev:backend");
|
|
199
|
+
expect(manifest.scripts).toHaveProperty("tf:apply");
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
test("generates electron desktop app", async () => {
|
|
203
|
+
const projectDir = join(tempDir, "electron-app");
|
|
204
|
+
|
|
205
|
+
const { actions, manifest } = await composeModules(
|
|
206
|
+
{
|
|
207
|
+
frontend: "react-vite",
|
|
208
|
+
desktop: "electron",
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "desktop-app",
|
|
212
|
+
projectDir,
|
|
213
|
+
frontendDir: "frontend",
|
|
214
|
+
desktopDir: "desktop",
|
|
215
|
+
},
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
expect(manifest.modules).toContain("frontends/react-vite");
|
|
219
|
+
expect(manifest.modules).toContain("desktop/electron");
|
|
220
|
+
|
|
221
|
+
expect(manifest.dependencies).toHaveProperty("electron");
|
|
222
|
+
expect(manifest.scripts).toHaveProperty("dev:desktop");
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
test("generates tauri desktop app", async () => {
|
|
226
|
+
const projectDir = join(tempDir, "tauri-app");
|
|
227
|
+
|
|
228
|
+
const { actions, manifest } = await composeModules(
|
|
229
|
+
{
|
|
230
|
+
frontend: "vue-vite",
|
|
231
|
+
desktop: "tauri",
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: "tauri-app",
|
|
235
|
+
projectDir,
|
|
236
|
+
frontendDir: "frontend",
|
|
237
|
+
},
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
expect(manifest.modules).toContain("frontends/vue-vite");
|
|
241
|
+
expect(manifest.modules).toContain("desktop/tauri");
|
|
242
|
+
|
|
243
|
+
expect(manifest.devDependencies).toHaveProperty("@tauri-apps/cli");
|
|
244
|
+
expect(manifest.scripts).toHaveProperty("dev:desktop");
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
test("generates react-native mobile app", async () => {
|
|
248
|
+
const projectDir = join(tempDir, "rn-app");
|
|
249
|
+
|
|
250
|
+
const { actions, manifest } = await composeModules(
|
|
251
|
+
{
|
|
252
|
+
backend: "node-hono",
|
|
253
|
+
mobile: "react-native",
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: "mobile-app",
|
|
257
|
+
projectDir,
|
|
258
|
+
backendDir: "backend",
|
|
259
|
+
mobileDir: "mobile",
|
|
260
|
+
},
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
expect(manifest.modules).toContain("backends/node-hono");
|
|
264
|
+
expect(manifest.modules).toContain("mobile/react-native");
|
|
265
|
+
|
|
266
|
+
expect(manifest.scripts).toHaveProperty("dev:mobile");
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
test("generates flutter mobile app", async () => {
|
|
270
|
+
const projectDir = join(tempDir, "flutter-app");
|
|
271
|
+
|
|
272
|
+
const { actions, manifest } = await composeModules(
|
|
273
|
+
{
|
|
274
|
+
backend: "python-fastapi",
|
|
275
|
+
mobile: "flutter",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: "flutter-app",
|
|
279
|
+
projectDir,
|
|
280
|
+
backendDir: "backend",
|
|
281
|
+
mobileDir: "mobile",
|
|
282
|
+
},
|
|
283
|
+
);
|
|
284
|
+
|
|
285
|
+
expect(manifest.modules).toContain("backends/python-fastapi");
|
|
286
|
+
expect(manifest.modules).toContain("mobile/flutter");
|
|
287
|
+
|
|
288
|
+
expect(manifest.scripts).toHaveProperty("dev:mobile");
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
test("generates cloudflare workers project", async () => {
|
|
292
|
+
const projectDir = join(tempDir, "cf-app");
|
|
293
|
+
|
|
294
|
+
const { actions, manifest } = await composeModules(
|
|
295
|
+
{
|
|
296
|
+
cloud: ["cloudflare"],
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: "cf-app",
|
|
300
|
+
projectDir,
|
|
301
|
+
},
|
|
302
|
+
);
|
|
303
|
+
|
|
304
|
+
expect(manifest.modules).toContain("cloud/cloudflare");
|
|
305
|
+
|
|
306
|
+
expect(manifest.devDependencies).toHaveProperty("wrangler");
|
|
307
|
+
expect(manifest.scripts).toHaveProperty("cf:dev");
|
|
308
|
+
expect(manifest.scripts).toHaveProperty("cf:deploy");
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
describe("Manifest Merging", () => {
|
|
313
|
+
test("merges dependencies from multiple modules without conflicts", async () => {
|
|
314
|
+
const { manifest } = await composeModules(
|
|
315
|
+
{
|
|
316
|
+
backend: "node-hono",
|
|
317
|
+
frontend: "react-vite",
|
|
318
|
+
database: "postgres-drizzle",
|
|
319
|
+
infra: ["docker-compose", "github-actions"],
|
|
320
|
+
cloud: ["supabase"],
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: "full-stack-app",
|
|
324
|
+
projectDir: "/tmp/test",
|
|
325
|
+
backendDir: "backend",
|
|
326
|
+
frontendDir: "frontend",
|
|
327
|
+
},
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
// All modules should be present
|
|
331
|
+
expect(manifest.modules.length).toBe(6);
|
|
332
|
+
|
|
333
|
+
// Dependencies from different modules
|
|
334
|
+
expect(manifest.dependencies).toHaveProperty("hono"); // node-hono
|
|
335
|
+
expect(manifest.dependencies).toHaveProperty("react"); // react-vite
|
|
336
|
+
expect(manifest.dependencies).toHaveProperty("drizzle-orm"); // postgres-drizzle
|
|
337
|
+
expect(manifest.dependencies).toHaveProperty("@supabase/supabase-js"); // supabase
|
|
338
|
+
|
|
339
|
+
// Scripts from different modules
|
|
340
|
+
expect(manifest.scripts).toHaveProperty("dev:backend");
|
|
341
|
+
expect(manifest.scripts).toHaveProperty("dev:frontend");
|
|
342
|
+
expect(manifest.scripts).toHaveProperty("db:generate");
|
|
343
|
+
expect(manifest.scripts).toHaveProperty("docker:up");
|
|
344
|
+
expect(manifest.scripts).toHaveProperty("supabase:start");
|
|
345
|
+
|
|
346
|
+
// Env vars from different modules
|
|
347
|
+
expect(manifest.envVars).toHaveProperty("PORT");
|
|
348
|
+
expect(manifest.envVars).toHaveProperty("VITE_API_URL");
|
|
349
|
+
expect(manifest.envVars).toHaveProperty("DATABASE_URL");
|
|
350
|
+
expect(manifest.envVars).toHaveProperty("SUPABASE_URL");
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
test("handles empty selections gracefully", async () => {
|
|
354
|
+
const { actions, manifest } = await composeModules(
|
|
355
|
+
{},
|
|
356
|
+
{
|
|
357
|
+
name: "empty-app",
|
|
358
|
+
projectDir: "/tmp/test",
|
|
359
|
+
},
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
expect(actions.length).toBe(0);
|
|
363
|
+
expect(manifest.modules.length).toBe(0);
|
|
364
|
+
expect(Object.keys(manifest.dependencies).length).toBe(0);
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
test("handles 'none' selections correctly", async () => {
|
|
368
|
+
const { manifest } = await composeModules(
|
|
369
|
+
{
|
|
370
|
+
backend: "none",
|
|
371
|
+
frontend: "none",
|
|
372
|
+
database: "none",
|
|
373
|
+
desktop: "none",
|
|
374
|
+
mobile: "none",
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
name: "none-app",
|
|
378
|
+
projectDir: "/tmp/test",
|
|
379
|
+
},
|
|
380
|
+
);
|
|
381
|
+
|
|
382
|
+
expect(manifest.modules.length).toBe(0);
|
|
383
|
+
});
|
|
384
|
+
});
|