@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/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { __require, getAppBuildOrder, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported } from "./workspace-CASoZOjs.mjs";
|
|
3
3
|
import { getAppNameFromCwd, loadAppConfig, loadConfig, loadWorkspaceConfig, parseModuleConfig } from "./config-BQ4a36Rq.mjs";
|
|
4
4
|
import { getCredentialsPath, getDokployCredentials, getDokployRegistryId, getDokployToken, removeDokployCredentials, storeDokployCredentials, storeDokployRegistryId } from "./credentials-DT1dSxIx.mjs";
|
|
5
|
-
import { ConstructGenerator, EndpointGenerator, OPENAPI_OUTPUT_PATH, OpenApiTsGenerator, generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi-
|
|
5
|
+
import { ConstructGenerator, EndpointGenerator, OPENAPI_OUTPUT_PATH, OpenApiTsGenerator, generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi-BZ4Qik9w.mjs";
|
|
6
6
|
import { getKeyPath, maskPassword, readStageSecrets, secretsExist, setCustomSecret, toEmbeddableSecrets, writeStageSecrets } from "./storage-BMW6yLu3.mjs";
|
|
7
7
|
import { DokployApi } from "./dokploy-api-7k3t7_zd.mjs";
|
|
8
8
|
import { encryptSecrets } from "./encryption-JtMsiGNp.mjs";
|
|
@@ -31,7 +31,7 @@ import prompts from "prompts";
|
|
|
31
31
|
|
|
32
32
|
//#region package.json
|
|
33
33
|
var name = "@geekmidas/cli";
|
|
34
|
-
var version = "1.1
|
|
34
|
+
var version = "1.2.1";
|
|
35
35
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
36
36
|
var private$1 = false;
|
|
37
37
|
var type = "module";
|
|
@@ -1464,11 +1464,12 @@ function generateCredentialsInjection(secretsJsonPath) {
|
|
|
1464
1464
|
return `import { Credentials } from '@geekmidas/envkit/credentials';
|
|
1465
1465
|
import { existsSync, readFileSync } from 'node:fs';
|
|
1466
1466
|
|
|
1467
|
-
// Inject dev secrets into Credentials
|
|
1467
|
+
// Inject dev secrets into Credentials and process.env
|
|
1468
1468
|
const secretsPath = '${secretsJsonPath}';
|
|
1469
1469
|
if (existsSync(secretsPath)) {
|
|
1470
1470
|
const secrets = JSON.parse(readFileSync(secretsPath, 'utf-8'));
|
|
1471
1471
|
Object.assign(Credentials, secrets);
|
|
1472
|
+
Object.assign(process.env, secrets);
|
|
1472
1473
|
// Debug: uncomment to verify preload is running
|
|
1473
1474
|
// console.log('[gkm preload] Injected', Object.keys(secrets).length, 'credentials');
|
|
1474
1475
|
}
|
|
@@ -1827,8 +1828,8 @@ async function execCommand(commandArgs, options = {}) {
|
|
|
1827
1828
|
if (!cmd) throw new Error("No command specified");
|
|
1828
1829
|
logger$9.log(`🚀 Running: ${commandArgs.join(" ")}`);
|
|
1829
1830
|
const existingNodeOptions = process.env.NODE_OPTIONS ?? "";
|
|
1830
|
-
const tsxImport = "--import
|
|
1831
|
-
const preloadImport = `--import
|
|
1831
|
+
const tsxImport = "--import=tsx";
|
|
1832
|
+
const preloadImport = `--import=${preloadPath}`;
|
|
1832
1833
|
const nodeOptions = [
|
|
1833
1834
|
existingNodeOptions,
|
|
1834
1835
|
tsxImport,
|
|
@@ -4780,7 +4781,7 @@ async function sniffEntryFile(entryPath, appPath, workspacePath) {
|
|
|
4780
4781
|
],
|
|
4781
4782
|
env: {
|
|
4782
4783
|
...process.env,
|
|
4783
|
-
NODE_OPTIONS: "--import
|
|
4784
|
+
NODE_OPTIONS: "--import=tsx"
|
|
4784
4785
|
}
|
|
4785
4786
|
});
|
|
4786
4787
|
let stdout$1 = "";
|
|
@@ -8786,7 +8787,7 @@ Button.displayName = 'Button';
|
|
|
8786
8787
|
export { Button, buttonVariants };
|
|
8787
8788
|
`;
|
|
8788
8789
|
const buttonStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
8789
|
-
import { Button } from '
|
|
8790
|
+
import { Button } from '~/components/ui/button';
|
|
8790
8791
|
|
|
8791
8792
|
const meta: Meta<typeof Button> = {
|
|
8792
8793
|
title: 'Components/Button',
|
|
@@ -8951,7 +8952,7 @@ CardFooter.displayName = 'CardFooter';
|
|
|
8951
8952
|
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
8952
8953
|
`;
|
|
8953
8954
|
const inputStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
8954
|
-
import { Input } from '
|
|
8955
|
+
import { Input } from '~/components/ui/input';
|
|
8955
8956
|
|
|
8956
8957
|
const meta: Meta<typeof Input> = {
|
|
8957
8958
|
title: 'Components/Input',
|
|
@@ -9005,7 +9006,7 @@ export const WithValue: Story = {
|
|
|
9005
9006
|
};
|
|
9006
9007
|
`;
|
|
9007
9008
|
const cardStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9008
|
-
import { Button } from '
|
|
9009
|
+
import { Button } from '~/components/ui/button';
|
|
9009
9010
|
import {
|
|
9010
9011
|
Card,
|
|
9011
9012
|
CardContent,
|
|
@@ -9013,8 +9014,8 @@ import {
|
|
|
9013
9014
|
CardFooter,
|
|
9014
9015
|
CardHeader,
|
|
9015
9016
|
CardTitle,
|
|
9016
|
-
} from '
|
|
9017
|
-
import { Input } from '
|
|
9017
|
+
} from '~/components/ui/card';
|
|
9018
|
+
import { Input } from '~/components/ui/input';
|
|
9018
9019
|
|
|
9019
9020
|
const meta: Meta<typeof Card> = {
|
|
9020
9021
|
title: 'Components/Card',
|
|
@@ -9092,8 +9093,8 @@ Label.displayName = LabelPrimitive.Root.displayName;
|
|
|
9092
9093
|
export { Label };
|
|
9093
9094
|
`;
|
|
9094
9095
|
const labelStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9095
|
-
import { Input } from '
|
|
9096
|
-
import { Label } from '
|
|
9096
|
+
import { Input } from '~/components/ui/input';
|
|
9097
|
+
import { Label } from '~/components/ui/label';
|
|
9097
9098
|
|
|
9098
9099
|
const meta: Meta<typeof Label> = {
|
|
9099
9100
|
title: 'Components/Label',
|
|
@@ -9168,7 +9169,7 @@ function Badge({ className, variant, ...props }: BadgeProps) {
|
|
|
9168
9169
|
export { Badge, badgeVariants };
|
|
9169
9170
|
`;
|
|
9170
9171
|
const badgeStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9171
|
-
import { Badge } from '
|
|
9172
|
+
import { Badge } from '~/components/ui/badge';
|
|
9172
9173
|
|
|
9173
9174
|
const meta: Meta<typeof Badge> = {
|
|
9174
9175
|
title: 'Components/Badge',
|
|
@@ -9244,7 +9245,7 @@ Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
9244
9245
|
export { Separator };
|
|
9245
9246
|
`;
|
|
9246
9247
|
const separatorStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9247
|
-
import { Separator } from '
|
|
9248
|
+
import { Separator } from '~/components/ui/separator';
|
|
9248
9249
|
|
|
9249
9250
|
const meta: Meta<typeof Separator> = {
|
|
9250
9251
|
title: 'Components/Separator',
|
|
@@ -9349,11 +9350,11 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
9349
9350
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
9350
9351
|
`;
|
|
9351
9352
|
const tabsStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9352
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from '
|
|
9353
|
-
import { Button } from '
|
|
9354
|
-
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '
|
|
9355
|
-
import { Input } from '
|
|
9356
|
-
import { Label } from '
|
|
9353
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '~/components/ui/tabs';
|
|
9354
|
+
import { Button } from '~/components/ui/button';
|
|
9355
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '~/components/ui/card';
|
|
9356
|
+
import { Input } from '~/components/ui/input';
|
|
9357
|
+
import { Label } from '~/components/ui/label';
|
|
9357
9358
|
|
|
9358
9359
|
const meta: Meta<typeof Tabs> = {
|
|
9359
9360
|
title: 'Components/Tabs',
|
|
@@ -9453,8 +9454,8 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
9453
9454
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
9454
9455
|
`;
|
|
9455
9456
|
const tooltipStories = `import type { Meta, StoryObj } from '@storybook/react';
|
|
9456
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '
|
|
9457
|
-
import { Button } from '
|
|
9457
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '~/components/ui/tooltip';
|
|
9458
|
+
import { Button } from '~/components/ui/button';
|
|
9458
9459
|
|
|
9459
9460
|
const meta: Meta<typeof Tooltip> = {
|
|
9460
9461
|
title: 'Components/Tooltip',
|
|
@@ -9654,10 +9655,10 @@ import {
|
|
|
9654
9655
|
DialogHeader,
|
|
9655
9656
|
DialogTitle,
|
|
9656
9657
|
DialogTrigger,
|
|
9657
|
-
} from '
|
|
9658
|
-
import { Button } from '
|
|
9659
|
-
import { Input } from '
|
|
9660
|
-
import { Label } from '
|
|
9658
|
+
} from '~/components/ui/dialog';
|
|
9659
|
+
import { Button } from '~/components/ui/button';
|
|
9660
|
+
import { Input } from '~/components/ui/input';
|
|
9661
|
+
import { Label } from '~/components/ui/label';
|
|
9661
9662
|
|
|
9662
9663
|
const meta: Meta<typeof Dialog> = {
|
|
9663
9664
|
title: 'Components/Dialog',
|
|
@@ -9922,6 +9923,7 @@ function generateWebAppFiles(options) {
|
|
|
9922
9923
|
[modelsPackage]: "workspace:*",
|
|
9923
9924
|
[uiPackage]: "workspace:*",
|
|
9924
9925
|
"@geekmidas/client": GEEKMIDAS_VERSIONS["@geekmidas/client"],
|
|
9926
|
+
"@geekmidas/envkit": GEEKMIDAS_VERSIONS["@geekmidas/envkit"],
|
|
9925
9927
|
"@tanstack/react-query": "~5.80.0",
|
|
9926
9928
|
"better-auth": "~1.2.0",
|
|
9927
9929
|
next: "~16.1.0",
|
|
@@ -9935,6 +9937,7 @@ function generateWebAppFiles(options) {
|
|
|
9935
9937
|
"@types/react": "~19.0.0",
|
|
9936
9938
|
"@types/react-dom": "~19.0.0",
|
|
9937
9939
|
tailwindcss: "^4.0.0",
|
|
9940
|
+
tsx: "~4.20.0",
|
|
9938
9941
|
typescript: "~5.8.2"
|
|
9939
9942
|
}
|
|
9940
9943
|
};
|