@walkeros/cli 3.0.0-next-1773236214827 → 3.0.1
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 +16 -3
- package/README.md +1 -1
- package/dist/cli.js +240 -242
- package/dist/examples/README.md +1 -1
- package/dist/examples/flow-complete.json +2 -2
- package/dist/examples/flow-order-complete.json +1 -1
- package/dist/examples/flow-selfhost-test.json +1 -1
- package/dist/examples/flow-simple.json +1 -1
- package/dist/examples/flow.json +1 -1
- package/dist/examples/server-collect.json +1 -1
- package/dist/examples/web-serve.json +1 -1
- package/dist/index.d.ts +23 -17
- package/dist/index.js +22 -22
- package/dist/index.js.map +1 -1
- package/examples/README.md +1 -1
- package/examples/flow-complete.json +2 -2
- package/examples/flow-order-complete.json +1 -1
- package/examples/flow-selfhost-test.json +1 -1
- package/examples/flow-simple.json +1 -1
- package/examples/flow.json +1 -1
- package/examples/server-collect.json +1 -1
- package/examples/web-serve.json +1 -1
- package/package.json +7 -6
package/dist/cli.js
CHANGED
|
@@ -18,43 +18,43 @@ function S(e4) {
|
|
|
18
18
|
function o2(r2) {
|
|
19
19
|
if (t2[r2]) return t2[r2];
|
|
20
20
|
n3.has(r2) && O(`Circular extends chain detected: ${[...n3, r2].join(" \u2192 ")}`);
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
if (
|
|
25
|
-
|
|
21
|
+
const s3 = e4[r2];
|
|
22
|
+
s3 || O(`Contract "${r2}" not found`), n3.add(r2);
|
|
23
|
+
let i2 = {};
|
|
24
|
+
if (s3.extends) {
|
|
25
|
+
i2 = (function(e5, t3) {
|
|
26
26
|
const n4 = {};
|
|
27
27
|
void 0 === e5.tagging && void 0 === t3.tagging || (n4.tagging = t3.tagging ?? e5.tagging);
|
|
28
28
|
void 0 === e5.description && void 0 === t3.description || (n4.description = t3.description ?? e5.description);
|
|
29
29
|
for (const o3 of x) {
|
|
30
|
-
const r3 = e5[o3],
|
|
31
|
-
r3 &&
|
|
30
|
+
const r3 = e5[o3], s4 = t3[o3];
|
|
31
|
+
r3 && s4 ? n4[o3] = A(r3, s4) : (r3 || s4) && (n4[o3] = { ...r3 || s4 });
|
|
32
32
|
}
|
|
33
33
|
if (e5.events || t3.events) {
|
|
34
34
|
const o3 = {}, r3 = /* @__PURE__ */ new Set([...Object.keys(e5.events || {}), ...Object.keys(t3.events || {})]);
|
|
35
35
|
for (const n5 of r3) {
|
|
36
|
-
const r4 = e5.events?.[n5] || {},
|
|
36
|
+
const r4 = e5.events?.[n5] || {}, s4 = t3.events?.[n5] || {}, i3 = /* @__PURE__ */ new Set([...Object.keys(r4), ...Object.keys(s4)]);
|
|
37
37
|
o3[n5] = {};
|
|
38
|
-
for (const e6 of
|
|
39
|
-
const t4 = r4[e6],
|
|
40
|
-
o3[n5][e6] = t4 &&
|
|
38
|
+
for (const e6 of i3) {
|
|
39
|
+
const t4 = r4[e6], i4 = s4[e6];
|
|
40
|
+
o3[n5][e6] = t4 && i4 ? A(t4, i4) : { ...t4 || i4 };
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
n4.events = o3;
|
|
44
44
|
}
|
|
45
45
|
return n4;
|
|
46
|
-
})(o2(
|
|
47
|
-
} else
|
|
48
|
-
if (delete
|
|
46
|
+
})(o2(s3.extends), s3);
|
|
47
|
+
} else i2 = { ...s3 };
|
|
48
|
+
if (delete i2.extends, i2.events && (i2.events = (function(e5) {
|
|
49
49
|
const t3 = {};
|
|
50
50
|
for (const n4 of Object.keys(e5)) if ("*" !== n4) {
|
|
51
51
|
t3[n4] = {};
|
|
52
52
|
for (const o3 of Object.keys(e5[n4] || {})) {
|
|
53
53
|
let r3 = {};
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
54
|
+
const s4 = e5["*"]?.["*"];
|
|
55
|
+
s4 && (r3 = A(r3, s4));
|
|
56
|
+
const i3 = e5["*"]?.[o3];
|
|
57
|
+
i3 && "*" !== o3 && (r3 = A(r3, i3));
|
|
58
58
|
const c3 = e5[n4]?.["*"];
|
|
59
59
|
c3 && "*" !== o3 && (r3 = A(r3, c3));
|
|
60
60
|
const a3 = e5[n4]?.[o3];
|
|
@@ -63,15 +63,15 @@ function S(e4) {
|
|
|
63
63
|
}
|
|
64
64
|
e5["*"] && (t3["*"] = { ...e5["*"] });
|
|
65
65
|
return t3;
|
|
66
|
-
})(
|
|
66
|
+
})(i2.events)), i2.events) {
|
|
67
67
|
const e5 = {};
|
|
68
|
-
for (const [t3, n4] of Object.entries(
|
|
68
|
+
for (const [t3, n4] of Object.entries(i2.events)) {
|
|
69
69
|
e5[t3] = {};
|
|
70
70
|
for (const [o3, r3] of Object.entries(n4)) e5[t3][o3] = E(r3);
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
i2.events = e5;
|
|
73
73
|
}
|
|
74
|
-
return n3.delete(r2), t2[r2] =
|
|
74
|
+
return n3.delete(r2), t2[r2] = i2, i2;
|
|
75
75
|
}
|
|
76
76
|
for (const t3 of Object.keys(e4)) o2(t3);
|
|
77
77
|
return t2;
|
|
@@ -79,8 +79,8 @@ function S(e4) {
|
|
|
79
79
|
function A(e4, t2) {
|
|
80
80
|
const n3 = { ...e4 };
|
|
81
81
|
for (const o2 of Object.keys(t2)) {
|
|
82
|
-
const r2 = e4[o2],
|
|
83
|
-
"required" === o2 && Array.isArray(r2) && Array.isArray(
|
|
82
|
+
const r2 = e4[o2], s3 = t2[o2];
|
|
83
|
+
"required" === o2 && Array.isArray(r2) && Array.isArray(s3) ? n3[o2] = [.../* @__PURE__ */ new Set([...r2, ...s3])] : N(r2) && N(s3) ? n3[o2] = A(r2, s3) : n3[o2] = s3;
|
|
84
84
|
}
|
|
85
85
|
return n3;
|
|
86
86
|
}
|
|
@@ -102,39 +102,39 @@ function _(...e4) {
|
|
|
102
102
|
for (const n3 of e4) n3 && Object.assign(t2, n3);
|
|
103
103
|
return t2;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function C(e4, t2, n3) {
|
|
106
106
|
const o2 = t2.split(".");
|
|
107
107
|
let r2 = e4;
|
|
108
108
|
for (let e5 = 0; e5 < o2.length; e5++) {
|
|
109
|
-
const
|
|
109
|
+
const s3 = o2[e5];
|
|
110
110
|
if (null == r2 || "object" != typeof r2) {
|
|
111
111
|
const r3 = o2.slice(0, e5).join(".");
|
|
112
|
-
O(`Path "${t2}" not found in "${n3}": "${
|
|
112
|
+
O(`Path "${t2}" not found in "${n3}": "${s3}" does not exist${r3 ? ` in "${r3}"` : ""}`);
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
if (!(
|
|
114
|
+
const i2 = r2;
|
|
115
|
+
if (!(s3 in i2)) {
|
|
116
116
|
const r3 = o2.slice(0, e5).join(".");
|
|
117
|
-
O(`Path "${t2}" not found in "${n3}": "${
|
|
117
|
+
O(`Path "${t2}" not found in "${n3}": "${s3}" does not exist${r3 ? ` in "${r3}"` : ""}`);
|
|
118
118
|
}
|
|
119
|
-
r2 = s3
|
|
119
|
+
r2 = i2[s3];
|
|
120
120
|
}
|
|
121
121
|
return r2;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function R(e4, t2, n3, o2, r2) {
|
|
124
124
|
if ("string" == typeof e4) {
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
const e5 =
|
|
125
|
+
const s3 = e4.match(/^\$def\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.(.+))?$/);
|
|
126
|
+
if (s3) {
|
|
127
|
+
const e5 = s3[1], i3 = s3[2];
|
|
128
128
|
void 0 === n3[e5] && O(`Definition "${e5}" not found`);
|
|
129
|
-
let c4 =
|
|
130
|
-
return
|
|
129
|
+
let c4 = R(n3[e5], t2, n3, o2, r2);
|
|
130
|
+
return i3 && (c4 = C(c4, i3, `$def.${e5}`)), c4;
|
|
131
131
|
}
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
const e5 =
|
|
132
|
+
const i2 = e4.match(/^\$contract\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.(.+))?$/);
|
|
133
|
+
if (i2 && r2) {
|
|
134
|
+
const e5 = i2[1], t3 = i2[2];
|
|
135
135
|
e5 in r2 || O(`Contract "${e5}" not found`);
|
|
136
136
|
let n4 = r2[e5];
|
|
137
|
-
return t3 && (n4 =
|
|
137
|
+
return t3 && (n4 = C(n4, t3, `$contract.${e5}`)), n4;
|
|
138
138
|
}
|
|
139
139
|
let c3 = e4.replace(/\$var\.([a-zA-Z_][a-zA-Z0-9_]*)/g, (e5, n4) => {
|
|
140
140
|
if (void 0 !== t2[n4]) return String(t2[n4]);
|
|
@@ -142,11 +142,11 @@ function C(e4, t2, n3, o2, r2) {
|
|
|
142
142
|
});
|
|
143
143
|
return c3 = c3.replace(/\$env\.([a-zA-Z_][a-zA-Z0-9_]*)(?::([^"}\s]*))?/g, (e5, t3, n4) => o2?.deferred ? void 0 !== n4 ? `${T}${t3}:${n4}` : `${T}${t3}` : "undefined" != typeof process && void 0 !== process.env?.[t3] ? process.env[t3] : void 0 !== n4 ? n4 : void O(`Environment variable "${t3}" not found and no default provided`)), c3;
|
|
144
144
|
}
|
|
145
|
-
if (Array.isArray(e4)) return e4.map((e5) =>
|
|
145
|
+
if (Array.isArray(e4)) return e4.map((e5) => R(e5, t2, n3, o2, r2));
|
|
146
146
|
if (null !== e4 && "object" == typeof e4) {
|
|
147
|
-
const
|
|
148
|
-
for (const [
|
|
149
|
-
return
|
|
147
|
+
const s3 = {};
|
|
148
|
+
for (const [i2, c3] of Object.entries(e4)) s3[i2] = R(c3, t2, n3, o2, r2);
|
|
149
|
+
return s3;
|
|
150
150
|
}
|
|
151
151
|
return e4;
|
|
152
152
|
}
|
|
@@ -164,33 +164,33 @@ function H(e4, t2, n3) {
|
|
|
164
164
|
t2 || (1 === o2.length ? t2 = o2[0] : O(`Multiple flows found (${o2.join(", ")}). Please specify a flow.`));
|
|
165
165
|
const r2 = e4.flows[t2];
|
|
166
166
|
r2 || O(`Flow "${t2}" not found. Available: ${o2.join(", ")}`);
|
|
167
|
-
const
|
|
168
|
-
let
|
|
167
|
+
const s3 = JSON.parse(JSON.stringify(r2));
|
|
168
|
+
let i2;
|
|
169
169
|
if (e4.contract) {
|
|
170
170
|
const t3 = P(e4.variables, r2.variables), o3 = _(e4.definitions, r2.definitions);
|
|
171
|
-
|
|
171
|
+
i2 = S(R(e4.contract, t3, o3, n3));
|
|
172
172
|
}
|
|
173
|
-
if (
|
|
174
|
-
const c3 = P(e4.variables, r2.variables, o3.variables), a3 = _(e4.definitions, r2.definitions, o3.definitions), u3 =
|
|
175
|
-
|
|
173
|
+
if (s3.sources) for (const [t3, o3] of Object.entries(s3.sources)) {
|
|
174
|
+
const c3 = P(e4.variables, r2.variables, o3.variables), a3 = _(e4.definitions, r2.definitions, o3.definitions), u3 = R(o3.config, c3, a3, n3, i2), f2 = R(o3.env, c3, a3, n3, i2), l2 = z(o3.package, o3.code, s3.packages), p2 = "string" == typeof o3.code || "object" == typeof o3.code ? o3.code : void 0, d2 = l2 || p2;
|
|
175
|
+
s3.sources[t3] = { package: o3.package, config: u3, env: f2, primary: o3.primary, variables: o3.variables, definitions: o3.definitions, next: o3.next, code: d2 };
|
|
176
176
|
}
|
|
177
|
-
if (
|
|
178
|
-
const c3 = P(e4.variables, r2.variables, o3.variables), a3 = _(e4.definitions, r2.definitions, o3.definitions), u3 =
|
|
179
|
-
|
|
177
|
+
if (s3.destinations) for (const [t3, o3] of Object.entries(s3.destinations)) {
|
|
178
|
+
const c3 = P(e4.variables, r2.variables, o3.variables), a3 = _(e4.definitions, r2.definitions, o3.definitions), u3 = R(o3.config, c3, a3, n3, i2), f2 = R(o3.env, c3, a3, n3, i2), l2 = z(o3.package, o3.code, s3.packages), p2 = "string" == typeof o3.code || "object" == typeof o3.code ? o3.code : void 0, d2 = l2 || p2;
|
|
179
|
+
s3.destinations[t3] = { package: o3.package, config: u3, env: f2, variables: o3.variables, definitions: o3.definitions, before: o3.before, code: d2 };
|
|
180
180
|
}
|
|
181
|
-
if (
|
|
182
|
-
const c3 = P(e4.variables, r2.variables, o3.variables), a3 = _(e4.definitions, r2.definitions, o3.definitions), u3 =
|
|
183
|
-
|
|
181
|
+
if (s3.stores) for (const [t3, o3] of Object.entries(s3.stores)) {
|
|
182
|
+
const c3 = P(e4.variables, r2.variables, o3.variables), a3 = _(e4.definitions, r2.definitions, o3.definitions), u3 = R(o3.config, c3, a3, n3, i2), f2 = R(o3.env, c3, a3, n3, i2), l2 = z(o3.package, o3.code, s3.packages), p2 = "string" == typeof o3.code || "object" == typeof o3.code ? o3.code : void 0, d2 = l2 || p2;
|
|
183
|
+
s3.stores[t3] = { package: o3.package, config: u3, env: f2, variables: o3.variables, definitions: o3.definitions, code: d2 };
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
186
|
-
const c3 = P(e4.variables, r2.variables, o3.variables), a3 = _(e4.definitions, r2.definitions, o3.definitions), u3 =
|
|
187
|
-
|
|
185
|
+
if (s3.transformers) for (const [t3, o3] of Object.entries(s3.transformers)) {
|
|
186
|
+
const c3 = P(e4.variables, r2.variables, o3.variables), a3 = _(e4.definitions, r2.definitions, o3.definitions), u3 = R(o3.config, c3, a3, n3, i2), f2 = R(o3.env, c3, a3, n3, i2), l2 = z(o3.package, o3.code, s3.packages), p2 = "string" == typeof o3.code || "object" == typeof o3.code ? o3.code : void 0, d2 = l2 || p2;
|
|
187
|
+
s3.transformers[t3] = { package: o3.package, config: u3, env: f2, variables: o3.variables, definitions: o3.definitions, next: o3.next, code: d2 };
|
|
188
188
|
}
|
|
189
|
-
if (
|
|
190
|
-
const t3 = P(e4.variables, r2.variables), o3 = _(e4.definitions, r2.definitions), c3 =
|
|
191
|
-
|
|
189
|
+
if (s3.collector) {
|
|
190
|
+
const t3 = P(e4.variables, r2.variables), o3 = _(e4.definitions, r2.definitions), c3 = R(s3.collector, t3, o3, n3, i2);
|
|
191
|
+
s3.collector = c3;
|
|
192
192
|
}
|
|
193
|
-
return
|
|
193
|
+
return s3;
|
|
194
194
|
}
|
|
195
195
|
function D(e4) {
|
|
196
196
|
return void 0 !== e4.web ? "web" : void 0 !== e4.server ? "server" : void O("Settings must have web or server key");
|
|
@@ -198,8 +198,8 @@ function D(e4) {
|
|
|
198
198
|
function W(e4, t2 = {}, n3 = {}) {
|
|
199
199
|
n3 = { ...I, ...n3 };
|
|
200
200
|
const o2 = Object.entries(t2).reduce((t3, [o3, r2]) => {
|
|
201
|
-
const
|
|
202
|
-
return n3.merge && Array.isArray(
|
|
201
|
+
const s3 = e4[o3];
|
|
202
|
+
return n3.merge && Array.isArray(s3) && Array.isArray(r2) ? t3[o3] = r2.reduce((e5, t4) => e5.includes(t4) ? e5 : [...e5, t4], [...s3]) : (n3.extend || o3 in e4) && (t3[o3] = r2), t3;
|
|
203
203
|
}, {});
|
|
204
204
|
return n3.shallow ? { ...e4, ...o2 } : (Object.assign(e4, o2), e4);
|
|
205
205
|
}
|
|
@@ -253,12 +253,12 @@ function Y(e4, t2 = "", n3) {
|
|
|
253
253
|
for (let e5 = 0; e5 < o2.length; e5++) {
|
|
254
254
|
const t3 = o2[e5];
|
|
255
255
|
if ("*" === t3 && U(r2)) {
|
|
256
|
-
const t4 = o2.slice(e5 + 1).join("."),
|
|
256
|
+
const t4 = o2.slice(e5 + 1).join("."), s3 = [];
|
|
257
257
|
for (const e6 of r2) {
|
|
258
258
|
const o3 = Y(e6, t4, n3);
|
|
259
|
-
|
|
259
|
+
s3.push(o3);
|
|
260
260
|
}
|
|
261
|
-
return
|
|
261
|
+
return s3;
|
|
262
262
|
}
|
|
263
263
|
if (r2 = r2 instanceof Object ? r2[t3] : void 0, void 0 === r2) break;
|
|
264
264
|
}
|
|
@@ -267,32 +267,32 @@ function Y(e4, t2 = "", n3) {
|
|
|
267
267
|
function ee(e4, t2, n3) {
|
|
268
268
|
if (!q(e4)) return e4;
|
|
269
269
|
const o2 = Q(e4), r2 = t2.split(".");
|
|
270
|
-
let
|
|
270
|
+
let s3 = o2;
|
|
271
271
|
for (let e5 = 0; e5 < r2.length; e5++) {
|
|
272
272
|
const t3 = r2[e5];
|
|
273
|
-
e5 === r2.length - 1 ?
|
|
273
|
+
e5 === r2.length - 1 ? s3[t3] = n3 : (t3 in s3 && "object" == typeof s3[t3] && null !== s3[t3] || (s3[t3] = {}), s3 = s3[t3]);
|
|
274
274
|
}
|
|
275
275
|
return o2;
|
|
276
276
|
}
|
|
277
277
|
function ne(e4, t2 = {}, n3 = {}) {
|
|
278
278
|
const o2 = { ...t2, ...n3 }, r2 = {};
|
|
279
|
-
let
|
|
279
|
+
let s3 = !e4 || 0 === Object.keys(e4).length;
|
|
280
280
|
return Object.keys(o2).forEach((t3) => {
|
|
281
|
-
o2[t3] && (r2[t3] = true, e4 && e4[t3] && (
|
|
282
|
-
}), !!
|
|
281
|
+
o2[t3] && (r2[t3] = true, e4 && e4[t3] && (s3 = true));
|
|
282
|
+
}), !!s3 && r2;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function ie(e4 = 6) {
|
|
285
285
|
let t2 = "";
|
|
286
286
|
for (let n3 = 36; t2.length < e4; ) t2 += (Math.random() * n3 | 0).toString(n3);
|
|
287
287
|
return t2;
|
|
288
288
|
}
|
|
289
289
|
function ae(e4, t2 = 1e3, n3 = false) {
|
|
290
|
-
let o2, r2 = null,
|
|
291
|
-
return (...
|
|
292
|
-
const a3 = n3 && !
|
|
290
|
+
let o2, r2 = null, s3 = false;
|
|
291
|
+
return (...i2) => new Promise((c3) => {
|
|
292
|
+
const a3 = n3 && !s3;
|
|
293
293
|
r2 && clearTimeout(r2), r2 = setTimeout(() => {
|
|
294
|
-
r2 = null, n3 && !
|
|
295
|
-
}, t2), a3 && (
|
|
294
|
+
r2 = null, n3 && !s3 || (o2 = e4(...i2), c3(o2));
|
|
295
|
+
}, t2), a3 && (s3 = true, o2 = e4(...i2), c3(o2));
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
function fe(e4) {
|
|
@@ -308,13 +308,13 @@ function de(e4 = {}) {
|
|
|
308
308
|
})(e4.level) : 0, handler: e4.handler, jsonHandler: e4.jsonHandler, scope: [] });
|
|
309
309
|
}
|
|
310
310
|
function ge(e4) {
|
|
311
|
-
const { level: t2, handler: n3, jsonHandler: o2, scope: r2 } = e4,
|
|
311
|
+
const { level: t2, handler: n3, jsonHandler: o2, scope: r2 } = e4, s3 = (e5, o3, s4) => {
|
|
312
312
|
if (e5 <= t2) {
|
|
313
|
-
const t3 = le(o3,
|
|
313
|
+
const t3 = le(o3, s4);
|
|
314
314
|
n3 ? n3(e5, t3.message, t3.context, r2, pe) : pe(e5, t3.message, t3.context, r2);
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
|
-
return { error: (e5, t3) =>
|
|
317
|
+
return { error: (e5, t3) => s3(0, e5, t3), warn: (e5, t3) => s3(1, e5, t3), info: (e5, t3) => s3(2, e5, t3), debug: (e5, t3) => s3(3, e5, t3), throw: (e5, t3) => {
|
|
318
318
|
const o3 = le(e5, t3);
|
|
319
319
|
throw n3 ? n3(0, o3.message, o3.context, r2, pe) : pe(0, o3.message, o3.context, r2), new Error(o3.message);
|
|
320
320
|
}, json: (e5) => {
|
|
@@ -354,13 +354,13 @@ function he(e4, t2, n3) {
|
|
|
354
354
|
async function we(e4, t2) {
|
|
355
355
|
const [n3, o2] = (e4.name || "").split(" ");
|
|
356
356
|
if (!t2 || !n3 || !o2) return {};
|
|
357
|
-
let r2,
|
|
357
|
+
let r2, s3 = "", i2 = n3, c3 = o2;
|
|
358
358
|
const a3 = (t3) => {
|
|
359
359
|
if (t3) return (t3 = U(t3) ? t3 : [t3]).find((t4) => !t4.condition || t4.condition(e4));
|
|
360
360
|
};
|
|
361
|
-
t2[
|
|
362
|
-
const u3 = t2[
|
|
363
|
-
return u3 && (u3[c3] || (c3 = "*"), r2 = a3(u3[c3])), r2 || (
|
|
361
|
+
t2[i2] || (i2 = "*");
|
|
362
|
+
const u3 = t2[i2];
|
|
363
|
+
return u3 && (u3[c3] || (c3 = "*"), r2 = a3(u3[c3])), r2 || (i2 = "*", c3 = "*", r2 = a3(t2[i2]?.[c3])), r2 && (s3 = `${i2} ${c3}`), { eventMapping: r2, mappingKey: s3 };
|
|
364
364
|
}
|
|
365
365
|
async function je(e4, t2 = {}, n3 = {}) {
|
|
366
366
|
if (!V(e4)) return;
|
|
@@ -372,21 +372,21 @@ async function je(e4, t2 = {}, n3 = {}) {
|
|
|
372
372
|
}
|
|
373
373
|
async function ke(e4, t2, n3 = {}) {
|
|
374
374
|
const { collector: o2, consent: r2 } = n3;
|
|
375
|
-
return (U(t2) ? t2 : [t2]).reduce(async (t3,
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
378
|
-
const c3 = X(
|
|
375
|
+
return (U(t2) ? t2 : [t2]).reduce(async (t3, s3) => {
|
|
376
|
+
const i2 = await t3;
|
|
377
|
+
if (i2) return i2;
|
|
378
|
+
const c3 = X(s3) ? { key: s3 } : s3;
|
|
379
379
|
if (!Object.keys(c3).length) return;
|
|
380
380
|
const { condition: a3, consent: u3, fn: f2, key: l2, loop: p2, map: d2, set: g2, validate: m2, value: b2 } = c3;
|
|
381
|
-
if (a3 && !await he(a3)(e4,
|
|
381
|
+
if (a3 && !await he(a3)(e4, s3, o2)) return;
|
|
382
382
|
if (u3 && !ne(u3, r2)) return b2;
|
|
383
383
|
let y2 = V(b2) ? b2 : e4;
|
|
384
|
-
if (f2 && (y2 = await he(f2)(e4,
|
|
384
|
+
if (f2 && (y2 = await he(f2)(e4, s3, n3)), l2 && (y2 = Y(e4, l2, b2)), p2) {
|
|
385
385
|
const [t4, o3] = p2, r3 = "this" === t4 ? [e4] : await je(e4, t4, n3);
|
|
386
386
|
U(r3) && (y2 = (await Promise.all(r3.map((e5) => je(e5, o3, n3)))).filter(V));
|
|
387
387
|
} else d2 ? y2 = await Object.entries(d2).reduce(async (t4, [o3, r3]) => {
|
|
388
|
-
const
|
|
389
|
-
return V(
|
|
388
|
+
const s4 = await t4, i3 = await je(e4, r3, n3);
|
|
389
|
+
return V(i3) && (s4[o3] = i3), s4;
|
|
390
390
|
}, Promise.resolve({})) : g2 && (y2 = await Promise.all(g2.map((t4) => ke(e4, t4, n3))));
|
|
391
391
|
m2 && !await he(m2)(y2) && (y2 = void 0);
|
|
392
392
|
const v2 = ye(y2);
|
|
@@ -403,39 +403,39 @@ async function Oe(e4, t2, n3) {
|
|
|
403
403
|
const r3 = await je(e4, o3, { collector: n3 });
|
|
404
404
|
e4 = ee(e4, t3, r3);
|
|
405
405
|
}));
|
|
406
|
-
let
|
|
406
|
+
let s3 = t2.data && await je(e4, t2.data, { collector: n3 });
|
|
407
407
|
if (o2) {
|
|
408
|
-
if (o2.ignore) return { event: e4, data:
|
|
408
|
+
if (o2.ignore) return { event: e4, data: s3, mapping: o2, mappingKey: r2, ignore: true };
|
|
409
409
|
if (o2.name && (e4.name = o2.name), o2.data) {
|
|
410
410
|
const t3 = o2.data && await je(e4, o2.data, { collector: n3 });
|
|
411
|
-
|
|
411
|
+
s3 = q(s3) && q(t3) ? W(s3, t3) : t3;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
return { event: e4, data:
|
|
414
|
+
return { event: e4, data: s3, mapping: o2, mappingKey: r2, ignore: false };
|
|
415
415
|
}
|
|
416
416
|
function Te(e4, t2, n3) {
|
|
417
417
|
return function(...o2) {
|
|
418
418
|
let r2;
|
|
419
|
-
const
|
|
420
|
-
return r2 =
|
|
419
|
+
const s3 = "post" + t2, i2 = n3["pre" + t2], c3 = n3[s3];
|
|
420
|
+
return r2 = i2 ? i2({ fn: e4 }, ...o2) : e4(...o2), c3 && (r2 = c3({ fn: e4, result: r2 }, ...o2)), r2;
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
423
|
async function Ze(e4, t2) {
|
|
424
|
-
const n3 = t2?.version || "latest", o2 = `https://cdn.jsdelivr.net/npm/${e4}@${n3}`, r2 = new AbortController(),
|
|
424
|
+
const n3 = t2?.version || "latest", o2 = `https://cdn.jsdelivr.net/npm/${e4}@${n3}`, r2 = new AbortController(), s3 = setTimeout(() => r2.abort(), t2?.timeout || 1e4);
|
|
425
425
|
try {
|
|
426
426
|
const t3 = await fetch(`${o2}/package.json`, { signal: r2.signal });
|
|
427
427
|
if (!t3.ok) throw new Error(`Package "${e4}" not found on npm (HTTP ${t3.status})`);
|
|
428
|
-
const
|
|
429
|
-
if (!
|
|
430
|
-
const c3 = await
|
|
428
|
+
const s4 = await t3.json(), i2 = await fetch(`${o2}/${Le}`, { signal: r2.signal });
|
|
429
|
+
if (!i2.ok) throw new Error(`walkerOS.json not found at ${Le} (HTTP ${i2.status}). This package may not support the walkerOS.json convention yet.`);
|
|
430
|
+
const c3 = await i2.json(), a3 = c3.$meta || {}, u3 = c3.schemas || {}, f2 = c3.examples || {}, l2 = c3.hints, p2 = l2 ? Object.keys(l2) : [], d2 = [], g2 = f2.step || {};
|
|
431
431
|
for (const [e5, t4] of Object.entries(g2)) {
|
|
432
432
|
const n4 = t4, o3 = { name: e5 };
|
|
433
433
|
n4?.description && (o3.description = n4.description), d2.push(o3);
|
|
434
434
|
}
|
|
435
435
|
const m2 = a3.docs, b2 = a3.source;
|
|
436
|
-
return { packageName: e4, version:
|
|
436
|
+
return { packageName: e4, version: s4.version || n3, description: s4.description, type: a3.type, platform: a3.platform, schemas: u3, examples: f2, ...m2 ? { docs: m2 } : {}, ...b2 ? { source: b2 } : {}, ...l2 && Object.keys(l2).length > 0 ? { hints: l2 } : {}, hintKeys: p2, exampleSummaries: d2 };
|
|
437
437
|
} finally {
|
|
438
|
-
clearTimeout(
|
|
438
|
+
clearTimeout(s3);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
async function Ve(e4, t2) {
|
|
@@ -457,8 +457,8 @@ var init_dist = __esm({
|
|
|
457
457
|
T = "__WALKEROS_ENV:";
|
|
458
458
|
I = { merge: true, shallow: true, extend: true };
|
|
459
459
|
pe = (e4, t2, n3, o2) => {
|
|
460
|
-
const r2 = `${a[e4]}${o2.length > 0 ? ` [${o2.join(":")}]` : ""}`,
|
|
461
|
-
|
|
460
|
+
const r2 = `${a[e4]}${o2.length > 0 ? ` [${o2.join(":")}]` : ""}`, s3 = Object.keys(n3).length > 0, i2 = 0 === e4 ? console.error : 1 === e4 ? console.warn : console.log;
|
|
461
|
+
s3 ? i2(r2, t2, n3) : i2(r2, t2);
|
|
462
462
|
};
|
|
463
463
|
Le = "dist/walkerOS.json";
|
|
464
464
|
}
|
|
@@ -15428,19 +15428,19 @@ function L2(e4) {
|
|
|
15428
15428
|
function q2(e4) {
|
|
15429
15429
|
return external_exports.object({ consent: e4.optional().describe("Required consent states") }).partial();
|
|
15430
15430
|
}
|
|
15431
|
-
function
|
|
15432
|
-
return
|
|
15431
|
+
function ti(e4) {
|
|
15432
|
+
return ii.parse(e4);
|
|
15433
15433
|
}
|
|
15434
|
-
function
|
|
15435
|
-
return
|
|
15434
|
+
function oi(e4) {
|
|
15435
|
+
return ii.safeParse(e4);
|
|
15436
15436
|
}
|
|
15437
|
-
function
|
|
15437
|
+
function ri(e4) {
|
|
15438
15438
|
return ni.parse(e4);
|
|
15439
15439
|
}
|
|
15440
|
-
function
|
|
15440
|
+
function ai(e4) {
|
|
15441
15441
|
return ni.safeParse(e4);
|
|
15442
15442
|
}
|
|
15443
|
-
function
|
|
15443
|
+
function Si(e4) {
|
|
15444
15444
|
let n3;
|
|
15445
15445
|
try {
|
|
15446
15446
|
n3 = JSON.parse(e4);
|
|
@@ -15449,7 +15449,7 @@ function wi(e4) {
|
|
|
15449
15449
|
if (e5 instanceof SyntaxError) {
|
|
15450
15450
|
const i4 = e5.message.match(/position\s+(\d+)/);
|
|
15451
15451
|
if (i4) {
|
|
15452
|
-
return
|
|
15452
|
+
return yi(n5, parseInt(i4[1], 10));
|
|
15453
15453
|
}
|
|
15454
15454
|
const t4 = e5.message.match(/line\s+(\d+)\s+column\s+(\d+)/);
|
|
15455
15455
|
if (t4) return { line: parseInt(t4[1], 10), column: parseInt(t4[2], 10) };
|
|
@@ -15458,39 +15458,39 @@ function wi(e4) {
|
|
|
15458
15458
|
})(n4, e4);
|
|
15459
15459
|
return { valid: false, errors: [{ message: n4 instanceof Error ? n4.message : "Invalid JSON", severity: "error", line: i3, column: t3 }], warnings: [] };
|
|
15460
15460
|
}
|
|
15461
|
-
const i2 = [], t2 = [], o2 =
|
|
15461
|
+
const i2 = [], t2 = [], o2 = ii.safeParse(n3);
|
|
15462
15462
|
if (!o2.success) for (const n4 of o2.error.issues) {
|
|
15463
|
-
const t3 = n4.path.join("."), o3 =
|
|
15463
|
+
const t3 = n4.path.join("."), o3 = ki(e4, n4.path);
|
|
15464
15464
|
i2.push({ message: n4.message, severity: "error", path: t3 || "root", ...o3 });
|
|
15465
15465
|
}
|
|
15466
15466
|
const r2 = (function(e5) {
|
|
15467
|
-
if (!(
|
|
15468
|
-
const n4 = {}, i3 = {}, t3 = [], o3 = [], r3 = [],
|
|
15467
|
+
if (!(Ci(e5) && "version" in e5 && "flows" in e5 && Ci(e5.flows))) return;
|
|
15468
|
+
const n4 = {}, i3 = {}, t3 = [], o3 = [], r3 = [], a3 = [], s3 = [];
|
|
15469
15469
|
let c3;
|
|
15470
|
-
|
|
15471
|
-
if (!
|
|
15470
|
+
xi(n4, e5.variables), Ji(i3, e5.definitions), (function(e6, n5) {
|
|
15471
|
+
if (!Ci(n5)) return;
|
|
15472
15472
|
for (const [, i4] of Object.entries(n5)) {
|
|
15473
|
-
if (!
|
|
15473
|
+
if (!Ci(i4)) continue;
|
|
15474
15474
|
const n6 = i4.events;
|
|
15475
|
-
if (
|
|
15476
|
-
if (!
|
|
15475
|
+
if (Ci(n6)) for (const [i5, t4] of Object.entries(n6)) {
|
|
15476
|
+
if (!Ci(t4)) continue;
|
|
15477
15477
|
const n7 = e6.find((e7) => e7.entity === i5), o4 = Object.keys(t4);
|
|
15478
15478
|
if (n7) for (const e7 of o4) n7.actions.includes(e7) || n7.actions.push(e7);
|
|
15479
15479
|
else e6.push({ entity: i5, actions: o4 });
|
|
15480
15480
|
}
|
|
15481
15481
|
}
|
|
15482
|
-
})(
|
|
15483
|
-
for (const
|
|
15484
|
-
c3 || ("web" in
|
|
15482
|
+
})(s3, e5.contract);
|
|
15483
|
+
for (const s4 of Object.values(e5.flows)) if (Ci(s4)) {
|
|
15484
|
+
c3 || ("web" in s4 ? c3 = "web" : "server" in s4 && (c3 = "server")), xi(n4, s4.variables), Ji(i3, s4.definitions);
|
|
15485
15485
|
for (const e6 of ["sources", "destinations", "transformers"]) {
|
|
15486
15486
|
const l3 = "sources" === e6 ? "source" : "destinations" === e6 ? "destination" : "transformer", d2 = "sources" === e6 ? t3 : "destinations" === e6 ? o3 : r3;
|
|
15487
|
-
if (
|
|
15487
|
+
if (Ci(s4[e6])) for (const [t4, o4] of Object.entries(s4[e6])) d2.push(t4), Ci(o4) && (xi(n4, o4.variables), Ji(i3, o4.definitions), "string" == typeof o4.package && a3.push({ package: o4.package, shortName: t4, type: l3, platform: c3 || "web" }));
|
|
15488
15488
|
}
|
|
15489
15489
|
}
|
|
15490
15490
|
const l2 = { variables: n4, definitions: i3, stepNames: { sources: t3, destinations: o3, transformers: r3 } };
|
|
15491
15491
|
c3 && (l2.platform = c3);
|
|
15492
|
-
|
|
15493
|
-
|
|
15492
|
+
a3.length > 0 && (l2.packages = a3);
|
|
15493
|
+
s3.length > 0 && (l2.contract = s3);
|
|
15494
15494
|
return l2;
|
|
15495
15495
|
})(n3);
|
|
15496
15496
|
if (r2) {
|
|
@@ -15500,7 +15500,7 @@ function wi(e4) {
|
|
|
15500
15500
|
const t3 = /\$var\.(\w+)/g;
|
|
15501
15501
|
let o3;
|
|
15502
15502
|
for (; null !== (o3 = t3.exec(e5)); ) if (!(o3[1] in n5.variables)) {
|
|
15503
|
-
const t4 =
|
|
15503
|
+
const t4 = wi(e5, o3.index, o3[0].length);
|
|
15504
15504
|
i3.push({ message: `Unknown variable "$var.${o3[1]}". Defined: ${Object.keys(n5.variables).join(", ") || "none"}`, severity: "warning", path: `$var.${o3[1]}`, ...t4 });
|
|
15505
15505
|
}
|
|
15506
15506
|
}
|
|
@@ -15508,7 +15508,7 @@ function wi(e4) {
|
|
|
15508
15508
|
const t3 = /\$def\.(\w+)/g;
|
|
15509
15509
|
let o3;
|
|
15510
15510
|
for (; null !== (o3 = t3.exec(e5)); ) if (!(o3[1] in n5.definitions)) {
|
|
15511
|
-
const t4 =
|
|
15511
|
+
const t4 = wi(e5, o3.index, o3[0].length);
|
|
15512
15512
|
i3.push({ message: `Unknown definition "$def.${o3[1]}". Defined: ${Object.keys(n5.definitions).join(", ") || "none"}`, severity: "warning", path: `$def.${o3[1]}`, ...t4 });
|
|
15513
15513
|
}
|
|
15514
15514
|
}
|
|
@@ -15518,75 +15518,75 @@ function wi(e4) {
|
|
|
15518
15518
|
}
|
|
15519
15519
|
return { valid: 0 === i2.length, errors: i2, warnings: t2, context: r2 };
|
|
15520
15520
|
}
|
|
15521
|
-
function
|
|
15521
|
+
function yi(e4, n3) {
|
|
15522
15522
|
let i2 = 1, t2 = 1;
|
|
15523
15523
|
for (let o2 = 0; o2 < n3 && o2 < e4.length; o2++) "\n" === e4[o2] ? (i2++, t2 = 1) : t2++;
|
|
15524
15524
|
return { line: i2, column: t2 };
|
|
15525
15525
|
}
|
|
15526
|
-
function
|
|
15527
|
-
const t2 =
|
|
15526
|
+
function wi(e4, n3, i2) {
|
|
15527
|
+
const t2 = yi(e4, n3), o2 = yi(e4, n3 + i2);
|
|
15528
15528
|
return { line: t2.line, column: t2.column, endLine: o2.line, endColumn: o2.column };
|
|
15529
15529
|
}
|
|
15530
|
-
function
|
|
15530
|
+
function ki(e4, n3) {
|
|
15531
15531
|
if (0 === n3.length) return { line: 1, column: 1 };
|
|
15532
15532
|
const i2 = n3[n3.length - 1];
|
|
15533
15533
|
if ("string" == typeof i2) {
|
|
15534
15534
|
const n4 = `"${i2}"`, t2 = e4.lastIndexOf(n4);
|
|
15535
|
-
if (-1 !== t2) return
|
|
15535
|
+
if (-1 !== t2) return yi(e4, t2);
|
|
15536
15536
|
}
|
|
15537
15537
|
return { line: 1, column: 1 };
|
|
15538
15538
|
}
|
|
15539
|
-
function
|
|
15539
|
+
function Ci(e4) {
|
|
15540
15540
|
return "object" == typeof e4 && null !== e4 && !Array.isArray(e4);
|
|
15541
15541
|
}
|
|
15542
|
-
function
|
|
15542
|
+
function ji(e4) {
|
|
15543
15543
|
return "string" == typeof e4 || "number" == typeof e4 || "boolean" == typeof e4;
|
|
15544
15544
|
}
|
|
15545
|
-
function
|
|
15546
|
-
if (
|
|
15545
|
+
function xi(e4, n3) {
|
|
15546
|
+
if (Ci(n3)) for (const [i2, t2] of Object.entries(n3)) ji(t2) && (e4[i2] = t2);
|
|
15547
15547
|
}
|
|
15548
|
-
function
|
|
15549
|
-
if (
|
|
15548
|
+
function Ji(e4, n3) {
|
|
15549
|
+
if (Ci(n3)) for (const [i2, t2] of Object.entries(n3)) e4[i2] = t2;
|
|
15550
15550
|
}
|
|
15551
|
-
function
|
|
15551
|
+
function Ei(e4, n3) {
|
|
15552
15552
|
const i2 = [], t2 = {};
|
|
15553
15553
|
for (const [n4, o3] of Object.entries(e4)) {
|
|
15554
15554
|
o3.required && i2.push(n4);
|
|
15555
15555
|
const e5 = { type: o3.type };
|
|
15556
15556
|
if (o3.description && (e5.description = o3.description), o3.pattern && (e5.pattern = o3.pattern), void 0 !== o3.minLength && (e5.minLength = o3.minLength), void 0 !== o3.maxLength && (e5.maxLength = o3.maxLength), void 0 !== o3.minimum && (e5.minimum = o3.minimum), void 0 !== o3.maximum && (e5.maximum = o3.maximum), o3.enum && (e5.enum = [...o3.enum]), void 0 !== o3.default && (e5.default = o3.default), "object" === o3.type && o3.properties) {
|
|
15557
15557
|
const n5 = {};
|
|
15558
|
-
for (const [e6, i3] of Object.entries(o3.properties)) n5[e6] =
|
|
15558
|
+
for (const [e6, i3] of Object.entries(o3.properties)) n5[e6] = Pi(i3);
|
|
15559
15559
|
e5.properties = n5;
|
|
15560
15560
|
}
|
|
15561
|
-
"array" === o3.type && o3.items && (e5.items =
|
|
15561
|
+
"array" === o3.type && o3.items && (e5.items = Pi(o3.items)), t2[n4] = e5;
|
|
15562
15562
|
}
|
|
15563
15563
|
const o2 = { type: "object", properties: t2 };
|
|
15564
15564
|
return n3 && (o2.title = n3), i2.length > 0 && (o2.required = i2), o2;
|
|
15565
15565
|
}
|
|
15566
|
-
function
|
|
15566
|
+
function Pi(e4) {
|
|
15567
15567
|
const n3 = { type: e4.type };
|
|
15568
15568
|
if (e4.description && (n3.description = e4.description), e4.pattern && (n3.pattern = e4.pattern), void 0 !== e4.minLength && (n3.minLength = e4.minLength), void 0 !== e4.maxLength && (n3.maxLength = e4.maxLength), void 0 !== e4.minimum && (n3.minimum = e4.minimum), void 0 !== e4.maximum && (n3.maximum = e4.maximum), e4.enum && (n3.enum = [...e4.enum]), void 0 !== e4.default && (n3.default = e4.default), "object" === e4.type && e4.properties) {
|
|
15569
15569
|
const i2 = {};
|
|
15570
|
-
for (const [n4, t2] of Object.entries(e4.properties)) i2[n4] =
|
|
15570
|
+
for (const [n4, t2] of Object.entries(e4.properties)) i2[n4] = Pi(t2);
|
|
15571
15571
|
n3.properties = i2;
|
|
15572
15572
|
}
|
|
15573
|
-
return "array" === e4.type && e4.items && (n3.items =
|
|
15573
|
+
return "array" === e4.type && e4.items && (n3.items = Pi(e4.items)), n3;
|
|
15574
15574
|
}
|
|
15575
|
-
function
|
|
15576
|
-
const i2 = { type: "array", items:
|
|
15575
|
+
function Ii(e4, n3) {
|
|
15576
|
+
const i2 = { type: "array", items: Pi(e4) };
|
|
15577
15577
|
return void 0 !== n3?.minItems && (i2.minItems = n3.minItems), void 0 !== n3?.maxItems && (i2.maxItems = n3.maxItems), n3?.description && (i2.description = n3.description), n3?.title && (i2.title = n3.title), i2;
|
|
15578
15578
|
}
|
|
15579
|
-
function
|
|
15579
|
+
function Di(e4, n3 = "string", i2) {
|
|
15580
15580
|
const t2 = { type: n3, enum: [...e4] };
|
|
15581
15581
|
return i2?.description && (t2.description = i2.description), i2?.title && (t2.title = i2.title), t2;
|
|
15582
15582
|
}
|
|
15583
|
-
function
|
|
15584
|
-
return
|
|
15583
|
+
function Ri(e4, n3, i2) {
|
|
15584
|
+
return Ii({ type: "object" }, { minItems: 2, maxItems: 2, description: i2 || "Tuple with exactly 2 elements [source, transform]" });
|
|
15585
15585
|
}
|
|
15586
|
-
function
|
|
15586
|
+
function Oi(e4) {
|
|
15587
15587
|
return external_exports.toJSONSchema(e4, { target: "draft-7" });
|
|
15588
15588
|
}
|
|
15589
|
-
var e2, n, i, r,
|
|
15589
|
+
var e2, n, i, r, a2, s, c2, l, d, p, u, m, b, f, g, h, v, S2, y, w, k, C2, j, x2, J2, E2, P2, I2, D2, R2, O2, T2, M2, U2, W2, $2, B, V2, A2, H2, F, G, Q2, _2, K2, X2, Y2, Z, ee2, ne2, ie2, te, oe, re, ae2, se, ce, le2, de2, pe2, ue, me2, be, fe2, ge2, he2, ve2, Se, ye2, we2, ke2, Ce, je2, xe, Je, Ee, Pe, Ie, De, Re, Oe2, Ne, ze, Le2, qe, Te2, Me, Ue, We, $e, Be, Ve2, Ae, He, Fe, Ge, Qe, _e, Ke, Xe, Ye, Ze2, en, nn, tn, on, rn, an, sn, cn, ln, dn, pn, un, mn, bn, fn, gn, hn, vn, Sn, yn, wn, kn, Cn, jn, xn, Jn, En, Pn, In, Dn, Rn, On, Nn, zn, Ln, qn, Tn, Mn, Un, Wn, $n, Bn, Vn, An, Hn, Fn, Gn, Qn, _n, Kn, Xn, Yn, Zn, ei, ni, ii, si, ci, li, di, pi, ui, mi, bi, gi, hi, vi;
|
|
15590
15590
|
var init_dev = __esm({
|
|
15591
15591
|
"../core/dist/dev.mjs"() {
|
|
15592
15592
|
"use strict";
|
|
@@ -15597,10 +15597,10 @@ var init_dev = __esm({
|
|
|
15597
15597
|
for (var t2 in i2) e2(n3, t2, { get: i2[t2], enumerable: true });
|
|
15598
15598
|
};
|
|
15599
15599
|
i = {};
|
|
15600
|
-
n(i, { BaseContextConfig: () => M2, BatchConfig: () => U2, CodeSchema: () =>
|
|
15600
|
+
n(i, { BaseContextConfig: () => M2, BatchConfig: () => U2, CodeSchema: () => gi, CollectorSchemas: () => sn, ConsentSchema: () => K2, ContractActionsSchema: () => Xn, ContractSchema: () => ei, ContractSchemaEntry: () => Kn, Counter: () => d, DeepPartialEventSchema: () => oe, DestinationReferenceSchema: () => Qn, DestinationSchemas: () => ze, DestinationsMapConfig: () => B, EntitiesSchema: () => ne2, EntitySchema: () => ee2, EventSchema: () => ie2, FlowConfigSchema: () => ii, FlowSchemas: () => qn, FlowSettingsSchema: () => ni, GenericEnvConfig: () => O2, GenericSettingsConfig: () => R2, HandlersConfig: () => x2, HintSchema: () => hi, HintsSchema: () => vi, IdConfig: () => P2, Identifier: () => c2, InitConfig: () => I2, LoopSchema: () => ge2, MapSchema: () => ve2, MappingResultSchema: () => je2, MappingSchemas: () => me2, OptionalPrimitiveValue: () => m, OrderedPropertiesSchema: () => Q2, PartialEventSchema: () => te, PolicySchema: () => ye2, PrimaryConfig: () => D2, PrimitiveSchema: () => Tn, PrimitiveValue: () => u, ProcessingControlConfig: () => W2, PropertiesSchema: () => G, PropertySchema: () => F, PropertyTypeSchema: () => H2, QueueConfig: () => E2, RequiredBoolean: () => s, RequiredNumber: () => a2, RequiredString: () => r, RuleSchema: () => we2, RulesSchema: () => ke2, RuntimeInstanceConfig: () => T2, SetSchema: () => he2, SourceReferenceSchema: () => Fn, SourceSchema: () => Z, SourceSchemas: () => kn, SourceTypeSchema: () => _2, SourcesMapConfig: () => $2, StoreReferenceSchema: () => _n, TaggingVersion: () => p, Timestamp: () => l, TransformerReferenceSchema: () => Gn, UserSchema: () => X2, UtilitySchemas: () => b, ValueConfigSchema: () => Se, ValueSchema: () => be, ValuesSchema: () => fe2, VerboseConfig: () => J2, VersionSchema: () => Y2, WalkerOSSchemas: () => V2, configJsonSchema: () => si, consentJsonSchema: () => ue, contractEntryJsonSchema: () => mi, contractJsonSchema: () => bi, createArraySchema: () => Ii, createConsentConfig: () => q2, createDataTransformationConfig: () => N2, createEnumSchema: () => Di, createMappingRulesConfig: () => z3, createObjectSchema: () => Ei, createPolicyConfig: () => L2, createTupleSchema: () => Ri, destinationReferenceJsonSchema: () => di, entityJsonSchema: () => de2, eventJsonSchema: () => re, loopJsonSchema: () => Ee, mapJsonSchema: () => Ie, orderedPropertiesJsonSchema: () => le2, parseConfig: () => ti, parseSettings: () => ri, partialEventJsonSchema: () => ae2, policyJsonSchema: () => De, propertiesJsonSchema: () => ce, ruleJsonSchema: () => Re, rulesJsonSchema: () => Oe2, safeParseConfig: () => oi, safeParseSettings: () => ai, setJsonSchema: () => Pe, settingsJsonSchema: () => ci, sourceReferenceJsonSchema: () => li, sourceTypeJsonSchema: () => pe2, storeReferenceJsonSchema: () => ui, transformerReferenceJsonSchema: () => pi, userJsonSchema: () => se, validateFlowConfig: () => Si, valueConfigJsonSchema: () => Je, valueJsonSchema: () => xe, z: () => external_exports, zodToSchema: () => Oi });
|
|
15601
15601
|
r = external_exports.string();
|
|
15602
|
-
|
|
15603
|
-
|
|
15602
|
+
a2 = external_exports.number();
|
|
15603
|
+
s = external_exports.boolean();
|
|
15604
15604
|
c2 = external_exports.string().min(1);
|
|
15605
15605
|
l = external_exports.number().int().positive();
|
|
15606
15606
|
d = external_exports.number().int().nonnegative();
|
|
@@ -15625,16 +15625,16 @@ var init_dev = __esm({
|
|
|
15625
15625
|
P2 = external_exports.object({}).partial();
|
|
15626
15626
|
I2 = external_exports.object({ init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional() }).partial();
|
|
15627
15627
|
D2 = external_exports.object({ primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial();
|
|
15628
|
-
|
|
15629
|
-
|
|
15628
|
+
R2 = external_exports.object({ settings: external_exports.any().optional().describe("Implementation-specific configuration") }).partial();
|
|
15629
|
+
O2 = external_exports.object({ env: external_exports.any().optional().describe("Environment dependencies (platform-specific)") }).partial();
|
|
15630
15630
|
T2 = external_exports.object({ type: external_exports.string().optional().describe("Instance type identifier"), config: external_exports.unknown().describe("Instance configuration") }).partial();
|
|
15631
15631
|
M2 = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: external_exports.unknown().describe("Configuration"), env: external_exports.unknown().describe("Environment dependencies") }).partial();
|
|
15632
15632
|
U2 = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), batched: external_exports.unknown().optional().describe("Batch of events to be processed") }).partial();
|
|
15633
|
-
|
|
15634
|
-
|
|
15635
|
-
|
|
15636
|
-
|
|
15637
|
-
n(
|
|
15633
|
+
W2 = external_exports.object({ ignore: external_exports.boolean().describe("Set to true to skip processing").optional(), condition: external_exports.string().optional().describe("Condition function: return true to process") }).partial();
|
|
15634
|
+
$2 = external_exports.object({ sources: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source instances") }).partial();
|
|
15635
|
+
B = external_exports.object({ destinations: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination instances") }).partial();
|
|
15636
|
+
V2 = {};
|
|
15637
|
+
n(V2, { ConsentSchema: () => K2, DeepPartialEventSchema: () => oe, EntitiesSchema: () => ne2, EntitySchema: () => ee2, EventSchema: () => ie2, OrderedPropertiesSchema: () => Q2, PartialEventSchema: () => te, PropertiesSchema: () => G, PropertySchema: () => F, PropertyTypeSchema: () => H2, SourceSchema: () => Z, SourceTypeSchema: () => _2, UserSchema: () => X2, VersionSchema: () => Y2, consentJsonSchema: () => ue, entityJsonSchema: () => de2, eventJsonSchema: () => re, orderedPropertiesJsonSchema: () => le2, partialEventJsonSchema: () => ae2, propertiesJsonSchema: () => ce, sourceTypeJsonSchema: () => pe2, userJsonSchema: () => se });
|
|
15638
15638
|
H2 = external_exports.lazy(() => external_exports.union([external_exports.boolean(), external_exports.string(), external_exports.number(), external_exports.record(external_exports.string(), F)]));
|
|
15639
15639
|
F = external_exports.lazy(() => external_exports.union([H2, external_exports.array(H2)]));
|
|
15640
15640
|
G = external_exports.record(external_exports.string(), F.optional()).describe("Flexible property collection with optional values");
|
|
@@ -15646,19 +15646,19 @@ var init_dev = __esm({
|
|
|
15646
15646
|
Z = G.and(external_exports.object({ type: _2.describe("Source type identifier"), id: r.describe("Source identifier (typically URL on web)"), previous_id: r.describe("Previous source identifier (typically referrer on web)") })).describe("Event source information");
|
|
15647
15647
|
ee2 = external_exports.lazy(() => external_exports.object({ entity: external_exports.string().describe("Entity name"), data: G.describe("Entity-specific properties"), nested: external_exports.array(ee2).describe("Nested child entities"), context: Q2.describe("Entity context data") })).describe("Nested entity structure with recursive nesting support");
|
|
15648
15648
|
ne2 = external_exports.array(ee2).describe("Array of nested entities");
|
|
15649
|
-
|
|
15650
|
-
te =
|
|
15651
|
-
oe =
|
|
15652
|
-
re = o(
|
|
15653
|
-
|
|
15654
|
-
|
|
15649
|
+
ie2 = external_exports.object({ name: external_exports.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: G.describe("Event-specific properties"), context: Q2.describe("Ordered context properties with priorities"), globals: G.describe("Global properties shared across events"), custom: G.describe("Custom implementation-specific properties"), user: X2.describe("User identification and attributes"), nested: ne2.describe("Related nested entities"), consent: K2.describe("Consent states at event time"), id: c2.describe("Unique event identifier (timestamp-based)"), trigger: r.describe("Event trigger identifier"), entity: r.describe("Parsed entity from event name"), action: r.describe("Parsed action from event name"), timestamp: l.describe("Unix timestamp in milliseconds since epoch"), timing: a2.describe("Event processing timing information"), group: r.describe("Event grouping identifier"), count: d.describe("Event count in session"), version: Y2.describe("Walker version information"), source: Z.describe("Event source information") }).describe("Complete walkerOS event structure");
|
|
15650
|
+
te = ie2.partial().describe("Partial event structure with all fields optional");
|
|
15651
|
+
oe = ie2.partial().describe("Partial event structure with all top-level fields optional");
|
|
15652
|
+
re = o(ie2);
|
|
15653
|
+
ae2 = o(te);
|
|
15654
|
+
se = o(X2);
|
|
15655
15655
|
ce = o(G);
|
|
15656
15656
|
le2 = o(Q2);
|
|
15657
15657
|
de2 = o(ee2);
|
|
15658
15658
|
pe2 = o(_2);
|
|
15659
15659
|
ue = o(K2);
|
|
15660
15660
|
me2 = {};
|
|
15661
|
-
n(me2, { ConfigSchema: () => Ce, LoopSchema: () => ge2, MapSchema: () => ve2, PolicySchema: () => ye2, ResultSchema: () => je2, RuleSchema: () => we2, RulesSchema: () => ke2, SetSchema: () => he2, ValueConfigSchema: () => Se, ValueSchema: () => be, ValuesSchema: () => fe2, configJsonSchema: () => Ne, loopJsonSchema: () => Ee, mapJsonSchema: () => Ie, policyJsonSchema: () => De, ruleJsonSchema: () =>
|
|
15661
|
+
n(me2, { ConfigSchema: () => Ce, LoopSchema: () => ge2, MapSchema: () => ve2, PolicySchema: () => ye2, ResultSchema: () => je2, RuleSchema: () => we2, RulesSchema: () => ke2, SetSchema: () => he2, ValueConfigSchema: () => Se, ValueSchema: () => be, ValuesSchema: () => fe2, configJsonSchema: () => Ne, loopJsonSchema: () => Ee, mapJsonSchema: () => Ie, policyJsonSchema: () => De, ruleJsonSchema: () => Re, rulesJsonSchema: () => Oe2, setJsonSchema: () => Pe, valueConfigJsonSchema: () => Je, valueJsonSchema: () => xe });
|
|
15662
15662
|
be = external_exports.lazy(() => external_exports.union([external_exports.string().describe('String value or property path (e.g., "data.id")'), external_exports.number().describe("Numeric value"), external_exports.boolean().describe("Boolean value"), external_exports.lazy(() => A2), external_exports.array(be).describe("Array of values")]));
|
|
15663
15663
|
fe2 = external_exports.array(be).describe("Array of transformation values");
|
|
15664
15664
|
ge2 = external_exports.lazy(() => external_exports.tuple([be, be]).describe("Loop transformation: [source, transform] tuple for array processing"));
|
|
@@ -15667,7 +15667,7 @@ var init_dev = __esm({
|
|
|
15667
15667
|
Se = A2 = external_exports.object({ key: external_exports.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional().describe("Static primitive value"), fn: external_exports.string().optional().describe("Custom transformation function as string (serialized)"), map: ve2.optional().describe("Object mapping: transform event data to structured output"), loop: ge2.optional().describe("Loop transformation: [source, transform] for array processing"), set: he2.optional().describe("Set of values: combine or select from multiple values"), consent: K2.optional().describe("Required consent states to include this value"), condition: external_exports.string().optional().describe("Condition function as string: return true to include value"), validate: external_exports.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e4) => Object.keys(e4).length > 0, { message: "ValueConfig must have at least one property" }).describe("Value transformation configuration with multiple strategies");
|
|
15668
15668
|
ye2 = external_exports.record(external_exports.string(), be).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
|
|
15669
15669
|
we2 = external_exports.object({ batch: external_exports.number().optional().describe("Batch size: bundle N events for batch processing"), condition: external_exports.string().optional().describe("Condition function as string: return true to process event"), consent: K2.optional().describe("Required consent states to process this event"), settings: external_exports.any().optional().describe("Destination-specific settings for this event mapping"), data: external_exports.union([be, fe2]).optional().describe("Data transformation rules for event"), ignore: external_exports.boolean().optional().describe("Set to true to skip processing this event"), name: external_exports.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), policy: ye2.optional().describe("Event-level policy overrides (applied after config-level policy)") }).describe("Mapping rule for specific entity-action combination");
|
|
15670
|
-
ke2 = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([we2, external_exports.array(we2)])).optional()).describe(
|
|
15670
|
+
ke2 = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.union([we2, external_exports.array(we2)])).optional()).describe('Event mapping rules: entity \u2192 action \u2192 Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*\u2192*).');
|
|
15671
15671
|
Ce = external_exports.object({ consent: K2.optional().describe("Required consent states to process any events"), data: external_exports.union([be, fe2]).optional().describe("Global data transformation applied to all events"), mapping: ke2.optional().describe("Entity-action specific mapping rules"), policy: ye2.optional().describe("Pre-processing policy rules applied before mapping") }).describe("Shared mapping configuration for sources and destinations");
|
|
15672
15672
|
je2 = external_exports.object({ eventMapping: we2.optional().describe("Resolved mapping rule for event"), mappingKey: external_exports.string().optional().describe('Mapping key used (e.g., "product.view")') }).describe("Mapping resolution result");
|
|
15673
15673
|
xe = o(be);
|
|
@@ -15676,38 +15676,38 @@ var init_dev = __esm({
|
|
|
15676
15676
|
Pe = o(he2);
|
|
15677
15677
|
Ie = o(ve2);
|
|
15678
15678
|
De = o(ye2);
|
|
15679
|
-
|
|
15680
|
-
|
|
15679
|
+
Re = o(we2);
|
|
15680
|
+
Oe2 = o(ke2);
|
|
15681
15681
|
Ne = o(Ce);
|
|
15682
15682
|
ze = {};
|
|
15683
|
-
n(ze, { BatchSchema: () =>
|
|
15683
|
+
n(ze, { BatchSchema: () => Ve2, ConfigSchema: () => Le2, ContextSchema: () => Me, DLQSchema: () => Ye, DataSchema: () => Ae, DestinationPolicySchema: () => Te2, DestinationsSchema: () => Qe, InitDestinationsSchema: () => Ge, InitSchema: () => Fe, InstanceSchema: () => He, PartialConfigSchema: () => qe, PushBatchContextSchema: () => We, PushContextSchema: () => Ue, PushEventSchema: () => $e, PushEventsSchema: () => Be, PushResultSchema: () => Ke, RefSchema: () => _e, ResultSchema: () => Xe, batchJsonSchema: () => on, configJsonSchema: () => Ze2, contextJsonSchema: () => nn, instanceJsonSchema: () => rn, partialConfigJsonSchema: () => en, pushContextJsonSchema: () => tn, resultJsonSchema: () => an });
|
|
15684
15684
|
Le2 = external_exports.object({ consent: K2.optional().describe("Required consent states to send events to this destination"), settings: external_exports.any().describe("Implementation-specific configuration").optional(), data: external_exports.union([be, fe2]).optional().describe("Global data transformation applied to all events for this destination"), env: external_exports.any().describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Destination instance identifier (defaults to destination key)").optional(), init: external_exports.boolean().describe("Whether to initialize immediately").optional(), loadScript: external_exports.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: ke2.optional().describe("Entity-action specific mapping rules for this destination"), policy: ye2.optional().describe("Pre-processing policy rules applied before event mapping"), queue: external_exports.boolean().describe("Whether to queue events when consent is not granted").optional(), verbose: external_exports.boolean().describe("Enable verbose logging for debugging").optional(), onError: h.optional(), onLog: v.optional() }).describe("Destination configuration");
|
|
15685
15685
|
qe = Le2.partial().describe("Partial destination configuration with all fields optional");
|
|
15686
15686
|
Te2 = ye2.describe("Destination policy rules for event pre-processing");
|
|
15687
15687
|
Me = external_exports.object({ collector: external_exports.unknown().describe("Collector instance (runtime object)"), config: Le2.describe("Destination configuration"), data: external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data"), env: external_exports.unknown().describe("Environment dependencies") }).describe("Destination context for init and push functions");
|
|
15688
15688
|
Ue = Me.extend({ mapping: we2.optional().describe("Resolved mapping rule for this specific event") }).describe("Push context with event-specific mapping");
|
|
15689
|
-
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
|
|
15689
|
+
We = Ue.describe("Batch push context with event-specific mapping");
|
|
15690
|
+
$e = external_exports.object({ event: ie2.describe("The event to process"), mapping: we2.optional().describe("Mapping rule for this event") }).describe("Event with optional mapping for batch processing");
|
|
15691
|
+
Be = external_exports.array($e).describe("Array of events with mappings");
|
|
15692
|
+
Ve2 = external_exports.object({ key: external_exports.string().describe('Batch key (usually mapping key like "product.view")'), events: external_exports.array(ie2).describe("Array of events in batch"), data: external_exports.array(external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional()).describe("Transformed data for each event"), mapping: we2.optional().describe("Shared mapping rule for batch") }).describe("Batch of events grouped by mapping key");
|
|
15693
15693
|
Ae = external_exports.union([external_exports.unknown(), external_exports.array(external_exports.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)");
|
|
15694
|
-
He = external_exports.object({ config: Le2.describe("Destination configuration"), queue: external_exports.array(
|
|
15694
|
+
He = external_exports.object({ config: Le2.describe("Destination configuration"), queue: external_exports.array(ie2).optional().describe("Queued events awaiting consent"), dlq: external_exports.array(external_exports.tuple([ie2, external_exports.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: external_exports.string().optional().describe("Destination type identifier"), env: external_exports.unknown().optional().describe("Environment dependencies"), init: external_exports.unknown().optional().describe("Initialization function"), push: external_exports.unknown().describe("Push function for single events"), pushBatch: external_exports.unknown().optional().describe("Batch push function"), on: external_exports.unknown().optional().describe("Event lifecycle hook function") }).describe("Destination instance (runtime object with functions)");
|
|
15695
15695
|
Fe = external_exports.object({ code: He.describe("Destination instance with implementation"), config: qe.optional().describe("Partial configuration overrides"), env: external_exports.unknown().optional().describe("Partial environment overrides") }).describe("Destination initialization configuration");
|
|
15696
15696
|
Ge = external_exports.record(external_exports.string(), Fe).describe("Map of destination IDs to initialization configurations");
|
|
15697
15697
|
Qe = external_exports.record(external_exports.string(), He).describe("Map of destination IDs to runtime instances");
|
|
15698
15698
|
_e = external_exports.object({ type: external_exports.string().describe('Destination type ("gtag", "meta", "bigquery")'), data: external_exports.unknown().optional().describe("Response from push()"), error: external_exports.unknown().optional().describe("Error if failed") }).describe("Destination reference with type and response data");
|
|
15699
|
-
Ke = external_exports.object({ queue: external_exports.array(
|
|
15699
|
+
Ke = external_exports.object({ queue: external_exports.array(ie2).optional().describe("Events queued (awaiting consent)"), error: external_exports.unknown().optional().describe("Error if push failed") }).describe("Push operation result");
|
|
15700
15700
|
Xe = external_exports.object({ ok: external_exports.boolean().describe("True if nothing failed"), event: external_exports.unknown().optional().describe("The processed event"), done: external_exports.record(external_exports.string(), _e).optional().describe("Destinations that processed successfully"), queued: external_exports.record(external_exports.string(), _e).optional().describe("Destinations that queued events"), failed: external_exports.record(external_exports.string(), _e).optional().describe("Destinations that failed to process") }).describe("Push result with destination outcomes");
|
|
15701
|
-
Ye = external_exports.array(external_exports.tuple([
|
|
15701
|
+
Ye = external_exports.array(external_exports.tuple([ie2, external_exports.unknown()])).describe("Dead letter queue: [(event, error), ...]");
|
|
15702
15702
|
Ze2 = o(Le2);
|
|
15703
15703
|
en = o(qe);
|
|
15704
15704
|
nn = o(Me);
|
|
15705
15705
|
tn = o(Ue);
|
|
15706
|
-
on = o(
|
|
15706
|
+
on = o(Ve2);
|
|
15707
15707
|
rn = o(He);
|
|
15708
|
-
|
|
15709
|
-
|
|
15710
|
-
n(
|
|
15708
|
+
an = o(Xe);
|
|
15709
|
+
sn = {};
|
|
15710
|
+
n(sn, { CommandTypeSchema: () => cn, ConfigSchema: () => ln, DestinationsSchema: () => bn, InitConfigSchema: () => pn, InstanceSchema: () => fn, PushContextSchema: () => un, SessionDataSchema: () => dn, SourcesSchema: () => mn, commandTypeJsonSchema: () => gn, configJsonSchema: () => hn, initConfigJsonSchema: () => Sn, instanceJsonSchema: () => wn, pushContextJsonSchema: () => yn, sessionDataJsonSchema: () => vn });
|
|
15711
15711
|
cn = external_exports.union([external_exports.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), external_exports.string()]).describe("Collector command type: standard commands or custom string for extensions");
|
|
15712
15712
|
ln = external_exports.object({ run: external_exports.boolean().describe("Whether to run collector automatically on initialization").optional(), tagging: p, globalsStatic: G.describe("Static global properties that persist across collector runs"), sessionStatic: external_exports.record(external_exports.string(), external_exports.unknown()).describe("Static session data that persists across collector runs"), verbose: external_exports.boolean().describe("Enable verbose logging for debugging"), onError: h.optional(), onLog: v.optional() }).describe("Core collector configuration");
|
|
15713
15713
|
dn = G.and(external_exports.object({ isStart: external_exports.boolean().describe("Whether this is a new session start"), storage: external_exports.boolean().describe("Whether storage is available"), id: c2.describe("Session identifier").optional(), start: l.describe("Session start timestamp").optional(), marketing: external_exports.literal(true).optional().describe("Marketing attribution flag"), updated: l.describe("Last update timestamp").optional(), isNew: external_exports.boolean().describe("Whether this is a new session").optional(), device: c2.describe("Device identifier").optional(), count: d.describe("Event count in session").optional(), runs: d.describe("Number of runs").optional() })).describe("Session state and tracking data");
|
|
@@ -15715,7 +15715,7 @@ var init_dev = __esm({
|
|
|
15715
15715
|
un = external_exports.object({ mapping: Ce.optional().describe("Source-level mapping configuration") }).describe("Push context with optional source mapping");
|
|
15716
15716
|
mn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of source IDs to source instances");
|
|
15717
15717
|
bn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Map of destination IDs to destination instances");
|
|
15718
|
-
fn = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: ln.describe("Current collector configuration"), consent: K2.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: G.describe("Custom implementation-specific properties"), sources: mn.describe("Registered source instances"), destinations: bn.describe("Registered destination instances"), globals: G.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(
|
|
15718
|
+
fn = external_exports.object({ push: external_exports.unknown().describe("Push function for processing events"), command: external_exports.unknown().describe("Command function for walker commands"), allowed: external_exports.boolean().describe("Whether event processing is allowed"), config: ln.describe("Current collector configuration"), consent: K2.describe("Current consent state"), count: external_exports.number().describe("Event count (increments with each event)"), custom: G.describe("Custom implementation-specific properties"), sources: mn.describe("Registered source instances"), destinations: bn.describe("Registered destination instances"), globals: G.describe("Current global properties"), group: external_exports.string().describe("Event grouping identifier"), hooks: external_exports.unknown().describe("Lifecycle hook functions"), on: external_exports.unknown().describe("Event lifecycle configuration"), queue: external_exports.array(ie2).describe("Queued events awaiting processing"), round: external_exports.number().describe("Collector run count (increments with each run)"), session: external_exports.union([dn]).describe("Current session state"), timing: external_exports.number().describe("Event processing timing information"), user: X2.describe("Current user data"), version: external_exports.string().describe("Walker implementation version") }).describe("Collector instance with state and methods");
|
|
15719
15719
|
gn = o(cn);
|
|
15720
15720
|
hn = o(ln);
|
|
15721
15721
|
vn = o(dn);
|
|
@@ -15723,7 +15723,7 @@ var init_dev = __esm({
|
|
|
15723
15723
|
yn = o(un);
|
|
15724
15724
|
wn = o(fn);
|
|
15725
15725
|
kn = {};
|
|
15726
|
-
n(kn, { BaseEnvSchema: () => Cn, ConfigSchema: () => jn, InitSchema: () => En, InitSourceSchema: () => Pn, InitSourcesSchema: () => In, InstanceSchema: () => Jn, PartialConfigSchema: () => xn, baseEnvJsonSchema: () => Dn, configJsonSchema: () =>
|
|
15726
|
+
n(kn, { BaseEnvSchema: () => Cn, ConfigSchema: () => jn, InitSchema: () => En, InitSourceSchema: () => Pn, InitSourcesSchema: () => In, InstanceSchema: () => Jn, PartialConfigSchema: () => xn, baseEnvJsonSchema: () => Dn, configJsonSchema: () => Rn, initSourceJsonSchema: () => zn, initSourcesJsonSchema: () => Ln, instanceJsonSchema: () => Nn, partialConfigJsonSchema: () => On });
|
|
15727
15727
|
Cn = external_exports.object({ push: external_exports.unknown().describe("Collector push function"), command: external_exports.unknown().describe("Collector command function"), sources: external_exports.unknown().optional().describe("Map of registered source instances"), elb: external_exports.unknown().describe("Public API function (alias for collector.push)") }).catchall(external_exports.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this");
|
|
15728
15728
|
jn = Ce.extend({ settings: external_exports.any().describe("Implementation-specific configuration").optional(), env: Cn.optional().describe("Environment dependencies (platform-specific)"), id: c2.describe("Source identifier (defaults to source key)").optional(), onError: h.optional(), primary: external_exports.boolean().describe("Mark as primary (only one can be primary)").optional() }).describe("Source configuration with mapping and environment");
|
|
15729
15729
|
xn = jn.partial().describe("Partial source configuration with all fields optional");
|
|
@@ -15732,49 +15732,47 @@ var init_dev = __esm({
|
|
|
15732
15732
|
Pn = external_exports.object({ code: En.describe("Source initialization function"), config: xn.optional().describe("Partial configuration overrides"), env: Cn.partial().optional().describe("Partial environment overrides"), primary: external_exports.boolean().optional().describe("Mark as primary source (only one can be primary)") }).describe("Source initialization configuration");
|
|
15733
15733
|
In = external_exports.record(external_exports.string(), Pn).describe("Map of source IDs to initialization configurations");
|
|
15734
15734
|
Dn = o(Cn);
|
|
15735
|
-
|
|
15736
|
-
|
|
15735
|
+
Rn = o(jn);
|
|
15736
|
+
On = o(xn);
|
|
15737
15737
|
Nn = o(Jn);
|
|
15738
15738
|
zn = o(Pn);
|
|
15739
15739
|
Ln = o(In);
|
|
15740
15740
|
qn = {};
|
|
15741
|
-
n(qn, { ConfigSchema: () =>
|
|
15741
|
+
n(qn, { ConfigSchema: () => ii, ContractActionsSchema: () => Xn, ContractEntrySchema: () => Zn, ContractEventsSchema: () => Yn, ContractSchema: () => ei, ContractSchemaEntry: () => Kn, DefinitionsSchema: () => Un, DestinationReferenceSchema: () => Qn, InlineCodeSchema: () => Vn, PackagesSchema: () => Wn, PrimitiveSchema: () => Tn, ServerSchema: () => Bn, SettingsSchema: () => ni, SourceReferenceSchema: () => Fn, StepExampleSchema: () => An, StepExamplesSchema: () => Hn, StoreReferenceSchema: () => _n, TransformerReferenceSchema: () => Gn, VariablesSchema: () => Mn, WebSchema: () => $n, configJsonSchema: () => si, contractEntryJsonSchema: () => mi, contractJsonSchema: () => bi, destinationReferenceJsonSchema: () => di, parseConfig: () => ti, parseSettings: () => ri, safeParseConfig: () => oi, safeParseSettings: () => ai, settingsJsonSchema: () => ci, sourceReferenceJsonSchema: () => li, storeReferenceJsonSchema: () => ui, transformerReferenceJsonSchema: () => pi });
|
|
15742
15742
|
Tn = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).describe("Primitive value: string, number, or boolean");
|
|
15743
15743
|
Mn = external_exports.record(external_exports.string(), Tn).describe("Variables for interpolation");
|
|
15744
15744
|
Un = external_exports.record(external_exports.string(), external_exports.unknown()).describe("Reusable configuration definitions");
|
|
15745
|
-
|
|
15746
|
-
|
|
15747
|
-
|
|
15748
|
-
|
|
15745
|
+
Wn = external_exports.record(external_exports.string().regex(/^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/, "Invalid npm package name"), external_exports.object({ version: external_exports.string().optional(), imports: external_exports.array(external_exports.string()).optional(), path: external_exports.string().optional() })).describe("NPM packages to bundle");
|
|
15746
|
+
$n = external_exports.object({ windowCollector: external_exports.string().default("collector").optional().describe('Window property name for the collector instance (default: "collector")'), windowElb: external_exports.string().default("elb").optional().describe('Window property name for the elb command queue (default: "elb")') }).describe("Web platform configuration");
|
|
15747
|
+
Bn = external_exports.object({}).passthrough().describe("Server platform configuration (reserved for future options)");
|
|
15748
|
+
Vn = external_exports.object({ push: external_exports.string().min(1, "Push function cannot be empty").describe('JavaScript function for processing events. Must start with "$code:" prefix. Example: "$code:(event) => { console.log(event); }"'), type: external_exports.string().optional().describe("Optional type identifier for the inline instance"), init: external_exports.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.") }).describe("Inline code for custom sources/transformers/destinations");
|
|
15749
15749
|
An = external_exports.object({ in: external_exports.unknown().optional().describe("Input to the step"), out: external_exports.unknown().optional().describe("Expected output from the step") }).describe("Named example with input/output pair");
|
|
15750
15750
|
Hn = external_exports.record(external_exports.string(), An).describe("Named step examples for testing and documentation");
|
|
15751
|
-
Fn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), code: external_exports.union([external_exports.string(),
|
|
15752
|
-
Gn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'), code: external_exports.union([external_exports.string(),
|
|
15753
|
-
Qn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), code: external_exports.union([external_exports.string(),
|
|
15754
|
-
_n = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: external_exports.union([external_exports.string(),
|
|
15751
|
+
Fn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), code: external_exports.union([external_exports.string(), Vn]).optional().describe('Either a named export string (e.g., "sourceExpress") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Source-specific configuration object"), env: external_exports.unknown().optional().describe("Source environment configuration"), primary: external_exports.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."), variables: Mn.optional().describe("Source-level variables (highest priority in cascade)"), definitions: Un.optional().describe("Source-level definitions (highest priority in cascade)"), next: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional().describe("Pre-collector transformer chain. Name of the first transformer to run after this source captures an event. If omitted, events go directly to the collector. Can be an array for explicit chain control."), examples: Hn.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Source package reference with configuration");
|
|
15752
|
+
Gn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'), code: external_exports.union([external_exports.string(), Vn]).optional().describe('Either a named export string (e.g., "transformerEnricher") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Transformer-specific configuration object"), env: external_exports.unknown().optional().describe("Transformer environment configuration"), next: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional().describe("Next transformer in chain. If omitted: pre-collector routes to collector, post-collector routes to destination."), variables: Mn.optional().describe("Transformer-level variables (highest priority in cascade)"), definitions: Un.optional().describe("Transformer-level definitions (highest priority in cascade)"), examples: Hn.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Transformer package reference with configuration");
|
|
15753
|
+
Qn = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), code: external_exports.union([external_exports.string(), Vn]).optional().describe('Either a named export string (e.g., "destinationAnalytics") or an inline code object with push function'), config: external_exports.unknown().optional().describe("Destination-specific configuration object"), env: external_exports.unknown().optional().describe("Destination environment configuration"), variables: Mn.optional().describe("Destination-level variables (highest priority in cascade)"), definitions: Un.optional().describe("Destination-level definitions (highest priority in cascade)"), before: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional().describe("Post-collector transformer chain. Name of the first transformer to run before sending events to this destination. If omitted, events come directly from the collector. Can be an array for explicit chain control."), examples: Hn.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Destination package reference with configuration");
|
|
15754
|
+
_n = external_exports.object({ package: external_exports.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: external_exports.union([external_exports.string(), Vn]).optional().describe("Named export string or inline code definition"), config: external_exports.unknown().optional().describe("Store-specific configuration object"), env: external_exports.unknown().optional().describe("Store environment configuration"), variables: Mn.optional().describe("Store-level variables (highest priority in cascade)"), definitions: Un.optional().describe("Store-level definitions (highest priority in cascade)"), examples: Hn.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).describe("Store package reference with configuration");
|
|
15755
15755
|
Kn = external_exports.record(external_exports.string(), external_exports.unknown()).describe("JSON Schema object for event validation with description/examples annotations");
|
|
15756
15756
|
Xn = external_exports.record(external_exports.string(), Kn).describe("Action-level contract entries");
|
|
15757
15757
|
Yn = external_exports.record(external_exports.string(), Xn).describe("Entity-action event schemas");
|
|
15758
15758
|
Zn = external_exports.object({ extends: external_exports.string().optional().describe("Inherit from another named contract"), tagging: external_exports.number().int().min(0).optional().describe("Contract version number"), description: external_exports.string().optional().describe("Human-readable description"), globals: Kn.optional().describe("JSON Schema for event.globals"), context: Kn.optional().describe("JSON Schema for event.context"), custom: Kn.optional().describe("JSON Schema for event.custom"), user: Kn.optional().describe("JSON Schema for event.user"), consent: Kn.optional().describe("JSON Schema for event.consent"), events: Yn.optional().describe("Entity-action event schemas") }).describe("Named contract entry with optional sections and events");
|
|
15759
15759
|
ei = external_exports.record(external_exports.string(), Zn).describe("Named contracts with optional extends inheritance");
|
|
15760
|
-
ni = external_exports.object({ web:
|
|
15760
|
+
ni = external_exports.object({ web: $n.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."), server: Bn.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."), sources: external_exports.record(external_exports.string(), Fn).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: external_exports.record(external_exports.string(), Qn).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: external_exports.record(external_exports.string(), Gn).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: external_exports.record(external_exports.string(), _n).optional().describe("Store configurations (key-value storage) keyed by unique identifier"), collector: external_exports.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), packages: Wn.optional().describe("NPM packages to bundle"), variables: Mn.optional().describe("Flow-level variables (override Config.variables, overridden by source/destination variables)"), definitions: Un.optional().describe("Flow-level definitions (extend Config.definitions, overridden by source/destination definitions)") }).refine((e4) => {
|
|
15761
15761
|
const n3 = void 0 !== e4.web, i2 = void 0 !== e4.server;
|
|
15762
15762
|
return (n3 || i2) && !(n3 && i2);
|
|
15763
15763
|
}, { message: 'Exactly one of "web" or "server" must be present' }).describe("Single flow settings for one deployment target");
|
|
15764
|
-
ii = external_exports.object({ $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v2.json")'), include: external_exports.array(external_exports.string()).optional().describe("Folders to include in the bundle output"), variables: Mn.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"), definitions: Un.optional().describe("Reusable configuration definitions (use $def.name syntax)"), flows: external_exports.record(external_exports.string(), ni).refine((e4) => Object.keys(e4).length > 0, { message: "At least one flow is required" }).describe("Named flow configurations (e.g., production, staging, development)") });
|
|
15765
|
-
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
di =
|
|
15769
|
-
pi =
|
|
15770
|
-
ui = o(
|
|
15771
|
-
mi = o(
|
|
15772
|
-
bi = o(
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
vi = external_exports.
|
|
15776
|
-
Si = external_exports.object({ text: external_exports.string().describe("Short actionable hint text focused on walkerOS usage"), code: external_exports.array(vi).optional().describe("Optional code snippets") });
|
|
15777
|
-
yi = external_exports.record(external_exports.string(), Si).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples");
|
|
15764
|
+
ii = external_exports.object({ $schema: external_exports.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v2.json")'), include: external_exports.array(external_exports.string()).optional().describe("Folders to include in the bundle output"), variables: Mn.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"), definitions: Un.optional().describe("Reusable configuration definitions (use $def.name syntax)"), flows: external_exports.record(external_exports.string(), ni).refine((e4) => Object.keys(e4).length > 0, { message: "At least one flow is required" }).describe("Named flow configurations (e.g., production, staging, development)") }).extend({ version: external_exports.literal(3).describe("Configuration schema version"), contract: ei.optional().describe("Named contracts with extends inheritance and dot-path references") }).describe("walkerOS flow configuration (walkeros.config.json)");
|
|
15765
|
+
si = external_exports.toJSONSchema(ii, { target: "draft-7" });
|
|
15766
|
+
ci = o(ni);
|
|
15767
|
+
li = o(Fn);
|
|
15768
|
+
di = o(Qn);
|
|
15769
|
+
pi = o(Gn);
|
|
15770
|
+
ui = o(_n);
|
|
15771
|
+
mi = o(Zn);
|
|
15772
|
+
bi = o(ei);
|
|
15773
|
+
gi = external_exports.object({ lang: external_exports.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: external_exports.string().describe("Code snippet") });
|
|
15774
|
+
hi = external_exports.object({ text: external_exports.string().describe("Short actionable hint text focused on walkerOS usage"), code: external_exports.array(gi).optional().describe("Optional code snippets") });
|
|
15775
|
+
vi = external_exports.record(external_exports.string(), hi).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples");
|
|
15778
15776
|
}
|
|
15779
15777
|
});
|
|
15780
15778
|
|
|
@@ -17964,7 +17962,7 @@ async function H3(n3, e4, t2) {
|
|
|
17964
17962
|
const a3 = t2 || s3 || { init: false }, c3 = i2 ? { ...a3, before: i2 } : a3, u3 = { ...o2, config: c3, env: W3(o2.env, r2) };
|
|
17965
17963
|
let l2 = u3.config.id;
|
|
17966
17964
|
if (!l2) do {
|
|
17967
|
-
l2 =
|
|
17965
|
+
l2 = ie(4);
|
|
17968
17966
|
} while (n3.destinations[l2]);
|
|
17969
17967
|
return n3.destinations[l2] = u3, false !== u3.config.queue && (u3.queuePush = [...n3.queue]), U3(n3, void 0, {}, { [l2]: u3 });
|
|
17970
17968
|
}
|
|
@@ -18138,7 +18136,7 @@ function Z2(n3, e4) {
|
|
|
18138
18136
|
return { name: a3, data: c3, context: u3, globals: f2, custom: l2, user: g2, nested: d2, consent: m2, id: p2, trigger: h2, entity: w2, action: b2, timestamp: s3, timing: y2, group: r2, count: i2, version: v2, source: k2 };
|
|
18139
18137
|
}
|
|
18140
18138
|
async function nn2(n3, e4) {
|
|
18141
|
-
n3.allowed = true, n3.count = 0, n3.group =
|
|
18139
|
+
n3.allowed = true, n3.count = 0, n3.group = ie(), n3.timing = Date.now(), e4 && (e4.consent && (n3.consent = W(n3.consent, e4.consent)), e4.user && (n3.user = W(n3.user, e4.user)), e4.globals && (n3.globals = W(n3.config.globalsStatic || {}, e4.globals)), e4.custom && (n3.custom = W(n3.custom, e4.custom))), Object.values(n3.destinations).forEach((n4) => {
|
|
18142
18140
|
n4.queuePush = [];
|
|
18143
18141
|
}), n3.queue = [], n3.round++;
|
|
18144
18142
|
return await U3(n3);
|
|
@@ -18171,7 +18169,7 @@ function rn2(n3, e4) {
|
|
|
18171
18169
|
}, () => J3({ ok: false }))(), "Push", n3.hooks);
|
|
18172
18170
|
}
|
|
18173
18171
|
async function un2(n3) {
|
|
18174
|
-
const e4 = W({ globalsStatic: {}, sessionStatic: {}, tagging: 0, run: true }, n3, { merge: false, extend: false }), t2 = { level: n3.logger?.level, handler: n3.logger?.handler }, o2 = de(t2), s3 = { ...e4.globalsStatic, ...n3.globals }, a3 = { allowed: false, config: e4, consent: n3.consent || {}, count: 0, custom: n3.custom || {}, destinations: {}, transformers: {}, stores: {}, globals: s3, group: "", hooks: {}, logger: o2, on: {}, queue: [], round: 0, session: void 0, status: { startedAt: Date.now(), in: 0, out: 0, failed: 0, sources: {}, destinations: {} }, timing: Date.now(), user: n3.user || {}, version: "
|
|
18172
|
+
const e4 = W({ globalsStatic: {}, sessionStatic: {}, tagging: 0, run: true }, n3, { merge: false, extend: false }), t2 = { level: n3.logger?.level, handler: n3.logger?.handler }, o2 = de(t2), s3 = { ...e4.globalsStatic, ...n3.globals }, a3 = { allowed: false, config: e4, consent: n3.consent || {}, count: 0, custom: n3.custom || {}, destinations: {}, transformers: {}, stores: {}, globals: s3, group: "", hooks: {}, logger: o2, on: {}, queue: [], round: 0, session: void 0, status: { startedAt: Date.now(), in: 0, out: 0, failed: 0, sources: {}, destinations: {} }, timing: Date.now(), user: n3.user || {}, version: "3.0.0", sources: {}, pending: { sources: {}, destinations: {} }, push: void 0, command: void 0 };
|
|
18175
18173
|
a3.push = rn2(a3, (n4) => ({ timing: Math.round((Date.now() - a3.timing) / 10) / 100, source: { type: "collector", id: "", previous_id: "" }, ...n4 })), a3.command = (function(n4, e5) {
|
|
18176
18174
|
return Te(async (t3, o3, s4) => await he(async () => await e5(n4, t3, o3, s4), () => J3({ ok: false }))(), "Command", n4.hooks);
|
|
18177
18175
|
})(a3, Y3);
|
|
@@ -20357,7 +20355,6 @@ function validateFlow(input, options = {}) {
|
|
|
20357
20355
|
for (const name of flowsToCheck) {
|
|
20358
20356
|
const flowSettings = flows[name];
|
|
20359
20357
|
if (!flowSettings) continue;
|
|
20360
|
-
checkExampleCoverage(flowSettings, warnings);
|
|
20361
20358
|
const connections = buildConnectionGraph(flowSettings);
|
|
20362
20359
|
for (const conn of connections) {
|
|
20363
20360
|
checkCompatibility(conn, errors, warnings);
|
|
@@ -20369,6 +20366,27 @@ function validateFlow(input, options = {}) {
|
|
|
20369
20366
|
}
|
|
20370
20367
|
}
|
|
20371
20368
|
details.connectionsChecked = totalConnections;
|
|
20369
|
+
for (const name of flowsToCheck) {
|
|
20370
|
+
const flowSettings = flows[name];
|
|
20371
|
+
if (!flowSettings) continue;
|
|
20372
|
+
for (const [destName, dest] of Object.entries(
|
|
20373
|
+
flowSettings.destinations || {}
|
|
20374
|
+
)) {
|
|
20375
|
+
const destConfig = dest;
|
|
20376
|
+
const mapping = destConfig.config?.mapping;
|
|
20377
|
+
if (!mapping || typeof mapping !== "object") continue;
|
|
20378
|
+
for (const key of Object.keys(mapping)) {
|
|
20379
|
+
if (key.includes(".") && !key.includes(" ")) {
|
|
20380
|
+
const parts = key.split(".");
|
|
20381
|
+
warnings.push({
|
|
20382
|
+
path: `destination.${destName}.config.mapping`,
|
|
20383
|
+
message: `Mapping key "${key}" looks like dot-notation. Mapping uses nested entity \u2192 action structure.`,
|
|
20384
|
+
suggestion: `Use nested format: { "${parts[0]}": { "${parts.slice(1).join(".")}": { ... } } }`
|
|
20385
|
+
});
|
|
20386
|
+
}
|
|
20387
|
+
}
|
|
20388
|
+
}
|
|
20389
|
+
}
|
|
20372
20390
|
}
|
|
20373
20391
|
return {
|
|
20374
20392
|
valid: errors.length === 0,
|
|
@@ -20378,26 +20396,6 @@ function validateFlow(input, options = {}) {
|
|
|
20378
20396
|
details
|
|
20379
20397
|
};
|
|
20380
20398
|
}
|
|
20381
|
-
function checkExampleCoverage(config2, warnings) {
|
|
20382
|
-
const stepTypes = [
|
|
20383
|
-
{ key: "sources", type: "source" },
|
|
20384
|
-
{ key: "transformers", type: "transformer" },
|
|
20385
|
-
{ key: "destinations", type: "destination" }
|
|
20386
|
-
];
|
|
20387
|
-
for (const { key, type } of stepTypes) {
|
|
20388
|
-
const refs = config2[key];
|
|
20389
|
-
if (!refs) continue;
|
|
20390
|
-
for (const [name, ref] of Object.entries(refs)) {
|
|
20391
|
-
if (!ref.examples || Object.keys(ref.examples).length === 0) {
|
|
20392
|
-
warnings.push({
|
|
20393
|
-
path: `${type}.${name}`,
|
|
20394
|
-
message: `Step has no examples`,
|
|
20395
|
-
suggestion: `Add examples to ${type}.${name} for testing and documentation`
|
|
20396
|
-
});
|
|
20397
|
-
}
|
|
20398
|
-
}
|
|
20399
|
-
}
|
|
20400
|
-
}
|
|
20401
20399
|
function buildConnectionGraph(config2) {
|
|
20402
20400
|
const connections = [];
|
|
20403
20401
|
for (const [name, source] of Object.entries(config2.sources || {})) {
|