@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
package/dist/index.js
CHANGED
package/dist/plugin.cjs
CHANGED
|
@@ -3971,6 +3971,16 @@ function generateAIGuides(rootDir, options = {}) {
|
|
|
3971
3971
|
cursorRules: 0,
|
|
3972
3972
|
files: []
|
|
3973
3973
|
};
|
|
3974
|
+
const readmeSrcPath = (0, import_node_path.join)(stubsDir, "README.md.stub");
|
|
3975
|
+
if ((0, import_node_fs.existsSync)(readmeSrcPath)) {
|
|
3976
|
+
const readmeDestDir = (0, import_node_path.resolve)(rootDir, ".claude/omnify");
|
|
3977
|
+
if (!(0, import_node_fs.existsSync)(readmeDestDir)) {
|
|
3978
|
+
(0, import_node_fs.mkdirSync)(readmeDestDir, { recursive: true });
|
|
3979
|
+
}
|
|
3980
|
+
const content = (0, import_node_fs.readFileSync)(readmeSrcPath, "utf-8");
|
|
3981
|
+
(0, import_node_fs.writeFileSync)((0, import_node_path.resolve)(readmeDestDir, "README.md"), content);
|
|
3982
|
+
result.files.push((0, import_node_path.resolve)(readmeDestDir, "README.md"));
|
|
3983
|
+
}
|
|
3974
3984
|
const claudeSrcDir = (0, import_node_path.join)(stubsDir, "laravel");
|
|
3975
3985
|
const claudeDestDir = (0, import_node_path.resolve)(rootDir, ".claude/omnify/guides/laravel");
|
|
3976
3986
|
if ((0, import_node_fs.existsSync)(claudeSrcDir)) {
|
|
@@ -4024,8 +4034,33 @@ function generateAIGuides(rootDir, options = {}) {
|
|
|
4024
4034
|
result.cursorRules = files.length;
|
|
4025
4035
|
result.files.push(...files);
|
|
4026
4036
|
}
|
|
4037
|
+
cleanupRootLevelDuplicates(rootDir);
|
|
4027
4038
|
return result;
|
|
4028
4039
|
}
|
|
4040
|
+
function cleanupRootLevelDuplicates(rootDir) {
|
|
4041
|
+
const claudeOmnify = (0, import_node_path.resolve)(rootDir, ".claude/omnify");
|
|
4042
|
+
const guidesOmnify = (0, import_node_path.resolve)(rootDir, ".claude/omnify/guides/omnify");
|
|
4043
|
+
if (!(0, import_node_fs.existsSync)(guidesOmnify)) return;
|
|
4044
|
+
const filesToCleanup = [
|
|
4045
|
+
"schema-guide.md",
|
|
4046
|
+
"config-guide.md",
|
|
4047
|
+
"typescript-guide.md",
|
|
4048
|
+
"laravel-guide.md",
|
|
4049
|
+
"antdesign-guide.md",
|
|
4050
|
+
"react-form-guide.md",
|
|
4051
|
+
"japan-guide.md"
|
|
4052
|
+
];
|
|
4053
|
+
for (const file of filesToCleanup) {
|
|
4054
|
+
const rootFile = (0, import_node_path.resolve)(claudeOmnify, file);
|
|
4055
|
+
const guidesFile = (0, import_node_path.resolve)(guidesOmnify, file);
|
|
4056
|
+
if ((0, import_node_fs.existsSync)(rootFile) && (0, import_node_fs.existsSync)(guidesFile)) {
|
|
4057
|
+
try {
|
|
4058
|
+
(0, import_node_fs.unlinkSync)(rootFile);
|
|
4059
|
+
} catch {
|
|
4060
|
+
}
|
|
4061
|
+
}
|
|
4062
|
+
}
|
|
4063
|
+
}
|
|
4029
4064
|
function shouldGenerateAIGuides(rootDir) {
|
|
4030
4065
|
const claudeDir = (0, import_node_path.resolve)(rootDir, ".claude/omnify/guides/laravel");
|
|
4031
4066
|
const cursorDir = (0, import_node_path.resolve)(rootDir, ".cursor/rules/omnify");
|