@reliverse/dler 1.7.36 → 1.7.38

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.
package/README.md CHANGED
@@ -829,17 +829,6 @@ bun add @reliverse/dler-sdk
829
829
 
830
830
  **usage example**: [@reliverse/rse](https://github.com/reliverse/rse-website-builder) leverages this sdk to extend its functionality.
831
831
 
832
- ## todo
833
-
834
- - [x] ~~implement stable `regular` build and publish~~
835
- - [ ] implement stable `library` build and publish
836
- - [ ] achieve full drop-in replacement for `unbuild`
837
- - [ ] support auto migration from `build.config.ts`
838
- - [ ] allow plugins to extend dler's `defineconfig`
839
- - [ ] support configuration via `.config/rse.{ts,jsonc}`
840
- - [ ] make config file optional with sensible defaults
841
- - [ ] use [@reliverse/remdn](https://github.com/reliverse/remdn) to generate npm/jsr readme
842
-
843
832
  ## related
844
833
 
845
834
  special thanks to the project that inspired `@reliverse/dler`:
@@ -858,6 +847,20 @@ special thanks to the project that inspired `@reliverse/dler`:
858
847
 
859
848
  - `<src | dist-npm | dist-jsr>/libs/<lib-name>/<files live here>` === `dist-libs/<lib-name>/<jsr | npm>/bin/<files live here>`
860
849
 
850
+ ### todo
851
+
852
+ - [ ] `dist-*`-> `dist/dist-*`
853
+ - [x] implement stable `regular` build and publish
854
+ - [ ] implement stable `library` build and publish
855
+ - [ ] achieve full drop-in replacement for `unbuild`
856
+ - [ ] support auto migration from `build.config.ts`
857
+ - [ ] support configuration via `.config/rse.{ts,jsonc}` 🤔
858
+ - [ ] make config file fully optional with sensible defaults
859
+ - [ ] use `dler remdn` ([@reliverse/remdn](https://github.com/reliverse/remdn)) to generate npm/jsr docs and readme
860
+ - [x] allow plugins to extend dler's `defineconfig` (`hooksBeforeBuild` and `hooksAfterBuild` are now available, plugin's options can be passed directly to plugin's params, e.g. `hooksBeforeBuild: [ async () => { await myCoolPlugin({ /* plugin's options */ }); } ],`)
861
+ - [ ] at the moment any bundler like `mkdist` can be called using `bun`, but bun's own bundler is not yet fully supported
862
+ - [ ] support all well-known package managers (currently only bun is fully supported)
863
+
861
864
  ## support
862
865
 
863
866
  - if dler saves you time and effort, please consider supporting its development: [github sponsors](https://github.com/sponsors/blefnk);
@@ -43,20 +43,33 @@ async function processDistDirectories() {
43
43
  }
44
44
  async function copyNonBuildFiles(srcDir, distDir, preExtensions, templatesDir) {
45
45
  try {
46
+ const templatesDirs = await glob(`**/${templatesDir}`, {
47
+ cwd: srcDir,
48
+ onlyDirectories: true,
49
+ absolute: true
50
+ });
51
+ const topLevelTemplatesDirs = templatesDirs.filter((dir) => {
52
+ const relativePath = path.relative(srcDir, dir);
53
+ const parts = relativePath.split(path.sep);
54
+ const templatesIndex = parts.indexOf(templatesDir);
55
+ return templatesIndex === parts.length - 1;
56
+ });
57
+ for (const templateDir of topLevelTemplatesDirs) {
58
+ const relativePath = path.relative(srcDir, templateDir);
59
+ const templatesDestPath = path.join(distDir, "bin", relativePath);
60
+ await fs.ensureDir(path.dirname(templatesDestPath));
61
+ await fs.copy(templateDir, templatesDestPath);
62
+ }
46
63
  const files = await glob("**/*", {
47
64
  cwd: srcDir,
48
- onlyFiles: true
65
+ ignore: [`**/${templatesDir}/**`]
49
66
  });
50
67
  for (const file of files) {
51
68
  const ext = path.extname(file).slice(1);
52
- const isInTemplatesDir = file.includes(`/${templatesDir}/`);
53
- if (isInTemplatesDir || !preExtensions.includes(ext)) {
69
+ if (!preExtensions.includes(ext)) {
54
70
  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
- }
71
+ const binDir = path.join(distDir, "bin");
72
+ const destPath = path.join(binDir, file);
60
73
  await fs.ensureDir(path.dirname(destPath));
61
74
  await fs.copy(srcPath, destPath);
62
75
  }
@@ -10,8 +10,8 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
10
10
  projectDomain?: string | undefined;
11
11
  projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
12
12
  projectDeployService?: "none" | "vercel" | "netlify" | "railway" | "deno" | undefined;
13
- projectPackageManager?: "npm" | "bun" | "pnpm" | "yarn" | undefined;
14
- projectState?: "creating" | "created" | undefined;
13
+ projectPackageManager?: "bun" | "npm" | "yarn" | "pnpm" | undefined;
14
+ projectState?: "created" | "creating" | undefined;
15
15
  projectCategory?: "browser" | "cli" | "unknown" | "website" | "vscode" | "library" | "mobile" | undefined;
16
16
  projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
17
17
  projectFramework?: "npm-jsr" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "vue" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "rempts" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | undefined;
@@ -33,10 +33,11 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
33
33
  themes?: string[] | undefined;
34
34
  } | undefined;
35
35
  preferredLibraries?: {
36
+ search?: "unknown" | "algolia" | undefined;
36
37
  i18n?: "unknown" | "next-intl" | undefined;
37
38
  analytics?: "unknown" | "vercel" | undefined;
38
39
  authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
39
- api?: "unknown" | "hono" | "trpc" | "graphql" | "rest" | undefined;
40
+ api?: "rest" | "unknown" | "hono" | "trpc" | "graphql" | undefined;
40
41
  testing?: "bun" | "unknown" | "vitest" | "jest" | "playwright" | "cypress" | undefined;
41
42
  stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
42
43
  formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
@@ -51,7 +52,6 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
51
52
  logging?: "unknown" | "axiom" | undefined;
52
53
  forms?: "unknown" | "react-hook-form" | undefined;
53
54
  notifications?: "unknown" | "sonner" | undefined;
54
- search?: "unknown" | "algolia" | undefined;
55
55
  uploads?: "unknown" | "uploadthing" | undefined;
56
56
  validation?: "unknown" | "zod" | "typebox" | "valibot" | undefined;
57
57
  documentation?: "unknown" | "starlight" | "nextra" | 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?: "none" | "es5" | "all" | undefined;
78
+ trailingComma?: "all" | "none" | "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?: "none" | "bun" | "turborepo" | "nx" | "pnpm" | undefined;
99
+ type?: "bun" | "pnpm" | "none" | "turborepo" | "nx" | undefined;
100
100
  packages?: string[] | undefined;
101
101
  sharedPackages?: string[] | undefined;
102
102
  } | undefined;
@@ -1,5 +1,5 @@
1
1
  import { endPrompt, startPrompt } from "@reliverse/rempts";
2
- const version = "1.7.36";
2
+ const version = "1.7.38";
3
3
  export async function showStartPrompt(isDev) {
4
4
  await startPrompt({
5
5
  titleColor: "inverse",
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.36",
56
+ "version": "1.7.38",
57
57
  "keywords": [
58
58
  "reliverse",
59
59
  "cli",