fork refine

This commit is contained in:
Stefan Pejcic
2024-02-05 10:23:04 +01:00
parent 3fffde9a8f
commit 8496a83edb
3634 changed files with 715528 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
export type Announcement = {
hidden?: boolean;
content: string;
};

View File

@@ -0,0 +1,6 @@
declare module "cardinal" {
export function highlight(
code: string,
options?: { jsx?: boolean; theme?: string; linenos?: boolean },
): string;
}

View File

@@ -0,0 +1,5 @@
export * from "./projectTypes";
export * from "./uiFrameworks";
export * from "./package";
export * from "./refineConfig";
export * from "./node";

View File

@@ -0,0 +1,8 @@
export type NODE_ENV =
| "development"
| "production"
| "test"
| "continuous-integration"
| "system-integration-testing"
| "user-acceptance-testing"
| "custom";

View File

@@ -0,0 +1,23 @@
export enum PackageManagerTypes {
NPM = "npm",
YARN = "yarn",
PNPM = "pnpm",
}
export type NpmOutdatedResponse = Record<
string,
{
current: string;
wanted: string;
latest: string;
dependet?: string;
}
>;
export type RefinePackageInstalledVersionData = {
name: string;
current: string;
wanted: string;
latest: string;
changelog?: string;
};

View File

@@ -0,0 +1,9 @@
export enum ProjectTypes {
REACT_SCRIPT = "react-scripts",
REMIX = "remix",
NEXTJS = "nextjs",
VITE = "vite",
CRACO = "craco",
PARCEL = "parcel",
UNKNOWN = "unknown",
}

View File

@@ -0,0 +1,46 @@
export type SwizzleFile = {
/**
* Group name of the item to group by
*/
group: string;
/**
* Name of the item to display
*/
label: string;
/**
* Array of files with source and destination. `transform` can also be provided to perform transform actions specific to the file.
*/
files: {
src: string;
dest: string;
transform?: (content: string) => string;
}[];
/**
* Success message shown after swizzle is complete. Supports markdown features.
*/
message?: string;
/**
* Array of packages to install after swizzling
*/
requiredPackages?: string[];
};
export type SwizzleConfig = {
/**
* Array of swizzle items
*/
items: Array<SwizzleFile>;
/**
* Transform function to perform on every swizzled file
*/
transform?: (content: string, src: string, dest: string) => string;
};
export type RefineConfig = {
name?: string;
group?: string;
/**
* Swizzle configuration of the package
*/
swizzle: SwizzleConfig;
};

View File

@@ -0,0 +1,6 @@
export enum UIFrameworks {
ANTD = "antd",
MUI = "mui",
MANTINE = "mantine",
CHAKRA = "chakra-ui",
}