@reliverse/dler 1.2.6 → 1.3.0
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 +36 -41
- package/bin/addons.d.ts +1 -0
- package/bin/addons.js +83 -0
- package/bin/app/agg/cmd.d.ts +35 -0
- package/bin/app/agg/cmd.js +49 -0
- package/bin/app/agg/impl.d.ts +36 -0
- package/bin/app/{tools → agg}/impl.js +1 -2
- package/bin/app/build/cmd.d.ts +7 -0
- package/bin/app/build/cmd.js +3 -1
- package/bin/app/cmds.d.ts +100 -0
- package/bin/app/cmds.js +11 -2
- package/bin/app/conv/cmd.d.ts +0 -0
- package/bin/app/deps/cmd.d.ts +28 -0
- package/bin/app/deps/cmd.js +62 -0
- package/bin/app/deps/impl/analyzer.d.ts +2 -0
- package/bin/app/deps/impl/analyzer.js +1 -1
- package/bin/app/deps/impl/filesystem.d.ts +4 -0
- package/bin/app/deps/impl/filesystem.js +2 -4
- package/bin/app/deps/impl/formatter.d.ts +2 -0
- package/bin/app/deps/impl/formatter.js +2 -2
- package/bin/app/deps/impl/parser.d.ts +5 -0
- package/bin/app/deps/impl/types.d.ts +21 -0
- package/bin/app/inject/README.md +3 -12
- package/bin/app/inject/cmd.d.ts +12 -0
- package/bin/app/inject/cmd.js +2 -2
- package/bin/app/inject/expect/cmd.d.ts +20 -0
- package/bin/app/inject/expect/impl.d.ts +5 -0
- package/bin/app/libs/cmd.d.ts +0 -0
- package/bin/app/merge/cmd.txt +1 -1
- package/bin/app/mono/cmd.d.ts +0 -0
- package/bin/app/pub/cmd.d.ts +7 -0
- package/bin/app/pub/cmd.js +3 -1
- package/bin/app/relifso/cmd.d.ts +12 -0
- package/bin/app/relifso/cmd.js +2 -2
- package/bin/app/relifso/init/cmd.d.ts +36 -0
- package/bin/app/relifso/init/impl/const.d.ts +34 -0
- package/bin/app/relifso/init/impl/const.js +1 -1
- package/bin/app/relifso/init/impl/mod.d.ts +17 -0
- package/bin/app/relifso/init/impl/templates/t-gitignore.d.ts +1 -0
- package/bin/app/relifso/init/impl/templates/t-license.d.ts +1 -0
- package/bin/app/relifso/init/impl/templates/t-readme.d.ts +1 -0
- package/bin/app/relifso/init/impl/types.d.ts +41 -0
- package/bin/app/relifso/init/impl/utils.d.ts +5 -0
- package/bin/app/relinka/cmd.d.ts +0 -0
- package/bin/app/rempts/init/cmd/cmd.d.ts +14 -0
- package/bin/app/rempts/init/cmd/cmd.js +3 -1
- package/bin/app/rempts/init/cmds/cmd.d.ts +19 -0
- package/bin/app/rempts/migrate/cmd.d.ts +14 -0
- package/bin/app/rempts/migrate/impl/commander.d.ts +4 -0
- package/bin/app/spell/cmd.d.ts +18 -0
- package/bin/app/spell/cmd.js +51 -0
- package/bin/app/split/cmd.d.ts +11 -0
- package/bin/app/split/impl.d.ts +25 -0
- package/bin/default.d.ts +5 -0
- package/bin/{libs/cfg/cfg-default.js → default.js} +6 -4
- package/bin/dler.d.ts +1 -0
- package/bin/dler.js +60 -0
- package/bin/impl.d.ts +10 -0
- package/bin/{cli.js → impl.js} +15 -27
- package/bin/info.d.ts +2 -0
- package/bin/info.js +21 -0
- package/bin/init.d.ts +1 -0
- package/bin/init.js +20 -27
- package/bin/libs/sdk/sdk-impl/build/build-library.d.ts +51 -0
- package/bin/libs/sdk/sdk-impl/build/build-library.js +45 -66
- package/bin/libs/sdk/sdk-impl/build/build-regular.d.ts +26 -0
- package/bin/libs/sdk/sdk-impl/build/build-regular.js +28 -18
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/auto.d.ts +2 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/auto.js +8 -3
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.js +12 -7
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/copy/copy.d.ts +2 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/copy/copy.js +2 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/copy/types.d.ts +9 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist.d.ts +2 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist.js +22 -6
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/types.d.ts +15 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/build.d.ts +2 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/build.js +2 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/config.d.ts +2 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/cjs.d.ts +4 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/esbuild.d.ts +13 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/json.d.ts +3 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/raw.d.ts +8 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/shebang.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/stub.d.ts +2 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/types.d.ts +95 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/utils.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/watch.d.ts +2 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/types.d.ts +176 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/untyped/index.d.ts +2 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/untyped/index.js +2 -2
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/untyped/types.d.ts +23 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/utils.d.ts +20 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/validate.d.ts +4 -0
- package/bin/libs/sdk/sdk-impl/library-flow.d.ts +11 -0
- package/bin/libs/sdk/sdk-impl/library-flow.js +6 -1
- package/bin/libs/sdk/sdk-impl/pub/pub-library.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/pub/pub-library.js +6 -16
- package/bin/libs/sdk/sdk-impl/pub/pub-regular.d.ts +9 -0
- package/bin/libs/sdk/sdk-impl/pub/pub-regular.js +12 -10
- package/bin/libs/sdk/sdk-impl/regular-flow.d.ts +12 -0
- package/bin/libs/sdk/sdk-impl/regular-flow.js +45 -51
- package/bin/libs/sdk/sdk-impl/spell/spell-executors.d.ts +10 -0
- package/bin/libs/sdk/sdk-impl/spell/spell-filesystem.d.ts +7 -0
- package/bin/libs/sdk/sdk-impl/spell/spell-mod.d.ts +4 -0
- package/bin/libs/sdk/sdk-impl/spell/spell-parser.d.ts +4 -0
- package/bin/libs/sdk/sdk-impl/spell/spell-types.d.ts +34 -0
- package/bin/libs/sdk/sdk-impl/utils/tools/tools-agg.d.ts +14 -0
- package/bin/libs/sdk/sdk-impl/utils/tools/tools-agg.js +8 -6
- package/bin/libs/sdk/sdk-impl/utils/tools/tools-impl.d.ts +4 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-build.d.ts +28 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-build.js +3 -3
- package/bin/libs/sdk/sdk-impl/utils/utils-bump.d.ts +9 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-bump.js +5 -7
- package/bin/libs/sdk/sdk-impl/utils/utils-clean.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-consts.d.ts +9 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-cwd.d.ts +10 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-deps.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-determine.d.ts +12 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-error.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-fs.d.ts +24 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-fs.js +4 -1
- package/bin/libs/sdk/sdk-impl/utils/utils-info.d.ts +6 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-info.js +7 -14
- package/bin/libs/sdk/sdk-impl/utils/utils-jsr-json.d.ts +8 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-jsr-json.js +2 -4
- package/bin/libs/sdk/sdk-impl/utils/utils-paths.d.ts +55 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-paths.js +33 -24
- package/bin/libs/sdk/sdk-impl/utils/utils-perf.d.ts +9 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-libs.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-reg.d.ts +8 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-reg.js +36 -27
- package/bin/libs/sdk/sdk-impl/utils/utils-tsconfig.d.ts +4 -0
- package/bin/libs/sdk/sdk-mod.d.ts +56 -0
- package/bin/libs/sdk/sdk-mod.js +42 -9
- package/bin/libs/sdk/sdk-types.d.ts +469 -0
- package/bin/libs/sdk/sdk-types.js +0 -1
- package/bin/load.d.ts +6 -0
- package/bin/load.js +1 -1
- package/bin/mod.d.ts +48 -0
- package/bin/mod.js +4 -14
- package/bin/types.d.ts +469 -0
- package/package.json +5 -4
- package/bin/app/tools/cmd.js +0 -81
- package/bin/app/tools/tools.txt +0 -92
- package/bin/libs/cfg/cfg-mod.js +0 -4
- package/bin/libs/cfg/cfg-types.js +0 -1
|
@@ -119,7 +119,7 @@ export async function libraries_buildPublish(isDev, timer, libsList, distJsrDryR
|
|
|
119
119
|
transpileStub,
|
|
120
120
|
transpileWatch
|
|
121
121
|
});
|
|
122
|
-
if (!commonPubPause) {
|
|
122
|
+
if (!commonPubPause && !libConfig.libPubPause) {
|
|
123
123
|
await library_publishLibrary(
|
|
124
124
|
commonPubRegistry,
|
|
125
125
|
libName,
|
|
@@ -132,6 +132,11 @@ export async function libraries_buildPublish(isDev, timer, libsList, distJsrDryR
|
|
|
132
132
|
isDev,
|
|
133
133
|
timer
|
|
134
134
|
);
|
|
135
|
+
} else if (libConfig.libPubPause && !commonPubPause) {
|
|
136
|
+
relinka(
|
|
137
|
+
"log",
|
|
138
|
+
`Publishing is paused for lib ${libName} (libPubPause: true)`
|
|
139
|
+
);
|
|
135
140
|
}
|
|
136
141
|
} catch (error) {
|
|
137
142
|
relinka(
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type PerfTimer } from "../utils/utils-perf.js";
|
|
2
|
+
/**
|
|
3
|
+
* Publishes a library to the specified commonPubRegistry.
|
|
4
|
+
*/
|
|
5
|
+
export declare function library_publishLibrary(commonPubRegistry: string | undefined, libName: string, npmOutDir: string, jsrOutDir: string, distJsrDryRun: boolean, distJsrFailOnWarn: boolean, distJsrAllowDirty: boolean, distJsrSlowTypes: boolean, isDev: boolean, timer: PerfTimer): Promise<void>;
|
|
@@ -8,13 +8,6 @@ import {
|
|
|
8
8
|
resumePerfTimer
|
|
9
9
|
} from "../utils/utils-perf.js";
|
|
10
10
|
export async function library_publishLibrary(commonPubRegistry, libName, npmOutDir, jsrOutDir, distJsrDryRun, distJsrFailOnWarn, distJsrAllowDirty, distJsrSlowTypes, isDev, timer) {
|
|
11
|
-
if (isDev) {
|
|
12
|
-
relinka(
|
|
13
|
-
"log",
|
|
14
|
-
`Skipping publishing for lib ${libName} in development mode`
|
|
15
|
-
);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
11
|
switch (commonPubRegistry) {
|
|
19
12
|
case "jsr":
|
|
20
13
|
relinka("log", `Publishing lib ${libName} to JSR only...`);
|
|
@@ -74,10 +67,6 @@ export async function library_publishLibrary(commonPubRegistry, libName, npmOutD
|
|
|
74
67
|
}
|
|
75
68
|
async function library_pubToJsr(libOutDir, distJsrDryRun, distJsrFailOnWarn, distJsrAllowDirty, distJsrSlowTypes, libName, isDev, timer) {
|
|
76
69
|
relinka("verbose", `Starting library_pubToJsr for lib: ${libName}`);
|
|
77
|
-
if (isDev) {
|
|
78
|
-
relinka("log", `Skipping lib ${libName} JSR publish in development mode`);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
70
|
try {
|
|
82
71
|
if (timer) pausePerfTimer(timer);
|
|
83
72
|
await withWorkingDirectory(libOutDir, async () => {
|
|
@@ -89,7 +78,12 @@ async function library_pubToJsr(libOutDir, distJsrDryRun, distJsrFailOnWarn, dis
|
|
|
89
78
|
distJsrAllowDirty ? "--allow-dirty" : "",
|
|
90
79
|
distJsrSlowTypes ? "--allow-slow-types" : ""
|
|
91
80
|
].filter(Boolean).join(" ");
|
|
92
|
-
|
|
81
|
+
try {
|
|
82
|
+
await execaCommand(command, { stdio: "inherit" });
|
|
83
|
+
} catch (error) {
|
|
84
|
+
relinka("error", `Failed to publish lib ${libName} to JSR`, error);
|
|
85
|
+
throw error;
|
|
86
|
+
}
|
|
93
87
|
relinka(
|
|
94
88
|
"success",
|
|
95
89
|
`Successfully ${distJsrDryRun ? "validated" : "published"} lib ${libName} to JSR registry`
|
|
@@ -106,10 +100,6 @@ async function library_pubToJsr(libOutDir, distJsrDryRun, distJsrFailOnWarn, dis
|
|
|
106
100
|
}
|
|
107
101
|
async function library_pubToNpm(libOutDir, distJsrDryRun, distJsrFailOnWarn, libName, isDev, timer) {
|
|
108
102
|
relinka("verbose", `Starting library_pubToNpm for lib: ${libName}`);
|
|
109
|
-
if (isDev) {
|
|
110
|
-
relinka("log", `Skipping lib ${libName} NPM publish in development mode`);
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
103
|
try {
|
|
114
104
|
if (timer) pausePerfTimer(timer);
|
|
115
105
|
await withWorkingDirectory(libOutDir, async () => {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PerfTimer } from "../utils/utils-perf.js";
|
|
2
|
+
/**
|
|
3
|
+
* Publishes the JSR distribution.
|
|
4
|
+
*/
|
|
5
|
+
export declare function regular_pubToJsr(distJsrDryRun: boolean, distJsrFailOnWarn: boolean, isDev: boolean, commonPubPause: boolean, distJsrDirName: string, distJsrAllowDirty: boolean, distJsrSlowTypes: boolean, timer: PerfTimer): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Publishes the NPM distribution.
|
|
8
|
+
*/
|
|
9
|
+
export declare function regular_pubToNpm(distJsrDryRun: boolean, isDev: boolean, commonPubPause: boolean, distNpmDirName: string, timer: PerfTimer): Promise<void>;
|
|
@@ -9,10 +9,6 @@ import {
|
|
|
9
9
|
} from "../utils/utils-perf.js";
|
|
10
10
|
export async function regular_pubToJsr(distJsrDryRun, distJsrFailOnWarn, isDev, commonPubPause, distJsrDirName, distJsrAllowDirty, distJsrSlowTypes, timer) {
|
|
11
11
|
try {
|
|
12
|
-
if (isDev) {
|
|
13
|
-
relinka("log", "Skipping JSR publish in development mode");
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
12
|
if (!commonPubPause) {
|
|
17
13
|
relinka("log", "Publishing to JSR...");
|
|
18
14
|
const distJsrDirNameResolved = path.resolve(PROJECT_ROOT, distJsrDirName);
|
|
@@ -26,7 +22,12 @@ export async function regular_pubToJsr(distJsrDryRun, distJsrFailOnWarn, isDev,
|
|
|
26
22
|
distJsrSlowTypes ? "--allow-slow-types" : ""
|
|
27
23
|
].filter(Boolean).join(" ");
|
|
28
24
|
relinka("verbose", `Running publish command: ${command}`);
|
|
29
|
-
|
|
25
|
+
try {
|
|
26
|
+
await execaCommand(command, { stdio: "inherit" });
|
|
27
|
+
} catch (error) {
|
|
28
|
+
relinka("error", `Failed to publish main project to JSR: ${error}`);
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
30
31
|
relinka(
|
|
31
32
|
"success",
|
|
32
33
|
`Successfully ${distJsrDryRun ? "validated" : "published"} to JSR registry`
|
|
@@ -42,10 +43,6 @@ export async function regular_pubToJsr(distJsrDryRun, distJsrFailOnWarn, isDev,
|
|
|
42
43
|
}
|
|
43
44
|
export async function regular_pubToNpm(distJsrDryRun, isDev, commonPubPause, distNpmDirName, timer) {
|
|
44
45
|
try {
|
|
45
|
-
if (isDev) {
|
|
46
|
-
relinka("log", "Skipping NPM publish in development mode");
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
46
|
if (!commonPubPause) {
|
|
50
47
|
relinka("log", "Publishing to NPM...");
|
|
51
48
|
const distNpmDirNameResolved = path.resolve(PROJECT_ROOT, distNpmDirName);
|
|
@@ -53,7 +50,12 @@ export async function regular_pubToNpm(distJsrDryRun, isDev, commonPubPause, dis
|
|
|
53
50
|
await withWorkingDirectory(distNpmDirNameResolved, async () => {
|
|
54
51
|
const command = ["bun publish", distJsrDryRun ? "--dry-run" : ""].filter(Boolean).join(" ");
|
|
55
52
|
relinka("verbose", `Running publish command: ${command}`);
|
|
56
|
-
|
|
53
|
+
try {
|
|
54
|
+
await execaCommand(command, { stdio: "inherit" });
|
|
55
|
+
} catch (error) {
|
|
56
|
+
relinka("error", `Failed to publish main project to NPM: ${error}`);
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
57
59
|
relinka(
|
|
58
60
|
"success",
|
|
59
61
|
`Successfully ${distJsrDryRun ? "validated" : "published"} to NPM registry`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BundlerName, ExcludeMode, NpmOutExt, Sourcemap, transpileFormat, transpileTarget } from "../sdk-types.js";
|
|
2
|
+
import type { PerfTimer } from "./utils/utils-perf.js";
|
|
3
|
+
/**
|
|
4
|
+
* Processes the main project based on build mode and commonPubRegistry.
|
|
5
|
+
*/
|
|
6
|
+
export declare function processRegularFlow(timer: PerfTimer, isDev: boolean, coreIsCLI: {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
scripts: Record<string, string>;
|
|
9
|
+
}, libsActMode: string, commonPubRegistry: string, coreEntrySrcDir: string, distNpmDirName: string, distNpmBuilder: BundlerName, coreEntryFile: string, distJsrDryRun: boolean, distJsrFailOnWarn: boolean, commonPubPause: boolean, distJsrDirName: string, distJsrBuilder: BundlerName, transpileTarget: transpileTarget, transpileFormat: transpileFormat, transpileSplitting: boolean, transpileMinify: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, distJsrAllowDirty: boolean, distJsrSlowTypes: boolean, distNpmOutFilesExt: NpmOutExt, rmDepsMode: ExcludeMode, transpileStub: boolean, transpileWatch: boolean, distJsrGenTsconfig: boolean, coreDeclarations: boolean, config: {
|
|
10
|
+
coreDescription: string;
|
|
11
|
+
coreBuildOutDir: string;
|
|
12
|
+
}): Promise<void>;
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./build/build-regular.js";
|
|
7
7
|
import { regular_pubToJsr, regular_pubToNpm } from "./pub/pub-regular.js";
|
|
8
8
|
import { CONCURRENCY_DEFAULT } from "./utils/utils-consts.js";
|
|
9
|
-
export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, commonPubRegistry, coreEntrySrcDir, distNpmDirName, distNpmBuilder, coreEntryFile, distJsrDryRun, distJsrFailOnWarn, commonPubPause, distJsrDirName, distJsrBuilder, transpileTarget, transpileFormat, transpileSplitting, transpileMinify, transpileSourcemap, transpilePublicPath, distJsrAllowDirty, distJsrSlowTypes,
|
|
10
|
-
if (libsActMode
|
|
9
|
+
export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, commonPubRegistry, coreEntrySrcDir, distNpmDirName, distNpmBuilder, coreEntryFile, distJsrDryRun, distJsrFailOnWarn, commonPubPause, distJsrDirName, distJsrBuilder, transpileTarget, transpileFormat, transpileSplitting, transpileMinify, transpileSourcemap, transpilePublicPath, distJsrAllowDirty, distJsrSlowTypes, distNpmOutFilesExt, rmDepsMode, transpileStub, transpileWatch, distJsrGenTsconfig, coreDeclarations, config) {
|
|
10
|
+
if (libsActMode === "libs-only") {
|
|
11
11
|
relinka(
|
|
12
12
|
"log",
|
|
13
13
|
"Skipping main project build/publish as libsActMode is set to 'libs-only'"
|
|
@@ -34,7 +34,7 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
34
34
|
transpileMinify,
|
|
35
35
|
transpileSourcemap,
|
|
36
36
|
transpilePublicPath,
|
|
37
|
-
|
|
37
|
+
distNpmOutFilesExt,
|
|
38
38
|
rmDepsMode,
|
|
39
39
|
timer,
|
|
40
40
|
transpileStub,
|
|
@@ -43,18 +43,16 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
43
43
|
coreDeclarations,
|
|
44
44
|
config
|
|
45
45
|
);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
);
|
|
57
|
-
}
|
|
46
|
+
await regular_pubToJsr(
|
|
47
|
+
distJsrDryRun,
|
|
48
|
+
distJsrFailOnWarn,
|
|
49
|
+
isDev,
|
|
50
|
+
commonPubPause,
|
|
51
|
+
distJsrDirName,
|
|
52
|
+
distJsrAllowDirty,
|
|
53
|
+
distJsrSlowTypes,
|
|
54
|
+
timer
|
|
55
|
+
);
|
|
58
56
|
break;
|
|
59
57
|
case "npm":
|
|
60
58
|
relinka(
|
|
@@ -67,7 +65,7 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
67
65
|
distNpmDirName,
|
|
68
66
|
distNpmBuilder,
|
|
69
67
|
coreEntryFile,
|
|
70
|
-
|
|
68
|
+
distNpmOutFilesExt,
|
|
71
69
|
rmDepsMode,
|
|
72
70
|
coreIsCLI,
|
|
73
71
|
transpileTarget,
|
|
@@ -82,15 +80,13 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
82
80
|
coreDeclarations,
|
|
83
81
|
config
|
|
84
82
|
);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
);
|
|
93
|
-
}
|
|
83
|
+
await regular_pubToNpm(
|
|
84
|
+
distJsrDryRun,
|
|
85
|
+
isDev,
|
|
86
|
+
commonPubPause,
|
|
87
|
+
distNpmDirName,
|
|
88
|
+
timer
|
|
89
|
+
);
|
|
94
90
|
break;
|
|
95
91
|
case "npm-jsr": {
|
|
96
92
|
relinka(
|
|
@@ -112,7 +108,7 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
112
108
|
transpileMinify,
|
|
113
109
|
transpileSourcemap,
|
|
114
110
|
transpilePublicPath,
|
|
115
|
-
|
|
111
|
+
distNpmOutFilesExt,
|
|
116
112
|
rmDepsMode,
|
|
117
113
|
timer,
|
|
118
114
|
transpileStub,
|
|
@@ -127,7 +123,7 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
127
123
|
distNpmDirName,
|
|
128
124
|
distNpmBuilder,
|
|
129
125
|
coreEntryFile,
|
|
130
|
-
|
|
126
|
+
distNpmOutFilesExt,
|
|
131
127
|
rmDepsMode,
|
|
132
128
|
coreIsCLI,
|
|
133
129
|
transpileTarget,
|
|
@@ -144,28 +140,26 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
144
140
|
)
|
|
145
141
|
];
|
|
146
142
|
await pAll(buildTasks, { concurrency: CONCURRENCY_DEFAULT });
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
await pAll(publishTasks, { concurrency: CONCURRENCY_DEFAULT });
|
|
168
|
-
}
|
|
143
|
+
const publishTasks = [
|
|
144
|
+
() => regular_pubToJsr(
|
|
145
|
+
distJsrDryRun,
|
|
146
|
+
distJsrFailOnWarn,
|
|
147
|
+
isDev,
|
|
148
|
+
commonPubPause,
|
|
149
|
+
distJsrDirName,
|
|
150
|
+
distJsrAllowDirty,
|
|
151
|
+
distJsrSlowTypes,
|
|
152
|
+
timer
|
|
153
|
+
),
|
|
154
|
+
() => regular_pubToNpm(
|
|
155
|
+
distJsrDryRun,
|
|
156
|
+
isDev,
|
|
157
|
+
commonPubPause,
|
|
158
|
+
distNpmDirName,
|
|
159
|
+
timer
|
|
160
|
+
)
|
|
161
|
+
];
|
|
162
|
+
await pAll(publishTasks, { concurrency: CONCURRENCY_DEFAULT });
|
|
169
163
|
break;
|
|
170
164
|
}
|
|
171
165
|
default: {
|
|
@@ -180,7 +174,7 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
180
174
|
distNpmDirName,
|
|
181
175
|
distNpmBuilder,
|
|
182
176
|
coreEntryFile,
|
|
183
|
-
|
|
177
|
+
distNpmOutFilesExt,
|
|
184
178
|
rmDepsMode,
|
|
185
179
|
coreIsCLI,
|
|
186
180
|
transpileTarget,
|
|
@@ -209,7 +203,7 @@ export async function processRegularFlow(timer, isDev, coreIsCLI, libsActMode, c
|
|
|
209
203
|
transpileMinify,
|
|
210
204
|
transpileSourcemap,
|
|
211
205
|
transpilePublicPath,
|
|
212
|
-
|
|
206
|
+
distNpmOutFilesExt,
|
|
213
207
|
rmDepsMode,
|
|
214
208
|
timer,
|
|
215
209
|
transpileStub,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Spell, SpellResult } from "./spell-types.js";
|
|
2
|
+
export declare const replaceLineExecutor: (spell: Spell, filePath: string, content: string) => Promise<SpellResult>;
|
|
3
|
+
export declare const renameFileExecutor: (spell: Spell, filePath: string) => Promise<SpellResult>;
|
|
4
|
+
export declare const removeCommentExecutor: (spell: Spell, filePath: string, content: string) => Promise<SpellResult>;
|
|
5
|
+
export declare const removeLineExecutor: (spell: Spell, filePath: string, content: string) => Promise<SpellResult>;
|
|
6
|
+
export declare const removeFileExecutor: (spell: Spell, filePath: string) => Promise<SpellResult>;
|
|
7
|
+
export declare const copyFileExecutor: (spell: Spell, filePath: string) => Promise<SpellResult>;
|
|
8
|
+
export declare const moveFileExecutor: (spell: Spell, filePath: string) => Promise<SpellResult>;
|
|
9
|
+
export declare const transformContentExecutor: (spell: Spell, filePath: string, content: string) => Promise<SpellResult>;
|
|
10
|
+
export declare const insertAtExecutor: (spell: Spell, filePath: string, content: string) => Promise<SpellResult>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const fileExists: (filePath: string) => Promise<boolean>;
|
|
2
|
+
export declare const readFile: (filePath: string) => Promise<string>;
|
|
3
|
+
export declare const writeFile: (filePath: string, content: string) => Promise<void>;
|
|
4
|
+
export declare const removeFile: (filePath: string) => Promise<void>;
|
|
5
|
+
export declare const renameFile: (oldPath: string, newPath: string) => Promise<void>;
|
|
6
|
+
export declare const copyFile: (sourcePath: string, targetPath: string) => Promise<void>;
|
|
7
|
+
export declare const findFiles: (patterns: string[], cwd?: string) => Promise<string[]>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Spell, SpellExecutionOptions, SpellResult } from "./spell-types.js";
|
|
2
|
+
export declare const executeSpell: (spell: Spell, filePath: string, content: string) => Promise<SpellResult>;
|
|
3
|
+
export declare const processFile: (filePath: string, options?: SpellExecutionOptions) => Promise<SpellResult[]>;
|
|
4
|
+
export declare const spells: (options?: SpellExecutionOptions) => Promise<SpellResult[]>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Spell, SpellParams } from "./spell-types.js";
|
|
2
|
+
export declare const parseParams: (paramsStr: string | undefined) => SpellParams;
|
|
3
|
+
export declare const parseSpellFromComment: (line: string, lineNumber: number, fileName: string) => Spell | null;
|
|
4
|
+
export declare const extractSpellsFromFile: (filePath: string, content: string) => Promise<Spell[]>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type SpellType = "replace-line" | "rename-file" | "remove-comment" | "remove-line" | "remove-file" | "transform-content" | "copy-file" | "move-file" | "insert-at";
|
|
2
|
+
export type SpellParams = {
|
|
3
|
+
hooked: boolean;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export type Spell = {
|
|
7
|
+
type: SpellType;
|
|
8
|
+
params: SpellParams;
|
|
9
|
+
value?: string;
|
|
10
|
+
lineNumber?: number;
|
|
11
|
+
fullMatch?: string;
|
|
12
|
+
fileName?: string;
|
|
13
|
+
};
|
|
14
|
+
export type SpellExecutionOptions = {
|
|
15
|
+
spells?: (SpellType | "all")[];
|
|
16
|
+
files?: string[];
|
|
17
|
+
dryRun?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type FileOperation = {
|
|
20
|
+
type: "read" | "write" | "rename" | "remove" | "copy" | "move";
|
|
21
|
+
sourcePath: string;
|
|
22
|
+
targetPath?: string;
|
|
23
|
+
content?: string;
|
|
24
|
+
};
|
|
25
|
+
export type SpellResult = {
|
|
26
|
+
spell: Spell;
|
|
27
|
+
file: string;
|
|
28
|
+
success: boolean;
|
|
29
|
+
message?: string;
|
|
30
|
+
changes?: {
|
|
31
|
+
before: string;
|
|
32
|
+
after: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aggregator supporting:
|
|
3
|
+
* - --import or default export,
|
|
4
|
+
* - star or named,
|
|
5
|
+
* - separate "type" vs "value" for both import and export
|
|
6
|
+
*/
|
|
7
|
+
export declare function useAggregator({ inputDir, isRecursive, outFile, stripPrefix, useImport, useNamed, }: {
|
|
8
|
+
inputDir: string;
|
|
9
|
+
isRecursive: boolean;
|
|
10
|
+
outFile: string;
|
|
11
|
+
stripPrefix: string;
|
|
12
|
+
useImport: boolean;
|
|
13
|
+
useNamed: boolean;
|
|
14
|
+
}): Promise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { relinka } from "@reliverse/relinka";
|
|
1
2
|
import fs from "fs-extra";
|
|
2
3
|
import path from "pathe";
|
|
3
4
|
export async function useAggregator({
|
|
@@ -10,13 +11,13 @@ export async function useAggregator({
|
|
|
10
11
|
}) {
|
|
11
12
|
const st = await fs.stat(inputDir).catch(() => null);
|
|
12
13
|
if (!st?.isDirectory()) {
|
|
13
|
-
|
|
14
|
+
relinka("error", `Error: --input is not a valid directory: ${inputDir}`);
|
|
14
15
|
process.exit(1);
|
|
15
16
|
}
|
|
16
17
|
const exts = [".ts", ".js"];
|
|
17
18
|
const filePaths = await collectFiles(inputDir, exts, isRecursive);
|
|
18
19
|
if (!filePaths.length) {
|
|
19
|
-
|
|
20
|
+
relinka("warn", `No matching .ts/.js files found in ${inputDir}`);
|
|
20
21
|
}
|
|
21
22
|
const allLines = [];
|
|
22
23
|
for (const fp of filePaths) {
|
|
@@ -30,7 +31,8 @@ export async function useAggregator({
|
|
|
30
31
|
allLines.push(...lines);
|
|
31
32
|
}
|
|
32
33
|
if (outFile.startsWith(inputDir)) {
|
|
33
|
-
|
|
34
|
+
relinka(
|
|
35
|
+
"warn",
|
|
34
36
|
`Warning: The output file is inside (or overlaps with) the input directory.
|
|
35
37
|
Might re-import (or re-export) itself.
|
|
36
38
|
input: ${inputDir}
|
|
@@ -42,9 +44,9 @@ Might re-import (or re-export) itself.
|
|
|
42
44
|
`;
|
|
43
45
|
await fs.ensureFile(outFile);
|
|
44
46
|
await fs.writeFile(outFile, finalText, "utf8");
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Aggregator done: wrote ${allLines.length} lines to:
|
|
47
|
+
relinka(
|
|
48
|
+
"log",
|
|
49
|
+
`Aggregator done: wrote ${allLines.length} lines to:
|
|
48
50
|
${outFile}`
|
|
49
51
|
);
|
|
50
52
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { NpmOutExt, Sourcemap } from "../../sdk-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Converts the Unified build sourcemap option to a Bun-friendly value.
|
|
4
|
+
* @param transpileSourcemap - The sourcemap configuration ('none', 'inline', 'linked', 'external', true, false).
|
|
5
|
+
* @returns "none", "inline", or "external" for Bun's bundler.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getBunSourcemapOption(transpileSourcemap: Sourcemap): "external" | "inline" | "none";
|
|
8
|
+
/**
|
|
9
|
+
* Converts the Unified build sourcemap option to a Rollup/Unified-bundler friendly value.
|
|
10
|
+
* @param transpileSourcemap - The sourcemap configuration ('none', 'inline', 'linked', 'external', true, false).
|
|
11
|
+
* @returns "inline" if inline is specified; true for linked/external or boolean true; otherwise false.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getUnifiedSourcemapOption(transpileSourcemap: Sourcemap): "inline" | boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Renames the primary output file (and its declaration file, if applicable)
|
|
16
|
+
* in the output directory to a standardized name (e.g., mod.js, mod.ts).
|
|
17
|
+
*
|
|
18
|
+
* @param isJsr - Flag indicating if the target platform is JSR.
|
|
19
|
+
* @param outDirBin - The output directory where the compiled files reside.
|
|
20
|
+
* @param originalEntryFileBasename - The base name (file name only) of the original entry file processed by the bundler.
|
|
21
|
+
* @param unifiedBundlerOutExt - The file extension used for standard (non-JSR) builds (e.g., 'js', 'mjs').
|
|
22
|
+
* @param distJsrOutFilesExt - The file extension used for JSR builds (likely 'ts' or 'js').
|
|
23
|
+
* @returns An object containing the new base name of the entry file.
|
|
24
|
+
* @throws If the expected source entry file is not found in the output directory.
|
|
25
|
+
*/
|
|
26
|
+
export declare function renameEntryFile(isJsr: boolean, outDirBin: string, originalEntryFileBasename: string, unifiedBundlerOutExt: NpmOutExt, distJsrOutFilesExt: NpmOutExt): Promise<{
|
|
27
|
+
updatedEntryFile: string;
|
|
28
|
+
}>;
|
|
@@ -54,13 +54,13 @@ export async function renameEntryFile(isJsr, outDirBin, originalEntryFileBasenam
|
|
|
54
54
|
targetEntryBasename = "mod.ts";
|
|
55
55
|
} else {
|
|
56
56
|
sourceEntryBasename = `${originalBasenameNoExt}.${outputExt}`;
|
|
57
|
-
targetEntryBasename = `
|
|
57
|
+
targetEntryBasename = `mod.${outputExt}`;
|
|
58
58
|
}
|
|
59
59
|
} else {
|
|
60
60
|
sourceEntryBasename = `${originalBasenameNoExt}.${outputExt}`;
|
|
61
|
-
targetEntryBasename = `
|
|
61
|
+
targetEntryBasename = `mod.${outputExt}`;
|
|
62
62
|
sourceDeclarationBasename = `${originalBasenameNoExt}.d.ts`;
|
|
63
|
-
targetDeclarationBasename = "
|
|
63
|
+
targetDeclarationBasename = "mod.d.ts";
|
|
64
64
|
}
|
|
65
65
|
const sourceEntryPath = path.join(outDirBin, sourceEntryBasename);
|
|
66
66
|
const targetEntryPath = path.join(outDirBin, targetEntryBasename);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BumpMode } from "../../sdk-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Handles version bumping.
|
|
4
|
+
*/
|
|
5
|
+
export declare function bumpHandler(bumpMode: BumpMode, bumpDisable: boolean, commonPubPause: boolean, bumpFilter: string[]): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Updates the "bumpDisable" flag in the build configuration file.
|
|
8
|
+
*/
|
|
9
|
+
export declare function setBumpDisabled(value: boolean, commonPubPause: boolean): Promise<void>;
|
|
@@ -70,9 +70,11 @@ export async function setBumpDisabled(value, commonPubPause) {
|
|
|
70
70
|
if (commonPubPause && value) {
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const dlerCfgTs = path.join(PROJECT_ROOT, "dler.cfg.ts");
|
|
74
|
+
const dlerCfgJs = path.join(PROJECT_ROOT, "dler.cfg.js");
|
|
75
|
+
const dlerCfgPath = await fs.pathExists(dlerCfgTs) ? dlerCfgTs : dlerCfgJs;
|
|
74
76
|
if (!await fs.pathExists(dlerCfgPath)) {
|
|
75
|
-
relinka("log", "No
|
|
77
|
+
relinka("log", "No dler.cfg.ts or dler.cfg.js found to update bumpDisable");
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
80
|
let content = await readFileSafe(dlerCfgPath, "", "bumpDisable update");
|
|
@@ -97,11 +99,7 @@ function autoIncrementVersion(oldVersion, bumpMode) {
|
|
|
97
99
|
}
|
|
98
100
|
return newVer;
|
|
99
101
|
}
|
|
100
|
-
async function bumpVersions(oldVersion, newVersion, bumpFilter
|
|
101
|
-
"package.json",
|
|
102
|
-
".config/rse.jsonc",
|
|
103
|
-
".config/rse.ts"
|
|
104
|
-
]) {
|
|
102
|
+
async function bumpVersions(oldVersion, newVersion, bumpFilter) {
|
|
105
103
|
relinka(
|
|
106
104
|
"verbose",
|
|
107
105
|
`Starting bumpVersions from ${oldVersion} to ${newVersion}`
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LibConfig } from "../../sdk-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Recursively removes any existing distribution folders.
|
|
4
|
+
*/
|
|
5
|
+
export declare function removeDistFolders(distNpmDirName: string, distJsrDirName: string, libsDirDist: string, libsList: Record<string, LibConfig>): Promise<boolean>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const PROJECT_ROOT: string;
|
|
2
|
+
export declare const CONCURRENCY_DEFAULT = 1;
|
|
3
|
+
export declare const tsconfigJson = "tsconfig.json";
|
|
4
|
+
export declare const cliDomainDocs = "https://docs.reliverse.org";
|
|
5
|
+
export declare const validExtensions: string[];
|
|
6
|
+
export declare const SHOW_VERBOSE: {
|
|
7
|
+
getDirectorySize: boolean;
|
|
8
|
+
readFileSafe: boolean;
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates that the current working directory is appropriate for a development environment.
|
|
3
|
+
* Throws an error if the current directory does not contain any of the required paths.
|
|
4
|
+
*/
|
|
5
|
+
export declare function validateDevCwd(isDev: boolean, paths: string[], cliName: string, cliOrg?: string): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Runs an async function within a given working directory,
|
|
8
|
+
* ensuring that the original directory is restored afterward.
|
|
9
|
+
*/
|
|
10
|
+
export declare function withWorkingDirectory<T>(transpileTargetDir: string, fn: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ExcludeMode } from "../../sdk-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Filters out development dependencies from a dependency record.
|
|
4
|
+
*/
|
|
5
|
+
export declare function filterDeps(deps: Record<string, string> | undefined, clearUnused: boolean, outDirBin: string, isJsr: boolean, rmDepsMode: ExcludeMode, rmDepsPatterns: string[]): Promise<Record<string, string>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LibConfig } from "../../sdk-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Determines the distribution name based on the file path and build type.
|
|
4
|
+
* This function is used for logging and determining output paths.
|
|
5
|
+
*
|
|
6
|
+
* @returns The distribution name in the transpileFormat of:
|
|
7
|
+
* - For empty isJsr: "root"
|
|
8
|
+
* - For regular builds: "dist-jsr" or "dist-npm"
|
|
9
|
+
* - For library builds: "dist-libs/{lib-name}/jsr" or "dist-libs/{lib-name}/npm"
|
|
10
|
+
* - For library builds with libDirName: "dist-libs/{libDirName}/jsr" or "dist-libs/{libDirName}/npm"
|
|
11
|
+
*/
|
|
12
|
+
export declare function determineDistName(filePath: string, isJsr: "" | boolean, libsList?: Record<string, LibConfig>): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copies specified files from the root directory to the output directory.
|
|
3
|
+
*/
|
|
4
|
+
export declare function copyRootFile(outDirRoot: string, fileNames: string[]): Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Calculates the total size (in bytes) of a directory.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getDirectorySize(outDirRoot: string, isDev: boolean): Promise<number>;
|
|
9
|
+
/**
|
|
10
|
+
* Recursively counts the number of files in a directory.
|
|
11
|
+
*/
|
|
12
|
+
export declare function outDirBinFilesCount(outDirBin: string): Promise<number>;
|
|
13
|
+
/**
|
|
14
|
+
* Deletes specific test and temporary files from a given directory.
|
|
15
|
+
*/
|
|
16
|
+
export declare function deleteSpecificFiles(outDirBin: string): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Reads a file safely and returns its content.
|
|
19
|
+
*/
|
|
20
|
+
export declare function readFileSafe(filePath: string, isJsr: "" | boolean, reason: string): Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Writes content to a file safely.
|
|
23
|
+
*/
|
|
24
|
+
export declare function writeFileSafe(filePath: string, content: string, reason: string): Promise<void>;
|
|
@@ -16,7 +16,10 @@ export async function copyRootFile(outDirRoot, fileNames) {
|
|
|
16
16
|
outputName: "LICENSE",
|
|
17
17
|
variants: ["LICENSE", "LICENSE.md"]
|
|
18
18
|
},
|
|
19
|
-
|
|
19
|
+
README: {
|
|
20
|
+
outputName: "README.md",
|
|
21
|
+
variants: ["README.md", "README"]
|
|
22
|
+
}
|
|
20
23
|
};
|
|
21
24
|
await pMap(
|
|
22
25
|
fileNames,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LibConfig } from "../../sdk-types.js";
|
|
2
|
+
import { type PerfTimer } from "./utils-perf.js";
|
|
3
|
+
/**
|
|
4
|
+
* Finalizes the build process and reports completion.
|
|
5
|
+
*/
|
|
6
|
+
export declare function finalizeBuild(timer: PerfTimer, commonPubPause: boolean, libsList: Record<string, LibConfig>, distNpmDirName: string, distJsrDirName: string, libsDirDist: string): Promise<void>;
|