namirasoft-log 1.3.6 → 1.3.7
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/.ns-sdkg-dir-deep +1 -0
- package/.ns-sdkg-dir-keep +0 -0
- package/.ns-sdkg-file-keep +12 -0
- package/dist/NamirasoftLogServer.d.ts +9 -0
- package/dist/NamirasoftLogServer.js +10 -0
- package/dist/NamirasoftLogServer.js.map +1 -1
- package/dist/NamirasoftLogServerBase.d.ts +5 -0
- package/dist/NamirasoftLogServerBase.js +12 -0
- package/dist/NamirasoftLogServerBase.js.map +1 -0
- package/dist/NamirasoftLogServerHealthz.d.ts +4 -0
- package/dist/NamirasoftLogServerHealthz.js +25 -0
- package/dist/NamirasoftLogServerHealthz.js.map +1 -0
- package/dist/NamirasoftLogServerLog.d.ts +8 -0
- package/dist/NamirasoftLogServerLog.js +39 -0
- package/dist/NamirasoftLogServerLog.js.map +1 -0
- package/dist/NamirasoftLogServerLogGroup.d.ts +10 -0
- package/dist/NamirasoftLogServerLogGroup.js +53 -0
- package/dist/NamirasoftLogServerLogGroup.js.map +1 -0
- package/dist/command/HealthzCommand.d.ts +4 -0
- package/dist/command/HealthzCommand.js +15 -0
- package/dist/command/HealthzCommand.js.map +1 -0
- package/dist/command/HealthzGetCommand.d.ts +5 -0
- package/dist/command/HealthzGetCommand.js +37 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/LogCommand.d.ts +4 -0
- package/dist/command/LogCommand.js +19 -0
- package/dist/command/LogCommand.js.map +1 -0
- package/dist/command/LogCreateCommand.d.ts +5 -0
- package/dist/command/LogCreateCommand.js +129 -0
- package/dist/command/LogCreateCommand.js.map +1 -0
- package/dist/command/LogGetAllCommand.d.ts +5 -0
- package/dist/command/LogGetAllCommand.js +37 -0
- package/dist/command/LogGetAllCommand.js.map +1 -0
- package/dist/command/LogGetCommand.d.ts +5 -0
- package/dist/command/LogGetCommand.js +37 -0
- package/dist/command/LogGetCommand.js.map +1 -0
- package/dist/command/LogGroupCommand.d.ts +4 -0
- package/dist/command/LogGroupCommand.js +23 -0
- package/dist/command/LogGroupCommand.js.map +1 -0
- package/dist/command/LogGroupCreateCommand.d.ts +5 -0
- package/dist/command/LogGroupCreateCommand.js +57 -0
- package/dist/command/LogGroupCreateCommand.js.map +1 -0
- package/dist/command/LogGroupDeleteCommand.d.ts +5 -0
- package/dist/command/LogGroupDeleteCommand.js +37 -0
- package/dist/command/LogGroupDeleteCommand.js.map +1 -0
- package/dist/command/LogGroupGetAllCommand.d.ts +5 -0
- package/dist/command/LogGroupGetAllCommand.js +37 -0
- package/dist/command/LogGroupGetAllCommand.js.map +1 -0
- package/dist/command/LogGroupGetCommand.d.ts +5 -0
- package/dist/command/LogGroupGetCommand.js +37 -0
- package/dist/command/LogGroupGetCommand.js.map +1 -0
- package/dist/command/LogGroupUpdateCommand.d.ts +5 -0
- package/dist/command/LogGroupUpdateCommand.js +57 -0
- package/dist/command/LogGroupUpdateCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +16 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/index.d.ts +23 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/row/LogRow.d.ts +3 -0
- package/dist/row/LogRow.js +3 -0
- package/dist/row/LogRow.js.map +1 -0
- package/dist/row/LogRowInput.d.ts +12 -0
- package/dist/row/LogRowInput.js +3 -0
- package/dist/row/LogRowInput.js.map +1 -0
- package/dist/row/LogRowOutput.d.ts +1 -0
- package/dist/row/LogRowOutput.js +3 -0
- package/dist/row/LogRowOutput.js.map +1 -0
- package/dist/row/LoggroupRow.d.ts +3 -0
- package/dist/row/LoggroupRow.js +3 -0
- package/dist/row/LoggroupRow.js.map +1 -0
- package/dist/row/LoggroupRowInput.d.ts +4 -0
- package/dist/row/LoggroupRowInput.js +3 -0
- package/dist/row/LoggroupRowInput.js.map +1 -0
- package/dist/row/LoggroupRowOutput.d.ts +4 -0
- package/dist/row/LoggroupRowOutput.js +3 -0
- package/dist/row/LoggroupRowOutput.js.map +1 -0
- package/package.json +10 -6
- package/src/NamirasoftLogServer.ts +39 -2
- package/src/NamirasoftLogServerBase.ts +31 -0
- package/src/NamirasoftLogServerHealthz.ts +32 -0
- package/src/NamirasoftLogServerLog.ts +46 -0
- package/src/NamirasoftLogServerLogGroup.ts +58 -0
- package/src/command/HealthzCommand.ts +33 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/LogCommand.ts +37 -0
- package/src/command/LogCreateCommand.ts +137 -0
- package/src/command/LogGetAllCommand.ts +45 -0
- package/src/command/LogGetCommand.ts +45 -0
- package/src/command/LogGroupCommand.ts +41 -0
- package/src/command/LogGroupCreateCommand.ts +65 -0
- package/src/command/LogGroupDeleteCommand.ts +45 -0
- package/src/command/LogGroupGetAllCommand.ts +45 -0
- package/src/command/LogGroupGetCommand.ts +45 -0
- package/src/command/LogGroupUpdateCommand.ts +65 -0
- package/src/command/cli.ts +35 -0
- package/src/index.ts +45 -2
- package/src/row/LogRow.ts +25 -0
- package/src/row/LogRowInput.ts +34 -0
- package/src/row/LogRowOutput.ts +24 -0
- package/src/row/LoggroupRow.ts +25 -0
- package/src/row/LoggroupRowInput.ts +26 -0
- package/src/row/LoggroupRowOutput.ts +26 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupCreateCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
20
|
+
{
|
|
21
|
+
name: "project_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'project_id' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["project_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "name",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'name' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["name"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
}
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
exec() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
let token = this.app.storage.getNSAToken();
|
|
41
|
+
if (token == null)
|
|
42
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
43
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
44
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
45
|
+
manager.setValue(token, false);
|
|
46
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
47
|
+
let ans = yield server.loggroup.Create({
|
|
48
|
+
project_id: this.option_values.project_id,
|
|
49
|
+
name: this.option_values.name
|
|
50
|
+
});
|
|
51
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.LogGroupCreateCommand = LogGroupCreateCommand;
|
|
56
|
+
;
|
|
57
|
+
//# sourceMappingURL=LogGroupCreateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupCreateCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,YAAY,CAAC;gBACpB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,sCAAsC;gBACnD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,MAAM,CAAC;gBACd,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;SACA,CAAC,CAAC;IACX,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACnC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU;gBACzC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;aAChC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAtCD,sDAsCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupDeleteCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupDeleteCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.loggroup.Delete(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGroupDeleteCommand = LogGroupDeleteCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGroupDeleteCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupDeleteCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupDeleteCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,sDAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupGetAllCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupGetAllCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["project_id", "search"], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.loggroup.GetAll(this.arg_values[0], this.arg_values[1]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGroupGetAllCommand = LogGroupGetAllCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGroupGetAllCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupGetAllCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupGetAllCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/E,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,sDAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupGetCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.loggroup.Get(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGroupGetCommand = LogGroupGetCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGroupGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupGetCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,kBAAmB,SAAQ,sCAAgB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,gDAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogGroupUpdateCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftLogServer_1 = require("../NamirasoftLogServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogGroupUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], [
|
|
20
|
+
{
|
|
21
|
+
name: "project_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'project_id' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["project_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "name",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'name' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["name"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
}
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
exec() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
let token = this.app.storage.getNSAToken();
|
|
41
|
+
if (token == null)
|
|
42
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
43
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
44
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
45
|
+
manager.setValue(token, false);
|
|
46
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
47
|
+
let ans = yield server.loggroup.Update(this.arg_values[0], {
|
|
48
|
+
project_id: this.option_values.project_id,
|
|
49
|
+
name: this.option_values.name
|
|
50
|
+
});
|
|
51
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.LogGroupUpdateCommand = LogGroupUpdateCommand;
|
|
56
|
+
;
|
|
57
|
+
//# sourceMappingURL=LogGroupUpdateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupUpdateCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupUpdateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;YAChB;gBACI,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,YAAY,CAAC;gBACpB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,sCAAsC;gBACnD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,MAAM,CAAC;gBACd,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;SACA,CAAC,CAAC;IACX,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,GAAG,IAAI,yCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACrF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;gBACvD,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU;gBACzC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;aAChC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAtCD,sDAsCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
5
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
6
|
+
const HealthzCommand_1 = require("./HealthzCommand");
|
|
7
|
+
const LogCommand_1 = require("./LogCommand");
|
|
8
|
+
const LogGroupCommand_1 = require("./LogGroupCommand");
|
|
9
|
+
let app = new namirasoft_node_cli_1.Application("ns-log", new namirasoft_node_cli_1.BaseStorage(), {
|
|
10
|
+
"healthz": HealthzCommand_1.HealthzCommand,
|
|
11
|
+
"log": LogCommand_1.LogCommand,
|
|
12
|
+
"loggroup": LogGroupCommand_1.LogGroupCommand,
|
|
13
|
+
"account": namirasoft_account_1.AccountCommand
|
|
14
|
+
});
|
|
15
|
+
app.run();
|
|
16
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/command/cli.ts"],"names":[],"mappings":";;;AAqBA,2DAAoD;AACpD,6DAA+D;AAC/D,qDAAkD;AAClD,6CAA0C;AAC1C,uDAAoD;AAEpD,IAAI,GAAG,GAAG,IAAI,iCAAW,CAAC,QAAQ,EAAE,IAAI,iCAAW,EAAE,EACjD;IACI,SAAS,EAAE,+BAAc;IACzB,KAAK,EAAE,uBAAU;IACjB,UAAU,EAAE,iCAAe;IAC3B,SAAS,EAAE,mCAAc;CAC5B,CAAC,CAAC;AACP,GAAG,CAAC,GAAG,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,31 @@ export * from "./IFormatter";
|
|
|
5
5
|
export * from "./ILogger";
|
|
6
6
|
export * from "./IStream";
|
|
7
7
|
export * from "./Log";
|
|
8
|
-
export * from "./Logger";
|
|
9
8
|
export * from "./LogLevel";
|
|
9
|
+
export * from "./Logger";
|
|
10
10
|
export * from "./NamirasoftLogServer";
|
|
11
|
+
export * from "./NamirasoftLogServerBase";
|
|
12
|
+
export * from "./NamirasoftLogServerHealthz";
|
|
13
|
+
export * from "./NamirasoftLogServerLog";
|
|
14
|
+
export * from "./NamirasoftLogServerLogGroup";
|
|
11
15
|
export * from "./StreamConsole";
|
|
12
16
|
export * from "./StreamFile";
|
|
13
17
|
export * from "./StreamNamirasoftLog";
|
|
18
|
+
export * from "./command/HealthzCommand";
|
|
19
|
+
export * from "./command/HealthzGetCommand";
|
|
20
|
+
export * from "./command/LogCommand";
|
|
21
|
+
export * from "./command/LogCreateCommand";
|
|
22
|
+
export * from "./command/LogGetAllCommand";
|
|
23
|
+
export * from "./command/LogGetCommand";
|
|
24
|
+
export * from "./command/LogGroupCommand";
|
|
25
|
+
export * from "./command/LogGroupCreateCommand";
|
|
26
|
+
export * from "./command/LogGroupDeleteCommand";
|
|
27
|
+
export * from "./command/LogGroupGetAllCommand";
|
|
28
|
+
export * from "./command/LogGroupGetCommand";
|
|
29
|
+
export * from "./command/LogGroupUpdateCommand";
|
|
30
|
+
export * from "./row/LogRow";
|
|
31
|
+
export * from "./row/LogRowInput";
|
|
32
|
+
export * from "./row/LogRowOutput";
|
|
33
|
+
export * from "./row/LoggroupRow";
|
|
34
|
+
export * from "./row/LoggroupRowInput";
|
|
35
|
+
export * from "./row/LoggroupRowOutput";
|
package/dist/index.js
CHANGED
|
@@ -21,10 +21,32 @@ __exportStar(require("./IFormatter"), exports);
|
|
|
21
21
|
__exportStar(require("./ILogger"), exports);
|
|
22
22
|
__exportStar(require("./IStream"), exports);
|
|
23
23
|
__exportStar(require("./Log"), exports);
|
|
24
|
-
__exportStar(require("./Logger"), exports);
|
|
25
24
|
__exportStar(require("./LogLevel"), exports);
|
|
25
|
+
__exportStar(require("./Logger"), exports);
|
|
26
26
|
__exportStar(require("./NamirasoftLogServer"), exports);
|
|
27
|
+
__exportStar(require("./NamirasoftLogServerBase"), exports);
|
|
28
|
+
__exportStar(require("./NamirasoftLogServerHealthz"), exports);
|
|
29
|
+
__exportStar(require("./NamirasoftLogServerLog"), exports);
|
|
30
|
+
__exportStar(require("./NamirasoftLogServerLogGroup"), exports);
|
|
27
31
|
__exportStar(require("./StreamConsole"), exports);
|
|
28
32
|
__exportStar(require("./StreamFile"), exports);
|
|
29
33
|
__exportStar(require("./StreamNamirasoftLog"), exports);
|
|
34
|
+
__exportStar(require("./command/HealthzCommand"), exports);
|
|
35
|
+
__exportStar(require("./command/HealthzGetCommand"), exports);
|
|
36
|
+
__exportStar(require("./command/LogCommand"), exports);
|
|
37
|
+
__exportStar(require("./command/LogCreateCommand"), exports);
|
|
38
|
+
__exportStar(require("./command/LogGetAllCommand"), exports);
|
|
39
|
+
__exportStar(require("./command/LogGetCommand"), exports);
|
|
40
|
+
__exportStar(require("./command/LogGroupCommand"), exports);
|
|
41
|
+
__exportStar(require("./command/LogGroupCreateCommand"), exports);
|
|
42
|
+
__exportStar(require("./command/LogGroupDeleteCommand"), exports);
|
|
43
|
+
__exportStar(require("./command/LogGroupGetAllCommand"), exports);
|
|
44
|
+
__exportStar(require("./command/LogGroupGetCommand"), exports);
|
|
45
|
+
__exportStar(require("./command/LogGroupUpdateCommand"), exports);
|
|
46
|
+
__exportStar(require("./row/LogRow"), exports);
|
|
47
|
+
__exportStar(require("./row/LogRowInput"), exports);
|
|
48
|
+
__exportStar(require("./row/LogRowOutput"), exports);
|
|
49
|
+
__exportStar(require("./row/LoggroupRow"), exports);
|
|
50
|
+
__exportStar(require("./row/LoggroupRowInput"), exports);
|
|
51
|
+
__exportStar(require("./row/LoggroupRowOutput"), exports);
|
|
30
52
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqBA,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,+CAA6B;AAC7B,4CAA0B;AAC1B,4CAA0B;AAC1B,wCAAsB;AACtB,6CAA2B;AAC3B,2CAAyB;AACzB,wDAAsC;AACtC,4DAA0C;AAC1C,+DAA6C;AAC7C,2DAAyC;AACzC,gEAA8C;AAC9C,kDAAgC;AAChC,+CAA6B;AAC7B,wDAAsC;AACtC,2DAAyC;AACzC,8DAA4C;AAC5C,uDAAqC;AACrC,6DAA2C;AAC3C,6DAA2C;AAC3C,0DAAwC;AACxC,4DAA0C;AAC1C,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,+DAA6C;AAC7C,kEAAgD;AAChD,+CAA6B;AAC7B,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,yDAAuC;AACvC,0DAAwC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogRow.js","sourceRoot":"","sources":["../../src/row/LogRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type LogRowInput = {
|
|
2
|
+
id: (string | null);
|
|
3
|
+
user_id: (string | null);
|
|
4
|
+
product_id: (string | null);
|
|
5
|
+
project_id: (string | null);
|
|
6
|
+
log_group_id: (string | null);
|
|
7
|
+
level: (string | null);
|
|
8
|
+
message: (string | null);
|
|
9
|
+
stack: (string | null);
|
|
10
|
+
sent: (boolean | null);
|
|
11
|
+
result: (string | null);
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogRowInput.js","sourceRoot":"","sources":["../../src/row/LogRowInput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type LogRowOutput = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogRowOutput.js","sourceRoot":"","sources":["../../src/row/LogRowOutput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggroupRow.js","sourceRoot":"","sources":["../../src/row/LoggroupRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggroupRowInput.js","sourceRoot":"","sources":["../../src/row/LoggroupRowInput.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoggroupRowOutput.js","sourceRoot":"","sources":["../../src/row/LoggroupRowOutput.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -3,21 +3,25 @@
|
|
|
3
3
|
"title": "Namirasoft Log",
|
|
4
4
|
"description": "Namira Software Corporation Log NPM Package",
|
|
5
5
|
"icon": "logo.png",
|
|
6
|
-
"logo": "https://static.namirasoft.com/
|
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/log/logo/name.png",
|
|
7
7
|
"language": "ts",
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
12
|
-
"main": "./dist/index.js",
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
11
|
+
"version": "1.3.7",
|
|
14
12
|
"author": "Amir Abolhasani",
|
|
15
13
|
"license": "MIT",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": ""
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"
|
|
21
|
-
"namirasoft-
|
|
20
|
+
"namirasoft-core": "^1.3.19",
|
|
21
|
+
"namirasoft-node-cli": "^1.3.7",
|
|
22
|
+
"namirasoft-account": "^1.3.15"
|
|
23
|
+
},
|
|
24
|
+
"bin": {
|
|
25
|
+
"ns-log": "./dist/command/cli.js"
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
/****************************************************************/
|
|
3
|
+
/* */
|
|
4
|
+
/* This is an Auto-Generated File */
|
|
5
|
+
/* Made By */
|
|
6
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
7
|
+
/* */
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/****************************************************************/
|
|
10
|
+
/* */
|
|
11
|
+
/* Please do not make any change to this file */
|
|
12
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
13
|
+
/* */
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/****************************************************************/
|
|
16
|
+
/* */
|
|
17
|
+
/* Namira Software Corporation */
|
|
18
|
+
/* https://namirasoft.com */
|
|
19
|
+
/* */
|
|
20
|
+
/****************************************************************/
|
|
21
|
+
|
|
22
|
+
import { NamirasoftLogServerHealthz } from "./NamirasoftLogServerHealthz";
|
|
23
|
+
import { NamirasoftLogServerLog } from "./NamirasoftLogServerLog";
|
|
24
|
+
import { NamirasoftLogServerLogGroup } from "./NamirasoftLogServerLogGroup";
|
|
25
|
+
import { TokenManager } from "namirasoft-account";
|
|
26
|
+
|
|
27
|
+
export class NamirasoftLogServer
|
|
2
28
|
{
|
|
3
|
-
|
|
29
|
+
manager: TokenManager;
|
|
30
|
+
healthz: NamirasoftLogServerHealthz;
|
|
31
|
+
log: NamirasoftLogServerLog;
|
|
32
|
+
loggroup: NamirasoftLogServerLogGroup;
|
|
33
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
34
|
+
{
|
|
35
|
+
this.manager = manager;
|
|
36
|
+
this.healthz = new NamirasoftLogServerHealthz(manager, onError);
|
|
37
|
+
this.log = new NamirasoftLogServerLog(manager, onError);
|
|
38
|
+
this.loggroup = new NamirasoftLogServerLogGroup(manager, onError);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
/****************************************************************/
|
|
3
|
+
/* */
|
|
4
|
+
/* This is an Auto-Generated File */
|
|
5
|
+
/* Made By */
|
|
6
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
7
|
+
/* */
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/****************************************************************/
|
|
10
|
+
/* */
|
|
11
|
+
/* Please do not make any change to this file */
|
|
12
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
13
|
+
/* */
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/****************************************************************/
|
|
16
|
+
/* */
|
|
17
|
+
/* Namira Software Corporation */
|
|
18
|
+
/* https://namirasoft.com */
|
|
19
|
+
/* */
|
|
20
|
+
/****************************************************************/
|
|
21
|
+
|
|
22
|
+
import { NamirasoftServerBase } from "namirasoft-account";
|
|
23
|
+
import { TokenManager } from "namirasoft-account";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftLogServerBase extends NamirasoftServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
28
|
+
{
|
|
29
|
+
super(`https://log.namirasoft.com/api/v1`, manager, onError);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
/****************************************************************/
|
|
3
|
+
/* */
|
|
4
|
+
/* This is an Auto-Generated File */
|
|
5
|
+
/* Made By */
|
|
6
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
7
|
+
/* */
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/****************************************************************/
|
|
10
|
+
/* */
|
|
11
|
+
/* Please do not make any change to this file */
|
|
12
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
13
|
+
/* */
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/****************************************************************/
|
|
16
|
+
/* */
|
|
17
|
+
/* Namira Software Corporation */
|
|
18
|
+
/* https://namirasoft.com */
|
|
19
|
+
/* */
|
|
20
|
+
/****************************************************************/
|
|
21
|
+
|
|
22
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
23
|
+
|
|
24
|
+
export class NamirasoftLogServerHealthz extends NamirasoftLogServerBase
|
|
25
|
+
{
|
|
26
|
+
async Get(): Promise<void>
|
|
27
|
+
{
|
|
28
|
+
let path = `/healthz`;
|
|
29
|
+
let { data } = await this._get<void>(path, {});
|
|
30
|
+
return data;
|
|
31
|
+
}
|
|
32
|
+
};
|