@geekmidas/cli 9.4.0 → 9.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/cli",
3
- "version": "9.4.0",
3
+ "version": "9.6.0",
4
4
  "description": "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs",
5
5
  "private": false,
6
6
  "type": "module",
@@ -81,12 +81,12 @@
81
81
  "prompts": "~2.4.2",
82
82
  "tsx": "~4.20.3",
83
83
  "yaml": "~2.8.2",
84
- "@geekmidas/constructs": "~9.4.0",
85
- "@geekmidas/envkit": "~9.4.0",
86
- "@geekmidas/errors": "~9.4.0",
87
- "@geekmidas/logger": "~9.4.0",
88
- "@geekmidas/manifest": "9.4.0",
89
- "@geekmidas/schema": "~9.4.0"
84
+ "@geekmidas/constructs": "~9.6.0",
85
+ "@geekmidas/envkit": "~9.6.0",
86
+ "@geekmidas/errors": "~9.6.0",
87
+ "@geekmidas/logger": "~9.6.0",
88
+ "@geekmidas/manifest": "9.6.0",
89
+ "@geekmidas/schema": "~9.6.0"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@types/lodash.kebabcase": "^4.1.9",
@@ -96,10 +96,10 @@
96
96
  "typescript": "^5.8.2",
97
97
  "vitest": "^3.2.4",
98
98
  "zod": "~4.6.6",
99
- "@geekmidas/testkit": "9.4.0"
99
+ "@geekmidas/testkit": "9.6.0"
100
100
  },
101
101
  "peerDependencies": {
102
- "@geekmidas/telescope": "^9.4.0"
102
+ "@geekmidas/telescope": "^9.6.0"
103
103
  },
104
104
  "peerDependenciesMeta": {
105
105
  "@geekmidas/telescope": {
@@ -155,6 +155,8 @@ import type { EnvironmentParser } from '@geekmidas/envkit';
155
155
  import type { Logger } from '@geekmidas/logger';
156
156
  import { EventConnectionFactory, Subscriber } from '@geekmidas/events';
157
157
  import type { EventConnection, EventSubscriber } from '@geekmidas/events';
158
+ import { randomUUID } from 'node:crypto';
159
+ import { isQueueResult } from '@geekmidas/constructs/queue';
158
160
  import { ServiceDiscovery } from '@geekmidas/services';
159
161
  ${imports}
160
162
 
@@ -207,12 +209,21 @@ export async function setupQueues(
207
209
  return;
208
210
  }
209
211
 
210
- await queue.handler({
212
+ // One message per delivery locally, so it gets an id of its own for
213
+ // the handler to report it by, as SQS's message id is deployed.
214
+ const id = randomUUID();
215
+ const result = await queue.handler({
211
216
  messages: [validation.value],
217
+ records: [{ id, message: validation.value }],
212
218
  services: services,
213
219
  logger: queue.logger,
214
220
  });
215
221
 
222
+ if (isQueueResult(result) && result.failed.includes(id)) {
223
+ logger.error({ queue: queue.name }, 'Queue handler reported the message as failed');
224
+ return;
225
+ }
226
+
216
227
  logger.debug({ queue: queue.name }, 'Successfully processed queue message');
217
228
  } catch (error) {
218
229
  logger.error({ error, queue: queue.name }, 'Failed to process queue message');
@@ -136,6 +136,10 @@ describe('QueueGenerator', () => {
136
136
  expect(content).toContain('eventSubscriber.subscribe([queue.name]');
137
137
  expect(content).toContain("queue.messageSchema['~standard'].validate");
138
138
  expect(content).toContain('messages: [validation.value]');
139
+ expect(content).toContain('records: [{ id, message: validation.value }]');
140
+ expect(content).toContain(
141
+ 'isQueueResult(result) && result.failed.includes(id)',
142
+ );
139
143
  });
140
144
  });
141
145
  });
@@ -27,25 +27,25 @@ export const CLI_VERSION = `~${pkg.version}`;
27
27
  * Run: pnpm --filter @geekmidas/cli sync-versions
28
28
  */
29
29
  export const GEEKMIDAS_VERSIONS = {
30
- '@geekmidas/audit': '~9.3.0',
31
- '@geekmidas/auth': '~9.3.0',
32
- '@geekmidas/cache': '~9.3.0',
33
- '@geekmidas/client': '~9.3.0',
34
- '@geekmidas/cloud': '~9.3.0',
35
- '@geekmidas/constructs': '~9.3.0',
36
- '@geekmidas/db': '~9.3.0',
37
- '@geekmidas/emailkit': '~9.3.0',
38
- '@geekmidas/envkit': '~9.3.0',
39
- '@geekmidas/errors': '~9.3.0',
40
- '@geekmidas/events': '~9.3.0',
41
- '@geekmidas/logger': '~9.3.0',
42
- '@geekmidas/rate-limit': '~9.3.0',
43
- '@geekmidas/schema': '~9.3.0',
44
- '@geekmidas/services': '~9.3.0',
45
- '@geekmidas/storage': '~9.3.0',
46
- '@geekmidas/studio': '~9.3.0',
47
- '@geekmidas/telescope': '~9.3.0',
48
- '@geekmidas/testkit': '~9.3.0',
30
+ '@geekmidas/audit': '~9.5.0',
31
+ '@geekmidas/auth': '~9.5.0',
32
+ '@geekmidas/cache': '~9.5.0',
33
+ '@geekmidas/client': '~9.5.0',
34
+ '@geekmidas/cloud': '~9.5.0',
35
+ '@geekmidas/constructs': '~9.5.0',
36
+ '@geekmidas/db': '~9.5.0',
37
+ '@geekmidas/emailkit': '~9.5.0',
38
+ '@geekmidas/envkit': '~9.5.0',
39
+ '@geekmidas/errors': '~9.5.0',
40
+ '@geekmidas/events': '~9.5.0',
41
+ '@geekmidas/logger': '~9.5.0',
42
+ '@geekmidas/rate-limit': '~9.5.0',
43
+ '@geekmidas/schema': '~9.5.0',
44
+ '@geekmidas/services': '~9.5.0',
45
+ '@geekmidas/storage': '~9.5.0',
46
+ '@geekmidas/studio': '~9.5.0',
47
+ '@geekmidas/telescope': '~9.5.0',
48
+ '@geekmidas/testkit': '~9.5.0',
49
49
  '@geekmidas/cli': CLI_VERSION,
50
50
  } as const;
51
51