@reliverse/dler 1.7.138 → 1.7.140

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,17 +146,17 @@ 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
- postgres: "postgres";
150
- mysql: "mysql";
151
149
  sqlite: "sqlite";
152
- mongodb: "mongodb";
150
+ mysql: "mysql";
153
151
  mssql: "mssql";
152
+ postgres: "postgres";
154
153
  "drizzle:pg": "drizzle:pg";
155
154
  "drizzle:mysql": "drizzle:mysql";
156
155
  "drizzle:sqlite": "drizzle:sqlite";
157
156
  "prisma:postgresql": "prisma:postgresql";
158
157
  "prisma:mysql": "prisma:mysql";
159
158
  "prisma:sqlite": "prisma:sqlite";
159
+ mongodb: "mongodb";
160
160
  }>>;
161
161
  "skip-db": z.ZodOptional<z.ZodBoolean>;
162
162
  "skip-plugins": z.ZodOptional<z.ZodBoolean>;
@@ -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" | "yarn" | "pnpm">;
168
+ export declare function getPackageManager(): Promise<"pnpm" | "bun" | "npm" | "yarn">;
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.138";
2
+ export declare const cliVersion = "1.7.140";
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.138";
4
+ const version = "1.7.140";
5
5
  export const cliVersion = version;
6
6
  export const cliName = "@reliverse/rse";
7
7
  export const rseName = "@reliverse/rse";
@@ -230,7 +230,7 @@ function generateJsoncConfig(isDev, pkgDescription) {
230
230
  "bumpSet": "${DEFAULT_CONFIG_RELIVERSE.bumpSet}",
231
231
  // Common configuration
232
232
  "commonPubPause": ${pausePublishValue},
233
- "commonPubRegistry": ${DEFAULT_CONFIG_RELIVERSE.commonPubRegistry},
233
+ "commonPubRegistry": "npm",
234
234
  "commonVerbose": ${verboseValue},
235
235
  "displayBuildPubLogs": ${DEFAULT_CONFIG_RELIVERSE.displayBuildPubLogs},
236
236
  // Core configuration
@@ -551,7 +551,7 @@ function generateConfig(isDev, pkgDescription, configKind = "ts", usePackageImpo
551
551
  "",
552
552
  " // Common configuration",
553
553
  " commonPubPause: " + pausePublishValue + ",",
554
- " commonPubRegistry: " + DEFAULT_CONFIG_RELIVERSE.commonPubRegistry + ",",
554
+ ` commonPubRegistry: "npm",`,
555
555
  " commonVerbose: " + verboseValue + ",",
556
556
  " displayBuildPubLogs: " + DEFAULT_CONFIG_RELIVERSE.displayBuildPubLogs + ",",
557
557
  "",
@@ -1,9 +1,9 @@
1
1
  import { z } from "zod";
2
2
  export declare const DatabaseSchema: z.ZodEnum<{
3
3
  none: "none";
4
- postgres: "postgres";
5
- mysql: "mysql";
6
4
  sqlite: "sqlite";
5
+ mysql: "mysql";
6
+ postgres: "postgres";
7
7
  mongodb: "mongodb";
8
8
  }>;
9
9
  export type Database = z.infer<typeof DatabaseSchema>;
@@ -17,16 +17,16 @@ export type ORM = z.infer<typeof ORMSchema>;
17
17
  export declare const BackendSchema: z.ZodEnum<{
18
18
  none: "none";
19
19
  hono: "hono";
20
+ next: "next";
20
21
  express: "express";
21
22
  fastify: "fastify";
22
- next: "next";
23
23
  elysia: "elysia";
24
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
  }>;
@@ -34,45 +34,45 @@ export type Runtime = z.infer<typeof RuntimeSchema>;
34
34
  export declare const FrontendSchema: z.ZodEnum<{
35
35
  none: "none";
36
36
  svelte: "svelte";
37
+ solid: "solid";
37
38
  nuxt: "nuxt";
38
- "react-router": "react-router";
39
39
  next: "next";
40
+ "react-router": "react-router";
40
41
  "tanstack-router": "tanstack-router";
41
42
  "tanstack-start": "tanstack-start";
42
43
  "native-nativewind": "native-nativewind";
43
44
  "native-unistyles": "native-unistyles";
44
- solid: "solid";
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";
50
- pwa: "pwa";
51
49
  tauri: "tauri";
50
+ biome: "biome";
52
51
  starlight: "starlight";
53
- husky: "husky";
54
52
  turborepo: "turborepo";
53
+ pwa: "pwa";
54
+ husky: "husky";
55
55
  }>;
56
56
  export type Addons = z.infer<typeof AddonsSchema>;
57
57
  export declare const ExamplesSchema: z.ZodEnum<{
58
- none: "none";
59
58
  ai: "ai";
59
+ none: "none";
60
60
  todo: "todo";
61
61
  }>;
62
62
  export type Examples = z.infer<typeof ExamplesSchema>;
63
63
  export declare const PackageManagerSchema: z.ZodEnum<{
64
+ pnpm: "pnpm";
64
65
  bun: "bun";
65
66
  npm: "npm";
66
- pnpm: "pnpm";
67
67
  }>;
68
68
  export type PackageManager = z.infer<typeof PackageManagerSchema>;
69
69
  export declare const DatabaseSetupSchema: z.ZodEnum<{
70
70
  none: "none";
71
- turso: "turso";
71
+ supabase: "supabase";
72
72
  neon: "neon";
73
+ turso: "turso";
73
74
  "prisma-postgres": "prisma-postgres";
74
75
  "mongodb-atlas": "mongodb-atlas";
75
- supabase: "supabase";
76
76
  }>;
77
77
  export type DatabaseSetup = z.infer<typeof DatabaseSetupSchema>;
78
78
  export declare const APISchema: z.ZodEnum<{
@@ -32,9 +32,15 @@ export declare function prepareUpdateCandidates(args: UpdateArgs): Promise<{
32
32
  candidates: string[];
33
33
  allDepsMap: Record<string, any>;
34
34
  }>;
35
+ export declare function prepareAllUpdateCandidates(args: UpdateArgs): Promise<{
36
+ candidates: string[];
37
+ allDepsMap: Record<string, any>;
38
+ packageJsonFiles: string[];
39
+ }>;
35
40
  export declare function checkPackageUpdates(candidates: string[], allDepsMap: Record<string, any>, args: UpdateArgs): Promise<UpdateResult[]>;
36
41
  export declare function handleInteractiveSelection(results: UpdateResult[]): Promise<UpdateResult[]>;
37
42
  export declare function updateRootPackageJson(packageJsonPath: string, allDepsMap: Record<string, any>, toUpdate: UpdateResult[], savePrefix: string): Promise<number>;
43
+ export declare function updateAllPackageJsonFiles(packageJsonFiles: string[], toUpdate: UpdateResult[], savePrefix: string): Promise<number>;
38
44
  export declare function handleRecursiveUpdates(args: UpdateArgs, options: PackageCheckOptions): Promise<number>;
39
45
  export declare function handleWorkspaceUpdates(args: UpdateArgs, options: PackageCheckOptions): Promise<number>;
40
46
  export declare function displayUpdateSummary(totalUpdated: number, args: UpdateArgs, isMonorepoProject: boolean, shouldUpdateWorkspaces: boolean): void;
@@ -111,6 +111,72 @@ export async function prepareUpdateCandidates(args) {
111
111
  }
112
112
  return { candidates, allDepsMap };
113
113
  }
114
+ export async function prepareAllUpdateCandidates(args) {
115
+ const packageJsonFiles = await determinePackageJsonFiles(args);
116
+ if (packageJsonFiles.length === 0) {
117
+ relinka("warn", "No package.json files found to process");
118
+ return { candidates: [], allDepsMap: {}, packageJsonFiles: [] };
119
+ }
120
+ const allDepsMap = {};
121
+ const allCandidates = /* @__PURE__ */ new Set();
122
+ for (const packageJsonPath of packageJsonFiles) {
123
+ try {
124
+ const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
125
+ const { map } = collectTargetDependencies(packageJson, args);
126
+ const candidates2 = prepareDependenciesForUpdate(map, args);
127
+ for (const [dep, info] of Object.entries(map)) {
128
+ if (!allDepsMap[dep]) {
129
+ allDepsMap[dep] = { ...info, locations: new Set(info.locations) };
130
+ } else {
131
+ for (const location of info.locations) {
132
+ allDepsMap[dep].locations.add(location);
133
+ }
134
+ allDepsMap[dep].versionSpec = info.versionSpec;
135
+ }
136
+ }
137
+ for (const candidate of candidates2) {
138
+ allCandidates.add(candidate);
139
+ }
140
+ } catch (error) {
141
+ relinka(
142
+ "warn",
143
+ `Failed to process ${packageJsonPath}: ${error instanceof Error ? error.message : String(error)}`
144
+ );
145
+ }
146
+ }
147
+ const candidates = Array.from(allCandidates);
148
+ if (candidates.length === 0) {
149
+ relinka(
150
+ "warn",
151
+ "No dependencies to update based on provided filters across all package.json files"
152
+ );
153
+ return { candidates: [], allDepsMap: {}, packageJsonFiles };
154
+ }
155
+ return { candidates, allDepsMap, packageJsonFiles };
156
+ }
157
+ async function determinePackageJsonFiles(args) {
158
+ const cwd = process.cwd();
159
+ const rootPackageJsonPath = path.resolve(cwd, "package.json");
160
+ const packageJsonFiles = [];
161
+ if (await fs.pathExists(rootPackageJsonPath)) {
162
+ packageJsonFiles.push(rootPackageJsonPath);
163
+ }
164
+ if (args.recursive) {
165
+ const allPackageJsons = await findAllPackageJsons(cwd);
166
+ const otherPackageJsons = allPackageJsons.filter((p) => p !== rootPackageJsonPath);
167
+ packageJsonFiles.push(...otherPackageJsons);
168
+ return packageJsonFiles;
169
+ }
170
+ const isMonorepoProject = await isMonorepo(cwd);
171
+ if (args.allWorkspaces) {
172
+ const workspacePkgJsons = await findWorkspacePackageJsons(cwd);
173
+ packageJsonFiles.push(...workspacePkgJsons);
174
+ } else if (!args.rootOnly && isMonorepoProject) {
175
+ const workspacePkgJsons = await findWorkspacePackageJsons(cwd);
176
+ packageJsonFiles.push(...workspacePkgJsons);
177
+ }
178
+ return packageJsonFiles;
179
+ }
114
180
  export async function checkPackageUpdates(candidates, allDepsMap, args) {
115
181
  const options = {
116
182
  allowMajor: !!args["allowMajor"],
@@ -192,6 +258,38 @@ export async function handleInteractiveSelection(results) {
192
258
  export async function updateRootPackageJson(packageJsonPath, allDepsMap, toUpdate, savePrefix) {
193
259
  return await updatePackageJsonFile(packageJsonPath, allDepsMap, toUpdate, savePrefix);
194
260
  }
261
+ export async function updateAllPackageJsonFiles(packageJsonFiles, toUpdate, savePrefix) {
262
+ if (packageJsonFiles.length === 0 || toUpdate.length === 0) {
263
+ return 0;
264
+ }
265
+ let totalUpdated = 0;
266
+ for (const packageJsonPath of packageJsonFiles) {
267
+ try {
268
+ const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
269
+ const { map: fileDepsMap } = collectTargetDependencies(packageJson, {});
270
+ const fileSpecificUpdates = toUpdate.filter((update) => fileDepsMap[update.package]);
271
+ if (fileSpecificUpdates.length > 0) {
272
+ const updated = await updatePackageJsonFile(
273
+ packageJsonPath,
274
+ fileDepsMap,
275
+ fileSpecificUpdates,
276
+ savePrefix
277
+ );
278
+ totalUpdated += updated;
279
+ if (updated > 0) {
280
+ const relativePath = path.relative(process.cwd(), packageJsonPath);
281
+ relinka("verbose", `Updated ${updated} dependencies in ${relativePath}`);
282
+ }
283
+ }
284
+ } catch (error) {
285
+ relinka(
286
+ "warn",
287
+ `Failed to process ${packageJsonPath}: ${error instanceof Error ? error.message : String(error)}`
288
+ );
289
+ }
290
+ }
291
+ return totalUpdated;
292
+ }
195
293
  export async function handleRecursiveUpdates(args, options) {
196
294
  const allPackageJsons = await findAllPackageJsons(process.cwd());
197
295
  const rootPackageJsonPath = path.resolve(process.cwd(), "package.json");
package/bin/mod.d.ts CHANGED
@@ -308,7 +308,7 @@ export { openVercelTools } from "./impl/toolbox/toolbox-vercel";
308
308
  export type { BundleSource, IndentOptions, MagicStringOptions, OverwriteOptions, StringTransformer, TransformResult, UpdateOptions, } from "./impl/transform/transform-impl-mod";
309
309
  export { append, compose, createBundle, createTransformer, createTransformerFromMagicString, indent, insertAt, overwrite, pipe, prepend, readAndTransform, remove, replace, replaceAll, slice, template, transformAndWrite, transformMultiple, trim, update, wrapWith, } from "./impl/transform/transform-impl-mod";
310
310
  export type { AppParams, ArgTypeShared, BaseBuildEntry, BaseConfig, Behavior, BiomeConfig, BiomeConfigResult, BuildContext, BuildEntry, BuildHooks, BuildOptions, BuildPreset, CamelCase, CheckIssue, CheckResult, ColumnType, CommonCliArgs, CopyBuildEntry, CopyHooks, CreateLoaderOptions, DatabasePostgresProvider, DatabaseProvider, DeploymentService, DetectedProject, DirectoryType, DistDirs, DistDirsAll, EsbuildOptions, GitModParams, HyphenatedStringToCamelCase, IconName, InputFile, IntegrationCategory, IntegrationConfig, IntegrationOption, IntegrationOptions, IterableError, Loader, LoaderContext, LoaderResult, LoadFile, MkdistBuildEntry, MkdistHooks, MkdistOptions, ModernReplacement, MonorepoType, NavItem, NavItemWithChildren, NavigationEntry, OutputFile, ParamsOmitReli, ParamsOmitSkipPN, PerfTimer, PrismaField, PrismaModel, ProjectConfigReturn, ProjectSelectionResult, RemovalConfig, RollupBuildEntry, RollupBuildOptions, RollupHooks, RollupOptions, RulesCheckOptions, ShadcnConfig, SubOption, TableSchema, Theme, UnifiedBuildConfig, UntypedBuildEntry, UntypedHooks, UntypedOutput, UntypedOutputs, VSCodeSettings, } from "./impl/types/mod";
311
- export { checkPackageUpdates, displayUpdateSummary, getEffectiveLinker, handleCatalogOnlyUpdate, handleInstallation, handleInteractiveSelection, handleRecursiveUpdates, handleToolUpgrades, handleWorkspaceUpdates, prepareUpdateCandidates, updateRootPackageJson, validatePackageJson, validateUpdateArgs, } from "./impl/update/impl";
311
+ export { checkPackageUpdates, displayUpdateSummary, getEffectiveLinker, handleCatalogOnlyUpdate, handleInstallation, handleInteractiveSelection, handleRecursiveUpdates, handleToolUpgrades, handleWorkspaceUpdates, prepareAllUpdateCandidates, prepareUpdateCandidates, updateAllPackageJsonFiles, updateRootPackageJson, validatePackageJson, validateUpdateArgs, } from "./impl/update/impl";
312
312
  export type { DependencyInfo, PackageCheckOptions, UpdateResult, UpgradeResult, } from "./impl/update/utils";
313
313
  export { applyVersionUpdate, CACHE_TTL, checkPackageUpdate, collectTargetDependencies, displayUpdateResults, fetchVersionFromRegistry, findAllPackageJsons, findWorkspacePackageJsons, getGlobalPackages, getLatestVersion, getPmOptions, handleGlobalUpdates, isCatalogReference, isMonorepo, isNonSemverSpecifier, isNpmAlias, isSemverCompatible, isWorkspaceDependency, prepareDependenciesForUpdate, runInstallCommand, runInstallCommandWithFilter, updateGlobalPackage, updatePackageJsonFile, updateWorkspacePackages, upgradeBun, upgradeDlerGlobal, upgradeDlerLocal, upgradeGit, upgradeNode, upgradeNpm, upgradePnpm, upgradeYarn, versionCache, } from "./impl/update/utils";
314
314
  export type { UploadFile, UploadResult } from "./impl/upload/providers/providers-mod";
package/bin/mod.js CHANGED
@@ -755,7 +755,9 @@ export {
755
755
  handleRecursiveUpdates,
756
756
  handleToolUpgrades,
757
757
  handleWorkspaceUpdates,
758
+ prepareAllUpdateCandidates,
758
759
  prepareUpdateCandidates,
760
+ updateAllPackageJsonFiles,
759
761
  updateRootPackageJson,
760
762
  validatePackageJson,
761
763
  validateUpdateArgs
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "@reliverse/relico": "^1.3.9",
20
20
  "@reliverse/relifso": "^1.4.5",
21
21
  "@reliverse/relinka": "^1.6.1",
22
- "@reliverse/rempts": "^1.7.61",
22
+ "@reliverse/rempts": "^1.7.62",
23
23
  "@reliverse/runtime": "^1.0.3",
24
24
  "@rollup/plugin-alias": "^5.1.1",
25
25
  "@rollup/plugin-commonjs": "^28.0.6",
@@ -122,7 +122,7 @@
122
122
  "license": "MIT",
123
123
  "name": "@reliverse/dler",
124
124
  "type": "module",
125
- "version": "1.7.138",
125
+ "version": "1.7.140",
126
126
  "author": "reliverse",
127
127
  "bugs": {
128
128
  "email": "blefnk@gmail.com",