@reliverse/dler 1.7.127 → 1.7.128

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
- sqlite: "sqlite";
150
149
  mysql: "mysql";
150
+ sqlite: "sqlite";
151
151
  mongodb: "mongodb";
152
152
  postgres: "postgres";
153
153
  mssql: "mssql";
@@ -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.128";
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.128";
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
- sqlite: "sqlite";
5
4
  mysql: "mysql";
5
+ sqlite: "sqlite";
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
- none: "none";
29
28
  bun: "bun";
29
+ none: "none";
30
30
  node: "node";
31
31
  workers: "workers";
32
32
  }>;
@@ -45,9 +45,9 @@ 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";
48
49
  none: "none";
49
50
  tauri: "tauri";
50
- biome: "biome";
51
51
  starlight: "starlight";
52
52
  turborepo: "turborepo";
53
53
  pwa: "pwa";
@@ -55,8 +55,8 @@ 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";
59
+ ai: "ai";
60
60
  todo: "todo";
61
61
  }>;
62
62
  export type Examples = z.infer<typeof ExamplesSchema>;
@@ -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.128",
127
127
  "author": "reliverse",
128
128
  "bugs": {
129
129
  "email": "blefnk@gmail.com",