@rigour-labs/core 1.2.1 → 1.5.0

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/discovery.js CHANGED
@@ -13,7 +13,7 @@ class DiscoveryService {
13
13
  const matches = {};
14
14
  // 1. Detect Role (ui, api, infra, data)
15
15
  for (const template of index_js_1.TEMPLATES) {
16
- const marker = await this.findFirstMarker(cwd, template.markers);
16
+ const marker = await this.findFirstMarker(cwd, template.markers, true); // Search content for roles too
17
17
  if (marker) {
18
18
  config = this.mergeConfig(config, template.config);
19
19
  matches.preset = { name: template.name, marker };
@@ -68,7 +68,7 @@ class DiscoveryService {
68
68
  }
69
69
  async findSourceFiles(cwd) {
70
70
  // Find a few files to sample
71
- const extensions = ['.ts', '.js', '.py', '.go', '.java', '.tf'];
71
+ const extensions = ['.ts', '.js', '.py', '.go', '.java', '.tf', 'package.json'];
72
72
  const samples = [];
73
73
  const files = await fs_extra_1.default.readdir(cwd);
74
74
  for (const file of files) {
@@ -5,7 +5,10 @@ exports.TEMPLATES = [
5
5
  {
6
6
  name: 'ui',
7
7
  markers: [
8
- 'package.json', // Check deps later
8
+ 'react',
9
+ 'next',
10
+ 'vue',
11
+ 'svelte',
9
12
  'next.config.js',
10
13
  'vite.config.ts',
11
14
  'tailwind.config.js',
@@ -27,10 +30,12 @@ exports.TEMPLATES = [
27
30
  {
28
31
  name: 'api',
29
32
  markers: [
33
+ 'express',
34
+ 'fastify',
35
+ 'nestjs',
30
36
  'go.mod',
31
37
  'requirements.txt',
32
38
  'pyproject.toml',
33
- 'package.json', // Check for backend frameworks later
34
39
  'app.py',
35
40
  'main.go',
36
41
  'index.js',
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@rigour-labs/core",
3
- "version": "1.2.1",
3
+ "version": "1.5.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/erashu212/rigour"
8
+ "url": "https://github.com/rigour-labs/rigour"
9
9
  },
10
10
  "publishConfig": {
11
11
  "access": "public",
package/src/discovery.ts CHANGED
@@ -18,7 +18,7 @@ export class DiscoveryService {
18
18
 
19
19
  // 1. Detect Role (ui, api, infra, data)
20
20
  for (const template of TEMPLATES) {
21
- const marker = await this.findFirstMarker(cwd, template.markers);
21
+ const marker = await this.findFirstMarker(cwd, template.markers, true); // Search content for roles too
22
22
  if (marker) {
23
23
  config = this.mergeConfig(config, template.config);
24
24
  matches.preset = { name: template.name, marker };
@@ -79,7 +79,7 @@ export class DiscoveryService {
79
79
 
80
80
  private async findSourceFiles(cwd: string): Promise<string[]> {
81
81
  // Find a few files to sample
82
- const extensions = ['.ts', '.js', '.py', '.go', '.java', '.tf'];
82
+ const extensions = ['.ts', '.js', '.py', '.go', '.java', '.tf', 'package.json'];
83
83
  const samples: string[] = [];
84
84
 
85
85
  const files = await fs.readdir(cwd);
@@ -16,7 +16,10 @@ export const TEMPLATES: Template[] = [
16
16
  {
17
17
  name: 'ui',
18
18
  markers: [
19
- 'package.json', // Check deps later
19
+ 'react',
20
+ 'next',
21
+ 'vue',
22
+ 'svelte',
20
23
  'next.config.js',
21
24
  'vite.config.ts',
22
25
  'tailwind.config.js',
@@ -38,10 +41,12 @@ export const TEMPLATES: Template[] = [
38
41
  {
39
42
  name: 'api',
40
43
  markers: [
44
+ 'express',
45
+ 'fastify',
46
+ 'nestjs',
41
47
  'go.mod',
42
48
  'requirements.txt',
43
49
  'pyproject.toml',
44
- 'package.json', // Check for backend frameworks later
45
50
  'app.py',
46
51
  'main.go',
47
52
  'index.js',