@famgia/omnify-laravel 0.0.89 → 0.0.91
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/{chunk-V7LWJ6OM.js → chunk-EVW3645L.js} +37 -2
- package/dist/{chunk-V7LWJ6OM.js.map → chunk-EVW3645L.js.map} +1 -1
- package/dist/index.cjs +35 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.cjs +35 -0
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +4 -4
- package/stubs/ai-guides/README.md.stub +95 -0
- package/stubs/ai-guides/claude-omnify/react-form-guide.md.stub +259 -0
- package/stubs/ai-guides/cursor/omnify.mdc.stub +58 -0
|
@@ -3922,7 +3922,7 @@ function getResourcePath(resource) {
|
|
|
3922
3922
|
}
|
|
3923
3923
|
|
|
3924
3924
|
// src/ai-guides/generator.ts
|
|
3925
|
-
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "fs";
|
|
3925
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, unlinkSync } from "fs";
|
|
3926
3926
|
import { resolve, dirname, join } from "path";
|
|
3927
3927
|
import { fileURLToPath } from "url";
|
|
3928
3928
|
var __filename = fileURLToPath(import.meta.url);
|
|
@@ -3995,6 +3995,16 @@ function generateAIGuides(rootDir, options = {}) {
|
|
|
3995
3995
|
cursorRules: 0,
|
|
3996
3996
|
files: []
|
|
3997
3997
|
};
|
|
3998
|
+
const readmeSrcPath = join(stubsDir, "README.md.stub");
|
|
3999
|
+
if (existsSync(readmeSrcPath)) {
|
|
4000
|
+
const readmeDestDir = resolve(rootDir, ".claude/omnify");
|
|
4001
|
+
if (!existsSync(readmeDestDir)) {
|
|
4002
|
+
mkdirSync(readmeDestDir, { recursive: true });
|
|
4003
|
+
}
|
|
4004
|
+
const content = readFileSync(readmeSrcPath, "utf-8");
|
|
4005
|
+
writeFileSync(resolve(readmeDestDir, "README.md"), content);
|
|
4006
|
+
result.files.push(resolve(readmeDestDir, "README.md"));
|
|
4007
|
+
}
|
|
3998
4008
|
const claudeSrcDir = join(stubsDir, "laravel");
|
|
3999
4009
|
const claudeDestDir = resolve(rootDir, ".claude/omnify/guides/laravel");
|
|
4000
4010
|
if (existsSync(claudeSrcDir)) {
|
|
@@ -4048,8 +4058,33 @@ function generateAIGuides(rootDir, options = {}) {
|
|
|
4048
4058
|
result.cursorRules = files.length;
|
|
4049
4059
|
result.files.push(...files);
|
|
4050
4060
|
}
|
|
4061
|
+
cleanupRootLevelDuplicates(rootDir);
|
|
4051
4062
|
return result;
|
|
4052
4063
|
}
|
|
4064
|
+
function cleanupRootLevelDuplicates(rootDir) {
|
|
4065
|
+
const claudeOmnify = resolve(rootDir, ".claude/omnify");
|
|
4066
|
+
const guidesOmnify = resolve(rootDir, ".claude/omnify/guides/omnify");
|
|
4067
|
+
if (!existsSync(guidesOmnify)) return;
|
|
4068
|
+
const filesToCleanup = [
|
|
4069
|
+
"schema-guide.md",
|
|
4070
|
+
"config-guide.md",
|
|
4071
|
+
"typescript-guide.md",
|
|
4072
|
+
"laravel-guide.md",
|
|
4073
|
+
"antdesign-guide.md",
|
|
4074
|
+
"react-form-guide.md",
|
|
4075
|
+
"japan-guide.md"
|
|
4076
|
+
];
|
|
4077
|
+
for (const file of filesToCleanup) {
|
|
4078
|
+
const rootFile = resolve(claudeOmnify, file);
|
|
4079
|
+
const guidesFile = resolve(guidesOmnify, file);
|
|
4080
|
+
if (existsSync(rootFile) && existsSync(guidesFile)) {
|
|
4081
|
+
try {
|
|
4082
|
+
unlinkSync(rootFile);
|
|
4083
|
+
} catch {
|
|
4084
|
+
}
|
|
4085
|
+
}
|
|
4086
|
+
}
|
|
4087
|
+
}
|
|
4053
4088
|
function shouldGenerateAIGuides(rootDir) {
|
|
4054
4089
|
const claudeDir = resolve(rootDir, ".claude/omnify/guides/laravel");
|
|
4055
4090
|
const cursorDir = resolve(rootDir, ".cursor/rules/omnify");
|
|
@@ -4546,4 +4581,4 @@ export {
|
|
|
4546
4581
|
shouldGenerateAIGuides,
|
|
4547
4582
|
laravelPlugin
|
|
4548
4583
|
};
|
|
4549
|
-
//# sourceMappingURL=chunk-
|
|
4584
|
+
//# sourceMappingURL=chunk-EVW3645L.js.map
|