@el-j/magic-helix-plugins 4.0.0-beta.7 → 4.0.0-beta.8

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.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { B as r } from "./BasePlugin-6wv0hYJ9.js";
2
- import { NodeJSPlugin as k } from "./nodejs/index.mjs";
3
- import { GoPlugin as U } from "./go/index.mjs";
4
- import { PythonPlugin as S } from "./python/index.mjs";
5
- import { RustPlugin as M } from "./rust/index.mjs";
1
+ import { B as r } from "./BasePlugin-BXz3Zpy5.js";
2
+ import { NodeJSPlugin as F } from "./nodejs/index.mjs";
3
+ import { GoPlugin as T } from "./go/index.mjs";
4
+ import { PythonPlugin as D } from "./python/index.mjs";
5
+ import { RustPlugin as S } from "./rust/index.mjs";
6
6
  import { JavaPlugin as N } from "./java/index.mjs";
7
7
  import { RubyPlugin as L } from "./ruby/index.mjs";
8
8
  import { PHPPlugin as C } from "./php/index.mjs";
@@ -10,7 +10,7 @@ import { CSharpPlugin as G } from "./csharp/index.mjs";
10
10
  import { CppPlugin as K } from "./cpp/index.mjs";
11
11
  import { SwiftPlugin as I } from "./swift/index.mjs";
12
12
  import * as l from "node:path";
13
- class d extends r {
13
+ class m extends r {
14
14
  constructor() {
15
15
  super(...arguments), this.name = "elixir", this.displayName = "Elixir", this.version = "1.0.0", this.priority = 80;
16
16
  }
@@ -19,11 +19,11 @@ class d extends r {
19
19
  return null;
20
20
  const t = this.readFile(e, "mix.exs"), i = ["elixir"], s = {};
21
21
  if (t) {
22
- const n = t.match(/app:\s*:(\w+)/), a = t.match(/version:\s*"([^"]+)"/);
22
+ const a = t.match(/app:\s*:(\w+)/), n = t.match(/version:\s*"([^"]+)"/);
23
23
  return t.includes(":phoenix") && (i.push("phoenix"), s.phoenix = "*"), t.includes(":ecto") && (i.push("ecto"), s.ecto = "*"), {
24
24
  language: "Elixir",
25
- name: n?.[1] || this.getProjectName(e),
26
- version: a?.[1] || "0.1.0",
25
+ name: a?.[1] || this.getProjectName(e),
26
+ version: n?.[1] || "0.1.0",
27
27
  dependencies: s,
28
28
  manifestFile: "mix.exs",
29
29
  projectPath: e,
@@ -40,13 +40,14 @@ class d extends r {
40
40
  };
41
41
  }
42
42
  getTemplates() {
43
+ const e = this.getDirname(import.meta.url);
43
44
  return [
44
45
  {
45
46
  name: "elixir-core",
46
47
  tags: ["elixir"],
47
48
  content: () => this.loadTemplateFromFile(
48
- l.join(__dirname, "templates/lang-elixir.md")
49
- ).then((e) => e || this.getElixirFallbackTemplate())
49
+ l.join(e, "templates/lang-elixir.md")
50
+ ).then((t) => t || this.getElixirFallbackTemplate())
50
51
  }
51
52
  ];
52
53
  }
@@ -83,7 +84,7 @@ class d extends r {
83
84
  `;
84
85
  }
85
86
  }
86
- class p extends r {
87
+ class d extends r {
87
88
  constructor() {
88
89
  super(...arguments), this.name = "dart", this.displayName = "Dart", this.version = "1.0.0", this.priority = 80;
89
90
  }
@@ -92,11 +93,11 @@ class p extends r {
92
93
  return null;
93
94
  const t = this.readFile(e, "pubspec.yaml"), i = ["dart"], s = {};
94
95
  if (t) {
95
- const n = t.match(/name:\s*(.+)/), a = t.match(/version:\s*(.+)/);
96
+ const a = t.match(/name:\s*(.+)/), n = t.match(/version:\s*(.+)/);
96
97
  return (t.includes("flutter:") || t.includes("flutter_test:")) && (i.push("flutter"), s.flutter = "*"), (t.includes("flutter_riverpod:") || t.includes("riverpod:")) && i.push("riverpod"), (t.includes("flutter_bloc:") || t.includes("bloc:")) && i.push("bloc"), {
97
98
  language: "Dart",
98
- name: n?.[1]?.trim() || this.getProjectName(e),
99
- version: a?.[1]?.trim() || "1.0.0",
99
+ name: a?.[1]?.trim() || this.getProjectName(e),
100
+ version: n?.[1]?.trim() || "1.0.0",
100
101
  dependencies: s,
101
102
  manifestFile: "pubspec.yaml",
102
103
  projectPath: e,
@@ -113,20 +114,21 @@ class p extends r {
113
114
  };
114
115
  }
115
116
  getTemplates() {
117
+ const e = this.getDirname(import.meta.url);
116
118
  return [
117
119
  {
118
120
  name: "dart-core",
119
121
  tags: ["dart"],
120
122
  content: () => this.loadTemplateFromFile(
121
- l.join(__dirname, "templates/lang-dart.md")
122
- ).then((e) => e || this.getDartFallbackTemplate())
123
+ l.join(e, "templates/lang-dart.md")
124
+ ).then((t) => t || this.getDartFallbackTemplate())
123
125
  },
124
126
  {
125
127
  name: "flutter-core",
126
128
  tags: ["flutter"],
127
129
  content: () => this.loadTemplateFromFile(
128
- l.join(__dirname, "templates/flutter.md")
129
- ).then((e) => e || this.getFlutterFallbackTemplate())
130
+ l.join(e, "templates/flutter.md")
131
+ ).then((t) => t || this.getFlutterFallbackTemplate())
130
132
  }
131
133
  ];
132
134
  }
@@ -173,7 +175,7 @@ class p extends r {
173
175
  `;
174
176
  }
175
177
  }
176
- class g extends r {
178
+ class p extends r {
177
179
  constructor() {
178
180
  super(...arguments), this.name = "scala", this.displayName = "Scala", this.version = "1.0.0", this.priority = 80;
179
181
  }
@@ -181,13 +183,14 @@ class g extends r {
181
183
  return this.fileExists(e, "build.sbt") ? this.detectFromSbt(e) : this.fileExists(e, "build.sc") ? this.detectFromMill(e) : null;
182
184
  }
183
185
  getTemplates() {
186
+ const e = this.getDirname(import.meta.url);
184
187
  return [
185
188
  {
186
189
  name: "scala-core",
187
190
  tags: ["scala"],
188
191
  content: () => this.loadTemplateFromFile(
189
- l.join(__dirname, "templates/lang-scala.md")
190
- ).then((e) => e || this.getScalaFallbackTemplate())
192
+ l.join(e, "templates/lang-scala.md")
193
+ ).then((t) => t || this.getScalaFallbackTemplate())
191
194
  }
192
195
  ];
193
196
  }
@@ -204,11 +207,10 @@ class g extends r {
204
207
  detectFromSbt(e) {
205
208
  const t = this.readFile(e, "build.sbt"), i = ["scala"], s = {};
206
209
  if (t) {
207
- const n = t.match(/name\s*:=\s*"([^"]+)"/), a = t.match(/version\s*:=\s*"([^"]+)"/);
210
+ const a = t.match(/name\s*:=\s*"([^"]+)"/);
208
211
  return (t.includes("akka-actor") || t.includes("com.typesafe.akka")) && (i.push("akka"), s.akka = "*"), (t.includes("play") || t.includes("com.typesafe.play")) && (i.push("play"), s.play = "*"), t.includes("zio") && i.push("zio"), (t.includes("cats-effect") || t.includes("cats-core")) && i.push("cats"), {
209
212
  language: "Scala",
210
- name: n?.[1] || this.getProjectName(e),
211
- version: a?.[1] || "0.1.0",
213
+ name: a?.[1] || this.getProjectName(e),
212
214
  dependencies: s,
213
215
  manifestFile: "build.sbt",
214
216
  projectPath: e,
@@ -255,31 +257,32 @@ class g extends r {
255
257
  `;
256
258
  }
257
259
  }
258
- class f extends r {
260
+ class g extends r {
259
261
  constructor() {
260
262
  super(...arguments), this.name = "kotlin", this.displayName = "Kotlin", this.version = "1.0.0", this.priority = 85;
261
263
  }
262
264
  async detect(e) {
263
265
  if (!(this.fileExists(e, "build.gradle.kts") || this.fileExists(e, "settings.gradle.kts")))
264
266
  return null;
265
- const i = this.readFile(e, "build.gradle.kts"), s = ["kotlin"], n = {};
266
- return i && (i.includes("ktor") && (s.push("ktor"), n.ktor = "*"), i.includes("spring-boot") && (s.push("spring-boot"), n["spring-boot"] = "*"), i.includes("exposed") && s.push("exposed"), i.includes("kotlinx-coroutines") && s.push("coroutines")), {
267
+ const i = this.readFile(e, "build.gradle.kts"), s = ["kotlin"], a = {};
268
+ return i && (i.includes("ktor") && (s.push("ktor"), a.ktor = "*"), i.includes("spring-boot") && (s.push("spring-boot"), a["spring-boot"] = "*"), i.includes("exposed") && s.push("exposed"), i.includes("kotlinx-coroutines") && s.push("coroutines")), {
267
269
  language: "Kotlin",
268
270
  name: this.getProjectName(e),
269
- dependencies: n,
271
+ dependencies: a,
270
272
  manifestFile: "build.gradle.kts",
271
273
  projectPath: e,
272
274
  tags: s
273
275
  };
274
276
  }
275
277
  getTemplates() {
278
+ const e = this.getDirname(import.meta.url);
276
279
  return [
277
280
  {
278
281
  name: "kotlin-core",
279
282
  tags: ["kotlin"],
280
283
  content: () => this.loadTemplateFromFile(
281
- l.join(__dirname, "templates/lang-kotlin.md")
282
- ).then((e) => e || this.getKotlinFallbackTemplate())
284
+ l.join(e, "templates/lang-kotlin.md")
285
+ ).then((t) => t || this.getKotlinFallbackTemplate())
283
286
  }
284
287
  ];
285
288
  }
@@ -312,7 +315,7 @@ class f extends r {
312
315
  `;
313
316
  }
314
317
  }
315
- class h extends r {
318
+ class f extends r {
316
319
  constructor() {
317
320
  super(...arguments), this.name = "lua", this.displayName = "Lua", this.version = "1.0.0", this.priority = 75;
318
321
  }
@@ -332,13 +335,14 @@ class h extends r {
332
335
  return null;
333
336
  }
334
337
  getTemplates() {
338
+ const e = this.getDirname(import.meta.url);
335
339
  return [
336
340
  {
337
341
  name: "lua-core",
338
342
  tags: ["lua"],
339
343
  content: () => this.loadTemplateFromFile(
340
- l.join(__dirname, "templates/lang-lua.md")
341
- ).then((e) => e || this.getLuaFallbackTemplate())
344
+ l.join(e, "templates/lang-lua.md")
345
+ ).then((t) => t || this.getLuaFallbackTemplate())
342
346
  }
343
347
  ];
344
348
  }
@@ -369,21 +373,20 @@ class h extends r {
369
373
  `;
370
374
  }
371
375
  }
372
- class y extends r {
376
+ class h extends r {
373
377
  constructor() {
374
378
  super(...arguments), this.name = "r", this.displayName = "R", this.version = "1.0.0", this.priority = 75;
375
379
  }
376
380
  async detect(e) {
377
381
  const i = this.listFiles(e)?.some((s) => s.endsWith(".Rproj"));
378
382
  if (this.fileExists(e, "DESCRIPTION") || i) {
379
- const s = ["r"], n = {}, a = this.readFile(e, "DESCRIPTION");
380
- if (a) {
381
- const c = a.match(/Package:\s*(.+)/), u = a.match(/Version:\s*(.+)/);
382
- return (a.includes("tidyverse") || a.includes("dplyr")) && s.push("tidyverse"), a.includes("shiny") && (s.push("shiny"), n.shiny = "*"), {
383
+ const s = ["r"], a = {}, n = this.readFile(e, "DESCRIPTION");
384
+ if (n) {
385
+ const c = n.match(/Package:\s*(.+)/);
386
+ return (n.includes("tidyverse") || n.includes("dplyr")) && s.push("tidyverse"), n.includes("shiny") && (s.push("shiny"), a.shiny = "*"), {
383
387
  language: "R",
384
388
  name: c?.[1]?.trim() || this.getProjectName(e),
385
- version: u?.[1]?.trim() || "0.1.0",
386
- dependencies: n,
389
+ dependencies: a,
387
390
  manifestFile: "DESCRIPTION",
388
391
  projectPath: e,
389
392
  tags: s
@@ -401,13 +404,14 @@ class y extends r {
401
404
  return null;
402
405
  }
403
406
  getTemplates() {
407
+ const e = this.getDirname(import.meta.url);
404
408
  return [
405
409
  {
406
410
  name: "r-core",
407
411
  tags: ["r"],
408
412
  content: () => this.loadTemplateFromFile(
409
- l.join(__dirname, "templates/lang-r.md")
410
- ).then((e) => e || this.getRFallbackTemplate())
413
+ l.join(e, "templates/lang-r.md")
414
+ ).then((t) => t || this.getRFallbackTemplate())
411
415
  }
412
416
  ];
413
417
  }
@@ -439,7 +443,7 @@ class y extends r {
439
443
  `;
440
444
  }
441
445
  }
442
- class b extends r {
446
+ class y extends r {
443
447
  constructor() {
444
448
  super(...arguments), this.name = "perl", this.displayName = "Perl", this.version = "1.0.0", this.priority = 70;
445
449
  }
@@ -458,13 +462,14 @@ class b extends r {
458
462
  return null;
459
463
  }
460
464
  getTemplates() {
465
+ const e = this.getDirname(import.meta.url);
461
466
  return [
462
467
  {
463
468
  name: "perl-core",
464
469
  tags: ["perl"],
465
470
  content: () => this.loadTemplateFromFile(
466
- l.join(__dirname, "templates/lang-perl.md")
467
- ).then((e) => e || this.getPerlFallbackTemplate())
471
+ l.join(e, "templates/lang-perl.md")
472
+ ).then((t) => t || this.getPerlFallbackTemplate())
468
473
  }
469
474
  ];
470
475
  }
@@ -495,7 +500,7 @@ class b extends r {
495
500
  `;
496
501
  }
497
502
  }
498
- class v extends r {
503
+ class b extends r {
499
504
  constructor() {
500
505
  super(...arguments), this.name = "shell", this.displayName = "Shell", this.version = "1.0.0", this.priority = 60;
501
506
  }
@@ -506,7 +511,7 @@ class v extends r {
506
511
  )) {
507
512
  const s = ["shell"];
508
513
  if ((t?.filter(
509
- (a) => a.endsWith(".sh") || a.endsWith(".bash") || a.endsWith(".zsh")
514
+ (n) => n.endsWith(".sh") || n.endsWith(".bash") || n.endsWith(".zsh")
510
515
  ).length || 0) >= 2 || t?.includes("install.sh") || t?.includes("setup.sh"))
511
516
  return {
512
517
  language: "Shell",
@@ -520,13 +525,14 @@ class v extends r {
520
525
  return null;
521
526
  }
522
527
  getTemplates() {
528
+ const e = this.getDirname(import.meta.url);
523
529
  return [
524
530
  {
525
531
  name: "shell-core",
526
532
  tags: ["shell"],
527
533
  content: () => this.loadTemplateFromFile(
528
- l.join(__dirname, "templates/lang-shell.md")
529
- ).then((e) => e || this.getShellFallbackTemplate())
534
+ l.join(e, "templates/lang-shell.md")
535
+ ).then((t) => t || this.getShellFallbackTemplate())
530
536
  }
531
537
  ];
532
538
  }
@@ -558,20 +564,20 @@ export {
558
564
  r as BasePlugin,
559
565
  G as CSharpPlugin,
560
566
  K as CppPlugin,
561
- p as DartPlugin,
562
- d as ElixirPlugin,
563
- U as GoPlugin,
567
+ d as DartPlugin,
568
+ m as ElixirPlugin,
569
+ T as GoPlugin,
564
570
  N as JavaPlugin,
565
- f as KotlinPlugin,
566
- h as LuaPlugin,
567
- k as NodeJSPlugin,
571
+ g as KotlinPlugin,
572
+ f as LuaPlugin,
573
+ F as NodeJSPlugin,
568
574
  C as PHPPlugin,
569
- b as PerlPlugin,
570
- S as PythonPlugin,
571
- y as RPlugin,
575
+ y as PerlPlugin,
576
+ D as PythonPlugin,
577
+ h as RPlugin,
572
578
  L as RubyPlugin,
573
- M as RustPlugin,
574
- g as ScalaPlugin,
575
- v as ShellPlugin,
579
+ S as RustPlugin,
580
+ p as ScalaPlugin,
581
+ b as ShellPlugin,
576
582
  I as SwiftPlugin
577
583
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("node:path"),c=require("../BasePlugin-odQJAKA-.cjs");function d(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 g=d(l);class m extends c.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:()=>this.loadTemplateFromFile(g.join(__dirname,"templates/lang-java.md")).then(e=>e||this.getJavaFallbackTemplate())}]}getJavaFallbackTemplate(){return`# Java Development Guidelines
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("node:path"),d=require("../BasePlugin-Be6rLq9o.cjs");var c=typeof document<"u"?document.currentScript:null;function m(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const u=m(l);class g extends d.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(){const e=this.getDirname(typeof document>"u"?require("url").pathToFileURL(__filename).href:c&&c.tagName.toUpperCase()==="SCRIPT"&&c.src||new URL("java/index.cjs",document.baseURI).href);return[{name:"java-core",tags:["java"],content:()=>this.loadTemplateFromFile(u.join(e,"templates/lang-java.md")).then(t=>t||this.getJavaFallbackTemplate())}]}getJavaFallbackTemplate(){return`# Java Development Guidelines
2
2
 
3
3
  This project uses Java.
4
4
 
@@ -20,4 +20,4 @@ This project uses Java.
20
20
  ## Testing
21
21
  - Write JUnit tests
22
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 a=t.match(/<artifactId>([^<]+)<\/artifactId>/),s=t.match(/<description>([^<]+)<\/description>/),r={},i=t.matchAll(/<dependency>[\s\S]*?<groupId>([^<]+)<\/groupId>[\s\S]*?<artifactId>([^<]+)<\/artifactId>[\s\S]*?(?:<version>([^<]+)<\/version>)?/g);for(const o of i)r[`${o[1]}:${o[2]}`]=o[3]||"*";return{language:"Java",name:a?.[1]||this.getProjectName(e),description:s?.[1],dependencies:r,manifestFile:"pom.xml",projectPath:e}}detectGradle(e){const t=this.fileExists(e,"build.gradle")?"build.gradle":"build.gradle.kts",a=this.readFile(e,t),s={};if(a){const r=a.matchAll(/(?:implementation|api|testImplementation)\s*['"]([^:'"]+):([^:'"]+):?([^'"]*)['"]/g);for(const i of r)s[`${i[1]}:${i[2]}`]=i[3]||"*"}return{language:"Java/Kotlin",name:this.getProjectName(e),dependencies:s,manifestFile:t,projectPath:e}}}exports.JavaPlugin=m;
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>/),r={},i=t.matchAll(/<dependency>[\s\S]*?<groupId>([^<]+)<\/groupId>[\s\S]*?<artifactId>([^<]+)<\/artifactId>[\s\S]*?(?:<version>([^<]+)<\/version>)?/g);for(const o of i)r[`${o[1]}:${o[2]}`]=o[3]||"*";return{language:"Java",name:n?.[1]||this.getProjectName(e),description:s?.[1],dependencies:r,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 r=n.matchAll(/(?:implementation|api|testImplementation)\s*['"]([^:'"]+):([^:'"]+):?([^'"]*)['"]/g);for(const i of r)s[`${i[1]}:${i[2]}`]=i[3]||"*"}return{language:"Java/Kotlin",name:this.getProjectName(e),dependencies:s,manifestFile:t,projectPath:e}}}exports.JavaPlugin=g;
@@ -1,5 +1,5 @@
1
1
  import * as o from "node:path";
2
- import { B as l } from "../BasePlugin-6wv0hYJ9.js";
2
+ import { B as l } from "../BasePlugin-BXz3Zpy5.js";
3
3
  class m extends l {
4
4
  constructor() {
5
5
  super(...arguments), this.name = "java", this.displayName = "Java", this.version = "3.0.0", this.priority = 75;
@@ -8,13 +8,14 @@ class m extends l {
8
8
  return this.fileExists(e, "pom.xml") ? this.detectMaven(e) : this.fileExists(e, "build.gradle") || this.fileExists(e, "build.gradle.kts") ? this.detectGradle(e) : null;
9
9
  }
10
10
  getTemplates() {
11
+ const e = this.getDirname(import.meta.url);
11
12
  return [
12
13
  {
13
14
  name: "java-core",
14
15
  tags: ["java"],
15
16
  content: () => this.loadTemplateFromFile(
16
- o.join(__dirname, "templates/lang-java.md")
17
- ).then((e) => e || this.getJavaFallbackTemplate())
17
+ o.join(e, "templates/lang-java.md")
18
+ ).then((t) => t || this.getJavaFallbackTemplate())
18
19
  }
19
20
  ];
20
21
  }
@@ -1,4 +1,4 @@
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
1
+ "use strict";var u=Object.create;var p=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var h=(s,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of d(t))!f.call(s,i)&&i!==e&&p(s,i,{get:()=>t[i],enumerable:!(n=m(t,i))||n.enumerable});return s};var T=(s,t,e)=>(e=s!=null?u(g(s)):{},h(t||!s||!s.__esModule?p(e,"default",{value:s,enumerable:!0}):e,s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("node:path"),w=require("../BasePlugin-Be6rLq9o.cjs");var c=typeof document<"u"?document.currentScript:null;function j(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const o=j(y);class S extends w.BasePlugin{constructor(){super(...arguments),this.name="nodejs",this.displayName="Node.js",this.version="3.0.0",this.priority=100}async detect(t){if(!this.fileExists(t,"package.json"))return null;const e=this.readJSON(t,"package.json");if(!e)return{language:"JavaScript/TypeScript",name:this.getProjectName(t),dependencies:{},manifestFile:"package.json",projectPath:t,tags:["typescript"]};const n=this.parseDependencies(e,"dependencies","devDependencies"),i=await this.enrichTags(t,n),r={language:"JavaScript/TypeScript",name:e.name||this.getProjectName(t),description:e.description,dependencies:n,manifestFile:"package.json",projectPath:t,tags:Array.from(i)},a=await this.extractWorkspaces(t,e);return a.length>0&&(r.workspaceMembers=a),r}getTemplates(){const t=this.getDirname(typeof document>"u"?require("url").pathToFileURL(__filename).href:c&&c.tagName.toUpperCase()==="SCRIPT"&&c.src||new URL("nodejs/index.cjs",document.baseURI).href);return[{name:"lang-typescript",tags:["typescript"],content:()=>this.loadTemplateFromFile(o.join(t,"templates/lang-typescript.md")).then(e=>e||this.getTypescriptTemplate())},{name:"react-core",tags:["react"],content:()=>this.loadTemplateFromFile(o.join(t,"templates/react-core.md")).then(e=>e||this.getReactTemplate())},{name:"react-zustand",tags:["zustand"],content:()=>this.loadTemplateFromFile(o.join(t,"templates/react-zustand.md")).then(e=>e||this.getReactZustandTemplate())},{name:"vue-core",tags:["vue"],content:()=>this.loadTemplateFromFile(o.join(t,"templates/vue-core.md")).then(e=>e||this.getVueTemplate())},{name:"vue-pinia",tags:["pinia"],content:()=>this.loadTemplateFromFile(o.join(t,"templates/vue-pinia.md")).then(e=>e||this.getVuePiniaTemplate())},{name:"nestjs-core",tags:["nestjs"],content:()=>this.loadTemplateFromFile(o.join(t,"templates/nestjs-core.md")).then(e=>e||this.getNestJSTemplate())},{name:"style-tailwind",tags:["tailwind"],content:()=>this.loadTemplateFromFile(o.join(t,"templates/style-tailwind.md")).then(e=>e||this.getTailwindTemplate())},{name:"test-vitest",tags:["vitest"],content:()=>this.loadTemplateFromFile(o.join(t,"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"}}async extractWorkspaces(t,e){if(!e.workspaces)return[];const n=Array.isArray(e.workspaces)?e.workspaces:e.workspaces.packages||[],i=[];for(const r of n)try{const{glob:a}=await import("glob"),l=await a(r,{cwd:t,absolute:!1,onlyDirectories:!0});i.push(...l)}catch{i.push(r.replace(/\/\*+$/,""))}return i}async enrichTags(t,e){const n=new Set;this.fileExists(t,"tsconfig.json")&&n.add("typescript");const i=this.getDependencyTagMap();for(const a in e)i[a]&&n.add(i[a]);const r=this.getConfigFileTagMap();for(const a in r)this.fileExists(t,a)&&n.add(r[a]);return n}getTypescriptTemplate(){return`# TypeScript Guidelines
2
2
 
3
3
  This project uses TypeScript for type safety.
4
4
 
@@ -64,4 +64,4 @@ This project uses Vitest for testing.
64
64
  ## Testing Strategy
65
65
  - Write unit tests for utilities
66
66
  - Use component testing
67
- - Follow testing best practices`}}exports.NodeJSPlugin=l;
67
+ - Follow testing best practices`}}exports.NodeJSPlugin=S;
@@ -1,92 +1,96 @@
1
- import * as t from "node:path";
2
- import { B as r } from "../BasePlugin-6wv0hYJ9.js";
3
- class c extends r {
1
+ import * as r from "node:path";
2
+ import { B as c } from "../BasePlugin-BXz3Zpy5.js";
3
+ class m extends c {
4
4
  constructor() {
5
5
  super(...arguments), this.name = "nodejs", this.displayName = "Node.js", this.version = "3.0.0", this.priority = 100;
6
6
  }
7
7
  // High priority - very common
8
- async detect(e) {
9
- if (!this.fileExists(e, "package.json"))
8
+ async detect(t) {
9
+ if (!this.fileExists(t, "package.json"))
10
10
  return null;
11
- const s = this.readJSON(e, "package.json");
12
- if (!s)
11
+ const e = this.readJSON(t, "package.json");
12
+ if (!e)
13
13
  return {
14
14
  language: "JavaScript/TypeScript",
15
- name: this.getProjectName(e),
15
+ name: this.getProjectName(t),
16
16
  dependencies: {},
17
17
  manifestFile: "package.json",
18
- projectPath: e
18
+ projectPath: t,
19
+ tags: ["typescript"]
20
+ // Default to TypeScript for unparseable package.json
19
21
  };
20
- const a = this.parseDependencies(
21
- s,
22
+ const i = this.parseDependencies(
23
+ e,
22
24
  "dependencies",
23
25
  "devDependencies"
24
- ), n = {
26
+ ), a = await this.enrichTags(t, i), n = {
25
27
  language: "JavaScript/TypeScript",
26
- name: s.name || this.getProjectName(e),
27
- description: s.description,
28
- dependencies: a,
28
+ name: e.name || this.getProjectName(t),
29
+ description: e.description,
30
+ dependencies: i,
29
31
  manifestFile: "package.json",
30
- projectPath: e
31
- }, i = this.extractWorkspaces(s);
32
- return i.length > 0 && (n.workspaceMembers = i), n;
32
+ projectPath: t,
33
+ tags: Array.from(a)
34
+ }, s = await this.extractWorkspaces(t, e);
35
+ return s.length > 0 && (n.workspaceMembers = s), n;
33
36
  }
34
37
  getTemplates() {
38
+ const t = this.getDirname(import.meta.url);
35
39
  return [
36
40
  {
37
41
  name: "lang-typescript",
38
42
  tags: ["typescript"],
39
43
  content: () => this.loadTemplateFromFile(
40
- t.join(__dirname, "templates/lang-typescript.md")
44
+ r.join(t, "templates/lang-typescript.md")
41
45
  ).then((e) => e || this.getTypescriptTemplate())
42
46
  },
43
47
  {
44
48
  name: "react-core",
45
49
  tags: ["react"],
46
50
  content: () => this.loadTemplateFromFile(
47
- t.join(__dirname, "templates/react-core.md")
51
+ r.join(t, "templates/react-core.md")
48
52
  ).then((e) => e || this.getReactTemplate())
49
53
  },
50
54
  {
51
55
  name: "react-zustand",
52
56
  tags: ["zustand"],
53
57
  content: () => this.loadTemplateFromFile(
54
- t.join(__dirname, "templates/react-zustand.md")
58
+ r.join(t, "templates/react-zustand.md")
55
59
  ).then((e) => e || this.getReactZustandTemplate())
56
60
  },
57
61
  {
58
62
  name: "vue-core",
59
63
  tags: ["vue"],
60
64
  content: () => this.loadTemplateFromFile(
61
- t.join(__dirname, "templates/vue-core.md")
65
+ r.join(t, "templates/vue-core.md")
62
66
  ).then((e) => e || this.getVueTemplate())
63
67
  },
64
68
  {
65
69
  name: "vue-pinia",
66
70
  tags: ["pinia"],
67
71
  content: () => this.loadTemplateFromFile(
68
- t.join(__dirname, "templates/vue-pinia.md")
72
+ r.join(t, "templates/vue-pinia.md")
69
73
  ).then((e) => e || this.getVuePiniaTemplate())
70
74
  },
71
75
  {
72
76
  name: "nestjs-core",
73
77
  tags: ["nestjs"],
74
78
  content: () => this.loadTemplateFromFile(
75
- t.join(__dirname, "templates/nestjs-core.md")
79
+ r.join(t, "templates/nestjs-core.md")
76
80
  ).then((e) => e || this.getNestJSTemplate())
77
81
  },
78
82
  {
79
83
  name: "style-tailwind",
80
84
  tags: ["tailwind"],
81
85
  content: () => this.loadTemplateFromFile(
82
- t.join(__dirname, "templates/style-tailwind.md")
86
+ r.join(t, "templates/style-tailwind.md")
83
87
  ).then((e) => e || this.getTailwindTemplate())
84
88
  },
85
89
  {
86
90
  name: "test-vitest",
87
91
  tags: ["vitest"],
88
92
  content: () => this.loadTemplateFromFile(
89
- t.join(__dirname, "templates/test-vitest.md")
93
+ r.join(t, "templates/test-vitest.md")
90
94
  ).then((e) => e || this.getVitestTemplate())
91
95
  }
92
96
  ];
@@ -115,8 +119,35 @@ class c extends r {
115
119
  };
116
120
  }
117
121
  // Private helper methods
118
- extractWorkspaces(e) {
119
- return e.workspaces ? (Array.isArray(e.workspaces) ? e.workspaces : e.workspaces.packages || []).map((a) => a.replace(/\/\*$/, "")) : [];
122
+ async extractWorkspaces(t, e) {
123
+ if (!e.workspaces) return [];
124
+ const i = Array.isArray(e.workspaces) ? e.workspaces : e.workspaces.packages || [], a = [];
125
+ for (const n of i)
126
+ try {
127
+ const { glob: s } = await import("glob"), o = await s(n, {
128
+ cwd: t,
129
+ absolute: !1,
130
+ onlyDirectories: !0
131
+ });
132
+ a.push(...o);
133
+ } catch {
134
+ a.push(n.replace(/\/\*+$/, ""));
135
+ }
136
+ return a;
137
+ }
138
+ /**
139
+ * Enrich tags from dependencies and config files
140
+ */
141
+ async enrichTags(t, e) {
142
+ const i = /* @__PURE__ */ new Set();
143
+ this.fileExists(t, "tsconfig.json") && i.add("typescript");
144
+ const a = this.getDependencyTagMap();
145
+ for (const s in e)
146
+ a[s] && i.add(a[s]);
147
+ const n = this.getConfigFileTagMap();
148
+ for (const s in n)
149
+ this.fileExists(t, s) && i.add(n[s]);
150
+ return i;
120
151
  }
121
152
  // Fallback template content (if files don't exist)
122
153
  getTypescriptTemplate() {
@@ -211,5 +242,5 @@ This project uses Vitest for testing.
211
242
  }
212
243
  }
213
244
  export {
214
- c as NodeJSPlugin
245
+ m as NodeJSPlugin
215
246
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("node:path"),i=require("../BasePlugin-odQJAKA-.cjs");function o(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const a=o(r);class p 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 t=this.readJSON(e,"composer.json");if(!t)return{language:"PHP",name:this.getProjectName(e),dependencies:{},manifestFile:"composer.json",projectPath:e};const s={...t.require,...t["require-dev"]};return{language:"PHP",name:t.name||this.getProjectName(e),description:t.description,dependencies:s,manifestFile:"composer.json",projectPath:e}}getTemplates(){return[{name:"php-core",tags:["php"],content:()=>this.loadTemplateFromFile(a.join(__dirname,"templates/lang-php.md")).then(e=>e||this.getPHPFallbackTemplate())}]}getPHPFallbackTemplate(){return`# PHP Development Guidelines
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("node:path"),o=require("../BasePlugin-Be6rLq9o.cjs");var s=typeof document<"u"?document.currentScript:null;function a(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const p=a(i);class c extends o.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 t=this.readJSON(e,"composer.json");if(!t)return{language:"PHP",name:this.getProjectName(e),dependencies:{},manifestFile:"composer.json",projectPath:e};const r={...t.require,...t["require-dev"]};return{language:"PHP",name:t.name||this.getProjectName(e),description:t.description,dependencies:r,manifestFile:"composer.json",projectPath:e}}getTemplates(){const e=this.getDirname(typeof document>"u"?require("url").pathToFileURL(__filename).href:s&&s.tagName.toUpperCase()==="SCRIPT"&&s.src||new URL("php/index.cjs",document.baseURI).href);return[{name:"php-core",tags:["php"],content:()=>this.loadTemplateFromFile(p.join(e,"templates/lang-php.md")).then(t=>t||this.getPHPFallbackTemplate())}]}getPHPFallbackTemplate(){return`# PHP Development Guidelines
2
2
 
3
3
  This project uses PHP.
4
4
 
@@ -15,4 +15,4 @@ This project uses PHP.
15
15
  ## Testing
16
16
  - Write PHPUnit tests
17
17
  - Use proper assertions
18
- - Aim for good coverage`}getDependencyTagMap(){return{"laravel/framework":"laravel","symfony/symfony":"symfony","phpunit/phpunit":"phpunit"}}}exports.PHPPlugin=p;
18
+ - Aim for good coverage`}getDependencyTagMap(){return{"laravel/framework":"laravel","symfony/symfony":"symfony","phpunit/phpunit":"phpunit"}}}exports.PHPPlugin=c;
@@ -1,5 +1,5 @@
1
- import * as t from "node:path";
2
- import { B as i } from "../BasePlugin-6wv0hYJ9.js";
1
+ import * as n from "node:path";
2
+ import { B as i } from "../BasePlugin-BXz3Zpy5.js";
3
3
  class a extends i {
4
4
  constructor() {
5
5
  super(...arguments), this.name = "php", this.displayName = "PHP", this.version = "3.0.0", this.priority = 65;
@@ -16,7 +16,7 @@ class a extends i {
16
16
  manifestFile: "composer.json",
17
17
  projectPath: e
18
18
  };
19
- const n = {
19
+ const t = {
20
20
  ...s.require,
21
21
  ...s["require-dev"]
22
22
  };
@@ -24,19 +24,20 @@ class a extends i {
24
24
  language: "PHP",
25
25
  name: s.name || this.getProjectName(e),
26
26
  description: s.description,
27
- dependencies: n,
27
+ dependencies: t,
28
28
  manifestFile: "composer.json",
29
29
  projectPath: e
30
30
  };
31
31
  }
32
32
  getTemplates() {
33
+ const e = this.getDirname(import.meta.url);
33
34
  return [
34
35
  {
35
36
  name: "php-core",
36
37
  tags: ["php"],
37
38
  content: () => this.loadTemplateFromFile(
38
- t.join(__dirname, "templates/lang-php.md")
39
- ).then((e) => e || this.getPHPFallbackTemplate())
39
+ n.join(e, "templates/lang-php.md")
40
+ ).then((s) => s || this.getPHPFallbackTemplate())
40
41
  }
41
42
  ];
42
43
  }