@reliverse/dler 1.7.103 → 1.7.105
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/add/add-local/core/templates.js +3 -3
- package/bin/app/add/cmd.js +1 -1
- package/bin/app/ai/cmd.js +2 -2
- package/bin/app/check/cmd.js +2 -2
- package/bin/app/cli/cmd.js +1 -1
- package/bin/app/cli/impl.js +1 -1
- package/bin/app/config/cmd.d.ts +6 -0
- package/bin/app/config/cmd.js +22 -8
- package/bin/app/config/constants.d.ts +2 -1
- package/bin/app/config/constants.js +2 -1
- package/bin/app/config/{cfg-core.js → core-cfg.js} +5 -5
- package/bin/app/config/{cfg-create.js → create.js} +15 -17
- package/bin/app/config/{cfg-def-utils.js → def-utils.js} +3 -7
- package/bin/app/config/{cfg-detect.js → detect.js} +4 -4
- package/bin/app/config/{cfg-gen-cfg.js → gen-cfg.js} +2 -5
- package/bin/app/config/{cfg-migrate.js → migrate.js} +1 -1
- package/bin/app/config/{cfg-path.js → path.js} +1 -1
- package/bin/app/config/prepare.d.ts +3 -2
- package/bin/app/config/prepare.js +647 -150
- package/bin/app/config/{cfg-read.js → read.js} +5 -5
- package/bin/app/config/{cfg-reltypes-content.js → reltypes-content.js} +2 -2
- package/bin/app/config/{cfg-reltypes-utils.js → reltypes-utils.js} +3 -3
- package/bin/app/config/{cfg-repair.js → repair.js} +4 -4
- package/bin/app/config/{cfg-unstable.js → unstable.js} +2 -2
- package/bin/app/config/{cfg-update.js → update.js} +5 -5
- package/bin/app/env/env-impl.js +1 -1
- package/bin/app/init/cmd-2.js +1 -1
- package/bin/app/init/init-utils/init-impl.js +1 -1
- package/bin/app/init/init-utils/init-utils.d.ts +1 -1
- package/bin/app/init/init-utils/init-utils.js +3 -3
- package/bin/app/init/init-utils/mm-deprecated/editor-menu.js +1 -1
- package/bin/app/init/use-template/cp-mod.js +3 -3
- package/bin/app/init/use-template/cp-modules/cli-main-modules/cli-menu-items/getMainMenuOptions.js +1 -1
- package/bin/app/init/use-template/cp-modules/git-deploy-prompts/utils-repo-exists.js +1 -1
- package/bin/app/invoke/cmd.js +1 -1
- package/bin/app/mkdist/cmd.js +2 -2
- package/bin/app/mrse/cmd.js +1 -7
- package/bin/app/mrse/mrse-impl.js +1 -1
- package/bin/app/providers/better-t-stack/types.d.ts +11 -11
- package/bin/app/providers/reliverse-stack/reliverse-stack-mod.js +1 -1
- package/bin/app/pub/cmd.js +2 -2
- package/bin/app/schema/cmd.js +1 -1
- package/bin/app/schema/schema-impl.js +1 -1
- package/bin/app/toolbox/cmd.js +1 -1
- package/bin/app/types/mod.d.ts +1 -1
- package/bin/app/utils/downloading/downloadRepo.js +1 -1
- package/bin/app/utils/handlers/handleCleanup.js +1 -1
- package/bin/app/utils/projectRepository.d.ts +1 -1
- package/bin/app/utils/prompts/askUsernameFrontend.js +1 -1
- package/bin/app/utils/schemaMemory.d.ts +1 -1
- package/bin/dler.js +3 -3
- package/bin/mod.d.ts +20 -20
- package/bin/mod.js +53 -53
- package/package.json +1 -1
- package/bin/app/config/cfg-prepare.d.ts +0 -2
- package/bin/app/config/cfg-prepare.js +0 -302
- /package/bin/app/config/{cfg-biome.d.ts → biome.d.ts} +0 -0
- /package/bin/app/config/{cfg-biome.js → biome.js} +0 -0
- /package/bin/app/config/{cfg-comments.d.ts → comments.d.ts} +0 -0
- /package/bin/app/config/{cfg-comments.js → comments.js} +0 -0
- /package/bin/app/config/{cfg-content.d.ts → content.d.ts} +0 -0
- /package/bin/app/config/{cfg-content.js → content.js} +0 -0
- /package/bin/app/config/{cfg-core.d.ts → core-cfg.d.ts} +0 -0
- /package/bin/app/config/{cfg-create.d.ts → create.d.ts} +0 -0
- /package/bin/app/config/{cfg-def-utils.d.ts → def-utils.d.ts} +0 -0
- /package/bin/app/config/{cfg-default.d.ts → default-cfg.d.ts} +0 -0
- /package/bin/app/config/{cfg-default.js → default-cfg.js} +0 -0
- /package/bin/app/config/{cfg-detect.d.ts → detect.d.ts} +0 -0
- /package/bin/app/config/{cfg-gen-cfg.d.ts → gen-cfg.d.ts} +0 -0
- /package/bin/app/config/{cfg-migrate.d.ts → migrate.d.ts} +0 -0
- /package/bin/app/config/{cfg-path.d.ts → path.d.ts} +0 -0
- /package/bin/app/config/{cfg-prompts.d.ts → prompts.d.ts} +0 -0
- /package/bin/app/config/{cfg-prompts.js → prompts.js} +0 -0
- /package/bin/app/config/{cfg-read.d.ts → read.d.ts} +0 -0
- /package/bin/app/config/{cfg-reltypes-content.d.ts → reltypes-content.d.ts} +0 -0
- /package/bin/app/config/{cfg-reltypes-utils.d.ts → reltypes-utils.d.ts} +0 -0
- /package/bin/app/config/{cfg-repair.d.ts → repair.d.ts} +0 -0
- /package/bin/app/config/{cfg-schema.d.ts → schema.d.ts} +0 -0
- /package/bin/app/config/{cfg-schema.js → schema.js} +0 -0
- /package/bin/app/config/{cfg-unstable.d.ts → unstable.d.ts} +0 -0
- /package/bin/app/config/{cfg-update.d.ts → update.d.ts} +0 -0
- /package/bin/app/config/{cfg-utils.d.ts → utils.d.ts} +0 -0
- /package/bin/app/config/{cfg-utils.js → utils.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { relinka } from "@reliverse/relinka";
|
|
2
2
|
import { ofetch } from "ofetch";
|
|
3
|
-
import { getRseConfigPath } from "../../../config/cfg-path.js";
|
|
4
|
-
import { readRseConfig } from "../../../config/cfg-read.js";
|
|
5
|
-
import { updateRseConfig } from "../../../config/cfg-update.js";
|
|
6
3
|
import { UNKNOWN_VALUE } from "../../../config/constants.js";
|
|
4
|
+
import { getRseConfigPath } from "../../../config/path.js";
|
|
5
|
+
import { readRseConfig } from "../../../config/read.js";
|
|
6
|
+
import { updateRseConfig } from "../../../config/update.js";
|
|
7
7
|
import { REPO_TEMPLATES } from "../../../utils/projectRepository.js";
|
|
8
8
|
export async function checkForTemplateUpdate(projectConfig) {
|
|
9
9
|
if (!projectConfig.projectTemplate || projectConfig.projectTemplate === UNKNOWN_VALUE) {
|
package/bin/app/add/cmd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { relinka } from "@reliverse/relinka";
|
|
2
2
|
import { defineCommand } from "@reliverse/rempts";
|
|
3
|
-
import { getOrCreateRseConfig } from "../config/cfg
|
|
3
|
+
import { getOrCreateRseConfig } from "../config/core-cfg.js";
|
|
4
4
|
import { showManualBuilderMenu } from "../init/init-utils/init-impl.js";
|
|
5
5
|
import { getOrCreateReliverseMemory } from "../utils/reliverseMemory.js";
|
|
6
6
|
import { getCurrentWorkingDirectory } from "../utils/terminalHelpers.js";
|
package/bin/app/ai/cmd.js
CHANGED
|
@@ -4,8 +4,8 @@ import { ensureOpenAIKey } from "./ai-impl/ai-auth.js";
|
|
|
4
4
|
import { AGENT_NAMES } from "./ai-impl/ai-const.js";
|
|
5
5
|
import { aiAgenticTool } from "./ai-impl/ai-tools.js";
|
|
6
6
|
import { aiMenu } from "./ai-menu.js";
|
|
7
|
-
import { getRseConfigPath } from "../config/
|
|
8
|
-
import { readRseConfig } from "../config/
|
|
7
|
+
import { getRseConfigPath } from "../config/path.js";
|
|
8
|
+
import { readRseConfig } from "../config/read.js";
|
|
9
9
|
import { getOrCreateReliverseMemory } from "../utils/reliverseMemory.js";
|
|
10
10
|
import { getCurrentWorkingDirectory } from "../utils/terminalHelpers.js";
|
|
11
11
|
export default defineCommand({
|
package/bin/app/check/cmd.js
CHANGED
|
@@ -2,7 +2,7 @@ import path from "@reliverse/pathkit";
|
|
|
2
2
|
import { re } from "@reliverse/relico";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
4
|
import { defineArgs, defineCommand, multiselectPrompt, selectPrompt } from "@reliverse/rempts";
|
|
5
|
-
import {
|
|
5
|
+
import { ensureReliverseConfig } from "../config/prepare.js";
|
|
6
6
|
import { checkDlerConfigHealth } from "../rules/reliverse/dler-config-health/dler-config-health.js";
|
|
7
7
|
import { checkFileExtensions } from "../rules/reliverse/file-extensions/file-extensions.js";
|
|
8
8
|
import { analyzeDependencies } from "../rules/reliverse/missing-deps/analyzer.js";
|
|
@@ -88,7 +88,7 @@ export default defineCommand({
|
|
|
88
88
|
}),
|
|
89
89
|
async run({ args }) {
|
|
90
90
|
const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
|
|
91
|
-
await
|
|
91
|
+
await ensureReliverseConfig(isDev, "ts");
|
|
92
92
|
if (args.deps) {
|
|
93
93
|
try {
|
|
94
94
|
const directory = path.resolve(args.directory ?? ".");
|
package/bin/app/cli/cmd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs, { ensuredir } from "@reliverse/relifso";
|
|
2
2
|
import { relinka } from "@reliverse/relinka";
|
|
3
3
|
import { defineCommand } from "@reliverse/rempts";
|
|
4
|
-
import { getOrCreateRseConfig } from "../config/cfg-core.js";
|
|
5
4
|
import { cliName, useLocalhost } from "../config/constants.js";
|
|
5
|
+
import { getOrCreateRseConfig } from "../config/core-cfg.js";
|
|
6
6
|
import { showStartPrompt } from "../init/use-template/cp-modules/cli-main-modules/modules/showStartEndPrompt.js";
|
|
7
7
|
import { authCheck } from "../login/login-impl.js";
|
|
8
8
|
import { getOrCreateReliverseMemory } from "../utils/reliverseMemory.js";
|
package/bin/app/cli/impl.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { callCmd, selectPrompt } from "@reliverse/rempts";
|
|
2
2
|
import { generate } from "random-words";
|
|
3
3
|
import { aiMenu } from "../ai/ai-menu.js";
|
|
4
|
-
import { detectProject } from "../config/cfg-detect.js";
|
|
5
4
|
import { cliJsrPath, UNKNOWN_VALUE } from "../config/constants.js";
|
|
5
|
+
import { detectProject } from "../config/detect.js";
|
|
6
6
|
import { ad, getRandomMessage, getWelcomeTitle, premium } from "../db/messages.js";
|
|
7
7
|
import { showManualBuilderMenu } from "../init/init-utils/init-impl.js";
|
|
8
8
|
import { getMainMenuOptions } from "../init/use-template/cp-modules/cli-main-modules/cli-menu-items/getMainMenuOptions.js";
|
package/bin/app/config/cmd.d.ts
CHANGED
package/bin/app/config/cmd.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { relinka } from "@reliverse/relinka";
|
|
2
2
|
import { defineArgs, defineCommand } from "@reliverse/rempts";
|
|
3
3
|
import { ensureConfigMod } from "./core.js";
|
|
4
|
+
import { ensureReliverseConfig } from "./prepare.js";
|
|
4
5
|
export default defineCommand({
|
|
5
6
|
meta: {
|
|
6
7
|
name: "config",
|
|
@@ -9,7 +10,7 @@ export default defineCommand({
|
|
|
9
10
|
args: defineArgs({
|
|
10
11
|
mode: {
|
|
11
12
|
type: "string",
|
|
12
|
-
description: "Config mode: copy-remote, copy-internal",
|
|
13
|
+
description: "Config mode: copy-remote, copy-internal, create",
|
|
13
14
|
default: "copy-remote"
|
|
14
15
|
},
|
|
15
16
|
tool: {
|
|
@@ -21,17 +22,30 @@ export default defineCommand({
|
|
|
21
22
|
type: "boolean",
|
|
22
23
|
description: "Force update existing configuration",
|
|
23
24
|
default: false
|
|
25
|
+
},
|
|
26
|
+
type: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Config file type: ts (TypeScript) or jsonc (JSON with comments)",
|
|
29
|
+
default: "ts",
|
|
30
|
+
choices: ["ts", "jsonc"]
|
|
24
31
|
}
|
|
25
32
|
}),
|
|
26
33
|
run: async ({ args }) => {
|
|
27
|
-
const { mode, tool, update } = args;
|
|
34
|
+
const { mode, tool, update, type } = args;
|
|
28
35
|
try {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
if (mode === "create") {
|
|
37
|
+
const configKind = type === "jsonc" ? "jsonc" : "ts";
|
|
38
|
+
const isDev = process.env.DLER_DEV_MODE === "true";
|
|
39
|
+
await ensureReliverseConfig(isDev, configKind);
|
|
40
|
+
relinka("success", `New ${configKind.toUpperCase()} configuration file has been created`);
|
|
41
|
+
} else {
|
|
42
|
+
await ensureConfigMod({
|
|
43
|
+
tool,
|
|
44
|
+
mode,
|
|
45
|
+
forceUpdate: update
|
|
46
|
+
});
|
|
47
|
+
relinka("success", `Configuration for ${tool} has been ${update ? "updated" : "created"}`);
|
|
48
|
+
}
|
|
35
49
|
} catch (error) {
|
|
36
50
|
relinka(
|
|
37
51
|
"error",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const PROJECT_ROOT: string;
|
|
2
|
-
export declare const cliVersion = "1.7.
|
|
2
|
+
export declare const cliVersion = "1.7.105";
|
|
3
3
|
export declare const cliName = "@reliverse/rse";
|
|
4
4
|
export declare const rseName = "@reliverse/rse";
|
|
5
5
|
export declare const dlerName = "@reliverse/dler";
|
|
@@ -25,6 +25,7 @@ export declare const useLocalhost = false;
|
|
|
25
25
|
export declare const DEFAULT_CLI_USERNAME = "johnny911";
|
|
26
26
|
export declare const endTitle = "\uD83D\uDCDA Check the docs to learn more: https://docs.reliverse.org/cli";
|
|
27
27
|
export declare const UNKNOWN_VALUE = "unknown";
|
|
28
|
+
export declare const UNKNOWN_STRING = "\"unknown\"";
|
|
28
29
|
export declare const DEFAULT_DOMAIN = "https://example.com";
|
|
29
30
|
export declare const RSE_SCHEMA_DEV = "./schema.json";
|
|
30
31
|
export declare const RSE_SCHEMA_URL = "https://reliverse.org/schema.json";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "@reliverse/pathkit";
|
|
3
3
|
export const PROJECT_ROOT = path.resolve(process.cwd());
|
|
4
|
-
const version = "1.7.
|
|
4
|
+
const version = "1.7.105";
|
|
5
5
|
export const cliVersion = version;
|
|
6
6
|
export const cliName = "@reliverse/rse";
|
|
7
7
|
export const rseName = "@reliverse/rse";
|
|
@@ -28,6 +28,7 @@ export const useLocalhost = false;
|
|
|
28
28
|
export const DEFAULT_CLI_USERNAME = "johnny911";
|
|
29
29
|
export const endTitle = `\u{1F4DA} Check the docs to learn more: ${cliDomainDocs}`;
|
|
30
30
|
export const UNKNOWN_VALUE = "unknown";
|
|
31
|
+
export const UNKNOWN_STRING = `"unknown"`;
|
|
31
32
|
export const DEFAULT_DOMAIN = "https://example.com";
|
|
32
33
|
export const RSE_SCHEMA_DEV = "./schema.json";
|
|
33
34
|
export const RSE_SCHEMA_URL = `${rseOrg}/schema.json`;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import path from "@reliverse/pathkit";
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
|
-
import { createRseConfig } from "./cfg-create.js";
|
|
5
|
-
import { DEFAULT_CONFIG_RSE } from "./cfg-default.js";
|
|
6
|
-
import { getRseConfigPath } from "./cfg-path.js";
|
|
7
|
-
import { readRseConfig } from "./cfg-read.js";
|
|
8
|
-
import { parseAndFixRseConfig } from "./cfg-repair.js";
|
|
9
4
|
import { cliConfigJsonc, cliConfigTs, RSE_SCHEMA_DEV, UNKNOWN_VALUE } from "./constants.js";
|
|
5
|
+
import { createRseConfig } from "./create.js";
|
|
6
|
+
import { DEFAULT_CONFIG_RSE } from "./default-cfg.js";
|
|
7
|
+
import { getRseConfigPath } from "./path.js";
|
|
8
|
+
import { readRseConfig } from "./read.js";
|
|
9
|
+
import { parseAndFixRseConfig } from "./repair.js";
|
|
10
10
|
export async function getOrCreateRseConfig({
|
|
11
11
|
projectPath,
|
|
12
12
|
isDev,
|
|
@@ -27,20 +27,7 @@ async function addDevDependency(pkgName, opts) {
|
|
|
27
27
|
relinka("log", `${pkgName} already present in devDependencies in ${pkgPath}`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
import { injectSectionComments } from "./
|
|
31
|
-
import { generateDefaultRulesForProject, getDefaultRseConfig } from "./cfg-def-utils.js";
|
|
32
|
-
import { DEFAULT_CONFIG_RSE } from "./cfg-default.js";
|
|
33
|
-
import { detectFeatures, getPackageJson } from "./cfg-detect.js";
|
|
34
|
-
import { getRseConfigPath } from "./cfg-path.js";
|
|
35
|
-
import { readRseConfig } from "./cfg-read.js";
|
|
36
|
-
import { rseSchema } from "./cfg-schema.js";
|
|
37
|
-
import {
|
|
38
|
-
atomicWriteFile,
|
|
39
|
-
cleanGitHubUrl,
|
|
40
|
-
getBackupAndTempPaths,
|
|
41
|
-
objectToCodeString,
|
|
42
|
-
updateTsConfigInclude
|
|
43
|
-
} from "./cfg-utils.js";
|
|
30
|
+
import { injectSectionComments } from "./comments.js";
|
|
44
31
|
import {
|
|
45
32
|
cliDomainDocs,
|
|
46
33
|
DEFAULT_DOMAIN,
|
|
@@ -48,6 +35,19 @@ import {
|
|
|
48
35
|
rseName,
|
|
49
36
|
UNKNOWN_VALUE
|
|
50
37
|
} from "./constants.js";
|
|
38
|
+
import { generateDefaultRulesForProject, getDefaultRseConfig } from "./def-utils.js";
|
|
39
|
+
import { DEFAULT_CONFIG_RSE } from "./default-cfg.js";
|
|
40
|
+
import { detectFeatures, getPackageJson } from "./detect.js";
|
|
41
|
+
import { getRseConfigPath } from "./path.js";
|
|
42
|
+
import { readRseConfig } from "./read.js";
|
|
43
|
+
import { rseSchema } from "./schema.js";
|
|
44
|
+
import {
|
|
45
|
+
atomicWriteFile,
|
|
46
|
+
cleanGitHubUrl,
|
|
47
|
+
getBackupAndTempPaths,
|
|
48
|
+
objectToCodeString,
|
|
49
|
+
updateTsConfigInclude
|
|
50
|
+
} from "./utils.js";
|
|
51
51
|
export async function writeRseConfig(configPath, config, isDev, skipInstallPrompt = false, customPathToTypes) {
|
|
52
52
|
if (await fs.pathExists(configPath)) {
|
|
53
53
|
relinka("verbose", `Config file already exists at ${configPath}, skipping creation`);
|
|
@@ -77,11 +77,9 @@ export async function writeRseConfig(configPath, config, isDev, skipInstallPromp
|
|
|
77
77
|
}
|
|
78
78
|
const objectLiteral = objectToCodeString(config, 0);
|
|
79
79
|
const objectLiteralWithComments = injectSectionComments(objectLiteral);
|
|
80
|
-
let importPath;
|
|
80
|
+
let importPath = "./reltypes";
|
|
81
81
|
if (customPathToTypes) {
|
|
82
82
|
importPath = customPathToTypes;
|
|
83
|
-
} else {
|
|
84
|
-
importPath = "./reltypes";
|
|
85
83
|
}
|
|
86
84
|
const fileContent2 = `import { defineConfig } from "${importPath}";
|
|
87
85
|
export default defineConfig(${objectLiteralWithComments});
|
|
@@ -3,14 +3,10 @@ import fs from "@reliverse/relifso";
|
|
|
3
3
|
import { getUserPkgManager, runtimeInfo } from "@reliverse/runtime";
|
|
4
4
|
import { safeDestr } from "destr";
|
|
5
5
|
import { readPackageJSON } from "pkg-types";
|
|
6
|
-
import { getBiomeConfig } from "./
|
|
7
|
-
import { DEFAULT_CONFIG_RSE } from "./cfg-default.js";
|
|
8
|
-
import {
|
|
9
|
-
detectFeatures,
|
|
10
|
-
detectProjectFramework,
|
|
11
|
-
getPackageJsonSafe
|
|
12
|
-
} from "./cfg-detect.js";
|
|
6
|
+
import { getBiomeConfig } from "./biome.js";
|
|
13
7
|
import { cliDomainDocs, DEFAULT_DOMAIN, rseName, UNKNOWN_VALUE } from "./constants.js";
|
|
8
|
+
import { DEFAULT_CONFIG_RSE } from "./default-cfg.js";
|
|
9
|
+
import { detectFeatures, detectProjectFramework, getPackageJsonSafe } from "./detect.js";
|
|
14
10
|
export async function getDefaultRseConfig(projectPath, isDev, projectName, projectAuthor) {
|
|
15
11
|
const packageJson = await getPackageJsonSafe(projectPath);
|
|
16
12
|
const effectiveProjectName = packageJson?.name ?? projectName ?? UNKNOWN_VALUE;
|
|
@@ -2,10 +2,10 @@ import path from "@reliverse/pathkit";
|
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
4
|
import { readPackageJSON } from "pkg-types";
|
|
5
|
-
import { getProjectContent } from "./
|
|
6
|
-
import { PROJECT_FRAMEWORK_FILES } from "./cfg
|
|
7
|
-
import { getRseConfigPath } from "./
|
|
8
|
-
import { readRseConfig } from "./
|
|
5
|
+
import { getProjectContent } from "./content.js";
|
|
6
|
+
import { PROJECT_FRAMEWORK_FILES } from "./default-cfg.js";
|
|
7
|
+
import { getRseConfigPath } from "./path.js";
|
|
8
|
+
import { readRseConfig } from "./read.js";
|
|
9
9
|
export async function detectProjectFramework(projectPath) {
|
|
10
10
|
const packageJson = await getPackageJson(projectPath);
|
|
11
11
|
if (!packageJson) {
|
|
@@ -3,9 +3,9 @@ import fs, { ensuredir } from "@reliverse/relifso";
|
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
4
|
import { destr } from "destr";
|
|
5
5
|
import { execaCommand } from "execa";
|
|
6
|
-
import { generateRseConfig } from "./cfg-create.js";
|
|
7
|
-
import { getRseConfigPath } from "./cfg-path.js";
|
|
8
6
|
import { CONFIG_CATEGORIES, UNKNOWN_VALUE } from "./constants.js";
|
|
7
|
+
import { generateRseConfig } from "./create.js";
|
|
8
|
+
import { getRseConfigPath } from "./path.js";
|
|
9
9
|
async function generateBiomeConfig(projectPath) {
|
|
10
10
|
const biomePath = path.join(projectPath, "biome.json");
|
|
11
11
|
const biomeExists = await fs.pathExists(biomePath);
|
|
@@ -102,9 +102,6 @@ export async function generateConfigFiles(projectPath, overwrite, projectName, d
|
|
|
102
102
|
overwrite,
|
|
103
103
|
isDev,
|
|
104
104
|
configInfo,
|
|
105
|
-
...isDev && configInfo?.isTS ? {
|
|
106
|
-
customPathToTypes: "./src-ts/app/types/mod"
|
|
107
|
-
} : {},
|
|
108
105
|
overrides: {}
|
|
109
106
|
});
|
|
110
107
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "@reliverse/relifso";
|
|
2
2
|
import { relinka } from "@reliverse/relinka";
|
|
3
3
|
import { parseJSONC } from "confbox";
|
|
4
|
-
import { updateRseConfig } from "./
|
|
4
|
+
import { updateRseConfig } from "./update.js";
|
|
5
5
|
export async function migrateRseConfig(externalrseth, projectPath, isDev) {
|
|
6
6
|
try {
|
|
7
7
|
const content = await fs.readFile(externalrseth, "utf-8");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "@reliverse/pathkit";
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
|
-
import { askRseConfigType } from "./cfg-prompts.js";
|
|
4
3
|
import { tsconfigJson } from "./constants.js";
|
|
4
|
+
import { askRseConfigType } from "./prompts.js";
|
|
5
5
|
const configPathCache = /* @__PURE__ */ new Map();
|
|
6
6
|
export async function getRseConfigPath(projectPath, isDev, skipPrompt, customTsconfigPath) {
|
|
7
7
|
const cached = configPathCache.get(projectPath);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare function
|
|
1
|
+
export type ConfigKind = "ts" | "jsonc";
|
|
2
|
+
export declare function ensureReliverseConfig(isDev: boolean, configKind?: ConfigKind): Promise<void>;
|
|
3
|
+
export declare function prepareReliverseEnvironment(isDev: boolean, configKind?: ConfigKind): Promise<void>;
|