@forgehive/forge-cli 0.3.4 → 0.3.5

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.
@@ -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, taskName: string, logItem: {
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, taskName: string, logItem: {
38
- input: unknown;
39
- metadata?: Record<string, string>;
40
- }) => Promise<boolean>;
35
+ sendLogToAPI: (profile: Profile, projectName: string, record: ExecutionRecord) => Promise<boolean>;
41
36
  }>;
@@ -51,7 +51,7 @@ const boundaries = {
51
51
  }
52
52
  return buildsPath;
53
53
  },
54
- sendLogToAPI: async (profile, projectName, taskName, logItem) => {
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(taskName, logItem);
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, descriptorName, logItem);
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.4",
3
+ "version": "0.3.5",
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.0.4",
14
- "@forgehive/record-tape": "^0.2.2",
15
- "@forgehive/runner": "^0.2.2",
13
+ "@forgehive/hive-sdk": "^0.1.0",
14
+ "@forgehive/record-tape": "^0.2.3",
15
+ "@forgehive/runner": "^0.2.3",
16
16
  "@forgehive/schema": "^0.1.4",
17
- "@forgehive/task": "^0.2.2",
17
+ "@forgehive/task": "^0.2.3",
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/hive-sdk": "0.0.4",
31
- "@forgehive/runner": "0.2.2",
30
+ "@forgehive/hive-sdk": "0.1.0",
31
+ "@forgehive/record-tape": "0.2.3",
32
+ "@forgehive/runner": "0.2.3",
32
33
  "@forgehive/schema": "0.1.4",
33
- "@forgehive/record-tape": "0.2.2",
34
- "@forgehive/task": "0.2.2"
34
+ "@forgehive/task": "0.2.3"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/archiver": "^6.0.3",
@@ -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, taskName: string, logItem: { input: unknown; metadata?: Record<string, string> }): Promise<boolean> => {
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(taskName, logItem)
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, descriptorName, logItem)
176
+ await sendLogToAPI(profile, projectName, logItem)
177
177
  } catch (e) {
178
178
  console.error('Failed to send log to API:', e)
179
179
  }