@reliverse/dler 1.7.58 → 1.7.59
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/cmds.d.ts +1 -0
- package/bin/app/cmds.js +1 -0
- package/bin/app/copy/cmd.d.ts +5 -0
- package/bin/app/copy/cmd.js +21 -3
- package/bin/app/migrate/codemods/anything-bun.js +3 -1
- package/bin/app/rm/cmd.d.ts +13 -0
- package/bin/app/rm/cmd.js +70 -0
- package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-define.d.ts +11 -11
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/utils/vue-dts.js +1 -1
- package/bin/libs/sdk/sdk-impl/config/info.js +1 -1
- package/bin/libs/sdk/sdk-impl/config/init.js +2 -3
- package/package.json +5 -4
package/bin/app/cmds.d.ts
CHANGED
|
@@ -14,3 +14,4 @@ export declare const getRemptsCmd: () => Promise<Command>;
|
|
|
14
14
|
export declare const getRenameCmd: () => Promise<Command>;
|
|
15
15
|
export declare const getMagicCmd: () => Promise<Command>;
|
|
16
16
|
export declare const getSplitCmd: () => Promise<Command>;
|
|
17
|
+
export declare const getRmCmd: () => Promise<Command>;
|
package/bin/app/cmds.js
CHANGED
|
@@ -14,3 +14,4 @@ export const getRemptsCmd = async () => loadCommand("rempts");
|
|
|
14
14
|
export const getRenameCmd = async () => loadCommand("rename");
|
|
15
15
|
export const getMagicCmd = async () => loadCommand("magic");
|
|
16
16
|
export const getSplitCmd = async () => loadCommand("split");
|
|
17
|
+
export const getRmCmd = async () => loadCommand("rm");
|
package/bin/app/copy/cmd.d.ts
CHANGED
package/bin/app/copy/cmd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join, dirname, basename } from "@reliverse/pathkit";
|
|
2
2
|
import { relinka } from "@reliverse/relinka";
|
|
3
3
|
import { defineCommand, selectPrompt, inputPrompt } from "@reliverse/rempts";
|
|
4
|
-
import { copyFile, access, mkdir } from "node:fs/promises";
|
|
4
|
+
import { copyFile, access, mkdir, readFile } from "node:fs/promises";
|
|
5
5
|
import pMap from "p-map";
|
|
6
6
|
import prettyMilliseconds from "pretty-ms";
|
|
7
7
|
import { glob } from "tinyglobby";
|
|
@@ -55,6 +55,11 @@ export default defineCommand({
|
|
|
55
55
|
type: "number",
|
|
56
56
|
description: "Number of concurrent copy operations (default: 8)",
|
|
57
57
|
default: 8
|
|
58
|
+
},
|
|
59
|
+
gitignore: {
|
|
60
|
+
type: "boolean",
|
|
61
|
+
description: "Ignore files and directories specified in .gitignore",
|
|
62
|
+
default: false
|
|
58
63
|
}
|
|
59
64
|
},
|
|
60
65
|
async run({ args }) {
|
|
@@ -64,7 +69,8 @@ export default defineCommand({
|
|
|
64
69
|
recursive = true,
|
|
65
70
|
preserveStructure = true,
|
|
66
71
|
increment = false,
|
|
67
|
-
concurrency = 8
|
|
72
|
+
concurrency = 8,
|
|
73
|
+
gitignore = false
|
|
68
74
|
} = args;
|
|
69
75
|
let finalSource = s;
|
|
70
76
|
let finalDestination = d;
|
|
@@ -84,10 +90,22 @@ export default defineCommand({
|
|
|
84
90
|
relinka("error", "Usage: dler copy --s <source> --d <destination>");
|
|
85
91
|
process.exit(1);
|
|
86
92
|
}
|
|
93
|
+
let ignorePatterns = recursive ? [] : ["**/*"];
|
|
94
|
+
if (gitignore) {
|
|
95
|
+
try {
|
|
96
|
+
const gitignoreContent = await readFile(".gitignore", "utf8");
|
|
97
|
+
ignorePatterns = ignorePatterns.concat(
|
|
98
|
+
gitignoreContent.split("\n").map((line) => line.trim()).filter((line) => line && !line.startsWith("#"))
|
|
99
|
+
);
|
|
100
|
+
} catch (err) {
|
|
101
|
+
relinka("error", ".gitignore not found or unreadable, but --gitignore was specified.");
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
87
105
|
try {
|
|
88
106
|
const files = await glob(finalSource, {
|
|
89
107
|
dot: true,
|
|
90
|
-
ignore:
|
|
108
|
+
ignore: ignorePatterns
|
|
91
109
|
});
|
|
92
110
|
if (files.length === 0) {
|
|
93
111
|
relinka("error", `No files found matching pattern: ${finalSource}`);
|
|
@@ -101,7 +101,9 @@ const analyzeProject = async (projectRoot) => {
|
|
|
101
101
|
framework,
|
|
102
102
|
dependencies,
|
|
103
103
|
devDependencies,
|
|
104
|
-
scripts:
|
|
104
|
+
scripts: Object.fromEntries(
|
|
105
|
+
Object.entries(packageJson.scripts || {}).filter(([, v]) => typeof v === "string")
|
|
106
|
+
),
|
|
105
107
|
configFiles,
|
|
106
108
|
sourceFiles,
|
|
107
109
|
testFiles
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("@reliverse/rempts").Command<{
|
|
2
|
+
target: {
|
|
3
|
+
type: "string";
|
|
4
|
+
description: string;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
nonInteractive: {
|
|
8
|
+
type: "boolean";
|
|
9
|
+
description: string;
|
|
10
|
+
default: false;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import path from "@reliverse/pathkit";
|
|
2
|
+
import fs from "@reliverse/relifso";
|
|
3
|
+
import { relinka } from "@reliverse/relinka";
|
|
4
|
+
import { defineArgs, defineCommand, inputPrompt } from "@reliverse/rempts";
|
|
5
|
+
import { glob } from "tinyglobby";
|
|
6
|
+
export default defineCommand({
|
|
7
|
+
meta: {
|
|
8
|
+
name: "rm",
|
|
9
|
+
version: "1.1.0",
|
|
10
|
+
description: "Remove a file, directory, or glob pattern recursively."
|
|
11
|
+
},
|
|
12
|
+
args: defineArgs({
|
|
13
|
+
target: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "Path or glob pattern to the file(s) or directory(ies) to remove.",
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
nonInteractive: {
|
|
19
|
+
type: "boolean",
|
|
20
|
+
description: "Disable interactive prompts and require all arguments to be provided via flags.",
|
|
21
|
+
default: false
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
async run({ args }) {
|
|
25
|
+
const { nonInteractive } = args;
|
|
26
|
+
let { target } = args;
|
|
27
|
+
if (!target && !nonInteractive) {
|
|
28
|
+
target = await inputPrompt({
|
|
29
|
+
title: "Enter the path or glob pattern to remove:",
|
|
30
|
+
defaultValue: ""
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (!target) {
|
|
34
|
+
relinka("error", "No target path or pattern provided for removal.");
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
let matches = [];
|
|
38
|
+
try {
|
|
39
|
+
matches = await glob(target, { dot: true });
|
|
40
|
+
} catch (error) {
|
|
41
|
+
relinka("error", `Invalid glob pattern: ${target}`);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (matches.length === 0) {
|
|
45
|
+
relinka("error", `No files or directories matched: ${target}`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
let removedCount = 0;
|
|
49
|
+
for (const match of matches) {
|
|
50
|
+
const resolvedPath = path.resolve(match);
|
|
51
|
+
try {
|
|
52
|
+
if (!await fs.pathExists(resolvedPath)) {
|
|
53
|
+
relinka("warn", `Target does not exist: ${resolvedPath}`);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
await fs.remove(resolvedPath);
|
|
57
|
+
relinka("log", `Removed: ${resolvedPath}`);
|
|
58
|
+
removedCount++;
|
|
59
|
+
} catch (error) {
|
|
60
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
61
|
+
relinka("error", `Failed to remove '${resolvedPath}': ${errorMessage}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (removedCount > 0) {
|
|
65
|
+
relinka("log", `Successfully removed ${removedCount} item(s) matching: ${target}`);
|
|
66
|
+
} else {
|
|
67
|
+
relinka("warn", `No items were removed for pattern: ${target}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
@@ -10,15 +10,14 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
10
10
|
projectDomain?: string | undefined;
|
|
11
11
|
projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
|
|
12
12
|
projectDeployService?: "none" | "vercel" | "netlify" | "railway" | "deno" | undefined;
|
|
13
|
-
projectPackageManager?: "bun" | "npm" | "
|
|
13
|
+
projectPackageManager?: "bun" | "npm" | "pnpm" | "yarn" | undefined;
|
|
14
14
|
projectState?: "created" | "creating" | undefined;
|
|
15
15
|
projectCategory?: "browser" | "cli" | "unknown" | "website" | "vscode" | "library" | "mobile" | undefined;
|
|
16
16
|
projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
|
|
17
|
-
projectFramework?: "
|
|
17
|
+
projectFramework?: "vue" | "svelte" | "npm-jsr" | "unknown" | "vscode" | "nextjs" | "vite" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "rempts" | "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
|
-
commands?: string[] | undefined;
|
|
22
21
|
i18n?: boolean | undefined;
|
|
23
22
|
analytics?: boolean | undefined;
|
|
24
23
|
themeMode?: "light" | "dark" | "dark-light" | undefined;
|
|
@@ -28,6 +27,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
28
27
|
testing?: boolean | undefined;
|
|
29
28
|
docker?: boolean | undefined;
|
|
30
29
|
ci?: boolean | undefined;
|
|
30
|
+
commands?: string[] | undefined;
|
|
31
31
|
webview?: string[] | undefined;
|
|
32
32
|
language?: string[] | undefined;
|
|
33
33
|
themes?: string[] | undefined;
|
|
@@ -38,13 +38,13 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
38
38
|
analytics?: "unknown" | "vercel" | undefined;
|
|
39
39
|
authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
|
|
40
40
|
api?: "rest" | "unknown" | "hono" | "trpc" | "graphql" | undefined;
|
|
41
|
-
testing?: "bun" | "
|
|
41
|
+
testing?: "bun" | "jest" | "vitest" | "unknown" | "playwright" | "cypress" | undefined;
|
|
42
42
|
stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
|
|
43
43
|
formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
|
|
44
|
-
styling?: "unknown" | "tailwind" | "styled-components" | "css-modules" |
|
|
44
|
+
styling?: "sass" | "unknown" | "tailwind" | "styled-components" | "css-modules" | undefined;
|
|
45
45
|
uiComponents?: "unknown" | "shadcn-ui" | "chakra-ui" | "material-ui" | undefined;
|
|
46
46
|
databaseLibrary?: "unknown" | "drizzle" | "prisma" | "supabase" | undefined;
|
|
47
|
-
databaseProvider?: "
|
|
47
|
+
databaseProvider?: "pg" | "sqlite" | "unknown" | "mysql" | "mongodb" | undefined;
|
|
48
48
|
linting?: "eslint" | "unknown" | undefined;
|
|
49
49
|
formatting?: "biome" | "unknown" | undefined;
|
|
50
50
|
payment?: "unknown" | "stripe" | undefined;
|
|
@@ -57,7 +57,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
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;
|
|
@@ -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;
|
|
@@ -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" | "bun" | "
|
|
99
|
+
type?: "none" | "bun" | "turborepo" | "nx" | "pnpm" | undefined;
|
|
100
100
|
packages?: string[] | undefined;
|
|
101
101
|
sharedPackages?: string[] | undefined;
|
|
102
102
|
} | undefined;
|
|
@@ -111,7 +111,7 @@ 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?: "private" | "public" | "unknown" | undefined;
|
|
115
115
|
projectArchitecture?: "unknown" | "fullstack" | "separated" | undefined;
|
|
116
116
|
projectRuntime?: "bun" | "node" | "deno" | undefined;
|
|
117
117
|
skipPromptsUseAutoBehavior?: boolean | undefined;
|
|
@@ -73,7 +73,6 @@ function getPublishArtifacts(isDev) {
|
|
|
73
73
|
function getFilterDepsPatterns(isDev) {
|
|
74
74
|
return isDev ? `{
|
|
75
75
|
global: [
|
|
76
|
-
"bun",
|
|
77
76
|
"@types",
|
|
78
77
|
"biome",
|
|
79
78
|
"eslint",
|
|
@@ -86,10 +85,10 @@ function getFilterDepsPatterns(isDev) {
|
|
|
86
85
|
"!@reliverse/dler-sdk",
|
|
87
86
|
],
|
|
88
87
|
"dist-npm": [],
|
|
89
|
-
"dist-jsr": [],
|
|
88
|
+
"dist-jsr": ["+bun"],
|
|
90
89
|
"dist-libs": {
|
|
91
90
|
"@reliverse/dler-sdk": {
|
|
92
|
-
jsr: ["
|
|
91
|
+
jsr: ["+bun"],
|
|
93
92
|
npm: [],
|
|
94
93
|
},
|
|
95
94
|
},
|
package/package.json
CHANGED
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
15
15
|
"@rollup/plugin-replace": "^6.0.2",
|
|
16
16
|
"@rollup/pluginutils": "^5.2.0",
|
|
17
|
-
"@sinclair/typebox": "^0.34.
|
|
17
|
+
"@sinclair/typebox": "^0.34.37",
|
|
18
18
|
"autoprefixer": "^10.4.21",
|
|
19
|
+
"bun-plugin-tailwind": "^0.0.15",
|
|
19
20
|
"c12": "^3.0.4",
|
|
20
21
|
"confbox": "^0.2.2",
|
|
21
22
|
"cssnano": "^7.0.7",
|
|
@@ -34,12 +35,12 @@
|
|
|
34
35
|
"nypm": "^0.6.0",
|
|
35
36
|
"p-all": "^5.0.0",
|
|
36
37
|
"p-map": "^7.0.3",
|
|
37
|
-
"pkg-types": "^2.
|
|
38
|
+
"pkg-types": "^2.2.0",
|
|
38
39
|
"postcss": "^8.5.6",
|
|
39
40
|
"postcss-nested": "^7.0.2",
|
|
40
41
|
"pretty-bytes": "^7.0.0",
|
|
41
42
|
"pretty-ms": "^9.2.0",
|
|
42
|
-
"rollup": "^4.44.
|
|
43
|
+
"rollup": "^4.44.1",
|
|
43
44
|
"rollup-plugin-dts": "^6.2.1",
|
|
44
45
|
"scule": "^1.3.0",
|
|
45
46
|
"semver": "^7.7.2",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"license": "MIT",
|
|
54
55
|
"name": "@reliverse/dler",
|
|
55
56
|
"type": "module",
|
|
56
|
-
"version": "1.7.
|
|
57
|
+
"version": "1.7.59",
|
|
57
58
|
"keywords": [
|
|
58
59
|
"reliverse",
|
|
59
60
|
"cli",
|