@el-j/magic-helix-plugins 4.0.0-beta.1
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/BasePlugin-6wv0hYJ9.js +97 -0
- package/dist/BasePlugin-odQJAKA-.cjs +1 -0
- package/dist/csharp/index.cjs +18 -0
- package/dist/csharp/index.js +62 -0
- package/dist/go/index.cjs +29 -0
- package/dist/go/index.js +93 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +20 -0
- package/dist/java/index.cjs +23 -0
- package/dist/java/index.js +91 -0
- package/dist/nodejs/index.cjs +67 -0
- package/dist/nodejs/index.js +215 -0
- package/dist/php/index.cjs +18 -0
- package/dist/php/index.js +67 -0
- package/dist/python/index.cjs +30 -0
- package/dist/python/index.js +116 -0
- package/dist/ruby/index.cjs +18 -0
- package/dist/ruby/index.js +59 -0
- package/dist/rust/index.cjs +29 -0
- package/dist/rust/index.js +89 -0
- package/package.json +98 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as s from "node:fs";
|
|
2
|
+
import * as a from "node:path";
|
|
3
|
+
class l {
|
|
4
|
+
// Helper methods for common operations
|
|
5
|
+
/**
|
|
6
|
+
* Check if a file exists in the project
|
|
7
|
+
*/
|
|
8
|
+
fileExists(e, r) {
|
|
9
|
+
return s.existsSync(a.join(e, r));
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Read a file from the project
|
|
13
|
+
*/
|
|
14
|
+
readFile(e, r) {
|
|
15
|
+
try {
|
|
16
|
+
const t = a.join(e, r);
|
|
17
|
+
if (s.existsSync(t))
|
|
18
|
+
return s.readFileSync(t, "utf-8");
|
|
19
|
+
} catch {
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse JSON file from the project
|
|
25
|
+
*/
|
|
26
|
+
readJSON(e, r) {
|
|
27
|
+
try {
|
|
28
|
+
const t = this.readFile(e, r);
|
|
29
|
+
if (t)
|
|
30
|
+
return JSON.parse(t);
|
|
31
|
+
} catch {
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get project name from path
|
|
37
|
+
*/
|
|
38
|
+
getProjectName(e) {
|
|
39
|
+
return a.basename(e);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Load template from file
|
|
43
|
+
*/
|
|
44
|
+
async loadTemplateFromFile(e) {
|
|
45
|
+
try {
|
|
46
|
+
if (s.existsSync(e))
|
|
47
|
+
return s.readFileSync(e, "utf-8");
|
|
48
|
+
} catch {
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a template definition with lazy loading
|
|
54
|
+
*/
|
|
55
|
+
createTemplate(e, r, t, n = {}) {
|
|
56
|
+
return {
|
|
57
|
+
name: e,
|
|
58
|
+
tags: r,
|
|
59
|
+
content: t,
|
|
60
|
+
...n
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Parse dependencies from package-like files
|
|
65
|
+
*/
|
|
66
|
+
parseDependencies(e, ...r) {
|
|
67
|
+
const t = {};
|
|
68
|
+
for (const n of r) {
|
|
69
|
+
const i = e[n];
|
|
70
|
+
i && typeof i == "object" && Object.assign(t, i);
|
|
71
|
+
}
|
|
72
|
+
return t;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Find files matching a pattern
|
|
76
|
+
*/
|
|
77
|
+
async findFiles(e, r) {
|
|
78
|
+
try {
|
|
79
|
+
const { glob: t } = await import("glob");
|
|
80
|
+
return await t(r, {
|
|
81
|
+
cwd: e,
|
|
82
|
+
absolute: !1
|
|
83
|
+
});
|
|
84
|
+
} catch {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Check if any files exist matching a pattern
|
|
90
|
+
*/
|
|
91
|
+
async hasFiles(e, r) {
|
|
92
|
+
return (await this.findFiles(e, r)).length > 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
l as B
|
|
97
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var u=Object.create;var l=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var g=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of y(e))!d.call(r,s)&&s!==t&&l(r,s,{get:()=>e[s],enumerable:!(n=f(e,s))||n.enumerable});return r};var b=(r,e,t)=>(t=r!=null?u(p(r)):{},g(e||!r||!r.__esModule?l(t,"default",{value:r,enumerable:!0}):t,r));const m=require("node:fs"),j=require("node:path");function o(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const c=o(m),i=o(j);class F{fileExists(e,t){return c.existsSync(i.join(e,t))}readFile(e,t){try{const n=i.join(e,t);if(c.existsSync(n))return c.readFileSync(n,"utf-8")}catch{}return null}readJSON(e,t){try{const n=this.readFile(e,t);if(n)return JSON.parse(n)}catch{}return null}getProjectName(e){return i.basename(e)}async loadTemplateFromFile(e){try{if(c.existsSync(e))return c.readFileSync(e,"utf-8")}catch{}return null}createTemplate(e,t,n,s={}){return{name:e,tags:t,content:n,...s}}parseDependencies(e,...t){const n={};for(const s of t){const a=e[s];a&&typeof a=="object"&&Object.assign(n,a)}return n}async findFiles(e,t){try{const{glob:n}=await import("glob");return await n(t,{cwd:e,absolute:!1})}catch{return[]}}async hasFiles(e,t){return(await this.findFiles(e,t)).length>0}}exports.BasePlugin=F;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../BasePlugin-odQJAKA-.cjs");class c extends o.BasePlugin{constructor(){super(...arguments),this.name="csharp",this.displayName="C#",this.version="3.0.0",this.priority=60}async detect(e){const n=await this.findFiles(e,"*.csproj");if(n.length===0)return null;const t=n[0],s=this.readFile(e,t),i={};if(s){const a=s.matchAll(/<PackageReference\s+Include="([^"]+)"(?:\s+Version="([^"]+)")?/g);for(const r of a)i[r[1]]=r[2]||"*"}return{language:"C#",name:t.replace(".csproj",""),dependencies:i,manifestFile:t,projectPath:e}}getTemplates(){return[{name:"csharp-core",tags:["csharp","dotnet"],content:`# C# / .NET Development Guidelines
|
|
2
|
+
|
|
3
|
+
This project uses C# and .NET.
|
|
4
|
+
|
|
5
|
+
## Code Style
|
|
6
|
+
- Follow C# naming conventions
|
|
7
|
+
- Use proper async/await patterns
|
|
8
|
+
- Leverage LINQ where appropriate
|
|
9
|
+
|
|
10
|
+
## Dependencies
|
|
11
|
+
- Manage with NuGet
|
|
12
|
+
- Review package security
|
|
13
|
+
- Keep packages updated
|
|
14
|
+
|
|
15
|
+
## Testing
|
|
16
|
+
- Write xUnit/NUnit tests
|
|
17
|
+
- Use proper assertions
|
|
18
|
+
- Aim for good coverage`}]}getDependencyTagMap(){return{"Microsoft.AspNetCore":"aspnetcore",xunit:"xunit",NUnit:"nunit"}}}exports.CSharpPlugin=c;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { B as o } from "../BasePlugin-6wv0hYJ9.js";
|
|
2
|
+
class l extends o {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.name = "csharp", this.displayName = "C#", this.version = "3.0.0", this.priority = 60;
|
|
5
|
+
}
|
|
6
|
+
async detect(e) {
|
|
7
|
+
const s = await this.findFiles(e, "*.csproj");
|
|
8
|
+
if (s.length === 0)
|
|
9
|
+
return null;
|
|
10
|
+
const t = s[0], n = this.readFile(e, t), r = {};
|
|
11
|
+
if (n) {
|
|
12
|
+
const i = n.matchAll(
|
|
13
|
+
/<PackageReference\s+Include="([^"]+)"(?:\s+Version="([^"]+)")?/g
|
|
14
|
+
);
|
|
15
|
+
for (const a of i)
|
|
16
|
+
r[a[1]] = a[2] || "*";
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
language: "C#",
|
|
20
|
+
name: t.replace(".csproj", ""),
|
|
21
|
+
dependencies: r,
|
|
22
|
+
manifestFile: t,
|
|
23
|
+
projectPath: e
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
getTemplates() {
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
name: "csharp-core",
|
|
30
|
+
tags: ["csharp", "dotnet"],
|
|
31
|
+
content: `# C# / .NET Development Guidelines
|
|
32
|
+
|
|
33
|
+
This project uses C# and .NET.
|
|
34
|
+
|
|
35
|
+
## Code Style
|
|
36
|
+
- Follow C# naming conventions
|
|
37
|
+
- Use proper async/await patterns
|
|
38
|
+
- Leverage LINQ where appropriate
|
|
39
|
+
|
|
40
|
+
## Dependencies
|
|
41
|
+
- Manage with NuGet
|
|
42
|
+
- Review package security
|
|
43
|
+
- Keep packages updated
|
|
44
|
+
|
|
45
|
+
## Testing
|
|
46
|
+
- Write xUnit/NUnit tests
|
|
47
|
+
- Use proper assertions
|
|
48
|
+
- Aim for good coverage`
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
getDependencyTagMap() {
|
|
53
|
+
return {
|
|
54
|
+
"Microsoft.AspNetCore": "aspnetcore",
|
|
55
|
+
xunit: "xunit",
|
|
56
|
+
NUnit: "nunit"
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
l as CSharpPlugin
|
|
62
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../BasePlugin-odQJAKA-.cjs");class l extends g.BasePlugin{constructor(){super(...arguments),this.name="go",this.displayName="Go",this.version="3.0.0",this.priority=90}async detect(t){if(!this.fileExists(t,"go.mod"))return null;const o=this.readFile(t,"go.mod");if(!o)return{language:"Go",name:this.getProjectName(t),dependencies:{},manifestFile:"go.mod",projectPath:t};const r=o.match(/module\s+([^\s\n]+)/),n={},a=o.split(`
|
|
2
|
+
`);let s=!1;for(const i of a){if(i.trim().startsWith("require (")){s=!0;continue}if(s){if(i.trim()===")")break;const e=i.match(/^\s*([^\s]+)\s+v([^\s]+)/);e&&(n[e[1]]=e[2])}else if(i.trim().startsWith("require ")){const e=i.match(/require\s+([^\s]+)\s+v([^\s]+)/);e&&(n[e[1]]=e[2])}}return{language:"Go",name:r?.[1]||this.getProjectName(t),dependencies:n,manifestFile:"go.mod",projectPath:t}}getTemplates(){return[{name:"go-core",tags:["go"],content:this.getGoTemplate()}]}getDependencyTagMap(){return{"github.com/gin-gonic/gin":"gin","github.com/gofiber/fiber":"fiber","github.com/labstack/echo":"echo","gorm.io/gorm":"gorm"}}getGoTemplate(){return`# Go Development Guidelines
|
|
3
|
+
|
|
4
|
+
This project uses Go.
|
|
5
|
+
|
|
6
|
+
## Project Structure
|
|
7
|
+
- Follow standard Go project layout
|
|
8
|
+
- Organize code in packages
|
|
9
|
+
- Use proper module management
|
|
10
|
+
|
|
11
|
+
## Code Style
|
|
12
|
+
- Follow Go conventions and idioms
|
|
13
|
+
- Use \`gofmt\` for formatting
|
|
14
|
+
- Run \`golint\` and \`go vet\`
|
|
15
|
+
|
|
16
|
+
## Error Handling
|
|
17
|
+
- Handle errors explicitly
|
|
18
|
+
- Don't ignore errors
|
|
19
|
+
- Provide meaningful error messages
|
|
20
|
+
|
|
21
|
+
## Testing
|
|
22
|
+
- Write table-driven tests
|
|
23
|
+
- Use \`testing\` package
|
|
24
|
+
- Aim for good test coverage
|
|
25
|
+
|
|
26
|
+
## Dependencies
|
|
27
|
+
- Use Go modules (\`go.mod\`)
|
|
28
|
+
- Keep dependencies minimal
|
|
29
|
+
- Review dependency licenses`}}exports.GoPlugin=l;
|
package/dist/go/index.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { B as g } from "../BasePlugin-6wv0hYJ9.js";
|
|
2
|
+
class l extends g {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.name = "go", this.displayName = "Go", this.version = "3.0.0", this.priority = 90;
|
|
5
|
+
}
|
|
6
|
+
async detect(t) {
|
|
7
|
+
if (!this.fileExists(t, "go.mod"))
|
|
8
|
+
return null;
|
|
9
|
+
const i = this.readFile(t, "go.mod");
|
|
10
|
+
if (!i)
|
|
11
|
+
return {
|
|
12
|
+
language: "Go",
|
|
13
|
+
name: this.getProjectName(t),
|
|
14
|
+
dependencies: {},
|
|
15
|
+
manifestFile: "go.mod",
|
|
16
|
+
projectPath: t
|
|
17
|
+
};
|
|
18
|
+
const r = i.match(/module\s+([^\s\n]+)/), n = {}, a = i.split(`
|
|
19
|
+
`);
|
|
20
|
+
let s = !1;
|
|
21
|
+
for (const o of a) {
|
|
22
|
+
if (o.trim().startsWith("require (")) {
|
|
23
|
+
s = !0;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (s) {
|
|
27
|
+
if (o.trim() === ")") break;
|
|
28
|
+
const e = o.match(/^\s*([^\s]+)\s+v([^\s]+)/);
|
|
29
|
+
e && (n[e[1]] = e[2]);
|
|
30
|
+
} else if (o.trim().startsWith("require ")) {
|
|
31
|
+
const e = o.match(/require\s+([^\s]+)\s+v([^\s]+)/);
|
|
32
|
+
e && (n[e[1]] = e[2]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
language: "Go",
|
|
37
|
+
name: r?.[1] || this.getProjectName(t),
|
|
38
|
+
dependencies: n,
|
|
39
|
+
manifestFile: "go.mod",
|
|
40
|
+
projectPath: t
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
getTemplates() {
|
|
44
|
+
return [
|
|
45
|
+
{
|
|
46
|
+
name: "go-core",
|
|
47
|
+
tags: ["go"],
|
|
48
|
+
content: this.getGoTemplate()
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
getDependencyTagMap() {
|
|
53
|
+
return {
|
|
54
|
+
"github.com/gin-gonic/gin": "gin",
|
|
55
|
+
"github.com/gofiber/fiber": "fiber",
|
|
56
|
+
"github.com/labstack/echo": "echo",
|
|
57
|
+
"gorm.io/gorm": "gorm"
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
getGoTemplate() {
|
|
61
|
+
return `# Go Development Guidelines
|
|
62
|
+
|
|
63
|
+
This project uses Go.
|
|
64
|
+
|
|
65
|
+
## Project Structure
|
|
66
|
+
- Follow standard Go project layout
|
|
67
|
+
- Organize code in packages
|
|
68
|
+
- Use proper module management
|
|
69
|
+
|
|
70
|
+
## Code Style
|
|
71
|
+
- Follow Go conventions and idioms
|
|
72
|
+
- Use \`gofmt\` for formatting
|
|
73
|
+
- Run \`golint\` and \`go vet\`
|
|
74
|
+
|
|
75
|
+
## Error Handling
|
|
76
|
+
- Handle errors explicitly
|
|
77
|
+
- Don't ignore errors
|
|
78
|
+
- Provide meaningful error messages
|
|
79
|
+
|
|
80
|
+
## Testing
|
|
81
|
+
- Write table-driven tests
|
|
82
|
+
- Use \`testing\` package
|
|
83
|
+
- Aim for good test coverage
|
|
84
|
+
|
|
85
|
+
## Dependencies
|
|
86
|
+
- Use Go modules (\`go.mod\`)
|
|
87
|
+
- Keep dependencies minimal
|
|
88
|
+
- Review dependency licenses`;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
l as GoPlugin
|
|
93
|
+
};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./BasePlugin-odQJAKA-.cjs"),e=require("./nodejs/index.cjs"),i=require("./go/index.cjs"),u=require("./python/index.cjs"),r=require("./rust/index.cjs"),P=require("./java/index.cjs"),g=require("./ruby/index.cjs"),l=require("./php/index.cjs"),o=require("./csharp/index.cjs");exports.BasePlugin=n.BasePlugin;exports.NodeJSPlugin=e.NodeJSPlugin;exports.GoPlugin=i.GoPlugin;exports.PythonPlugin=u.PythonPlugin;exports.RustPlugin=r.RustPlugin;exports.JavaPlugin=P.JavaPlugin;exports.RubyPlugin=g.RubyPlugin;exports.PHPPlugin=l.PHPPlugin;exports.CSharpPlugin=o.CSharpPlugin;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { B as P } from "./BasePlugin-6wv0hYJ9.js";
|
|
2
|
+
import { NodeJSPlugin as t } from "./nodejs/index.js";
|
|
3
|
+
import { GoPlugin as n } from "./go/index.js";
|
|
4
|
+
import { PythonPlugin as f } from "./python/index.js";
|
|
5
|
+
import { RustPlugin as i } from "./rust/index.js";
|
|
6
|
+
import { JavaPlugin as m } from "./java/index.js";
|
|
7
|
+
import { RubyPlugin as a } from "./ruby/index.js";
|
|
8
|
+
import { PHPPlugin as h } from "./php/index.js";
|
|
9
|
+
import { CSharpPlugin as B } from "./csharp/index.js";
|
|
10
|
+
export {
|
|
11
|
+
P as BasePlugin,
|
|
12
|
+
B as CSharpPlugin,
|
|
13
|
+
n as GoPlugin,
|
|
14
|
+
m as JavaPlugin,
|
|
15
|
+
t as NodeJSPlugin,
|
|
16
|
+
h as PHPPlugin,
|
|
17
|
+
f as PythonPlugin,
|
|
18
|
+
a as RubyPlugin,
|
|
19
|
+
i as RustPlugin
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../BasePlugin-odQJAKA-.cjs");class l extends o.BasePlugin{constructor(){super(...arguments),this.name="java",this.displayName="Java",this.version="3.0.0",this.priority=75}async detect(e){return this.fileExists(e,"pom.xml")?this.detectMaven(e):this.fileExists(e,"build.gradle")||this.fileExists(e,"build.gradle.kts")?this.detectGradle(e):null}getTemplates(){return[{name:"java-core",tags:["java"],content:`# Java Development Guidelines
|
|
2
|
+
|
|
3
|
+
This project uses Java.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
- Follow Maven/Gradle conventions
|
|
7
|
+
- Organize in packages
|
|
8
|
+
- Use proper dependency management
|
|
9
|
+
|
|
10
|
+
## Code Style
|
|
11
|
+
- Follow Java naming conventions
|
|
12
|
+
- Use Google Java Style or similar
|
|
13
|
+
- Leverage IDE formatting
|
|
14
|
+
|
|
15
|
+
## Best Practices
|
|
16
|
+
- Use appropriate design patterns
|
|
17
|
+
- Handle exceptions properly
|
|
18
|
+
- Write Javadoc for public APIs
|
|
19
|
+
|
|
20
|
+
## Testing
|
|
21
|
+
- Write JUnit tests
|
|
22
|
+
- Use Mockito for mocking
|
|
23
|
+
- Aim for good test coverage`}]}getDependencyTagMap(){return{"org.springframework.boot:spring-boot":"spring-boot","spring-boot-starter":"spring-boot",junit:"junit"}}detectMaven(e){const t=this.readFile(e,"pom.xml");if(!t)return{language:"Java",name:this.getProjectName(e),dependencies:{},manifestFile:"pom.xml",projectPath:e};const n=t.match(/<artifactId>([^<]+)<\/artifactId>/),s=t.match(/<description>([^<]+)<\/description>/),a={},i=t.matchAll(/<dependency>[\s\S]*?<groupId>([^<]+)<\/groupId>[\s\S]*?<artifactId>([^<]+)<\/artifactId>[\s\S]*?(?:<version>([^<]+)<\/version>)?/g);for(const r of i)a[`${r[1]}:${r[2]}`]=r[3]||"*";return{language:"Java",name:n?.[1]||this.getProjectName(e),description:s?.[1],dependencies:a,manifestFile:"pom.xml",projectPath:e}}detectGradle(e){const t=this.fileExists(e,"build.gradle")?"build.gradle":"build.gradle.kts",n=this.readFile(e,t),s={};if(n){const a=n.matchAll(/(?:implementation|api|testImplementation)\s*['"]([^:'"]+):([^:'"]+):?([^'"]*)['"]/g);for(const i of a)s[`${i[1]}:${i[2]}`]=i[3]||"*"}return{language:"Java/Kotlin",name:this.getProjectName(e),dependencies:s,manifestFile:t,projectPath:e}}}exports.JavaPlugin=l;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { B as o } from "../BasePlugin-6wv0hYJ9.js";
|
|
2
|
+
class d extends o {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.name = "java", this.displayName = "Java", this.version = "3.0.0", this.priority = 75;
|
|
5
|
+
}
|
|
6
|
+
async detect(e) {
|
|
7
|
+
return this.fileExists(e, "pom.xml") ? this.detectMaven(e) : this.fileExists(e, "build.gradle") || this.fileExists(e, "build.gradle.kts") ? this.detectGradle(e) : null;
|
|
8
|
+
}
|
|
9
|
+
getTemplates() {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
name: "java-core",
|
|
13
|
+
tags: ["java"],
|
|
14
|
+
content: `# Java Development Guidelines
|
|
15
|
+
|
|
16
|
+
This project uses Java.
|
|
17
|
+
|
|
18
|
+
## Project Structure
|
|
19
|
+
- Follow Maven/Gradle conventions
|
|
20
|
+
- Organize in packages
|
|
21
|
+
- Use proper dependency management
|
|
22
|
+
|
|
23
|
+
## Code Style
|
|
24
|
+
- Follow Java naming conventions
|
|
25
|
+
- Use Google Java Style or similar
|
|
26
|
+
- Leverage IDE formatting
|
|
27
|
+
|
|
28
|
+
## Best Practices
|
|
29
|
+
- Use appropriate design patterns
|
|
30
|
+
- Handle exceptions properly
|
|
31
|
+
- Write Javadoc for public APIs
|
|
32
|
+
|
|
33
|
+
## Testing
|
|
34
|
+
- Write JUnit tests
|
|
35
|
+
- Use Mockito for mocking
|
|
36
|
+
- Aim for good test coverage`
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
getDependencyTagMap() {
|
|
41
|
+
return {
|
|
42
|
+
"org.springframework.boot:spring-boot": "spring-boot",
|
|
43
|
+
"spring-boot-starter": "spring-boot",
|
|
44
|
+
junit: "junit"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
detectMaven(e) {
|
|
48
|
+
const t = this.readFile(e, "pom.xml");
|
|
49
|
+
if (!t)
|
|
50
|
+
return {
|
|
51
|
+
language: "Java",
|
|
52
|
+
name: this.getProjectName(e),
|
|
53
|
+
dependencies: {},
|
|
54
|
+
manifestFile: "pom.xml",
|
|
55
|
+
projectPath: e
|
|
56
|
+
};
|
|
57
|
+
const n = t.match(/<artifactId>([^<]+)<\/artifactId>/), s = t.match(/<description>([^<]+)<\/description>/), a = {}, i = t.matchAll(
|
|
58
|
+
/<dependency>[\s\S]*?<groupId>([^<]+)<\/groupId>[\s\S]*?<artifactId>([^<]+)<\/artifactId>[\s\S]*?(?:<version>([^<]+)<\/version>)?/g
|
|
59
|
+
);
|
|
60
|
+
for (const r of i)
|
|
61
|
+
a[`${r[1]}:${r[2]}`] = r[3] || "*";
|
|
62
|
+
return {
|
|
63
|
+
language: "Java",
|
|
64
|
+
name: n?.[1] || this.getProjectName(e),
|
|
65
|
+
description: s?.[1],
|
|
66
|
+
dependencies: a,
|
|
67
|
+
manifestFile: "pom.xml",
|
|
68
|
+
projectPath: e
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
detectGradle(e) {
|
|
72
|
+
const t = this.fileExists(e, "build.gradle") ? "build.gradle" : "build.gradle.kts", n = this.readFile(e, t), s = {};
|
|
73
|
+
if (n) {
|
|
74
|
+
const a = n.matchAll(
|
|
75
|
+
/(?:implementation|api|testImplementation)\s*['"]([^:'"]+):([^:'"]+):?([^'"]*)['"]/g
|
|
76
|
+
);
|
|
77
|
+
for (const i of a)
|
|
78
|
+
s[`${i[1]}:${i[2]}`] = i[3] || "*";
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
language: "Java/Kotlin",
|
|
82
|
+
name: this.getProjectName(e),
|
|
83
|
+
dependencies: s,
|
|
84
|
+
manifestFile: t,
|
|
85
|
+
projectPath: e
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
d as JavaPlugin
|
|
91
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("node:path"),c=require("../BasePlugin-odQJAKA-.cjs");function p(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const s=p(o);class l extends c.BasePlugin{constructor(){super(...arguments),this.name="nodejs",this.displayName="Node.js",this.version="3.0.0",this.priority=100}async detect(e){if(!this.fileExists(e,"package.json"))return null;const t=this.readJSON(e,"package.json");if(!t)return{language:"JavaScript/TypeScript",name:this.getProjectName(e),dependencies:{},manifestFile:"package.json",projectPath:e};const a=this.parseDependencies(t,"dependencies","devDependencies"),i={language:"JavaScript/TypeScript",name:t.name||this.getProjectName(e),description:t.description,dependencies:a,manifestFile:"package.json",projectPath:e},r=this.extractWorkspaces(t);return r.length>0&&(i.workspaceMembers=r),i}getTemplates(){return[{name:"lang-typescript",tags:["typescript"],content:()=>this.loadTemplateFromFile(s.join(__dirname,"templates/lang-typescript.md")).then(e=>e||this.getTypescriptTemplate())},{name:"react-core",tags:["react"],content:()=>this.loadTemplateFromFile(s.join(__dirname,"templates/react-core.md")).then(e=>e||this.getReactTemplate())},{name:"react-zustand",tags:["zustand"],content:()=>this.loadTemplateFromFile(s.join(__dirname,"templates/react-zustand.md")).then(e=>e||this.getReactZustandTemplate())},{name:"vue-core",tags:["vue"],content:()=>this.loadTemplateFromFile(s.join(__dirname,"templates/vue-core.md")).then(e=>e||this.getVueTemplate())},{name:"vue-pinia",tags:["pinia"],content:()=>this.loadTemplateFromFile(s.join(__dirname,"templates/vue-pinia.md")).then(e=>e||this.getVuePiniaTemplate())},{name:"nestjs-core",tags:["nestjs"],content:()=>this.loadTemplateFromFile(s.join(__dirname,"templates/nestjs-core.md")).then(e=>e||this.getNestJSTemplate())},{name:"style-tailwind",tags:["tailwind"],content:()=>this.loadTemplateFromFile(s.join(__dirname,"templates/style-tailwind.md")).then(e=>e||this.getTailwindTemplate())},{name:"test-vitest",tags:["vitest"],content:()=>this.loadTemplateFromFile(s.join(__dirname,"templates/test-vitest.md")).then(e=>e||this.getVitestTemplate())}]}getDependencyTagMap(){return{react:"react","react-dom":"react",vue:"vue","@vue/runtime-core":"vue",pinia:"pinia","@nestjs/core":"nestjs",tailwindcss:"tailwind",vitest:"vitest",zustand:"zustand",typescript:"typescript"}}getConfigFileTagMap(){return{"tailwind.config.js":"tailwind","tailwind.config.ts":"tailwind","vitest.config.js":"vitest","vitest.config.ts":"vitest","tsconfig.json":"typescript"}}extractWorkspaces(e){return e.workspaces?(Array.isArray(e.workspaces)?e.workspaces:e.workspaces.packages||[]).map(a=>a.replace(/\/\*$/,"")):[]}getTypescriptTemplate(){return`# TypeScript Guidelines
|
|
2
|
+
|
|
3
|
+
This project uses TypeScript for type safety.
|
|
4
|
+
|
|
5
|
+
## Type Safety
|
|
6
|
+
- Use strict type checking
|
|
7
|
+
- Avoid \`any\` types
|
|
8
|
+
- Prefer interfaces over types for objects
|
|
9
|
+
|
|
10
|
+
## Best Practices
|
|
11
|
+
- Enable all strict compiler options
|
|
12
|
+
- Use proper type inference
|
|
13
|
+
- Leverage utility types`}getReactTemplate(){return`# React Development Guidelines
|
|
14
|
+
|
|
15
|
+
This project uses React.
|
|
16
|
+
|
|
17
|
+
## Component Structure
|
|
18
|
+
- Use functional components with hooks
|
|
19
|
+
- Keep components focused and reusable
|
|
20
|
+
- Follow React best practices
|
|
21
|
+
|
|
22
|
+
## State Management
|
|
23
|
+
- Use appropriate state management for complexity
|
|
24
|
+
- Consider component composition
|
|
25
|
+
- Leverage React context when needed`}getReactZustandTemplate(){return`# Zustand State Management
|
|
26
|
+
|
|
27
|
+
This project uses Zustand for state management.
|
|
28
|
+
|
|
29
|
+
## Store Structure
|
|
30
|
+
- Create focused, modular stores
|
|
31
|
+
- Use selectors to prevent unnecessary re-renders
|
|
32
|
+
- Follow Zustand best practices`}getVueTemplate(){return`# Vue.js Development Guidelines
|
|
33
|
+
|
|
34
|
+
This project uses Vue.js.
|
|
35
|
+
|
|
36
|
+
## Component Structure
|
|
37
|
+
- Use Composition API
|
|
38
|
+
- Follow Vue.js style guide
|
|
39
|
+
- Keep components composable and reusable`}getVuePiniaTemplate(){return`# Pinia State Management
|
|
40
|
+
|
|
41
|
+
This project uses Pinia for state management.
|
|
42
|
+
|
|
43
|
+
## Store Structure
|
|
44
|
+
- Create modular stores
|
|
45
|
+
- Use composition stores pattern
|
|
46
|
+
- Follow Pinia best practices`}getNestJSTemplate(){return`# NestJS Development Guidelines
|
|
47
|
+
|
|
48
|
+
This project uses NestJS framework.
|
|
49
|
+
|
|
50
|
+
## Architecture
|
|
51
|
+
- Follow modular architecture
|
|
52
|
+
- Use dependency injection
|
|
53
|
+
- Implement proper error handling`}getTailwindTemplate(){return`# Tailwind CSS Guidelines
|
|
54
|
+
|
|
55
|
+
This project uses Tailwind CSS.
|
|
56
|
+
|
|
57
|
+
## Styling Approach
|
|
58
|
+
- Use utility-first classes
|
|
59
|
+
- Create reusable components
|
|
60
|
+
- Follow Tailwind best practices`}getVitestTemplate(){return`# Vitest Testing Guidelines
|
|
61
|
+
|
|
62
|
+
This project uses Vitest for testing.
|
|
63
|
+
|
|
64
|
+
## Testing Strategy
|
|
65
|
+
- Write unit tests for utilities
|
|
66
|
+
- Use component testing
|
|
67
|
+
- Follow testing best practices`}}exports.NodeJSPlugin=l;
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import * as t from "node:path";
|
|
2
|
+
import { B as r } from "../BasePlugin-6wv0hYJ9.js";
|
|
3
|
+
class c extends r {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments), this.name = "nodejs", this.displayName = "Node.js", this.version = "3.0.0", this.priority = 100;
|
|
6
|
+
}
|
|
7
|
+
// High priority - very common
|
|
8
|
+
async detect(e) {
|
|
9
|
+
if (!this.fileExists(e, "package.json"))
|
|
10
|
+
return null;
|
|
11
|
+
const s = this.readJSON(e, "package.json");
|
|
12
|
+
if (!s)
|
|
13
|
+
return {
|
|
14
|
+
language: "JavaScript/TypeScript",
|
|
15
|
+
name: this.getProjectName(e),
|
|
16
|
+
dependencies: {},
|
|
17
|
+
manifestFile: "package.json",
|
|
18
|
+
projectPath: e
|
|
19
|
+
};
|
|
20
|
+
const a = this.parseDependencies(
|
|
21
|
+
s,
|
|
22
|
+
"dependencies",
|
|
23
|
+
"devDependencies"
|
|
24
|
+
), n = {
|
|
25
|
+
language: "JavaScript/TypeScript",
|
|
26
|
+
name: s.name || this.getProjectName(e),
|
|
27
|
+
description: s.description,
|
|
28
|
+
dependencies: a,
|
|
29
|
+
manifestFile: "package.json",
|
|
30
|
+
projectPath: e
|
|
31
|
+
}, i = this.extractWorkspaces(s);
|
|
32
|
+
return i.length > 0 && (n.workspaceMembers = i), n;
|
|
33
|
+
}
|
|
34
|
+
getTemplates() {
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
name: "lang-typescript",
|
|
38
|
+
tags: ["typescript"],
|
|
39
|
+
content: () => this.loadTemplateFromFile(
|
|
40
|
+
t.join(__dirname, "templates/lang-typescript.md")
|
|
41
|
+
).then((e) => e || this.getTypescriptTemplate())
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "react-core",
|
|
45
|
+
tags: ["react"],
|
|
46
|
+
content: () => this.loadTemplateFromFile(
|
|
47
|
+
t.join(__dirname, "templates/react-core.md")
|
|
48
|
+
).then((e) => e || this.getReactTemplate())
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "react-zustand",
|
|
52
|
+
tags: ["zustand"],
|
|
53
|
+
content: () => this.loadTemplateFromFile(
|
|
54
|
+
t.join(__dirname, "templates/react-zustand.md")
|
|
55
|
+
).then((e) => e || this.getReactZustandTemplate())
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "vue-core",
|
|
59
|
+
tags: ["vue"],
|
|
60
|
+
content: () => this.loadTemplateFromFile(
|
|
61
|
+
t.join(__dirname, "templates/vue-core.md")
|
|
62
|
+
).then((e) => e || this.getVueTemplate())
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "vue-pinia",
|
|
66
|
+
tags: ["pinia"],
|
|
67
|
+
content: () => this.loadTemplateFromFile(
|
|
68
|
+
t.join(__dirname, "templates/vue-pinia.md")
|
|
69
|
+
).then((e) => e || this.getVuePiniaTemplate())
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "nestjs-core",
|
|
73
|
+
tags: ["nestjs"],
|
|
74
|
+
content: () => this.loadTemplateFromFile(
|
|
75
|
+
t.join(__dirname, "templates/nestjs-core.md")
|
|
76
|
+
).then((e) => e || this.getNestJSTemplate())
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "style-tailwind",
|
|
80
|
+
tags: ["tailwind"],
|
|
81
|
+
content: () => this.loadTemplateFromFile(
|
|
82
|
+
t.join(__dirname, "templates/style-tailwind.md")
|
|
83
|
+
).then((e) => e || this.getTailwindTemplate())
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "test-vitest",
|
|
87
|
+
tags: ["vitest"],
|
|
88
|
+
content: () => this.loadTemplateFromFile(
|
|
89
|
+
t.join(__dirname, "templates/test-vitest.md")
|
|
90
|
+
).then((e) => e || this.getVitestTemplate())
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
getDependencyTagMap() {
|
|
95
|
+
return {
|
|
96
|
+
react: "react",
|
|
97
|
+
"react-dom": "react",
|
|
98
|
+
vue: "vue",
|
|
99
|
+
"@vue/runtime-core": "vue",
|
|
100
|
+
pinia: "pinia",
|
|
101
|
+
"@nestjs/core": "nestjs",
|
|
102
|
+
tailwindcss: "tailwind",
|
|
103
|
+
vitest: "vitest",
|
|
104
|
+
zustand: "zustand",
|
|
105
|
+
typescript: "typescript"
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
getConfigFileTagMap() {
|
|
109
|
+
return {
|
|
110
|
+
"tailwind.config.js": "tailwind",
|
|
111
|
+
"tailwind.config.ts": "tailwind",
|
|
112
|
+
"vitest.config.js": "vitest",
|
|
113
|
+
"vitest.config.ts": "vitest",
|
|
114
|
+
"tsconfig.json": "typescript"
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
// Private helper methods
|
|
118
|
+
extractWorkspaces(e) {
|
|
119
|
+
return e.workspaces ? (Array.isArray(e.workspaces) ? e.workspaces : e.workspaces.packages || []).map((a) => a.replace(/\/\*$/, "")) : [];
|
|
120
|
+
}
|
|
121
|
+
// Fallback template content (if files don't exist)
|
|
122
|
+
getTypescriptTemplate() {
|
|
123
|
+
return `# TypeScript Guidelines
|
|
124
|
+
|
|
125
|
+
This project uses TypeScript for type safety.
|
|
126
|
+
|
|
127
|
+
## Type Safety
|
|
128
|
+
- Use strict type checking
|
|
129
|
+
- Avoid \`any\` types
|
|
130
|
+
- Prefer interfaces over types for objects
|
|
131
|
+
|
|
132
|
+
## Best Practices
|
|
133
|
+
- Enable all strict compiler options
|
|
134
|
+
- Use proper type inference
|
|
135
|
+
- Leverage utility types`;
|
|
136
|
+
}
|
|
137
|
+
getReactTemplate() {
|
|
138
|
+
return `# React Development Guidelines
|
|
139
|
+
|
|
140
|
+
This project uses React.
|
|
141
|
+
|
|
142
|
+
## Component Structure
|
|
143
|
+
- Use functional components with hooks
|
|
144
|
+
- Keep components focused and reusable
|
|
145
|
+
- Follow React best practices
|
|
146
|
+
|
|
147
|
+
## State Management
|
|
148
|
+
- Use appropriate state management for complexity
|
|
149
|
+
- Consider component composition
|
|
150
|
+
- Leverage React context when needed`;
|
|
151
|
+
}
|
|
152
|
+
getReactZustandTemplate() {
|
|
153
|
+
return `# Zustand State Management
|
|
154
|
+
|
|
155
|
+
This project uses Zustand for state management.
|
|
156
|
+
|
|
157
|
+
## Store Structure
|
|
158
|
+
- Create focused, modular stores
|
|
159
|
+
- Use selectors to prevent unnecessary re-renders
|
|
160
|
+
- Follow Zustand best practices`;
|
|
161
|
+
}
|
|
162
|
+
getVueTemplate() {
|
|
163
|
+
return `# Vue.js Development Guidelines
|
|
164
|
+
|
|
165
|
+
This project uses Vue.js.
|
|
166
|
+
|
|
167
|
+
## Component Structure
|
|
168
|
+
- Use Composition API
|
|
169
|
+
- Follow Vue.js style guide
|
|
170
|
+
- Keep components composable and reusable`;
|
|
171
|
+
}
|
|
172
|
+
getVuePiniaTemplate() {
|
|
173
|
+
return `# Pinia State Management
|
|
174
|
+
|
|
175
|
+
This project uses Pinia for state management.
|
|
176
|
+
|
|
177
|
+
## Store Structure
|
|
178
|
+
- Create modular stores
|
|
179
|
+
- Use composition stores pattern
|
|
180
|
+
- Follow Pinia best practices`;
|
|
181
|
+
}
|
|
182
|
+
getNestJSTemplate() {
|
|
183
|
+
return `# NestJS Development Guidelines
|
|
184
|
+
|
|
185
|
+
This project uses NestJS framework.
|
|
186
|
+
|
|
187
|
+
## Architecture
|
|
188
|
+
- Follow modular architecture
|
|
189
|
+
- Use dependency injection
|
|
190
|
+
- Implement proper error handling`;
|
|
191
|
+
}
|
|
192
|
+
getTailwindTemplate() {
|
|
193
|
+
return `# Tailwind CSS Guidelines
|
|
194
|
+
|
|
195
|
+
This project uses Tailwind CSS.
|
|
196
|
+
|
|
197
|
+
## Styling Approach
|
|
198
|
+
- Use utility-first classes
|
|
199
|
+
- Create reusable components
|
|
200
|
+
- Follow Tailwind best practices`;
|
|
201
|
+
}
|
|
202
|
+
getVitestTemplate() {
|
|
203
|
+
return `# Vitest Testing Guidelines
|
|
204
|
+
|
|
205
|
+
This project uses Vitest for testing.
|
|
206
|
+
|
|
207
|
+
## Testing Strategy
|
|
208
|
+
- Write unit tests for utilities
|
|
209
|
+
- Use component testing
|
|
210
|
+
- Follow testing best practices`;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
export {
|
|
214
|
+
c as NodeJSPlugin
|
|
215
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../BasePlugin-odQJAKA-.cjs");class t extends i.BasePlugin{constructor(){super(...arguments),this.name="php",this.displayName="PHP",this.version="3.0.0",this.priority=65}async detect(e){if(!this.fileExists(e,"composer.json"))return null;const s=this.readJSON(e,"composer.json");if(!s)return{language:"PHP",name:this.getProjectName(e),dependencies:{},manifestFile:"composer.json",projectPath:e};const n={...s.require,...s["require-dev"]};return{language:"PHP",name:s.name||this.getProjectName(e),description:s.description,dependencies:n,manifestFile:"composer.json",projectPath:e}}getTemplates(){return[{name:"php-core",tags:["php"],content:`# PHP Development Guidelines
|
|
2
|
+
|
|
3
|
+
This project uses PHP.
|
|
4
|
+
|
|
5
|
+
## Code Style
|
|
6
|
+
- Follow PSR-12 coding standard
|
|
7
|
+
- Use PHP-CS-Fixer
|
|
8
|
+
- Type hint where possible
|
|
9
|
+
|
|
10
|
+
## Dependencies
|
|
11
|
+
- Manage with Composer
|
|
12
|
+
- Keep composer.lock committed
|
|
13
|
+
- Review package security
|
|
14
|
+
|
|
15
|
+
## Testing
|
|
16
|
+
- Write PHPUnit tests
|
|
17
|
+
- Use proper assertions
|
|
18
|
+
- Aim for good coverage`}]}getDependencyTagMap(){return{"laravel/framework":"laravel","symfony/symfony":"symfony","phpunit/phpunit":"phpunit"}}}exports.PHPPlugin=t;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { B as i } from "../BasePlugin-6wv0hYJ9.js";
|
|
2
|
+
class t extends i {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.name = "php", this.displayName = "PHP", this.version = "3.0.0", this.priority = 65;
|
|
5
|
+
}
|
|
6
|
+
async detect(e) {
|
|
7
|
+
if (!this.fileExists(e, "composer.json"))
|
|
8
|
+
return null;
|
|
9
|
+
const s = this.readJSON(e, "composer.json");
|
|
10
|
+
if (!s)
|
|
11
|
+
return {
|
|
12
|
+
language: "PHP",
|
|
13
|
+
name: this.getProjectName(e),
|
|
14
|
+
dependencies: {},
|
|
15
|
+
manifestFile: "composer.json",
|
|
16
|
+
projectPath: e
|
|
17
|
+
};
|
|
18
|
+
const n = {
|
|
19
|
+
...s.require,
|
|
20
|
+
...s["require-dev"]
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
language: "PHP",
|
|
24
|
+
name: s.name || this.getProjectName(e),
|
|
25
|
+
description: s.description,
|
|
26
|
+
dependencies: n,
|
|
27
|
+
manifestFile: "composer.json",
|
|
28
|
+
projectPath: e
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
getTemplates() {
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
name: "php-core",
|
|
35
|
+
tags: ["php"],
|
|
36
|
+
content: `# PHP Development Guidelines
|
|
37
|
+
|
|
38
|
+
This project uses PHP.
|
|
39
|
+
|
|
40
|
+
## Code Style
|
|
41
|
+
- Follow PSR-12 coding standard
|
|
42
|
+
- Use PHP-CS-Fixer
|
|
43
|
+
- Type hint where possible
|
|
44
|
+
|
|
45
|
+
## Dependencies
|
|
46
|
+
- Manage with Composer
|
|
47
|
+
- Keep composer.lock committed
|
|
48
|
+
- Review package security
|
|
49
|
+
|
|
50
|
+
## Testing
|
|
51
|
+
- Write PHPUnit tests
|
|
52
|
+
- Use proper assertions
|
|
53
|
+
- Aim for good coverage`
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
getDependencyTagMap() {
|
|
58
|
+
return {
|
|
59
|
+
"laravel/framework": "laravel",
|
|
60
|
+
"symfony/symfony": "symfony",
|
|
61
|
+
"phpunit/phpunit": "phpunit"
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
t as PHPPlugin
|
|
67
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../BasePlugin-odQJAKA-.cjs");class l extends p.BasePlugin{constructor(){super(...arguments),this.name="python",this.displayName="Python",this.version="3.0.0",this.priority=85}async detect(e){return this.fileExists(e,"pyproject.toml")?this.detectFromPyproject(e):this.fileExists(e,"requirements.txt")?this.detectFromRequirements(e):this.fileExists(e,"setup.py")?{language:"Python",name:this.getProjectName(e),dependencies:{},manifestFile:"setup.py",projectPath:e}:null}getTemplates(){return[{name:"python-core",tags:["python"],content:this.getPythonTemplate()}]}getDependencyTagMap(){return{django:"django",flask:"flask",fastapi:"fastapi",pytest:"pytest",numpy:"numpy",pandas:"pandas"}}detectFromPyproject(e){const t=this.readFile(e,"pyproject.toml");if(!t)return{language:"Python",name:this.getProjectName(e),dependencies:{},manifestFile:"pyproject.toml",projectPath:e};const o=t.match(/name\s*=\s*["']([^"']+)["']/),n=t.match(/description\s*=\s*["']([^"']+)["']/),s={},i=t.match(/\[tool\.poetry\.dependencies\]([\s\S]*?)(?:\n\[|$)/);if(i){const a=i[1].split(`
|
|
2
|
+
`);for(const c of a){const r=c.match(/^([a-zA-Z0-9_-]+)\s*=\s*["']([^"']+)["']/);r&&r[1]!=="python"&&(s[r[1]]=r[2])}}return{language:"Python",name:o?.[1]||this.getProjectName(e),description:n?.[1],dependencies:s,manifestFile:"pyproject.toml",projectPath:e}}detectFromRequirements(e){const t=this.readFile(e,"requirements.txt"),o={};if(t){for(const n of t.split(`
|
|
3
|
+
`))if(n.trim()&&!n.startsWith("#")){const s=n.split(/[=<>]/),i=s[0].trim(),a=s[1]?.trim()||"*";i&&(o[i]=a)}}return{language:"Python",name:this.getProjectName(e),dependencies:o,manifestFile:"requirements.txt",projectPath:e}}getPythonTemplate(){return`# Python Development Guidelines
|
|
4
|
+
|
|
5
|
+
This project uses Python.
|
|
6
|
+
|
|
7
|
+
## Project Structure
|
|
8
|
+
- Follow PEP 8 style guide
|
|
9
|
+
- Organize code in packages/modules
|
|
10
|
+
- Use virtual environments
|
|
11
|
+
|
|
12
|
+
## Code Style
|
|
13
|
+
- Use type hints where appropriate
|
|
14
|
+
- Follow naming conventions
|
|
15
|
+
- Write docstrings for functions and classes
|
|
16
|
+
|
|
17
|
+
## Dependencies
|
|
18
|
+
- Manage with pip/Poetry/conda
|
|
19
|
+
- Keep requirements.txt or pyproject.toml updated
|
|
20
|
+
- Pin dependency versions
|
|
21
|
+
|
|
22
|
+
## Testing
|
|
23
|
+
- Write tests with pytest
|
|
24
|
+
- Use fixtures for setup/teardown
|
|
25
|
+
- Aim for good test coverage
|
|
26
|
+
|
|
27
|
+
## Best Practices
|
|
28
|
+
- Handle exceptions properly
|
|
29
|
+
- Use context managers for resources
|
|
30
|
+
- Follow Pythonic idioms`}}exports.PythonPlugin=l;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { B as p } from "../BasePlugin-6wv0hYJ9.js";
|
|
2
|
+
class d extends p {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.name = "python", this.displayName = "Python", this.version = "3.0.0", this.priority = 85;
|
|
5
|
+
}
|
|
6
|
+
async detect(e) {
|
|
7
|
+
return this.fileExists(e, "pyproject.toml") ? this.detectFromPyproject(e) : this.fileExists(e, "requirements.txt") ? this.detectFromRequirements(e) : this.fileExists(e, "setup.py") ? {
|
|
8
|
+
language: "Python",
|
|
9
|
+
name: this.getProjectName(e),
|
|
10
|
+
dependencies: {},
|
|
11
|
+
manifestFile: "setup.py",
|
|
12
|
+
projectPath: e
|
|
13
|
+
} : null;
|
|
14
|
+
}
|
|
15
|
+
getTemplates() {
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
name: "python-core",
|
|
19
|
+
tags: ["python"],
|
|
20
|
+
content: this.getPythonTemplate()
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
getDependencyTagMap() {
|
|
25
|
+
return {
|
|
26
|
+
django: "django",
|
|
27
|
+
flask: "flask",
|
|
28
|
+
fastapi: "fastapi",
|
|
29
|
+
pytest: "pytest",
|
|
30
|
+
numpy: "numpy",
|
|
31
|
+
pandas: "pandas"
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
// Private helper methods
|
|
35
|
+
detectFromPyproject(e) {
|
|
36
|
+
const t = this.readFile(e, "pyproject.toml");
|
|
37
|
+
if (!t)
|
|
38
|
+
return {
|
|
39
|
+
language: "Python",
|
|
40
|
+
name: this.getProjectName(e),
|
|
41
|
+
dependencies: {},
|
|
42
|
+
manifestFile: "pyproject.toml",
|
|
43
|
+
projectPath: e
|
|
44
|
+
};
|
|
45
|
+
const o = t.match(/name\s*=\s*["']([^"']+)["']/), n = t.match(/description\s*=\s*["']([^"']+)["']/), s = {}, i = t.match(
|
|
46
|
+
/\[tool\.poetry\.dependencies\]([\s\S]*?)(?:\n\[|$)/
|
|
47
|
+
);
|
|
48
|
+
if (i) {
|
|
49
|
+
const a = i[1].split(`
|
|
50
|
+
`);
|
|
51
|
+
for (const c of a) {
|
|
52
|
+
const r = c.match(/^([a-zA-Z0-9_-]+)\s*=\s*["']([^"']+)["']/);
|
|
53
|
+
r && r[1] !== "python" && (s[r[1]] = r[2]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
language: "Python",
|
|
58
|
+
name: o?.[1] || this.getProjectName(e),
|
|
59
|
+
description: n?.[1],
|
|
60
|
+
dependencies: s,
|
|
61
|
+
manifestFile: "pyproject.toml",
|
|
62
|
+
projectPath: e
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
detectFromRequirements(e) {
|
|
66
|
+
const t = this.readFile(e, "requirements.txt"), o = {};
|
|
67
|
+
if (t) {
|
|
68
|
+
for (const n of t.split(`
|
|
69
|
+
`))
|
|
70
|
+
if (n.trim() && !n.startsWith("#")) {
|
|
71
|
+
const s = n.split(/[=<>]/), i = s[0].trim(), a = s[1]?.trim() || "*";
|
|
72
|
+
i && (o[i] = a);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
language: "Python",
|
|
77
|
+
name: this.getProjectName(e),
|
|
78
|
+
dependencies: o,
|
|
79
|
+
manifestFile: "requirements.txt",
|
|
80
|
+
projectPath: e
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
getPythonTemplate() {
|
|
84
|
+
return `# Python Development Guidelines
|
|
85
|
+
|
|
86
|
+
This project uses Python.
|
|
87
|
+
|
|
88
|
+
## Project Structure
|
|
89
|
+
- Follow PEP 8 style guide
|
|
90
|
+
- Organize code in packages/modules
|
|
91
|
+
- Use virtual environments
|
|
92
|
+
|
|
93
|
+
## Code Style
|
|
94
|
+
- Use type hints where appropriate
|
|
95
|
+
- Follow naming conventions
|
|
96
|
+
- Write docstrings for functions and classes
|
|
97
|
+
|
|
98
|
+
## Dependencies
|
|
99
|
+
- Manage with pip/Poetry/conda
|
|
100
|
+
- Keep requirements.txt or pyproject.toml updated
|
|
101
|
+
- Pin dependency versions
|
|
102
|
+
|
|
103
|
+
## Testing
|
|
104
|
+
- Write tests with pytest
|
|
105
|
+
- Use fixtures for setup/teardown
|
|
106
|
+
- Aim for good test coverage
|
|
107
|
+
|
|
108
|
+
## Best Practices
|
|
109
|
+
- Handle exceptions properly
|
|
110
|
+
- Use context managers for resources
|
|
111
|
+
- Follow Pythonic idioms`;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
d as PythonPlugin
|
|
116
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../BasePlugin-odQJAKA-.cjs");class u extends r.BasePlugin{constructor(){super(...arguments),this.name="ruby",this.displayName="Ruby",this.version="3.0.0",this.priority=70}async detect(e){if(!this.fileExists(e,"Gemfile"))return null;const t=this.readFile(e,"Gemfile"),i={};if(t){const n=t.matchAll(/gem\s+['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])?/g);for(const s of n)i[s[1]]=s[2]||"*"}return{language:"Ruby",name:this.getProjectName(e),dependencies:i,manifestFile:"Gemfile",projectPath:e}}getTemplates(){return[{name:"ruby-core",tags:["ruby"],content:`# Ruby Development Guidelines
|
|
2
|
+
|
|
3
|
+
This project uses Ruby.
|
|
4
|
+
|
|
5
|
+
## Code Style
|
|
6
|
+
- Follow Ruby style guide
|
|
7
|
+
- Use Rubocop for linting
|
|
8
|
+
- Keep code idiomatic
|
|
9
|
+
|
|
10
|
+
## Dependencies
|
|
11
|
+
- Manage with Bundler
|
|
12
|
+
- Keep Gemfile.lock committed
|
|
13
|
+
- Review gem security
|
|
14
|
+
|
|
15
|
+
## Testing
|
|
16
|
+
- Write tests with RSpec/Minitest
|
|
17
|
+
- Use fixtures and factories
|
|
18
|
+
- Aim for good coverage`}]}getDependencyTagMap(){return{rails:"rails",rspec:"rspec",sinatra:"sinatra"}}}exports.RubyPlugin=u;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { B as r } from "../BasePlugin-6wv0hYJ9.js";
|
|
2
|
+
class c extends r {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.name = "ruby", this.displayName = "Ruby", this.version = "3.0.0", this.priority = 70;
|
|
5
|
+
}
|
|
6
|
+
async detect(e) {
|
|
7
|
+
if (!this.fileExists(e, "Gemfile"))
|
|
8
|
+
return null;
|
|
9
|
+
const t = this.readFile(e, "Gemfile"), s = {};
|
|
10
|
+
if (t) {
|
|
11
|
+
const n = t.matchAll(/gem\s+['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])?/g);
|
|
12
|
+
for (const i of n)
|
|
13
|
+
s[i[1]] = i[2] || "*";
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
language: "Ruby",
|
|
17
|
+
name: this.getProjectName(e),
|
|
18
|
+
dependencies: s,
|
|
19
|
+
manifestFile: "Gemfile",
|
|
20
|
+
projectPath: e
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
getTemplates() {
|
|
24
|
+
return [
|
|
25
|
+
{
|
|
26
|
+
name: "ruby-core",
|
|
27
|
+
tags: ["ruby"],
|
|
28
|
+
content: `# Ruby Development Guidelines
|
|
29
|
+
|
|
30
|
+
This project uses Ruby.
|
|
31
|
+
|
|
32
|
+
## Code Style
|
|
33
|
+
- Follow Ruby style guide
|
|
34
|
+
- Use Rubocop for linting
|
|
35
|
+
- Keep code idiomatic
|
|
36
|
+
|
|
37
|
+
## Dependencies
|
|
38
|
+
- Manage with Bundler
|
|
39
|
+
- Keep Gemfile.lock committed
|
|
40
|
+
- Review gem security
|
|
41
|
+
|
|
42
|
+
## Testing
|
|
43
|
+
- Write tests with RSpec/Minitest
|
|
44
|
+
- Use fixtures and factories
|
|
45
|
+
- Aim for good coverage`
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
getDependencyTagMap() {
|
|
50
|
+
return {
|
|
51
|
+
rails: "rails",
|
|
52
|
+
rspec: "rspec",
|
|
53
|
+
sinatra: "sinatra"
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
c as RubyPlugin
|
|
59
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../BasePlugin-odQJAKA-.cjs");class g extends m.BasePlugin{constructor(){super(...arguments),this.name="rust",this.displayName="Rust",this.version="3.0.0",this.priority=80}async detect(e){if(!this.fileExists(e,"Cargo.toml"))return null;const s=this.readFile(e,"Cargo.toml");if(!s)return{language:"Rust",name:this.getProjectName(e),dependencies:{},manifestFile:"Cargo.toml",projectPath:e};const l=s.match(/\[package\][\s\S]*?name\s*=\s*"([^"]+)"/),u=s.match(/\[package\][\s\S]*?description\s*=\s*"([^"]+)"/),r={},a=s.match(/\[dependencies\]([\s\S]*?)(?:\n\[|$)/);if(a){const i=a[1].split(`
|
|
2
|
+
`);for(const o of i){const t=o.match(/^([a-zA-Z0-9_-]+)\s*=\s*(?:"([^"]+)"|{[^}]*version\s*=\s*"([^"]+)")/);t&&(r[t[1]]=t[2]||t[3]||"*")}}const c=s.match(/\[workspace\][\s\S]*?members\s*=\s*\[([\s\S]*?)\]/),n=[];if(c){const i=c[1].split(",").map(o=>o.trim().replace(/["']/g,"")).filter(Boolean);n.push(...i)}return{language:"Rust",name:l?.[1]||this.getProjectName(e),description:u?.[1],dependencies:r,manifestFile:"Cargo.toml",projectPath:e,workspaceMembers:n.length>0?n:void 0}}getTemplates(){return[{name:"rust-core",tags:["rust"],content:`# Rust Development Guidelines
|
|
3
|
+
|
|
4
|
+
This project uses Rust.
|
|
5
|
+
|
|
6
|
+
## Project Structure
|
|
7
|
+
- Follow Cargo conventions
|
|
8
|
+
- Organize code in modules
|
|
9
|
+
- Use workspace for monorepos
|
|
10
|
+
|
|
11
|
+
## Code Style
|
|
12
|
+
- Run \`rustfmt\` for formatting
|
|
13
|
+
- Use \`clippy\` for linting
|
|
14
|
+
- Follow Rust naming conventions
|
|
15
|
+
|
|
16
|
+
## Safety & Ownership
|
|
17
|
+
- Leverage Rust's ownership system
|
|
18
|
+
- Minimize unsafe code
|
|
19
|
+
- Handle Result and Option properly
|
|
20
|
+
|
|
21
|
+
## Testing
|
|
22
|
+
- Write unit tests with \`#[test]\`
|
|
23
|
+
- Use integration tests in \`tests/\`
|
|
24
|
+
- Leverage \`cargo test\`
|
|
25
|
+
|
|
26
|
+
## Dependencies
|
|
27
|
+
- Manage with Cargo.toml
|
|
28
|
+
- Review crate security
|
|
29
|
+
- Keep dependencies updated`}]}getDependencyTagMap(){return{tokio:"tokio","actix-web":"actix",rocket:"rocket",serde:"serde"}}}exports.RustPlugin=g;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { B as p } from "../BasePlugin-6wv0hYJ9.js";
|
|
2
|
+
class d extends p {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this.name = "rust", this.displayName = "Rust", this.version = "3.0.0", this.priority = 80;
|
|
5
|
+
}
|
|
6
|
+
async detect(e) {
|
|
7
|
+
if (!this.fileExists(e, "Cargo.toml"))
|
|
8
|
+
return null;
|
|
9
|
+
const s = this.readFile(e, "Cargo.toml");
|
|
10
|
+
if (!s)
|
|
11
|
+
return {
|
|
12
|
+
language: "Rust",
|
|
13
|
+
name: this.getProjectName(e),
|
|
14
|
+
dependencies: {},
|
|
15
|
+
manifestFile: "Cargo.toml",
|
|
16
|
+
projectPath: e
|
|
17
|
+
};
|
|
18
|
+
const m = s.match(/\[package\][\s\S]*?name\s*=\s*"([^"]+)"/), l = s.match(/\[package\][\s\S]*?description\s*=\s*"([^"]+)"/), r = {}, a = s.match(/\[dependencies\]([\s\S]*?)(?:\n\[|$)/);
|
|
19
|
+
if (a) {
|
|
20
|
+
const i = a[1].split(`
|
|
21
|
+
`);
|
|
22
|
+
for (const o of i) {
|
|
23
|
+
const t = o.match(/^([a-zA-Z0-9_-]+)\s*=\s*(?:"([^"]+)"|{[^}]*version\s*=\s*"([^"]+)")/);
|
|
24
|
+
t && (r[t[1]] = t[2] || t[3] || "*");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const c = s.match(/\[workspace\][\s\S]*?members\s*=\s*\[([\s\S]*?)\]/), n = [];
|
|
28
|
+
if (c) {
|
|
29
|
+
const i = c[1].split(",").map((o) => o.trim().replace(/["']/g, "")).filter(Boolean);
|
|
30
|
+
n.push(...i);
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
language: "Rust",
|
|
34
|
+
name: m?.[1] || this.getProjectName(e),
|
|
35
|
+
description: l?.[1],
|
|
36
|
+
dependencies: r,
|
|
37
|
+
manifestFile: "Cargo.toml",
|
|
38
|
+
projectPath: e,
|
|
39
|
+
workspaceMembers: n.length > 0 ? n : void 0
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
getTemplates() {
|
|
43
|
+
return [
|
|
44
|
+
{
|
|
45
|
+
name: "rust-core",
|
|
46
|
+
tags: ["rust"],
|
|
47
|
+
content: `# Rust Development Guidelines
|
|
48
|
+
|
|
49
|
+
This project uses Rust.
|
|
50
|
+
|
|
51
|
+
## Project Structure
|
|
52
|
+
- Follow Cargo conventions
|
|
53
|
+
- Organize code in modules
|
|
54
|
+
- Use workspace for monorepos
|
|
55
|
+
|
|
56
|
+
## Code Style
|
|
57
|
+
- Run \`rustfmt\` for formatting
|
|
58
|
+
- Use \`clippy\` for linting
|
|
59
|
+
- Follow Rust naming conventions
|
|
60
|
+
|
|
61
|
+
## Safety & Ownership
|
|
62
|
+
- Leverage Rust's ownership system
|
|
63
|
+
- Minimize unsafe code
|
|
64
|
+
- Handle Result and Option properly
|
|
65
|
+
|
|
66
|
+
## Testing
|
|
67
|
+
- Write unit tests with \`#[test]\`
|
|
68
|
+
- Use integration tests in \`tests/\`
|
|
69
|
+
- Leverage \`cargo test\`
|
|
70
|
+
|
|
71
|
+
## Dependencies
|
|
72
|
+
- Manage with Cargo.toml
|
|
73
|
+
- Review crate security
|
|
74
|
+
- Keep dependencies updated`
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
getDependencyTagMap() {
|
|
79
|
+
return {
|
|
80
|
+
tokio: "tokio",
|
|
81
|
+
"actix-web": "actix",
|
|
82
|
+
rocket: "rocket",
|
|
83
|
+
serde: "serde"
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
d as RustPlugin
|
|
89
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@el-j/magic-helix-plugins",
|
|
3
|
+
"version": "4.0.0-beta.1",
|
|
4
|
+
"description": "Official language detection plugins for MagicAgentHelix",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./nodejs": {
|
|
16
|
+
"import": "./dist/nodejs/index.mjs",
|
|
17
|
+
"require": "./dist/nodejs/index.cjs",
|
|
18
|
+
"types": "./dist/nodejs/index.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"./go": {
|
|
21
|
+
"import": "./dist/go/index.mjs",
|
|
22
|
+
"require": "./dist/go/index.cjs",
|
|
23
|
+
"types": "./dist/go/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./python": {
|
|
26
|
+
"import": "./dist/python/index.mjs",
|
|
27
|
+
"require": "./dist/python/index.cjs",
|
|
28
|
+
"types": "./dist/python/index.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./rust": {
|
|
31
|
+
"import": "./dist/rust/index.mjs",
|
|
32
|
+
"require": "./dist/rust/index.cjs",
|
|
33
|
+
"types": "./dist/rust/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./java": {
|
|
36
|
+
"import": "./dist/java/index.mjs",
|
|
37
|
+
"require": "./dist/java/index.cjs",
|
|
38
|
+
"types": "./dist/java/index.d.ts"
|
|
39
|
+
},
|
|
40
|
+
"./ruby": {
|
|
41
|
+
"import": "./dist/ruby/index.mjs",
|
|
42
|
+
"require": "./dist/ruby/index.cjs",
|
|
43
|
+
"types": "./dist/ruby/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./php": {
|
|
46
|
+
"import": "./dist/php/index.mjs",
|
|
47
|
+
"require": "./dist/php/index.cjs",
|
|
48
|
+
"types": "./dist/php/index.d.ts"
|
|
49
|
+
},
|
|
50
|
+
"./csharp": {
|
|
51
|
+
"import": "./dist/csharp/index.mjs",
|
|
52
|
+
"require": "./dist/csharp/index.cjs",
|
|
53
|
+
"types": "./dist/csharp/index.d.ts"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"dist",
|
|
58
|
+
"README.md"
|
|
59
|
+
],
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "npm run build:types && npm run build:bundle && npm run copy:templates",
|
|
62
|
+
"build:types": "tsc --project tsconfig.json",
|
|
63
|
+
"build:bundle": "vite build",
|
|
64
|
+
"copy:templates": "node scripts/copy-templates.js",
|
|
65
|
+
"dev": "vite build --watch",
|
|
66
|
+
"test": "vitest",
|
|
67
|
+
"lint": "eslint src --ext .ts"
|
|
68
|
+
},
|
|
69
|
+
"keywords": [
|
|
70
|
+
"magic-helix",
|
|
71
|
+
"plugins",
|
|
72
|
+
"language-detection",
|
|
73
|
+
"project-detection",
|
|
74
|
+
"monorepo",
|
|
75
|
+
"ai",
|
|
76
|
+
"copilot"
|
|
77
|
+
],
|
|
78
|
+
"author": "MagicAgentHelix Contributors",
|
|
79
|
+
"license": "MIT",
|
|
80
|
+
"publishConfig": {
|
|
81
|
+
"access": "public"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"@el-j/magic-helix-core": "^2.0.0"
|
|
85
|
+
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"commander": "^14.0.2",
|
|
88
|
+
"glob": "^13.0.0",
|
|
89
|
+
"inquirer": "^13.1.0"
|
|
90
|
+
},
|
|
91
|
+
"devDependencies": {
|
|
92
|
+
"@el-j/magic-helix-core": "*",
|
|
93
|
+
"@types/node": "^25.0.2",
|
|
94
|
+
"typescript": "^5.9.3",
|
|
95
|
+
"vite": "^7.3.0",
|
|
96
|
+
"vitest": "^4.0.15"
|
|
97
|
+
}
|
|
98
|
+
}
|