@el-j/magic-helix-plugins 4.0.0-beta.6 → 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,24 +1,583 @@
1
- import { B as p } from "./BasePlugin-6wv0hYJ9.js";
2
- import { NodeJSPlugin as P } from "./nodejs/index.mjs";
3
- import { GoPlugin as u } from "./go/index.mjs";
4
- import { PythonPlugin as i } from "./python/index.mjs";
5
- import { RustPlugin as g } from "./rust/index.mjs";
6
- import { JavaPlugin as m } from "./java/index.mjs";
7
- import { RubyPlugin as a } from "./ruby/index.mjs";
8
- import { PHPPlugin as S } from "./php/index.mjs";
9
- import { CSharpPlugin as y } from "./csharp/index.mjs";
10
- import { CppPlugin as C } from "./cpp/index.mjs";
11
- import { SwiftPlugin as R } from "./swift/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
+ import { JavaPlugin as N } from "./java/index.mjs";
7
+ import { RubyPlugin as L } from "./ruby/index.mjs";
8
+ import { PHPPlugin as C } from "./php/index.mjs";
9
+ import { CSharpPlugin as G } from "./csharp/index.mjs";
10
+ import { CppPlugin as K } from "./cpp/index.mjs";
11
+ import { SwiftPlugin as I } from "./swift/index.mjs";
12
+ import * as l from "node:path";
13
+ class m extends r {
14
+ constructor() {
15
+ super(...arguments), this.name = "elixir", this.displayName = "Elixir", this.version = "1.0.0", this.priority = 80;
16
+ }
17
+ async detect(e) {
18
+ if (!this.fileExists(e, "mix.exs"))
19
+ return null;
20
+ const t = this.readFile(e, "mix.exs"), i = ["elixir"], s = {};
21
+ if (t) {
22
+ const a = t.match(/app:\s*:(\w+)/), n = t.match(/version:\s*"([^"]+)"/);
23
+ return t.includes(":phoenix") && (i.push("phoenix"), s.phoenix = "*"), t.includes(":ecto") && (i.push("ecto"), s.ecto = "*"), {
24
+ language: "Elixir",
25
+ name: a?.[1] || this.getProjectName(e),
26
+ version: n?.[1] || "0.1.0",
27
+ dependencies: s,
28
+ manifestFile: "mix.exs",
29
+ projectPath: e,
30
+ tags: i
31
+ };
32
+ }
33
+ return {
34
+ language: "Elixir",
35
+ name: this.getProjectName(e),
36
+ dependencies: {},
37
+ manifestFile: "mix.exs",
38
+ projectPath: e,
39
+ tags: i
40
+ };
41
+ }
42
+ getTemplates() {
43
+ const e = this.getDirname(import.meta.url);
44
+ return [
45
+ {
46
+ name: "elixir-core",
47
+ tags: ["elixir"],
48
+ content: () => this.loadTemplateFromFile(
49
+ l.join(e, "templates/lang-elixir.md")
50
+ ).then((t) => t || this.getElixirFallbackTemplate())
51
+ }
52
+ ];
53
+ }
54
+ getDependencyTagMap() {
55
+ return {
56
+ phoenix: "phoenix",
57
+ ecto: "ecto",
58
+ absinthe: "graphql",
59
+ plug: "plug"
60
+ };
61
+ }
62
+ getElixirFallbackTemplate() {
63
+ return `# Elixir Development Guidelines
64
+
65
+ ## Language-Specific Rules
66
+ - Use pattern matching and guards extensively
67
+ - Prefer immutable data structures
68
+ - Use pipe operator |> for data transformations
69
+ - Follow OTP principles for concurrent systems
70
+ - Use GenServer for stateful processes
71
+
72
+ ## Code Style
73
+ - Follow Elixir formatter conventions
74
+ - Use snake_case for functions and variables
75
+ - Use PascalCase for module names
76
+ - Keep functions small and focused
77
+ - Use \`with\` for complex case matching
78
+
79
+ ## Common Patterns
80
+ - Supervision trees for fault tolerance
81
+ - GenServer for state management
82
+ - Phoenix contexts for domain logic
83
+ - Ecto changesets for data validation
84
+ `;
85
+ }
86
+ }
87
+ class d extends r {
88
+ constructor() {
89
+ super(...arguments), this.name = "dart", this.displayName = "Dart", this.version = "1.0.0", this.priority = 80;
90
+ }
91
+ async detect(e) {
92
+ if (!this.fileExists(e, "pubspec.yaml"))
93
+ return null;
94
+ const t = this.readFile(e, "pubspec.yaml"), i = ["dart"], s = {};
95
+ if (t) {
96
+ const a = t.match(/name:\s*(.+)/), n = t.match(/version:\s*(.+)/);
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"), {
98
+ language: "Dart",
99
+ name: a?.[1]?.trim() || this.getProjectName(e),
100
+ version: n?.[1]?.trim() || "1.0.0",
101
+ dependencies: s,
102
+ manifestFile: "pubspec.yaml",
103
+ projectPath: e,
104
+ tags: i
105
+ };
106
+ }
107
+ return {
108
+ language: "Dart",
109
+ name: this.getProjectName(e),
110
+ dependencies: {},
111
+ manifestFile: "pubspec.yaml",
112
+ projectPath: e,
113
+ tags: i
114
+ };
115
+ }
116
+ getTemplates() {
117
+ const e = this.getDirname(import.meta.url);
118
+ return [
119
+ {
120
+ name: "dart-core",
121
+ tags: ["dart"],
122
+ content: () => this.loadTemplateFromFile(
123
+ l.join(e, "templates/lang-dart.md")
124
+ ).then((t) => t || this.getDartFallbackTemplate())
125
+ },
126
+ {
127
+ name: "flutter-core",
128
+ tags: ["flutter"],
129
+ content: () => this.loadTemplateFromFile(
130
+ l.join(e, "templates/flutter.md")
131
+ ).then((t) => t || this.getFlutterFallbackTemplate())
132
+ }
133
+ ];
134
+ }
135
+ getDependencyTagMap() {
136
+ return {
137
+ flutter: "flutter",
138
+ flutter_riverpod: "riverpod",
139
+ riverpod: "riverpod",
140
+ flutter_bloc: "bloc",
141
+ bloc: "bloc",
142
+ provider: "provider"
143
+ };
144
+ }
145
+ getDartFallbackTemplate() {
146
+ return `# Dart Development Guidelines
147
+
148
+ ## Language-Specific Rules
149
+ - Use strong typing throughout
150
+ - Leverage null safety features
151
+ - Prefer const constructors where possible
152
+ - Use named parameters for clarity
153
+ - Follow effective Dart guidelines
154
+
155
+ ## Code Style
156
+ - Use dartfmt for formatting
157
+ - Follow Dart style guide
158
+ - Use camelCase for variables/functions
159
+ - Use PascalCase for classes
160
+ `;
161
+ }
162
+ getFlutterFallbackTemplate() {
163
+ return `# Flutter Development Guidelines
164
+
165
+ ## Widget Best Practices
166
+ - Keep widgets small and focused
167
+ - Use StatelessWidget when possible
168
+ - Implement proper dispose() methods
169
+ - Use const constructors for performance
170
+
171
+ ## State Management
172
+ - Choose appropriate state solution (Riverpod, Bloc, Provider)
173
+ - Keep business logic separate from UI
174
+ - Use ValueNotifier for simple state
175
+ `;
176
+ }
177
+ }
178
+ class p extends r {
179
+ constructor() {
180
+ super(...arguments), this.name = "scala", this.displayName = "Scala", this.version = "1.0.0", this.priority = 80;
181
+ }
182
+ async detect(e) {
183
+ return this.fileExists(e, "build.sbt") ? this.detectFromSbt(e) : this.fileExists(e, "build.sc") ? this.detectFromMill(e) : null;
184
+ }
185
+ getTemplates() {
186
+ const e = this.getDirname(import.meta.url);
187
+ return [
188
+ {
189
+ name: "scala-core",
190
+ tags: ["scala"],
191
+ content: () => this.loadTemplateFromFile(
192
+ l.join(e, "templates/lang-scala.md")
193
+ ).then((t) => t || this.getScalaFallbackTemplate())
194
+ }
195
+ ];
196
+ }
197
+ getDependencyTagMap() {
198
+ return {
199
+ akka: "akka",
200
+ "akka-http": "akka-http",
201
+ play: "play",
202
+ "cats-effect": "cats",
203
+ zio: "zio",
204
+ scalatest: "scalatest"
205
+ };
206
+ }
207
+ detectFromSbt(e) {
208
+ const t = this.readFile(e, "build.sbt"), i = ["scala"], s = {};
209
+ if (t) {
210
+ const a = t.match(/name\s*:=\s*"([^"]+)"/);
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"), {
212
+ language: "Scala",
213
+ name: a?.[1] || this.getProjectName(e),
214
+ dependencies: s,
215
+ manifestFile: "build.sbt",
216
+ projectPath: e,
217
+ tags: i
218
+ };
219
+ }
220
+ return {
221
+ language: "Scala",
222
+ name: this.getProjectName(e),
223
+ dependencies: {},
224
+ manifestFile: "build.sbt",
225
+ projectPath: e,
226
+ tags: i
227
+ };
228
+ }
229
+ detectFromMill(e) {
230
+ return {
231
+ language: "Scala",
232
+ name: this.getProjectName(e),
233
+ dependencies: {},
234
+ manifestFile: "build.sc",
235
+ projectPath: e,
236
+ tags: ["scala"]
237
+ };
238
+ }
239
+ getScalaFallbackTemplate() {
240
+ return `# Scala Development Guidelines
241
+
242
+ ## Functional Programming
243
+ - Prefer immutable data structures
244
+ - Use case classes for data models
245
+ - Leverage pattern matching
246
+ - Use for-comprehensions for sequential operations
247
+
248
+ ## Collections
249
+ - Use immutable collections by default
250
+ - Leverage map, flatMap, filter, fold
251
+ - Understand lazy vs strict evaluation
252
+
253
+ ## Type System
254
+ - Use type inference where appropriate
255
+ - Leverage sealed traits for ADTs
256
+ - Use implicit conversions sparingly
257
+ `;
258
+ }
259
+ }
260
+ class g extends r {
261
+ constructor() {
262
+ super(...arguments), this.name = "kotlin", this.displayName = "Kotlin", this.version = "1.0.0", this.priority = 85;
263
+ }
264
+ async detect(e) {
265
+ if (!(this.fileExists(e, "build.gradle.kts") || this.fileExists(e, "settings.gradle.kts")))
266
+ return null;
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")), {
269
+ language: "Kotlin",
270
+ name: this.getProjectName(e),
271
+ dependencies: a,
272
+ manifestFile: "build.gradle.kts",
273
+ projectPath: e,
274
+ tags: s
275
+ };
276
+ }
277
+ getTemplates() {
278
+ const e = this.getDirname(import.meta.url);
279
+ return [
280
+ {
281
+ name: "kotlin-core",
282
+ tags: ["kotlin"],
283
+ content: () => this.loadTemplateFromFile(
284
+ l.join(e, "templates/lang-kotlin.md")
285
+ ).then((t) => t || this.getKotlinFallbackTemplate())
286
+ }
287
+ ];
288
+ }
289
+ getDependencyTagMap() {
290
+ return {
291
+ ktor: "ktor",
292
+ "spring-boot": "spring-boot",
293
+ exposed: "exposed",
294
+ "kotlinx-coroutines": "coroutines"
295
+ };
296
+ }
297
+ getKotlinFallbackTemplate() {
298
+ return `# Kotlin Development Guidelines
299
+
300
+ ## Language Features
301
+ - Use data classes for simple data holders
302
+ - Leverage null safety with ?
303
+ - Use scope functions (let, apply, run, with, also)
304
+ - Prefer extension functions over utility classes
305
+
306
+ ## Coroutines
307
+ - Use suspend functions for async operations
308
+ - Leverage Flow for reactive streams
309
+ - Understand structured concurrency
310
+
311
+ ## Collections
312
+ - Use collection builders and operations
313
+ - Leverage sequences for large datasets
314
+ - Understand the difference between List/MutableList
315
+ `;
316
+ }
317
+ }
318
+ class f extends r {
319
+ constructor() {
320
+ super(...arguments), this.name = "lua", this.displayName = "Lua", this.version = "1.0.0", this.priority = 75;
321
+ }
322
+ async detect(e) {
323
+ const i = this.listFiles(e)?.find((s) => s.endsWith(".rockspec"));
324
+ if (i || this.fileExists(e, "lua_modules")) {
325
+ const s = ["lua"];
326
+ return {
327
+ language: "Lua",
328
+ name: this.getProjectName(e),
329
+ dependencies: {},
330
+ manifestFile: i || "lua_modules",
331
+ projectPath: e,
332
+ tags: s
333
+ };
334
+ }
335
+ return null;
336
+ }
337
+ getTemplates() {
338
+ const e = this.getDirname(import.meta.url);
339
+ return [
340
+ {
341
+ name: "lua-core",
342
+ tags: ["lua"],
343
+ content: () => this.loadTemplateFromFile(
344
+ l.join(e, "templates/lang-lua.md")
345
+ ).then((t) => t || this.getLuaFallbackTemplate())
346
+ }
347
+ ];
348
+ }
349
+ getDependencyTagMap() {
350
+ return {
351
+ lapis: "lapis",
352
+ openresty: "openresty",
353
+ busted: "busted"
354
+ };
355
+ }
356
+ getLuaFallbackTemplate() {
357
+ return `# Lua Development Guidelines
358
+
359
+ ## Tables
360
+ - Tables are the primary data structure
361
+ - Use them for arrays, dictionaries, objects
362
+ - Arrays are 1-indexed
363
+
364
+ ## Metatables
365
+ - Use metatables for OOP patterns
366
+ - Implement __index for inheritance
367
+ - Leverage metamethods
368
+
369
+ ## Best Practices
370
+ - Keep functions small
371
+ - Use local variables for performance
372
+ - Understand upvalues and closures
373
+ `;
374
+ }
375
+ }
376
+ class h extends r {
377
+ constructor() {
378
+ super(...arguments), this.name = "r", this.displayName = "R", this.version = "1.0.0", this.priority = 75;
379
+ }
380
+ async detect(e) {
381
+ const i = this.listFiles(e)?.some((s) => s.endsWith(".Rproj"));
382
+ if (this.fileExists(e, "DESCRIPTION") || i) {
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 = "*"), {
387
+ language: "R",
388
+ name: c?.[1]?.trim() || this.getProjectName(e),
389
+ dependencies: a,
390
+ manifestFile: "DESCRIPTION",
391
+ projectPath: e,
392
+ tags: s
393
+ };
394
+ }
395
+ return {
396
+ language: "R",
397
+ name: this.getProjectName(e),
398
+ dependencies: {},
399
+ manifestFile: i ? ".Rproj" : "DESCRIPTION",
400
+ projectPath: e,
401
+ tags: s
402
+ };
403
+ }
404
+ return null;
405
+ }
406
+ getTemplates() {
407
+ const e = this.getDirname(import.meta.url);
408
+ return [
409
+ {
410
+ name: "r-core",
411
+ tags: ["r"],
412
+ content: () => this.loadTemplateFromFile(
413
+ l.join(e, "templates/lang-r.md")
414
+ ).then((t) => t || this.getRFallbackTemplate())
415
+ }
416
+ ];
417
+ }
418
+ getDependencyTagMap() {
419
+ return {
420
+ tidyverse: "tidyverse",
421
+ shiny: "shiny",
422
+ ggplot2: "ggplot2",
423
+ "data.table": "data-table"
424
+ };
425
+ }
426
+ getRFallbackTemplate() {
427
+ return `# R Development Guidelines
428
+
429
+ ## Tidyverse Principles
430
+ - Use pipes (%>% or |>) for data transformations
431
+ - Prefer dplyr verbs (select, filter, mutate, summarize)
432
+ - Use ggplot2 for visualization
433
+
434
+ ## Vectorization
435
+ - Operate on entire vectors, not loops
436
+ - Use apply family functions
437
+ - Leverage data.table for performance
438
+
439
+ ## Best Practices
440
+ - Document functions with roxygen2
441
+ - Write unit tests with testthat
442
+ - Use consistent naming (snake_case)
443
+ `;
444
+ }
445
+ }
446
+ class y extends r {
447
+ constructor() {
448
+ super(...arguments), this.name = "perl", this.displayName = "Perl", this.version = "1.0.0", this.priority = 70;
449
+ }
450
+ async detect(e) {
451
+ if (this.fileExists(e, "Makefile.PL") || this.fileExists(e, "Build.PL") || this.fileExists(e, "cpanfile")) {
452
+ const t = this.fileExists(e, "Makefile.PL") ? "Makefile.PL" : this.fileExists(e, "Build.PL") ? "Build.PL" : "cpanfile";
453
+ return {
454
+ language: "Perl",
455
+ name: this.getProjectName(e),
456
+ dependencies: {},
457
+ manifestFile: t,
458
+ projectPath: e,
459
+ tags: ["perl"]
460
+ };
461
+ }
462
+ return null;
463
+ }
464
+ getTemplates() {
465
+ const e = this.getDirname(import.meta.url);
466
+ return [
467
+ {
468
+ name: "perl-core",
469
+ tags: ["perl"],
470
+ content: () => this.loadTemplateFromFile(
471
+ l.join(e, "templates/lang-perl.md")
472
+ ).then((t) => t || this.getPerlFallbackTemplate())
473
+ }
474
+ ];
475
+ }
476
+ getDependencyTagMap() {
477
+ return {
478
+ Mojolicious: "mojolicious",
479
+ Dancer2: "dancer",
480
+ Catalyst: "catalyst"
481
+ };
482
+ }
483
+ getPerlFallbackTemplate() {
484
+ return `# Perl Development Guidelines
485
+
486
+ ## Modern Perl
487
+ - Use strict and warnings
488
+ - Leverage Moose/Moo for OOP
489
+ - Use Try::Tiny for exception handling
490
+
491
+ ## CPAN Modules
492
+ - Use cpanm for installation
493
+ - Declare dependencies in cpanfile
494
+ - Test with prove
495
+
496
+ ## Best Practices
497
+ - Follow PBP (Perl Best Practices)
498
+ - Use perlcritic for linting
499
+ - Write tests with Test::More
500
+ `;
501
+ }
502
+ }
503
+ class b extends r {
504
+ constructor() {
505
+ super(...arguments), this.name = "shell", this.displayName = "Shell", this.version = "1.0.0", this.priority = 60;
506
+ }
507
+ async detect(e) {
508
+ const t = this.listFiles(e);
509
+ if (t?.some(
510
+ (s) => s.endsWith(".sh") || s === "Makefile" || s.endsWith(".bash") || s.endsWith(".zsh")
511
+ )) {
512
+ const s = ["shell"];
513
+ if ((t?.filter(
514
+ (n) => n.endsWith(".sh") || n.endsWith(".bash") || n.endsWith(".zsh")
515
+ ).length || 0) >= 2 || t?.includes("install.sh") || t?.includes("setup.sh"))
516
+ return {
517
+ language: "Shell",
518
+ name: this.getProjectName(e),
519
+ dependencies: {},
520
+ manifestFile: "scripts",
521
+ projectPath: e,
522
+ tags: s
523
+ };
524
+ }
525
+ return null;
526
+ }
527
+ getTemplates() {
528
+ const e = this.getDirname(import.meta.url);
529
+ return [
530
+ {
531
+ name: "shell-core",
532
+ tags: ["shell"],
533
+ content: () => this.loadTemplateFromFile(
534
+ l.join(e, "templates/lang-shell.md")
535
+ ).then((t) => t || this.getShellFallbackTemplate())
536
+ }
537
+ ];
538
+ }
539
+ getDependencyTagMap() {
540
+ return {};
541
+ }
542
+ getShellFallbackTemplate() {
543
+ return `# Shell Script Development Guidelines
544
+
545
+ ## Best Practices
546
+ - Use #!/usr/bin/env bash for portability
547
+ - Always quote variables: "$var"
548
+ - Use set -euo pipefail for safety
549
+ - Check command existence with command -v
550
+
551
+ ## Error Handling
552
+ - Use trap for cleanup
553
+ - Check exit codes: if ! command; then
554
+ - Provide meaningful error messages
555
+
556
+ ## Functions
557
+ - Keep functions focused
558
+ - Use local variables
559
+ - Return meaningful exit codes
560
+ `;
561
+ }
562
+ }
12
563
  export {
13
- p as BasePlugin,
14
- y as CSharpPlugin,
15
- C as CppPlugin,
16
- u as GoPlugin,
17
- m as JavaPlugin,
18
- P as NodeJSPlugin,
19
- S as PHPPlugin,
20
- i as PythonPlugin,
21
- a as RubyPlugin,
22
- g as RustPlugin,
23
- R as SwiftPlugin
564
+ r as BasePlugin,
565
+ G as CSharpPlugin,
566
+ K as CppPlugin,
567
+ d as DartPlugin,
568
+ m as ElixirPlugin,
569
+ T as GoPlugin,
570
+ N as JavaPlugin,
571
+ g as KotlinPlugin,
572
+ f as LuaPlugin,
573
+ F as NodeJSPlugin,
574
+ C as PHPPlugin,
575
+ y as PerlPlugin,
576
+ D as PythonPlugin,
577
+ h as RPlugin,
578
+ L as RubyPlugin,
579
+ S as RustPlugin,
580
+ p as ScalaPlugin,
581
+ b as ShellPlugin,
582
+ I as SwiftPlugin
24
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;