@el-j/magic-helix-core 4.0.0-beta.2 → 4.0.0-beta.3
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-B88j4AyE.js +13 -0
- package/dist/index-B88j4AyE.js.map +1 -0
- package/dist/index-CY-pQbuu.cjs +2 -0
- package/dist/index-CY-pQbuu.cjs.map +1 -0
- package/dist/index.cjs +75 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +2234 -51
- package/dist/index.mjs.map +1 -1
- package/dist/pattern-combiner.d.ts +1 -1
- package/dist/plugin-loader.d.ts +2 -1
- package/package.json +4 -4
- package/dist/BasePlugin-6wv0hYJ9.js +0 -98
- package/dist/BasePlugin-6wv0hYJ9.js.map +0 -1
- package/dist/BasePlugin-odQJAKA-.cjs +0 -2
- package/dist/BasePlugin-odQJAKA-.cjs.map +0 -1
- package/dist/builtin-plugins/base/BasePlugin.d.ts +0 -69
- package/dist/builtin-plugins/cpp/index.d.ts +0 -46
- package/dist/builtin-plugins/csharp/index.d.ts +0 -20
- package/dist/builtin-plugins/go/index.d.ts +0 -23
- package/dist/builtin-plugins/index.d.ts +0 -16
- package/dist/builtin-plugins/java/index.d.ts +0 -22
- package/dist/builtin-plugins/nodejs/index.d.ts +0 -44
- package/dist/builtin-plugins/php/index.d.ts +0 -20
- package/dist/builtin-plugins/python/index.d.ts +0 -27
- package/dist/builtin-plugins/ruby/index.d.ts +0 -20
- package/dist/builtin-plugins/rust/index.d.ts +0 -53
- package/dist/builtin-plugins/swift/index.d.ts +0 -22
- package/dist/default_templates/angular/angular-core.md +0 -19
- package/dist/default_templates/architecture/codeowners.md +0 -123
- package/dist/default_templates/architecture/monorepo.md +0 -146
- package/dist/default_templates/architecture/nx.md +0 -122
- package/dist/default_templates/architecture/turborepo.md +0 -114
- package/dist/default_templates/ci/github-actions.md +0 -268
- package/dist/default_templates/ci/gitlab-ci.md +0 -330
- package/dist/default_templates/containers/docker-multistage.md +0 -120
- package/dist/default_templates/containers/kubernetes-deploy.md +0 -210
- package/dist/default_templates/devops/docker-compose.md +0 -111
- package/dist/default_templates/devops/docker-dockerfile.md +0 -94
- package/dist/default_templates/devops/github-actions.md +0 -160
- package/dist/default_templates/devops/gitlab-ci.md +0 -210
- package/dist/default_templates/dotnet/framework-aspnetcore.md +0 -205
- package/dist/default_templates/dotnet/framework-blazor.md +0 -271
- package/dist/default_templates/dotnet/lang-csharp.md +0 -162
- package/dist/default_templates/generic/lang-typescript.md +0 -57
- package/dist/default_templates/generic/state-redux.md +0 -21
- package/dist/default_templates/generic/state-rxjs.md +0 -6
- package/dist/default_templates/generic/style-mui.md +0 -23
- package/dist/default_templates/generic/style-tailwind.md +0 -76
- package/dist/default_templates/generic/test-cypress.md +0 -21
- package/dist/default_templates/generic/test-jest.md +0 -20
- package/dist/default_templates/generic/test-playwright.md +0 -21
- package/dist/default_templates/generic/test-vitest.md +0 -131
- package/dist/default_templates/go/lang-go.md +0 -571
- package/dist/default_templates/java/build-gradle.md +0 -102
- package/dist/default_templates/java/build-maven.md +0 -86
- package/dist/default_templates/java/framework-spring-boot.md +0 -179
- package/dist/default_templates/java/lang-java.md +0 -78
- package/dist/default_templates/java/lang-kotlin.md +0 -88
- package/dist/default_templates/meta/magic-helix-meta.md +0 -213
- package/dist/default_templates/meta/meta-debug.md +0 -459
- package/dist/default_templates/meta/meta-implement.md +0 -450
- package/dist/default_templates/meta/meta-roadmap.md +0 -265
- package/dist/default_templates/nestjs/nestjs-core.md +0 -7
- package/dist/default_templates/patterns/architecture/clean-architecture.md +0 -469
- package/dist/default_templates/patterns/architecture/dependency-injection.md +0 -517
- package/dist/default_templates/patterns/architecture/domain-driven-design.md +0 -621
- package/dist/default_templates/patterns/architecture/layered-architecture.md +0 -382
- package/dist/default_templates/patterns/architecture/repository-pattern.md +0 -408
- package/dist/default_templates/patterns/domain-expertise/nextjs-rules.md +0 -115
- package/dist/default_templates/patterns/domain-expertise/react-patterns.md +0 -181
- package/dist/default_templates/patterns/domain-expertise/server-components.md +0 -212
- package/dist/default_templates/patterns/domain-expertise/shadcn-ui.md +0 -52
- package/dist/default_templates/patterns/domain-expertise/tailwind-patterns.md +0 -52
- package/dist/default_templates/patterns/environment/container-awareness.md +0 -17
- package/dist/default_templates/patterns/environment/ide-features.md +0 -17
- package/dist/default_templates/patterns/environment/os-commands.md +0 -17
- package/dist/default_templates/patterns/organization/heading-hierarchy.md +0 -103
- package/dist/default_templates/patterns/organization/sequential-workflows.md +0 -102
- package/dist/default_templates/patterns/organization/xml-rule-groups.md +0 -64
- package/dist/default_templates/patterns/reasoning/agent-loop.md +0 -151
- package/dist/default_templates/patterns/reasoning/confirmation-gates.md +0 -141
- package/dist/default_templates/patterns/reasoning/dependency-analysis.md +0 -132
- package/dist/default_templates/patterns/reasoning/one-tool-per-iteration.md +0 -152
- package/dist/default_templates/patterns/reasoning/preview-before-action.md +0 -194
- package/dist/default_templates/patterns/reasoning/reflection-checkpoints.md +0 -166
- package/dist/default_templates/patterns/reasoning/result-verification.md +0 -157
- package/dist/default_templates/patterns/reasoning/subtask-breakdown.md +0 -131
- package/dist/default_templates/patterns/reasoning/thinking-tags.md +0 -100
- package/dist/default_templates/patterns/role-definition/capability-declarations.md +0 -72
- package/dist/default_templates/patterns/role-definition/expert-identity.md +0 -45
- package/dist/default_templates/patterns/role-definition/scope-boundaries.md +0 -61
- package/dist/default_templates/patterns/safety/code-safety-rules.md +0 -17
- package/dist/default_templates/patterns/safety/credential-handling.md +0 -17
- package/dist/default_templates/patterns/safety/destructive-warnings.md +0 -17
- package/dist/default_templates/patterns/safety/refusal-messages.md +0 -17
- package/dist/default_templates/patterns/tone/adaptive-tone.md +0 -17
- package/dist/default_templates/patterns/tone/concise-communication.md +0 -17
- package/dist/default_templates/patterns/tone/forbidden-phrases.md +0 -17
- package/dist/default_templates/patterns/tool-guidelines/function-schemas.md +0 -143
- package/dist/default_templates/patterns/tool-guidelines/parameter-examples.md +0 -137
- package/dist/default_templates/patterns/tool-guidelines/usage-policies.md +0 -105
- package/dist/default_templates/php/framework-laravel.md +0 -112
- package/dist/default_templates/php/lang-php.md +0 -94
- package/dist/default_templates/python/lang-python.md +0 -508
- package/dist/default_templates/react/react-core.md +0 -677
- package/dist/default_templates/react/react-zustand.md +0 -7
- package/dist/default_templates/ruby/framework-rails.md +0 -309
- package/dist/default_templates/ruby/framework-sinatra.md +0 -227
- package/dist/default_templates/ruby/lang-ruby.md +0 -216
- package/dist/default_templates/rust/lang-rust.md +0 -89
- package/dist/default_templates/swift/framework-vapor.md +0 -352
- package/dist/default_templates/swift/lang-swift.md +0 -291
- package/dist/default_templates/vue/style-primevue.md +0 -6
- package/dist/default_templates/vue/style-quasar.md +0 -22
- package/dist/default_templates/vue/vue-core.md +0 -108
- package/dist/default_templates/vue/vue-pinia.md +0 -5
- package/dist/index-0GK4RlUx.js +0 -1748
- package/dist/index-0GK4RlUx.js.map +0 -1
- package/dist/index-AkVwRl-r.js +0 -92
- package/dist/index-AkVwRl-r.js.map +0 -1
- package/dist/index-B6BeG1yT.cjs +0 -68
- package/dist/index-B6BeG1yT.cjs.map +0 -1
- package/dist/index-B8pyjKdF.js +0 -94
- package/dist/index-B8pyjKdF.js.map +0 -1
- package/dist/index-BQ6v041y.js +0 -13
- package/dist/index-BQ6v041y.js.map +0 -1
- package/dist/index-Baxb1vI_.js +0 -210
- package/dist/index-Baxb1vI_.js.map +0 -1
- package/dist/index-Bg8DD8ku.js +0 -216
- package/dist/index-Bg8DD8ku.js.map +0 -1
- package/dist/index-BqTqxCpG.cjs +0 -89
- package/dist/index-BqTqxCpG.cjs.map +0 -1
- package/dist/index-Bv4Q1Pr7.cjs +0 -33
- package/dist/index-Bv4Q1Pr7.cjs.map +0 -1
- package/dist/index-CN8J45Nc.cjs +0 -24
- package/dist/index-CN8J45Nc.cjs.map +0 -1
- package/dist/index-CPbv2Od1.js +0 -62
- package/dist/index-CPbv2Od1.js.map +0 -1
- package/dist/index-Cf-MC6Al.js +0 -63
- package/dist/index-Cf-MC6Al.js.map +0 -1
- package/dist/index-DDPXXXDy.cjs +0 -19
- package/dist/index-DDPXXXDy.cjs.map +0 -1
- package/dist/index-DO30AzDe.cjs +0 -19
- package/dist/index-DO30AzDe.cjs.map +0 -1
- package/dist/index-DkvW5yBY.js +0 -2249
- package/dist/index-DkvW5yBY.js.map +0 -1
- package/dist/index-Dn1ehjIj.cjs +0 -80
- package/dist/index-Dn1ehjIj.cjs.map +0 -1
- package/dist/index-DqHvgoXJ.cjs +0 -19
- package/dist/index-DqHvgoXJ.cjs.map +0 -1
- package/dist/index-K39pdw94.cjs +0 -31
- package/dist/index-K39pdw94.cjs.map +0 -1
- package/dist/index-OT2XAJkc.js +0 -117
- package/dist/index-OT2XAJkc.js.map +0 -1
- package/dist/index-TPAX4XKg.cjs +0 -30
- package/dist/index-TPAX4XKg.cjs.map +0 -1
- package/dist/index-WmVSB57y.js +0 -107
- package/dist/index-WmVSB57y.js.map +0 -1
- package/dist/index-mYXvc3Fs.js +0 -68
- package/dist/index-mYXvc3Fs.js.map +0 -1
- package/dist/index-nioXOg4m.cjs +0 -76
- package/dist/index-nioXOg4m.cjs.map +0 -1
- package/dist/index-okhY3fWD.cjs +0 -2
- package/dist/index-okhY3fWD.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BasePlugin-6wv0hYJ9.js","sources":["../src/builtin-plugins/base/BasePlugin.ts"],"sourcesContent":["/**\n * Base Plugin Class\n *\n * Abstract base class providing common functionality for all language plugins.\n * Plugins should extend this class and implement the abstract methods.\n */\n\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport type {\n ConfigFileTagMap,\n DependencyTagMap,\n FileGlobTagMap,\n LanguagePlugin,\n ProjectMetadata,\n TemplateDefinition,\n} from '../../types';\n\nexport abstract class BasePlugin implements LanguagePlugin {\n abstract name: string;\n abstract displayName: string;\n abstract version: string;\n abstract priority: number;\n\n /**\n * Abstract method: Detect if this plugin applies to the project\n */\n abstract detect(projectPath: string): Promise<ProjectMetadata | null>;\n\n /**\n * Abstract method: Get templates provided by this plugin\n */\n abstract getTemplates(): TemplateDefinition[] | Promise<TemplateDefinition[]>;\n\n /**\n * Optional: Get dependency-to-tag mapping\n */\n getDependencyTagMap?(): DependencyTagMap;\n\n /**\n * Optional: Get config file-to-tag mapping\n */\n getConfigFileTagMap?(): ConfigFileTagMap;\n\n /**\n * Optional: Get file glob-to-tag mapping\n */\n getFileGlobTagMap?(): FileGlobTagMap;\n\n // Helper methods for common operations\n\n /**\n * Check if a file exists in the project\n */\n protected fileExists(projectPath: string, filename: string): boolean {\n return fs.existsSync(path.join(projectPath, filename));\n }\n\n /**\n * Read a file from the project\n */\n protected readFile(projectPath: string, filename: string): string | null {\n try {\n const filePath = path.join(projectPath, filename);\n if (fs.existsSync(filePath)) {\n return fs.readFileSync(filePath, 'utf-8');\n }\n } catch {\n // Ignore errors\n }\n return null;\n }\n\n /**\n * Parse JSON file from the project\n */\n protected readJSON<T = Record<string, unknown>>(\n projectPath: string,\n filename: string,\n ): T | null {\n try {\n const content = this.readFile(projectPath, filename);\n if (content) {\n return JSON.parse(content) as T;\n }\n } catch {\n // Ignore parse errors\n }\n return null;\n }\n\n /**\n * Get project name from path\n */\n protected getProjectName(projectPath: string): string {\n return path.basename(projectPath);\n }\n\n /**\n * Load template from file\n */\n protected async loadTemplateFromFile(\n templatePath: string,\n ): Promise<string | null> {\n try {\n if (fs.existsSync(templatePath)) {\n return fs.readFileSync(templatePath, 'utf-8');\n }\n } catch {\n // Ignore errors\n }\n return null;\n }\n\n /**\n * Create a template definition with lazy loading\n */\n protected createTemplate(\n name: string,\n tags: string[],\n contentOrPath: string | (() => string | Promise<string>),\n options: Partial<TemplateDefinition> = {},\n ): TemplateDefinition {\n return {\n name,\n tags,\n content:\n typeof contentOrPath === 'string' ? contentOrPath : contentOrPath,\n ...options,\n };\n }\n\n /**\n * Parse dependencies from package-like files\n */\n protected parseDependencies(\n obj: Record<string, unknown>,\n ...keys: string[]\n ): Record<string, string> {\n const deps: Record<string, string> = {};\n\n for (const key of keys) {\n const value = obj[key];\n if (value && typeof value === 'object') {\n Object.assign(deps, value);\n }\n }\n\n return deps;\n }\n\n /**\n * Find files matching a pattern\n */\n protected async findFiles(\n projectPath: string,\n pattern: string,\n ): Promise<string[]> {\n try {\n const { glob } = await import('glob');\n return await glob(pattern, {\n cwd: projectPath,\n absolute: false,\n });\n } catch {\n return [];\n }\n }\n\n /**\n * Check if any files exist matching a pattern\n */\n protected async hasFiles(\n projectPath: string,\n pattern: string,\n ): Promise<boolean> {\n const files = await this.findFiles(projectPath, pattern);\n return files.length > 0;\n }\n}\n"],"names":["BasePlugin","projectPath","filename","fs","path","filePath","content","templatePath","name","tags","contentOrPath","options","obj","keys","deps","key","value","pattern","glob"],"mappings":";;AAkBO,MAAeA,EAAqC;AAAA;AAAA;AAAA;AAAA;AAAA,EAoC/C,WAAWC,GAAqBC,GAA2B;AACnE,WAAOC,EAAG,WAAWC,EAAK,KAAKH,GAAaC,CAAQ,CAAC;AAAA,EACvD;AAAA;AAAA;AAAA;AAAA,EAKU,SAASD,GAAqBC,GAAiC;AACvE,QAAI;AACF,YAAMG,IAAWD,EAAK,KAAKH,GAAaC,CAAQ;AAChD,UAAIC,EAAG,WAAWE,CAAQ;AACxB,eAAOF,EAAG,aAAaE,GAAU,OAAO;AAAA,IAE5C,QAAQ;AAAA,IAER;AACA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKU,SACRJ,GACAC,GACU;AACV,QAAI;AACF,YAAMI,IAAU,KAAK,SAASL,GAAaC,CAAQ;AACnD,UAAII;AACF,eAAO,KAAK,MAAMA,CAAO;AAAA,IAE7B,QAAQ;AAAA,IAER;AACA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKU,eAAeL,GAA6B;AACpD,WAAOG,EAAK,SAASH,CAAW;AAAA,EAClC;AAAA;AAAA;AAAA;AAAA,EAKA,MAAgB,qBACdM,GACwB;AACxB,QAAI;AACF,UAAIJ,EAAG,WAAWI,CAAY;AAC5B,eAAOJ,EAAG,aAAaI,GAAc,OAAO;AAAA,IAEhD,QAAQ;AAAA,IAER;AACA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKU,eACRC,GACAC,GACAC,GACAC,IAAuC,CAAA,GACnB;AACpB,WAAO;AAAA,MACL,MAAAH;AAAA,MACA,MAAAC;AAAA,MACA,SACsCC;AAAA,MACtC,GAAGC;AAAA,IAAA;AAAA,EAEP;AAAA;AAAA;AAAA;AAAA,EAKU,kBACRC,MACGC,GACqB;AACxB,UAAMC,IAA+B,CAAA;AAErC,eAAWC,KAAOF,GAAM;AACtB,YAAMG,IAAQJ,EAAIG,CAAG;AACrB,MAAIC,KAAS,OAAOA,KAAU,YAC5B,OAAO,OAAOF,GAAME,CAAK;AAAA,IAE7B;AAEA,WAAOF;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,MAAgB,UACdb,GACAgB,GACmB;AACnB,QAAI;AACF,YAAM,EAAE,MAAAC,EAAA,IAAS,MAAM,OAAO,MAAM;AACpC,aAAO,MAAMA,EAAKD,GAAS;AAAA,QACzB,KAAKhB;AAAA,QACL,UAAU;AAAA,MAAA,CACX;AAAA,IACH,QAAQ;AACN,aAAO,CAAA;AAAA,IACT;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,MAAgB,SACdA,GACAgB,GACkB;AAElB,YADc,MAAM,KAAK,UAAUhB,GAAagB,CAAO,GAC1C,SAAS;AAAA,EACxB;AACF;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
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;
|
|
2
|
-
//# sourceMappingURL=BasePlugin-odQJAKA-.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BasePlugin-odQJAKA-.cjs","sources":["../src/builtin-plugins/base/BasePlugin.ts"],"sourcesContent":["/**\n * Base Plugin Class\n *\n * Abstract base class providing common functionality for all language plugins.\n * Plugins should extend this class and implement the abstract methods.\n */\n\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport type {\n ConfigFileTagMap,\n DependencyTagMap,\n FileGlobTagMap,\n LanguagePlugin,\n ProjectMetadata,\n TemplateDefinition,\n} from '../../types';\n\nexport abstract class BasePlugin implements LanguagePlugin {\n abstract name: string;\n abstract displayName: string;\n abstract version: string;\n abstract priority: number;\n\n /**\n * Abstract method: Detect if this plugin applies to the project\n */\n abstract detect(projectPath: string): Promise<ProjectMetadata | null>;\n\n /**\n * Abstract method: Get templates provided by this plugin\n */\n abstract getTemplates(): TemplateDefinition[] | Promise<TemplateDefinition[]>;\n\n /**\n * Optional: Get dependency-to-tag mapping\n */\n getDependencyTagMap?(): DependencyTagMap;\n\n /**\n * Optional: Get config file-to-tag mapping\n */\n getConfigFileTagMap?(): ConfigFileTagMap;\n\n /**\n * Optional: Get file glob-to-tag mapping\n */\n getFileGlobTagMap?(): FileGlobTagMap;\n\n // Helper methods for common operations\n\n /**\n * Check if a file exists in the project\n */\n protected fileExists(projectPath: string, filename: string): boolean {\n return fs.existsSync(path.join(projectPath, filename));\n }\n\n /**\n * Read a file from the project\n */\n protected readFile(projectPath: string, filename: string): string | null {\n try {\n const filePath = path.join(projectPath, filename);\n if (fs.existsSync(filePath)) {\n return fs.readFileSync(filePath, 'utf-8');\n }\n } catch {\n // Ignore errors\n }\n return null;\n }\n\n /**\n * Parse JSON file from the project\n */\n protected readJSON<T = Record<string, unknown>>(\n projectPath: string,\n filename: string,\n ): T | null {\n try {\n const content = this.readFile(projectPath, filename);\n if (content) {\n return JSON.parse(content) as T;\n }\n } catch {\n // Ignore parse errors\n }\n return null;\n }\n\n /**\n * Get project name from path\n */\n protected getProjectName(projectPath: string): string {\n return path.basename(projectPath);\n }\n\n /**\n * Load template from file\n */\n protected async loadTemplateFromFile(\n templatePath: string,\n ): Promise<string | null> {\n try {\n if (fs.existsSync(templatePath)) {\n return fs.readFileSync(templatePath, 'utf-8');\n }\n } catch {\n // Ignore errors\n }\n return null;\n }\n\n /**\n * Create a template definition with lazy loading\n */\n protected createTemplate(\n name: string,\n tags: string[],\n contentOrPath: string | (() => string | Promise<string>),\n options: Partial<TemplateDefinition> = {},\n ): TemplateDefinition {\n return {\n name,\n tags,\n content:\n typeof contentOrPath === 'string' ? contentOrPath : contentOrPath,\n ...options,\n };\n }\n\n /**\n * Parse dependencies from package-like files\n */\n protected parseDependencies(\n obj: Record<string, unknown>,\n ...keys: string[]\n ): Record<string, string> {\n const deps: Record<string, string> = {};\n\n for (const key of keys) {\n const value = obj[key];\n if (value && typeof value === 'object') {\n Object.assign(deps, value);\n }\n }\n\n return deps;\n }\n\n /**\n * Find files matching a pattern\n */\n protected async findFiles(\n projectPath: string,\n pattern: string,\n ): Promise<string[]> {\n try {\n const { glob } = await import('glob');\n return await glob(pattern, {\n cwd: projectPath,\n absolute: false,\n });\n } catch {\n return [];\n }\n }\n\n /**\n * Check if any files exist matching a pattern\n */\n protected async hasFiles(\n projectPath: string,\n pattern: string,\n ): Promise<boolean> {\n const files = await this.findFiles(projectPath, pattern);\n return files.length > 0;\n }\n}\n"],"names":["BasePlugin","projectPath","filename","fs","path","filePath","content","templatePath","name","tags","contentOrPath","options","obj","keys","deps","key","value","pattern","glob"],"mappings":"2yBAkBO,MAAeA,CAAqC,CAoC/C,WAAWC,EAAqBC,EAA2B,CACnE,OAAOC,EAAG,WAAWC,EAAK,KAAKH,EAAaC,CAAQ,CAAC,CACvD,CAKU,SAASD,EAAqBC,EAAiC,CACvE,GAAI,CACF,MAAMG,EAAWD,EAAK,KAAKH,EAAaC,CAAQ,EAChD,GAAIC,EAAG,WAAWE,CAAQ,EACxB,OAAOF,EAAG,aAAaE,EAAU,OAAO,CAE5C,MAAQ,CAER,CACA,OAAO,IACT,CAKU,SACRJ,EACAC,EACU,CACV,GAAI,CACF,MAAMI,EAAU,KAAK,SAASL,EAAaC,CAAQ,EACnD,GAAII,EACF,OAAO,KAAK,MAAMA,CAAO,CAE7B,MAAQ,CAER,CACA,OAAO,IACT,CAKU,eAAeL,EAA6B,CACpD,OAAOG,EAAK,SAASH,CAAW,CAClC,CAKA,MAAgB,qBACdM,EACwB,CACxB,GAAI,CACF,GAAIJ,EAAG,WAAWI,CAAY,EAC5B,OAAOJ,EAAG,aAAaI,EAAc,OAAO,CAEhD,MAAQ,CAER,CACA,OAAO,IACT,CAKU,eACRC,EACAC,EACAC,EACAC,EAAuC,CAAA,EACnB,CACpB,MAAO,CACL,KAAAH,EACA,KAAAC,EACA,QACsCC,EACtC,GAAGC,CAAA,CAEP,CAKU,kBACRC,KACGC,EACqB,CACxB,MAAMC,EAA+B,CAAA,EAErC,UAAWC,KAAOF,EAAM,CACtB,MAAMG,EAAQJ,EAAIG,CAAG,EACjBC,GAAS,OAAOA,GAAU,UAC5B,OAAO,OAAOF,EAAME,CAAK,CAE7B,CAEA,OAAOF,CACT,CAKA,MAAgB,UACdb,EACAgB,EACmB,CACnB,GAAI,CACF,KAAM,CAAE,KAAAC,CAAA,EAAS,KAAM,QAAO,MAAM,EACpC,OAAO,MAAMA,EAAKD,EAAS,CACzB,IAAKhB,EACL,SAAU,EAAA,CACX,CACH,MAAQ,CACN,MAAO,CAAA,CACT,CACF,CAKA,MAAgB,SACdA,EACAgB,EACkB,CAElB,OADc,MAAM,KAAK,UAAUhB,EAAagB,CAAO,GAC1C,OAAS,CACxB,CACF"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base Plugin Class
|
|
3
|
-
*
|
|
4
|
-
* Abstract base class providing common functionality for all language plugins.
|
|
5
|
-
* Plugins should extend this class and implement the abstract methods.
|
|
6
|
-
*/
|
|
7
|
-
import type { ConfigFileTagMap, DependencyTagMap, FileGlobTagMap, LanguagePlugin, ProjectMetadata, TemplateDefinition } from '../../types';
|
|
8
|
-
export declare abstract class BasePlugin implements LanguagePlugin {
|
|
9
|
-
abstract name: string;
|
|
10
|
-
abstract displayName: string;
|
|
11
|
-
abstract version: string;
|
|
12
|
-
abstract priority: number;
|
|
13
|
-
/**
|
|
14
|
-
* Abstract method: Detect if this plugin applies to the project
|
|
15
|
-
*/
|
|
16
|
-
abstract detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
17
|
-
/**
|
|
18
|
-
* Abstract method: Get templates provided by this plugin
|
|
19
|
-
*/
|
|
20
|
-
abstract getTemplates(): TemplateDefinition[] | Promise<TemplateDefinition[]>;
|
|
21
|
-
/**
|
|
22
|
-
* Optional: Get dependency-to-tag mapping
|
|
23
|
-
*/
|
|
24
|
-
getDependencyTagMap?(): DependencyTagMap;
|
|
25
|
-
/**
|
|
26
|
-
* Optional: Get config file-to-tag mapping
|
|
27
|
-
*/
|
|
28
|
-
getConfigFileTagMap?(): ConfigFileTagMap;
|
|
29
|
-
/**
|
|
30
|
-
* Optional: Get file glob-to-tag mapping
|
|
31
|
-
*/
|
|
32
|
-
getFileGlobTagMap?(): FileGlobTagMap;
|
|
33
|
-
/**
|
|
34
|
-
* Check if a file exists in the project
|
|
35
|
-
*/
|
|
36
|
-
protected fileExists(projectPath: string, filename: string): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Read a file from the project
|
|
39
|
-
*/
|
|
40
|
-
protected readFile(projectPath: string, filename: string): string | null;
|
|
41
|
-
/**
|
|
42
|
-
* Parse JSON file from the project
|
|
43
|
-
*/
|
|
44
|
-
protected readJSON<T = Record<string, unknown>>(projectPath: string, filename: string): T | null;
|
|
45
|
-
/**
|
|
46
|
-
* Get project name from path
|
|
47
|
-
*/
|
|
48
|
-
protected getProjectName(projectPath: string): string;
|
|
49
|
-
/**
|
|
50
|
-
* Load template from file
|
|
51
|
-
*/
|
|
52
|
-
protected loadTemplateFromFile(templatePath: string): Promise<string | null>;
|
|
53
|
-
/**
|
|
54
|
-
* Create a template definition with lazy loading
|
|
55
|
-
*/
|
|
56
|
-
protected createTemplate(name: string, tags: string[], contentOrPath: string | (() => string | Promise<string>), options?: Partial<TemplateDefinition>): TemplateDefinition;
|
|
57
|
-
/**
|
|
58
|
-
* Parse dependencies from package-like files
|
|
59
|
-
*/
|
|
60
|
-
protected parseDependencies(obj: Record<string, unknown>, ...keys: string[]): Record<string, string>;
|
|
61
|
-
/**
|
|
62
|
-
* Find files matching a pattern
|
|
63
|
-
*/
|
|
64
|
-
protected findFiles(projectPath: string, pattern: string): Promise<string[]>;
|
|
65
|
-
/**
|
|
66
|
-
* Check if any files exist matching a pattern
|
|
67
|
-
*/
|
|
68
|
-
protected hasFiles(projectPath: string, pattern: string): Promise<boolean>;
|
|
69
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* C/C++ Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects C/C++ projects via:
|
|
5
|
-
* - platformio.ini (PlatformIO/ESP32/Arduino)
|
|
6
|
-
* - CMakeLists.txt (CMake)
|
|
7
|
-
* - Makefile
|
|
8
|
-
* - *.ino files (Arduino sketches)
|
|
9
|
-
* - .cpp/.h files
|
|
10
|
-
*/
|
|
11
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
12
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
13
|
-
export declare class CppPlugin extends BasePlugin {
|
|
14
|
-
name: string;
|
|
15
|
-
displayName: string;
|
|
16
|
-
version: string;
|
|
17
|
-
priority: number;
|
|
18
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
19
|
-
/**
|
|
20
|
-
* Parse platformio.ini configuration
|
|
21
|
-
*/
|
|
22
|
-
private detectPlatformIO;
|
|
23
|
-
getTemplates(): TemplateDefinition[];
|
|
24
|
-
getDependencyTagMap(): {
|
|
25
|
-
boost: string;
|
|
26
|
-
fmt: string;
|
|
27
|
-
spdlog: string;
|
|
28
|
-
googletest: string;
|
|
29
|
-
catch2: string;
|
|
30
|
-
'Adafruit GFX Library': string;
|
|
31
|
-
WiFi: string;
|
|
32
|
-
ESP32: string;
|
|
33
|
-
FastLED: string;
|
|
34
|
-
ArduinoJson: string;
|
|
35
|
-
};
|
|
36
|
-
getConfigFileTagMap(): {
|
|
37
|
-
'platformio.ini': string;
|
|
38
|
-
'CMakeLists.txt': string;
|
|
39
|
-
Makefile: string;
|
|
40
|
-
'.clang-format': string;
|
|
41
|
-
'.clang-tidy': string;
|
|
42
|
-
};
|
|
43
|
-
private getCppTemplate;
|
|
44
|
-
private getPlatformIOTemplate;
|
|
45
|
-
private getArduinoTemplate;
|
|
46
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* C# / .NET Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects C# projects via .csproj files
|
|
5
|
-
*/
|
|
6
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
7
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
8
|
-
export declare class CSharpPlugin extends BasePlugin {
|
|
9
|
-
name: string;
|
|
10
|
-
displayName: string;
|
|
11
|
-
version: string;
|
|
12
|
-
priority: number;
|
|
13
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
14
|
-
getTemplates(): TemplateDefinition[];
|
|
15
|
-
getDependencyTagMap(): {
|
|
16
|
-
'Microsoft.AspNetCore': string;
|
|
17
|
-
xunit: string;
|
|
18
|
-
NUnit: string;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Go Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects Go projects via go.mod file
|
|
5
|
-
* Parses module dependencies from go.mod
|
|
6
|
-
*/
|
|
7
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
8
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
9
|
-
export declare class GoPlugin extends BasePlugin {
|
|
10
|
-
name: string;
|
|
11
|
-
displayName: string;
|
|
12
|
-
version: string;
|
|
13
|
-
priority: number;
|
|
14
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
15
|
-
getTemplates(): TemplateDefinition[];
|
|
16
|
-
getDependencyTagMap(): {
|
|
17
|
-
'github.com/gin-gonic/gin': string;
|
|
18
|
-
'github.com/gofiber/fiber': string;
|
|
19
|
-
'github.com/labstack/echo': string;
|
|
20
|
-
'gorm.io/gorm': string;
|
|
21
|
-
};
|
|
22
|
-
private getGoTemplate;
|
|
23
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Magic Helix Language Plugins
|
|
3
|
-
*
|
|
4
|
-
* Built-in language detection plugins for popular languages.
|
|
5
|
-
*/
|
|
6
|
-
export { BasePlugin } from './base/BasePlugin';
|
|
7
|
-
export { NodeJSPlugin } from './nodejs';
|
|
8
|
-
export { GoPlugin } from './go';
|
|
9
|
-
export { PythonPlugin } from './python';
|
|
10
|
-
export { RustPlugin } from './rust';
|
|
11
|
-
export { JavaPlugin } from './java';
|
|
12
|
-
export { RubyPlugin } from './ruby';
|
|
13
|
-
export { PHPPlugin } from './php';
|
|
14
|
-
export { CSharpPlugin } from './csharp';
|
|
15
|
-
export { SwiftPlugin } from './swift';
|
|
16
|
-
export { CppPlugin } from './cpp';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Java Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects Java projects via pom.xml (Maven) or build.gradle (Gradle)
|
|
5
|
-
*/
|
|
6
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
7
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
8
|
-
export declare class JavaPlugin extends BasePlugin {
|
|
9
|
-
name: string;
|
|
10
|
-
displayName: string;
|
|
11
|
-
version: string;
|
|
12
|
-
priority: number;
|
|
13
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
14
|
-
getTemplates(): TemplateDefinition[];
|
|
15
|
-
getDependencyTagMap(): {
|
|
16
|
-
'org.springframework.boot:spring-boot': string;
|
|
17
|
-
'spring-boot-starter': string;
|
|
18
|
-
junit: string;
|
|
19
|
-
};
|
|
20
|
-
private detectMaven;
|
|
21
|
-
private detectGradle;
|
|
22
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node.js Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects Node.js/JavaScript/TypeScript projects via package.json
|
|
5
|
-
* Supports npm workspaces for monorepo detection
|
|
6
|
-
*/
|
|
7
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
8
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
9
|
-
export declare class NodeJSPlugin extends BasePlugin {
|
|
10
|
-
name: string;
|
|
11
|
-
displayName: string;
|
|
12
|
-
version: string;
|
|
13
|
-
priority: number;
|
|
14
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
15
|
-
getTemplates(): TemplateDefinition[];
|
|
16
|
-
getDependencyTagMap(): {
|
|
17
|
-
react: string;
|
|
18
|
-
'react-dom': string;
|
|
19
|
-
vue: string;
|
|
20
|
-
'@vue/runtime-core': string;
|
|
21
|
-
pinia: string;
|
|
22
|
-
'@nestjs/core': string;
|
|
23
|
-
tailwindcss: string;
|
|
24
|
-
vitest: string;
|
|
25
|
-
zustand: string;
|
|
26
|
-
typescript: string;
|
|
27
|
-
};
|
|
28
|
-
getConfigFileTagMap(): {
|
|
29
|
-
'tailwind.config.js': string;
|
|
30
|
-
'tailwind.config.ts': string;
|
|
31
|
-
'vitest.config.js': string;
|
|
32
|
-
'vitest.config.ts': string;
|
|
33
|
-
'tsconfig.json': string;
|
|
34
|
-
};
|
|
35
|
-
private extractWorkspaces;
|
|
36
|
-
private getTypescriptTemplate;
|
|
37
|
-
private getReactTemplate;
|
|
38
|
-
private getReactZustandTemplate;
|
|
39
|
-
private getVueTemplate;
|
|
40
|
-
private getVuePiniaTemplate;
|
|
41
|
-
private getNestJSTemplate;
|
|
42
|
-
private getTailwindTemplate;
|
|
43
|
-
private getVitestTemplate;
|
|
44
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PHP Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects PHP projects via composer.json
|
|
5
|
-
*/
|
|
6
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
7
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
8
|
-
export declare class PHPPlugin extends BasePlugin {
|
|
9
|
-
name: string;
|
|
10
|
-
displayName: string;
|
|
11
|
-
version: string;
|
|
12
|
-
priority: number;
|
|
13
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
14
|
-
getTemplates(): TemplateDefinition[];
|
|
15
|
-
getDependencyTagMap(): {
|
|
16
|
-
'laravel/framework': string;
|
|
17
|
-
'symfony/symfony': string;
|
|
18
|
-
'phpunit/phpunit': string;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Python Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects Python projects via pyproject.toml, requirements.txt, or setup.py
|
|
5
|
-
* Supports Poetry, pip, and setuptools project formats
|
|
6
|
-
*/
|
|
7
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
8
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
9
|
-
export declare class PythonPlugin extends BasePlugin {
|
|
10
|
-
name: string;
|
|
11
|
-
displayName: string;
|
|
12
|
-
version: string;
|
|
13
|
-
priority: number;
|
|
14
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
15
|
-
getTemplates(): TemplateDefinition[];
|
|
16
|
-
getDependencyTagMap(): {
|
|
17
|
-
django: string;
|
|
18
|
-
flask: string;
|
|
19
|
-
fastapi: string;
|
|
20
|
-
pytest: string;
|
|
21
|
-
numpy: string;
|
|
22
|
-
pandas: string;
|
|
23
|
-
};
|
|
24
|
-
private detectFromPyproject;
|
|
25
|
-
private detectFromRequirements;
|
|
26
|
-
private getPythonTemplate;
|
|
27
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ruby Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects Ruby projects via Gemfile
|
|
5
|
-
*/
|
|
6
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
7
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
8
|
-
export declare class RubyPlugin extends BasePlugin {
|
|
9
|
-
name: string;
|
|
10
|
-
displayName: string;
|
|
11
|
-
version: string;
|
|
12
|
-
priority: number;
|
|
13
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
14
|
-
getTemplates(): TemplateDefinition[];
|
|
15
|
-
getDependencyTagMap(): {
|
|
16
|
-
rails: string;
|
|
17
|
-
rspec: string;
|
|
18
|
-
sinatra: string;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rust Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects Rust projects via Cargo.toml with hardware-aware heuristics.
|
|
5
|
-
*/
|
|
6
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
7
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
8
|
-
export declare class RustPlugin extends BasePlugin {
|
|
9
|
-
name: string;
|
|
10
|
-
displayName: string;
|
|
11
|
-
version: string;
|
|
12
|
-
priority: number;
|
|
13
|
-
private static readonly EMBEDDED_DEPENDENCIES;
|
|
14
|
-
private static readonly EMBEDDED_KEYWORDS;
|
|
15
|
-
private static readonly HARDWARE_NAME_HINTS;
|
|
16
|
-
private static readonly CARGO_CONFIG_FILES;
|
|
17
|
-
private static readonly MEMORY_LAYOUT_FILES;
|
|
18
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
19
|
-
getTemplates(): TemplateDefinition[];
|
|
20
|
-
getDependencyTagMap(): {
|
|
21
|
-
tokio: string;
|
|
22
|
-
'actix-web': string;
|
|
23
|
-
rocket: string;
|
|
24
|
-
serde: string;
|
|
25
|
-
'embedded-hal': string;
|
|
26
|
-
'embedded-hal-async': string;
|
|
27
|
-
'cortex-m': string;
|
|
28
|
-
'cortex-m-rt': string;
|
|
29
|
-
'cortex-m-rtic': string;
|
|
30
|
-
rtic: string;
|
|
31
|
-
hardware2rust: string;
|
|
32
|
-
'probe-run': string;
|
|
33
|
-
'probe-rs': string;
|
|
34
|
-
defmt: string;
|
|
35
|
-
heapless: string;
|
|
36
|
-
'rp2040-hal': string;
|
|
37
|
-
'nrf52840-hal': string;
|
|
38
|
-
'stm32f4xx-hal': string;
|
|
39
|
-
'esp-idf-hal': string;
|
|
40
|
-
};
|
|
41
|
-
private parseManifest;
|
|
42
|
-
private extractDependenciesFromManifest;
|
|
43
|
-
private collectDependencies;
|
|
44
|
-
private normalizeDependencyVersion;
|
|
45
|
-
private extractWorkspaceMembers;
|
|
46
|
-
private fallbackWorkspaceMembers;
|
|
47
|
-
private extractDependenciesFromText;
|
|
48
|
-
private extractSection;
|
|
49
|
-
private parseDependencyLines;
|
|
50
|
-
private extractNameFromContent;
|
|
51
|
-
private extractDescriptionFromContent;
|
|
52
|
-
private computeProjectTags;
|
|
53
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Swift Language Plugin
|
|
3
|
-
*
|
|
4
|
-
* Detects Swift projects via Package.swift, .xcodeproj, or .xcworkspace
|
|
5
|
-
*/
|
|
6
|
-
import type { ProjectMetadata, TemplateDefinition } from '../../types';
|
|
7
|
-
import { BasePlugin } from '../base/BasePlugin';
|
|
8
|
-
export declare class SwiftPlugin extends BasePlugin {
|
|
9
|
-
name: string;
|
|
10
|
-
displayName: string;
|
|
11
|
-
version: string;
|
|
12
|
-
priority: number;
|
|
13
|
-
detect(projectPath: string): Promise<ProjectMetadata | null>;
|
|
14
|
-
getTemplates(): TemplateDefinition[];
|
|
15
|
-
getDependencyTagMap(): {
|
|
16
|
-
vapor: string;
|
|
17
|
-
Vapor: string;
|
|
18
|
-
swift: string;
|
|
19
|
-
};
|
|
20
|
-
private detectSPM;
|
|
21
|
-
private detectXcode;
|
|
22
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Framework: Angular
|
|
2
|
-
- **ALWAYS** use Angular standalone components.
|
|
3
|
-
- **ALWAYS** use signals for reactive state management.
|
|
4
|
-
- **NEVER** use NgModules for new components.
|
|
5
|
-
- **ALWAYS** use TypeScript strict mode.
|
|
6
|
-
- **ALWAYS** use the `OnPush` change detection strategy.
|
|
7
|
-
- **DEPENDENCY INJECTION**: Use constructor injection with `inject()` function in standalone components.
|
|
8
|
-
- **SIGNALS**: Use `signal()` for primitive values and `computed()` for derived state.
|
|
9
|
-
- **EFFECTS**: Use `effect()` for side effects that react to signal changes.
|
|
10
|
-
- **INPUTS**: Define component inputs with `input()` function.
|
|
11
|
-
- **OUTPUTS**: Define component outputs with `output()` function.
|
|
12
|
-
- **CONTROL FLOW**: Use `@if`, `@for`, and `@switch` for template control flow.
|
|
13
|
-
- **LIFECYCLE**: Use `DestroyRef` and `takeUntilDestroyed()` for subscription cleanup.
|
|
14
|
-
- **SERVICES**: Create injectable services with `injectable()` function.
|
|
15
|
-
- **ROUTING**: Use functional guards and resolvers with dependency injection.
|
|
16
|
-
- **FORMS**: Use reactive forms with `FormControl`, `FormGroup`, and `FormArray`.
|
|
17
|
-
- **HTTP**: Use `HttpClient` with proper error handling and interceptors.
|
|
18
|
-
- **TESTING**: Use `TestBed` for integration tests and direct instantiation for unit tests.
|
|
19
|
-
- **NAMING**: Use PascalCase for component classes and kebab-case for selectors.
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# CODEOWNERS Guidelines
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
This project uses CODEOWNERS file to define code ownership and automate review requests.
|
|
5
|
-
|
|
6
|
-
## File Location
|
|
7
|
-
- `.github/CODEOWNERS` (recommended)
|
|
8
|
-
- `CODEOWNERS` (root)
|
|
9
|
-
- `docs/CODEOWNERS`
|
|
10
|
-
|
|
11
|
-
## Syntax
|
|
12
|
-
```
|
|
13
|
-
# Comments start with #
|
|
14
|
-
# Each line: pattern followed by owners
|
|
15
|
-
|
|
16
|
-
# Default owners for everything
|
|
17
|
-
* @org/default-team
|
|
18
|
-
|
|
19
|
-
# Specific directories
|
|
20
|
-
/docs/ @org/docs-team @user1
|
|
21
|
-
/src/api/ @org/backend-team
|
|
22
|
-
/src/ui/ @org/frontend-team
|
|
23
|
-
|
|
24
|
-
# Specific files
|
|
25
|
-
package.json @org/platform-team
|
|
26
|
-
Dockerfile @org/devops-team
|
|
27
|
-
|
|
28
|
-
# Wildcards
|
|
29
|
-
*.md @org/docs-team
|
|
30
|
-
**/*.test.ts @org/qa-team
|
|
31
|
-
|
|
32
|
-
# Multiple owners
|
|
33
|
-
/src/auth/ @org/security-team @org/backend-team
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Pattern Matching
|
|
37
|
-
- `*`: Matches any files
|
|
38
|
-
- `**`: Matches directories recursively
|
|
39
|
-
- `?`: Matches single character
|
|
40
|
-
- `[abc]`: Matches a, b, or c
|
|
41
|
-
- Last matching pattern takes precedence
|
|
42
|
-
|
|
43
|
-
## Owner Types
|
|
44
|
-
- Individual users: `@username`
|
|
45
|
-
- Teams: `@org/team-name`
|
|
46
|
-
- Email addresses: `user@example.com`
|
|
47
|
-
|
|
48
|
-
## Best Practices
|
|
49
|
-
- Define default owners at the top
|
|
50
|
-
- Be specific with critical paths
|
|
51
|
-
- Assign multiple owners for coverage
|
|
52
|
-
- Keep teams small and focused
|
|
53
|
-
- Document ownership rationale
|
|
54
|
-
- Review and update regularly
|
|
55
|
-
|
|
56
|
-
## Review Requirements
|
|
57
|
-
- Owners are automatically requested for reviews
|
|
58
|
-
- Can require approval from code owners (branch protection)
|
|
59
|
-
- Blocks merge without owner approval
|
|
60
|
-
|
|
61
|
-
## Responsibilities
|
|
62
|
-
- Code owners should:
|
|
63
|
-
- Review PRs affecting their code
|
|
64
|
-
- Maintain code quality
|
|
65
|
-
- Update documentation
|
|
66
|
-
- Mentor contributors
|
|
67
|
-
- Keep ownership updated
|
|
68
|
-
|
|
69
|
-
## Common Patterns
|
|
70
|
-
```
|
|
71
|
-
# Backend API
|
|
72
|
-
/src/api/**/*.ts @org/backend-team
|
|
73
|
-
|
|
74
|
-
# Frontend Components
|
|
75
|
-
/src/components/**/*.tsx @org/frontend-team
|
|
76
|
-
|
|
77
|
-
# Infrastructure
|
|
78
|
-
/infrastructure/ @org/devops-team
|
|
79
|
-
/.github/workflows/ @org/devops-team
|
|
80
|
-
|
|
81
|
-
# Documentation
|
|
82
|
-
/docs/ @org/docs-team
|
|
83
|
-
*.md @org/docs-team
|
|
84
|
-
|
|
85
|
-
# Configuration
|
|
86
|
-
*.config.js @org/platform-team
|
|
87
|
-
package.json @org/platform-team
|
|
88
|
-
|
|
89
|
-
# Database
|
|
90
|
-
/migrations/ @org/backend-team @org/dba-team
|
|
91
|
-
|
|
92
|
-
# Security
|
|
93
|
-
/src/auth/ @org/security-team
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Branch Protection
|
|
97
|
-
- Enable "Require review from Code Owners"
|
|
98
|
-
- Set minimum number of approvals
|
|
99
|
-
- Dismiss stale reviews on push
|
|
100
|
-
|
|
101
|
-
## Notifications
|
|
102
|
-
- Owners receive review requests
|
|
103
|
-
- Configure notification preferences
|
|
104
|
-
- Use team mentions for broader awareness
|
|
105
|
-
|
|
106
|
-
## Troubleshooting
|
|
107
|
-
- Validate CODEOWNERS syntax
|
|
108
|
-
- Check team membership
|
|
109
|
-
- Verify file patterns match
|
|
110
|
-
- Test with specific files
|
|
111
|
-
|
|
112
|
-
## Integration
|
|
113
|
-
- Works with pull requests
|
|
114
|
-
- Integrates with branch protection
|
|
115
|
-
- Appears in PR sidebar
|
|
116
|
-
- Can be queried via API
|
|
117
|
-
|
|
118
|
-
## Maintenance
|
|
119
|
-
- Review quarterly
|
|
120
|
-
- Update for new teams/members
|
|
121
|
-
- Remove inactive owners
|
|
122
|
-
- Refactor for restructuring
|
|
123
|
-
- Document in team wiki
|