@reliverse/relico 1.2.0 → 1.3.1
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/.config/dler.ts +235 -0
- package/.config/rse.ts +167 -0
- package/.config/types/dler.schema.ts +1066 -0
- package/.cursor/rules/general-rules.mdc +276 -0
- package/.vscode/extensions.json +8 -0
- package/.vscode/settings.json +45 -0
- package/LICENSE +1 -1
- package/README.md +64 -6
- package/biome.json +78 -0
- package/deprecated.zip +0 -0
- package/examples/benchmarks/bundle-size.ts +143 -0
- package/examples/benchmarks/config.example.ts +55 -0
- package/examples/benchmarks/config.ts +93 -0
- package/examples/benchmarks/performance.ts +174 -0
- package/examples/core.ts +62 -0
- package/knip.json +13 -0
- package/package.json +24 -32
- package/reset.d.ts +1 -0
- package/src/mod.ts +492 -0
- package/tsconfig.json +33 -0
- package/bin/mod.d.ts +0 -357
- package/bin/mod.js +0 -1160
- package/bin/utils.d.ts +0 -4
- package/bin/utils.js +0 -10
package/.config/dler.ts
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { defineConfig } from "./types/dler.schema";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reliverse Bundler Configuration
|
|
5
|
+
* Hover over a field to see more details
|
|
6
|
+
* @see https://github.com/reliverse/dler
|
|
7
|
+
*/
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
// Bump configuration
|
|
10
|
+
bumpDisable: false,
|
|
11
|
+
bumpFilter: ["package.json", ".config/rse.ts"],
|
|
12
|
+
bumpMode: "patch",
|
|
13
|
+
|
|
14
|
+
// Common configuration
|
|
15
|
+
commonPubPause: false,
|
|
16
|
+
commonPubRegistry: "npm",
|
|
17
|
+
commonVerbose: false,
|
|
18
|
+
|
|
19
|
+
// Core configuration
|
|
20
|
+
coreBuildOutDir: "bin",
|
|
21
|
+
coreDeclarations: true,
|
|
22
|
+
coreDescription:
|
|
23
|
+
"@reliverse/relico is a themeable, chainable, typed, truecolor-powered, modern terminal styling toolkit. Designed to make your CLI output colorful, accessible, and human-friendly. It gives you a flexible way to apply colors and styles — with reliability and a smart developer experience baked in. Built for humans, not just terminals.",
|
|
24
|
+
coreEntryFile: "mod.ts",
|
|
25
|
+
coreEntrySrcDir: "src",
|
|
26
|
+
coreIsCLI: { enabled: false, scripts: {} },
|
|
27
|
+
|
|
28
|
+
// Logs
|
|
29
|
+
displayBuildPubLogs: false,
|
|
30
|
+
|
|
31
|
+
// JSR-only config
|
|
32
|
+
distJsrAllowDirty: true,
|
|
33
|
+
distJsrBuilder: "jsr",
|
|
34
|
+
distJsrDirName: "dist-jsr",
|
|
35
|
+
distJsrDryRun: false,
|
|
36
|
+
distJsrFailOnWarn: false,
|
|
37
|
+
distJsrGenTsconfig: false,
|
|
38
|
+
distJsrOutFilesExt: "ts",
|
|
39
|
+
distJsrSlowTypes: true,
|
|
40
|
+
|
|
41
|
+
// NPM-only config
|
|
42
|
+
distNpmBuilder: "mkdist",
|
|
43
|
+
distNpmDirName: "dist-npm",
|
|
44
|
+
distNpmOutFilesExt: "js",
|
|
45
|
+
|
|
46
|
+
// Libraries Dler Plugin
|
|
47
|
+
// Publish specific dirs as separate packages
|
|
48
|
+
// This feature is experimental at the moment
|
|
49
|
+
// Please commit your changes before using it
|
|
50
|
+
libsActMode: "main-project-only",
|
|
51
|
+
libsDirDist: "dist-libs",
|
|
52
|
+
libsDirSrc: "src/libs",
|
|
53
|
+
libsList: {},
|
|
54
|
+
|
|
55
|
+
// Specifies what resources to send to npm and jsr registries.
|
|
56
|
+
// coreBuildOutDir (e.g. "bin") dir is automatically included.
|
|
57
|
+
// The following is also included if publishArtifacts is {}:
|
|
58
|
+
// - global: ["package.json", "README.md", "LICENSE"]
|
|
59
|
+
// - dist-jsr,dist-libs/jsr: ["jsr.json"]
|
|
60
|
+
publishArtifacts: {
|
|
61
|
+
global: ["package.json", "README.md", "LICENSE", "LICENSES"],
|
|
62
|
+
"dist-jsr": [],
|
|
63
|
+
"dist-npm": [],
|
|
64
|
+
"dist-libs": {},
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
// Files with these extensions will be built
|
|
68
|
+
// Any other files will be copied as-is to dist
|
|
69
|
+
buildPreExtensions: ["ts", "js"],
|
|
70
|
+
// If you need to exclude some ts/js files from being built,
|
|
71
|
+
// you can store them in the dirs with buildTemplatesDir name
|
|
72
|
+
buildTemplatesDir: "templates",
|
|
73
|
+
|
|
74
|
+
// Dependency filtering
|
|
75
|
+
// Global is always applied
|
|
76
|
+
filterDepsPatterns: {
|
|
77
|
+
global: [
|
|
78
|
+
"@types",
|
|
79
|
+
"biome",
|
|
80
|
+
"knip",
|
|
81
|
+
"eslint",
|
|
82
|
+
"prettier",
|
|
83
|
+
"typescript",
|
|
84
|
+
"@reliverse/rse",
|
|
85
|
+
"@reliverse/dler",
|
|
86
|
+
"!@reliverse/rse-sdk",
|
|
87
|
+
"!@reliverse/dler-sdk",
|
|
88
|
+
],
|
|
89
|
+
"dist-npm": [],
|
|
90
|
+
"dist-jsr": [],
|
|
91
|
+
"dist-libs": {},
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
// Code quality tools
|
|
95
|
+
// Available: tsc, eslint, biome, knip, dler-check
|
|
96
|
+
runBeforeBuild: [],
|
|
97
|
+
// Available: dler-check
|
|
98
|
+
runAfterBuild: [],
|
|
99
|
+
|
|
100
|
+
// Build hooks
|
|
101
|
+
hooksBeforeBuild: [
|
|
102
|
+
// example plugin:
|
|
103
|
+
// async () => {
|
|
104
|
+
// await myCoolPlugin({
|
|
105
|
+
// /* plugin's options */
|
|
106
|
+
// });
|
|
107
|
+
// },
|
|
108
|
+
],
|
|
109
|
+
hooksAfterBuild: [
|
|
110
|
+
// example func:
|
|
111
|
+
// async () => {
|
|
112
|
+
// await applyMagicSpells(["dist-jsr", "dist-npm", "dist-libs"]);
|
|
113
|
+
// }
|
|
114
|
+
],
|
|
115
|
+
|
|
116
|
+
postBuildSettings: {
|
|
117
|
+
deleteDistTmpAfterBuild: true,
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
// Build setup
|
|
121
|
+
// transpileAlias: {},
|
|
122
|
+
// transpileClean: true,
|
|
123
|
+
// transpileEntries: [],
|
|
124
|
+
transpileEsbuild: "es2023",
|
|
125
|
+
// transpileExternals: [],
|
|
126
|
+
transpileFailOnWarn: false,
|
|
127
|
+
transpileFormat: "esm",
|
|
128
|
+
transpileMinify: true,
|
|
129
|
+
// transpileParallel: false,
|
|
130
|
+
transpilePublicPath: "/",
|
|
131
|
+
// transpileReplace: {},
|
|
132
|
+
// transpileRollup: {
|
|
133
|
+
// alias: {},
|
|
134
|
+
// commonjs: {},
|
|
135
|
+
// dts: {},
|
|
136
|
+
// esbuild: {},
|
|
137
|
+
// json: {},
|
|
138
|
+
// replace: {},
|
|
139
|
+
// resolve: {},
|
|
140
|
+
// },
|
|
141
|
+
// transpileShowOutLog: false,
|
|
142
|
+
transpileSourcemap: "none",
|
|
143
|
+
transpileSplitting: false,
|
|
144
|
+
transpileStub: false,
|
|
145
|
+
// transpileStubOptions: { jiti: {} },
|
|
146
|
+
transpileTarget: "node",
|
|
147
|
+
transpileWatch: false,
|
|
148
|
+
// transpileWatchOptions: undefined,
|
|
149
|
+
|
|
150
|
+
// @reliverse/relinka logger setup
|
|
151
|
+
logsFileName: ".logs/relinka.log",
|
|
152
|
+
logsFreshFile: true,
|
|
153
|
+
|
|
154
|
+
// Integrated relinka configuration
|
|
155
|
+
// https://github.com/reliverse/relinka
|
|
156
|
+
relinka: {
|
|
157
|
+
verbose: false,
|
|
158
|
+
|
|
159
|
+
// Timestamp configuration
|
|
160
|
+
timestamp: {
|
|
161
|
+
enabled: false,
|
|
162
|
+
format: "HH:mm:ss",
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
// Control whether logs are saved to a file
|
|
166
|
+
saveLogsToFile: false,
|
|
167
|
+
|
|
168
|
+
// Disable colors in the console
|
|
169
|
+
disableColors: false,
|
|
170
|
+
|
|
171
|
+
// Log file configuration
|
|
172
|
+
logFile: {
|
|
173
|
+
outputPath: "logs.log",
|
|
174
|
+
nameWithDate: "disable",
|
|
175
|
+
freshLogFile: true,
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
// Dirs settings
|
|
179
|
+
dirs: {
|
|
180
|
+
maxLogFiles: 5,
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
levels: {
|
|
184
|
+
success: {
|
|
185
|
+
symbol: "✓",
|
|
186
|
+
fallbackSymbol: "[OK]",
|
|
187
|
+
color: "greenBright",
|
|
188
|
+
spacing: 3,
|
|
189
|
+
},
|
|
190
|
+
info: {
|
|
191
|
+
symbol: "i",
|
|
192
|
+
fallbackSymbol: "[i]",
|
|
193
|
+
color: "cyanBright",
|
|
194
|
+
spacing: 3,
|
|
195
|
+
},
|
|
196
|
+
error: {
|
|
197
|
+
symbol: "✖",
|
|
198
|
+
fallbackSymbol: "[ERR]",
|
|
199
|
+
color: "redBright",
|
|
200
|
+
spacing: 3,
|
|
201
|
+
},
|
|
202
|
+
warn: {
|
|
203
|
+
symbol: "⚠",
|
|
204
|
+
fallbackSymbol: "[WARN]",
|
|
205
|
+
color: "yellowBright",
|
|
206
|
+
spacing: 3,
|
|
207
|
+
},
|
|
208
|
+
fatal: {
|
|
209
|
+
symbol: "‼",
|
|
210
|
+
fallbackSymbol: "[FATAL]",
|
|
211
|
+
color: "redBright",
|
|
212
|
+
spacing: 3,
|
|
213
|
+
},
|
|
214
|
+
verbose: {
|
|
215
|
+
symbol: "✧",
|
|
216
|
+
fallbackSymbol: "[VERBOSE]",
|
|
217
|
+
color: "gray",
|
|
218
|
+
spacing: 3,
|
|
219
|
+
},
|
|
220
|
+
internal: {
|
|
221
|
+
symbol: "⚙",
|
|
222
|
+
fallbackSymbol: "[INTERNAL]",
|
|
223
|
+
color: "magentaBright",
|
|
224
|
+
spacing: 3,
|
|
225
|
+
},
|
|
226
|
+
log: { symbol: "│", fallbackSymbol: "|", color: "dim", spacing: 3 },
|
|
227
|
+
message: {
|
|
228
|
+
symbol: "🞠",
|
|
229
|
+
fallbackSymbol: "[MSG]",
|
|
230
|
+
color: "cyan",
|
|
231
|
+
spacing: 3,
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
});
|
package/.config/rse.ts
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { defineConfig } from "@reliverse/rse-cfg";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
// RELIVERSE CONFIG (https://docs.reliverse.org/cli)
|
|
5
|
+
// Restart the CLI to apply your config changes
|
|
6
|
+
$schema: "./schema.json",
|
|
7
|
+
|
|
8
|
+
// General project information
|
|
9
|
+
projectName: "@reliverse/relico",
|
|
10
|
+
projectAuthor: "reliverse",
|
|
11
|
+
projectDescription:
|
|
12
|
+
"relico is a library for creating beautiful and customizable console output in TypeScript and JavaScript projects.",
|
|
13
|
+
version: "1.3.1",
|
|
14
|
+
projectLicense: "MIT",
|
|
15
|
+
projectState: "creating",
|
|
16
|
+
projectRepository: "https://github.com/reliverse/relico",
|
|
17
|
+
projectDomain: "https://reliverse.org",
|
|
18
|
+
projectCategory: "unknown",
|
|
19
|
+
projectSubcategory: "unknown",
|
|
20
|
+
projectTemplate: "unknown",
|
|
21
|
+
projectTemplateDate: "unknown",
|
|
22
|
+
projectArchitecture: "unknown",
|
|
23
|
+
repoPrivacy: "unknown",
|
|
24
|
+
projectGitService: "github",
|
|
25
|
+
projectDeployService: "vercel",
|
|
26
|
+
repoBranch: "main",
|
|
27
|
+
|
|
28
|
+
// Primary tech stack/framework
|
|
29
|
+
projectFramework: "unknown",
|
|
30
|
+
projectPackageManager: "bun",
|
|
31
|
+
projectRuntime: "bun",
|
|
32
|
+
preferredLibraries: {
|
|
33
|
+
stateManagement: "unknown",
|
|
34
|
+
formManagement: "unknown",
|
|
35
|
+
styling: "unknown",
|
|
36
|
+
uiComponents: "unknown",
|
|
37
|
+
testing: "unknown",
|
|
38
|
+
authentication: "unknown",
|
|
39
|
+
databaseLibrary: "unknown",
|
|
40
|
+
databaseProvider: "unknown",
|
|
41
|
+
api: "unknown",
|
|
42
|
+
linting: "unknown",
|
|
43
|
+
formatting: "unknown",
|
|
44
|
+
payment: "unknown",
|
|
45
|
+
analytics: "unknown",
|
|
46
|
+
monitoring: "unknown",
|
|
47
|
+
logging: "unknown",
|
|
48
|
+
forms: "unknown",
|
|
49
|
+
notifications: "unknown",
|
|
50
|
+
search: "unknown",
|
|
51
|
+
uploads: "unknown",
|
|
52
|
+
validation: "unknown",
|
|
53
|
+
documentation: "unknown",
|
|
54
|
+
icons: "unknown",
|
|
55
|
+
mail: "unknown",
|
|
56
|
+
cache: "unknown",
|
|
57
|
+
storage: "unknown",
|
|
58
|
+
cdn: "unknown",
|
|
59
|
+
cms: "unknown",
|
|
60
|
+
i18n: "unknown",
|
|
61
|
+
seo: "unknown",
|
|
62
|
+
motion: "unknown",
|
|
63
|
+
charts: "unknown",
|
|
64
|
+
dates: "unknown",
|
|
65
|
+
markdown: "unknown",
|
|
66
|
+
security: "unknown",
|
|
67
|
+
routing: "unknown",
|
|
68
|
+
},
|
|
69
|
+
monorepo: {
|
|
70
|
+
type: "none",
|
|
71
|
+
packages: [],
|
|
72
|
+
sharedPackages: [],
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
// List dependencies to exclude from checks
|
|
76
|
+
ignoreDependencies: [],
|
|
77
|
+
|
|
78
|
+
// Provide custom additional project details
|
|
79
|
+
// always sent to Reliverse AI Chat & Agents
|
|
80
|
+
customRules: {},
|
|
81
|
+
|
|
82
|
+
// Project features
|
|
83
|
+
features: {
|
|
84
|
+
i18n: false,
|
|
85
|
+
analytics: false,
|
|
86
|
+
themeMode: "dark-light",
|
|
87
|
+
authentication: false,
|
|
88
|
+
api: false,
|
|
89
|
+
database: true,
|
|
90
|
+
testing: true,
|
|
91
|
+
docker: false,
|
|
92
|
+
ci: false,
|
|
93
|
+
commands: [
|
|
94
|
+
"db",
|
|
95
|
+
"pub",
|
|
96
|
+
"knip",
|
|
97
|
+
"latest",
|
|
98
|
+
"check",
|
|
99
|
+
"agg",
|
|
100
|
+
"dev:add",
|
|
101
|
+
"dev:ai",
|
|
102
|
+
"dev:clone",
|
|
103
|
+
"dev:cmod",
|
|
104
|
+
],
|
|
105
|
+
webview: [],
|
|
106
|
+
language: ["typescript"],
|
|
107
|
+
themes: ["default", "eslint", "biome", "uploadthing", "zod", "typebox"],
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
// Code style preferences
|
|
111
|
+
codeStyle: {
|
|
112
|
+
dontRemoveComments: true,
|
|
113
|
+
shouldAddComments: true,
|
|
114
|
+
typeOrInterface: "type",
|
|
115
|
+
importOrRequire: "import",
|
|
116
|
+
quoteMark: "double",
|
|
117
|
+
semicolons: true,
|
|
118
|
+
lineWidth: 80,
|
|
119
|
+
indentStyle: "space",
|
|
120
|
+
indentSize: 2,
|
|
121
|
+
importSymbol: "~",
|
|
122
|
+
trailingComma: "all",
|
|
123
|
+
bracketSpacing: true,
|
|
124
|
+
arrowParens: "always",
|
|
125
|
+
tabWidth: 2,
|
|
126
|
+
jsToTs: false,
|
|
127
|
+
cjsToEsm: false,
|
|
128
|
+
modernize: {
|
|
129
|
+
replaceFs: false,
|
|
130
|
+
replacePath: false,
|
|
131
|
+
replaceHttp: false,
|
|
132
|
+
replaceProcess: false,
|
|
133
|
+
replaceConsole: false,
|
|
134
|
+
replaceEvents: false,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
// Settings for cloning an existing repo
|
|
139
|
+
multipleRepoCloneMode: false,
|
|
140
|
+
customUserFocusedRepos: [],
|
|
141
|
+
customDevsFocusedRepos: [],
|
|
142
|
+
hideRepoSuggestions: false,
|
|
143
|
+
customReposOnNewProject: false,
|
|
144
|
+
|
|
145
|
+
// Set to false to disable opening the browser during env composing
|
|
146
|
+
envComposerOpenBrowser: true,
|
|
147
|
+
|
|
148
|
+
// Enable auto-answering for prompts to skip manual confirmations.
|
|
149
|
+
// Make sure you have unknown values configured above.
|
|
150
|
+
skipPromptsUseAutoBehavior: false,
|
|
151
|
+
|
|
152
|
+
// Prompt behavior for deployment
|
|
153
|
+
// Options: prompt | autoYes | autoNo
|
|
154
|
+
deployBehavior: "prompt",
|
|
155
|
+
depsBehavior: "prompt",
|
|
156
|
+
gitBehavior: "prompt",
|
|
157
|
+
i18nBehavior: "prompt",
|
|
158
|
+
scriptsBehavior: "prompt",
|
|
159
|
+
|
|
160
|
+
// Behavior for existing GitHub repos during project creation
|
|
161
|
+
// Options: prompt | autoYes | autoYesSkipCommit | autoNo
|
|
162
|
+
existingRepoBehavior: "prompt",
|
|
163
|
+
|
|
164
|
+
// Behavior for Reliverse AI Chat & Agents
|
|
165
|
+
// Options: promptOnce | promptEachFile | autoYes
|
|
166
|
+
relinterConfirm: "promptOnce",
|
|
167
|
+
});
|