@reliverse/dler 1.7.93 → 1.7.95

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.
Files changed (41) hide show
  1. package/bin/app/build/build-library.js +0 -1
  2. package/bin/app/build/impl.d.ts +1 -1
  3. package/bin/app/cmds.d.ts +71 -4
  4. package/bin/app/cmds.js +25 -3
  5. package/bin/app/config/cfg-core.js +1 -1
  6. package/bin/app/config/cfg-create.js +1 -3
  7. package/bin/app/config/cfg-def-utils.js +3 -3
  8. package/bin/app/config/cfg-detect.js +1 -1
  9. package/bin/app/config/cfg-gen-cfg.js +1 -1
  10. package/bin/app/config/cfg-prepare.js +1 -1
  11. package/bin/app/config/cfg-reltypes-content.d.ts +3 -0
  12. package/bin/app/config/cfg-reltypes-content.js +1139 -0
  13. package/bin/app/config/cfg-reltypes-utils.d.ts +2 -0
  14. package/bin/app/config/cfg-reltypes-utils.js +50 -0
  15. package/bin/app/config/constants.d.ts +1 -1
  16. package/bin/app/config/constants.js +1 -1
  17. package/bin/app/config/prepare.js +2 -0
  18. package/bin/app/init/mm-deprecated/drizzle/manageDrizzleSchema.js +1 -1
  19. package/bin/app/init/mm-deprecated/feature-add.js +2 -2
  20. package/bin/app/init/mm-deprecated/feature-rm.js +5 -5
  21. package/bin/app/init/use-template/cp-impl.js +1 -1
  22. package/bin/app/init/use-template/cp-modules/compose-env-file/cef-impl.js +1 -1
  23. package/bin/app/migrate/codemods/anything-bun.js +1 -1
  24. package/bin/app/mrse/cmd.js +4 -4
  25. package/bin/app/providers/better-t-stack/packed/addons.js +1 -1
  26. package/bin/app/providers/better-t-stack/packed/api.js +2 -2
  27. package/bin/app/providers/better-t-stack/packed/auth.js +3 -3
  28. package/bin/app/providers/better-t-stack/packed/backend.js +1 -1
  29. package/bin/app/providers/better-t-stack/packed/examples.js +3 -3
  30. package/bin/app/providers/better-t-stack/packed/frontend.js +6 -6
  31. package/bin/app/providers/better-t-stack/types.d.ts +10 -10
  32. package/bin/app/providers/reliverse-stack/rs-impl.d.ts +2 -2
  33. package/bin/app/pub/impl.d.ts +1 -1
  34. package/bin/app/rempts/cmd.js +15 -15
  35. package/bin/app/utils/agg/agg-3.js +2 -2
  36. package/bin/app/utils/downloading/downloadI18nFiles.js +4 -4
  37. package/bin/app/utils/mrseHelpers.js +1 -1
  38. package/bin/app/utils/schemaMemory.d.ts +1 -1
  39. package/bin/app/web/README.md +1 -1
  40. package/bin/dler.js +2 -10
  41. package/package.json +27 -27
@@ -93,7 +93,6 @@ async function library_buildJsrDist(options) {
93
93
  targetType,
94
94
  builder: distJsrBuilder,
95
95
  libSourceDir: libSourceDirResolved,
96
- // e.g., /abs/path/to/project/src/libs/sdk
97
96
  entryFilePath: bundlerEntryPoint,
98
97
  outputDirRoot: outputDirRootResolved,
99
98
  outputDirBin: outputDirBinResolved,
@@ -2,7 +2,7 @@ import type { DlerConfig } from "../types/mod.js";
2
2
  /**
3
3
  * Main entry point for the dler build process.
4
4
  * Handles building for both main project and libraries.
5
- * @see `src/app/pub/impl.ts` for pub main function implementation.
5
+ * @see `src-ts/app/pub/impl.ts` for pub main function implementation.
6
6
  */
7
7
  export declare function dlerBuild(isDev: boolean, config?: DlerConfig, debugOnlyCopyNonBuildFiles?: boolean, debugDontCopyNonBuildFiles?: boolean, disableOwnSpinner?: boolean): Promise<{
8
8
  timer: any;
package/bin/app/cmds.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import type { Command } from "@reliverse/rempts";
2
- export declare const getWebCmd: () => Promise<Command<import("@reliverse/rempts").EmptyArgs>>;
3
- export declare const getAuthCmd: () => Promise<Command<import("@reliverse/rempts").EmptyArgs>>;
4
- export declare const getAuthGenerateCmd: () => Promise<Command<import("@reliverse/rempts").EmptyArgs>>;
5
2
  interface CommandArgsMap {
3
+ add: {};
6
4
  agg: {
7
5
  imports?: boolean;
8
6
  input?: string;
@@ -21,13 +19,26 @@ interface CommandArgsMap {
21
19
  typesOut?: string;
22
20
  nonInteractive?: boolean;
23
21
  };
22
+ ai: {};
23
+ better_auth: {
24
+ config: string;
25
+ schema: string;
26
+ };
27
+ better_auth_generate: {};
28
+ better_auth_generateSecret: {};
29
+ better_auth_init: {};
30
+ better_auth_migrate: {
31
+ cwd?: string;
32
+ config?: string;
33
+ y?: boolean;
34
+ };
24
35
  build: {
25
36
  dev?: boolean;
26
37
  debugOnlyCopyNonBuildFiles?: boolean;
27
38
  debugDontCopyNonBuildFiles?: boolean;
28
39
  };
29
40
  build_binary: {
30
- input?: string;
41
+ input: string;
31
42
  targets?: string;
32
43
  outdir?: string;
33
44
  minify?: boolean;
@@ -37,6 +48,10 @@ interface CommandArgsMap {
37
48
  parallel?: boolean;
38
49
  external?: string[];
39
50
  };
51
+ catalog: {
52
+ action?: string;
53
+ cwd?: string;
54
+ };
40
55
  check: {
41
56
  dev?: boolean;
42
57
  directory?: string;
@@ -52,6 +67,14 @@ interface CommandArgsMap {
52
67
  fix?: boolean;
53
68
  depth?: number;
54
69
  };
70
+ cli: {};
71
+ clone: {};
72
+ cmod: {};
73
+ config: {
74
+ mode?: string;
75
+ tool?: string;
76
+ update?: boolean;
77
+ };
55
78
  conv: {};
56
79
  create: {
57
80
  template?: string;
@@ -63,6 +86,7 @@ interface CommandArgsMap {
63
86
  concurrency?: string;
64
87
  cwd?: string;
65
88
  };
89
+ env: {};
66
90
  fs: {
67
91
  mode: "copy" | "rm" | "rename";
68
92
  target: string;
@@ -79,6 +103,7 @@ interface CommandArgsMap {
79
103
  useDtsTxtForPrepareMyCLI?: boolean;
80
104
  };
81
105
  get: {};
106
+ help: {};
82
107
  init: {};
83
108
  inject: {};
84
109
  install: {
@@ -90,11 +115,15 @@ interface CommandArgsMap {
90
115
  silent?: boolean;
91
116
  recreateLockFile?: boolean;
92
117
  linter?: boolean;
118
+ filter?: string[];
93
119
  };
120
+ invoke: {};
94
121
  libs: {
95
122
  init: string;
96
123
  overwrite?: boolean;
97
124
  };
125
+ login: {};
126
+ logout: {};
98
127
  magic: {
99
128
  targets: string[];
100
129
  lib?: string;
@@ -103,6 +132,7 @@ interface CommandArgsMap {
103
132
  stopOnError?: boolean;
104
133
  about?: boolean;
105
134
  };
135
+ memory: {};
106
136
  merge: {
107
137
  s?: string[];
108
138
  d?: string;
@@ -142,6 +172,7 @@ interface CommandArgsMap {
142
172
  minify?: boolean;
143
173
  target?: string;
144
174
  };
175
+ mrse: {};
145
176
  pack: {
146
177
  input: string;
147
178
  output?: string;
@@ -170,6 +201,7 @@ interface CommandArgsMap {
170
201
  workspace?: boolean;
171
202
  silent?: boolean;
172
203
  linter?: boolean;
204
+ filter?: string[];
173
205
  standalone?: boolean;
174
206
  };
175
207
  rempts: {
@@ -179,11 +211,14 @@ interface CommandArgsMap {
179
211
  outFile?: string;
180
212
  cmdDirs?: string[];
181
213
  };
214
+ schema: {};
182
215
  split: {
183
216
  directory: string;
184
217
  fileLineThreshold: number;
185
218
  funcLineThreshold: number;
186
219
  };
220
+ studio: {};
221
+ toolbox: {};
187
222
  transform: {};
188
223
  update: {
189
224
  name?: string[];
@@ -192,10 +227,17 @@ interface CommandArgsMap {
192
227
  linker?: "isolated" | "hoisted";
193
228
  global?: boolean;
194
229
  interactive?: boolean;
230
+ filter?: string[];
231
+ recursive?: boolean;
232
+ };
233
+ update_migrate: {
234
+ interactive?: boolean;
195
235
  };
196
236
  upgrade: {
197
237
  interactive?: boolean;
198
238
  };
239
+ upload: {};
240
+ web: {};
199
241
  x: {
200
242
  action: string;
201
243
  name?: string;
@@ -214,31 +256,56 @@ interface CommandArgsMap {
214
256
  };
215
257
  }
216
258
  export declare function loadTypedCommand<T extends keyof CommandArgsMap>(cmdName: T): Promise<Command>;
259
+ export declare const getAddCmd: () => Promise<Command>;
217
260
  export declare const getAggCmd: () => Promise<Command>;
261
+ export declare const getAiCmd: () => Promise<Command>;
262
+ export declare const getBetterAuthCmd: () => Promise<Command>;
263
+ export declare const getBetterAuthGenerateCmd: () => Promise<Command>;
264
+ export declare const getBetterAuthGenerateSecretCmd: () => Promise<Command>;
265
+ export declare const getBetterAuthInitCmd: () => Promise<Command>;
266
+ export declare const getBetterAuthMigrateCmd: () => Promise<Command>;
218
267
  export declare const getBuildCmd: () => Promise<Command>;
219
268
  export declare const getBuildBinaryCmd: () => Promise<Command>;
269
+ export declare const getCatalogCmd: () => Promise<Command>;
220
270
  export declare const getCheckCmd: () => Promise<Command>;
271
+ export declare const getCliCmd: () => Promise<Command>;
272
+ export declare const getCloneCmd: () => Promise<Command>;
273
+ export declare const getCmodCmd: () => Promise<Command>;
274
+ export declare const getConfigCmd: () => Promise<Command>;
221
275
  export declare const getConvCmd: () => Promise<Command>;
222
276
  export declare const getCreateCmd: () => Promise<Command>;
277
+ export declare const getEnvCmd: () => Promise<Command>;
223
278
  export declare const getFsCmd: () => Promise<Command>;
224
279
  export declare const getGetCmd: () => Promise<Command>;
280
+ export declare const getHelpCmd: () => Promise<Command>;
225
281
  export declare const getInitCmd: () => Promise<Command>;
226
282
  export declare const getInjectCmd: () => Promise<Command>;
227
283
  export declare const getInstallCmd: () => Promise<Command>;
284
+ export declare const getInvokeCmd: () => Promise<Command>;
228
285
  export declare const getLibsCmd: () => Promise<Command>;
286
+ export declare const getLoginCmd: () => Promise<Command>;
287
+ export declare const getLogoutCmd: () => Promise<Command>;
229
288
  export declare const getMagicCmd: () => Promise<Command>;
289
+ export declare const getMemoryCmd: () => Promise<Command>;
230
290
  export declare const getMergeCmd: () => Promise<Command>;
231
291
  export declare const getMigrateCmd: () => Promise<Command>;
232
292
  export declare const getMkdistCmd: () => Promise<Command>;
293
+ export declare const getMrseCmd: () => Promise<Command>;
233
294
  export declare const getPackCmd: () => Promise<Command>;
234
295
  export declare const getPubCmd: () => Promise<Command>;
235
296
  export declare const getRemdnCmd: () => Promise<Command>;
236
297
  export declare const getRemoveCmd: () => Promise<Command>;
237
298
  export declare const getRemptsCmd: () => Promise<Command>;
299
+ export declare const getSchemaCmd: () => Promise<Command>;
238
300
  export declare const getSplitCmd: () => Promise<Command>;
301
+ export declare const getStudioCmd: () => Promise<Command>;
302
+ export declare const getToolboxCmd: () => Promise<Command>;
239
303
  export declare const getTransformCmd: () => Promise<Command>;
240
304
  export declare const getUpdateCmd: () => Promise<Command>;
305
+ export declare const getUpdateMigrateCmd: () => Promise<Command>;
241
306
  export declare const getUpgradeCmd: () => Promise<Command>;
307
+ export declare const getUploadCmd: () => Promise<Command>;
308
+ export declare const getWebCmd: () => Promise<Command>;
242
309
  export declare const getXCmd: () => Promise<Command>;
243
310
  export declare function callCmd<T extends keyof CommandArgsMap>(cmdName: T, args?: CommandArgsMap[T]): Promise<void>;
244
311
  export declare function getTypedCmd<T extends keyof CommandArgsMap>(cmdName: T): Promise<{
package/bin/app/cmds.js CHANGED
@@ -1,35 +1,57 @@
1
1
  import { callCmdImpl, getTypedCmdImpl, loadCommand } from "@reliverse/rempts";
2
- export const getWebCmd = async () => await loadCommand("./web/cmd");
3
- export const getAuthCmd = async () => await loadCommand("./auth/cmd");
4
- export const getAuthGenerateCmd = async () => await loadCommand("./auth/generate/cmd");
5
2
  export async function loadTypedCommand(cmdName) {
6
3
  return await loadCommand(cmdName);
7
4
  }
5
+ export const getAddCmd = async () => loadTypedCommand("add");
8
6
  export const getAggCmd = async () => loadTypedCommand("agg");
7
+ export const getAiCmd = async () => loadTypedCommand("ai");
8
+ export const getBetterAuthCmd = async () => loadTypedCommand("better_auth");
9
+ export const getBetterAuthGenerateCmd = async () => loadTypedCommand("better_auth_generate");
10
+ export const getBetterAuthGenerateSecretCmd = async () => loadTypedCommand("better_auth_generateSecret");
11
+ export const getBetterAuthInitCmd = async () => loadTypedCommand("better_auth_init");
12
+ export const getBetterAuthMigrateCmd = async () => loadTypedCommand("better_auth_migrate");
9
13
  export const getBuildCmd = async () => loadTypedCommand("build");
10
14
  export const getBuildBinaryCmd = async () => loadTypedCommand("build_binary");
15
+ export const getCatalogCmd = async () => loadTypedCommand("catalog");
11
16
  export const getCheckCmd = async () => loadTypedCommand("check");
17
+ export const getCliCmd = async () => loadTypedCommand("cli");
18
+ export const getCloneCmd = async () => loadTypedCommand("clone");
19
+ export const getCmodCmd = async () => loadTypedCommand("cmod");
20
+ export const getConfigCmd = async () => loadTypedCommand("config");
12
21
  export const getConvCmd = async () => loadTypedCommand("conv");
13
22
  export const getCreateCmd = async () => loadTypedCommand("create");
23
+ export const getEnvCmd = async () => loadTypedCommand("env");
14
24
  export const getFsCmd = async () => loadTypedCommand("fs");
15
25
  export const getGetCmd = async () => loadTypedCommand("get");
26
+ export const getHelpCmd = async () => loadTypedCommand("help");
16
27
  export const getInitCmd = async () => loadTypedCommand("init");
17
28
  export const getInjectCmd = async () => loadTypedCommand("inject");
18
29
  export const getInstallCmd = async () => loadTypedCommand("install");
30
+ export const getInvokeCmd = async () => loadTypedCommand("invoke");
19
31
  export const getLibsCmd = async () => loadTypedCommand("libs");
32
+ export const getLoginCmd = async () => loadTypedCommand("login");
33
+ export const getLogoutCmd = async () => loadTypedCommand("logout");
20
34
  export const getMagicCmd = async () => loadTypedCommand("magic");
35
+ export const getMemoryCmd = async () => loadTypedCommand("memory");
21
36
  export const getMergeCmd = async () => loadTypedCommand("merge");
22
37
  export const getMigrateCmd = async () => loadTypedCommand("migrate");
23
38
  export const getMkdistCmd = async () => loadTypedCommand("mkdist");
39
+ export const getMrseCmd = async () => loadTypedCommand("mrse");
24
40
  export const getPackCmd = async () => loadTypedCommand("pack");
25
41
  export const getPubCmd = async () => loadTypedCommand("pub");
26
42
  export const getRemdnCmd = async () => loadTypedCommand("remdn");
27
43
  export const getRemoveCmd = async () => loadTypedCommand("remove");
28
44
  export const getRemptsCmd = async () => loadTypedCommand("rempts");
45
+ export const getSchemaCmd = async () => loadTypedCommand("schema");
29
46
  export const getSplitCmd = async () => loadTypedCommand("split");
47
+ export const getStudioCmd = async () => loadTypedCommand("studio");
48
+ export const getToolboxCmd = async () => loadTypedCommand("toolbox");
30
49
  export const getTransformCmd = async () => loadTypedCommand("transform");
31
50
  export const getUpdateCmd = async () => loadTypedCommand("update");
51
+ export const getUpdateMigrateCmd = async () => loadTypedCommand("update_migrate");
32
52
  export const getUpgradeCmd = async () => loadTypedCommand("upgrade");
53
+ export const getUploadCmd = async () => loadTypedCommand("upload");
54
+ export const getWebCmd = async () => loadTypedCommand("web");
33
55
  export const getXCmd = async () => loadTypedCommand("x");
34
56
  export async function callCmd(cmdName, args) {
35
57
  await callCmdImpl(cmdName, args);
@@ -14,7 +14,7 @@ export async function getOrCreateRseConfig({
14
14
  customTsconfigPath
15
15
  }) {
16
16
  const githubUsername = UNKNOWN_VALUE;
17
- const mrseFolderPath = path.join(projectPath, ".config", "mrse");
17
+ const mrseFolderPath = path.join(projectPath, "mrse");
18
18
  const results = [];
19
19
  if (await fs.pathExists(mrseFolderPath)) {
20
20
  const dirItems = await fs.readdir(mrseFolderPath);
@@ -80,10 +80,8 @@ export async function writeRseConfig(configPath, config, isDev, skipInstallPromp
80
80
  let importPath;
81
81
  if (customPathToTypes) {
82
82
  importPath = customPathToTypes;
83
- } else if (isDev) {
84
- importPath = "~/libs/cfg/cfg-impl/cfg-define";
85
83
  } else {
86
- importPath = "@reliverse/rse-cfg";
84
+ importPath = "./reltypes";
87
85
  }
88
86
  const fileContent2 = `import { defineConfig } from "${importPath}";
89
87
  export default defineConfig(${objectLiteralWithComments});
@@ -87,10 +87,10 @@ export async function generateDefaultRulesForProject(projectPath, isDev) {
87
87
  const hasPrismaFile = await fs.pathExists(path.join(projectPath, "prisma/schema.prisma"));
88
88
  const hasDrizzleFile = await fs.pathExists(path.join(projectPath, "drizzle.config.ts"));
89
89
  const hasNextAuthDir = await fs.pathExists(
90
- path.join(projectPath, "src/app/api/auth/[...nextauth]")
90
+ path.join(projectPath, "src-ts/app/api/auth/[...nextauth]")
91
91
  );
92
92
  const hasBetterAuthFile = await fs.pathExists(
93
- path.join(projectPath, "src/app/api/auth/[...all]/route.ts")
93
+ path.join(projectPath, "src-ts/app/api/auth/[...all]/route.ts")
94
94
  );
95
95
  const hasShadcnUi = await fs.pathExists(path.join(projectPath, "components/ui"));
96
96
  const hasClerk = "@clerk/nextjs" in deps;
@@ -120,7 +120,7 @@ export async function generateDefaultRulesForProject(projectPath, isDev) {
120
120
  const hasHono = "hono" in deps;
121
121
  const hasTrpc = "@trpc/server" in deps;
122
122
  const hasGraphql = "graphql" in deps || "apollo-server" in deps;
123
- const hasRest = await fs.pathExists(path.join(projectPath, "src/api")) || await fs.pathExists(path.join(projectPath, "src/app/api"));
123
+ const hasRest = await fs.pathExists(path.join(projectPath, "src/api")) || await fs.pathExists(path.join(projectPath, "src-ts/app/api"));
124
124
  const hasPg = "pg" in deps || "@neondatabase/serverless" in deps;
125
125
  const hasMysql = "mysql" in deps || "mysql2" in deps;
126
126
  const hasSqlite = "sqlite" in deps || "sqlite3" in deps || "better-sqlite3" in deps;
@@ -160,7 +160,7 @@ export async function detectFeatures(projectPath, packageJson) {
160
160
  const hasHono = "hono" in deps;
161
161
  const hasTrpc = "@trpc/server" in deps;
162
162
  const hasGraphql = "graphql" in deps || "apollo-server" in deps;
163
- const hasRest = await fs.pathExists(path.join(projectPath, "src/api")) || await fs.pathExists(path.join(projectPath, "src/app/api"));
163
+ const hasRest = await fs.pathExists(path.join(projectPath, "src/api")) || await fs.pathExists(path.join(projectPath, "src-ts/app/api"));
164
164
  const hasEslint = "eslint" in deps;
165
165
  const hasBiome = "@biomejs/biome" in deps;
166
166
  const hasStripe = "stripe" in deps || "@stripe/stripe-js" in deps;
@@ -103,7 +103,7 @@ export async function generateConfigFiles(projectPath, overwrite, projectName, d
103
103
  isDev,
104
104
  configInfo,
105
105
  ...isDev && configInfo?.isTS ? {
106
- customPathToTypes: "./src/libs/sdk/sdk-mod"
106
+ customPathToTypes: "./src-ts/app/types/mod"
107
107
  } : {},
108
108
  overrides: {}
109
109
  });
@@ -242,7 +242,7 @@ export default defineConfig({
242
242
  enabled: false,
243
243
  format: "HH:mm:ss",
244
244
  },
245
- cleanupInterval: 10000,
245
+ cleanupInterval: 10_000,
246
246
  bufferSize: 4096,
247
247
  maxBufferAge: 5000,
248
248
  levels: {
@@ -0,0 +1,3 @@
1
+ export declare function generateReltypesContent({ lastUpdated }: {
2
+ lastUpdated: string;
3
+ }): string;