@create-node-app/core 0.3.17 → 0.4.0
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/index.js +18 -0
- package/dist/index.mjs +18 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7393,6 +7393,19 @@ var batchedAppendFiles = async (operations) => {
|
|
|
7393
7393
|
});
|
|
7394
7394
|
await Promise.all(batchedPromises);
|
|
7395
7395
|
};
|
|
7396
|
+
var getAiToolFilters = (aiTool) => {
|
|
7397
|
+
const filters = [];
|
|
7398
|
+
if (aiTool !== "cursor") {
|
|
7399
|
+
filters.push("!.cursorrules", "!**/.cursorrules");
|
|
7400
|
+
}
|
|
7401
|
+
if (aiTool !== "copilot") {
|
|
7402
|
+
filters.push(
|
|
7403
|
+
"!.github/copilot-instructions.md",
|
|
7404
|
+
"!**/.github/copilot-instructions.md"
|
|
7405
|
+
);
|
|
7406
|
+
}
|
|
7407
|
+
return filters;
|
|
7408
|
+
};
|
|
7396
7409
|
var copyLoader = ({ root, templateDir, verbose, srcDir }) => async ({ path: path4 }) => {
|
|
7397
7410
|
const operations = [];
|
|
7398
7411
|
try {
|
|
@@ -7529,6 +7542,9 @@ var loadFiles = async ({
|
|
|
7529
7542
|
for await (const { url: templateOrExtensionUrl } of templatesOrExtensions) {
|
|
7530
7543
|
const templateDir = await getTemplateDirPath(templateOrExtensionUrl);
|
|
7531
7544
|
if (import_fs4.default.existsSync(templateDir) && import_fs4.default.statSync(templateDir).isDirectory()) {
|
|
7545
|
+
const aiToolFilters = getAiToolFilters(
|
|
7546
|
+
String(customOptions.aiTool || "none")
|
|
7547
|
+
);
|
|
7532
7548
|
for await (const entry of (0, import_readdirp.default)(templateDir, {
|
|
7533
7549
|
fileFilter: [
|
|
7534
7550
|
"!package.js",
|
|
@@ -7537,6 +7553,8 @@ var loadFiles = async ({
|
|
|
7537
7553
|
"!template.json",
|
|
7538
7554
|
"!yarn.lock",
|
|
7539
7555
|
"!pnpm-lock.yaml",
|
|
7556
|
+
// AI tool filters - exclude files not needed
|
|
7557
|
+
...aiToolFilters,
|
|
7540
7558
|
// based on the package manager we want to ignore files containing
|
|
7541
7559
|
// the other package as condition.
|
|
7542
7560
|
// For example, if `usePnpm` is true, the we need to ignore
|
package/dist/index.mjs
CHANGED
|
@@ -7386,6 +7386,19 @@ var batchedAppendFiles = async (operations) => {
|
|
|
7386
7386
|
});
|
|
7387
7387
|
await Promise.all(batchedPromises);
|
|
7388
7388
|
};
|
|
7389
|
+
var getAiToolFilters = (aiTool) => {
|
|
7390
|
+
const filters = [];
|
|
7391
|
+
if (aiTool !== "cursor") {
|
|
7392
|
+
filters.push("!.cursorrules", "!**/.cursorrules");
|
|
7393
|
+
}
|
|
7394
|
+
if (aiTool !== "copilot") {
|
|
7395
|
+
filters.push(
|
|
7396
|
+
"!.github/copilot-instructions.md",
|
|
7397
|
+
"!**/.github/copilot-instructions.md"
|
|
7398
|
+
);
|
|
7399
|
+
}
|
|
7400
|
+
return filters;
|
|
7401
|
+
};
|
|
7389
7402
|
var copyLoader = ({ root, templateDir, verbose, srcDir }) => async ({ path: path4 }) => {
|
|
7390
7403
|
const operations = [];
|
|
7391
7404
|
try {
|
|
@@ -7522,6 +7535,9 @@ var loadFiles = async ({
|
|
|
7522
7535
|
for await (const { url: templateOrExtensionUrl } of templatesOrExtensions) {
|
|
7523
7536
|
const templateDir = await getTemplateDirPath(templateOrExtensionUrl);
|
|
7524
7537
|
if (fs3.existsSync(templateDir) && fs3.statSync(templateDir).isDirectory()) {
|
|
7538
|
+
const aiToolFilters = getAiToolFilters(
|
|
7539
|
+
String(customOptions.aiTool || "none")
|
|
7540
|
+
);
|
|
7525
7541
|
for await (const entry of readdirp(templateDir, {
|
|
7526
7542
|
fileFilter: [
|
|
7527
7543
|
"!package.js",
|
|
@@ -7530,6 +7546,8 @@ var loadFiles = async ({
|
|
|
7530
7546
|
"!template.json",
|
|
7531
7547
|
"!yarn.lock",
|
|
7532
7548
|
"!pnpm-lock.yaml",
|
|
7549
|
+
// AI tool filters - exclude files not needed
|
|
7550
|
+
...aiToolFilters,
|
|
7533
7551
|
// based on the package manager we want to ignore files containing
|
|
7534
7552
|
// the other package as condition.
|
|
7535
7553
|
// For example, if `usePnpm` is true, the we need to ignore
|