@reliverse/dler 1.7.68 → 1.7.70

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.
Files changed (84) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +148 -98
  3. package/bin/app/build/cmd.js +0 -2
  4. package/bin/app/cmds.d.ts +1 -0
  5. package/bin/app/cmds.js +1 -0
  6. package/bin/app/create/cmd.d.ts +47 -0
  7. package/bin/app/create/cmd.js +170 -0
  8. package/bin/app/get/cmd.d.ts +1 -0
  9. package/bin/app/get/cmd.js +1 -0
  10. package/bin/app/init/cmd.d.ts +2 -0
  11. package/bin/app/init/cmd.js +14 -0
  12. package/bin/app/install/cmd.d.ts +50 -0
  13. package/bin/app/install/cmd.js +83 -0
  14. package/bin/app/remove/cmd.d.ts +48 -0
  15. package/bin/app/remove/cmd.js +255 -0
  16. package/bin/app/update/cmd.d.ts +11 -0
  17. package/bin/app/update/cmd.js +277 -2
  18. package/bin/app/upgrade/cmd.d.ts +8 -0
  19. package/bin/app/upgrade/cmd.js +295 -0
  20. package/bin/app/x/cmd.d.ts +18 -31
  21. package/bin/app/x/cmd.js +133 -137
  22. package/bin/cli.js +16 -10
  23. package/bin/libs/cfg/cfg-impl/cfg-consts.d.ts +1 -1
  24. package/bin/libs/cfg/cfg-impl/cfg-consts.js +1 -1
  25. package/bin/libs/cfg/cfg-mod.d.ts +1 -23
  26. package/bin/libs/cfg/cfg-mod.js +1 -85
  27. package/bin/libs/get/mod.d.ts +37 -0
  28. package/bin/libs/get/mod.js +509 -0
  29. package/bin/libs/sdk/sdk-impl/config/default.d.ts +1 -1
  30. package/bin/libs/sdk/sdk-impl/config/default.js +1 -1
  31. package/bin/libs/sdk/sdk-impl/config/info.js +1 -1
  32. package/bin/libs/sdk/sdk-impl/config/init.d.ts +1 -0
  33. package/bin/libs/sdk/sdk-impl/config/init.js +98 -5
  34. package/bin/libs/sdk/sdk-impl/config/load.js +4 -4
  35. package/bin/libs/sdk/sdk-impl/utils/exec/exec-mod.js +0 -8
  36. package/bin/libs/sdk/sdk-mod.d.ts +1 -1
  37. package/bin/libs/sdk/sdk-mod.js +1 -1
  38. package/bin/mod.d.ts +1 -1
  39. package/bin/mod.js +1 -1
  40. package/package.json +3 -9
  41. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-biome.d.ts +0 -2
  42. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-biome.js +0 -34
  43. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-comments.d.ts +0 -1
  44. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-comments.js +0 -57
  45. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-consts.d.ts +0 -34
  46. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-consts.js +0 -36
  47. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-content.d.ts +0 -14
  48. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-content.js +0 -15
  49. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-core.d.ts +0 -14
  50. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-core.js +0 -63
  51. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-create.d.ts +0 -36
  52. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-create.js +0 -275
  53. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-def-utils.d.ts +0 -6
  54. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-def-utils.js +0 -225
  55. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-default.d.ts +0 -3
  56. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-default.js +0 -155
  57. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-define.d.ts +0 -125
  58. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-define.js +0 -4
  59. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-detect.d.ts +0 -23
  60. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-detect.js +0 -347
  61. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-gen-cfg.d.ts +0 -3
  62. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-gen-cfg.js +0 -186
  63. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-migrate.d.ts +0 -5
  64. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-migrate.js +0 -56
  65. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-path.d.ts +0 -11
  66. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-path.js +0 -33
  67. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-prompts.d.ts +0 -5
  68. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-prompts.js +0 -12
  69. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-read.d.ts +0 -11
  70. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-read.js +0 -84
  71. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-repair.d.ts +0 -16
  72. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-repair.js +0 -137
  73. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-schema.d.ts +0 -130
  74. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-schema.js +0 -438
  75. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-types.d.ts +0 -75
  76. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-types.js +0 -0
  77. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-unstable.d.ts +0 -11
  78. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-unstable.js +0 -41
  79. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-update.d.ts +0 -10
  80. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-update.js +0 -152
  81. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-utils.d.ts +0 -17
  82. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-utils.js +0 -86
  83. package/bin/libs/cfg/cfg-impl/rse-config/rse-mod.d.ts +0 -20
  84. package/bin/libs/cfg/cfg-impl/rse-config/rse-mod.js +0 -20
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) Nazar Kornienko (blefnk), Reliverse
3
+ Copyright (c) Nazar Kornienko (blefnk), Bleverse, Reliverse
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,147 +2,105 @@
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 (prev. relidler; `/ˈdiː.lər/`, dealer) is a unified package manager for typescript/javascript projects.
5
+ > @reliverse/dler (formerly relidler; `/ˈdiː.lər/`, dealer) is a unified package manager for typescript/javascript projects.
6
6
  >
7
- > dler is your package manager's best friend. dler extends bun, pnpm, yarn, and npm core functionalities by going far beyond.
7
+ > dler is your package managers best friend it extends bun, deno (🔜), pnpm, yarn, and npm with powerful and modern features.
8
8
  >
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.
9
+ > at its core, dler is a flexible and fully automated bundler that also doubles as an npm/jsr publishing tool. beyond bundling, dler provides a rich codemod toolkit designed for modern typescript/javascript development.
10
10
 
11
11
  ## features
12
12
 
13
- - **built-in bun environment** when dler is installed as a standalone application
14
- - **`unjs/unbuild` drop-in** with different powerful capabilities like publishing
15
- - **automated publishing** to npm/jsr registries with intelligent workflow management
16
- - **reliable builds** with comprehensive typescript/javascript support and error handling
17
- - **smart versioning** with automatic version bumps and semantic release integration
18
- - **zero configuration** eliminates `package.json` maintenance headaches forever
19
- - **performance optimized** for speed with modern build pipelines and caching
20
- - **17 built-in commands** — comprehensive [dler commands](#dler-commands) for every workflow
21
- - **path resolution magic** converts typescript aliases to relative imports automatically
22
- - **highly configurable** via dedicated configuration files with sensible defaults
23
- - **dual interface** — cli for everyday use, sdk for advanced programmatic control
24
- - **clean distribution builds** automatically removes internal logs and debug code
25
- - **monorepo ready** with experimental `libs` feature for multi-library projects
26
- - **magic spells** — extensible plugin system for custom build transformations
27
- - **codemod toolkit** — powerful code transformation utilities built-in
28
-
29
- ### 🎯 perfect for
30
-
31
- dler excels at managing both build and publish workflows, making it ideal for:
32
-
33
- - cli tool creators and maintainers
34
- - project bootstrappers (like [rse](https://github.com/reliverse/rse))
35
- - library authors seeking streamlined workflows
36
- - teams wanting consistent build processes
37
-
38
- ### 🔜 coming soon
39
-
40
- **full monorepo system** with advanced dependency management and cross-package optimization.
41
-
42
- ### supported bundlers
43
-
44
- - ✅ [mkdist](https://github.com/unjs/mkdist#readme)
45
- - ✅ jsr
46
- - 🏗️ copy
47
- - 🏗️ [bun](https://bun.sh/docs/bundler)
48
- - 🏗️ [rollup](https://rollupjs.org)
49
- - 🏗️ [untyped](https://untyped.unjs.io)
50
- - 🔜 [tsdown](https://rolldown.rs)
51
- - 🔜 copy (prev. jsr)
52
-
53
- **legend**:
54
-
55
- - ✅ well tested with big projects
56
- - 🏗️ not well tested yet
57
- - 🔜 coming soon
13
+ - **drop-in `unjs/unbuild` support** with extended capabilities like publishing
14
+ - **automated publishing** to npm and jsr with smart workflow orchestration
15
+ - **reliable builds** with robust typescript/javascript support and error handling
16
+ - **smart versioning** with semantic release and automatic version bumping
17
+ - **zero-config setup** forget about `package.json` maintenance
18
+ - **built-in bun environment** when used as a standalone cli app
19
+ - **performance-optimized** using fast build pipelines and aggressive caching
20
+ - **17 built-in commands** — see [dler commands](#dler-commands) for everything it can do
21
+ - **path alias resolution** automatically rewrites tsconfig aliases to relative imports
22
+ - **configurable by design** dedicated config files with sane defaults
23
+ - **dual interface** — use via cli or import as sdk for programmatic use
24
+ - **clean dist output** strips internal logs and debug code automatically
25
+ - **monorepo support** with experimental `libs` mode for multi-library setups
26
+ - **magic spells** — plugin system for custom build logic and extensions
27
+ - **codemod toolkit** — powerful code transformation utilities out of the box
28
+ - **full monorepo system** with optimized cross-package dependency handling
29
+ - **esp. designed for** cli tool creators, project bootstrappers (like [rse](https://github.com/reliverse/rse))
30
+ - **perfect for** anyone who wants their package manager to have *sweet powers*
58
31
 
59
32
  ## getting started
60
33
 
61
- make sure you have git, node.js, and bun/pnpm/yarn/npm (**[bun](https://bun.sh/get) is highly recommended**) are installed. then:
34
+ before using dler, make sure you have [git](https://git-scm.com/downloads), [node.js](https://nodejs.org/en/download), and a supported package manager installed — **[bun](https://bun.sh/get) is highly recommended** for the best experience.
62
35
 
63
36
  ### 0. try the playground
64
37
 
65
- > **💡 tip**:
66
- > want to test dler before integrating it into your project?
67
- > clone the dler repo and build it using dler itself!
38
+ > 💡 **tip**
39
+ > curious to see dler in action before integrating it into your project?
40
+ > clone the repo and try e.g. `bun dler build` to build dler using... dler itself!
68
41
 
69
42
  ```sh
70
43
  git clone https://github.com/reliverse/dler.git
71
44
  cd dler
72
45
  bun i
73
- bun dev # bun src/cli.ts --dev
46
+ bun dler build # runs dler from source (cli entry: src/cli.ts)
74
47
  ```
75
48
 
76
49
  ### 1. install dler
77
50
 
78
- **install as dev dep (recommended)**:
79
-
80
- ```sh
81
- bun add -D @reliverse/dler
82
- # or update as needed:
83
- bun update --latest
84
- ```
51
+ it is recommended to install dler both globally and as a dev dependency:
85
52
 
86
- **and/or install globally**:
53
+ - **global install** — `bun add -g @reliverse/dler` — lets you use dler anywhere, like a system-level cli.
54
+ - **dev dependency** — `bun add -D @reliverse/dler` — pins the version per project, so all contributors use the same version.
87
55
 
88
- ```sh
89
- bun add -g @reliverse/dler
90
- # or update as needed:
91
- bun i -g update --latest
92
- ```
56
+ instead of global install, you can alternatively install dler as a standalone binary: `bunx @reliverse/dler `
93
57
 
94
- - **when installed globally**: use `dler` anywhere.
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**: ...
58
+ > usage depends on how dler is installed:
59
+ >
60
+ > - `dler` → if installed globally (or as standalone binary)
61
+ > - `bun dler` → if installed as a dev dependency
97
62
 
98
- ### 2. prepare your project
63
+ ### 2. initialize dler config
99
64
 
100
- a. **configure `.gitignore`**:
65
+ first-time dler run initializes config, repeatable runs launches dler interactive menu.
101
66
 
102
67
  ```sh
103
- echo "dist*" >> .gitignore
104
- echo "logs" >> .gitignore
68
+ bun dler # if installed locally
69
+ dler # if installed globally
105
70
  ```
106
71
 
107
- b. **add `".config/**/*.ts"` to `include` in `tsconfig.json`**:
108
-
109
- ```json
110
- "include": [".config/**/*.ts", ...]
111
- ```
72
+ this creates a starter config file: `.config/dler.ts`
112
73
 
113
- c. **package.json**:
74
+ - it is recommended to tweak the config to match your project structure
75
+ - example config: [.config/dler.ts →](https://github.com/reliverse/dler/blob/main/.config/dler.ts)
76
+ - useful options:
114
77
 
115
- ```json
116
- "scripts": {
117
- "build": "dler build", // this is optional
118
- "pub": "dler pub" // this does build+publish
119
- }
120
- ```
78
+ - `buildPreExtensions`: support additional file types like `["ts", "js", "vue", "tsx", "jsx"]`
79
+ - `buildTemplatesDir`: exclude a directory from being built; it will be copied as-is (e.g. `src/foo/templates → dist-*/bin/foo/templates`)
121
80
 
122
- d. **initialize config**:
81
+ ### 3. run and enjoy
123
82
 
124
83
  ```sh
125
- bun dler # if installed as dev dep
126
- dler # if installed globally
84
+ bun dler [build|pub|--help] # if local
85
+ dler [build|pub|--help] # if global
127
86
  ```
128
87
 
129
- - the `.config/dler.ts` file is automatically created on first run.
88
+ > 💡 run `dler` for an interactive menu, or `dler --help` for full command list.
130
89
 
131
- e. **optionally, customize `.config/dler.ts`**:
90
+ ### 4. upgrade your dev tools
132
91
 
133
- - it's recommended to customize this file according to your needs.
134
- - you can check an example config here: [.config/dler.ts](https://github.com/reliverse/dler/blob/main/.config/dler.ts)
135
- - if you want to build files which have extensions other than `.ts` and `.js`, you can customize `buildPreExtensions` array (example: `["ts", "js", "vue", "tsx", "jsx"]`).
136
- - if you want to exclude some files from being built, you can customize `buildTemplatesDir` string (example: `"templates"`). by placing them in this directory, they will not be built, whole directory will be copied from e.g. `src/foo/templates` to `dist-*/bin/foo/templates` as-is.
92
+ keeping your tools fresh is always a good practice.
137
93
 
138
- ### 3. run and enjoy
94
+ the command below **upgrades not just dler**, but also your local setup — including `git`, `node.js`, `bun`, `npm`, `yarn`, `pnpm`, and more.
95
+
96
+ just run:
139
97
 
140
98
  ```sh
141
- bun dler [build|pub|--help] # if installed as dev dep
142
- dler [build|pub|--help] # if installed globally
99
+ bun dler upgrade
143
100
  ```
144
101
 
145
- (_run just `dler` to see an interactive list of commands_)
102
+ > ⚠️ don’t confuse this with `dler update`, which upgrades your **project dependencies** and **global packages**, not your system tools.
103
+ > 👉 *note:* both `upgrade` and `update` will update **dler** itself — globally and in your `dependencies` or `devDependencies` if run inside a project with a `package.json` — depends on how dler is installed.
146
104
 
147
105
  ## dler commands
148
106
 
@@ -164,6 +122,23 @@ since dler is fully modular, build command is separated for its own build-in plu
164
122
  bun dler build ...
165
123
  ```
166
124
 
125
+ ### supported bundlers
126
+
127
+ - ✅ [mkdist](https://github.com/unjs/mkdist#readme)
128
+ - ✅ jsr
129
+ - 🏗️ copy
130
+ - 🏗️ [bun](https://bun.sh/docs/bundler)
131
+ - 🏗️ [rollup](https://rollupjs.org)
132
+ - 🏗️ [untyped](https://untyped.unjs.io)
133
+ - 🔜 [tsdown](https://rolldown.rs)
134
+ - 🔜 copy (prev. jsr)
135
+
136
+ **legend**:
137
+
138
+ - ✅ well tested with big projects
139
+ - 🏗️ not well tested yet
140
+ - 🔜 coming soon
141
+
167
142
  #### 1.1. `build binary` - Standalone Executable Builder
168
143
 
169
144
  creates standalone executables for different platforms using bun's `--compile` feature.
@@ -960,6 +935,81 @@ special thanks to the project that inspired `@reliverse/dler`:
960
935
  - [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
936
  - [ ] at the moment any bundler like `mkdist` can be called using `bun`, but bun's own bundler is not yet fully supported
962
937
  - [ ] support all well-known package managers (currently only bun is fully supported)
938
+ - [ ] `dler <command> [...flags] [...args]` usage should support both `bun` and `dler` own commands and flags
939
+ - [ ] fully support deno and jsr
940
+
941
+ ### todo: commands
942
+
943
+ - [ ] run ./my-script.ts Execute a file with Bun
944
+ - [ ] lint Run a package.json script
945
+ - [ ] test Run unit tests with Bun
946
+ - [ ] x nuxi Execute a package binary (CLI), installing if needed (dler x)
947
+ - [ ] repl Start a REPL session with Bun
948
+ - [ ] exec Run a shell script directly with Bun
949
+ - [ ] install Install dependencies for a package.json (dler i)
950
+ - [ ] add elysia Add a dependency to package.json (dler a)
951
+ - [ ] remove backbone Remove a dependency from package.json (dler rm)
952
+ - [ ] update @shumai/shumai Update outdated dependencies
953
+ - [ ] audit Check installed packages for vulnerabilities
954
+ - [ ] outdated Display latest versions of outdated dependencies
955
+ - [ ] link [<package>] Register or link a local npm package
956
+ - [ ] unlink Unregister a local npm package
957
+ - [ ] publish Publish a package(s) to the npm/jsr registry
958
+ - [ ] patch <pkg> Prepare a package for patching
959
+ - [ ] pm <subcommand> Additional package management utilities
960
+ - [ ] info hono Display package metadata from the registry
961
+ - [ ] build ./a.ts ./b.jsx Bundle TypeScript & JavaScript into a single file
962
+ - [ ] init Start an empty project from a built-in template
963
+ - [ ] create next-app Create a new project from a template (bun c)
964
+ - [ ] upgrade Upgrade to latest version both of dler and your package manager.
965
+ - [x] <command> --help Print help text for command.
966
+
967
+ ### todo: flag
968
+
969
+ - [ ] --watch Automatically restart the process on file change
970
+ - [ ] --hot Enable auto reload in the Bun runtime, test runner, or bundler
971
+ - [ ] --no-clear-screen Disable clearing the terminal screen on reload when --hot or --watch is enabled
972
+ - [ ] --smol Use less memory, but run garbage collection more often
973
+ - [ ] -r, --preload=<val> Import a module before other modules are loaded
974
+ - [ ] --require=<val> Alias of --preload, for Node.js compatibility
975
+ - [ ] --import=<val> Alias of --preload, for Node.js compatibility
976
+ - [ ] --inspect=<val> Activate Bun's debugger
977
+ - [ ] --inspect-wait=<val> Activate Bun's debugger, wait for a connection before executing
978
+ - [ ] --inspect-brk=<val> Activate Bun's debugger, set breakpoint on first line of code and wait
979
+ - [ ] --if-present Exit without an error if the entrypoint does not exist
980
+ - [ ] --no-install Disable auto install in the Bun runtime
981
+ - [ ] --install=<val> Configure auto-install behavior. One of "auto" (default, auto-installs when no node_modules), "fallback" (missing packages only), "force" (always).
982
+ - [ ] -i Auto-install dependencies during execution. Equivalent to --install=fallback.
983
+ - [ ] -e, --eval=<val> Evaluate argument as a script
984
+ - [ ] -p, --print=<val> Evaluate argument as a script and print the result
985
+ - [ ] --prefer-offline Skip staleness checks for packages in the Bun runtime and resolve from disk
986
+ - [ ] --prefer-latest Use the latest matching versions of packages in the Bun runtime, always checking npm
987
+ - [ ] --port=<val> Set the default port for Bun.serve
988
+ - [ ] --conditions=<val> Pass custom conditions to resolve
989
+ - [ ] --fetch-preconnect=<val> Preconnect to a URL while code is loading
990
+ - [ ] --max-http-header-size=<val> Set the maximum size of HTTP headers in bytes. Default is 16KiB
991
+ - [ ] --dns-result-order=<val> Set the default order of DNS lookup results. Valid orders: verbatim (default), ipv4first, ipv6first
992
+ - [ ] --expose-gc Expose gc() on the global object. Has no effect on Bun.gc().
993
+ - [ ] --no-deprecation Suppress all reporting of the custom deprecation.
994
+ - [ ] --throw-deprecation Determine whether or not deprecation warnings result in errors.
995
+ - [ ] --title=<val> Set the process title
996
+ - [ ] --zero-fill-buffers Boolean to force Buffer.allocUnsafe(size) to be zero-filled.
997
+ - [ ] --redis-preconnect Preconnect to $REDIS_URL at startup
998
+ - [ ] --sql-preconnect Preconnect to PostgreSQL at startup
999
+ - [ ] --no-addons Throw an error if process.dlopen is called, and disable export condition "node-addons"
1000
+ - [ ] --unhandled-rejections=<val> One of "strict", "throw", "warn", "none", or "warn-with-error-code"
1001
+ - [ ] --console-depth=<val> Set the default depth for console.log object inspection (default: 2)
1002
+ - [ ] --silent Don't print the script command
1003
+ - [ ] --elide-lines=<val> Number of lines of script output shown when using --filter (default: 10). Set to 0 to show all lines.
1004
+ - [ ] -v, --version Print version and exit
1005
+ - [ ] --revision Print version with revision and exit
1006
+ - [ ] -F, --filter=<val> Run a script in all workspace packages matching the pattern
1007
+ - [ ] -b, --bun Force a script or package to use Bun's runtime instead of Node.js (via symlinking node)
1008
+ - [ ] --shell=<val> Control the shell used for package.json scripts. Supports either 'bun' or 'system'
1009
+ - [ ] --env-file=<val> Load environment variables from the specified file(s)
1010
+ - [ ] --cwd=<val> Absolute path to resolve files & entry points from. This just changes the process' cwd.
1011
+ - [ ] -c, --config=<val> Specify path to Bun config file. Default $cwd/bunfig.toml
1012
+ - [ ] -h, --help Display this menu and exit
963
1013
 
964
1014
  ## support
965
1015
 
@@ -1,6 +1,5 @@
1
1
  import { defineArgs, defineCommand } from "@reliverse/rempts";
2
2
  import { dlerBuild } from "./impl.js";
3
- import { ensureDlerConfig } from "../../libs/sdk/sdk-impl/config/init.js";
4
3
  import { getConfigDler } from "../../libs/sdk/sdk-impl/config/load.js";
5
4
  import { finalizeBuild } from "../../libs/sdk/sdk-mod.js";
6
5
  export default defineCommand({
@@ -24,7 +23,6 @@ export default defineCommand({
24
23
  }),
25
24
  async run({ args }) {
26
25
  const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
27
- await ensureDlerConfig(isDev);
28
26
  const config = await getConfigDler();
29
27
  const { timer } = await dlerBuild(
30
28
  isDev,
package/bin/app/cmds.d.ts CHANGED
@@ -16,3 +16,4 @@ export declare const getMagicCmd: () => Promise<Command>;
16
16
  export declare const getSplitCmd: () => Promise<Command>;
17
17
  export declare const getRmCmd: () => Promise<Command>;
18
18
  export declare const getUpdateCmd: () => Promise<Command>;
19
+ export declare const getUpgradeCmd: () => Promise<Command>;
package/bin/app/cmds.js CHANGED
@@ -16,3 +16,4 @@ export const getMagicCmd = async () => loadCommand("magic");
16
16
  export const getSplitCmd = async () => loadCommand("split");
17
17
  export const getRmCmd = async () => loadCommand("rm");
18
18
  export const getUpdateCmd = async () => loadCommand("update");
19
+ export const getUpgradeCmd = async () => loadCommand("upgrade");
@@ -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 @@
1
+ export { default } from "../../libs/get/mod.js";
@@ -0,0 +1 @@
1
+ export { default } from "../../libs/get/mod.js";
@@ -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;