@reliverse/dler 1.7.128 → 1.7.130

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.
@@ -146,8 +146,8 @@ export declare const optionsSchema: z.ZodObject<{
146
146
  cwd: z.ZodString;
147
147
  config: z.ZodOptional<z.ZodString>;
148
148
  database: z.ZodOptional<z.ZodEnum<{
149
- mysql: "mysql";
150
149
  sqlite: "sqlite";
150
+ mysql: "mysql";
151
151
  mongodb: "mongodb";
152
152
  postgres: "postgres";
153
153
  mssql: "mssql";
@@ -9,6 +9,7 @@ import { PROJECT_ROOT } from "../config/constants.js";
9
9
  import { getConfigDler } from "../config/load.js";
10
10
  import { removeDistFolders } from "../utils/utils-clean.js";
11
11
  import { handleDlerError } from "../utils/utils-error-cwd.js";
12
+ import { createCompletionTexts } from "../utils/finish-text.js";
12
13
  import { dlerPostBuild, wrapper_CopyNonBuildFiles } from "./postbuild.js";
13
14
  import { dlerPreBuild } from "./prebuild.js";
14
15
  export async function dlerBuild(timer, isDev, config, debugOnlyCopyNonBuildFiles, debugDontCopyNonBuildFiles, disableOwnSpinner) {
@@ -76,8 +77,11 @@ export async function dlerBuild(timer, isDev, config, debugOnlyCopyNonBuildFiles
76
77
  if (effectiveConfig.postBuildSettings?.deleteDistTmpAfterBuild) {
77
78
  await fs.remove(path.join(PROJECT_ROOT, "dist-tmp"));
78
79
  }
80
+ const { plain, withEmoji } = await createCompletionTexts(effectiveConfig, timer, "build");
79
81
  if (multiStepSpinner) {
80
- multiStepSpinner.complete("Build completed successfully");
82
+ multiStepSpinner.complete(plain);
83
+ } else {
84
+ relinka("success", withEmoji);
81
85
  }
82
86
  return { timer, effectiveConfig };
83
87
  } catch (error) {
@@ -1,5 +1,5 @@
1
1
  export declare const PROJECT_ROOT: string;
2
- export declare const cliVersion = "1.7.128";
2
+ export declare const cliVersion = "1.7.130";
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.128";
4
+ const version = "1.7.130";
5
5
  export const cliVersion = version;
6
6
  export const cliName = "@reliverse/rse";
7
7
  export const rseName = "@reliverse/rse";
@@ -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
  }>;
@@ -25,8 +25,8 @@ export declare const BackendSchema: z.ZodEnum<{
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,8 +45,8 @@ 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";
@@ -1,14 +1,13 @@
1
1
  import { bumpHandler, isBumpDisabled, setBumpDisabledValueTo } from "@reliverse/bleump";
2
2
  import { relinka } from "@reliverse/relinka";
3
3
  import { createMultiStepSpinner } from "@reliverse/rempts";
4
- import prettyMilliseconds from "pretty-ms";
5
4
  import { dlerBuild } from "../build/impl.js";
6
5
  import { library_pubFlow } from "../build/library-flow.js";
7
6
  import { regular_pubFlow } from "../build/regular-flow.js";
8
7
  import { getConfigDler } from "../config/load.js";
9
8
  import { finalizeBuild, finalizePub } from "../utils/finalize.js";
10
9
  import { handleDlerError } from "../utils/utils-error-cwd.js";
11
- import { getElapsedPerfTime } from "../utils/utils-perf.js";
10
+ import { createCompletionTexts } from "../utils/finish-text.js";
12
11
  export async function dlerPub(timer, isDev, config) {
13
12
  let effectiveConfig = config;
14
13
  let shouldShowSpinner = false;
@@ -54,8 +53,11 @@ export async function dlerPub(timer, isDev, config) {
54
53
  if (multiStepSpinner) multiStepSpinner.nextStep();
55
54
  if (effectiveConfig.commonPubPause) {
56
55
  await finalizeBuild(shouldShowSpinner, timer, effectiveConfig.commonPubPause, "pub");
56
+ const buildTexts = await createCompletionTexts(buildConfig, timer, "build");
57
57
  if (multiStepSpinner) {
58
- multiStepSpinner.complete("Build completed successfully");
58
+ multiStepSpinner.complete(buildTexts.plain);
59
+ } else {
60
+ relinka("success", buildTexts.withEmoji);
59
61
  }
60
62
  } else {
61
63
  await regular_pubFlow(timer, isDev, buildConfig);
@@ -67,41 +69,11 @@ export async function dlerPub(timer, isDev, config) {
67
69
  buildConfig.distJsrDirName,
68
70
  buildConfig.libsDirDist
69
71
  );
70
- const elapsedTime = getElapsedPerfTime(timer);
71
- const formattedPerfTime = prettyMilliseconds(elapsedTime, { verbose: true });
72
- const packageName = buildConfig.projectName ?? "The project";
73
- const publishedLibNames = (() => {
74
- const includeLibs = buildConfig.libsActMode === "libs-only" || buildConfig.libsActMode === "main-and-libs";
75
- if (!includeLibs || buildConfig.commonPubPause) return [];
76
- const entries = Object.entries(buildConfig.libsList ?? {});
77
- const names = [];
78
- for (const [libName, libCfg] of entries) {
79
- if (!libCfg?.libPubPause) names.push(libName);
80
- }
81
- return names;
82
- })();
83
- const displayName = publishedLibNames.length > 0 ? publishedLibNames.join(", ") : packageName;
84
- const publishTargetLabel = (() => {
85
- switch (buildConfig.commonPubRegistry) {
86
- case "npm":
87
- return "to NPM";
88
- case "jsr":
89
- return "to JSR";
90
- case "npm-jsr":
91
- return "to NPM and JSR";
92
- default:
93
- return "to NPM and JSR";
94
- }
95
- })();
72
+ const publishTexts = await createCompletionTexts(buildConfig, timer, "publish");
96
73
  if (multiStepSpinner) {
97
- multiStepSpinner.complete(
98
- `${displayName} publish ${publishTargetLabel} completed successfully in ${formattedPerfTime}`
99
- );
74
+ multiStepSpinner.complete(publishTexts.plain);
100
75
  } else {
101
- relinka(
102
- "success",
103
- `\u2705 ${displayName} publish ${publishTargetLabel} completed successfully in ${formattedPerfTime}`
104
- );
76
+ relinka("success", publishTexts.withEmoji);
105
77
  }
106
78
  }
107
79
  } catch (error) {
@@ -0,0 +1,6 @@
1
+ import type { ReliverseConfig } from "../schema/mod";
2
+ import type { PerfTimer } from "../types/mod";
3
+ export declare function createCompletionTexts(buildConfig: ReliverseConfig, timer: PerfTimer, action: "build" | "publish"): Promise<{
4
+ plain: string;
5
+ withEmoji: string;
6
+ }>;
@@ -0,0 +1,41 @@
1
+ import prettyMilliseconds from "pretty-ms";
2
+ import { PROJECT_ROOT } from "../config/constants.js";
3
+ import { getPackageJson } from "../config/detect.js";
4
+ import { getElapsedPerfTime } from "../utils/utils-perf.js";
5
+ export async function createCompletionTexts(buildConfig, timer, action) {
6
+ const elapsedTime = getElapsedPerfTime(timer);
7
+ const formattedPerfTime = prettyMilliseconds(elapsedTime, { verbose: true });
8
+ const pkgJson = await getPackageJson(PROJECT_ROOT);
9
+ const packageName = pkgJson?.name ?? buildConfig.projectName ?? "The project";
10
+ const versionFromPkg = pkgJson?.version;
11
+ const versionLabelMain = versionFromPkg ?? buildConfig.version ? ` v${versionFromPkg ?? buildConfig.version}` : "";
12
+ const includeLibs = buildConfig.libsActMode === "libs-only" || buildConfig.libsActMode === "main-and-libs";
13
+ const namesForAction = (() => {
14
+ if (!includeLibs) return [];
15
+ const entries = Object.entries(buildConfig.libsList ?? {});
16
+ const names = [];
17
+ for (const [libName, libCfg] of entries) {
18
+ if (action === "publish") {
19
+ if (buildConfig.commonPubPause || libCfg?.libPubPause) continue;
20
+ }
21
+ const libVersionLabel = libCfg?.version ? ` v${libCfg.version}` : versionLabelMain;
22
+ names.push(`${libName}${libVersionLabel}`);
23
+ }
24
+ return names;
25
+ })();
26
+ const displayName = namesForAction.length > 0 ? namesForAction.join(", ") : `${packageName}${versionLabelMain}`;
27
+ const publishTargetLabel = (() => {
28
+ switch (buildConfig.commonPubRegistry) {
29
+ case "npm":
30
+ return "to NPM";
31
+ case "jsr":
32
+ return "to JSR";
33
+ case "npm-jsr":
34
+ return "to NPM and JSR";
35
+ default:
36
+ return "to NPM and JSR";
37
+ }
38
+ })();
39
+ const base = action === "build" ? `${displayName} build completed successfully in ${formattedPerfTime}` : `${displayName} publish ${publishTargetLabel} completed successfully in ${formattedPerfTime}`;
40
+ return { plain: base, withEmoji: `\u2705 ${base}` };
41
+ }
package/package.json CHANGED
@@ -123,7 +123,7 @@
123
123
  "license": "MIT",
124
124
  "name": "@reliverse/dler",
125
125
  "type": "module",
126
- "version": "1.7.128",
126
+ "version": "1.7.130",
127
127
  "author": "reliverse",
128
128
  "bugs": {
129
129
  "email": "blefnk@gmail.com",