@astryxdesign/cli 0.1.2 → 0.1.3
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 +64 -1
- package/README.md +49 -55
- package/docs/layout.doc.dense.mjs +90 -0
- package/docs/layout.doc.mjs +160 -0
- package/docs/principles.doc.dense.mjs +2 -2
- package/docs/principles.doc.mjs +4 -0
- package/docs/principles.doc.zh.mjs +2 -2
- package/docs/theme.doc.mjs +2 -2
- package/package.json +13 -1
- package/src/api/blog.mjs +192 -0
- package/src/api/blog.test.mjs +144 -0
- package/src/api/component.mjs +253 -12
- package/src/api/discover.mjs +14 -7
- package/src/api/doctor.mjs +10 -25
- package/src/api/index.mjs +1 -0
- package/src/api/layout.mjs +11 -10
- package/src/api/layout.test.mjs +4 -1
- package/src/api/template-integration.test.mjs +225 -0
- package/src/api/template.mjs +242 -84
- package/src/api/validate-integration.mjs +370 -0
- package/src/api/validate-integration.test.mjs +222 -0
- package/src/codemod.mjs +93 -0
- package/src/codemod.test.mjs +134 -0
- package/src/codemods/__tests__/registry.test.mjs +1 -0
- package/src/codemods/__tests__/runner.test.mjs +103 -0
- package/src/codemods/integration-discovery.mjs +168 -0
- package/src/codemods/integration-discovery.test.mjs +234 -0
- package/src/codemods/integration-runner.mjs +109 -0
- package/src/codemods/registry.mjs +1 -0
- package/src/codemods/run-codemod.mjs +207 -0
- package/src/codemods/runner.mjs +73 -96
- package/src/codemods/transforms/v0.0.15/index.mjs +0 -13
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-css-surfaces.test.mjs +67 -0
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-declare-module.test.mjs +61 -0
- package/src/codemods/transforms/v0.1.0/__tests__/v0.1.0-ordering.test.mjs +104 -0
- package/src/codemods/transforms/{v0.0.15 → v0.1.0}/drop-xds-prefix-imports.mjs +15 -4
- package/src/codemods/transforms/v0.1.0/index.mjs +43 -6
- package/src/codemods/transforms/v0.1.0/migrate-xds-css-surfaces.mjs +77 -0
- package/src/codemods/transforms/v0.1.0/migrate-xds-declare-module.mjs +78 -0
- package/src/codemods/transforms/v0.1.3/__tests__/migrate-layout-components-to-experimental.test.mjs +360 -0
- package/src/codemods/transforms/v0.1.3/index.mjs +19 -0
- package/src/codemods/transforms/v0.1.3/migrate-layout-components-to-experimental.mjs +260 -0
- package/src/commands/agent-docs.mjs +4 -1
- package/src/commands/blog.mjs +60 -0
- package/src/commands/build-theme.import-path.test.mjs +2 -12
- package/src/commands/build-theme.mjs +117 -0
- package/src/commands/build-theme.prose.test.mjs +5 -15
- package/src/commands/build-theme.watch.test.mjs +149 -0
- package/src/commands/component/index.mjs +44 -10
- package/src/commands/component-ownership.test.mjs +227 -0
- package/src/commands/discover.mjs +5 -16
- package/src/commands/doctor.test.mjs +3 -3
- package/src/commands/ensure-core-built.mjs +120 -0
- package/src/commands/json-contract.test.mjs +0 -32
- package/src/commands/swizzle.mjs +224 -235
- package/src/commands/swizzle.path-safety.test.mjs +3 -3
- package/src/commands/swizzle.routing.test.mjs +279 -0
- package/src/commands/template.mjs +33 -37
- package/src/commands/upgrade.config-ordering.test.mjs +273 -0
- package/src/commands/upgrade.integration-policy.test.mjs +204 -0
- package/src/commands/upgrade.mjs +349 -170
- package/src/commands/validate-integration.mjs +110 -0
- package/src/commands/validate-integration.test.mjs +124 -0
- package/src/config.mjs +7 -20
- package/src/config.test.mjs +89 -13
- package/src/index.mjs +8 -3
- package/src/integration.mjs +19 -0
- package/src/lib/component-discovery.mjs +177 -0
- package/src/lib/config-cache.mjs +91 -0
- package/src/lib/config-cache.test.mjs +83 -0
- package/src/lib/config-schema.mjs +41 -55
- package/src/lib/error-codes.mjs +15 -12
- package/src/lib/integration-warnings.mjs +62 -0
- package/src/lib/integration-warnings.test.mjs +102 -0
- package/src/lib/integrations.mjs +92 -115
- package/src/lib/integrations.test.mjs +88 -107
- package/src/lib/manifest.mjs +5 -2
- package/src/lib/module-loader.mjs +80 -0
- package/src/lib/module-loader.test.mjs +106 -0
- package/src/lib/project.mjs +502 -0
- package/src/lib/project.test.mjs +308 -0
- package/src/lib/site.mjs +20 -0
- package/src/template.mjs +73 -0
- package/src/template.test.mjs +127 -0
- package/src/types/api.d.ts +2 -6
- package/src/types/base.d.ts +3 -9
- package/src/types/codemod.d.ts +81 -0
- package/src/types/component.d.ts +27 -2
- package/src/types/config.d.ts +56 -85
- package/src/types/error-codes.d.ts +5 -3
- package/src/types/index.d.ts +0 -1
- package/src/types/integration.d.ts +29 -0
- package/src/types/swizzle.d.ts +9 -2
- package/src/types/template-api.d.ts +54 -0
- package/src/types/template.d.ts +10 -7
- package/src/types/upgrade.d.ts +29 -0
- package/src/types/validate-integration.d.ts +24 -0
- package/src/utils/github.mjs +0 -237
- package/src/utils/interactive.mjs +2 -2
- package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.doc.mjs +14 -0
- package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.tsx +28 -0
- package/templates/blocks/components/Blockquote/BlockquoteTestimonials.doc.mjs +14 -0
- package/templates/blocks/components/Blockquote/BlockquoteTestimonials.tsx +34 -0
- package/templates/blocks/components/Blockquote/BlockquoteWithCite.doc.mjs +14 -0
- package/templates/blocks/components/Blockquote/BlockquoteWithCite.tsx +21 -0
- package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.tsx +15 -0
- package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.doc.mjs +14 -0
- package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.tsx +16 -0
- package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.doc.mjs +19 -0
- package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.tsx +34 -0
- package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.tsx +30 -0
- package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.doc.mjs +14 -0
- package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.tsx +31 -0
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.doc.mjs +14 -0
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.tsx +26 -0
- package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.doc.mjs +14 -0
- package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.tsx +32 -0
- package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.doc.mjs +18 -0
- package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +32 -0
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.tsx +27 -0
- package/templates/blocks/components/ContextMenu/ContextMenuBasic.doc.mjs +14 -0
- package/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +32 -0
- package/templates/blocks/components/DateRangeInput/DateRangeInputWithPresets.doc.mjs +14 -0
- package/templates/blocks/components/DateRangeInput/DateRangeInputWithPresets.tsx +46 -0
- package/templates/blocks/components/DateRangeInput/DateRangeInputWithValidation.doc.mjs +14 -0
- package/templates/blocks/components/DateRangeInput/DateRangeInputWithValidation.tsx +52 -0
- package/templates/blocks/components/DateTimeInput/DateTimeInputWithValidation.doc.mjs +14 -0
- package/templates/blocks/components/DateTimeInput/DateTimeInputWithValidation.tsx +43 -0
- package/templates/blocks/components/DialogHeader/DialogHeaderBasic.doc.mjs +14 -0
- package/templates/blocks/components/DialogHeader/DialogHeaderBasic.tsx +30 -0
- package/templates/blocks/components/DropdownMenu/DropdownMenuShowcase.tsx +0 -6
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.tsx +27 -0
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemShowcase.tsx +1 -5
- package/templates/blocks/components/FieldLabel/FieldLabelBasic.doc.mjs +14 -0
- package/templates/blocks/components/FieldLabel/FieldLabelBasic.tsx +20 -0
- package/templates/blocks/components/FieldStatus/FieldStatusBasic.doc.mjs +14 -0
- package/templates/blocks/components/FieldStatus/FieldStatusBasic.tsx +23 -0
- package/templates/blocks/components/FileInput/FileInputBasic.doc.mjs +14 -0
- package/templates/blocks/components/FileInput/FileInputBasic.tsx +22 -0
- package/templates/blocks/components/GridSpan/GridSpanColumns.doc.mjs +14 -0
- package/templates/blocks/components/GridSpan/GridSpanColumns.tsx +38 -0
- package/templates/blocks/components/HStack/HStackBasic.doc.mjs +14 -0
- package/templates/blocks/components/HStack/HStackBasic.tsx +16 -0
- package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.doc.mjs +14 -0
- package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.tsx +57 -0
- package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs +1 -1
- package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +9 -4
- package/templates/blocks/components/InputGroup/InputGroupBasic.doc.mjs +14 -0
- package/templates/blocks/components/InputGroup/InputGroupBasic.tsx +27 -0
- package/templates/blocks/components/LayoutContent/LayoutContentBasic.doc.mjs +23 -0
- package/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +40 -0
- package/templates/blocks/components/LayoutFooter/LayoutFooterActions.doc.mjs +22 -0
- package/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +41 -0
- package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.doc.mjs +23 -0
- package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +40 -0
- package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.doc.mjs +22 -0
- package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +37 -0
- package/templates/blocks/components/Lightbox/LightboxGallery.doc.mjs +14 -0
- package/templates/blocks/components/Lightbox/LightboxGallery.tsx +53 -0
- package/templates/blocks/components/Lightbox/LightboxShowcase.tsx +4 -3
- package/templates/blocks/components/Lightbox/LightboxVideo.doc.mjs +14 -0
- package/templates/blocks/components/Lightbox/LightboxVideo.tsx +27 -0
- package/templates/blocks/components/Lightbox/LightboxZoom.doc.mjs +14 -0
- package/templates/blocks/components/Lightbox/LightboxZoom.tsx +33 -0
- package/templates/blocks/components/LinkProvider/LinkProviderCustomLink.doc.mjs +1 -1
- package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.tsx +19 -0
- package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.doc.mjs +23 -0
- package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.tsx +42 -0
- package/templates/blocks/components/MoreMenu/MoreMenuShowcase.tsx +0 -6
- package/templates/blocks/components/NavIcon/NavIconBasic.doc.mjs +14 -0
- package/templates/blocks/components/NavIcon/NavIconBasic.tsx +16 -0
- package/templates/blocks/components/RadioListItem/RadioListItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/RadioListItem/RadioListItemBasic.tsx +30 -0
- package/templates/blocks/components/Resizable/ResizableSidebar.doc.mjs +25 -0
- package/templates/blocks/components/Resizable/ResizableSidebar.tsx +67 -0
- package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.tsx +21 -0
- package/templates/blocks/components/SelectorOption/SelectorOptionBasic.doc.mjs +14 -0
- package/templates/blocks/components/SelectorOption/SelectorOptionBasic.tsx +39 -0
- package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.doc.mjs +14 -0
- package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.tsx +55 -0
- package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.doc.mjs +14 -0
- package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.tsx +38 -0
- package/templates/blocks/components/SideNavItem/SideNavItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/SideNavItem/SideNavItemBasic.tsx +49 -0
- package/templates/blocks/components/SideNavSection/SideNavSectionBasic.doc.mjs +14 -0
- package/templates/blocks/components/SideNavSection/SideNavSectionBasic.tsx +71 -0
- package/templates/blocks/components/StackItem/StackItemFill.doc.mjs +14 -0
- package/templates/blocks/components/StackItem/StackItemFill.tsx +28 -0
- package/templates/blocks/components/Tab/TabWithSelectedIcon.doc.mjs +13 -0
- package/templates/blocks/components/Tab/TabWithSelectedIcon.tsx +39 -0
- package/templates/blocks/components/TabMenu/TabMenuBasic.doc.mjs +14 -0
- package/templates/blocks/components/TabMenu/TabMenuBasic.tsx +23 -0
- package/templates/blocks/components/Table/StickyColumnsHookUsage.doc.mjs +1 -1
- package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.doc.mjs +14 -0
- package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.tsx +47 -0
- package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.doc.mjs +14 -0
- package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.tsx +22 -0
- package/templates/blocks/components/TopNavItem/TopNavItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/TopNavItem/TopNavItemBasic.tsx +21 -0
- package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.doc.mjs +20 -0
- package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.tsx +46 -0
- package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.doc.mjs +14 -0
- package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.tsx +16 -0
- package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.tsx +26 -0
- package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.doc.mjs +14 -0
- package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.tsx +43 -0
- package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.tsx +43 -0
- package/templates/blocks/components/VStack/VStackBasic.doc.mjs +14 -0
- package/templates/blocks/components/VStack/VStackBasic.tsx +20 -0
- package/templates/pages/kanban-board/page.tsx +729 -0
- package/templates/pages/kanban-board/template.doc.mjs +12 -0
- package/templates/pages/shell-nav/page.tsx +321 -0
- package/templates/pages/shell-nav/template.doc.mjs +12 -0
- package/templates/pages/shell-side-nav/page.tsx +241 -0
- package/templates/pages/shell-side-nav/template.doc.mjs +12 -0
- package/templates/pages/shell-top-nav/page.tsx +224 -0
- package/templates/pages/shell-top-nav/template.doc.mjs +12 -0
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-config-surfaces.test.mjs +0 -116
- package/src/codemods/transforms/v0.1.0/migrate-xds-config-surfaces.mjs +0 -230
- package/src/commands/gap-report.mjs +0 -464
- package/src/commands/gap-report.test.mjs +0 -168
- package/src/commands/swizzle-gap-safety.test.mjs +0 -273
- package/src/lib/config.mjs +0 -113
- package/src/lib/config.test.mjs +0 -91
- package/src/types/gap-report.d.ts +0 -29
- package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.doc.mjs +0 -14
- package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.tsx +0 -64
- package/templates/blocks/components/TreeListItem/TreeListItemShowcase.doc.mjs +0 -14
- package/templates/blocks/components/TreeListItem/TreeListItemShowcase.tsx +0 -60
- /package/src/codemods/transforms/{v0.0.15 → v0.1.0}/__tests__/drop-xds-prefix-imports.test.mjs +0 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import * as stylex from '@stylexjs/stylex';
|
|
6
|
+
import {AppShell} from '@astryxdesign/core/AppShell';
|
|
7
|
+
import {
|
|
8
|
+
TopNav,
|
|
9
|
+
TopNavHeading,
|
|
10
|
+
TopNavItem,
|
|
11
|
+
TopNavMegaMenu,
|
|
12
|
+
TopNavMegaMenuItem,
|
|
13
|
+
TopNavMegaMenuFeaturedCard,
|
|
14
|
+
} from '@astryxdesign/core/TopNav';
|
|
15
|
+
import {NavIcon} from '@astryxdesign/core/NavIcon';
|
|
16
|
+
import {Icon} from '@astryxdesign/core/Icon';
|
|
17
|
+
import type {IconType} from '@astryxdesign/core/Icon';
|
|
18
|
+
import {IconButton} from '@astryxdesign/core/IconButton';
|
|
19
|
+
import {Button} from '@astryxdesign/core/Button';
|
|
20
|
+
import {Badge} from '@astryxdesign/core/Badge';
|
|
21
|
+
import {Card} from '@astryxdesign/core/Card';
|
|
22
|
+
import {Grid} from '@astryxdesign/core/Grid';
|
|
23
|
+
import {Stack, VStack} from '@astryxdesign/core/Stack';
|
|
24
|
+
import {
|
|
25
|
+
ShoppingBagIcon,
|
|
26
|
+
ShoppingCartIcon,
|
|
27
|
+
MagnifyingGlassIcon,
|
|
28
|
+
SparklesIcon,
|
|
29
|
+
SwatchIcon,
|
|
30
|
+
TagIcon,
|
|
31
|
+
HomeModernIcon,
|
|
32
|
+
FaceSmileIcon,
|
|
33
|
+
ReceiptPercentIcon,
|
|
34
|
+
GiftIcon,
|
|
35
|
+
CloudIcon,
|
|
36
|
+
BoltIcon,
|
|
37
|
+
SunIcon,
|
|
38
|
+
StarIcon,
|
|
39
|
+
FireIcon,
|
|
40
|
+
GlobeAltIcon,
|
|
41
|
+
MoonIcon,
|
|
42
|
+
} from '@heroicons/react/24/outline';
|
|
43
|
+
|
|
44
|
+
const styles = stylex.create({
|
|
45
|
+
// Cap + center the page body so wide screens show whitespace gutters.
|
|
46
|
+
contentMax: {maxWidth: 1100, marginInline: 'auto'},
|
|
47
|
+
// Lock both mega-menu panels to an identical size. Without this, Shop and
|
|
48
|
+
// Brands size to their own content (different widths); since both anchor to
|
|
49
|
+
// the centered nav, switching between them resizes the panel — which reads
|
|
50
|
+
// as flashing/jumping. Fixed item + featured widths make the panels
|
|
51
|
+
// pixel-identical so the transition is seamless.
|
|
52
|
+
megaItems: {gridColumn: '1 / -1', width: 520},
|
|
53
|
+
megaFeatured: {width: 240},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
type MegaItem = {name: string; tagline: string; icon: IconType};
|
|
57
|
+
|
|
58
|
+
// Shop and Brands each render 8 items — the mega menu's built-in 2-column grid
|
|
59
|
+
// lays them out as 2 columns × 4 rows, alongside a featured card.
|
|
60
|
+
const SHOP_ITEMS: MegaItem[] = [
|
|
61
|
+
{name: 'New Arrivals', tagline: 'The latest drops', icon: SparklesIcon},
|
|
62
|
+
{name: 'Womenswear', tagline: 'Dresses, knitwear & more', icon: SwatchIcon},
|
|
63
|
+
{name: 'Menswear', tagline: 'Shirts, tailoring & more', icon: TagIcon},
|
|
64
|
+
{name: 'Home', tagline: 'Bedding, lighting & décor', icon: HomeModernIcon},
|
|
65
|
+
{
|
|
66
|
+
name: 'Beauty',
|
|
67
|
+
tagline: 'Skincare, fragrance & makeup',
|
|
68
|
+
icon: FaceSmileIcon,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Accessories',
|
|
72
|
+
tagline: 'Bags, hats & sunglasses',
|
|
73
|
+
icon: ShoppingBagIcon,
|
|
74
|
+
},
|
|
75
|
+
{name: 'Sale', tagline: 'Up to 50% off', icon: ReceiptPercentIcon},
|
|
76
|
+
{name: 'Gift Cards', tagline: 'The perfect present', icon: GiftIcon},
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
const BRAND_ITEMS: MegaItem[] = [
|
|
80
|
+
{name: 'Aether', tagline: 'Performance essentials', icon: SparklesIcon},
|
|
81
|
+
{name: 'Northwind', tagline: 'Outdoor & technical', icon: CloudIcon},
|
|
82
|
+
{name: 'Loomwell', tagline: 'Everyday knitwear', icon: BoltIcon},
|
|
83
|
+
{name: 'Verdant', tagline: 'Sustainable basics', icon: SunIcon},
|
|
84
|
+
{name: 'Studio Mara', tagline: 'Modern tailoring', icon: StarIcon},
|
|
85
|
+
{name: 'Atelier Kos', tagline: 'Limited ateliers', icon: FireIcon},
|
|
86
|
+
{name: 'Rue & Co', tagline: 'City streetwear', icon: GlobeAltIcon},
|
|
87
|
+
{name: 'Halden', tagline: 'Minimal staples', icon: MoonIcon},
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
const CATEGORY_TILES = [
|
|
91
|
+
'New Arrivals',
|
|
92
|
+
'Womenswear',
|
|
93
|
+
'Menswear',
|
|
94
|
+
'Home & Living',
|
|
95
|
+
'Beauty',
|
|
96
|
+
'Accessories',
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
// Wraps the 8 items in a fixed-width 2-column grid so every mega menu's item
|
|
100
|
+
// area is exactly the same width regardless of its content.
|
|
101
|
+
function MegaItems({items}: {items: MegaItem[]}) {
|
|
102
|
+
return (
|
|
103
|
+
<Stack xstyle={styles.megaItems}>
|
|
104
|
+
<Grid columns={2} gap={2}>
|
|
105
|
+
{items.map(item => (
|
|
106
|
+
<TopNavMegaMenuItem
|
|
107
|
+
key={item.name}
|
|
108
|
+
title={item.name}
|
|
109
|
+
description={item.tagline}
|
|
110
|
+
icon={<Icon icon={item.icon} size="md" color="secondary" />}
|
|
111
|
+
href="#"
|
|
112
|
+
/>
|
|
113
|
+
))}
|
|
114
|
+
</Grid>
|
|
115
|
+
</Stack>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Pins the featured card to a fixed width so both panels match exactly.
|
|
120
|
+
function MegaFeatured(props: {
|
|
121
|
+
title: string;
|
|
122
|
+
description: string;
|
|
123
|
+
image: string;
|
|
124
|
+
imageAlt: string;
|
|
125
|
+
linkLabel: string;
|
|
126
|
+
linkHref: string;
|
|
127
|
+
}) {
|
|
128
|
+
return (
|
|
129
|
+
<Stack xstyle={styles.megaFeatured}>
|
|
130
|
+
<TopNavMegaMenuFeaturedCard {...props} />
|
|
131
|
+
</Stack>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export default function ShellTopNav() {
|
|
136
|
+
return (
|
|
137
|
+
<AppShell
|
|
138
|
+
variant="surface"
|
|
139
|
+
contentPadding={6}
|
|
140
|
+
topNav={
|
|
141
|
+
<TopNav
|
|
142
|
+
label="Lumen storefront navigation"
|
|
143
|
+
heading={
|
|
144
|
+
<TopNavHeading
|
|
145
|
+
heading="Lumen"
|
|
146
|
+
logo={
|
|
147
|
+
<NavIcon icon={<Icon icon={ShoppingBagIcon} size="sm" />} />
|
|
148
|
+
}
|
|
149
|
+
href="#"
|
|
150
|
+
/>
|
|
151
|
+
}
|
|
152
|
+
centerContent={
|
|
153
|
+
<>
|
|
154
|
+
<TopNavMegaMenu
|
|
155
|
+
label="Shop"
|
|
156
|
+
items={<MegaItems items={SHOP_ITEMS} />}
|
|
157
|
+
featured={
|
|
158
|
+
<MegaFeatured
|
|
159
|
+
title="The Autumn Edit"
|
|
160
|
+
description="Layering staples in warm, earthy tones."
|
|
161
|
+
image="https://lookaside.facebook.com/assets/astryx/texture-beige-horizontal-1.png"
|
|
162
|
+
imageAlt="Autumn collection lookbook"
|
|
163
|
+
linkLabel="Shop the edit"
|
|
164
|
+
linkHref="#autumn-edit"
|
|
165
|
+
/>
|
|
166
|
+
}
|
|
167
|
+
/>
|
|
168
|
+
<TopNavMegaMenu
|
|
169
|
+
label="Brands"
|
|
170
|
+
items={<MegaItems items={BRAND_ITEMS} />}
|
|
171
|
+
featured={
|
|
172
|
+
<MegaFeatured
|
|
173
|
+
title="Meet Studio Mara"
|
|
174
|
+
description="Modern tailoring, made to last."
|
|
175
|
+
image="https://lookaside.facebook.com/assets/astryx/texture-beige-horizontal-2.png"
|
|
176
|
+
imageAlt="Studio Mara lookbook"
|
|
177
|
+
linkLabel="Discover the label"
|
|
178
|
+
linkHref="#studio-mara"
|
|
179
|
+
/>
|
|
180
|
+
}
|
|
181
|
+
/>
|
|
182
|
+
<TopNavItem label="Sale" href="#" />
|
|
183
|
+
<TopNavItem label="Service" href="#" />
|
|
184
|
+
</>
|
|
185
|
+
}
|
|
186
|
+
endContent={
|
|
187
|
+
<>
|
|
188
|
+
<IconButton
|
|
189
|
+
label="Search products"
|
|
190
|
+
tooltip="Search"
|
|
191
|
+
variant="ghost"
|
|
192
|
+
icon={<Icon icon={MagnifyingGlassIcon} size="sm" />}
|
|
193
|
+
/>
|
|
194
|
+
<Button label="Sign in" variant="ghost" />
|
|
195
|
+
<Button
|
|
196
|
+
label="Checkout"
|
|
197
|
+
variant="primary"
|
|
198
|
+
icon={<Icon icon={ShoppingCartIcon} size="sm" />}
|
|
199
|
+
endContent={<Badge label={3} />}
|
|
200
|
+
/>
|
|
201
|
+
</>
|
|
202
|
+
}
|
|
203
|
+
/>
|
|
204
|
+
}>
|
|
205
|
+
<VStack gap={10} xstyle={styles.contentMax}>
|
|
206
|
+
<Card variant="muted" padding={0} width="100%" height={360} />
|
|
207
|
+
|
|
208
|
+
{[0, 1, 2].map(section => (
|
|
209
|
+
<VStack key={section} gap={4}>
|
|
210
|
+
<Card variant="muted" padding={0} width={200} height={24} />
|
|
211
|
+
<Grid minChildWidth={160} gap={4}>
|
|
212
|
+
{CATEGORY_TILES.map(tile => (
|
|
213
|
+
<VStack key={tile} gap={2}>
|
|
214
|
+
<Card variant="muted" padding={0} width="100%" height={120} />
|
|
215
|
+
<Card variant="muted" padding={0} width="60%" height={14} />
|
|
216
|
+
</VStack>
|
|
217
|
+
))}
|
|
218
|
+
</Grid>
|
|
219
|
+
</VStack>
|
|
220
|
+
))}
|
|
221
|
+
</VStack>
|
|
222
|
+
</AppShell>
|
|
223
|
+
);
|
|
224
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'page',
|
|
6
|
+
name: 'Top Nav',
|
|
7
|
+
displayName: 'Top Nav',
|
|
8
|
+
description:
|
|
9
|
+
'A top-nav app shell with a centered TopNav (Shop and Brands mega menus with a 2x4 item grid plus a featured card each, Sale/Service links, and a Checkout button) over static grey-card hero and category sections.',
|
|
10
|
+
isReady: true,
|
|
11
|
+
category: 'Shell - Top Nav',
|
|
12
|
+
};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
import {describe, it, expect} from 'vitest';
|
|
4
|
-
|
|
5
|
-
async function applyConfigCodemod(files) {
|
|
6
|
-
const {default: transform} =
|
|
7
|
-
await import('../migrate-xds-config-surfaces.mjs');
|
|
8
|
-
const config = {
|
|
9
|
-
packageJson: files['package.json']
|
|
10
|
-
? {path: 'package.json', source: files['package.json']}
|
|
11
|
-
: null,
|
|
12
|
-
astryxConfig: files['astryx.config.mjs']
|
|
13
|
-
? {path: 'astryx.config.mjs', source: files['astryx.config.mjs']}
|
|
14
|
-
: null,
|
|
15
|
-
xdsConfig: files['xds.config.mjs']
|
|
16
|
-
? {path: 'xds.config.mjs', source: files['xds.config.mjs']}
|
|
17
|
-
: null,
|
|
18
|
-
};
|
|
19
|
-
return transform({path: process.cwd(), source: ''}, {config});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
describe('migrate-xds-config-surfaces', () => {
|
|
23
|
-
it('extracts package.json xds config into astryx.config.mjs and removes the package key in place', async () => {
|
|
24
|
-
const input = `{
|
|
25
|
-
"dependencies": {"@xds/core":"^0.0.15"},
|
|
26
|
-
"xds" : {"theme":"neutral","docs":"./src"}
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
const result = await applyConfigCodemod({'package.json': input});
|
|
31
|
-
expect(result.errors ?? []).toEqual([]);
|
|
32
|
-
expect(result.changes).toEqual([
|
|
33
|
-
{
|
|
34
|
-
path: 'package.json',
|
|
35
|
-
source: `{
|
|
36
|
-
"dependencies": {"@xds/core":"^0.0.15"}
|
|
37
|
-
}
|
|
38
|
-
`,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
path: 'astryx.config.mjs',
|
|
42
|
-
source: `export default {
|
|
43
|
-
"theme": "neutral",
|
|
44
|
-
"docs": "./src"
|
|
45
|
-
};
|
|
46
|
-
`,
|
|
47
|
-
},
|
|
48
|
-
]);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('extracts package.json astryx config into astryx.config.mjs too', async () => {
|
|
52
|
-
const result = await applyConfigCodemod({
|
|
53
|
-
'package.json': `{"astryx":{"theme":"neutral"}}\n`,
|
|
54
|
-
});
|
|
55
|
-
expect(result.changes).toEqual([
|
|
56
|
-
{path: 'package.json', source: `{}\n`},
|
|
57
|
-
{
|
|
58
|
-
path: 'astryx.config.mjs',
|
|
59
|
-
source: `export default {
|
|
60
|
-
"theme": "neutral"
|
|
61
|
-
};
|
|
62
|
-
`,
|
|
63
|
-
},
|
|
64
|
-
]);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
it('bails when package.json contains both xds and astryx config keys', async () => {
|
|
68
|
-
const result = await applyConfigCodemod({
|
|
69
|
-
'package.json': `{"xds":{"theme":"default"},"astryx":{"theme":"neutral"}}\n`,
|
|
70
|
-
});
|
|
71
|
-
expect(result.errors?.[0]?.error).toMatch(/both xds and astryx/);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('does not rewrite dependency keys in package.json', async () => {
|
|
75
|
-
const input = `{"dependencies":{"@xds/core":"^0.0.15"}}\n`;
|
|
76
|
-
const result = await applyConfigCodemod({'package.json': input});
|
|
77
|
-
expect(result.changes).toEqual([]);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it('bails when package config and astryx.config.mjs both exist', async () => {
|
|
81
|
-
const result = await applyConfigCodemod({
|
|
82
|
-
'package.json': `{"xds":{"theme":"neutral"}}\n`,
|
|
83
|
-
'astryx.config.mjs': `export default {};\n`,
|
|
84
|
-
});
|
|
85
|
-
expect(result.errors?.[0]?.error).toMatch(/migrate the config manually/);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it('bails when package config and xds.config.mjs both exist', async () => {
|
|
89
|
-
const result = await applyConfigCodemod({
|
|
90
|
-
'package.json': `{"xds":{"theme":"neutral"}}\n`,
|
|
91
|
-
'xds.config.mjs': `export default {};\n`,
|
|
92
|
-
});
|
|
93
|
-
expect(result.errors?.[0]?.error).toMatch(/migrate the config manually/);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it('renames xds.config.mjs to astryx.config.mjs when no package config exists', async () => {
|
|
97
|
-
const result = await applyConfigCodemod({
|
|
98
|
-
'xds.config.mjs': "export default { theme: 'neutral' };\n",
|
|
99
|
-
});
|
|
100
|
-
expect(result.changes).toEqual([
|
|
101
|
-
{
|
|
102
|
-
path: 'astryx.config.mjs',
|
|
103
|
-
source: "export default { theme: 'neutral' };\n",
|
|
104
|
-
},
|
|
105
|
-
{path: 'xds.config.mjs', delete: true},
|
|
106
|
-
]);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it('bails when xds.config.mjs and astryx.config.mjs both exist', async () => {
|
|
110
|
-
const result = await applyConfigCodemod({
|
|
111
|
-
'xds.config.mjs': `export default {};\n`,
|
|
112
|
-
'astryx.config.mjs': `export default {};\n`,
|
|
113
|
-
});
|
|
114
|
-
expect(result.errors?.[0]?.error).toMatch(/migrate the config manually/);
|
|
115
|
-
});
|
|
116
|
-
});
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @file Codemod: migrate XDS config surfaces to Astryx v0.1.0
|
|
5
|
-
*
|
|
6
|
-
* The v0.1.0 CLI reads astryx.config.mjs. This config codemod migrates
|
|
7
|
-
* legacy xds.config.mjs and package.json's top-level `xds` config without
|
|
8
|
-
* changing dependency names or versions.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export const meta = {
|
|
12
|
-
title: 'Migrate xds config surfaces to astryx',
|
|
13
|
-
description:
|
|
14
|
-
'Moves legacy package.json xds config into astryx.config.mjs, or renames ' +
|
|
15
|
-
'xds.config.mjs when no package.json config exists. Bails out if both exist.',
|
|
16
|
-
pr: '#3092',
|
|
17
|
-
codemodType: 'config',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
function findTopLevelKey(source, targetKey) {
|
|
21
|
-
let depth = 0;
|
|
22
|
-
let inString = false;
|
|
23
|
-
let escaped = false;
|
|
24
|
-
let stringStart = -1;
|
|
25
|
-
|
|
26
|
-
for (let i = 0; i < source.length; i++) {
|
|
27
|
-
const ch = source[i];
|
|
28
|
-
|
|
29
|
-
if (inString) {
|
|
30
|
-
if (escaped) {
|
|
31
|
-
escaped = false;
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (ch === '\\') {
|
|
35
|
-
escaped = true;
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
if (ch !== '"') continue;
|
|
39
|
-
|
|
40
|
-
inString = false;
|
|
41
|
-
const rawKey = source.slice(stringStart + 1, i);
|
|
42
|
-
if (depth !== 1 || rawKey !== targetKey) continue;
|
|
43
|
-
|
|
44
|
-
let j = i + 1;
|
|
45
|
-
while (/\s/.test(source[j] ?? '')) j++;
|
|
46
|
-
if (source[j] !== ':') continue;
|
|
47
|
-
|
|
48
|
-
const valueStart = j + 1;
|
|
49
|
-
const value = readJsonValue(source, valueStart);
|
|
50
|
-
if (!value) return null;
|
|
51
|
-
return {keyStart: stringStart, keyEnd: i + 1, colon: j, ...value};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (ch === '"') {
|
|
55
|
-
inString = true;
|
|
56
|
-
stringStart = i;
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
if (ch === '{' || ch === '[') depth++;
|
|
60
|
-
else if (ch === '}' || ch === ']') depth--;
|
|
61
|
-
}
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function readJsonValue(source, start) {
|
|
66
|
-
let i = start;
|
|
67
|
-
while (/\s/.test(source[i] ?? '')) i++;
|
|
68
|
-
const valueStart = i;
|
|
69
|
-
let inString = false;
|
|
70
|
-
let escaped = false;
|
|
71
|
-
let depth = 0;
|
|
72
|
-
|
|
73
|
-
for (; i < source.length; i++) {
|
|
74
|
-
const ch = source[i];
|
|
75
|
-
if (inString) {
|
|
76
|
-
if (escaped) {
|
|
77
|
-
escaped = false;
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if (ch === '\\') {
|
|
81
|
-
escaped = true;
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
if (ch === '"') inString = false;
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
if (ch === '"') {
|
|
88
|
-
inString = true;
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
if (ch === '{' || ch === '[') {
|
|
92
|
-
depth++;
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
if (ch === '}' || ch === ']') {
|
|
96
|
-
if (depth === 0) break;
|
|
97
|
-
depth--;
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
if (depth === 0 && ch === ',') break;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
const valueEnd = i;
|
|
104
|
-
const rawValue = source.slice(valueStart, valueEnd).trim();
|
|
105
|
-
try {
|
|
106
|
-
JSON.parse(rawValue);
|
|
107
|
-
} catch {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
return {valueStart, valueEnd, rawValue, terminator: source[i]};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function removeTopLevelProperty(source, property) {
|
|
114
|
-
let removeStart = property.keyStart;
|
|
115
|
-
let removeEnd = property.valueEnd;
|
|
116
|
-
|
|
117
|
-
if (source[removeEnd] === ',') {
|
|
118
|
-
removeEnd++;
|
|
119
|
-
if (source[removeEnd] === '\n') removeEnd++;
|
|
120
|
-
return source.slice(0, removeStart) + source.slice(removeEnd);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
let i = removeStart - 1;
|
|
124
|
-
while (/\s/.test(source[i] ?? '')) i--;
|
|
125
|
-
if (source[i] === ',') {
|
|
126
|
-
const whitespaceBetweenCommaAndKey = source.slice(i + 1, removeStart);
|
|
127
|
-
const preservedWhitespace = whitespaceBetweenCommaAndKey.includes('\n')
|
|
128
|
-
? '\n'
|
|
129
|
-
: '';
|
|
130
|
-
return source.slice(0, i) + preservedWhitespace + source.slice(removeEnd);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return source.slice(0, removeStart) + source.slice(removeEnd);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function formatConfigSource(rawConfig) {
|
|
137
|
-
const parsed = JSON.parse(rawConfig);
|
|
138
|
-
return `export default ${JSON.stringify(parsed, null, 2)};\n`;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function migratePackageJsonConfig(config) {
|
|
142
|
-
if (!config.packageJson) return {changes: []};
|
|
143
|
-
|
|
144
|
-
const packageJson = config.packageJson.source;
|
|
145
|
-
const xdsConfig = findTopLevelKey(packageJson, 'xds');
|
|
146
|
-
const astryxConfig = findTopLevelKey(packageJson, 'astryx');
|
|
147
|
-
if (!xdsConfig && !astryxConfig) return {changes: []};
|
|
148
|
-
|
|
149
|
-
if (config.astryxConfig) {
|
|
150
|
-
return {
|
|
151
|
-
errors: [
|
|
152
|
-
{
|
|
153
|
-
file: 'package.json',
|
|
154
|
-
error:
|
|
155
|
-
'package.json contains xds/astryx config and astryx.config.mjs already exists; migrate the config manually.',
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (xdsConfig && astryxConfig) {
|
|
162
|
-
return {
|
|
163
|
-
errors: [
|
|
164
|
-
{
|
|
165
|
-
file: 'package.json',
|
|
166
|
-
error:
|
|
167
|
-
'package.json contains both xds and astryx config keys; migrate the config manually.',
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const configProperty = astryxConfig ?? xdsConfig;
|
|
174
|
-
const packageJsonWithoutConfig = removeTopLevelProperty(
|
|
175
|
-
packageJson,
|
|
176
|
-
configProperty,
|
|
177
|
-
);
|
|
178
|
-
return {
|
|
179
|
-
changes: [
|
|
180
|
-
{path: 'package.json', source: packageJsonWithoutConfig},
|
|
181
|
-
{
|
|
182
|
-
path: 'astryx.config.mjs',
|
|
183
|
-
source: formatConfigSource(configProperty.rawValue),
|
|
184
|
-
},
|
|
185
|
-
],
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function migrateXdsConfigFile(config) {
|
|
190
|
-
if (!config.xdsConfig) return {changes: []};
|
|
191
|
-
if (config.astryxConfig) {
|
|
192
|
-
return {
|
|
193
|
-
errors: [
|
|
194
|
-
{
|
|
195
|
-
file: 'xds.config.mjs',
|
|
196
|
-
error:
|
|
197
|
-
'xds.config.mjs and astryx.config.mjs both exist; migrate the config manually.',
|
|
198
|
-
},
|
|
199
|
-
],
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
return {
|
|
203
|
-
changes: [
|
|
204
|
-
{path: 'astryx.config.mjs', source: config.xdsConfig.source},
|
|
205
|
-
{path: 'xds.config.mjs', delete: true},
|
|
206
|
-
],
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
export default function transformer(_file, api) {
|
|
211
|
-
const config = api.config ?? {};
|
|
212
|
-
const packageResult = migratePackageJsonConfig(config);
|
|
213
|
-
if (packageResult.errors?.length) return packageResult;
|
|
214
|
-
if (packageResult.changes?.length) {
|
|
215
|
-
if (config.xdsConfig) {
|
|
216
|
-
return {
|
|
217
|
-
errors: [
|
|
218
|
-
{
|
|
219
|
-
file: 'package.json',
|
|
220
|
-
error:
|
|
221
|
-
'package.json contains xds/astryx config and xds.config.mjs exists; migrate the config manually.',
|
|
222
|
-
},
|
|
223
|
-
],
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
return packageResult;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
return migrateXdsConfigFile(config);
|
|
230
|
-
}
|