@reliverse/dler 1.7.61 → 1.7.63
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/x/cmd.js +12 -2
- 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 +13 -13
- package/bin/libs/sdk/sdk-impl/config/info.js +1 -1
- package/bin/libs/sdk/sdk-impl/utils/pm/pm-api.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/utils/pm/pm-api.js +1 -6
- package/package.json +1 -1
package/bin/app/x/cmd.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import path from "@reliverse/pathkit";
|
|
2
2
|
import { relinka } from "@reliverse/relinka";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
defineArgs,
|
|
5
|
+
defineCommand,
|
|
6
|
+
multiselectPrompt,
|
|
7
|
+
runCmd,
|
|
8
|
+
selectPrompt
|
|
9
|
+
} from "@reliverse/rempts";
|
|
10
|
+
import { getCheckCmd } from "../cmds.js";
|
|
4
11
|
import { x } from "../../libs/sdk/sdk-impl/utils/exec/exec-mod.js";
|
|
5
12
|
import { FILE_TYPES } from "../../libs/sdk/sdk-impl/utils/init/init-const.js";
|
|
6
13
|
import { initFile, initFiles } from "../../libs/sdk/sdk-impl/utils/init/init-impl.js";
|
|
@@ -247,7 +254,10 @@ export default defineCommand({
|
|
|
247
254
|
break;
|
|
248
255
|
}
|
|
249
256
|
case "latest": {
|
|
250
|
-
await updateDependencies(true,
|
|
257
|
+
await updateDependencies(true, options);
|
|
258
|
+
if (linter) {
|
|
259
|
+
await runCmd(await getCheckCmd(), ["--no-exit", "--no-progress"]);
|
|
260
|
+
}
|
|
251
261
|
break;
|
|
252
262
|
}
|
|
253
263
|
default: {
|
|
@@ -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) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { RseConfig } from "./rse-types";
|
|
2
2
|
export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
3
|
+
version?: string | undefined;
|
|
3
4
|
$schema?: "./schema.json" | "https://reliverse.org/schema.json" | undefined;
|
|
4
5
|
projectName?: string | undefined;
|
|
5
6
|
projectAuthor?: string | undefined;
|
|
6
7
|
projectDescription?: string | undefined;
|
|
7
|
-
version?: string | undefined;
|
|
8
8
|
projectLicense?: string | undefined;
|
|
9
9
|
projectRepository?: string | undefined;
|
|
10
10
|
projectDomain?: string | undefined;
|
|
11
11
|
projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
|
|
12
12
|
projectDeployService?: "none" | "vercel" | "netlify" | "railway" | "deno" | undefined;
|
|
13
|
-
projectPackageManager?: "
|
|
13
|
+
projectPackageManager?: "bun" | "pnpm" | "npm" | "yarn" | undefined;
|
|
14
14
|
projectState?: "creating" | "created" | undefined;
|
|
15
15
|
projectCategory?: "browser" | "cli" | "unknown" | "website" | "vscode" | "library" | "mobile" | undefined;
|
|
16
16
|
projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
|
|
17
|
-
projectFramework?: "rempts" | "npm-jsr" | "vue" | "
|
|
17
|
+
projectFramework?: "rempts" | "npm-jsr" | "vue" | "svelte" | "unknown" | "vscode" | "nextjs" | "vite" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "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?: {
|
|
@@ -33,31 +33,31 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
33
33
|
themes?: string[] | undefined;
|
|
34
34
|
} | undefined;
|
|
35
35
|
preferredLibraries?: {
|
|
36
|
+
search?: "unknown" | "algolia" | undefined;
|
|
36
37
|
i18n?: "unknown" | "next-intl" | undefined;
|
|
37
38
|
analytics?: "unknown" | "vercel" | undefined;
|
|
38
39
|
authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
|
|
39
40
|
api?: "unknown" | "hono" | "trpc" | "graphql" | "rest" | undefined;
|
|
40
|
-
testing?: "bun" | "
|
|
41
|
+
testing?: "bun" | "jest" | "vitest" | "unknown" | "playwright" | "cypress" | undefined;
|
|
41
42
|
stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
|
|
42
43
|
formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
|
|
43
|
-
styling?: "
|
|
44
|
+
styling?: "unknown" | "tailwind" | "styled-components" | "css-modules" | "sass" | undefined;
|
|
44
45
|
uiComponents?: "unknown" | "shadcn-ui" | "chakra-ui" | "material-ui" | undefined;
|
|
45
46
|
databaseLibrary?: "unknown" | "drizzle" | "prisma" | "supabase" | undefined;
|
|
46
|
-
databaseProvider?: "
|
|
47
|
-
linting?: "
|
|
48
|
-
formatting?: "
|
|
47
|
+
databaseProvider?: "pg" | "unknown" | "mysql" | "sqlite" | "mongodb" | undefined;
|
|
48
|
+
linting?: "unknown" | "eslint" | undefined;
|
|
49
|
+
formatting?: "unknown" | "biome" | undefined;
|
|
49
50
|
payment?: "unknown" | "stripe" | undefined;
|
|
50
51
|
monitoring?: "unknown" | "sentry" | undefined;
|
|
51
52
|
logging?: "unknown" | "axiom" | undefined;
|
|
52
53
|
forms?: "unknown" | "react-hook-form" | undefined;
|
|
53
54
|
notifications?: "unknown" | "sonner" | undefined;
|
|
54
|
-
search?: "unknown" | "algolia" | undefined;
|
|
55
55
|
uploads?: "unknown" | "uploadthing" | undefined;
|
|
56
56
|
validation?: "unknown" | "zod" | "typebox" | "valibot" | undefined;
|
|
57
57
|
documentation?: "unknown" | "starlight" | "nextra" | undefined;
|
|
58
58
|
icons?: "unknown" | "lucide" | undefined;
|
|
59
59
|
mail?: "unknown" | "resend" | undefined;
|
|
60
|
-
cache?: "
|
|
60
|
+
cache?: "redis" | "unknown" | undefined;
|
|
61
61
|
storage?: "unknown" | "cloudflare" | undefined;
|
|
62
62
|
cdn?: "unknown" | "cloudflare" | undefined;
|
|
63
63
|
cms?: "unknown" | "contentlayer" | undefined;
|
|
@@ -67,7 +67,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
67
67
|
dates?: "unknown" | "dayjs" | undefined;
|
|
68
68
|
markdown?: "unknown" | "mdx" | undefined;
|
|
69
69
|
security?: "unknown" | "auth" | undefined;
|
|
70
|
-
routing?: "
|
|
70
|
+
routing?: "next" | "unknown" | "react-router" | "tanstack-router" | undefined;
|
|
71
71
|
} | undefined;
|
|
72
72
|
codeStyle?: {
|
|
73
73
|
lineWidth?: number | 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;
|
|
@@ -83,7 +83,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
83
83
|
dontRemoveComments?: boolean | undefined;
|
|
84
84
|
shouldAddComments?: boolean | undefined;
|
|
85
85
|
typeOrInterface?: "type" | "interface" | "mixed" | undefined;
|
|
86
|
-
importOrRequire?: "
|
|
86
|
+
importOrRequire?: "import" | "require" | "mixed" | undefined;
|
|
87
87
|
cjsToEsm?: boolean | undefined;
|
|
88
88
|
modernize?: {
|
|
89
89
|
replaceFs?: boolean | undefined;
|
|
@@ -72,7 +72,7 @@ export declare function ensureDependencyInstalled(name: string, options?: Pick<O
|
|
|
72
72
|
export declare function dedupeDependencies(options?: Pick<OperationOptions, "cwd" | "silent" | "packageManager"> & {
|
|
73
73
|
recreateLockfile?: boolean;
|
|
74
74
|
}): Promise<void>;
|
|
75
|
-
export declare function updateDependencies(latest?: boolean,
|
|
75
|
+
export declare function updateDependencies(latest?: boolean, options?: OperationOptions): Promise<void>;
|
|
76
76
|
/**
|
|
77
77
|
* Runs a script defined in the package.json file.
|
|
78
78
|
*
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { resolve } from "@reliverse/pathkit";
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
|
-
import { runCmd } from "@reliverse/rempts";
|
|
4
3
|
import { readPackageJSON } from "pkg-types";
|
|
5
|
-
import { getCheckCmd } from "../../../../../app/cmds.js";
|
|
6
4
|
import {
|
|
7
5
|
executeCommand,
|
|
8
6
|
resolveOperationOptions,
|
|
@@ -149,7 +147,7 @@ export async function dedupeDependencies(options = {}) {
|
|
|
149
147
|
}
|
|
150
148
|
throw new Error(`Deduplication is not supported for ${resolvedOptions.packageManager.name}`);
|
|
151
149
|
}
|
|
152
|
-
export async function updateDependencies(latest = true,
|
|
150
|
+
export async function updateDependencies(latest = true, options = {}) {
|
|
153
151
|
const resolvedOptions = await resolveOperationOptions(options);
|
|
154
152
|
await executeCommand(
|
|
155
153
|
resolvedOptions.packageManager.command,
|
|
@@ -159,9 +157,6 @@ export async function updateDependencies(latest = true, linter = false, options
|
|
|
159
157
|
silent: resolvedOptions.silent
|
|
160
158
|
}
|
|
161
159
|
);
|
|
162
|
-
if (linter) {
|
|
163
|
-
await runCmd(await getCheckCmd(), ["--no-exit", "--no-progress"]);
|
|
164
|
-
}
|
|
165
160
|
}
|
|
166
161
|
export async function runScript(name, options = {}) {
|
|
167
162
|
const resolvedOptions = await resolveOperationOptions(options);
|