@donotdev/cli 0.1.1 → 0.1.44
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/LICENSE.md +1 -1
- package/README.md +0 -0
- package/dependencies-matrix.json +93 -40
- package/dist/bin/commands/agent-setup.js +695 -420
- package/dist/bin/commands/build.js +1181 -832
- package/dist/bin/commands/bump.js +1065 -771
- package/dist/bin/commands/cacheout.js +253 -355
- package/dist/bin/commands/coach.js +275 -375
- package/dist/bin/commands/create-app.js +1085 -790
- package/dist/bin/commands/create-project.js +1117 -819
- package/dist/bin/commands/db.js +17045 -16542
- package/dist/bin/commands/deploy.js +1999 -1367
- package/dist/bin/commands/dev.js +879 -627
- package/dist/bin/commands/doctor.js +696 -425
- package/dist/bin/commands/emu.js +1001 -712
- package/dist/bin/commands/format.js +253 -355
- package/dist/bin/commands/get-demo.js +979 -706
- package/dist/bin/commands/make-admin.js +6279 -5746
- package/dist/bin/commands/preview.js +883 -628
- package/dist/bin/commands/seed.js +17058 -16555
- package/dist/bin/commands/setup-cicd.js +1024 -749
- package/dist/bin/commands/setup.js +1162 -844
- package/dist/bin/commands/staging.js +2000 -1368
- package/dist/bin/commands/sync-secrets.js +1181 -667
- package/dist/bin/commands/type-check.js +735 -461
- package/dist/bin/commands/wai.js +258 -360
- package/dist/bin/dndev.js +31 -16
- package/dist/bin/donotdev.js +31 -16
- package/dist/index.js +2200 -1513
- package/guidelines/DEPENDENCIES.md +155 -0
- package/guidelines/VERSION_CONTROL.md +0 -0
- package/package.json +1 -1
- package/templates/app-demo/.env.example +1 -1
- package/templates/app-demo/entities/Contact.ts.example +0 -0
- package/templates/app-demo/entities/ExampleEntity.ts.example +0 -0
- package/templates/app-demo/entities/demo.ts.example +0 -0
- package/templates/app-demo/index.html.example +0 -0
- package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
- package/templates/app-demo/public/fonts/fonts.css.example +0 -0
- package/templates/app-demo/public/icon-192x192.png.example +0 -0
- package/templates/app-demo/public/icon-512x512.png.example +0 -0
- package/templates/app-demo/src/App.tsx.example +0 -0
- package/templates/app-demo/src/config/app.ts.example +0 -0
- package/templates/app-demo/src/entities/booking.ts.example +0 -0
- package/templates/app-demo/src/entities/onboarding.ts.example +0 -0
- package/templates/app-demo/src/entities/product.ts.example +0 -0
- package/templates/app-demo/src/entities/quote.ts.example +0 -0
- package/templates/app-demo/src/globals.css.example +0 -0
- package/templates/app-demo/src/main.tsx.example +0 -0
- package/templates/app-demo/src/pages/ChangelogPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/OnboardingPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/PricingPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ProductsPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ProfilePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ShowcasePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/componentConfig.ts.example +0 -0
- package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-demo/src/themes.css.example +6 -0
- package/templates/app-demo/tsconfig.json.example +0 -0
- package/templates/app-demo/vite.config.ts.example +0 -0
- package/templates/app-dndev/index.html.example +0 -0
- package/templates/app-dndev/src/App.tsx.example +0 -0
- package/templates/app-dndev/src/components/CockpitLayout.css.example +0 -0
- package/templates/app-dndev/src/components/CockpitLayout.tsx.example +0 -0
- package/templates/app-dndev/src/components/Kanban.css.example +0 -0
- package/templates/app-dndev/src/components/ModeToggle.tsx.example +0 -0
- package/templates/app-dndev/src/components/OverlaySlot.tsx.example +0 -0
- package/templates/app-dndev/src/components/TerminalPanel.css.example +0 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +0 -0
- package/templates/app-dndev/src/components/markdown-prose.css.example +0 -0
- package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/phaseData.ts.example +0 -0
- package/templates/app-dndev/src/config/app.ts.example +1 -1
- package/templates/app-dndev/src/config/commands.ts.example +0 -0
- package/templates/app-dndev/src/config/legal.ts.example +0 -0
- package/templates/app-dndev/src/config/providers.ts.example +1 -1
- package/templates/app-dndev/src/globals.css.example +0 -0
- package/templates/app-dndev/src/hooks/useDndevFile.ts.example +0 -0
- package/templates/app-dndev/src/main.tsx.example +0 -0
- package/templates/app-dndev/src/pages/BoardPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/GrillPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/PhasesPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-dndev/src/stores/dndevStore.ts.example +0 -0
- package/templates/app-dndev/src/themes.css.example +5 -0
- package/templates/app-dndev/terminal-sidecar.cjs.example +0 -0
- package/templates/app-dndev/vite.config.ts.example +0 -0
- package/templates/app-expo/.env.example +0 -32
- package/templates/app-expo/.expo/README.md.example +0 -0
- package/templates/app-expo/.gitignore.example +0 -0
- package/templates/app-expo/README.md.example +1 -1
- package/templates/app-expo/app/.gitkeep +0 -0
- package/templates/app-expo/app/_layout.tsx.example +0 -0
- package/templates/app-expo/app/form.tsx.example +0 -0
- package/templates/app-expo/app/index.tsx.example +0 -0
- package/templates/app-expo/app/list.tsx.example +0 -0
- package/templates/app-expo/app/profile.tsx.example +0 -0
- package/templates/app-expo/app/signin.tsx.example +0 -0
- package/templates/app-expo/app.json.example +0 -0
- package/templates/app-expo/assets/adaptive-icon.png +0 -0
- package/templates/app-expo/assets/favicon.png +0 -0
- package/templates/app-expo/assets/icon.png +0 -0
- package/templates/app-expo/assets/splash.png +0 -0
- package/templates/app-expo/babel.config.js.example +0 -0
- package/templates/app-expo/eas.json.example +0 -0
- package/templates/app-expo/expo-env.d.ts.example +0 -0
- package/templates/app-expo/metro.config.js.example +0 -0
- package/templates/app-expo/service-account-key.json.example +1 -1
- package/templates/app-expo/src/config/app.ts.example +0 -0
- package/templates/app-expo/src/config/providers.ts.example +1 -1
- package/templates/app-expo/tsconfig.json.example +0 -0
- package/templates/app-next/.env.example +0 -33
- package/templates/app-next/next.config.ts.example +0 -2
- package/templates/app-next/postcss.config.js.example +0 -0
- package/templates/app-next/service-account-key.json.example +0 -0
- package/templates/app-next/src/app/ClientLayout.tsx.example +0 -0
- package/templates/app-next/src/app/not-found.tsx.example +14 -1
- package/templates/app-next/src/config/app.ts.example +1 -1
- package/templates/app-next/src/config/legal.ts.example +0 -0
- package/templates/app-next/src/config/providers.ts.example +1 -1
- package/templates/app-next/src/globals.css.example +0 -0
- package/templates/app-next/src/locales/dndev_en.json.example +0 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-next/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-next/src/pages/locales/example_en.json.example +0 -0
- package/templates/app-next/src/themes.css.example +7 -1
- package/templates/app-vite/.env.example +0 -33
- package/templates/app-vite/csp.example.json +0 -0
- package/templates/app-vite/index.html.example +0 -0
- package/templates/app-vite/service-account-key.json.example +0 -0
- package/templates/app-vite/src/App.tsx.example +0 -0
- package/templates/app-vite/src/config/app.ts.example +1 -1
- package/templates/app-vite/src/config/legal.ts.example +0 -0
- package/templates/app-vite/src/config/providers.ts.example +1 -1
- package/templates/app-vite/src/globals.css.example +0 -0
- package/templates/app-vite/src/locales/dndev_en.json.example +0 -0
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/main.tsx.example +0 -0
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +0 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-vite/src/pages/ListPageExample.tsx.example +0 -0
- package/templates/app-vite/src/pages/NotFoundPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/locales/example_en.json.example +0 -0
- package/templates/app-vite/src/themes.css.example +5 -0
- package/templates/deploy-config/.firebaserc.example +0 -0
- package/templates/deploy-config/firestore.indexes.json.example +0 -0
- package/templates/deploy-config/firestore.rules.example +0 -0
- package/templates/deploy-config/storage.rules.example +0 -0
- package/templates/deploy-config/tsconfig.functions.json.example +0 -0
- package/templates/deploy-config/vercel.json.example +2 -2
- package/templates/functions-firebase/.env.example +2 -2
- package/templates/functions-firebase/README.md.example +3 -3
- package/templates/functions-firebase/build.mjs.example +0 -0
- package/templates/functions-firebase/functions.config.js.example +0 -0
- package/templates/functions-firebase/functions.yaml.example +0 -0
- package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +0 -0
- package/templates/functions-firebase/src/auth/index.ts.example +0 -0
- package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +0 -0
- package/templates/functions-firebase/src/billing/index.ts.example +0 -0
- package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -0
- package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +0 -0
- package/templates/functions-firebase/src/crud/createEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/deleteEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/getEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/index.ts.example +0 -0
- package/templates/functions-firebase/src/crud/listEntities.ts.example +0 -0
- package/templates/functions-firebase/src/crud/updateEntity.ts.example +0 -0
- package/templates/functions-firebase/src/index.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/disconnect.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/getConnections.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/index.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/refreshToken.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/tsconfig.json.example +0 -0
- package/templates/functions-supabase/supabase/config.toml.example +0 -0
- package/templates/functions-supabase/supabase/functions/.env.example +0 -0
- package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/crud/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/deno.json.example +0 -0
- package/templates/functions-supabase/supabase/functions/disconnect-oauth/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/exchange-token/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-connections/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/refresh-token/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000004_crud_bulk.sql +192 -0
- package/templates/functions-vercel/.env.example +3 -3
- package/templates/functions-vercel/README.md.example +2 -2
- package/templates/functions-vercel/build.mjs.example +0 -0
- package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/createEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/getEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/listEntities.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/tsconfig.json.example +0 -0
- package/templates/functions-vercel/vercel.json.example +0 -0
- package/templates/github-consumer/.github/workflows/ci.yml.example +0 -0
- package/templates/overlay-firebase/env.fragment.example +0 -0
- package/templates/overlay-firebase/env.fragment.expo.example +0 -0
- package/templates/overlay-firebase/env.fragment.nextjs.example +0 -0
- package/templates/overlay-firebase/src/config/providers.expo.ts.example +0 -0
- package/templates/overlay-firebase/src/config/providers.ts.example +0 -0
- package/templates/overlay-supabase/env.fragment.example +0 -0
- package/templates/overlay-supabase/env.fragment.expo.example +0 -0
- package/templates/overlay-supabase/env.fragment.nextjs.example +0 -0
- package/templates/overlay-supabase/src/config/providers.expo.ts.example +1 -1
- package/templates/overlay-supabase/src/config/providers.ts.example +1 -1
- package/templates/overlay-vercel/env.fragment.example +0 -0
- package/templates/overlay-vercel/env.fragment.nextjs.example +0 -0
- package/templates/overlay-vercel/src/config/providers.ts.example +0 -0
- package/templates/preset-admin/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/EntityPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/ReportsPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/AboutPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/ContactPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/PricingPage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/ProfilePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +0 -0
- package/templates/root-consumer/.claude/agents/builder.md.example +0 -0
- package/templates/root-consumer/.claude/agents/coder.md.example +0 -0
- package/templates/root-consumer/.claude/agents/extractor.md.example +0 -0
- package/templates/root-consumer/.claude/agents/polisher.md.example +0 -0
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +0 -0
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +0 -0
- package/templates/root-consumer/.claude/hooks/guard-write.sh.example +2 -35
- package/templates/root-consumer/.claude/hooks/session-start.sh.example +1 -1
- package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +0 -0
- package/templates/root-consumer/.claude/rules/consumer-ux.md.example +1 -1
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +0 -0
- package/templates/root-consumer/.claude/rules/framework.md.example +0 -0
- package/templates/root-consumer/.claude/rules/git.md.example +0 -0
- package/templates/root-consumer/.claude/rules/security.md.example +0 -0
- package/templates/root-consumer/.claude/settings.json.example +1 -27
- package/templates/root-consumer/.claude/skills/brainstorm/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/build/SKILL.md.example +23 -106
- package/templates/root-consumer/.claude/skills/design/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/design/output-template.md +0 -0
- package/templates/root-consumer/.claude/skills/grill/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/polish/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/techdebt/SKILL.md.example +0 -0
- package/templates/root-consumer/.cursor/mcp.json.example +0 -0
- package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +5 -1
- package/templates/root-consumer/.dndev/args.json.example +0 -0
- package/templates/root-consumer/.dndev.secrets.example +0 -0
- package/templates/root-consumer/.env.example +0 -1
- package/templates/root-consumer/.gemini/settings.json.example +0 -0
- package/templates/root-consumer/.gitignore.example +1 -0
- package/templates/root-consumer/.mcp.json.example +0 -0
- package/templates/root-consumer/.prettierrc.cjs.example +0 -0
- package/templates/root-consumer/AGENTS.md.example +63 -0
- package/templates/root-consumer/CLAUDE.md.example +1 -33
- package/templates/root-consumer/README.md.example +11 -33
- package/templates/root-consumer/entities/index.ts.example +0 -0
- package/templates/root-consumer/eslint.config.js.example +0 -0
- package/templates/root-consumer/tsconfig.json.example +0 -0
- package/templates/root-consumer/.claude/hooks/framework-compliance.sh.example +0 -56
- package/templates/root-consumer/.claude/hooks/guard-files.sh.example +0 -46
- package/templates/root-consumer/.claude/hooks/guard-mcp.sh.example +0 -91
- package/templates/root-consumer/.claude/hooks/guard-secrets.sh.example +0 -67
- package/templates/root-consumer/.claude/hooks/track-mcp-lookup.sh.example +0 -20
- package/templates/root-consumer/.claude/statusline.py.example +0 -79
- package/templates/root-consumer/.clinerules.example +0 -1
- package/templates/root-consumer/.cursorrules.example +0 -1
- package/templates/root-consumer/.github/copilot-instructions.md.example +0 -1
- package/templates/root-consumer/.windsurfrules.example +0 -1
- package/templates/root-consumer/AI.md.example +0 -108
- package/templates/root-consumer/CONVENTIONS.md.example +0 -1
- package/templates/root-consumer/GEMINI.md.example +0 -1
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +0 -135
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -276
- package/templates/root-consumer/guides/dndev/INDEX.md.example +0 -56
- package/templates/root-consumer/guides/dndev/SETUP_AUTH.md.example +0 -134
- package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +0 -114
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +0 -231
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH.md.example +0 -59
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +0 -60
- package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +0 -234
- package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +0 -62
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +0 -262
- package/templates/root-consumer/guides/dndev/advanced/APP_CHECK.md.example +0 -111
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +0 -252
- package/templates/root-consumer/guides/dndev/advanced/EMULATORS.md.example +0 -48
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +0 -402
- package/templates/root-consumer/guides/wai-way/agents/architect.md.example +0 -78
- package/templates/root-consumer/guides/wai-way/agents/builder.md.example +0 -97
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +0 -363
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +0 -133
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +0 -315
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +0 -133
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +0 -111
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +0 -148
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +0 -238
- package/templates/root-consumer/guides/wai-way/context_map.json.example +0 -127
- package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +0 -839
- package/templates/root-consumer/guides/wai-way/hld_template.md.example +0 -138
- package/templates/root-consumer/guides/wai-way/lld_template.md.example +0 -103
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +0 -722
- package/templates/root-consumer/guides/wai-way/prd_template.md.example +0 -140
- package/templates/root-consumer/guides/wai-way/presets_guide.md.example +0 -217
- package/templates/root-consumer/guides/wai-way/spec_template.md.example +0 -313
|
@@ -4,11 +4,11 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __require = /* @__PURE__ */ ((
|
|
8
|
-
get: (a,
|
|
9
|
-
}) :
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
10
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' +
|
|
11
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
12
|
});
|
|
13
13
|
var __esm = (fn, res) => function __init() {
|
|
14
14
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
@@ -37,50 +37,456 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
37
37
|
mod
|
|
38
38
|
));
|
|
39
39
|
|
|
40
|
+
// node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
|
|
41
|
+
var isAmbiguous, isFullWidth, isWide;
|
|
42
|
+
var init_utils = __esm({
|
|
43
|
+
"node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
|
|
44
|
+
init_utils2();
|
|
45
|
+
isAmbiguous = (x) => {
|
|
46
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
47
|
+
};
|
|
48
|
+
isFullWidth = (x) => {
|
|
49
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
50
|
+
};
|
|
51
|
+
isWide = (x) => {
|
|
52
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
|
|
58
|
+
var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
|
|
59
|
+
var init_dist = __esm({
|
|
60
|
+
"node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
|
|
61
|
+
init_utils2();
|
|
62
|
+
init_utils();
|
|
63
|
+
ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
|
|
64
|
+
CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
65
|
+
TAB_RE = /\t{1,1000}/y;
|
|
66
|
+
EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
|
|
67
|
+
LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
68
|
+
MODIFIER_RE = new RegExp("\\p{M}+", "gu");
|
|
69
|
+
NO_TRUNCATION = { limit: Infinity, ellipsis: "" };
|
|
70
|
+
getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
|
|
71
|
+
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
72
|
+
const ELLIPSIS = truncationOptions.ellipsis ?? "";
|
|
73
|
+
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
|
|
74
|
+
const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
|
|
75
|
+
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
76
|
+
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
77
|
+
const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
|
|
78
|
+
const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
|
|
79
|
+
const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
|
|
80
|
+
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
81
|
+
const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
|
|
82
|
+
let indexPrev = 0;
|
|
83
|
+
let index = 0;
|
|
84
|
+
let length = input.length;
|
|
85
|
+
let lengthExtra = 0;
|
|
86
|
+
let truncationEnabled = false;
|
|
87
|
+
let truncationIndex = length;
|
|
88
|
+
let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
|
|
89
|
+
let unmatchedStart = 0;
|
|
90
|
+
let unmatchedEnd = 0;
|
|
91
|
+
let width = 0;
|
|
92
|
+
let widthExtra = 0;
|
|
93
|
+
outer: while (true) {
|
|
94
|
+
if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
|
|
95
|
+
const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
|
|
96
|
+
lengthExtra = 0;
|
|
97
|
+
for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
|
|
98
|
+
const codePoint = char.codePointAt(0) || 0;
|
|
99
|
+
if (isFullWidth(codePoint)) {
|
|
100
|
+
widthExtra = FULL_WIDTH_WIDTH;
|
|
101
|
+
} else if (isWide(codePoint)) {
|
|
102
|
+
widthExtra = WIDE_WIDTH;
|
|
103
|
+
} else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
|
|
104
|
+
widthExtra = AMBIGUOUS_WIDTH;
|
|
105
|
+
} else {
|
|
106
|
+
widthExtra = REGULAR_WIDTH;
|
|
107
|
+
}
|
|
108
|
+
if (width + widthExtra > truncationLimit) {
|
|
109
|
+
truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
|
|
110
|
+
}
|
|
111
|
+
if (width + widthExtra > LIMIT) {
|
|
112
|
+
truncationEnabled = true;
|
|
113
|
+
break outer;
|
|
114
|
+
}
|
|
115
|
+
lengthExtra += char.length;
|
|
116
|
+
width += widthExtra;
|
|
117
|
+
}
|
|
118
|
+
unmatchedStart = unmatchedEnd = 0;
|
|
119
|
+
}
|
|
120
|
+
if (index >= length)
|
|
121
|
+
break;
|
|
122
|
+
LATIN_RE.lastIndex = index;
|
|
123
|
+
if (LATIN_RE.test(input)) {
|
|
124
|
+
lengthExtra = LATIN_RE.lastIndex - index;
|
|
125
|
+
widthExtra = lengthExtra * REGULAR_WIDTH;
|
|
126
|
+
if (width + widthExtra > truncationLimit) {
|
|
127
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
|
|
128
|
+
}
|
|
129
|
+
if (width + widthExtra > LIMIT) {
|
|
130
|
+
truncationEnabled = true;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
width += widthExtra;
|
|
134
|
+
unmatchedStart = indexPrev;
|
|
135
|
+
unmatchedEnd = index;
|
|
136
|
+
index = indexPrev = LATIN_RE.lastIndex;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
ANSI_RE.lastIndex = index;
|
|
140
|
+
if (ANSI_RE.test(input)) {
|
|
141
|
+
if (width + ANSI_WIDTH > truncationLimit) {
|
|
142
|
+
truncationIndex = Math.min(truncationIndex, index);
|
|
143
|
+
}
|
|
144
|
+
if (width + ANSI_WIDTH > LIMIT) {
|
|
145
|
+
truncationEnabled = true;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
width += ANSI_WIDTH;
|
|
149
|
+
unmatchedStart = indexPrev;
|
|
150
|
+
unmatchedEnd = index;
|
|
151
|
+
index = indexPrev = ANSI_RE.lastIndex;
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
CONTROL_RE.lastIndex = index;
|
|
155
|
+
if (CONTROL_RE.test(input)) {
|
|
156
|
+
lengthExtra = CONTROL_RE.lastIndex - index;
|
|
157
|
+
widthExtra = lengthExtra * CONTROL_WIDTH;
|
|
158
|
+
if (width + widthExtra > truncationLimit) {
|
|
159
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
|
|
160
|
+
}
|
|
161
|
+
if (width + widthExtra > LIMIT) {
|
|
162
|
+
truncationEnabled = true;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
width += widthExtra;
|
|
166
|
+
unmatchedStart = indexPrev;
|
|
167
|
+
unmatchedEnd = index;
|
|
168
|
+
index = indexPrev = CONTROL_RE.lastIndex;
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
TAB_RE.lastIndex = index;
|
|
172
|
+
if (TAB_RE.test(input)) {
|
|
173
|
+
lengthExtra = TAB_RE.lastIndex - index;
|
|
174
|
+
widthExtra = lengthExtra * TAB_WIDTH;
|
|
175
|
+
if (width + widthExtra > truncationLimit) {
|
|
176
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
|
|
177
|
+
}
|
|
178
|
+
if (width + widthExtra > LIMIT) {
|
|
179
|
+
truncationEnabled = true;
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
width += widthExtra;
|
|
183
|
+
unmatchedStart = indexPrev;
|
|
184
|
+
unmatchedEnd = index;
|
|
185
|
+
index = indexPrev = TAB_RE.lastIndex;
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
EMOJI_RE.lastIndex = index;
|
|
189
|
+
if (EMOJI_RE.test(input)) {
|
|
190
|
+
if (width + EMOJI_WIDTH > truncationLimit) {
|
|
191
|
+
truncationIndex = Math.min(truncationIndex, index);
|
|
192
|
+
}
|
|
193
|
+
if (width + EMOJI_WIDTH > LIMIT) {
|
|
194
|
+
truncationEnabled = true;
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
width += EMOJI_WIDTH;
|
|
198
|
+
unmatchedStart = indexPrev;
|
|
199
|
+
unmatchedEnd = index;
|
|
200
|
+
index = indexPrev = EMOJI_RE.lastIndex;
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
index += 1;
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
width: truncationEnabled ? truncationLimit : width,
|
|
207
|
+
index: truncationEnabled ? truncationIndex : length,
|
|
208
|
+
truncated: truncationEnabled,
|
|
209
|
+
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
dist_default = getStringTruncatedWidth;
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
|
|
217
|
+
var NO_TRUNCATION2, fastStringWidth, dist_default2;
|
|
218
|
+
var init_dist2 = __esm({
|
|
219
|
+
"node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
|
|
220
|
+
init_utils2();
|
|
221
|
+
init_dist();
|
|
222
|
+
NO_TRUNCATION2 = {
|
|
223
|
+
limit: Infinity,
|
|
224
|
+
ellipsis: "",
|
|
225
|
+
ellipsisWidth: 0
|
|
226
|
+
};
|
|
227
|
+
fastStringWidth = (input, options = {}) => {
|
|
228
|
+
return dist_default(input, NO_TRUNCATION2, options).width;
|
|
229
|
+
};
|
|
230
|
+
dist_default2 = fastStringWidth;
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
// node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
|
|
235
|
+
function wrapAnsi(string, columns, options) {
|
|
236
|
+
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
237
|
+
}
|
|
238
|
+
var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
|
|
239
|
+
var init_main = __esm({
|
|
240
|
+
"node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
|
|
241
|
+
init_utils2();
|
|
242
|
+
init_dist2();
|
|
243
|
+
ESC = "\x1B";
|
|
244
|
+
CSI = "\x9B";
|
|
245
|
+
END_CODE = 39;
|
|
246
|
+
ANSI_ESCAPE_BELL = "\x07";
|
|
247
|
+
ANSI_CSI = "[";
|
|
248
|
+
ANSI_OSC = "]";
|
|
249
|
+
ANSI_SGR_TERMINATOR = "m";
|
|
250
|
+
ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
251
|
+
GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
|
|
252
|
+
getClosingCode = (openingCode) => {
|
|
253
|
+
if (openingCode >= 30 && openingCode <= 37)
|
|
254
|
+
return 39;
|
|
255
|
+
if (openingCode >= 90 && openingCode <= 97)
|
|
256
|
+
return 39;
|
|
257
|
+
if (openingCode >= 40 && openingCode <= 47)
|
|
258
|
+
return 49;
|
|
259
|
+
if (openingCode >= 100 && openingCode <= 107)
|
|
260
|
+
return 49;
|
|
261
|
+
if (openingCode === 1 || openingCode === 2)
|
|
262
|
+
return 22;
|
|
263
|
+
if (openingCode === 3)
|
|
264
|
+
return 23;
|
|
265
|
+
if (openingCode === 4)
|
|
266
|
+
return 24;
|
|
267
|
+
if (openingCode === 7)
|
|
268
|
+
return 27;
|
|
269
|
+
if (openingCode === 8)
|
|
270
|
+
return 28;
|
|
271
|
+
if (openingCode === 9)
|
|
272
|
+
return 29;
|
|
273
|
+
if (openingCode === 0)
|
|
274
|
+
return 0;
|
|
275
|
+
return void 0;
|
|
276
|
+
};
|
|
277
|
+
wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
278
|
+
wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
279
|
+
wrapWord = (rows, word, columns) => {
|
|
280
|
+
const characters = word[Symbol.iterator]();
|
|
281
|
+
let isInsideEscape = false;
|
|
282
|
+
let isInsideLinkEscape = false;
|
|
283
|
+
let lastRow = rows.at(-1);
|
|
284
|
+
let visible = lastRow === void 0 ? 0 : dist_default2(lastRow);
|
|
285
|
+
let currentCharacter = characters.next();
|
|
286
|
+
let nextCharacter = characters.next();
|
|
287
|
+
let rawCharacterIndex = 0;
|
|
288
|
+
while (!currentCharacter.done) {
|
|
289
|
+
const character = currentCharacter.value;
|
|
290
|
+
const characterLength = dist_default2(character);
|
|
291
|
+
if (visible + characterLength <= columns) {
|
|
292
|
+
rows[rows.length - 1] += character;
|
|
293
|
+
} else {
|
|
294
|
+
rows.push(character);
|
|
295
|
+
visible = 0;
|
|
296
|
+
}
|
|
297
|
+
if (character === ESC || character === CSI) {
|
|
298
|
+
isInsideEscape = true;
|
|
299
|
+
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
|
|
300
|
+
}
|
|
301
|
+
if (isInsideEscape) {
|
|
302
|
+
if (isInsideLinkEscape) {
|
|
303
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
304
|
+
isInsideEscape = false;
|
|
305
|
+
isInsideLinkEscape = false;
|
|
306
|
+
}
|
|
307
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
308
|
+
isInsideEscape = false;
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
visible += characterLength;
|
|
312
|
+
if (visible === columns && !nextCharacter.done) {
|
|
313
|
+
rows.push("");
|
|
314
|
+
visible = 0;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
currentCharacter = nextCharacter;
|
|
318
|
+
nextCharacter = characters.next();
|
|
319
|
+
rawCharacterIndex += character.length;
|
|
320
|
+
}
|
|
321
|
+
lastRow = rows.at(-1);
|
|
322
|
+
if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) {
|
|
323
|
+
rows[rows.length - 2] += rows.pop();
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
stringVisibleTrimSpacesRight = (string) => {
|
|
327
|
+
const words = string.split(" ");
|
|
328
|
+
let last = words.length;
|
|
329
|
+
while (last) {
|
|
330
|
+
if (dist_default2(words[last - 1])) {
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
last--;
|
|
334
|
+
}
|
|
335
|
+
if (last === words.length) {
|
|
336
|
+
return string;
|
|
337
|
+
}
|
|
338
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
339
|
+
};
|
|
340
|
+
exec = (string, columns, options = {}) => {
|
|
341
|
+
if (options.trim !== false && string.trim() === "") {
|
|
342
|
+
return "";
|
|
343
|
+
}
|
|
344
|
+
let returnValue = "";
|
|
345
|
+
let escapeCode;
|
|
346
|
+
let escapeUrl;
|
|
347
|
+
const words = string.split(" ");
|
|
348
|
+
let rows = [""];
|
|
349
|
+
let rowLength = 0;
|
|
350
|
+
for (let index = 0; index < words.length; index++) {
|
|
351
|
+
const word = words[index];
|
|
352
|
+
if (options.trim !== false) {
|
|
353
|
+
const row = rows.at(-1) ?? "";
|
|
354
|
+
const trimmed = row.trimStart();
|
|
355
|
+
if (row.length !== trimmed.length) {
|
|
356
|
+
rows[rows.length - 1] = trimmed;
|
|
357
|
+
rowLength = dist_default2(trimmed);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if (index !== 0) {
|
|
361
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
362
|
+
rows.push("");
|
|
363
|
+
rowLength = 0;
|
|
364
|
+
}
|
|
365
|
+
if (rowLength || options.trim === false) {
|
|
366
|
+
rows[rows.length - 1] += " ";
|
|
367
|
+
rowLength++;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
const wordLength = dist_default2(word);
|
|
371
|
+
if (options.hard && wordLength > columns) {
|
|
372
|
+
const remainingColumns = columns - rowLength;
|
|
373
|
+
const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
|
|
374
|
+
const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
|
|
375
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
376
|
+
rows.push("");
|
|
377
|
+
}
|
|
378
|
+
wrapWord(rows, word, columns);
|
|
379
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
if (rowLength + wordLength > columns && rowLength && wordLength) {
|
|
383
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
384
|
+
wrapWord(rows, word, columns);
|
|
385
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
rows.push("");
|
|
389
|
+
rowLength = 0;
|
|
390
|
+
}
|
|
391
|
+
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
392
|
+
wrapWord(rows, word, columns);
|
|
393
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
rows[rows.length - 1] += word;
|
|
397
|
+
rowLength += wordLength;
|
|
398
|
+
}
|
|
399
|
+
if (options.trim !== false) {
|
|
400
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
401
|
+
}
|
|
402
|
+
const preString = rows.join("\n");
|
|
403
|
+
let inSurrogate = false;
|
|
404
|
+
for (let i = 0; i < preString.length; i++) {
|
|
405
|
+
const character = preString[i];
|
|
406
|
+
returnValue += character;
|
|
407
|
+
if (!inSurrogate) {
|
|
408
|
+
inSurrogate = character >= "\uD800" && character <= "\uDBFF";
|
|
409
|
+
} else {
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
if (character === ESC || character === CSI) {
|
|
413
|
+
GROUP_REGEX.lastIndex = i + 1;
|
|
414
|
+
const groupsResult = GROUP_REGEX.exec(preString);
|
|
415
|
+
const groups = groupsResult?.groups;
|
|
416
|
+
if (groups?.code !== void 0) {
|
|
417
|
+
const code = Number.parseFloat(groups.code);
|
|
418
|
+
escapeCode = code === END_CODE ? void 0 : code;
|
|
419
|
+
} else if (groups?.uri !== void 0) {
|
|
420
|
+
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
if (preString[i + 1] === "\n") {
|
|
424
|
+
if (escapeUrl) {
|
|
425
|
+
returnValue += wrapAnsiHyperlink("");
|
|
426
|
+
}
|
|
427
|
+
const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
|
|
428
|
+
if (escapeCode && closingCode) {
|
|
429
|
+
returnValue += wrapAnsiCode(closingCode);
|
|
430
|
+
}
|
|
431
|
+
} else if (character === "\n") {
|
|
432
|
+
if (escapeCode && getClosingCode(escapeCode)) {
|
|
433
|
+
returnValue += wrapAnsiCode(escapeCode);
|
|
434
|
+
}
|
|
435
|
+
if (escapeUrl) {
|
|
436
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return returnValue;
|
|
441
|
+
};
|
|
442
|
+
CRLF_OR_LF = /\r?\n/;
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
|
|
40
446
|
// node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
41
447
|
var require_src = __commonJS({
|
|
42
448
|
"node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
|
|
43
449
|
"use strict";
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
var
|
|
450
|
+
init_utils2();
|
|
451
|
+
var ESC2 = "\x1B";
|
|
452
|
+
var CSI2 = `${ESC2}[`;
|
|
47
453
|
var beep = "\x07";
|
|
48
454
|
var cursor = {
|
|
49
|
-
to(
|
|
50
|
-
if (!
|
|
51
|
-
return `${
|
|
455
|
+
to(x, y2) {
|
|
456
|
+
if (!y2) return `${CSI2}${x + 1}G`;
|
|
457
|
+
return `${CSI2}${y2 + 1};${x + 1}H`;
|
|
52
458
|
},
|
|
53
|
-
move(
|
|
459
|
+
move(x, y2) {
|
|
54
460
|
let ret = "";
|
|
55
|
-
if (
|
|
56
|
-
else if (
|
|
57
|
-
if (
|
|
58
|
-
else if (
|
|
461
|
+
if (x < 0) ret += `${CSI2}${-x}D`;
|
|
462
|
+
else if (x > 0) ret += `${CSI2}${x}C`;
|
|
463
|
+
if (y2 < 0) ret += `${CSI2}${-y2}A`;
|
|
464
|
+
else if (y2 > 0) ret += `${CSI2}${y2}B`;
|
|
59
465
|
return ret;
|
|
60
466
|
},
|
|
61
|
-
up: (count = 1) => `${
|
|
62
|
-
down: (count = 1) => `${
|
|
63
|
-
forward: (count = 1) => `${
|
|
64
|
-
backward: (count = 1) => `${
|
|
65
|
-
nextLine: (count = 1) => `${
|
|
66
|
-
prevLine: (count = 1) => `${
|
|
67
|
-
left: `${
|
|
68
|
-
hide: `${
|
|
69
|
-
show: `${
|
|
70
|
-
save: `${
|
|
71
|
-
restore: `${
|
|
467
|
+
up: (count = 1) => `${CSI2}${count}A`,
|
|
468
|
+
down: (count = 1) => `${CSI2}${count}B`,
|
|
469
|
+
forward: (count = 1) => `${CSI2}${count}C`,
|
|
470
|
+
backward: (count = 1) => `${CSI2}${count}D`,
|
|
471
|
+
nextLine: (count = 1) => `${CSI2}E`.repeat(count),
|
|
472
|
+
prevLine: (count = 1) => `${CSI2}F`.repeat(count),
|
|
473
|
+
left: `${CSI2}G`,
|
|
474
|
+
hide: `${CSI2}?25l`,
|
|
475
|
+
show: `${CSI2}?25h`,
|
|
476
|
+
save: `${ESC2}7`,
|
|
477
|
+
restore: `${ESC2}8`
|
|
72
478
|
};
|
|
73
479
|
var scroll = {
|
|
74
|
-
up: (count = 1) => `${
|
|
75
|
-
down: (count = 1) => `${
|
|
480
|
+
up: (count = 1) => `${CSI2}S`.repeat(count),
|
|
481
|
+
down: (count = 1) => `${CSI2}T`.repeat(count)
|
|
76
482
|
};
|
|
77
483
|
var erase = {
|
|
78
|
-
screen: `${
|
|
79
|
-
up: (count = 1) => `${
|
|
80
|
-
down: (count = 1) => `${
|
|
81
|
-
line: `${
|
|
82
|
-
lineEnd: `${
|
|
83
|
-
lineStart: `${
|
|
484
|
+
screen: `${CSI2}2J`,
|
|
485
|
+
up: (count = 1) => `${CSI2}1J`.repeat(count),
|
|
486
|
+
down: (count = 1) => `${CSI2}J`.repeat(count),
|
|
487
|
+
line: `${CSI2}2K`,
|
|
488
|
+
lineEnd: `${CSI2}K`,
|
|
489
|
+
lineStart: `${CSI2}1K`,
|
|
84
490
|
lines(count) {
|
|
85
491
|
let clear = "";
|
|
86
492
|
for (let i = 0; i < count; i++)
|
|
@@ -94,709 +500,587 @@ var require_src = __commonJS({
|
|
|
94
500
|
}
|
|
95
501
|
});
|
|
96
502
|
|
|
97
|
-
// node_modules/.bun
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
108
|
-
};
|
|
109
|
-
var replaceClose = (string, close, replace, index) => {
|
|
110
|
-
let result = "", cursor = 0;
|
|
111
|
-
do {
|
|
112
|
-
result += string.substring(cursor, index) + replace;
|
|
113
|
-
cursor = index + close.length;
|
|
114
|
-
index = string.indexOf(close, cursor);
|
|
115
|
-
} while (~index);
|
|
116
|
-
return result + string.substring(cursor);
|
|
117
|
-
};
|
|
118
|
-
var createColors = (enabled = isColorSupported) => {
|
|
119
|
-
let f = enabled ? formatter : () => String;
|
|
120
|
-
return {
|
|
121
|
-
isColorSupported: enabled,
|
|
122
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
123
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
124
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
125
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
126
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
127
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
128
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
129
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
130
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
131
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
132
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
133
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
134
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
135
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
136
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
137
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
138
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
139
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
140
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
141
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
142
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
143
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
144
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
145
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
146
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
147
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
148
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
149
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
150
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
151
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
152
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
153
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
154
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
155
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
156
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
157
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
158
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
159
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
160
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
161
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
162
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
module.exports = createColors();
|
|
166
|
-
module.exports.createColors = createColors;
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
// node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
|
|
171
|
-
import { stdin as j, stdout as M } from "node:process";
|
|
172
|
-
import * as g from "node:readline";
|
|
173
|
-
import O from "node:readline";
|
|
174
|
-
import { Writable as X } from "node:stream";
|
|
175
|
-
function DD({ onlyFirst: e2 = false } = {}) {
|
|
176
|
-
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
177
|
-
return new RegExp(t, e2 ? void 0 : "g");
|
|
178
|
-
}
|
|
179
|
-
function P(e2) {
|
|
180
|
-
if (typeof e2 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof e2}\``);
|
|
181
|
-
return e2.replace(uD, "");
|
|
182
|
-
}
|
|
183
|
-
function L(e2) {
|
|
184
|
-
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
185
|
-
}
|
|
186
|
-
function p(e2, u2 = {}) {
|
|
187
|
-
if (typeof e2 != "string" || e2.length === 0 || (u2 = { ambiguousIsNarrow: true, ...u2 }, e2 = P(e2), e2.length === 0)) return 0;
|
|
188
|
-
e2 = e2.replace(sD(), " ");
|
|
189
|
-
const t = u2.ambiguousIsNarrow ? 1 : 2;
|
|
190
|
-
let F2 = 0;
|
|
191
|
-
for (const s of e2) {
|
|
192
|
-
const i = s.codePointAt(0);
|
|
193
|
-
if (i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879) continue;
|
|
194
|
-
switch (eD.eastAsianWidth(s)) {
|
|
195
|
-
case "F":
|
|
196
|
-
case "W":
|
|
197
|
-
F2 += 2;
|
|
198
|
-
break;
|
|
199
|
-
case "A":
|
|
200
|
-
F2 += t;
|
|
201
|
-
break;
|
|
202
|
-
default:
|
|
203
|
-
F2 += 1;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return F2;
|
|
503
|
+
// node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
|
|
504
|
+
import { styleText as y } from "node:util";
|
|
505
|
+
import { stdout as S, stdin as $ } from "node:process";
|
|
506
|
+
import * as _ from "node:readline";
|
|
507
|
+
import P from "node:readline";
|
|
508
|
+
import { ReadStream as D } from "node:tty";
|
|
509
|
+
function d(r, t2, e) {
|
|
510
|
+
if (!e.some((o) => !o.disabled)) return r;
|
|
511
|
+
const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
|
|
512
|
+
return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
|
|
207
513
|
}
|
|
208
|
-
function
|
|
209
|
-
|
|
210
|
-
for (const
|
|
211
|
-
for (const [F2, s] of Object.entries(t)) r[F2] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, t[F2] = r[F2], e2.set(s[0], s[1]);
|
|
212
|
-
Object.defineProperty(r, u2, { value: t, enumerable: false });
|
|
213
|
-
}
|
|
214
|
-
return Object.defineProperty(r, "codes", { value: e2, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = N(), r.color.ansi256 = I(), r.color.ansi16m = R(), r.bgColor.ansi = N(w), r.bgColor.ansi256 = I(w), r.bgColor.ansi16m = R(w), Object.defineProperties(r, { rgbToAnsi256: { value: (u2, t, F2) => u2 === t && t === F2 ? u2 < 8 ? 16 : u2 > 248 ? 231 : Math.round((u2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u2 / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(F2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u2) => {
|
|
215
|
-
const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u2.toString(16));
|
|
216
|
-
if (!t) return [0, 0, 0];
|
|
217
|
-
let [F2] = t;
|
|
218
|
-
F2.length === 3 && (F2 = [...F2].map((i) => i + i).join(""));
|
|
219
|
-
const s = Number.parseInt(F2, 16);
|
|
220
|
-
return [s >> 16 & 255, s >> 8 & 255, s & 255];
|
|
221
|
-
}, enumerable: false }, hexToAnsi256: { value: (u2) => r.rgbToAnsi256(...r.hexToRgb(u2)), enumerable: false }, ansi256ToAnsi: { value: (u2) => {
|
|
222
|
-
if (u2 < 8) return 30 + u2;
|
|
223
|
-
if (u2 < 16) return 90 + (u2 - 8);
|
|
224
|
-
let t, F2, s;
|
|
225
|
-
if (u2 >= 232) t = ((u2 - 232) * 10 + 8) / 255, F2 = t, s = t;
|
|
226
|
-
else {
|
|
227
|
-
u2 -= 16;
|
|
228
|
-
const C2 = u2 % 36;
|
|
229
|
-
t = Math.floor(u2 / 36) / 5, F2 = Math.floor(C2 / 6) / 5, s = C2 % 6 / 5;
|
|
230
|
-
}
|
|
231
|
-
const i = Math.max(t, F2, s) * 2;
|
|
232
|
-
if (i === 0) return 30;
|
|
233
|
-
let D2 = 30 + (Math.round(s) << 2 | Math.round(F2) << 1 | Math.round(t));
|
|
234
|
-
return i === 2 && (D2 += 60), D2;
|
|
235
|
-
}, enumerable: false }, rgbToAnsi: { value: (u2, t, F2) => r.ansi256ToAnsi(r.rgbToAnsi256(u2, t, F2)), enumerable: false }, hexToAnsi: { value: (u2) => r.ansi256ToAnsi(r.hexToAnsi256(u2)), enumerable: false } }), r;
|
|
236
|
-
}
|
|
237
|
-
function Y(e2, u2, t) {
|
|
238
|
-
return String(e2).normalize().replace(/\r\n/g, `
|
|
239
|
-
`).split(`
|
|
240
|
-
`).map((F2) => lD(F2, u2, t)).join(`
|
|
241
|
-
`);
|
|
242
|
-
}
|
|
243
|
-
function $(e2, u2) {
|
|
244
|
-
if (typeof e2 == "string") return B.aliases.get(e2) === u2;
|
|
245
|
-
for (const t of e2) if (t !== void 0 && $(t, u2)) return true;
|
|
514
|
+
function V(r, t2) {
|
|
515
|
+
if (typeof r == "string") return u.aliases.get(r) === t2;
|
|
516
|
+
for (const e of r) if (e !== void 0 && V(e, t2)) return true;
|
|
246
517
|
return false;
|
|
247
518
|
}
|
|
248
|
-
function
|
|
249
|
-
if (
|
|
250
|
-
const
|
|
251
|
-
`),
|
|
252
|
-
`), s = [];
|
|
253
|
-
for (let
|
|
254
|
-
return s;
|
|
519
|
+
function j(r, t2) {
|
|
520
|
+
if (r === t2) return;
|
|
521
|
+
const e = r.split(`
|
|
522
|
+
`), s = t2.split(`
|
|
523
|
+
`), i = Math.max(e.length, s.length), n = [];
|
|
524
|
+
for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
|
|
525
|
+
return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
|
|
255
526
|
}
|
|
256
|
-
function
|
|
257
|
-
return
|
|
527
|
+
function q(r) {
|
|
528
|
+
return r === C;
|
|
258
529
|
}
|
|
259
|
-
function
|
|
260
|
-
const
|
|
261
|
-
|
|
530
|
+
function w(r, t2) {
|
|
531
|
+
const e = r;
|
|
532
|
+
e.isTTY && e.setRawMode(t2);
|
|
262
533
|
}
|
|
263
|
-
function
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
const
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
|
|
534
|
+
function z({ input: r = $, output: t2 = S, overwrite: e = true, hideCursor: s = true } = {}) {
|
|
535
|
+
const i = _.createInterface({ input: r, output: t2, prompt: "", tabSize: 1 });
|
|
536
|
+
_.emitKeypressEvents(r, i), r instanceof D && r.isTTY && r.setRawMode(true);
|
|
537
|
+
const n = (o, { name: a, sequence: h }) => {
|
|
538
|
+
const l = String(o);
|
|
539
|
+
if (V([l, a, h], "cancel")) {
|
|
540
|
+
s && t2.write(import_sisteransi.cursor.show), process.exit(0);
|
|
270
541
|
return;
|
|
271
542
|
}
|
|
272
|
-
if (!
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
543
|
+
if (!e) return;
|
|
544
|
+
const f = a === "return" ? 0 : -1, v = a === "return" ? -1 : 0;
|
|
545
|
+
_.moveCursor(t2, f, v, () => {
|
|
546
|
+
_.clearLine(t2, 1, () => {
|
|
547
|
+
r.once("keypress", n);
|
|
277
548
|
});
|
|
278
549
|
});
|
|
279
550
|
};
|
|
280
|
-
return
|
|
281
|
-
|
|
551
|
+
return s && t2.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
|
|
552
|
+
r.off("keypress", n), s && t2.write(import_sisteransi.cursor.show), r instanceof D && r.isTTY && !Y && r.setRawMode(false), i.terminal = false, i.close();
|
|
282
553
|
};
|
|
283
554
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
555
|
+
function R(r, t2, e, s = e) {
|
|
556
|
+
const i = O(r ?? S);
|
|
557
|
+
return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
|
|
558
|
+
`).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
|
|
559
|
+
`);
|
|
560
|
+
}
|
|
561
|
+
var import_sisteransi, E, G, u, Y, C, O, A, p, Q, nt, at;
|
|
562
|
+
var init_dist3 = __esm({
|
|
563
|
+
"node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
|
|
564
|
+
init_utils2();
|
|
565
|
+
init_main();
|
|
288
566
|
import_sisteransi = __toESM(require_src(), 1);
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
(
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
return D2;
|
|
316
|
-
};
|
|
317
|
-
})(W);
|
|
318
|
-
tD = W.exports;
|
|
319
|
-
eD = L(tD);
|
|
320
|
-
FD = function() {
|
|
321
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
322
|
-
};
|
|
323
|
-
sD = L(FD);
|
|
324
|
-
w = 10;
|
|
325
|
-
N = (e2 = 0) => (u2) => `\x1B[${u2 + e2}m`;
|
|
326
|
-
I = (e2 = 0) => (u2) => `\x1B[${38 + e2};5;${u2}m`;
|
|
327
|
-
R = (e2 = 0) => (u2, t, F2) => `\x1B[${38 + e2};2;${u2};${t};${F2}m`;
|
|
328
|
-
r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
329
|
-
Object.keys(r.modifier);
|
|
330
|
-
iD = Object.keys(r.color);
|
|
331
|
-
CD = Object.keys(r.bgColor);
|
|
332
|
-
[...iD, ...CD];
|
|
333
|
-
ED = rD();
|
|
334
|
-
d = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
|
|
335
|
-
oD = 39;
|
|
336
|
-
y = "\x07";
|
|
337
|
-
V = "[";
|
|
338
|
-
nD = "]";
|
|
339
|
-
G = "m";
|
|
340
|
-
_ = `${nD}8;;`;
|
|
341
|
-
z = (e2) => `${d.values().next().value}${V}${e2}${G}`;
|
|
342
|
-
K = (e2) => `${d.values().next().value}${_}${e2}${y}`;
|
|
343
|
-
aD = (e2) => e2.split(" ").map((u2) => p(u2));
|
|
344
|
-
k = (e2, u2, t) => {
|
|
345
|
-
const F2 = [...u2];
|
|
346
|
-
let s = false, i = false, D2 = p(P(e2[e2.length - 1]));
|
|
347
|
-
for (const [C2, n] of F2.entries()) {
|
|
348
|
-
const E = p(n);
|
|
349
|
-
if (D2 + E <= t ? e2[e2.length - 1] += n : (e2.push(n), D2 = 0), d.has(n) && (s = true, i = F2.slice(C2 + 1).join("").startsWith(_)), s) {
|
|
350
|
-
i ? n === y && (s = false, i = false) : n === G && (s = false);
|
|
351
|
-
continue;
|
|
352
|
-
}
|
|
353
|
-
D2 += E, D2 === t && C2 < F2.length - 1 && (e2.push(""), D2 = 0);
|
|
354
|
-
}
|
|
355
|
-
!D2 && e2[e2.length - 1].length > 0 && e2.length > 1 && (e2[e2.length - 2] += e2.pop());
|
|
356
|
-
};
|
|
357
|
-
hD = (e2) => {
|
|
358
|
-
const u2 = e2.split(" ");
|
|
359
|
-
let t = u2.length;
|
|
360
|
-
for (; t > 0 && !(p(u2[t - 1]) > 0); ) t--;
|
|
361
|
-
return t === u2.length ? e2 : u2.slice(0, t).join(" ") + u2.slice(t).join("");
|
|
362
|
-
};
|
|
363
|
-
lD = (e2, u2, t = {}) => {
|
|
364
|
-
if (t.trim !== false && e2.trim() === "") return "";
|
|
365
|
-
let F2 = "", s, i;
|
|
366
|
-
const D2 = aD(e2);
|
|
367
|
-
let C2 = [""];
|
|
368
|
-
for (const [E, a] of e2.split(" ").entries()) {
|
|
369
|
-
t.trim !== false && (C2[C2.length - 1] = C2[C2.length - 1].trimStart());
|
|
370
|
-
let o2 = p(C2[C2.length - 1]);
|
|
371
|
-
if (E !== 0 && (o2 >= u2 && (t.wordWrap === false || t.trim === false) && (C2.push(""), o2 = 0), (o2 > 0 || t.trim === false) && (C2[C2.length - 1] += " ", o2++)), t.hard && D2[E] > u2) {
|
|
372
|
-
const c = u2 - o2, f = 1 + Math.floor((D2[E] - c - 1) / u2);
|
|
373
|
-
Math.floor((D2[E] - 1) / u2) < f && C2.push(""), k(C2, a, u2);
|
|
374
|
-
continue;
|
|
375
|
-
}
|
|
376
|
-
if (o2 + D2[E] > u2 && o2 > 0 && D2[E] > 0) {
|
|
377
|
-
if (t.wordWrap === false && o2 < u2) {
|
|
378
|
-
k(C2, a, u2);
|
|
379
|
-
continue;
|
|
380
|
-
}
|
|
381
|
-
C2.push("");
|
|
382
|
-
}
|
|
383
|
-
if (o2 + D2[E] > u2 && t.wordWrap === false) {
|
|
384
|
-
k(C2, a, u2);
|
|
385
|
-
continue;
|
|
386
|
-
}
|
|
387
|
-
C2[C2.length - 1] += a;
|
|
388
|
-
}
|
|
389
|
-
t.trim !== false && (C2 = C2.map((E) => hD(E)));
|
|
390
|
-
const n = [...C2.join(`
|
|
391
|
-
`)];
|
|
392
|
-
for (const [E, a] of n.entries()) {
|
|
393
|
-
if (F2 += a, d.has(a)) {
|
|
394
|
-
const { groups: c } = new RegExp(`(?:\\${V}(?<code>\\d+)m|\\${_}(?<uri>.*)${y})`).exec(n.slice(E).join("")) || { groups: {} };
|
|
395
|
-
if (c.code !== void 0) {
|
|
396
|
-
const f = Number.parseFloat(c.code);
|
|
397
|
-
s = f === oD ? void 0 : f;
|
|
398
|
-
} else c.uri !== void 0 && (i = c.uri.length === 0 ? void 0 : c.uri);
|
|
399
|
-
}
|
|
400
|
-
const o2 = ED.codes.get(Number(s));
|
|
401
|
-
n[E + 1] === `
|
|
402
|
-
` ? (i && (F2 += K("")), s && o2 && (F2 += z(o2))) : a === `
|
|
403
|
-
` && (s && o2 && (F2 += z(s)), i && (F2 += K(i)));
|
|
404
|
-
}
|
|
405
|
-
return F2;
|
|
406
|
-
};
|
|
407
|
-
xD = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
408
|
-
B = { actions: new Set(xD), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]) };
|
|
409
|
-
AD = globalThis.process.platform.startsWith("win");
|
|
410
|
-
S = /* @__PURE__ */ Symbol("clack:cancel");
|
|
411
|
-
gD = Object.defineProperty;
|
|
412
|
-
vD = (e2, u2, t) => u2 in e2 ? gD(e2, u2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[u2] = t;
|
|
413
|
-
h = (e2, u2, t) => (vD(e2, typeof u2 != "symbol" ? u2 + "" : u2, t), t);
|
|
414
|
-
x = class {
|
|
415
|
-
constructor(u2, t = true) {
|
|
416
|
-
h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
|
|
417
|
-
const { input: F2 = j, output: s = M, render: i, signal: D2, ...C2 } = u2;
|
|
418
|
-
this.opts = C2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = t, this._abortSignal = D2, this.input = F2, this.output = s;
|
|
567
|
+
E = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
568
|
+
G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
569
|
+
u = { actions: new Set(E), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t2) => `There are only ${r} days in ${t2}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
|
|
570
|
+
Y = globalThis.process.platform.startsWith("win");
|
|
571
|
+
C = /* @__PURE__ */ Symbol("clack:cancel");
|
|
572
|
+
O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
|
|
573
|
+
A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
|
|
574
|
+
p = class {
|
|
575
|
+
input;
|
|
576
|
+
output;
|
|
577
|
+
_abortSignal;
|
|
578
|
+
rl;
|
|
579
|
+
opts;
|
|
580
|
+
_render;
|
|
581
|
+
_track = false;
|
|
582
|
+
_prevFrame = "";
|
|
583
|
+
_subscribers = /* @__PURE__ */ new Map();
|
|
584
|
+
_cursor = 0;
|
|
585
|
+
state = "initial";
|
|
586
|
+
error = "";
|
|
587
|
+
value;
|
|
588
|
+
userInput = "";
|
|
589
|
+
constructor(t2, e = true) {
|
|
590
|
+
const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
|
|
591
|
+
this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
|
|
419
592
|
}
|
|
420
593
|
unsubscribe() {
|
|
421
594
|
this._subscribers.clear();
|
|
422
595
|
}
|
|
423
|
-
setSubscriber(
|
|
424
|
-
const
|
|
425
|
-
|
|
596
|
+
setSubscriber(t2, e) {
|
|
597
|
+
const s = this._subscribers.get(t2) ?? [];
|
|
598
|
+
s.push(e), this._subscribers.set(t2, s);
|
|
426
599
|
}
|
|
427
|
-
on(
|
|
428
|
-
this.setSubscriber(
|
|
600
|
+
on(t2, e) {
|
|
601
|
+
this.setSubscriber(t2, { cb: e });
|
|
429
602
|
}
|
|
430
|
-
once(
|
|
431
|
-
this.setSubscriber(
|
|
603
|
+
once(t2, e) {
|
|
604
|
+
this.setSubscriber(t2, { cb: e, once: true });
|
|
432
605
|
}
|
|
433
|
-
emit(
|
|
434
|
-
const
|
|
435
|
-
for (const
|
|
436
|
-
for (const
|
|
606
|
+
emit(t2, ...e) {
|
|
607
|
+
const s = this._subscribers.get(t2) ?? [], i = [];
|
|
608
|
+
for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
|
|
609
|
+
for (const n of i) n();
|
|
437
610
|
}
|
|
438
611
|
prompt() {
|
|
439
|
-
return new Promise((
|
|
612
|
+
return new Promise((t2) => {
|
|
440
613
|
if (this._abortSignal) {
|
|
441
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(),
|
|
614
|
+
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
|
|
442
615
|
this._abortSignal.addEventListener("abort", () => {
|
|
443
616
|
this.state = "cancel", this.close();
|
|
444
617
|
}, { once: true });
|
|
445
618
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D2();
|
|
449
|
-
}, this.input.pipe(F2), this.rl = O.createInterface({ input: this.input, output: F2, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), O.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), m(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
450
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false), u2(this.value);
|
|
619
|
+
this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
620
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
|
|
451
621
|
}), this.once("cancel", () => {
|
|
452
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render),
|
|
622
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
|
|
453
623
|
});
|
|
454
624
|
});
|
|
455
625
|
}
|
|
456
|
-
|
|
457
|
-
|
|
626
|
+
_isActionKey(t2, e) {
|
|
627
|
+
return t2 === " ";
|
|
628
|
+
}
|
|
629
|
+
_setValue(t2) {
|
|
630
|
+
this.value = t2, this.emit("value", this.value);
|
|
631
|
+
}
|
|
632
|
+
_setUserInput(t2, e) {
|
|
633
|
+
this.userInput = t2 ?? "", this.emit("userInput", this.userInput), e && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
|
|
634
|
+
}
|
|
635
|
+
_clearUserInput() {
|
|
636
|
+
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
637
|
+
}
|
|
638
|
+
onKeypress(t2, e) {
|
|
639
|
+
if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2?.toLowerCase(), e), e?.name === "return") {
|
|
458
640
|
if (this.opts.validate) {
|
|
459
|
-
const
|
|
460
|
-
|
|
641
|
+
const s = this.opts.validate(this.value);
|
|
642
|
+
s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
|
|
461
643
|
}
|
|
462
644
|
this.state !== "error" && (this.state = "submit");
|
|
463
645
|
}
|
|
464
|
-
|
|
646
|
+
V([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
465
647
|
}
|
|
466
648
|
close() {
|
|
467
649
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
468
|
-
`),
|
|
650
|
+
`), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
469
651
|
}
|
|
470
652
|
restoreCursor() {
|
|
471
|
-
const
|
|
653
|
+
const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
|
|
472
654
|
`).length - 1;
|
|
473
|
-
this.output.write(import_sisteransi.cursor.move(-999,
|
|
655
|
+
this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
|
|
474
656
|
}
|
|
475
657
|
render() {
|
|
476
|
-
const
|
|
477
|
-
if (
|
|
658
|
+
const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
|
|
659
|
+
if (t2 !== this._prevFrame) {
|
|
478
660
|
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
479
661
|
else {
|
|
480
|
-
const
|
|
481
|
-
if (this.restoreCursor(),
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
|
|
662
|
+
const e = j(this._prevFrame, t2), s = A(this.output);
|
|
663
|
+
if (this.restoreCursor(), e) {
|
|
664
|
+
const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
|
|
665
|
+
let o = e.lines.find((a) => a >= i);
|
|
666
|
+
if (o === void 0) {
|
|
667
|
+
this._prevFrame = t2;
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
if (e.lines.length === 1) {
|
|
671
|
+
this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
|
|
672
|
+
const a = t2.split(`
|
|
485
673
|
`);
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
674
|
+
this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
|
|
675
|
+
return;
|
|
676
|
+
} else if (e.lines.length > 1) {
|
|
677
|
+
if (i < n) o = i;
|
|
678
|
+
else {
|
|
679
|
+
const h = o - n;
|
|
680
|
+
h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
|
|
681
|
+
}
|
|
682
|
+
this.output.write(import_sisteransi.erase.down());
|
|
683
|
+
const a = t2.split(`
|
|
684
|
+
`).slice(o);
|
|
685
|
+
this.output.write(a.join(`
|
|
686
|
+
`)), this._prevFrame = t2;
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
497
689
|
}
|
|
498
690
|
this.output.write(import_sisteransi.erase.down());
|
|
499
691
|
}
|
|
500
|
-
this.output.write(
|
|
692
|
+
this.output.write(t2), this.state === "initial" && (this.state = "active"), this._prevFrame = t2;
|
|
501
693
|
}
|
|
502
694
|
}
|
|
503
695
|
};
|
|
504
|
-
|
|
696
|
+
Q = class extends p {
|
|
505
697
|
get cursor() {
|
|
506
698
|
return this.value ? 0 : 1;
|
|
507
699
|
}
|
|
508
700
|
get _value() {
|
|
509
701
|
return this.cursor === 0;
|
|
510
702
|
}
|
|
511
|
-
constructor(
|
|
512
|
-
super(
|
|
703
|
+
constructor(t2) {
|
|
704
|
+
super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
|
|
513
705
|
this.value = this._value;
|
|
514
|
-
}), this.on("confirm", (
|
|
515
|
-
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value =
|
|
706
|
+
}), this.on("confirm", (e) => {
|
|
707
|
+
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
|
|
516
708
|
}), this.on("cursor", () => {
|
|
517
709
|
this.value = !this.value;
|
|
518
710
|
});
|
|
519
711
|
}
|
|
520
712
|
};
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
713
|
+
nt = class extends p {
|
|
714
|
+
options;
|
|
715
|
+
cursor = 0;
|
|
716
|
+
get _selectedValue() {
|
|
717
|
+
return this.options[this.cursor];
|
|
718
|
+
}
|
|
719
|
+
changeValue() {
|
|
720
|
+
this.value = this._selectedValue.value;
|
|
721
|
+
}
|
|
722
|
+
constructor(t2) {
|
|
723
|
+
super(t2, false), this.options = t2.options;
|
|
724
|
+
const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
|
|
725
|
+
this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
|
|
726
|
+
switch (i) {
|
|
529
727
|
case "left":
|
|
530
728
|
case "up":
|
|
531
|
-
this.cursor = this.cursor
|
|
729
|
+
this.cursor = d(this.cursor, -1, this.options);
|
|
532
730
|
break;
|
|
533
731
|
case "down":
|
|
534
732
|
case "right":
|
|
535
|
-
this.cursor = this.cursor
|
|
733
|
+
this.cursor = d(this.cursor, 1, this.options);
|
|
536
734
|
break;
|
|
537
735
|
}
|
|
538
736
|
this.changeValue();
|
|
539
737
|
});
|
|
540
738
|
}
|
|
541
|
-
get _value() {
|
|
542
|
-
return this.options[this.cursor];
|
|
543
|
-
}
|
|
544
|
-
changeValue() {
|
|
545
|
-
this.value = this._value.value;
|
|
546
|
-
}
|
|
547
739
|
};
|
|
548
|
-
|
|
549
|
-
get
|
|
550
|
-
if (this.state === "submit") return this.
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
740
|
+
at = class extends p {
|
|
741
|
+
get userInputWithCursor() {
|
|
742
|
+
if (this.state === "submit") return this.userInput;
|
|
743
|
+
const t2 = this.userInput;
|
|
744
|
+
if (this.cursor >= t2.length) return `${this.userInput}\u2588`;
|
|
745
|
+
const e = t2.slice(0, this.cursor), [s, ...i] = t2.slice(this.cursor);
|
|
746
|
+
return `${e}${y("inverse", s)}${i.join("")}`;
|
|
554
747
|
}
|
|
555
748
|
get cursor() {
|
|
556
749
|
return this._cursor;
|
|
557
750
|
}
|
|
558
|
-
constructor(
|
|
559
|
-
super(
|
|
560
|
-
this.
|
|
751
|
+
constructor(t2) {
|
|
752
|
+
super({ ...t2, initialUserInput: t2.initialUserInput ?? t2.initialValue }), this.on("userInput", (e) => {
|
|
753
|
+
this._setValue(e);
|
|
754
|
+
}), this.on("finalize", () => {
|
|
755
|
+
this.value || (this.value = t2.defaultValue), this.value === void 0 && (this.value = "");
|
|
561
756
|
});
|
|
562
757
|
}
|
|
563
758
|
};
|
|
564
759
|
}
|
|
565
760
|
});
|
|
566
761
|
|
|
567
|
-
// node_modules/.bun/@clack+prompts@
|
|
568
|
-
import { stripVTControlCharacters as
|
|
569
|
-
import
|
|
570
|
-
|
|
571
|
-
|
|
762
|
+
// node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
|
|
763
|
+
import { styleText as t, stripVTControlCharacters as ne } from "node:util";
|
|
764
|
+
import P2 from "node:process";
|
|
765
|
+
import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
|
|
766
|
+
import { dirname as be, join as Qe } from "node:path";
|
|
767
|
+
function Ze() {
|
|
768
|
+
return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
572
769
|
}
|
|
573
|
-
var
|
|
574
|
-
var
|
|
575
|
-
"node_modules/.bun/@clack+prompts@
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
770
|
+
var import_sisteransi2, ee, ae, w2, _e, oe, ue, F, le, d2, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, V2, ye, et2, Y2, ot2, O2, pt, mt, gt, ft, vt, wt, Ct, fe, Ve, re, _t, je, Ot;
|
|
771
|
+
var init_dist4 = __esm({
|
|
772
|
+
"node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
773
|
+
init_utils2();
|
|
774
|
+
init_dist3();
|
|
775
|
+
init_dist3();
|
|
776
|
+
init_main();
|
|
777
|
+
init_dist2();
|
|
580
778
|
import_sisteransi2 = __toESM(require_src(), 1);
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
d2 =
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
779
|
+
ee = Ze();
|
|
780
|
+
ae = () => process.env.CI === "true";
|
|
781
|
+
w2 = (e, i) => ee ? e : i;
|
|
782
|
+
_e = w2("\u25C6", "*");
|
|
783
|
+
oe = w2("\u25A0", "x");
|
|
784
|
+
ue = w2("\u25B2", "x");
|
|
785
|
+
F = w2("\u25C7", "o");
|
|
786
|
+
le = w2("\u250C", "T");
|
|
787
|
+
d2 = w2("\u2502", "|");
|
|
788
|
+
E2 = w2("\u2514", "\u2014");
|
|
789
|
+
Ie = w2("\u2510", "T");
|
|
790
|
+
Ee = w2("\u2518", "\u2014");
|
|
791
|
+
z2 = w2("\u25CF", ">");
|
|
792
|
+
H2 = w2("\u25CB", " ");
|
|
793
|
+
te = w2("\u25FB", "[\u2022]");
|
|
794
|
+
U = w2("\u25FC", "[+]");
|
|
795
|
+
J = w2("\u25FB", "[ ]");
|
|
796
|
+
xe = w2("\u25AA", "\u2022");
|
|
797
|
+
se = w2("\u2500", "-");
|
|
798
|
+
ce = w2("\u256E", "+");
|
|
799
|
+
Ge = w2("\u251C", "+");
|
|
800
|
+
$e = w2("\u256F", "+");
|
|
801
|
+
de = w2("\u2570", "+");
|
|
802
|
+
Oe = w2("\u256D", "+");
|
|
803
|
+
he = w2("\u25CF", "\u2022");
|
|
804
|
+
pe = w2("\u25C6", "*");
|
|
805
|
+
me = w2("\u25B2", "!");
|
|
806
|
+
ge = w2("\u25A0", "x");
|
|
807
|
+
V2 = (e) => {
|
|
808
|
+
switch (e) {
|
|
606
809
|
case "initial":
|
|
607
810
|
case "active":
|
|
608
|
-
return
|
|
811
|
+
return t("cyan", _e);
|
|
609
812
|
case "cancel":
|
|
610
|
-
return
|
|
813
|
+
return t("red", oe);
|
|
611
814
|
case "error":
|
|
612
|
-
return
|
|
815
|
+
return t("yellow", ue);
|
|
613
816
|
case "submit":
|
|
614
|
-
return
|
|
817
|
+
return t("green", F);
|
|
615
818
|
}
|
|
616
819
|
};
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
return j2 || E ? import_picocolors2.default.dim("...") : i(p2, v2 + l2 === n);
|
|
625
|
-
});
|
|
626
|
-
};
|
|
627
|
-
he = (t) => new RD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
|
|
628
|
-
const n = `${import_picocolors2.default.gray(o)}
|
|
629
|
-
${b2(this.state)} ${t.message}
|
|
630
|
-
`, r2 = t.placeholder ? import_picocolors2.default.inverse(t.placeholder[0]) + import_picocolors2.default.dim(t.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), i = this.value ? this.valueWithCursor : r2;
|
|
631
|
-
switch (this.state) {
|
|
820
|
+
ye = (e) => {
|
|
821
|
+
switch (e) {
|
|
822
|
+
case "initial":
|
|
823
|
+
case "active":
|
|
824
|
+
return t("cyan", d2);
|
|
825
|
+
case "cancel":
|
|
826
|
+
return t("red", d2);
|
|
632
827
|
case "error":
|
|
633
|
-
return
|
|
634
|
-
${import_picocolors2.default.yellow(o)} ${i}
|
|
635
|
-
${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
|
|
636
|
-
`;
|
|
828
|
+
return t("yellow", d2);
|
|
637
829
|
case "submit":
|
|
638
|
-
return
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
}
|
|
680
|
-
};
|
|
681
|
-
return new LD({ options: t.options, initialValue: t.initialValue, render() {
|
|
682
|
-
const r2 = `${import_picocolors2.default.gray(o)}
|
|
683
|
-
${b2(this.state)} ${t.message}
|
|
684
|
-
`;
|
|
830
|
+
return t("green", d2);
|
|
831
|
+
}
|
|
832
|
+
};
|
|
833
|
+
et2 = (e, i, s, r, u2) => {
|
|
834
|
+
let n = i, o = 0;
|
|
835
|
+
for (let c2 = s; c2 < r; c2++) {
|
|
836
|
+
const a = e[c2];
|
|
837
|
+
if (n = n - a.length, o++, n <= u2) break;
|
|
838
|
+
}
|
|
839
|
+
return { lineCount: n, removals: o };
|
|
840
|
+
};
|
|
841
|
+
Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
|
|
842
|
+
const c2 = O(r) - n, a = A(r), l = t("dim", "..."), $2 = Math.max(a - o, 0), y2 = Math.max(Math.min(u2, $2), 5);
|
|
843
|
+
let p2 = 0;
|
|
844
|
+
e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
|
|
845
|
+
let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
|
|
846
|
+
const S2 = Math.min(p2 + y2, i.length), h = [];
|
|
847
|
+
let f = 0;
|
|
848
|
+
m && f++, g && f++;
|
|
849
|
+
const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
|
|
850
|
+
for (let b = v; b < T; b++) {
|
|
851
|
+
const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
|
|
852
|
+
`);
|
|
853
|
+
h.push(x), f += x.length;
|
|
854
|
+
}
|
|
855
|
+
if (f > $2) {
|
|
856
|
+
let b = 0, x = 0, G2 = f;
|
|
857
|
+
const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
|
|
858
|
+
m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $2 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $2 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
|
|
859
|
+
}
|
|
860
|
+
const C2 = [];
|
|
861
|
+
m && C2.push(l);
|
|
862
|
+
for (const b of h) for (const x of b) C2.push(x);
|
|
863
|
+
return g && C2.push(l), C2;
|
|
864
|
+
};
|
|
865
|
+
ot2 = (e) => {
|
|
866
|
+
const i = e.active ?? "Yes", s = e.inactive ?? "No";
|
|
867
|
+
return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
|
|
868
|
+
const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
|
|
869
|
+
` : ""}${o}
|
|
870
|
+
`, a = this.value ? i : s;
|
|
685
871
|
switch (this.state) {
|
|
686
|
-
case "submit":
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
return `${
|
|
693
|
-
${
|
|
694
|
-
|
|
872
|
+
case "submit": {
|
|
873
|
+
const l = r ? `${t("gray", d2)} ` : "";
|
|
874
|
+
return `${c2}${l}${t("dim", a)}`;
|
|
875
|
+
}
|
|
876
|
+
case "cancel": {
|
|
877
|
+
const l = r ? `${t("gray", d2)} ` : "";
|
|
878
|
+
return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
|
|
879
|
+
${t("gray", d2)}` : ""}`;
|
|
880
|
+
}
|
|
881
|
+
default: {
|
|
882
|
+
const l = r ? `${t("cyan", d2)} ` : "", $2 = r ? t("cyan", E2) : "";
|
|
883
|
+
return `${c2}${l}${this.value ? `${t("green", z2)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
|
|
884
|
+
${t("cyan", d2)} ` : `
|
|
885
|
+
` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
|
|
886
|
+
${$2}
|
|
695
887
|
`;
|
|
888
|
+
}
|
|
696
889
|
}
|
|
697
890
|
} }).prompt();
|
|
698
891
|
};
|
|
699
|
-
|
|
700
|
-
const
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
`), i = S2(n).length, s = Math.max(r2.reduce((a, l2) => {
|
|
704
|
-
const $2 = S2(l2);
|
|
705
|
-
return $2.length > a ? $2.length : a;
|
|
706
|
-
}, 0), i) + 2, c = r2.map((a) => `${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(a)}${" ".repeat(s - S2(a).length)}${import_picocolors2.default.gray(o)}`).join(`
|
|
892
|
+
O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
|
|
893
|
+
const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
|
|
894
|
+
for (let p2 = 0; p2 < u2; p2++) o.push(a);
|
|
895
|
+
const y2 = Array.isArray(e) ? e : e.split(`
|
|
707
896
|
`);
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
${
|
|
711
|
-
|
|
897
|
+
if (y2.length > 0) {
|
|
898
|
+
const [p2, ...m] = y2;
|
|
899
|
+
p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
|
|
900
|
+
for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
|
|
901
|
+
}
|
|
902
|
+
r.write(`${o.join(`
|
|
903
|
+
`)}
|
|
712
904
|
`);
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
|
|
905
|
+
}, info: (e, i) => {
|
|
906
|
+
O2.message(e, { ...i, symbol: t("blue", he) });
|
|
907
|
+
}, success: (e, i) => {
|
|
908
|
+
O2.message(e, { ...i, symbol: t("green", pe) });
|
|
909
|
+
}, step: (e, i) => {
|
|
910
|
+
O2.message(e, { ...i, symbol: t("green", F) });
|
|
911
|
+
}, warn: (e, i) => {
|
|
912
|
+
O2.message(e, { ...i, symbol: t("yellow", me) });
|
|
913
|
+
}, warning: (e, i) => {
|
|
914
|
+
O2.warn(e, i);
|
|
915
|
+
}, error: (e, i) => {
|
|
916
|
+
O2.message(e, { ...i, symbol: t("red", ge) });
|
|
917
|
+
} };
|
|
918
|
+
pt = (e = "", i) => {
|
|
919
|
+
const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
|
|
920
|
+
s.write(`${r}${t("red", e)}
|
|
716
921
|
|
|
717
922
|
`);
|
|
718
923
|
};
|
|
719
|
-
|
|
720
|
-
process.stdout.
|
|
924
|
+
mt = (e = "", i) => {
|
|
925
|
+
const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
|
|
926
|
+
s.write(`${r}${e}
|
|
721
927
|
`);
|
|
722
928
|
};
|
|
723
|
-
|
|
724
|
-
process.stdout.
|
|
725
|
-
${
|
|
929
|
+
gt = (e = "", i) => {
|
|
930
|
+
const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
|
|
931
|
+
${t("gray", E2)} ` : "";
|
|
932
|
+
s.write(`${r}${e}
|
|
726
933
|
|
|
727
934
|
`);
|
|
728
935
|
};
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
`)
|
|
936
|
+
ft = (e) => t("dim", e);
|
|
937
|
+
vt = (e, i, s) => {
|
|
938
|
+
const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
|
|
939
|
+
`), n = u2.reduce((a, l) => Math.max(dist_default2(l), a), 0), o = u2.map(s).reduce((a, l) => Math.max(dist_default2(l), a), 0), c2 = i - (o - n);
|
|
940
|
+
return wrapAnsi(e, c2, r);
|
|
941
|
+
};
|
|
942
|
+
wt = (e = "", i = "", s) => {
|
|
943
|
+
const r = s?.output ?? P2.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
|
|
944
|
+
`).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p2, m) => {
|
|
945
|
+
const g = dist_default2(m);
|
|
946
|
+
return g > p2 ? g : p2;
|
|
947
|
+
}, 0), c2) + 2, l = o.map((p2) => `${t("gray", d2)} ${p2}${" ".repeat(a - dist_default2(p2))}${t("gray", d2)}`).join(`
|
|
948
|
+
`), $2 = u2 ? `${t("gray", d2)}
|
|
949
|
+
` : "", y2 = u2 ? Ge : de;
|
|
950
|
+
r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
|
|
951
|
+
${l}
|
|
952
|
+
${t("gray", y2 + se.repeat(a + 2) + $e)}
|
|
738
953
|
`);
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
const n = V2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], r2 = V2 ? 80 : 120, i = process.env.CI === "true";
|
|
755
|
-
let s, c, a = false, l2 = "", $2, g2 = performance.now();
|
|
756
|
-
const p2 = (m2) => {
|
|
757
|
-
const h2 = m2 > 1 ? "Something went wrong" : "Canceled";
|
|
758
|
-
a && N2(h2, m2);
|
|
759
|
-
}, v2 = () => p2(2), f = () => p2(1), j2 = () => {
|
|
760
|
-
process.on("uncaughtExceptionMonitor", v2), process.on("unhandledRejection", v2), process.on("SIGINT", f), process.on("SIGTERM", f), process.on("exit", p2);
|
|
761
|
-
}, E = () => {
|
|
762
|
-
process.removeListener("uncaughtExceptionMonitor", v2), process.removeListener("unhandledRejection", v2), process.removeListener("SIGINT", f), process.removeListener("SIGTERM", f), process.removeListener("exit", p2);
|
|
763
|
-
}, B2 = () => {
|
|
764
|
-
if ($2 === void 0) return;
|
|
765
|
-
i && process.stdout.write(`
|
|
954
|
+
};
|
|
955
|
+
Ct = (e) => t("magenta", e);
|
|
956
|
+
fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u2, frames: n = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: o = ee ? 80 : 120, signal: c2, ...a } = {}) => {
|
|
957
|
+
const l = ae();
|
|
958
|
+
let $2, y2, p2 = false, m = false, g = "", S2, h = performance.now();
|
|
959
|
+
const f = O(s), v = a?.styleFrame ?? Ct, T = (_2) => {
|
|
960
|
+
const A2 = _2 > 1 ? u2 ?? u.messages.error : r ?? u.messages.cancel;
|
|
961
|
+
m = _2 === 1, p2 && (W(A2, _2), m && typeof i == "function" && i());
|
|
962
|
+
}, C2 = () => T(2), b = () => T(1), x = () => {
|
|
963
|
+
process.on("uncaughtExceptionMonitor", C2), process.on("unhandledRejection", C2), process.on("SIGINT", b), process.on("SIGTERM", b), process.on("exit", T), c2 && c2.addEventListener("abort", b);
|
|
964
|
+
}, G2 = () => {
|
|
965
|
+
process.removeListener("uncaughtExceptionMonitor", C2), process.removeListener("unhandledRejection", C2), process.removeListener("SIGINT", b), process.removeListener("SIGTERM", b), process.removeListener("exit", T), c2 && c2.removeEventListener("abort", b);
|
|
966
|
+
}, M2 = () => {
|
|
967
|
+
if (S2 === void 0) return;
|
|
968
|
+
l && s.write(`
|
|
766
969
|
`);
|
|
767
|
-
const
|
|
970
|
+
const _2 = wrapAnsi(S2, f, { hard: true, trim: false }).split(`
|
|
768
971
|
`);
|
|
769
|
-
|
|
770
|
-
}, R2 = (
|
|
771
|
-
const
|
|
772
|
-
return
|
|
773
|
-
},
|
|
774
|
-
|
|
972
|
+
_2.length > 1 && s.write(import_sisteransi2.cursor.up(_2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
|
|
973
|
+
}, R2 = (_2) => _2.replace(/\.+$/, ""), j2 = (_2) => {
|
|
974
|
+
const A2 = (performance.now() - _2) / 1e3, k = Math.floor(A2 / 60), L = Math.floor(A2 % 60);
|
|
975
|
+
return k > 0 ? `[${k}m ${L}s]` : `[${L}s]`;
|
|
976
|
+
}, D2 = a.withGuide ?? u.withGuide, ie = (_2 = "") => {
|
|
977
|
+
p2 = true, $2 = z({ output: s }), g = R2(_2), h = performance.now(), D2 && s.write(`${t("gray", d2)}
|
|
775
978
|
`);
|
|
776
|
-
let
|
|
777
|
-
|
|
778
|
-
if (
|
|
779
|
-
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
|
|
979
|
+
let A2 = 0, k = 0;
|
|
980
|
+
x(), y2 = setInterval(() => {
|
|
981
|
+
if (l && g === S2) return;
|
|
982
|
+
M2(), S2 = g;
|
|
983
|
+
const L = v(n[A2]);
|
|
984
|
+
let Z;
|
|
985
|
+
if (l) Z = `${L} ${g}...`;
|
|
986
|
+
else if (e === "timer") Z = `${L} ${g} ${j2(h)}`;
|
|
783
987
|
else {
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
988
|
+
const Be = ".".repeat(Math.floor(k)).slice(0, 3);
|
|
989
|
+
Z = `${L} ${g}${Be}`;
|
|
990
|
+
}
|
|
991
|
+
const Ne = wrapAnsi(Z, f, { hard: true, trim: false });
|
|
992
|
+
s.write(Ne), A2 = A2 + 1 < n.length ? A2 + 1 : 0, k = k < 4 ? k + 0.125 : 0;
|
|
993
|
+
}, o);
|
|
994
|
+
}, W = (_2 = "", A2 = 0, k = false) => {
|
|
995
|
+
if (!p2) return;
|
|
996
|
+
p2 = false, clearInterval(y2), M2();
|
|
997
|
+
const L = A2 === 0 ? t("green", F) : A2 === 1 ? t("red", oe) : t("red", ue);
|
|
998
|
+
g = _2 ?? g, k || (e === "timer" ? s.write(`${L} ${g} ${j2(h)}
|
|
999
|
+
`) : s.write(`${L} ${g}
|
|
1000
|
+
`)), G2(), $2();
|
|
795
1001
|
};
|
|
796
|
-
return { start:
|
|
797
|
-
|
|
1002
|
+
return { start: ie, stop: (_2 = "") => W(_2, 0), message: (_2 = "") => {
|
|
1003
|
+
g = R2(_2 ?? g);
|
|
1004
|
+
}, cancel: (_2 = "") => W(_2, 1), error: (_2 = "") => W(_2, 2), clear: () => W("", 0, true), get isCancelled() {
|
|
1005
|
+
return m;
|
|
798
1006
|
} };
|
|
799
1007
|
};
|
|
1008
|
+
Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
|
|
1009
|
+
re = (e, i) => e.includes(`
|
|
1010
|
+
`) ? e.split(`
|
|
1011
|
+
`).map((s) => i(s)).join(`
|
|
1012
|
+
`) : i(e);
|
|
1013
|
+
_t = (e) => {
|
|
1014
|
+
const i = (s, r) => {
|
|
1015
|
+
const u2 = s.label ?? String(s.value);
|
|
1016
|
+
switch (r) {
|
|
1017
|
+
case "disabled":
|
|
1018
|
+
return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
|
|
1019
|
+
case "selected":
|
|
1020
|
+
return `${re(u2, (n) => t("dim", n))}`;
|
|
1021
|
+
case "active":
|
|
1022
|
+
return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
|
|
1023
|
+
case "cancelled":
|
|
1024
|
+
return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
|
|
1025
|
+
default:
|
|
1026
|
+
return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
|
|
1030
|
+
const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${t("gray", d2)}
|
|
1031
|
+
` : ""}${n}
|
|
1032
|
+
`;
|
|
1033
|
+
switch (this.state) {
|
|
1034
|
+
case "submit": {
|
|
1035
|
+
const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
|
|
1036
|
+
return `${o}${a}`;
|
|
1037
|
+
}
|
|
1038
|
+
case "cancel": {
|
|
1039
|
+
const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
|
|
1040
|
+
return `${o}${a}${s ? `
|
|
1041
|
+
${t("gray", d2)}` : ""}`;
|
|
1042
|
+
}
|
|
1043
|
+
default: {
|
|
1044
|
+
const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
|
|
1045
|
+
`).length, $2 = s ? 2 : 1;
|
|
1046
|
+
return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $2, style: (y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
|
|
1047
|
+
${c2}`)}
|
|
1048
|
+
${a}
|
|
1049
|
+
`;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
} }).prompt();
|
|
1053
|
+
};
|
|
1054
|
+
je = `${t("gray", d2)} `;
|
|
1055
|
+
Ot = (e) => new at({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
|
|
1056
|
+
const i = e?.withGuide ?? u.withGuide, s = `${`${i ? `${t("gray", d2)}
|
|
1057
|
+
` : ""}${V2(this.state)} `}${e.message}
|
|
1058
|
+
`, r = e.placeholder ? t("inverse", e.placeholder[0]) + t("dim", e.placeholder.slice(1)) : t(["inverse", "hidden"], "_"), u2 = this.userInput ? this.userInputWithCursor : r, n = this.value ?? "";
|
|
1059
|
+
switch (this.state) {
|
|
1060
|
+
case "error": {
|
|
1061
|
+
const o = this.error ? ` ${t("yellow", this.error)}` : "", c2 = i ? `${t("yellow", d2)} ` : "", a = i ? t("yellow", E2) : "";
|
|
1062
|
+
return `${s.trim()}
|
|
1063
|
+
${c2}${u2}
|
|
1064
|
+
${a}${o}
|
|
1065
|
+
`;
|
|
1066
|
+
}
|
|
1067
|
+
case "submit": {
|
|
1068
|
+
const o = n ? ` ${t("dim", n)}` : "", c2 = i ? t("gray", d2) : "";
|
|
1069
|
+
return `${s}${c2}${o}`;
|
|
1070
|
+
}
|
|
1071
|
+
case "cancel": {
|
|
1072
|
+
const o = n ? ` ${t(["strikethrough", "dim"], n)}` : "", c2 = i ? t("gray", d2) : "";
|
|
1073
|
+
return `${s}${c2}${o}${n.trim() ? `
|
|
1074
|
+
${c2}` : ""}`;
|
|
1075
|
+
}
|
|
1076
|
+
default: {
|
|
1077
|
+
const o = i ? `${t("cyan", d2)} ` : "", c2 = i ? t("cyan", E2) : "";
|
|
1078
|
+
return `${s}${o}${u2}
|
|
1079
|
+
${c2}
|
|
1080
|
+
`;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
} }).prompt();
|
|
800
1084
|
}
|
|
801
1085
|
});
|
|
802
1086
|
|
|
@@ -845,9 +1129,9 @@ var colors, currentLogLevel, log, error, warn, info, success;
|
|
|
845
1129
|
var init_cli_output = __esm({
|
|
846
1130
|
"packages/tooling/src/utils/cli-output.ts"() {
|
|
847
1131
|
"use strict";
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
1132
|
+
init_utils2();
|
|
1133
|
+
init_dist4();
|
|
1134
|
+
init_dist4();
|
|
851
1135
|
colors = {
|
|
852
1136
|
reset: "\x1B[0m",
|
|
853
1137
|
// Success (green)
|
|
@@ -882,7 +1166,7 @@ var init_cli_output = __esm({
|
|
|
882
1166
|
error(...args) {
|
|
883
1167
|
if (currentLogLevel < 0 /* Quiet */) return;
|
|
884
1168
|
const message = formatMessage(...args);
|
|
885
|
-
|
|
1169
|
+
O2.error(colorize(message, colors.brightRed));
|
|
886
1170
|
},
|
|
887
1171
|
/**
|
|
888
1172
|
* Logs a warning message (shows at Normal level and above)
|
|
@@ -891,7 +1175,7 @@ var init_cli_output = __esm({
|
|
|
891
1175
|
warn(...args) {
|
|
892
1176
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
893
1177
|
const message = formatMessage(...args);
|
|
894
|
-
|
|
1178
|
+
O2.warn(colorize(message, colors.brightYellow));
|
|
895
1179
|
},
|
|
896
1180
|
/**
|
|
897
1181
|
* Logs an info message (shows at Normal level and above)
|
|
@@ -900,7 +1184,7 @@ var init_cli_output = __esm({
|
|
|
900
1184
|
info(...args) {
|
|
901
1185
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
902
1186
|
const message = formatMessage(...args);
|
|
903
|
-
|
|
1187
|
+
O2.info(colorize(message, colors.brightCyan));
|
|
904
1188
|
},
|
|
905
1189
|
/**
|
|
906
1190
|
* Logs a success message (shows at Normal level and above)
|
|
@@ -909,7 +1193,7 @@ var init_cli_output = __esm({
|
|
|
909
1193
|
success(...args) {
|
|
910
1194
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
911
1195
|
const message = formatMessage(...args);
|
|
912
|
-
|
|
1196
|
+
O2.success(colorize(message, colors.brightGreen));
|
|
913
1197
|
},
|
|
914
1198
|
/**
|
|
915
1199
|
* Logs a debug message (only shows at Verbose level and above)
|
|
@@ -918,7 +1202,7 @@ var init_cli_output = __esm({
|
|
|
918
1202
|
debug(...args) {
|
|
919
1203
|
if (currentLogLevel < 2 /* Verbose */) return;
|
|
920
1204
|
const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
|
|
921
|
-
|
|
1205
|
+
O2.message(
|
|
922
1206
|
colorize(
|
|
923
1207
|
`[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
|
|
924
1208
|
colors.gray
|
|
@@ -932,7 +1216,7 @@ var init_cli_output = __esm({
|
|
|
932
1216
|
trace(...args) {
|
|
933
1217
|
if (currentLogLevel < 3 /* Debug */) return;
|
|
934
1218
|
const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
|
|
935
|
-
|
|
1219
|
+
O2.message(
|
|
936
1220
|
colorize(
|
|
937
1221
|
`[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
|
|
938
1222
|
colors.gray
|
|
@@ -959,7 +1243,7 @@ var DO_NOT_DEV_ERROR_CODES, DoNotDevError;
|
|
|
959
1243
|
var init_errors = __esm({
|
|
960
1244
|
"packages/tooling/src/utils/errors.ts"() {
|
|
961
1245
|
"use strict";
|
|
962
|
-
|
|
1246
|
+
init_utils2();
|
|
963
1247
|
DO_NOT_DEV_ERROR_CODES = {
|
|
964
1248
|
CONFIGURATION_ERROR: "configuration-error",
|
|
965
1249
|
CONFIG_NOT_FOUND: "config-not-found",
|
|
@@ -1100,7 +1384,7 @@ var init_errors = __esm({
|
|
|
1100
1384
|
var require_array = __commonJS({
|
|
1101
1385
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js"(exports) {
|
|
1102
1386
|
"use strict";
|
|
1103
|
-
|
|
1387
|
+
init_utils2();
|
|
1104
1388
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1105
1389
|
exports.splitWhen = exports.flatten = void 0;
|
|
1106
1390
|
function flatten(items) {
|
|
@@ -1128,7 +1412,7 @@ var require_array = __commonJS({
|
|
|
1128
1412
|
var require_errno = __commonJS({
|
|
1129
1413
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js"(exports) {
|
|
1130
1414
|
"use strict";
|
|
1131
|
-
|
|
1415
|
+
init_utils2();
|
|
1132
1416
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1133
1417
|
exports.isEnoentCodeError = void 0;
|
|
1134
1418
|
function isEnoentCodeError(error2) {
|
|
@@ -1142,7 +1426,7 @@ var require_errno = __commonJS({
|
|
|
1142
1426
|
var require_fs = __commonJS({
|
|
1143
1427
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js"(exports) {
|
|
1144
1428
|
"use strict";
|
|
1145
|
-
|
|
1429
|
+
init_utils2();
|
|
1146
1430
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1147
1431
|
exports.createDirentFromStats = void 0;
|
|
1148
1432
|
var DirentFromStats = class {
|
|
@@ -1168,7 +1452,7 @@ var require_fs = __commonJS({
|
|
|
1168
1452
|
var require_path = __commonJS({
|
|
1169
1453
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js"(exports) {
|
|
1170
1454
|
"use strict";
|
|
1171
|
-
|
|
1455
|
+
init_utils2();
|
|
1172
1456
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1173
1457
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
1174
1458
|
var os = __require("os");
|
|
@@ -1221,7 +1505,7 @@ var require_path = __commonJS({
|
|
|
1221
1505
|
// node_modules/.bun/is-extglob@2.1.1/node_modules/is-extglob/index.js
|
|
1222
1506
|
var require_is_extglob = __commonJS({
|
|
1223
1507
|
"node_modules/.bun/is-extglob@2.1.1/node_modules/is-extglob/index.js"(exports, module) {
|
|
1224
|
-
|
|
1508
|
+
init_utils2();
|
|
1225
1509
|
module.exports = function isExtglob(str) {
|
|
1226
1510
|
if (typeof str !== "string" || str === "") {
|
|
1227
1511
|
return false;
|
|
@@ -1239,7 +1523,7 @@ var require_is_extglob = __commonJS({
|
|
|
1239
1523
|
// node_modules/.bun/is-glob@4.0.3/node_modules/is-glob/index.js
|
|
1240
1524
|
var require_is_glob = __commonJS({
|
|
1241
1525
|
"node_modules/.bun/is-glob@4.0.3/node_modules/is-glob/index.js"(exports, module) {
|
|
1242
|
-
|
|
1526
|
+
init_utils2();
|
|
1243
1527
|
var isExtglob = require_is_extglob();
|
|
1244
1528
|
var chars = { "{": "}", "(": ")", "[": "]" };
|
|
1245
1529
|
var strictCheck = function(str) {
|
|
@@ -1372,7 +1656,7 @@ var require_is_glob = __commonJS({
|
|
|
1372
1656
|
var require_glob_parent = __commonJS({
|
|
1373
1657
|
"node_modules/.bun/glob-parent@5.1.2/node_modules/glob-parent/index.js"(exports, module) {
|
|
1374
1658
|
"use strict";
|
|
1375
|
-
|
|
1659
|
+
init_utils2();
|
|
1376
1660
|
var isGlob = require_is_glob();
|
|
1377
1661
|
var pathPosixDirname = __require("path").posix.dirname;
|
|
1378
1662
|
var isWin32 = __require("os").platform() === "win32";
|
|
@@ -1402,7 +1686,7 @@ var require_glob_parent = __commonJS({
|
|
|
1402
1686
|
var require_utils = __commonJS({
|
|
1403
1687
|
"node_modules/.bun/braces@3.0.3/node_modules/braces/lib/utils.js"(exports) {
|
|
1404
1688
|
"use strict";
|
|
1405
|
-
|
|
1689
|
+
init_utils2();
|
|
1406
1690
|
exports.isInteger = (num) => {
|
|
1407
1691
|
if (typeof num === "number") {
|
|
1408
1692
|
return Number.isInteger(num);
|
|
@@ -1485,7 +1769,7 @@ var require_utils = __commonJS({
|
|
|
1485
1769
|
var require_stringify = __commonJS({
|
|
1486
1770
|
"node_modules/.bun/braces@3.0.3/node_modules/braces/lib/stringify.js"(exports, module) {
|
|
1487
1771
|
"use strict";
|
|
1488
|
-
|
|
1772
|
+
init_utils2();
|
|
1489
1773
|
var utils = require_utils();
|
|
1490
1774
|
module.exports = (ast, options = {}) => {
|
|
1491
1775
|
const stringify2 = (node, parent = {}) => {
|
|
@@ -1517,7 +1801,7 @@ var require_stringify = __commonJS({
|
|
|
1517
1801
|
var require_is_number = __commonJS({
|
|
1518
1802
|
"node_modules/.bun/is-number@7.0.0/node_modules/is-number/index.js"(exports, module) {
|
|
1519
1803
|
"use strict";
|
|
1520
|
-
|
|
1804
|
+
init_utils2();
|
|
1521
1805
|
module.exports = function(num) {
|
|
1522
1806
|
if (typeof num === "number") {
|
|
1523
1807
|
return num - num === 0;
|
|
@@ -1534,7 +1818,7 @@ var require_is_number = __commonJS({
|
|
|
1534
1818
|
var require_to_regex_range = __commonJS({
|
|
1535
1819
|
"node_modules/.bun/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"(exports, module) {
|
|
1536
1820
|
"use strict";
|
|
1537
|
-
|
|
1821
|
+
init_utils2();
|
|
1538
1822
|
var isNumber = require_is_number();
|
|
1539
1823
|
var toRegexRange = (min, max, options) => {
|
|
1540
1824
|
if (isNumber(min) === false) {
|
|
@@ -1559,8 +1843,8 @@ var require_to_regex_range = __commonJS({
|
|
|
1559
1843
|
return toRegexRange.cache[cacheKey].result;
|
|
1560
1844
|
}
|
|
1561
1845
|
let a = Math.min(min, max);
|
|
1562
|
-
let
|
|
1563
|
-
if (Math.abs(a -
|
|
1846
|
+
let b = Math.max(min, max);
|
|
1847
|
+
if (Math.abs(a - b) === 1) {
|
|
1564
1848
|
let result = min + "|" + max;
|
|
1565
1849
|
if (opts.capture) {
|
|
1566
1850
|
return `(${result})`;
|
|
@@ -1571,7 +1855,7 @@ var require_to_regex_range = __commonJS({
|
|
|
1571
1855
|
return `(?:${result})`;
|
|
1572
1856
|
}
|
|
1573
1857
|
let isPadded = hasPadding(min) || hasPadding(max);
|
|
1574
|
-
let state = { min, max, a, b
|
|
1858
|
+
let state = { min, max, a, b };
|
|
1575
1859
|
let positives = [];
|
|
1576
1860
|
let negatives = [];
|
|
1577
1861
|
if (isPadded) {
|
|
@@ -1579,12 +1863,12 @@ var require_to_regex_range = __commonJS({
|
|
|
1579
1863
|
state.maxLen = String(state.max).length;
|
|
1580
1864
|
}
|
|
1581
1865
|
if (a < 0) {
|
|
1582
|
-
let newMin =
|
|
1866
|
+
let newMin = b < 0 ? Math.abs(b) : 1;
|
|
1583
1867
|
negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
|
|
1584
1868
|
a = state.a = 0;
|
|
1585
1869
|
}
|
|
1586
|
-
if (
|
|
1587
|
-
positives = splitToPatterns(a,
|
|
1870
|
+
if (b >= 0) {
|
|
1871
|
+
positives = splitToPatterns(a, b, state, opts);
|
|
1588
1872
|
}
|
|
1589
1873
|
state.negatives = negatives;
|
|
1590
1874
|
state.positives = positives;
|
|
@@ -1688,13 +1972,13 @@ var require_to_regex_range = __commonJS({
|
|
|
1688
1972
|
}
|
|
1689
1973
|
return result;
|
|
1690
1974
|
}
|
|
1691
|
-
function zip(a,
|
|
1975
|
+
function zip(a, b) {
|
|
1692
1976
|
let arr = [];
|
|
1693
|
-
for (let i = 0; i < a.length; i++) arr.push([a[i],
|
|
1977
|
+
for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
|
|
1694
1978
|
return arr;
|
|
1695
1979
|
}
|
|
1696
|
-
function compare(a,
|
|
1697
|
-
return a >
|
|
1980
|
+
function compare(a, b) {
|
|
1981
|
+
return a > b ? 1 : b > a ? -1 : 0;
|
|
1698
1982
|
}
|
|
1699
1983
|
function contains(arr, key, val) {
|
|
1700
1984
|
return arr.some((ele) => ele[key] === val);
|
|
@@ -1712,8 +1996,8 @@ var require_to_regex_range = __commonJS({
|
|
|
1712
1996
|
}
|
|
1713
1997
|
return "";
|
|
1714
1998
|
}
|
|
1715
|
-
function toCharacterClass(a,
|
|
1716
|
-
return `[${a}${
|
|
1999
|
+
function toCharacterClass(a, b, options) {
|
|
2000
|
+
return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
|
|
1717
2001
|
}
|
|
1718
2002
|
function hasPadding(str) {
|
|
1719
2003
|
return /^-?(0+)\d/.test(str);
|
|
@@ -1746,7 +2030,7 @@ var require_to_regex_range = __commonJS({
|
|
|
1746
2030
|
var require_fill_range = __commonJS({
|
|
1747
2031
|
"node_modules/.bun/fill-range@7.1.1/node_modules/fill-range/index.js"(exports, module) {
|
|
1748
2032
|
"use strict";
|
|
1749
|
-
|
|
2033
|
+
init_utils2();
|
|
1750
2034
|
var util = __require("util");
|
|
1751
2035
|
var toRegexRange = require_to_regex_range();
|
|
1752
2036
|
var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -1792,17 +2076,17 @@ var require_fill_range = __commonJS({
|
|
|
1792
2076
|
return negative ? "-" + input : input;
|
|
1793
2077
|
};
|
|
1794
2078
|
var toSequence = (parts, options, maxLen) => {
|
|
1795
|
-
parts.negatives.sort((a,
|
|
1796
|
-
parts.positives.sort((a,
|
|
2079
|
+
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
2080
|
+
parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
1797
2081
|
let prefix = options.capture ? "" : "?:";
|
|
1798
2082
|
let positives = "";
|
|
1799
2083
|
let negatives = "";
|
|
1800
2084
|
let result;
|
|
1801
2085
|
if (parts.positives.length) {
|
|
1802
|
-
positives = parts.positives.map((
|
|
2086
|
+
positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
|
|
1803
2087
|
}
|
|
1804
2088
|
if (parts.negatives.length) {
|
|
1805
|
-
negatives = `-(${prefix}${parts.negatives.map((
|
|
2089
|
+
negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
|
|
1806
2090
|
}
|
|
1807
2091
|
if (positives && negatives) {
|
|
1808
2092
|
result = `${positives}|${negatives}`;
|
|
@@ -1814,13 +2098,13 @@ var require_fill_range = __commonJS({
|
|
|
1814
2098
|
}
|
|
1815
2099
|
return result;
|
|
1816
2100
|
};
|
|
1817
|
-
var toRange = (a,
|
|
2101
|
+
var toRange = (a, b, isNumbers, options) => {
|
|
1818
2102
|
if (isNumbers) {
|
|
1819
|
-
return toRegexRange(a,
|
|
2103
|
+
return toRegexRange(a, b, { wrap: false, ...options });
|
|
1820
2104
|
}
|
|
1821
2105
|
let start = String.fromCharCode(a);
|
|
1822
|
-
if (a ===
|
|
1823
|
-
let stop = String.fromCharCode(
|
|
2106
|
+
if (a === b) return start;
|
|
2107
|
+
let stop = String.fromCharCode(b);
|
|
1824
2108
|
return `[${start}-${stop}]`;
|
|
1825
2109
|
};
|
|
1826
2110
|
var toRegex = (start, end, options) => {
|
|
@@ -1846,14 +2130,14 @@ var require_fill_range = __commonJS({
|
|
|
1846
2130
|
};
|
|
1847
2131
|
var fillNumbers = (start, end, step = 1, options = {}) => {
|
|
1848
2132
|
let a = Number(start);
|
|
1849
|
-
let
|
|
1850
|
-
if (!Number.isInteger(a) || !Number.isInteger(
|
|
2133
|
+
let b = Number(end);
|
|
2134
|
+
if (!Number.isInteger(a) || !Number.isInteger(b)) {
|
|
1851
2135
|
if (options.strictRanges === true) throw rangeError([start, end]);
|
|
1852
2136
|
return [];
|
|
1853
2137
|
}
|
|
1854
2138
|
if (a === 0) a = 0;
|
|
1855
|
-
if (
|
|
1856
|
-
let descending = a >
|
|
2139
|
+
if (b === 0) b = 0;
|
|
2140
|
+
let descending = a > b;
|
|
1857
2141
|
let startString = String(start);
|
|
1858
2142
|
let endString = String(end);
|
|
1859
2143
|
let stepString = String(step);
|
|
@@ -1869,7 +2153,7 @@ var require_fill_range = __commonJS({
|
|
|
1869
2153
|
let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
|
|
1870
2154
|
let range = [];
|
|
1871
2155
|
let index = 0;
|
|
1872
|
-
while (descending ? a >=
|
|
2156
|
+
while (descending ? a >= b : a <= b) {
|
|
1873
2157
|
if (options.toRegex === true && step > 1) {
|
|
1874
2158
|
push(a);
|
|
1875
2159
|
} else {
|
|
@@ -1889,16 +2173,16 @@ var require_fill_range = __commonJS({
|
|
|
1889
2173
|
}
|
|
1890
2174
|
let format = options.transform || ((val) => String.fromCharCode(val));
|
|
1891
2175
|
let a = `${start}`.charCodeAt(0);
|
|
1892
|
-
let
|
|
1893
|
-
let descending = a >
|
|
1894
|
-
let min = Math.min(a,
|
|
1895
|
-
let max = Math.max(a,
|
|
2176
|
+
let b = `${end}`.charCodeAt(0);
|
|
2177
|
+
let descending = a > b;
|
|
2178
|
+
let min = Math.min(a, b);
|
|
2179
|
+
let max = Math.max(a, b);
|
|
1896
2180
|
if (options.toRegex && step === 1) {
|
|
1897
2181
|
return toRange(min, max, false, options);
|
|
1898
2182
|
}
|
|
1899
2183
|
let range = [];
|
|
1900
2184
|
let index = 0;
|
|
1901
|
-
while (descending ? a >=
|
|
2185
|
+
while (descending ? a >= b : a <= b) {
|
|
1902
2186
|
range.push(format(a, index));
|
|
1903
2187
|
a = descending ? a - step : a + step;
|
|
1904
2188
|
index++;
|
|
@@ -1941,7 +2225,7 @@ var require_fill_range = __commonJS({
|
|
|
1941
2225
|
var require_compile = __commonJS({
|
|
1942
2226
|
"node_modules/.bun/braces@3.0.3/node_modules/braces/lib/compile.js"(exports, module) {
|
|
1943
2227
|
"use strict";
|
|
1944
|
-
|
|
2228
|
+
init_utils2();
|
|
1945
2229
|
var fill = require_fill_range();
|
|
1946
2230
|
var utils = require_utils();
|
|
1947
2231
|
var compile = (ast, options = {}) => {
|
|
@@ -1993,7 +2277,7 @@ var require_compile = __commonJS({
|
|
|
1993
2277
|
var require_expand = __commonJS({
|
|
1994
2278
|
"node_modules/.bun/braces@3.0.3/node_modules/braces/lib/expand.js"(exports, module) {
|
|
1995
2279
|
"use strict";
|
|
1996
|
-
|
|
2280
|
+
init_utils2();
|
|
1997
2281
|
var fill = require_fill_range();
|
|
1998
2282
|
var stringify2 = require_stringify();
|
|
1999
2283
|
var utils = require_utils();
|
|
@@ -2088,7 +2372,7 @@ var require_expand = __commonJS({
|
|
|
2088
2372
|
var require_constants = __commonJS({
|
|
2089
2373
|
"node_modules/.bun/braces@3.0.3/node_modules/braces/lib/constants.js"(exports, module) {
|
|
2090
2374
|
"use strict";
|
|
2091
|
-
|
|
2375
|
+
init_utils2();
|
|
2092
2376
|
module.exports = {
|
|
2093
2377
|
MAX_LENGTH: 1e4,
|
|
2094
2378
|
// Digits
|
|
@@ -2190,7 +2474,7 @@ var require_constants = __commonJS({
|
|
|
2190
2474
|
var require_parse = __commonJS({
|
|
2191
2475
|
"node_modules/.bun/braces@3.0.3/node_modules/braces/lib/parse.js"(exports, module) {
|
|
2192
2476
|
"use strict";
|
|
2193
|
-
|
|
2477
|
+
init_utils2();
|
|
2194
2478
|
var stringify2 = require_stringify();
|
|
2195
2479
|
var {
|
|
2196
2480
|
MAX_LENGTH,
|
|
@@ -2429,7 +2713,7 @@ var require_parse = __commonJS({
|
|
|
2429
2713
|
var require_braces = __commonJS({
|
|
2430
2714
|
"node_modules/.bun/braces@3.0.3/node_modules/braces/index.js"(exports, module) {
|
|
2431
2715
|
"use strict";
|
|
2432
|
-
|
|
2716
|
+
init_utils2();
|
|
2433
2717
|
var stringify2 = require_stringify();
|
|
2434
2718
|
var compile = require_compile();
|
|
2435
2719
|
var expand = require_expand();
|
|
@@ -2493,7 +2777,7 @@ var require_braces = __commonJS({
|
|
|
2493
2777
|
var require_constants2 = __commonJS({
|
|
2494
2778
|
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
2495
2779
|
"use strict";
|
|
2496
|
-
|
|
2780
|
+
init_utils2();
|
|
2497
2781
|
var path = __require("path");
|
|
2498
2782
|
var WIN_SLASH = "\\\\/";
|
|
2499
2783
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
@@ -2695,7 +2979,7 @@ var require_constants2 = __commonJS({
|
|
|
2695
2979
|
var require_utils2 = __commonJS({
|
|
2696
2980
|
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"(exports) {
|
|
2697
2981
|
"use strict";
|
|
2698
|
-
|
|
2982
|
+
init_utils2();
|
|
2699
2983
|
var path = __require("path");
|
|
2700
2984
|
var win32 = process.platform === "win32";
|
|
2701
2985
|
var {
|
|
@@ -2757,7 +3041,7 @@ var require_utils2 = __commonJS({
|
|
|
2757
3041
|
var require_scan = __commonJS({
|
|
2758
3042
|
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/scan.js"(exports, module) {
|
|
2759
3043
|
"use strict";
|
|
2760
|
-
|
|
3044
|
+
init_utils2();
|
|
2761
3045
|
var utils = require_utils2();
|
|
2762
3046
|
var {
|
|
2763
3047
|
CHAR_ASTERISK,
|
|
@@ -3088,7 +3372,7 @@ var require_scan = __commonJS({
|
|
|
3088
3372
|
var require_parse2 = __commonJS({
|
|
3089
3373
|
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/parse.js"(exports, module) {
|
|
3090
3374
|
"use strict";
|
|
3091
|
-
|
|
3375
|
+
init_utils2();
|
|
3092
3376
|
var constants2 = require_constants2();
|
|
3093
3377
|
var utils = require_utils2();
|
|
3094
3378
|
var {
|
|
@@ -3107,7 +3391,7 @@ var require_parse2 = __commonJS({
|
|
|
3107
3391
|
try {
|
|
3108
3392
|
new RegExp(value);
|
|
3109
3393
|
} catch (ex) {
|
|
3110
|
-
return args.map((
|
|
3394
|
+
return args.map((v) => utils.escapeRegex(v)).join("..");
|
|
3111
3395
|
}
|
|
3112
3396
|
return value;
|
|
3113
3397
|
};
|
|
@@ -3196,12 +3480,12 @@ var require_parse2 = __commonJS({
|
|
|
3196
3480
|
for (let i = 0; i < values.length; i++) {
|
|
3197
3481
|
for (let j2 = i + 1; j2 < values.length; j2++) {
|
|
3198
3482
|
const a = values[i];
|
|
3199
|
-
const
|
|
3483
|
+
const b = values[j2];
|
|
3200
3484
|
const char = a[0];
|
|
3201
|
-
if (!char || a !== char.repeat(a.length) ||
|
|
3485
|
+
if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
|
|
3202
3486
|
continue;
|
|
3203
3487
|
}
|
|
3204
|
-
if (a ===
|
|
3488
|
+
if (a === b || a.startsWith(b) || b.startsWith(a)) {
|
|
3205
3489
|
return true;
|
|
3206
3490
|
}
|
|
3207
3491
|
}
|
|
@@ -3504,10 +3788,10 @@ var require_parse2 = __commonJS({
|
|
|
3504
3788
|
};
|
|
3505
3789
|
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
3506
3790
|
let backslashes = false;
|
|
3507
|
-
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (
|
|
3791
|
+
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
|
|
3508
3792
|
if (first === "\\") {
|
|
3509
3793
|
backslashes = true;
|
|
3510
|
-
return
|
|
3794
|
+
return m;
|
|
3511
3795
|
}
|
|
3512
3796
|
if (first === "?") {
|
|
3513
3797
|
if (esc) {
|
|
@@ -3527,14 +3811,14 @@ var require_parse2 = __commonJS({
|
|
|
3527
3811
|
}
|
|
3528
3812
|
return star;
|
|
3529
3813
|
}
|
|
3530
|
-
return esc ?
|
|
3814
|
+
return esc ? m : `\\${m}`;
|
|
3531
3815
|
});
|
|
3532
3816
|
if (backslashes === true) {
|
|
3533
3817
|
if (opts.unescape === true) {
|
|
3534
3818
|
output = output.replace(/\\/g, "");
|
|
3535
3819
|
} else {
|
|
3536
|
-
output = output.replace(/\\+/g, (
|
|
3537
|
-
return
|
|
3820
|
+
output = output.replace(/\\+/g, (m) => {
|
|
3821
|
+
return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
|
|
3538
3822
|
});
|
|
3539
3823
|
}
|
|
3540
3824
|
}
|
|
@@ -3734,8 +4018,8 @@ var require_parse2 = __commonJS({
|
|
|
3734
4018
|
brace.value = brace.output = "\\{";
|
|
3735
4019
|
value = output = "\\}";
|
|
3736
4020
|
state.output = out;
|
|
3737
|
-
for (const
|
|
3738
|
-
state.output +=
|
|
4021
|
+
for (const t2 of toks) {
|
|
4022
|
+
state.output += t2.output || t2.value;
|
|
3739
4023
|
}
|
|
3740
4024
|
}
|
|
3741
4025
|
push({ type: "brace", value, output });
|
|
@@ -4091,7 +4375,7 @@ var require_parse2 = __commonJS({
|
|
|
4091
4375
|
var require_picomatch = __commonJS({
|
|
4092
4376
|
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
4093
4377
|
"use strict";
|
|
4094
|
-
|
|
4378
|
+
init_utils2();
|
|
4095
4379
|
var path = __require("path");
|
|
4096
4380
|
var scan = require_scan();
|
|
4097
4381
|
var parse2 = require_parse2();
|
|
@@ -4233,7 +4517,7 @@ var require_picomatch = __commonJS({
|
|
|
4233
4517
|
var require_picomatch2 = __commonJS({
|
|
4234
4518
|
"node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/index.js"(exports, module) {
|
|
4235
4519
|
"use strict";
|
|
4236
|
-
|
|
4520
|
+
init_utils2();
|
|
4237
4521
|
module.exports = require_picomatch();
|
|
4238
4522
|
}
|
|
4239
4523
|
});
|
|
@@ -4242,15 +4526,15 @@ var require_picomatch2 = __commonJS({
|
|
|
4242
4526
|
var require_micromatch = __commonJS({
|
|
4243
4527
|
"node_modules/.bun/micromatch@4.0.8/node_modules/micromatch/index.js"(exports, module) {
|
|
4244
4528
|
"use strict";
|
|
4245
|
-
|
|
4529
|
+
init_utils2();
|
|
4246
4530
|
var util = __require("util");
|
|
4247
4531
|
var braces = require_braces();
|
|
4248
4532
|
var picomatch = require_picomatch2();
|
|
4249
4533
|
var utils = require_utils2();
|
|
4250
|
-
var isEmptyString = (
|
|
4251
|
-
var hasBraces = (
|
|
4252
|
-
const index =
|
|
4253
|
-
return index > -1 &&
|
|
4534
|
+
var isEmptyString = (v) => v === "" || v === "./";
|
|
4535
|
+
var hasBraces = (v) => {
|
|
4536
|
+
const index = v.indexOf("{");
|
|
4537
|
+
return index > -1 && v.indexOf("}", index) > -1;
|
|
4254
4538
|
};
|
|
4255
4539
|
var micromatch = (list, patterns, options) => {
|
|
4256
4540
|
patterns = [].concat(patterns);
|
|
@@ -4370,7 +4654,7 @@ var require_micromatch = __commonJS({
|
|
|
4370
4654
|
let regex = picomatch.makeRe(String(glob2), { ...options, capture: true });
|
|
4371
4655
|
let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
|
|
4372
4656
|
if (match) {
|
|
4373
|
-
return match.slice(1).map((
|
|
4657
|
+
return match.slice(1).map((v) => v === void 0 ? "" : v);
|
|
4374
4658
|
}
|
|
4375
4659
|
};
|
|
4376
4660
|
micromatch.makeRe = (...args) => picomatch.makeRe(...args);
|
|
@@ -4404,7 +4688,7 @@ var require_micromatch = __commonJS({
|
|
|
4404
4688
|
var require_pattern = __commonJS({
|
|
4405
4689
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js"(exports) {
|
|
4406
4690
|
"use strict";
|
|
4407
|
-
|
|
4691
|
+
init_utils2();
|
|
4408
4692
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4409
4693
|
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
4410
4694
|
var path = __require("path");
|
|
@@ -4514,7 +4798,7 @@ var require_pattern = __commonJS({
|
|
|
4514
4798
|
exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
4515
4799
|
function expandBraceExpansion(pattern) {
|
|
4516
4800
|
const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
|
|
4517
|
-
patterns.sort((a,
|
|
4801
|
+
patterns.sort((a, b) => a.length - b.length);
|
|
4518
4802
|
return patterns.filter((pattern2) => pattern2 !== "");
|
|
4519
4803
|
}
|
|
4520
4804
|
exports.expandBraceExpansion = expandBraceExpansion;
|
|
@@ -4570,7 +4854,7 @@ var require_pattern = __commonJS({
|
|
|
4570
4854
|
var require_merge2 = __commonJS({
|
|
4571
4855
|
"node_modules/.bun/merge2@1.4.1/node_modules/merge2/index.js"(exports, module) {
|
|
4572
4856
|
"use strict";
|
|
4573
|
-
|
|
4857
|
+
init_utils2();
|
|
4574
4858
|
var Stream = __require("stream");
|
|
4575
4859
|
var PassThrough = Stream.PassThrough;
|
|
4576
4860
|
var slice = Array.prototype.slice;
|
|
@@ -4690,7 +4974,7 @@ var require_merge2 = __commonJS({
|
|
|
4690
4974
|
var require_stream = __commonJS({
|
|
4691
4975
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
4692
4976
|
"use strict";
|
|
4693
|
-
|
|
4977
|
+
init_utils2();
|
|
4694
4978
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4695
4979
|
exports.merge = void 0;
|
|
4696
4980
|
var merge2 = require_merge2();
|
|
@@ -4714,7 +4998,7 @@ var require_stream = __commonJS({
|
|
|
4714
4998
|
var require_string = __commonJS({
|
|
4715
4999
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js"(exports) {
|
|
4716
5000
|
"use strict";
|
|
4717
|
-
|
|
5001
|
+
init_utils2();
|
|
4718
5002
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4719
5003
|
exports.isEmpty = exports.isString = void 0;
|
|
4720
5004
|
function isString(input) {
|
|
@@ -4732,7 +5016,7 @@ var require_string = __commonJS({
|
|
|
4732
5016
|
var require_utils3 = __commonJS({
|
|
4733
5017
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
4734
5018
|
"use strict";
|
|
4735
|
-
|
|
5019
|
+
init_utils2();
|
|
4736
5020
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4737
5021
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
|
|
4738
5022
|
var array = require_array();
|
|
@@ -4756,7 +5040,7 @@ var require_utils3 = __commonJS({
|
|
|
4756
5040
|
var require_tasks = __commonJS({
|
|
4757
5041
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
4758
5042
|
"use strict";
|
|
4759
|
-
|
|
5043
|
+
init_utils2();
|
|
4760
5044
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4761
5045
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
|
4762
5046
|
var utils = require_utils3();
|
|
@@ -4853,7 +5137,7 @@ var require_tasks = __commonJS({
|
|
|
4853
5137
|
var require_async = __commonJS({
|
|
4854
5138
|
"node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) {
|
|
4855
5139
|
"use strict";
|
|
4856
|
-
|
|
5140
|
+
init_utils2();
|
|
4857
5141
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4858
5142
|
exports.read = void 0;
|
|
4859
5143
|
function read2(path, settings, callback) {
|
|
@@ -4896,7 +5180,7 @@ var require_async = __commonJS({
|
|
|
4896
5180
|
var require_sync = __commonJS({
|
|
4897
5181
|
"node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports) {
|
|
4898
5182
|
"use strict";
|
|
4899
|
-
|
|
5183
|
+
init_utils2();
|
|
4900
5184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4901
5185
|
exports.read = void 0;
|
|
4902
5186
|
function read2(path, settings) {
|
|
@@ -4925,7 +5209,7 @@ var require_sync = __commonJS({
|
|
|
4925
5209
|
var require_fs2 = __commonJS({
|
|
4926
5210
|
"node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports) {
|
|
4927
5211
|
"use strict";
|
|
4928
|
-
|
|
5212
|
+
init_utils2();
|
|
4929
5213
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4930
5214
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
4931
5215
|
var fs2 = __require("fs");
|
|
@@ -4949,7 +5233,7 @@ var require_fs2 = __commonJS({
|
|
|
4949
5233
|
var require_settings = __commonJS({
|
|
4950
5234
|
"node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports) {
|
|
4951
5235
|
"use strict";
|
|
4952
|
-
|
|
5236
|
+
init_utils2();
|
|
4953
5237
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4954
5238
|
var fs2 = require_fs2();
|
|
4955
5239
|
var Settings = class {
|
|
@@ -4972,7 +5256,7 @@ var require_settings = __commonJS({
|
|
|
4972
5256
|
var require_out = __commonJS({
|
|
4973
5257
|
"node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js"(exports) {
|
|
4974
5258
|
"use strict";
|
|
4975
|
-
|
|
5259
|
+
init_utils2();
|
|
4976
5260
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4977
5261
|
exports.statSync = exports.stat = exports.Settings = void 0;
|
|
4978
5262
|
var async = require_async();
|
|
@@ -5004,7 +5288,7 @@ var require_out = __commonJS({
|
|
|
5004
5288
|
// node_modules/.bun/queue-microtask@1.2.3/node_modules/queue-microtask/index.js
|
|
5005
5289
|
var require_queue_microtask = __commonJS({
|
|
5006
5290
|
"node_modules/.bun/queue-microtask@1.2.3/node_modules/queue-microtask/index.js"(exports, module) {
|
|
5007
|
-
|
|
5291
|
+
init_utils2();
|
|
5008
5292
|
var promise;
|
|
5009
5293
|
module.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
|
|
5010
5294
|
throw err;
|
|
@@ -5015,7 +5299,7 @@ var require_queue_microtask = __commonJS({
|
|
|
5015
5299
|
// node_modules/.bun/run-parallel@1.2.0/node_modules/run-parallel/index.js
|
|
5016
5300
|
var require_run_parallel = __commonJS({
|
|
5017
5301
|
"node_modules/.bun/run-parallel@1.2.0/node_modules/run-parallel/index.js"(exports, module) {
|
|
5018
|
-
|
|
5302
|
+
init_utils2();
|
|
5019
5303
|
module.exports = runParallel;
|
|
5020
5304
|
var queueMicrotask2 = require_queue_microtask();
|
|
5021
5305
|
function runParallel(tasks, cb) {
|
|
@@ -5067,7 +5351,7 @@ var require_run_parallel = __commonJS({
|
|
|
5067
5351
|
var require_constants3 = __commonJS({
|
|
5068
5352
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports) {
|
|
5069
5353
|
"use strict";
|
|
5070
|
-
|
|
5354
|
+
init_utils2();
|
|
5071
5355
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5072
5356
|
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
|
5073
5357
|
var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
|
|
@@ -5088,7 +5372,7 @@ var require_constants3 = __commonJS({
|
|
|
5088
5372
|
var require_fs3 = __commonJS({
|
|
5089
5373
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports) {
|
|
5090
5374
|
"use strict";
|
|
5091
|
-
|
|
5375
|
+
init_utils2();
|
|
5092
5376
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5093
5377
|
exports.createDirentFromStats = void 0;
|
|
5094
5378
|
var DirentFromStats = class {
|
|
@@ -5114,7 +5398,7 @@ var require_fs3 = __commonJS({
|
|
|
5114
5398
|
var require_utils4 = __commonJS({
|
|
5115
5399
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
5116
5400
|
"use strict";
|
|
5117
|
-
|
|
5401
|
+
init_utils2();
|
|
5118
5402
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5119
5403
|
exports.fs = void 0;
|
|
5120
5404
|
var fs2 = require_fs3();
|
|
@@ -5126,14 +5410,14 @@ var require_utils4 = __commonJS({
|
|
|
5126
5410
|
var require_common = __commonJS({
|
|
5127
5411
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) {
|
|
5128
5412
|
"use strict";
|
|
5129
|
-
|
|
5413
|
+
init_utils2();
|
|
5130
5414
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5131
5415
|
exports.joinPathSegments = void 0;
|
|
5132
|
-
function joinPathSegments(a,
|
|
5416
|
+
function joinPathSegments(a, b, separator) {
|
|
5133
5417
|
if (a.endsWith(separator)) {
|
|
5134
|
-
return a +
|
|
5418
|
+
return a + b;
|
|
5135
5419
|
}
|
|
5136
|
-
return a + separator +
|
|
5420
|
+
return a + separator + b;
|
|
5137
5421
|
}
|
|
5138
5422
|
exports.joinPathSegments = joinPathSegments;
|
|
5139
5423
|
}
|
|
@@ -5143,7 +5427,7 @@ var require_common = __commonJS({
|
|
|
5143
5427
|
var require_async2 = __commonJS({
|
|
5144
5428
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports) {
|
|
5145
5429
|
"use strict";
|
|
5146
|
-
|
|
5430
|
+
init_utils2();
|
|
5147
5431
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5148
5432
|
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
|
5149
5433
|
var fsStat = require_out();
|
|
@@ -5254,7 +5538,7 @@ var require_async2 = __commonJS({
|
|
|
5254
5538
|
var require_sync2 = __commonJS({
|
|
5255
5539
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports) {
|
|
5256
5540
|
"use strict";
|
|
5257
|
-
|
|
5541
|
+
init_utils2();
|
|
5258
5542
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5259
5543
|
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
|
5260
5544
|
var fsStat = require_out();
|
|
@@ -5314,7 +5598,7 @@ var require_sync2 = __commonJS({
|
|
|
5314
5598
|
var require_fs4 = __commonJS({
|
|
5315
5599
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports) {
|
|
5316
5600
|
"use strict";
|
|
5317
|
-
|
|
5601
|
+
init_utils2();
|
|
5318
5602
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5319
5603
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
5320
5604
|
var fs2 = __require("fs");
|
|
@@ -5340,7 +5624,7 @@ var require_fs4 = __commonJS({
|
|
|
5340
5624
|
var require_settings2 = __commonJS({
|
|
5341
5625
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
|
|
5342
5626
|
"use strict";
|
|
5343
|
-
|
|
5627
|
+
init_utils2();
|
|
5344
5628
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5345
5629
|
var path = __require("path");
|
|
5346
5630
|
var fsStat = require_out();
|
|
@@ -5371,7 +5655,7 @@ var require_settings2 = __commonJS({
|
|
|
5371
5655
|
var require_out2 = __commonJS({
|
|
5372
5656
|
"node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js"(exports) {
|
|
5373
5657
|
"use strict";
|
|
5374
|
-
|
|
5658
|
+
init_utils2();
|
|
5375
5659
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5376
5660
|
exports.Settings = exports.scandirSync = exports.scandir = void 0;
|
|
5377
5661
|
var async = require_async2();
|
|
@@ -5404,7 +5688,7 @@ var require_out2 = __commonJS({
|
|
|
5404
5688
|
var require_reusify = __commonJS({
|
|
5405
5689
|
"node_modules/.bun/reusify@1.1.0/node_modules/reusify/reusify.js"(exports, module) {
|
|
5406
5690
|
"use strict";
|
|
5407
|
-
|
|
5691
|
+
init_utils2();
|
|
5408
5692
|
function reusify(Constructor) {
|
|
5409
5693
|
var head = new Constructor();
|
|
5410
5694
|
var tail = head;
|
|
@@ -5436,7 +5720,7 @@ var require_reusify = __commonJS({
|
|
|
5436
5720
|
var require_queue = __commonJS({
|
|
5437
5721
|
"node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js"(exports, module) {
|
|
5438
5722
|
"use strict";
|
|
5439
|
-
|
|
5723
|
+
init_utils2();
|
|
5440
5724
|
var reusify = require_reusify();
|
|
5441
5725
|
function fastqueue(context, worker, _concurrency) {
|
|
5442
5726
|
if (typeof context === "function") {
|
|
@@ -5721,7 +6005,7 @@ var require_queue = __commonJS({
|
|
|
5721
6005
|
var require_common2 = __commonJS({
|
|
5722
6006
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) {
|
|
5723
6007
|
"use strict";
|
|
5724
|
-
|
|
6008
|
+
init_utils2();
|
|
5725
6009
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5726
6010
|
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
|
|
5727
6011
|
function isFatalError(settings, error2) {
|
|
@@ -5739,14 +6023,14 @@ var require_common2 = __commonJS({
|
|
|
5739
6023
|
return filepath.split(/[/\\]/).join(separator);
|
|
5740
6024
|
}
|
|
5741
6025
|
exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
|
|
5742
|
-
function joinPathSegments(a,
|
|
6026
|
+
function joinPathSegments(a, b, separator) {
|
|
5743
6027
|
if (a === "") {
|
|
5744
|
-
return
|
|
6028
|
+
return b;
|
|
5745
6029
|
}
|
|
5746
6030
|
if (a.endsWith(separator)) {
|
|
5747
|
-
return a +
|
|
6031
|
+
return a + b;
|
|
5748
6032
|
}
|
|
5749
|
-
return a + separator +
|
|
6033
|
+
return a + separator + b;
|
|
5750
6034
|
}
|
|
5751
6035
|
exports.joinPathSegments = joinPathSegments;
|
|
5752
6036
|
}
|
|
@@ -5756,7 +6040,7 @@ var require_common2 = __commonJS({
|
|
|
5756
6040
|
var require_reader = __commonJS({
|
|
5757
6041
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) {
|
|
5758
6042
|
"use strict";
|
|
5759
|
-
|
|
6043
|
+
init_utils2();
|
|
5760
6044
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5761
6045
|
var common = require_common2();
|
|
5762
6046
|
var Reader = class {
|
|
@@ -5774,7 +6058,7 @@ var require_reader = __commonJS({
|
|
|
5774
6058
|
var require_async3 = __commonJS({
|
|
5775
6059
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js"(exports) {
|
|
5776
6060
|
"use strict";
|
|
5777
|
-
|
|
6061
|
+
init_utils2();
|
|
5778
6062
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5779
6063
|
var events_1 = __require("events");
|
|
5780
6064
|
var fsScandir = require_out2();
|
|
@@ -5878,7 +6162,7 @@ var require_async3 = __commonJS({
|
|
|
5878
6162
|
var require_async4 = __commonJS({
|
|
5879
6163
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js"(exports) {
|
|
5880
6164
|
"use strict";
|
|
5881
|
-
|
|
6165
|
+
init_utils2();
|
|
5882
6166
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5883
6167
|
var async_1 = require_async3();
|
|
5884
6168
|
var AsyncProvider = class {
|
|
@@ -5915,7 +6199,7 @@ var require_async4 = __commonJS({
|
|
|
5915
6199
|
var require_stream2 = __commonJS({
|
|
5916
6200
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports) {
|
|
5917
6201
|
"use strict";
|
|
5918
|
-
|
|
6202
|
+
init_utils2();
|
|
5919
6203
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5920
6204
|
var stream_1 = __require("stream");
|
|
5921
6205
|
var async_1 = require_async3();
|
|
@@ -5957,7 +6241,7 @@ var require_stream2 = __commonJS({
|
|
|
5957
6241
|
var require_sync3 = __commonJS({
|
|
5958
6242
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports) {
|
|
5959
6243
|
"use strict";
|
|
5960
|
-
|
|
6244
|
+
init_utils2();
|
|
5961
6245
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5962
6246
|
var fsScandir = require_out2();
|
|
5963
6247
|
var common = require_common2();
|
|
@@ -6022,7 +6306,7 @@ var require_sync3 = __commonJS({
|
|
|
6022
6306
|
var require_sync4 = __commonJS({
|
|
6023
6307
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports) {
|
|
6024
6308
|
"use strict";
|
|
6025
|
-
|
|
6309
|
+
init_utils2();
|
|
6026
6310
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6027
6311
|
var sync_1 = require_sync3();
|
|
6028
6312
|
var SyncProvider = class {
|
|
@@ -6043,7 +6327,7 @@ var require_sync4 = __commonJS({
|
|
|
6043
6327
|
var require_settings3 = __commonJS({
|
|
6044
6328
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
|
|
6045
6329
|
"use strict";
|
|
6046
|
-
|
|
6330
|
+
init_utils2();
|
|
6047
6331
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6048
6332
|
var path = __require("path");
|
|
6049
6333
|
var fsScandir = require_out2();
|
|
@@ -6076,7 +6360,7 @@ var require_settings3 = __commonJS({
|
|
|
6076
6360
|
var require_out3 = __commonJS({
|
|
6077
6361
|
"node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js"(exports) {
|
|
6078
6362
|
"use strict";
|
|
6079
|
-
|
|
6363
|
+
init_utils2();
|
|
6080
6364
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6081
6365
|
exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0;
|
|
6082
6366
|
var async_1 = require_async4();
|
|
@@ -6117,7 +6401,7 @@ var require_out3 = __commonJS({
|
|
|
6117
6401
|
var require_reader2 = __commonJS({
|
|
6118
6402
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports) {
|
|
6119
6403
|
"use strict";
|
|
6120
|
-
|
|
6404
|
+
init_utils2();
|
|
6121
6405
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6122
6406
|
var path = __require("path");
|
|
6123
6407
|
var fsStat = require_out();
|
|
@@ -6157,7 +6441,7 @@ var require_reader2 = __commonJS({
|
|
|
6157
6441
|
var require_stream3 = __commonJS({
|
|
6158
6442
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js"(exports) {
|
|
6159
6443
|
"use strict";
|
|
6160
|
-
|
|
6444
|
+
init_utils2();
|
|
6161
6445
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6162
6446
|
var stream_1 = __require("stream");
|
|
6163
6447
|
var fsStat = require_out();
|
|
@@ -6215,7 +6499,7 @@ var require_stream3 = __commonJS({
|
|
|
6215
6499
|
var require_async5 = __commonJS({
|
|
6216
6500
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js"(exports) {
|
|
6217
6501
|
"use strict";
|
|
6218
|
-
|
|
6502
|
+
init_utils2();
|
|
6219
6503
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6220
6504
|
var fsWalk = require_out3();
|
|
6221
6505
|
var reader_1 = require_reader2();
|
|
@@ -6255,7 +6539,7 @@ var require_async5 = __commonJS({
|
|
|
6255
6539
|
var require_matcher = __commonJS({
|
|
6256
6540
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
6257
6541
|
"use strict";
|
|
6258
|
-
|
|
6542
|
+
init_utils2();
|
|
6259
6543
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6260
6544
|
var utils = require_utils3();
|
|
6261
6545
|
var Matcher = class {
|
|
@@ -6307,7 +6591,7 @@ var require_matcher = __commonJS({
|
|
|
6307
6591
|
var require_partial = __commonJS({
|
|
6308
6592
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js"(exports) {
|
|
6309
6593
|
"use strict";
|
|
6310
|
-
|
|
6594
|
+
init_utils2();
|
|
6311
6595
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6312
6596
|
var matcher_1 = require_matcher();
|
|
6313
6597
|
var PartialMatcher = class extends matcher_1.default {
|
|
@@ -6345,7 +6629,7 @@ var require_partial = __commonJS({
|
|
|
6345
6629
|
var require_deep = __commonJS({
|
|
6346
6630
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
6347
6631
|
"use strict";
|
|
6348
|
-
|
|
6632
|
+
init_utils2();
|
|
6349
6633
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6350
6634
|
var utils = require_utils3();
|
|
6351
6635
|
var partial_1 = require_partial();
|
|
@@ -6411,7 +6695,7 @@ var require_deep = __commonJS({
|
|
|
6411
6695
|
var require_entry = __commonJS({
|
|
6412
6696
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
6413
6697
|
"use strict";
|
|
6414
|
-
|
|
6698
|
+
init_utils2();
|
|
6415
6699
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6416
6700
|
var utils = require_utils3();
|
|
6417
6701
|
var EntryFilter = class {
|
|
@@ -6500,7 +6784,7 @@ var require_entry = __commonJS({
|
|
|
6500
6784
|
var require_error = __commonJS({
|
|
6501
6785
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
6502
6786
|
"use strict";
|
|
6503
|
-
|
|
6787
|
+
init_utils2();
|
|
6504
6788
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6505
6789
|
var utils = require_utils3();
|
|
6506
6790
|
var ErrorFilter = class {
|
|
@@ -6522,7 +6806,7 @@ var require_error = __commonJS({
|
|
|
6522
6806
|
var require_entry2 = __commonJS({
|
|
6523
6807
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
6524
6808
|
"use strict";
|
|
6525
|
-
|
|
6809
|
+
init_utils2();
|
|
6526
6810
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6527
6811
|
var utils = require_utils3();
|
|
6528
6812
|
var EntryTransformer = class {
|
|
@@ -6555,7 +6839,7 @@ var require_entry2 = __commonJS({
|
|
|
6555
6839
|
var require_provider = __commonJS({
|
|
6556
6840
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports) {
|
|
6557
6841
|
"use strict";
|
|
6558
|
-
|
|
6842
|
+
init_utils2();
|
|
6559
6843
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6560
6844
|
var path = __require("path");
|
|
6561
6845
|
var deep_1 = require_deep();
|
|
@@ -6610,7 +6894,7 @@ var require_provider = __commonJS({
|
|
|
6610
6894
|
var require_async6 = __commonJS({
|
|
6611
6895
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js"(exports) {
|
|
6612
6896
|
"use strict";
|
|
6613
|
-
|
|
6897
|
+
init_utils2();
|
|
6614
6898
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6615
6899
|
var async_1 = require_async5();
|
|
6616
6900
|
var provider_1 = require_provider();
|
|
@@ -6640,7 +6924,7 @@ var require_async6 = __commonJS({
|
|
|
6640
6924
|
var require_stream4 = __commonJS({
|
|
6641
6925
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js"(exports) {
|
|
6642
6926
|
"use strict";
|
|
6643
|
-
|
|
6927
|
+
init_utils2();
|
|
6644
6928
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6645
6929
|
var stream_1 = __require("stream");
|
|
6646
6930
|
var stream_2 = require_stream3();
|
|
@@ -6675,7 +6959,7 @@ var require_stream4 = __commonJS({
|
|
|
6675
6959
|
var require_sync5 = __commonJS({
|
|
6676
6960
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js"(exports) {
|
|
6677
6961
|
"use strict";
|
|
6678
|
-
|
|
6962
|
+
init_utils2();
|
|
6679
6963
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6680
6964
|
var fsStat = require_out();
|
|
6681
6965
|
var fsWalk = require_out3();
|
|
@@ -6724,7 +7008,7 @@ var require_sync5 = __commonJS({
|
|
|
6724
7008
|
var require_sync6 = __commonJS({
|
|
6725
7009
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js"(exports) {
|
|
6726
7010
|
"use strict";
|
|
6727
|
-
|
|
7011
|
+
init_utils2();
|
|
6728
7012
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6729
7013
|
var sync_1 = require_sync5();
|
|
6730
7014
|
var provider_1 = require_provider();
|
|
@@ -6754,7 +7038,7 @@ var require_sync6 = __commonJS({
|
|
|
6754
7038
|
var require_settings4 = __commonJS({
|
|
6755
7039
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js"(exports) {
|
|
6756
7040
|
"use strict";
|
|
6757
|
-
|
|
7041
|
+
init_utils2();
|
|
6758
7042
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6759
7043
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
6760
7044
|
var fs2 = __require("fs");
|
|
@@ -6815,7 +7099,7 @@ var require_settings4 = __commonJS({
|
|
|
6815
7099
|
var require_out4 = __commonJS({
|
|
6816
7100
|
"node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/index.js"(exports, module) {
|
|
6817
7101
|
"use strict";
|
|
6818
|
-
|
|
7102
|
+
init_utils2();
|
|
6819
7103
|
var taskManager = require_tasks();
|
|
6820
7104
|
var async_1 = require_async6();
|
|
6821
7105
|
var stream_1 = require_stream4();
|
|
@@ -6934,7 +7218,7 @@ var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
|
|
|
6934
7218
|
var init_constants = __esm({
|
|
6935
7219
|
"packages/core/config/constants.js"() {
|
|
6936
7220
|
"use strict";
|
|
6937
|
-
|
|
7221
|
+
init_utils2();
|
|
6938
7222
|
I18N_PATHS = {
|
|
6939
7223
|
// Monorepo source structure (locales at root, not in src/)
|
|
6940
7224
|
SOURCE_ROOT: "packages/core/i18n",
|
|
@@ -7096,7 +7380,7 @@ var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
|
|
|
7096
7380
|
var init_PathResolver = __esm({
|
|
7097
7381
|
"packages/core/config/utils/PathResolver.ts"() {
|
|
7098
7382
|
"use strict";
|
|
7099
|
-
|
|
7383
|
+
init_utils2();
|
|
7100
7384
|
import_fast_glob = __toESM(require_out4(), 1);
|
|
7101
7385
|
init_constants();
|
|
7102
7386
|
constants = {
|
|
@@ -8208,13 +8492,14 @@ async function openFile(filePath, flags) {
|
|
|
8208
8492
|
const fs2 = await import("node:fs");
|
|
8209
8493
|
return fs2.promises.open(filePath, flags);
|
|
8210
8494
|
}
|
|
8211
|
-
var pathResolverInstance, resolveFrameworkPackage, normalizePath, pathExists, read, readSync, write, writeSync, copy, removeSync, statSync2, ensureDir, findFiles, fromAppRoot, getRelativePathBetween, getDirname, getBasename, joinPath;
|
|
8495
|
+
var pathResolverInstance, getRepoRoot, resolveFrameworkPackage, normalizePath, pathExists, read, readSync, write, writeSync, copy, removeSync, statSync2, ensureDir, findFiles, fromAppRoot, getRelativePathBetween, getDirname, getBasename, joinPath;
|
|
8212
8496
|
var init_pathResolver = __esm({
|
|
8213
8497
|
"packages/tooling/src/utils/pathResolver.ts"() {
|
|
8214
8498
|
"use strict";
|
|
8215
|
-
|
|
8499
|
+
init_utils2();
|
|
8216
8500
|
init_PathResolver();
|
|
8217
8501
|
pathResolverInstance = PathResolver.getInstance({ debug: false });
|
|
8502
|
+
getRepoRoot = () => pathResolverInstance.getRepoRoot();
|
|
8218
8503
|
resolveFrameworkPackage = (name, from) => pathResolverInstance.resolveFrameworkPackage(name, from || null);
|
|
8219
8504
|
normalizePath = (...pathSegments) => {
|
|
8220
8505
|
return pathResolverInstance.normalizePath(join2(...pathSegments));
|
|
@@ -8269,7 +8554,7 @@ function readPackageJson(filePath) {
|
|
|
8269
8554
|
var init_typed_file_operations = __esm({
|
|
8270
8555
|
"packages/tooling/src/utils/typed-file-operations.ts"() {
|
|
8271
8556
|
"use strict";
|
|
8272
|
-
|
|
8557
|
+
init_utils2();
|
|
8273
8558
|
init_errors();
|
|
8274
8559
|
init_pathResolver();
|
|
8275
8560
|
}
|
|
@@ -8283,7 +8568,7 @@ import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
|
8283
8568
|
import process from "node:process";
|
|
8284
8569
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
8285
8570
|
var require2, __filename, __dirname;
|
|
8286
|
-
var
|
|
8571
|
+
var init_utils2 = __esm({
|
|
8287
8572
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
8288
8573
|
"use strict";
|
|
8289
8574
|
require2 = createRequire3(import.meta.url);
|
|
@@ -8524,7 +8809,7 @@ var PROVIDERS_CANDIDATES;
|
|
|
8524
8809
|
var init_app_detection = __esm({
|
|
8525
8810
|
"packages/tooling/src/utils/app-detection.ts"() {
|
|
8526
8811
|
"use strict";
|
|
8527
|
-
|
|
8812
|
+
init_utils2();
|
|
8528
8813
|
init_pathResolver();
|
|
8529
8814
|
init_typed_file_operations();
|
|
8530
8815
|
PROVIDERS_CANDIDATES = [
|
|
@@ -8560,7 +8845,7 @@ async function selectApp(projectRoot, appName) {
|
|
|
8560
8845
|
if (apps.length === 1) {
|
|
8561
8846
|
return apps[0] || null;
|
|
8562
8847
|
}
|
|
8563
|
-
const selected = await
|
|
8848
|
+
const selected = await _t({
|
|
8564
8849
|
message: "Select app:",
|
|
8565
8850
|
options: apps.map((app) => ({
|
|
8566
8851
|
value: app.name,
|
|
@@ -8575,8 +8860,8 @@ async function selectApp(projectRoot, appName) {
|
|
|
8575
8860
|
var init_app_selector = __esm({
|
|
8576
8861
|
"packages/tooling/src/utils/app-selector.ts"() {
|
|
8577
8862
|
"use strict";
|
|
8578
|
-
|
|
8579
|
-
|
|
8863
|
+
init_utils2();
|
|
8864
|
+
init_dist4();
|
|
8580
8865
|
init_app_detection();
|
|
8581
8866
|
init_cli_output();
|
|
8582
8867
|
}
|
|
@@ -8584,24 +8869,24 @@ var init_app_selector = __esm({
|
|
|
8584
8869
|
|
|
8585
8870
|
// packages/tooling/src/utils/cli-input.ts
|
|
8586
8871
|
async function askForInput(message, defaultValue = "") {
|
|
8587
|
-
const result = await
|
|
8872
|
+
const result = await Ot({
|
|
8588
8873
|
message,
|
|
8589
8874
|
placeholder: defaultValue || void 0,
|
|
8590
8875
|
defaultValue: defaultValue || void 0
|
|
8591
8876
|
});
|
|
8592
|
-
if (
|
|
8593
|
-
|
|
8877
|
+
if (q(result)) {
|
|
8878
|
+
pt("Operation cancelled.");
|
|
8594
8879
|
process.exit(0);
|
|
8595
8880
|
}
|
|
8596
8881
|
return result;
|
|
8597
8882
|
}
|
|
8598
8883
|
async function askForConfirmation(message, defaultValue = false) {
|
|
8599
|
-
const result = await
|
|
8884
|
+
const result = await ot2({
|
|
8600
8885
|
message,
|
|
8601
8886
|
initialValue: defaultValue
|
|
8602
8887
|
});
|
|
8603
|
-
if (
|
|
8604
|
-
|
|
8888
|
+
if (q(result)) {
|
|
8889
|
+
pt("Operation cancelled.");
|
|
8605
8890
|
process.exit(0);
|
|
8606
8891
|
}
|
|
8607
8892
|
return result;
|
|
@@ -8612,13 +8897,13 @@ async function askForSelection(message, choices, defaultValue = 0) {
|
|
|
8612
8897
|
label: choice.title,
|
|
8613
8898
|
hint: choice.hint
|
|
8614
8899
|
}));
|
|
8615
|
-
const result = await
|
|
8900
|
+
const result = await _t({
|
|
8616
8901
|
message,
|
|
8617
8902
|
options,
|
|
8618
8903
|
initialValue: choices[defaultValue]?.value
|
|
8619
8904
|
});
|
|
8620
|
-
if (
|
|
8621
|
-
|
|
8905
|
+
if (q(result)) {
|
|
8906
|
+
pt("Operation cancelled.");
|
|
8622
8907
|
process.exit(0);
|
|
8623
8908
|
}
|
|
8624
8909
|
return result;
|
|
@@ -8626,8 +8911,8 @@ async function askForSelection(message, choices, defaultValue = 0) {
|
|
|
8626
8911
|
var init_cli_input = __esm({
|
|
8627
8912
|
"packages/tooling/src/utils/cli-input.ts"() {
|
|
8628
8913
|
"use strict";
|
|
8629
|
-
|
|
8630
|
-
|
|
8914
|
+
init_utils2();
|
|
8915
|
+
init_dist4();
|
|
8631
8916
|
}
|
|
8632
8917
|
});
|
|
8633
8918
|
|
|
@@ -8650,7 +8935,7 @@ function getErrorMessage(error2) {
|
|
|
8650
8935
|
var init_error_handling = __esm({
|
|
8651
8936
|
"packages/tooling/src/utils/error-handling.ts"() {
|
|
8652
8937
|
"use strict";
|
|
8653
|
-
|
|
8938
|
+
init_utils2();
|
|
8654
8939
|
}
|
|
8655
8940
|
});
|
|
8656
8941
|
|
|
@@ -8708,7 +8993,7 @@ async function validateToken(token) {
|
|
|
8708
8993
|
const data = await res.json();
|
|
8709
8994
|
return { username: data.user.username, email: data.user.email };
|
|
8710
8995
|
}
|
|
8711
|
-
async function
|
|
8996
|
+
async function fetchProjectDetails(token, projectId, orgId) {
|
|
8712
8997
|
const q2 = orgId ? `?teamId=${encodeURIComponent(orgId)}` : "";
|
|
8713
8998
|
const res = await fetch(
|
|
8714
8999
|
`${VERCEL_API}/v9/projects/${encodeURIComponent(projectId)}${q2}`,
|
|
@@ -8721,7 +9006,14 @@ async function validateProject(token, projectId, orgId) {
|
|
|
8721
9006
|
throw formatVercelError(res.status, body, "validate project");
|
|
8722
9007
|
}
|
|
8723
9008
|
const data = await res.json();
|
|
8724
|
-
return {
|
|
9009
|
+
return {
|
|
9010
|
+
projectName: data.name,
|
|
9011
|
+
link: data.link ?? null
|
|
9012
|
+
};
|
|
9013
|
+
}
|
|
9014
|
+
async function validateProject(token, projectId, orgId) {
|
|
9015
|
+
const details = await fetchProjectDetails(token, projectId, orgId);
|
|
9016
|
+
return { projectName: details.projectName };
|
|
8725
9017
|
}
|
|
8726
9018
|
async function detectAccountType(token) {
|
|
8727
9019
|
const res = await fetch(`${VERCEL_API}/v2/teams`, {
|
|
@@ -8732,10 +9024,10 @@ async function detectAccountType(token) {
|
|
|
8732
9024
|
throw formatVercelError(res.status, body, "detect account type");
|
|
8733
9025
|
}
|
|
8734
9026
|
const data = await res.json();
|
|
8735
|
-
const teams = data.teams.map((
|
|
8736
|
-
id:
|
|
8737
|
-
name:
|
|
8738
|
-
slug:
|
|
9027
|
+
const teams = data.teams.map((t2) => ({
|
|
9028
|
+
id: t2.id,
|
|
9029
|
+
name: t2.name,
|
|
9030
|
+
slug: t2.slug
|
|
8739
9031
|
}));
|
|
8740
9032
|
return { hasTeams: teams.length > 0, teams };
|
|
8741
9033
|
}
|
|
@@ -8743,7 +9035,7 @@ var VERCEL_API;
|
|
|
8743
9035
|
var init_vercel_api = __esm({
|
|
8744
9036
|
"packages/tooling/src/apps/vercel-api.ts"() {
|
|
8745
9037
|
"use strict";
|
|
8746
|
-
|
|
9038
|
+
init_utils2();
|
|
8747
9039
|
init_errors();
|
|
8748
9040
|
VERCEL_API = "https://api.vercel.com";
|
|
8749
9041
|
}
|
|
@@ -8847,7 +9139,7 @@ var LEGACY_PATHS, warnedLegacy, cachedSecretsPath, cachedSecrets;
|
|
|
8847
9139
|
var init_secrets_resolver = __esm({
|
|
8848
9140
|
"packages/tooling/src/utils/secrets-resolver.ts"() {
|
|
8849
9141
|
"use strict";
|
|
8850
|
-
|
|
9142
|
+
init_utils2();
|
|
8851
9143
|
init_cli_output();
|
|
8852
9144
|
init_pathResolver();
|
|
8853
9145
|
LEGACY_PATHS = {
|
|
@@ -8874,7 +9166,7 @@ function resolvePerAppVar(appDir, varName) {
|
|
|
8874
9166
|
return null;
|
|
8875
9167
|
}
|
|
8876
9168
|
function resolveVercelCredentials(appDir, projectRoot) {
|
|
8877
|
-
const root = projectRoot ??
|
|
9169
|
+
const root = projectRoot ?? getRepoRoot();
|
|
8878
9170
|
const token = resolveSecret("VERCEL_TOKEN", root, { appDir })?.value ?? null;
|
|
8879
9171
|
const orgId = resolvePerAppVar(appDir, "VERCEL_ORG_ID");
|
|
8880
9172
|
const projectId = resolvePerAppVar(appDir, "VERCEL_PROJECT_ID");
|
|
@@ -8893,7 +9185,7 @@ function resolveVercelCredentials(appDir, projectRoot) {
|
|
|
8893
9185
|
var init_vercel_token = __esm({
|
|
8894
9186
|
"packages/tooling/src/cli/setup/vercel-token.ts"() {
|
|
8895
9187
|
"use strict";
|
|
8896
|
-
|
|
9188
|
+
init_utils2();
|
|
8897
9189
|
init_pathResolver();
|
|
8898
9190
|
init_secrets_resolver();
|
|
8899
9191
|
}
|
|
@@ -8912,7 +9204,7 @@ function computeOverallStatus(steps) {
|
|
|
8912
9204
|
var init_types = __esm({
|
|
8913
9205
|
"packages/tooling/src/cli/setup/types.ts"() {
|
|
8914
9206
|
"use strict";
|
|
8915
|
-
|
|
9207
|
+
init_utils2();
|
|
8916
9208
|
}
|
|
8917
9209
|
});
|
|
8918
9210
|
|
|
@@ -8992,7 +9284,7 @@ async function checkPrerequisites() {
|
|
|
8992
9284
|
}
|
|
8993
9285
|
}
|
|
8994
9286
|
async function selectOrCreateProject() {
|
|
8995
|
-
const s =
|
|
9287
|
+
const s = fe();
|
|
8996
9288
|
s.start("Fetching Firebase projects...");
|
|
8997
9289
|
const data = firebaseJson(["projects:list"]);
|
|
8998
9290
|
if (data.status !== "success" || !Array.isArray(data.result) || !data.result.length) {
|
|
@@ -9034,7 +9326,7 @@ async function createProject() {
|
|
|
9034
9326
|
""
|
|
9035
9327
|
);
|
|
9036
9328
|
const displayName = await askForInput("Display name", projectId);
|
|
9037
|
-
const s =
|
|
9329
|
+
const s = fe();
|
|
9038
9330
|
s.start(`Creating Firebase project "${projectId}"...`);
|
|
9039
9331
|
try {
|
|
9040
9332
|
const data = firebaseJson([
|
|
@@ -9057,7 +9349,7 @@ async function createProject() {
|
|
|
9057
9349
|
return { projectId, displayName };
|
|
9058
9350
|
}
|
|
9059
9351
|
async function ensureWebApp(projectId) {
|
|
9060
|
-
const s =
|
|
9352
|
+
const s = fe();
|
|
9061
9353
|
s.start("Getting web app config...");
|
|
9062
9354
|
try {
|
|
9063
9355
|
const data = firebaseJson([
|
|
@@ -9086,7 +9378,7 @@ async function ensureWebApp(projectId) {
|
|
|
9086
9378
|
);
|
|
9087
9379
|
process.exit(1);
|
|
9088
9380
|
}
|
|
9089
|
-
const s2 =
|
|
9381
|
+
const s2 = fe();
|
|
9090
9382
|
s2.start("Retrieving SDK config...");
|
|
9091
9383
|
await new Promise((resolve4) => setTimeout(resolve4, 2e3));
|
|
9092
9384
|
const configData = firebaseJson([
|
|
@@ -9129,7 +9421,7 @@ function writeEnvFile(appDir, config, framework) {
|
|
|
9129
9421
|
for (const line of existingLines) {
|
|
9130
9422
|
const trimmed = line.trim();
|
|
9131
9423
|
const isFirebaseVar = [...firebaseKeys].some(
|
|
9132
|
-
(
|
|
9424
|
+
(k) => trimmed.startsWith(`${prefix}${k}=`) || trimmed.startsWith(`# ${prefix}${k}=`)
|
|
9133
9425
|
);
|
|
9134
9426
|
if (!isFirebaseVar) {
|
|
9135
9427
|
preserved.push(line);
|
|
@@ -9149,7 +9441,7 @@ function writeEnvFile(appDir, config, framework) {
|
|
|
9149
9441
|
`${prefix}FIREBASE_FUNCTIONS_REGION=europe-west1`
|
|
9150
9442
|
];
|
|
9151
9443
|
const content = [
|
|
9152
|
-
...preserved.filter((
|
|
9444
|
+
...preserved.filter((l) => l.trim() !== ""),
|
|
9153
9445
|
"",
|
|
9154
9446
|
...firebaseBlock,
|
|
9155
9447
|
""
|
|
@@ -9189,7 +9481,7 @@ function updateFirebaseJson(projectRoot, projectId) {
|
|
|
9189
9481
|
}
|
|
9190
9482
|
}
|
|
9191
9483
|
async function main(options = {}) {
|
|
9192
|
-
|
|
9484
|
+
mt("Firebase Setup");
|
|
9193
9485
|
await checkPrerequisites();
|
|
9194
9486
|
const projectRoot = process.cwd();
|
|
9195
9487
|
let appDir = projectRoot;
|
|
@@ -9211,7 +9503,7 @@ async function main(options = {}) {
|
|
|
9211
9503
|
writeEnvFile(appDir, sdkConfig, framework);
|
|
9212
9504
|
updateFirebaserc(projectRoot, project.projectId);
|
|
9213
9505
|
updateFirebaseJson(projectRoot, project.projectId);
|
|
9214
|
-
|
|
9506
|
+
wt(
|
|
9215
9507
|
[
|
|
9216
9508
|
`Go to the Firebase Console:`,
|
|
9217
9509
|
`https://console.firebase.google.com/project/${project.projectId}/settings/serviceaccounts/adminsdk`,
|
|
@@ -9224,7 +9516,7 @@ async function main(options = {}) {
|
|
|
9224
9516
|
].join("\n"),
|
|
9225
9517
|
"Download Service Account Key"
|
|
9226
9518
|
);
|
|
9227
|
-
|
|
9519
|
+
wt(
|
|
9228
9520
|
[
|
|
9229
9521
|
`Enable these services in the Firebase Console:`,
|
|
9230
9522
|
``,
|
|
@@ -9242,7 +9534,7 @@ async function main(options = {}) {
|
|
|
9242
9534
|
].join("\n"),
|
|
9243
9535
|
"Enable Firebase Services"
|
|
9244
9536
|
);
|
|
9245
|
-
|
|
9537
|
+
wt(
|
|
9246
9538
|
[
|
|
9247
9539
|
`Project: ${project.projectId}`,
|
|
9248
9540
|
`App .env: ${appDir}/.env (Firebase config written)`,
|
|
@@ -9258,7 +9550,7 @@ async function main(options = {}) {
|
|
|
9258
9550
|
].join("\n"),
|
|
9259
9551
|
"Setup Complete"
|
|
9260
9552
|
);
|
|
9261
|
-
|
|
9553
|
+
gt(
|
|
9262
9554
|
"Firebase setup done. Complete the manual steps above, then run dndev emu start."
|
|
9263
9555
|
);
|
|
9264
9556
|
}
|
|
@@ -9266,7 +9558,7 @@ var firebase_default, firebaseWizard;
|
|
|
9266
9558
|
var init_firebase = __esm({
|
|
9267
9559
|
"packages/tooling/src/cli/setup/firebase.ts"() {
|
|
9268
9560
|
"use strict";
|
|
9269
|
-
|
|
9561
|
+
init_utils2();
|
|
9270
9562
|
init_types();
|
|
9271
9563
|
init_app_selector();
|
|
9272
9564
|
init_cli_input();
|
|
@@ -9377,7 +9669,7 @@ var init_firebase = __esm({
|
|
|
9377
9669
|
message: getErrorMessage(err)
|
|
9378
9670
|
});
|
|
9379
9671
|
}
|
|
9380
|
-
|
|
9672
|
+
wt(
|
|
9381
9673
|
[
|
|
9382
9674
|
`Go to the Firebase Console:`,
|
|
9383
9675
|
`https://console.firebase.google.com/project/${projectId}/settings/serviceaccounts/adminsdk`,
|
|
@@ -9396,7 +9688,7 @@ var init_firebase = __esm({
|
|
|
9396
9688
|
message: "Download from Firebase Console",
|
|
9397
9689
|
coachingTopic: "firebase-service-account"
|
|
9398
9690
|
});
|
|
9399
|
-
|
|
9691
|
+
wt(
|
|
9400
9692
|
[
|
|
9401
9693
|
`Enable these services in the Firebase Console:`,
|
|
9402
9694
|
``,
|
|
@@ -9493,7 +9785,7 @@ Ensure SUPABASE_ACCESS_TOKEN is valid. Get one from: https://supabase.com/dashbo
|
|
|
9493
9785
|
var init_supabase_management = __esm({
|
|
9494
9786
|
"packages/tooling/src/utils/supabase-management.ts"() {
|
|
9495
9787
|
"use strict";
|
|
9496
|
-
|
|
9788
|
+
init_utils2();
|
|
9497
9789
|
init_cli_output();
|
|
9498
9790
|
init_pathResolver();
|
|
9499
9791
|
}
|
|
@@ -9504,7 +9796,7 @@ var __dirname2, BaseGenerator;
|
|
|
9504
9796
|
var init_base_generator = __esm({
|
|
9505
9797
|
"packages/tooling/src/generators/base-generator.ts"() {
|
|
9506
9798
|
"use strict";
|
|
9507
|
-
|
|
9799
|
+
init_utils2();
|
|
9508
9800
|
init_cli_output();
|
|
9509
9801
|
init_errors();
|
|
9510
9802
|
init_pathResolver();
|
|
@@ -9556,7 +9848,7 @@ var init_base_generator = __esm({
|
|
|
9556
9848
|
* @author AMBROISE PARK Consulting
|
|
9557
9849
|
*/
|
|
9558
9850
|
async run() {
|
|
9559
|
-
|
|
9851
|
+
wt(`Running ${this.name} Generator`);
|
|
9560
9852
|
const result = {
|
|
9561
9853
|
filesGenerated: 0,
|
|
9562
9854
|
filesSkipped: 0,
|
|
@@ -9761,7 +10053,7 @@ var init_base_generator = __esm({
|
|
|
9761
10053
|
);
|
|
9762
10054
|
}
|
|
9763
10055
|
try {
|
|
9764
|
-
return templateContent.replace(/\$\{([^}]+)\}/g, (
|
|
10056
|
+
return templateContent.replace(/\$\{([^}]+)\}/g, (_2, key) => {
|
|
9765
10057
|
try {
|
|
9766
10058
|
const value = new Function(
|
|
9767
10059
|
...Object.keys(mergedContext),
|
|
@@ -10056,7 +10348,7 @@ var init_base_generator = __esm({
|
|
|
10056
10348
|
* @author AMBROISE PARK Consulting
|
|
10057
10349
|
*/
|
|
10058
10350
|
logSummary(result) {
|
|
10059
|
-
|
|
10351
|
+
wt(`${this.name} Generator Summary`);
|
|
10060
10352
|
if (this.dryRun) {
|
|
10061
10353
|
log.info("DRY RUN - No files were actually written");
|
|
10062
10354
|
}
|
|
@@ -10109,7 +10401,7 @@ function roleToSqlCondition(role) {
|
|
|
10109
10401
|
}
|
|
10110
10402
|
}
|
|
10111
10403
|
function camelToSnake(str) {
|
|
10112
|
-
return str.replace(/[A-Z]/g, (
|
|
10404
|
+
return str.replace(/[A-Z]/g, (c2) => `_${c2.toLowerCase()}`);
|
|
10113
10405
|
}
|
|
10114
10406
|
function fieldTypeToSql(fieldType) {
|
|
10115
10407
|
return FIELD_TYPE_TO_SQL[fieldType] ?? null;
|
|
@@ -10169,7 +10461,7 @@ var HIDDEN_STATUSES, ROLE_LEVEL, FIELD_TYPE_TO_SQL, TECHNICAL_KEYS, SqlGenerator
|
|
|
10169
10461
|
var init_sql_generator = __esm({
|
|
10170
10462
|
"packages/tooling/src/generators/sql-generator.ts"() {
|
|
10171
10463
|
"use strict";
|
|
10172
|
-
|
|
10464
|
+
init_utils2();
|
|
10173
10465
|
init_base_generator();
|
|
10174
10466
|
init_cli_output();
|
|
10175
10467
|
init_errors();
|
|
@@ -10272,7 +10564,7 @@ var init_sql_generator = __esm({
|
|
|
10272
10564
|
extractEntityFromModule(entityModule, fileName) {
|
|
10273
10565
|
const expectedName = fileName + "Entity";
|
|
10274
10566
|
if (entityModule[expectedName]) return entityModule[expectedName];
|
|
10275
|
-
const entityName = fileName.replace(/[-_](\w)/g, (
|
|
10567
|
+
const entityName = fileName.replace(/[-_](\w)/g, (_2, c2) => c2.toUpperCase()).replace(/^\w/, (c2) => c2.toUpperCase());
|
|
10276
10568
|
if (entityModule[entityName]) return entityModule[entityName];
|
|
10277
10569
|
for (const key of Object.keys(entityModule)) {
|
|
10278
10570
|
const potential = entityModule[key];
|
|
@@ -10399,7 +10691,8 @@ CREATE TRIGGER ${triggerName}
|
|
|
10399
10691
|
}
|
|
10400
10692
|
buildTriggerSqlPerTable(tableName) {
|
|
10401
10693
|
const quoted = this.safeTableName(tableName);
|
|
10402
|
-
const
|
|
10694
|
+
const updatedAtTrigger = `${tableName}_updated_at`;
|
|
10695
|
+
const auditTrigger = `${tableName}_audit`;
|
|
10403
10696
|
return `
|
|
10404
10697
|
CREATE OR REPLACE FUNCTION set_updated_at_${tableName}()
|
|
10405
10698
|
RETURNS TRIGGER AS $$
|
|
@@ -10409,11 +10702,28 @@ BEGIN
|
|
|
10409
10702
|
END;
|
|
10410
10703
|
$$ LANGUAGE plpgsql;
|
|
10411
10704
|
|
|
10412
|
-
DROP TRIGGER IF EXISTS ${
|
|
10413
|
-
CREATE TRIGGER ${
|
|
10705
|
+
DROP TRIGGER IF EXISTS ${updatedAtTrigger} ON ${quoted};
|
|
10706
|
+
CREATE TRIGGER ${updatedAtTrigger}
|
|
10414
10707
|
BEFORE UPDATE ON ${quoted}
|
|
10415
10708
|
FOR EACH ROW
|
|
10416
10709
|
EXECUTE PROCEDURE set_updated_at_${tableName}();
|
|
10710
|
+
|
|
10711
|
+
CREATE OR REPLACE FUNCTION set_audit_fields_${tableName}()
|
|
10712
|
+
RETURNS TRIGGER AS $$
|
|
10713
|
+
BEGIN
|
|
10714
|
+
IF TG_OP = 'INSERT' THEN
|
|
10715
|
+
NEW.created_by_id = COALESCE(NEW.created_by_id, auth.uid());
|
|
10716
|
+
END IF;
|
|
10717
|
+
NEW.updated_by_id = auth.uid();
|
|
10718
|
+
RETURN NEW;
|
|
10719
|
+
END;
|
|
10720
|
+
$$ LANGUAGE plpgsql SECURITY DEFINER;
|
|
10721
|
+
|
|
10722
|
+
DROP TRIGGER IF EXISTS ${auditTrigger} ON ${quoted};
|
|
10723
|
+
CREATE TRIGGER ${auditTrigger}
|
|
10724
|
+
BEFORE INSERT OR UPDATE ON ${quoted}
|
|
10725
|
+
FOR EACH ROW
|
|
10726
|
+
EXECUTE PROCEDURE set_audit_fields_${tableName}();
|
|
10417
10727
|
`;
|
|
10418
10728
|
}
|
|
10419
10729
|
async writeMigrationForEntity(entity, entityFileName, result) {
|
|
@@ -10475,6 +10785,8 @@ ${triggerSql}
|
|
|
10475
10785
|
}
|
|
10476
10786
|
const triggerFunc = "CREATE OR REPLACE FUNCTION set_updated_at()\nRETURNS TRIGGER AS $$\nBEGIN\n NEW.updated_at = now();\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;\n";
|
|
10477
10787
|
parts.push(triggerFunc);
|
|
10788
|
+
const auditFunc = "CREATE OR REPLACE FUNCTION set_audit_fields()\nRETURNS TRIGGER AS $$\nBEGIN\n IF TG_OP = 'INSERT' THEN\n NEW.created_by_id = COALESCE(NEW.created_by_id, auth.uid());\n END IF;\n NEW.updated_by_id = auth.uid();\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql SECURITY DEFINER;\n";
|
|
10789
|
+
parts.push(auditFunc);
|
|
10478
10790
|
for (const { entity } of entities) {
|
|
10479
10791
|
const tn = entity.collection;
|
|
10480
10792
|
const q2 = this.safeTableName(tn);
|
|
@@ -10484,6 +10796,12 @@ CREATE TRIGGER ${tn}_updated_at
|
|
|
10484
10796
|
BEFORE UPDATE ON ${q2}
|
|
10485
10797
|
FOR EACH ROW
|
|
10486
10798
|
EXECUTE PROCEDURE set_updated_at();
|
|
10799
|
+
|
|
10800
|
+
DROP TRIGGER IF EXISTS ${tn}_audit ON ${q2};
|
|
10801
|
+
CREATE TRIGGER ${tn}_audit
|
|
10802
|
+
BEFORE INSERT OR UPDATE ON ${q2}
|
|
10803
|
+
FOR EACH ROW
|
|
10804
|
+
EXECUTE PROCEDURE set_audit_fields();
|
|
10487
10805
|
`);
|
|
10488
10806
|
}
|
|
10489
10807
|
const content = parts.join("\n");
|
|
@@ -10538,7 +10856,7 @@ function writeEnvFile2(appDir, supabaseUrl, supabasePublicKey, framework) {
|
|
|
10538
10856
|
for (const line of existingLines) {
|
|
10539
10857
|
const trimmed = line.trim();
|
|
10540
10858
|
const isSupabaseVar = [...supabaseKeys].some(
|
|
10541
|
-
(
|
|
10859
|
+
(k) => trimmed.startsWith(`${prefix}${k}=`) || trimmed.startsWith(`# ${prefix}${k}=`)
|
|
10542
10860
|
);
|
|
10543
10861
|
if (!isSupabaseVar) {
|
|
10544
10862
|
preserved.push(line);
|
|
@@ -10554,7 +10872,7 @@ function writeEnvFile2(appDir, supabaseUrl, supabasePublicKey, framework) {
|
|
|
10554
10872
|
`${prefix}${keyVar}=${supabasePublicKey}`
|
|
10555
10873
|
];
|
|
10556
10874
|
const content = [
|
|
10557
|
-
...preserved.filter((
|
|
10875
|
+
...preserved.filter((l) => l.trim() !== ""),
|
|
10558
10876
|
"",
|
|
10559
10877
|
...supabaseBlock,
|
|
10560
10878
|
""
|
|
@@ -10661,7 +10979,7 @@ async function generateCrudFunction(supabaseDir, projectRoot) {
|
|
|
10661
10979
|
log.success(`Generated CRUD Edge Function: ${crudFunctionPath}`);
|
|
10662
10980
|
}
|
|
10663
10981
|
async function main3(options = {}) {
|
|
10664
|
-
|
|
10982
|
+
mt("Supabase Setup");
|
|
10665
10983
|
const projectRoot = process.cwd();
|
|
10666
10984
|
let appDir = projectRoot;
|
|
10667
10985
|
let framework = "vite";
|
|
@@ -10682,7 +11000,7 @@ async function main3(options = {}) {
|
|
|
10682
11000
|
const prefix = framework === "nextjs" ? "NEXT_PUBLIC_" : "VITE_";
|
|
10683
11001
|
const envPath = joinPath(appDir, ".env");
|
|
10684
11002
|
log.error("Missing Supabase credentials.");
|
|
10685
|
-
|
|
11003
|
+
wt(
|
|
10686
11004
|
[
|
|
10687
11005
|
`Fill in ${envPath}:`,
|
|
10688
11006
|
` ${prefix}SUPABASE_URL=https://your-project.supabase.co`,
|
|
@@ -10694,7 +11012,7 @@ async function main3(options = {}) {
|
|
|
10694
11012
|
].join("\n"),
|
|
10695
11013
|
"Missing Public Credentials"
|
|
10696
11014
|
);
|
|
10697
|
-
|
|
11015
|
+
gt("Setup aborted.");
|
|
10698
11016
|
return;
|
|
10699
11017
|
}
|
|
10700
11018
|
const supabaseUrl = existingConfig.url;
|
|
@@ -10712,7 +11030,7 @@ async function main3(options = {}) {
|
|
|
10712
11030
|
missing.push(
|
|
10713
11031
|
" SUPABASE_ACCESS_TOKEN=sbp_... (from https://supabase.com/dashboard/account/tokens)"
|
|
10714
11032
|
);
|
|
10715
|
-
|
|
11033
|
+
wt(
|
|
10716
11034
|
[
|
|
10717
11035
|
"Fill in .dndev.secrets at project root:",
|
|
10718
11036
|
...missing,
|
|
@@ -10721,7 +11039,7 @@ async function main3(options = {}) {
|
|
|
10721
11039
|
].join("\n"),
|
|
10722
11040
|
"Missing Credentials"
|
|
10723
11041
|
);
|
|
10724
|
-
|
|
11042
|
+
gt("Setup aborted.");
|
|
10725
11043
|
return;
|
|
10726
11044
|
}
|
|
10727
11045
|
const entitiesDir = joinPath(projectRoot, "entities");
|
|
@@ -10742,7 +11060,7 @@ async function main3(options = {}) {
|
|
|
10742
11060
|
outputDir: joinPath(supabaseDir, "migrations"),
|
|
10743
11061
|
singleFile: true
|
|
10744
11062
|
});
|
|
10745
|
-
const s =
|
|
11063
|
+
const s = fe();
|
|
10746
11064
|
s.start("Generating SQL migrations from entities...");
|
|
10747
11065
|
const result = await generator.run();
|
|
10748
11066
|
if (result.success) {
|
|
@@ -10780,7 +11098,7 @@ async function main3(options = {}) {
|
|
|
10780
11098
|
true
|
|
10781
11099
|
);
|
|
10782
11100
|
if (shouldPush) {
|
|
10783
|
-
const s =
|
|
11101
|
+
const s = fe();
|
|
10784
11102
|
s.start("Pushing migrations...");
|
|
10785
11103
|
try {
|
|
10786
11104
|
await executeMigration({ supabaseDir, supabaseUrl, accessToken });
|
|
@@ -10811,7 +11129,7 @@ async function main3(options = {}) {
|
|
|
10811
11129
|
steps.push("\u274C Migration push failed (see error above)");
|
|
10812
11130
|
const hasErrors = steps.some((s) => s.startsWith("\u274C"));
|
|
10813
11131
|
const title = hasErrors ? "Setup Incomplete" : "Setup Complete";
|
|
10814
|
-
|
|
11132
|
+
wt(
|
|
10815
11133
|
[
|
|
10816
11134
|
`Project URL: ${supabaseUrl}`,
|
|
10817
11135
|
"",
|
|
@@ -10825,7 +11143,7 @@ async function main3(options = {}) {
|
|
|
10825
11143
|
].join("\n"),
|
|
10826
11144
|
title
|
|
10827
11145
|
);
|
|
10828
|
-
|
|
11146
|
+
gt(
|
|
10829
11147
|
hasErrors ? "Setup incomplete \u2014 see errors above." : "Supabase setup done."
|
|
10830
11148
|
);
|
|
10831
11149
|
}
|
|
@@ -10833,7 +11151,7 @@ var supabase_default, supabaseWizard;
|
|
|
10833
11151
|
var init_supabase = __esm({
|
|
10834
11152
|
"packages/tooling/src/cli/setup/supabase.ts"() {
|
|
10835
11153
|
"use strict";
|
|
10836
|
-
|
|
11154
|
+
init_utils2();
|
|
10837
11155
|
init_types();
|
|
10838
11156
|
init_app_selector();
|
|
10839
11157
|
init_cli_input();
|
|
@@ -10893,7 +11211,7 @@ var init_supabase = __esm({
|
|
|
10893
11211
|
outputDir: joinPath(supabaseDir, "migrations"),
|
|
10894
11212
|
singleFile: true
|
|
10895
11213
|
});
|
|
10896
|
-
const s =
|
|
11214
|
+
const s = fe();
|
|
10897
11215
|
s.start("Generating SQL from entities...");
|
|
10898
11216
|
const result = await generator.run();
|
|
10899
11217
|
if (result.success) {
|
|
@@ -10934,7 +11252,7 @@ var init_supabase = __esm({
|
|
|
10934
11252
|
}
|
|
10935
11253
|
const migrationsDir = joinPath(supabaseDir, "migrations");
|
|
10936
11254
|
if (pathExists(migrationsDir)) {
|
|
10937
|
-
const s =
|
|
11255
|
+
const s = fe();
|
|
10938
11256
|
s.start("Pushing migrations...");
|
|
10939
11257
|
try {
|
|
10940
11258
|
await executeMigration({
|
|
@@ -10992,7 +11310,7 @@ var vercelWizard;
|
|
|
10992
11310
|
var init_vercel = __esm({
|
|
10993
11311
|
"packages/tooling/src/cli/setup/vercel.ts"() {
|
|
10994
11312
|
"use strict";
|
|
10995
|
-
|
|
11313
|
+
init_utils2();
|
|
10996
11314
|
init_types();
|
|
10997
11315
|
init_vercel_token();
|
|
10998
11316
|
init_vercel_api();
|
|
@@ -11059,7 +11377,7 @@ var init_vercel = __esm({
|
|
|
11059
11377
|
try {
|
|
11060
11378
|
const account = await detectAccountType(token);
|
|
11061
11379
|
if (account.hasTeams) {
|
|
11062
|
-
const teamNames = account.teams.map((
|
|
11380
|
+
const teamNames = account.teams.map((t2) => t2.name).join(", ");
|
|
11063
11381
|
log.info(`Account type: Team/Pro (teams: ${teamNames})`);
|
|
11064
11382
|
if (!orgId) {
|
|
11065
11383
|
log.warn(
|
|
@@ -11133,19 +11451,19 @@ var init_vercel = __esm({
|
|
|
11133
11451
|
});
|
|
11134
11452
|
|
|
11135
11453
|
// packages/cli/src/bin/commands/setup.ts
|
|
11136
|
-
|
|
11454
|
+
init_utils2();
|
|
11137
11455
|
|
|
11138
11456
|
// packages/tooling/src/index.ts
|
|
11139
|
-
|
|
11457
|
+
init_utils2();
|
|
11140
11458
|
|
|
11141
11459
|
// packages/tooling/src/cli/index.ts
|
|
11142
|
-
|
|
11460
|
+
init_utils2();
|
|
11143
11461
|
|
|
11144
11462
|
// packages/tooling/src/cli/setup/setup.ts
|
|
11145
|
-
|
|
11463
|
+
init_utils2();
|
|
11146
11464
|
|
|
11147
11465
|
// packages/tooling/src/cli/setup/validate-env.ts
|
|
11148
|
-
|
|
11466
|
+
init_utils2();
|
|
11149
11467
|
init_cli_output();
|
|
11150
11468
|
init_pathResolver();
|
|
11151
11469
|
init_secrets_resolver();
|
|
@@ -11313,18 +11631,18 @@ function validateAllApps(apps, _topology, projectRoot) {
|
|
|
11313
11631
|
function printAllValidationResults(results, multiApp) {
|
|
11314
11632
|
const allMissing = [];
|
|
11315
11633
|
for (const { app, missing } of results) {
|
|
11316
|
-
for (const
|
|
11317
|
-
allMissing.push({ appName: app.name, m
|
|
11634
|
+
for (const m of missing) {
|
|
11635
|
+
allMissing.push({ appName: app.name, m });
|
|
11318
11636
|
}
|
|
11319
11637
|
}
|
|
11320
11638
|
if (allMissing.length === 0) {
|
|
11321
11639
|
log.success("Credentials OK");
|
|
11322
11640
|
return true;
|
|
11323
11641
|
}
|
|
11324
|
-
for (const { appName, m
|
|
11642
|
+
for (const { appName, m } of allMissing) {
|
|
11325
11643
|
const prefix = multiApp ? `${appName}: ` : "";
|
|
11326
|
-
const detail =
|
|
11327
|
-
log.error(` ${prefix}${
|
|
11644
|
+
const detail = m.status === "empty" ? `empty in ${m.envFile}` : m.status === "no_env_file" ? `env file not found: ${m.envFile}` : `missing \u2014 ${m.envFile}`;
|
|
11645
|
+
log.error(` ${prefix}${m.varName} (${detail})`);
|
|
11328
11646
|
}
|
|
11329
11647
|
log.warn(`Run 'dndev coach' to see where to get them.`);
|
|
11330
11648
|
return false;
|
|
@@ -11372,7 +11690,7 @@ function buildSetupContext(app, projectRoot, topology, options) {
|
|
|
11372
11690
|
}
|
|
11373
11691
|
async function main4(options = {}) {
|
|
11374
11692
|
const projectRoot = process.cwd();
|
|
11375
|
-
|
|
11693
|
+
mt("DoNotDev Setup");
|
|
11376
11694
|
const topology = analyzeProjectTopology(projectRoot);
|
|
11377
11695
|
let apps = topology.apps;
|
|
11378
11696
|
if (apps.length === 0) {
|
|
@@ -11382,7 +11700,7 @@ async function main4(options = {}) {
|
|
|
11382
11700
|
const validationResults = validateAllApps(apps, topology, projectRoot);
|
|
11383
11701
|
const allValid = printAllValidationResults(validationResults, multiApp);
|
|
11384
11702
|
if (!allValid) {
|
|
11385
|
-
|
|
11703
|
+
gt("Fix missing values, then re-run.");
|
|
11386
11704
|
return 1;
|
|
11387
11705
|
}
|
|
11388
11706
|
const allResults = [];
|
|
@@ -11393,7 +11711,7 @@ async function main4(options = {}) {
|
|
|
11393
11711
|
const id = options.provider.toLowerCase();
|
|
11394
11712
|
if (!WIZARD_REGISTRY[id]) {
|
|
11395
11713
|
log.error(`Unknown provider: ${options.provider}`);
|
|
11396
|
-
|
|
11714
|
+
gt("Setup aborted.");
|
|
11397
11715
|
return 1;
|
|
11398
11716
|
}
|
|
11399
11717
|
const wizard = await WIZARD_REGISTRY[id]();
|
|
@@ -11419,14 +11737,14 @@ async function main4(options = {}) {
|
|
|
11419
11737
|
}
|
|
11420
11738
|
if (allResults.length === 0) {
|
|
11421
11739
|
log.warn("No providers detected. Run: dndev setup <provider>");
|
|
11422
|
-
|
|
11740
|
+
gt("Nothing to set up.");
|
|
11423
11741
|
return 0;
|
|
11424
11742
|
}
|
|
11425
11743
|
renderResults(allResults, multiApp);
|
|
11426
11744
|
const hasFailures = allResults.some(
|
|
11427
|
-
(
|
|
11745
|
+
(r) => r.result.overallStatus === "failed"
|
|
11428
11746
|
);
|
|
11429
|
-
|
|
11747
|
+
gt(
|
|
11430
11748
|
hasFailures ? "Setup incomplete \u2014 see errors above." : "Setup complete."
|
|
11431
11749
|
);
|
|
11432
11750
|
return hasFailures ? 1 : 0;
|