@m2-ai/lattice-cli 0.0.0-stage → 0.8.7
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/DISCLOSURE +1 -0
- package/README.md +118 -2
- package/bundles/expo-mobile/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
- package/bundles/expo-mobile/.agents/skills/lattice-release-manager/SKILL.md +29 -0
- package/bundles/expo-mobile/.agents/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/expo-mobile/.claude/agents/lattice-feature-agent.md +10 -0
- package/bundles/expo-mobile/.claude/agents/lattice-release-manager.md +9 -0
- package/bundles/expo-mobile/.claude/hooks/README.md +9 -0
- package/bundles/expo-mobile/.claude/hooks/pre-commit-verify.mjs +10 -0
- package/bundles/expo-mobile/.claude/hooks/pre-tool-use.mjs +51 -0
- package/bundles/expo-mobile/.claude/rules/lattice-core.md +20 -0
- package/bundles/expo-mobile/.claude/settings.json +38 -0
- package/bundles/expo-mobile/.claude/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/expo-mobile/.codex/agents/lattice-feature-agent.toml +9 -0
- package/bundles/expo-mobile/.codex/agents/lattice-release-manager.toml +9 -0
- package/bundles/expo-mobile/.cursor/mcp.json +34 -0
- package/bundles/expo-mobile/.cursor/rules/lattice-core.mdc +35 -0
- package/bundles/expo-mobile/.cursor/rules.md +94 -0
- package/bundles/expo-mobile/.env.example +19 -0
- package/bundles/expo-mobile/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- package/bundles/expo-mobile/.github/agents/lattice-feature-agent.agent.md +7 -0
- package/bundles/expo-mobile/.github/agents/lattice-release-manager.agent.md +7 -0
- package/bundles/expo-mobile/.github/copilot-instructions.md +37 -0
- package/bundles/expo-mobile/.github/instructions/lattice-core.instructions.md +11 -0
- package/bundles/expo-mobile/.github/workflows/ci.yml +26 -0
- package/bundles/expo-mobile/.gitmessage +24 -0
- package/bundles/expo-mobile/.lattice/config.json +9 -0
- package/bundles/expo-mobile/.lattice/dependency-security.json +91 -0
- package/bundles/expo-mobile/.lattice/prompts/01-feature.md +36 -0
- package/bundles/expo-mobile/.lattice/prompts/02-bugfix.md +32 -0
- package/bundles/expo-mobile/.lattice/prompts/03-refactor.md +30 -0
- package/bundles/expo-mobile/.lattice/prompts/04-test.md +31 -0
- package/bundles/expo-mobile/.lattice/prompts/05-polish.md +38 -0
- package/bundles/expo-mobile/.lattice/prompts/06-security.md +32 -0
- package/bundles/expo-mobile/.lattice/release-workflow.json +55 -0
- package/bundles/expo-mobile/.lattice/schemas/feature-handoff.schema.json +264 -0
- package/bundles/expo-mobile/.lattice/templates/feature-handoff.json +52 -0
- package/bundles/expo-mobile/.mcp.json +35 -0
- package/bundles/expo-mobile/AGENTS.md +58 -0
- package/bundles/expo-mobile/CLAUDE.md +75 -0
- package/bundles/expo-mobile/PROJECT_GUIDE.md +299 -0
- package/bundles/expo-mobile/README.md +39 -0
- package/bundles/expo-mobile/__tests__/home.test.tsx +22 -0
- package/bundles/expo-mobile/app/_layout.tsx +20 -0
- package/bundles/expo-mobile/app/index.tsx +72 -0
- package/bundles/expo-mobile/app.json +33 -0
- package/bundles/expo-mobile/components/ui/Button.tsx +75 -0
- package/bundles/expo-mobile/components/ui/Input.tsx +50 -0
- package/bundles/expo-mobile/components/ui/index.ts +2 -0
- package/bundles/expo-mobile/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
- package/bundles/expo-mobile/docs/rules/codex.md +62 -0
- package/bundles/expo-mobile/eslint.config.js +7 -0
- package/bundles/expo-mobile/lib/supabase/client.ts +22 -0
- package/bundles/expo-mobile/lib/supabase/realtime.ts +10 -0
- package/bundles/expo-mobile/lib/supabase/storage.ts +6 -0
- package/bundles/expo-mobile/package.json +65 -0
- package/bundles/expo-mobile/plugins/with-lattice-commons-io.cjs +42 -0
- package/bundles/expo-mobile/prompts/01-feature-implementation.md +48 -0
- package/bundles/expo-mobile/prompts/02-bug-fix.md +43 -0
- package/bundles/expo-mobile/prompts/03-safe-refactor.md +38 -0
- package/bundles/expo-mobile/prompts/04-test-first.md +41 -0
- package/bundles/expo-mobile/prompts/05-ui-polish.md +44 -0
- package/bundles/expo-mobile/prompts/06-security-review.md +39 -0
- package/bundles/expo-mobile/prompts/quality.md +143 -0
- package/bundles/expo-mobile/supabase/migrations/001_initial_schema.sql +66 -0
- package/bundles/expo-mobile/tsconfig.json +21 -0
- package/bundles/expo-mobile/types/database.types.ts +76 -0
- package/bundles/expo-mobile/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
- package/bundles/expo-supabase/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
- package/bundles/expo-supabase/.agents/skills/lattice-release-manager/SKILL.md +29 -0
- package/bundles/expo-supabase/.agents/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/expo-supabase/.claude/agents/lattice-feature-agent.md +10 -0
- package/bundles/expo-supabase/.claude/agents/lattice-release-manager.md +9 -0
- package/bundles/expo-supabase/.claude/hooks/README.md +9 -0
- package/bundles/expo-supabase/.claude/hooks/pre-commit-verify.mjs +10 -0
- package/bundles/expo-supabase/.claude/hooks/pre-tool-use.mjs +51 -0
- package/bundles/expo-supabase/.claude/rules/lattice-core.md +20 -0
- package/bundles/expo-supabase/.claude/settings.json +38 -0
- package/bundles/expo-supabase/.claude/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/expo-supabase/.codex/agents/lattice-feature-agent.toml +9 -0
- package/bundles/expo-supabase/.codex/agents/lattice-release-manager.toml +9 -0
- package/bundles/expo-supabase/.cursor/mcp.json +34 -0
- package/bundles/expo-supabase/.cursor/rules/lattice-core.mdc +35 -0
- package/bundles/expo-supabase/.cursor/rules.md +94 -0
- package/bundles/expo-supabase/.env.example +12 -0
- package/bundles/expo-supabase/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- package/bundles/expo-supabase/.github/agents/lattice-feature-agent.agent.md +7 -0
- package/bundles/expo-supabase/.github/agents/lattice-release-manager.agent.md +7 -0
- package/bundles/expo-supabase/.github/copilot-instructions.md +37 -0
- package/bundles/expo-supabase/.github/instructions/lattice-core.instructions.md +11 -0
- package/bundles/expo-supabase/.github/workflows/ci.yml +26 -0
- package/bundles/expo-supabase/.gitmessage +24 -0
- package/bundles/expo-supabase/.lattice/config.json +9 -0
- package/bundles/expo-supabase/.lattice/dependency-security.json +91 -0
- package/bundles/expo-supabase/.lattice/prompts/01-feature.md +36 -0
- package/bundles/expo-supabase/.lattice/prompts/02-bugfix.md +32 -0
- package/bundles/expo-supabase/.lattice/prompts/03-refactor.md +30 -0
- package/bundles/expo-supabase/.lattice/prompts/04-test.md +31 -0
- package/bundles/expo-supabase/.lattice/prompts/05-polish.md +38 -0
- package/bundles/expo-supabase/.lattice/prompts/06-security.md +32 -0
- package/bundles/expo-supabase/.lattice/release-workflow.json +55 -0
- package/bundles/expo-supabase/.lattice/schemas/feature-handoff.schema.json +264 -0
- package/bundles/expo-supabase/.lattice/templates/feature-handoff.json +52 -0
- package/bundles/expo-supabase/.mcp.json +35 -0
- package/bundles/expo-supabase/AGENTS.md +58 -0
- package/bundles/expo-supabase/CLAUDE.md +75 -0
- package/bundles/expo-supabase/PROJECT_GUIDE.md +201 -0
- package/bundles/expo-supabase/README.md +38 -0
- package/bundles/expo-supabase/__tests__/home.test.tsx +22 -0
- package/bundles/expo-supabase/app/_layout.tsx +14 -0
- package/bundles/expo-supabase/app/index.tsx +72 -0
- package/bundles/expo-supabase/app.json +33 -0
- package/bundles/expo-supabase/components/ui/Button.tsx +75 -0
- package/bundles/expo-supabase/components/ui/Input.tsx +50 -0
- package/bundles/expo-supabase/components/ui/index.ts +2 -0
- package/bundles/expo-supabase/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
- package/bundles/expo-supabase/docs/rules/codex.md +62 -0
- package/bundles/expo-supabase/eslint.config.js +7 -0
- package/bundles/expo-supabase/lib/supabase/client.ts +22 -0
- package/bundles/expo-supabase/lib/supabase/realtime.ts +10 -0
- package/bundles/expo-supabase/lib/supabase/storage.ts +6 -0
- package/bundles/expo-supabase/package.json +60 -0
- package/bundles/expo-supabase/plugins/with-lattice-commons-io.cjs +42 -0
- package/bundles/expo-supabase/prompts/01-feature-implementation.md +8 -0
- package/bundles/expo-supabase/prompts/02-bug-fix.md +9 -0
- package/bundles/expo-supabase/prompts/03-safe-refactor.md +8 -0
- package/bundles/expo-supabase/prompts/04-test-first.md +7 -0
- package/bundles/expo-supabase/prompts/05-ui-polish.md +7 -0
- package/bundles/expo-supabase/prompts/06-security-review.md +7 -0
- package/bundles/expo-supabase/prompts/quality.md +143 -0
- package/bundles/expo-supabase/supabase/migrations/001_initial_schema.sql +66 -0
- package/bundles/expo-supabase/tsconfig.json +21 -0
- package/bundles/expo-supabase/types/database.types.ts +76 -0
- package/bundles/expo-supabase/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
- package/bundles/nextjs-landing/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
- package/bundles/nextjs-landing/.agents/skills/lattice-release-manager/SKILL.md +29 -0
- package/bundles/nextjs-landing/.agents/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/nextjs-landing/.claude/agents/lattice-feature-agent.md +10 -0
- package/bundles/nextjs-landing/.claude/agents/lattice-release-manager.md +9 -0
- package/bundles/nextjs-landing/.claude/hooks/README.md +9 -0
- package/bundles/nextjs-landing/.claude/hooks/pre-commit-verify.mjs +10 -0
- package/bundles/nextjs-landing/.claude/hooks/pre-tool-use.mjs +51 -0
- package/bundles/nextjs-landing/.claude/rules/lattice-core.md +20 -0
- package/bundles/nextjs-landing/.claude/settings.json +38 -0
- package/bundles/nextjs-landing/.claude/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/nextjs-landing/.codex/agents/lattice-feature-agent.toml +9 -0
- package/bundles/nextjs-landing/.codex/agents/lattice-release-manager.toml +9 -0
- package/bundles/nextjs-landing/.cursor/mcp.json +34 -0
- package/bundles/nextjs-landing/.cursor/rules/lattice-core.mdc +35 -0
- package/bundles/nextjs-landing/.cursor/rules.md +95 -0
- package/bundles/nextjs-landing/.env.example +24 -0
- package/bundles/nextjs-landing/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- package/bundles/nextjs-landing/.github/agents/lattice-feature-agent.agent.md +7 -0
- package/bundles/nextjs-landing/.github/agents/lattice-release-manager.agent.md +7 -0
- package/bundles/nextjs-landing/.github/copilot-instructions.md +37 -0
- package/bundles/nextjs-landing/.github/instructions/lattice-core.instructions.md +11 -0
- package/bundles/nextjs-landing/.github/workflows/ci.yml +26 -0
- package/bundles/nextjs-landing/.gitmessage +24 -0
- package/bundles/nextjs-landing/.lattice/config.json +9 -0
- package/bundles/nextjs-landing/.lattice/dependency-security.json +46 -0
- package/bundles/nextjs-landing/.lattice/prompts/01-feature.md +36 -0
- package/bundles/nextjs-landing/.lattice/prompts/02-bugfix.md +32 -0
- package/bundles/nextjs-landing/.lattice/prompts/03-refactor.md +30 -0
- package/bundles/nextjs-landing/.lattice/prompts/04-test.md +31 -0
- package/bundles/nextjs-landing/.lattice/prompts/05-polish.md +38 -0
- package/bundles/nextjs-landing/.lattice/prompts/06-security.md +32 -0
- package/bundles/nextjs-landing/.lattice/release-workflow.json +55 -0
- package/bundles/nextjs-landing/.lattice/schemas/feature-handoff.schema.json +264 -0
- package/bundles/nextjs-landing/.lattice/templates/feature-handoff.json +52 -0
- package/bundles/nextjs-landing/.mcp.json +35 -0
- package/bundles/nextjs-landing/AGENTS.md +58 -0
- package/bundles/nextjs-landing/CLAUDE.md +76 -0
- package/bundles/nextjs-landing/PROJECT_GUIDE.md +216 -0
- package/bundles/nextjs-landing/README.md +39 -0
- package/bundles/nextjs-landing/app/api/example/[id]/route.ts +34 -0
- package/bundles/nextjs-landing/app/api/example/route.ts +24 -0
- package/bundles/nextjs-landing/app/api/health/route.ts +8 -0
- package/bundles/nextjs-landing/app/global-error.tsx +17 -0
- package/bundles/nextjs-landing/app/globals.css +55 -0
- package/bundles/nextjs-landing/app/layout.tsx +22 -0
- package/bundles/nextjs-landing/app/page.tsx +42 -0
- package/bundles/nextjs-landing/components/ui/button.tsx +39 -0
- package/bundles/nextjs-landing/components/ui/card.tsx +53 -0
- package/bundles/nextjs-landing/components/ui/index.ts +4 -0
- package/bundles/nextjs-landing/components/ui/input.tsx +23 -0
- package/bundles/nextjs-landing/components/ui/spinner.tsx +22 -0
- package/bundles/nextjs-landing/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
- package/bundles/nextjs-landing/docs/rules/codex.md +62 -0
- package/bundles/nextjs-landing/eslint.config.mjs +16 -0
- package/bundles/nextjs-landing/instrumentation-client.ts +30 -0
- package/bundles/nextjs-landing/instrumentation.ts +12 -0
- package/bundles/nextjs-landing/jest.config.mjs +16 -0
- package/bundles/nextjs-landing/jest.setup.js +1 -0
- package/bundles/nextjs-landing/lib/utils.ts +6 -0
- package/bundles/nextjs-landing/next-env.d.ts +5 -0
- package/bundles/nextjs-landing/next.config.ts +15 -0
- package/bundles/nextjs-landing/package.json +48 -0
- package/bundles/nextjs-landing/postcss.config.mjs +7 -0
- package/bundles/nextjs-landing/prompts/01-feature-implementation.md +9 -0
- package/bundles/nextjs-landing/prompts/02-bug-fix.md +10 -0
- package/bundles/nextjs-landing/prompts/03-safe-refactor.md +8 -0
- package/bundles/nextjs-landing/prompts/04-test-first.md +8 -0
- package/bundles/nextjs-landing/prompts/05-ui-polish.md +8 -0
- package/bundles/nextjs-landing/prompts/06-security-review.md +7 -0
- package/bundles/nextjs-landing/prompts/quality.md +269 -0
- package/bundles/nextjs-landing/sentry.edge.config.ts +15 -0
- package/bundles/nextjs-landing/sentry.server.config.ts +15 -0
- package/bundles/nextjs-landing/tsconfig.json +42 -0
- package/bundles/nextjs-landing/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
- package/bundles/nextjs-saas/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
- package/bundles/nextjs-saas/.agents/skills/lattice-release-manager/SKILL.md +29 -0
- package/bundles/nextjs-saas/.agents/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/nextjs-saas/.claude/agents/lattice-feature-agent.md +10 -0
- package/bundles/nextjs-saas/.claude/agents/lattice-release-manager.md +9 -0
- package/bundles/nextjs-saas/.claude/hooks/README.md +9 -0
- package/bundles/nextjs-saas/.claude/hooks/pre-commit-verify.mjs +10 -0
- package/bundles/nextjs-saas/.claude/hooks/pre-tool-use.mjs +51 -0
- package/bundles/nextjs-saas/.claude/rules/lattice-core.md +20 -0
- package/bundles/nextjs-saas/.claude/settings.json +38 -0
- package/bundles/nextjs-saas/.claude/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/nextjs-saas/.codex/agents/lattice-feature-agent.toml +9 -0
- package/bundles/nextjs-saas/.codex/agents/lattice-release-manager.toml +9 -0
- package/bundles/nextjs-saas/.cursor/mcp.json +34 -0
- package/bundles/nextjs-saas/.cursor/rules/lattice-core.mdc +35 -0
- package/bundles/nextjs-saas/.cursor/rules.md +95 -0
- package/bundles/nextjs-saas/.env.example +48 -0
- package/bundles/nextjs-saas/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- package/bundles/nextjs-saas/.github/agents/lattice-feature-agent.agent.md +7 -0
- package/bundles/nextjs-saas/.github/agents/lattice-release-manager.agent.md +7 -0
- package/bundles/nextjs-saas/.github/copilot-instructions.md +37 -0
- package/bundles/nextjs-saas/.github/instructions/lattice-core.instructions.md +11 -0
- package/bundles/nextjs-saas/.github/workflows/ci.yml +26 -0
- package/bundles/nextjs-saas/.gitmessage +24 -0
- package/bundles/nextjs-saas/.lattice/config.json +9 -0
- package/bundles/nextjs-saas/.lattice/dependency-security.json +46 -0
- package/bundles/nextjs-saas/.lattice/prompts/01-feature.md +36 -0
- package/bundles/nextjs-saas/.lattice/prompts/02-bugfix.md +32 -0
- package/bundles/nextjs-saas/.lattice/prompts/03-refactor.md +30 -0
- package/bundles/nextjs-saas/.lattice/prompts/04-test.md +31 -0
- package/bundles/nextjs-saas/.lattice/prompts/05-polish.md +38 -0
- package/bundles/nextjs-saas/.lattice/prompts/06-security.md +32 -0
- package/bundles/nextjs-saas/.lattice/prompts/quality.md +269 -0
- package/bundles/nextjs-saas/.lattice/release-workflow.json +55 -0
- package/bundles/nextjs-saas/.lattice/schemas/feature-handoff.schema.json +264 -0
- package/bundles/nextjs-saas/.lattice/templates/feature-handoff.json +52 -0
- package/bundles/nextjs-saas/.mcp.json +35 -0
- package/bundles/nextjs-saas/AGENTS.md +58 -0
- package/bundles/nextjs-saas/CLAUDE.md +76 -0
- package/bundles/nextjs-saas/PROJECT_GUIDE.md +279 -0
- package/bundles/nextjs-saas/README.md +42 -0
- package/bundles/nextjs-saas/app/(auth)/forgot-password/page.tsx +101 -0
- package/bundles/nextjs-saas/app/(auth)/layout.tsx +7 -0
- package/bundles/nextjs-saas/app/(auth)/login/page.tsx +108 -0
- package/bundles/nextjs-saas/app/(auth)/reset-password/page.tsx +135 -0
- package/bundles/nextjs-saas/app/(auth)/signup/page.tsx +144 -0
- package/bundles/nextjs-saas/app/(dashboard)/dashboard/page.tsx +80 -0
- package/bundles/nextjs-saas/app/(dashboard)/layout.tsx +49 -0
- package/bundles/nextjs-saas/app/api/billing/checkout/route.ts +47 -0
- package/bundles/nextjs-saas/app/api/billing/portal/route.ts +29 -0
- package/bundles/nextjs-saas/app/api/example/[id]/route.ts +93 -0
- package/bundles/nextjs-saas/app/api/example/route.ts +61 -0
- package/bundles/nextjs-saas/app/api/health/route.ts +8 -0
- package/bundles/nextjs-saas/app/api/stripe/webhook/route.ts +57 -0
- package/bundles/nextjs-saas/app/api/user/route.ts +49 -0
- package/bundles/nextjs-saas/app/auth/callback/route.ts +16 -0
- package/bundles/nextjs-saas/app/auth/signout/route.ts +10 -0
- package/bundles/nextjs-saas/app/global-error.tsx +17 -0
- package/bundles/nextjs-saas/app/globals.css +55 -0
- package/bundles/nextjs-saas/app/layout.tsx +22 -0
- package/bundles/nextjs-saas/app/page.tsx +84 -0
- package/bundles/nextjs-saas/components/ui/button.tsx +39 -0
- package/bundles/nextjs-saas/components/ui/card.tsx +53 -0
- package/bundles/nextjs-saas/components/ui/index.ts +4 -0
- package/bundles/nextjs-saas/components/ui/input.tsx +23 -0
- package/bundles/nextjs-saas/components/ui/spinner.tsx +22 -0
- package/bundles/nextjs-saas/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
- package/bundles/nextjs-saas/docs/rules/codex.md +62 -0
- package/bundles/nextjs-saas/eslint.config.mjs +16 -0
- package/bundles/nextjs-saas/instrumentation-client.ts +30 -0
- package/bundles/nextjs-saas/instrumentation.ts +12 -0
- package/bundles/nextjs-saas/jest.config.mjs +16 -0
- package/bundles/nextjs-saas/jest.setup.js +1 -0
- package/bundles/nextjs-saas/lib/auth/password-recovery.ts +94 -0
- package/bundles/nextjs-saas/lib/stripe.ts +10 -0
- package/bundles/nextjs-saas/lib/supabase/admin.ts +14 -0
- package/bundles/nextjs-saas/lib/supabase/client.ts +8 -0
- package/bundles/nextjs-saas/lib/supabase/server.ts +27 -0
- package/bundles/nextjs-saas/lib/utils.ts +6 -0
- package/bundles/nextjs-saas/next-env.d.ts +5 -0
- package/bundles/nextjs-saas/next.config.ts +15 -0
- package/bundles/nextjs-saas/package.json +50 -0
- package/bundles/nextjs-saas/postcss.config.mjs +7 -0
- package/bundles/nextjs-saas/prompts/01-feature-implementation.md +92 -0
- package/bundles/nextjs-saas/prompts/02-bug-fix.md +78 -0
- package/bundles/nextjs-saas/prompts/03-safe-refactor.md +82 -0
- package/bundles/nextjs-saas/prompts/04-test-first.md +80 -0
- package/bundles/nextjs-saas/prompts/05-ui-polish.md +82 -0
- package/bundles/nextjs-saas/prompts/06-security-review.md +74 -0
- package/bundles/nextjs-saas/proxy.ts +61 -0
- package/bundles/nextjs-saas/sentry.edge.config.ts +15 -0
- package/bundles/nextjs-saas/sentry.server.config.ts +15 -0
- package/bundles/nextjs-saas/supabase/migrations/001_initial_schema.sql +66 -0
- package/bundles/nextjs-saas/supabase/migrations/002_billing.sql +17 -0
- package/bundles/nextjs-saas/tsconfig.json +42 -0
- package/bundles/nextjs-saas/types/database.types.ts +76 -0
- package/bundles/nextjs-saas/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
- package/bundles/nextjs-trpc/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
- package/bundles/nextjs-trpc/.agents/skills/lattice-release-manager/SKILL.md +29 -0
- package/bundles/nextjs-trpc/.agents/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/nextjs-trpc/.claude/agents/lattice-feature-agent.md +10 -0
- package/bundles/nextjs-trpc/.claude/agents/lattice-release-manager.md +9 -0
- package/bundles/nextjs-trpc/.claude/hooks/README.md +9 -0
- package/bundles/nextjs-trpc/.claude/hooks/pre-commit-verify.mjs +10 -0
- package/bundles/nextjs-trpc/.claude/hooks/pre-tool-use.mjs +51 -0
- package/bundles/nextjs-trpc/.claude/rules/lattice-core.md +20 -0
- package/bundles/nextjs-trpc/.claude/settings.json +38 -0
- package/bundles/nextjs-trpc/.claude/skills/lattice-verify/SKILL.md +27 -0
- package/bundles/nextjs-trpc/.codex/agents/lattice-feature-agent.toml +9 -0
- package/bundles/nextjs-trpc/.codex/agents/lattice-release-manager.toml +9 -0
- package/bundles/nextjs-trpc/.cursor/mcp.json +34 -0
- package/bundles/nextjs-trpc/.cursor/rules/lattice-core.mdc +35 -0
- package/bundles/nextjs-trpc/.cursor/rules.md +95 -0
- package/bundles/nextjs-trpc/.env.example +21 -0
- package/bundles/nextjs-trpc/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- package/bundles/nextjs-trpc/.github/agents/lattice-feature-agent.agent.md +7 -0
- package/bundles/nextjs-trpc/.github/agents/lattice-release-manager.agent.md +7 -0
- package/bundles/nextjs-trpc/.github/copilot-instructions.md +37 -0
- package/bundles/nextjs-trpc/.github/instructions/lattice-core.instructions.md +11 -0
- package/bundles/nextjs-trpc/.github/workflows/ci.yml +26 -0
- package/bundles/nextjs-trpc/.gitmessage +24 -0
- package/bundles/nextjs-trpc/.lattice/config.json +9 -0
- package/bundles/nextjs-trpc/.lattice/dependency-security.json +46 -0
- package/bundles/nextjs-trpc/.lattice/prompts/01-feature.md +36 -0
- package/bundles/nextjs-trpc/.lattice/prompts/02-bugfix.md +32 -0
- package/bundles/nextjs-trpc/.lattice/prompts/03-refactor.md +30 -0
- package/bundles/nextjs-trpc/.lattice/prompts/04-test.md +31 -0
- package/bundles/nextjs-trpc/.lattice/prompts/05-polish.md +38 -0
- package/bundles/nextjs-trpc/.lattice/prompts/06-security.md +32 -0
- package/bundles/nextjs-trpc/.lattice/release-workflow.json +55 -0
- package/bundles/nextjs-trpc/.lattice/schemas/feature-handoff.schema.json +264 -0
- package/bundles/nextjs-trpc/.lattice/templates/feature-handoff.json +52 -0
- package/bundles/nextjs-trpc/.mcp.json +35 -0
- package/bundles/nextjs-trpc/AGENTS.md +58 -0
- package/bundles/nextjs-trpc/CLAUDE.md +76 -0
- package/bundles/nextjs-trpc/PROJECT_GUIDE.md +187 -0
- package/bundles/nextjs-trpc/README.md +49 -0
- package/bundles/nextjs-trpc/app/api/trpc/[trpc]/route.ts +12 -0
- package/bundles/nextjs-trpc/app/global-error.tsx +17 -0
- package/bundles/nextjs-trpc/app/globals.css +55 -0
- package/bundles/nextjs-trpc/app/layout.tsx +19 -0
- package/bundles/nextjs-trpc/app/page.tsx +16 -0
- package/bundles/nextjs-trpc/app/providers.tsx +24 -0
- package/bundles/nextjs-trpc/components/ui/button.tsx +39 -0
- package/bundles/nextjs-trpc/components/ui/card.tsx +53 -0
- package/bundles/nextjs-trpc/components/ui/index.ts +4 -0
- package/bundles/nextjs-trpc/components/ui/input.tsx +23 -0
- package/bundles/nextjs-trpc/components/ui/spinner.tsx +22 -0
- package/bundles/nextjs-trpc/components/user-list.tsx +17 -0
- package/bundles/nextjs-trpc/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
- package/bundles/nextjs-trpc/docs/rules/codex.md +62 -0
- package/bundles/nextjs-trpc/eslint.config.mjs +16 -0
- package/bundles/nextjs-trpc/instrumentation-client.ts +20 -0
- package/bundles/nextjs-trpc/instrumentation.ts +12 -0
- package/bundles/nextjs-trpc/jest.config.mjs +16 -0
- package/bundles/nextjs-trpc/jest.setup.js +1 -0
- package/bundles/nextjs-trpc/lib/db.ts +17 -0
- package/bundles/nextjs-trpc/lib/trpc/react.tsx +7 -0
- package/bundles/nextjs-trpc/lib/utils.ts +6 -0
- package/bundles/nextjs-trpc/next-env.d.ts +5 -0
- package/bundles/nextjs-trpc/next.config.ts +15 -0
- package/bundles/nextjs-trpc/package.json +62 -0
- package/bundles/nextjs-trpc/postcss.config.mjs +7 -0
- package/bundles/nextjs-trpc/prisma/schema.prisma +41 -0
- package/bundles/nextjs-trpc/prisma.config.ts +10 -0
- package/bundles/nextjs-trpc/prompts/01-feature-implementation.md +9 -0
- package/bundles/nextjs-trpc/prompts/02-bug-fix.md +9 -0
- package/bundles/nextjs-trpc/prompts/03-safe-refactor.md +8 -0
- package/bundles/nextjs-trpc/prompts/04-test-first.md +8 -0
- package/bundles/nextjs-trpc/prompts/05-ui-polish.md +7 -0
- package/bundles/nextjs-trpc/prompts/06-security-review.md +7 -0
- package/bundles/nextjs-trpc/prompts/quality.md +269 -0
- package/bundles/nextjs-trpc/sentry.edge.config.ts +15 -0
- package/bundles/nextjs-trpc/sentry.server.config.ts +15 -0
- package/bundles/nextjs-trpc/server/routers/_app.test.ts +60 -0
- package/bundles/nextjs-trpc/server/routers/_app.ts +25 -0
- package/bundles/nextjs-trpc/server/trpc.ts +12 -0
- package/bundles/nextjs-trpc/tsconfig.json +42 -0
- package/bundles/nextjs-trpc/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
- package/dist/agent-install-session.d.ts +17 -0
- package/dist/agent-install-session.d.ts.map +1 -0
- package/dist/agent-install-session.js +106 -0
- package/dist/agent-install-session.js.map +1 -0
- package/dist/agent-install-session.test.d.ts +2 -0
- package/dist/agent-install-session.test.d.ts.map +1 -0
- package/dist/agent-install-session.test.js +62 -0
- package/dist/agent-install-session.test.js.map +1 -0
- package/dist/agent-install.d.ts +41 -0
- package/dist/agent-install.d.ts.map +1 -0
- package/dist/agent-install.js +42 -0
- package/dist/agent-install.js.map +1 -0
- package/dist/agent-install.test.d.ts +2 -0
- package/dist/agent-install.test.d.ts.map +1 -0
- package/dist/agent-install.test.js +58 -0
- package/dist/agent-install.test.js.map +1 -0
- package/dist/apply-merge.test.d.ts +2 -0
- package/dist/apply-merge.test.d.ts.map +1 -0
- package/dist/apply-merge.test.js +123 -0
- package/dist/apply-merge.test.js.map +1 -0
- package/dist/bundle-download.d.ts +23 -0
- package/dist/bundle-download.d.ts.map +1 -0
- package/dist/bundle-download.js +180 -0
- package/dist/bundle-download.js.map +1 -0
- package/dist/bundle-download.test.d.ts +2 -0
- package/dist/bundle-download.test.d.ts.map +1 -0
- package/dist/bundle-download.test.js +200 -0
- package/dist/bundle-download.test.js.map +1 -0
- package/dist/bundle-rollback.test.d.ts +2 -0
- package/dist/bundle-rollback.test.d.ts.map +1 -0
- package/dist/bundle-rollback.test.js +127 -0
- package/dist/bundle-rollback.test.js.map +1 -0
- package/dist/bundle-scaffold.test.d.ts +2 -0
- package/dist/bundle-scaffold.test.d.ts.map +1 -0
- package/dist/bundle-scaffold.test.js +105 -0
- package/dist/bundle-scaffold.test.js.map +1 -0
- package/dist/commands.d.ts +132 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +2012 -0
- package/dist/commands.js.map +1 -0
- package/dist/credential-store.d.ts +27 -0
- package/dist/credential-store.d.ts.map +1 -0
- package/dist/credential-store.js +48 -0
- package/dist/credential-store.js.map +1 -0
- package/dist/credential-store.test.d.ts +2 -0
- package/dist/credential-store.test.d.ts.map +1 -0
- package/dist/credential-store.test.js +80 -0
- package/dist/credential-store.test.js.map +1 -0
- package/dist/delivered-project-files.d.ts +31 -0
- package/dist/delivered-project-files.d.ts.map +1 -0
- package/dist/delivered-project-files.js +158 -0
- package/dist/delivered-project-files.js.map +1 -0
- package/dist/delivered-project-files.test.d.ts +2 -0
- package/dist/delivered-project-files.test.d.ts.map +1 -0
- package/dist/delivered-project-files.test.js +107 -0
- package/dist/delivered-project-files.test.js.map +1 -0
- package/dist/doctor-agents.test.d.ts +2 -0
- package/dist/doctor-agents.test.d.ts.map +1 -0
- package/dist/doctor-agents.test.js +65 -0
- package/dist/doctor-agents.test.js.map +1 -0
- package/dist/hermes-install.d.ts +102 -0
- package/dist/hermes-install.d.ts.map +1 -0
- package/dist/hermes-install.js +641 -0
- package/dist/hermes-install.js.map +1 -0
- package/dist/hermes-install.test.d.ts +2 -0
- package/dist/hermes-install.test.d.ts.map +1 -0
- package/dist/hermes-install.test.js +866 -0
- package/dist/hermes-install.test.js.map +1 -0
- package/dist/index.d.ts +115 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5311 -0
- package/dist/index.js.map +1 -0
- package/dist/openclaw-install.d.ts +67 -0
- package/dist/openclaw-install.d.ts.map +1 -0
- package/dist/openclaw-install.js +358 -0
- package/dist/openclaw-install.js.map +1 -0
- package/dist/openclaw-install.test.d.ts +2 -0
- package/dist/openclaw-install.test.d.ts.map +1 -0
- package/dist/openclaw-install.test.js +296 -0
- package/dist/openclaw-install.test.js.map +1 -0
- package/dist/password-recovery-bundle.test.d.ts +2 -0
- package/dist/password-recovery-bundle.test.d.ts.map +1 -0
- package/dist/password-recovery-bundle.test.js +132 -0
- package/dist/password-recovery-bundle.test.js.map +1 -0
- package/dist/project-bundle-env.d.ts +19 -0
- package/dist/project-bundle-env.d.ts.map +1 -0
- package/dist/project-bundle-env.js +111 -0
- package/dist/project-bundle-env.js.map +1 -0
- package/dist/project-bundle-env.test.d.ts +2 -0
- package/dist/project-bundle-env.test.d.ts.map +1 -0
- package/dist/project-bundle-env.test.js +93 -0
- package/dist/project-bundle-env.test.js.map +1 -0
- package/dist/project-path-confinement.test.d.ts +2 -0
- package/dist/project-path-confinement.test.d.ts.map +1 -0
- package/dist/project-path-confinement.test.js +222 -0
- package/dist/project-path-confinement.test.js.map +1 -0
- package/dist/security/api.d.ts +18 -0
- package/dist/security/api.d.ts.map +1 -0
- package/dist/security/api.js +238 -0
- package/dist/security/api.js.map +1 -0
- package/dist/security/api.test.d.ts +2 -0
- package/dist/security/api.test.d.ts.map +1 -0
- package/dist/security/api.test.js +220 -0
- package/dist/security/api.test.js.map +1 -0
- package/dist/security/artifact.d.ts +10 -0
- package/dist/security/artifact.d.ts.map +1 -0
- package/dist/security/artifact.js +283 -0
- package/dist/security/artifact.js.map +1 -0
- package/dist/security/artifact.test.d.ts +2 -0
- package/dist/security/artifact.test.d.ts.map +1 -0
- package/dist/security/artifact.test.js +229 -0
- package/dist/security/artifact.test.js.map +1 -0
- package/dist/security/commands.d.ts +42 -0
- package/dist/security/commands.d.ts.map +1 -0
- package/dist/security/commands.js +825 -0
- package/dist/security/commands.js.map +1 -0
- package/dist/security/commands.test.d.ts +2 -0
- package/dist/security/commands.test.d.ts.map +1 -0
- package/dist/security/commands.test.js +1051 -0
- package/dist/security/commands.test.js.map +1 -0
- package/dist/security/connection.d.ts +19 -0
- package/dist/security/connection.d.ts.map +1 -0
- package/dist/security/connection.js +145 -0
- package/dist/security/connection.js.map +1 -0
- package/dist/security/connection.test.d.ts +2 -0
- package/dist/security/connection.test.d.ts.map +1 -0
- package/dist/security/connection.test.js +62 -0
- package/dist/security/connection.test.js.map +1 -0
- package/dist/security/index-routing.test.d.ts +2 -0
- package/dist/security/index-routing.test.d.ts.map +1 -0
- package/dist/security/index-routing.test.js +169 -0
- package/dist/security/index-routing.test.js.map +1 -0
- package/dist/security/journal.d.ts +26 -0
- package/dist/security/journal.d.ts.map +1 -0
- package/dist/security/journal.js +441 -0
- package/dist/security/journal.js.map +1 -0
- package/dist/security/journal.test.d.ts +2 -0
- package/dist/security/journal.test.d.ts.map +1 -0
- package/dist/security/journal.test.js +226 -0
- package/dist/security/journal.test.js.map +1 -0
- package/dist/security/package-verifier.d.ts +15 -0
- package/dist/security/package-verifier.d.ts.map +1 -0
- package/dist/security/package-verifier.js +65 -0
- package/dist/security/package-verifier.js.map +1 -0
- package/dist/security/package-verifier.test.d.ts +2 -0
- package/dist/security/package-verifier.test.d.ts.map +1 -0
- package/dist/security/package-verifier.test.js +57 -0
- package/dist/security/package-verifier.test.js.map +1 -0
- package/dist/security/runtime.d.ts +43 -0
- package/dist/security/runtime.d.ts.map +1 -0
- package/dist/security/runtime.js +81 -0
- package/dist/security/runtime.js.map +1 -0
- package/dist/security/runtime.test.d.ts +2 -0
- package/dist/security/runtime.test.d.ts.map +1 -0
- package/dist/security/runtime.test.js +88 -0
- package/dist/security/runtime.test.js.map +1 -0
- package/dist/security/types.d.ts +169 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/security/types.js +3 -0
- package/dist/security/types.js.map +1 -0
- package/dist/security-runtime/LICENSE +202 -0
- package/dist/security-runtime/NOTICE +16 -0
- package/dist/security-runtime/artifact-manifest.json +960 -0
- package/dist/security-runtime/bin/vsg.mjs +5 -0
- package/dist/security-runtime/lattice-catalog.json +176585 -0
- package/dist/security-runtime/lattice-runtime.mjs +90 -0
- package/dist/security-runtime/licensing/candidates/apache-source-license-evidence.json +478 -0
- package/dist/security-runtime/licensing/candidates/betterleaks-generic-api-key.json +76 -0
- package/dist/security-runtime/licensing/candidates/betterleaks-jwt.json +74 -0
- package/dist/security-runtime/licensing/candidates/blackberry-additional-source-declaration-evidence.json +276 -0
- package/dist/security-runtime/licensing/candidates/blackberry-source-declaration-evidence.json +369 -0
- package/dist/security-runtime/licensing/candidates/cado-source-declaration-evidence.json +283 -0
- package/dist/security-runtime/licensing/candidates/commercial-rule-candidate.json +280 -0
- package/dist/security-runtime/licensing/candidates/commercial-runtime-release.json +389 -0
- package/dist/security-runtime/licensing/candidates/data-feed-evidence.json +259 -0
- package/dist/security-runtime/licensing/candidates/gitlab-sast-rule-identities.json +178 -0
- package/dist/security-runtime/licensing/candidates/gitlab-sast-source-evidence.json +1824 -0
- package/dist/security-runtime/licensing/candidates/gitlab-sast-source-notice-bundle.json +45 -0
- package/dist/security-runtime/licensing/candidates/malpedia-source-license-evidence.json +41 -0
- package/dist/security-runtime/licensing/candidates/rule-license-evidence.json +376 -0
- package/dist/security-runtime/licensing/candidates/runner-image-composition.json +1500 -0
- package/dist/security-runtime/licensing/candidates/selected-runtime-coverage.json +91 -0
- package/dist/security-runtime/licensing/candidates/yara-forge-20260927.json +58502 -0
- package/dist/security-runtime/licensing/commercial-components.json +379 -0
- package/dist/security-runtime/licensing/notices/betterleaks-1.9.0-MIT.txt +21 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/28a9529c7d0bb4dc51f4bf5c116a3d16ef247a052f7591466768ddf563fd1cf5.txt +428 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/33acf42afdd03163d75fe856cb431e70710e0b5deede3362e6d1c4697cfe1c6a.txt +28 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986.txt +674 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/4fecb8fcaf80fd9a6315bca5225ee43377015b46a0459c2925495be885cab19a.txt +21 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/811515f8723aa4007de2fbb75a364127fdec51cda534b87a7ea8f2fef2f96dd7.txt +24 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/814442c3987a2c0411171ad8ad43118e8c08f85c9c5d1dcdecc9787c7ca8689b.txt +664 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/8a959b2413d0c83ca1b3ce9153076c649abf2e4bbfebbb493fb24c2074a1eb8a.txt +38 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/995182e185856186fbbe49f150409ae026aa4cda7e94f83c6ed737cbb77fa9c7.txt +23 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/9b8e1305e46d1dd4011b6ed933c9f6223e08c9c4625001c5fd75a34fa930f616.txt +202 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/a01f1a28424bfe7f49a23d339a01847cfa9ace3864d5e7295051772a4bae2271.txt +38 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/a5681bf9b05db14d86776930017c647ad9e6e56ff6bbcfdf21e5848288dfaf1b.txt +165 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/a5b8bd9ae96c630bbf229d61c5c5def20274e00be39abfd2fab4d7879ceab462.txt +24 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/ada32b3747ce108d5e8bab7918af94abbd03f2fe2a46304f74c6333bbfd914ed.txt +8 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4.txt +201 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/c738ae413cf561f174e34f6961f8ca458aae2369a73640dda6234c629b98bcc4.txt +2732 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/ce41c9a2c986277f7f9ab146a2195c1888a5d8da062e22d7c9c88666bb7c38cd.txt +17 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/d5f4c36a0528e01cfdd9e4fc60879201d3af49b41c520200643d321fe53da5f9.txt +17 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/e08c368ccd455f85c7fb9e04830e730f26e9dbb5c0f77bc88e09a5b0cb37df5b.txt +38 -0
- package/dist/security-runtime/licensing/notices/candidate-sources/sha256/e9efb2f7daf11bb6379c06c16b870dddcecc4a10f8704bb8aad807529c8b3c97.txt +8 -0
- package/dist/security-runtime/licensing/notices/gitleaks-generic-origin-782f3104-MIT.txt +21 -0
- package/dist/security-runtime/package.json +17 -0
- package/dist/security-runtime/playbook/README.md +76 -0
- package/dist/security-runtime/playbook/access-control.md +56 -0
- package/dist/security-runtime/playbook/ai-features.md +53 -0
- package/dist/security-runtime/playbook/desktop-python.md +59 -0
- package/dist/security-runtime/playbook/input-handling.md +59 -0
- package/dist/security-runtime/playbook/mobile-expo.md +59 -0
- package/dist/security-runtime/playbook/payments.md +53 -0
- package/dist/security-runtime/playbook/privacy-account-recovery.md +59 -0
- package/dist/security-runtime/playbook/secrets-config.md +47 -0
- package/dist/security-runtime/playbook/supabase.md +48 -0
- package/dist/security-runtime/playbook/supply-chain.md +62 -0
- package/dist/security-runtime/playbook/webhooks-integrations.md +52 -0
- package/dist/security-runtime/rules/vsg-ai-key-in-client.yaml +41 -0
- package/dist/security-runtime/rules/vsg-ai-output-raw-html.yaml +35 -0
- package/dist/security-runtime/rules/vsg-angular-sanitizer-bypass.yaml +23 -0
- package/dist/security-runtime/rules/vsg-expo-token-in-asyncstorage.yaml +22 -0
- package/dist/security-runtime/rules/vsg-flask-public-bind.yaml +32 -0
- package/dist/security-runtime/rules/vsg-nextjs-action-write-no-auth.yaml +144 -0
- package/dist/security-runtime/rules/vsg-nextjs-inline-action-write-no-auth.yaml +161 -0
- package/dist/security-runtime/rules/vsg-nextjs-route-write-no-auth.yaml +193 -0
- package/dist/security-runtime/rules/vsg-nosql-where-injection.yaml +36 -0
- package/dist/security-runtime/rules/vsg-python-pickle-load.yaml +26 -0
- package/dist/security-runtime/rules/vsg-python-requests-verify-false.yaml +34 -0
- package/dist/security-runtime/rules/vsg-python-subprocess-shell.yaml +23 -0
- package/dist/security-runtime/rules/vsg-stripe-client-price.yaml +51 -0
- package/dist/security-runtime/rules/vsg-stripe-webhook-no-signature.yaml +31 -0
- package/dist/security-runtime/rules/vsg-stripe-webhook-pages-no-signature.yaml +51 -0
- package/dist/security-runtime/rules/vsg-supabase-service-role-in-client.yaml +27 -0
- package/dist/security-runtime/rules/vsg-supabase-service-role-public-env.yaml +24 -0
- package/dist/security-runtime/rules/vsg-xml-external-entities.yaml +19 -0
- package/dist/security-runtime/src/agent/brief.mjs +95 -0
- package/dist/security-runtime/src/agent/discover.mjs +108 -0
- package/dist/security-runtime/src/agent/exec.mjs +64 -0
- package/dist/security-runtime/src/agent/ingest.mjs +213 -0
- package/dist/security-runtime/src/agent/report.mjs +94 -0
- package/dist/security-runtime/src/agent/schema.mjs +62 -0
- package/dist/security-runtime/src/agent/tokenize.mjs +38 -0
- package/dist/security-runtime/src/checks/README.md +8 -0
- package/dist/security-runtime/src/checks/_lib/gitfiles.mjs +35 -0
- package/dist/security-runtime/src/checks/_lib/lockfiles.mjs +135 -0
- package/dist/security-runtime/src/checks/_lib/osv.mjs +6 -0
- package/dist/security-runtime/src/checks/_lib/secrets.mjs +381 -0
- package/dist/security-runtime/src/checks/_lib/targets.mjs +79 -0
- package/dist/security-runtime/src/checks/agent-review/index.mjs +52 -0
- package/dist/security-runtime/src/checks/agent-surface/config.mjs +223 -0
- package/dist/security-runtime/src/checks/agent-surface/index.mjs +113 -0
- package/dist/security-runtime/src/checks/agent-surface/instructions.mjs +87 -0
- package/dist/security-runtime/src/checks/agent-surface/patterns.mjs +68 -0
- package/dist/security-runtime/src/checks/agent-surface/unicode.mjs +88 -0
- package/dist/security-runtime/src/checks/code/auth-helpers.mjs +659 -0
- package/dist/security-runtime/src/checks/code/index.mjs +617 -0
- package/dist/security-runtime/src/checks/code/opengrep-container.mjs +85 -0
- package/dist/security-runtime/src/checks/code/opengrep-runner.mjs +86 -0
- package/dist/security-runtime/src/checks/code/selected-opengrep-runner.mjs +112 -0
- package/dist/security-runtime/src/checks/dep-change/guarddog.mjs +142 -0
- package/dist/security-runtime/src/checks/dep-change/index.mjs +316 -0
- package/dist/security-runtime/src/checks/dep-change/registries.mjs +199 -0
- package/dist/security-runtime/src/checks/deps-vuln/index.mjs +305 -0
- package/dist/security-runtime/src/checks/desktop-config/index.mjs +112 -0
- package/dist/security-runtime/src/checks/dns-mail/index.mjs +71 -0
- package/dist/security-runtime/src/checks/iac/index.mjs +83 -0
- package/dist/security-runtime/src/checks/install-posture/index.mjs +123 -0
- package/dist/security-runtime/src/checks/licenses/index.mjs +143 -0
- package/dist/security-runtime/src/checks/live-basic/index.mjs +77 -0
- package/dist/security-runtime/src/checks/live-js-secrets/index.mjs +100 -0
- package/dist/security-runtime/src/checks/malware/clamav.mjs +17 -0
- package/dist/security-runtime/src/checks/malware/defender.mjs +43 -0
- package/dist/security-runtime/src/checks/malware/index.mjs +186 -0
- package/dist/security-runtime/src/checks/malware/targets.mjs +147 -0
- package/dist/security-runtime/src/checks/malware/yara-runner.mjs +201 -0
- package/dist/security-runtime/src/checks/malware/yara.mjs +124 -0
- package/dist/security-runtime/src/checks/mobile-config/index.mjs +173 -0
- package/dist/security-runtime/src/checks/mobile-config/mobsf.mjs +105 -0
- package/dist/security-runtime/src/checks/posture/index.mjs +133 -0
- package/dist/security-runtime/src/checks/project-scripts/index.mjs +187 -0
- package/dist/security-runtime/src/checks/sbom/index.mjs +98 -0
- package/dist/security-runtime/src/checks/secrets-build/index.mjs +63 -0
- package/dist/security-runtime/src/checks/secrets-history/index.mjs +112 -0
- package/dist/security-runtime/src/checks/secrets-tree/env.mjs +120 -0
- package/dist/security-runtime/src/checks/secrets-tree/index.mjs +73 -0
- package/dist/security-runtime/src/checks/supabase-static/index.mjs +240 -0
- package/dist/security-runtime/src/checks/supabase-static/sql.mjs +557 -0
- package/dist/security-runtime/src/checks/workflows/index.mjs +93 -0
- package/dist/security-runtime/src/cli/deep.mjs +13 -0
- package/dist/security-runtime/src/cli/doctor.mjs +82 -0
- package/dist/security-runtime/src/cli/index.mjs +60 -0
- package/dist/security-runtime/src/cli/live-common.mjs +27 -0
- package/dist/security-runtime/src/cli/parse.mjs +56 -0
- package/dist/security-runtime/src/cli/portfolio.mjs +34 -0
- package/dist/security-runtime/src/cli/release.mjs +28 -0
- package/dist/security-runtime/src/cli/report.mjs +18 -0
- package/dist/security-runtime/src/cli/run-common.mjs +54 -0
- package/dist/security-runtime/src/cli/scan.mjs +12 -0
- package/dist/security-runtime/src/cli/setup.mjs +59 -0
- package/dist/security-runtime/src/cli/url.mjs +38 -0
- package/dist/security-runtime/src/core/accept.mjs +141 -0
- package/dist/security-runtime/src/core/archive.mjs +114 -0
- package/dist/security-runtime/src/core/base-ref.mjs +43 -0
- package/dist/security-runtime/src/core/checks.mjs +39 -0
- package/dist/security-runtime/src/core/detect.mjs +90 -0
- package/dist/security-runtime/src/core/errors.mjs +5 -0
- package/dist/security-runtime/src/core/fetch.mjs +139 -0
- package/dist/security-runtime/src/core/findings.mjs +177 -0
- package/dist/security-runtime/src/core/gate.mjs +131 -0
- package/dist/security-runtime/src/core/installer.mjs +255 -0
- package/dist/security-runtime/src/core/lock.mjs +38 -0
- package/dist/security-runtime/src/core/nested.mjs +107 -0
- package/dist/security-runtime/src/core/paths.mjs +20 -0
- package/dist/security-runtime/src/core/pipeline.mjs +196 -0
- package/dist/security-runtime/src/core/registry.mjs +81 -0
- package/dist/security-runtime/src/core/report.mjs +128 -0
- package/dist/security-runtime/src/core/runner.mjs +86 -0
- package/dist/security-runtime/src/core/sarif.mjs +141 -0
- package/dist/security-runtime/src/lattice/artifact.mjs +1201 -0
- package/dist/security-runtime/src/lattice/execution.mjs +45 -0
- package/dist/security-runtime/src/lattice/export.mjs +215 -0
- package/dist/security-runtime/src/lattice/provenance.mjs +70 -0
- package/dist/security-runtime/src/lattice/runtime.mjs +158 -0
- package/dist/security-runtime/src/lattice/selected-runtime.mjs +189 -0
- package/dist/security-runtime/src/lattice/source-acquirer.mjs +51 -0
- package/dist/security-runtime/src/lattice/source-fetcher.mjs +88 -0
- package/dist/security-runtime/src/lattice/transport.mjs +232 -0
- package/dist/security-runtime/src/live/analyze.mjs +101 -0
- package/dist/security-runtime/src/live/exposure.mjs +79 -0
- package/dist/security-runtime/src/live/secrets.mjs +31 -0
- package/dist/security-runtime/src/live/session.mjs +98 -0
- package/dist/security-runtime/src/live/targets.mjs +81 -0
- package/dist/security-runtime/src/portfolio/index.mjs +116 -0
- package/dist/security-runtime/tools/registry/betterleaks.json +29 -0
- package/dist/security-runtime/tools/registry/guarddog.json +9 -0
- package/dist/security-runtime/tools/registry/mobsf.json +10 -0
- package/dist/security-runtime/tools/registry/opengrep.json +28 -0
- package/dist/security-runtime/tools/registry/osv-scanner.json +14 -0
- package/dist/security-runtime/tools/registry/semgrep-rules.json +21 -0
- package/dist/security-runtime/tools/registry/trivy.json +30 -0
- package/dist/security-runtime/tools/registry/yara-forge-exclusions.json +14 -0
- package/dist/security-runtime/tools/registry/yara-forge.json +22 -0
- package/dist/security-runtime/tools/registry/yara-runner.json +10 -0
- package/dist/security-runtime/tools/registry/yara-x.json +24 -0
- package/dist/security-runtime/tools/registry/zizmor.json +30 -0
- package/dist/spinner.d.ts +16 -0
- package/dist/spinner.d.ts.map +1 -0
- package/dist/spinner.js +72 -0
- package/dist/spinner.js.map +1 -0
- package/dist/verify.test.d.ts +2 -0
- package/dist/verify.test.d.ts.map +1 -0
- package/dist/verify.test.js +98 -0
- package/dist/verify.test.js.map +1 -0
- package/package.json +73 -4
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const os_1 = require("os");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const node_test_1 = __importDefault(require("node:test"));
|
|
10
|
+
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
11
|
+
const index_1 = require("./index");
|
|
12
|
+
const originalLog = console.log;
|
|
13
|
+
const originalError = console.error;
|
|
14
|
+
function suppressConsole() {
|
|
15
|
+
console.log = () => { };
|
|
16
|
+
console.error = () => { };
|
|
17
|
+
}
|
|
18
|
+
function restoreConsole() {
|
|
19
|
+
console.log = originalLog;
|
|
20
|
+
console.error = originalError;
|
|
21
|
+
}
|
|
22
|
+
function createTempRepo(projectType = 'nextjs', strictnessPreset = 'startup') {
|
|
23
|
+
const dir = (0, fs_1.mkdtempSync)((0, path_1.join)((0, os_1.tmpdir)(), `lattice-apply-${projectType}-`));
|
|
24
|
+
const latticeDir = (0, path_1.join)(dir, '.lattice');
|
|
25
|
+
(0, fs_1.mkdirSync)(latticeDir, { recursive: true });
|
|
26
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(latticeDir, 'config.json'), JSON.stringify({
|
|
27
|
+
projectType,
|
|
28
|
+
strictnessPreset,
|
|
29
|
+
}, null, 2));
|
|
30
|
+
return dir;
|
|
31
|
+
}
|
|
32
|
+
async function withTempRepo(fn, projectType = 'nextjs', strictnessPreset = 'startup') {
|
|
33
|
+
const dir = createTempRepo(projectType, strictnessPreset);
|
|
34
|
+
const previousCwd = process.cwd();
|
|
35
|
+
suppressConsole();
|
|
36
|
+
process.chdir(dir);
|
|
37
|
+
try {
|
|
38
|
+
await fn(dir);
|
|
39
|
+
}
|
|
40
|
+
finally {
|
|
41
|
+
process.chdir(previousCwd);
|
|
42
|
+
restoreConsole();
|
|
43
|
+
(0, fs_1.rmSync)(dir, { recursive: true, force: true });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
(0, node_test_1.default)('update/apply preserves user content around generated instruction files', async () => {
|
|
47
|
+
await withTempRepo(async (dir) => {
|
|
48
|
+
await (0, index_1.generate)('.lattice/pack');
|
|
49
|
+
await (0, index_1.apply)('.lattice/pack', '.');
|
|
50
|
+
const filesToCustomize = [
|
|
51
|
+
'AGENTS.md',
|
|
52
|
+
'CLAUDE.md',
|
|
53
|
+
'docs/rules/codex.md',
|
|
54
|
+
'.cursor/rules.md',
|
|
55
|
+
'.github/copilot-instructions.md',
|
|
56
|
+
'.github/instructions/lattice-core.instructions.md',
|
|
57
|
+
];
|
|
58
|
+
for (const file of filesToCustomize) {
|
|
59
|
+
const filePath = (0, path_1.join)(dir, file);
|
|
60
|
+
const current = (0, fs_1.readFileSync)(filePath, 'utf-8');
|
|
61
|
+
(0, fs_1.writeFileSync)(filePath, `# Team note for ${file}\n\n${current}\n\n# Footer note for ${file}\n`, 'utf-8');
|
|
62
|
+
}
|
|
63
|
+
await (0, index_1.generate)('.lattice/pack-refresh');
|
|
64
|
+
await (0, index_1.apply)('.lattice/pack-refresh', '.');
|
|
65
|
+
for (const file of filesToCustomize) {
|
|
66
|
+
const refreshed = (0, fs_1.readFileSync)((0, path_1.join)(dir, file), 'utf-8');
|
|
67
|
+
strict_1.default.match(refreshed, new RegExp(`# Team note for ${file.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`));
|
|
68
|
+
strict_1.default.match(refreshed, new RegExp(`# Footer note for ${file.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`));
|
|
69
|
+
strict_1.default.equal((refreshed.match(/\x3c!-- LATTICE:START/g) || []).length, 1);
|
|
70
|
+
strict_1.default.equal((refreshed.match(/\x3c!-- LATTICE:END -->/g) || []).length, 1);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
(0, node_test_1.default)('update/apply backs up user-authored instruction files without markers', async () => {
|
|
75
|
+
await withTempRepo(async (dir) => {
|
|
76
|
+
await (0, index_1.generate)('.lattice/pack');
|
|
77
|
+
const customFiles = [
|
|
78
|
+
['AGENTS.md', '# My hand-written agents file\n'],
|
|
79
|
+
['CLAUDE.md', '# My hand-written claude file\n'],
|
|
80
|
+
['docs/rules/codex.md', '# My hand-written codex file\n'],
|
|
81
|
+
['.cursor/rules.md', '# My hand-written cursor rules\n'],
|
|
82
|
+
['.github/copilot-instructions.md', '# My hand-written copilot instructions\n'],
|
|
83
|
+
['.github/instructions/lattice-core.instructions.md', '---\napplyTo: "**/*.ts"\n---\n# My hand-written path instructions\n'],
|
|
84
|
+
];
|
|
85
|
+
for (const [file, content] of customFiles) {
|
|
86
|
+
const filePath = (0, path_1.join)(dir, file);
|
|
87
|
+
(0, fs_1.mkdirSync)((0, path_1.dirname)(filePath), { recursive: true });
|
|
88
|
+
(0, fs_1.writeFileSync)(filePath, content, 'utf-8');
|
|
89
|
+
}
|
|
90
|
+
await (0, index_1.apply)('.lattice/pack', '.');
|
|
91
|
+
for (const [file, content] of customFiles) {
|
|
92
|
+
const filePath = (0, path_1.join)(dir, file);
|
|
93
|
+
const backupPath = `${filePath}.user-backup`;
|
|
94
|
+
strict_1.default.equal((0, fs_1.existsSync)(backupPath), true);
|
|
95
|
+
strict_1.default.equal((0, fs_1.readFileSync)(backupPath, 'utf-8'), content);
|
|
96
|
+
strict_1.default.match((0, fs_1.readFileSync)(filePath, 'utf-8'), /\x3c!-- LATTICE:START/);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
(0, node_test_1.default)('update/apply migrates lattice-managed expo audit scripts without clobbering custom commands', async () => {
|
|
101
|
+
await withTempRepo(async (dir) => {
|
|
102
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(dir, 'package.json'), JSON.stringify({
|
|
103
|
+
name: 'temp-expo-repo',
|
|
104
|
+
private: true,
|
|
105
|
+
scripts: {
|
|
106
|
+
audit: 'npm audit --audit-level=moderate',
|
|
107
|
+
lint: 'eslint .',
|
|
108
|
+
},
|
|
109
|
+
}, null, 2) + '\n', 'utf-8');
|
|
110
|
+
await (0, index_1.generate)('.lattice/pack');
|
|
111
|
+
await (0, index_1.apply)('.lattice/pack', '.');
|
|
112
|
+
const migrated = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(dir, 'package.json'), 'utf-8'));
|
|
113
|
+
strict_1.default.equal(migrated.scripts.audit, 'npm audit --audit-level=high');
|
|
114
|
+
strict_1.default.equal(migrated.scripts.lint, 'eslint .');
|
|
115
|
+
migrated.scripts.audit = 'pnpm audit --audit-level=critical';
|
|
116
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(dir, 'package.json'), JSON.stringify(migrated, null, 2) + '\n', 'utf-8');
|
|
117
|
+
await (0, index_1.generate)('.lattice/pack-refresh');
|
|
118
|
+
await (0, index_1.apply)('.lattice/pack-refresh', '.');
|
|
119
|
+
const preserved = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(dir, 'package.json'), 'utf-8'));
|
|
120
|
+
strict_1.default.equal(preserved.scripts.audit, 'pnpm audit --audit-level=critical');
|
|
121
|
+
}, 'expo-eas', 'enterprise');
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=apply-merge.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-merge.test.js","sourceRoot":"","sources":["../src/apply-merge.test.ts"],"names":[],"mappings":";;;;;AAAA,2BAA6F;AAC7F,2BAA4B;AAC5B,+BAAqC;AACrC,0DAA6B;AAC7B,gEAAwC;AACxC,mCAA0C;AAE1C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;AAChC,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;AAEpC,SAAS,eAAe;IACtB,OAAO,CAAC,GAAG,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;IACvB,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,CAAC,GAAG,GAAG,WAAW,CAAC;IAC1B,OAAO,CAAC,KAAK,GAAG,aAAa,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CACrB,cAAqC,QAAQ,EAC7C,mBAAqD,SAAS;IAE9D,MAAM,GAAG,GAAG,IAAA,gBAAW,EAAC,IAAA,WAAI,EAAC,IAAA,WAAM,GAAE,EAAE,iBAAiB,WAAW,GAAG,CAAC,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IACzC,IAAA,cAAS,EAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,IAAA,kBAAa,EACX,IAAA,WAAI,EAAC,UAAU,EAAE,aAAa,CAAC,EAC/B,IAAI,CAAC,SAAS,CACZ;QACE,WAAW;QACX,gBAAgB;KACjB,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC;AAED,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,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ClientRequest, IncomingMessage } from 'node:http';
|
|
2
|
+
export interface BundleManifest {
|
|
3
|
+
version: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
config: {
|
|
7
|
+
projectType: 'nextjs' | 'expo-eas';
|
|
8
|
+
strictnessPreset: 'startup' | 'pro' | 'enterprise';
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
files: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
export type BundleRequester = (url: URL, onResponse: (response: IncomingMessage) => void) => ClientRequest;
|
|
14
|
+
export interface BundleDownloadOptions {
|
|
15
|
+
requester?: BundleRequester;
|
|
16
|
+
maxRedirects?: number;
|
|
17
|
+
maxResponseBytes?: number;
|
|
18
|
+
timeoutMs?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function redactBundleUrlArguments(args: string[]): string[];
|
|
21
|
+
export declare function redactBundleUrlsInText(value: string, args: string[]): string;
|
|
22
|
+
export declare function downloadBundle(value: string, options?: BundleDownloadOptions): Promise<BundleManifest>;
|
|
23
|
+
//# sourceMappingURL=bundle-download.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-download.d.ts","sourceRoot":"","sources":["../src/bundle-download.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE;QACN,WAAW,EAAE,QAAQ,GAAG,UAAU,CAAC;QACnC,gBAAgB,EAAE,SAAS,GAAG,KAAK,GAAG,YAAY,CAAC;QACnD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,KAAK,aAAa,CAAC;AAE3G,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CASjE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAS5E;AAkCD,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,GAAG,OAAO,CAAC,cAAc,CAAC,CA4GhH"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.redactBundleUrlArguments = redactBundleUrlArguments;
|
|
4
|
+
exports.redactBundleUrlsInText = redactBundleUrlsInText;
|
|
5
|
+
exports.downloadBundle = downloadBundle;
|
|
6
|
+
const node_https_1 = require("node:https");
|
|
7
|
+
const DEFAULT_MAX_REDIRECTS = 5;
|
|
8
|
+
const DEFAULT_MAX_RESPONSE_BYTES = 10 * 1024 * 1024;
|
|
9
|
+
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
10
|
+
const REDIRECT_STATUSES = new Set([301, 302, 303, 307, 308]);
|
|
11
|
+
function redactBundleUrlArguments(args) {
|
|
12
|
+
const redacted = [...args];
|
|
13
|
+
for (let index = 0; index < redacted.length; index += 1) {
|
|
14
|
+
if (redacted[index] === '--bundle' && index + 1 < redacted.length) {
|
|
15
|
+
redacted[index + 1] = '<bundle-value>';
|
|
16
|
+
index += 1;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return redacted;
|
|
20
|
+
}
|
|
21
|
+
function redactBundleUrlsInText(value, args) {
|
|
22
|
+
let redacted = value;
|
|
23
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
24
|
+
if (args[index] === '--bundle' && args[index + 1]) {
|
|
25
|
+
redacted = redacted.split(args[index + 1]).join('<bundle-value>');
|
|
26
|
+
index += 1;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return redacted;
|
|
30
|
+
}
|
|
31
|
+
function validateHttpsUrl(value) {
|
|
32
|
+
let parsed;
|
|
33
|
+
try {
|
|
34
|
+
parsed = value instanceof URL ? new URL(value.href) : new URL(value);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
throw new Error('Custom bundle URL is invalid.');
|
|
38
|
+
}
|
|
39
|
+
if (parsed.protocol !== 'https:') {
|
|
40
|
+
throw new Error('Custom bundle downloads require HTTPS.');
|
|
41
|
+
}
|
|
42
|
+
if (parsed.username || parsed.password) {
|
|
43
|
+
throw new Error('Custom bundle URLs must not contain credentials.');
|
|
44
|
+
}
|
|
45
|
+
return parsed;
|
|
46
|
+
}
|
|
47
|
+
function parseManifest(body) {
|
|
48
|
+
let manifest;
|
|
49
|
+
try {
|
|
50
|
+
manifest = JSON.parse(body.toString('utf8'));
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
throw new Error('Failed to parse bundle: response is not valid JSON.');
|
|
54
|
+
}
|
|
55
|
+
if (!manifest.version)
|
|
56
|
+
throw new Error('Failed to parse bundle: Bundle missing "version" field.');
|
|
57
|
+
if (!manifest.config?.projectType)
|
|
58
|
+
throw new Error('Failed to parse bundle: Bundle missing "config.projectType" field.');
|
|
59
|
+
if (!manifest.config?.strictnessPreset)
|
|
60
|
+
throw new Error('Failed to parse bundle: Bundle missing "config.strictnessPreset" field.');
|
|
61
|
+
if (!manifest.files || typeof manifest.files !== 'object' || Array.isArray(manifest.files)) {
|
|
62
|
+
throw new Error('Failed to parse bundle: Bundle missing "files" object.');
|
|
63
|
+
}
|
|
64
|
+
return manifest;
|
|
65
|
+
}
|
|
66
|
+
async function downloadBundle(value, options = {}) {
|
|
67
|
+
const initialUrl = validateHttpsUrl(value);
|
|
68
|
+
const requester = options.requester || ((url, onResponse) => (0, node_https_1.get)(url, onResponse));
|
|
69
|
+
const maxRedirects = options.maxRedirects ?? DEFAULT_MAX_REDIRECTS;
|
|
70
|
+
const maxResponseBytes = options.maxResponseBytes ?? DEFAULT_MAX_RESPONSE_BYTES;
|
|
71
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
72
|
+
if (!Number.isInteger(maxRedirects) || maxRedirects < 0)
|
|
73
|
+
throw new Error('Invalid bundle redirect limit.');
|
|
74
|
+
if (!Number.isInteger(maxResponseBytes) || maxResponseBytes < 1)
|
|
75
|
+
throw new Error('Invalid bundle response limit.');
|
|
76
|
+
if (!Number.isInteger(timeoutMs) || timeoutMs < 1)
|
|
77
|
+
throw new Error('Invalid bundle timeout.');
|
|
78
|
+
async function fetchUrl(currentUrl, redirectCount) {
|
|
79
|
+
return new Promise((resolve, reject) => {
|
|
80
|
+
let settled = false;
|
|
81
|
+
let activeResponse;
|
|
82
|
+
let deadline;
|
|
83
|
+
let request;
|
|
84
|
+
const stopTransport = () => {
|
|
85
|
+
if (activeResponse && !activeResponse.destroyed)
|
|
86
|
+
activeResponse.destroy();
|
|
87
|
+
if (request && !request.destroyed)
|
|
88
|
+
request.destroy();
|
|
89
|
+
};
|
|
90
|
+
const fail = (message) => {
|
|
91
|
+
if (settled)
|
|
92
|
+
return;
|
|
93
|
+
settled = true;
|
|
94
|
+
if (deadline)
|
|
95
|
+
clearTimeout(deadline);
|
|
96
|
+
stopTransport();
|
|
97
|
+
reject(new Error(message));
|
|
98
|
+
};
|
|
99
|
+
request = requester(currentUrl, (response) => {
|
|
100
|
+
activeResponse = response;
|
|
101
|
+
const status = response.statusCode || 0;
|
|
102
|
+
if (REDIRECT_STATUSES.has(status)) {
|
|
103
|
+
const location = response.headers.location;
|
|
104
|
+
if (!location) {
|
|
105
|
+
fail(`Failed to download bundle: HTTP ${status} redirect has no location.`);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (redirectCount >= maxRedirects) {
|
|
109
|
+
fail(`Failed to download bundle: exceeded ${maxRedirects} redirects.`);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
let redirectUrl;
|
|
113
|
+
try {
|
|
114
|
+
redirectUrl = validateHttpsUrl(new URL(location, currentUrl));
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
fail(error instanceof Error ? error.message : 'Custom bundle redirect is invalid.');
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
settled = true;
|
|
121
|
+
if (deadline)
|
|
122
|
+
clearTimeout(deadline);
|
|
123
|
+
stopTransport();
|
|
124
|
+
fetchUrl(redirectUrl, redirectCount + 1).then(resolve, reject);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (status !== 200) {
|
|
128
|
+
fail(`Failed to download bundle: HTTP ${status}.`);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const contentLength = Number(response.headers['content-length'] || 0);
|
|
132
|
+
if (Number.isFinite(contentLength) && contentLength > maxResponseBytes) {
|
|
133
|
+
fail(`Failed to download bundle: response exceeds ${maxResponseBytes} bytes.`);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const chunks = [];
|
|
137
|
+
let totalBytes = 0;
|
|
138
|
+
response.on('data', (chunk) => {
|
|
139
|
+
if (settled)
|
|
140
|
+
return;
|
|
141
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
142
|
+
totalBytes += buffer.length;
|
|
143
|
+
if (totalBytes > maxResponseBytes) {
|
|
144
|
+
response.destroy();
|
|
145
|
+
fail(`Failed to download bundle: response exceeds ${maxResponseBytes} bytes.`);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
chunks.push(buffer);
|
|
149
|
+
});
|
|
150
|
+
response.on('end', () => {
|
|
151
|
+
if (settled)
|
|
152
|
+
return;
|
|
153
|
+
try {
|
|
154
|
+
const manifest = parseManifest(Buffer.concat(chunks));
|
|
155
|
+
settled = true;
|
|
156
|
+
if (deadline)
|
|
157
|
+
clearTimeout(deadline);
|
|
158
|
+
resolve(manifest);
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
fail(error instanceof Error ? error.message : 'Failed to parse bundle.');
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
response.on('aborted', () => fail('Failed to download bundle: response was interrupted.'));
|
|
165
|
+
response.on('error', () => fail('Failed to download bundle: response failed.'));
|
|
166
|
+
});
|
|
167
|
+
if (settled) {
|
|
168
|
+
if (!request.destroyed)
|
|
169
|
+
request.destroy();
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
request.on('error', () => fail('Failed to download bundle before a response was received.'));
|
|
173
|
+
deadline = setTimeout(() => {
|
|
174
|
+
fail(`Bundle download timed out (${timeoutMs}ms).`);
|
|
175
|
+
}, timeoutMs);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
return fetchUrl(initialUrl, 0);
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=bundle-download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-download.js","sourceRoot":"","sources":["../src/bundle-download.ts"],"names":[],"mappings":";;AA6BA,4DASC;AAED,wDASC;AAkCD,wCA4GC;AA/LD,2CAA6C;AAwB7C,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,0BAA0B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACpD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,iBAAiB,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undle-download.test.d.ts","sourceRoot":"","sources":["../src/bundle-download.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_events_1 = require("node:events");
|
|
9
|
+
const promises_1 = require("node:fs/promises");
|
|
10
|
+
const node_os_1 = require("node:os");
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
12
|
+
const node_stream_1 = require("node:stream");
|
|
13
|
+
const node_test_1 = __importDefault(require("node:test"));
|
|
14
|
+
const bundle_download_js_1 = require("./bundle-download.js");
|
|
15
|
+
const VALID_BUNDLE = JSON.stringify({
|
|
16
|
+
version: '1.0.0',
|
|
17
|
+
name: 'fixture',
|
|
18
|
+
config: { projectType: 'nextjs', strictnessPreset: 'startup' },
|
|
19
|
+
files: { 'README.md': '# Fixture\n' },
|
|
20
|
+
});
|
|
21
|
+
function fakeRequester(routes, calls, resumed, destroyed = []) {
|
|
22
|
+
return (url, onResponse) => {
|
|
23
|
+
calls.push(url.href);
|
|
24
|
+
const route = routes[url.href];
|
|
25
|
+
strict_1.default.ok(route, `Unexpected request: ${url.href}`);
|
|
26
|
+
const request = new node_events_1.EventEmitter();
|
|
27
|
+
request.destroy = (() => request);
|
|
28
|
+
request.setTimeout = ((_, callback) => {
|
|
29
|
+
if (route.timeout && callback)
|
|
30
|
+
queueMicrotask(callback);
|
|
31
|
+
return request;
|
|
32
|
+
});
|
|
33
|
+
if (!route.timeout) {
|
|
34
|
+
queueMicrotask(() => {
|
|
35
|
+
const stream = new node_stream_1.PassThrough();
|
|
36
|
+
const response = stream;
|
|
37
|
+
response.statusCode = route.status ?? 200;
|
|
38
|
+
response.headers = route.headers || {};
|
|
39
|
+
const originalResume = response.resume.bind(response);
|
|
40
|
+
response.resume = (() => {
|
|
41
|
+
resumed.push(url.href);
|
|
42
|
+
return originalResume();
|
|
43
|
+
});
|
|
44
|
+
const originalDestroy = response.destroy.bind(response);
|
|
45
|
+
response.destroy = ((error) => {
|
|
46
|
+
destroyed.push(url.href);
|
|
47
|
+
return originalDestroy(error);
|
|
48
|
+
});
|
|
49
|
+
onResponse(response);
|
|
50
|
+
stream.end(route.body || '');
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return request;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
(0, node_test_1.default)('rejects HTTP and credential-bearing bundle URLs before any request', async () => {
|
|
57
|
+
let requests = 0;
|
|
58
|
+
const requester = () => {
|
|
59
|
+
requests += 1;
|
|
60
|
+
throw new Error('requester must not run');
|
|
61
|
+
};
|
|
62
|
+
await strict_1.default.rejects((0, bundle_download_js_1.downloadBundle)('http://example.test/bundle.json', { requester }), /require HTTPS/);
|
|
63
|
+
await strict_1.default.rejects((0, bundle_download_js_1.downloadBundle)('https://user:secret@example.test/bundle.json', { requester }), (error) => {
|
|
64
|
+
strict_1.default.match(error.message, /must not contain credentials/);
|
|
65
|
+
strict_1.default.doesNotMatch(error.message, /user|secret/);
|
|
66
|
+
return true;
|
|
67
|
+
});
|
|
68
|
+
strict_1.default.equal(requests, 0);
|
|
69
|
+
});
|
|
70
|
+
(0, node_test_1.default)('redacts bundle URL values from failure-report arguments and text', () => {
|
|
71
|
+
const secretUrl = 'https://user:secret@example.test/bundle.json';
|
|
72
|
+
const args = ['setup', '--bundle', secretUrl, '--debug'];
|
|
73
|
+
strict_1.default.deepEqual((0, bundle_download_js_1.redactBundleUrlArguments)(args), ['setup', '--bundle', '<bundle-value>', '--debug']);
|
|
74
|
+
strict_1.default.equal((0, bundle_download_js_1.redactBundleUrlsInText)(`Rejected ${secretUrl}`, args), 'Rejected <bundle-value>');
|
|
75
|
+
});
|
|
76
|
+
(0, node_test_1.default)('CLI rejects uppercase credential-bearing HTTPS without exposing userinfo in output or its failure report', async () => {
|
|
77
|
+
const cwd = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'lattice-bundle-redaction-'));
|
|
78
|
+
const secretUrl = 'HTTPS://synthetic-user:synthetic-secret@example.invalid/bundle.json';
|
|
79
|
+
try {
|
|
80
|
+
const cliPath = (0, node_path_1.join)(__dirname, 'index.js');
|
|
81
|
+
const result = (0, node_child_process_1.spawnSync)(process.execPath, [cliPath, 'setup', '--bundle', secretUrl, '--debug'], {
|
|
82
|
+
cwd,
|
|
83
|
+
encoding: 'utf8',
|
|
84
|
+
timeout: 10_000,
|
|
85
|
+
});
|
|
86
|
+
strict_1.default.equal(result.status, 1);
|
|
87
|
+
const output = `${result.stdout}${result.stderr}`;
|
|
88
|
+
strict_1.default.match(output, /setup --bundle <custom-url>/);
|
|
89
|
+
strict_1.default.doesNotMatch(output, /synthetic-user|synthetic-secret|example\.invalid/);
|
|
90
|
+
const reportPath = (0, node_path_1.join)(cwd, '.lattice', 'failure-report.json');
|
|
91
|
+
const reportText = await (0, promises_1.readFile)(reportPath, 'utf8');
|
|
92
|
+
strict_1.default.doesNotMatch(reportText, /synthetic-user|synthetic-secret|example\.invalid/);
|
|
93
|
+
const report = JSON.parse(reportText);
|
|
94
|
+
strict_1.default.deepEqual(report.argv, ['setup', '--bundle', '<bundle-value>', '--debug']);
|
|
95
|
+
strict_1.default.match(report.errorMessage, /must not contain credentials/);
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
await (0, promises_1.rm)(cwd, { recursive: true, force: true });
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
(0, node_test_1.default)('rejects an HTTPS-to-HTTP redirect before the insecure request and closes the response', async () => {
|
|
102
|
+
const calls = [];
|
|
103
|
+
const resumed = [];
|
|
104
|
+
const destroyed = [];
|
|
105
|
+
const requester = fakeRequester({
|
|
106
|
+
'https://example.test/start': { status: 302, headers: { location: 'http://example.test/bundle.json' } },
|
|
107
|
+
}, calls, resumed, destroyed);
|
|
108
|
+
await strict_1.default.rejects((0, bundle_download_js_1.downloadBundle)('https://example.test/start', { requester }), /require HTTPS/);
|
|
109
|
+
strict_1.default.deepEqual(calls, ['https://example.test/start']);
|
|
110
|
+
strict_1.default.deepEqual(resumed, []);
|
|
111
|
+
strict_1.default.deepEqual(destroyed, ['https://example.test/start']);
|
|
112
|
+
});
|
|
113
|
+
(0, node_test_1.default)('follows a relative HTTPS redirect and preserves manifest validation', async () => {
|
|
114
|
+
const calls = [];
|
|
115
|
+
const resumed = [];
|
|
116
|
+
const destroyed = [];
|
|
117
|
+
const requester = fakeRequester({
|
|
118
|
+
'https://example.test/start': { status: 307, headers: { location: '/bundle.json' } },
|
|
119
|
+
'https://example.test/bundle.json': { body: VALID_BUNDLE },
|
|
120
|
+
}, calls, resumed, destroyed);
|
|
121
|
+
const bundle = await (0, bundle_download_js_1.downloadBundle)('https://example.test/start', { requester });
|
|
122
|
+
strict_1.default.equal(bundle.name, 'fixture');
|
|
123
|
+
strict_1.default.deepEqual(calls, ['https://example.test/start', 'https://example.test/bundle.json']);
|
|
124
|
+
(0, strict_1.default)(destroyed.includes('https://example.test/start'));
|
|
125
|
+
const invalidRequester = fakeRequester({
|
|
126
|
+
'https://example.test/invalid': { body: JSON.stringify({ version: '1.0.0', files: {} }) },
|
|
127
|
+
}, [], []);
|
|
128
|
+
await strict_1.default.rejects((0, bundle_download_js_1.downloadBundle)('https://example.test/invalid', { requester: invalidRequester }), /config\.projectType/);
|
|
129
|
+
});
|
|
130
|
+
(0, node_test_1.default)('enforces finite redirect and response-body limits', async () => {
|
|
131
|
+
const redirectCalls = [];
|
|
132
|
+
const redirectRequester = fakeRequester({
|
|
133
|
+
'https://example.test/loop': { status: 302, headers: { location: '/loop' } },
|
|
134
|
+
}, redirectCalls, []);
|
|
135
|
+
await strict_1.default.rejects((0, bundle_download_js_1.downloadBundle)('https://example.test/loop', { requester: redirectRequester, maxRedirects: 2 }), /exceeded 2 redirects/);
|
|
136
|
+
strict_1.default.equal(redirectCalls.length, 3);
|
|
137
|
+
const bodyRequester = fakeRequester({
|
|
138
|
+
'https://example.test/large': { body: VALID_BUNDLE },
|
|
139
|
+
}, [], []);
|
|
140
|
+
await strict_1.default.rejects((0, bundle_download_js_1.downloadBundle)('https://example.test/large', { requester: bodyRequester, maxResponseBytes: 16 }), /exceeds 16 bytes/);
|
|
141
|
+
});
|
|
142
|
+
(0, node_test_1.default)('uses an absolute deadline even when the response keeps sending data', async () => {
|
|
143
|
+
let requestDestroyed = false;
|
|
144
|
+
let responseDestroyed = false;
|
|
145
|
+
const requester = (_url, onResponse) => {
|
|
146
|
+
const request = new node_events_1.EventEmitter();
|
|
147
|
+
let response;
|
|
148
|
+
request.destroy = (() => {
|
|
149
|
+
requestDestroyed = true;
|
|
150
|
+
response?.destroy();
|
|
151
|
+
return request;
|
|
152
|
+
});
|
|
153
|
+
request.setTimeout = (() => request);
|
|
154
|
+
queueMicrotask(() => {
|
|
155
|
+
response = new node_stream_1.PassThrough();
|
|
156
|
+
const incoming = response;
|
|
157
|
+
incoming.statusCode = 200;
|
|
158
|
+
incoming.headers = {};
|
|
159
|
+
incoming.once('close', () => {
|
|
160
|
+
responseDestroyed = true;
|
|
161
|
+
});
|
|
162
|
+
onResponse(incoming);
|
|
163
|
+
const interval = setInterval(() => response?.write('x'), 5);
|
|
164
|
+
response.once('close', () => clearInterval(interval));
|
|
165
|
+
});
|
|
166
|
+
return request;
|
|
167
|
+
};
|
|
168
|
+
await strict_1.default.rejects((0, bundle_download_js_1.downloadBundle)('https://example.test/slow-drip', { requester, timeoutMs: 25 }), /timed out \(25ms\)/);
|
|
169
|
+
strict_1.default.equal(requestDestroyed, true);
|
|
170
|
+
strict_1.default.equal(responseDestroyed, true);
|
|
171
|
+
});
|
|
172
|
+
(0, node_test_1.default)('destroys the response and request when Content-Length is already oversized', async () => {
|
|
173
|
+
let requestDestroyed = false;
|
|
174
|
+
let responseDestroyed = false;
|
|
175
|
+
const requester = (_url, onResponse) => {
|
|
176
|
+
const request = new node_events_1.EventEmitter();
|
|
177
|
+
request.destroy = (() => {
|
|
178
|
+
requestDestroyed = true;
|
|
179
|
+
return request;
|
|
180
|
+
});
|
|
181
|
+
request.setTimeout = (() => request);
|
|
182
|
+
queueMicrotask(() => {
|
|
183
|
+
const stream = new node_stream_1.PassThrough();
|
|
184
|
+
const response = stream;
|
|
185
|
+
response.statusCode = 200;
|
|
186
|
+
response.headers = { 'content-length': '999' };
|
|
187
|
+
const originalDestroy = response.destroy.bind(response);
|
|
188
|
+
response.destroy = ((error) => {
|
|
189
|
+
responseDestroyed = true;
|
|
190
|
+
return originalDestroy(error);
|
|
191
|
+
});
|
|
192
|
+
onResponse(response);
|
|
193
|
+
});
|
|
194
|
+
return request;
|
|
195
|
+
};
|
|
196
|
+
await strict_1.default.rejects((0, bundle_download_js_1.downloadBundle)('https://example.test/oversized', { requester, maxResponseBytes: 16 }), /exceeds 16 bytes/);
|
|
197
|
+
strict_1.default.equal(requestDestroyed, true);
|
|
198
|
+
strict_1.default.equal(responseDestroyed, true);
|
|
199
|
+
});
|
|
200
|
+
//# sourceMappingURL=bundle-download.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-download.test.js","sourceRoot":"","sources":["../src/bundle-download.test.ts"],"names":[],"mappings":";;;;;AAAA,gEAAwC;AACxC,2DAA+C;AAC/C,6CAA2C;AAC3C,+CAAyD;AAEzD,qCAAiC;AACjC,yCAAiC;AACjC,6CAA0C;AAC1C,0DAA6B;AAC7B,6DAK8B;AAE9B,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC;IAClC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE;IAC9D,KAAK,EAAE,EAA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