devcache-hub 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +92 -0
- package/bin/devcache.js +3 -0
- package/dist/cli/commands/generate.d.ts +2 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +36 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +77 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/login.d.ts +2 -0
- package/dist/cli/commands/login.d.ts.map +1 -0
- package/dist/cli/commands/login.js +39 -0
- package/dist/cli/commands/login.js.map +1 -0
- package/dist/cli/commands/push.d.ts +2 -0
- package/dist/cli/commands/push.d.ts.map +1 -0
- package/dist/cli/commands/push.js +30 -0
- package/dist/cli/commands/push.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +41 -0
- package/dist/cli/index.js.map +1 -0
- package/package.json +67 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DevCache Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# DevCache Hub
|
|
2
|
+
|
|
3
|
+
> Intelligent project documentation generator with cloud sync and RAG-powered search
|
|
4
|
+
|
|
5
|
+
DevCache Hub automatically analyzes your codebase and generates comprehensive, structured documentation. Push your docs to the cloud and leverage RAG (Retrieval-Augmented Generation) for intelligent search.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- š¤ **Automatic Analysis** - Scans your project and extracts insights
|
|
10
|
+
- š **Template-Based Docs** - Generates organized markdown documentation
|
|
11
|
+
- āļø **Cloud Sync** - Push documentation to Supabase
|
|
12
|
+
- š **RAG Search** - AI-powered semantic search through your docs
|
|
13
|
+
- šÆ **Multi-Category** - Separates general and technical documentation
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g devcache-hub
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Initialize in your project
|
|
25
|
+
cd my-project
|
|
26
|
+
devcache init
|
|
27
|
+
|
|
28
|
+
# Generate documentation
|
|
29
|
+
devcache generate
|
|
30
|
+
|
|
31
|
+
# Login to sync
|
|
32
|
+
devcache login
|
|
33
|
+
|
|
34
|
+
# Push to cloud
|
|
35
|
+
devcache push
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Documentation Structure
|
|
39
|
+
|
|
40
|
+
DevCache generates documentation in two categories:
|
|
41
|
+
|
|
42
|
+
### General
|
|
43
|
+
- `project-overview.md` - Project purpose and objectives
|
|
44
|
+
- `project-impact.md` - Problem statement and solution approach
|
|
45
|
+
|
|
46
|
+
### Technical
|
|
47
|
+
- `architecture-project.md` - System architecture overview
|
|
48
|
+
- `stack-project.md` - Technology stack analysis
|
|
49
|
+
- `features.md` - Main features and API endpoints
|
|
50
|
+
|
|
51
|
+
## Configuration
|
|
52
|
+
|
|
53
|
+
DevCache creates a `.devcache.json` file in your project:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"projectName": "my-project",
|
|
58
|
+
"outputDir": ".devcache/docs",
|
|
59
|
+
"templates": {
|
|
60
|
+
"general": ["project-overview", "project-impact"],
|
|
61
|
+
"tech": ["architecture-project", "stack-project", "features"]
|
|
62
|
+
},
|
|
63
|
+
"supabase": {
|
|
64
|
+
"enabled": true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Commands
|
|
70
|
+
|
|
71
|
+
- `devcache init` - Initialize DevCache in your project
|
|
72
|
+
- `devcache generate` - Generate documentation
|
|
73
|
+
- `devcache login` - Authenticate with Supabase
|
|
74
|
+
- `devcache push` - Push documentation to cloud
|
|
75
|
+
- `devcache status` - Check sync status
|
|
76
|
+
|
|
77
|
+
## Requirements
|
|
78
|
+
|
|
79
|
+
- Node.js >= 18.0.0
|
|
80
|
+
- npm or yarn
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
|
85
|
+
|
|
86
|
+
## Contributing
|
|
87
|
+
|
|
88
|
+
Contributions are welcome! Please open an issue or submit a pull request.
|
|
89
|
+
|
|
90
|
+
## Support
|
|
91
|
+
|
|
92
|
+
For issues and questions, please visit our [GitHub Issues](https://github.com/yourusername/your-repo/issues).
|
package/bin/devcache.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AAGA,wBAAsB,eAAe,kBA+BpC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.generateCommand = generateCommand;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
async function generateCommand() {
|
|
10
|
+
const spinner = (0, ora_1.default)('Generating documentation...').start();
|
|
11
|
+
try {
|
|
12
|
+
// TODO: Implement orchestrator and analyzers
|
|
13
|
+
spinner.text = 'Analyzing project structure...';
|
|
14
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
15
|
+
spinner.text = 'Running analyzers...';
|
|
16
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
17
|
+
spinner.text = 'Generating markdown files...';
|
|
18
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
19
|
+
spinner.succeed(chalk_1.default.green('Documentation generated successfully!'));
|
|
20
|
+
console.log(chalk_1.default.blue('\nš Generated files:'));
|
|
21
|
+
console.log(chalk_1.default.gray(' .devcache/docs/general/project-overview.md'));
|
|
22
|
+
console.log(chalk_1.default.gray(' .devcache/docs/general/project-impact.md'));
|
|
23
|
+
console.log(chalk_1.default.gray(' .devcache/docs/tech/architecture-project.md'));
|
|
24
|
+
console.log(chalk_1.default.gray(' .devcache/docs/tech/stack-project.md'));
|
|
25
|
+
console.log(chalk_1.default.gray(' .devcache/docs/tech/features.md'));
|
|
26
|
+
console.log();
|
|
27
|
+
console.log(chalk_1.default.blue('Next step:'), chalk_1.default.cyan('devcache push'));
|
|
28
|
+
console.log();
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
spinner.fail(chalk_1.default.red('Generation failed'));
|
|
32
|
+
console.error(error);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":";;;;;AAGA,0CA+BC;AAlCD,kDAA0B;AAC1B,8CAAsB;AAEf,KAAK,UAAU,eAAe;IACnC,MAAM,OAAO,GAAG,IAAA,aAAG,EAAC,6BAA6B,CAAC,CAAC,KAAK,EAAE,CAAC;IAE3D,IAAI,CAAC;QACH,6CAA6C;QAC7C,OAAO,CAAC,IAAI,GAAG,gCAAgC,CAAC;QAChD,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QAExD,OAAO,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACtC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QAExD,OAAO,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAC9C,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QAExD,OAAO,CAAC,OAAO,CAAC,eAAK,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC,CAAC;QAEtE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC,CAAC;QACxE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC,CAAC;QACzE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,eAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;QACnE,OAAO,CAAC,GAAG,EAAE,CAAC;IAEhB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAC7C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAwBA,wBAAsB,WAAW,kBA2EhC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.initCommand = initCommand;
|
|
7
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const ora_1 = __importDefault(require("ora"));
|
|
10
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
11
|
+
const path_1 = __importDefault(require("path"));
|
|
12
|
+
async function initCommand() {
|
|
13
|
+
console.log(chalk_1.default.blue.bold('\nš DevCache Initialization\n'));
|
|
14
|
+
try {
|
|
15
|
+
const answers = await inquirer_1.default.prompt([
|
|
16
|
+
{
|
|
17
|
+
type: 'input',
|
|
18
|
+
name: 'projectName',
|
|
19
|
+
message: 'Project name:',
|
|
20
|
+
default: path_1.default.basename(process.cwd()),
|
|
21
|
+
validate: (input) => {
|
|
22
|
+
if (/^[a-z0-9-]+$/.test(input))
|
|
23
|
+
return true;
|
|
24
|
+
return 'Project name must contain only lowercase letters, numbers, and hyphens';
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'input',
|
|
29
|
+
name: 'description',
|
|
30
|
+
message: 'Project description (optional):',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'confirm',
|
|
34
|
+
name: 'enableSupabase',
|
|
35
|
+
message: 'Enable Supabase sync?',
|
|
36
|
+
default: true
|
|
37
|
+
}
|
|
38
|
+
]);
|
|
39
|
+
const config = {
|
|
40
|
+
projectName: answers.projectName,
|
|
41
|
+
description: answers.description || undefined,
|
|
42
|
+
outputDir: '.devcache/docs',
|
|
43
|
+
templates: {
|
|
44
|
+
general: ['project-overview', 'project-impact'],
|
|
45
|
+
tech: ['architecture-project', 'stack-project', 'features']
|
|
46
|
+
},
|
|
47
|
+
supabase: {
|
|
48
|
+
enabled: answers.enableSupabase,
|
|
49
|
+
projectId: null
|
|
50
|
+
},
|
|
51
|
+
analysis: {
|
|
52
|
+
includePatterns: ['src/**/*', 'app/**/*', 'lib/**/*'],
|
|
53
|
+
excludePatterns: ['node_modules/**', 'dist/**', '.next/**', 'build/**']
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const spinner = (0, ora_1.default)('Creating configuration...').start();
|
|
57
|
+
// Create .devcache directory
|
|
58
|
+
await promises_1.default.mkdir('.devcache', { recursive: true });
|
|
59
|
+
// Write config file
|
|
60
|
+
await promises_1.default.writeFile('.devcache.json', JSON.stringify(config, null, 2), 'utf-8');
|
|
61
|
+
// Create output directory
|
|
62
|
+
await promises_1.default.mkdir(config.outputDir, { recursive: true });
|
|
63
|
+
spinner.succeed(chalk_1.default.green('Configuration created successfully!'));
|
|
64
|
+
console.log(chalk_1.default.blue('\nš Next steps:'));
|
|
65
|
+
console.log(chalk_1.default.gray(' 1. Run'), chalk_1.default.cyan('devcache generate'), chalk_1.default.gray('to create documentation'));
|
|
66
|
+
if (answers.enableSupabase) {
|
|
67
|
+
console.log(chalk_1.default.gray(' 2. Run'), chalk_1.default.cyan('devcache login'), chalk_1.default.gray('to authenticate'));
|
|
68
|
+
console.log(chalk_1.default.gray(' 3. Run'), chalk_1.default.cyan('devcache push'), chalk_1.default.gray('to sync to cloud'));
|
|
69
|
+
}
|
|
70
|
+
console.log();
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
console.error(chalk_1.default.red('Initialization failed:'), error);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":";;;;;AAwBA,kCA2EC;AAnGD,wDAAgC;AAChC,kDAA0B;AAC1B,8CAAsB;AACtB,2DAA6B;AAC7B,gDAAwB;AAoBjB,KAAK,UAAU,WAAW;IAC/B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,CAAC;IAE/D,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,kBAAQ,CAAC,MAAM,CAAC;YACpC;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,aAAa;gBACnB,OAAO,EAAE,eAAe;gBACxB,OAAO,EAAE,cA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"","sources":["../../../src/cli/commands/login.ts"],"names":[],"mappings":"AAGA,wBAAsB,YAAY,kBA8BjC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.loginCommand = loginCommand;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
9
|
+
async function loginCommand() {
|
|
10
|
+
console.log(chalk_1.default.blue.bold('\nš DevCache Login\n'));
|
|
11
|
+
try {
|
|
12
|
+
const answers = await inquirer_1.default.prompt([
|
|
13
|
+
{
|
|
14
|
+
type: 'input',
|
|
15
|
+
name: 'email',
|
|
16
|
+
message: 'Email:',
|
|
17
|
+
validate: (input) => {
|
|
18
|
+
if (input.includes('@'))
|
|
19
|
+
return true;
|
|
20
|
+
return 'Please enter a valid email address';
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
type: 'password',
|
|
25
|
+
name: 'password',
|
|
26
|
+
message: 'Password:',
|
|
27
|
+
mask: '*'
|
|
28
|
+
}
|
|
29
|
+
]);
|
|
30
|
+
// TODO: Implement Supabase authentication
|
|
31
|
+
console.log(chalk_1.default.green('\nā Login successful!'));
|
|
32
|
+
console.log(chalk_1.default.gray('Session stored locally\n'));
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.error(chalk_1.default.red('Login failed:'), error);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=login.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/cli/commands/login.ts"],"names":[],"mappings":";;;;;AAGA,oCA8BC;AAjCD,kDAA0B;AAC1B,wDAAgC;AAEzB,KAAK,UAAU,YAAY;IAChC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAEtD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,kBAAQ,CAAC,MAAM,CAAC;YACpC;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,OAAO;gBACb,OAAO,EAAE,QAAQ;gBACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;oBAClB,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;wBAAE,OAAO,IAAI,CAAC;oBACrC,OAAO,oCAAoC,CAAC;gBAC9C,CAAC;aACF;YACD;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,GAAG;aACV;SACF,CAAC,CAAC;QAEH,0CAA0C;QAC1C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAEtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/push.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,kBAyBhC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.pushCommand = pushCommand;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
async function pushCommand() {
|
|
10
|
+
const spinner = (0, ora_1.default)('Pushing documentation to Supabase...').start();
|
|
11
|
+
try {
|
|
12
|
+
// TODO: Implement Supabase integration
|
|
13
|
+
spinner.text = 'Authenticating...';
|
|
14
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
15
|
+
spinner.text = 'Uploading files...';
|
|
16
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
17
|
+
spinner.text = 'Generating embeddings...';
|
|
18
|
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
19
|
+
spinner.succeed(chalk_1.default.green('Documentation pushed successfully!'));
|
|
20
|
+
console.log(chalk_1.default.blue('\n⨠View your project at:'));
|
|
21
|
+
console.log(chalk_1.default.cyan(' https://yourapp.com/dashboard/projects'));
|
|
22
|
+
console.log();
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
spinner.fail(chalk_1.default.red('Push failed'));
|
|
26
|
+
console.error(error);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=push.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../src/cli/commands/push.ts"],"names":[],"mappings":";;;;;AAGA,kCAyBC;AA5BD,kDAA0B;AAC1B,8CAAsB;AAEf,KAAK,UAAU,WAAW;IAC/B,MAAM,OAAO,GAAG,IAAA,aAAG,EAAC,sCAAsC,CAAC,CAAC,KAAK,EAAE,CAAC;IAEpE,IAAI,CAAC;QACH,uCAAuC;QACvC,OAAO,CAAC,IAAI,GAAG,mBAAmB,CAAC;QACnC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;QAEvD,OAAO,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACpC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QAExD,OAAO,CAAC,IAAI,GAAG,0BAA0B,CAAC;QAC1C,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QAExD,OAAO,CAAC,OAAO,CAAC,eAAK,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC;QAEnE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC,CAAC;QACpE,OAAO,CAAC,GAAG,EAAE,CAAC;IAEhB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const init_1 = require("./commands/init");
|
|
10
|
+
const generate_1 = require("./commands/generate");
|
|
11
|
+
const push_1 = require("./commands/push");
|
|
12
|
+
const login_1 = require("./commands/login");
|
|
13
|
+
const program = new commander_1.Command();
|
|
14
|
+
program
|
|
15
|
+
.name('devcache')
|
|
16
|
+
.description('Intelligent project documentation generator with cloud sync')
|
|
17
|
+
.version('0.1.0');
|
|
18
|
+
program
|
|
19
|
+
.command('init')
|
|
20
|
+
.description('Initialize DevCache in your project')
|
|
21
|
+
.action(init_1.initCommand);
|
|
22
|
+
program
|
|
23
|
+
.command('generate')
|
|
24
|
+
.description('Generate project documentation')
|
|
25
|
+
.action(generate_1.generateCommand);
|
|
26
|
+
program
|
|
27
|
+
.command('push')
|
|
28
|
+
.description('Push documentation to Supabase')
|
|
29
|
+
.action(push_1.pushCommand);
|
|
30
|
+
program
|
|
31
|
+
.command('login')
|
|
32
|
+
.description('Authenticate with Supabase')
|
|
33
|
+
.action(login_1.loginCommand);
|
|
34
|
+
program
|
|
35
|
+
.command('status')
|
|
36
|
+
.description('Check synchronization status')
|
|
37
|
+
.action(() => {
|
|
38
|
+
console.log(chalk_1.default.blue('Status command coming soon!'));
|
|
39
|
+
});
|
|
40
|
+
program.parse(process.argv);
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,0CAA8C;AAC9C,kDAAsD;AACtD,0CAA8C;AAC9C,4CAAgD;AAEhD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,6DAA6D,CAAC;KAC1E,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,qCAAqC,CAAC;KAClD,MAAM,CAAC,kBAAW,CAAC,CAAC;AAEvB,OAAO;KACJ,OAAO,CAAC,UAAU,CAAC;KACnB,WAAW,CAAC,gCAAgC,CAAC;KAC7C,MAAM,CAAC,0BAAe,CAAC,CAAC;AAE3B,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,gCAAgC,CAAC;KAC7C,MAAM,CAAC,kBAAW,CAAC,CAAC;AAEvB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,4BAA4B,CAAC;KACzC,MAAM,CAAC,oBAAY,CAAC,CAAC;AAExB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,8BAA8B,CAAC;KAC3C,MAAM,CAAC,GAAG,EAAE;IACX,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "devcache-hub",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Intelligent project documentation generator with cloud sync and RAG-powered search",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"devcache": "./bin/devcache.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "ts-node src/cli/index.ts",
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"documentation",
|
|
18
|
+
"code-analysis",
|
|
19
|
+
"cli",
|
|
20
|
+
"supabase",
|
|
21
|
+
"rag",
|
|
22
|
+
"embeddings",
|
|
23
|
+
"project-documentation",
|
|
24
|
+
"code-generator"
|
|
25
|
+
],
|
|
26
|
+
"author": "Tryangle Build",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/tryanglebuild/devcache.git",
|
|
31
|
+
"directory": "packages/devcache"
|
|
32
|
+
},
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/tryanglebuild/devcache/issues"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/tryanglebuild/devcache#readme",
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"bin",
|
|
40
|
+
"templates",
|
|
41
|
+
"README.md",
|
|
42
|
+
"LICENSE"
|
|
43
|
+
],
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18.0.0"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"commander": "^11.1.0",
|
|
49
|
+
"chalk": "^5.3.0",
|
|
50
|
+
"ora": "^7.0.1",
|
|
51
|
+
"inquirer": "^9.2.12",
|
|
52
|
+
"@supabase/supabase-js": "^2.39.7",
|
|
53
|
+
"openai": "^4.28.0",
|
|
54
|
+
"glob": "^10.3.10",
|
|
55
|
+
"yaml": "^2.3.4",
|
|
56
|
+
"dotenv": "^16.4.5"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"typescript": "^5.3.3",
|
|
60
|
+
"@types/node": "^20.11.19",
|
|
61
|
+
"@types/inquirer": "^9.0.7",
|
|
62
|
+
"ts-node": "^10.9.2",
|
|
63
|
+
"jest": "^29.7.0",
|
|
64
|
+
"@types/jest": "^29.5.12",
|
|
65
|
+
"ts-jest": "^29.1.2"
|
|
66
|
+
}
|
|
67
|
+
}
|