@reliverse/dler 1.7.21 → 1.7.23
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/app/agg/impl.js +1 -1
- package/bin/app/cmds.d.ts +1 -1
- package/bin/app/cmds.js +1 -1
- package/bin/app/inject/cmd.d.ts +0 -24
- package/bin/app/inject/cmd.js +0 -47
- package/bin/app/{spell → magic}/cmd.d.ts +2 -0
- package/bin/app/magic/cmd.js +101 -0
- package/bin/app/pub/impl.js +4 -2
- package/bin/libs/cfg/cfg-mod.d.ts +24 -195
- package/bin/libs/cfg/cfg-mod.js +71 -66
- package/bin/libs/cfg/constants.d.ts +68 -0
- package/bin/libs/cfg/constants.js +60 -0
- package/bin/libs/cfg/rse/rse-impl/rse-create.js +1 -1
- package/bin/libs/cfg/rse/rse-impl/rse-define.d.ts +11 -11
- package/bin/libs/cfg/rse/rse-mod.d.ts +1 -1
- package/bin/libs/cfg/rse/rse-mod.js +1 -1
- package/bin/libs/sdk/sdk-impl/cmds/inject/inject-impl-mod.d.ts +63 -0
- package/bin/libs/sdk/sdk-impl/cmds/inject/inject-impl-mod.js +237 -0
- package/bin/libs/sdk/sdk-impl/config/info.js +1 -3
- package/bin/libs/sdk/sdk-impl/magic/apply.d.ts +63 -0
- package/bin/libs/sdk/sdk-impl/{spell/applyMagicSpells.js → magic/apply.js} +223 -70
- package/bin/libs/sdk/sdk-impl/{spell → magic}/spells.d.ts +16 -1
- package/bin/libs/sdk/sdk-impl/{spell → magic}/spells.js +41 -1
- package/bin/libs/sdk/sdk-impl/rules/reliverse/missing-deps/deps-types.d.ts +1 -1
- package/bin/libs/sdk/sdk-mod.d.ts +93 -42
- package/bin/libs/sdk/sdk-mod.js +119 -27
- package/package.json +2 -2
- package/bin/app/inject/impl.d.ts +0 -5
- package/bin/app/inject/impl.js +0 -159
- package/bin/app/spell/cmd.js +0 -47
- package/bin/libs/sdk/sdk-impl/spell/applyMagicSpells.d.ts +0 -38
- /package/bin/app/{spell → magic}/old.d.ts +0 -0
- /package/bin/app/{spell → magic}/old.js +0 -0
- /package/bin/libs/cfg/rse/rse-impl/{rse-inject.d.ts → rse-comments.d.ts} +0 -0
- /package/bin/libs/cfg/rse/rse-impl/{rse-inject.js → rse-comments.js} +0 -0
package/bin/app/agg/impl.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "@reliverse/pathkit";
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
|
-
const AGGREGATOR_START = "// AUTO-GENERATED AGGREGATOR START";
|
|
4
|
+
const AGGREGATOR_START = "// AUTO-GENERATED AGGREGATOR START (via `dler agg`)";
|
|
5
5
|
const AGGREGATOR_END = "// AUTO-GENERATED AGGREGATOR END";
|
|
6
6
|
export async function useAggregator({
|
|
7
7
|
inputDir,
|
package/bin/app/cmds.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export declare const getMigrateCmd: () => Promise<Command>;
|
|
|
12
12
|
export declare const getPubCmd: () => Promise<Command>;
|
|
13
13
|
export declare const getRemptsCmd: () => Promise<Command>;
|
|
14
14
|
export declare const getRenameCmd: () => Promise<Command>;
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const getMagicCmd: () => Promise<Command>;
|
|
16
16
|
export declare const getSplitCmd: () => Promise<Command>;
|
package/bin/app/cmds.js
CHANGED
|
@@ -12,5 +12,5 @@ export const getMigrateCmd = async () => loadCommand("migrate");
|
|
|
12
12
|
export const getPubCmd = async () => loadCommand("pub");
|
|
13
13
|
export const getRemptsCmd = async () => loadCommand("rempts");
|
|
14
14
|
export const getRenameCmd = async () => loadCommand("rename");
|
|
15
|
-
export const
|
|
15
|
+
export const getMagicCmd = async () => loadCommand("magic");
|
|
16
16
|
export const getSplitCmd = async () => loadCommand("split");
|
package/bin/app/inject/cmd.d.ts
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare const _default: import("@reliverse/rempts").Command<{
|
|
2
|
-
dev: {
|
|
3
|
-
type: "boolean";
|
|
4
|
-
description: string;
|
|
5
|
-
};
|
|
6
|
-
cwd: {
|
|
7
|
-
type: "string";
|
|
8
|
-
description: string;
|
|
9
|
-
};
|
|
10
|
-
files: {
|
|
11
|
-
type: "positional";
|
|
12
|
-
description: string;
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
comment: {
|
|
16
|
-
type: "string";
|
|
17
|
-
description: string;
|
|
18
|
-
};
|
|
19
|
-
tscPaths: {
|
|
20
|
-
type: "string";
|
|
21
|
-
description: string;
|
|
22
|
-
};
|
|
23
|
-
}>;
|
|
24
|
-
export default _default;
|
package/bin/app/inject/cmd.js
CHANGED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { relinka } from "@reliverse/relinka";
|
|
2
|
-
import { defineArgs, defineCommand } from "@reliverse/rempts";
|
|
3
|
-
import { useTsExpectError } from "./impl.js";
|
|
4
|
-
export default defineCommand({
|
|
5
|
-
meta: {
|
|
6
|
-
name: "expect",
|
|
7
|
-
version: "1.0.0",
|
|
8
|
-
description: "Inject `@ts-expect-error` above lines where TS errors occur"
|
|
9
|
-
},
|
|
10
|
-
args: defineArgs({
|
|
11
|
-
dev: {
|
|
12
|
-
type: "boolean",
|
|
13
|
-
description: "Run the CLI in dev mode"
|
|
14
|
-
},
|
|
15
|
-
cwd: {
|
|
16
|
-
type: "string",
|
|
17
|
-
description: "The working directory to run the CLI in"
|
|
18
|
-
},
|
|
19
|
-
files: {
|
|
20
|
-
type: "positional",
|
|
21
|
-
description: `'auto' or path(s) to line references file(s)`,
|
|
22
|
-
default: "auto"
|
|
23
|
-
},
|
|
24
|
-
comment: {
|
|
25
|
-
type: "string",
|
|
26
|
-
description: "Override the comment line to insert. Default is `// @ts-expect-error TODO: fix ts`"
|
|
27
|
-
},
|
|
28
|
-
tscPaths: {
|
|
29
|
-
type: "string",
|
|
30
|
-
description: "Optional: specify path(s) to restrict TSC processing (only effective when using 'auto')"
|
|
31
|
-
}
|
|
32
|
-
}),
|
|
33
|
-
async run({ args }) {
|
|
34
|
-
if (args.dev) {
|
|
35
|
-
relinka("verbose", "Using dev mode");
|
|
36
|
-
}
|
|
37
|
-
let pathsTsc = args.tscPaths;
|
|
38
|
-
if (pathsTsc === void 0 && args.files === "auto") {
|
|
39
|
-
pathsTsc = "./tsconfig.json";
|
|
40
|
-
}
|
|
41
|
-
await useTsExpectError({
|
|
42
|
-
files: [args.files],
|
|
43
|
-
comment: args.comment,
|
|
44
|
-
tscPaths: [pathsTsc]
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
@@ -11,10 +11,12 @@ declare const _default: import("@reliverse/rempts").Command<{
|
|
|
11
11
|
concurrency: {
|
|
12
12
|
type: "number";
|
|
13
13
|
description: string;
|
|
14
|
+
default: number;
|
|
14
15
|
};
|
|
15
16
|
batchSize: {
|
|
16
17
|
type: "number";
|
|
17
18
|
description: string;
|
|
19
|
+
default: number;
|
|
18
20
|
};
|
|
19
21
|
stopOnError: {
|
|
20
22
|
type: "boolean";
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { defineArgs, defineCommand } from "@reliverse/rempts";
|
|
2
|
+
import { applyMagicSpells } from "../../libs/sdk/sdk-impl/magic/apply.js";
|
|
3
|
+
import { formatError } from "../../libs/sdk/sdk-impl/utils/utils-error-cwd.js";
|
|
4
|
+
export default defineCommand({
|
|
5
|
+
meta: {
|
|
6
|
+
name: "magic",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
description: `Apply magic directives to files.
|
|
9
|
+
Target Types:
|
|
10
|
+
1. Distribution Targets (dist-*):
|
|
11
|
+
- dist-npm: Process files in dist-npm/bin
|
|
12
|
+
- dist-jsr: Process files in dist-jsr/bin
|
|
13
|
+
- dist-libs: Process all libraries in dist-libs
|
|
14
|
+
- dist-libs/<lib>: Process specific library (e.g., dist-libs/sdk)
|
|
15
|
+
For dist-* targets, magic directives are first searched in src/ directory,
|
|
16
|
+
then applied to corresponding files in the distribution directories.
|
|
17
|
+
2. Custom Targets:
|
|
18
|
+
- Any directory name that is not dist-* (e.g., "my-output", "custom-build")
|
|
19
|
+
For custom targets, magic directives are processed directly in the target files.
|
|
20
|
+
No source directory scanning is performed.
|
|
21
|
+
Examples:
|
|
22
|
+
# Process all distribution targets
|
|
23
|
+
dler magic dist-npm dist-jsr dist-libs
|
|
24
|
+
# Process specific library
|
|
25
|
+
dler magic dist-libs/sdk
|
|
26
|
+
# Process custom target
|
|
27
|
+
dler magic my-custom-output
|
|
28
|
+
# Mix distribution and custom targets
|
|
29
|
+
dler magic dist-npm my-custom-output`
|
|
30
|
+
},
|
|
31
|
+
args: defineArgs({
|
|
32
|
+
targets: {
|
|
33
|
+
type: "array",
|
|
34
|
+
description: `Targets to process. Can be:
|
|
35
|
+
- Distribution targets: dist-npm, dist-jsr, dist-libs, dist-libs/<lib>
|
|
36
|
+
- Custom targets: any directory name that is not dist-*`,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
lib: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "Library name to process (e.g., sdk, cfg). Only valid with dist-libs target."
|
|
42
|
+
},
|
|
43
|
+
concurrency: {
|
|
44
|
+
type: "number",
|
|
45
|
+
description: "Number of files to process in parallel (default: 4)",
|
|
46
|
+
default: 4
|
|
47
|
+
},
|
|
48
|
+
batchSize: {
|
|
49
|
+
type: "number",
|
|
50
|
+
description: "Number of files to process in each batch (default: 100)",
|
|
51
|
+
default: 100
|
|
52
|
+
},
|
|
53
|
+
stopOnError: {
|
|
54
|
+
type: "boolean",
|
|
55
|
+
description: "Stop processing on first error (default: true)",
|
|
56
|
+
default: true
|
|
57
|
+
}
|
|
58
|
+
}),
|
|
59
|
+
async run({ args }) {
|
|
60
|
+
const { targets, lib, concurrency, batchSize, stopOnError } = args;
|
|
61
|
+
if (lib) {
|
|
62
|
+
if (!targets?.includes("dist-libs")) {
|
|
63
|
+
throw new Error(
|
|
64
|
+
"The 'lib' parameter can only be used with 'dist-libs' target. Example: dler magic dist-libs/sdk"
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
if (targets.some((t) => t.startsWith("dist-libs/") && t !== `dist-libs/${lib}`)) {
|
|
68
|
+
throw new Error(
|
|
69
|
+
"Cannot specify both 'lib' parameter and dist-libs/<lib> in targets. Use one or the other."
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
const finalTargets = targets?.map(
|
|
75
|
+
(target) => target === "dist-libs" && lib ? `${target}/${lib}` : target
|
|
76
|
+
) ?? [];
|
|
77
|
+
const distTargets = finalTargets.filter((t) => t.startsWith("dist-"));
|
|
78
|
+
const customTargets = finalTargets.filter((t) => !t.startsWith("dist-"));
|
|
79
|
+
if (distTargets.length > 0) {
|
|
80
|
+
console.log("\nProcessing distribution targets:");
|
|
81
|
+
for (const target of distTargets) {
|
|
82
|
+
console.log(` - ${target} (will scan src/ for magic directives)`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (customTargets.length > 0) {
|
|
86
|
+
console.log("\nProcessing custom targets:");
|
|
87
|
+
for (const target of customTargets) {
|
|
88
|
+
console.log(` - ${target} (will process magic directives directly in target files)`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
await applyMagicSpells(finalTargets, {
|
|
92
|
+
concurrency,
|
|
93
|
+
batchSize,
|
|
94
|
+
stopOnError
|
|
95
|
+
});
|
|
96
|
+
console.log("\n\u2728 Magic spells applied successfully!");
|
|
97
|
+
} catch (error) {
|
|
98
|
+
throw new Error(`\u274C Processing failed: ${formatError(error)}`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
package/bin/app/pub/impl.js
CHANGED
|
@@ -4,8 +4,8 @@ import fs from "@reliverse/relifso";
|
|
|
4
4
|
import { relinka } from "@reliverse/relinka";
|
|
5
5
|
import { getConfigDler } from "../../libs/sdk/sdk-impl/config/load.js";
|
|
6
6
|
import { processLibraryFlow } from "../../libs/sdk/sdk-impl/library-flow.js";
|
|
7
|
+
import { applyMagicSpells } from "../../libs/sdk/sdk-impl/magic/apply.js";
|
|
7
8
|
import { processRegularFlow } from "../../libs/sdk/sdk-impl/regular-flow.js";
|
|
8
|
-
import { applyMagicSpells } from "../../libs/sdk/sdk-impl/spell/applyMagicSpells.js";
|
|
9
9
|
import { finalizeBuildPub } from "../../libs/sdk/sdk-impl/utils/finalize.js";
|
|
10
10
|
import { resolveAllCrossLibs } from "../../libs/sdk/sdk-impl/utils/resolve-cross-libs.js";
|
|
11
11
|
import { removeDistFolders } from "../../libs/sdk/sdk-impl/utils/utils-clean.js";
|
|
@@ -45,7 +45,9 @@ export async function dlerPub(isDev, config) {
|
|
|
45
45
|
await processRegularFlow(timer, isDev, effectiveConfig);
|
|
46
46
|
await processLibraryFlow(timer, isDev, effectiveConfig);
|
|
47
47
|
await resolveAllCrossLibs();
|
|
48
|
-
|
|
48
|
+
if (isDev) {
|
|
49
|
+
await applyMagicSpells(["dist-jsr", "dist-npm", "dist-libs"]);
|
|
50
|
+
}
|
|
49
51
|
relinka("log", "[processDistDirectory] dist-npm");
|
|
50
52
|
await processDistDirectory("dist-npm", "~");
|
|
51
53
|
relinka("log", "[processDistDirectory] dist-jsr");
|
|
@@ -1,195 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
distJsrBuilder: import("./types").BundlerName;
|
|
26
|
-
distJsrDirName: string;
|
|
27
|
-
distJsrDryRun: boolean;
|
|
28
|
-
distJsrFailOnWarn: boolean;
|
|
29
|
-
distJsrGenTsconfig: boolean;
|
|
30
|
-
distJsrOutFilesExt: import("./types").NpmOutExt;
|
|
31
|
-
distJsrSlowTypes: boolean;
|
|
32
|
-
distNpmBuilder: import("./types").BundlerName;
|
|
33
|
-
distNpmDirName: string;
|
|
34
|
-
distNpmOutFilesExt: import("./types").NpmOutExt;
|
|
35
|
-
libsActMode: "libs-only" | "main-and-libs" | "main-project-only";
|
|
36
|
-
libsDirDist: string;
|
|
37
|
-
libsDirSrc: string;
|
|
38
|
-
libsList: Record<string, import("./types").LibConfig>;
|
|
39
|
-
logsFileName: string;
|
|
40
|
-
logsFreshFile: boolean;
|
|
41
|
-
filterDepsPatterns: {
|
|
42
|
-
global: string[];
|
|
43
|
-
"dist-npm": string[];
|
|
44
|
-
"dist-jsr": string[];
|
|
45
|
-
"dist-libs": Record<string, {
|
|
46
|
-
npm: string[];
|
|
47
|
-
jsr: string[];
|
|
48
|
-
}>;
|
|
49
|
-
};
|
|
50
|
-
transpileFailOnWarn: boolean;
|
|
51
|
-
transpileEsbuild: import("./types").Esbuild;
|
|
52
|
-
transpileFormat: import("./types").transpileFormat;
|
|
53
|
-
transpileMinify: boolean;
|
|
54
|
-
transpilePublicPath: string;
|
|
55
|
-
transpileSourcemap: import("./types").Sourcemap;
|
|
56
|
-
transpileSplitting: boolean;
|
|
57
|
-
transpileStub: boolean;
|
|
58
|
-
transpileTarget: import("./types").transpileTarget;
|
|
59
|
-
transpileWatch: boolean;
|
|
60
|
-
publishArtifacts?: {
|
|
61
|
-
global: string[];
|
|
62
|
-
"dist-jsr": string[];
|
|
63
|
-
"dist-npm": string[];
|
|
64
|
-
"dist-libs": Record<string, {
|
|
65
|
-
jsr: string[];
|
|
66
|
-
npm: string[];
|
|
67
|
-
}>;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
71
|
-
version?: string | undefined;
|
|
72
|
-
$schema?: "./schema.json" | "https://reliverse.org/schema.json" | undefined;
|
|
73
|
-
projectName?: string | undefined;
|
|
74
|
-
projectAuthor?: string | undefined;
|
|
75
|
-
projectDescription?: string | undefined;
|
|
76
|
-
projectLicense?: string | undefined;
|
|
77
|
-
projectRepository?: string | undefined;
|
|
78
|
-
projectDomain?: string | undefined;
|
|
79
|
-
projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
|
|
80
|
-
projectDeployService?: "none" | "vercel" | "netlify" | "railway" | "deno" | undefined;
|
|
81
|
-
projectPackageManager?: "npm" | "bun" | "pnpm" | "yarn" | undefined;
|
|
82
|
-
projectState?: "created" | "creating" | undefined;
|
|
83
|
-
projectCategory?: "browser" | "cli" | "unknown" | "website" | "vscode" | "library" | "mobile" | undefined;
|
|
84
|
-
projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
|
|
85
|
-
projectFramework?: "vue" | "npm-jsr" | "rempts" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | undefined;
|
|
86
|
-
projectTemplate?: "unknown" | "blefnk/relivator-nextjs-template" | "blefnk/relivator-docker-template" | "blefnk/next-react-ts-src-minimal" | "blefnk/all-in-one-nextjs-template" | "blefnk/create-t3-app" | "blefnk/create-next-app" | "blefnk/astro-starlight-template" | "blefnk/versator-nextjs-template" | "blefnk/relivator-lynxjs-template" | "blefnk/relivator-react-native-template" | "reliverse/template-browser-extension" | "microsoft/vscode-extension-samples" | "microsoft/vscode-extension-template" | "rsetarter-template" | "blefnk/deno-cli-tutorial" | undefined;
|
|
87
|
-
projectTemplateDate?: string | undefined;
|
|
88
|
-
features?: {
|
|
89
|
-
i18n?: boolean | undefined;
|
|
90
|
-
analytics?: boolean | undefined;
|
|
91
|
-
themeMode?: "light" | "dark" | "dark-light" | undefined;
|
|
92
|
-
authentication?: boolean | undefined;
|
|
93
|
-
api?: boolean | undefined;
|
|
94
|
-
database?: boolean | undefined;
|
|
95
|
-
testing?: boolean | undefined;
|
|
96
|
-
docker?: boolean | undefined;
|
|
97
|
-
ci?: boolean | undefined;
|
|
98
|
-
commands?: string[] | undefined;
|
|
99
|
-
webview?: string[] | undefined;
|
|
100
|
-
language?: string[] | undefined;
|
|
101
|
-
themes?: string[] | undefined;
|
|
102
|
-
} | undefined;
|
|
103
|
-
preferredLibraries?: {
|
|
104
|
-
search?: "unknown" | "algolia" | undefined;
|
|
105
|
-
i18n?: "unknown" | "next-intl" | undefined;
|
|
106
|
-
analytics?: "unknown" | "vercel" | undefined;
|
|
107
|
-
authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
|
|
108
|
-
api?: "unknown" | "hono" | "trpc" | "graphql" | "rest" | undefined;
|
|
109
|
-
testing?: "bun" | "unknown" | "vitest" | "jest" | "playwright" | "cypress" | undefined;
|
|
110
|
-
stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
|
|
111
|
-
formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
|
|
112
|
-
styling?: "sass" | "unknown" | "tailwind" | "styled-components" | "css-modules" | undefined;
|
|
113
|
-
uiComponents?: "unknown" | "shadcn-ui" | "chakra-ui" | "material-ui" | undefined;
|
|
114
|
-
databaseLibrary?: "unknown" | "drizzle" | "prisma" | "supabase" | undefined;
|
|
115
|
-
databaseProvider?: "unknown" | "sqlite" | "pg" | "mysql" | "mongodb" | undefined;
|
|
116
|
-
linting?: "unknown" | "eslint" | undefined;
|
|
117
|
-
formatting?: "unknown" | "biome" | undefined;
|
|
118
|
-
payment?: "unknown" | "stripe" | undefined;
|
|
119
|
-
monitoring?: "unknown" | "sentry" | undefined;
|
|
120
|
-
logging?: "unknown" | "axiom" | undefined;
|
|
121
|
-
forms?: "unknown" | "react-hook-form" | undefined;
|
|
122
|
-
notifications?: "unknown" | "sonner" | undefined;
|
|
123
|
-
uploads?: "unknown" | "uploadthing" | undefined;
|
|
124
|
-
validation?: "unknown" | "zod" | "typebox" | "valibot" | undefined;
|
|
125
|
-
documentation?: "unknown" | "starlight" | "nextra" | undefined;
|
|
126
|
-
icons?: "unknown" | "lucide" | undefined;
|
|
127
|
-
mail?: "unknown" | "resend" | undefined;
|
|
128
|
-
cache?: "unknown" | "redis" | undefined;
|
|
129
|
-
storage?: "unknown" | "cloudflare" | undefined;
|
|
130
|
-
cdn?: "unknown" | "cloudflare" | undefined;
|
|
131
|
-
cms?: "unknown" | "contentlayer" | undefined;
|
|
132
|
-
seo?: "unknown" | "next-seo" | undefined;
|
|
133
|
-
motion?: "unknown" | "framer" | undefined;
|
|
134
|
-
charts?: "unknown" | "recharts" | undefined;
|
|
135
|
-
dates?: "unknown" | "dayjs" | undefined;
|
|
136
|
-
markdown?: "unknown" | "mdx" | undefined;
|
|
137
|
-
security?: "unknown" | "auth" | undefined;
|
|
138
|
-
routing?: "unknown" | "next" | "react-router" | "tanstack-router" | undefined;
|
|
139
|
-
} | undefined;
|
|
140
|
-
codeStyle?: {
|
|
141
|
-
lineWidth?: number | undefined;
|
|
142
|
-
indentSize?: number | undefined;
|
|
143
|
-
indentStyle?: "space" | "tab" | undefined;
|
|
144
|
-
quoteMark?: "single" | "double" | undefined;
|
|
145
|
-
semicolons?: boolean | undefined;
|
|
146
|
-
trailingComma?: "all" | "none" | "es5" | undefined;
|
|
147
|
-
bracketSpacing?: boolean | undefined;
|
|
148
|
-
arrowParens?: "always" | "avoid" | undefined;
|
|
149
|
-
tabWidth?: number | undefined;
|
|
150
|
-
jsToTs?: boolean | undefined;
|
|
151
|
-
dontRemoveComments?: boolean | undefined;
|
|
152
|
-
shouldAddComments?: boolean | undefined;
|
|
153
|
-
typeOrInterface?: "type" | "interface" | "mixed" | undefined;
|
|
154
|
-
importOrRequire?: "import" | "require" | "mixed" | undefined;
|
|
155
|
-
cjsToEsm?: boolean | undefined;
|
|
156
|
-
modernize?: {
|
|
157
|
-
replaceFs?: boolean | undefined;
|
|
158
|
-
replacePath?: boolean | undefined;
|
|
159
|
-
replaceHttp?: boolean | undefined;
|
|
160
|
-
replaceProcess?: boolean | undefined;
|
|
161
|
-
replaceConsole?: boolean | undefined;
|
|
162
|
-
replaceEvents?: boolean | undefined;
|
|
163
|
-
} | undefined;
|
|
164
|
-
importSymbol?: string | undefined;
|
|
165
|
-
} | undefined;
|
|
166
|
-
monorepo?: {
|
|
167
|
-
type?: "bun" | "none" | "turborepo" | "nx" | "pnpm" | undefined;
|
|
168
|
-
packages?: string[] | undefined;
|
|
169
|
-
sharedPackages?: string[] | undefined;
|
|
170
|
-
} | undefined;
|
|
171
|
-
ignoreDependencies?: string[] | undefined;
|
|
172
|
-
customRules?: {
|
|
173
|
-
[x: string]: unknown;
|
|
174
|
-
} | undefined;
|
|
175
|
-
multipleRepoCloneMode?: boolean | undefined;
|
|
176
|
-
customUserFocusedRepos?: string[] | undefined;
|
|
177
|
-
customDevsFocusedRepos?: string[] | undefined;
|
|
178
|
-
hideRepoSuggestions?: boolean | undefined;
|
|
179
|
-
customReposOnNewProject?: boolean | undefined;
|
|
180
|
-
envComposerOpenBrowser?: boolean | undefined;
|
|
181
|
-
repoBranch?: string | undefined;
|
|
182
|
-
repoPrivacy?: "private" | "public" | "unknown" | undefined;
|
|
183
|
-
projectArchitecture?: "unknown" | "fullstack" | "separated" | undefined;
|
|
184
|
-
projectRuntime?: "bun" | "node" | "deno" | undefined;
|
|
185
|
-
skipPromptsUseAutoBehavior?: boolean | undefined;
|
|
186
|
-
deployBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
|
|
187
|
-
depsBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
|
|
188
|
-
gitBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
|
|
189
|
-
i18nBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
|
|
190
|
-
scriptsBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
|
|
191
|
-
existingRepoBehavior?: "prompt" | "autoYes" | "autoNo" | "autoYesSkipCommit" | undefined;
|
|
192
|
-
relinterConfirm?: "autoYes" | "promptOnce" | "promptEachFile" | undefined;
|
|
193
|
-
};
|
|
194
|
-
import * as rseCfg from "./rse/rse-mod";
|
|
195
|
-
export { rseCfg };
|
|
1
|
+
export { DEFAULT_CONFIG_DLER, defineConfigDler } from "./constants.js";
|
|
2
|
+
export { getBiomeConfig } from "./rse/rse-impl/rse-biome.js";
|
|
3
|
+
export { PROJECT_ROOT, rseName, tsconfigJson, cliConfigJsonc, cliConfigJsoncTmp, cliConfigJsoncBak, cliConfigTs, cliConfigTsTmp, cliConfigTsBak, rseOrg, rseOrgBase, cliDomainRoot, cliDomainDocs, cliDomainEnv, homeDir, cliHomeDir, cliHomeTmp, cliHomeRepos, memoryPath, cliJsrPath, useLocalhost, DEFAULT_CLI_USERNAME, endTitle, UNKNOWN_VALUE, DEFAULT_DOMAIN, RSE_SCHEMA_DEV, RSE_SCHEMA_URL, FALLBACK_ENV_EXAMPLE_URL, CONFIG_CATEGORIES, } from "./rse/rse-impl/rse-consts.js";
|
|
4
|
+
export type { RequiredProjectContent } from "./rse/rse-impl/rse-content.js";
|
|
5
|
+
export { getProjectContent } from "./rse/rse-impl/rse-content.js";
|
|
6
|
+
export { getOrCreateRseConfig } from "./rse/rse-impl/rse-core.js";
|
|
7
|
+
export { writeRseConfig, createRseConfig, generateRseConfig } from "./rse/rse-impl/rse-create.js";
|
|
8
|
+
export { getDefaultRseConfig, generateDefaultRulesForProject, } from "./rse/rse-impl/rse-def-utils.js";
|
|
9
|
+
export { DEFAULT_CONFIG_RSE, PROJECT_FRAMEWORK_FILES } from "./rse/rse-impl/rse-default.js";
|
|
10
|
+
export { defineConfigRse } from "./rse/rse-impl/rse-define.js";
|
|
11
|
+
export { detectProjectFramework, getPackageJson, getPackageJsonSafe, detectProject, detectProjectsWithRseConfig, detectFeatures, } from "./rse/rse-impl/rse-detect.js";
|
|
12
|
+
export { generateConfigFiles, generateProjectConfigs } from "./rse/rse-impl/rse-gen-cfg.js";
|
|
13
|
+
export { injectSectionComments } from "./rse/rse-impl/rse-comments.js";
|
|
14
|
+
export { migrateRseConfig } from "./rse/rse-impl/rse-migrate.js";
|
|
15
|
+
export { getRseConfigPath } from "./rse/rse-impl/rse-path.js";
|
|
16
|
+
export { askRseConfigType } from "./rse/rse-impl/rse-prompts.js";
|
|
17
|
+
export { readRseTs, readRseConfig } from "./rse/rse-impl/rse-read.js";
|
|
18
|
+
export { repairAndParseJSON, fixLineByLine, parseAndFixRseConfig, } from "./rse/rse-impl/rse-repair.js";
|
|
19
|
+
export { rseSchema, generateJsonSchema, generateSchemaFile } from "./rse/rse-impl/rse-schema.js";
|
|
20
|
+
export type { RseConfig, ProjectCategory, ProjectSubcategory, ProjectFramework, ProjectArchitecture, RelinterConfirm, IterableError, DetectedProject, BiomeConfigResult, BaseConfig, BiomeConfig, DeploymentService, VSCodeSettings, } from "./rse/rse-impl/rse-types.js";
|
|
21
|
+
export { loadrse, watchrse } from "./rse/rse-impl/rse-unstable.js";
|
|
22
|
+
export { updateRseConfig, mergeWithDefaults } from "./rse/rse-impl/rse-update.js";
|
|
23
|
+
export { cleanGitHubUrl, objectToCodeString, updateTsConfigInclude, getBackupAndTempPaths, atomicWriteFile, } from "./rse/rse-impl/rse-utils.js";
|
|
24
|
+
export type { DlerConfig, BumpMode, BundlerName, NpmOutExt, LibConfig, Esbuild, transpileFormat, Sourcemap, transpileTarget, } from "./types.js";
|
package/bin/libs/cfg/cfg-mod.js
CHANGED
|
@@ -1,66 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
export { DEFAULT_CONFIG_DLER, defineConfigDler } from "./constants.js";
|
|
2
|
+
export { getBiomeConfig } from "./rse/rse-impl/rse-biome.js";
|
|
3
|
+
export {
|
|
4
|
+
PROJECT_ROOT,
|
|
5
|
+
rseName,
|
|
6
|
+
tsconfigJson,
|
|
7
|
+
cliConfigJsonc,
|
|
8
|
+
cliConfigJsoncTmp,
|
|
9
|
+
cliConfigJsoncBak,
|
|
10
|
+
cliConfigTs,
|
|
11
|
+
cliConfigTsTmp,
|
|
12
|
+
cliConfigTsBak,
|
|
13
|
+
rseOrg,
|
|
14
|
+
rseOrgBase,
|
|
15
|
+
cliDomainRoot,
|
|
16
|
+
cliDomainDocs,
|
|
17
|
+
cliDomainEnv,
|
|
18
|
+
homeDir,
|
|
19
|
+
cliHomeDir,
|
|
20
|
+
cliHomeTmp,
|
|
21
|
+
cliHomeRepos,
|
|
22
|
+
memoryPath,
|
|
23
|
+
cliJsrPath,
|
|
24
|
+
useLocalhost,
|
|
25
|
+
DEFAULT_CLI_USERNAME,
|
|
26
|
+
endTitle,
|
|
27
|
+
UNKNOWN_VALUE,
|
|
28
|
+
DEFAULT_DOMAIN,
|
|
29
|
+
RSE_SCHEMA_DEV,
|
|
30
|
+
RSE_SCHEMA_URL,
|
|
31
|
+
FALLBACK_ENV_EXAMPLE_URL,
|
|
32
|
+
CONFIG_CATEGORIES
|
|
33
|
+
} from "./rse/rse-impl/rse-consts.js";
|
|
34
|
+
export { getProjectContent } from "./rse/rse-impl/rse-content.js";
|
|
35
|
+
export { getOrCreateRseConfig } from "./rse/rse-impl/rse-core.js";
|
|
36
|
+
export { writeRseConfig, createRseConfig, generateRseConfig } from "./rse/rse-impl/rse-create.js";
|
|
37
|
+
export {
|
|
38
|
+
getDefaultRseConfig,
|
|
39
|
+
generateDefaultRulesForProject
|
|
40
|
+
} from "./rse/rse-impl/rse-def-utils.js";
|
|
41
|
+
export { DEFAULT_CONFIG_RSE, PROJECT_FRAMEWORK_FILES } from "./rse/rse-impl/rse-default.js";
|
|
42
|
+
export { defineConfigRse } from "./rse/rse-impl/rse-define.js";
|
|
43
|
+
export {
|
|
44
|
+
detectProjectFramework,
|
|
45
|
+
getPackageJson,
|
|
46
|
+
getPackageJsonSafe,
|
|
47
|
+
detectProject,
|
|
48
|
+
detectProjectsWithRseConfig,
|
|
49
|
+
detectFeatures
|
|
50
|
+
} from "./rse/rse-impl/rse-detect.js";
|
|
51
|
+
export { generateConfigFiles, generateProjectConfigs } from "./rse/rse-impl/rse-gen-cfg.js";
|
|
52
|
+
export { injectSectionComments } from "./rse/rse-impl/rse-comments.js";
|
|
53
|
+
export { migrateRseConfig } from "./rse/rse-impl/rse-migrate.js";
|
|
54
|
+
export { getRseConfigPath } from "./rse/rse-impl/rse-path.js";
|
|
55
|
+
export { askRseConfigType } from "./rse/rse-impl/rse-prompts.js";
|
|
56
|
+
export { readRseTs, readRseConfig } from "./rse/rse-impl/rse-read.js";
|
|
57
|
+
export {
|
|
58
|
+
repairAndParseJSON,
|
|
59
|
+
fixLineByLine,
|
|
60
|
+
parseAndFixRseConfig
|
|
61
|
+
} from "./rse/rse-impl/rse-repair.js";
|
|
62
|
+
export { rseSchema, generateJsonSchema, generateSchemaFile } from "./rse/rse-impl/rse-schema.js";
|
|
63
|
+
export { loadrse, watchrse } from "./rse/rse-impl/rse-unstable.js";
|
|
64
|
+
export { updateRseConfig, mergeWithDefaults } from "./rse/rse-impl/rse-update.js";
|
|
65
|
+
export {
|
|
66
|
+
cleanGitHubUrl,
|
|
67
|
+
objectToCodeString,
|
|
68
|
+
updateTsConfigInclude,
|
|
69
|
+
getBackupAndTempPaths,
|
|
70
|
+
atomicWriteFile
|
|
71
|
+
} from "./rse/rse-impl/rse-utils.js";
|