@reliverse/dler 1.7.5 → 1.7.7
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.
|
@@ -37,14 +37,80 @@ export async function ensureDlerConfig(isDev) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
function getCoreIsCLI(isDev) {
|
|
40
|
-
return isDev ? `coreIsCLI: {
|
|
41
|
-
enabled: true,
|
|
42
|
-
scripts: { dler: "dler.ts" },
|
|
43
|
-
},` : `// coreIsCLI: {
|
|
40
|
+
return isDev ? `coreIsCLI: { enabled: true, scripts: { dler: "cli.ts" } },` : `// coreIsCLI: {
|
|
44
41
|
// enabled: false,
|
|
45
42
|
// scripts: { mycli: "mycli.ts" },
|
|
46
43
|
// },`;
|
|
47
44
|
}
|
|
45
|
+
function getValue(isDev, devValue, prodValue) {
|
|
46
|
+
return isDev ? devValue : prodValue;
|
|
47
|
+
}
|
|
48
|
+
function getBumpFilter(isDev) {
|
|
49
|
+
return isDev ? `[
|
|
50
|
+
"package.json",
|
|
51
|
+
".config/rse.ts",
|
|
52
|
+
"src/libs/sdk/sdk-impl/cfg/info.ts",
|
|
53
|
+
]` : `["package.json", ".config/rse.ts"]`;
|
|
54
|
+
}
|
|
55
|
+
function getPublishArtifacts(isDev) {
|
|
56
|
+
return isDev ? `{
|
|
57
|
+
global: ["package.json", "README.md", "LICENSE", "LICENSES"],
|
|
58
|
+
"dist-jsr": [],
|
|
59
|
+
"dist-npm": [],
|
|
60
|
+
"dist-libs": {
|
|
61
|
+
"@reliverse/dler-sdk": {
|
|
62
|
+
jsr: [],
|
|
63
|
+
npm: [],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
}` : `{
|
|
67
|
+
global: ["package.json", "README.md", "LICENSE"],
|
|
68
|
+
"dist-jsr": [],
|
|
69
|
+
"dist-npm": [],
|
|
70
|
+
"dist-libs": {},
|
|
71
|
+
}`;
|
|
72
|
+
}
|
|
73
|
+
function getFilterDepsPatterns(isDev) {
|
|
74
|
+
return isDev ? `{
|
|
75
|
+
global: [
|
|
76
|
+
"bun",
|
|
77
|
+
"@types",
|
|
78
|
+
"biome",
|
|
79
|
+
"eslint",
|
|
80
|
+
"knip",
|
|
81
|
+
"prettier",
|
|
82
|
+
"typescript",
|
|
83
|
+
"@reliverse/rse",
|
|
84
|
+
"@reliverse/dler",
|
|
85
|
+
"!@reliverse/rse-sdk",
|
|
86
|
+
"!@reliverse/dler-sdk",
|
|
87
|
+
],
|
|
88
|
+
"dist-npm": [],
|
|
89
|
+
"dist-jsr": [],
|
|
90
|
+
"dist-libs": {
|
|
91
|
+
"@reliverse/dler-sdk": {
|
|
92
|
+
jsr: ["!bun"],
|
|
93
|
+
npm: [],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
}` : `{
|
|
97
|
+
global: [
|
|
98
|
+
"@types",
|
|
99
|
+
"biome",
|
|
100
|
+
"eslint",
|
|
101
|
+
"knip",
|
|
102
|
+
"prettier",
|
|
103
|
+
"typescript",
|
|
104
|
+
"@reliverse/rse",
|
|
105
|
+
"@reliverse/dler",
|
|
106
|
+
"!@reliverse/rse-sdk",
|
|
107
|
+
"!@reliverse/dler-sdk",
|
|
108
|
+
],
|
|
109
|
+
"dist-npm": [],
|
|
110
|
+
"dist-jsr": [],
|
|
111
|
+
"dist-libs": {},
|
|
112
|
+
}`;
|
|
113
|
+
}
|
|
48
114
|
function generateConfig(isDev, pkgDescription) {
|
|
49
115
|
const importDefineConfigStatement = isDev ? `import { defineConfig } from "../../../../mod.js";` : `import { defineConfig } from "@reliverse/dler";`;
|
|
50
116
|
const verboseValue = getValue(isDev, true, DEFAULT_CONFIG.commonVerbose);
|
|
@@ -61,7 +127,6 @@ function generateConfig(isDev, pkgDescription) {
|
|
|
61
127
|
);
|
|
62
128
|
const coreDescriptionValue = getValue(
|
|
63
129
|
isDev,
|
|
64
|
-
// TODO: remove `description` from dler's `package.json` when ensured that whole dler's codebase can optionally read dler.ts' `coreDescription`
|
|
65
130
|
"dler (prev. relidler) is a flexible, unified, and fully automated bundler for TypeScript and JavaScript projects, as well as an NPM and JSR publishing tool.",
|
|
66
131
|
pkgDescription || DEFAULT_CONFIG.coreDescription
|
|
67
132
|
);
|
|
@@ -75,127 +140,120 @@ function generateConfig(isDev, pkgDescription) {
|
|
|
75
140
|
libDeclarations: true,
|
|
76
141
|
libDescription: "@reliverse/dler without cli",
|
|
77
142
|
libDirName: "sdk",
|
|
78
|
-
libMainFile: "sdk-mod.ts",
|
|
143
|
+
libMainFile: "sdk/sdk-mod.ts",
|
|
79
144
|
libPkgKeepDeps: true,
|
|
80
145
|
libTranspileMinify: true,
|
|
81
146
|
libPubPause: false,
|
|
147
|
+
libPubRegistry: "npm-jsr",
|
|
82
148
|
},
|
|
83
149
|
}` : `{
|
|
84
150
|
// "@acme/cli-libName": {
|
|
85
151
|
// libDeclarations: true,
|
|
86
152
|
// libDescription: "@acme/cli defineConfig",
|
|
87
153
|
// libDirName: "libName",
|
|
88
|
-
// libMainFile: "libName-mod.ts",
|
|
154
|
+
// libMainFile: "libName/libName-mod.ts",
|
|
89
155
|
// libPkgKeepDeps: true,
|
|
90
156
|
// libTranspileMinify: true,
|
|
91
157
|
// libPubPause: false,
|
|
158
|
+
// libPubRegistry: "npm-jsr",
|
|
92
159
|
// },
|
|
93
160
|
}`;
|
|
94
|
-
const configTemplate =
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
*
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
coreBuildOutDir: "
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
//
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
transpileFormat: "
|
|
168
|
-
transpileMinify:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
transpileStubOptions: {
|
|
192
|
-
jiti: {},
|
|
193
|
-
},
|
|
194
|
-
transpileWatchOptions: undefined,
|
|
195
|
-
});
|
|
196
|
-
`;
|
|
161
|
+
const configTemplate = [
|
|
162
|
+
importDefineConfigStatement,
|
|
163
|
+
"",
|
|
164
|
+
"/**",
|
|
165
|
+
" * Reliverse Bundler Configuration",
|
|
166
|
+
" * Hover over a field to see more details",
|
|
167
|
+
" * @see https://github.com/reliverse/dler",
|
|
168
|
+
" */",
|
|
169
|
+
"export default defineConfig({",
|
|
170
|
+
" // Bump configuration",
|
|
171
|
+
" bumpDisable: " + DEFAULT_CONFIG.bumpDisable + ",",
|
|
172
|
+
" bumpFilter: " + getBumpFilter(isDev) + ",",
|
|
173
|
+
' bumpMode: "' + DEFAULT_CONFIG.bumpMode + '",',
|
|
174
|
+
"",
|
|
175
|
+
" // Common configuration",
|
|
176
|
+
" commonPubPause: " + pausePublishValue + ",",
|
|
177
|
+
' commonPubRegistry: "' + registryValue + '",',
|
|
178
|
+
" commonVerbose: " + verboseValue + ",",
|
|
179
|
+
"",
|
|
180
|
+
" // Core configuration",
|
|
181
|
+
' coreBuildOutDir: "' + DEFAULT_CONFIG.coreBuildOutDir + '",',
|
|
182
|
+
" coreDeclarations: " + DEFAULT_CONFIG.coreDeclarations + ",",
|
|
183
|
+
" coreDescription: " + JSON.stringify(coreDescriptionValue) + ",",
|
|
184
|
+
' coreEntryFile: "' + DEFAULT_CONFIG.coreEntryFile + '",',
|
|
185
|
+
' coreEntrySrcDir: "' + DEFAULT_CONFIG.coreEntrySrcDir + '",',
|
|
186
|
+
" " + coreIsCLI,
|
|
187
|
+
"",
|
|
188
|
+
" // JSR-only config",
|
|
189
|
+
" distJsrAllowDirty: " + DEFAULT_CONFIG.distJsrAllowDirty + ",",
|
|
190
|
+
' distJsrBuilder: "' + DEFAULT_CONFIG.distJsrBuilder + '",',
|
|
191
|
+
' distJsrDirName: "' + DEFAULT_CONFIG.distJsrDirName + '",',
|
|
192
|
+
" distJsrDryRun: " + DEFAULT_CONFIG.distJsrDryRun + ",",
|
|
193
|
+
" distJsrFailOnWarn: " + DEFAULT_CONFIG.distJsrFailOnWarn + ",",
|
|
194
|
+
" distJsrGenTsconfig: " + DEFAULT_CONFIG.distJsrGenTsconfig + ",",
|
|
195
|
+
' distJsrOutFilesExt: "' + DEFAULT_CONFIG.distJsrOutFilesExt + '",',
|
|
196
|
+
" distJsrSlowTypes: " + DEFAULT_CONFIG.distJsrSlowTypes + ",",
|
|
197
|
+
"",
|
|
198
|
+
" // NPM-only config",
|
|
199
|
+
' distNpmBuilder: "' + DEFAULT_CONFIG.distNpmBuilder + '",',
|
|
200
|
+
' distNpmDirName: "' + DEFAULT_CONFIG.distNpmDirName + '",',
|
|
201
|
+
' distNpmOutFilesExt: "' + DEFAULT_CONFIG.distNpmOutFilesExt + '",',
|
|
202
|
+
"",
|
|
203
|
+
" // Libraries Dler Plugin",
|
|
204
|
+
" // Publish specific dirs as separate packages",
|
|
205
|
+
" // This feature is experimental at the moment",
|
|
206
|
+
" // Please commit your changes before using it",
|
|
207
|
+
' libsActMode: "' + libsActModeValue + '",',
|
|
208
|
+
' libsDirDist: "' + DEFAULT_CONFIG.libsDirDist + '",',
|
|
209
|
+
' libsDirSrc: "' + DEFAULT_CONFIG.libsDirSrc + '",',
|
|
210
|
+
" libsList: " + libsObject + ",",
|
|
211
|
+
"",
|
|
212
|
+
" // @reliverse/relinka logger setup",
|
|
213
|
+
' logsFileName: "' + DEFAULT_CONFIG.logsFileName + '",',
|
|
214
|
+
" logsFreshFile: " + DEFAULT_CONFIG.logsFreshFile + ",",
|
|
215
|
+
"",
|
|
216
|
+
" // Specifies what resources to send to npm and jsr registries.",
|
|
217
|
+
' // coreBuildOutDir (e.g. "bin") dir is automatically included.',
|
|
218
|
+
" // The following is also included if publishArtifacts is {}:",
|
|
219
|
+
' // - global: ["package.json", "README.md", "LICENSE"]',
|
|
220
|
+
' // - dist-jsr,dist-libs/jsr: ["jsr.json"]',
|
|
221
|
+
" publishArtifacts: " + getPublishArtifacts(isDev) + ",",
|
|
222
|
+
"",
|
|
223
|
+
" // Dependency filtering",
|
|
224
|
+
" // Global is always applied",
|
|
225
|
+
" filterDepsPatterns: " + getFilterDepsPatterns(isDev) + ",",
|
|
226
|
+
"",
|
|
227
|
+
" // Build setup",
|
|
228
|
+
" // transpileAlias: {},",
|
|
229
|
+
" // transpileClean: true,",
|
|
230
|
+
" // transpileEntries: [],",
|
|
231
|
+
' transpileEsbuild: "' + DEFAULT_CONFIG.transpileEsbuild + '",',
|
|
232
|
+
" // transpileExternals: [],",
|
|
233
|
+
" transpileFailOnWarn: " + DEFAULT_CONFIG.transpileFailOnWarn + ",",
|
|
234
|
+
' transpileFormat: "' + DEFAULT_CONFIG.transpileFormat + '",',
|
|
235
|
+
" transpileMinify: " + DEFAULT_CONFIG.transpileMinify + ",",
|
|
236
|
+
" // transpileParallel: false,",
|
|
237
|
+
' transpilePublicPath: "' + DEFAULT_CONFIG.transpilePublicPath + '",',
|
|
238
|
+
" // transpileReplace: {},",
|
|
239
|
+
" // transpileRollup: {",
|
|
240
|
+
" // alias: {},",
|
|
241
|
+
" // commonjs: {},",
|
|
242
|
+
" // dts: {},",
|
|
243
|
+
" // esbuild: {},",
|
|
244
|
+
" // json: {},",
|
|
245
|
+
" // replace: {},",
|
|
246
|
+
" // resolve: {},",
|
|
247
|
+
" // },",
|
|
248
|
+
" // transpileShowOutLog: false,",
|
|
249
|
+
' transpileSourcemap: "' + DEFAULT_CONFIG.transpileSourcemap + '",',
|
|
250
|
+
" transpileSplitting: " + DEFAULT_CONFIG.transpileSplitting + ",",
|
|
251
|
+
" transpileStub: " + DEFAULT_CONFIG.transpileStub + ",",
|
|
252
|
+
" // transpileStubOptions: { jiti: {} },",
|
|
253
|
+
' transpileTarget: "' + DEFAULT_CONFIG.transpileTarget + '",',
|
|
254
|
+
" transpileWatch: " + DEFAULT_CONFIG.transpileWatch + ",",
|
|
255
|
+
" // transpileWatchOptions: undefined,",
|
|
256
|
+
"});"
|
|
257
|
+
].join("\n");
|
|
197
258
|
return configTemplate;
|
|
198
259
|
}
|
|
199
|
-
function getValue(isDev, devValue, prodValue) {
|
|
200
|
-
return isDev ? devValue : prodValue;
|
|
201
|
-
}
|
package/package.json
CHANGED
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"ts-morph": "^26.0.0",
|
|
35
35
|
"untyped": "^2.0.0"
|
|
36
36
|
},
|
|
37
|
-
"description": "
|
|
37
|
+
"description": "dler (prev. relidler) is a flexible, unified, and fully automated bundler for TypeScript and JavaScript projects, as well as an NPM and JSR publishing tool.",
|
|
38
38
|
"homepage": "https://docs.reliverse.org",
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"name": "@reliverse/dler",
|
|
41
41
|
"type": "module",
|
|
42
|
-
"version": "1.7.
|
|
42
|
+
"version": "1.7.7",
|
|
43
43
|
"keywords": [
|
|
44
44
|
"reliverse",
|
|
45
45
|
"cli",
|