@reliverse/dler 1.7.39 → 1.7.41
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.
|
@@ -20,25 +20,38 @@ const createPostBuildToolRunner = () => ({
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
async function processDistDirectory(dir, alias) {
|
|
23
|
+
async function processDistDirectory(dir, alias, config) {
|
|
24
24
|
try {
|
|
25
25
|
const binDir = path.join(dir, "bin");
|
|
26
26
|
if (await directoryExists(binDir)) {
|
|
27
|
-
await
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const files = await glob("**/*", {
|
|
28
|
+
cwd: binDir,
|
|
29
|
+
onlyFiles: true,
|
|
30
|
+
ignore: [`**/${config.buildTemplatesDir}/**`]
|
|
31
|
+
// Exclude templates directory
|
|
31
32
|
});
|
|
33
|
+
const filesToProcess = files.filter((file) => {
|
|
34
|
+
const ext = path.extname(file).slice(1);
|
|
35
|
+
return config.buildPreExtensions.includes(ext);
|
|
36
|
+
});
|
|
37
|
+
for (const file of filesToProcess) {
|
|
38
|
+
const filePath = path.join(binDir, file);
|
|
39
|
+
await convertImportsAliasToRelative({
|
|
40
|
+
targetDir: path.dirname(filePath),
|
|
41
|
+
aliasToReplace: alias,
|
|
42
|
+
pathExtFilter: "js-ts-none"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
32
45
|
}
|
|
33
46
|
} catch (error) {
|
|
34
47
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
35
48
|
throw error;
|
|
36
49
|
}
|
|
37
50
|
}
|
|
38
|
-
async function processDistDirectories() {
|
|
51
|
+
async function processDistDirectories(config) {
|
|
39
52
|
for (const dir of DIST_DIRECTORIES) {
|
|
40
53
|
relinka("log", `[processDistDirectory] ${dir}`);
|
|
41
|
-
await processDistDirectory(dir, ALIAS_TO_REPLACE);
|
|
54
|
+
await processDistDirectory(dir, ALIAS_TO_REPLACE, config);
|
|
42
55
|
}
|
|
43
56
|
}
|
|
44
57
|
async function copyNonBuildFiles(srcDir, distDir, preExtensions, templatesDir) {
|
|
@@ -48,13 +61,7 @@ async function copyNonBuildFiles(srcDir, distDir, preExtensions, templatesDir) {
|
|
|
48
61
|
onlyDirectories: true,
|
|
49
62
|
absolute: true
|
|
50
63
|
});
|
|
51
|
-
const
|
|
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) {
|
|
64
|
+
for (const templateDir of templatesDirs) {
|
|
58
65
|
const relativePath = path.relative(srcDir, templateDir);
|
|
59
66
|
const templatesDestPath = path.join(distDir, "bin", relativePath);
|
|
60
67
|
await fs.ensureDir(path.dirname(templatesDestPath));
|
|
@@ -137,7 +144,7 @@ export async function dlerPostBuild(isDev, debugDontCopyNonBuildFiles) {
|
|
|
137
144
|
if (isDev) {
|
|
138
145
|
await applyMagicSpells(["dist-jsr", "dist-npm", "dist-libs"]);
|
|
139
146
|
}
|
|
140
|
-
await processDistDirectories();
|
|
147
|
+
await processDistDirectories(config);
|
|
141
148
|
await executeDlerHooks(config?.hooksAfterBuild ?? [], "post-build");
|
|
142
149
|
if (config?.runAfterBuild?.length) {
|
|
143
150
|
const tools = createPostBuildToolRunner();
|
|
@@ -14,7 +14,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
14
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
|
-
projectFramework?: "npm-jsr" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "vue" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "
|
|
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?: {
|
|
@@ -34,6 +34,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
34
34
|
} | undefined;
|
|
35
35
|
preferredLibraries?: {
|
|
36
36
|
search?: "unknown" | "algolia" | undefined;
|
|
37
|
+
cdn?: "unknown" | "cloudflare" | undefined;
|
|
37
38
|
i18n?: "unknown" | "next-intl" | undefined;
|
|
38
39
|
analytics?: "unknown" | "vercel" | undefined;
|
|
39
40
|
authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
|
|
@@ -59,7 +60,6 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
|
|
|
59
60
|
mail?: "unknown" | "resend" | undefined;
|
|
60
61
|
cache?: "unknown" | "redis" | undefined;
|
|
61
62
|
storage?: "unknown" | "cloudflare" | undefined;
|
|
62
|
-
cdn?: "unknown" | "cloudflare" | undefined;
|
|
63
63
|
cms?: "unknown" | "contentlayer" | undefined;
|
|
64
64
|
seo?: "unknown" | "next-seo" | undefined;
|
|
65
65
|
motion?: "unknown" | "framer" | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@reliverse/bleump": "^1.1.4",
|
|
4
|
-
"@reliverse/pathkit": "^1.3.
|
|
4
|
+
"@reliverse/pathkit": "^1.3.4",
|
|
5
5
|
"@reliverse/reglob": "^1.0.0",
|
|
6
6
|
"@reliverse/relico": "^1.1.2",
|
|
7
7
|
"@reliverse/relifso": "^1.4.5",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"license": "MIT",
|
|
54
54
|
"name": "@reliverse/dler",
|
|
55
55
|
"type": "module",
|
|
56
|
-
"version": "1.7.
|
|
56
|
+
"version": "1.7.41",
|
|
57
57
|
"keywords": [
|
|
58
58
|
"reliverse",
|
|
59
59
|
"cli",
|