@reliverse/dler 1.7.131 → 1.7.132

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";
@@ -1,5 +1,5 @@
1
1
  export declare const PROJECT_ROOT: string;
2
- export declare const cliVersion = "1.7.131";
2
+ export declare const cliVersion = "1.7.132";
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.131";
4
+ const version = "1.7.132";
5
5
  export const cliVersion = version;
6
6
  export const cliName = "@reliverse/rse";
7
7
  export const rseName = "@reliverse/rse";
@@ -3,8 +3,6 @@ export declare const DEFAULT_SEPARATOR_RAW = "\\n\\n";
3
3
  export declare const normalizeGlobPattern: (pattern: string) => string;
4
4
  export declare const parseCSV: (s: string) => any[];
5
5
  export declare const unescape: (s: string) => string;
6
- export declare const maybePrompt: <T>(interactive: boolean, value: T | undefined, promptFn: () => Promise<T>) => Promise<T | undefined>;
7
- export declare const collectFiles: (include: string[], extraIgnore: string[], recursive: boolean, sortBy: "name" | "path" | "mtime" | "none", depth: number) => Promise<string[]>;
8
6
  export declare const writeResult: (sections: string[], _separator: string, toFile: string | undefined, toStdout: boolean, dryRun: boolean, backup: boolean, generateSourceMap?: boolean) => Promise<void>;
9
7
  export declare const writeFilesPreserveStructure: (files: string[], outDir: string, preserveStructure: boolean, increment: boolean, concurrency: number, dryRun: boolean, backup: boolean) => Promise<void>;
10
8
  export declare const processSection: (raw: string, rel: string, prefix: string, pathAbove: boolean, injectPath: boolean) => string;
@@ -1,18 +1,13 @@
1
1
  import path from "@reliverse/pathkit";
2
- import { glob } from "@reliverse/reglob";
3
2
  import fs from "@reliverse/relifso";
4
- import { relinka } from "@reliverse/relinka";
5
3
  import { withEnhancedSpinner } from "@reliverse/rempts";
6
4
  import MagicString, { Bundle } from "magic-string";
7
5
  import pMap from "p-map";
8
- import { isBinaryExt } from "../utils/binary.js";
9
6
  import {
10
- checkFileSize,
11
7
  checkPermissions,
12
8
  handleCtxError,
13
9
  sanitizeInput,
14
10
  validateContent,
15
- validateFileExists,
16
11
  validateFileType,
17
12
  validateMergeOperation,
18
13
  validatePath
@@ -28,66 +23,6 @@ export const normalizeGlobPattern = (pattern) => {
28
23
  };
29
24
  export const parseCSV = (s) => s.split(",").map((t) => sanitizeInput(t.trim())).filter(Boolean);
30
25
  export const unescape = (s) => s.replace(/\\n/g, "\n").replace(/\\t/g, " ");
31
- export const maybePrompt = async (interactive, value, promptFn) => {
32
- if (!interactive || value !== void 0) return value;
33
- return promptFn();
34
- };
35
- export const collectFiles = async (include, extraIgnore, recursive, sortBy, depth) => {
36
- try {
37
- const normalizedInclude = include.map(normalizeGlobPattern);
38
- const files = await glob(normalizedInclude, {
39
- ignore: [...DEFAULT_IGNORES, ...extraIgnore.map(sanitizeInput)],
40
- absolute: true,
41
- onlyFiles: true,
42
- deep: recursive ? void 0 : 1
43
- });
44
- const validFiles = [];
45
- let binaryFilesDetected = false;
46
- for (const file of files) {
47
- await validateFileExists(file, "merge");
48
- await checkFileSize(file);
49
- await checkPermissions(file, "read");
50
- if (await isBinaryExt(file)) {
51
- binaryFilesDetected = true;
52
- continue;
53
- }
54
- validFiles.push(file);
55
- }
56
- if (binaryFilesDetected) {
57
- relinka("info", "Binary files were detected and skipped");
58
- }
59
- let filtered = [...new Set(validFiles)];
60
- if (depth > 0) {
61
- const fileGroups = /* @__PURE__ */ new Map();
62
- for (const file of filtered) {
63
- const relPath = path.relative(process.cwd(), file);
64
- const parts = relPath.split(path.sep);
65
- const groupKey = parts.slice(0, depth).join(path.sep);
66
- if (!fileGroups.has(groupKey)) {
67
- fileGroups.set(groupKey, []);
68
- }
69
- const group = fileGroups.get(groupKey);
70
- if (group) {
71
- group.push(file);
72
- }
73
- }
74
- filtered = Array.from(fileGroups.values()).flat();
75
- }
76
- if (sortBy === "name") {
77
- filtered.sort((a, b) => path.basename(a).localeCompare(path.basename(b)));
78
- } else if (sortBy === "path") {
79
- filtered.sort();
80
- } else if (sortBy === "mtime") {
81
- filtered = await pMap(filtered, async (f) => ({ f, mtime: (await fs.stat(f)).mtimeMs }), {
82
- concurrency: 8
83
- }).then((arr) => arr.sort((a, b) => a.mtime - b.mtime).map((x) => x.f));
84
- }
85
- return filtered;
86
- } catch (error) {
87
- handleCtxError(error, "collectFiles");
88
- return [];
89
- }
90
- };
91
26
  export const writeResult = async (sections, _separator, toFile, toStdout, dryRun, backup, generateSourceMap = false) => {
92
27
  try {
93
28
  const bundle = new Bundle();
@@ -1,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  export declare const DatabaseSchema: z.ZodEnum<{
3
- sqlite: "sqlite";
4
3
  none: "none";
5
4
  mysql: "mysql";
5
+ sqlite: "sqlite";
6
6
  mongodb: "mongodb";
7
7
  postgres: "postgres";
8
8
  }>;
@@ -10,23 +10,23 @@ 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<{
18
18
  none: "none";
19
19
  hono: "hono";
20
20
  next: "next";
21
+ convex: "convex";
22
+ elysia: "elysia";
21
23
  express: "express";
22
24
  fastify: "fastify";
23
- 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,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";
@@ -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>;
@@ -18,35 +18,11 @@ import type { GlobOptions } from "tinyglobby";
18
18
  import type { Schema } from "untyped";
19
19
  import type { ReliverseMemory } from "../utils/schemaMemory.js";
20
20
  import type { ReliverseConfig } from "../schema/mod";
21
- export type { TemplateUpdateInfo } from "../add/add-local/core/templates.js";
22
- export type { ShowMenuResult } from "../add/add-local/core/types.js";
23
- export type { RuleRepo, UnghRepoResponse, } from "../add/add-rule/add-rule-types.js";
24
- export type { AIAgentOptions, AiSdkAgent, CircularTrigger, } from "../ai/ai-impl/ai-types.js";
25
- export type { LintSuggestion } from "../ai/ai-impl/relinter/relinter.js";
26
- export type { KeyType, KnownService, } from "../init/use-template/cp-modules/compose-env-file/cef-keys.js";
27
- export type { ConfigurationOptions } from "../init/use-template/cp-modules/git-deploy-prompts/vercel/vercel-config.js";
28
- export type { VercelTeam } from "../init/use-template/cp-modules/git-deploy-prompts/vercel/vercel-team.js";
29
- export type { DeploymentLog, DeploymentLogType, DeploymentOptions, EnvVar, VercelDeploymentConfig, VercelFramework, } from "../init/use-template/cp-modules/git-deploy-prompts/vercel/vercel-types.js";
30
- export type { GenCfg, GenCfgJsonc } from "../mrse/mrse-impl.js";
31
- export type { UploadFile } from "../upload/providers/providers-mod.js";
32
- export type { UploadedUCFile } from "../upload/providers/uploadcare.js";
33
- export type { UploadedFile } from "../upload/providers/uploadthing.js";
34
- export type { DetectionSource, DetectOptions, PackageManager, PkgManagerInfo, } from "../utils/dependencies/getUserPkgManager.js";
35
- export type { DownloadResult } from "../utils/downloading/downloadRepo.js";
36
- export type { ScriptStatus } from "../utils/handlers/promptPackageJsonScripts.js";
37
- export type { InstanceGithub } from "../utils/instanceGithub.js";
38
- export type { InstanceVercel } from "../utils/instanceVercel.js";
39
- export type { CategoryFromSchema, CloneOrTemplateRepo, RepoFromSchema, RepoOption, } from "../utils/projectRepository.js";
40
- export type { ReplaceConfig } from "../utils/replacements/reps-impl.js";
41
- export type { Hardcoded, UrlPatterns } from "../utils/replacements/reps-keys.js";
42
- export { handleReplacements } from "../utils/replacements/reps-mod.js";
43
- export type { EncryptedDataMemory, ReliverseMemory, UserDataMemory, } from "../utils/schemaMemory.js";
44
- export type { RepoInfo, ReposConfig } from "../utils/schemaTemplate.js";
45
21
  export type ArgTypeShared = string | number | boolean | string[] | undefined;
46
- export interface CommonArgs {
22
+ export interface CommonCliArgs {
47
23
  isCI: boolean;
48
24
  isDev: boolean;
49
- strCwd: string;
25
+ cwdStr: string;
50
26
  }
51
27
  export type IterableError = Iterable<{
52
28
  schema: unknown;
@@ -655,3 +631,4 @@ export type MkdistOptions = {
655
631
  compilerOptions?: TSConfig["compilerOptions"];
656
632
  };
657
633
  } & LoaderOptions;
634
+ export {};
@@ -1 +0,0 @@
1
- export { handleReplacements } from "../utils/replacements/reps-mod.js";
@@ -1,5 +1,5 @@
1
- import type { CommonArgs } from "../types/mod";
2
- export declare function commonStartActions({ strCwd, isCI, isDev, showRuntimeInfo, clearConsole, withStartPrompt, }: CommonArgs & {
1
+ import type { CommonCliArgs } from "../types/mod";
2
+ export declare function commonStartActions({ cwdStr, isCI, isDev, showRuntimeInfo, clearConsole, withStartPrompt, }: CommonCliArgs & {
3
3
  showRuntimeInfo: boolean;
4
4
  clearConsole: boolean;
5
5
  withStartPrompt: boolean;
@@ -2,7 +2,7 @@ import { relinka } from "@reliverse/relinka";
2
2
  import { prepareReliverseEnvironment } from "../config/prepare.js";
3
3
  import { showEndPrompt, showStartPrompt } from "./startEndPrompts.js";
4
4
  export async function commonStartActions({
5
- strCwd,
5
+ cwdStr,
6
6
  isCI,
7
7
  isDev,
8
8
  showRuntimeInfo,
@@ -27,7 +27,7 @@ export async function commonStartActions({
27
27
  );
28
28
  process.exit(0);
29
29
  }
30
- await prepareReliverseEnvironment(strCwd, isDev, "ts");
30
+ await prepareReliverseEnvironment(cwdStr, isDev, "ts");
31
31
  }
32
32
  export async function commonEndActions({ withEndPrompt }) {
33
33
  if (withEndPrompt) {
package/bin/mod.d.ts CHANGED
@@ -299,15 +299,16 @@ export { ALLOWED_FILE_EXTENSIONS, ALLOWED_IMPORT_EXTENSIONS, STRICT_FILE_EXTENSI
299
299
  export { displayCheckResults } from "./impl/rules/rules-mod";
300
300
  export { getAllFiles, getLineNumber, shouldIgnoreFile } from "./impl/rules/rules-utils";
301
301
  export { generateReltypesContent } from "./impl/schema/gen";
302
- export type { BumpMode, BundlerName, Esbuild, LibConfig, LogLevel, LogLevelConfig, LogLevelsConfig, NpmOutExt, ProjectArchitecture, ProjectCategory, ProjectFramework, ProjectSubcategory, RelinkaDirsConfig, RelinterConfirm, ReliverseConfig, Sourcemap, TranspileFormat, TranspileTarget, } from "./impl/schema/mod";
302
+ export type { BumpMode, BundlerName, Esbuild, LibConfig, LogLevel, LogLevelConfig, LogLevelsConfig, NpmOutExt, PreferredAnalytics, PreferredAPI, PreferredAuth, PreferredCache, PreferredCDN, PreferredCharts, PreferredCMS, PreferredDates, PreferredDBLib, PreferredDBProvider, PreferredDocs, PreferredForm, PreferredFormat, PreferredForms, PreferredI18n, PreferredIcons, PreferredLint, PreferredLogging, PreferredMail, PreferredMarkdown, PreferredMonitoring, PreferredMotion, PreferredNotifications, PreferredPayment, PreferredRouting, PreferredSEO, PreferredSearch, PreferredSecurity, PreferredStateManagement, PreferredStorage, PreferredStyling, PreferredTesting, PreferredUI, PreferredUploads, PreferredValidation, ProjectArchitecture, ProjectCategory, ProjectDeployService, ProjectFramework, ProjectGitService, ProjectPackageManager, ProjectRuntime, ProjectState, ProjectSubcategory, ProjectTemplate, RelinkaDirsConfig, RelinterConfirm, ReliverseConfig, RepoPrivacy, Sourcemap, ThemeMode, TranspileFormat, TranspileTarget, UnknownLiteral, } from "./impl/schema/mod";
303
303
  export { DEFAULT_CONFIG_RELIVERSE, defineConfig } from "./impl/schema/mod";
304
- export { checkIfRegenerationNeeded, ensureReltypesFile } from "./impl/schema/utils";
304
+ export type { JsonSchemaDocument, SchemaFactory } from "./impl/schema/utils";
305
+ export { checkIfRegenerationNeeded, ensureReltypesFile, generateSchemaFile, } from "./impl/schema/utils";
305
306
  export { getAllSourceFiles, splitLargeFileByLines, splitLargeFunctions } from "./impl/split/impl";
306
307
  export { downloadRepoOption, rmTestsRuntime, } from "./impl/toolbox/toolbox-impl";
307
308
  export { openVercelTools } from "./impl/toolbox/toolbox-vercel";
308
309
  export type { BundleSource, IndentOptions, MagicStringOptions, OverwriteOptions, StringTransformer, TransformResult, UpdateOptions, } from "./impl/transform/transform-impl-mod";
309
310
  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
- export type { AppParams, BaseBuildEntry, BaseConfig, Behavior, BiomeConfig, BiomeConfigResult, BuildContext, BuildEntry, BuildHooks, BuildOptions, BuildPreset, CamelCase, CheckIssue, CheckResult, ColumnType, 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 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
312
  export { checkPackageUpdates, displayUpdateSummary, getEffectiveLinker, handleCatalogOnlyUpdate, handleInstallation, handleInteractiveSelection, handleRecursiveUpdates, handleToolUpgrades, handleWorkspaceUpdates, prepareUpdateCandidates, updateRootPackageJson, validatePackageJson, validateUpdateArgs, } from "./impl/update/impl";
312
313
  export type { DependencyInfo, PackageCheckOptions, UpdateResult, UpgradeResult, } from "./impl/update/utils";
313
314
  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";
package/bin/mod.js CHANGED
@@ -712,7 +712,11 @@ export { displayCheckResults } from "./impl/rules/rules-mod.js";
712
712
  export { getAllFiles, getLineNumber, shouldIgnoreFile } from "./impl/rules/rules-utils.js";
713
713
  export { generateReltypesContent } from "./impl/schema/gen.js";
714
714
  export { DEFAULT_CONFIG_RELIVERSE, defineConfig } from "./impl/schema/mod.js";
715
- export { checkIfRegenerationNeeded, ensureReltypesFile } from "./impl/schema/utils.js";
715
+ export {
716
+ checkIfRegenerationNeeded,
717
+ ensureReltypesFile,
718
+ generateSchemaFile
719
+ } from "./impl/schema/utils.js";
716
720
  export { getAllSourceFiles, splitLargeFileByLines, splitLargeFunctions } from "./impl/split/impl.js";
717
721
  export {
718
722
  downloadRepoOption,
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.131",
126
+ "version": "1.7.132",
127
127
  "author": "reliverse",
128
128
  "bugs": {
129
129
  "email": "blefnk@gmail.com",