@reliverse/dler 1.2.0 → 1.2.2
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 +43 -20
- package/bin/cli/args/init/cmd/index.js +66 -0
- package/bin/cli/args/init/{main.txt → init-mod.txt} +1 -1
- package/bin/cli/args/init/libs/reinit/reint-impl/{mod.txt → reinit-mod.txt} +5 -5
- package/bin/cli/args/init/libs/reinit/reint-impl/templates/t-license.js +1 -1
- package/bin/cli/args/inject/ts-expect-error.txt +3 -3
- package/bin/cli/args/{spells/mod.js → spell/spell-mod.js} +1 -1
- package/bin/cli/args/split/split-impl.js +117 -0
- package/bin/cli/args/split/split-mod.js +22 -113
- package/bin/cli/args/tools/index.js +1 -1
- package/bin/cli/args/tools/tools-impl.js +16 -16
- package/bin/cli.js +3 -2
- package/bin/init.js +8 -8
- package/bin/libs/cfg/cfg-default.js +1 -1
- package/bin/libs/sdk/sdk-impl/build/build-library.js +11 -11
- package/bin/libs/sdk/sdk-impl/build/build-regular.js +24 -14
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/auto.js +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.js +4 -7
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/watch.js +3 -3
- package/bin/libs/sdk/sdk-impl/library-flow.js +1 -1
- package/bin/libs/sdk/sdk-impl/pub/pub-library.js +9 -9
- package/bin/libs/sdk/sdk-impl/pub/pub-regular.js +4 -4
- package/bin/libs/sdk/sdk-impl/regular-flow.js +17 -11
- package/bin/libs/sdk/sdk-impl/{spells/spells-executors.js → spell/spell-executors.js} +1 -1
- package/bin/libs/sdk/sdk-impl/{spells/spells-main.js → spell/spell-mod.js} +3 -3
- package/bin/libs/sdk/sdk-impl/utils/tools/tools-impl.js +7 -7
- package/bin/libs/sdk/sdk-impl/utils/utils-build.js +3 -3
- package/bin/libs/sdk/sdk-impl/utils/utils-bump.js +4 -4
- package/bin/libs/sdk/sdk-impl/utils/utils-fs.js +2 -5
- package/bin/libs/sdk/sdk-impl/utils/utils-info.js +4 -4
- package/bin/libs/sdk/sdk-impl/utils/utils-jsr-json.js +4 -2
- package/bin/libs/sdk/sdk-impl/utils/utils-paths.js +6 -6
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-libs.js +8 -8
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-reg.js +16 -13
- package/bin/load.js +1 -1
- package/bin/tools.txt +1 -1
- package/package.json +12 -12
- package/bin/cli/args/split/split-main.js +0 -26
- package/bin/libs/cfg/cfg-main.js +0 -1
- /package/bin/cli/args/agg/{main.js → agg-mod.js} +0 -0
- /package/bin/cli/args/conv/{main.js → conv-mod.js} +0 -0
- /package/bin/cli/args/deps/{mod.js → deps-mod.js} +0 -0
- /package/bin/cli/args/init/libs/reinit/{reinit-main.js → reinit-mod.js} +0 -0
- /package/bin/cli/args/inject/{cli-mod.js → inject-mod.js} +0 -0
- /package/bin/cli/args/inject/{main.txt → inject-mod.txt} +0 -0
- /package/bin/cli/args/merger/{main.txt → merger-mod.txt} +0 -0
- /package/bin/cli/args/mono/{main.js → mono-mod.js} +0 -0
- /package/bin/libs/sdk/sdk-impl/{spells/spells-filesystem.js → spell/spell-filesystem.js} +0 -0
- /package/bin/libs/sdk/sdk-impl/{spells/spells-parser.js → spell/spell-parser.js} +0 -0
- /package/bin/libs/sdk/sdk-impl/{spells/spells-types.js → spell/spell-types.js} +0 -0
- /package/bin/libs/sdk/{sdk-main.js → sdk-mod.js} +0 -0
- /package/bin/{main.js → mod.js} +0 -0
|
@@ -37,7 +37,7 @@ const TS_VERSION_REGEXES = [
|
|
|
37
37
|
export async function bumpHandler(bumpMode, bumpDisable, commonPubPause, bumpFilter) {
|
|
38
38
|
if (bumpDisable || commonPubPause) {
|
|
39
39
|
relinka(
|
|
40
|
-
"
|
|
40
|
+
"log",
|
|
41
41
|
"Skipping version bump because it is either `bumpDisable: true` or `commonPubPause: true` in your dler config."
|
|
42
42
|
);
|
|
43
43
|
return;
|
|
@@ -55,7 +55,7 @@ export async function bumpHandler(bumpMode, bumpDisable, commonPubPause, bumpFil
|
|
|
55
55
|
throw new Error(`Invalid existing version in package.json: ${oldVersion}`);
|
|
56
56
|
}
|
|
57
57
|
relinka(
|
|
58
|
-
"
|
|
58
|
+
"log",
|
|
59
59
|
`Auto-incrementing version from ${oldVersion} using "${bumpMode}"`
|
|
60
60
|
);
|
|
61
61
|
const incremented = autoIncrementVersion(oldVersion, bumpMode);
|
|
@@ -63,7 +63,7 @@ export async function bumpHandler(bumpMode, bumpDisable, commonPubPause, bumpFil
|
|
|
63
63
|
await bumpVersions(oldVersion, incremented, bumpFilter);
|
|
64
64
|
await setBumpDisabled(true, commonPubPause);
|
|
65
65
|
} else {
|
|
66
|
-
relinka("
|
|
66
|
+
relinka("log", `Version is already at ${oldVersion}, no bump needed.`);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
export async function setBumpDisabled(value, commonPubPause) {
|
|
@@ -72,7 +72,7 @@ export async function setBumpDisabled(value, commonPubPause) {
|
|
|
72
72
|
}
|
|
73
73
|
const dlerCfgPath = path.join(PROJECT_ROOT, ".config/dler.ts");
|
|
74
74
|
if (!await fs.pathExists(dlerCfgPath)) {
|
|
75
|
-
relinka("
|
|
75
|
+
relinka("log", "No .config/dler.ts found to update bumpDisable");
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
let content = await readFileSafe(dlerCfgPath, "", "bumpDisable update");
|
|
@@ -157,11 +157,8 @@ ${filesToDelete.join("\n")}`);
|
|
|
157
157
|
await pMap(snapshotDirs, async (dir) => fs.remove(dir), {
|
|
158
158
|
concurrency: CONCURRENCY_DEFAULT
|
|
159
159
|
});
|
|
160
|
-
relinka(
|
|
161
|
-
|
|
162
|
-
`Deleted snapshot directories:
|
|
163
|
-
${snapshotDirs.join("\n")}`
|
|
164
|
-
);
|
|
160
|
+
relinka("log", `Deleted snapshot directories:
|
|
161
|
+
${snapshotDirs.join("\n")}`);
|
|
165
162
|
}
|
|
166
163
|
}
|
|
167
164
|
export async function readFileSafe(filePath, isJsr, reason) {
|
|
@@ -19,22 +19,22 @@ export async function finalizeBuild(timer, commonPubPause, libsList, distNpmDirN
|
|
|
19
19
|
});
|
|
20
20
|
if (!commonPubPause) {
|
|
21
21
|
relinka(
|
|
22
|
-
"
|
|
22
|
+
"info",
|
|
23
23
|
`\u{1F389} Build and publishing completed successfully (in ${transpileFormattedTime})`
|
|
24
24
|
);
|
|
25
25
|
} else {
|
|
26
26
|
relinka(
|
|
27
|
-
"
|
|
27
|
+
"info",
|
|
28
28
|
`\u{1F389} Test build completed successfully (in ${transpileFormattedTime})`
|
|
29
29
|
);
|
|
30
30
|
if (!isDev) {
|
|
31
31
|
relinka(
|
|
32
|
-
"
|
|
32
|
+
"warn",
|
|
33
33
|
"\u{1F4DD} Publish process is currently paused in your config file"
|
|
34
34
|
);
|
|
35
35
|
} else {
|
|
36
36
|
relinka(
|
|
37
|
-
"
|
|
37
|
+
"warn",
|
|
38
38
|
"\u{1F4DD} Publish is paused, you're in dev mode (use `bun pub` to publish)"
|
|
39
39
|
);
|
|
40
40
|
}
|
|
@@ -5,7 +5,7 @@ import path from "pathe";
|
|
|
5
5
|
import { readPackageJSON } from "pkg-types";
|
|
6
6
|
import { glob } from "tinyglobby";
|
|
7
7
|
import { cliDomainDocs, CONCURRENCY_DEFAULT } from "./utils-consts.js";
|
|
8
|
-
export async function createJsrJSON(outDirRoot, isLib, libName = "unknown-lib-name", libDescription = "unknown-lib-description") {
|
|
8
|
+
export async function createJsrJSON(outDirRoot, isLib, libName = "unknown-lib-name", libDescription = "unknown-lib-description", coreDescription) {
|
|
9
9
|
relinka("verbose", `Creating jsr.json configuration (isLib: ${isLib})`);
|
|
10
10
|
const originalPkg = await readPackageJSON();
|
|
11
11
|
let { description, name } = originalPkg;
|
|
@@ -13,12 +13,14 @@ export async function createJsrJSON(outDirRoot, isLib, libName = "unknown-lib-na
|
|
|
13
13
|
if (isLib) {
|
|
14
14
|
name = libName;
|
|
15
15
|
description = libDescription;
|
|
16
|
+
} else {
|
|
17
|
+
description = coreDescription || description;
|
|
16
18
|
}
|
|
17
19
|
const pkgHomepage = cliDomainDocs;
|
|
18
20
|
const jsrConfig = {
|
|
19
21
|
author,
|
|
20
22
|
description,
|
|
21
|
-
exports: "./bin/
|
|
23
|
+
exports: "./bin/mod.ts",
|
|
22
24
|
homepage: pkgHomepage,
|
|
23
25
|
license: license || "MIT",
|
|
24
26
|
name,
|
|
@@ -545,11 +545,11 @@ export async function convertImportPaths(options) {
|
|
|
545
545
|
throw error;
|
|
546
546
|
}
|
|
547
547
|
relinka(
|
|
548
|
-
"
|
|
548
|
+
"log",
|
|
549
549
|
`Starting import path conversion (${fromType} -> ${toType}) in directory: ${baseDir}`
|
|
550
550
|
);
|
|
551
551
|
if (distJsrDryRun) {
|
|
552
|
-
relinka("
|
|
552
|
+
relinka("log", "Dry run mode enabled: No files will be modified.");
|
|
553
553
|
}
|
|
554
554
|
const fileProcessor = async (filePath) => {
|
|
555
555
|
return processFileContent(
|
|
@@ -585,7 +585,7 @@ export async function convertImportPaths(options) {
|
|
|
585
585
|
).length;
|
|
586
586
|
const errorResults = results.filter((r) => !r.success);
|
|
587
587
|
relinka(
|
|
588
|
-
"
|
|
588
|
+
"log",
|
|
589
589
|
`Import path conversion finished. ${successCount} files processed successfully (${changedCount} modified), ${errorResults.length} errors.`
|
|
590
590
|
);
|
|
591
591
|
for (const result of errorResults) {
|
|
@@ -618,11 +618,11 @@ export async function convertImportExtensionsJsToTs(options) {
|
|
|
618
618
|
throw error;
|
|
619
619
|
}
|
|
620
620
|
relinka(
|
|
621
|
-
"
|
|
621
|
+
"log",
|
|
622
622
|
`Starting .js -> .ts import extension conversion in directory: ${absoluteDirPath}`
|
|
623
623
|
);
|
|
624
624
|
if (distJsrDryRun) {
|
|
625
|
-
relinka("
|
|
625
|
+
relinka("log", "Dry run mode enabled: No files will be modified.");
|
|
626
626
|
}
|
|
627
627
|
const fileProcessor = async (filePath) => {
|
|
628
628
|
return processFileContent(
|
|
@@ -645,7 +645,7 @@ export async function convertImportExtensionsJsToTs(options) {
|
|
|
645
645
|
).length;
|
|
646
646
|
const errorResults = results.filter((r) => !r.success);
|
|
647
647
|
relinka(
|
|
648
|
-
"
|
|
648
|
+
"log",
|
|
649
649
|
`Extension conversion finished. ${successCount} files processed successfully (${changedCount} modified), ${errorResults.length} errors.`
|
|
650
650
|
);
|
|
651
651
|
for (const result of errorResults) {
|
|
@@ -103,7 +103,7 @@ async function library_getlibPkgKeepDeps(libName, originalDeps, outDirBin, isJsr
|
|
|
103
103
|
return result2;
|
|
104
104
|
}
|
|
105
105
|
if (libConfig.libPkgKeepDeps === true) {
|
|
106
|
-
relinka("
|
|
106
|
+
relinka("log", `Preserving all dependencies for lib ${libName}`);
|
|
107
107
|
const originalPkg = await readPackageJSON();
|
|
108
108
|
const devDeps = originalDeps === originalPkg.devDependencies;
|
|
109
109
|
const result2 = Object.entries(originalDeps).reduce(
|
|
@@ -129,7 +129,7 @@ async function library_getlibPkgKeepDeps(libName, originalDeps, outDirBin, isJsr
|
|
|
129
129
|
}
|
|
130
130
|
if (Array.isArray(libConfig.libPkgKeepDeps)) {
|
|
131
131
|
relinka(
|
|
132
|
-
"
|
|
132
|
+
"log",
|
|
133
133
|
`Including specific dependencies for lib ${libName}: ${libConfig.libPkgKeepDeps.join(", ")}`
|
|
134
134
|
);
|
|
135
135
|
const result2 = Object.entries(originalDeps).reduce(
|
|
@@ -189,7 +189,7 @@ async function library_writeJsrPackageJSON(libName, outDirBin, outDirRoot, origi
|
|
|
189
189
|
libDeclarations: false,
|
|
190
190
|
libDescription: "",
|
|
191
191
|
libDirName: libName,
|
|
192
|
-
libMainFile: "src/libs/libName/libName-
|
|
192
|
+
libMainFile: "src/libs/libName/libName-mod.ts",
|
|
193
193
|
libPkgKeepDeps: false,
|
|
194
194
|
libTranspileMinify: true
|
|
195
195
|
},
|
|
@@ -205,7 +205,7 @@ async function library_writeJsrPackageJSON(libName, outDirBin, outDirRoot, origi
|
|
|
205
205
|
rmDepsPatterns
|
|
206
206
|
),
|
|
207
207
|
exports: {
|
|
208
|
-
".": "./bin/
|
|
208
|
+
".": "./bin/mod.ts"
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
211
|
await fs.writeJSON(path.join(outDirRoot, "package.json"), jsrPkg, {
|
|
@@ -229,7 +229,7 @@ async function library_writeNpmLibPackageJSON(libName, outDirBin, outDirRoot, or
|
|
|
229
229
|
libDeclarations: true,
|
|
230
230
|
libDescription: "",
|
|
231
231
|
libDirName: libName,
|
|
232
|
-
libMainFile: "src/libs/libName/libName-
|
|
232
|
+
libMainFile: "src/libs/libName/libName-mod.ts",
|
|
233
233
|
libPkgKeepDeps: true,
|
|
234
234
|
libTranspileMinify: true
|
|
235
235
|
},
|
|
@@ -245,11 +245,11 @@ async function library_writeNpmLibPackageJSON(libName, outDirBin, outDirRoot, or
|
|
|
245
245
|
rmDepsPatterns
|
|
246
246
|
),
|
|
247
247
|
exports: {
|
|
248
|
-
".": `./bin/
|
|
248
|
+
".": `./bin/mod.${unifiedBundlerOutExt}`
|
|
249
249
|
},
|
|
250
250
|
files: ["bin", "package.json", "README.md", "LICENSE"],
|
|
251
|
-
main: `./bin/
|
|
252
|
-
module: `./bin/
|
|
251
|
+
main: `./bin/mod.${unifiedBundlerOutExt}`,
|
|
252
|
+
module: `./bin/mod.${unifiedBundlerOutExt}`,
|
|
253
253
|
publishConfig: { access: "public" }
|
|
254
254
|
});
|
|
255
255
|
await fs.writeJSON(path.join(outDirRoot, "package.json"), npmPkg, {
|
|
@@ -6,12 +6,15 @@ import {
|
|
|
6
6
|
readPackageJSON
|
|
7
7
|
} from "pkg-types";
|
|
8
8
|
import { cliDomainDocs } from "./utils-consts.js";
|
|
9
|
-
export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, unifiedBundlerOutExt, rmDepsMode, rmDepsPatterns) {
|
|
9
|
+
export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, unifiedBundlerOutExt, rmDepsMode, rmDepsPatterns, coreDescription) {
|
|
10
10
|
relinka(
|
|
11
|
-
"
|
|
11
|
+
"log",
|
|
12
12
|
`Generating distribution package.json and tsconfig.json (isJsr=${isJsr})...`
|
|
13
13
|
);
|
|
14
|
-
const commonPkg = await regular_createCommonPackageFields(
|
|
14
|
+
const commonPkg = await regular_createCommonPackageFields(
|
|
15
|
+
coreIsCLI,
|
|
16
|
+
coreDescription
|
|
17
|
+
);
|
|
15
18
|
const originalPkg = await readPackageJSON();
|
|
16
19
|
const packageName = originalPkg.name || "";
|
|
17
20
|
const cliCommandName = packageName.startsWith("@") ? packageName.split("/").pop() || "cli" : packageName;
|
|
@@ -22,11 +25,11 @@ export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, un
|
|
|
22
25
|
const outDirBin = path.join(outDirRoot, "bin");
|
|
23
26
|
const outExt = unifiedBundlerOutExt || "js";
|
|
24
27
|
if (isJsr) {
|
|
25
|
-
const binEntry = coreIsCLI ? { [cliCommandName]: "bin/
|
|
28
|
+
const binEntry = coreIsCLI ? { [cliCommandName]: "bin/mod.ts" } : void 0;
|
|
26
29
|
if (coreIsCLI) {
|
|
27
30
|
relinka(
|
|
28
31
|
"verbose",
|
|
29
|
-
`Adding CLI bin entry for JSR: { "${cliCommandName}": "bin/
|
|
32
|
+
`Adding CLI bin entry for JSR: { "${cliCommandName}": "bin/mod.ts" }`
|
|
30
33
|
);
|
|
31
34
|
}
|
|
32
35
|
const jsrPkg = definePackageJSON({
|
|
@@ -47,7 +50,7 @@ export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, un
|
|
|
47
50
|
rmDepsPatterns
|
|
48
51
|
),
|
|
49
52
|
exports: {
|
|
50
|
-
".": "./bin/
|
|
53
|
+
".": "./bin/mod.ts"
|
|
51
54
|
}
|
|
52
55
|
});
|
|
53
56
|
await fs.writeJSON(path.join(outDirRoot, "package.json"), jsrPkg, {
|
|
@@ -60,11 +63,11 @@ export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, un
|
|
|
60
63
|
);
|
|
61
64
|
}
|
|
62
65
|
} else {
|
|
63
|
-
const binEntry = coreIsCLI ? { [cliCommandName]: `bin/
|
|
66
|
+
const binEntry = coreIsCLI ? { [cliCommandName]: `bin/mod.${outExt}` } : void 0;
|
|
64
67
|
if (coreIsCLI) {
|
|
65
68
|
relinka(
|
|
66
69
|
"verbose",
|
|
67
|
-
`Adding CLI bin entry for NPM: { "${cliCommandName}": "bin/
|
|
70
|
+
`Adding CLI bin entry for NPM: { "${cliCommandName}": "bin/mod.${outExt}" }`
|
|
68
71
|
);
|
|
69
72
|
}
|
|
70
73
|
const npmPkg = definePackageJSON({
|
|
@@ -85,11 +88,11 @@ export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, un
|
|
|
85
88
|
rmDepsPatterns
|
|
86
89
|
),
|
|
87
90
|
exports: {
|
|
88
|
-
".": `./bin/
|
|
91
|
+
".": `./bin/mod.${outExt}`
|
|
89
92
|
},
|
|
90
93
|
files: ["bin", "package.json", "README.md", "LICENSE"],
|
|
91
|
-
main: `./bin/
|
|
92
|
-
module: `./bin/
|
|
94
|
+
main: `./bin/mod.${outExt}`,
|
|
95
|
+
module: `./bin/mod.${outExt}`,
|
|
93
96
|
publishConfig: { access: "public" }
|
|
94
97
|
});
|
|
95
98
|
await fs.writeJSON(path.join(outDirRoot, "package.json"), npmPkg, {
|
|
@@ -104,7 +107,7 @@ export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, un
|
|
|
104
107
|
}
|
|
105
108
|
relinka("verbose", `Created package.json in ${outDirRoot}`);
|
|
106
109
|
}
|
|
107
|
-
async function regular_createCommonPackageFields(coreIsCLI) {
|
|
110
|
+
async function regular_createCommonPackageFields(coreIsCLI, coreDescription) {
|
|
108
111
|
relinka("verbose", "Generating common package fields");
|
|
109
112
|
const originalPkg = await readPackageJSON();
|
|
110
113
|
const { author, description, keywords, license, name, version } = originalPkg;
|
|
@@ -112,7 +115,7 @@ async function regular_createCommonPackageFields(coreIsCLI) {
|
|
|
112
115
|
const pkgHomepage = cliDomainDocs;
|
|
113
116
|
const commonPkg = {
|
|
114
117
|
dependencies: originalPkg.dependencies || {},
|
|
115
|
-
description,
|
|
118
|
+
description: coreDescription || description,
|
|
116
119
|
homepage: pkgHomepage,
|
|
117
120
|
license: license || "MIT",
|
|
118
121
|
name,
|
package/bin/load.js
CHANGED
package/bin/tools.txt
CHANGED
|
@@ -60,7 +60,7 @@ const tools = defineCommand()
|
|
|
60
60
|
}
|
|
61
61
|
if (!TOOLS.includes(args.tool as string)) {
|
|
62
62
|
relinka("error", `Error: Invalid tool: ${args.tool}`);
|
|
63
|
-
relinka("
|
|
63
|
+
relinka("log", `Available tools: ${TOOLS.join(", ")}`);
|
|
64
64
|
printUsage(isDev);
|
|
65
65
|
process.exit(1);
|
|
66
66
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@reliverse/relico": "^1.1.
|
|
4
|
-
"@reliverse/relinka": "^1.4.
|
|
3
|
+
"@reliverse/relico": "^1.1.1",
|
|
4
|
+
"@reliverse/relinka": "^1.4.2",
|
|
5
5
|
"@reliverse/rempts": "^1.6.2",
|
|
6
6
|
"@rollup/plugin-alias": "^5.1.1",
|
|
7
7
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
10
10
|
"@rollup/plugin-replace": "^6.0.2",
|
|
11
11
|
"@rollup/pluginutils": "^5.1.4",
|
|
12
|
-
"bun": "^1.2.
|
|
12
|
+
"bun": "^1.2.13",
|
|
13
13
|
"chalk": "^5.4.1",
|
|
14
14
|
"commander": "^13.1.0",
|
|
15
15
|
"defu": "^6.1.4",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"rollup": "^4.40.2",
|
|
33
33
|
"rollup-plugin-dts": "^6.2.1",
|
|
34
34
|
"scule": "^1.3.0",
|
|
35
|
-
"semver": "^7.7.
|
|
35
|
+
"semver": "^7.7.2",
|
|
36
36
|
"tinyglobby": "^0.2.13",
|
|
37
37
|
"untyped": "^2.0.0"
|
|
38
38
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"name": "@reliverse/dler",
|
|
43
43
|
"type": "module",
|
|
44
|
-
"version": "1.2.
|
|
44
|
+
"version": "1.2.2",
|
|
45
45
|
"keywords": [
|
|
46
46
|
"reliverse",
|
|
47
47
|
"cli",
|
|
@@ -58,26 +58,26 @@
|
|
|
58
58
|
"url": "git+https://github.com/reliverse/dler.git"
|
|
59
59
|
},
|
|
60
60
|
"bin": {
|
|
61
|
-
"dler": "bin/
|
|
61
|
+
"dler": "bin/mod.js"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@biomejs/biome": "^1.9.4",
|
|
65
65
|
"@eslint/js": "^9.26.0",
|
|
66
66
|
"@stylistic/eslint-plugin": "^4.2.0",
|
|
67
67
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
68
|
-
"@types/bun": "^1.2.
|
|
68
|
+
"@types/bun": "^1.2.13",
|
|
69
69
|
"@types/fs-extra": "^11.0.4",
|
|
70
70
|
"@types/node": "^22.15.17",
|
|
71
71
|
"@types/semver": "^7.7.0",
|
|
72
72
|
"eslint": "^9.26.0",
|
|
73
73
|
"eslint-plugin-no-relative-import-paths": "^1.6.1",
|
|
74
|
-
"eslint-plugin-perfectionist": "^4.
|
|
74
|
+
"eslint-plugin-perfectionist": "^4.13.0",
|
|
75
75
|
"knip": "^5.55.1",
|
|
76
76
|
"typescript": "^5.8.3",
|
|
77
|
-
"typescript-eslint": "^8.32.
|
|
77
|
+
"typescript-eslint": "^8.32.1"
|
|
78
78
|
},
|
|
79
79
|
"exports": {
|
|
80
|
-
".": "./bin/
|
|
80
|
+
".": "./bin/mod.js"
|
|
81
81
|
},
|
|
82
82
|
"files": [
|
|
83
83
|
"bin",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"README.md",
|
|
86
86
|
"LICENSE"
|
|
87
87
|
],
|
|
88
|
-
"main": "./bin/
|
|
89
|
-
"module": "./bin/
|
|
88
|
+
"main": "./bin/mod.js",
|
|
89
|
+
"module": "./bin/mod.js",
|
|
90
90
|
"publishConfig": {
|
|
91
91
|
"access": "public"
|
|
92
92
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import fs from "fs-extra";
|
|
2
|
-
import {
|
|
3
|
-
getAllSourceFiles,
|
|
4
|
-
parseCommandLineArgs,
|
|
5
|
-
splitLargeFileByLines,
|
|
6
|
-
splitLargeFunctions
|
|
7
|
-
} from "./split-mod.js";
|
|
8
|
-
async function main() {
|
|
9
|
-
const { directory, fileLineThreshold, funcLineThreshold } = parseCommandLineArgs();
|
|
10
|
-
const allFiles = getAllSourceFiles(directory);
|
|
11
|
-
for (const filePath of allFiles) {
|
|
12
|
-
const lineCount = fs.readFileSync(filePath, "utf8").split("\n").length;
|
|
13
|
-
if (lineCount > fileLineThreshold) {
|
|
14
|
-
const newSplits = splitLargeFileByLines(filePath, fileLineThreshold);
|
|
15
|
-
newSplits.forEach((splitFilePath) => {
|
|
16
|
-
splitLargeFunctions(splitFilePath, funcLineThreshold);
|
|
17
|
-
});
|
|
18
|
-
} else {
|
|
19
|
-
splitLargeFunctions(filePath, funcLineThreshold);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
main().catch((err) => {
|
|
24
|
-
console.error(err);
|
|
25
|
-
process.exit(1);
|
|
26
|
-
});
|
package/bin/libs/cfg/cfg-main.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { defineConfig } from "./cfg-mod.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{main.js → mod.js}
RENAMED
|
File without changes
|