@walkeros/server-source-aws 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,23 +1,47 @@
1
1
  # @walkeros/server-source-aws
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 [74821ed]
8
27
  - Updated dependencies [06b498a]
9
- - Updated dependencies [f5a1cfd]
10
- - Updated dependencies [ef02916]
28
+ - Updated dependencies [74821ed]
29
+ - Updated dependencies [64b06de]
30
+ - Updated dependencies [4b4937f]
31
+ - Updated dependencies [74821ed]
32
+ - Updated dependencies [74821ed]
33
+ - Updated dependencies [74821ed]
11
34
  - Updated dependencies [06b498a]
12
- - Updated dependencies [ef02916]
13
- - Updated dependencies [2aebc53]
14
- - Updated dependencies [f5a1cfd]
15
- - Updated dependencies [f5a1cfd]
16
- - Updated dependencies [2aebc53]
17
- - Updated dependencies [8f8aea6]
18
- - Updated dependencies [2aebc53]
19
- - Updated dependencies [2aebc53]
20
- - @walkeros/core@4.7.0-next-1790245733116
35
+ - Updated dependencies [74821ed]
36
+ - Updated dependencies [74821ed]
37
+ - Updated dependencies [74821ed]
38
+ - Updated dependencies [74821ed]
39
+ - Updated dependencies [74821ed]
40
+ - Updated dependencies [e860006]
41
+ - Updated dependencies [74821ed]
42
+ - Updated dependencies [74821ed]
43
+ - Updated dependencies [4f89234]
44
+ - @walkeros/core@4.7.0
21
45
 
22
46
  ## 4.6.1
23
47
 
package/dist/dev.d.mts CHANGED
@@ -2,7 +2,7 @@ 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
4
  import { APIGatewayProxyEvent, APIGatewayProxyEventV2, Context, APIGatewayProxyResult } from 'aws-lambda';
5
- import { SQSClient, ReceiveMessageCommand, DeleteMessageCommand, CreateQueueCommand, GetQueueUrlCommand, GetQueueAttributesCommand } from '@aws-sdk/client-sqs';
5
+ import { SQSClientConfig, GetQueueUrlCommand, GetQueueUrlCommandOutput, GetQueueAttributesCommand, GetQueueAttributesCommandOutput, ReceiveMessageCommand, ReceiveMessageCommandOutput, DeleteMessageCommand, DeleteMessageCommandOutput, CreateQueueCommand, CreateQueueCommandOutput } from '@aws-sdk/client-sqs';
6
6
  import { SNSClient, SubscribeCommand } from '@aws-sdk/client-sns';
7
7
 
8
8
  /**
@@ -74,19 +74,6 @@ type Settings = z.infer<typeof SettingsSchema>;
74
74
 
75
75
  declare const settings$1: _walkeros_core_dev.JSONSchema;
76
76
 
77
- declare const settings: _walkeros_core_dev.JSONSchema;
78
- declare const setup: _walkeros_core_dev.JSONSchema;
79
-
80
- type schemas_CorsOptions = CorsOptions;
81
- declare const schemas_CorsOptionsSchema: typeof CorsOptionsSchema;
82
- declare const schemas_CorsOrigin: typeof CorsOrigin;
83
- declare const schemas_HttpMethod: typeof HttpMethod;
84
- type schemas_Settings = Settings;
85
- declare const schemas_SettingsSchema: typeof SettingsSchema;
86
- declare namespace schemas {
87
- export { type schemas_CorsOptions as CorsOptions, schemas_CorsOptionsSchema as CorsOptionsSchema, schemas_CorsOrigin as CorsOrigin, schemas_HttpMethod as HttpMethod, type schemas_Settings as Settings, schemas_SettingsSchema as SettingsSchema, settings$1 as settings, settings as sqsSettings, setup as sqsSetup };
88
- }
89
-
90
77
  declare module '@walkeros/core' {
91
78
  interface SourceMap {
92
79
  lambda: {
@@ -159,11 +146,24 @@ declare function trigger(source: {
159
146
  push: (event: LambdaEvent, context: LambdaContext) => Promise<LambdaResult>;
160
147
  }): (content: Content$1) => Promise<LambdaResult>;
161
148
 
162
- declare const index$1_trigger: typeof trigger;
163
- declare namespace index$1 {
164
- export { createTrigger$1 as createTrigger, env$1 as env, step$1 as step, index$1_trigger as trigger };
149
+ declare const lambdaExamplesNs_trigger: typeof trigger;
150
+ declare namespace lambdaExamplesNs {
151
+ export { createTrigger$1 as createTrigger, env$1 as env, step$1 as step, lambdaExamplesNs_trigger as trigger };
165
152
  }
166
153
 
154
+ /**
155
+ * The part of an AWS SDK v3 SQS client this source calls: `send` with the
156
+ * commands it builds, and an optional `destroy`. `SQSClient` satisfies it, and
157
+ * so does an injected mock (tests, simulate) without a cast.
158
+ */
159
+ interface SqsClient {
160
+ send(command: GetQueueUrlCommand): Promise<GetQueueUrlCommandOutput>;
161
+ send(command: GetQueueAttributesCommand): Promise<GetQueueAttributesCommandOutput>;
162
+ send(command: ReceiveMessageCommand): Promise<ReceiveMessageCommandOutput>;
163
+ send(command: DeleteMessageCommand): Promise<DeleteMessageCommandOutput>;
164
+ send(command: CreateQueueCommand): Promise<CreateQueueCommandOutput>;
165
+ destroy?(): void;
166
+ }
167
167
  declare module '@walkeros/core' {
168
168
  interface SourceMap {
169
169
  sqs: {
@@ -174,30 +174,32 @@ declare module '@walkeros/core' {
174
174
  }
175
175
  interface Env extends Source.Env {
176
176
  AWS?: {
177
- SQSClient: typeof SQSClient;
178
- ReceiveMessageCommand: typeof ReceiveMessageCommand;
179
- DeleteMessageCommand: typeof DeleteMessageCommand;
180
- CreateQueueCommand: typeof CreateQueueCommand;
181
- GetQueueUrlCommand: typeof GetQueueUrlCommand;
182
- GetQueueAttributesCommand: typeof GetQueueAttributesCommand;
177
+ SQSClient: new (config: SQSClientConfig) => SqsClient;
178
+ ReceiveMessageCommand?: typeof ReceiveMessageCommand;
179
+ DeleteMessageCommand?: typeof DeleteMessageCommand;
180
+ CreateQueueCommand?: typeof CreateQueueCommand;
181
+ GetQueueUrlCommand?: typeof GetQueueUrlCommand;
182
+ GetQueueAttributesCommand?: typeof GetQueueAttributesCommand;
183
183
  SNSClient?: typeof SNSClient;
184
184
  SubscribeCommand?: typeof SubscribeCommand;
185
185
  };
186
186
  }
187
187
 
188
+ /** Standard mock environment, with the structural client for simulate. */
189
+ declare const push: Env;
188
190
  /**
189
- * Standard mock environment for the SQS source.
190
- *
191
- * AWS SDK constructors are intentionally absent: the canonical pattern is
192
- * module-level `jest.mock('@aws-sdk/client-sqs')` and -sns, not env-injection.
191
+ * The same environment without the client, for unit tests that substitute the
192
+ * SDK module-wide with `jest.mock`.
193
193
  */
194
- declare const push: Env;
194
+ declare const moduleMockEnv: Env;
195
+ /** Every request (queue lookup, receive, delete) goes through `send`. */
195
196
  declare const simulation: string[];
196
197
 
198
+ declare const env_moduleMockEnv: typeof moduleMockEnv;
197
199
  declare const env_push: typeof push;
198
200
  declare const env_simulation: typeof simulation;
199
201
  declare namespace env {
200
- export { env_push as push, env_simulation as simulation };
202
+ export { env_moduleMockEnv as moduleMockEnv, env_push as push, env_simulation as simulation };
201
203
  }
202
204
 
203
205
  declare const pageView: Flow.StepExample;
@@ -246,13 +248,42 @@ type Result = Array<[string, ...unknown[]]>;
246
248
  */
247
249
  declare const createTrigger: Trigger.CreateFn<Content, Result>;
248
250
 
249
- type index_Content = Content;
250
- type index_Result = Result;
251
- declare const index_createTrigger: typeof createTrigger;
252
- declare const index_env: typeof env;
253
- declare const index_step: typeof step;
254
- declare namespace index {
255
- export { type index_Content as Content, type index_Result as Result, index_createTrigger as createTrigger, index_env as env, index_step as step };
251
+ type sqsExamplesNs_Content = Content;
252
+ type sqsExamplesNs_Result = Result;
253
+ declare const sqsExamplesNs_createTrigger: typeof createTrigger;
254
+ declare const sqsExamplesNs_env: typeof env;
255
+ declare const sqsExamplesNs_step: typeof step;
256
+ declare namespace sqsExamplesNs {
257
+ export { type sqsExamplesNs_Content as Content, type sqsExamplesNs_Result as Result, sqsExamplesNs_createTrigger as createTrigger, sqsExamplesNs_env as env, sqsExamplesNs_step as step };
256
258
  }
257
259
 
258
- export { index$1 as examples, schemas, index as sqsExamples };
260
+ declare const settings: _walkeros_core_dev.JSONSchema;
261
+ declare const setup: _walkeros_core_dev.JSONSchema;
262
+
263
+ type schemas_CorsOptions = CorsOptions;
264
+ declare const schemas_CorsOptionsSchema: typeof CorsOptionsSchema;
265
+ declare const schemas_CorsOrigin: typeof CorsOrigin;
266
+ declare const schemas_HttpMethod: typeof HttpMethod;
267
+ type schemas_Settings = Settings;
268
+ declare const schemas_SettingsSchema: typeof SettingsSchema;
269
+ declare namespace schemas {
270
+ export { type schemas_CorsOptions as CorsOptions, schemas_CorsOptionsSchema as CorsOptionsSchema, schemas_CorsOrigin as CorsOrigin, schemas_HttpMethod as HttpMethod, type schemas_Settings as Settings, schemas_SettingsSchema as SettingsSchema, settings$1 as settings, settings as sqsSettings, setup as sqsSetup };
271
+ }
272
+
273
+ /** Dev examples per export, keyed by the export names in package.json. */
274
+ declare const exportExamples: {
275
+ sourceLambda: typeof lambdaExamplesNs;
276
+ sourceSqs: typeof sqsExamplesNs;
277
+ };
278
+ /** Schemas per export, keyed by the export names in package.json. */
279
+ declare const exportSchemas: {
280
+ sourceLambda: {
281
+ settings: _walkeros_core_dev.JSONSchema;
282
+ };
283
+ sourceSqs: {
284
+ settings: _walkeros_core_dev.JSONSchema;
285
+ setup: _walkeros_core_dev.JSONSchema;
286
+ };
287
+ };
288
+
289
+ export { lambdaExamplesNs as examples, exportExamples, exportSchemas, schemas, sqsExamplesNs as sqsExamples };
package/dist/dev.d.ts CHANGED
@@ -2,7 +2,7 @@ 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
4
  import { APIGatewayProxyEvent, APIGatewayProxyEventV2, Context, APIGatewayProxyResult } from 'aws-lambda';
5
- import { SQSClient, ReceiveMessageCommand, DeleteMessageCommand, CreateQueueCommand, GetQueueUrlCommand, GetQueueAttributesCommand } from '@aws-sdk/client-sqs';
5
+ import { SQSClientConfig, GetQueueUrlCommand, GetQueueUrlCommandOutput, GetQueueAttributesCommand, GetQueueAttributesCommandOutput, ReceiveMessageCommand, ReceiveMessageCommandOutput, DeleteMessageCommand, DeleteMessageCommandOutput, CreateQueueCommand, CreateQueueCommandOutput } from '@aws-sdk/client-sqs';
6
6
  import { SNSClient, SubscribeCommand } from '@aws-sdk/client-sns';
7
7
 
8
8
  /**
@@ -74,19 +74,6 @@ type Settings = z.infer<typeof SettingsSchema>;
74
74
 
75
75
  declare const settings$1: _walkeros_core_dev.JSONSchema;
76
76
 
77
- declare const settings: _walkeros_core_dev.JSONSchema;
78
- declare const setup: _walkeros_core_dev.JSONSchema;
79
-
80
- type schemas_CorsOptions = CorsOptions;
81
- declare const schemas_CorsOptionsSchema: typeof CorsOptionsSchema;
82
- declare const schemas_CorsOrigin: typeof CorsOrigin;
83
- declare const schemas_HttpMethod: typeof HttpMethod;
84
- type schemas_Settings = Settings;
85
- declare const schemas_SettingsSchema: typeof SettingsSchema;
86
- declare namespace schemas {
87
- export { type schemas_CorsOptions as CorsOptions, schemas_CorsOptionsSchema as CorsOptionsSchema, schemas_CorsOrigin as CorsOrigin, schemas_HttpMethod as HttpMethod, type schemas_Settings as Settings, schemas_SettingsSchema as SettingsSchema, settings$1 as settings, settings as sqsSettings, setup as sqsSetup };
88
- }
89
-
90
77
  declare module '@walkeros/core' {
91
78
  interface SourceMap {
92
79
  lambda: {
@@ -159,11 +146,24 @@ declare function trigger(source: {
159
146
  push: (event: LambdaEvent, context: LambdaContext) => Promise<LambdaResult>;
160
147
  }): (content: Content$1) => Promise<LambdaResult>;
161
148
 
162
- declare const index$1_trigger: typeof trigger;
163
- declare namespace index$1 {
164
- export { createTrigger$1 as createTrigger, env$1 as env, step$1 as step, index$1_trigger as trigger };
149
+ declare const lambdaExamplesNs_trigger: typeof trigger;
150
+ declare namespace lambdaExamplesNs {
151
+ export { createTrigger$1 as createTrigger, env$1 as env, step$1 as step, lambdaExamplesNs_trigger as trigger };
165
152
  }
166
153
 
154
+ /**
155
+ * The part of an AWS SDK v3 SQS client this source calls: `send` with the
156
+ * commands it builds, and an optional `destroy`. `SQSClient` satisfies it, and
157
+ * so does an injected mock (tests, simulate) without a cast.
158
+ */
159
+ interface SqsClient {
160
+ send(command: GetQueueUrlCommand): Promise<GetQueueUrlCommandOutput>;
161
+ send(command: GetQueueAttributesCommand): Promise<GetQueueAttributesCommandOutput>;
162
+ send(command: ReceiveMessageCommand): Promise<ReceiveMessageCommandOutput>;
163
+ send(command: DeleteMessageCommand): Promise<DeleteMessageCommandOutput>;
164
+ send(command: CreateQueueCommand): Promise<CreateQueueCommandOutput>;
165
+ destroy?(): void;
166
+ }
167
167
  declare module '@walkeros/core' {
168
168
  interface SourceMap {
169
169
  sqs: {
@@ -174,30 +174,32 @@ declare module '@walkeros/core' {
174
174
  }
175
175
  interface Env extends Source.Env {
176
176
  AWS?: {
177
- SQSClient: typeof SQSClient;
178
- ReceiveMessageCommand: typeof ReceiveMessageCommand;
179
- DeleteMessageCommand: typeof DeleteMessageCommand;
180
- CreateQueueCommand: typeof CreateQueueCommand;
181
- GetQueueUrlCommand: typeof GetQueueUrlCommand;
182
- GetQueueAttributesCommand: typeof GetQueueAttributesCommand;
177
+ SQSClient: new (config: SQSClientConfig) => SqsClient;
178
+ ReceiveMessageCommand?: typeof ReceiveMessageCommand;
179
+ DeleteMessageCommand?: typeof DeleteMessageCommand;
180
+ CreateQueueCommand?: typeof CreateQueueCommand;
181
+ GetQueueUrlCommand?: typeof GetQueueUrlCommand;
182
+ GetQueueAttributesCommand?: typeof GetQueueAttributesCommand;
183
183
  SNSClient?: typeof SNSClient;
184
184
  SubscribeCommand?: typeof SubscribeCommand;
185
185
  };
186
186
  }
187
187
 
188
+ /** Standard mock environment, with the structural client for simulate. */
189
+ declare const push: Env;
188
190
  /**
189
- * Standard mock environment for the SQS source.
190
- *
191
- * AWS SDK constructors are intentionally absent: the canonical pattern is
192
- * module-level `jest.mock('@aws-sdk/client-sqs')` and -sns, not env-injection.
191
+ * The same environment without the client, for unit tests that substitute the
192
+ * SDK module-wide with `jest.mock`.
193
193
  */
194
- declare const push: Env;
194
+ declare const moduleMockEnv: Env;
195
+ /** Every request (queue lookup, receive, delete) goes through `send`. */
195
196
  declare const simulation: string[];
196
197
 
198
+ declare const env_moduleMockEnv: typeof moduleMockEnv;
197
199
  declare const env_push: typeof push;
198
200
  declare const env_simulation: typeof simulation;
199
201
  declare namespace env {
200
- export { env_push as push, env_simulation as simulation };
202
+ export { env_moduleMockEnv as moduleMockEnv, env_push as push, env_simulation as simulation };
201
203
  }
202
204
 
203
205
  declare const pageView: Flow.StepExample;
@@ -246,13 +248,42 @@ type Result = Array<[string, ...unknown[]]>;
246
248
  */
247
249
  declare const createTrigger: Trigger.CreateFn<Content, Result>;
248
250
 
249
- type index_Content = Content;
250
- type index_Result = Result;
251
- declare const index_createTrigger: typeof createTrigger;
252
- declare const index_env: typeof env;
253
- declare const index_step: typeof step;
254
- declare namespace index {
255
- export { type index_Content as Content, type index_Result as Result, index_createTrigger as createTrigger, index_env as env, index_step as step };
251
+ type sqsExamplesNs_Content = Content;
252
+ type sqsExamplesNs_Result = Result;
253
+ declare const sqsExamplesNs_createTrigger: typeof createTrigger;
254
+ declare const sqsExamplesNs_env: typeof env;
255
+ declare const sqsExamplesNs_step: typeof step;
256
+ declare namespace sqsExamplesNs {
257
+ export { type sqsExamplesNs_Content as Content, type sqsExamplesNs_Result as Result, sqsExamplesNs_createTrigger as createTrigger, sqsExamplesNs_env as env, sqsExamplesNs_step as step };
256
258
  }
257
259
 
258
- export { index$1 as examples, schemas, index as sqsExamples };
260
+ declare const settings: _walkeros_core_dev.JSONSchema;
261
+ declare const setup: _walkeros_core_dev.JSONSchema;
262
+
263
+ type schemas_CorsOptions = CorsOptions;
264
+ declare const schemas_CorsOptionsSchema: typeof CorsOptionsSchema;
265
+ declare const schemas_CorsOrigin: typeof CorsOrigin;
266
+ declare const schemas_HttpMethod: typeof HttpMethod;
267
+ type schemas_Settings = Settings;
268
+ declare const schemas_SettingsSchema: typeof SettingsSchema;
269
+ declare namespace schemas {
270
+ export { type schemas_CorsOptions as CorsOptions, schemas_CorsOptionsSchema as CorsOptionsSchema, schemas_CorsOrigin as CorsOrigin, schemas_HttpMethod as HttpMethod, type schemas_Settings as Settings, schemas_SettingsSchema as SettingsSchema, settings$1 as settings, settings as sqsSettings, setup as sqsSetup };
271
+ }
272
+
273
+ /** Dev examples per export, keyed by the export names in package.json. */
274
+ declare const exportExamples: {
275
+ sourceLambda: typeof lambdaExamplesNs;
276
+ sourceSqs: typeof sqsExamplesNs;
277
+ };
278
+ /** Schemas per export, keyed by the export names in package.json. */
279
+ declare const exportSchemas: {
280
+ sourceLambda: {
281
+ settings: _walkeros_core_dev.JSONSchema;
282
+ };
283
+ sourceSqs: {
284
+ settings: _walkeros_core_dev.JSONSchema;
285
+ setup: _walkeros_core_dev.JSONSchema;
286
+ };
287
+ };
288
+
289
+ export { lambdaExamplesNs as examples, exportExamples, exportSchemas, schemas, sqsExamplesNs as sqsExamples };