@geekmidas/cli 1.2.0 → 1.2.2
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 +12 -0
- package/dist/index.cjs +29 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +29 -26
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-DrbBWq0s.mjs → openapi-BZ4Qik9w.mjs} +2 -3
- package/dist/{openapi-DrbBWq0s.mjs.map → openapi-BZ4Qik9w.mjs.map} +1 -1
- package/dist/{openapi-BZP8jkI4.cjs → openapi-CzfnHlhG.cjs} +2 -3
- package/dist/{openapi-BZP8jkI4.cjs.map → openapi-CzfnHlhG.cjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +1 -1
- package/package.json +4 -4
- package/src/__tests__/openapi.spec.ts +385 -5
- package/src/deploy/sniffer.ts +1 -1
- package/src/dev/index.ts +4 -3
- package/src/generators/OpenApiTsGenerator.ts +0 -1
- package/src/init/generators/ui.ts +20 -20
- package/src/init/generators/web.ts +2 -0
- package/src/openapi.ts +2 -1
- package/src/workspace/__tests__/client-generator.spec.ts +424 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @geekmidas/cli
|
|
2
2
|
|
|
3
|
+
## 1.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 🐛 [`ab91786`](https://github.com/geekmidas/toolbox/commit/ab917864eaf64793e5bc93818a98caeb5b766324) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix env var injection for dev, and make sure openapi generation for client apps
|
|
8
|
+
|
|
9
|
+
## 1.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 🐛 [`e4ab724`](https://github.com/geekmidas/toolbox/commit/e4ab724fc044bbcab9e4a1426e55b515a4185a2b) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix bug when running gkm exec so tsx is importted correctly
|
|
14
|
+
|
|
3
15
|
## 1.2.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
|
3
3
|
const require_workspace = require('./workspace-BMJE18LV.cjs');
|
|
4
4
|
const require_config = require('./config-Bayob8pB.cjs');
|
|
5
5
|
const require_credentials = require('./credentials-C8DWtnMY.cjs');
|
|
6
|
-
const require_openapi = require('./openapi-
|
|
6
|
+
const require_openapi = require('./openapi-CzfnHlhG.cjs');
|
|
7
7
|
const require_storage = require('./storage-CoCNe0Pt.cjs');
|
|
8
8
|
const require_dokploy_api = require('./dokploy-api-CQvhV6Hd.cjs');
|
|
9
9
|
const require_encryption = require('./encryption-BE0UOb8j.cjs');
|
|
@@ -32,7 +32,7 @@ const prompts = require_chunk.__toESM(require("prompts"));
|
|
|
32
32
|
|
|
33
33
|
//#region package.json
|
|
34
34
|
var name = "@geekmidas/cli";
|
|
35
|
-
var version = "1.1
|
|
35
|
+
var version = "1.2.1";
|
|
36
36
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
37
37
|
var private$1 = false;
|
|
38
38
|
var type = "module";
|
|
@@ -1465,11 +1465,12 @@ function generateCredentialsInjection(secretsJsonPath) {
|
|
|
1465
1465
|
return `import { Credentials } from '@geekmidas/envkit/credentials';
|
|
1466
1466
|
import { existsSync, readFileSync } from 'node:fs';
|
|
1467
1467
|
|
|
1468
|
-
// Inject dev secrets into Credentials
|
|
1468
|
+
// Inject dev secrets into Credentials and process.env
|
|
1469
1469
|
const secretsPath = '${secretsJsonPath}';
|
|
1470
1470
|
if (existsSync(secretsPath)) {
|
|
1471
1471
|
const secrets = JSON.parse(readFileSync(secretsPath, 'utf-8'));
|
|
1472
1472
|
Object.assign(Credentials, secrets);
|
|
1473
|
+
Object.assign(process.env, secrets);
|
|
1473
1474
|
// Debug: uncomment to verify preload is running
|
|
1474
1475
|
// console.log('[gkm preload] Injected', Object.keys(secrets).length, 'credentials');
|
|
1475
1476
|
}
|
|
@@ -1828,8 +1829,8 @@ async function execCommand(commandArgs, options = {}) {
|
|
|
1828
1829
|
if (!cmd) throw new Error("No command specified");
|
|
1829
1830
|
logger$9.log(`🚀 Running: ${commandArgs.join(" ")}`);
|
|
1830
1831
|
const existingNodeOptions = process.env.NODE_OPTIONS ?? "";
|
|
1831
|
-
const tsxImport = "--import
|
|
1832
|
-
const preloadImport = `--import
|
|
1832
|
+
const tsxImport = "--import=tsx";
|
|
1833
|
+
const preloadImport = `--import=${preloadPath}`;
|
|
1833
1834
|
const nodeOptions = [
|
|
1834
1835
|
existingNodeOptions,
|
|
1835
1836
|
tsxImport,
|
|
@@ -4781,7 +4782,7 @@ async function sniffEntryFile(entryPath, appPath, workspacePath) {
|
|
|
4781
4782
|
],
|
|
4782
4783
|
env: {
|
|
4783
4784
|
...process.env,
|
|
4784
|
-
NODE_OPTIONS: "--import
|
|
4785
|
+
NODE_OPTIONS: "--import=tsx"
|
|
4785
4786
|
}
|
|
4786
4787
|
});
|
|
4787
4788
|
let stdout = "";
|
|
@@ -8787,7 +8788,7 @@ Button.displayName = 'Button';
|
|
|
8787
8788
|
export { Button, buttonVariants };
|
|
8788
8789
|
`;
|
|
8789
8790
|
const buttonStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
8790
|
-
import { Button } from '
|
|
8791
|
+
import { Button } from '~/components/ui/button';
|
|
8791
8792
|
|
|
8792
8793
|
const meta: Meta<typeof Button> = {
|
|
8793
8794
|
title: 'Components/Button',
|
|
@@ -8952,7 +8953,7 @@ CardFooter.displayName = 'CardFooter';
|
|
|
8952
8953
|
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
8953
8954
|
`;
|
|
8954
8955
|
const inputStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
8955
|
-
import { Input } from '
|
|
8956
|
+
import { Input } from '~/components/ui/input';
|
|
8956
8957
|
|
|
8957
8958
|
const meta: Meta<typeof Input> = {
|
|
8958
8959
|
title: 'Components/Input',
|
|
@@ -9006,7 +9007,7 @@ export const WithValue: Story = {
|
|
|
9006
9007
|
};
|
|
9007
9008
|
`;
|
|
9008
9009
|
const cardStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9009
|
-
import { Button } from '
|
|
9010
|
+
import { Button } from '~/components/ui/button';
|
|
9010
9011
|
import {
|
|
9011
9012
|
Card,
|
|
9012
9013
|
CardContent,
|
|
@@ -9014,8 +9015,8 @@ import {
|
|
|
9014
9015
|
CardFooter,
|
|
9015
9016
|
CardHeader,
|
|
9016
9017
|
CardTitle,
|
|
9017
|
-
} from '
|
|
9018
|
-
import { Input } from '
|
|
9018
|
+
} from '~/components/ui/card';
|
|
9019
|
+
import { Input } from '~/components/ui/input';
|
|
9019
9020
|
|
|
9020
9021
|
const meta: Meta<typeof Card> = {
|
|
9021
9022
|
title: 'Components/Card',
|
|
@@ -9093,8 +9094,8 @@ Label.displayName = LabelPrimitive.Root.displayName;
|
|
|
9093
9094
|
export { Label };
|
|
9094
9095
|
`;
|
|
9095
9096
|
const labelStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9096
|
-
import { Input } from '
|
|
9097
|
-
import { Label } from '
|
|
9097
|
+
import { Input } from '~/components/ui/input';
|
|
9098
|
+
import { Label } from '~/components/ui/label';
|
|
9098
9099
|
|
|
9099
9100
|
const meta: Meta<typeof Label> = {
|
|
9100
9101
|
title: 'Components/Label',
|
|
@@ -9169,7 +9170,7 @@ function Badge({ className, variant, ...props }: BadgeProps) {
|
|
|
9169
9170
|
export { Badge, badgeVariants };
|
|
9170
9171
|
`;
|
|
9171
9172
|
const badgeStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9172
|
-
import { Badge } from '
|
|
9173
|
+
import { Badge } from '~/components/ui/badge';
|
|
9173
9174
|
|
|
9174
9175
|
const meta: Meta<typeof Badge> = {
|
|
9175
9176
|
title: 'Components/Badge',
|
|
@@ -9245,7 +9246,7 @@ Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
9245
9246
|
export { Separator };
|
|
9246
9247
|
`;
|
|
9247
9248
|
const separatorStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9248
|
-
import { Separator } from '
|
|
9249
|
+
import { Separator } from '~/components/ui/separator';
|
|
9249
9250
|
|
|
9250
9251
|
const meta: Meta<typeof Separator> = {
|
|
9251
9252
|
title: 'Components/Separator',
|
|
@@ -9350,11 +9351,11 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
9350
9351
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
9351
9352
|
`;
|
|
9352
9353
|
const tabsStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9353
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from '
|
|
9354
|
-
import { Button } from '
|
|
9355
|
-
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '
|
|
9356
|
-
import { Input } from '
|
|
9357
|
-
import { Label } from '
|
|
9354
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '~/components/ui/tabs';
|
|
9355
|
+
import { Button } from '~/components/ui/button';
|
|
9356
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '~/components/ui/card';
|
|
9357
|
+
import { Input } from '~/components/ui/input';
|
|
9358
|
+
import { Label } from '~/components/ui/label';
|
|
9358
9359
|
|
|
9359
9360
|
const meta: Meta<typeof Tabs> = {
|
|
9360
9361
|
title: 'Components/Tabs',
|
|
@@ -9454,8 +9455,8 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
9454
9455
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
9455
9456
|
`;
|
|
9456
9457
|
const tooltipStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9457
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '
|
|
9458
|
-
import { Button } from '
|
|
9458
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '~/components/ui/tooltip';
|
|
9459
|
+
import { Button } from '~/components/ui/button';
|
|
9459
9460
|
|
|
9460
9461
|
const meta: Meta<typeof Tooltip> = {
|
|
9461
9462
|
title: 'Components/Tooltip',
|
|
@@ -9655,10 +9656,10 @@ import {
|
|
|
9655
9656
|
DialogHeader,
|
|
9656
9657
|
DialogTitle,
|
|
9657
9658
|
DialogTrigger,
|
|
9658
|
-
} from '
|
|
9659
|
-
import { Button } from '
|
|
9660
|
-
import { Input } from '
|
|
9661
|
-
import { Label } from '
|
|
9659
|
+
} from '~/components/ui/dialog';
|
|
9660
|
+
import { Button } from '~/components/ui/button';
|
|
9661
|
+
import { Input } from '~/components/ui/input';
|
|
9662
|
+
import { Label } from '~/components/ui/label';
|
|
9662
9663
|
|
|
9663
9664
|
const meta: Meta<typeof Dialog> = {
|
|
9664
9665
|
title: 'Components/Dialog',
|
|
@@ -9923,6 +9924,7 @@ function generateWebAppFiles(options) {
|
|
|
9923
9924
|
[modelsPackage]: "workspace:*",
|
|
9924
9925
|
[uiPackage]: "workspace:*",
|
|
9925
9926
|
"@geekmidas/client": GEEKMIDAS_VERSIONS["@geekmidas/client"],
|
|
9927
|
+
"@geekmidas/envkit": GEEKMIDAS_VERSIONS["@geekmidas/envkit"],
|
|
9926
9928
|
"@tanstack/react-query": "~5.80.0",
|
|
9927
9929
|
"better-auth": "~1.2.0",
|
|
9928
9930
|
next: "~16.1.0",
|
|
@@ -9936,6 +9938,7 @@ function generateWebAppFiles(options) {
|
|
|
9936
9938
|
"@types/react": "~19.0.0",
|
|
9937
9939
|
"@types/react-dom": "~19.0.0",
|
|
9938
9940
|
tailwindcss: "^4.0.0",
|
|
9941
|
+
tsx: "~4.20.0",
|
|
9939
9942
|
typescript: "~5.8.2"
|
|
9940
9943
|
}
|
|
9941
9944
|
};
|