@reliverse/dler 1.7.62 → 1.7.64
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/libs/cfg/cfg-impl/rse-config/rse-impl/rse-create.js +25 -4
- package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-define.d.ts +14 -14
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.js +260 -286
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/make.js +183 -193
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-mod.js +76 -91
- package/bin/libs/sdk/sdk-impl/config/info.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,28 @@ import { relinka } from "@reliverse/relinka";
|
|
|
4
4
|
import { confirmPrompt } from "@reliverse/rempts";
|
|
5
5
|
import { Value } from "@sinclair/typebox/value";
|
|
6
6
|
import { execaCommand } from "execa";
|
|
7
|
-
|
|
7
|
+
async function addDevDependency(pkgName, opts) {
|
|
8
|
+
const pkgPath = path.join(opts.cwd, "package.json");
|
|
9
|
+
let pkg;
|
|
10
|
+
try {
|
|
11
|
+
const { readPackageJSON } = await import("pkg-types");
|
|
12
|
+
pkg = await readPackageJSON(pkgPath);
|
|
13
|
+
} catch {
|
|
14
|
+
if (await fs.pathExists(pkgPath)) {
|
|
15
|
+
pkg = JSON.parse(await fs.readFile(pkgPath, "utf8"));
|
|
16
|
+
} else {
|
|
17
|
+
pkg = {};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (!pkg.devDependencies) pkg.devDependencies = {};
|
|
21
|
+
if (!pkg.devDependencies[pkgName]) {
|
|
22
|
+
pkg.devDependencies[pkgName] = "latest";
|
|
23
|
+
await fs.writeFile(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
24
|
+
relinka("log", `Added ${pkgName} to devDependencies in ${pkgPath}`);
|
|
25
|
+
} else {
|
|
26
|
+
relinka("log", `${pkgName} already present in devDependencies in ${pkgPath}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
8
29
|
import { injectSectionComments } from "./rse-comments.js";
|
|
9
30
|
import { cliDomainDocs } from "./rse-consts.js";
|
|
10
31
|
import { UNKNOWN_VALUE, rseName, DEFAULT_DOMAIN, RSE_SCHEMA_DEV } from "./rse-consts.js";
|
|
@@ -56,7 +77,7 @@ export async function writeRseConfig(configPath, config, isDev, skipInstallPromp
|
|
|
56
77
|
} else if (isDev) {
|
|
57
78
|
importPath = "~/mod";
|
|
58
79
|
} else {
|
|
59
|
-
importPath = "@reliverse/
|
|
80
|
+
importPath = "@reliverse/cfg";
|
|
60
81
|
}
|
|
61
82
|
const fileContent2 = `import { defineConfigRse } from "${importPath}";
|
|
62
83
|
export default defineConfigRse(${objectLiteralWithComments});
|
|
@@ -64,12 +85,12 @@ export default defineConfigRse(${objectLiteralWithComments});
|
|
|
64
85
|
await atomicWriteFile(configPath, fileContent2, backupPath2, tempPath2);
|
|
65
86
|
await updateTsConfigInclude(path.dirname(configPath));
|
|
66
87
|
if (!isDev && !skipInstallPrompt) {
|
|
67
|
-
await addDevDependency("@reliverse/
|
|
88
|
+
await addDevDependency("@reliverse/cfg", {
|
|
68
89
|
cwd: path.dirname(configPath)
|
|
69
90
|
});
|
|
70
91
|
relinka("verbose", "TS config written successfully");
|
|
71
92
|
const shouldRunInstall = await confirmPrompt({
|
|
72
|
-
title: "Run `bun install` now to install '@reliverse/
|
|
93
|
+
title: "Run `bun install` now to install '@reliverse/cfg'?",
|
|
73
94
|
defaultValue: true
|
|
74
95
|
});
|
|
75
96
|
if (shouldRunInstall) {
|
|
@@ -10,16 +10,15 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
10
10
|
projectDomain?: string | undefined;
|
|
11
11
|
projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
|
|
12
12
|
projectDeployService?: "none" | "deno" | "vercel" | "netlify" | "railway" | undefined;
|
|
13
|
-
projectPackageManager?: "npm" | "
|
|
14
|
-
projectState?: "
|
|
15
|
-
projectCategory?: "
|
|
13
|
+
projectPackageManager?: "npm" | "yarn" | "pnpm" | "bun" | undefined;
|
|
14
|
+
projectState?: "creating" | "created" | undefined;
|
|
15
|
+
projectCategory?: "cli" | "unknown" | "website" | "vscode" | "browser" | "library" | "mobile" | undefined;
|
|
16
16
|
projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
|
|
17
|
-
projectFramework?: "rempts" | "npm-jsr" | "
|
|
17
|
+
projectFramework?: "rempts" | "npm-jsr" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "vue" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | undefined;
|
|
18
18
|
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;
|
|
19
19
|
projectTemplateDate?: string | undefined;
|
|
20
20
|
features?: {
|
|
21
21
|
commands?: string[] | undefined;
|
|
22
|
-
ci?: boolean | undefined;
|
|
23
22
|
i18n?: boolean | undefined;
|
|
24
23
|
analytics?: boolean | undefined;
|
|
25
24
|
themeMode?: "light" | "dark" | "dark-light" | undefined;
|
|
@@ -28,6 +27,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
28
27
|
database?: boolean | undefined;
|
|
29
28
|
testing?: boolean | undefined;
|
|
30
29
|
docker?: boolean | undefined;
|
|
30
|
+
ci?: boolean | undefined;
|
|
31
31
|
webview?: string[] | undefined;
|
|
32
32
|
language?: string[] | undefined;
|
|
33
33
|
themes?: string[] | undefined;
|
|
@@ -37,16 +37,16 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
37
37
|
i18n?: "unknown" | "next-intl" | undefined;
|
|
38
38
|
analytics?: "unknown" | "vercel" | undefined;
|
|
39
39
|
authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
|
|
40
|
-
api?: "
|
|
40
|
+
api?: "unknown" | "hono" | "trpc" | "graphql" | "rest" | undefined;
|
|
41
41
|
testing?: "bun" | "unknown" | "vitest" | "jest" | "playwright" | "cypress" | undefined;
|
|
42
42
|
stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
|
|
43
43
|
formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
|
|
44
|
-
styling?: "
|
|
44
|
+
styling?: "unknown" | "tailwind" | "styled-components" | "css-modules" | "sass" | undefined;
|
|
45
45
|
uiComponents?: "unknown" | "shadcn-ui" | "chakra-ui" | "material-ui" | undefined;
|
|
46
46
|
databaseLibrary?: "unknown" | "drizzle" | "prisma" | "supabase" | undefined;
|
|
47
|
-
databaseProvider?: "
|
|
48
|
-
linting?: "
|
|
49
|
-
formatting?: "
|
|
47
|
+
databaseProvider?: "unknown" | "pg" | "mysql" | "sqlite" | "mongodb" | undefined;
|
|
48
|
+
linting?: "unknown" | "eslint" | undefined;
|
|
49
|
+
formatting?: "unknown" | "biome" | undefined;
|
|
50
50
|
payment?: "unknown" | "stripe" | undefined;
|
|
51
51
|
monitoring?: "unknown" | "sentry" | undefined;
|
|
52
52
|
logging?: "unknown" | "axiom" | undefined;
|
|
@@ -75,7 +75,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
75
75
|
indentStyle?: "space" | "tab" | undefined;
|
|
76
76
|
quoteMark?: "single" | "double" | undefined;
|
|
77
77
|
semicolons?: boolean | undefined;
|
|
78
|
-
trailingComma?: "none" | "
|
|
78
|
+
trailingComma?: "none" | "es5" | "all" | undefined;
|
|
79
79
|
bracketSpacing?: boolean | undefined;
|
|
80
80
|
arrowParens?: "always" | "avoid" | undefined;
|
|
81
81
|
tabWidth?: number | undefined;
|
|
@@ -96,7 +96,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
96
96
|
importSymbol?: string | undefined;
|
|
97
97
|
} | undefined;
|
|
98
98
|
monorepo?: {
|
|
99
|
-
type?: "none" | "
|
|
99
|
+
type?: "none" | "pnpm" | "bun" | "turborepo" | "nx" | undefined;
|
|
100
100
|
packages?: string[] | undefined;
|
|
101
101
|
sharedPackages?: string[] | undefined;
|
|
102
102
|
} | undefined;
|
|
@@ -111,9 +111,9 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
111
111
|
customReposOnNewProject?: boolean | undefined;
|
|
112
112
|
envComposerOpenBrowser?: boolean | undefined;
|
|
113
113
|
repoBranch?: string | undefined;
|
|
114
|
-
repoPrivacy?: "
|
|
114
|
+
repoPrivacy?: "unknown" | "public" | "private" | undefined;
|
|
115
115
|
projectArchitecture?: "unknown" | "fullstack" | "separated" | undefined;
|
|
116
|
-
projectRuntime?: "
|
|
116
|
+
projectRuntime?: "bun" | "deno" | "node" | undefined;
|
|
117
117
|
skipPromptsUseAutoBehavior?: boolean | undefined;
|
|
118
118
|
deployBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
|
|
119
119
|
depsBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
|