@maizzle/framework 6.0.0-9 → 6.0.0-rc.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/bin/maizzle.mjs +10 -0
- package/dist/build.d.mts +19 -0
- package/dist/build.d.mts.map +1 -0
- package/dist/build.mjs +121 -0
- package/dist/build.mjs.map +1 -0
- package/dist/components/Button.vue +141 -0
- package/dist/components/Divider.vue +105 -0
- package/dist/components/NoWidows.vue +123 -0
- package/dist/components/NotOutlook.vue +17 -0
- package/dist/components/Outlook.vue +74 -0
- package/dist/components/Spacer.vue +36 -0
- package/dist/components/Vml.vue +89 -0
- package/dist/components/WithUrl.vue +190 -0
- package/dist/components/utils.d.mts +5 -0
- package/dist/components/utils.d.mts.map +1 -0
- package/dist/components/utils.mjs +9 -0
- package/dist/components/utils.mjs.map +1 -0
- package/dist/components/utils.ts +6 -0
- package/dist/composables/defineConfig.d.mts +14 -0
- package/dist/composables/defineConfig.d.mts.map +1 -0
- package/dist/composables/defineConfig.mjs +34 -0
- package/dist/composables/defineConfig.mjs.map +1 -0
- package/dist/composables/renderContext.d.mts +19 -0
- package/dist/composables/renderContext.d.mts.map +1 -0
- package/dist/composables/renderContext.mjs +6 -0
- package/dist/composables/renderContext.mjs.map +1 -0
- package/dist/composables/useConfig.d.mts +9 -0
- package/dist/composables/useConfig.d.mts.map +1 -0
- package/dist/composables/useConfig.mjs +13 -0
- package/dist/composables/useConfig.mjs.map +1 -0
- package/dist/composables/useDoctype.d.mts +13 -0
- package/dist/composables/useDoctype.d.mts.map +1 -0
- package/dist/composables/useDoctype.mjs +20 -0
- package/dist/composables/useDoctype.mjs.map +1 -0
- package/dist/composables/useEvent.d.mts +17 -0
- package/dist/composables/useEvent.d.mts.map +1 -0
- package/dist/composables/useEvent.mjs +25 -0
- package/dist/composables/useEvent.mjs.map +1 -0
- package/dist/composables/usePlaintext.d.mts +19 -0
- package/dist/composables/usePlaintext.d.mts.map +1 -0
- package/dist/composables/usePlaintext.mjs +22 -0
- package/dist/composables/usePlaintext.mjs.map +1 -0
- package/dist/config/defaults.d.mts +6 -0
- package/dist/config/defaults.d.mts.map +1 -0
- package/dist/config/defaults.mjs +28 -0
- package/dist/config/defaults.mjs.map +1 -0
- package/dist/config/index.d.mts +15 -0
- package/dist/config/index.d.mts.map +1 -0
- package/dist/config/index.mjs +47 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/events/index.d.mts +91 -0
- package/dist/events/index.d.mts.map +1 -0
- package/dist/events/index.mjs +110 -0
- package/dist/events/index.mjs.map +1 -0
- package/dist/index.d.mts +29 -0
- package/dist/index.mjs +29 -0
- package/dist/plaintext.d.mts +5 -0
- package/dist/plaintext.d.mts.map +1 -0
- package/dist/plaintext.mjs +15 -0
- package/dist/plaintext.mjs.map +1 -0
- package/dist/plugin.d.mts +17 -0
- package/dist/plugin.d.mts.map +1 -0
- package/dist/plugin.mjs +41 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/plugins/postcss/mergeMediaQueries.d.mts +18 -0
- package/dist/plugins/postcss/mergeMediaQueries.d.mts.map +1 -0
- package/dist/plugins/postcss/mergeMediaQueries.mjs +22 -0
- package/dist/plugins/postcss/mergeMediaQueries.mjs.map +1 -0
- package/dist/plugins/postcss/pruneVars.d.mts +8 -0
- package/dist/plugins/postcss/pruneVars.d.mts.map +1 -0
- package/dist/plugins/postcss/pruneVars.mjs +49 -0
- package/dist/plugins/postcss/pruneVars.mjs.map +1 -0
- package/dist/plugins/postcss/removeDeclarations.d.mts +12 -0
- package/dist/plugins/postcss/removeDeclarations.d.mts.map +1 -0
- package/dist/plugins/postcss/removeDeclarations.mjs +45 -0
- package/dist/plugins/postcss/removeDeclarations.mjs.map +1 -0
- package/dist/plugins/postcss/tailwindCleanup.d.mts +18 -0
- package/dist/plugins/postcss/tailwindCleanup.d.mts.map +1 -0
- package/dist/plugins/postcss/tailwindCleanup.mjs +35 -0
- package/dist/plugins/postcss/tailwindCleanup.mjs.map +1 -0
- package/dist/render/createRenderer.d.mts +34 -0
- package/dist/render/createRenderer.d.mts.map +1 -0
- package/dist/render/createRenderer.mjs +149 -0
- package/dist/render/createRenderer.mjs.map +1 -0
- package/dist/render/index.d.mts +26 -0
- package/dist/render/index.d.mts.map +1 -0
- package/dist/render/index.mjs +40 -0
- package/dist/render/index.mjs.map +1 -0
- package/dist/serve.d.mts +25 -0
- package/dist/serve.d.mts.map +1 -0
- package/dist/serve.mjs +402 -0
- package/dist/serve.mjs.map +1 -0
- package/dist/server/compatibility.d.mts +6 -0
- package/dist/server/compatibility.d.mts.map +1 -0
- package/dist/server/compatibility.mjs +83 -0
- package/dist/server/compatibility.mjs.map +1 -0
- package/dist/server/linter.d.mts +6 -0
- package/dist/server/linter.d.mts.map +1 -0
- package/dist/server/linter.mjs +200 -0
- package/dist/server/linter.mjs.map +1 -0
- package/dist/server/ui/App.vue +360 -0
- package/dist/server/ui/components/ui/button/Button.vue +31 -0
- package/dist/server/ui/components/ui/button/index.ts +38 -0
- package/dist/server/ui/components/ui/command/Command.vue +87 -0
- package/dist/server/ui/components/ui/command/CommandDialog.vue +31 -0
- package/dist/server/ui/components/ui/command/CommandEmpty.vue +27 -0
- package/dist/server/ui/components/ui/command/CommandGroup.vue +45 -0
- package/dist/server/ui/components/ui/command/CommandInput.vue +39 -0
- package/dist/server/ui/components/ui/command/CommandItem.vue +76 -0
- package/dist/server/ui/components/ui/command/CommandList.vue +25 -0
- package/dist/server/ui/components/ui/command/CommandSeparator.vue +21 -0
- package/dist/server/ui/components/ui/command/CommandShortcut.vue +17 -0
- package/dist/server/ui/components/ui/command/index.ts +25 -0
- package/dist/server/ui/components/ui/dialog/Dialog.vue +19 -0
- package/dist/server/ui/components/ui/dialog/DialogClose.vue +15 -0
- package/dist/server/ui/components/ui/dialog/DialogContent.vue +53 -0
- package/dist/server/ui/components/ui/dialog/DialogDescription.vue +23 -0
- package/dist/server/ui/components/ui/dialog/DialogFooter.vue +27 -0
- package/dist/server/ui/components/ui/dialog/DialogHeader.vue +17 -0
- package/dist/server/ui/components/ui/dialog/DialogOverlay.vue +21 -0
- package/dist/server/ui/components/ui/dialog/DialogScrollContent.vue +59 -0
- package/dist/server/ui/components/ui/dialog/DialogTitle.vue +23 -0
- package/dist/server/ui/components/ui/dialog/DialogTrigger.vue +15 -0
- package/dist/server/ui/components/ui/dialog/index.ts +10 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuGroup.vue +15 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuItem.vue +31 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/dist/server/ui/components/ui/dropdown-menu/index.ts +16 -0
- package/dist/server/ui/components/ui/empty/Empty.vue +20 -0
- package/dist/server/ui/components/ui/empty/EmptyContent.vue +20 -0
- package/dist/server/ui/components/ui/empty/EmptyDescription.vue +20 -0
- package/dist/server/ui/components/ui/empty/EmptyHeader.vue +20 -0
- package/dist/server/ui/components/ui/empty/EmptyMedia.vue +21 -0
- package/dist/server/ui/components/ui/empty/EmptyTitle.vue +17 -0
- package/dist/server/ui/components/ui/empty/index.ts +26 -0
- package/dist/server/ui/components/ui/input/Input.vue +33 -0
- package/dist/server/ui/components/ui/input/index.ts +1 -0
- package/dist/server/ui/components/ui/kbd/Kbd.vue +20 -0
- package/dist/server/ui/components/ui/kbd/KbdGroup.vue +17 -0
- package/dist/server/ui/components/ui/kbd/index.ts +2 -0
- package/dist/server/ui/components/ui/resizable/ResizableHandle.vue +30 -0
- package/dist/server/ui/components/ui/resizable/ResizablePanel.vue +21 -0
- package/dist/server/ui/components/ui/resizable/ResizablePanelGroup.vue +25 -0
- package/dist/server/ui/components/ui/resizable/index.ts +3 -0
- package/dist/server/ui/components/ui/scroll-area/ScrollArea.vue +33 -0
- package/dist/server/ui/components/ui/scroll-area/ScrollBar.vue +32 -0
- package/dist/server/ui/components/ui/scroll-area/index.ts +2 -0
- package/dist/server/ui/components/ui/separator/Separator.vue +29 -0
- package/dist/server/ui/components/ui/separator/index.ts +1 -0
- package/dist/server/ui/components/ui/sheet/Sheet.vue +19 -0
- package/dist/server/ui/components/ui/sheet/SheetClose.vue +15 -0
- package/dist/server/ui/components/ui/sheet/SheetContent.vue +62 -0
- package/dist/server/ui/components/ui/sheet/SheetDescription.vue +21 -0
- package/dist/server/ui/components/ui/sheet/SheetFooter.vue +16 -0
- package/dist/server/ui/components/ui/sheet/SheetHeader.vue +15 -0
- package/dist/server/ui/components/ui/sheet/SheetOverlay.vue +21 -0
- package/dist/server/ui/components/ui/sheet/SheetTitle.vue +21 -0
- package/dist/server/ui/components/ui/sheet/SheetTrigger.vue +15 -0
- package/dist/server/ui/components/ui/sheet/index.ts +8 -0
- package/dist/server/ui/components/ui/sidebar/Sidebar.vue +96 -0
- package/dist/server/ui/components/ui/sidebar/SidebarContent.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarFooter.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarGroup.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarGroupAction.vue +27 -0
- package/dist/server/ui/components/ui/sidebar/SidebarGroupContent.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarGroupLabel.vue +25 -0
- package/dist/server/ui/components/ui/sidebar/SidebarHeader.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarInput.vue +31 -0
- package/dist/server/ui/components/ui/sidebar/SidebarInset.vue +21 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenu.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuAction.vue +35 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuBadge.vue +26 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuButton.vue +48 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuButtonChild.vue +36 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuItem.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuSkeleton.vue +35 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuSub.vue +22 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuSubButton.vue +36 -0
- package/dist/server/ui/components/ui/sidebar/SidebarMenuSubItem.vue +18 -0
- package/dist/server/ui/components/ui/sidebar/SidebarProvider.vue +82 -0
- package/dist/server/ui/components/ui/sidebar/SidebarRail.vue +33 -0
- package/dist/server/ui/components/ui/sidebar/SidebarSeparator.vue +19 -0
- package/dist/server/ui/components/ui/sidebar/SidebarTrigger.vue +28 -0
- package/dist/server/ui/components/ui/sidebar/index.ts +60 -0
- package/dist/server/ui/components/ui/sidebar/utils.ts +19 -0
- package/dist/server/ui/components/ui/skeleton/Skeleton.vue +17 -0
- package/dist/server/ui/components/ui/skeleton/index.ts +1 -0
- package/dist/server/ui/components/ui/tabs/Tabs.vue +24 -0
- package/dist/server/ui/components/ui/tabs/TabsContent.vue +21 -0
- package/dist/server/ui/components/ui/tabs/TabsList.vue +24 -0
- package/dist/server/ui/components/ui/tabs/TabsTrigger.vue +26 -0
- package/dist/server/ui/components/ui/tabs/index.ts +4 -0
- package/dist/server/ui/components/ui/toggle/Toggle.vue +35 -0
- package/dist/server/ui/components/ui/toggle/index.ts +28 -0
- package/dist/server/ui/components/ui/toggle-group/ToggleGroup.vue +49 -0
- package/dist/server/ui/components/ui/toggle-group/ToggleGroupItem.vue +46 -0
- package/dist/server/ui/components/ui/toggle-group/index.ts +2 -0
- package/dist/server/ui/components/ui/tooltip/Tooltip.vue +19 -0
- package/dist/server/ui/components/ui/tooltip/TooltipContent.vue +34 -0
- package/dist/server/ui/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/dist/server/ui/components/ui/tooltip/TooltipTrigger.vue +15 -0
- package/dist/server/ui/components/ui/tooltip/index.ts +4 -0
- package/dist/server/ui/favicon.svg +1 -0
- package/dist/server/ui/index.html +13 -0
- package/dist/server/ui/lib/utils.ts +7 -0
- package/dist/server/ui/logo-gradient.svg +1 -0
- package/dist/server/ui/logo.svg +1 -0
- package/dist/server/ui/main.css +129 -0
- package/dist/server/ui/main.ts +16 -0
- package/dist/server/ui/mark-gradient.svg +1 -0
- package/dist/server/ui/mark.svg +1 -0
- package/dist/server/ui/pages/Home.vue +39 -0
- package/dist/server/ui/pages/Preview.vue +609 -0
- package/dist/server/ui/stripes.svg +174 -0
- package/dist/transformers/addAttributes.d.mts +32 -0
- package/dist/transformers/addAttributes.d.mts.map +1 -0
- package/dist/transformers/addAttributes.mjs +101 -0
- package/dist/transformers/addAttributes.mjs.map +1 -0
- package/dist/transformers/attributeToStyle.d.mts +25 -0
- package/dist/transformers/attributeToStyle.d.mts.map +1 -0
- package/dist/transformers/attributeToStyle.mjs +80 -0
- package/dist/transformers/attributeToStyle.mjs.map +1 -0
- package/dist/transformers/base.d.mts +8 -0
- package/dist/transformers/base.d.mts.map +1 -0
- package/dist/transformers/base.mjs +160 -0
- package/dist/transformers/base.mjs.map +1 -0
- package/dist/transformers/entities.d.mts +8 -0
- package/dist/transformers/entities.d.mts.map +1 -0
- package/dist/transformers/entities.mjs +38 -0
- package/dist/transformers/entities.mjs.map +1 -0
- package/dist/transformers/format.d.mts +15 -0
- package/dist/transformers/format.d.mts.map +1 -0
- package/dist/transformers/format.mjs +26 -0
- package/dist/transformers/format.mjs.map +1 -0
- package/dist/transformers/index.d.mts +35 -0
- package/dist/transformers/index.d.mts.map +1 -0
- package/dist/transformers/index.mjs +73 -0
- package/dist/transformers/index.mjs.map +1 -0
- package/dist/transformers/inlineCSS.d.mts +30 -0
- package/dist/transformers/inlineCSS.d.mts.map +1 -0
- package/dist/transformers/inlineCSS.mjs +79 -0
- package/dist/transformers/inlineCSS.mjs.map +1 -0
- package/dist/transformers/inlineLink.d.mts +14 -0
- package/dist/transformers/inlineLink.d.mts.map +1 -0
- package/dist/transformers/inlineLink.mjs +76 -0
- package/dist/transformers/inlineLink.mjs.map +1 -0
- package/dist/transformers/minify.d.mts +17 -0
- package/dist/transformers/minify.d.mts.map +1 -0
- package/dist/transformers/minify.mjs +24 -0
- package/dist/transformers/minify.mjs.map +1 -0
- package/dist/transformers/purgeCSS.d.mts +23 -0
- package/dist/transformers/purgeCSS.d.mts.map +1 -0
- package/dist/transformers/purgeCSS.mjs +66 -0
- package/dist/transformers/purgeCSS.mjs.map +1 -0
- package/dist/transformers/removeAttributes.d.mts +31 -0
- package/dist/transformers/removeAttributes.d.mts.map +1 -0
- package/dist/transformers/removeAttributes.mjs +63 -0
- package/dist/transformers/removeAttributes.mjs.map +1 -0
- package/dist/transformers/replaceStrings.d.mts +16 -0
- package/dist/transformers/replaceStrings.d.mts.map +1 -0
- package/dist/transformers/replaceStrings.mjs +19 -0
- package/dist/transformers/replaceStrings.mjs.map +1 -0
- package/dist/transformers/safeClassNames.d.mts +22 -0
- package/dist/transformers/safeClassNames.d.mts.map +1 -0
- package/dist/transformers/safeClassNames.mjs +103 -0
- package/dist/transformers/safeClassNames.mjs.map +1 -0
- package/dist/transformers/shorthandCSS.d.mts +24 -0
- package/dist/transformers/shorthandCSS.d.mts.map +1 -0
- package/dist/transformers/shorthandCSS.mjs +48 -0
- package/dist/transformers/shorthandCSS.mjs.map +1 -0
- package/dist/transformers/tailwindcss.d.mts +20 -0
- package/dist/transformers/tailwindcss.d.mts.map +1 -0
- package/dist/transformers/tailwindcss.mjs +136 -0
- package/dist/transformers/tailwindcss.mjs.map +1 -0
- package/dist/transformers/urlQuery.d.mts +24 -0
- package/dist/transformers/urlQuery.d.mts.map +1 -0
- package/dist/transformers/urlQuery.mjs +65 -0
- package/dist/transformers/urlQuery.mjs.map +1 -0
- package/dist/types/config.d.mts +129 -0
- package/dist/types/config.d.mts.map +1 -0
- package/dist/types/config.mjs +1 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.mjs +1 -0
- package/dist/utils/ast/index.d.mts +4 -0
- package/dist/utils/ast/index.mjs +5 -0
- package/dist/utils/ast/parser.d.mts +7 -0
- package/dist/utils/ast/parser.d.mts.map +1 -0
- package/dist/utils/ast/parser.mjs +15 -0
- package/dist/utils/ast/parser.mjs.map +1 -0
- package/dist/utils/ast/serializer.d.mts +7 -0
- package/dist/utils/ast/serializer.d.mts.map +1 -0
- package/dist/utils/ast/serializer.mjs +13 -0
- package/dist/utils/ast/serializer.mjs.map +1 -0
- package/dist/utils/ast/walker.d.mts +7 -0
- package/dist/utils/ast/walker.d.mts.map +1 -0
- package/dist/utils/ast/walker.mjs +12 -0
- package/dist/utils/ast/walker.mjs.map +1 -0
- package/dist/utils/url.d.mts +8 -0
- package/dist/utils/url.d.mts.map +1 -0
- package/dist/utils/url.mjs +32 -0
- package/dist/utils/url.mjs.map +1 -0
- package/node_modules/@clack/core/CHANGELOG.md +257 -0
- package/node_modules/@clack/core/LICENSE +9 -0
- package/node_modules/@clack/core/README.md +22 -0
- package/node_modules/@clack/core/dist/index.cjs +15 -0
- package/node_modules/@clack/core/dist/index.cjs.map +1 -0
- package/node_modules/@clack/core/dist/index.d.cts +211 -0
- package/node_modules/@clack/core/dist/index.d.mts +211 -0
- package/node_modules/@clack/core/dist/index.d.ts +211 -0
- package/node_modules/@clack/core/dist/index.mjs +15 -0
- package/node_modules/@clack/core/dist/index.mjs.map +1 -0
- package/node_modules/@clack/core/package.json +62 -0
- package/node_modules/@clack/prompts/CHANGELOG.md +412 -0
- package/node_modules/@clack/prompts/LICENSE +9 -0
- package/node_modules/@clack/prompts/README.md +207 -0
- package/node_modules/@clack/prompts/dist/index.cjs +87 -0
- package/node_modules/@clack/prompts/dist/index.cjs.map +1 -0
- package/node_modules/@clack/prompts/dist/index.d.cts +165 -0
- package/node_modules/@clack/prompts/dist/index.d.mts +165 -0
- package/node_modules/@clack/prompts/dist/index.d.ts +165 -0
- package/node_modules/@clack/prompts/dist/index.mjs +87 -0
- package/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
- package/node_modules/@clack/prompts/package.json +61 -0
- package/node_modules/@maizzle/cli/LICENSE +21 -0
- package/node_modules/@maizzle/cli/README.md +58 -0
- package/node_modules/@maizzle/cli/dist/commands/make/component.d.mts +4 -0
- package/node_modules/@maizzle/cli/dist/commands/make/component.mjs +31 -0
- package/node_modules/@maizzle/cli/dist/commands/make/config.d.mts +4 -0
- package/node_modules/@maizzle/cli/dist/commands/make/config.mjs +21 -0
- package/node_modules/@maizzle/cli/dist/commands/make/layout.d.mts +4 -0
- package/node_modules/@maizzle/cli/dist/commands/make/layout.mjs +31 -0
- package/node_modules/@maizzle/cli/dist/commands/make/scaffold.d.mts +5 -0
- package/node_modules/@maizzle/cli/dist/commands/make/scaffold.mjs +28 -0
- package/node_modules/@maizzle/cli/dist/commands/make/stubs/component.vue +9 -0
- package/node_modules/@maizzle/cli/dist/commands/make/stubs/config.ts +9 -0
- package/node_modules/@maizzle/cli/dist/commands/make/stubs/layout.vue +39 -0
- package/node_modules/@maizzle/cli/dist/commands/make/stubs/template.vue +8 -0
- package/node_modules/@maizzle/cli/dist/commands/make/template.d.mts +4 -0
- package/node_modules/@maizzle/cli/dist/commands/make/template.mjs +31 -0
- package/node_modules/@maizzle/cli/dist/index.d.mts +8 -0
- package/node_modules/@maizzle/cli/dist/index.mjs +42 -0
- package/node_modules/@maizzle/cli/package.json +59 -0
- package/node_modules/citty/LICENSE +36 -0
- package/node_modules/citty/README.md +134 -0
- package/node_modules/citty/dist/index.cjs +475 -0
- package/node_modules/citty/dist/index.d.cts +80 -0
- package/node_modules/citty/dist/index.d.mts +80 -0
- package/node_modules/citty/dist/index.d.ts +80 -0
- package/node_modules/citty/dist/index.mjs +463 -0
- package/node_modules/citty/package.json +49 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1149 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/commander/lib/command.js +2662 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +709 -0
- package/node_modules/commander/lib/option.js +367 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +82 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +1045 -0
- package/node_modules/consola/LICENSE +47 -0
- package/node_modules/consola/README.md +352 -0
- package/node_modules/consola/basic.d.ts +1 -0
- package/node_modules/consola/browser.d.ts +1 -0
- package/node_modules/consola/core.d.ts +1 -0
- package/node_modules/consola/dist/basic.cjs +32 -0
- package/node_modules/consola/dist/basic.d.cts +23 -0
- package/node_modules/consola/dist/basic.d.mts +21 -0
- package/node_modules/consola/dist/basic.d.ts +23 -0
- package/node_modules/consola/dist/basic.mjs +24 -0
- package/node_modules/consola/dist/browser.cjs +84 -0
- package/node_modules/consola/dist/browser.d.cts +23 -0
- package/node_modules/consola/dist/browser.d.mts +21 -0
- package/node_modules/consola/dist/browser.d.ts +23 -0
- package/node_modules/consola/dist/browser.mjs +76 -0
- package/node_modules/consola/dist/chunks/prompt.cjs +288 -0
- package/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/node_modules/consola/dist/core.cjs +517 -0
- package/node_modules/consola/dist/core.d.cts +459 -0
- package/node_modules/consola/dist/core.d.mts +459 -0
- package/node_modules/consola/dist/core.d.ts +459 -0
- package/node_modules/consola/dist/core.mjs +512 -0
- package/node_modules/consola/dist/index.cjs +663 -0
- package/node_modules/consola/dist/index.d.cts +24 -0
- package/node_modules/consola/dist/index.d.mts +22 -0
- package/node_modules/consola/dist/index.d.ts +24 -0
- package/node_modules/consola/dist/index.mjs +651 -0
- package/node_modules/consola/dist/shared/consola.DCGIlDNP.cjs +75 -0
- package/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/node_modules/consola/dist/shared/consola.DwRq1yyg.cjs +312 -0
- package/node_modules/consola/dist/utils.cjs +64 -0
- package/node_modules/consola/dist/utils.d.cts +286 -0
- package/node_modules/consola/dist/utils.d.mts +286 -0
- package/node_modules/consola/dist/utils.d.ts +286 -0
- package/node_modules/consola/dist/utils.mjs +54 -0
- package/node_modules/consola/lib/index.cjs +10 -0
- package/node_modules/consola/package.json +136 -0
- package/node_modules/consola/utils.d.ts +1 -0
- package/node_modules/create-maizzle/README.md +86 -0
- package/node_modules/create-maizzle/bin/create-maizzle.mjs +4 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/CHANGELOG.md +340 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/LICENSE +9 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/README.md +22 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.d.mts +349 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs +11 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs.map +1 -0
- package/node_modules/create-maizzle/node_modules/@clack/core/package.json +60 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/CHANGELOG.md +576 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/LICENSE +9 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/README.md +270 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.d.mts +391 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs +137 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs.map +1 -0
- package/node_modules/create-maizzle/node_modules/@clack/prompts/package.json +65 -0
- package/node_modules/create-maizzle/package.json +47 -0
- package/node_modules/create-maizzle/src/index.js +242 -0
- package/node_modules/defu/LICENSE +21 -0
- package/node_modules/defu/README.md +171 -0
- package/node_modules/defu/dist/defu.cjs +77 -0
- package/node_modules/defu/dist/defu.d.cts +31 -0
- package/node_modules/defu/dist/defu.d.mts +29 -0
- package/node_modules/defu/dist/defu.d.ts +31 -0
- package/node_modules/defu/dist/defu.mjs +69 -0
- package/node_modules/defu/lib/defu.cjs +10 -0
- package/node_modules/defu/lib/defu.d.cts +12 -0
- package/node_modules/defu/package.json +48 -0
- package/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
- package/node_modules/fast-string-truncated-width/dist/index.js +171 -0
- package/node_modules/fast-string-truncated-width/dist/types.d.ts +22 -0
- package/node_modules/fast-string-truncated-width/dist/types.js +2 -0
- package/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
- package/node_modules/fast-string-truncated-width/dist/utils.js +15 -0
- package/node_modules/fast-string-truncated-width/license +21 -0
- package/node_modules/fast-string-truncated-width/package.json +35 -0
- package/node_modules/fast-string-truncated-width/readme.md +60 -0
- package/node_modules/fast-string-width/dist/index.d.ts +4 -0
- package/node_modules/fast-string-width/dist/index.js +14 -0
- package/node_modules/fast-string-width/license +21 -0
- package/node_modules/fast-string-width/package.json +34 -0
- package/node_modules/fast-string-width/readme.md +45 -0
- package/node_modules/fast-wrap-ansi/LICENSE +23 -0
- package/node_modules/fast-wrap-ansi/README.md +26 -0
- package/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
- package/node_modules/fast-wrap-ansi/lib/main.js +216 -0
- package/node_modules/fast-wrap-ansi/lib/main.js.map +1 -0
- package/node_modules/fast-wrap-ansi/package.json +51 -0
- package/node_modules/giget/LICENSE +184 -0
- package/node_modules/giget/README.md +248 -0
- package/node_modules/giget/dist/cli.mjs +112 -0
- package/node_modules/giget/dist/index.d.mts +49 -0
- package/node_modules/giget/dist/index.mjs +22 -0
- package/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +468 -0
- package/node_modules/giget/package.json +62 -0
- package/node_modules/node-fetch-native/LICENSE +114 -0
- package/node_modules/node-fetch-native/README.md +225 -0
- package/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +2 -0
- package/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -0
- package/node_modules/node-fetch-native/dist/index.cjs +1 -0
- package/node_modules/node-fetch-native/dist/index.mjs +1 -0
- package/node_modules/node-fetch-native/dist/native.cjs +1 -0
- package/node_modules/node-fetch-native/dist/native.mjs +1 -0
- package/node_modules/node-fetch-native/dist/node.cjs +19 -0
- package/node_modules/node-fetch-native/dist/node.mjs +19 -0
- package/node_modules/node-fetch-native/dist/polyfill.cjs +1 -0
- package/node_modules/node-fetch-native/dist/polyfill.mjs +1 -0
- package/node_modules/node-fetch-native/dist/proxy-stub.cjs +1 -0
- package/node_modules/node-fetch-native/dist/proxy-stub.mjs +1 -0
- package/node_modules/node-fetch-native/dist/proxy.cjs +58 -0
- package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +1 -0
- package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +1 -0
- package/node_modules/node-fetch-native/index.d.ts +1 -0
- package/node_modules/node-fetch-native/lib/empty.cjs +0 -0
- package/node_modules/node-fetch-native/lib/empty.mjs +0 -0
- package/node_modules/node-fetch-native/lib/index.cjs +11 -0
- package/node_modules/node-fetch-native/lib/index.d.cts +10 -0
- package/node_modules/node-fetch-native/lib/index.d.mts +10 -0
- package/node_modules/node-fetch-native/lib/index.d.ts +10 -0
- package/node_modules/node-fetch-native/lib/native.cjs +11 -0
- package/node_modules/node-fetch-native/lib/polyfill.d.cts +1 -0
- package/node_modules/node-fetch-native/lib/polyfill.d.mts +1 -0
- package/node_modules/node-fetch-native/lib/polyfill.d.ts +1 -0
- package/node_modules/node-fetch-native/lib/proxy.d.ts +32 -0
- package/node_modules/node-fetch-native/node.d.ts +1 -0
- package/node_modules/node-fetch-native/package.json +138 -0
- package/node_modules/node-fetch-native/polyfill.d.ts +1 -0
- package/node_modules/node-fetch-native/proxy.d.ts +1 -0
- package/node_modules/nypm/LICENSE +21 -0
- package/node_modules/nypm/README.md +152 -0
- package/node_modules/nypm/dist/cli.d.mts +1 -0
- package/node_modules/nypm/dist/cli.mjs +460 -0
- package/node_modules/nypm/dist/index.d.mts +209 -0
- package/node_modules/nypm/dist/index.mjs +423 -0
- package/node_modules/nypm/node_modules/citty/LICENSE +21 -0
- package/node_modules/nypm/node_modules/citty/README.md +231 -0
- package/node_modules/nypm/node_modules/citty/dist/THIRD-PARTY-LICENSES.md +33 -0
- package/node_modules/nypm/node_modules/citty/dist/_chunks/libs/scule.mjs +70 -0
- package/node_modules/nypm/node_modules/citty/dist/index.d.mts +112 -0
- package/node_modules/nypm/node_modules/citty/dist/index.mjs +425 -0
- package/node_modules/nypm/node_modules/citty/package.json +42 -0
- package/node_modules/nypm/package.json +54 -0
- package/node_modules/pathe/LICENSE +70 -0
- package/node_modules/pathe/README.md +73 -0
- package/node_modules/pathe/dist/index.cjs +39 -0
- package/node_modules/pathe/dist/index.d.cts +47 -0
- package/node_modules/pathe/dist/index.d.mts +47 -0
- package/node_modules/pathe/dist/index.d.ts +47 -0
- package/node_modules/pathe/dist/index.mjs +19 -0
- package/node_modules/pathe/dist/shared/pathe.BSlhyZSM.cjs +266 -0
- package/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +249 -0
- package/node_modules/pathe/dist/utils.cjs +82 -0
- package/node_modules/pathe/dist/utils.d.cts +32 -0
- package/node_modules/pathe/dist/utils.d.mts +32 -0
- package/node_modules/pathe/dist/utils.d.ts +32 -0
- package/node_modules/pathe/dist/utils.mjs +77 -0
- package/node_modules/pathe/package.json +61 -0
- package/node_modules/pathe/utils.d.ts +1 -0
- package/node_modules/picocolors/LICENSE +15 -0
- package/node_modules/picocolors/README.md +21 -0
- package/node_modules/picocolors/package.json +25 -0
- package/node_modules/picocolors/picocolors.browser.js +4 -0
- package/node_modules/picocolors/picocolors.d.ts +5 -0
- package/node_modules/picocolors/picocolors.js +75 -0
- package/node_modules/picocolors/types.d.ts +51 -0
- package/node_modules/sisteransi/license +21 -0
- package/node_modules/sisteransi/package.json +34 -0
- package/node_modules/sisteransi/readme.md +113 -0
- package/node_modules/sisteransi/src/index.js +58 -0
- package/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
- package/node_modules/tinyexec/LICENSE +21 -0
- package/node_modules/tinyexec/README.md +269 -0
- package/node_modules/tinyexec/dist/LICENSES.txt +83 -0
- package/node_modules/tinyexec/dist/main.d.mts +71 -0
- package/node_modules/tinyexec/dist/main.mjs +642 -0
- package/node_modules/tinyexec/package.json +62 -0
- package/package.json +74 -73
- package/CHANGELOG.md +0 -770
- package/bin/maizzle +0 -5
- package/src/commands/build.js +0 -348
- package/src/commands/serve.js +0 -3
- package/src/generators/plaintext.js +0 -222
- package/src/generators/render.js +0 -129
- package/src/index.js +0 -49
- package/src/posthtml/defaultComponentsConfig.js +0 -19
- package/src/posthtml/defaultConfig.js +0 -14
- package/src/posthtml/index.js +0 -102
- package/src/posthtml/plugins/combineMediaQueries.js +0 -42
- package/src/posthtml/plugins/envAttributes.js +0 -32
- package/src/posthtml/plugins/envTags.js +0 -33
- package/src/posthtml/plugins/expandLinkTag.js +0 -59
- package/src/posthtml/plugins/postcss/compileCss.js +0 -125
- package/src/posthtml/plugins/removeRawStyleAttributes.js +0 -30
- package/src/server/client.js +0 -182
- package/src/server/index.js +0 -464
- package/src/server/routes/hmr.js +0 -26
- package/src/server/routes/index.js +0 -77
- package/src/server/views/404.html +0 -59
- package/src/server/views/error.html +0 -83
- package/src/server/views/index.html +0 -172
- package/src/server/websockets.js +0 -27
- package/src/transformers/addAttributes.js +0 -29
- package/src/transformers/attributeToStyle.js +0 -90
- package/src/transformers/baseUrl.js +0 -154
- package/src/transformers/core.js +0 -32
- package/src/transformers/filters/defaultFilters.js +0 -146
- package/src/transformers/filters/index.js +0 -18
- package/src/transformers/index.js +0 -259
- package/src/transformers/inline.js +0 -306
- package/src/transformers/markdown.js +0 -26
- package/src/transformers/minify.js +0 -27
- package/src/transformers/posthtmlMso.js +0 -14
- package/src/transformers/prettify.js +0 -29
- package/src/transformers/preventWidows.js +0 -37
- package/src/transformers/purge.js +0 -56
- package/src/transformers/removeAttributes.js +0 -55
- package/src/transformers/replaceStrings.js +0 -37
- package/src/transformers/safeClassNames.js +0 -29
- package/src/transformers/shorthandCss.js +0 -20
- package/src/transformers/sixHex.js +0 -30
- package/src/transformers/template.js +0 -26
- package/src/transformers/urlParameters.js +0 -20
- package/src/transformers/useAttributeSizes.js +0 -63
- package/src/utils/getConfigByFilePath.js +0 -143
- package/src/utils/node.js +0 -68
- package/src/utils/string.js +0 -186
- package/types/build.d.ts +0 -166
- package/types/config.d.ts +0 -638
- package/types/css/combineMediaQueries.d.ts +0 -90
- package/types/css/inline.d.ts +0 -218
- package/types/css/purge.d.ts +0 -125
- package/types/events.d.ts +0 -153
- package/types/index.d.ts +0 -232
- package/types/markdown.d.ts +0 -33
- package/types/minify.d.ts +0 -138
- package/types/plaintext.d.ts +0 -56
- package/types/posthtml.d.ts +0 -162
- package/types/render.d.ts +0 -13
- package/types/urlParameters.d.ts +0 -40
- package/types/widowWords.d.ts +0 -38
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {}
|
|
2
|
+
let isColorSupported =
|
|
3
|
+
!(!!env.NO_COLOR || argv.includes("--no-color")) &&
|
|
4
|
+
(!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI)
|
|
5
|
+
|
|
6
|
+
let formatter = (open, close, replace = open) =>
|
|
7
|
+
input => {
|
|
8
|
+
let string = "" + input, index = string.indexOf(close, open.length)
|
|
9
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let replaceClose = (string, close, replace, index) => {
|
|
13
|
+
let result = "", cursor = 0
|
|
14
|
+
do {
|
|
15
|
+
result += string.substring(cursor, index) + replace
|
|
16
|
+
cursor = index + close.length
|
|
17
|
+
index = string.indexOf(close, cursor)
|
|
18
|
+
} while (~index)
|
|
19
|
+
return result + string.substring(cursor)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let createColors = (enabled = isColorSupported) => {
|
|
23
|
+
let f = enabled ? formatter : () => String
|
|
24
|
+
return {
|
|
25
|
+
isColorSupported: enabled,
|
|
26
|
+
reset: f("\x1b[0m", "\x1b[0m"),
|
|
27
|
+
bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
|
|
28
|
+
dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
|
|
29
|
+
italic: f("\x1b[3m", "\x1b[23m"),
|
|
30
|
+
underline: f("\x1b[4m", "\x1b[24m"),
|
|
31
|
+
inverse: f("\x1b[7m", "\x1b[27m"),
|
|
32
|
+
hidden: f("\x1b[8m", "\x1b[28m"),
|
|
33
|
+
strikethrough: f("\x1b[9m", "\x1b[29m"),
|
|
34
|
+
|
|
35
|
+
black: f("\x1b[30m", "\x1b[39m"),
|
|
36
|
+
red: f("\x1b[31m", "\x1b[39m"),
|
|
37
|
+
green: f("\x1b[32m", "\x1b[39m"),
|
|
38
|
+
yellow: f("\x1b[33m", "\x1b[39m"),
|
|
39
|
+
blue: f("\x1b[34m", "\x1b[39m"),
|
|
40
|
+
magenta: f("\x1b[35m", "\x1b[39m"),
|
|
41
|
+
cyan: f("\x1b[36m", "\x1b[39m"),
|
|
42
|
+
white: f("\x1b[37m", "\x1b[39m"),
|
|
43
|
+
gray: f("\x1b[90m", "\x1b[39m"),
|
|
44
|
+
|
|
45
|
+
bgBlack: f("\x1b[40m", "\x1b[49m"),
|
|
46
|
+
bgRed: f("\x1b[41m", "\x1b[49m"),
|
|
47
|
+
bgGreen: f("\x1b[42m", "\x1b[49m"),
|
|
48
|
+
bgYellow: f("\x1b[43m", "\x1b[49m"),
|
|
49
|
+
bgBlue: f("\x1b[44m", "\x1b[49m"),
|
|
50
|
+
bgMagenta: f("\x1b[45m", "\x1b[49m"),
|
|
51
|
+
bgCyan: f("\x1b[46m", "\x1b[49m"),
|
|
52
|
+
bgWhite: f("\x1b[47m", "\x1b[49m"),
|
|
53
|
+
|
|
54
|
+
blackBright: f("\x1b[90m", "\x1b[39m"),
|
|
55
|
+
redBright: f("\x1b[91m", "\x1b[39m"),
|
|
56
|
+
greenBright: f("\x1b[92m", "\x1b[39m"),
|
|
57
|
+
yellowBright: f("\x1b[93m", "\x1b[39m"),
|
|
58
|
+
blueBright: f("\x1b[94m", "\x1b[39m"),
|
|
59
|
+
magentaBright: f("\x1b[95m", "\x1b[39m"),
|
|
60
|
+
cyanBright: f("\x1b[96m", "\x1b[39m"),
|
|
61
|
+
whiteBright: f("\x1b[97m", "\x1b[39m"),
|
|
62
|
+
|
|
63
|
+
bgBlackBright: f("\x1b[100m", "\x1b[49m"),
|
|
64
|
+
bgRedBright: f("\x1b[101m", "\x1b[49m"),
|
|
65
|
+
bgGreenBright: f("\x1b[102m", "\x1b[49m"),
|
|
66
|
+
bgYellowBright: f("\x1b[103m", "\x1b[49m"),
|
|
67
|
+
bgBlueBright: f("\x1b[104m", "\x1b[49m"),
|
|
68
|
+
bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
|
|
69
|
+
bgCyanBright: f("\x1b[106m", "\x1b[49m"),
|
|
70
|
+
bgWhiteBright: f("\x1b[107m", "\x1b[49m"),
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = createColors()
|
|
75
|
+
module.exports.createColors = createColors
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type Formatter = (input: string | number | null | undefined) => string
|
|
2
|
+
|
|
3
|
+
export interface Colors {
|
|
4
|
+
isColorSupported: boolean
|
|
5
|
+
|
|
6
|
+
reset: Formatter
|
|
7
|
+
bold: Formatter
|
|
8
|
+
dim: Formatter
|
|
9
|
+
italic: Formatter
|
|
10
|
+
underline: Formatter
|
|
11
|
+
inverse: Formatter
|
|
12
|
+
hidden: Formatter
|
|
13
|
+
strikethrough: Formatter
|
|
14
|
+
|
|
15
|
+
black: Formatter
|
|
16
|
+
red: Formatter
|
|
17
|
+
green: Formatter
|
|
18
|
+
yellow: Formatter
|
|
19
|
+
blue: Formatter
|
|
20
|
+
magenta: Formatter
|
|
21
|
+
cyan: Formatter
|
|
22
|
+
white: Formatter
|
|
23
|
+
gray: Formatter
|
|
24
|
+
|
|
25
|
+
bgBlack: Formatter
|
|
26
|
+
bgRed: Formatter
|
|
27
|
+
bgGreen: Formatter
|
|
28
|
+
bgYellow: Formatter
|
|
29
|
+
bgBlue: Formatter
|
|
30
|
+
bgMagenta: Formatter
|
|
31
|
+
bgCyan: Formatter
|
|
32
|
+
bgWhite: Formatter
|
|
33
|
+
|
|
34
|
+
blackBright: Formatter
|
|
35
|
+
redBright: Formatter
|
|
36
|
+
greenBright: Formatter
|
|
37
|
+
yellowBright: Formatter
|
|
38
|
+
blueBright: Formatter
|
|
39
|
+
magentaBright: Formatter
|
|
40
|
+
cyanBright: Formatter
|
|
41
|
+
whiteBright: Formatter
|
|
42
|
+
|
|
43
|
+
bgBlackBright: Formatter
|
|
44
|
+
bgRedBright: Formatter
|
|
45
|
+
bgGreenBright: Formatter
|
|
46
|
+
bgYellowBright: Formatter
|
|
47
|
+
bgBlueBright: Formatter
|
|
48
|
+
bgMagentaBright: Formatter
|
|
49
|
+
bgCyanBright: Formatter
|
|
50
|
+
bgWhiteBright: Formatter
|
|
51
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Terkel Gjervig Nielsen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sisteransi",
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "ANSI escape codes for some terminal swag",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Terkel Gjervig",
|
|
9
|
+
"email": "terkel@terkel.com",
|
|
10
|
+
"url": "https://terkel.com"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "tape test/*.js | tap-spec"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/terkelg/sisteransi"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"src"
|
|
21
|
+
],
|
|
22
|
+
"types": "./src/sisteransi.d.ts",
|
|
23
|
+
"keywords": [
|
|
24
|
+
"ansi",
|
|
25
|
+
"escape codes",
|
|
26
|
+
"escape",
|
|
27
|
+
"terminal",
|
|
28
|
+
"style"
|
|
29
|
+
],
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"tap-spec": "^5.0.0",
|
|
32
|
+
"tape": "^4.13.2"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# sister ANSI [](https://www.npmjs.com/package/sisteransi) [](https://travis-ci.org/terkelg/sisteransi) [](https://www.npmjs.com/package/sisteransi)
|
|
2
|
+
|
|
3
|
+
> Ansi escape codes faster than you can say "[Bam bam](https://www.youtube.com/watch?v=OcaPu9JPenU)".
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm install sisteransi
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
const ansi = require('sisteransi');
|
|
16
|
+
// or const { cursor } = require('sisteransi');
|
|
17
|
+
|
|
18
|
+
const p = str => process.stdout.write(str);
|
|
19
|
+
|
|
20
|
+
// move cursor to 2, 1
|
|
21
|
+
p(ansi.cursor.to(2, 1));
|
|
22
|
+
|
|
23
|
+
// to up, one down
|
|
24
|
+
p(ansi.cursor.up(2)+ansi.cursor.down(1));
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## API
|
|
28
|
+
|
|
29
|
+
### cursor
|
|
30
|
+
|
|
31
|
+
#### to(x, y)
|
|
32
|
+
Set the absolute position of the cursor. `x0` `y0` is the top left of the screen.
|
|
33
|
+
|
|
34
|
+
#### move(x, y)
|
|
35
|
+
Set the position of the cursor relative to its current position.
|
|
36
|
+
|
|
37
|
+
#### up(count = 1)
|
|
38
|
+
Move cursor up a specific amount of rows. Default is `1`.
|
|
39
|
+
|
|
40
|
+
#### down(count = 1)
|
|
41
|
+
Move cursor down a specific amount of rows. Default is `1`.
|
|
42
|
+
|
|
43
|
+
#### forward(count = 1)
|
|
44
|
+
Move cursor forward a specific amount of rows. Default is `1`.
|
|
45
|
+
|
|
46
|
+
#### backward(count = 1)
|
|
47
|
+
Move cursor backward a specific amount of rows. Default is `1`.
|
|
48
|
+
|
|
49
|
+
#### nextLine(count = 1)
|
|
50
|
+
Move cursor to the next line a specific amount of lines. Default is `1`.
|
|
51
|
+
|
|
52
|
+
#### prevLine(count = 1)
|
|
53
|
+
Move cursor to the previous a specific amount of lines. Default is `1`.
|
|
54
|
+
|
|
55
|
+
#### left
|
|
56
|
+
Move cursor to the left side.
|
|
57
|
+
|
|
58
|
+
#### hide
|
|
59
|
+
Hide cursor.
|
|
60
|
+
|
|
61
|
+
#### show
|
|
62
|
+
Show cursor.
|
|
63
|
+
|
|
64
|
+
#### save
|
|
65
|
+
|
|
66
|
+
Save cursor position.
|
|
67
|
+
|
|
68
|
+
#### restore
|
|
69
|
+
|
|
70
|
+
Restore cursor position.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### scroll
|
|
74
|
+
|
|
75
|
+
#### up(count = 1)
|
|
76
|
+
Scroll display up a specific amount of lines. Default to `1`.
|
|
77
|
+
|
|
78
|
+
#### down(count = 1)
|
|
79
|
+
Scroll display down a specific amount of lines. Default to `1`.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### erase
|
|
83
|
+
|
|
84
|
+
#### screen
|
|
85
|
+
Erase the screen and move the cursor the top left position.
|
|
86
|
+
|
|
87
|
+
#### up(count = 1)
|
|
88
|
+
Erase the screen from the current line up to the top of the screen. Default to `1`.
|
|
89
|
+
|
|
90
|
+
#### down(count = 2)
|
|
91
|
+
Erase the screen from the current line down to the bottom of the screen. Default to `1`.
|
|
92
|
+
|
|
93
|
+
#### line
|
|
94
|
+
Erase the entire current line.
|
|
95
|
+
|
|
96
|
+
#### lineEnd
|
|
97
|
+
Erase from the current cursor position to the end of the current line.
|
|
98
|
+
|
|
99
|
+
#### lineStart
|
|
100
|
+
Erase from the current cursor position to the start of the current line.
|
|
101
|
+
|
|
102
|
+
#### lines(count)
|
|
103
|
+
Erase from the current cursor position up the specified amount of rows.
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## Credit
|
|
107
|
+
|
|
108
|
+
This is a fork of [ansi-escapes](https://github.com/sindresorhus/ansi-escapes).
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
MIT © [Terkel Gjervig](https://terkel.com)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const ESC = '\x1B';
|
|
4
|
+
const CSI = `${ESC}[`;
|
|
5
|
+
const beep = '\u0007';
|
|
6
|
+
|
|
7
|
+
const cursor = {
|
|
8
|
+
to(x, y) {
|
|
9
|
+
if (!y) return `${CSI}${x + 1}G`;
|
|
10
|
+
return `${CSI}${y + 1};${x + 1}H`;
|
|
11
|
+
},
|
|
12
|
+
move(x, y) {
|
|
13
|
+
let ret = '';
|
|
14
|
+
|
|
15
|
+
if (x < 0) ret += `${CSI}${-x}D`;
|
|
16
|
+
else if (x > 0) ret += `${CSI}${x}C`;
|
|
17
|
+
|
|
18
|
+
if (y < 0) ret += `${CSI}${-y}A`;
|
|
19
|
+
else if (y > 0) ret += `${CSI}${y}B`;
|
|
20
|
+
|
|
21
|
+
return ret;
|
|
22
|
+
},
|
|
23
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
24
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
25
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
26
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
27
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
28
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
29
|
+
left: `${CSI}G`,
|
|
30
|
+
hide: `${CSI}?25l`,
|
|
31
|
+
show: `${CSI}?25h`,
|
|
32
|
+
save: `${ESC}7`,
|
|
33
|
+
restore: `${ESC}8`
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const scroll = {
|
|
37
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
38
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const erase = {
|
|
42
|
+
screen: `${CSI}2J`,
|
|
43
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
44
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
45
|
+
line: `${CSI}2K`,
|
|
46
|
+
lineEnd: `${CSI}K`,
|
|
47
|
+
lineStart: `${CSI}1K`,
|
|
48
|
+
lines(count) {
|
|
49
|
+
let clear = '';
|
|
50
|
+
for (let i = 0; i < count; i++)
|
|
51
|
+
clear += this.line + (i < count - 1 ? cursor.up() : '');
|
|
52
|
+
if (count)
|
|
53
|
+
clear += cursor.left;
|
|
54
|
+
return clear;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
module.exports = { cursor, scroll, erase, beep };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const beep: string;
|
|
2
|
+
export const clear: string;
|
|
3
|
+
|
|
4
|
+
export namespace cursor {
|
|
5
|
+
export const left: string;
|
|
6
|
+
export const hide: string;
|
|
7
|
+
export const show: string;
|
|
8
|
+
export const save: string;
|
|
9
|
+
export const restore: string;
|
|
10
|
+
|
|
11
|
+
export function to(x: number, y?: number): string;
|
|
12
|
+
export function move(x: number, y: number): string;
|
|
13
|
+
export function up(count?: number): string;
|
|
14
|
+
export function down(count?: number): string;
|
|
15
|
+
export function forward(count?: number): string;
|
|
16
|
+
export function backward(count?: number): string;
|
|
17
|
+
export function nextLine(count?: number): string;
|
|
18
|
+
export function prevLine(count?: number): string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export namespace scroll {
|
|
22
|
+
export function up(count?: number): string;
|
|
23
|
+
export function down(count?: number): string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export namespace erase {
|
|
27
|
+
export const screen: string;
|
|
28
|
+
export const line: string;
|
|
29
|
+
export const lineEnd: string;
|
|
30
|
+
export const lineStart: string;
|
|
31
|
+
|
|
32
|
+
export function up(count?: number): string;
|
|
33
|
+
export function down(count?: number): string;
|
|
34
|
+
export function lines(count: number): string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Tinylibs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
# tinyexec 📟
|
|
2
|
+
|
|
3
|
+
> A minimal package for executing commands
|
|
4
|
+
|
|
5
|
+
This package was created to provide a minimal way of interacting with child
|
|
6
|
+
processes without having to manually deal with streams, piping, etc.
|
|
7
|
+
|
|
8
|
+
## Installing
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
$ npm i -S tinyexec
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
A process can be spawned and awaited like so:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import {x} from 'tinyexec';
|
|
20
|
+
|
|
21
|
+
const result = await x('ls', ['-l']);
|
|
22
|
+
|
|
23
|
+
// result.stdout - the stdout as a string
|
|
24
|
+
// result.stderr - the stderr as a string
|
|
25
|
+
// result.exitCode - the process exit code as a number
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
By default, tinyexec does not throw on non‑zero exit codes. Check `result.exitCode` or pass `{throwOnError: true}`.
|
|
29
|
+
|
|
30
|
+
Output is returned exactly as produced; trailing newlines are not trimmed. If you need trimming, do it explicitly:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
const clean = result.stdout.replace(/\r?\n$/, '');
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
You may also iterate over the lines of output via an async loop:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import {x} from 'tinyexec';
|
|
40
|
+
|
|
41
|
+
const proc = x('ls', ['-l']);
|
|
42
|
+
|
|
43
|
+
for await (const line of proc) {
|
|
44
|
+
// line will be from stderr/stdout in the order you'd see it in a term
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Options
|
|
49
|
+
|
|
50
|
+
Options can be passed to have finer control over spawning of the process:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
await x('ls', [], {
|
|
54
|
+
timeout: 1000
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The options object can have the following properties:
|
|
59
|
+
|
|
60
|
+
- `signal` - an `AbortSignal` to allow aborting of the execution
|
|
61
|
+
- `timeout` - time in milliseconds at which the process will be forceably killed
|
|
62
|
+
- `persist` - if `true`, the process will continue after the host exits
|
|
63
|
+
- `stdin` - another `Result` can be used as the input to this process
|
|
64
|
+
- `nodeOptions` - any valid options to node's underlying `spawn` function
|
|
65
|
+
- `throwOnError` - if true, non-zero exit codes will throw an error
|
|
66
|
+
|
|
67
|
+
### Piping to another process
|
|
68
|
+
|
|
69
|
+
You can pipe a process to another via the `pipe` method:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
const proc1 = x('ls', ['-l']);
|
|
73
|
+
const proc2 = proc1.pipe('grep', ['.js']);
|
|
74
|
+
const result = await proc2;
|
|
75
|
+
|
|
76
|
+
console.log(result.stdout);
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`pipe` takes the same options as a regular execution. For example, you can
|
|
80
|
+
pass a timeout to the pipe call:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
proc1.pipe('grep', ['.js'], {
|
|
84
|
+
timeout: 2000
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Killing a process
|
|
89
|
+
|
|
90
|
+
You can kill the process via the `kill` method:
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
const proc = x('ls');
|
|
94
|
+
|
|
95
|
+
proc.kill();
|
|
96
|
+
|
|
97
|
+
// or with a signal
|
|
98
|
+
proc.kill('SIGHUP');
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Node modules/binaries
|
|
102
|
+
|
|
103
|
+
By default, node's available binaries from `node_modules` will be accessible
|
|
104
|
+
in your command.
|
|
105
|
+
|
|
106
|
+
For example, in a repo which has `eslint` installed:
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
await x('eslint', ['.']);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
In this example, `eslint` will come from the locally installed `node_modules`.
|
|
113
|
+
|
|
114
|
+
### Using an abort signal
|
|
115
|
+
|
|
116
|
+
An abort signal can be passed to a process in order to abort it at a later
|
|
117
|
+
time. This will result in the process being killed and `aborted` being set
|
|
118
|
+
to `true`.
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
const aborter = new AbortController();
|
|
122
|
+
const proc = x('node', ['./foo.mjs'], {
|
|
123
|
+
signal: aborter.signal
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// elsewhere...
|
|
127
|
+
aborter.abort();
|
|
128
|
+
|
|
129
|
+
await proc;
|
|
130
|
+
|
|
131
|
+
proc.aborted; // true
|
|
132
|
+
proc.killed; // true
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Using with command strings
|
|
136
|
+
|
|
137
|
+
If you need to continue supporting commands as strings (e.g. "command arg0 arg1"),
|
|
138
|
+
you can use [args-tokenizer](https://github.com/TrySound/args-tokenizer),
|
|
139
|
+
a lightweight library for parsing shell command strings into an array.
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
import {x} from 'tinyexec';
|
|
143
|
+
import {tokenizeArgs} from 'args-tokenizer';
|
|
144
|
+
|
|
145
|
+
const commandString = 'echo "Hello, World!"';
|
|
146
|
+
const [command, ...args] = tokenizeArgs(commandString);
|
|
147
|
+
const result = await x(command, args);
|
|
148
|
+
|
|
149
|
+
result.stdout; // Hello, World!
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## API
|
|
153
|
+
|
|
154
|
+
Calling `x(command[, args])` returns an awaitable `Result` which has the
|
|
155
|
+
following API methods and properties available:
|
|
156
|
+
|
|
157
|
+
### `pipe(command[, args[, options]])`
|
|
158
|
+
|
|
159
|
+
Pipes the current command to another. For example:
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
x('ls', ['-l'])
|
|
163
|
+
.pipe('grep', ['js']);
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The parameters are as follows:
|
|
167
|
+
|
|
168
|
+
- `command` - the command to execute (_without any arguments_)
|
|
169
|
+
- `args` - an array of arguments
|
|
170
|
+
- `options` - options object
|
|
171
|
+
|
|
172
|
+
### `process`
|
|
173
|
+
|
|
174
|
+
The underlying Node.js `ChildProcess`. tinyexec keeps the surface minimal and does not re‑expose every child_process method/event. Use `proc.process` for advanced access (streams, events, etc.).
|
|
175
|
+
|
|
176
|
+
```ts
|
|
177
|
+
const proc = x('node', ['./foo.mjs']);
|
|
178
|
+
|
|
179
|
+
proc.process?.stdout?.on('data', (chunk) => {
|
|
180
|
+
// ...
|
|
181
|
+
});
|
|
182
|
+
proc.process?.once('close', (code) => {
|
|
183
|
+
// ...
|
|
184
|
+
});
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### `kill([signal])`
|
|
188
|
+
|
|
189
|
+
Kills the current process with the specified signal. By default, this will
|
|
190
|
+
use the `SIGTERM` signal.
|
|
191
|
+
|
|
192
|
+
For example:
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
const proc = x('ls');
|
|
196
|
+
|
|
197
|
+
proc.kill();
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### `pid`
|
|
201
|
+
|
|
202
|
+
The current process ID. For example:
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
const proc = x('ls');
|
|
206
|
+
|
|
207
|
+
proc.pid; // number
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### `aborted`
|
|
211
|
+
|
|
212
|
+
Whether the process has been aborted or not (via the `signal` originally
|
|
213
|
+
passed in the options object).
|
|
214
|
+
|
|
215
|
+
For example:
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
const proc = x('ls');
|
|
219
|
+
|
|
220
|
+
proc.aborted; // bool
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### `killed`
|
|
224
|
+
|
|
225
|
+
Whether the process has been killed or not (e.g. via `kill()` or an abort
|
|
226
|
+
signal).
|
|
227
|
+
|
|
228
|
+
For example:
|
|
229
|
+
|
|
230
|
+
```ts
|
|
231
|
+
const proc = x('ls');
|
|
232
|
+
|
|
233
|
+
proc.killed; // bool
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### `exitCode`
|
|
237
|
+
|
|
238
|
+
The exit code received when the process completed execution.
|
|
239
|
+
|
|
240
|
+
For example:
|
|
241
|
+
|
|
242
|
+
```ts
|
|
243
|
+
const proc = x('ls');
|
|
244
|
+
|
|
245
|
+
proc.exitCode; // number (e.g. 1)
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Comparison with other libraries
|
|
249
|
+
|
|
250
|
+
`tinyexec` aims to provide a lightweight layer on top of Node's own
|
|
251
|
+
`child_process` API.
|
|
252
|
+
|
|
253
|
+
Some clear benefits compared to other libraries are that `tinyexec` will be much lighter, have a much
|
|
254
|
+
smaller footprint and will have a less abstract interface (less "magic"). It
|
|
255
|
+
will also have equal security and cross-platform support to popular
|
|
256
|
+
alternatives.
|
|
257
|
+
|
|
258
|
+
There are various features other libraries include which we are unlikely
|
|
259
|
+
to ever implement, as they would prevent us from providing a lightweight layer.
|
|
260
|
+
|
|
261
|
+
For example, if you'd like write scripts rather than individual commands, and
|
|
262
|
+
prefer to use templating, we'd definitely recommend
|
|
263
|
+
[zx](https://github.com/google/zx). zx is a much higher level library which
|
|
264
|
+
does some of the same work `tinyexec` does but behind a template string
|
|
265
|
+
interface.
|
|
266
|
+
|
|
267
|
+
Similarly, libraries like `execa` will provide helpers for various things
|
|
268
|
+
like passing files as input to processes. We opt not to support features like
|
|
269
|
+
this since many of them are easy to do yourself (using Node's own APIs).
|