@reliverse/dler 1.7.117 → 1.7.119
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/bin/app/build/binary-flow.d.ts +6 -0
- package/bin/app/build/binary-flow.js +153 -0
- package/bin/app/build/build-library.d.ts +0 -1
- package/bin/app/build/build-library.js +0 -5
- package/bin/app/build/build-regular.d.ts +2 -2
- package/bin/app/build/build-regular.js +3 -8
- package/bin/app/build/impl.js +2 -0
- package/bin/app/build/regular-flow.js +0 -4
- package/bin/app/config/comments.js +2 -2
- package/bin/app/config/constants.d.ts +1 -1
- package/bin/app/config/constants.js +1 -1
- package/bin/app/config/prepare.js +31 -0
- package/bin/app/providers/better-t-stack/types.d.ts +5 -5
- package/bin/app/providers/reliverse-stack/rs-impl.d.ts +2 -2
- package/bin/app/schema/gen.js +110 -2
- package/bin/app/schema/mod.d.ts +105 -0
- package/bin/app/schema/mod.js +16 -2
- package/bin/app/toolbox/toolbox-impl.d.ts +0 -2
- package/bin/app/toolbox/toolbox-impl.js +1 -50
- package/bin/app/utils/common.d.ts +8 -2
- package/bin/app/utils/common.js +14 -5
- package/bin/app/utils/schemaMemory.d.ts +2 -2
- package/bin/app/utils/startEndPrompts.d.ts +1 -1
- package/bin/app/utils/startEndPrompts.js +2 -2
- package/bin/mod.d.ts +1 -1
- package/bin/mod.js +1 -2
- package/package.json +8 -8
- package/bin/app/build/binary/cmd.d.ts +0 -113
- package/bin/app/build/binary/cmd.js +0 -226
- package/bin/app/build/cmd.d.ts +0 -25
- package/bin/app/build/cmd.js +0 -59
- package/bin/app/pub/cmd.d.ts +0 -17
- package/bin/app/pub/cmd.js +0 -42
- package/bin/app/toolbox/cmd.d.ts +0 -7
- package/bin/app/toolbox/cmd.js +0 -37
- package/bin/dler.d.ts +0 -1
- package/bin/dler.js +0 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReliverseConfig } from "../schema/mod.js";
|
|
2
|
+
import type { PerfTimer } from "../types/mod.js";
|
|
3
|
+
/**
|
|
4
|
+
* Builds binary executables for the project based on configuration.
|
|
5
|
+
*/
|
|
6
|
+
export declare function binary_buildFlow(_timer: PerfTimer, _isDev: boolean, config: ReliverseConfig): Promise<void>;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { join } from "@reliverse/pathkit";
|
|
2
|
+
import { existsSync, mkdir } from "@reliverse/relifso";
|
|
3
|
+
import { relinka } from "@reliverse/relinka";
|
|
4
|
+
import {
|
|
5
|
+
buildForTarget,
|
|
6
|
+
cleanOutputDir,
|
|
7
|
+
getOutputFileName,
|
|
8
|
+
listAvailableTargets,
|
|
9
|
+
parseTargets,
|
|
10
|
+
validateInputFile
|
|
11
|
+
} from "./providers/bun/single-file.js";
|
|
12
|
+
function getTargetPrefix(inputFile) {
|
|
13
|
+
const filename = inputFile.split("/").pop()?.split("\\").pop() || "";
|
|
14
|
+
const nameWithoutExt = filename.replace(/\.[^/.]+$/, "");
|
|
15
|
+
return nameWithoutExt;
|
|
16
|
+
}
|
|
17
|
+
function generateDefaultTargets(prefix) {
|
|
18
|
+
const platforms = ["linux", "windows", "darwin"];
|
|
19
|
+
const architectures = ["x64", "arm64"];
|
|
20
|
+
const targets = platforms.flatMap(
|
|
21
|
+
(platform) => architectures.map((arch) => `${prefix}-${platform}-${arch}`)
|
|
22
|
+
);
|
|
23
|
+
return targets.join(",");
|
|
24
|
+
}
|
|
25
|
+
export async function binary_buildFlow(_timer, _isDev, config) {
|
|
26
|
+
relinka("verbose", "\u2014 \u2014 \u2014 binary_buildFlow \u2014 \u2014 \u2014");
|
|
27
|
+
if (!config.binaryBuildEnabled) {
|
|
28
|
+
relinka("verbose", "Binary build is disabled, skipping...");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
let inputFile = config.binaryBuildInputFile;
|
|
33
|
+
if (!inputFile) {
|
|
34
|
+
inputFile = join(config.coreEntrySrcDir, config.coreEntryFile);
|
|
35
|
+
}
|
|
36
|
+
if (config.binaryBuildTargets === "list") {
|
|
37
|
+
listAvailableTargets();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
validateInputFile(inputFile);
|
|
41
|
+
let targetsArg = config.binaryBuildTargets;
|
|
42
|
+
if (targetsArg === "all" || !targetsArg) {
|
|
43
|
+
const prefix = getTargetPrefix(inputFile);
|
|
44
|
+
targetsArg = generateDefaultTargets(prefix);
|
|
45
|
+
relinka("info", `Generated targets for '${prefix}': ${targetsArg}`);
|
|
46
|
+
}
|
|
47
|
+
const targets = parseTargets(targetsArg);
|
|
48
|
+
if (targets.length === 0) {
|
|
49
|
+
relinka("error", "No valid targets specified");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const options = {
|
|
53
|
+
minify: config.binaryBuildMinify,
|
|
54
|
+
sourcemap: config.binaryBuildSourcemap,
|
|
55
|
+
bytecode: config.binaryBuildBytecode,
|
|
56
|
+
outdir: config.binaryBuildOutDir,
|
|
57
|
+
clean: config.binaryBuildClean,
|
|
58
|
+
windowsIcon: config.binaryBuildWindowsIcon,
|
|
59
|
+
windowsHideConsole: config.binaryBuildWindowsHideConsole,
|
|
60
|
+
assetNaming: config.binaryBuildAssetNaming,
|
|
61
|
+
external: config.binaryBuildExternal,
|
|
62
|
+
compile: !config.binaryBuildNoCompile
|
|
63
|
+
};
|
|
64
|
+
if (options.clean) {
|
|
65
|
+
await cleanOutputDir(options.outdir);
|
|
66
|
+
} else if (!existsSync(options.outdir)) {
|
|
67
|
+
await mkdir(options.outdir, { recursive: true });
|
|
68
|
+
}
|
|
69
|
+
const buildType = options.compile ? "executable(s)" : "bundled script(s)";
|
|
70
|
+
relinka("info", `Building ${targets.length} ${buildType} from ${inputFile}`);
|
|
71
|
+
if (!options.compile) {
|
|
72
|
+
relinka("info", "Running in script bundle mode (binaryBuildNoCompile: true)");
|
|
73
|
+
}
|
|
74
|
+
if (options.external && options.external.length > 0) {
|
|
75
|
+
relinka(
|
|
76
|
+
"info",
|
|
77
|
+
`External dependencies (excluded from bundle): ${options.external.join(", ")}`
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
if (options.bytecode && options.compile) {
|
|
81
|
+
relinka("warn", "Bytecode compilation is experimental (Bun v1.1.30+)");
|
|
82
|
+
} else if (options.bytecode && !options.compile) {
|
|
83
|
+
relinka("warn", "Bytecode compilation is only available with compile enabled");
|
|
84
|
+
}
|
|
85
|
+
if (config.binaryBuildParallel && targets.length > 1) {
|
|
86
|
+
relinka("info", "Building targets in parallel...");
|
|
87
|
+
const buildPromises = targets.map((target) => buildForTarget(target, inputFile, options));
|
|
88
|
+
const results = await Promise.allSettled(buildPromises);
|
|
89
|
+
let successCount = 0;
|
|
90
|
+
let failureCount = 0;
|
|
91
|
+
for (const result of results) {
|
|
92
|
+
if (result.status === "fulfilled") {
|
|
93
|
+
successCount++;
|
|
94
|
+
} else {
|
|
95
|
+
failureCount++;
|
|
96
|
+
relinka("error", `Build failed: ${result.reason}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
relinka("info", `Build completed: ${successCount} succeeded, ${failureCount} failed`);
|
|
100
|
+
if (failureCount > 0) {
|
|
101
|
+
if (successCount === 0) {
|
|
102
|
+
relinka("error", `\u274C All builds failed! No executables were generated.`);
|
|
103
|
+
} else {
|
|
104
|
+
relinka(
|
|
105
|
+
"warn",
|
|
106
|
+
`\u26A0\uFE0F Build completed with ${failureCount} failure(s). ${successCount} executable(s) available in: ${options.outdir}`
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
relinka("success", `\u{1F389} Build completed! All executables available in: ${options.outdir}`);
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
relinka("info", "Building targets sequentially...");
|
|
114
|
+
let sequentialSuccessCount = 0;
|
|
115
|
+
let sequentialFailureCount = 0;
|
|
116
|
+
for (const target of targets) {
|
|
117
|
+
try {
|
|
118
|
+
await buildForTarget(target, inputFile, options);
|
|
119
|
+
sequentialSuccessCount++;
|
|
120
|
+
} catch (error) {
|
|
121
|
+
sequentialFailureCount++;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (sequentialFailureCount > 0) {
|
|
125
|
+
if (sequentialSuccessCount === 0) {
|
|
126
|
+
relinka("error", `\u274C All builds failed! No executables were generated.`);
|
|
127
|
+
} else {
|
|
128
|
+
relinka(
|
|
129
|
+
"warn",
|
|
130
|
+
`\u26A0\uFE0F Build completed with ${sequentialFailureCount} failure(s). ${sequentialSuccessCount} executable(s) available in: ${options.outdir}`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
relinka("success", `\u{1F389} Build completed! All executables available in: ${options.outdir}`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (existsSync(options.outdir)) {
|
|
138
|
+
const fileType = options.compile ? "executables" : "bundled scripts";
|
|
139
|
+
relinka("info", `Generated ${fileType}:`);
|
|
140
|
+
for (const target of targets) {
|
|
141
|
+
const filePath = join(options.outdir, getOutputFileName(target, "dler", options.compile));
|
|
142
|
+
if (existsSync(filePath)) {
|
|
143
|
+
const stat = await Bun.file(filePath).size;
|
|
144
|
+
const sizeMB = (stat / (1024 * 1024)).toFixed(2);
|
|
145
|
+
relinka("info", ` ${getOutputFileName(target, "dler", options.compile)} (${sizeMB} MB)`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
} catch (error) {
|
|
150
|
+
relinka("error", `Binary build failed: ${error}`);
|
|
151
|
+
throw error;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -26,7 +26,6 @@ export type LibraryBuildOptions = ReliverseConfig & {
|
|
|
26
26
|
libTranspileMinify: boolean;
|
|
27
27
|
transpileTarget: TranspileTarget;
|
|
28
28
|
transpileFormat: TranspileFormat;
|
|
29
|
-
transpileSplitting: boolean;
|
|
30
29
|
transpileSourcemap: Sourcemap;
|
|
31
30
|
transpilePublicPath: string;
|
|
32
31
|
transpileEsbuild: Esbuild;
|
|
@@ -198,7 +198,6 @@ async function library_buildDistributionTarget(params) {
|
|
|
198
198
|
libTranspileMinify,
|
|
199
199
|
transpileTarget,
|
|
200
200
|
transpileFormat,
|
|
201
|
-
transpileSplitting,
|
|
202
201
|
transpileSourcemap,
|
|
203
202
|
transpilePublicPath,
|
|
204
203
|
transpileEsbuild,
|
|
@@ -222,7 +221,6 @@ async function library_buildDistributionTarget(params) {
|
|
|
222
221
|
libTranspileMinify,
|
|
223
222
|
transpileTarget,
|
|
224
223
|
transpileFormat,
|
|
225
|
-
transpileSplitting,
|
|
226
224
|
transpileSourcemap,
|
|
227
225
|
transpilePublicPath,
|
|
228
226
|
transpileEsbuild,
|
|
@@ -267,7 +265,6 @@ async function library_bundleWithBuilder(params) {
|
|
|
267
265
|
libTranspileMinify: executorParams.libTranspileMinify,
|
|
268
266
|
transpileTarget: executorParams.transpileTarget,
|
|
269
267
|
transpileFormat: executorParams.transpileFormat,
|
|
270
|
-
transpileSplitting: executorParams.transpileSplitting,
|
|
271
268
|
transpileSourcemap: executorParams.transpileSourcemap,
|
|
272
269
|
transpilePublicPath: executorParams.transpilePublicPath
|
|
273
270
|
});
|
|
@@ -328,7 +325,6 @@ async function library_bundleUsingBun(entryPoint, outDirBin, libName, options) {
|
|
|
328
325
|
libTranspileMinify,
|
|
329
326
|
transpileTarget,
|
|
330
327
|
transpileFormat,
|
|
331
|
-
transpileSplitting,
|
|
332
328
|
transpileSourcemap,
|
|
333
329
|
transpilePublicPath
|
|
334
330
|
} = options;
|
|
@@ -345,7 +341,6 @@ async function library_bundleUsingBun(entryPoint, outDirBin, libName, options) {
|
|
|
345
341
|
outdir: outDirBin,
|
|
346
342
|
target: transpileTarget,
|
|
347
343
|
format: transpileFormat,
|
|
348
|
-
splitting: transpileSplitting,
|
|
349
344
|
minify: libTranspileMinify,
|
|
350
345
|
sourcemap: getBunSourcemapOption(transpileSourcemap),
|
|
351
346
|
publicPath: transpilePublicPath,
|
|
@@ -8,7 +8,7 @@ import type { PerfTimer } from "../types/mod.js";
|
|
|
8
8
|
export declare function regular_buildJsrDist(isDev: boolean, isJsr: boolean, coreIsCLI: {
|
|
9
9
|
enabled: boolean;
|
|
10
10
|
scripts: Record<string, string>;
|
|
11
|
-
}, coreEntrySrcDir: string, distJsrDirName: string, distJsrBuilder: BundlerName, coreEntryFile: string, transpileTarget: TranspileTarget, transpileFormat: TranspileFormat,
|
|
11
|
+
}, coreEntrySrcDir: string, distJsrDirName: string, distJsrBuilder: BundlerName, coreEntryFile: string, transpileTarget: TranspileTarget, transpileFormat: TranspileFormat, transpileMinify: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, unifiedBundlerOutExt: NpmOutExt, config: ReliverseConfig, timer: PerfTimer, transpileStub: boolean, transpileWatch: boolean, distJsrGenTsconfig: boolean, coreDeclarations: boolean): Promise<void>;
|
|
12
12
|
/**
|
|
13
13
|
* Builds a regular NPM distribution.
|
|
14
14
|
* - Copies entire src dir if "jsr"
|
|
@@ -17,4 +17,4 @@ export declare function regular_buildJsrDist(isDev: boolean, isJsr: boolean, cor
|
|
|
17
17
|
export declare function regular_buildNpmDist(isDev: boolean, coreIsCLI: {
|
|
18
18
|
enabled: boolean;
|
|
19
19
|
scripts: Record<string, string>;
|
|
20
|
-
}, coreEntrySrcDir: string, distNpmDirName: string, distNpmBuilder: BundlerName, coreEntryFile: string, unifiedBundlerOutExt: NpmOutExt, config: ReliverseConfig, transpileTarget: TranspileTarget, transpileFormat: TranspileFormat,
|
|
20
|
+
}, coreEntrySrcDir: string, distNpmDirName: string, distNpmBuilder: BundlerName, coreEntryFile: string, unifiedBundlerOutExt: NpmOutExt, config: ReliverseConfig, transpileTarget: TranspileTarget, transpileFormat: TranspileFormat, transpileMinify: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, transpileStub: boolean, transpileWatch: boolean, timer: PerfTimer, coreDeclarations: boolean): Promise<void>;
|
|
@@ -12,7 +12,7 @@ import { createJsrJSON, renameTsxFiles } from "../utils/utils-jsr-json.js";
|
|
|
12
12
|
import { regular_createPackageJSON } from "../utils/utils-package-json-regular.js";
|
|
13
13
|
import { getElapsedPerfTime } from "../utils/utils-perf.js";
|
|
14
14
|
const ALIAS_PREFIX_TO_CONVERT = "~";
|
|
15
|
-
export async function regular_buildJsrDist(isDev, isJsr, coreIsCLI, coreEntrySrcDir, distJsrDirName, distJsrBuilder, coreEntryFile, transpileTarget, transpileFormat,
|
|
15
|
+
export async function regular_buildJsrDist(isDev, isJsr, coreIsCLI, coreEntrySrcDir, distJsrDirName, distJsrBuilder, coreEntryFile, transpileTarget, transpileFormat, transpileMinify, transpileSourcemap, transpilePublicPath, unifiedBundlerOutExt, config, timer, transpileStub, transpileWatch, distJsrGenTsconfig, coreDeclarations) {
|
|
16
16
|
const outDirRoot = path.join(process.cwd(), distJsrDirName);
|
|
17
17
|
const outDirBin = path.join(outDirRoot, config.coreBuildOutDir || "bin");
|
|
18
18
|
const singleFile = path.join(process.cwd(), coreEntrySrcDir, coreEntryFile);
|
|
@@ -31,7 +31,6 @@ export async function regular_buildJsrDist(isDev, isJsr, coreIsCLI, coreEntrySrc
|
|
|
31
31
|
transpileMinify,
|
|
32
32
|
transpilePublicPath,
|
|
33
33
|
transpileSourcemap,
|
|
34
|
-
transpileSplitting,
|
|
35
34
|
transpileStub,
|
|
36
35
|
transpileTarget,
|
|
37
36
|
transpileWatch,
|
|
@@ -78,7 +77,7 @@ export async function regular_buildJsrDist(isDev, isJsr, coreIsCLI, coreEntrySrc
|
|
|
78
77
|
throw new Error(`JSR distribution build failed: ${errorMessage}`);
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
|
-
export async function regular_buildNpmDist(isDev, coreIsCLI, coreEntrySrcDir, distNpmDirName, distNpmBuilder, coreEntryFile, unifiedBundlerOutExt, config, transpileTarget, transpileFormat,
|
|
80
|
+
export async function regular_buildNpmDist(isDev, coreIsCLI, coreEntrySrcDir, distNpmDirName, distNpmBuilder, coreEntryFile, unifiedBundlerOutExt, config, transpileTarget, transpileFormat, transpileMinify, transpileSourcemap, transpilePublicPath, transpileStub, transpileWatch, timer, coreDeclarations) {
|
|
82
81
|
const outDirRoot = path.join(process.cwd(), distNpmDirName);
|
|
83
82
|
const outDirBin = path.join(outDirRoot, config.coreBuildOutDir || "bin");
|
|
84
83
|
const singleFile = path.join(process.cwd(), coreEntrySrcDir, coreEntryFile);
|
|
@@ -97,7 +96,6 @@ export async function regular_buildNpmDist(isDev, coreIsCLI, coreEntrySrcDir, di
|
|
|
97
96
|
transpileMinify,
|
|
98
97
|
transpilePublicPath,
|
|
99
98
|
transpileSourcemap,
|
|
100
|
-
transpileSplitting,
|
|
101
99
|
transpileStub,
|
|
102
100
|
transpileTarget,
|
|
103
101
|
transpileWatch,
|
|
@@ -128,7 +126,7 @@ export async function regular_buildNpmDist(isDev, coreIsCLI, coreEntrySrcDir, di
|
|
|
128
126
|
throw new Error(`NPM distribution build failed: ${errorMessage}`);
|
|
129
127
|
}
|
|
130
128
|
}
|
|
131
|
-
async function regular_bundleUsingBun(coreEntryFile, outDirBin, transpileTarget, transpileFormat,
|
|
129
|
+
async function regular_bundleUsingBun(coreEntryFile, outDirBin, transpileTarget, transpileFormat, transpileMinify, transpileSourcemap, transpilePublicPath, timer) {
|
|
132
130
|
relinka(
|
|
133
131
|
"verbose",
|
|
134
132
|
`Bundling regular project using Bun (entry: ${coreEntryFile}, outDir: ${outDirBin})`
|
|
@@ -156,7 +154,6 @@ async function regular_bundleUsingBun(coreEntryFile, outDirBin, transpileTarget,
|
|
|
156
154
|
outdir: outDirBin,
|
|
157
155
|
publicPath: transpilePublicPath || "/",
|
|
158
156
|
sourcemap: getBunSourcemapOption(transpileSourcemap),
|
|
159
|
-
splitting: transpileSplitting,
|
|
160
157
|
target: transpileTarget,
|
|
161
158
|
throw: true
|
|
162
159
|
});
|
|
@@ -272,7 +269,6 @@ async function regular_bundleWithBuilder(builder, params) {
|
|
|
272
269
|
transpileMinify,
|
|
273
270
|
transpilePublicPath,
|
|
274
271
|
transpileSourcemap,
|
|
275
|
-
transpileSplitting,
|
|
276
272
|
transpileStub,
|
|
277
273
|
transpileTarget,
|
|
278
274
|
transpileWatch,
|
|
@@ -288,7 +284,6 @@ async function regular_bundleWithBuilder(builder, params) {
|
|
|
288
284
|
outDir,
|
|
289
285
|
transpileTarget,
|
|
290
286
|
transpileFormat,
|
|
291
|
-
transpileSplitting,
|
|
292
287
|
transpileMinify,
|
|
293
288
|
transpileSourcemap,
|
|
294
289
|
transpilePublicPath,
|
package/bin/app/build/impl.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from "@reliverse/pathkit";
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
|
+
import { binary_buildFlow } from "./binary-flow.js";
|
|
4
5
|
import { library_buildFlow } from "./library-flow.js";
|
|
5
6
|
import { regular_buildFlow } from "./regular-flow.js";
|
|
6
7
|
import { PROJECT_ROOT } from "../config/constants.js";
|
|
@@ -55,6 +56,7 @@ export async function dlerBuild(timer, isDev, config, debugOnlyCopyNonBuildFiles
|
|
|
55
56
|
};
|
|
56
57
|
await regular_buildFlow(timer, isDev, tempConfig);
|
|
57
58
|
await library_buildFlow(timer, isDev, tempConfig);
|
|
59
|
+
await binary_buildFlow(timer, isDev, tempConfig);
|
|
58
60
|
await dlerPostBuild(isDev, debugDontCopyNonBuildFiles);
|
|
59
61
|
if (effectiveConfig.postBuildSettings?.deleteDistTmpAfterBuild) {
|
|
60
62
|
await fs.remove(path.join(PROJECT_ROOT, "dist-tmp"));
|
|
@@ -22,7 +22,6 @@ export async function regular_buildFlow(timer, isDev, config) {
|
|
|
22
22
|
config.coreEntryFile,
|
|
23
23
|
config.transpileTarget,
|
|
24
24
|
config.transpileFormat,
|
|
25
|
-
config.transpileSplitting,
|
|
26
25
|
config.transpileMinify,
|
|
27
26
|
config.transpileSourcemap,
|
|
28
27
|
config.transpilePublicPath,
|
|
@@ -48,7 +47,6 @@ export async function regular_buildFlow(timer, isDev, config) {
|
|
|
48
47
|
config,
|
|
49
48
|
config.transpileTarget,
|
|
50
49
|
config.transpileFormat,
|
|
51
|
-
config.transpileSplitting,
|
|
52
50
|
config.transpileMinify,
|
|
53
51
|
config.transpileSourcemap,
|
|
54
52
|
config.transpilePublicPath,
|
|
@@ -71,7 +69,6 @@ export async function regular_buildFlow(timer, isDev, config) {
|
|
|
71
69
|
config.coreEntryFile,
|
|
72
70
|
config.transpileTarget,
|
|
73
71
|
config.transpileFormat,
|
|
74
|
-
config.transpileSplitting,
|
|
75
72
|
config.transpileMinify,
|
|
76
73
|
config.transpileSourcemap,
|
|
77
74
|
config.transpilePublicPath,
|
|
@@ -94,7 +91,6 @@ export async function regular_buildFlow(timer, isDev, config) {
|
|
|
94
91
|
config,
|
|
95
92
|
config.transpileTarget,
|
|
96
93
|
config.transpileFormat,
|
|
97
|
-
config.transpileSplitting,
|
|
98
94
|
config.transpileMinify,
|
|
99
95
|
config.transpileSourcemap,
|
|
100
96
|
config.transpilePublicPath,
|
|
@@ -22,7 +22,7 @@ export function injectSectionComments(fileContent) {
|
|
|
22
22
|
],
|
|
23
23
|
ignoreDependencies: [comment("List dependencies to exclude from checks")],
|
|
24
24
|
customRules: [
|
|
25
|
-
comment("Provide custom rules for
|
|
25
|
+
comment("Provide custom rules for Rse AI"),
|
|
26
26
|
comment("You can use any json type here in {}")
|
|
27
27
|
],
|
|
28
28
|
deployBehavior: [
|
|
@@ -34,7 +34,7 @@ export function injectSectionComments(fileContent) {
|
|
|
34
34
|
comment("Options: prompt | autoYes | autoYesSkipCommit | autoNo")
|
|
35
35
|
],
|
|
36
36
|
relinterConfirm: [
|
|
37
|
-
comment("Behavior for
|
|
37
|
+
comment("Behavior for Rse AI chat and agent mode"),
|
|
38
38
|
comment("Options: promptOnce | promptEachFile | autoYes")
|
|
39
39
|
]
|
|
40
40
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const PROJECT_ROOT: string;
|
|
2
|
-
export declare const cliVersion = "1.7.
|
|
2
|
+
export declare const cliVersion = "1.7.119";
|
|
3
3
|
export declare const cliName = "@reliverse/rse";
|
|
4
4
|
export declare const rseName = "@reliverse/rse";
|
|
5
5
|
export declare const dlerName = "@reliverse/dler";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "@reliverse/pathkit";
|
|
3
3
|
export const PROJECT_ROOT = path.resolve(process.cwd());
|
|
4
|
-
const version = "1.7.
|
|
4
|
+
const version = "1.7.119";
|
|
5
5
|
export const cliVersion = version;
|
|
6
6
|
export const cliName = "@reliverse/rse";
|
|
7
7
|
export const rseName = "@reliverse/rse";
|
|
@@ -275,6 +275,21 @@ function generateJsoncConfig(isDev, pkgDescription) {
|
|
|
275
275
|
"distNpmBuilder": "${DEFAULT_CONFIG_RELIVERSE.distNpmBuilder}",
|
|
276
276
|
"distNpmDirName": "${DEFAULT_CONFIG_RELIVERSE.distNpmDirName}",
|
|
277
277
|
"distNpmOutFilesExt": "${DEFAULT_CONFIG_RELIVERSE.distNpmOutFilesExt}",
|
|
278
|
+
// Binary Build Configuration
|
|
279
|
+
"binaryBuildEnabled": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildEnabled},
|
|
280
|
+
"binaryBuildInputFile": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildInputFile ? `"${DEFAULT_CONFIG_RELIVERSE.binaryBuildInputFile}"` : "undefined"},
|
|
281
|
+
"binaryBuildTargets": "${DEFAULT_CONFIG_RELIVERSE.binaryBuildTargets}",
|
|
282
|
+
"binaryBuildOutDir": "${DEFAULT_CONFIG_RELIVERSE.binaryBuildOutDir}",
|
|
283
|
+
"binaryBuildMinify": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildMinify},
|
|
284
|
+
"binaryBuildSourcemap": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildSourcemap},
|
|
285
|
+
"binaryBuildBytecode": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildBytecode},
|
|
286
|
+
"binaryBuildClean": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildClean},
|
|
287
|
+
"binaryBuildWindowsIcon": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildWindowsIcon ? `"${DEFAULT_CONFIG_RELIVERSE.binaryBuildWindowsIcon}"` : "undefined"},
|
|
288
|
+
"binaryBuildWindowsHideConsole": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildWindowsHideConsole},
|
|
289
|
+
"binaryBuildAssetNaming": "${DEFAULT_CONFIG_RELIVERSE.binaryBuildAssetNaming}",
|
|
290
|
+
"binaryBuildParallel": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildParallel},
|
|
291
|
+
"binaryBuildExternal": ${JSON.stringify(DEFAULT_CONFIG_RELIVERSE.binaryBuildExternal)},
|
|
292
|
+
"binaryBuildNoCompile": ${DEFAULT_CONFIG_RELIVERSE.binaryBuildNoCompile},
|
|
278
293
|
// Libraries Reliverse Plugin
|
|
279
294
|
"libsActMode": "${libsActModeValue}",
|
|
280
295
|
"libsDirDist": "${DEFAULT_CONFIG_RELIVERSE.libsDirDist}",
|
|
@@ -584,6 +599,22 @@ function generateConfig(isDev, pkgDescription, configKind = "ts") {
|
|
|
584
599
|
' distNpmDirName: "' + DEFAULT_CONFIG_RELIVERSE.distNpmDirName + '",',
|
|
585
600
|
' distNpmOutFilesExt: "' + DEFAULT_CONFIG_RELIVERSE.distNpmOutFilesExt + '",',
|
|
586
601
|
"",
|
|
602
|
+
" // Binary Build Configuration",
|
|
603
|
+
" binaryBuildEnabled: " + DEFAULT_CONFIG_RELIVERSE.binaryBuildEnabled + ",",
|
|
604
|
+
" binaryBuildInputFile: " + (DEFAULT_CONFIG_RELIVERSE.binaryBuildInputFile ? `"${DEFAULT_CONFIG_RELIVERSE.binaryBuildInputFile}"` : "undefined") + ",",
|
|
605
|
+
" binaryBuildTargets: " + JSON.stringify(DEFAULT_CONFIG_RELIVERSE.binaryBuildTargets) + ",",
|
|
606
|
+
' binaryBuildOutDir: "' + DEFAULT_CONFIG_RELIVERSE.binaryBuildOutDir + '",',
|
|
607
|
+
" binaryBuildMinify: " + DEFAULT_CONFIG_RELIVERSE.binaryBuildMinify + ",",
|
|
608
|
+
" binaryBuildSourcemap: " + DEFAULT_CONFIG_RELIVERSE.binaryBuildSourcemap + ",",
|
|
609
|
+
" binaryBuildBytecode: " + DEFAULT_CONFIG_RELIVERSE.binaryBuildBytecode + ",",
|
|
610
|
+
" binaryBuildClean: " + DEFAULT_CONFIG_RELIVERSE.binaryBuildClean + ",",
|
|
611
|
+
" binaryBuildWindowsIcon: " + (DEFAULT_CONFIG_RELIVERSE.binaryBuildWindowsIcon ? `"${DEFAULT_CONFIG_RELIVERSE.binaryBuildWindowsIcon}"` : "undefined") + ",",
|
|
612
|
+
" binaryBuildWindowsHideConsole: " + DEFAULT_CONFIG_RELIVERSE.binaryBuildWindowsHideConsole + ",",
|
|
613
|
+
" binaryBuildAssetNaming: " + JSON.stringify(DEFAULT_CONFIG_RELIVERSE.binaryBuildAssetNaming) + ",",
|
|
614
|
+
" binaryBuildParallel: " + DEFAULT_CONFIG_RELIVERSE.binaryBuildParallel + ",",
|
|
615
|
+
" binaryBuildExternal: " + JSON.stringify(DEFAULT_CONFIG_RELIVERSE.binaryBuildExternal) + ",",
|
|
616
|
+
" binaryBuildNoCompile: " + DEFAULT_CONFIG_RELIVERSE.binaryBuildNoCompile + ",",
|
|
617
|
+
"",
|
|
587
618
|
" // Libraries Reliverse Plugin",
|
|
588
619
|
" // Publish specific dirs as separate packages",
|
|
589
620
|
" // This feature is experimental at the moment",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DatabaseSchema: z.ZodEnum<{
|
|
3
3
|
none: "none";
|
|
4
|
-
mysql: "mysql";
|
|
5
4
|
sqlite: "sqlite";
|
|
5
|
+
mysql: "mysql";
|
|
6
6
|
mongodb: "mongodb";
|
|
7
7
|
postgres: "postgres";
|
|
8
8
|
}>;
|
|
@@ -18,15 +18,15 @@ export declare const BackendSchema: z.ZodEnum<{
|
|
|
18
18
|
none: "none";
|
|
19
19
|
hono: "hono";
|
|
20
20
|
next: "next";
|
|
21
|
+
convex: "convex";
|
|
21
22
|
express: "express";
|
|
22
23
|
fastify: "fastify";
|
|
23
24
|
elysia: "elysia";
|
|
24
|
-
convex: "convex";
|
|
25
25
|
}>;
|
|
26
26
|
export type Backend = z.infer<typeof BackendSchema>;
|
|
27
27
|
export declare const RuntimeSchema: z.ZodEnum<{
|
|
28
|
-
bun: "bun";
|
|
29
28
|
none: "none";
|
|
29
|
+
bun: "bun";
|
|
30
30
|
node: "node";
|
|
31
31
|
workers: "workers";
|
|
32
32
|
}>;
|
|
@@ -45,13 +45,13 @@ export declare const FrontendSchema: z.ZodEnum<{
|
|
|
45
45
|
}>;
|
|
46
46
|
export type Frontend = z.infer<typeof FrontendSchema>;
|
|
47
47
|
export declare const AddonsSchema: z.ZodEnum<{
|
|
48
|
-
biome: "biome";
|
|
49
48
|
none: "none";
|
|
49
|
+
biome: "biome";
|
|
50
50
|
tauri: "tauri";
|
|
51
51
|
starlight: "starlight";
|
|
52
52
|
turborepo: "turborepo";
|
|
53
|
-
pwa: "pwa";
|
|
54
53
|
husky: "husky";
|
|
54
|
+
pwa: "pwa";
|
|
55
55
|
}>;
|
|
56
56
|
export type Addons = z.infer<typeof AddonsSchema>;
|
|
57
57
|
export declare const ExamplesSchema: z.ZodEnum<{
|
|
@@ -14,7 +14,7 @@ export type BrowserRepoOption = "reliverse/template-browser-extension" | "unknow
|
|
|
14
14
|
export declare function configureBrowserExtension(): Promise<{
|
|
15
15
|
displayName: string;
|
|
16
16
|
description: string;
|
|
17
|
-
features: ("
|
|
17
|
+
features: ("webview" | "language" | "commands" | "themes")[];
|
|
18
18
|
activation: "onCommand" | "onLanguage" | "startup";
|
|
19
19
|
publisher: string;
|
|
20
20
|
}>;
|
|
@@ -24,7 +24,7 @@ export declare function configureBrowserExtension(): Promise<{
|
|
|
24
24
|
export declare function configureVSCodeExtension(): Promise<{
|
|
25
25
|
displayName: string;
|
|
26
26
|
description: string;
|
|
27
|
-
features: ("
|
|
27
|
+
features: ("webview" | "language" | "commands" | "themes")[];
|
|
28
28
|
activation: "onCommand" | "onLanguage" | "startup";
|
|
29
29
|
publisher: string;
|
|
30
30
|
}>;
|
package/bin/app/schema/gen.js
CHANGED
|
@@ -359,6 +359,100 @@ export interface ReliverseConfig {
|
|
|
359
359
|
* @default "js"
|
|
360
360
|
*/
|
|
361
361
|
distNpmOutFilesExt: NpmOutExt;
|
|
362
|
+
// ==========================================================================
|
|
363
|
+
// Binary Build Configuration
|
|
364
|
+
// ==========================================================================
|
|
365
|
+
/**
|
|
366
|
+
* When \`true\`, enables binary build functionality to create standalone executables.
|
|
367
|
+
*
|
|
368
|
+
* @default false
|
|
369
|
+
*/
|
|
370
|
+
binaryBuildEnabled: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Input TypeScript file to bundle for binary builds.
|
|
373
|
+
* If not specified, will use the coreEntryFile from the coreEntrySrcDir.
|
|
374
|
+
*
|
|
375
|
+
* @default undefined (uses coreEntryFile)
|
|
376
|
+
*/
|
|
377
|
+
binaryBuildInputFile?: string;
|
|
378
|
+
/**
|
|
379
|
+
* Comma-separated list of targets to build for binary builds.
|
|
380
|
+
* Use 'all' for all targets, 'list' to show available targets.
|
|
381
|
+
* Target format is {prefix}-{platform}-{arch} where prefix is extracted from input filename.
|
|
382
|
+
* Platforms: linux, windows, darwin (macOS)
|
|
383
|
+
* Architectures: x64, arm64
|
|
384
|
+
* Examples: dler-linux-x64, dler-windows-arm64, dler-darwin-x64
|
|
385
|
+
*
|
|
386
|
+
* @default "all"
|
|
387
|
+
*/
|
|
388
|
+
binaryBuildTargets: string;
|
|
389
|
+
/**
|
|
390
|
+
* Output directory for built binary executables.
|
|
391
|
+
*
|
|
392
|
+
* @default "dist"
|
|
393
|
+
*/
|
|
394
|
+
binaryBuildOutDir: string;
|
|
395
|
+
/**
|
|
396
|
+
* When \`true\`, minifies the binary output.
|
|
397
|
+
*
|
|
398
|
+
* @default true
|
|
399
|
+
*/
|
|
400
|
+
binaryBuildMinify: boolean;
|
|
401
|
+
/**
|
|
402
|
+
* When \`true\`, generates source maps for binary builds.
|
|
403
|
+
*
|
|
404
|
+
* @default true
|
|
405
|
+
*/
|
|
406
|
+
binaryBuildSourcemap: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* When \`true\`, enables bytecode compilation for faster startup (Bun v1.1.30+).
|
|
409
|
+
*
|
|
410
|
+
* @default false
|
|
411
|
+
*/
|
|
412
|
+
binaryBuildBytecode: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* When \`true\`, cleans output directory before building binaries.
|
|
415
|
+
*
|
|
416
|
+
* @default true
|
|
417
|
+
*/
|
|
418
|
+
binaryBuildClean: boolean;
|
|
419
|
+
/**
|
|
420
|
+
* Path to Windows .ico file for executable icon.
|
|
421
|
+
*
|
|
422
|
+
* @default undefined
|
|
423
|
+
*/
|
|
424
|
+
binaryBuildWindowsIcon?: string;
|
|
425
|
+
/**
|
|
426
|
+
* When \`true\`, hides console window on Windows.
|
|
427
|
+
*
|
|
428
|
+
* @default false
|
|
429
|
+
*/
|
|
430
|
+
binaryBuildWindowsHideConsole: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Asset naming pattern for binary builds.
|
|
433
|
+
*
|
|
434
|
+
* @default "[name]-[hash].[ext]"
|
|
435
|
+
*/
|
|
436
|
+
binaryBuildAssetNaming: string;
|
|
437
|
+
/**
|
|
438
|
+
* When \`true\`, builds binary targets in parallel.
|
|
439
|
+
*
|
|
440
|
+
* @default true
|
|
441
|
+
*/
|
|
442
|
+
binaryBuildParallel: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* External dependencies to exclude from binary bundle.
|
|
445
|
+
*
|
|
446
|
+
* @default ["c12", "terminal-kit"]
|
|
447
|
+
*/
|
|
448
|
+
binaryBuildExternal: string[];
|
|
449
|
+
/**
|
|
450
|
+
* When \`true\`, creates a bundled script instead of standalone executable.
|
|
451
|
+
* Useful for debugging terminal issues.
|
|
452
|
+
*
|
|
453
|
+
* @default false
|
|
454
|
+
*/
|
|
455
|
+
binaryBuildNoCompile: boolean;
|
|
362
456
|
// ==========================================================================
|
|
363
457
|
// Libraries Dler Plugin
|
|
364
458
|
// ==========================================================================
|
|
@@ -1095,6 +1189,20 @@ export const DEFAULT_CONFIG_RELIVERSE: ReliverseConfig = {
|
|
|
1095
1189
|
distNpmBuilder: "mkdist",
|
|
1096
1190
|
distNpmDirName: "dist-npm",
|
|
1097
1191
|
distNpmOutFilesExt: "js",
|
|
1192
|
+
binaryBuildEnabled: false,
|
|
1193
|
+
binaryBuildInputFile: undefined,
|
|
1194
|
+
binaryBuildTargets: "all",
|
|
1195
|
+
binaryBuildOutDir: "dist",
|
|
1196
|
+
binaryBuildMinify: true,
|
|
1197
|
+
binaryBuildSourcemap: true,
|
|
1198
|
+
binaryBuildBytecode: false,
|
|
1199
|
+
binaryBuildClean: true,
|
|
1200
|
+
binaryBuildWindowsIcon: undefined,
|
|
1201
|
+
binaryBuildWindowsHideConsole: false,
|
|
1202
|
+
binaryBuildAssetNaming: "[name]-[hash].[ext]",
|
|
1203
|
+
binaryBuildParallel: true,
|
|
1204
|
+
binaryBuildExternal: ["c12", "terminal-kit"],
|
|
1205
|
+
binaryBuildNoCompile: false,
|
|
1098
1206
|
libsActMode: "main-project-only",
|
|
1099
1207
|
libsDirDist: "dist-libs",
|
|
1100
1208
|
libsDirSrc: "src/libs",
|
|
@@ -1282,7 +1390,7 @@ export const DEFAULT_CONFIG_RELIVERSE: ReliverseConfig = {
|
|
|
1282
1390
|
},
|
|
1283
1391
|
// List dependencies to exclude from checks
|
|
1284
1392
|
ignoreDependencies: [],
|
|
1285
|
-
// Provide custom rules for
|
|
1393
|
+
// Provide custom rules for Rse AI
|
|
1286
1394
|
// You can use any json type here in {}
|
|
1287
1395
|
customRules: {},
|
|
1288
1396
|
// Project features
|
|
@@ -1360,7 +1468,7 @@ export const DEFAULT_CONFIG_RELIVERSE: ReliverseConfig = {
|
|
|
1360
1468
|
// Behavior for existing GitHub repos during project creation
|
|
1361
1469
|
// Options: prompt | autoYes | autoYesSkipCommit | autoNo
|
|
1362
1470
|
existingRepoBehavior: "prompt",
|
|
1363
|
-
// Behavior for
|
|
1471
|
+
// Behavior for Rse AI chat and agent mode
|
|
1364
1472
|
// Options: promptOnce | promptEachFile | autoYes
|
|
1365
1473
|
relinterConfirm: "promptOnce",
|
|
1366
1474
|
// Remdn Configuration
|