@auto-engineer/frontend-generator-react-graphql 0.13.3 → 0.15.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 +24 -0
- package/README.md +139 -308
- package/dist/mui-starter/package.json +0 -10
- package/dist/mui-starter/src/App.tsx +2 -2
- package/dist/mui-starter/src/apolloClient.ts +1 -1
- package/dist/mui-starter/src/hooks/use-toast.ts +1 -1
- package/dist/mui-starter/src/pages/NotFound.tsx +1 -1
- package/dist/mui-starter/vite.config.ts +2 -2
- package/dist/shadcn-starter/package.json +0 -10
- package/dist/shadcn-starter/postcss.config.ts +1 -1
- package/dist/shadcn-starter/src/App.tsx +2 -2
- package/dist/shadcn-starter/src/apolloClient.ts +1 -1
- package/dist/shadcn-starter/src/components/atoms/accordion.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/alert-dialog.tsx +2 -3
- package/dist/shadcn-starter/src/components/atoms/alert.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/avatar.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/badge.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/breadcrumb.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/button.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/calendar.tsx +3 -4
- package/dist/shadcn-starter/src/components/atoms/carousel.tsx +2 -3
- package/dist/shadcn-starter/src/components/atoms/checkbox.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/command.tsx +3 -4
- package/dist/shadcn-starter/src/components/atoms/context-menu.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/dialog.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/dropdown-menu.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/form.tsx +5 -6
- package/dist/shadcn-starter/src/components/atoms/hover-card.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/input-otp.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/label.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/menubar.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/navigation-menu.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/pagination.tsx +3 -9
- package/dist/shadcn-starter/src/components/atoms/popover.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/progress.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/radio-group.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/scroll-area.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/select.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/separator.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/sheet.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/sidebar.tsx +6 -7
- package/dist/shadcn-starter/src/components/atoms/slider.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/switch.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/tabs.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/toggle-group.tsx +3 -4
- package/dist/shadcn-starter/src/components/atoms/toggle.tsx +1 -1
- package/dist/shadcn-starter/src/components/atoms/tooltip.tsx +1 -1
- package/dist/shadcn-starter/src/hooks/use-toast.ts +1 -1
- package/dist/shadcn-starter/src/lib/utils.ts +1 -1
- package/dist/shadcn-starter/src/pages/NotFound.tsx +1 -1
- package/dist/shadcn-starter/vite.config.ts +2 -2
- package/dist/src/builder.js +2 -2
- package/dist/src/builder.js.map +1 -1
- package/dist/src/commands/copy-example.d.ts.map +1 -1
- package/dist/src/commands/copy-example.js +8 -4
- package/dist/src/commands/copy-example.js.map +1 -1
- package/dist/src/commands/generate-client.d.ts +1 -1
- package/dist/src/commands/generate-client.d.ts.map +1 -1
- package/dist/src/commands/generate-client.js +11 -7
- package/dist/src/commands/generate-client.js.map +1 -1
- package/dist/src/configure-starter.js +3 -3
- package/dist/src/configure-starter.js.map +1 -1
- package/dist/src/delete-directory.js +2 -2
- package/dist/src/delete-directory.js.map +1 -1
- package/dist/src/generator/generateComponents.d.ts +1 -1
- package/dist/src/generator/generateComponents.d.ts.map +1 -1
- package/dist/src/generator/generateComponents.js +5 -5
- package/dist/src/generator/generateComponents.js.map +1 -1
- package/dist/src/generator/templates/component.ejs.specs.js +4 -4
- package/dist/src/generator/templates/component.ejs.specs.js.map +1 -1
- package/dist/src/generator/templates/component.ejs.specs.ts +4 -4
- package/dist/src/generator/templates/page.ejs.specs.js +4 -4
- package/dist/src/generator/templates/page.ejs.specs.js.map +1 -1
- package/dist/src/generator/templates/page.ejs.specs.ts +4 -4
- package/dist/src/generator/type-guidance-builder.d.ts +2 -2
- package/dist/src/generator/type-guidance-builder.d.ts.map +1 -1
- package/dist/src/generator/type-guidance-builder.js +2 -2
- package/dist/src/generator/type-guidance-builder.js.map +1 -1
- package/dist/src/graphql-type-extractor.js +1 -1
- package/dist/src/graphql-type-extractor.js.map +1 -1
- package/dist/src/run-codegen.js +3 -3
- package/dist/src/run-codegen.js.map +1 -1
- package/dist/src/scaffold-gql-operations.d.ts +1 -1
- package/dist/src/scaffold-gql-operations.d.ts.map +1 -1
- package/dist/src/scaffold-gql-operations.js +5 -5
- package/dist/src/scaffold-gql-operations.js.map +1 -1
- package/dist/src/scaffold-gql-operations.specs.js +1 -1
- package/dist/src/scaffold-gql-operations.specs.js.map +1 -1
- package/dist/src/templates/createFile.js +3 -3
- package/dist/src/templates/createFile.js.map +1 -1
- package/dist/src/write-graphql-schema.js +2 -2
- package/dist/src/write-graphql-schema.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -8
- package/dist/mui-starter/eslint.config.ts +0 -57
- package/dist/shadcn-starter/eslint.config.ts +0 -57
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
-
|
|
4
|
-
import { cn } from '@/lib/utils';
|
|
2
|
+
import * as React from 'react';
|
|
5
3
|
import { buttonVariants } from '@/components/atoms/button';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
6
5
|
|
|
7
6
|
const AlertDialog = AlertDialogPrimitive.Root;
|
|
8
7
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import { cn } from '@/lib/utils';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { type DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';
|
|
8
6
|
import { Button, buttonVariants } from '@/components/atoms/button';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
9
8
|
|
|
10
9
|
function Calendar({
|
|
11
10
|
className,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
|
|
3
2
|
import { ArrowLeft, ArrowRight } from 'lucide-react';
|
|
4
|
-
|
|
5
|
-
import { cn } from '@/lib/utils';
|
|
3
|
+
import * as React from 'react';
|
|
6
4
|
import { Button } from '@/components/atoms/button';
|
|
5
|
+
import { cn } from '@/lib/utils';
|
|
7
6
|
|
|
8
7
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
9
8
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { type DialogProps } from '@radix-ui/react-dialog';
|
|
3
|
+
import type { DialogProps } from '@radix-ui/react-dialog';
|
|
5
4
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
6
5
|
import { Search } from 'lucide-react';
|
|
7
|
-
|
|
8
|
-
import { cn } from '@/lib/utils';
|
|
6
|
+
import * as React from 'react';
|
|
9
7
|
import { Dialog, DialogContent } from '@/components/atoms/dialog';
|
|
8
|
+
import { cn } from '@/lib/utils';
|
|
10
9
|
|
|
11
10
|
const Command = React.forwardRef<
|
|
12
11
|
React.ElementRef<typeof CommandPrimitive>,
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
1
|
+
import type * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import {
|
|
5
5
|
Controller,
|
|
6
|
-
FormProvider,
|
|
7
|
-
useFormContext,
|
|
8
6
|
type ControllerProps,
|
|
9
7
|
type FieldPath,
|
|
10
8
|
type FieldValues,
|
|
9
|
+
FormProvider,
|
|
10
|
+
useFormContext,
|
|
11
11
|
} from 'react-hook-form';
|
|
12
|
-
|
|
13
|
-
import { cn } from '@/lib/utils';
|
|
14
12
|
import { Label } from '@/components/atoms/label';
|
|
13
|
+
import { cn } from '@/lib/utils';
|
|
15
14
|
|
|
16
15
|
const Form = FormProvider;
|
|
17
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
3
2
|
import { cva } from 'class-variance-authority';
|
|
4
3
|
import { ChevronDown } from 'lucide-react';
|
|
4
|
+
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
import { cn } from '@/lib/utils';
|
|
7
7
|
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
3
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type ButtonProps, buttonVariants } from '@/components/atoms/button';
|
|
4
4
|
import { cn } from '@/lib/utils';
|
|
5
|
-
import { ButtonProps, buttonVariants } from '@/components/atoms/button';
|
|
6
5
|
|
|
7
6
|
const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (
|
|
8
|
-
<nav
|
|
9
|
-
role="navigation"
|
|
10
|
-
aria-label="pagination"
|
|
11
|
-
className={cn('mx-auto flex w-full justify-center', className)}
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
7
|
+
<nav aria-label="pagination" className={cn('mx-auto flex w-full justify-center', className)} {...props} />
|
|
14
8
|
);
|
|
15
9
|
Pagination.displayName = 'Pagination';
|
|
16
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
5
4
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
6
5
|
import { X } from 'lucide-react';
|
|
6
|
+
import * as React from 'react';
|
|
7
7
|
|
|
8
8
|
import { cn } from '@/lib/utils';
|
|
9
9
|
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
-
import {
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
4
3
|
import { PanelLeft } from 'lucide-react';
|
|
5
|
-
|
|
6
|
-
import { useMobile } from '@/hooks/use-mobile';
|
|
7
|
-
import { cn } from '@/lib/utils';
|
|
4
|
+
import * as React from 'react';
|
|
8
5
|
import { Button } from '@/components/atoms/button';
|
|
9
6
|
import { Input } from '@/components/atoms/input';
|
|
10
7
|
import { Separator } from '@/components/atoms/separator';
|
|
11
8
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from '@/components/atoms/sheet';
|
|
12
9
|
import { Skeleton } from '@/components/atoms/skeleton';
|
|
13
10
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/atoms/tooltip';
|
|
11
|
+
import { useMobile } from '@/hooks/use-mobile';
|
|
12
|
+
import { cn } from '@/lib/utils';
|
|
14
13
|
|
|
15
14
|
const SIDEBAR_COOKIE_NAME = 'sidebar_state';
|
|
16
15
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -73,7 +72,7 @@ const SidebarProvider = React.forwardRef<
|
|
|
73
72
|
// Helper to toggle the sidebar.
|
|
74
73
|
const toggleSidebar = React.useCallback(() => {
|
|
75
74
|
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
76
|
-
}, [isMobile, setOpen
|
|
75
|
+
}, [isMobile, setOpen]);
|
|
77
76
|
|
|
78
77
|
// Adds a keyboard shortcut to toggle the sidebar.
|
|
79
78
|
React.useEffect(() => {
|
|
@@ -102,7 +101,7 @@ const SidebarProvider = React.forwardRef<
|
|
|
102
101
|
setOpenMobile,
|
|
103
102
|
toggleSidebar,
|
|
104
103
|
}),
|
|
105
|
-
[state, open, setOpen, isMobile, openMobile,
|
|
104
|
+
[state, open, setOpen, isMobile, openMobile, toggleSidebar],
|
|
106
105
|
);
|
|
107
106
|
|
|
108
107
|
return (
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { cn } from '@/lib/utils';
|
|
4
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as React from 'react';
|
|
8
6
|
import { toggleVariants } from '@/components/atoms/toggle';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
9
8
|
|
|
10
9
|
const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>>({
|
|
11
10
|
size: 'default',
|
package/dist/src/builder.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as fs from 'fs/promises';
|
|
2
|
-
import * as path from 'path';
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
3
|
import createDebug from 'debug';
|
|
4
4
|
const debug = createDebug('auto:frontend-generator-react-graphql:builder');
|
|
5
5
|
const debugFiles = createDebug('auto:frontend-generator-react-graphql:builder:files');
|
package/dist/src/builder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,WAAW,MAAM,OAAO,CAAC;AAEhC,MAAM,KAAK,GAAG,WAAW,CAAC,+CAA+C,CAAC,CAAC;AAC3E,MAAM,UAAU,GAAG,WAAW,CAAC,qDAAqD,CAAC,CAAC;AACtF,MAAM,UAAU,GAAG,WAAW,CAAC,qDAAqD,CAAC,CAAC;AAEtF,MAAM,OAAO,uBAAuB;IAApC;QACU,iBAAY,GAAwB,IAAI,GAAG,EAAE,CAAC;IAmMxD,CAAC;IAjMC,KAAK,CAAC,YAAY,CAAC,WAAmB;QACpC,KAAK,CAAC,0BAA0B,EAAE,WAAW,CAAC,CAAC;QAC/C,yGAAyG;QACzG,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;QACzG,KAAK,CAAC,gCAAgC,EAAE,UAAU,CAAC,CAAC;QACpD,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACxC,KAAK,CAAC,mCAAmC,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,KAAK,C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I,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;YAC7D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAC9C,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3D,MAAM,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACrC,YAAY,EAAE,CAAC;YACf,UAAU,CAAC,wBAAwB,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtF,CAAC;QAED,UAAU,CAAC,mCAAmC,EAAE,YAAY,CAAC,CAAC;QAC9D,UAAU,CAAC,+BAA+B,EAAE,SAAS,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-example.d.ts","sourceRoot":"","sources":["../../../src/commands/copy-example.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"copy-example.d.ts","sourceRoot":"","sources":["../../../src/commands/copy-example.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAK5F,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACtC,aAAa,EACb;IACE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,KAAK,CACpC,eAAe,EACf;IACE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CACxC,mBAAmB,EACnB;IACE,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,eAAO,MAAM,cAAc;;;qBAtBV,MAAM;mBACR,MAAM;;;;;GAwDnB,CAAC;AAkBH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,kBAAkB,GAAG,sBAAsB,CAAC,CA+EtD;AAGD,eAAe,cAAc,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { promises as fs } from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
1
4
|
import { defineCommandHandler } from '@auto-engineer/message-bus';
|
|
2
|
-
import { promises as fs } from 'fs';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
5
|
import createDebug from 'debug';
|
|
6
6
|
const debug = createDebug('auto:frontend-generator-react-graphql:copy-example');
|
|
7
7
|
export const commandHandler = defineCommandHandler({
|
|
8
8
|
name: 'CopyExample',
|
|
9
|
+
displayName: 'Copy Example',
|
|
9
10
|
alias: 'copy:example',
|
|
10
11
|
description: 'Copy example React GraphQL template',
|
|
11
12
|
category: 'copy',
|
|
@@ -21,7 +22,10 @@ export const commandHandler = defineCommandHandler({
|
|
|
21
22
|
},
|
|
22
23
|
},
|
|
23
24
|
examples: ['$ auto copy:example --starter-name=shadcn-starter --target-dir=./my-starter'],
|
|
24
|
-
events: [
|
|
25
|
+
events: [
|
|
26
|
+
{ name: 'ExampleCopied', displayName: 'Example Copied' },
|
|
27
|
+
{ name: 'ExampleCopyFailed', displayName: 'Example Copy Failed' },
|
|
28
|
+
],
|
|
25
29
|
handle: async (command) => {
|
|
26
30
|
const typedCommand = command;
|
|
27
31
|
const result = await handleCopyExampleCommand(typedCommand);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-example.js","sourceRoot":"","sources":["../../../src/commands/copy-example.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"copy-example.js","sourceRoot":"","sources":["../../../src/commands/copy-example.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAgB,oBAAoB,EAAc,MAAM,4BAA4B,CAAC;AAC5F,OAAO,WAAW,MAAM,OAAO,CAAC;AAEhC,MAAM,KAAK,GAAG,WAAW,CAAC,oDAAoD,CAAC,CAAC;AA2BhF,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAGhD;IACA,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE;QACN,WAAW,EAAE;YACX,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,IAAI;SACf;QACD,SAAS,EAAE;YACT,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,IAAI;SACf;KACF;IACD,QAAQ,EAAE,CAAC,6EAA6E,CAAC;IACzF,MAAM,EAAE;QACN,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE;QACxD,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,qBAAqB,EAAE;KAClE;IACD,MAAM,EAAE,KAAK,EAAE,OAAgB,EAAwD,EAAE;QACvF,MAAM,YAAY,GAAG,OAA6B,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC,YAAY,CAAC,CAAC;QAC5D,IAAI,MAAM,CAA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AC,aAAa;aACrC,CAAC;QACJ,CAAC;QAED,6CAA6C;QAC7C,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAE7C,mBAAmB;QACnB,MAAM,aAAa,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAEjD,OAAO;YACL,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE;gBACJ,WAAW;gBACX,SAAS,EAAE,cAAc;aAC1B;YACD,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;SACrC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QAE3C,OAAO;YACL,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE;gBACJ,KAAK,EAAE,YAAY;gBACnB,WAAW;gBACX,SAAS;aACV;YACD,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;SACrC,CAAC;IACJ,CAAC;AACH,CAAC;AAED,wCAAwC;AACxC,eAAe,cAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Command, type Event } from '@auto-engineer/message-bus';
|
|
2
|
-
import { ComponentType } from '../types';
|
|
2
|
+
import type { ComponentType } from '../types';
|
|
3
3
|
export type GenerateClientCommand = Command<'GenerateClient', {
|
|
4
4
|
starter?: 'shadcn' | 'mui';
|
|
5
5
|
starterDir?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-client.d.ts","sourceRoot":"","sources":["../../../src/commands/generate-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-client.d.ts","sourceRoot":"","sources":["../../../src/commands/generate-client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAO5F,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,UAAU,CAAC;AAgBxD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CACzC,gBAAgB,EAChB;IACE,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CACF,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,KAAK,CACtC,iBAAiB,EACjB;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,aAAa,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;CACJ,CACF,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAC7C,wBAAwB,EACxB;IACE,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG,2BAA2B,CAAC;AAEtF,eAAO,MAAM,cAAc,qDAiDzB,CAAC;AAyFH,eAAe,cAAc,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { promises as fs } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
1
4
|
import { defineCommandHandler } from '@auto-engineer/message-bus';
|
|
2
|
-
import
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
+
import createDebug from 'debug';
|
|
5
6
|
import { FrontendScaffoldBuilder } from '../builder.js';
|
|
7
|
+
import { configureStarter } from '../configure-starter.js';
|
|
6
8
|
import { generateComponents } from '../generator/generateComponents.js';
|
|
9
|
+
import { runCodegen } from '../run-codegen.js';
|
|
7
10
|
import { writeGqlOperationsToFolder } from '../scaffold-gql-operations.js';
|
|
8
11
|
import { generateSchemaFile } from '../write-graphql-schema.js';
|
|
9
|
-
import { runCodegen } from '../run-codegen.js';
|
|
10
|
-
import { configureStarter } from '../configure-starter.js';
|
|
11
|
-
import createDebug from 'debug';
|
|
12
12
|
const debug = createDebug('auto:frontend-generator-react-graphql:command');
|
|
13
13
|
const debugBuilder = createDebug('auto:frontend-generator-react-graphql:command:builder');
|
|
14
14
|
const debugGeneration = createDebug('auto:frontend-generator-react-graphql:command:generation');
|
|
@@ -21,6 +21,7 @@ const resolveStarterPath = (starter) => {
|
|
|
21
21
|
};
|
|
22
22
|
export const commandHandler = defineCommandHandler({
|
|
23
23
|
name: 'GenerateClient',
|
|
24
|
+
displayName: 'Generate Client',
|
|
24
25
|
alias: 'generate:client',
|
|
25
26
|
description: 'Generate React client app',
|
|
26
27
|
category: 'generate',
|
|
@@ -50,7 +51,10 @@ export const commandHandler = defineCommandHandler({
|
|
|
50
51
|
examples: [
|
|
51
52
|
'$ auto generate:client --starter-dir=./shadcn-starter --target-dir=./client --ia-schema-path=./auto-ia.json --gql-schema-path=./schema.graphql --figma-variables-path=./figma-vars.json',
|
|
52
53
|
],
|
|
53
|
-
events: [
|
|
54
|
+
events: [
|
|
55
|
+
{ name: 'ClientGenerated', displayName: 'Client Generated' },
|
|
56
|
+
{ name: 'ClientGenerationFailed', displayName: 'Client Generation Failed' },
|
|
57
|
+
],
|
|
54
58
|
handle: async (command) => {
|
|
55
59
|
const typedCommand = command;
|
|
56
60
|
debug('Command handler invoked for GenerateClient');
|