includio-cms 0.15.3 → 0.15.4
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/CHANGELOG.md +15 -0
- package/DOCS.md +6 -2
- package/ROADMAP.md +6 -0
- package/dist/cli/scaffold/admin.js +59 -0
- package/dist/core/server/forms/submissions/operations/create.js +11 -5
- package/dist/paraglide/messages/_index.d.ts +3 -36
- package/dist/paraglide/messages/_index.js +3 -71
- package/dist/paraglide/messages/hello_world.d.ts +5 -0
- package/dist/paraglide/messages/hello_world.js +33 -0
- package/dist/paraglide/messages/login_hello.d.ts +16 -0
- package/dist/paraglide/messages/login_hello.js +34 -0
- package/dist/paraglide/messages/login_please_login.d.ts +16 -0
- package/dist/paraglide/messages/login_please_login.js +34 -0
- package/dist/updates/0.15.4/index.d.ts +2 -0
- package/dist/updates/0.15.4/index.js +14 -0
- package/dist/updates/index.js +2 -1
- package/package.json +1 -1
- package/dist/paraglide/messages/en.d.ts +0 -5
- package/dist/paraglide/messages/en.js +0 -14
- package/dist/paraglide/messages/pl.d.ts +0 -5
- package/dist/paraglide/messages/pl.js +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable changes to includio-cms are documented here.
|
|
4
4
|
Generated from `src/lib/updates/` — do not edit manually.
|
|
5
5
|
|
|
6
|
+
## 0.15.4 — 2026-04-21
|
|
7
|
+
|
|
8
|
+
Forms: auto-scaffolded public submission endpoint + decoupled notification emails from submission success.
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- CLI scaffold (`pnpm includio scaffold admin`) now emits `src/routes/api/forms/[slug]/submit/+server.ts` — the public POST endpoint for form submissions. Previously each project had to hand-roll this file (the handler lives in the library, but SvelteKit does not load routes from `node_modules`). New projects get it out-of-the-box; existing projects can run `includio scaffold admin` to generate it without overwriting other admin files.
|
|
12
|
+
- Added `ideas/health-check-module.md` — proposal for built-in `/api/health` + `/api/health/ready` endpoints, opt-in SMTP verify, and a ręczny "Test SMTP connection / Send test mail" section in the admin maintenance page. Context: diagnosing a silent SMTP misconfiguration in a live project required grepping through library internals; a one-click diagnostics panel would have surfaced the empty `EMAIL_HOST` immediately.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- `createFormSubmission()` now keeps the notification-email call in a separate `try/catch` from the DB write. Before: if SMTP was misconfigured (empty `EMAIL_HOST` locally, unreachable relay, etc.) the whole operation returned `false` → endpoint responded `500 "Submission failed"` even though the submission was already persisted. After: DB failure still returns `false` (critical path); email failure is logged via `console.error` and the submission succeeds with `200`.
|
|
16
|
+
|
|
17
|
+
### Notes
|
|
18
|
+
|
|
19
|
+
No SQL migration. No API signature changes. Existing projects that already have a hand-rolled `src/routes/api/forms/[slug]/submit/+server.ts` keep working — scaffold skips existing files unless `--force` is passed.
|
|
20
|
+
|
|
6
21
|
## 0.15.3 — 2026-04-16
|
|
7
22
|
|
|
8
23
|
Shop: InPost carrier adapter — Geowidget v5 picker + ShipX shipment + webhook auto-status.
|
package/DOCS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Includio CMS Documentation (v0.15.
|
|
1
|
+
# Includio CMS Documentation (v0.15.4)
|
|
2
2
|
|
|
3
3
|
> This file is auto-generated from the docs site. For the latest version, update the package.
|
|
4
4
|
|
|
@@ -2743,9 +2743,13 @@ Forms can be submitted from your frontend via a public POST endpoint:
|
|
|
2743
2743
|
|
|
2744
2744
|
```
|
|
2745
2745
|
POST /api/forms/{slug}/submit
|
|
2746
|
-
Content-Type: multipart/form-data
|
|
2746
|
+
Content-Type: multipart/form-data # or application/json for file-less payloads
|
|
2747
2747
|
```
|
|
2748
2748
|
|
|
2749
|
+
> **Auto-generated endpoint:** Running `includio scaffold admin` generates `src/routes/api/forms/[slug]/submit/+server.ts` automatically — no manual setup required. To customize (extra middleware, logging, honeypot handling), edit the generated file; it won't be overwritten unless you re-run scaffold with `--force`.
|
|
2750
|
+
|
|
2751
|
+
> **Notification emails are best-effort:** If a form has `notificationEmailAddresses` set and email sending fails (e.g. misconfigured SMTP), the submission is still saved and the endpoint returns `200`. The error is logged to `console.error` — check server logs if you stop receiving notifications.
|
|
2752
|
+
|
|
2749
2753
|
### Submitting from Frontend
|
|
2750
2754
|
|
|
2751
2755
|
```typescript
|
package/ROADMAP.md
CHANGED
|
@@ -318,6 +318,12 @@
|
|
|
318
318
|
- [x] `[feature]` `[P2]` `inpostAdapter()` — Geowidget v5 (`<InpostPicker>` Svelte + raw config endpoint), ShipX shipment create + auto-buy + label PDF + cancel, webhook → status + tracking, per-shipping-method service config, customer tracking display in `<OrderStatus>` + email templates
|
|
319
319
|
- [x] `[chore]` `[P2]` Verbose logging on adapter auto-confirm flow (offer prep wait, buy POST, polling) for sandbox debugging
|
|
320
320
|
|
|
321
|
+
## 0.15.4 — Forms submission scaffold + best-effort notification emails
|
|
322
|
+
|
|
323
|
+
- [x] `[feature]` `[P1]` CLI scaffold emits `src/routes/api/forms/[slug]/submit/+server.ts` — public form submit endpoint auto-generated, no manual setup per project <!-- files: src/lib/cli/scaffold/admin.ts, src/lib/cli/scaffold/admin.spec.ts -->
|
|
324
|
+
- [x] `[fix]` `[P0]` `createFormSubmission` — split try/catch so SMTP failure no longer returns `false` (endpoint responded 500 even though submission was persisted); notification email is best-effort, logged via `console.error` <!-- files: src/lib/core/server/forms/submissions/operations/create.ts -->
|
|
325
|
+
- [ ] `[feature]` `[P1]` Built-in `/api/health` + `/api/health/ready` with per-adapter checks (db/files/email/ai) + ręczny SMTP diagnostics panel in maintenance page <!-- files: ideas/health-check-module.md -->
|
|
326
|
+
|
|
321
327
|
## 0.16.0 — SEO module
|
|
322
328
|
|
|
323
329
|
- [ ] `[feature]` `[P1]` SERP preview + character limits for title/description <!-- files: src/lib/admin/components/fields/seo-field.svelte -->
|
|
@@ -340,6 +340,65 @@ export const { GET, POST, PATCH, PUT, DELETE } = createAdminApiHandler();
|
|
|
340
340
|
import { createRestApiHandler } from 'includio-cms/admin/api/rest/handler';
|
|
341
341
|
|
|
342
342
|
export const { GET, POST, PUT, DELETE } = createRestApiHandler();
|
|
343
|
+
`
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
path: 'api/forms/[slug]/submit/+server.ts',
|
|
347
|
+
content: `${GENERATED_COMMENT_TS}
|
|
348
|
+
import { json } from '@sveltejs/kit';
|
|
349
|
+
import type { RequestHandler } from './$types';
|
|
350
|
+
import { createFormSubmission, parseFormDataForSubmission } from 'includio-cms/sveltekit/server';
|
|
351
|
+
import { getCMS } from 'includio-cms/core';
|
|
352
|
+
|
|
353
|
+
const counts = new Map<string, { count: number; resetAt: number }>();
|
|
354
|
+
const LIMIT = 5;
|
|
355
|
+
const WINDOW = 60 * 60 * 1000;
|
|
356
|
+
|
|
357
|
+
function checkRateLimit(ip: string): boolean {
|
|
358
|
+
const now = Date.now();
|
|
359
|
+
const entry = counts.get(ip);
|
|
360
|
+
if (!entry || now > entry.resetAt) {
|
|
361
|
+
counts.set(ip, { count: 1, resetAt: now + WINDOW });
|
|
362
|
+
return true;
|
|
363
|
+
}
|
|
364
|
+
if (entry.count >= LIMIT) return false;
|
|
365
|
+
entry.count++;
|
|
366
|
+
return true;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export const POST: RequestHandler = async (event) => {
|
|
370
|
+
const slug = event.params.slug;
|
|
371
|
+
const ip = event.getClientAddress();
|
|
372
|
+
if (!checkRateLimit(ip)) return json({ error: 'Rate limit exceeded' }, { status: 429 });
|
|
373
|
+
|
|
374
|
+
const contentType = event.request.headers.get('content-type') || '';
|
|
375
|
+
const isMultipart = contentType.includes('multipart/form-data');
|
|
376
|
+
let data: Record<string, unknown>;
|
|
377
|
+
|
|
378
|
+
try {
|
|
379
|
+
if (isMultipart) {
|
|
380
|
+
const config = getCMS().getFormBySlug(slug);
|
|
381
|
+
const formData = await event.request.formData();
|
|
382
|
+
data = await parseFormDataForSubmission(formData, config.fields);
|
|
383
|
+
} else {
|
|
384
|
+
data = await event.request.json();
|
|
385
|
+
}
|
|
386
|
+
} catch (err) {
|
|
387
|
+
return json({ error: err instanceof Error ? err.message : 'Invalid request' }, { status: 400 });
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
try {
|
|
391
|
+
const success = await createFormSubmission({
|
|
392
|
+
slug,
|
|
393
|
+
data,
|
|
394
|
+
ip,
|
|
395
|
+
userAgent: event.request.headers.get('user-agent') || undefined
|
|
396
|
+
});
|
|
397
|
+
return success ? json({ success: true }) : json({ error: 'Submission failed' }, { status: 500 });
|
|
398
|
+
} catch (err) {
|
|
399
|
+
return json({ error: err instanceof Error ? err.message : 'Unknown error' }, { status: 400 });
|
|
400
|
+
}
|
|
401
|
+
};
|
|
343
402
|
`
|
|
344
403
|
}
|
|
345
404
|
];
|
|
@@ -16,7 +16,13 @@ export const createFormSubmission = async (options) => {
|
|
|
16
16
|
ip,
|
|
17
17
|
userAgent
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
console.error('[forms] DB createFormSubmission failed:', err);
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (config.notificationEmailAddresses && config.notificationEmailAddresses.length > 0 && getCMS().emailAdapter) {
|
|
25
|
+
try {
|
|
20
26
|
await getCMS().emailAdapter.sendMail({
|
|
21
27
|
to: config.notificationEmailAddresses,
|
|
22
28
|
subject: `New submission for form "${getLocalizedLabel(config.label, 'en')}"`,
|
|
@@ -24,9 +30,9 @@ export const createFormSubmission = async (options) => {
|
|
|
24
30
|
<p>Please log in to the admin panel to view the submission details.</p>`
|
|
25
31
|
});
|
|
26
32
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return false;
|
|
33
|
+
catch (err) {
|
|
34
|
+
console.error('[forms] notification email failed (submission already saved):', err);
|
|
35
|
+
}
|
|
31
36
|
}
|
|
37
|
+
return true;
|
|
32
38
|
};
|
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
locale?: "en" | "pl";
|
|
5
|
-
}): string;
|
|
6
|
-
/**
|
|
7
|
-
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
8
|
-
*
|
|
9
|
-
* - Changing this function will be over-written by the next build.
|
|
10
|
-
*
|
|
11
|
-
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
12
|
-
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
13
|
-
*
|
|
14
|
-
* @param {{}} inputs
|
|
15
|
-
* @param {{ locale?: "en" | "pl" }} options
|
|
16
|
-
* @returns {string}
|
|
17
|
-
*/
|
|
18
|
-
declare function login_hello(inputs?: {}, options?: {
|
|
19
|
-
locale?: "en" | "pl";
|
|
20
|
-
}): string;
|
|
21
|
-
/**
|
|
22
|
-
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
23
|
-
*
|
|
24
|
-
* - Changing this function will be over-written by the next build.
|
|
25
|
-
*
|
|
26
|
-
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
27
|
-
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
28
|
-
*
|
|
29
|
-
* @param {{}} inputs
|
|
30
|
-
* @param {{ locale?: "en" | "pl" }} options
|
|
31
|
-
* @returns {string}
|
|
32
|
-
*/
|
|
33
|
-
declare function login_please_login(inputs?: {}, options?: {
|
|
34
|
-
locale?: "en" | "pl";
|
|
35
|
-
}): string;
|
|
36
|
-
export { login_hello as login.hello, login_please_login as login.please_login };
|
|
1
|
+
export * from "./hello_world.js";
|
|
2
|
+
export * from "./login_hello.js";
|
|
3
|
+
export * from "./login_please_login.js";
|
|
@@ -1,72 +1,4 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
7
|
-
*
|
|
8
|
-
* - Changing this function will be over-written by the next build.
|
|
9
|
-
*
|
|
10
|
-
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
11
|
-
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
12
|
-
*
|
|
13
|
-
* @param {{ name: NonNullable<unknown> }} inputs
|
|
14
|
-
* @param {{ locale?: "en" | "pl" }} options
|
|
15
|
-
* @returns {string}
|
|
16
|
-
*/
|
|
17
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
18
|
-
export const hello_world = (inputs, options = {}) => {
|
|
19
|
-
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
20
|
-
return /** @type {any} */ (globalThis).__paraglide_ssr.hello_world(inputs)
|
|
21
|
-
}
|
|
22
|
-
const locale = options.locale ?? getLocale()
|
|
23
|
-
trackMessageCall("hello_world", locale)
|
|
24
|
-
if (locale === "en") return en.hello_world(inputs)
|
|
25
|
-
return pl.hello_world(inputs)
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
29
|
-
*
|
|
30
|
-
* - Changing this function will be over-written by the next build.
|
|
31
|
-
*
|
|
32
|
-
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
33
|
-
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
34
|
-
*
|
|
35
|
-
* @param {{}} inputs
|
|
36
|
-
* @param {{ locale?: "en" | "pl" }} options
|
|
37
|
-
* @returns {string}
|
|
38
|
-
*/
|
|
39
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
40
|
-
const login_hello = (inputs = {}, options = {}) => {
|
|
41
|
-
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
42
|
-
return /** @type {any} */ (globalThis).__paraglide_ssr.login_hello(inputs)
|
|
43
|
-
}
|
|
44
|
-
const locale = options.locale ?? getLocale()
|
|
45
|
-
trackMessageCall("login_hello", locale)
|
|
46
|
-
if (locale === "en") return en.login_hello(inputs)
|
|
47
|
-
return pl.login_hello(inputs)
|
|
48
|
-
};
|
|
49
|
-
export { login_hello as "login.hello" }
|
|
50
|
-
/**
|
|
51
|
-
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
52
|
-
*
|
|
53
|
-
* - Changing this function will be over-written by the next build.
|
|
54
|
-
*
|
|
55
|
-
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
56
|
-
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
57
|
-
*
|
|
58
|
-
* @param {{}} inputs
|
|
59
|
-
* @param {{ locale?: "en" | "pl" }} options
|
|
60
|
-
* @returns {string}
|
|
61
|
-
*/
|
|
62
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
63
|
-
const login_please_login = (inputs = {}, options = {}) => {
|
|
64
|
-
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
65
|
-
return /** @type {any} */ (globalThis).__paraglide_ssr.login_please_login(inputs)
|
|
66
|
-
}
|
|
67
|
-
const locale = options.locale ?? getLocale()
|
|
68
|
-
trackMessageCall("login_please_login", locale)
|
|
69
|
-
if (locale === "en") return en.login_please_login(inputs)
|
|
70
|
-
return pl.login_please_login(inputs)
|
|
71
|
-
};
|
|
72
|
-
export { login_please_login as "login.please_login" }
|
|
2
|
+
export * from './hello_world.js'
|
|
3
|
+
export * from './login_hello.js'
|
|
4
|
+
export * from './login_please_login.js'
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
const en_hello_world = /** @type {(inputs: { name: NonNullable<unknown> }) => string} */ (i) => {
|
|
5
|
+
return `Hello, ${i.name} from en!`
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const pl_hello_world = /** @type {(inputs: { name: NonNullable<unknown> }) => string} */ (i) => {
|
|
9
|
+
return `Hello, ${i.name} from pl!`
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
14
|
+
*
|
|
15
|
+
* - Changing this function will be over-written by the next build.
|
|
16
|
+
*
|
|
17
|
+
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
18
|
+
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
19
|
+
*
|
|
20
|
+
* @param {{ name: NonNullable<unknown> }} inputs
|
|
21
|
+
* @param {{ locale?: "en" | "pl" }} options
|
|
22
|
+
* @returns {string}
|
|
23
|
+
*/
|
|
24
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
25
|
+
export const hello_world = (inputs, options = {}) => {
|
|
26
|
+
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
27
|
+
return /** @type {any} */ (globalThis).__paraglide_ssr.hello_world(inputs)
|
|
28
|
+
}
|
|
29
|
+
const locale = options.locale ?? getLocale()
|
|
30
|
+
trackMessageCall("hello_world", locale)
|
|
31
|
+
if (locale === "en") return en_hello_world(inputs)
|
|
32
|
+
return pl_hello_world(inputs)
|
|
33
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { login_hello as login.hello };
|
|
2
|
+
/**
|
|
3
|
+
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
4
|
+
*
|
|
5
|
+
* - Changing this function will be over-written by the next build.
|
|
6
|
+
*
|
|
7
|
+
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
8
|
+
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
9
|
+
*
|
|
10
|
+
* @param {{}} inputs
|
|
11
|
+
* @param {{ locale?: "en" | "pl" }} options
|
|
12
|
+
* @returns {string}
|
|
13
|
+
*/
|
|
14
|
+
declare function login_hello(inputs?: {}, options?: {
|
|
15
|
+
locale?: "en" | "pl";
|
|
16
|
+
}): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
const en_login_hello = /** @type {(inputs: {}) => string} */ () => {
|
|
5
|
+
return `Welcome back`
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const pl_login_hello = /** @type {(inputs: {}) => string} */ () => {
|
|
9
|
+
return `Witaj ponownie`
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
14
|
+
*
|
|
15
|
+
* - Changing this function will be over-written by the next build.
|
|
16
|
+
*
|
|
17
|
+
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
18
|
+
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
19
|
+
*
|
|
20
|
+
* @param {{}} inputs
|
|
21
|
+
* @param {{ locale?: "en" | "pl" }} options
|
|
22
|
+
* @returns {string}
|
|
23
|
+
*/
|
|
24
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
25
|
+
const login_hello = (inputs = {}, options = {}) => {
|
|
26
|
+
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
27
|
+
return /** @type {any} */ (globalThis).__paraglide_ssr.login_hello(inputs)
|
|
28
|
+
}
|
|
29
|
+
const locale = options.locale ?? getLocale()
|
|
30
|
+
trackMessageCall("login_hello", locale)
|
|
31
|
+
if (locale === "en") return en_login_hello(inputs)
|
|
32
|
+
return pl_login_hello(inputs)
|
|
33
|
+
};
|
|
34
|
+
export { login_hello as "login.hello" }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { login_please_login as login.please_login };
|
|
2
|
+
/**
|
|
3
|
+
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
4
|
+
*
|
|
5
|
+
* - Changing this function will be over-written by the next build.
|
|
6
|
+
*
|
|
7
|
+
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
8
|
+
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
9
|
+
*
|
|
10
|
+
* @param {{}} inputs
|
|
11
|
+
* @param {{ locale?: "en" | "pl" }} options
|
|
12
|
+
* @returns {string}
|
|
13
|
+
*/
|
|
14
|
+
declare function login_please_login(inputs?: {}, options?: {
|
|
15
|
+
locale?: "en" | "pl";
|
|
16
|
+
}): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
|
|
3
|
+
|
|
4
|
+
const en_login_please_login = /** @type {(inputs: {}) => string} */ () => {
|
|
5
|
+
return `Login to your account`
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const pl_login_please_login = /** @type {(inputs: {}) => string} */ () => {
|
|
9
|
+
return `Zaloguj się na swoje konto`
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
|
|
14
|
+
*
|
|
15
|
+
* - Changing this function will be over-written by the next build.
|
|
16
|
+
*
|
|
17
|
+
* - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
|
|
18
|
+
* use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
|
|
19
|
+
*
|
|
20
|
+
* @param {{}} inputs
|
|
21
|
+
* @param {{ locale?: "en" | "pl" }} options
|
|
22
|
+
* @returns {string}
|
|
23
|
+
*/
|
|
24
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
25
|
+
const login_please_login = (inputs = {}, options = {}) => {
|
|
26
|
+
if (experimentalMiddlewareLocaleSplitting && isServer === false) {
|
|
27
|
+
return /** @type {any} */ (globalThis).__paraglide_ssr.login_please_login(inputs)
|
|
28
|
+
}
|
|
29
|
+
const locale = options.locale ?? getLocale()
|
|
30
|
+
trackMessageCall("login_please_login", locale)
|
|
31
|
+
if (locale === "en") return en_login_please_login(inputs)
|
|
32
|
+
return pl_login_please_login(inputs)
|
|
33
|
+
};
|
|
34
|
+
export { login_please_login as "login.please_login" }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const update = {
|
|
2
|
+
version: '0.15.4',
|
|
3
|
+
date: '2026-04-21',
|
|
4
|
+
description: 'Forms: auto-scaffolded public submission endpoint + decoupled notification emails from submission success.',
|
|
5
|
+
features: [
|
|
6
|
+
'CLI scaffold (`pnpm includio scaffold admin`) now emits `src/routes/api/forms/[slug]/submit/+server.ts` — the public POST endpoint for form submissions. Previously each project had to hand-roll this file (the handler lives in the library, but SvelteKit does not load routes from `node_modules`). New projects get it out-of-the-box; existing projects can run `includio scaffold admin` to generate it without overwriting other admin files.',
|
|
7
|
+
'Added `ideas/health-check-module.md` — proposal for built-in `/api/health` + `/api/health/ready` endpoints, opt-in SMTP verify, and a ręczny "Test SMTP connection / Send test mail" section in the admin maintenance page. Context: diagnosing a silent SMTP misconfiguration in a live project required grepping through library internals; a one-click diagnostics panel would have surfaced the empty `EMAIL_HOST` immediately.'
|
|
8
|
+
],
|
|
9
|
+
fixes: [
|
|
10
|
+
'`createFormSubmission()` now keeps the notification-email call in a separate `try/catch` from the DB write. Before: if SMTP was misconfigured (empty `EMAIL_HOST` locally, unreachable relay, etc.) the whole operation returned `false` → endpoint responded `500 "Submission failed"` even though the submission was already persisted. After: DB failure still returns `false` (critical path); email failure is logged via `console.error` and the submission succeeds with `200`.'
|
|
11
|
+
],
|
|
12
|
+
breakingChanges: [],
|
|
13
|
+
notes: 'No SQL migration. No API signature changes. Existing projects that already have a hand-rolled `src/routes/api/forms/[slug]/submit/+server.ts` keep working — scaffold skips existing files unless `--force` is passed.'
|
|
14
|
+
};
|
package/dist/updates/index.js
CHANGED
|
@@ -48,7 +48,8 @@ import { update as update0150 } from './0.15.0/index.js';
|
|
|
48
48
|
import { update as update0151 } from './0.15.1/index.js';
|
|
49
49
|
import { update as update0152 } from './0.15.2/index.js';
|
|
50
50
|
import { update as update0153 } from './0.15.3/index.js';
|
|
51
|
-
|
|
51
|
+
import { update as update0154 } from './0.15.4/index.js';
|
|
52
|
+
export const updates = [update0065, update0066, update0067, update0068, update0069, update010, update011, update012, update013, update014, update015, update020, update022, update050, update051, update052, update053, update054, update055, update056, update057, update058, update060, update061, update062, update070, update071, update072, update073, update080, update090, update0100, update0110, update0120, update0130, update0131, update0132, update0133, update0134, update0140, update0141, update0142, update0143, update0144, update0145, update0146, update0150, update0151, update0152, update0153, update0154];
|
|
52
53
|
export const getUpdatesFrom = (fromVersion) => {
|
|
53
54
|
const fromParts = fromVersion.split('.').map(Number);
|
|
54
55
|
return updates.filter((update) => {
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const hello_world = /** @type {(inputs: { name: NonNullable<unknown> }) => string} */ (i) => {
|
|
5
|
-
return `Hello, ${i.name} from en!`
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const login_hello = /** @type {(inputs: {}) => string} */ () => {
|
|
9
|
-
return `Welcome back`
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const login_please_login = /** @type {(inputs: {}) => string} */ () => {
|
|
13
|
-
return `Login to your account`
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const hello_world = /** @type {(inputs: { name: NonNullable<unknown> }) => string} */ (i) => {
|
|
5
|
-
return `Hello, ${i.name} from pl!`
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const login_hello = /** @type {(inputs: {}) => string} */ () => {
|
|
9
|
-
return `Witaj ponownie`
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const login_please_login = /** @type {(inputs: {}) => string} */ () => {
|
|
13
|
-
return `Zaloguj się na swoje konto`
|
|
14
|
-
};
|