namirasoft-log 1.3.5 → 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/FormatterFull.d.ts +2 -2
- package/dist/FormatterFull.js +9 -20
- package/dist/FormatterFull.js.map +1 -1
- package/dist/FormatterShort.d.ts +2 -2
- package/dist/FormatterShort.js +3 -14
- package/dist/FormatterShort.js.map +1 -1
- package/dist/IFormatter.d.ts +2 -2
- package/dist/ILogger.d.ts +13 -13
- package/dist/IStream.d.ts +1 -1
- package/dist/Logger.d.ts +13 -13
- package/dist/Logger.js +21 -58
- package/dist/Logger.js.map +1 -1
- 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/StreamConsole.d.ts +1 -1
- package/dist/StreamConsole.js +25 -36
- package/dist/StreamConsole.js.map +1 -1
- package/dist/StreamFile.d.ts +1 -1
- package/dist/StreamFile.js +2 -13
- package/dist/StreamFile.js.map +1 -1
- package/dist/StreamNamirasoftLog.d.ts +1 -1
- package/dist/StreamNamirasoftLog.js +0 -11
- package/dist/StreamNamirasoftLog.js.map +1 -1
- 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/FormatterFull.ts +1 -1
- package/src/FormatterShort.ts +1 -1
- package/src/IFormatter.ts +1 -1
- package/src/ILogger.ts +13 -13
- package/src/IStream.ts +1 -1
- package/src/Logger.ts +27 -30
- 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/StreamConsole.ts +1 -1
- package/src/StreamFile.ts +1 -1
- package/src/StreamNamirasoftLog.ts +1 -1
- 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
package/dist/StreamConsole.js
CHANGED
|
@@ -1,46 +1,35 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.StreamConsole = void 0;
|
|
13
4
|
const namirasoft_core_1 = require("namirasoft-core");
|
|
14
5
|
const LogLevel_1 = require("./LogLevel");
|
|
15
6
|
class StreamConsole {
|
|
16
7
|
write(log, formated) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
formated.post.forEach(f => namirasoft_core_1.ConsoleOperation.log(f));
|
|
43
|
-
});
|
|
8
|
+
let writter = (data) => {
|
|
9
|
+
if (log.level == LogLevel_1.LogLevel.Trace)
|
|
10
|
+
namirasoft_core_1.ConsoleOperation.trace(data);
|
|
11
|
+
else if (log.level == LogLevel_1.LogLevel.Verbose)
|
|
12
|
+
namirasoft_core_1.ConsoleOperation.log(data);
|
|
13
|
+
else if (log.level == LogLevel_1.LogLevel.Debug)
|
|
14
|
+
namirasoft_core_1.ConsoleOperation.debug(data);
|
|
15
|
+
else if (log.level == LogLevel_1.LogLevel.Info)
|
|
16
|
+
namirasoft_core_1.ConsoleOperation.info(data);
|
|
17
|
+
else if (log.level == LogLevel_1.LogLevel.Success)
|
|
18
|
+
namirasoft_core_1.ConsoleOperation.success(data);
|
|
19
|
+
else if (log.level == LogLevel_1.LogLevel.Warning)
|
|
20
|
+
namirasoft_core_1.ConsoleOperation.warning(data);
|
|
21
|
+
else if (log.level == LogLevel_1.LogLevel.Error)
|
|
22
|
+
namirasoft_core_1.ConsoleOperation.error(data);
|
|
23
|
+
else if (log.level == LogLevel_1.LogLevel.Critical)
|
|
24
|
+
namirasoft_core_1.ConsoleOperation.error(data);
|
|
25
|
+
else if (log.level == LogLevel_1.LogLevel.Fatal)
|
|
26
|
+
namirasoft_core_1.ConsoleOperation.error(data);
|
|
27
|
+
else
|
|
28
|
+
namirasoft_core_1.ConsoleOperation.log(data);
|
|
29
|
+
};
|
|
30
|
+
formated.pre.forEach(f => namirasoft_core_1.ConsoleOperation.log(f));
|
|
31
|
+
formated.messages.forEach(f => writter(f));
|
|
32
|
+
formated.post.forEach(f => namirasoft_core_1.ConsoleOperation.log(f));
|
|
44
33
|
}
|
|
45
34
|
}
|
|
46
35
|
exports.StreamConsole = StreamConsole;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamConsole.js","sourceRoot":"","sources":["../src/StreamConsole.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StreamConsole.js","sourceRoot":"","sources":["../src/StreamConsole.ts"],"names":[],"mappings":";;;AAAA,qDAAmD;AAGnD,yCAAsC;AAEtC,MAAa,aAAa;IAEtB,KAAK,CAAC,GAAQ,EAAE,QAA+D;QAE3E,IAAI,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE;YAE3B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,KAAK;gBAC3B,kCAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBAC5B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,OAAO;gBAClC,kCAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;iBAC1B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,KAAK;gBAChC,kCAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBAC5B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,IAAI;gBAC/B,kCAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC3B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,OAAO;gBAClC,kCAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBAC9B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,OAAO;gBAClC,kCAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBAC9B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,KAAK;gBAChC,kCAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBAC5B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,QAAQ;gBACnC,kCAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBAC5B,IAAI,GAAG,CAAC,KAAK,IAAI,mBAAQ,CAAC,KAAK;gBAChC,kCAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;;gBAE7B,kCAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC,CAAA;QACD,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,kCAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACnD,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3C,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,kCAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;CACJ;AA/BD,sCA+BC"}
|
package/dist/StreamFile.d.ts
CHANGED
package/dist/StreamFile.js
CHANGED
|
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
26
|
exports.StreamFile = void 0;
|
|
36
27
|
const fs = __importStar(require("fs"));
|
|
@@ -65,10 +56,8 @@ class StreamFile {
|
|
|
65
56
|
return path.resolve(this.basePath, name);
|
|
66
57
|
}
|
|
67
58
|
write(log, formated) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
fs.appendFile(filePath, [...formated.pre, ...formated.messages, ...formated.post].join("\n"), () => { });
|
|
71
|
-
});
|
|
59
|
+
let filePath = this.getFilePath(log);
|
|
60
|
+
fs.appendFile(filePath, [...formated.pre, ...formated.messages, ...formated.post].join("\n"), () => { });
|
|
72
61
|
}
|
|
73
62
|
}
|
|
74
63
|
exports.StreamFile = StreamFile;
|
package/dist/StreamFile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamFile.js","sourceRoot":"","sources":["../src/StreamFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StreamFile.js","sourceRoot":"","sources":["../src/StreamFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAI7B,MAAa,UAAU;IAMnB,YAAY,WAAmB,IAAI;QAFnC,kBAAa,GAAY,IAAI,CAAC;QAC9B,mBAAc,GAAY,IAAI,CAAC;QAG3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1C,CAAC;IACO,cAAc;QAElB,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EACrC;YACI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;SAChD;QACD,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAC1B;YACI,IAAI,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;YACzC,IAAI,GAAG,GAAG,IAAI,CAAC,K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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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.StreamNamirasoftLog = void 0;
|
|
13
4
|
class StreamNamirasoftLog {
|
|
@@ -15,8 +6,6 @@ class StreamNamirasoftLog {
|
|
|
15
6
|
this.token = token;
|
|
16
7
|
}
|
|
17
8
|
write(_, __) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
});
|
|
20
9
|
}
|
|
21
10
|
}
|
|
22
11
|
exports.StreamNamirasoftLog = StreamNamirasoftLog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamNamirasoftLog.js","sourceRoot":"","sources":["../src/StreamNamirasoftLog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StreamNamirasoftLog.js","sourceRoot":"","sources":["../src/StreamNamirasoftLog.ts"],"names":[],"mappings":";;;AAGA,MAAa,mBAAmB;IAG5B,YAAY,KAAa;QAErB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACD,KAAK,CAAC,CAAM,EAAE,EAAyD;IAEvE,CAAC;CACJ;AAVD,kDAUC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HealthzCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const HealthzGetCommand_1 = require("./HealthzGetCommand");
|
|
6
|
+
class HealthzCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
7
|
+
constructor(argv) {
|
|
8
|
+
super(argv, {
|
|
9
|
+
"get": HealthzGetCommand_1.HealthzGetCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.HealthzCommand = HealthzCommand;
|
|
14
|
+
;
|
|
15
|
+
//# sourceMappingURL=HealthzCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HealthzCommand.js","sourceRoot":"","sources":["../../src/command/HealthzCommand.ts"],"names":[],"mappings":";;;AAqBA,6DAA2D;AAC3D,2DAAwD;AAExD,MAAa,cAAe,SAAQ,0CAAoB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,KAAK,EAAE,qCAAiB;SAC3B,CAAC,CAAC;IACP,CAAC;CACJ;AARD,wCAQC;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.HealthzGetCommand = 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 HealthzGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], []);
|
|
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.healthz.Get();
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.HealthzGetCommand = HealthzGetCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=HealthzGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HealthzGetCommand.js","sourceRoot":"","sources":["../../src/command/HealthzGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,iBAAkB,SAAQ,sCAAgB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,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,OAAO,CAAC,GAAG,EAAE,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,8CAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const LogCreateCommand_1 = require("./LogCreateCommand");
|
|
6
|
+
const LogGetAllCommand_1 = require("./LogGetAllCommand");
|
|
7
|
+
const LogGetCommand_1 = require("./LogGetCommand");
|
|
8
|
+
class LogCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
9
|
+
constructor(argv) {
|
|
10
|
+
super(argv, {
|
|
11
|
+
"getall": LogGetAllCommand_1.LogGetAllCommand,
|
|
12
|
+
"get": LogGetCommand_1.LogGetCommand,
|
|
13
|
+
"create": LogCreateCommand_1.LogCreateCommand,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.LogCommand = LogCommand;
|
|
18
|
+
;
|
|
19
|
+
//# sourceMappingURL=LogCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogCommand.js","sourceRoot":"","sources":["../../src/command/LogCommand.ts"],"names":[],"mappings":";;;AAqBA,6DAA2D;AAC3D,yDAAsD;AACtD,yDAAsD;AACtD,mDAAgD;AAEhD,MAAa,UAAW,SAAQ,0CAAoB;IAEhD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,QAAQ,EAAE,mCAAgB;YAC1B,KAAK,EAAE,6BAAa;YACpB,QAAQ,EAAE,mCAAgB;SAC7B,CAAC,CAAC;IACP,CAAC;CACJ;AAVD,gCAUC;AAAA,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
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.LogCreateCommand = 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 LogCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
20
|
+
{
|
|
21
|
+
name: "id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'id' in body",
|
|
24
|
+
optional: true,
|
|
25
|
+
args: ["id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "user_id",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'user_id' in body",
|
|
32
|
+
optional: true,
|
|
33
|
+
args: ["user_id"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "product_id",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'product_id' in body",
|
|
40
|
+
optional: true,
|
|
41
|
+
args: ["product_id"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "project_id",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'project_id' in body",
|
|
48
|
+
optional: true,
|
|
49
|
+
args: ["project_id"],
|
|
50
|
+
defaults: [""]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "log_group_id",
|
|
54
|
+
short: "",
|
|
55
|
+
description: "Provides the value of 'log_group_id' in body",
|
|
56
|
+
optional: true,
|
|
57
|
+
args: ["log_group_id"],
|
|
58
|
+
defaults: [""]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "level",
|
|
62
|
+
short: "",
|
|
63
|
+
description: "Provides the value of 'level' in body",
|
|
64
|
+
optional: true,
|
|
65
|
+
args: ["level"],
|
|
66
|
+
defaults: [""]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "message",
|
|
70
|
+
short: "",
|
|
71
|
+
description: "Provides the value of 'message' in body",
|
|
72
|
+
optional: true,
|
|
73
|
+
args: ["message"],
|
|
74
|
+
defaults: [""]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "stack",
|
|
78
|
+
short: "",
|
|
79
|
+
description: "Provides the value of 'stack' in body",
|
|
80
|
+
optional: true,
|
|
81
|
+
args: ["stack"],
|
|
82
|
+
defaults: [""]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "sent",
|
|
86
|
+
short: "",
|
|
87
|
+
description: "Provides the value of 'sent' in body",
|
|
88
|
+
optional: true,
|
|
89
|
+
args: ["sent"],
|
|
90
|
+
defaults: [""]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "result",
|
|
94
|
+
short: "",
|
|
95
|
+
description: "Provides the value of 'result' in body",
|
|
96
|
+
optional: true,
|
|
97
|
+
args: ["result"],
|
|
98
|
+
defaults: [""]
|
|
99
|
+
}
|
|
100
|
+
]);
|
|
101
|
+
}
|
|
102
|
+
exec() {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
let token = this.app.storage.getNSAToken();
|
|
105
|
+
if (token == null)
|
|
106
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
107
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
108
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
109
|
+
manager.setValue(token, false);
|
|
110
|
+
let server = new NamirasoftLogServer_1.NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
111
|
+
let ans = yield server.log.Create({
|
|
112
|
+
id: this.option_values.id,
|
|
113
|
+
user_id: this.option_values.user_id,
|
|
114
|
+
product_id: this.option_values.product_id,
|
|
115
|
+
project_id: this.option_values.project_id,
|
|
116
|
+
log_group_id: this.option_values.log_group_id,
|
|
117
|
+
level: this.option_values.level,
|
|
118
|
+
message: this.option_values.message,
|
|
119
|
+
stack: this.option_values.stack,
|
|
120
|
+
sent: this.option_values.sent,
|
|
121
|
+
result: this.option_values.result
|
|
122
|
+
});
|
|
123
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.LogCreateCommand = LogCreateCommand;
|
|
128
|
+
;
|
|
129
|
+
//# sourceMappingURL=LogCreateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogCreateCommand.js","sourceRoot":"","sources":["../../src/command/LogCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,gBAAiB,SAAQ,sCAAgB;IAElD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,oCAAoC;gBACjD,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,IAAI,CAAC;gBACZ,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,yCAAyC;gBACtD,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,SAAS,CAAC;gBACjB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,YAAY,CAAC;gBACpB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,YAAY,CAAC;gBACpB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,8CAA8C;gBAC3D,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,cAAc,CAAC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,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,GAAG,CAAC,MAAM,CAAC;gBAC9B,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE;gBACzB,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO;gBACnC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU;gBACzC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU;gBACzC,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,YAAY;gBAC7C,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK;gBAC/B,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO;gBACnC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK;gBAC/B,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;gBAC7B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;aACpC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AA9GD,4CA8GC;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.LogGetAllCommand = 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 LogGetAllCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["product_id", "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.log.GetAll(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGetAllCommand = LogGetAllCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingUR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A;CACJ;AAlBD,4CAkBC;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.LogGetCommand = 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 LogGetCommand 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.log.Get(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LogGetCommand = LogGetCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=LogGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGetCommand.js","sourceRoot":"","sources":["../../src/command/LogGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,gEAA6D;AAC7D,2DAAkD;AAElD,MAAa,aAAc,SAAQ,sCAAgB;IAE/C,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,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,sCAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogGroupCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const LogGroupCreateCommand_1 = require("./LogGroupCreateCommand");
|
|
6
|
+
const LogGroupDeleteCommand_1 = require("./LogGroupDeleteCommand");
|
|
7
|
+
const LogGroupGetAllCommand_1 = require("./LogGroupGetAllCommand");
|
|
8
|
+
const LogGroupGetCommand_1 = require("./LogGroupGetCommand");
|
|
9
|
+
const LogGroupUpdateCommand_1 = require("./LogGroupUpdateCommand");
|
|
10
|
+
class LogGroupCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
11
|
+
constructor(argv) {
|
|
12
|
+
super(argv, {
|
|
13
|
+
"getall": LogGroupGetAllCommand_1.LogGroupGetAllCommand,
|
|
14
|
+
"get": LogGroupGetCommand_1.LogGroupGetCommand,
|
|
15
|
+
"create": LogGroupCreateCommand_1.LogGroupCreateCommand,
|
|
16
|
+
"update": LogGroupUpdateCommand_1.LogGroupUpdateCommand,
|
|
17
|
+
"delete": LogGroupDeleteCommand_1.LogGroupDeleteCommand,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.LogGroupCommand = LogGroupCommand;
|
|
22
|
+
;
|
|
23
|
+
//# sourceMappingURL=LogGroupCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogGroupCommand.js","sourceRoot":"","sources":["../../src/command/LogGroupCommand.ts"],"names":[],"mappings":";;;AAqBA,6DAA2D;AAC3D,mEAAgE;AAChE,mEAAgE;AAChE,mEAAgE;AAChE,6DAA0D;AAC1D,mEAAgE;AAEhE,MAAa,eAAgB,SAAQ,0CAAoB;IAErD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,QAAQ,EAAE,6CAAqB;YAC/B,KAAK,EAAE,uCAAkB;YACzB,QAAQ,EAAE,6CAAqB;YAC/B,QAAQ,EAAE,6CAAqB;YAC/B,QAAQ,EAAE,6CAAqB;SAClC,CAAC,CAAC;IACP,CAAC;CACJ;AAZD,0CAYC;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.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,K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