@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.cjs
CHANGED
|
@@ -4048,6 +4048,16 @@ function generateAIGuides(rootDir, options = {}) {
|
|
|
4048
4048
|
cursorRules: 0,
|
|
4049
4049
|
files: []
|
|
4050
4050
|
};
|
|
4051
|
+
const readmeSrcPath = (0, import_node_path.join)(stubsDir, "README.md.stub");
|
|
4052
|
+
if ((0, import_node_fs.existsSync)(readmeSrcPath)) {
|
|
4053
|
+
const readmeDestDir = (0, import_node_path.resolve)(rootDir, ".claude/omnify");
|
|
4054
|
+
if (!(0, import_node_fs.existsSync)(readmeDestDir)) {
|
|
4055
|
+
(0, import_node_fs.mkdirSync)(readmeDestDir, { recursive: true });
|
|
4056
|
+
}
|
|
4057
|
+
const content = (0, import_node_fs.readFileSync)(readmeSrcPath, "utf-8");
|
|
4058
|
+
(0, import_node_fs.writeFileSync)((0, import_node_path.resolve)(readmeDestDir, "README.md"), content);
|
|
4059
|
+
result.files.push((0, import_node_path.resolve)(readmeDestDir, "README.md"));
|
|
4060
|
+
}
|
|
4051
4061
|
const claudeSrcDir = (0, import_node_path.join)(stubsDir, "laravel");
|
|
4052
4062
|
const claudeDestDir = (0, import_node_path.resolve)(rootDir, ".claude/omnify/guides/laravel");
|
|
4053
4063
|
if ((0, import_node_fs.existsSync)(claudeSrcDir)) {
|
|
@@ -4101,8 +4111,33 @@ function generateAIGuides(rootDir, options = {}) {
|
|
|
4101
4111
|
result.cursorRules = files.length;
|
|
4102
4112
|
result.files.push(...files);
|
|
4103
4113
|
}
|
|
4114
|
+
cleanupRootLevelDuplicates(rootDir);
|
|
4104
4115
|
return result;
|
|
4105
4116
|
}
|
|
4117
|
+
function cleanupRootLevelDuplicates(rootDir) {
|
|
4118
|
+
const claudeOmnify = (0, import_node_path.resolve)(rootDir, ".claude/omnify");
|
|
4119
|
+
const guidesOmnify = (0, import_node_path.resolve)(rootDir, ".claude/omnify/guides/omnify");
|
|
4120
|
+
if (!(0, import_node_fs.existsSync)(guidesOmnify)) return;
|
|
4121
|
+
const filesToCleanup = [
|
|
4122
|
+
"schema-guide.md",
|
|
4123
|
+
"config-guide.md",
|
|
4124
|
+
"typescript-guide.md",
|
|
4125
|
+
"laravel-guide.md",
|
|
4126
|
+
"antdesign-guide.md",
|
|
4127
|
+
"react-form-guide.md",
|
|
4128
|
+
"japan-guide.md"
|
|
4129
|
+
];
|
|
4130
|
+
for (const file of filesToCleanup) {
|
|
4131
|
+
const rootFile = (0, import_node_path.resolve)(claudeOmnify, file);
|
|
4132
|
+
const guidesFile = (0, import_node_path.resolve)(guidesOmnify, file);
|
|
4133
|
+
if ((0, import_node_fs.existsSync)(rootFile) && (0, import_node_fs.existsSync)(guidesFile)) {
|
|
4134
|
+
try {
|
|
4135
|
+
(0, import_node_fs.unlinkSync)(rootFile);
|
|
4136
|
+
} catch {
|
|
4137
|
+
}
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
}
|
|
4106
4141
|
function shouldGenerateAIGuides(rootDir) {
|
|
4107
4142
|
const claudeDir = (0, import_node_path.resolve)(rootDir, ".claude/omnify/guides/laravel");
|
|
4108
4143
|
const cursorDir = (0, import_node_path.resolve)(rootDir, ".cursor/rules/omnify");
|