@walkeros/server-destination-segment 3.3.0-next-1776098542393

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.
@@ -0,0 +1,149 @@
1
+ import { Mapping, Flow } from '@walkeros/core';
2
+ import { DestinationServer } from '@walkeros/server-core';
3
+ import { Analytics } from '@segment/analytics-node';
4
+
5
+ interface Settings {
6
+ /** Segment source write key (required). */
7
+ writeKey: string;
8
+ /** walkerOS mapping value path to resolve userId from each event. */
9
+ userId?: string;
10
+ /** walkerOS mapping value path to resolve anonymousId from each event. */
11
+ anonymousId?: string;
12
+ /** Destination-level identity mapping (fires identify() on first push / change). */
13
+ identify?: Mapping.Value;
14
+ /** Destination-level group mapping (fires group() on first push / change). */
15
+ group?: Mapping.Value;
16
+ /** walkerOS consent key -> Segment categoryPreferences key mapping. */
17
+ consent?: Record<string, string>;
18
+ /** Downstream destination filtering. Passthrough to SDK. */
19
+ integrations?: Record<string, boolean | Record<string, unknown>>;
20
+ /** Base URL of Segment API. Default: 'https://api.segment.io'. */
21
+ host?: string;
22
+ /** API path. Default: '/v1/batch'. */
23
+ path?: string;
24
+ /** Events to enqueue before flushing. Default: 15. */
25
+ flushAt?: number;
26
+ /** Max milliseconds before auto-flush. Default: 10000. */
27
+ flushInterval?: number;
28
+ /** Retry attempts for failed batches. Default: 3. */
29
+ maxRetries?: number;
30
+ /** HTTP request timeout (ms). Default: 10000. */
31
+ httpRequestTimeout?: number;
32
+ /** Completely disable the SDK. Default: false. */
33
+ disable?: boolean;
34
+ /** Runtime state -- not user-facing. Mutated by init/push. */
35
+ _analytics?: Analytics;
36
+ _state?: RuntimeState;
37
+ }
38
+ interface RuntimeState {
39
+ lastIdentity?: {
40
+ userId?: string;
41
+ anonymousId?: string;
42
+ traitsHash?: string;
43
+ };
44
+ lastGroup?: {
45
+ groupId?: string;
46
+ traitsHash?: string;
47
+ };
48
+ }
49
+ /**
50
+ * Env -- optional SDK override. Production leaves this undefined and the
51
+ * destination creates a real Analytics instance. Tests provide a mock via
52
+ * env.analytics.
53
+ */
54
+ interface Env extends DestinationServer.Env {
55
+ analytics?: SegmentAnalyticsMock;
56
+ }
57
+ /**
58
+ * Mock-friendly interface for the Analytics instance methods the
59
+ * destination actually calls. Tests can provide this via env.analytics
60
+ * instead of the real SDK.
61
+ */
62
+ interface SegmentAnalyticsMock {
63
+ track: (params: Record<string, unknown>) => void;
64
+ identify: (params: Record<string, unknown>) => void;
65
+ group: (params: Record<string, unknown>) => void;
66
+ page: (params: Record<string, unknown>) => void;
67
+ screen: (params: Record<string, unknown>) => void;
68
+ closeAndFlush: (opts?: {
69
+ timeout?: number;
70
+ }) => Promise<void>;
71
+ }
72
+
73
+ declare const push: Env;
74
+ declare const simulation: string[];
75
+
76
+ declare const env_push: typeof push;
77
+ declare const env_simulation: typeof simulation;
78
+ declare namespace env {
79
+ export { env_push as push, env_simulation as simulation };
80
+ }
81
+
82
+ /**
83
+ * Extended step example that may carry destination-level settings overrides.
84
+ */
85
+ type SegmentStepExample = Flow.StepExample & {
86
+ settings?: Partial<Settings>;
87
+ };
88
+ /**
89
+ * Default event forwarding -- analytics.track() with event name and empty
90
+ * properties. userId resolved from default settings.userId = 'user.id'.
91
+ */
92
+ declare const defaultTrack: SegmentStepExample;
93
+ /**
94
+ * Mapped event name -- mapping.name renames the event for Segment.
95
+ */
96
+ declare const mappedEventName: SegmentStepExample;
97
+ /**
98
+ * Destination-level identify -- fires analytics.identify() on first push
99
+ * when settings.identify mapping resolves. Then fires analytics.track().
100
+ */
101
+ declare const destinationIdentify: SegmentStepExample;
102
+ /**
103
+ * Per-event identify with skip -- user login fires identify() only.
104
+ */
105
+ declare const userLoginIdentify: SegmentStepExample;
106
+ /**
107
+ * Per-event group with skip -- company update fires group() only.
108
+ */
109
+ declare const companyGroup: SegmentStepExample;
110
+ /**
111
+ * Explicit page() call with properties -- the canonical Segment page view.
112
+ * skip: true suppresses track(); settings.page fires analytics.page().
113
+ */
114
+ declare const pageView: SegmentStepExample;
115
+ /**
116
+ * Screen call -- server-only method for mobile app backends.
117
+ */
118
+ declare const screenView: SegmentStepExample;
119
+ /**
120
+ * AnonymousId only -- no userId resolved. Segment accepts anonymousId alone.
121
+ */
122
+ declare const anonymousOnly: SegmentStepExample;
123
+ /**
124
+ * Consent context forwarding -- settings.consent maps walkerOS consent
125
+ * keys to Segment categoryPreferences on the context object.
126
+ */
127
+ declare const consentForwarding: SegmentStepExample;
128
+ /**
129
+ * Wildcard ignore -- the event matches a mapping rule with ignore: true.
130
+ * The destination fires zero SDK calls.
131
+ */
132
+ declare const wildcardIgnored: SegmentStepExample;
133
+
134
+ type step_SegmentStepExample = SegmentStepExample;
135
+ declare const step_anonymousOnly: typeof anonymousOnly;
136
+ declare const step_companyGroup: typeof companyGroup;
137
+ declare const step_consentForwarding: typeof consentForwarding;
138
+ declare const step_defaultTrack: typeof defaultTrack;
139
+ declare const step_destinationIdentify: typeof destinationIdentify;
140
+ declare const step_mappedEventName: typeof mappedEventName;
141
+ declare const step_pageView: typeof pageView;
142
+ declare const step_screenView: typeof screenView;
143
+ declare const step_userLoginIdentify: typeof userLoginIdentify;
144
+ declare const step_wildcardIgnored: typeof wildcardIgnored;
145
+ declare namespace step {
146
+ export { type step_SegmentStepExample as SegmentStepExample, step_anonymousOnly as anonymousOnly, step_companyGroup as companyGroup, step_consentForwarding as consentForwarding, step_defaultTrack as defaultTrack, step_destinationIdentify as destinationIdentify, step_mappedEventName as mappedEventName, step_pageView as pageView, step_screenView as screenView, step_userLoginIdentify as userLoginIdentify, step_wildcardIgnored as wildcardIgnored };
147
+ }
148
+
149
+ export { env, step };
@@ -0,0 +1,149 @@
1
+ import { Mapping, Flow } from '@walkeros/core';
2
+ import { DestinationServer } from '@walkeros/server-core';
3
+ import { Analytics } from '@segment/analytics-node';
4
+
5
+ interface Settings {
6
+ /** Segment source write key (required). */
7
+ writeKey: string;
8
+ /** walkerOS mapping value path to resolve userId from each event. */
9
+ userId?: string;
10
+ /** walkerOS mapping value path to resolve anonymousId from each event. */
11
+ anonymousId?: string;
12
+ /** Destination-level identity mapping (fires identify() on first push / change). */
13
+ identify?: Mapping.Value;
14
+ /** Destination-level group mapping (fires group() on first push / change). */
15
+ group?: Mapping.Value;
16
+ /** walkerOS consent key -> Segment categoryPreferences key mapping. */
17
+ consent?: Record<string, string>;
18
+ /** Downstream destination filtering. Passthrough to SDK. */
19
+ integrations?: Record<string, boolean | Record<string, unknown>>;
20
+ /** Base URL of Segment API. Default: 'https://api.segment.io'. */
21
+ host?: string;
22
+ /** API path. Default: '/v1/batch'. */
23
+ path?: string;
24
+ /** Events to enqueue before flushing. Default: 15. */
25
+ flushAt?: number;
26
+ /** Max milliseconds before auto-flush. Default: 10000. */
27
+ flushInterval?: number;
28
+ /** Retry attempts for failed batches. Default: 3. */
29
+ maxRetries?: number;
30
+ /** HTTP request timeout (ms). Default: 10000. */
31
+ httpRequestTimeout?: number;
32
+ /** Completely disable the SDK. Default: false. */
33
+ disable?: boolean;
34
+ /** Runtime state -- not user-facing. Mutated by init/push. */
35
+ _analytics?: Analytics;
36
+ _state?: RuntimeState;
37
+ }
38
+ interface RuntimeState {
39
+ lastIdentity?: {
40
+ userId?: string;
41
+ anonymousId?: string;
42
+ traitsHash?: string;
43
+ };
44
+ lastGroup?: {
45
+ groupId?: string;
46
+ traitsHash?: string;
47
+ };
48
+ }
49
+ /**
50
+ * Env -- optional SDK override. Production leaves this undefined and the
51
+ * destination creates a real Analytics instance. Tests provide a mock via
52
+ * env.analytics.
53
+ */
54
+ interface Env extends DestinationServer.Env {
55
+ analytics?: SegmentAnalyticsMock;
56
+ }
57
+ /**
58
+ * Mock-friendly interface for the Analytics instance methods the
59
+ * destination actually calls. Tests can provide this via env.analytics
60
+ * instead of the real SDK.
61
+ */
62
+ interface SegmentAnalyticsMock {
63
+ track: (params: Record<string, unknown>) => void;
64
+ identify: (params: Record<string, unknown>) => void;
65
+ group: (params: Record<string, unknown>) => void;
66
+ page: (params: Record<string, unknown>) => void;
67
+ screen: (params: Record<string, unknown>) => void;
68
+ closeAndFlush: (opts?: {
69
+ timeout?: number;
70
+ }) => Promise<void>;
71
+ }
72
+
73
+ declare const push: Env;
74
+ declare const simulation: string[];
75
+
76
+ declare const env_push: typeof push;
77
+ declare const env_simulation: typeof simulation;
78
+ declare namespace env {
79
+ export { env_push as push, env_simulation as simulation };
80
+ }
81
+
82
+ /**
83
+ * Extended step example that may carry destination-level settings overrides.
84
+ */
85
+ type SegmentStepExample = Flow.StepExample & {
86
+ settings?: Partial<Settings>;
87
+ };
88
+ /**
89
+ * Default event forwarding -- analytics.track() with event name and empty
90
+ * properties. userId resolved from default settings.userId = 'user.id'.
91
+ */
92
+ declare const defaultTrack: SegmentStepExample;
93
+ /**
94
+ * Mapped event name -- mapping.name renames the event for Segment.
95
+ */
96
+ declare const mappedEventName: SegmentStepExample;
97
+ /**
98
+ * Destination-level identify -- fires analytics.identify() on first push
99
+ * when settings.identify mapping resolves. Then fires analytics.track().
100
+ */
101
+ declare const destinationIdentify: SegmentStepExample;
102
+ /**
103
+ * Per-event identify with skip -- user login fires identify() only.
104
+ */
105
+ declare const userLoginIdentify: SegmentStepExample;
106
+ /**
107
+ * Per-event group with skip -- company update fires group() only.
108
+ */
109
+ declare const companyGroup: SegmentStepExample;
110
+ /**
111
+ * Explicit page() call with properties -- the canonical Segment page view.
112
+ * skip: true suppresses track(); settings.page fires analytics.page().
113
+ */
114
+ declare const pageView: SegmentStepExample;
115
+ /**
116
+ * Screen call -- server-only method for mobile app backends.
117
+ */
118
+ declare const screenView: SegmentStepExample;
119
+ /**
120
+ * AnonymousId only -- no userId resolved. Segment accepts anonymousId alone.
121
+ */
122
+ declare const anonymousOnly: SegmentStepExample;
123
+ /**
124
+ * Consent context forwarding -- settings.consent maps walkerOS consent
125
+ * keys to Segment categoryPreferences on the context object.
126
+ */
127
+ declare const consentForwarding: SegmentStepExample;
128
+ /**
129
+ * Wildcard ignore -- the event matches a mapping rule with ignore: true.
130
+ * The destination fires zero SDK calls.
131
+ */
132
+ declare const wildcardIgnored: SegmentStepExample;
133
+
134
+ type step_SegmentStepExample = SegmentStepExample;
135
+ declare const step_anonymousOnly: typeof anonymousOnly;
136
+ declare const step_companyGroup: typeof companyGroup;
137
+ declare const step_consentForwarding: typeof consentForwarding;
138
+ declare const step_defaultTrack: typeof defaultTrack;
139
+ declare const step_destinationIdentify: typeof destinationIdentify;
140
+ declare const step_mappedEventName: typeof mappedEventName;
141
+ declare const step_pageView: typeof pageView;
142
+ declare const step_screenView: typeof screenView;
143
+ declare const step_userLoginIdentify: typeof userLoginIdentify;
144
+ declare const step_wildcardIgnored: typeof wildcardIgnored;
145
+ declare namespace step {
146
+ export { type step_SegmentStepExample as SegmentStepExample, step_anonymousOnly as anonymousOnly, step_companyGroup as companyGroup, step_consentForwarding as consentForwarding, step_defaultTrack as defaultTrack, step_destinationIdentify as destinationIdentify, step_mappedEventName as mappedEventName, step_pageView as pageView, step_screenView as screenView, step_userLoginIdentify as userLoginIdentify, step_wildcardIgnored as wildcardIgnored };
147
+ }
148
+
149
+ export { env, step };
@@ -0,0 +1,360 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/examples/index.ts
21
+ var examples_exports = {};
22
+ __export(examples_exports, {
23
+ env: () => env_exports,
24
+ step: () => step_exports
25
+ });
26
+ module.exports = __toCommonJS(examples_exports);
27
+
28
+ // src/examples/env.ts
29
+ var env_exports = {};
30
+ __export(env_exports, {
31
+ push: () => push,
32
+ simulation: () => simulation
33
+ });
34
+ var noop = () => {
35
+ };
36
+ var asyncNoop = () => Promise.resolve();
37
+ function createMockAnalytics() {
38
+ return {
39
+ track: noop,
40
+ identify: noop,
41
+ group: noop,
42
+ page: noop,
43
+ screen: noop,
44
+ closeAndFlush: asyncNoop
45
+ };
46
+ }
47
+ var push = {
48
+ analytics: createMockAnalytics()
49
+ };
50
+ var simulation = [
51
+ "call:analytics.track",
52
+ "call:analytics.identify",
53
+ "call:analytics.group",
54
+ "call:analytics.page",
55
+ "call:analytics.screen"
56
+ ];
57
+
58
+ // src/examples/step.ts
59
+ var step_exports = {};
60
+ __export(step_exports, {
61
+ anonymousOnly: () => anonymousOnly,
62
+ companyGroup: () => companyGroup,
63
+ consentForwarding: () => consentForwarding,
64
+ defaultTrack: () => defaultTrack,
65
+ destinationIdentify: () => destinationIdentify,
66
+ mappedEventName: () => mappedEventName,
67
+ pageView: () => pageView,
68
+ screenView: () => screenView,
69
+ userLoginIdentify: () => userLoginIdentify,
70
+ wildcardIgnored: () => wildcardIgnored
71
+ });
72
+ var import_core = require("@walkeros/core");
73
+ var defaultTrack = {
74
+ in: (0, import_core.getEvent)("product view", {
75
+ timestamp: 1700000100,
76
+ user: { id: "us3r", session: "s3ss10n" }
77
+ }),
78
+ out: [
79
+ "analytics.track",
80
+ {
81
+ userId: "us3r",
82
+ anonymousId: "s3ss10n",
83
+ event: "product view",
84
+ properties: {},
85
+ timestamp: /* @__PURE__ */ new Date(1700000100)
86
+ }
87
+ ]
88
+ };
89
+ var mappedEventName = {
90
+ in: (0, import_core.getEvent)("order complete", {
91
+ timestamp: 1700000101,
92
+ user: { id: "us3r", session: "s3ss10n" }
93
+ }),
94
+ mapping: {
95
+ name: "Order Completed"
96
+ },
97
+ out: [
98
+ "analytics.track",
99
+ {
100
+ userId: "us3r",
101
+ anonymousId: "s3ss10n",
102
+ event: "Order Completed",
103
+ properties: {},
104
+ timestamp: /* @__PURE__ */ new Date(1700000101)
105
+ }
106
+ ]
107
+ };
108
+ var destinationIdentify = {
109
+ in: (0, import_core.getEvent)("page view", {
110
+ timestamp: 1700000102,
111
+ user: { id: "us3r", session: "s3ss10n", email: "user@example.com" }
112
+ }),
113
+ settings: {
114
+ identify: {
115
+ map: {
116
+ traits: {
117
+ map: {
118
+ email: "user.email"
119
+ }
120
+ }
121
+ }
122
+ }
123
+ },
124
+ out: [
125
+ [
126
+ "analytics.identify",
127
+ {
128
+ userId: "us3r",
129
+ anonymousId: "s3ss10n",
130
+ traits: { email: "user@example.com" },
131
+ timestamp: /* @__PURE__ */ new Date(1700000102)
132
+ }
133
+ ],
134
+ [
135
+ "analytics.track",
136
+ {
137
+ userId: "us3r",
138
+ anonymousId: "s3ss10n",
139
+ event: "page view",
140
+ properties: {},
141
+ timestamp: /* @__PURE__ */ new Date(1700000102)
142
+ }
143
+ ]
144
+ ]
145
+ };
146
+ var userLoginIdentify = {
147
+ in: (0, import_core.getEvent)("user login", {
148
+ timestamp: 1700000103,
149
+ user: { id: "us3r", session: "s3ss10n" },
150
+ data: {
151
+ user_id: "new-user-123",
152
+ email: "user@acme.com",
153
+ name: "Jane Doe",
154
+ plan: "premium"
155
+ }
156
+ }),
157
+ mapping: {
158
+ skip: true,
159
+ settings: {
160
+ identify: {
161
+ map: {
162
+ userId: "data.user_id",
163
+ traits: {
164
+ map: {
165
+ email: "data.email",
166
+ name: "data.name",
167
+ plan: "data.plan"
168
+ }
169
+ }
170
+ }
171
+ }
172
+ }
173
+ },
174
+ out: [
175
+ "analytics.identify",
176
+ {
177
+ userId: "new-user-123",
178
+ anonymousId: "s3ss10n",
179
+ traits: { email: "user@acme.com", name: "Jane Doe", plan: "premium" },
180
+ timestamp: /* @__PURE__ */ new Date(1700000103)
181
+ }
182
+ ]
183
+ };
184
+ var companyGroup = {
185
+ in: (0, import_core.getEvent)("company update", {
186
+ timestamp: 1700000104,
187
+ user: { id: "us3r", session: "s3ss10n" },
188
+ data: {
189
+ company_id: "comp-456",
190
+ company_name: "Acme",
191
+ industry: "tech",
192
+ employees: 50
193
+ }
194
+ }),
195
+ mapping: {
196
+ skip: true,
197
+ settings: {
198
+ group: {
199
+ map: {
200
+ groupId: "data.company_id",
201
+ traits: {
202
+ map: {
203
+ name: "data.company_name",
204
+ industry: "data.industry",
205
+ employees: "data.employees"
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
211
+ },
212
+ out: [
213
+ "analytics.group",
214
+ {
215
+ userId: "us3r",
216
+ anonymousId: "s3ss10n",
217
+ groupId: "comp-456",
218
+ traits: { name: "Acme", industry: "tech", employees: 50 },
219
+ timestamp: /* @__PURE__ */ new Date(1700000104)
220
+ }
221
+ ]
222
+ };
223
+ var pageView = {
224
+ in: (0, import_core.getEvent)("page view", {
225
+ timestamp: 1700000105,
226
+ user: { id: "us3r", session: "s3ss10n" },
227
+ data: {
228
+ category: "docs",
229
+ title: "Getting Started",
230
+ section: "tutorials"
231
+ }
232
+ }),
233
+ mapping: {
234
+ skip: true,
235
+ settings: {
236
+ page: {
237
+ map: {
238
+ category: "data.category",
239
+ name: "data.title",
240
+ properties: {
241
+ map: {
242
+ section: "data.section"
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
248
+ },
249
+ out: [
250
+ "analytics.page",
251
+ {
252
+ userId: "us3r",
253
+ anonymousId: "s3ss10n",
254
+ category: "docs",
255
+ name: "Getting Started",
256
+ properties: { section: "tutorials" },
257
+ timestamp: /* @__PURE__ */ new Date(1700000105)
258
+ }
259
+ ]
260
+ };
261
+ var screenView = {
262
+ in: (0, import_core.getEvent)("screen view", {
263
+ timestamp: 1700000106,
264
+ user: { id: "us3r", session: "s3ss10n" },
265
+ data: {
266
+ screen_name: "Welcome",
267
+ section: "onboarding",
268
+ build: "1.2.3"
269
+ }
270
+ }),
271
+ mapping: {
272
+ skip: true,
273
+ settings: {
274
+ screen: {
275
+ map: {
276
+ name: "data.screen_name",
277
+ category: "data.section",
278
+ properties: {
279
+ map: {
280
+ build: "data.build"
281
+ }
282
+ }
283
+ }
284
+ }
285
+ }
286
+ },
287
+ out: [
288
+ "analytics.screen",
289
+ {
290
+ userId: "us3r",
291
+ anonymousId: "s3ss10n",
292
+ name: "Welcome",
293
+ category: "onboarding",
294
+ properties: { build: "1.2.3" },
295
+ timestamp: /* @__PURE__ */ new Date(1700000106)
296
+ }
297
+ ]
298
+ };
299
+ var anonymousOnly = {
300
+ in: (0, import_core.getEvent)("product view", {
301
+ timestamp: 1700000107,
302
+ user: { session: "s3ss10n" }
303
+ }),
304
+ settings: {
305
+ userId: void 0
306
+ },
307
+ out: [
308
+ "analytics.track",
309
+ {
310
+ anonymousId: "s3ss10n",
311
+ event: "product view",
312
+ properties: {},
313
+ timestamp: /* @__PURE__ */ new Date(1700000107)
314
+ }
315
+ ]
316
+ };
317
+ var consentForwarding = {
318
+ in: (0, import_core.getEvent)("product view", {
319
+ timestamp: 1700000108,
320
+ user: { id: "us3r", session: "s3ss10n" },
321
+ consent: { analytics: true, marketing: true }
322
+ }),
323
+ settings: {
324
+ consent: {
325
+ analytics: "Analytics",
326
+ marketing: "Advertising"
327
+ }
328
+ },
329
+ out: [
330
+ "analytics.track",
331
+ {
332
+ userId: "us3r",
333
+ anonymousId: "s3ss10n",
334
+ event: "product view",
335
+ properties: {},
336
+ timestamp: /* @__PURE__ */ new Date(1700000108),
337
+ context: {
338
+ consent: {
339
+ categoryPreferences: {
340
+ Analytics: true,
341
+ Advertising: true
342
+ }
343
+ }
344
+ }
345
+ }
346
+ ]
347
+ };
348
+ var wildcardIgnored = {
349
+ in: (0, import_core.getEvent)("debug noise", {
350
+ timestamp: 1700000109,
351
+ user: { id: "us3r", session: "s3ss10n" }
352
+ }),
353
+ mapping: { ignore: true },
354
+ out: []
355
+ };
356
+ // Annotate the CommonJS export names for ESM import in node:
357
+ 0 && (module.exports = {
358
+ env,
359
+ step
360
+ });