@walkeros/server-source-gcp 4.7.0-next-1790245733116 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,25 +1,51 @@
1
1
  # @walkeros/server-source-gcp
2
2
 
3
- ## 4.7.0-next-1790245733116
3
+ ## 4.7.0
4
4
 
5
- ### Patch Changes
5
+ ### Minor Changes
6
6
 
7
- - Updated dependencies [57788bc]
7
+ - 64b06de: Packages with several exports, such as the GCP and AWS sources and
8
+ destinations, now publish a settings schema per export. `walkeros validate`
9
+ and MCP `package_get` use the schema of the export a step imports. Pub/Sub,
10
+ BigQuery, SNS and SQS steps pinned to this release or later are checked
11
+ instead of skipped; older pins still report a skip.
12
+
13
+ ### Patch Changes
14
+
15
+ - 74821ed: Simulate records every vendor call through one recorder, `observeEnv`
16
+ from `@walkeros/core`, and runs offline: BigQuery, Data Manager and the
17
+ Sheets, GCS and S3 stores reach the network through `env`. Client and `Env`
18
+ types of BigQuery, Firehose, PostHog, SQS and Pub/Sub are structural.
19
+ `@walkeros/cli` exports `resolveExportName` and `selectDevExamples` and drops
20
+ `findExample` and `compareOutput`.
21
+ - 74821ed: Simulate starts only the simulated step, and a simulated transformer
22
+ continues through its `next`. Source simulations list the commands a source
23
+ issues as `elb` calls; `--page-url` sets the web page. Express flows need no
24
+ port. Packages with several exports use per-export examples and mocks, and a
25
+ destination without a mock env is refused instead of calling the vendor.
26
+ - Updated dependencies [786a860]
27
+ - Updated dependencies [74821ed]
8
28
  - Updated dependencies [06b498a]
9
- - Updated dependencies [2aebc53]
10
- - Updated dependencies [f5a1cfd]
11
- - Updated dependencies [ef02916]
29
+ - Updated dependencies [7e5e3de]
30
+ - Updated dependencies [b9668bf]
31
+ - Updated dependencies [74821ed]
32
+ - Updated dependencies [64b06de]
33
+ - Updated dependencies [4b4937f]
34
+ - Updated dependencies [74821ed]
35
+ - Updated dependencies [74821ed]
36
+ - Updated dependencies [74821ed]
12
37
  - Updated dependencies [06b498a]
13
- - Updated dependencies [ef02916]
14
- - Updated dependencies [2aebc53]
15
- - Updated dependencies [f5a1cfd]
16
- - Updated dependencies [f5a1cfd]
17
- - Updated dependencies [2aebc53]
18
- - Updated dependencies [8f8aea6]
19
- - Updated dependencies [2aebc53]
20
- - Updated dependencies [2aebc53]
21
- - @walkeros/core@4.7.0-next-1790245733116
22
- - @walkeros/collector@4.7.0-next-1790245733116
38
+ - Updated dependencies [74821ed]
39
+ - Updated dependencies [74821ed]
40
+ - Updated dependencies [74821ed]
41
+ - Updated dependencies [74821ed]
42
+ - Updated dependencies [74821ed]
43
+ - Updated dependencies [e860006]
44
+ - Updated dependencies [74821ed]
45
+ - Updated dependencies [74821ed]
46
+ - Updated dependencies [4f89234]
47
+ - @walkeros/collector@4.7.0
48
+ - @walkeros/core@4.7.0
23
49
 
24
50
  ## 4.6.1
25
51
 
package/dist/dev.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _walkeros_core_dev from '@walkeros/core/dev';
2
2
  import { z } from '@walkeros/core/dev';
3
3
  import { Source, Flow, Trigger } from '@walkeros/core';
4
- import { PubSub } from '@google-cloud/pubsub';
4
+ import { ClientConfig, SubscriptionOptions, Message } from '@google-cloud/pubsub';
5
5
 
6
6
  /**
7
7
  * HTTP methods enum
@@ -71,12 +71,12 @@ type Settings$2 = z.infer<typeof SettingsSchema$2>;
71
71
 
72
72
  declare const settings$2: _walkeros_core_dev.JSONSchema;
73
73
 
74
- type index$5_CorsOptions = CorsOptions;
75
- declare const index$5_CorsOptionsSchema: typeof CorsOptionsSchema;
76
- declare const index$5_CorsOrigin: typeof CorsOrigin;
77
- declare const index$5_HttpMethod: typeof HttpMethod;
78
- declare namespace index$5 {
79
- export { type index$5_CorsOptions as CorsOptions, index$5_CorsOptionsSchema as CorsOptionsSchema, index$5_CorsOrigin as CorsOrigin, index$5_HttpMethod as HttpMethod, type Settings$2 as Settings, SettingsSchema$2 as SettingsSchema, settings$2 as settings };
74
+ type index$2_CorsOptions = CorsOptions;
75
+ declare const index$2_CorsOptionsSchema: typeof CorsOptionsSchema;
76
+ declare const index$2_CorsOrigin: typeof CorsOrigin;
77
+ declare const index$2_HttpMethod: typeof HttpMethod;
78
+ declare namespace index$2 {
79
+ export { type index$2_CorsOptions as CorsOptions, index$2_CorsOptionsSchema as CorsOptionsSchema, index$2_CorsOrigin as CorsOrigin, index$2_HttpMethod as HttpMethod, type Settings$2 as Settings, SettingsSchema$2 as SettingsSchema, settings$2 as settings };
80
80
  }
81
81
 
82
82
  declare module '@walkeros/core' {
@@ -151,88 +151,10 @@ interface Result$2 {
151
151
  */
152
152
  declare const createTrigger$2: Trigger.CreateFn<Content$2, Result$2>;
153
153
 
154
- declare namespace index$4 {
154
+ declare namespace cloudFunctionExamplesNs {
155
155
  export { createTrigger$2 as createTrigger, env$2 as env, step$2 as step };
156
156
  }
157
157
 
158
- /**
159
- * GCP Pub/Sub pull source settings schema.
160
- *
161
- * Required: projectId, subscription. All other fields optional with sensible
162
- * defaults applied at runtime by `getConfig`.
163
- */
164
- declare const SettingsSchema$1: z.ZodObject<{
165
- client: z.ZodOptional<z.ZodAny>;
166
- projectId: z.ZodString;
167
- subscription: z.ZodString;
168
- topic: z.ZodOptional<z.ZodString>;
169
- credentials: z.ZodOptional<z.ZodAny>;
170
- apiEndpoint: z.ZodOptional<z.ZodString>;
171
- decoder: z.ZodOptional<z.ZodEnum<{
172
- json: "json";
173
- text: "text";
174
- raw: "raw";
175
- }>>;
176
- flowControl: z.ZodOptional<z.ZodObject<{
177
- maxMessages: z.ZodOptional<z.ZodNumber>;
178
- maxBytes: z.ZodOptional<z.ZodNumber>;
179
- }, z.core.$strip>>;
180
- ackDeadline: z.ZodOptional<z.ZodNumber>;
181
- shutdownTimeoutMs: z.ZodOptional<z.ZodNumber>;
182
- onPushError: z.ZodOptional<z.ZodEnum<{
183
- nack: "nack";
184
- ack: "ack";
185
- }>>;
186
- }, z.core.$strip>;
187
- type Settings$1 = z.infer<typeof SettingsSchema$1>;
188
-
189
- /**
190
- * GCP Pub/Sub pull source setup schema.
191
- *
192
- * Provisioning options for `walkeros setup source.<id>`. Idempotent
193
- * subscription creation, plus optional topic and dead-letter topic
194
- * auto-create. Triggered only by the explicit CLI command.
195
- */
196
- declare const SetupSchema: z.ZodObject<{
197
- createTopic: z.ZodOptional<z.ZodBoolean>;
198
- ackDeadlineSeconds: z.ZodOptional<z.ZodNumber>;
199
- messageRetentionDuration: z.ZodOptional<z.ZodObject<{
200
- seconds: z.ZodNumber;
201
- }, z.core.$strip>>;
202
- filter: z.ZodOptional<z.ZodString>;
203
- deadLetterPolicy: z.ZodOptional<z.ZodObject<{
204
- deadLetterTopic: z.ZodString;
205
- maxDeliveryAttempts: z.ZodNumber;
206
- createDeadLetterTopic: z.ZodOptional<z.ZodBoolean>;
207
- }, z.core.$strip>>;
208
- retryPolicy: z.ZodOptional<z.ZodObject<{
209
- minimumBackoff: z.ZodObject<{
210
- seconds: z.ZodNumber;
211
- }, z.core.$strip>;
212
- maximumBackoff: z.ZodObject<{
213
- seconds: z.ZodNumber;
214
- }, z.core.$strip>;
215
- }, z.core.$strip>>;
216
- enableMessageOrdering: z.ZodOptional<z.ZodBoolean>;
217
- labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
218
- expirationPolicy: z.ZodOptional<z.ZodObject<{
219
- ttl: z.ZodOptional<z.ZodNullable<z.ZodObject<{
220
- seconds: z.ZodNumber;
221
- }, z.core.$strip>>>;
222
- }, z.core.$strip>>;
223
- }, z.core.$strip>;
224
- type Setup = z.infer<typeof SetupSchema>;
225
-
226
- declare const settings$1: _walkeros_core_dev.JSONSchema;
227
- declare const setup: _walkeros_core_dev.JSONSchema;
228
-
229
- type index$3_Setup = Setup;
230
- declare const index$3_SetupSchema: typeof SetupSchema;
231
- declare const index$3_setup: typeof setup;
232
- declare namespace index$3 {
233
- export { type Settings$1 as Settings, SettingsSchema$1 as SettingsSchema, type index$3_Setup as Setup, index$3_SetupSchema as SetupSchema, settings$1 as settings, index$3_setup as setup };
234
- }
235
-
236
158
  declare module '@walkeros/core' {
237
159
  interface SourceMap {
238
160
  'pubsub-pull': {
@@ -241,21 +163,42 @@ declare module '@walkeros/core' {
241
163
  };
242
164
  }
243
165
  }
166
+ /** The part of a Pub/Sub subscription the pull source drives. */
167
+ interface PullSubscription {
168
+ on(event: 'message', listener: (message: Message) => void): unknown;
169
+ on(event: 'error', listener: (error: Error) => void): unknown;
170
+ close(): Promise<void>;
171
+ }
172
+ /**
173
+ * The part of a Pub/Sub client the pull source calls at runtime. `PubSub` from
174
+ * `@google-cloud/pubsub` satisfies it, and so does an injected mock (tests,
175
+ * simulate) without a cast. Setup needs a `PubSubAdminClient`.
176
+ */
177
+ interface PubSubPullClient {
178
+ subscription(name: string, options?: SubscriptionOptions): PullSubscription;
179
+ close(): Promise<void>;
180
+ }
244
181
  interface Env$1 extends Source.Env {
245
- PubSub?: typeof PubSub;
182
+ PubSub?: new (options?: ClientConfig) => PubSubPullClient;
246
183
  }
247
184
 
185
+ /** Standard mock environment, with the structural client for simulate. */
186
+ declare const push$1: Env$1;
248
187
  /**
249
- * Standard mock environment for the pull source.
250
- *
251
- * `PubSub` is intentionally absent: the canonical pattern is module-level
252
- * `jest.mock('@google-cloud/pubsub')`, not env-injection.
188
+ * The same environment without the client, for unit tests that substitute the
189
+ * SDK module-wide with `jest.mock`.
190
+ */
191
+ declare const moduleMockEnv: Env$1;
192
+ /**
193
+ * The subscription call binds the source to its subscription; messages then
194
+ * arrive as events, not calls. Construction is not recorded: its options
195
+ * carry credentials.
253
196
  */
254
- declare const push$1: Env$1;
255
197
  declare const simulation$1: string[];
256
198
 
199
+ declare const env$1_moduleMockEnv: typeof moduleMockEnv;
257
200
  declare namespace env$1 {
258
- export { push$1 as push, simulation$1 as simulation };
201
+ export { env$1_moduleMockEnv as moduleMockEnv, push$1 as push, simulation$1 as simulation };
259
202
  }
260
203
 
261
204
  declare const pageView: Flow.StepExample;
@@ -309,38 +252,10 @@ type Result$1 = Array<[string, ...unknown[]]>;
309
252
  */
310
253
  declare const createTrigger$1: Trigger.CreateFn<Content$1, Result$1>;
311
254
 
312
- declare namespace index$2 {
255
+ declare namespace pubsubPullExamplesNs {
313
256
  export { type Content$1 as Content, type Result$1 as Result, createTrigger$1 as createTrigger, env$1 as env, step$1 as step };
314
257
  }
315
258
 
316
- /**
317
- * GCP Pub/Sub push source settings schema.
318
- *
319
- * No required fields. The push source is a request-handler; configuration
320
- * tunables live here, but operators wire `source.push` into their own
321
- * express/lambda runtime.
322
- */
323
- declare const SettingsSchema: z.ZodObject<{
324
- projectId: z.ZodOptional<z.ZodString>;
325
- decoder: z.ZodOptional<z.ZodEnum<{
326
- json: "json";
327
- text: "text";
328
- raw: "raw";
329
- }>>;
330
- verifyOidc: z.ZodOptional<z.ZodBoolean>;
331
- audience: z.ZodOptional<z.ZodString>;
332
- }, z.core.$strip>;
333
- type Settings = z.infer<typeof SettingsSchema>;
334
-
335
- declare const settings: _walkeros_core_dev.JSONSchema;
336
-
337
- type index$1_Settings = Settings;
338
- declare const index$1_SettingsSchema: typeof SettingsSchema;
339
- declare const index$1_settings: typeof settings;
340
- declare namespace index$1 {
341
- export { type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_settings as settings };
342
- }
343
-
344
259
  declare module '@walkeros/core' {
345
260
  interface SourceMap {
346
261
  'pubsub-push': {
@@ -409,13 +324,139 @@ type Result = Array<[string, ...unknown[]]>;
409
324
  */
410
325
  declare const createTrigger: Trigger.CreateFn<Content, Result>;
411
326
 
412
- type index_Content = Content;
413
- type index_Result = Result;
414
- declare const index_createTrigger: typeof createTrigger;
415
- declare const index_env: typeof env;
416
- declare const index_step: typeof step;
327
+ type pubsubPushExamplesNs_Content = Content;
328
+ type pubsubPushExamplesNs_Result = Result;
329
+ declare const pubsubPushExamplesNs_createTrigger: typeof createTrigger;
330
+ declare const pubsubPushExamplesNs_env: typeof env;
331
+ declare const pubsubPushExamplesNs_step: typeof step;
332
+ declare namespace pubsubPushExamplesNs {
333
+ export { type pubsubPushExamplesNs_Content as Content, type pubsubPushExamplesNs_Result as Result, pubsubPushExamplesNs_createTrigger as createTrigger, pubsubPushExamplesNs_env as env, pubsubPushExamplesNs_step as step };
334
+ }
335
+
336
+ /**
337
+ * GCP Pub/Sub pull source settings schema.
338
+ *
339
+ * Required: projectId, subscription. All other fields optional with sensible
340
+ * defaults applied at runtime by `getConfig`.
341
+ */
342
+ declare const SettingsSchema$1: z.ZodObject<{
343
+ client: z.ZodOptional<z.ZodAny>;
344
+ projectId: z.ZodString;
345
+ subscription: z.ZodString;
346
+ topic: z.ZodOptional<z.ZodString>;
347
+ credentials: z.ZodOptional<z.ZodAny>;
348
+ apiEndpoint: z.ZodOptional<z.ZodString>;
349
+ decoder: z.ZodOptional<z.ZodEnum<{
350
+ json: "json";
351
+ text: "text";
352
+ raw: "raw";
353
+ }>>;
354
+ flowControl: z.ZodOptional<z.ZodObject<{
355
+ maxMessages: z.ZodOptional<z.ZodNumber>;
356
+ maxBytes: z.ZodOptional<z.ZodNumber>;
357
+ }, z.core.$strip>>;
358
+ ackDeadline: z.ZodOptional<z.ZodNumber>;
359
+ shutdownTimeoutMs: z.ZodOptional<z.ZodNumber>;
360
+ onPushError: z.ZodOptional<z.ZodEnum<{
361
+ nack: "nack";
362
+ ack: "ack";
363
+ }>>;
364
+ }, z.core.$strip>;
365
+ type Settings$1 = z.infer<typeof SettingsSchema$1>;
366
+
367
+ /**
368
+ * GCP Pub/Sub pull source setup schema.
369
+ *
370
+ * Provisioning options for `walkeros setup source.<id>`. Idempotent
371
+ * subscription creation, plus optional topic and dead-letter topic
372
+ * auto-create. Triggered only by the explicit CLI command.
373
+ */
374
+ declare const SetupSchema: z.ZodObject<{
375
+ createTopic: z.ZodOptional<z.ZodBoolean>;
376
+ ackDeadlineSeconds: z.ZodOptional<z.ZodNumber>;
377
+ messageRetentionDuration: z.ZodOptional<z.ZodObject<{
378
+ seconds: z.ZodNumber;
379
+ }, z.core.$strip>>;
380
+ filter: z.ZodOptional<z.ZodString>;
381
+ deadLetterPolicy: z.ZodOptional<z.ZodObject<{
382
+ deadLetterTopic: z.ZodString;
383
+ maxDeliveryAttempts: z.ZodNumber;
384
+ createDeadLetterTopic: z.ZodOptional<z.ZodBoolean>;
385
+ }, z.core.$strip>>;
386
+ retryPolicy: z.ZodOptional<z.ZodObject<{
387
+ minimumBackoff: z.ZodObject<{
388
+ seconds: z.ZodNumber;
389
+ }, z.core.$strip>;
390
+ maximumBackoff: z.ZodObject<{
391
+ seconds: z.ZodNumber;
392
+ }, z.core.$strip>;
393
+ }, z.core.$strip>>;
394
+ enableMessageOrdering: z.ZodOptional<z.ZodBoolean>;
395
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
396
+ expirationPolicy: z.ZodOptional<z.ZodObject<{
397
+ ttl: z.ZodOptional<z.ZodNullable<z.ZodObject<{
398
+ seconds: z.ZodNumber;
399
+ }, z.core.$strip>>>;
400
+ }, z.core.$strip>>;
401
+ }, z.core.$strip>;
402
+ type Setup = z.infer<typeof SetupSchema>;
403
+
404
+ declare const settings$1: _walkeros_core_dev.JSONSchema;
405
+ declare const setup: _walkeros_core_dev.JSONSchema;
406
+
407
+ type index$1_Setup = Setup;
408
+ declare const index$1_SetupSchema: typeof SetupSchema;
409
+ declare const index$1_setup: typeof setup;
410
+ declare namespace index$1 {
411
+ export { type Settings$1 as Settings, SettingsSchema$1 as SettingsSchema, type index$1_Setup as Setup, index$1_SetupSchema as SetupSchema, settings$1 as settings, index$1_setup as setup };
412
+ }
413
+
414
+ /**
415
+ * GCP Pub/Sub push source settings schema.
416
+ *
417
+ * No required fields. The push source is a request-handler; configuration
418
+ * tunables live here, but operators wire `source.push` into their own
419
+ * express/lambda runtime.
420
+ */
421
+ declare const SettingsSchema: z.ZodObject<{
422
+ projectId: z.ZodOptional<z.ZodString>;
423
+ decoder: z.ZodOptional<z.ZodEnum<{
424
+ json: "json";
425
+ text: "text";
426
+ raw: "raw";
427
+ }>>;
428
+ verifyOidc: z.ZodOptional<z.ZodBoolean>;
429
+ audience: z.ZodOptional<z.ZodString>;
430
+ }, z.core.$strip>;
431
+ type Settings = z.infer<typeof SettingsSchema>;
432
+
433
+ declare const settings: _walkeros_core_dev.JSONSchema;
434
+
435
+ type index_Settings = Settings;
436
+ declare const index_SettingsSchema: typeof SettingsSchema;
437
+ declare const index_settings: typeof settings;
417
438
  declare namespace index {
418
- export { type index_Content as Content, type index_Result as Result, index_createTrigger as createTrigger, index_env as env, index_step as step };
439
+ export { type index_Settings as Settings, index_SettingsSchema as SettingsSchema, index_settings as settings };
419
440
  }
420
441
 
421
- export { index$4 as examples, index$2 as pubsubPullExamples, index$3 as pubsubPullSchemas, index as pubsubPushExamples, index$1 as pubsubPushSchemas, index$5 as schemas };
442
+ /** Dev examples per export, keyed by the export names in package.json. */
443
+ declare const exportExamples: {
444
+ sourceCloudFunction: typeof cloudFunctionExamplesNs;
445
+ sourcePubSubPull: typeof pubsubPullExamplesNs;
446
+ sourcePubSubPush: typeof pubsubPushExamplesNs;
447
+ };
448
+ /** Schemas per export, keyed by the export names in package.json. */
449
+ declare const exportSchemas: {
450
+ sourceCloudFunction: {
451
+ settings: _walkeros_core_dev.JSONSchema;
452
+ };
453
+ sourcePubSubPull: {
454
+ settings: _walkeros_core_dev.JSONSchema;
455
+ setup: _walkeros_core_dev.JSONSchema;
456
+ };
457
+ sourcePubSubPush: {
458
+ settings: _walkeros_core_dev.JSONSchema;
459
+ };
460
+ };
461
+
462
+ export { cloudFunctionExamplesNs as examples, exportExamples, exportSchemas, pubsubPullExamplesNs as pubsubPullExamples, index$1 as pubsubPullSchemas, pubsubPushExamplesNs as pubsubPushExamples, index as pubsubPushSchemas, index$2 as schemas };