@intuned/runtime-dev 1.0.6-cli.8.2.2 → 1.0.6-cli.8.2.4
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.
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
const exclusions = ["node_modules/**", ".git/**", "dist/**", "build/**", "coverage/**", ".next/**", ".cache/**", "out/**", "tmp/**", ".DS_Store", "npm-debug.log*", "yarn-debug.log*", "yarn-error.log*", ".env", ".env.*", "**/*.map", "**/*.tsbuildinfo", "tsconfig.json"];
|
|
7
|
+
const exclusions = ["node_modules/**", ".git/**", "dist/**", "build/**", "coverage/**", ".next/**", ".cache/**", "out/**", "tmp/**", ".DS_Store", "npm-debug.log*", "yarn-debug.log*", "yarn-error.log*", ".env", ".env.*", "**/*.map", "**/*.tsbuildinfo", "tsconfig.json", "parameters/**", "output/**"];
|
|
8
8
|
var _default = exports.default = exclusions;
|
|
@@ -18,13 +18,6 @@ var _constants = require("../../common/cli/constants");
|
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
-
function formatBytes(bytes) {
|
|
22
|
-
if (bytes === 0) return "0 Bytes";
|
|
23
|
-
const k = 1024;
|
|
24
|
-
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
25
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
26
|
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
|
|
27
|
-
}
|
|
28
21
|
const execPromise = (0, _util.promisify)(_child_process.exec);
|
|
29
22
|
function matchesGitignorePatterns(filePath, patterns, projectPath) {
|
|
30
23
|
const relativePath = path.relative(projectPath, filePath);
|
|
@@ -72,42 +65,17 @@ function listFilesNotIgnored(projectPath, ignorePatterns) {
|
|
|
72
65
|
return results;
|
|
73
66
|
}
|
|
74
67
|
async function convertProjectToCodeTree(projectPath) {
|
|
75
|
-
|
|
76
|
-
let currentDir = path.normalize(projectPath);
|
|
77
|
-
while (currentDir !== path.parse(currentDir).root) {
|
|
78
|
-
const gitignorePath = path.join(currentDir, ".gitignore");
|
|
79
|
-
if (fs.existsSync(gitignorePath)) {
|
|
80
|
-
const gitignoreContent = fs.readFileSync(gitignorePath, "utf-8").split("\n");
|
|
81
|
-
ignorePatterns = [...ignorePatterns, ...gitignoreContent];
|
|
82
|
-
console.log(`Found .gitignore file: ${_chalk.default.cyan.bold(gitignorePath)}`);
|
|
83
|
-
break;
|
|
84
|
-
} else {
|
|
85
|
-
currentDir = path.dirname(currentDir);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
const filesToDeploy = listFilesNotIgnored(projectPath, ignorePatterns);
|
|
89
|
-
let totalSize = 0;
|
|
90
|
-
for (const file of filesToDeploy) {
|
|
91
|
-
try {
|
|
92
|
-
const stats = fs.statSync(path.join(projectPath, file));
|
|
93
|
-
totalSize += stats.size;
|
|
94
|
-
} catch (error) {}
|
|
95
|
-
}
|
|
68
|
+
const filesToDeploy = listFilesNotIgnored(projectPath, _projectExclusions.default);
|
|
96
69
|
console.log(_chalk.default.cyan("\nFiles to be deployed:"));
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
} else {
|
|
100
|
-
const filesToDeployText = "\n " + filesToDeploy.join("\n ");
|
|
101
|
-
console.log(filesToDeployText);
|
|
102
|
-
}
|
|
103
|
-
console.log(_chalk.default.cyan(`\nSummary: ${filesToDeploy.length} files, ${formatBytes(totalSize)}`));
|
|
70
|
+
const filesToDeployText = "\n " + filesToDeploy.join("\n ");
|
|
71
|
+
console.log(filesToDeployText);
|
|
104
72
|
function readDirectory(dirPath) {
|
|
105
73
|
const tree = {};
|
|
106
74
|
try {
|
|
107
75
|
const entries = fs.readdirSync(dirPath);
|
|
108
76
|
for (const entry of entries) {
|
|
109
77
|
const entryPath = path.join(dirPath, entry);
|
|
110
|
-
if (matchesGitignorePatterns(entryPath,
|
|
78
|
+
if (matchesGitignorePatterns(entryPath, _projectExclusions.default, projectPath)) {
|
|
111
79
|
continue;
|
|
112
80
|
}
|
|
113
81
|
try {
|
|
@@ -31,15 +31,13 @@ _commander.program.name("intuned-run").description("Run an Intuned API with para
|
|
|
31
31
|
console.log(_chalk.default.yellow("No result returned from the API"));
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
if (!options.
|
|
34
|
+
if (!options.storeResults) {
|
|
35
35
|
console.log(_chalk.default.green(`✓ API executed successfully`));
|
|
36
36
|
console.log(_chalk.default.green("Result:"));
|
|
37
37
|
console.log(_chalk.default.white(JSON.stringify(result, null, 2)));
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
await (0, _utils.writeResultToFile)(runId, result, payloadToAppend);
|
|
42
|
-
}
|
|
40
|
+
await (0, _utils.writeResultToFile)(runId, result, payloadToAppend);
|
|
43
41
|
} catch (error) {
|
|
44
42
|
console.error(_chalk.default.red(`\nError: ${error.message}`));
|
|
45
43
|
process.exit(1);
|
|
@@ -2,6 +2,10 @@ export declare const CURRENT_PLAYWRIGHT_VERSION = "1.44.1";
|
|
|
2
2
|
export declare const ProjectDeploymentStatus: string[];
|
|
3
3
|
export declare const PROJECT_DEPLOY_TIMEOUT = 600000;
|
|
4
4
|
export declare const userCLIScripts: {
|
|
5
|
+
build: string;
|
|
6
|
+
"types-check": string;
|
|
7
|
+
"pre-publish": string;
|
|
8
|
+
start: string;
|
|
5
9
|
"intuned-run": string;
|
|
6
10
|
"intuned-build": string;
|
|
7
11
|
"intuned-deploy": string;
|
|
@@ -8,6 +8,10 @@ const CURRENT_PLAYWRIGHT_VERSION = exports.CURRENT_PLAYWRIGHT_VERSION = "1.44.1"
|
|
|
8
8
|
const ProjectDeploymentStatus = exports.ProjectDeploymentStatus = ["completed", "failed", "pending", "not_found"];
|
|
9
9
|
const PROJECT_DEPLOY_TIMEOUT = exports.PROJECT_DEPLOY_TIMEOUT = 600000;
|
|
10
10
|
const userCLIScripts = exports.userCLIScripts = {
|
|
11
|
+
build: "intuned-build",
|
|
12
|
+
"types-check": "intuned-ts-check",
|
|
13
|
+
"pre-publish": "intuned-ts-check && intuned-build",
|
|
14
|
+
start: "node ./output/bundle_v2.js",
|
|
11
15
|
"intuned-run": "intuned-run",
|
|
12
16
|
"intuned-build": "intuned-build-project",
|
|
13
17
|
"intuned-deploy": "intuned-deploy"
|