@orion-js/core 3.11.6 → 3.11.9
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/lib/index.js
CHANGED
|
@@ -30,6 +30,8 @@ program
|
|
|
30
30
|
.description('Run the Orionjs app')
|
|
31
31
|
.option('--shell', 'Opens a shell in Chrome developer tools')
|
|
32
32
|
.option('--clean', 'Build the typescript project from scratch')
|
|
33
|
+
.option('--omit-cursor-rule', 'Omit the creation of the Orionjs Cursor rule')
|
|
34
|
+
.option('--omit-mcp-server', 'Omit the creation of the Orionjs MCP server')
|
|
33
35
|
.action(run(start_1.default));
|
|
34
36
|
program.command('test').allowUnknownOption().description('Deprecated command').action(run(test_1.default));
|
|
35
37
|
program
|
|
@@ -0,0 +1,49 @@
|
|
|
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.copyCursorRule = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
9
|
+
const https_1 = __importDefault(require("https"));
|
|
10
|
+
const safe_1 = __importDefault(require("colors/safe"));
|
|
11
|
+
async function copyCursorRule() {
|
|
12
|
+
const sourceUrl = 'https://raw.githubusercontent.com/orionjs/orionjs/refs/heads/master/.cursor/rules/orionjs.mdc';
|
|
13
|
+
const targetDir = path_1.default.join(process.cwd(), '.cursor', 'rules');
|
|
14
|
+
const targetFile = path_1.default.join(targetDir, 'orionjs.mdc');
|
|
15
|
+
// Function to download the file content
|
|
16
|
+
const downloadFile = (url) => {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
https_1.default.get(url, (response) => {
|
|
19
|
+
if (response.statusCode !== 200) {
|
|
20
|
+
reject(new Error(`Failed to download, status code: ${response.statusCode}`));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let data = '';
|
|
24
|
+
response.on('data', (chunk) => {
|
|
25
|
+
data += chunk;
|
|
26
|
+
});
|
|
27
|
+
response.on('end', () => {
|
|
28
|
+
resolve(data);
|
|
29
|
+
});
|
|
30
|
+
}).on('error', (err) => {
|
|
31
|
+
reject(err);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
try {
|
|
36
|
+
// Ensure the directory exists
|
|
37
|
+
await promises_1.default.mkdir(targetDir, { recursive: true });
|
|
38
|
+
// Download the file content
|
|
39
|
+
const content = await downloadFile(sourceUrl);
|
|
40
|
+
// Write the content to the target file
|
|
41
|
+
await promises_1.default.writeFile(targetFile, content, 'utf8');
|
|
42
|
+
console.log(safe_1.default.bold(`Updated .cursor/rules/orionjs.mdc to the latest version`));
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
console.error('Error copying cursor rule:', error);
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.copyCursorRule = copyCursorRule;
|
|
File without changes
|
package/lib/start/index.js
CHANGED
|
@@ -6,8 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const safe_1 = __importDefault(require("colors/safe"));
|
|
7
7
|
const runner_1 = require("./runner");
|
|
8
8
|
const watchAndCompile_1 = __importDefault(require("./watchAndCompile"));
|
|
9
|
+
const copyCursorRule_1 = require("./copyCursorRule");
|
|
9
10
|
async function default_1(options) {
|
|
10
11
|
console.log(safe_1.default.bold('\nOrionjs App ' + safe_1.default.green(safe_1.default.bold('V3\n'))));
|
|
12
|
+
if (!options.omitCursorRule) {
|
|
13
|
+
(0, copyCursorRule_1.copyCursorRule)().catch(console.error);
|
|
14
|
+
}
|
|
15
|
+
if (!options.omitMcpServer) {
|
|
16
|
+
// await copyMcpServer()
|
|
17
|
+
}
|
|
11
18
|
const runner = (0, runner_1.getRunner)(options);
|
|
12
19
|
(0, watchAndCompile_1.default)(runner);
|
|
13
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/core",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.9",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "nicolaslopezj",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"upgrade-interactive": "yarn upgrade-interactive"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@orion-js/env": "^3.11.
|
|
19
|
+
"@orion-js/env": "^3.11.8",
|
|
20
20
|
"chokidar": "3.5.3",
|
|
21
21
|
"colors": "^1.4.0",
|
|
22
22
|
"commander": "^9.4.1",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=14.0.0"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "ff4915cc731d0d18bcb386da1845615f0aa9fd4e",
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@shelf/jest-mongodb": "^2.1.0",
|
|
42
42
|
"@types/prompts": "^2.4.2",
|