@reliverse/dler 1.7.67 → 1.7.69

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/README.md CHANGED
@@ -1,31 +1,26 @@
1
- # 🧬 dler (prev. relidler) build/publish/improve ts/js libs/cli/apps
1
+ # 🧬 dler unified package manager with sweet powers
2
2
 
3
3
  [sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/pb8ukbwpsj) — [github](https://github.com/reliverse/dler) — [npm](https://npmjs.com/@reliverse/dler)
4
4
 
5
- > @reliverse/dler (`/ˈdiː.lər/`, dealer) is your package manager's best friend. dler extends bun, pnpm, yarn, and npm core functionality and goes far beyond.
5
+ > @reliverse/dler (prev. relidler; `/ˈdiː.lər/`, dealer) is a unified package manager for typescript/javascript projects.
6
+ >
7
+ > dler is your package manager's best friend. dler extends bun, pnpm, yarn, and npm core functionalities by going far beyond.
6
8
  >
7
9
  > at its core, dler is a flexible, unified, and fully automated bundler for typescript/javascript projects that doubles as an npm/jsr publishing tool. beyond bundling, dler serves as a comprehensive codemod toolkit for modern typescript/javascript development.
8
10
 
9
11
  ## features
10
12
 
11
- ### 🚀 core power
12
-
13
+ - **built-in bun environment** when dler is installed as a standalone application
13
14
  - **`unjs/unbuild` drop-in** with different powerful capabilities like publishing
14
15
  - **automated publishing** to npm/jsr registries with intelligent workflow management
15
16
  - **reliable builds** with comprehensive typescript/javascript support and error handling
16
17
  - **smart versioning** with automatic version bumps and semantic release integration
17
18
  - **zero configuration** eliminates `package.json` maintenance headaches forever
18
-
19
- ### ⚡ developer experience
20
-
21
19
  - **performance optimized** for speed with modern build pipelines and caching
22
- - **16 built-in commands** — comprehensive [dler commands](#dler-commands) for every workflow
20
+ - **17 built-in commands** — comprehensive [dler commands](#dler-commands) for every workflow
23
21
  - **path resolution magic** converts typescript aliases to relative imports automatically
24
22
  - **highly configurable** via dedicated configuration files with sensible defaults
25
23
  - **dual interface** — cli for everyday use, sdk for advanced programmatic control
26
-
27
- ### 🔧 advanced capabilities
28
-
29
24
  - **clean distribution builds** automatically removes internal logs and debug code
30
25
  - **monorepo ready** with experimental `libs` feature for multi-library projects
31
26
  - **magic spells** — extensible plugin system for custom build transformations
@@ -98,6 +93,7 @@ bun i -g update --latest
98
93
 
99
94
  - **when installed globally**: use `dler` anywhere.
100
95
  - **when installed as dev dep**: use with package manager name prefix, e.g. `bun dler`, inside your project directory.
96
+ - **when installed as standalone**: ...
101
97
 
102
98
  ### 2. prepare your project
103
99
 
@@ -150,7 +146,7 @@ dler [build|pub|--help] # if installed globally
150
146
 
151
147
  ## dler commands
152
148
 
153
- dler ships with a flexible command system (prev. plugins) and **16 built-in commands** (from [reliverse addons](https://reliverse.org/addons) collection).
149
+ dler ships with a flexible command system (prev. plugins) and **17 built-in commands** (from [reliverse addons](https://reliverse.org/addons) collection).
154
150
 
155
151
  feel free to create your own commands. commands can be implemented as built-in directly in `src/app/<command>/impl/*` and then imported from `src/app/<command>/cmd.ts`; or implemented in your own library and then imported from `src/app/<command>/cmd.ts`.
156
152
 
@@ -929,6 +925,10 @@ bun dler update
929
925
  }
930
926
  ```
931
927
 
928
+ **coming soon:**
929
+
930
+ - recursive lookup for deps in multiple package.json files (e.g. monorepo; or case when you have `C:/foo/bar1/package.json` and `C:/foo/bar2/package.json` and using `dler update` in `C:/foo`).
931
+
932
932
  ## related
933
933
 
934
934
  special thanks to the project that inspired `@reliverse/dler`:
@@ -960,6 +960,80 @@ special thanks to the project that inspired `@reliverse/dler`:
960
960
  - [x] allow plugins to extend dler's `defineconfig` (`hooksBeforeBuild` and `hooksAfterBuild` are now available, plugin's options can be passed directly to plugin's params, e.g. `hooksBeforeBuild: [ async () => { await myCoolPlugin({ /* plugin's options */ }); } ],`)
961
961
  - [ ] at the moment any bundler like `mkdist` can be called using `bun`, but bun's own bundler is not yet fully supported
962
962
  - [ ] support all well-known package managers (currently only bun is fully supported)
963
+ - [ ] `dler <command> [...flags] [...args]` usage should support both `bun` and `dler` own commands and flags
964
+
965
+ ### todo: commands
966
+
967
+ - [ ] run ./my-script.ts Execute a file with Bun
968
+ - [ ] lint Run a package.json script
969
+ - [ ] test Run unit tests with Bun
970
+ - [ ] x nuxi Execute a package binary (CLI), installing if needed (dler x)
971
+ - [ ] repl Start a REPL session with Bun
972
+ - [ ] exec Run a shell script directly with Bun
973
+ - [ ] install Install dependencies for a package.json (dler i)
974
+ - [ ] add elysia Add a dependency to package.json (dler a)
975
+ - [ ] remove backbone Remove a dependency from package.json (dler rm)
976
+ - [ ] update @shumai/shumai Update outdated dependencies
977
+ - [ ] audit Check installed packages for vulnerabilities
978
+ - [ ] outdated Display latest versions of outdated dependencies
979
+ - [ ] link [<package>] Register or link a local npm package
980
+ - [ ] unlink Unregister a local npm package
981
+ - [ ] publish Publish a package(s) to the npm/jsr registry
982
+ - [ ] patch <pkg> Prepare a package for patching
983
+ - [ ] pm <subcommand> Additional package management utilities
984
+ - [ ] info hono Display package metadata from the registry
985
+ - [ ] build ./a.ts ./b.jsx Bundle TypeScript & JavaScript into a single file
986
+ - [ ] init Start an empty project from a built-in template
987
+ - [ ] create next-app Create a new project from a template (bun c)
988
+ - [ ] upgrade Upgrade to latest version both of dler and your package manager.
989
+ - [x] <command> --help Print help text for command.
990
+
991
+ ### todo: flag
992
+
993
+ - [ ] --watch Automatically restart the process on file change
994
+ - [ ] --hot Enable auto reload in the Bun runtime, test runner, or bundler
995
+ - [ ] --no-clear-screen Disable clearing the terminal screen on reload when --hot or --watch is enabled
996
+ - [ ] --smol Use less memory, but run garbage collection more often
997
+ - [ ] -r, --preload=<val> Import a module before other modules are loaded
998
+ - [ ] --require=<val> Alias of --preload, for Node.js compatibility
999
+ - [ ] --import=<val> Alias of --preload, for Node.js compatibility
1000
+ - [ ] --inspect=<val> Activate Bun's debugger
1001
+ - [ ] --inspect-wait=<val> Activate Bun's debugger, wait for a connection before executing
1002
+ - [ ] --inspect-brk=<val> Activate Bun's debugger, set breakpoint on first line of code and wait
1003
+ - [ ] --if-present Exit without an error if the entrypoint does not exist
1004
+ - [ ] --no-install Disable auto install in the Bun runtime
1005
+ - [ ] --install=<val> Configure auto-install behavior. One of "auto" (default, auto-installs when no node_modules), "fallback" (missing packages only), "force" (always).
1006
+ - [ ] -i Auto-install dependencies during execution. Equivalent to --install=fallback.
1007
+ - [ ] -e, --eval=<val> Evaluate argument as a script
1008
+ - [ ] -p, --print=<val> Evaluate argument as a script and print the result
1009
+ - [ ] --prefer-offline Skip staleness checks for packages in the Bun runtime and resolve from disk
1010
+ - [ ] --prefer-latest Use the latest matching versions of packages in the Bun runtime, always checking npm
1011
+ - [ ] --port=<val> Set the default port for Bun.serve
1012
+ - [ ] --conditions=<val> Pass custom conditions to resolve
1013
+ - [ ] --fetch-preconnect=<val> Preconnect to a URL while code is loading
1014
+ - [ ] --max-http-header-size=<val> Set the maximum size of HTTP headers in bytes. Default is 16KiB
1015
+ - [ ] --dns-result-order=<val> Set the default order of DNS lookup results. Valid orders: verbatim (default), ipv4first, ipv6first
1016
+ - [ ] --expose-gc Expose gc() on the global object. Has no effect on Bun.gc().
1017
+ - [ ] --no-deprecation Suppress all reporting of the custom deprecation.
1018
+ - [ ] --throw-deprecation Determine whether or not deprecation warnings result in errors.
1019
+ - [ ] --title=<val> Set the process title
1020
+ - [ ] --zero-fill-buffers Boolean to force Buffer.allocUnsafe(size) to be zero-filled.
1021
+ - [ ] --redis-preconnect Preconnect to $REDIS_URL at startup
1022
+ - [ ] --sql-preconnect Preconnect to PostgreSQL at startup
1023
+ - [ ] --no-addons Throw an error if process.dlopen is called, and disable export condition "node-addons"
1024
+ - [ ] --unhandled-rejections=<val> One of "strict", "throw", "warn", "none", or "warn-with-error-code"
1025
+ - [ ] --console-depth=<val> Set the default depth for console.log object inspection (default: 2)
1026
+ - [ ] --silent Don't print the script command
1027
+ - [ ] --elide-lines=<val> Number of lines of script output shown when using --filter (default: 10). Set to 0 to show all lines.
1028
+ - [ ] -v, --version Print version and exit
1029
+ - [ ] --revision Print version with revision and exit
1030
+ - [ ] -F, --filter=<val> Run a script in all workspace packages matching the pattern
1031
+ - [ ] -b, --bun Force a script or package to use Bun's runtime instead of Node.js (via symlinking node)
1032
+ - [ ] --shell=<val> Control the shell used for package.json scripts. Supports either 'bun' or 'system'
1033
+ - [ ] --env-file=<val> Load environment variables from the specified file(s)
1034
+ - [ ] --cwd=<val> Absolute path to resolve files & entry points from. This just changes the process' cwd.
1035
+ - [ ] -c, --config=<val> Specify path to Bun config file. Default $cwd/bunfig.toml
1036
+ - [ ] -h, --help Display this menu and exit
963
1037
 
964
1038
  ## support
965
1039
 
@@ -0,0 +1,47 @@
1
+ /**
2
+ * USAGE EXAMPLES:
3
+ * - dler create react-app - creates a project from template (like bun create, pnpm create)
4
+ * - dler create --mode files - creates files from templates
5
+ * - dler create --mode files --fileType md:README - creates specific file type
6
+ * - dler create --mode files --multiple - creates multiple file types
7
+ */
8
+ declare const _default: import("@reliverse/rempts").Command<{
9
+ template: {
10
+ type: "positional";
11
+ description: string;
12
+ required: false;
13
+ };
14
+ mode: {
15
+ type: "string";
16
+ description: string;
17
+ allowed: string[];
18
+ default: string;
19
+ };
20
+ fileType: {
21
+ type: "string";
22
+ description: string;
23
+ };
24
+ destDir: {
25
+ type: "string";
26
+ description: string;
27
+ default: string;
28
+ };
29
+ multiple: {
30
+ type: "boolean";
31
+ description: string;
32
+ };
33
+ parallel: {
34
+ type: "boolean";
35
+ description: string;
36
+ };
37
+ concurrency: {
38
+ type: "string";
39
+ description: string;
40
+ default: string;
41
+ };
42
+ cwd: {
43
+ type: "string";
44
+ description: string;
45
+ };
46
+ }>;
47
+ export default _default;
@@ -0,0 +1,170 @@
1
+ import { relinka } from "@reliverse/relinka";
2
+ import { defineArgs, defineCommand, multiselectPrompt, selectPrompt } from "@reliverse/rempts";
3
+ import { x } from "../../libs/sdk/sdk-impl/utils/exec/exec-mod.js";
4
+ import { FILE_TYPES } from "../../libs/sdk/sdk-impl/utils/init/init-const.js";
5
+ import { initFile, initFiles } from "../../libs/sdk/sdk-impl/utils/init/init-impl.js";
6
+ import { detectPackageManager } from "../../libs/sdk/sdk-impl/utils/pm/pm-detect.js";
7
+ export default defineCommand({
8
+ meta: {
9
+ name: "create",
10
+ version: "1.1.0",
11
+ description: "Create projects from templates or create files. Usage example: `dler create react-app` or `dler create --mode files`"
12
+ },
13
+ args: defineArgs({
14
+ template: {
15
+ type: "positional",
16
+ description: "Template name for project creation (e.g., react-app, next-app)",
17
+ required: false
18
+ },
19
+ mode: {
20
+ type: "string",
21
+ description: "Mode to use: template (default), files",
22
+ allowed: ["template", "files"],
23
+ default: "template"
24
+ },
25
+ fileType: {
26
+ type: "string",
27
+ description: "File type to create (e.g. 'md:README') - only for files mode"
28
+ },
29
+ destDir: {
30
+ type: "string",
31
+ description: "Destination directory",
32
+ default: "."
33
+ },
34
+ multiple: {
35
+ type: "boolean",
36
+ description: "Whether to select multiple file types from the library - only for files mode"
37
+ },
38
+ parallel: {
39
+ type: "boolean",
40
+ description: "Run tasks in parallel - only for files mode"
41
+ },
42
+ concurrency: {
43
+ type: "string",
44
+ description: "Concurrency limit if parallel is true - only for files mode",
45
+ default: "4"
46
+ },
47
+ cwd: {
48
+ type: "string",
49
+ description: "Current working directory"
50
+ }
51
+ }),
52
+ async run({ args }) {
53
+ const { template, mode, fileType, destDir, multiple, parallel, concurrency, cwd } = args;
54
+ if (mode === "files") {
55
+ await handleFileCreation({ fileType, destDir, multiple, parallel, concurrency });
56
+ } else {
57
+ await handleTemplateCreation({ template, destDir, cwd });
58
+ }
59
+ }
60
+ });
61
+ async function handleFileCreation({
62
+ fileType,
63
+ destDir,
64
+ multiple,
65
+ parallel,
66
+ concurrency
67
+ }) {
68
+ const concurrencyNum = Number(concurrency);
69
+ if (fileType && !FILE_TYPES.find((ft) => ft.type === fileType)) {
70
+ throw new Error(`Invalid file type: ${fileType}`);
71
+ }
72
+ const effectiveFileType = fileType;
73
+ if (multiple) {
74
+ const possibleTypes = FILE_TYPES.map((ft) => ft.type);
75
+ const chosen = await multiselectPrompt({
76
+ title: "Select file types to create",
77
+ options: possibleTypes.map((pt) => ({ label: pt, value: pt }))
78
+ });
79
+ if (chosen.length === 0) {
80
+ relinka("log", "No file types selected. Exiting...");
81
+ return;
82
+ }
83
+ const requests = chosen.map((ct) => ({
84
+ fileType: ct,
85
+ destDir
86
+ }));
87
+ const results = await initFiles(requests, {
88
+ parallel,
89
+ concurrency: concurrencyNum
90
+ });
91
+ relinka("verbose", `Multiple files result: ${JSON.stringify(results)}`);
92
+ } else {
93
+ let finalFileType = effectiveFileType;
94
+ if (!finalFileType) {
95
+ const possibleTypes = FILE_TYPES.map((ft) => ft.type);
96
+ const picked = await selectPrompt({
97
+ title: "Pick a file type to create",
98
+ options: possibleTypes.map((pt) => ({ label: pt, value: pt }))
99
+ });
100
+ finalFileType = picked;
101
+ }
102
+ const result = await initFile({
103
+ fileType: finalFileType,
104
+ destDir
105
+ });
106
+ relinka("verbose", `Single file result: ${JSON.stringify(result)}`);
107
+ }
108
+ }
109
+ async function handleTemplateCreation({
110
+ template,
111
+ destDir,
112
+ cwd
113
+ }) {
114
+ if (!template) {
115
+ relinka.error("Template name is required for template creation");
116
+ relinka.log("Usage: dler create <template-name>");
117
+ relinka.log("Example: dler create react-app");
118
+ return process.exit(1);
119
+ }
120
+ try {
121
+ const workingDir = cwd || process.cwd();
122
+ const packageManager = await detectPackageManager(workingDir);
123
+ if (!packageManager) {
124
+ relinka.error("Cannot detect package manager. Defaulting to bun create.");
125
+ }
126
+ const pmName = packageManager?.name || "bun";
127
+ let createCommand;
128
+ switch (pmName) {
129
+ case "bun":
130
+ createCommand = ["bun", "create", template];
131
+ break;
132
+ case "pnpm":
133
+ createCommand = ["pnpm", "create", template];
134
+ break;
135
+ case "yarn":
136
+ createCommand = ["yarn", "create", template];
137
+ break;
138
+ case "npm":
139
+ createCommand = ["npm", "create", template];
140
+ break;
141
+ default:
142
+ createCommand = ["bun", "create", template];
143
+ break;
144
+ }
145
+ if (destDir !== ".") {
146
+ createCommand.push(destDir);
147
+ }
148
+ relinka.log(`Creating project from template: ${template}`);
149
+ relinka.log(`Using command: ${createCommand.join(" ")}`);
150
+ const result = x(createCommand[0], createCommand.slice(1), {
151
+ nodeOptions: {
152
+ cwd: workingDir,
153
+ stdio: "inherit"
154
+ },
155
+ throwOnError: true
156
+ });
157
+ const output = await result;
158
+ if (output.exitCode === 0) {
159
+ relinka.success(`Successfully created project from template: ${template}`);
160
+ } else {
161
+ relinka.error(`Failed to create project. Exit code: ${output.exitCode}`);
162
+ return process.exit(output.exitCode || 1);
163
+ }
164
+ } catch (error) {
165
+ relinka.error(
166
+ `Failed to create project from template: ${error instanceof Error ? error.message : String(error)}`
167
+ );
168
+ return process.exit(1);
169
+ }
170
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@reliverse/rempts").Command<import("@reliverse/rempts").EmptyArgs>;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { relinka } from "@reliverse/relinka";
2
+ import { defineCommand } from "@reliverse/rempts";
3
+ export default defineCommand({
4
+ meta: {
5
+ name: "init",
6
+ version: "1.0.0",
7
+ description: "Initialize a new project"
8
+ },
9
+ async run() {
10
+ relinka.info(
11
+ "Command not implemented yet. For now, please install `@reliverse/rse` and run `rse cli`."
12
+ );
13
+ }
14
+ });
@@ -0,0 +1,50 @@
1
+ /**
2
+ * USAGE EXAMPLES:
3
+ * - dler install package-name - installs a package
4
+ * - dler install - installs all dependencies
5
+ * - dler dedupe - deduplicates dependencies
6
+ */
7
+ declare const _default: import("@reliverse/rempts").Command<{
8
+ action: {
9
+ type: "string";
10
+ description: string;
11
+ required: false;
12
+ default: string;
13
+ };
14
+ name: {
15
+ type: "positional";
16
+ description: string;
17
+ required: false;
18
+ };
19
+ global: {
20
+ type: "boolean";
21
+ alias: string;
22
+ description: string;
23
+ };
24
+ "frozen-lockfile": {
25
+ type: "boolean";
26
+ description: string;
27
+ };
28
+ cwd: {
29
+ type: "string";
30
+ description: string;
31
+ };
32
+ workspace: {
33
+ type: "boolean";
34
+ description: string;
35
+ };
36
+ silent: {
37
+ type: "boolean";
38
+ description: string;
39
+ };
40
+ recreateLockFile: {
41
+ type: "boolean";
42
+ description: string;
43
+ };
44
+ linter: {
45
+ type: "boolean";
46
+ description: string;
47
+ default: false;
48
+ };
49
+ }>;
50
+ export default _default;
@@ -0,0 +1,83 @@
1
+ import { relinka } from "@reliverse/relinka";
2
+ import { defineArgs, defineCommand } from "@reliverse/rempts";
3
+ import {
4
+ addDependency,
5
+ dedupeDependencies,
6
+ installDependencies
7
+ } from "../../libs/sdk/sdk-impl/utils/pm/pm-api.js";
8
+ export default defineCommand({
9
+ meta: {
10
+ name: "install",
11
+ version: "1.1.0",
12
+ description: "Install dependencies or deduplicate existing ones. Usage example: `dler install package-name` or `dler install` or `dler dedupe`"
13
+ },
14
+ args: defineArgs({
15
+ action: {
16
+ type: "string",
17
+ description: "Action to perform: install, add, i, dedupe",
18
+ required: false,
19
+ default: "install"
20
+ },
21
+ name: {
22
+ type: "positional",
23
+ description: "Package name",
24
+ required: false
25
+ },
26
+ global: {
27
+ type: "boolean",
28
+ alias: "g",
29
+ description: "Add globally"
30
+ },
31
+ "frozen-lockfile": {
32
+ type: "boolean",
33
+ description: "Install dependencies with frozen lock file"
34
+ },
35
+ cwd: {
36
+ type: "string",
37
+ description: "Current working directory"
38
+ },
39
+ workspace: {
40
+ type: "boolean",
41
+ description: "Add to workspace"
42
+ },
43
+ silent: {
44
+ type: "boolean",
45
+ description: "Run in silent mode"
46
+ },
47
+ recreateLockFile: {
48
+ type: "boolean",
49
+ description: "Recreate lock file (for dedupe)"
50
+ },
51
+ linter: {
52
+ type: "boolean",
53
+ description: "Run linter checks after updating dependencies",
54
+ default: false
55
+ }
56
+ }),
57
+ async run({ args }) {
58
+ console.log("DEBUG: install command starting with args:", args);
59
+ const { action, name, linter, ...options } = args;
60
+ switch (action) {
61
+ case "install":
62
+ case "i":
63
+ case "add":
64
+ console.log("DEBUG: install case, name:", name, "options:", options);
65
+ await (name ? addDependency(name, options) : installDependencies(options));
66
+ break;
67
+ case "dedupe": {
68
+ await dedupeDependencies(options);
69
+ break;
70
+ }
71
+ default: {
72
+ if (!action || action === "install") {
73
+ console.log("DEBUG: default install case, name:", name, "options:", options);
74
+ await (name ? addDependency(name, options) : installDependencies(options));
75
+ } else {
76
+ relinka.error(`Unknown action: ${action}`);
77
+ relinka.log("Available actions: install, add, i, dedupe");
78
+ return process.exit(1);
79
+ }
80
+ }
81
+ }
82
+ }
83
+ });
@@ -0,0 +1,42 @@
1
+ /**
2
+ * USAGE EXAMPLES:
3
+ * - dler remove package-name - removes a package
4
+ * - dler rm package-name - removes a package (alias)
5
+ * - dler uninstall package-name - removes a package (alias)
6
+ */
7
+ declare const _default: import("@reliverse/rempts").Command<{
8
+ action: {
9
+ type: "string";
10
+ description: string;
11
+ required: false;
12
+ default: string;
13
+ };
14
+ name: {
15
+ type: "positional";
16
+ description: string;
17
+ required: true;
18
+ };
19
+ global: {
20
+ type: "boolean";
21
+ alias: string;
22
+ description: string;
23
+ };
24
+ cwd: {
25
+ type: "string";
26
+ description: string;
27
+ };
28
+ workspace: {
29
+ type: "boolean";
30
+ description: string;
31
+ };
32
+ silent: {
33
+ type: "boolean";
34
+ description: string;
35
+ };
36
+ linter: {
37
+ type: "boolean";
38
+ description: string;
39
+ default: false;
40
+ };
41
+ }>;
42
+ export default _default;
@@ -0,0 +1,71 @@
1
+ import { relinka } from "@reliverse/relinka";
2
+ import { defineArgs, defineCommand } from "@reliverse/rempts";
3
+ import { removeDependency } from "../../libs/sdk/sdk-impl/utils/pm/pm-api.js";
4
+ export default defineCommand({
5
+ meta: {
6
+ name: "remove",
7
+ version: "1.1.0",
8
+ description: "Remove dependencies. Usage example: `dler remove package-name`"
9
+ },
10
+ args: defineArgs({
11
+ action: {
12
+ type: "string",
13
+ description: "Action to perform: remove, rm, uninstall, un, delete, del",
14
+ required: false,
15
+ default: "remove"
16
+ },
17
+ name: {
18
+ type: "positional",
19
+ description: "Package name",
20
+ required: true
21
+ },
22
+ global: {
23
+ type: "boolean",
24
+ alias: "g",
25
+ description: "Remove globally"
26
+ },
27
+ cwd: {
28
+ type: "string",
29
+ description: "Current working directory"
30
+ },
31
+ workspace: {
32
+ type: "boolean",
33
+ description: "Remove from workspace"
34
+ },
35
+ silent: {
36
+ type: "boolean",
37
+ description: "Run in silent mode"
38
+ },
39
+ linter: {
40
+ type: "boolean",
41
+ description: "Run linter checks after removing dependencies",
42
+ default: false
43
+ }
44
+ }),
45
+ async run({ args }) {
46
+ const { action, name, linter, ...options } = args;
47
+ if (!name) {
48
+ relinka.error("Package name is required for remove action");
49
+ return process.exit(1);
50
+ }
51
+ switch (action) {
52
+ case "remove":
53
+ case "rm":
54
+ case "uninstall":
55
+ case "un":
56
+ case "delete":
57
+ case "del":
58
+ await removeDependency(name, options);
59
+ break;
60
+ default: {
61
+ if (!action || action === "remove") {
62
+ await removeDependency(name, options);
63
+ } else {
64
+ relinka.error(`Unknown action: ${action}`);
65
+ relinka.log("Available actions: remove, rm, uninstall, un, delete, del");
66
+ return process.exit(1);
67
+ }
68
+ }
69
+ }
70
+ }
71
+ });
@@ -47,5 +47,17 @@ declare const _default: import("@reliverse/rempts").Command<{
47
47
  description: string;
48
48
  default: false;
49
49
  };
50
+ linker: {
51
+ type: "string";
52
+ description: string;
53
+ allowed: string[];
54
+ default: string;
55
+ };
56
+ "no-install": {
57
+ type: "boolean";
58
+ description: string;
59
+ default: false;
60
+ alias: string;
61
+ };
50
62
  }>;
51
63
  export default _default;