@evinvest/kitstart 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -5
- package/dist/core/accept.d.ts +23 -1
- package/dist/core/accept.js +59 -5
- package/dist/core/analytics.d.ts +2 -1
- package/dist/core/analytics.js +7 -0
- package/dist/core/lead-capture-format.d.ts +6 -0
- package/dist/core/lead-capture-format.js +13 -0
- package/dist/core/lead-capture-text.d.ts +32 -1
- package/dist/core/lead-capture-text.js +43 -0
- package/dist/core/lead.d.ts +32 -3
- package/dist/core/lead.js +3 -2
- package/dist/core/pricing/flow.d.ts +27 -0
- package/dist/core/pricing/flow.js +37 -0
- package/dist/core/pricing/index.d.ts +4 -0
- package/dist/core/pricing/index.js +4 -0
- package/dist/core/pricing/model.d.ts +129 -0
- package/dist/core/pricing/model.js +34 -0
- package/dist/core/pricing/price.d.ts +34 -0
- package/dist/core/pricing/price.js +105 -0
- package/dist/core/pricing/validate.d.ts +27 -0
- package/dist/core/pricing/validate.js +244 -0
- package/dist/core/site.d.ts +7 -0
- package/dist/core/site.js +11 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -3
- package/dist/next/quote-route.d.ts +8 -1
- package/dist/next/quote-route.js +3 -1
- package/dist/react/LeadCapture.d.ts +30 -2
- package/dist/react/LeadCapture.js +18 -5
- package/dist/react/LeadCaptureChannels.d.ts +14 -2
- package/dist/react/LeadCaptureChannels.js +13 -0
- package/dist/react/LeadCaptureEstimate.d.ts +46 -0
- package/dist/react/LeadCaptureEstimate.js +69 -0
- package/dist/react/LeadCapturePriced.d.ts +19 -0
- package/dist/react/LeadCapturePriced.js +14 -0
- package/dist/react/use-lead-events.d.ts +2 -0
- package/dist/react/use-lead-events.js +10 -0
- package/dist/react/use-lead-submit.d.ts +7 -3
- package/dist/react/use-lead-submit.js +14 -7
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +2 -1
- package/dist/server/lead-store-sqlite.js +31 -5
- package/dist/server/lead-webhook.d.ts +48 -0
- package/dist/server/lead-webhook.js +30 -2
- package/dist/server/pricing-source.d.ts +25 -0
- package/dist/server/pricing-source.js +48 -0
- package/dist/testing/lead-store-contract.js +9 -2
- package/package.json +1 -1
- package/template/app/[locale]/[location]/page.tsx +4 -2
- package/template/app/quote/route.ts +2 -1
- package/template/flake.nix +1 -1
- package/template/package.json +1 -1
- package/template/src/entities/content/model/en.ts +1 -1
- package/template/src/entities/content/model/fr.ts +1 -1
- package/template/src/shared/config/env.ts +4 -1
- package/template/src/shared/config/lead.ts +12 -2
- package/template/src/shared/config/pricing.ts +49 -0
- package/template/src/shared/config/site.ts +3 -0
- package/template/src/views/home/ui/PlaceHome.tsx +6 -3
- package/template/tests/bundle_budget.txt +3 -1
- package/template/tests/e2e/flows.spec.ts +106 -0
- package/template/tests/e2e/mock-panel.mjs +20 -0
- package/template/tests/e2e/playwright.config.ts +25 -9
|
@@ -4,6 +4,8 @@ import { BREAKPOINTS } from "@evinvest/kitstart/testing/e2e";
|
|
|
4
4
|
// The standalone server under test, never `next dev`. Baselines are Linux's
|
|
5
5
|
// (CI's); elsewhere the pixel comparison is skipped.
|
|
6
6
|
const PORT = Number(process.env["E2E_PORT"] ?? 59089);
|
|
7
|
+
// The panel stand-in (`mock-panel.mjs`): the live place and the price list.
|
|
8
|
+
const MOCK_PORT = Number(process.env["E2E_MOCK_PORT"] ?? PORT + 1);
|
|
7
9
|
const linux = process.platform === "linux";
|
|
8
10
|
|
|
9
11
|
export default defineConfig({
|
|
@@ -14,13 +16,27 @@ export default defineConfig({
|
|
|
14
16
|
expect: { toHaveScreenshot: { maxDiffPixelRatio: 0.01, animations: "disabled", stylePath: "./screenshot-section.css" } },
|
|
15
17
|
use: { baseURL: `http://localhost:${PORT}`, deviceScaleFactor: 1, colorScheme: "light", locale: "fr-FR" },
|
|
16
18
|
projects: BREAKPOINTS.map(b => ({ name: b.name, use: { ...devices["Desktop Chrome"], viewport: b.viewport } })),
|
|
17
|
-
webServer:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
webServer: [
|
|
20
|
+
{
|
|
21
|
+
command: "node mock-panel.mjs",
|
|
22
|
+
url: `http://127.0.0.1:${MOCK_PORT}/health`,
|
|
23
|
+
reuseExistingServer: false,
|
|
24
|
+
env: { E2E_MOCK_PORT: String(MOCK_PORT) },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
command: "node .next/standalone/server.js",
|
|
28
|
+
cwd: "../..",
|
|
29
|
+
url: `http://localhost:${PORT}/health`,
|
|
30
|
+
reuseExistingServer: false,
|
|
31
|
+
// The prod server refuses to boot without these (instrumentation.ts); on
|
|
32
|
+
// loopback the one hop is the runner itself.
|
|
33
|
+
env: {
|
|
34
|
+
PORT: String(PORT),
|
|
35
|
+
HOSTNAME: "127.0.0.1",
|
|
36
|
+
LEADS_DB_PATH: `/tmp/brand-e2e-${PORT}/leads.db`,
|
|
37
|
+
TRUSTED_PROXY: "xff:1",
|
|
38
|
+
LOCATIONS_API_URL: `http://127.0.0.1:${MOCK_PORT}`,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
],
|
|
26
42
|
});
|