@thinhnguyencth1204/nextcli 0.4.0 → 0.4.2
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/dist/cli.js +13 -7
- package/package.json +1 -2
package/dist/cli.js
CHANGED
|
@@ -26,8 +26,11 @@ var TEMPLATE_COPY_SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
|
26
26
|
function shouldSkipTemplateDir(dirName) {
|
|
27
27
|
return TEMPLATE_COPY_SKIP_DIRS.has(dirName);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
29
|
+
function shouldSkipRelativeTemplatePath(relativePath) {
|
|
30
|
+
if (!relativePath || relativePath === ".") {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return relativePath.split(path.sep).some((segment) => shouldSkipTemplateDir(segment));
|
|
31
34
|
}
|
|
32
35
|
async function ensureDir(targetPath) {
|
|
33
36
|
await mkdir(targetPath, { recursive: true });
|
|
@@ -44,7 +47,10 @@ async function copyDirectory(source, destination) {
|
|
|
44
47
|
await ensureDir(destination);
|
|
45
48
|
await cp(source, destination, {
|
|
46
49
|
recursive: true,
|
|
47
|
-
filter: (src) =>
|
|
50
|
+
filter: (src) => {
|
|
51
|
+
const relativePath = path.relative(source, src);
|
|
52
|
+
return !shouldSkipRelativeTemplatePath(relativePath);
|
|
53
|
+
}
|
|
48
54
|
});
|
|
49
55
|
}
|
|
50
56
|
async function copyDirectorySafely(source, destination) {
|
|
@@ -554,7 +560,7 @@ import { readdir as readdir3, readFile as readFile4, writeFile as writeFile4 } f
|
|
|
554
560
|
import path4 from "path";
|
|
555
561
|
import { readdir as readdir2, readFile as readFile3, writeFile as writeFile3 } from "fs/promises";
|
|
556
562
|
var defaultManifest = {
|
|
557
|
-
cli: "0.4.
|
|
563
|
+
cli: "0.4.2",
|
|
558
564
|
defaultLocale: "vi",
|
|
559
565
|
locales: ["vi"],
|
|
560
566
|
namespaces: ["common", "auth", "example"],
|
|
@@ -1888,7 +1894,7 @@ function registerCreateCommand(program2) {
|
|
|
1888
1894
|
__PROJECT_NAME__: projectSlug,
|
|
1889
1895
|
__ENABLE_CHAT__: selectedModules.includes("chat") ? "true" : "false",
|
|
1890
1896
|
__BETTER_AUTH_SECRET__: betterAuthSecret,
|
|
1891
|
-
__NEXTCLI_VERSION__: "0.4.
|
|
1897
|
+
__NEXTCLI_VERSION__: "0.4.2"
|
|
1892
1898
|
});
|
|
1893
1899
|
await mergeModuleSetupSections(
|
|
1894
1900
|
targetPath,
|
|
@@ -1899,7 +1905,7 @@ function registerCreateCommand(program2) {
|
|
|
1899
1905
|
if (manifest) {
|
|
1900
1906
|
await writeManifest(targetPath, {
|
|
1901
1907
|
...manifest,
|
|
1902
|
-
cli: "0.4.
|
|
1908
|
+
cli: "0.4.2",
|
|
1903
1909
|
modules: selectedModules
|
|
1904
1910
|
});
|
|
1905
1911
|
}
|
|
@@ -2141,7 +2147,7 @@ var NexTCLICommand = class _NexTCLICommand extends Command {
|
|
|
2141
2147
|
|
|
2142
2148
|
// src/cli.ts
|
|
2143
2149
|
var program = new NexTCLICommand();
|
|
2144
|
-
program.name("nextcli").description("Scaffold outsource-ready Next.js projects").version("0.4.
|
|
2150
|
+
program.name("nextcli").description("Scaffold outsource-ready Next.js projects").version("0.4.2");
|
|
2145
2151
|
registerCreateCommand(program);
|
|
2146
2152
|
registerAddCommand(program);
|
|
2147
2153
|
registerMigrateCommand(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thinhnguyencth1204/nextcli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "CLI scaffolder for outsourced Next.js projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@clack/prompts": "^0.7.0",
|
|
36
|
-
"@thinhnguyencth1204/nextcli": "^0.4.0",
|
|
37
36
|
"commander": "^12.1.0"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|