@reliverse/dler 1.7.127 → 1.7.129

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.
@@ -165,7 +165,7 @@ export declare const optionsSchema: z.ZodObject<{
165
165
  }, z.core.$strip>;
166
166
  export declare const outroText = "\uD83E\uDD73 All Done, Happy Hacking!";
167
167
  export declare function getLatestNpmVersion(packageName: string): Promise<string>;
168
- export declare function getPackageManager(): Promise<"bun" | "npm" | "pnpm" | "yarn">;
168
+ export declare function getPackageManager(): Promise<"bun" | "npm" | "yarn" | "pnpm">;
169
169
  export declare function getEnvFiles(cwd: string): Promise<string[]>;
170
170
  export declare function updateEnvs({ envs, files, isCommented, }: {
171
171
  /**
@@ -1,5 +1,5 @@
1
1
  export declare const PROJECT_ROOT: string;
2
- export declare const cliVersion = "1.7.127";
2
+ export declare const cliVersion = "1.7.129";
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.127";
4
+ const version = "1.7.129";
5
5
  export const cliVersion = version;
6
6
  export const cliName = "@reliverse/rse";
7
7
  export const rseName = "@reliverse/rse";
@@ -10,8 +10,8 @@ export type Database = z.infer<typeof DatabaseSchema>;
10
10
  export declare const ORMSchema: z.ZodEnum<{
11
11
  none: "none";
12
12
  drizzle: "drizzle";
13
- prisma: "prisma";
14
13
  mongoose: "mongoose";
14
+ prisma: "prisma";
15
15
  }>;
16
16
  export type ORM = z.infer<typeof ORMSchema>;
17
17
  export declare const BackendSchema: z.ZodEnum<{
@@ -46,8 +46,8 @@ export declare const FrontendSchema: z.ZodEnum<{
46
46
  export type Frontend = z.infer<typeof FrontendSchema>;
47
47
  export declare const AddonsSchema: z.ZodEnum<{
48
48
  none: "none";
49
- tauri: "tauri";
50
49
  biome: "biome";
50
+ tauri: "tauri";
51
51
  starlight: "starlight";
52
52
  turborepo: "turborepo";
53
53
  pwa: "pwa";
@@ -55,9 +55,9 @@ export declare const AddonsSchema: z.ZodEnum<{
55
55
  }>;
56
56
  export type Addons = z.infer<typeof AddonsSchema>;
57
57
  export declare const ExamplesSchema: z.ZodEnum<{
58
- ai: "ai";
59
58
  none: "none";
60
59
  todo: "todo";
60
+ ai: "ai";
61
61
  }>;
62
62
  export type Examples = z.infer<typeof ExamplesSchema>;
63
63
  export declare const PackageManagerSchema: z.ZodEnum<{
@@ -70,17 +70,21 @@ export async function dlerPub(timer, isDev, config) {
70
70
  const elapsedTime = getElapsedPerfTime(timer);
71
71
  const formattedPerfTime = prettyMilliseconds(elapsedTime, { verbose: true });
72
72
  const packageName = buildConfig.projectName ?? "The project";
73
+ const versionLabelMain = buildConfig.version ? ` v${buildConfig.version}` : "";
73
74
  const publishedLibNames = (() => {
74
75
  const includeLibs = buildConfig.libsActMode === "libs-only" || buildConfig.libsActMode === "main-and-libs";
75
76
  if (!includeLibs || buildConfig.commonPubPause) return [];
76
77
  const entries = Object.entries(buildConfig.libsList ?? {});
77
78
  const names = [];
78
79
  for (const [libName, libCfg] of entries) {
79
- if (!libCfg?.libPubPause) names.push(libName);
80
+ if (!libCfg?.libPubPause) {
81
+ const libVersionLabel = libCfg?.version ? ` v${libCfg.version}` : versionLabelMain;
82
+ names.push(`${libName}${libVersionLabel}`);
83
+ }
80
84
  }
81
85
  return names;
82
86
  })();
83
- const displayName = publishedLibNames.length > 0 ? publishedLibNames.join(", ") : packageName;
87
+ const displayName = publishedLibNames.length > 0 ? publishedLibNames.join(", ") : `${packageName}${versionLabelMain}`;
84
88
  const publishTargetLabel = (() => {
85
89
  switch (buildConfig.commonPubRegistry) {
86
90
  case "npm":
@@ -1,4 +1,4 @@
1
- export declare function readPackageJSON(): Promise<{
1
+ export declare function readLocalPackageJSON(): Promise<{
2
2
  name?: string;
3
3
  version?: string;
4
4
  }>;
@@ -1,23 +1,31 @@
1
+ import { dirname } from "node:path";
1
2
  import { relinka } from "@reliverse/relinka";
2
3
  import { endPrompt, startPrompt } from "@reliverse/rempts";
3
4
  import { isBun, isBunPM, isBunRuntime } from "@reliverse/runtime";
4
- import { readPackageJSON as readPkgJSON } from "pkg-types";
5
+ import { readPackageJSON } from "pkg-types";
5
6
  import { cliVersion, dlerName } from "../config/constants.js";
6
- export async function readPackageJSON() {
7
- try {
8
- const pkg = await readPkgJSON();
9
- return { name: pkg.name, version: pkg.version };
10
- } catch (error) {
11
- relinka("warn", "Could not read package.json, using default values");
12
- return {};
7
+ export async function readLocalPackageJSON() {
8
+ const candidateDirs = [];
9
+ if (Array.isArray(process.argv) && typeof process.argv[1] === "string" && process.argv[1].length > 0) {
10
+ candidateDirs.push(dirname(process.argv[1]));
13
11
  }
12
+ candidateDirs.push(process.cwd());
13
+ for (const dir of candidateDirs) {
14
+ try {
15
+ const pkg = await readPackageJSON(dir);
16
+ return { name: pkg.name, version: pkg.version };
17
+ } catch {
18
+ }
19
+ }
20
+ relinka("verbose", "Could not read package.json, using default values");
21
+ return {};
14
22
  }
15
23
  export const getPkgName = async () => {
16
- const pkg = await readPackageJSON();
24
+ const pkg = await readLocalPackageJSON();
17
25
  return pkg.name || "unknown";
18
26
  };
19
27
  export const getPkgVersion = async () => {
20
- const pkg = await readPackageJSON();
28
+ const pkg = await readLocalPackageJSON();
21
29
  return pkg.version || "0.0.0";
22
30
  };
23
31
  export async function showStartPrompt(isDev, showRuntimeInfo, clearConsole) {
package/bin/mod.d.ts CHANGED
@@ -414,7 +414,7 @@ export { resolveAllCrossLibs } from "./impl/utils/resolve-cross-libs";
414
414
  export type { EncryptedDataMemory, EncryptedDataMemoryShape, ReliverseMemory, UserDataMemory, UserDataMemoryShape, } from "./impl/utils/schemaMemory";
415
415
  export type { RepoInfo, ReposConfig } from "./impl/utils/schemaTemplate";
416
416
  export { DEFAULT_REPOS_CONFIG, generateReposJsonSchema, isReposConfig, shouldRegenerateSchema, } from "./impl/utils/schemaTemplate";
417
- export { getPkgName, getPkgVersion, readPackageJSON, showEndPrompt, showStartPrompt, } from "./impl/utils/startEndPrompts";
417
+ export { getPkgName, getPkgVersion, readLocalPackageJSON, showEndPrompt, showStartPrompt, } from "./impl/utils/startEndPrompts";
418
418
  export { cd, getCurrentWorkingDirectory, handleError, pwd, rm, } from "./impl/utils/terminalHelpers";
419
419
  export { setupDevModeIfNeeded } from "./impl/utils/testsRuntime";
420
420
  export { findTsconfigUp } from "./impl/utils/tsconfigHelpers";
package/bin/mod.js CHANGED
@@ -975,7 +975,7 @@ export {
975
975
  export {
976
976
  getPkgName,
977
977
  getPkgVersion,
978
- readPackageJSON,
978
+ readLocalPackageJSON,
979
979
  showEndPrompt,
980
980
  showStartPrompt
981
981
  } from "./impl/utils/startEndPrompts.js";
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.127",
126
+ "version": "1.7.129",
127
127
  "author": "reliverse",
128
128
  "bugs": {
129
129
  "email": "blefnk@gmail.com",