@dbos-inc/dbos-sdk 0.7.35 → 0.8.14-preview

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/dist/src/cloud-cli/applications/configure.d.ts +1 -1
  2. package/dist/src/cloud-cli/applications/configure.d.ts.map +1 -1
  3. package/dist/src/cloud-cli/applications/configure.js +35 -28
  4. package/dist/src/cloud-cli/applications/configure.js.map +1 -1
  5. package/dist/src/cloud-cli/applications/delete-app.js +1 -1
  6. package/dist/src/cloud-cli/applications/delete-app.js.map +1 -1
  7. package/dist/src/cloud-cli/applications/deploy-app-code.d.ts.map +1 -1
  8. package/dist/src/cloud-cli/applications/deploy-app-code.js +10 -2
  9. package/dist/src/cloud-cli/applications/deploy-app-code.js.map +1 -1
  10. package/dist/src/cloud-cli/applications/get-app-logs.js +1 -1
  11. package/dist/src/cloud-cli/applications/get-app-logs.js.map +1 -1
  12. package/dist/src/cloud-cli/applications/list-apps.js +1 -1
  13. package/dist/src/cloud-cli/applications/list-apps.js.map +1 -1
  14. package/dist/src/cloud-cli/applications/register-app.js +1 -1
  15. package/dist/src/cloud-cli/applications/register-app.js.map +1 -1
  16. package/dist/src/cloud-cli/applications/update-app.d.ts.map +1 -1
  17. package/dist/src/cloud-cli/applications/update-app.js +3 -2
  18. package/dist/src/cloud-cli/applications/update-app.js.map +1 -1
  19. package/dist/src/cloud-cli/cli.js +6 -6
  20. package/dist/src/cloud-cli/cli.js.map +1 -1
  21. package/dist/src/cloud-cli/login.d.ts.map +1 -1
  22. package/dist/src/cloud-cli/login.js +3 -2
  23. package/dist/src/cloud-cli/login.js.map +1 -1
  24. package/dist/src/cloud-cli/register.js +1 -1
  25. package/dist/src/cloud-cli/register.js.map +1 -1
  26. package/dist/src/cloud-cli/userdb.d.ts +10 -2
  27. package/dist/src/cloud-cli/userdb.d.ts.map +1 -1
  28. package/dist/src/cloud-cli/userdb.js +63 -100
  29. package/dist/src/cloud-cli/userdb.js.map +1 -1
  30. package/dist/src/communicator.d.ts +1 -1
  31. package/dist/src/communicator.d.ts.map +1 -1
  32. package/dist/src/context.d.ts +1 -1
  33. package/dist/src/context.d.ts.map +1 -1
  34. package/dist/src/context.js +1 -1
  35. package/dist/src/context.js.map +1 -1
  36. package/dist/src/dbos-executor.d.ts +18 -7
  37. package/dist/src/dbos-executor.d.ts.map +1 -1
  38. package/dist/src/dbos-executor.js +155 -52
  39. package/dist/src/dbos-executor.js.map +1 -1
  40. package/dist/src/dbos-runtime/cli.d.ts +0 -1
  41. package/dist/src/dbos-runtime/cli.d.ts.map +1 -1
  42. package/dist/src/dbos-runtime/cli.js +14 -2
  43. package/dist/src/dbos-runtime/cli.js.map +1 -1
  44. package/dist/src/dbos-runtime/config.d.ts +0 -1
  45. package/dist/src/dbos-runtime/config.d.ts.map +1 -1
  46. package/dist/src/dbos-runtime/config.js +0 -1
  47. package/dist/src/dbos-runtime/config.js.map +1 -1
  48. package/dist/src/dbos-runtime/debug.d.ts +4 -0
  49. package/dist/src/dbos-runtime/debug.d.ts.map +1 -0
  50. package/dist/src/dbos-runtime/debug.js +23 -0
  51. package/dist/src/dbos-runtime/debug.js.map +1 -0
  52. package/dist/src/dbos-runtime/runtime.d.ts +1 -1
  53. package/dist/src/dbos-runtime/runtime.d.ts.map +1 -1
  54. package/dist/src/dbos-runtime/runtime.js +13 -14
  55. package/dist/src/dbos-runtime/runtime.js.map +1 -1
  56. package/dist/src/debugger/debug_workflow.js +6 -6
  57. package/dist/src/debugger/debug_workflow.js.map +1 -1
  58. package/dist/src/httpServer/server.d.ts +1 -1
  59. package/dist/src/httpServer/server.d.ts.map +1 -1
  60. package/dist/src/{dbos-runtime → staticAnalysis}/TypeParser.d.ts +4 -0
  61. package/dist/src/staticAnalysis/TypeParser.d.ts.map +1 -0
  62. package/dist/src/{dbos-runtime → staticAnalysis}/TypeParser.js +34 -1
  63. package/dist/src/staticAnalysis/TypeParser.js.map +1 -0
  64. package/dist/src/{dbos-runtime → staticAnalysis}/openApi.d.ts.map +1 -1
  65. package/dist/src/{dbos-runtime → staticAnalysis}/openApi.js +1 -31
  66. package/dist/src/staticAnalysis/openApi.js.map +1 -0
  67. package/dist/src/staticAnalysis/tsDiagUtil.d.ts.map +1 -0
  68. package/dist/src/staticAnalysis/tsDiagUtil.js.map +1 -0
  69. package/dist/src/system_database.d.ts +20 -9
  70. package/dist/src/system_database.d.ts.map +1 -1
  71. package/dist/src/system_database.js +36 -41
  72. package/dist/src/system_database.js.map +1 -1
  73. package/dist/src/telemetry/collector.d.ts +5 -5
  74. package/dist/src/telemetry/collector.d.ts.map +1 -1
  75. package/dist/src/telemetry/collector.js +5 -17
  76. package/dist/src/telemetry/collector.js.map +1 -1
  77. package/dist/src/telemetry/exporters.d.ts +11 -24
  78. package/dist/src/telemetry/exporters.d.ts.map +1 -1
  79. package/dist/src/telemetry/exporters.js +42 -129
  80. package/dist/src/telemetry/exporters.js.map +1 -1
  81. package/dist/src/telemetry/index.d.ts +6 -2
  82. package/dist/src/telemetry/index.d.ts.map +1 -1
  83. package/dist/src/telemetry/index.js +16 -0
  84. package/dist/src/telemetry/index.js.map +1 -1
  85. package/dist/src/telemetry/logs.d.ts +35 -11
  86. package/dist/src/telemetry/logs.d.ts.map +1 -1
  87. package/dist/src/telemetry/logs.js +158 -53
  88. package/dist/src/telemetry/logs.js.map +1 -1
  89. package/dist/src/telemetry/traces.d.ts +1 -6
  90. package/dist/src/telemetry/traces.d.ts.map +1 -1
  91. package/dist/src/telemetry/traces.js +2 -34
  92. package/dist/src/telemetry/traces.js.map +1 -1
  93. package/dist/src/testing/testing_runtime.d.ts +1 -1
  94. package/dist/src/testing/testing_runtime.js +1 -1
  95. package/dist/src/transaction.d.ts +1 -1
  96. package/dist/src/transaction.d.ts.map +1 -1
  97. package/dist/src/workflow.d.ts +2 -0
  98. package/dist/src/workflow.d.ts.map +1 -1
  99. package/dist/src/workflow.js +18 -13
  100. package/dist/src/workflow.js.map +1 -1
  101. package/examples/hello/dbos-config.yaml +0 -1
  102. package/package.json +3 -2
  103. package/dist/src/dbos-runtime/TypeParser.d.ts.map +0 -1
  104. package/dist/src/dbos-runtime/TypeParser.js.map +0 -1
  105. package/dist/src/dbos-runtime/openApi.js.map +0 -1
  106. package/dist/src/dbos-runtime/tsDiagUtil.d.ts.map +0 -1
  107. package/dist/src/dbos-runtime/tsDiagUtil.js.map +0 -1
  108. package/dist/src/telemetry/signals.d.ts +0 -20
  109. package/dist/src/telemetry/signals.d.ts.map +0 -1
  110. package/dist/src/telemetry/signals.js +0 -11
  111. package/dist/src/telemetry/signals.js.map +0 -1
  112. /package/dist/src/{dbos-runtime → staticAnalysis}/openApi.d.ts +0 -0
  113. /package/dist/src/{dbos-runtime → staticAnalysis}/tsDiagUtil.d.ts +0 -0
  114. /package/dist/src/{dbos-runtime → staticAnalysis}/tsDiagUtil.js +0 -0
@@ -1,2 +1,2 @@
1
- export declare function configureApp(host: string, port: string, dbName: string): Promise<void>;
1
+ export declare function configureApp(host: string, port: string, dbName: string): Promise<number>;
2
2
  //# sourceMappingURL=configure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/configure.ts"],"names":[],"mappings":"AAOA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAmD5E"}
1
+ {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/configure.ts"],"names":[],"mappings":"AAOA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsD9F"}
@@ -8,50 +8,57 @@ const axios_1 = __importDefault(require("axios"));
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const yaml_1 = __importDefault(require("yaml"));
10
10
  const logs_1 = require("../../telemetry/logs");
11
- const utils_1 = require("../utils");
12
11
  const config_1 = require("../../dbos-runtime/config");
12
+ const userdb_1 = require("../userdb");
13
13
  async function configureApp(host, port, dbName) {
14
- const logger = (0, logs_1.createGlobalLogger)();
15
- const userCredentials = (0, utils_1.getCloudCredentials)();
16
- const bearerToken = "Bearer " + userCredentials.token;
17
- // call cloud and get hostname and port
18
- const res = await axios_1.default.get(`http://${host}:${port}/${userCredentials.userName}/databases/userdb/info/${dbName}`, {
19
- headers: {
20
- "Content-Type": "application/json",
21
- Authorization: bearerToken,
22
- },
23
- });
24
- // if status is not available or no hostname/port print error and exit
25
- if (res.status != 200) {
26
- logger.error("Error getting info for ${dbName} error: ${res.data}.");
27
- return;
28
- }
29
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
30
- const userdbHostname = res.data.HostName;
31
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
32
- const userdbPort = res.data.Port;
14
+ const logger = new logs_1.GlobalLogger();
15
+ let userDBInfo;
16
+ try {
17
+ userDBInfo = await (0, userdb_1.getUserDBInfo)(host, port, dbName);
18
+ }
19
+ catch (e) {
20
+ logger.error(`error getting DB Info: ${e.message}`);
21
+ return 1;
22
+ }
23
+ const userdbHostname = userDBInfo.HostName;
24
+ const userdbPort = userDBInfo.Port;
33
25
  if (userdbHostname == "" || userdbPort == 0) {
34
- logger.error("HostName: ${userdbHostname} Port: ${userdbPort} not available.");
35
- return;
26
+ logger.error(`HostName: ${userdbHostname} Port: ${userdbPort} not available.`);
27
+ return 1;
36
28
  }
37
- // read the yaml file
29
+ // Parse the config file
38
30
  const configFile = (0, config_1.loadConfigFile)(config_1.dbosConfigFilePath);
39
31
  if (!configFile) {
40
32
  logger.error(`failed to parse ${config_1.dbosConfigFilePath}`);
41
- return;
33
+ return 1;
34
+ }
35
+ const certificateURL = "https://truststore.pki.rds.amazonaws.com/us-east-1/us-east-1-bundle.pem";
36
+ const certificateFile = "us-east-1-bundle.pem";
37
+ try {
38
+ const certificate = await axios_1.default.get(certificateURL, {
39
+ responseType: 'arraybuffer'
40
+ });
41
+ fs_1.default.writeFileSync(certificateFile, certificate.data);
42
+ }
43
+ catch (e) {
44
+ logger.error("Error downloading RDS certificate bundle. Try downloading it manually from AWS.");
45
+ logger.error(e.message);
46
+ return 1;
42
47
  }
43
- // update hostname and port
48
+ // Update database hostname and port
44
49
  configFile.database.hostname = userdbHostname;
45
50
  configFile.database.port = userdbPort;
46
- // save the file
51
+ configFile.database.ssl_ca = certificateFile;
52
+ // Save the updated config file
47
53
  try {
48
54
  fs_1.default.writeFileSync(`${config_1.dbosConfigFilePath}`, yaml_1.default.stringify(configFile));
49
55
  }
50
56
  catch (e) {
51
57
  logger.error(`failed to write ${config_1.dbosConfigFilePath}: ${e.message}`);
52
- return;
58
+ return 1;
53
59
  }
54
- logger.info("Successfully configure user database at ${userdbHostname}:${userdbPort}.");
60
+ logger.info(`Successfully configured user database at ${userdbHostname}:${userdbPort}.`);
61
+ return 0;
55
62
  }
56
63
  exports.configureApp = configureApp;
57
64
  //# sourceMappingURL=configure.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"configure.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/configure.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAoB;AACpB,gDAAwB;AACxB,+CAA0D;AAC1D,oCAA+C;AAC/C,sDAA2F;AAEpF,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY,EAAE,MAAc;IACzE,MAAM,MAAM,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACpC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,uCAAuC;IACvC,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,0BAA0B,MAAM,EAAE,EAChH;QACE,OAAO,EAAE;Y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,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAC;QAChG,MAAM,CAAC,KAAK,CAAE,CAAW,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,CAAC,CAAA;KACT;IAED,oCAAoC;IACpC,UAAU,CAAC,QAAQ,CAAC,QAAQ,GAAG,cAAc,CAAA;IAC7C,UAAU,CAAC,QAAQ,CAAC,IAAI,GAAG,UAAU,CAAA;IACrC,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,eAAe,CAAA;IAE5C,+BAA+B;IAC/B,IAAI;QACF,YAAE,CAAC,aAAa,CAAC,GAAG,2BAAkB,EAAE,EAAE,cAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;KACvE;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,KAAK,CAAC,mBAAmB,2BAAkB,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/E,OAAO,CAAC,CAAC;KACV;IAED,MAAM,CAAC,IAAI,CAAC,4CAA4C,cAAc,IAAI,UAAU,GAAG,CAAC,CAAA;IACxF,OAAO,CAAC,CAAA;AACZ,CAAC;AAtDD,oCAsDC"}
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
8
8
  const logs_1 = require("../../telemetry/logs");
9
9
  const utils_1 = require("../utils");
10
10
  async function deleteApp(appName, host, port) {
11
- const logger = (0, logs_1.createGlobalLogger)();
11
+ const logger = new logs_1.GlobalLogger();
12
12
  const userCredentials = (0, utils_1.getCloudCredentials)();
13
13
  const bearerToken = "Bearer " + userCredentials.token;
14
14
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"delete-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/delete-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAA0D;AAC1D,oCAA+C;AAExC,KAAK,UAAU,SAAS,CAAC,OAAe,EAAE,IAAY,EAAE,IAAY;IACzE,MAAM,MAAM,GAAG,IAAA,yBAAkB,GAA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I,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAAE;YAC9F,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;QAC5D,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAxBD,8BAwBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":"AAWA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAqDhG"}
1
+ {"version":3,"file":"deploy-app-code.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":"AAWA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA+DhG"}
@@ -14,7 +14,7 @@ const utils_2 = require("../../utils");
14
14
  const config_1 = require("../../dbos-runtime/config");
15
15
  const deployDirectoryName = "dbos_deploy";
16
16
  async function deployAppCode(appName, host, port) {
17
- const logger = (0, logs_1.createGlobalLogger)();
17
+ const logger = new logs_1.GlobalLogger();
18
18
  const userCredentials = (0, utils_1.getCloudCredentials)();
19
19
  const bearerToken = "Bearer " + userCredentials.token;
20
20
  try {
@@ -27,6 +27,14 @@ async function deployAppCode(appName, host, port) {
27
27
  // Parse version from config file. If missing, use current epoch
28
28
  const version = configFile.version ?? Date.now().toString();
29
29
  configFile.version = version;
30
+ // Inject OTel export configuration
31
+ if (!configFile.telemetry) {
32
+ configFile.telemetry = {};
33
+ }
34
+ configFile.telemetry.OTLPExporter = {
35
+ logsEndpoint: "http://otel-collector:4318/v1/logs",
36
+ tracesEndpoint: "http://otel-collector:4318/v1/traces",
37
+ };
30
38
  try {
31
39
  fs_1.default.writeFileSync(`${deployDirectoryName}/${config_1.dbosConfigFilePath}`, yaml_1.default.stringify(configFile));
32
40
  }
@@ -34,7 +42,7 @@ async function deployAppCode(appName, host, port) {
34
42
  logger.error(`failed to write ${config_1.dbosConfigFilePath}: ${e.message}`);
35
43
  return 1;
36
44
  }
37
- (0, child_process_1.execSync)(`npm prune --production node_modules/* `);
45
+ (0, child_process_1.execSync)(`npm prune --omit=dev node_modules/* `);
38
46
  (0, child_process_1.execSync)(`zip -ry ${deployDirectoryName}/${appName}.zip ./* -x ${deployDirectoryName}/* ${config_1.dbosConfigFilePath} > /dev/null`);
39
47
  (0, child_process_1.execSync)(`zip -j ${deployDirectoryName}/${appName}.zip ${deployDirectoryName}/${config_1.dbosConfigFilePath} > /dev/null`);
40
48
  const zipData = (0, utils_2.readFileSync)(`${deployDirectoryName}/${appName}.zip`, "base64");
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAAwB;AACxB,iDAAyC;AACzC,4CAAoB;AACpB,+CAA0D;AAC1D,oCAA+C;AAC/C,uCAA4D;AAC5D,sDAA2F;AAE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GAAG,mBAAmB,IAAI,OAAO,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChF,MAAM,eAAK,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAC1F;YACE,mBAAmB,EAAE,OAAO;YACnC,mBAAmB,EAAE,OAAO;SACtB,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,yBAAyB,OAAO,iBAAiB,OAAO,EAAE,CAAC,CAAC;QACxE,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AArDD,sCAqDC"}
1
+ {"version":3,"file":"deploy-app-code.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/deploy-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAAwB;AACxB,iDAAyC;AACzC,4CAAoB;AACpB,+CAAoD;AACpD,oCAA+C;AAC/C,uCAA4D;AAC5D,sDAA2F;AAE3F,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAEnC,KAAK,UAAU,aAAa,CAAC,OAAe,EAAE,IAAY,EAAE,IAAY;IAC7E,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC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oBAAY,EAAC,GAAG,mBAAmB,IAAI,OAAO,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChF,MAAM,eAAK,CAAC,IAAI,CACd,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAC3E;YACE,mBAAmB,EAAE,OAAO;YAC5B,mBAAmB,EAAE,OAAO;SAC7B,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,yBAAyB,OAAO,iBAAiB,OAAO,EAAE,CAAC,CAAC;QACxE,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AA/DD,sCA+DC"}
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
8
8
  const logs_1 = require("../../telemetry/logs");
9
9
  const utils_1 = require("../utils");
10
10
  async function getAppLogs(appName, host, port) {
11
- const logger = (0, logs_1.createGlobalLogger)();
11
+ const logger = new logs_1.GlobalLogger();
12
12
  const userCredentials = (0, utils_1.getCloudCredentials)();
13
13
  const bearerToken = "Bearer " + userCredentials.token;
14
14
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"get-app-logs.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/get-app-logs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAA0D;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,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI;QACF,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,qBAAqB,OAAO,EAAE,EAAE;YAC5G,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,+CAA+C,OAAO,EAAE,CAAC,CAAC;QACtE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACrB,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACvF,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,0CAA0C,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3F,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAzBD,gCAyBC"}
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
8
8
  const logs_1 = require("../../telemetry/logs");
9
9
  const utils_1 = require("../utils");
10
10
  async function listApps(host, port) {
11
- const logger = (0, logs_1.createGlobalLogger)();
11
+ const logger = new logs_1.GlobalLogger();
12
12
  const userCredentials = (0, utils_1.getCloudCredentials)();
13
13
  const bearerToken = "Bearer " + userCredentials.token;
14
14
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../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AC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YACjE,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,gCAAiC,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACrE,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAnCD,4BAmCC"}
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
8
8
  const logs_1 = require("../../telemetry/logs");
9
9
  const utils_1 = require("../utils");
10
10
  async function registerApp(appName, host, port, machines) {
11
- const logger = (0, logs_1.createGlobalLogger)();
11
+ const logger = new logs_1.GlobalLogger();
12
12
  const userCredentials = (0, utils_1.getCloudCredentials)();
13
13
  const bearerToken = "Bearer " + userCredentials.token;
14
14
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAA0D;AAC1D,oCAA+C;AAExC,KAAK,UAAU,WAAW,CAAC,OAAe,EAAE,IAAY,EAAE,IAAY,EAAE,QAAgB;IAC7F,MAAM,MAAM,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACpC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,cAAc,EAChE;YACE,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,QAAQ;SAClB,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAc,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,QAAQ,IAAI,EAAE,CAAC,CAAC;QACtC,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,kCAAkC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/E,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,kCAAkC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACnF,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAhCD,kCAgCC"}
1
+ {"version":3,"file":"register-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/register-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAoD;AACpD,oCAA+C;AAExC,KAAK,UAAU,WAAW,CAAC,OAAe,EAAE,IAAY,EAAE,IAAY,EAAE,QAAgB;IAC7F,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,cAAc,EAChE;YACE,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,QAAQ;SAClB,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAc,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,QAAQ,IAAI,EAAE,CAAC,CAAC;QACtC,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,kCAAkC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/E,OAAO,CAAC,CAAC;SACV;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,kCAAkC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YACnF,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAhCD,kCAgCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/update-app.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiC9G"}
1
+ {"version":3,"file":"update-app.d.ts","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/update-app.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkC9G"}
@@ -8,7 +8,7 @@ const axios_1 = __importDefault(require("axios"));
8
8
  const logs_1 = require("../../telemetry/logs");
9
9
  const utils_1 = require("../utils");
10
10
  async function updateApp(appName, host, port, machines) {
11
- const logger = (0, logs_1.createGlobalLogger)();
11
+ const logger = new logs_1.GlobalLogger();
12
12
  const userCredentials = (0, utils_1.getCloudCredentials)();
13
13
  const bearerToken = "Bearer " + userCredentials.token;
14
14
  try {
@@ -33,7 +33,8 @@ async function updateApp(appName, host, port, machines) {
33
33
  return 1;
34
34
  }
35
35
  else {
36
- logger.error(`failed to update application ${appName}: ${e.message}`);
36
+ e.message = `failed to update application ${appName}: ${e.message}`;
37
+ logger.error(e);
37
38
  return 1;
38
39
  }
39
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"update-app.js","sourceRoot":"","sources":["../../../../src/cloud-cli/applications/update-app.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAA0D;AAC1D,oCAA+C;AAGxC,KAAK,UAAU,SAAS,CAAC,OAAe,EAAE,IAAY,EAAE,IAAY,EAAE,QAAgB;IAC3F,MAAM,MAAM,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACpC,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAEtD,IAAI;QACF,MAAM,CAAC,IAAI,CAAC,wBAAwB,OAAO,OAAO,QAAQ,WAAW,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,eAAK,CAAC,KAAK,CAC9B,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAC3E;YACE,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,QAAQ;SAClB,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,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vE,MAAM,MAAM,GAAG,MAAM,eAAK,CAAC,KAAK,CAC9B,UAAU,IAAI,IAAI,IAAI,IAAI,eAAe,CAAC,QAAQ,gBAAgB,OAAO,EAAE,EAC3E;YACE,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,QAAQ;SAClB,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,WAAW,GAAgB,MAAM,CAAC,IAAmB,CAAC;QAC5D,MAAM,CAAC,IAAI,CAAC,yBAAyB,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC5I,OAAO,CAAC,CAAC;KACV;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,gCAAgC,OAAO,KAAK,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,CAAC;SACV;aAAM;YACJ,CAAW,CAAC,OAAO,GAAG,gCAAgC,OAAO,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC;YAC1F,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO,CAAC,CAAC;SACV;KACF;AACH,CAAC;AAlCD,8BAkCC"}
@@ -110,7 +110,8 @@ applicationCommands
110
110
  .option('-d, --dbname <string>', 'Specify the name of an already setup RDS user databases')
111
111
  .action(async (options) => {
112
112
  const { host, port } = applicationCommands.opts();
113
- await (0, applications_1.configureApp)(host, port, options.dbname);
113
+ const exitCode = await (0, applications_1.configureApp)(host, port, options.dbname);
114
+ process.exit(exitCode);
114
115
  });
115
116
  //////////////////////////////
116
117
  /* USER DATABASE MANAGEMENT */
@@ -125,7 +126,7 @@ userdbCommands
125
126
  .argument('<string>', 'database name')
126
127
  .option('-a, --admin <string>', 'Specify the admin user', 'postgres')
127
128
  .option('-W, --password <string>', 'Specify the admin password', 'postgres')
128
- .option('-s, --sync', 'make synchronous call', false)
129
+ .option('-s, --sync', 'make synchronous call', true)
129
130
  .action((async (dbname, options) => {
130
131
  const { host, port } = userdbCommands.opts();
131
132
  await (0, userdb_1.createUserDb)(host, port, dbname, options.admin, options.password, options.sync);
@@ -140,10 +141,9 @@ userdbCommands
140
141
  userdbCommands
141
142
  .command('delete')
142
143
  .argument('<string>', 'database name')
143
- .option('-s, --sync', 'make synchronous call', false)
144
- .action((async (dbname, options) => {
144
+ .action((async (dbname) => {
145
145
  const { host, port } = userdbCommands.opts();
146
- await (0, userdb_1.deleteUserDb)(host, port, dbname, options.sync);
146
+ await (0, userdb_1.deleteUserDb)(host, port, dbname);
147
147
  }));
148
148
  userdbCommands
149
149
  .command('migrate')
@@ -154,7 +154,7 @@ userdbCommands
154
154
  userdbCommands
155
155
  .command('rollbackmigration')
156
156
  .action((() => {
157
- const exitCode = (0, userdb_1.rollbackmigration)();
157
+ const exitCode = (0, userdb_1.rollbackMigration)();
158
158
  process.exit(exitCode);
159
159
  }));
160
160
  program.parse(process.argv);
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cloud-cli/cli.ts"],"names":[],"mappings":";;;AAEA,kDAQyB;AACzB,yCAAoC;AACpC,mCAAgC;AAChC,yCAA0C;AAC1C,qCAA6F;AAC7F,mCAA2C;AAE3C,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,MAAM,YAAY,GAAG,WAAW,CAAA;AAChC,MAAM,YAAY,GAAG,MAAM,CAAA;AAE3B,8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,GAAG,IAAA,0BAAiB,GAAE,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC,CAAA;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,oDAAoD;AACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE;IACjC,OAAO,CAAC,UAAU,EAAE,CAAC;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/login.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,YAAY,qCAAqC,CAAA;AAC9D,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AAEnD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AA8CD,wBAAsB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA2D7D"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/login.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,YAAY,qCAAqC,CAAA;AAC9D,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AAEnD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AA8CD,wBAAsB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA4D7D"}
@@ -39,7 +39,7 @@ async function verifyToken(token) {
39
39
  });
40
40
  }
41
41
  async function login(username) {
42
- const logger = (0, logs_1.createGlobalLogger)();
42
+ const logger = new logs_1.GlobalLogger();
43
43
  logger.info(`Logging in!`);
44
44
  const deviceCodeRequest = {
45
45
  method: 'POST',
@@ -53,7 +53,8 @@ async function login(username) {
53
53
  deviceCodeResponse = response.data;
54
54
  }
55
55
  catch (e) {
56
- logger.error(`failed to log in`, e);
56
+ e.message = `failed to log in: ${e.message}`;
57
+ logger.error(e);
57
58
  }
58
59
  if (!deviceCodeResponse) {
59
60
  return 1;
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/cloud-cli/login.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAuD;AACvD,kDAA0B;AAC1B,oCAAiC;AACjC,gEAA+C;AAC/C,wDAAkC;AAClC,iDAAyC;AACzC,4CAAoB;AAEP,QAAA,WAAW,GAAG,OAAO,CAAC;AACtB,QAAA,YAAY,GAAG,kCAAkC,CAAA;AACjD,QAAA,mBAAmB,GAAG,gBAAgB,CAAA;AAsBnD,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC;IACxB,OAAO,EAAE,qDAAqD;CAC/D,CAAC,CAAC;AAEH,KAAK,UAAU,aAAa,CAAC,GAAW;IACtC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC5C,OAAO,GAAG,CAAC,YAAY,EAAE,CAAC;AAC5B,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,KAAa;IACtC,MAAM,OAAO,GAAG,sBAAG,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAEtD,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;QAClE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;KAClC;IAED,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAE3D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAA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AU,EAAE;QACrD,IAAI;YACF,MAAM,IAAA,aAAK,EAAC,kBAAkB,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;YAC/C,cAAc,IAAI,kBAAkB,CAAC,QAAQ,CAAC;YAC9C,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACnD,aAAa,GAAG,QAAQ,CAAC,IAAqB,CAAC;YAC/C,MAAM;SACP;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;SACrC;KACF;IACD,IAAI,CAAC,aAAa,EAAE;QAClB,OAAO,CAAC,CAAC;KACV;IAED,MAAM,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC9C,MAAM,WAAW,GAAyB;QACxC,KAAK,EAAE,aAAa,CAAC,YAAY;QACjC,QAAQ,EAAE,QAAQ;KACnB,CAAC;IACF,IAAA,wBAAQ,EAAC,YAAY,mBAAW,EAAE,CAAC,CAAC;IACpC,YAAE,CAAC,aAAa,CAAC,GAAG,mBAAW,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;IACrF,MAAM,CAAC,IAAI,CAAC,mCAAmC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,MAAM,CAAC,IAAI,CAAC,uCAAuC,mBAAW,cAAc,CAAC,CAAC;IAC9E,OAAO,CAAC,CAAC;AACX,CAAC;AA5DD,sBA4DC"}
@@ -11,7 +11,7 @@ async function registerUser(username, host, port) {
11
11
  const userCredentials = (0, utils_1.getCloudCredentials)();
12
12
  const bearerToken = "Bearer " + userCredentials.token;
13
13
  const userName = userCredentials.userName;
14
- const logger = (0, logs_1.createGlobalLogger)();
14
+ const logger = new logs_1.GlobalLogger();
15
15
  try {
16
16
  // First, register the user.
17
17
  const register = await axios_1.default.put(`http://${host}:${port}/user`, {
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAuD;AACvD,mCAA8C;AAEvC,KAAK,UAAU,YAAY,CAAC,QAAgB,EAAE,IAAY,EAAE,IAAY;IAC7E,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IACtD,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACpC,IAAI;QACF,4BAA4B;QAC5B,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,UAAU,IAAI,IAAI,IAAI,OAAO,EAC7B;YACE,IAAI,EAAE,QAAQ;SACf,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAc,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,mBAAmB,QAAQ,WAAW,QAAQ,EAAE,CAAC,CAAC;KAC/D;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;SACzE;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;SAC9E;QACD,OAAO,CAAC,CAAC;KACV;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA9BD,oCA8BC"}
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/cloud-cli/register.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAAiD;AACjD,mCAA8C;AAEvC,KAAK,UAAU,YAAY,CAAC,QAAgB,EAAE,IAAY,EAAE,IAAY;IAC7E,MAAM,eAAe,GAAG,IAAA,2BAAmB,GAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IACtD,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,mBAAY,EAAE,CAAC;IAClC,IAAI;QACF,4BAA4B;QAC5B,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,UAAU,IAAI,IAAI,IAAI,OAAO,EAC7B;YACE,IAAI,EAAE,QAAQ;SACf,EACD;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,WAAW;aAC3B;SACF,CACF,CAAC;QACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAc,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,mBAAmB,QAAQ,WAAW,QAAQ,EAAE,CAAC,CAAC;KAC/D;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,eAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACvC,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;SACzE;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,2BAA2B,QAAQ,KAAM,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;SAC9E;QACD,OAAO,CAAC,CAAC;KACV;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AA9BD,oCA8BC"}
@@ -1,6 +1,14 @@
1
+ export interface UserDBInstance {
2
+ readonly DBName: string;
3
+ readonly UserID: string;
4
+ readonly Status: string;
5
+ readonly HostName: string;
6
+ readonly Port: number;
7
+ }
1
8
  export declare function createUserDb(host: string, port: string, dbName: string, adminName: string, adminPassword: string, sync: boolean): Promise<void>;
2
- export declare function deleteUserDb(host: string, port: string, dbName: string, sync: boolean): Promise<void>;
9
+ export declare function deleteUserDb(host: string, port: string, dbName: string): Promise<void>;
3
10
  export declare function getUserDb(host: string, port: string, dbName: string): Promise<void>;
4
11
  export declare function migrate(): number;
5
- export declare function rollbackmigration(): number;
12
+ export declare function rollbackMigration(): number;
13
+ export declare function getUserDBInfo(host: string, port: string, dbName: string): Promise<UserDBInstance>;
6
14
  //# sourceMappingURL=userdb.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":"AAOA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBA0DrI;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,iBAsD3F;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAczE;AAED,wBAAgB,OAAO,IAAI,MAAM,CAgDhC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CA4B1C"}
1
+ {"version":3,"file":"userdb.d.ts","sourceRoot":"","sources":["../../../src/cloud-cli/userdb.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAA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