@reliverse/dler 1.7.105 → 1.7.107

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.
@@ -1,7 +1,9 @@
1
+ import { relinka } from "@reliverse/relinka";
1
2
  import { defineArgs, defineCommand } from "@reliverse/rempts";
2
3
  import { dlerBuild } from "./impl.js";
3
4
  import { getConfigDler } from "../config/load.js";
4
5
  import { finalizeBuild } from "../utils/finalize.js";
6
+ import { prepareReliverseEnvironment } from "../config/prepare.js";
5
7
  export default defineCommand({
6
8
  meta: {
7
9
  name: "build",
@@ -22,7 +24,9 @@ export default defineCommand({
22
24
  }
23
25
  }),
24
26
  async run({ args }) {
25
- const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
27
+ const isDev = args.dev;
28
+ await prepareReliverseEnvironment(isDev, "ts");
29
+ relinka("verbose", `Running in ${isDev ? "dev" : "prod"} mode`);
26
30
  const config = await getConfigDler();
27
31
  const { timer } = await dlerBuild(
28
32
  isDev,
@@ -87,7 +87,7 @@ export default defineCommand({
87
87
  }
88
88
  }),
89
89
  async run({ args }) {
90
- const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
90
+ const isDev = args.dev;
91
91
  await ensureReliverseConfig(isDev, "ts");
92
92
  if (args.deps) {
93
93
  try {
@@ -1,4 +1,8 @@
1
1
  declare const _default: import("@reliverse/rempts").Command<{
2
+ dev: {
3
+ type: "boolean";
4
+ description: string;
5
+ };
2
6
  mode: {
3
7
  type: "string";
4
8
  description: string;
@@ -8,6 +8,10 @@ export default defineCommand({
8
8
  description: "Manage project-level and device-global configurations"
9
9
  },
10
10
  args: defineArgs({
11
+ dev: {
12
+ type: "boolean",
13
+ description: "Runs the CLI in dev mode"
14
+ },
11
15
  mode: {
12
16
  type: "string",
13
17
  description: "Config mode: copy-remote, copy-internal, create",
@@ -31,11 +35,11 @@ export default defineCommand({
31
35
  }
32
36
  }),
33
37
  run: async ({ args }) => {
34
- const { mode, tool, update, type } = args;
38
+ const { dev, mode, tool, update, type } = args;
35
39
  try {
36
40
  if (mode === "create") {
37
41
  const configKind = type === "jsonc" ? "jsonc" : "ts";
38
- const isDev = process.env.DLER_DEV_MODE === "true";
42
+ const isDev = dev;
39
43
  await ensureReliverseConfig(isDev, configKind);
40
44
  relinka("success", `New ${configKind.toUpperCase()} configuration file has been created`);
41
45
  } else {
@@ -1,5 +1,5 @@
1
1
  export declare const PROJECT_ROOT: string;
2
- export declare const cliVersion = "1.7.105";
2
+ export declare const cliVersion = "1.7.107";
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.105";
4
+ const version = "1.7.107";
5
5
  export const cliVersion = version;
6
6
  export const cliName = "@reliverse/rse";
7
7
  export const rseName = "@reliverse/rse";
@@ -4,7 +4,7 @@ import type { DeploymentService, RseConfig } from "../types/mod.js";
4
4
  * Performs an atomic write (using a temp file) and creates a backup of any existing config.
5
5
  * In dev mode, automatically builds a relative path to `sdk-mod.ts`.
6
6
  */
7
- export declare function writeRseConfig(configPath: string, config: RseConfig, isDev: boolean, skipInstallPrompt?: boolean, customPathToTypes?: string): Promise<void>;
7
+ export declare function writeRseConfig(configPath: string, config: RseConfig, isDev: boolean, skipInstallPrompt?: boolean): Promise<void>;
8
8
  /**
9
9
  * rse Config Creation (wrapper around config generator and fixer)
10
10
  */
@@ -13,7 +13,7 @@ export declare function createRseConfig(projectPath: string, githubUsername: str
13
13
  * Generates a rse config (rseConfig) by merging defaults, existing config, and overrides.
14
14
  * Writes the resulting config to disk (TypeScript or JSONC), optionally skipping install prompts in non-dev mode.
15
15
  */
16
- export declare function generateRseConfig({ projectName, frontendUsername, deployService, primaryDomain, projectPath, githubUsername, enableI18n, overwrite, isDev, configInfo, customOutputPath, customFilename, skipInstallPrompt, customPathToTypes, overrides, }: {
16
+ export declare function generateRseConfig({ projectName, frontendUsername, deployService, primaryDomain, projectPath, githubUsername, enableI18n, overwrite, isDev, configInfo, customOutputPath, customFilename, skipInstallPrompt, overrides, }: {
17
17
  projectName: string;
18
18
  frontendUsername: string;
19
19
  deployService: DeploymentService;
@@ -30,6 +30,5 @@ export declare function generateRseConfig({ projectName, frontendUsername, deplo
30
30
  customOutputPath?: string;
31
31
  customFilename?: string;
32
32
  skipInstallPrompt?: boolean;
33
- customPathToTypes?: string;
34
33
  overrides: Partial<RseConfig>;
35
34
  }): Promise<void>;
@@ -48,7 +48,7 @@ import {
48
48
  objectToCodeString,
49
49
  updateTsConfigInclude
50
50
  } from "./utils.js";
51
- export async function writeRseConfig(configPath, config, isDev, skipInstallPrompt = false, customPathToTypes) {
51
+ export async function writeRseConfig(configPath, config, isDev, skipInstallPrompt = false) {
52
52
  if (await fs.pathExists(configPath)) {
53
53
  relinka("verbose", `Config file already exists at ${configPath}, skipping creation`);
54
54
  return;
@@ -77,11 +77,7 @@ export async function writeRseConfig(configPath, config, isDev, skipInstallPromp
77
77
  }
78
78
  const objectLiteral = objectToCodeString(config, 0);
79
79
  const objectLiteralWithComments = injectSectionComments(objectLiteral);
80
- let importPath = "./reltypes";
81
- if (customPathToTypes) {
82
- importPath = customPathToTypes;
83
- }
84
- const fileContent2 = `import { defineConfig } from "${importPath}";
80
+ const fileContent2 = `import { defineConfig } from "./reltypes";
85
81
  export default defineConfig(${objectLiteralWithComments});
86
82
  `;
87
83
  await atomicWriteFile(configPath, fileContent2, backupPath2, tempPath2);
@@ -149,7 +145,7 @@ export async function createRseConfig(projectPath, githubUsername, isDev, overri
149
145
  let effectiveAuthorName = defaultRules?.projectAuthor ?? UNKNOWN_VALUE;
150
146
  const effectiveDomain = defaultRules?.projectDomain ?? (effectiveProjectName === rseName ? cliDomainDocs : DEFAULT_DOMAIN);
151
147
  if (effectiveAuthorName === "blefnk" && isDev) {
152
- effectiveAuthorName = "rse";
148
+ effectiveAuthorName = "reliverse";
153
149
  }
154
150
  await generateRseConfig({
155
151
  projectName: effectiveProjectName,
@@ -180,12 +176,11 @@ export async function generateRseConfig({
180
176
  customOutputPath,
181
177
  customFilename,
182
178
  skipInstallPrompt = false,
183
- customPathToTypes,
184
179
  overrides
185
180
  }) {
186
181
  const packageJson = await getPackageJson(projectPath);
187
182
  if (frontendUsername === "blefnk" && isDev) {
188
- frontendUsername = "rse";
183
+ frontendUsername = "reliverse";
189
184
  }
190
185
  const defaultConfig = await getDefaultRseConfig(
191
186
  projectPath,
@@ -267,11 +262,5 @@ export async function generateRseConfig({
267
262
  if (isDev) {
268
263
  effectiveConfig.$schema = RSE_SCHEMA_DEV;
269
264
  }
270
- await writeRseConfig(
271
- effectiveConfigPath,
272
- effectiveConfig,
273
- isDev,
274
- skipInstallPrompt,
275
- customPathToTypes
276
- );
265
+ await writeRseConfig(effectiveConfigPath, effectiveConfig, isDev, skipInstallPrompt);
277
266
  }
@@ -29,7 +29,7 @@ export async function ensureReliverseConfig(isDev, configKind = DEFAULT_CONFIG_K
29
29
  relinka("verbose", "Edit this file to customize build and publish settings");
30
30
  if (!isDev) {
31
31
  relinka("verbose", "Please note: commonPubPause is set to true by default");
32
- relinka("verbose", "When you're ready, run `reliverse pub` to build and publish");
32
+ relinka("verbose", "When you're ready, run `rse pub` to build and publish");
33
33
  } else {
34
34
  relinka("verbose", "When you're ready, run `bun pub` to build and publish");
35
35
  }
@@ -91,7 +91,7 @@ function getLibsObject(isDev) {
91
91
  libPubPause: false,
92
92
  libPubRegistry: "npm-jsr"
93
93
  },
94
- "../types/mod.js": {
94
+ "~/app/types/mod": {
95
95
  libDeclarations: true,
96
96
  libDescription: "config for @reliverse/reliverse",
97
97
  libDirName: "cfg",
@@ -403,7 +403,7 @@ function generateJsoncConfig(isDev, pkgDescription) {
403
403
  }`;
404
404
  }
405
405
  function generateConfig(isDev, pkgDescription, configKind = "ts") {
406
- const importdefineConfigStatement = isDev ? `import { defineConfig } from "../../libs/cfg/cfg-impl/cfg-consts";` : `import { defineConfig } from "../types/mod.js";`;
406
+ const importdefineConfigStatement = `import { defineConfig } from "./reltypes";`;
407
407
  const verboseValue = getValue(isDev, true, DEFAULT_CONFIG_DLER.commonVerbose);
408
408
  const coreIsCLI = getCoreIsCLI(isDev);
409
409
  const registryValue = getValue(isDev, "npm-jsr", DEFAULT_CONFIG_DLER.commonPubRegistry);
@@ -5,9 +5,9 @@ import { rseSchema } from "./schema.js";
5
5
  export async function loadrse(projectPath) {
6
6
  const { config } = await loadConfig({
7
7
  cwd: projectPath,
8
- name: "rse",
9
- configFile: "rse",
10
- // will look for files like `rse.{ts,jsonc}`
8
+ name: "reliverse",
9
+ configFile: "reliverse",
10
+ // will look for files like `reliverse.{ts,jsonc}`
11
11
  rcFile: false,
12
12
  packageJson: false,
13
13
  dotenv: false,
@@ -28,7 +28,7 @@ ${errors.join("\n")}`);
28
28
  export async function watchrse(projectPath, onUpdate) {
29
29
  const watcher = await watchConfig({
30
30
  cwd: projectPath,
31
- name: "rse",
31
+ name: "reliverse",
32
32
  onUpdate({ newConfig, getDiff }) {
33
33
  if (!Value.Check(rseSchema, newConfig)) {
34
34
  return;
@@ -89,7 +89,7 @@ export default defineCommand({
89
89
  }
90
90
  }),
91
91
  async run({ args }) {
92
- const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
92
+ const isDev = args.dev;
93
93
  if (args.mkdistOnly) {
94
94
  const {
95
95
  result: { writtenFiles }
@@ -1,10 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export declare const DatabaseSchema: z.ZodEnum<{
3
3
  none: "none";
4
- sqlite: "sqlite";
5
- postgres: "postgres";
6
4
  mysql: "mysql";
5
+ sqlite: "sqlite";
7
6
  mongodb: "mongodb";
7
+ postgres: "postgres";
8
8
  }>;
9
9
  export type Database = z.infer<typeof DatabaseSchema>;
10
10
  export declare const ORMSchema: z.ZodEnum<{
@@ -25,20 +25,20 @@ 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
- node: "node";
30
28
  bun: "bun";
29
+ node: "node";
30
+ none: "none";
31
31
  workers: "workers";
32
32
  }>;
33
33
  export type Runtime = z.infer<typeof RuntimeSchema>;
34
34
  export declare const FrontendSchema: z.ZodEnum<{
35
35
  none: "none";
36
36
  svelte: "svelte";
37
+ nuxt: "nuxt";
38
+ solid: "solid";
37
39
  next: "next";
38
40
  "react-router": "react-router";
39
41
  "tanstack-router": "tanstack-router";
40
- nuxt: "nuxt";
41
- solid: "solid";
42
42
  "tanstack-start": "tanstack-start";
43
43
  "native-nativewind": "native-nativewind";
44
44
  "native-unistyles": "native-unistyles";
@@ -46,10 +46,10 @@ 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";
49
50
  biome: "biome";
50
51
  turborepo: "turborepo";
51
52
  starlight: "starlight";
52
- tauri: "tauri";
53
53
  pwa: "pwa";
54
54
  husky: "husky";
55
55
  }>;
@@ -61,16 +61,16 @@ export declare const ExamplesSchema: z.ZodEnum<{
61
61
  }>;
62
62
  export type Examples = z.infer<typeof ExamplesSchema>;
63
63
  export declare const PackageManagerSchema: z.ZodEnum<{
64
+ bun: "bun";
64
65
  npm: "npm";
65
66
  pnpm: "pnpm";
66
- bun: "bun";
67
67
  }>;
68
68
  export type PackageManager = z.infer<typeof PackageManagerSchema>;
69
69
  export declare const DatabaseSetupSchema: z.ZodEnum<{
70
70
  none: "none";
71
- neon: "neon";
72
71
  supabase: "supabase";
73
72
  turso: "turso";
73
+ neon: "neon";
74
74
  "prisma-postgres": "prisma-postgres";
75
75
  "mongodb-atlas": "mongodb-atlas";
76
76
  }>;
@@ -1,6 +1,7 @@
1
+ import { relinka } from "@reliverse/relinka";
1
2
  import { defineArgs, defineCommand } from "@reliverse/rempts";
2
3
  import { getConfigDler } from "../config/load.js";
3
- import { ensureReliverseConfig } from "../config/prepare.js";
4
+ import { ensureReliverseConfig, prepareReliverseEnvironment } from "../config/prepare.js";
4
5
  import { dlerPub } from "./impl.js";
5
6
  export default defineCommand({
6
7
  meta: {
@@ -14,7 +15,9 @@ export default defineCommand({
14
15
  }
15
16
  }),
16
17
  async run({ args }) {
17
- const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
18
+ const isDev = args.dev;
19
+ await prepareReliverseEnvironment(isDev, "ts");
20
+ relinka("verbose", `Running in ${isDev ? "dev" : "prod"} mode`);
18
21
  await ensureReliverseConfig(isDev, "ts");
19
22
  const config = await getConfigDler();
20
23
  await dlerPub(isDev, config);
@@ -42,15 +42,7 @@ async function deleteVercelProjects(vercelInstance, memory, maxItems, token) {
42
42
  }
43
43
  const team = await getPrimaryVercelTeam(vercelInstance, memory);
44
44
  const allProjects = await getVercelProjects(vercelInstance, maxItems, team);
45
- const protectedNames = [
46
- "relivator",
47
- "rse",
48
- "relidocs",
49
- "versator",
50
- "bleverse",
51
- "mfpiano",
52
- "blefnk"
53
- ];
45
+ const protectedNames = ["relivator", "relidocs", "versator", "bleverse", "blefnk"];
54
46
  const projects = allProjects.filter((p) => !protectedNames.includes(p.name.toLowerCase()));
55
47
  const projectNames = new Map(projects.map((p) => [p.id, p.name]));
56
48
  const info = `If you do not see some projects, restart the CLI with a higher terminal height (current: ${maxItems})`;
@@ -1,4 +1,4 @@
1
- import type { Output, Result } from "./exec-mod.js";
1
+ import type { Output, Result } from "./exec-mod";
2
2
  export declare class NonZeroExitError extends Error {
3
3
  readonly result: Result;
4
4
  readonly output?: Output;
@@ -1,6 +1,6 @@
1
1
  import fs from "@reliverse/relifso";
2
2
  const cliConfigTs = "reliverse.ts";
3
- const cliConfigJsonc = "rse";
3
+ const cliConfigJsonc = "reliverse.jsonc";
4
4
  export async function hasOnlyRse(directory) {
5
5
  try {
6
6
  const files = await fs.readdir(directory);
@@ -29,7 +29,7 @@ export async function showNativeCliMenu({ outputDir }) {
29
29
  return;
30
30
  }
31
31
  await downloadJsrDist(
32
- "rse",
32
+ "reliverse",
33
33
  "cli",
34
34
  void 0,
35
35
  // This will pick the latest version automatically
package/bin/dler.js CHANGED
@@ -18,19 +18,14 @@ import { default as updateCmd } from "./app/update/cmd.js";
18
18
  import { default as upgradeCmd } from "./app/upgrade/cmd.js";
19
19
  import { promptAggCommand } from "./app/utils/agg/agg-1.js";
20
20
  const MENU_CMDS = ["agg", "build", "pub", "update"];
21
- let isDev = process.env.DLER_DEV_MODE === "true";
22
21
  const main = defineCommand({
23
22
  meta: {
24
23
  name: "dler",
25
- version: "1.7.105",
24
+ version: "1.7.107",
26
25
  description: `Displays dler's command menu.
27
26
  To see ALL available commands and arguments, run: 'dler --help' (or 'dler <command> --help')
28
27
  Available menu commands: ${MENU_CMDS.join(", ")}`
29
28
  },
30
- async onLauncherInit() {
31
- await prepareReliverseEnvironment(isDev, "ts");
32
- relinka("verbose", `Running in ${isDev ? "dev" : "prod"} mode`);
33
- },
34
29
  args: defineArgs({
35
30
  dev: {
36
31
  type: "boolean",
@@ -48,7 +43,7 @@ Available menu commands: ${MENU_CMDS.join(", ")}`
48
43
  }
49
44
  }),
50
45
  async run({ args }) {
51
- isDev = args.dev;
46
+ const isDev = args.dev;
52
47
  const isCI = process.env.CI === "true";
53
48
  const isNonInteractive = !process.stdout.isTTY;
54
49
  if (isCI || isNonInteractive) {
@@ -60,6 +55,8 @@ Available menu commands: ${MENU_CMDS.join(", ")}`
60
55
  process.exit(0);
61
56
  }
62
57
  await showStartPrompt(isDev, false);
58
+ await prepareReliverseEnvironment(isDev, "ts");
59
+ relinka("verbose", `Running in ${isDev ? "dev" : "prod"} mode`);
63
60
  const cmdToRun = await selectPrompt({
64
61
  title: "Select a command to run",
65
62
  content: "Run 'dler --help' to see all available commands",
package/bin/mod.d.ts CHANGED
@@ -1,9 +1,3 @@
1
- export { default as path } from "@reliverse/pathkit";
2
- export { re } from "@reliverse/relico";
3
- export { default as fs } from "@reliverse/relifso";
4
- export { relinka } from "@reliverse/relinka";
5
- export { selectPrompt } from "@reliverse/rempts";
6
- export { detectEnvironment } from "@reliverse/runtime";
7
1
  export { useORPC } from "./app/add/add-local/api/orpc.js";
8
2
  export { useTRPC } from "./app/add/add-local/api/trpc.js";
9
3
  export { useBetterAuth } from "./app/add/add-local/auth/better-auth.js";
package/bin/mod.js CHANGED
@@ -1,9 +1,3 @@
1
- export { default as path } from "@reliverse/pathkit";
2
- export { re } from "@reliverse/relico";
3
- export { default as fs } from "@reliverse/relifso";
4
- export { relinka } from "@reliverse/relinka";
5
- export { selectPrompt } from "@reliverse/rempts";
6
- export { detectEnvironment } from "@reliverse/runtime";
7
1
  export { useORPC } from "./app/add/add-local/api/orpc.js";
8
2
  export { useTRPC } from "./app/add/add-local/api/trpc.js";
9
3
  export { useBetterAuth } from "./app/add/add-local/auth/better-auth.js";
package/package.json CHANGED
@@ -110,7 +110,7 @@
110
110
  "license": "MIT",
111
111
  "name": "@reliverse/dler",
112
112
  "type": "module",
113
- "version": "1.7.105",
113
+ "version": "1.7.107",
114
114
  "keywords": [
115
115
  "reliverse",
116
116
  "cli",