@reliverse/dler 1.7.35 → 1.7.37

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.
@@ -43,20 +43,22 @@ async function processDistDirectories() {
43
43
  }
44
44
  async function copyNonBuildFiles(srcDir, distDir, preExtensions, templatesDir) {
45
45
  try {
46
+ const templatesSrcPath = path.join(srcDir, templatesDir);
47
+ if (await directoryExists(templatesSrcPath)) {
48
+ const templatesDestPath = path.join(distDir, "bin", templatesDir);
49
+ await fs.ensureDir(path.dirname(templatesDestPath));
50
+ await fs.copy(templatesSrcPath, templatesDestPath);
51
+ }
46
52
  const files = await glob("**/*", {
47
53
  cwd: srcDir,
48
- onlyFiles: true
54
+ ignore: [`${templatesDir}/**`]
49
55
  });
50
56
  for (const file of files) {
51
57
  const ext = path.extname(file).slice(1);
52
- const isInTemplatesDir = file.includes(`/${templatesDir}/`);
53
- if (isInTemplatesDir || !preExtensions.includes(ext)) {
58
+ if (!preExtensions.includes(ext)) {
54
59
  const srcPath = path.join(srcDir, file);
55
- let destPath = path.join(distDir, file);
56
- if (!isInTemplatesDir && !preExtensions.includes(ext) || isInTemplatesDir) {
57
- const binDir = path.join(distDir, "bin");
58
- destPath = path.join(binDir, file);
59
- }
60
+ const binDir = path.join(distDir, "bin");
61
+ const destPath = path.join(binDir, file);
60
62
  await fs.ensureDir(path.dirname(destPath));
61
63
  await fs.copy(srcPath, destPath);
62
64
  }
@@ -152,9 +154,9 @@ export async function wrapper_CopyNonBuildFiles(config) {
152
154
  );
153
155
  }
154
156
  if (config.libsActMode === "libs-only" || config.libsActMode === "main-and-libs") {
155
- for (const [libName, libConfig] of Object.entries(config.libsList)) {
157
+ for (const [_, libConfig] of Object.entries(config.libsList)) {
156
158
  const srcPath = path.join(PROJECT_ROOT, config.libsDirSrc, libConfig.libDirName);
157
- const distPath = path.join(PROJECT_ROOT, config.libsDirDist, libName);
159
+ const distPath = path.join(PROJECT_ROOT, config.libsDirDist, libConfig.libDirName);
158
160
  if (libConfig.libPubRegistry === "npm" || libConfig.libPubRegistry === "npm-jsr") {
159
161
  await copyNonBuildFiles(
160
162
  srcPath,
@@ -50,6 +50,9 @@ export declare const defineConfigDler: (userConfig?: Partial<DlerConfig>) => {
50
50
  runAfterBuild: "dler-check"[];
51
51
  hooksBeforeBuild: (() => Promise<void>)[];
52
52
  hooksAfterBuild: (() => Promise<void>)[];
53
+ postBuildSettings: {
54
+ cleanupTempDirs: boolean;
55
+ };
53
56
  transpileFailOnWarn: boolean;
54
57
  transpileEsbuild: import("./cfg-types").Esbuild;
55
58
  transpileFormat: import("./cfg-types").transpileFormat;
@@ -71,7 +74,4 @@ export declare const defineConfigDler: (userConfig?: Partial<DlerConfig>) => {
71
74
  };
72
75
  buildPreExtensions: string[];
73
76
  buildTemplatesDir: string;
74
- postBuildSettings: {
75
- cleanupTempDirs: boolean;
76
- };
77
77
  };
@@ -52,6 +52,9 @@ export const DEFAULT_CONFIG_DLER = {
52
52
  // await someAsyncOperation();
53
53
  // }
54
54
  ],
55
+ postBuildSettings: {
56
+ cleanupTempDirs: true
57
+ },
55
58
  // Build setup
56
59
  transpileFailOnWarn: false,
57
60
  transpileEsbuild: "es2023",
@@ -363,6 +363,14 @@ export interface DlerConfig {
363
363
  * @default []
364
364
  */
365
365
  hooksAfterBuild: (() => Promise<void>)[];
366
+ /**
367
+ * When `true`, cleans up the temporary directories after the build process completes.
368
+ *
369
+ * @default true
370
+ */
371
+ postBuildSettings: {
372
+ cleanupTempDirs: boolean;
373
+ };
366
374
  /**
367
375
  * When `true`, fails the build if warnings are detected.
368
376
  * Use with caution, as it may lead to inconsistent published versions.
@@ -489,14 +497,6 @@ export interface DlerConfig {
489
497
  * @default "templates"
490
498
  */
491
499
  buildTemplatesDir: string;
492
- /**
493
- * When `true`, cleans up the temporary directories after the build process completes.
494
- *
495
- * @default true
496
- */
497
- postBuildSettings: {
498
- cleanupTempDirs: boolean;
499
- };
500
500
  }
501
501
  export type BumpMode = "patch" | "minor" | "major" | "auto" | "manual";
502
502
  /**
@@ -11,10 +11,10 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
11
11
  projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
12
12
  projectDeployService?: "none" | "vercel" | "netlify" | "railway" | "deno" | undefined;
13
13
  projectPackageManager?: "bun" | "npm" | "yarn" | "pnpm" | undefined;
14
- projectState?: "created" | "creating" | undefined;
14
+ projectState?: "creating" | "created" | undefined;
15
15
  projectCategory?: "browser" | "cli" | "unknown" | "website" | "vscode" | "library" | "mobile" | undefined;
16
16
  projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
17
- projectFramework?: "npm-jsr" | "rempts" | "vue" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | undefined;
17
+ projectFramework?: "npm-jsr" | "rempts" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "vue" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | undefined;
18
18
  projectTemplate?: "unknown" | "blefnk/relivator-nextjs-template" | "blefnk/relivator-docker-template" | "blefnk/next-react-ts-src-minimal" | "blefnk/all-in-one-nextjs-template" | "blefnk/create-t3-app" | "blefnk/create-next-app" | "blefnk/astro-starlight-template" | "blefnk/versator-nextjs-template" | "blefnk/relivator-lynxjs-template" | "blefnk/relivator-react-native-template" | "reliverse/template-browser-extension" | "microsoft/vscode-extension-samples" | "microsoft/vscode-extension-template" | "rsetarter-template" | "blefnk/deno-cli-tutorial" | undefined;
19
19
  projectTemplateDate?: string | undefined;
20
20
  features?: {
@@ -40,7 +40,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
40
40
  testing?: "bun" | "unknown" | "vitest" | "jest" | "playwright" | "cypress" | undefined;
41
41
  stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
42
42
  formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
43
- styling?: "sass" | "unknown" | "tailwind" | "styled-components" | "css-modules" | undefined;
43
+ styling?: "unknown" | "tailwind" | "styled-components" | "css-modules" | "sass" | undefined;
44
44
  uiComponents?: "unknown" | "shadcn-ui" | "chakra-ui" | "material-ui" | undefined;
45
45
  databaseLibrary?: "unknown" | "drizzle" | "prisma" | "supabase" | undefined;
46
46
  databaseProvider?: "unknown" | "pg" | "mysql" | "sqlite" | "mongodb" | undefined;
@@ -75,7 +75,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
75
75
  indentStyle?: "space" | "tab" | undefined;
76
76
  quoteMark?: "single" | "double" | undefined;
77
77
  semicolons?: boolean | undefined;
78
- trailingComma?: "all" | "none" | "es5" | undefined;
78
+ trailingComma?: "none" | "all" | "es5" | undefined;
79
79
  bracketSpacing?: boolean | undefined;
80
80
  arrowParens?: "always" | "avoid" | undefined;
81
81
  tabWidth?: number | undefined;
@@ -96,7 +96,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
96
96
  importSymbol?: string | undefined;
97
97
  } | undefined;
98
98
  monorepo?: {
99
- type?: "bun" | "pnpm" | "none" | "turborepo" | "nx" | undefined;
99
+ type?: "none" | "bun" | "pnpm" | "turborepo" | "nx" | undefined;
100
100
  packages?: string[] | undefined;
101
101
  sharedPackages?: string[] | undefined;
102
102
  } | undefined;
@@ -50,6 +50,9 @@ export const DEFAULT_CONFIG_DLER = {
50
50
  // await someAsyncOperation();
51
51
  // }
52
52
  ],
53
+ postBuildSettings: {
54
+ cleanupTempDirs: true
55
+ },
53
56
  // Build setup
54
57
  transpileFailOnWarn: false,
55
58
  transpileEsbuild: "es2023",
@@ -1,5 +1,5 @@
1
1
  import { endPrompt, startPrompt } from "@reliverse/rempts";
2
- const version = "1.7.35";
2
+ const version = "1.7.37";
3
3
  export async function showStartPrompt(isDev) {
4
4
  await startPrompt({
5
5
  titleColor: "inverse",
@@ -247,6 +247,10 @@ function generateConfig(isDev, pkgDescription) {
247
247
  " // }",
248
248
  " ],",
249
249
  "",
250
+ " postBuildSettings: {",
251
+ " cleanupTempDirs: true,",
252
+ " },",
253
+ "",
250
254
  " // Build setup",
251
255
  " // transpileAlias: {},",
252
256
  " // transpileClean: true,",
@@ -363,6 +363,14 @@ export interface DlerConfig {
363
363
  * @default []
364
364
  */
365
365
  hooksAfterBuild: (() => Promise<void>)[];
366
+ /**
367
+ * When `true`, cleans up the temporary directories after the build process completes.
368
+ *
369
+ * @default true
370
+ */
371
+ postBuildSettings: {
372
+ cleanupTempDirs: boolean;
373
+ };
366
374
  /**
367
375
  * When `true`, fails the build if warnings are detected.
368
376
  * Use with caution, as it may lead to inconsistent published versions.
@@ -489,14 +497,6 @@ export interface DlerConfig {
489
497
  * @default "templates"
490
498
  */
491
499
  buildTemplatesDir: string;
492
- /**
493
- * When `true`, cleans up the temporary directories after the build process completes.
494
- *
495
- * @default true
496
- */
497
- postBuildSettings: {
498
- cleanupTempDirs: boolean;
499
- };
500
500
  }
501
501
  export type BumpMode = "patch" | "minor" | "major" | "auto" | "manual";
502
502
  /**
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  "license": "MIT",
54
54
  "name": "@reliverse/dler",
55
55
  "type": "module",
56
- "version": "1.7.35",
56
+ "version": "1.7.37",
57
57
  "keywords": [
58
58
  "reliverse",
59
59
  "cli",