@geekmidas/cli 9.2.0 → 9.2.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 +25 -0
- package/dist/{config-Bbu1JKvf.mjs → config-D7AVl-qm.mjs} +2 -2
- package/dist/{config-Bbu1JKvf.mjs.map → config-D7AVl-qm.mjs.map} +1 -1
- package/dist/{config-DujV8DbR.cjs → config-DcxHEHPB.cjs} +2 -2
- package/dist/{config-DujV8DbR.cjs.map → config-DcxHEHPB.cjs.map} +1 -1
- package/dist/config.cjs +2 -2
- package/dist/config.mjs +2 -2
- package/dist/index.cjs +26 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +26 -26
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-C5rXJTtj.mjs → openapi-BlIiUahn.mjs} +7 -2
- package/dist/{openapi-C5rXJTtj.mjs.map → openapi-BlIiUahn.mjs.map} +1 -1
- package/dist/{openapi-B_IGZDVu.cjs → openapi-C-YgZHyd.cjs} +7 -2
- package/dist/{openapi-B_IGZDVu.cjs.map → openapi-C-YgZHyd.cjs.map} +1 -1
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.mjs +3 -3
- package/dist/{setup-DDXUXzzl.mjs → setup-A-BX8JUm.mjs} +3 -3
- package/dist/{setup-DDXUXzzl.mjs.map → setup-A-BX8JUm.mjs.map} +1 -1
- package/dist/setup-BDB9lvEI.cjs +8 -0
- package/dist/{setup-Dh-B7YTX.mjs → setup-BzftAUve.mjs} +3 -3
- package/dist/{setup-WZ-xqAQO.cjs → setup-C2UhXWhN.cjs} +3 -3
- package/dist/{setup-WZ-xqAQO.cjs.map → setup-C2UhXWhN.cjs.map} +1 -1
- package/dist/types-BWQDiooe.d.cts.map +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.mjs +1 -1
- package/dist/workspace-CqXfzYyp.cjs +6704 -0
- package/dist/workspace-CqXfzYyp.cjs.map +1 -0
- package/dist/workspace-DrBWGtI7.mjs +6579 -0
- package/dist/workspace-DrBWGtI7.mjs.map +1 -0
- package/package.json +10 -10
- package/src/generators/OpenApiTsGenerator.ts +21 -0
- package/src/generators/__tests__/Generator.bustCache.spec.ts +16 -8
- package/src/init/versions.ts +19 -19
- package/dist/setup-DLwhfyt-.cjs +0 -8
- package/dist/workspace-CQTT7HJQ.cjs +0 -4361
- package/dist/workspace-CQTT7HJQ.cjs.map +0 -1
- package/dist/workspace-D-37Ylqo.mjs +0 -4236
- package/dist/workspace-D-37Ylqo.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/cli",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.1",
|
|
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.2.
|
|
85
|
-
"@geekmidas/
|
|
86
|
-
"@geekmidas/
|
|
87
|
-
"@geekmidas/
|
|
88
|
-
"@geekmidas/
|
|
89
|
-
"@geekmidas/schema": "~9.2.
|
|
84
|
+
"@geekmidas/constructs": "~9.2.1",
|
|
85
|
+
"@geekmidas/errors": "~9.2.1",
|
|
86
|
+
"@geekmidas/logger": "~9.2.1",
|
|
87
|
+
"@geekmidas/manifest": "9.2.1",
|
|
88
|
+
"@geekmidas/envkit": "~9.2.1",
|
|
89
|
+
"@geekmidas/schema": "~9.2.1"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@types/lodash.kebabcase": "^4.1.9",
|
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
"@types/prompts": "~2.4.9",
|
|
96
96
|
"typescript": "^5.8.2",
|
|
97
97
|
"vitest": "^3.2.4",
|
|
98
|
-
"zod": "~4.
|
|
99
|
-
"@geekmidas/testkit": "9.2.
|
|
98
|
+
"zod": "~4.6.6",
|
|
99
|
+
"@geekmidas/testkit": "9.2.1"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
|
-
"@geekmidas/telescope": "^9.2.
|
|
102
|
+
"@geekmidas/telescope": "^9.2.1"
|
|
103
103
|
},
|
|
104
104
|
"peerDependenciesMeta": {
|
|
105
105
|
"@geekmidas/telescope": {
|
|
@@ -426,6 +426,27 @@ export class OpenApiTsGenerator {
|
|
|
426
426
|
|
|
427
427
|
// Remove $defs from the schema before converting to interface
|
|
428
428
|
const { $defs, ...schemaWithoutDefs } = jsonSchema;
|
|
429
|
+
|
|
430
|
+
// A schema that *is* a registered schema converts to nothing but a
|
|
431
|
+
// `$ref` at it, and the def it points at has already been collected
|
|
432
|
+
// above — so emitting a declaration here as well produces
|
|
433
|
+
// `export type User = User`, a circular alias that is not a type.
|
|
434
|
+
//
|
|
435
|
+
// Zod used to inline this case and only started emitting the `$ref` in
|
|
436
|
+
// 4.6, which is how the bug arrived without the generator changing.
|
|
437
|
+
const ref = (schemaWithoutDefs as { $ref?: string }).$ref;
|
|
438
|
+
if (
|
|
439
|
+
ref &&
|
|
440
|
+
Object.keys(schemaWithoutDefs).every(
|
|
441
|
+
(k) => k === '$ref' || k === '$schema',
|
|
442
|
+
)
|
|
443
|
+
) {
|
|
444
|
+
const target = ref.split('/').pop();
|
|
445
|
+
// The def's own interface is the declaration. Only alias it when the
|
|
446
|
+
// names actually differ, which is when the alias says something.
|
|
447
|
+
return target === name ? null : `export type ${name} = ${target};`;
|
|
448
|
+
}
|
|
449
|
+
|
|
429
450
|
return this.jsonSchemaToInterface(schemaWithoutDefs, name);
|
|
430
451
|
} catch {
|
|
431
452
|
return null;
|
|
@@ -7,17 +7,25 @@ import { EndpointGenerator } from '../EndpointGenerator';
|
|
|
7
7
|
import { clearZodGlobalRegistry } from '../Generator';
|
|
8
8
|
|
|
9
9
|
describe('clearZodGlobalRegistry', () => {
|
|
10
|
-
it('removes
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
it('removes a registered id from the global registry', () => {
|
|
11
|
+
const registry = (
|
|
12
|
+
globalThis as {
|
|
13
|
+
__zod_globalRegistry?: { _idmap?: Map<string, unknown> };
|
|
14
|
+
}
|
|
15
|
+
).__zod_globalRegistry;
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
expect(()
|
|
16
|
-
z.object({ y: z.string() }).meta({ id: 'BustCacheSchema_A' }),
|
|
17
|
-
).toThrow(/already exists in the registry/);
|
|
17
|
+
z.object({ x: z.string() }).meta({ id: 'BustCacheSchema_A' });
|
|
18
|
+
expect(registry?._idmap?.has('BustCacheSchema_A')).toBe(true);
|
|
18
19
|
|
|
19
|
-
//
|
|
20
|
+
// The contract is that the id is gone, asserted on the registry itself.
|
|
21
|
+
// This used to be asserted by re-registering and expecting a throw, which
|
|
22
|
+
// stopped meaning anything in Zod 4.6: a duplicate id is accepted now
|
|
23
|
+
// rather than rejected. That made the test pass for the wrong reason
|
|
24
|
+
// first, and then fail for the wrong reason — neither of which was ever
|
|
25
|
+
// about `clearZodGlobalRegistry`.
|
|
20
26
|
clearZodGlobalRegistry();
|
|
27
|
+
expect(registry?._idmap?.has('BustCacheSchema_A')).toBe(false);
|
|
28
|
+
|
|
21
29
|
expect(() =>
|
|
22
30
|
z.object({ z: z.string() }).meta({ id: 'BustCacheSchema_A' }),
|
|
23
31
|
).not.toThrow();
|
package/src/init/versions.ts
CHANGED
|
@@ -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.
|
|
31
|
-
'@geekmidas/auth': '~9.
|
|
32
|
-
'@geekmidas/cache': '~9.
|
|
33
|
-
'@geekmidas/client': '~9.
|
|
34
|
-
'@geekmidas/cloud': '~9.
|
|
35
|
-
'@geekmidas/constructs': '~9.
|
|
36
|
-
'@geekmidas/db': '~9.
|
|
37
|
-
'@geekmidas/emailkit': '~9.
|
|
38
|
-
'@geekmidas/envkit': '~9.
|
|
39
|
-
'@geekmidas/errors': '~9.
|
|
40
|
-
'@geekmidas/events': '~9.
|
|
41
|
-
'@geekmidas/logger': '~9.
|
|
42
|
-
'@geekmidas/rate-limit': '~9.
|
|
43
|
-
'@geekmidas/schema': '~9.
|
|
44
|
-
'@geekmidas/services': '~9.
|
|
45
|
-
'@geekmidas/storage': '~9.
|
|
46
|
-
'@geekmidas/studio': '~9.
|
|
47
|
-
'@geekmidas/telescope': '~9.
|
|
48
|
-
'@geekmidas/testkit': '~9.
|
|
30
|
+
'@geekmidas/audit': '~9.2.0',
|
|
31
|
+
'@geekmidas/auth': '~9.2.0',
|
|
32
|
+
'@geekmidas/cache': '~9.2.0',
|
|
33
|
+
'@geekmidas/client': '~9.2.0',
|
|
34
|
+
'@geekmidas/cloud': '~9.2.0',
|
|
35
|
+
'@geekmidas/constructs': '~9.2.0',
|
|
36
|
+
'@geekmidas/db': '~9.2.0',
|
|
37
|
+
'@geekmidas/emailkit': '~9.2.0',
|
|
38
|
+
'@geekmidas/envkit': '~9.2.0',
|
|
39
|
+
'@geekmidas/errors': '~9.2.0',
|
|
40
|
+
'@geekmidas/events': '~9.2.0',
|
|
41
|
+
'@geekmidas/logger': '~9.2.0',
|
|
42
|
+
'@geekmidas/rate-limit': '~9.2.0',
|
|
43
|
+
'@geekmidas/schema': '~9.2.0',
|
|
44
|
+
'@geekmidas/services': '~9.2.0',
|
|
45
|
+
'@geekmidas/storage': '~9.2.0',
|
|
46
|
+
'@geekmidas/studio': '~9.2.0',
|
|
47
|
+
'@geekmidas/telescope': '~9.2.0',
|
|
48
|
+
'@geekmidas/testkit': '~9.2.0',
|
|
49
49
|
'@geekmidas/cli': CLI_VERSION,
|
|
50
50
|
} as const;
|
|
51
51
|
|
package/dist/setup-DLwhfyt-.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
require('./workspace-CQTT7HJQ.cjs');
|
|
2
|
-
require('./config-DujV8DbR.cjs');
|
|
3
|
-
require('./fullstack-secrets-BYzi6Hwl.cjs');
|
|
4
|
-
require('./storage-B1wvztiJ.cjs');
|
|
5
|
-
const require_setup = require('./setup-WZ-xqAQO.cjs');
|
|
6
|
-
require('./sync-o_CtEbvR.cjs');
|
|
7
|
-
|
|
8
|
-
exports.ensureStageSecrets = require_setup.ensureStageSecrets;
|