@flowselections/logistiek-engine 1.0.232 → 1.0.233
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/dist-lib/integrations/supabase/client.js +1 -1
- package/dist-lib/integrations/supabase/client.server.js +1 -1
- package/dist-lib/lib/autoSend.functions.js +3 -3
- package/dist-lib/lib/cartCoverage.functions.js +1 -1
- package/dist-lib/lib/floridayDocuments.functions.js +1 -1
- package/dist-lib/lib/floridayPush.functions.js +1 -1
- package/dist-lib/lib/loadCarrierPlanning.functions.js +1 -1
- package/dist-lib/lib/logisticsRecalcJob.functions.js +1 -1
- package/dist-lib/lib/logisticsRecalculate.functions.js +2 -2
- package/dist-lib/lib/moduleVersion.d.ts +1 -1
- package/dist-lib/lib/moduleVersion.js +1 -1
- package/dist-lib/lib/planPreview.functions.js +1 -1
- package/dist-lib/lib/plannerDiff.functions.js +1 -1
- package/dist-lib/lib/shellAdres.functions.js +2 -2
- package/package.json +2 -2
|
@@ -45,7 +45,7 @@ function createSupabaseClient() {
|
|
|
45
45
|
}
|
|
46
46
|
let _supabase;
|
|
47
47
|
// Import the supabase client like this:
|
|
48
|
-
// import { supabase } from "
|
|
48
|
+
// import { supabase } from "../../integrations/supabase/client.js";
|
|
49
49
|
export const supabase = new Proxy({}, {
|
|
50
50
|
get(_, prop, receiver) {
|
|
51
51
|
if (!_supabase)
|
|
@@ -20,7 +20,7 @@ function createSupabaseAdminClient() {
|
|
|
20
20
|
let _supabaseAdmin;
|
|
21
21
|
// Server-side Supabase client with service role - bypasses RLS
|
|
22
22
|
// SECURITY: Only use this for trusted server-side operations, never expose to client code
|
|
23
|
-
// Import like: import { supabaseAdmin } from "
|
|
23
|
+
// Import like: import { supabaseAdmin } from "../../integrations/supabase/client.server.js";
|
|
24
24
|
export const supabaseAdmin = new Proxy({}, {
|
|
25
25
|
get(_, prop, receiver) {
|
|
26
26
|
if (!_supabaseAdmin)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// src/lib/autoSend.functions.ts — Beheer: is de sleutel op te halen en is er een Shell-adres? (alleen ja/nee)
|
|
2
2
|
import { createServerFn } from "@tanstack/react-start";
|
|
3
3
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
4
|
-
import { readableServerErrors } from "
|
|
4
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
5
5
|
export const getAutoSendConfig = createServerFn({ method: "GET" })
|
|
6
6
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
7
7
|
.handler(async () => {
|
|
8
8
|
const { supabaseAdmin } = await import("../integrations/supabase/client.server.js");
|
|
9
|
-
const { leesShellAdres } = await import("
|
|
10
|
-
const { haalAutoSendSleutel } = await import("
|
|
9
|
+
const { leesShellAdres } = await import("../lib/autoSend.server.js");
|
|
10
|
+
const { haalAutoSendSleutel } = await import("../lib/centralSecrets.server.js");
|
|
11
11
|
const s = await haalAutoSendSleutel();
|
|
12
12
|
const adres = await leesShellAdres(supabaseAdmin);
|
|
13
13
|
const { data: ontbreekt } = await supabaseAdmin.rpc("logistics_auto_send_route_missing");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Alleen-lezen controle: staat elke bestelregel correct op een kar?
|
|
2
2
|
import { createServerFn } from "@tanstack/react-start";
|
|
3
3
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
4
|
-
import { readableServerErrors } from "
|
|
4
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
5
5
|
export const getCartCoverage = createServerFn({ method: "GET" })
|
|
6
6
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
7
7
|
.handler(async () => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ============================================================================
|
|
6
6
|
import { createServerFn } from "@tanstack/react-start";
|
|
7
7
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
8
|
-
import { readableServerErrors } from "
|
|
8
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
9
9
|
/** Actieve Floriday-koppeling voor de banner in het instellingenscherm. */
|
|
10
10
|
export const getFloridayConnection = createServerFn({ method: "GET" })
|
|
11
11
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
import { createServerFn } from "@tanstack/react-start";
|
|
5
5
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
6
|
-
import { readableServerErrors } from "
|
|
6
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
7
7
|
/** Zet een order opnieuw in de wachtrij (handmatig opnieuw proberen). */
|
|
8
8
|
export const retryFloridayPush = createServerFn({ method: "POST" })
|
|
9
9
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
import { createServerFn } from "@tanstack/react-start";
|
|
5
5
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
6
|
-
import { readableServerErrors } from "
|
|
6
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
7
7
|
export const replanOrderLoadCarriers = createServerFn({ method: "POST" })
|
|
8
8
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
9
9
|
.inputValidator((data) => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
import { createServerFn } from "@tanstack/react-start";
|
|
5
5
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
6
|
-
import { readableServerErrors } from "
|
|
6
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
7
7
|
export const startRecalcJob = createServerFn({ method: "POST" })
|
|
8
8
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
9
9
|
.inputValidator((data) => data ?? {})
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// ============================================================================
|
|
8
8
|
import { createServerFn } from "@tanstack/react-start";
|
|
9
9
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
10
|
-
import { readableServerErrors } from "
|
|
10
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
11
11
|
export const recalculateLogistics = createServerFn({ method: "POST" })
|
|
12
12
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
13
13
|
.inputValidator((data) => data ?? {})
|
|
@@ -27,7 +27,7 @@ export const recalculateLogistics = createServerFn({ method: "POST" })
|
|
|
27
27
|
args: { p_from: iso(today), p_to: iso(until) },
|
|
28
28
|
},
|
|
29
29
|
];
|
|
30
|
-
const { scheduleTasksPerOrder } = await import("
|
|
30
|
+
const { scheduleTasksPerOrder } = await import("../lib/scheduleTasks.server.js");
|
|
31
31
|
const steps = [await scheduleTasksPerOrder(context.supabase)];
|
|
32
32
|
for (const call of calls) {
|
|
33
33
|
const { error } = await context.supabase.rpc(call.fn, call.args);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const MODULE_VERSION = "1.0.
|
|
1
|
+
export declare const MODULE_VERSION = "1.0.233";
|
|
2
2
|
//# sourceMappingURL=moduleVersion.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatisch gegenereerd door prebuild:lib; niet handmatig aanpassen.
|
|
2
|
-
export const MODULE_VERSION = "1.0.
|
|
2
|
+
export const MODULE_VERSION = "1.0.233";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// geen karren, geen wachtrij, geen events, geen blokkades, geen bufferbesluit.
|
|
4
4
|
import { createServerFn } from "@tanstack/react-start";
|
|
5
5
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
6
|
-
import { readableServerErrors } from "
|
|
6
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
7
7
|
import { bouwPlanPreview } from "./planPreview.js";
|
|
8
8
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
9
9
|
export const logisticsPlanPreview = createServerFn({ method: "POST" })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Alleen-lezen overzicht van de vergelijkende planner (dry-run).
|
|
2
2
|
import { createServerFn } from "@tanstack/react-start";
|
|
3
3
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
4
|
-
import { readableServerErrors } from "
|
|
4
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
5
5
|
import { summarizeDiffRuns } from "./plannerDiff.js";
|
|
6
6
|
export const getPlannerDiffOverview = createServerFn({ method: "GET" })
|
|
7
7
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// ============================================================================
|
|
7
7
|
import { createServerFn } from "@tanstack/react-start";
|
|
8
8
|
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware.js";
|
|
9
|
-
import { readableServerErrors } from "
|
|
9
|
+
import { readableServerErrors } from "../lib/readableServerErrors.js";
|
|
10
10
|
const ROLLEN = ["admin", "superadmin", "developer"];
|
|
11
11
|
async function magBeheren(sb, userId) {
|
|
12
12
|
for (const rol of ROLLEN) {
|
|
@@ -48,7 +48,7 @@ export const startShellAdresControle = createServerFn({ method: "POST" })
|
|
|
48
48
|
export const registreerMinuutrondeSleutel = createServerFn({ method: "POST" })
|
|
49
49
|
.middleware([readableServerErrors, requireSupabaseAuth])
|
|
50
50
|
.handler(async () => {
|
|
51
|
-
const { minuutrondeStartProbleem } = await import("
|
|
51
|
+
const { minuutrondeStartProbleem } = await import("../lib/shellAdres.js");
|
|
52
52
|
const { supabaseAdmin } = await import("../integrations/supabase/client.server.js");
|
|
53
53
|
const sleutel = (process.env["SUPABASE_PUBLISHABLE_KEY"] ?? process.env["SUPABASE_ANON_KEY"] ?? "")
|
|
54
54
|
.replace(/^["']|["']$/g, "")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowselections/logistiek-engine",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.233",
|
|
4
4
|
"flowselections": {
|
|
5
5
|
"moduleId": "logistiek-engine",
|
|
6
6
|
"pages": [
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"@cloudflare/vite-plugin": "^1.25.5",
|
|
159
159
|
"@electric-sql/pglite": "^0.5.12",
|
|
160
160
|
"@eslint/js": "^9.32.0",
|
|
161
|
-
"@flowselections/core": "1.0.
|
|
161
|
+
"@flowselections/core": "1.0.37",
|
|
162
162
|
"@flowselections/floriday-authenticatie-module": "^1.0.51",
|
|
163
163
|
"@lovable.dev/vite-tanstack-config": "2.26.5",
|
|
164
164
|
"@rsbuild/core": "^1.0.0",
|