@forgehive/forge-cli 0.3.4 → 0.3.6
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/tasks/task/run.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ExecutionRecord } from '@forgehive/hive-sdk';
|
|
1
2
|
import { type ForgeConf, type Profile } from '../types';
|
|
2
3
|
export declare const run: import("@forgehive/task").TaskInstanceType<(argv: {
|
|
3
4
|
descriptorName: string;
|
|
@@ -16,10 +17,7 @@ export declare const run: import("@forgehive/task").TaskInstanceType<(argv: {
|
|
|
16
17
|
}) => Promise<Promise<any>>;
|
|
17
18
|
verifyLogFolder: (logsPath: string) => Promise<boolean>;
|
|
18
19
|
ensureBuildsFolder: () => Promise<string>;
|
|
19
|
-
sendLogToAPI: (profile: Profile, projectName: string,
|
|
20
|
-
input: unknown;
|
|
21
|
-
metadata?: Record<string, string>;
|
|
22
|
-
}) => Promise<boolean>;
|
|
20
|
+
sendLogToAPI: (profile: Profile, projectName: string, record: ExecutionRecord) => Promise<boolean>;
|
|
23
21
|
}>) => Promise<any>, {
|
|
24
22
|
loadConf: (args: {}) => Promise<Promise<ForgeConf>>;
|
|
25
23
|
loadCurrentProfile: (args: {}) => Promise<Promise<Profile>>;
|
|
@@ -34,8 +32,5 @@ export declare const run: import("@forgehive/task").TaskInstanceType<(argv: {
|
|
|
34
32
|
}) => Promise<Promise<any>>;
|
|
35
33
|
verifyLogFolder: (logsPath: string) => Promise<boolean>;
|
|
36
34
|
ensureBuildsFolder: () => Promise<string>;
|
|
37
|
-
sendLogToAPI: (profile: Profile, projectName: string,
|
|
38
|
-
input: unknown;
|
|
39
|
-
metadata?: Record<string, string>;
|
|
40
|
-
}) => Promise<boolean>;
|
|
35
|
+
sendLogToAPI: (profile: Profile, projectName: string, record: ExecutionRecord) => Promise<boolean>;
|
|
41
36
|
}>;
|
package/dist/tasks/task/run.js
CHANGED
|
@@ -51,7 +51,7 @@ const boundaries = {
|
|
|
51
51
|
}
|
|
52
52
|
return buildsPath;
|
|
53
53
|
},
|
|
54
|
-
sendLogToAPI: async (profile, projectName,
|
|
54
|
+
sendLogToAPI: async (profile, projectName, record) => {
|
|
55
55
|
try {
|
|
56
56
|
const config = {
|
|
57
57
|
projectName,
|
|
@@ -63,7 +63,7 @@ const boundaries = {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
const client = new hive_sdk_1.HiveLogClient(config);
|
|
66
|
-
const result = await client.sendLog(
|
|
66
|
+
const result = await client.sendLog(record);
|
|
67
67
|
if (result === 'success') {
|
|
68
68
|
console.log('===============================================');
|
|
69
69
|
console.log('Log sent to API... ', profile.name, profile.url);
|
|
@@ -152,7 +152,7 @@ exports.run = (0, task_1.createTask)({
|
|
|
152
152
|
await tape.save();
|
|
153
153
|
if (profile) {
|
|
154
154
|
try {
|
|
155
|
-
await sendLogToAPI(profile, projectName,
|
|
155
|
+
await sendLogToAPI(profile, projectName, logItem);
|
|
156
156
|
}
|
|
157
157
|
catch (e) {
|
|
158
158
|
console.error('Failed to send log to API:', e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgehive/forge-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "TypeScript CLI application",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@forgehive/hive-sdk": "^0.
|
|
14
|
-
"@forgehive/record-tape": "^0.2.
|
|
15
|
-
"@forgehive/runner": "^0.2.
|
|
13
|
+
"@forgehive/hive-sdk": "^0.1.1",
|
|
14
|
+
"@forgehive/record-tape": "^0.2.4",
|
|
15
|
+
"@forgehive/runner": "^0.2.4",
|
|
16
16
|
"@forgehive/schema": "^0.1.4",
|
|
17
|
-
"@forgehive/task": "^0.2.
|
|
17
|
+
"@forgehive/task": "^0.2.4",
|
|
18
18
|
"esbuild": "^0.25.0",
|
|
19
19
|
"handlebars": "^4.7.8",
|
|
20
20
|
"minimist": "^1.2.8"
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"esbuild": "^0.25.0",
|
|
28
28
|
"handlebars": "^4.7.8",
|
|
29
29
|
"minimist": "^1.2.8",
|
|
30
|
-
"@forgehive/
|
|
31
|
-
"@forgehive/runner": "0.2.2",
|
|
30
|
+
"@forgehive/record-tape": "0.2.4",
|
|
32
31
|
"@forgehive/schema": "0.1.4",
|
|
33
|
-
"@forgehive/
|
|
34
|
-
"@forgehive/
|
|
32
|
+
"@forgehive/task": "0.2.4",
|
|
33
|
+
"@forgehive/hive-sdk": "0.1.1",
|
|
34
|
+
"@forgehive/runner": "0.2.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/archiver": "^6.0.3",
|
package/src/tasks/task/run.ts
CHANGED
|
@@ -10,7 +10,7 @@ import os from 'os'
|
|
|
10
10
|
import { createTask } from '@forgehive/task'
|
|
11
11
|
import { Schema } from '@forgehive/schema'
|
|
12
12
|
import { RecordTape } from '@forgehive/record-tape'
|
|
13
|
-
import { HiveLogClient } from '@forgehive/hive-sdk'
|
|
13
|
+
import { HiveLogClient, type ExecutionRecord } from '@forgehive/hive-sdk'
|
|
14
14
|
|
|
15
15
|
import { create as bundleCreate } from '../bundle/create'
|
|
16
16
|
import { load as bundleLoad } from '../bundle/load'
|
|
@@ -51,7 +51,7 @@ const boundaries = {
|
|
|
51
51
|
|
|
52
52
|
return buildsPath
|
|
53
53
|
},
|
|
54
|
-
sendLogToAPI: async (profile: Profile, projectName: string,
|
|
54
|
+
sendLogToAPI: async (profile: Profile, projectName: string, record: ExecutionRecord): Promise<boolean> => {
|
|
55
55
|
try {
|
|
56
56
|
const config = {
|
|
57
57
|
projectName,
|
|
@@ -64,7 +64,7 @@ const boundaries = {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const client = new HiveLogClient(config)
|
|
67
|
-
const result = await client.sendLog(
|
|
67
|
+
const result = await client.sendLog(record)
|
|
68
68
|
|
|
69
69
|
if (result === 'success') {
|
|
70
70
|
console.log('===============================================')
|
|
@@ -173,7 +173,7 @@ export const run = createTask({
|
|
|
173
173
|
|
|
174
174
|
if (profile) {
|
|
175
175
|
try {
|
|
176
|
-
await sendLogToAPI(profile, projectName,
|
|
176
|
+
await sendLogToAPI(profile, projectName, logItem)
|
|
177
177
|
} catch (e) {
|
|
178
178
|
console.error('Failed to send log to API:', e)
|
|
179
179
|
}
|