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.
Files changed (104) hide show
  1. package/.ns-sdkg-dir-deep +1 -0
  2. package/.ns-sdkg-dir-keep +0 -0
  3. package/.ns-sdkg-file-keep +12 -0
  4. package/dist/NamirasoftLogServer.d.ts +9 -0
  5. package/dist/NamirasoftLogServer.js +10 -0
  6. package/dist/NamirasoftLogServer.js.map +1 -1
  7. package/dist/NamirasoftLogServerBase.d.ts +5 -0
  8. package/dist/NamirasoftLogServerBase.js +12 -0
  9. package/dist/NamirasoftLogServerBase.js.map +1 -0
  10. package/dist/NamirasoftLogServerHealthz.d.ts +4 -0
  11. package/dist/NamirasoftLogServerHealthz.js +25 -0
  12. package/dist/NamirasoftLogServerHealthz.js.map +1 -0
  13. package/dist/NamirasoftLogServerLog.d.ts +8 -0
  14. package/dist/NamirasoftLogServerLog.js +39 -0
  15. package/dist/NamirasoftLogServerLog.js.map +1 -0
  16. package/dist/NamirasoftLogServerLogGroup.d.ts +10 -0
  17. package/dist/NamirasoftLogServerLogGroup.js +53 -0
  18. package/dist/NamirasoftLogServerLogGroup.js.map +1 -0
  19. package/dist/command/HealthzCommand.d.ts +4 -0
  20. package/dist/command/HealthzCommand.js +15 -0
  21. package/dist/command/HealthzCommand.js.map +1 -0
  22. package/dist/command/HealthzGetCommand.d.ts +5 -0
  23. package/dist/command/HealthzGetCommand.js +37 -0
  24. package/dist/command/HealthzGetCommand.js.map +1 -0
  25. package/dist/command/LogCommand.d.ts +4 -0
  26. package/dist/command/LogCommand.js +19 -0
  27. package/dist/command/LogCommand.js.map +1 -0
  28. package/dist/command/LogCreateCommand.d.ts +5 -0
  29. package/dist/command/LogCreateCommand.js +129 -0
  30. package/dist/command/LogCreateCommand.js.map +1 -0
  31. package/dist/command/LogGetAllCommand.d.ts +5 -0
  32. package/dist/command/LogGetAllCommand.js +37 -0
  33. package/dist/command/LogGetAllCommand.js.map +1 -0
  34. package/dist/command/LogGetCommand.d.ts +5 -0
  35. package/dist/command/LogGetCommand.js +37 -0
  36. package/dist/command/LogGetCommand.js.map +1 -0
  37. package/dist/command/LogGroupCommand.d.ts +4 -0
  38. package/dist/command/LogGroupCommand.js +23 -0
  39. package/dist/command/LogGroupCommand.js.map +1 -0
  40. package/dist/command/LogGroupCreateCommand.d.ts +5 -0
  41. package/dist/command/LogGroupCreateCommand.js +57 -0
  42. package/dist/command/LogGroupCreateCommand.js.map +1 -0
  43. package/dist/command/LogGroupDeleteCommand.d.ts +5 -0
  44. package/dist/command/LogGroupDeleteCommand.js +37 -0
  45. package/dist/command/LogGroupDeleteCommand.js.map +1 -0
  46. package/dist/command/LogGroupGetAllCommand.d.ts +5 -0
  47. package/dist/command/LogGroupGetAllCommand.js +37 -0
  48. package/dist/command/LogGroupGetAllCommand.js.map +1 -0
  49. package/dist/command/LogGroupGetCommand.d.ts +5 -0
  50. package/dist/command/LogGroupGetCommand.js +37 -0
  51. package/dist/command/LogGroupGetCommand.js.map +1 -0
  52. package/dist/command/LogGroupUpdateCommand.d.ts +5 -0
  53. package/dist/command/LogGroupUpdateCommand.js +57 -0
  54. package/dist/command/LogGroupUpdateCommand.js.map +1 -0
  55. package/dist/command/cli.d.ts +2 -0
  56. package/dist/command/cli.js +16 -0
  57. package/dist/command/cli.js.map +1 -0
  58. package/dist/index.d.ts +23 -1
  59. package/dist/index.js +23 -1
  60. package/dist/index.js.map +1 -1
  61. package/dist/row/LogRow.d.ts +3 -0
  62. package/dist/row/LogRow.js +3 -0
  63. package/dist/row/LogRow.js.map +1 -0
  64. package/dist/row/LogRowInput.d.ts +12 -0
  65. package/dist/row/LogRowInput.js +3 -0
  66. package/dist/row/LogRowInput.js.map +1 -0
  67. package/dist/row/LogRowOutput.d.ts +1 -0
  68. package/dist/row/LogRowOutput.js +3 -0
  69. package/dist/row/LogRowOutput.js.map +1 -0
  70. package/dist/row/LoggroupRow.d.ts +3 -0
  71. package/dist/row/LoggroupRow.js +3 -0
  72. package/dist/row/LoggroupRow.js.map +1 -0
  73. package/dist/row/LoggroupRowInput.d.ts +4 -0
  74. package/dist/row/LoggroupRowInput.js +3 -0
  75. package/dist/row/LoggroupRowInput.js.map +1 -0
  76. package/dist/row/LoggroupRowOutput.d.ts +4 -0
  77. package/dist/row/LoggroupRowOutput.js +3 -0
  78. package/dist/row/LoggroupRowOutput.js.map +1 -0
  79. package/package.json +10 -6
  80. package/src/NamirasoftLogServer.ts +39 -2
  81. package/src/NamirasoftLogServerBase.ts +31 -0
  82. package/src/NamirasoftLogServerHealthz.ts +32 -0
  83. package/src/NamirasoftLogServerLog.ts +46 -0
  84. package/src/NamirasoftLogServerLogGroup.ts +58 -0
  85. package/src/command/HealthzCommand.ts +33 -0
  86. package/src/command/HealthzGetCommand.ts +45 -0
  87. package/src/command/LogCommand.ts +37 -0
  88. package/src/command/LogCreateCommand.ts +137 -0
  89. package/src/command/LogGetAllCommand.ts +45 -0
  90. package/src/command/LogGetCommand.ts +45 -0
  91. package/src/command/LogGroupCommand.ts +41 -0
  92. package/src/command/LogGroupCreateCommand.ts +65 -0
  93. package/src/command/LogGroupDeleteCommand.ts +45 -0
  94. package/src/command/LogGroupGetAllCommand.ts +45 -0
  95. package/src/command/LogGroupGetCommand.ts +45 -0
  96. package/src/command/LogGroupUpdateCommand.ts +65 -0
  97. package/src/command/cli.ts +35 -0
  98. package/src/index.ts +45 -2
  99. package/src/row/LogRow.ts +25 -0
  100. package/src/row/LogRowInput.ts +34 -0
  101. package/src/row/LogRowOutput.ts +24 -0
  102. package/src/row/LoggroupRow.ts +25 -0
  103. package/src/row/LoggroupRowInput.ts +26 -0
  104. package/src/row/LoggroupRowOutput.ts +26 -0
@@ -0,0 +1,45 @@
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 { BaseFinalCommand } from "namirasoft-node-cli";
23
+ import { IStorageMemory } from "namirasoft-core";
24
+ import { NamirasoftLogServer } from "../NamirasoftLogServer";
25
+ import { TokenManager } from "namirasoft-account";
26
+
27
+ export class LogGroupGetCommand extends BaseFinalCommand
28
+ {
29
+ constructor(argv: string[])
30
+ {
31
+ super(argv, ["id"], []);
32
+ }
33
+ override async exec()
34
+ {
35
+ let token = this.app.storage.getNSAToken();
36
+ if (token == null)
37
+ throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
38
+ let storage = new IStorageMemory();
39
+ let manager = new TokenManager(storage, () => { });
40
+ manager.setValue(token, false);
41
+ let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.loggroup.Get(this.arg_values[0]);
43
+ this.app.logger.success(JSON.stringify(ans));
44
+ }
45
+ };
@@ -0,0 +1,65 @@
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 { BaseFinalCommand } from "namirasoft-node-cli";
23
+ import { IStorageMemory } from "namirasoft-core";
24
+ import { NamirasoftLogServer } from "../NamirasoftLogServer";
25
+ import { TokenManager } from "namirasoft-account";
26
+
27
+ export class LogGroupUpdateCommand extends BaseFinalCommand
28
+ {
29
+ constructor(argv: string[])
30
+ {
31
+ super(argv, ["id"], [
32
+ {
33
+ name: "project_id",
34
+ short: "",
35
+ description: "Provides the value of 'project_id' in body",
36
+ optional: false,
37
+ args: ["project_id"],
38
+ defaults: [""]
39
+ },
40
+ {
41
+ name: "name",
42
+ short: "",
43
+ description: "Provides the value of 'name' in body",
44
+ optional: false,
45
+ args: ["name"],
46
+ defaults: [""]
47
+ }
48
+ ]);
49
+ }
50
+ override async exec()
51
+ {
52
+ let token = this.app.storage.getNSAToken();
53
+ if (token == null)
54
+ throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
55
+ let storage = new IStorageMemory();
56
+ let manager = new TokenManager(storage, () => { });
57
+ manager.setValue(token, false);
58
+ let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
59
+ let ans = await server.loggroup.Update(this.arg_values[0], {
60
+ project_id: this.option_values.project_id,
61
+ name: this.option_values.name
62
+ });
63
+ this.app.logger.success(JSON.stringify(ans));
64
+ }
65
+ };
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
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 { AccountCommand } from "namirasoft-account";
23
+ import { Application, BaseStorage } from "namirasoft-node-cli";
24
+ import { HealthzCommand } from "./HealthzCommand";
25
+ import { LogCommand } from "./LogCommand";
26
+ import { LogGroupCommand } from "./LogGroupCommand";
27
+
28
+ let app = new Application("ns-log", new BaseStorage(),
29
+ {
30
+ "healthz": HealthzCommand,
31
+ "log": LogCommand,
32
+ "loggroup": LogGroupCommand,
33
+ "account": AccountCommand
34
+ });
35
+ app.run();
package/src/index.ts CHANGED
@@ -1,3 +1,24 @@
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
+
1
22
  export * from "./BaseFormatter";
2
23
  export * from "./FormatterFull";
3
24
  export * from "./FormatterShort";
@@ -5,9 +26,31 @@ export * from "./IFormatter";
5
26
  export * from "./ILogger";
6
27
  export * from "./IStream";
7
28
  export * from "./Log";
8
- export * from "./Logger";
9
29
  export * from "./LogLevel";
30
+ export * from "./Logger";
10
31
  export * from "./NamirasoftLogServer";
32
+ export * from "./NamirasoftLogServerBase";
33
+ export * from "./NamirasoftLogServerHealthz";
34
+ export * from "./NamirasoftLogServerLog";
35
+ export * from "./NamirasoftLogServerLogGroup";
11
36
  export * from "./StreamConsole";
12
37
  export * from "./StreamFile";
13
- export * from "./StreamNamirasoftLog";
38
+ export * from "./StreamNamirasoftLog";
39
+ export * from "./command/HealthzCommand";
40
+ export * from "./command/HealthzGetCommand";
41
+ export * from "./command/LogCommand";
42
+ export * from "./command/LogCreateCommand";
43
+ export * from "./command/LogGetAllCommand";
44
+ export * from "./command/LogGetCommand";
45
+ export * from "./command/LogGroupCommand";
46
+ export * from "./command/LogGroupCreateCommand";
47
+ export * from "./command/LogGroupDeleteCommand";
48
+ export * from "./command/LogGroupGetAllCommand";
49
+ export * from "./command/LogGroupGetCommand";
50
+ export * from "./command/LogGroupUpdateCommand";
51
+ export * from "./row/LogRow";
52
+ export * from "./row/LogRowInput";
53
+ export * from "./row/LogRowOutput";
54
+ export * from "./row/LoggroupRow";
55
+ export * from "./row/LoggroupRowInput";
56
+ export * from "./row/LoggroupRowOutput";
@@ -0,0 +1,25 @@
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 { LogRowInput } from "./LogRowInput";
23
+ import { LogRowOutput } from "./LogRowOutput";
24
+
25
+ export type LogRow = LogRowInput & LogRowOutput;
@@ -0,0 +1,34 @@
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
+ export type LogRowInput =
23
+ {
24
+ id: (string | null);
25
+ user_id: (string | null);
26
+ product_id: (string | null);
27
+ project_id: (string | null);
28
+ log_group_id: (string | null);
29
+ level: (string | null);
30
+ message: (string | null);
31
+ stack: (string | null);
32
+ sent: (boolean | null);
33
+ result: (string | null);
34
+ }
@@ -0,0 +1,24 @@
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
+ export type LogRowOutput =
23
+ {
24
+ }
@@ -0,0 +1,25 @@
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 { LoggroupRowInput } from "./LoggroupRowInput";
23
+ import { LoggroupRowOutput } from "./LoggroupRowOutput";
24
+
25
+ export type LoggroupRow = LoggroupRowInput & LoggroupRowOutput;
@@ -0,0 +1,26 @@
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
+ export type LoggroupRowInput =
23
+ {
24
+ project_id: string;
25
+ name: string;
26
+ }
@@ -0,0 +1,26 @@
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
+ export type LoggroupRowOutput =
23
+ {
24
+ id: string;
25
+ user_id: string;
26
+ }