mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
fork refine
This commit is contained in:
4
packages/cli/src/definitions/announcement.ts
Normal file
4
packages/cli/src/definitions/announcement.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export type Announcement = {
|
||||
hidden?: boolean;
|
||||
content: string;
|
||||
};
|
||||
6
packages/cli/src/definitions/cardinal.d.ts
vendored
Normal file
6
packages/cli/src/definitions/cardinal.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
declare module "cardinal" {
|
||||
export function highlight(
|
||||
code: string,
|
||||
options?: { jsx?: boolean; theme?: string; linenos?: boolean },
|
||||
): string;
|
||||
}
|
||||
5
packages/cli/src/definitions/index.ts
Normal file
5
packages/cli/src/definitions/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export * from "./projectTypes";
|
||||
export * from "./uiFrameworks";
|
||||
export * from "./package";
|
||||
export * from "./refineConfig";
|
||||
export * from "./node";
|
||||
8
packages/cli/src/definitions/node.ts
Normal file
8
packages/cli/src/definitions/node.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export type NODE_ENV =
|
||||
| "development"
|
||||
| "production"
|
||||
| "test"
|
||||
| "continuous-integration"
|
||||
| "system-integration-testing"
|
||||
| "user-acceptance-testing"
|
||||
| "custom";
|
||||
23
packages/cli/src/definitions/package.ts
Normal file
23
packages/cli/src/definitions/package.ts
Normal 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;
|
||||
};
|
||||
9
packages/cli/src/definitions/projectTypes.ts
Normal file
9
packages/cli/src/definitions/projectTypes.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export enum ProjectTypes {
|
||||
REACT_SCRIPT = "react-scripts",
|
||||
REMIX = "remix",
|
||||
NEXTJS = "nextjs",
|
||||
VITE = "vite",
|
||||
CRACO = "craco",
|
||||
PARCEL = "parcel",
|
||||
UNKNOWN = "unknown",
|
||||
}
|
||||
46
packages/cli/src/definitions/refineConfig.ts
Normal file
46
packages/cli/src/definitions/refineConfig.ts
Normal 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;
|
||||
};
|
||||
6
packages/cli/src/definitions/uiFrameworks.ts
Normal file
6
packages/cli/src/definitions/uiFrameworks.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export enum UIFrameworks {
|
||||
ANTD = "antd",
|
||||
MUI = "mui",
|
||||
MANTINE = "mantine",
|
||||
CHAKRA = "chakra-ui",
|
||||
}
|
||||
Reference in New Issue
Block a user